Skip to content

Commit 4698d97

Browse files
committed
#512987 fix issues with Angular in disconnected mode (incorrect componentName + reverts changes made in https://github.com/Sitecore/jss/pull/883/files#diff-400cff33d615870f02598f5e490d541b32225e9a316915a3b0843b373e9467d2)
1 parent 5d652a6 commit 4698d97

File tree

3 files changed

+36
-37
lines changed

3 files changed

+36
-37
lines changed

packages/create-sitecore-jss/src/templates/angular/data/routes/styleguide/custom-route-type/en.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ fields:
99
content: <p>Custom route type fields are good for things like articles, where you may wish to have a filter UI on content fields, such as author or category. Route level fields are easy to query against, whereas component-level fields are not because it's possible to remove a component from a route. Note that route level fields <em>cannot be personalized</em> because you cannot conditionally swap out the route item for a different content item.</p>
1010
placeholders:
1111
<%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
12-
- componentName: Styleguide-CustomRouteType
12+
- componentName: StyleguideCustomRouteType

packages/create-sitecore-jss/src/templates/angular/data/routes/styleguide/en.yml

+32-33
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ placeholders:
88
content: |
99
<p>This is a live set of examples of how to use JSS. For more information on using JSS, please see <a href="https://jss.sitecore.com" target="_blank" rel="noopener noreferrer">the documentation</a>.</p>
1010
<p>The content and layout of this page is defined in <code>/data/routes/styleguide/en.yml</code></p>
11-
- componentName: Styleguide-Layout
11+
- componentName: StyleguideLayout
1212
placeholders:
1313
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
14-
- componentName: Styleguide-Section
14+
- componentName: StyleguideSection
1515
fields:
1616
heading: Content Data
1717
placeholders:
1818
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
19-
- componentName: Styleguide-FieldUsage-Text
19+
- componentName: StyleguideFieldUsageText
2020
fields:
2121
heading: Single-Line Text
2222
sample: This is a sample text field. <mark>HTML is encoded.</mark> In Sitecore, editors will see a <input type="text">.
2323
sample2: This is another sample text field using rendering options. <mark>HTML supported with encode=false.</mark> Cannot edit because editable=false.
24-
- componentName: Styleguide-FieldUsage-Text
24+
- componentName: StyleguideFieldUsageText
2525
fields:
2626
heading: Multi-Line Text
2727
description: '<small>Multi-line text tells Sitecore to use a <code>textarea</code> for editing; consumption in JSS is the same as single-line text.</small>'
2828
sample: This is a sample multi-line text field. <mark>HTML is encoded.</mark> In Sitecore, editors will see a textarea.
2929
sample2: This is another sample multi-line text field using rendering options. <mark>HTML supported with encode=false.</mark>
30-
- componentName: Styleguide-FieldUsage-RichText
30+
- componentName: StyleguideFieldUsageRichText
3131
fields:
3232
heading: Rich Text
3333
sample: <p>This is a sample rich text field. <mark>HTML is always supported.</mark> In Sitecore, editors will see a WYSIWYG editor for these fields.</p>
@@ -36,7 +36,7 @@ placeholders:
3636
sample2: |
3737
<p>Another sample rich text field, using options. Keep markup entered in rich text fields as simple as possible - ideally bare tags only (no classes). Adding a wrapping class can help with styling within rich text blocks.</p>
3838
<marquee>But you can use any valid HTML in a rich text field!</marquee>
39-
- componentName: Styleguide-FieldUsage-Image
39+
- componentName: StyleguideFieldUsageImage
4040
fields:
4141
heading: Image
4242
sample1:
@@ -45,7 +45,7 @@ placeholders:
4545
sample2:
4646
src: /data/media/img/jss_logo.png
4747
alt: Sitecore JSS Logo
48-
- componentName: Styleguide-FieldUsage-File
48+
- componentName: StyleguideFieldUsageFile
4949
fields:
5050
heading: File
5151
description: |
@@ -54,27 +54,28 @@ placeholders:
5454
src: /data/media/files/jss.pdf
5555
title: Example File
5656
description: This data will be added to the Sitecore Media Library on import
57-
- componentName: Styleguide-FieldUsage-Number
57+
- componentName: StyleguideFieldUsageNumber
5858
fields:
5959
heading: Number
6060
description: '<small>Number tells Sitecore to use a number entry for editing.</small>'
6161
sample: 1.21
62-
- componentName: Styleguide-FieldUsage-Checkbox
62+
sample2: 71
63+
- componentName: StyleguideFieldUsageCheckbox
6364
fields:
6465
heading: Checkbox
6566
description: |
6667
<small>Note: Sitecore does not support inline editing of Checkbox fields. The value must be edited in Experience Editor by using the edit rendering fields button (looks like a pencil) with the whole component selected.</small>
6768
checkbox: true
6869
checkbox2: false
69-
- componentName: Styleguide-FieldUsage-Date
70+
- componentName: StyleguideFieldUsageDate
7071
fields:
7172
heading: Date
7273
description: |
7374
<p><small>Both <code>Date</code> and <code>DateTime</code> field types are available. Choosing <code>DateTime</code> will make Sitecore show editing UI for time; both types store complete date and time values internally. Date values in JSS are formatted using <a href="https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations" target="_blank">ISO 8601 formatted strings</a>, for example <code>2012-04-23T18:25:43.511Z</code>.</small></p>
7475
<div class="alert alert-warning"><small>Note: this is a JavaScript date format (e.g. <code>new Date().toISOString()</code>), and is different from how Sitecore stores date field values internally. Sitecore-formatted dates will not work.</small></div>
75-
date: '2012-05-04T00:00:00Z'
76-
dateTime: '2018-03-14T15:00:00Z'
77-
- componentName: Styleguide-FieldUsage-Link
76+
date: '2012-05-04T00:00:00.000Z'
77+
dateTime: '2018-03-14T15:00:00.000Z'
78+
- componentName: StyleguideFieldUsageLink
7879
fields:
7980
heading: General Link
8081
description: <p>A <em>General Link</em> is a field that represents an <code>&lt;a&gt;</code> tag.</p>
@@ -101,7 +102,7 @@ placeholders:
101102
target: _blank
102103
class: font-weight-bold
103104
title: <a> title attribute
104-
- componentName: Styleguide-FieldUsage-ItemLink
105+
- componentName: StyleguideFieldUsageItemLink
105106
fields:
106107
heading: Item Link
107108
description: |
@@ -123,7 +124,7 @@ placeholders:
123124
template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ItemLink-Item-Template
124125
fields:
125126
textField: Referenced item textField
126-
- componentName: Styleguide-FieldUsage-ContentList
127+
- componentName: StyleguideFieldUsageContentList
127128
fields:
128129
heading: Content List
129130
description: |
@@ -154,7 +155,7 @@ placeholders:
154155
- template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
155156
fields:
156157
textField: Hello World Item 2
157-
- componentName: Styleguide-FieldUsage-Custom
158+
- componentName: StyleguideFieldUsageCustom
158159
fields:
159160
heading: Custom Fields
160161
description: |
@@ -166,14 +167,12 @@ placeholders:
166167
</small>
167168
</p>
168169
customIntField: 31337
169-
- componentName: Styleguide-Section
170+
- componentName: StyleguideSection
170171
fields:
171172
heading: Layout Patterns
172173
placeholders:
173-
<%- helper.getAppPrefix(appPrefix, appName) %>jss-header:
174-
- componentName: Styleguide-Layout-Reuse
175174
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
176-
- componentName: Styleguide-Layout-Reuse
175+
- componentName: StyleguideLayoutReuse
177176
fields:
178177
heading: Reusing Content
179178
description: <p>JSS provides powerful options to reuse content, whether it's sharing a common piece of text across pages or sketching out a site with repeating <em>lorem ipsum</em> content.</p>
@@ -190,38 +189,38 @@ placeholders:
190189
- componentName: ContentBlock
191190
fields:
192191
content: <p>Mix and match reused and local content. Check out <code>/data/routes/styleguide/en.yml</code> to see how.</p>
193-
- componentName: Styleguide-Layout-Tabs
192+
- componentName: StyleguideLayoutTabs
194193
fields:
195194
heading: Tabs
196195
description: <p>Creating hierarchical components like tabs is made simpler in JSS because it's easy to introspect the layout structure.</p>
197196
placeholders:
198197
<%- helper.getAppPrefix(appPrefix, appName) %>jss-tabs:
199-
- componentName: Styleguide-Layout-Tabs-Tab
198+
- componentName: StyleguideLayoutTabsTab
200199
fields:
201200
title: Tab 1
202201
content: <p>Tab 1 contents!</p>
203-
- componentName: Styleguide-Layout-Tabs-Tab
202+
- componentName: StyleguideLayoutTabsTab
204203
fields:
205204
title: Tab 2
206205
content: <p>Tab 2 contents!</p>
207-
- componentName: Styleguide-Layout-Tabs-Tab
206+
- componentName: StyleguideLayoutTabsTab
208207
fields:
209208
title: Tab 3
210209
content: <p>Tab 3 contents!</p>
211-
- componentName: Styleguide-Section
210+
- componentName: StyleguideSection
212211
fields:
213212
heading: Sitecore Patterns
214213
placeholders:
215214
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
216-
- componentName: Styleguide-SitecoreContext
215+
- componentName: StyleguideSitecoreContext
217216
fields:
218217
heading: Sitecore Context
219218
description: <p><small>The Sitecore Context contains route-level data about the current context - for example, <code>pageState</code> enables conditionally executing code based on whether Sitecore is in Experience Editor or not.</small></p>
220-
- componentName: Styleguide-RouteFields
219+
- componentName: StyleguideRouteFields
221220
fields:
222221
heading: Route-level Fields
223222
description: <p><small>Route-level content fields are defined on the <em>route</em> instead of on a <em>component</em>. This allows multiple components to share the field data on the same route - and querying is much easier on route level fields, making <em>custom route types</em> ideal for filterable/queryable data such as articles.</small></p>
224-
- componentName: Styleguide-ComponentParams
223+
- componentName: StyleguideComponentParams
225224
fields:
226225
heading: Component Params
227226
description: <p><small>Component params (also called Rendering Parameters) allow storing non-content parameters for a component. These params should be used for more technical options such as CSS class names or structural settings.</small></p>
@@ -231,24 +230,24 @@ placeholders:
231230
# they are always sent to the component as strings.
232231
columns: 5
233232
useCallToAction: true
234-
- componentName: Styleguide-Tracking
233+
- componentName: StyleguideTracking
235234
fields:
236235
heading: Tracking
237236
description: <p><small>JSS supports tracking Sitecore analytics events from within apps. Give it a try with this handy interactive demo.</small></p>
238-
- componentName: Styleguide-Section
237+
- componentName: StyleguideSection
239238
fields:
240239
heading: Multilingual Patterns
241240
placeholders:
242241
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
243-
- componentName: Styleguide-Multilingual
242+
- componentName: StyleguideMultilingual
244243
fields:
245244
heading: Translation Patterns
246245
sample: This text can be translated in en.yml
247-
- componentName: Styleguide-Section
246+
- componentName: StyleguideSection
248247
fields:
249248
heading: Angular Patterns
250249
placeholders:
251250
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
252-
- componentName: Styleguide-Angular-LazyLoading
251+
- componentName: StyleguideAngularLazyLoading
253252
fields:
254253
heading: Lazy Loading

packages/create-sitecore-jss/src/templates/angular/data/routes/styleguide/{{language}}.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ placeholders:
1111
Use the <a href="/en/styleguide">English version</a> for full content.
1212
</div>
1313
<p>The content and layout of this page is defined in <code>/data/routes/styleguide/<%- language %>.yml</code></p>
14-
- componentName: Styleguide-Layout
14+
- componentName: StyleguideLayout
1515
placeholders:
1616
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
17-
- componentName: Styleguide-Section
17+
- componentName: StyleguideSection
1818
fields:
1919
heading: Multilingual Patterns
2020
placeholders:
2121
<%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
22-
- componentName: Styleguide-Multilingual
22+
- componentName: StyleguideMultilingual
2323
fields:
2424
heading: Translation Patterns
2525
sample: This text can be translated in <%- language %>.yml

0 commit comments

Comments
 (0)