create-sitecore-jss 22.9.0 → 22.9.1-canary.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/LICENSE.MD +202 -202
  2. package/README.md +10 -10
  3. package/dist/templates/angular/src/assets/images/sc_logo.svg +52 -52
  4. package/dist/templates/angular-sxp/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  5. package/dist/templates/angular-sxp/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  6. package/dist/templates/angular-sxp/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  7. package/dist/templates/angular-sxp/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  8. package/dist/templates/angular-sxp/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  9. package/dist/templates/angular-sxp/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  10. package/dist/templates/angular-sxp/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  11. package/dist/templates/angular-sxp/data/dictionary/en.yml +4 -4
  12. package/dist/templates/angular-sxp/data/dictionary/{{language}}.yml +4 -4
  13. package/dist/templates/angular-sxp/data/routes/en.yml +61 -61
  14. package/dist/templates/angular-sxp/data/routes/graphql/en.yml +27 -27
  15. package/dist/templates/angular-sxp/data/routes/graphql/sample-1/en.yml +9 -9
  16. package/dist/templates/angular-sxp/data/routes/graphql/sample-2/en.yml +9 -9
  17. package/dist/templates/angular-sxp/data/routes/styleguide/custom-route-type/en.yml +12 -12
  18. package/dist/templates/angular-sxp/data/routes/styleguide/en.yml +271 -271
  19. package/dist/templates/angular-sxp/data/routes/styleguide/{{language}}.yml +25 -25
  20. package/dist/templates/angular-sxp/data/routes/{{language}}.yml +4 -4
  21. package/dist/templates/angular-sxp/sitecore/config/{{appName}}.config +90 -90
  22. package/dist/templates/angular-sxp/sitecore/definitions/components/graph-ql-integrated-demo.sitecore.graphql +71 -71
  23. package/dist/templates/angular-sxp/sitecore/gitignore +2 -2
  24. package/dist/templates/nextjs/public/sc_logo.svg +52 -52
  25. package/dist/templates/nextjs-styleguide/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  26. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  27. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  28. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  29. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  30. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  31. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  32. package/dist/templates/nextjs-styleguide/data/dictionary/en.yml +4 -4
  33. package/dist/templates/nextjs-styleguide/data/dictionary/{{language}}.yml +4 -4
  34. package/dist/templates/nextjs-styleguide/data/routes/en.yml +63 -63
  35. package/dist/templates/nextjs-styleguide/data/routes/graphql/en.yml +27 -27
  36. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-1/en.yml +9 -9
  37. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-2/en.yml +9 -9
  38. package/dist/templates/nextjs-styleguide/data/routes/styleguide/custom-route-type/en.yml +12 -12
  39. package/dist/templates/nextjs-styleguide/data/routes/styleguide/en.yml +259 -259
  40. package/dist/templates/nextjs-styleguide/data/routes/styleguide/{{language}}.yml +25 -25
  41. package/dist/templates/nextjs-styleguide/data/routes/{{language}}.yml +4 -4
  42. package/dist/templates/nextjs-styleguide-tracking/data/dictionary/en.yml +5 -5
  43. package/dist/templates/nextjs-styleguide-tracking/data/routes/tracking/en.yml +8 -8
  44. package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-column-splitter.scss +14 -14
  45. package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-shadow.scss +42 -42
  46. package/dist/templates/react/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  47. package/dist/templates/react/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  48. package/dist/templates/react/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  49. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  50. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  51. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  52. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  53. package/dist/templates/react/data/dictionary/en.yml +4 -4
  54. package/dist/templates/react/data/dictionary/{{language}}.yml +4 -4
  55. package/dist/templates/react/data/routes/en.yml +61 -61
  56. package/dist/templates/react/data/routes/graphql/en.yml +27 -27
  57. package/dist/templates/react/data/routes/graphql/sample-1/en.yml +9 -9
  58. package/dist/templates/react/data/routes/graphql/sample-2/en.yml +9 -9
  59. package/dist/templates/react/data/routes/styleguide/custom-route-type/en.yml +12 -12
  60. package/dist/templates/react/data/routes/styleguide/en.yml +263 -263
  61. package/dist/templates/react/data/routes/styleguide/{{language}}.yml +26 -26
  62. package/dist/templates/react/data/routes/{{language}}.yml +4 -4
  63. package/dist/templates/react-native/.buckconfig +6 -6
  64. package/dist/templates/react-native/.eslintrc +74 -74
  65. package/dist/templates/react-native/.gitattributes +1 -1
  66. package/dist/templates/react-native/.prettierrc +9 -9
  67. package/dist/templates/react-native/.vscode/launch.json +42 -42
  68. package/dist/templates/react-native/.vscode/settings.json +1 -1
  69. package/dist/templates/react-native/LICENSE.txt +202 -202
  70. package/dist/templates/react-native/README.MD +115 -115
  71. package/dist/templates/react-native/android/app/BUCK +55 -55
  72. package/dist/templates/react-native/android/app/build.gradle +201 -201
  73. package/dist/templates/react-native/android/app/build_defs.bzl +19 -19
  74. package/dist/templates/react-native/android/app/proguard-rules.pro +10 -10
  75. package/dist/templates/react-native/android/app/src/debug/AndroidManifest.xml +8 -8
  76. package/dist/templates/react-native/android/app/src/main/AndroidManifest.xml +26 -26
  77. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainActivity.java +15 -15
  78. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainApplication.java +74 -74
  79. package/dist/templates/react-native/android/app/src/main/res/values/strings.xml +3 -3
  80. package/dist/templates/react-native/android/app/src/main/res/values/styles.xml +9 -9
  81. package/dist/templates/react-native/android/build.gradle +38 -38
  82. package/dist/templates/react-native/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  83. package/dist/templates/react-native/android/gradle.properties +21 -21
  84. package/dist/templates/react-native/android/gradlew +188 -188
  85. package/dist/templates/react-native/android/gradlew.bat +100 -100
  86. package/dist/templates/react-native/android/settings.gradle +3 -3
  87. package/dist/templates/react-native/app.json +3 -3
  88. package/dist/templates/react-native/assets/img/sc_logo.svg +52 -52
  89. package/dist/templates/react-native/data/content/Styleguide/ItemLinkField/Item1/en.json +10 -10
  90. package/dist/templates/react-native/data/routes/en.json +22 -22
  91. package/dist/templates/react-native/data/routes/styleguide/en.json +227 -227
  92. package/dist/templates/react-native/data/routes/styleguide/{{language}}.json +31 -31
  93. package/dist/templates/react-native/data/routes/{{language}}.json +7 -7
  94. package/dist/templates/react-native/gitignore +60 -60
  95. package/dist/templates/react-native/ios/Podfile +53 -53
  96. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.h +15 -15
  97. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.m +42 -42
  98. package/dist/templates/react-native/ios/{{appName}}/Base.lproj/LaunchScreen.xib +42 -42
  99. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/AppIcon.appiconset/Contents.json +38 -38
  100. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/Contents.json +6 -6
  101. package/dist/templates/react-native/ios/{{appName}}/Info.plist +57 -57
  102. package/dist/templates/react-native/ios/{{appName}}/main.m +16 -16
  103. package/dist/templates/react-native/ios/{{appName}}-tvOS/Info.plist +53 -53
  104. package/dist/templates/react-native/ios/{{appName}}-tvOSTests/Info.plist +24 -24
  105. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative-tvOS.xcscheme +129 -129
  106. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative.xcscheme +129 -129
  107. package/dist/templates/react-native/ios/{{appName}}Tests/BasicSampleReactNativeTests.m +72 -72
  108. package/dist/templates/react-native/ios/{{appName}}Tests/Info.plist +24 -24
  109. package/dist/templates/react-native/package.json +78 -78
  110. package/dist/templates/react-native/sitecore/config/{{appName}}.config +47 -47
  111. package/dist/templates/react-native/sitecore/gitignore +2 -2
  112. package/dist/templates/vue/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  113. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  114. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  115. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  116. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  117. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  118. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  119. package/dist/templates/vue/data/dictionary/en.yml +7 -7
  120. package/dist/templates/vue/data/dictionary/{{language}}.yml +7 -7
  121. package/dist/templates/vue/data/routes/en.yml +63 -63
  122. package/dist/templates/vue/data/routes/graphql/en.yml +34 -34
  123. package/dist/templates/vue/data/routes/graphql/sample-1/en.yml +9 -9
  124. package/dist/templates/vue/data/routes/graphql/sample-2/en.yml +9 -9
  125. package/dist/templates/vue/data/routes/styleguide/custom-route-type/en.yml +12 -12
  126. package/dist/templates/vue/data/routes/styleguide/en.yml +264 -264
  127. package/dist/templates/vue/data/routes/styleguide/{{language}}.yml +26 -26
  128. package/dist/templates/vue/data/routes/{{language}}.yml +4 -4
  129. package/dist/templates/vue/public/img/icons/safari-pinned-tab.svg +75 -75
  130. package/dist/templates/vue/src/assets/sc_logo.svg +52 -52
  131. package/package.json +2 -2
@@ -1,271 +1,271 @@
1
- fields:
2
- pageTitle: Styleguide | Sitecore JSS
3
- placeholders:
4
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
5
- - componentName: ContentBlock
6
- fields:
7
- heading: JSS Styleguide
8
- content: |
9
- <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>
10
- <p>The content and layout of this page is defined in <code>/data/routes/styleguide/en.yml</code></p>
11
- - componentName: StyleguideLayout
12
- placeholders:
13
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
14
- - componentName: StyleguideSection
15
- fields:
16
- heading: Content Data
17
- placeholders:
18
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
19
- - componentName: StyleguideFieldUsageText
20
- fields:
21
- heading: Single-Line Text
22
- sample: This is a sample text field. <mark>HTML is encoded.</mark> In Sitecore, editors will see a <input type="text">.
23
- sample2: This is another sample text field using rendering options. <mark>HTML supported with encode=false.</mark> Cannot edit because editable=false.
24
- - componentName: StyleguideFieldUsageText
25
- fields:
26
- heading: Multi-Line Text
27
- 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>'
28
- sample: This is a sample multi-line text field. <mark>HTML is encoded.</mark> In Sitecore, editors will see a textarea.
29
- sample2: This is another sample multi-line text field using rendering options. <mark>HTML supported with encode=false.</mark>
30
- - componentName: StyleguideFieldUsageRichText
31
- fields:
32
- heading: Rich Text
33
- 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>
34
- # YAML can use multiline definitions (a pipe followed by an indented block) to make writing rich text content easier.
35
- # As long as the indent remains consistent, no escaping is required.
36
- sample2: |
37
- <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>
38
- <marquee>But you can use any valid HTML in a rich text field!</marquee>
39
- - componentName: StyleguideFieldUsageImage
40
- fields:
41
- heading: Image
42
- sample1:
43
- src: /data/media/img/sc_logo.png
44
- alt: Sitecore Logo
45
- sample2:
46
- src: /data/media/img/jss_logo.png
47
- alt: Sitecore JSS Logo
48
- - componentName: StyleguideFieldUsageFile
49
- fields:
50
- heading: File
51
- description: |
52
- <small>Note: Sitecore does not support inline editing of File 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>
53
- file:
54
- src: /data/media/files/jss.pdf
55
- title: Example File
56
- description: This data will be added to the Sitecore Media Library on import
57
- - componentName: StyleguideFieldUsageNumber
58
- fields:
59
- heading: Number
60
- description: '<small>Number tells Sitecore to use a number entry for editing.</small>'
61
- sample: 1.21
62
- sample2: 71
63
- - componentName: StyleguideFieldUsageCheckbox
64
- fields:
65
- heading: Checkbox
66
- description: |
67
- <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>
68
- checkbox: true
69
- checkbox2: false
70
- - componentName: StyleguideFieldUsageDate
71
- fields:
72
- heading: Date
73
- description: |
74
- <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>
75
- <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>
76
- date: '2012-05-04T00:00:00.000Z'
77
- dateTime: '2018-03-14T15:00:00.000Z'
78
- - componentName: StyleguideFieldUsageLink
79
- fields:
80
- heading: General Link
81
- description: <p>A <em>General Link</em> is a field that represents an <code>&lt;a&gt;</code> tag.</p>
82
- externalLink:
83
- href: https://www.sitecore.com
84
- text: Link to Sitecore
85
- # absolute URLs to known routes are converted into 'internal links'
86
- # when imported to Sitecore. Note: target route must have an explicitly specified ID value.
87
- internalLink:
88
- href: /
89
- # 'text' is optional if the link is rendered with a custom body (e.g. child HTML)
90
-
91
- # Will be linked to Sitecore media item on import
92
- mediaLink:
93
- href: /data/media/files/jss.pdf
94
- text: Link to PDF
95
- emailLink:
96
- href: mailto:foo@bar.com
97
- text: Send an Email
98
- # All possible link parameters
99
- paramsLink:
100
- href: https://dev.sitecore.net
101
- text: Sitecore Dev Site
102
- target: _blank
103
- class: fw-bold
104
- title: <a> title attribute
105
- - componentName: StyleguideFieldUsageItemLink
106
- fields:
107
- heading: Item Link
108
- description: |
109
- <p>
110
- <small>
111
- Item Links are a way to reference another content item to use data from it.
112
- Referenced items may be shared.
113
- To reference multiple content items, use a <em>Content List</em> field.<br />
114
- <strong>Note:</strong> Sitecore does not support inline editing of Item Link 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.
115
- </small>
116
- </p>
117
- # A shared item link gets its available items from a folder of shared content items.
118
- # Common usages for such a field might be choosing from a controlled list of options,
119
- # perhaps theme colors, alignment options, or switchable shared content blocks (author bios, for example)
120
- sharedItemLink:
121
- # see /data/content/Styleguide/ItemLinkField for definition of this IDs
122
- id: styleguide-item-link-field-shared-1
123
- localItemLink:
124
- template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ItemLink-Item-Template
125
- fields:
126
- textField: Referenced item textField
127
- - componentName: StyleguideFieldUsageContentList
128
- fields:
129
- heading: Content List
130
- description: |
131
- <p>
132
- <small>
133
- Content Lists are a way to reference zero or more other content items.
134
- Referenced items may be shared.
135
- To reference a single content item, use an <em>Item Link</em> field.<br />
136
- <strong>Note:</strong> Sitecore does not support inline editing of Content List 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.
137
- </small>
138
- </p>
139
- # A shared content list gets its available items from a folder of shared content items.
140
- # NOTE: items referenced here are only the _selected items_, not the whole corpus of available options.
141
- # Common usages for such a field might be choosing data items for repeating structures like
142
- # multicolumnar promos or tabs, or shared content pieces like linking one or more authors to an article.
143
- sharedContentList:
144
- # see /data/content/Styleguide/ContentListField for definitions of these IDs
145
- - id: styleguide-content-list-field-shared-1
146
- - id: styleguide-content-list-field-shared-2
147
- localContentList:
148
- # You can also define content lists using an _array of local item definitions_
149
- # note that names are default auto-generated to be unique. Explicitly specified names must be unique.
150
- # NOTE: local item definitions cannot be shared with other content list fields, and are
151
- # generally not preferable compared to using shared definitions.
152
- - template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
153
- fields:
154
- textField: Hello World Item 1
155
- - template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
156
- fields:
157
- textField: Hello World Item 2
158
- - componentName: StyleguideFieldUsageCustom
159
- fields:
160
- heading: Custom Fields
161
- description: |
162
- <p>
163
- <small>
164
- Any Sitecore field type can be consumed by JSS.
165
- In this sample we consume the <em>Integer</em> field type.<br />
166
- <strong>Note:</strong> For field types with complex data, custom <code>FieldSerializer</code>s may need to be implemented on the Sitecore side.
167
- </small>
168
- </p>
169
- customIntField: 31337
170
- - componentName: StyleguideSection
171
- fields:
172
- heading: Layout Patterns
173
- placeholders:
174
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
175
- - componentName: StyleguideLayoutReuse
176
- fields:
177
- heading: Reusing Content
178
- 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>
179
- placeholders:
180
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-reuse-example:
181
- # Reference shared content using its ID (this is defined in /data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml)
182
- # Shared content is an 'edit once, reflected everywhere' operation for a content author.
183
- - id: lorem-ipsum-content-block
184
- - id: lorem-ipsum-content-block
185
- # Referencing shared content with `copy: true` will cause it to be shared while disconnected, but _copied on import_.
186
- # Use this for quickly comping layouts with FPO content that will not be shared once actual content is entered.
187
- - id: lorem-ipsum-content-block
188
- copy: true
189
- - componentName: ContentBlock
190
- fields:
191
- content: <p>Mix and match reused and local content. Check out <code>/data/routes/styleguide/en.yml</code> to see how.</p>
192
- - componentName: StyleguideLayoutTabs
193
- fields:
194
- heading: Tabs
195
- description: <p>Creating hierarchical components like tabs is made simpler in JSS because it's easy to introspect the layout structure.</p>
196
- placeholders:
197
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-tabs:
198
- - componentName: StyleguideLayoutTabsTab
199
- fields:
200
- title: Tab 1
201
- content: <p>Tab 1 contents!</p>
202
- - componentName: StyleguideLayoutTabsTab
203
- fields:
204
- title: Tab 2
205
- content: <p>Tab 2 contents!</p>
206
- - componentName: StyleguideLayoutTabsTab
207
- fields:
208
- title: Tab 3
209
- content: <p>Tab 3 contents!</p>
210
- - componentName: StyleguideSection
211
- fields:
212
- heading: Sitecore Patterns
213
- placeholders:
214
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
215
- - componentName: StyleguideSitecoreContext
216
- fields:
217
- heading: Sitecore Context
218
- 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>
219
- - componentName: StyleguideRouteFields
220
- fields:
221
- heading: Route-level Fields
222
- 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>
223
- - componentName: StyleguideComponentParams
224
- fields:
225
- heading: Component Params
226
- 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>
227
- params:
228
- cssClass: alert alert-success
229
- # IMPORTANT: while params can be defined in the manifest as non-string types,
230
- # they are always sent to the component as strings.
231
- columns: 5
232
- useCallToAction: true
233
- - componentName: StyleguideTracking
234
- fields:
235
- heading: Tracking
236
- description: <p><small>JSS supports tracking Sitecore analytics events from within apps. Give it a try with this handy interactive demo.</small></p>
237
- - componentName: StyleguideSection
238
- fields:
239
- heading: Multilingual Patterns
240
- placeholders:
241
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
242
- - componentName: StyleguideMultilingual
243
- fields:
244
- heading: Translation Patterns
245
- sample: This text can be translated in en.yml
246
- - componentName: StyleguideSection
247
- fields:
248
- heading: Angular Patterns
249
- placeholders:
250
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
251
- - componentName: StyleguideAngularLazyLoading
252
- fields:
253
- heading: Lazy Loading
254
- - componentName: StyleguideSection
255
- fields:
256
- heading: Editing
257
- placeholders:
258
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
259
- - componentName: StyleguideEditFrame
260
- fields:
261
- heading: Edit Frame
262
- description: <p>Who framed Roger Rabbit? Hard to say. <br />
263
- But JSS now allows to edit frame any piece of content on a page in editing mode. <br />
264
- You can add web edit or field edit buttons, modify edit frame style through CSS class and put the frame wherever you need it.
265
- </p>
266
- applyRedToText: 0
267
- sampleList:
268
- # see /data/content/Styleguide/EditFrameDemo for definitions of these IDs
269
- - id: styleguide-edit-frame-list-item-1
270
- - id: styleguide-edit-frame-list-item-2
271
-
1
+ fields:
2
+ pageTitle: Styleguide | Sitecore JSS
3
+ placeholders:
4
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
5
+ - componentName: ContentBlock
6
+ fields:
7
+ heading: JSS Styleguide
8
+ content: |
9
+ <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>
10
+ <p>The content and layout of this page is defined in <code>/data/routes/styleguide/en.yml</code></p>
11
+ - componentName: StyleguideLayout
12
+ placeholders:
13
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
14
+ - componentName: StyleguideSection
15
+ fields:
16
+ heading: Content Data
17
+ placeholders:
18
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
19
+ - componentName: StyleguideFieldUsageText
20
+ fields:
21
+ heading: Single-Line Text
22
+ sample: This is a sample text field. <mark>HTML is encoded.</mark> In Sitecore, editors will see a <input type="text">.
23
+ sample2: This is another sample text field using rendering options. <mark>HTML supported with encode=false.</mark> Cannot edit because editable=false.
24
+ - componentName: StyleguideFieldUsageText
25
+ fields:
26
+ heading: Multi-Line Text
27
+ 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>'
28
+ sample: This is a sample multi-line text field. <mark>HTML is encoded.</mark> In Sitecore, editors will see a textarea.
29
+ sample2: This is another sample multi-line text field using rendering options. <mark>HTML supported with encode=false.</mark>
30
+ - componentName: StyleguideFieldUsageRichText
31
+ fields:
32
+ heading: Rich Text
33
+ 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>
34
+ # YAML can use multiline definitions (a pipe followed by an indented block) to make writing rich text content easier.
35
+ # As long as the indent remains consistent, no escaping is required.
36
+ sample2: |
37
+ <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>
38
+ <marquee>But you can use any valid HTML in a rich text field!</marquee>
39
+ - componentName: StyleguideFieldUsageImage
40
+ fields:
41
+ heading: Image
42
+ sample1:
43
+ src: /data/media/img/sc_logo.png
44
+ alt: Sitecore Logo
45
+ sample2:
46
+ src: /data/media/img/jss_logo.png
47
+ alt: Sitecore JSS Logo
48
+ - componentName: StyleguideFieldUsageFile
49
+ fields:
50
+ heading: File
51
+ description: |
52
+ <small>Note: Sitecore does not support inline editing of File 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>
53
+ file:
54
+ src: /data/media/files/jss.pdf
55
+ title: Example File
56
+ description: This data will be added to the Sitecore Media Library on import
57
+ - componentName: StyleguideFieldUsageNumber
58
+ fields:
59
+ heading: Number
60
+ description: '<small>Number tells Sitecore to use a number entry for editing.</small>'
61
+ sample: 1.21
62
+ sample2: 71
63
+ - componentName: StyleguideFieldUsageCheckbox
64
+ fields:
65
+ heading: Checkbox
66
+ description: |
67
+ <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>
68
+ checkbox: true
69
+ checkbox2: false
70
+ - componentName: StyleguideFieldUsageDate
71
+ fields:
72
+ heading: Date
73
+ description: |
74
+ <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>
75
+ <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>
76
+ date: '2012-05-04T00:00:00.000Z'
77
+ dateTime: '2018-03-14T15:00:00.000Z'
78
+ - componentName: StyleguideFieldUsageLink
79
+ fields:
80
+ heading: General Link
81
+ description: <p>A <em>General Link</em> is a field that represents an <code>&lt;a&gt;</code> tag.</p>
82
+ externalLink:
83
+ href: https://www.sitecore.com
84
+ text: Link to Sitecore
85
+ # absolute URLs to known routes are converted into 'internal links'
86
+ # when imported to Sitecore. Note: target route must have an explicitly specified ID value.
87
+ internalLink:
88
+ href: /
89
+ # 'text' is optional if the link is rendered with a custom body (e.g. child HTML)
90
+
91
+ # Will be linked to Sitecore media item on import
92
+ mediaLink:
93
+ href: /data/media/files/jss.pdf
94
+ text: Link to PDF
95
+ emailLink:
96
+ href: mailto:foo@bar.com
97
+ text: Send an Email
98
+ # All possible link parameters
99
+ paramsLink:
100
+ href: https://dev.sitecore.net
101
+ text: Sitecore Dev Site
102
+ target: _blank
103
+ class: fw-bold
104
+ title: <a> title attribute
105
+ - componentName: StyleguideFieldUsageItemLink
106
+ fields:
107
+ heading: Item Link
108
+ description: |
109
+ <p>
110
+ <small>
111
+ Item Links are a way to reference another content item to use data from it.
112
+ Referenced items may be shared.
113
+ To reference multiple content items, use a <em>Content List</em> field.<br />
114
+ <strong>Note:</strong> Sitecore does not support inline editing of Item Link 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.
115
+ </small>
116
+ </p>
117
+ # A shared item link gets its available items from a folder of shared content items.
118
+ # Common usages for such a field might be choosing from a controlled list of options,
119
+ # perhaps theme colors, alignment options, or switchable shared content blocks (author bios, for example)
120
+ sharedItemLink:
121
+ # see /data/content/Styleguide/ItemLinkField for definition of this IDs
122
+ id: styleguide-item-link-field-shared-1
123
+ localItemLink:
124
+ template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ItemLink-Item-Template
125
+ fields:
126
+ textField: Referenced item textField
127
+ - componentName: StyleguideFieldUsageContentList
128
+ fields:
129
+ heading: Content List
130
+ description: |
131
+ <p>
132
+ <small>
133
+ Content Lists are a way to reference zero or more other content items.
134
+ Referenced items may be shared.
135
+ To reference a single content item, use an <em>Item Link</em> field.<br />
136
+ <strong>Note:</strong> Sitecore does not support inline editing of Content List 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.
137
+ </small>
138
+ </p>
139
+ # A shared content list gets its available items from a folder of shared content items.
140
+ # NOTE: items referenced here are only the _selected items_, not the whole corpus of available options.
141
+ # Common usages for such a field might be choosing data items for repeating structures like
142
+ # multicolumnar promos or tabs, or shared content pieces like linking one or more authors to an article.
143
+ sharedContentList:
144
+ # see /data/content/Styleguide/ContentListField for definitions of these IDs
145
+ - id: styleguide-content-list-field-shared-1
146
+ - id: styleguide-content-list-field-shared-2
147
+ localContentList:
148
+ # You can also define content lists using an _array of local item definitions_
149
+ # note that names are default auto-generated to be unique. Explicitly specified names must be unique.
150
+ # NOTE: local item definitions cannot be shared with other content list fields, and are
151
+ # generally not preferable compared to using shared definitions.
152
+ - template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
153
+ fields:
154
+ textField: Hello World Item 1
155
+ - template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
156
+ fields:
157
+ textField: Hello World Item 2
158
+ - componentName: StyleguideFieldUsageCustom
159
+ fields:
160
+ heading: Custom Fields
161
+ description: |
162
+ <p>
163
+ <small>
164
+ Any Sitecore field type can be consumed by JSS.
165
+ In this sample we consume the <em>Integer</em> field type.<br />
166
+ <strong>Note:</strong> For field types with complex data, custom <code>FieldSerializer</code>s may need to be implemented on the Sitecore side.
167
+ </small>
168
+ </p>
169
+ customIntField: 31337
170
+ - componentName: StyleguideSection
171
+ fields:
172
+ heading: Layout Patterns
173
+ placeholders:
174
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
175
+ - componentName: StyleguideLayoutReuse
176
+ fields:
177
+ heading: Reusing Content
178
+ 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>
179
+ placeholders:
180
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-reuse-example:
181
+ # Reference shared content using its ID (this is defined in /data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml)
182
+ # Shared content is an 'edit once, reflected everywhere' operation for a content author.
183
+ - id: lorem-ipsum-content-block
184
+ - id: lorem-ipsum-content-block
185
+ # Referencing shared content with `copy: true` will cause it to be shared while disconnected, but _copied on import_.
186
+ # Use this for quickly comping layouts with FPO content that will not be shared once actual content is entered.
187
+ - id: lorem-ipsum-content-block
188
+ copy: true
189
+ - componentName: ContentBlock
190
+ fields:
191
+ content: <p>Mix and match reused and local content. Check out <code>/data/routes/styleguide/en.yml</code> to see how.</p>
192
+ - componentName: StyleguideLayoutTabs
193
+ fields:
194
+ heading: Tabs
195
+ description: <p>Creating hierarchical components like tabs is made simpler in JSS because it's easy to introspect the layout structure.</p>
196
+ placeholders:
197
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-tabs:
198
+ - componentName: StyleguideLayoutTabsTab
199
+ fields:
200
+ title: Tab 1
201
+ content: <p>Tab 1 contents!</p>
202
+ - componentName: StyleguideLayoutTabsTab
203
+ fields:
204
+ title: Tab 2
205
+ content: <p>Tab 2 contents!</p>
206
+ - componentName: StyleguideLayoutTabsTab
207
+ fields:
208
+ title: Tab 3
209
+ content: <p>Tab 3 contents!</p>
210
+ - componentName: StyleguideSection
211
+ fields:
212
+ heading: Sitecore Patterns
213
+ placeholders:
214
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
215
+ - componentName: StyleguideSitecoreContext
216
+ fields:
217
+ heading: Sitecore Context
218
+ 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>
219
+ - componentName: StyleguideRouteFields
220
+ fields:
221
+ heading: Route-level Fields
222
+ 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>
223
+ - componentName: StyleguideComponentParams
224
+ fields:
225
+ heading: Component Params
226
+ 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>
227
+ params:
228
+ cssClass: alert alert-success
229
+ # IMPORTANT: while params can be defined in the manifest as non-string types,
230
+ # they are always sent to the component as strings.
231
+ columns: 5
232
+ useCallToAction: true
233
+ - componentName: StyleguideTracking
234
+ fields:
235
+ heading: Tracking
236
+ description: <p><small>JSS supports tracking Sitecore analytics events from within apps. Give it a try with this handy interactive demo.</small></p>
237
+ - componentName: StyleguideSection
238
+ fields:
239
+ heading: Multilingual Patterns
240
+ placeholders:
241
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
242
+ - componentName: StyleguideMultilingual
243
+ fields:
244
+ heading: Translation Patterns
245
+ sample: This text can be translated in en.yml
246
+ - componentName: StyleguideSection
247
+ fields:
248
+ heading: Angular Patterns
249
+ placeholders:
250
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
251
+ - componentName: StyleguideAngularLazyLoading
252
+ fields:
253
+ heading: Lazy Loading
254
+ - componentName: StyleguideSection
255
+ fields:
256
+ heading: Editing
257
+ placeholders:
258
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
259
+ - componentName: StyleguideEditFrame
260
+ fields:
261
+ heading: Edit Frame
262
+ description: <p>Who framed Roger Rabbit? Hard to say. <br />
263
+ But JSS now allows to edit frame any piece of content on a page in editing mode. <br />
264
+ You can add web edit or field edit buttons, modify edit frame style through CSS class and put the frame wherever you need it.
265
+ </p>
266
+ applyRedToText: 0
267
+ sampleList:
268
+ # see /data/content/Styleguide/EditFrameDemo for definitions of these IDs
269
+ - id: styleguide-edit-frame-list-item-1
270
+ - id: styleguide-edit-frame-list-item-2
271
+
@@ -1,25 +1,25 @@
1
- fields:
2
- pageTitle: Styleguide | Sitecore JSS
3
- placeholders:
4
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
5
- - componentName: ContentBlock
6
- fields:
7
- heading: JSS Styleguide
8
- content: |
9
- <div class="alert alert-primary">
10
- This is a partial <%- language %> translation of the JSS Styleguide to demonstrate translation functionality.
11
- Use the <a href="/en/styleguide">English version</a> for full content.
12
- </div>
13
- <p>The content and layout of this page is defined in <code>/data/routes/styleguide/<%- language %>.yml</code></p>
14
- - componentName: StyleguideLayout
15
- placeholders:
16
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
17
- - componentName: StyleguideSection
18
- fields:
19
- heading: Multilingual Patterns
20
- placeholders:
21
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
22
- - componentName: StyleguideMultilingual
23
- fields:
24
- heading: Translation Patterns
25
- sample: This text can be translated in <%- language %>.yml
1
+ fields:
2
+ pageTitle: Styleguide | Sitecore JSS
3
+ placeholders:
4
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
5
+ - componentName: ContentBlock
6
+ fields:
7
+ heading: JSS Styleguide
8
+ content: |
9
+ <div class="alert alert-primary">
10
+ This is a partial <%- language %> translation of the JSS Styleguide to demonstrate translation functionality.
11
+ Use the <a href="/en/styleguide">English version</a> for full content.
12
+ </div>
13
+ <p>The content and layout of this page is defined in <code>/data/routes/styleguide/<%- language %>.yml</code></p>
14
+ - componentName: StyleguideLayout
15
+ placeholders:
16
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
17
+ - componentName: StyleguideSection
18
+ fields:
19
+ heading: Multilingual Patterns
20
+ placeholders:
21
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
22
+ - componentName: StyleguideMultilingual
23
+ fields:
24
+ heading: Translation Patterns
25
+ sample: This text can be translated in <%- language %>.yml
@@ -1,4 +1,4 @@
1
- # in order to demonstrate translation on the Styleguide page, we need to have a stub on the homepage for that language.
2
- # this can be deleted safely if not using multiple languages - or not using <%- language %>.
3
- name: home
4
- id: home-page
1
+ # in order to demonstrate translation on the Styleguide page, we need to have a stub on the homepage for that language.
2
+ # this can be deleted safely if not using multiple languages - or not using <%- language %>.
3
+ name: home
4
+ id: home-page