create-sitecore-jss 22.9.1-canary.1 → 22.9.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 (135) 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/src/lib/component-props/index.ts +40 -0
  26. package/dist/templates/nextjs/src/lib/page-props-factory/plugins/component-props.ts +4 -37
  27. package/dist/templates/nextjs-styleguide/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  28. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  29. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  30. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  31. package/dist/templates/nextjs-styleguide/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  32. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  33. package/dist/templates/nextjs-styleguide/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  34. package/dist/templates/nextjs-styleguide/data/dictionary/en.yml +4 -4
  35. package/dist/templates/nextjs-styleguide/data/dictionary/{{language}}.yml +4 -4
  36. package/dist/templates/nextjs-styleguide/data/routes/en.yml +63 -63
  37. package/dist/templates/nextjs-styleguide/data/routes/graphql/en.yml +27 -27
  38. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-1/en.yml +9 -9
  39. package/dist/templates/nextjs-styleguide/data/routes/graphql/sample-2/en.yml +9 -9
  40. package/dist/templates/nextjs-styleguide/data/routes/styleguide/custom-route-type/en.yml +12 -12
  41. package/dist/templates/nextjs-styleguide/data/routes/styleguide/en.yml +259 -259
  42. package/dist/templates/nextjs-styleguide/data/routes/styleguide/{{language}}.yml +25 -25
  43. package/dist/templates/nextjs-styleguide/data/routes/{{language}}.yml +4 -4
  44. package/dist/templates/nextjs-styleguide-tracking/data/dictionary/en.yml +5 -5
  45. package/dist/templates/nextjs-styleguide-tracking/data/routes/tracking/en.yml +8 -8
  46. package/dist/templates/nextjs-sxa/src/assets/sass/components/_component-column-splitter.scss +14 -14
  47. package/dist/templates/nextjs-sxa/src/assets/sass/components/promo/_promo-shadow.scss +42 -42
  48. package/dist/templates/nextjs-sxa/src/pages/404.tsx +30 -17
  49. package/dist/templates/nextjs-sxa/src/pages/500.tsx +30 -17
  50. package/dist/templates/react/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  51. package/dist/templates/react/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  52. package/dist/templates/react/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  53. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  54. package/dist/templates/react/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  55. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  56. package/dist/templates/react/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  57. package/dist/templates/react/data/dictionary/en.yml +4 -4
  58. package/dist/templates/react/data/dictionary/{{language}}.yml +4 -4
  59. package/dist/templates/react/data/routes/en.yml +61 -61
  60. package/dist/templates/react/data/routes/graphql/en.yml +27 -27
  61. package/dist/templates/react/data/routes/graphql/sample-1/en.yml +9 -9
  62. package/dist/templates/react/data/routes/graphql/sample-2/en.yml +9 -9
  63. package/dist/templates/react/data/routes/styleguide/custom-route-type/en.yml +12 -12
  64. package/dist/templates/react/data/routes/styleguide/en.yml +263 -263
  65. package/dist/templates/react/data/routes/styleguide/{{language}}.yml +26 -26
  66. package/dist/templates/react/data/routes/{{language}}.yml +4 -4
  67. package/dist/templates/react-native/.buckconfig +6 -6
  68. package/dist/templates/react-native/.eslintrc +74 -74
  69. package/dist/templates/react-native/.gitattributes +1 -1
  70. package/dist/templates/react-native/.prettierrc +9 -9
  71. package/dist/templates/react-native/.vscode/launch.json +42 -42
  72. package/dist/templates/react-native/.vscode/settings.json +1 -1
  73. package/dist/templates/react-native/LICENSE.txt +202 -202
  74. package/dist/templates/react-native/README.MD +115 -115
  75. package/dist/templates/react-native/android/app/BUCK +55 -55
  76. package/dist/templates/react-native/android/app/build.gradle +201 -201
  77. package/dist/templates/react-native/android/app/build_defs.bzl +19 -19
  78. package/dist/templates/react-native/android/app/proguard-rules.pro +10 -10
  79. package/dist/templates/react-native/android/app/src/debug/AndroidManifest.xml +8 -8
  80. package/dist/templates/react-native/android/app/src/main/AndroidManifest.xml +26 -26
  81. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainActivity.java +15 -15
  82. package/dist/templates/react-native/android/app/src/main/java/com/{{appName}}/MainApplication.java +74 -74
  83. package/dist/templates/react-native/android/app/src/main/res/values/strings.xml +3 -3
  84. package/dist/templates/react-native/android/app/src/main/res/values/styles.xml +9 -9
  85. package/dist/templates/react-native/android/build.gradle +38 -38
  86. package/dist/templates/react-native/android/gradle/wrapper/gradle-wrapper.properties +5 -5
  87. package/dist/templates/react-native/android/gradle.properties +21 -21
  88. package/dist/templates/react-native/android/gradlew +188 -188
  89. package/dist/templates/react-native/android/gradlew.bat +100 -100
  90. package/dist/templates/react-native/android/settings.gradle +3 -3
  91. package/dist/templates/react-native/app.json +3 -3
  92. package/dist/templates/react-native/assets/img/sc_logo.svg +52 -52
  93. package/dist/templates/react-native/data/content/Styleguide/ItemLinkField/Item1/en.json +10 -10
  94. package/dist/templates/react-native/data/routes/en.json +22 -22
  95. package/dist/templates/react-native/data/routes/styleguide/en.json +227 -227
  96. package/dist/templates/react-native/data/routes/styleguide/{{language}}.json +31 -31
  97. package/dist/templates/react-native/data/routes/{{language}}.json +7 -7
  98. package/dist/templates/react-native/gitignore +60 -60
  99. package/dist/templates/react-native/ios/Podfile +53 -53
  100. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.h +15 -15
  101. package/dist/templates/react-native/ios/{{appName}}/AppDelegate.m +42 -42
  102. package/dist/templates/react-native/ios/{{appName}}/Base.lproj/LaunchScreen.xib +42 -42
  103. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/AppIcon.appiconset/Contents.json +38 -38
  104. package/dist/templates/react-native/ios/{{appName}}/Images.xcassets/Contents.json +6 -6
  105. package/dist/templates/react-native/ios/{{appName}}/Info.plist +57 -57
  106. package/dist/templates/react-native/ios/{{appName}}/main.m +16 -16
  107. package/dist/templates/react-native/ios/{{appName}}-tvOS/Info.plist +53 -53
  108. package/dist/templates/react-native/ios/{{appName}}-tvOSTests/Info.plist +24 -24
  109. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative-tvOS.xcscheme +129 -129
  110. package/dist/templates/react-native/ios/{{appName}}.xcodeproj/xcshareddata/xcschemes/BasicSampleReactNative.xcscheme +129 -129
  111. package/dist/templates/react-native/ios/{{appName}}Tests/BasicSampleReactNativeTests.m +72 -72
  112. package/dist/templates/react-native/ios/{{appName}}Tests/Info.plist +24 -24
  113. package/dist/templates/react-native/package.json +78 -78
  114. package/dist/templates/react-native/sitecore/config/{{appName}}.config +47 -47
  115. package/dist/templates/react-native/sitecore/gitignore +2 -2
  116. package/dist/templates/vue/data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml +9 -9
  117. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item1/en.yml +6 -6
  118. package/dist/templates/vue/data/content/Styleguide/ContentListField/Item2/en.yml +6 -6
  119. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item1/en.yml +6 -6
  120. package/dist/templates/vue/data/content/Styleguide/EditFrameDemo/Item2/en.yml +6 -6
  121. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item1/en.yml +6 -6
  122. package/dist/templates/vue/data/content/Styleguide/ItemLinkField/Item2/en.yml +6 -6
  123. package/dist/templates/vue/data/dictionary/en.yml +7 -7
  124. package/dist/templates/vue/data/dictionary/{{language}}.yml +7 -7
  125. package/dist/templates/vue/data/routes/en.yml +63 -63
  126. package/dist/templates/vue/data/routes/graphql/en.yml +34 -34
  127. package/dist/templates/vue/data/routes/graphql/sample-1/en.yml +9 -9
  128. package/dist/templates/vue/data/routes/graphql/sample-2/en.yml +9 -9
  129. package/dist/templates/vue/data/routes/styleguide/custom-route-type/en.yml +12 -12
  130. package/dist/templates/vue/data/routes/styleguide/en.yml +264 -264
  131. package/dist/templates/vue/data/routes/styleguide/{{language}}.yml +26 -26
  132. package/dist/templates/vue/data/routes/{{language}}.yml +4 -4
  133. package/dist/templates/vue/public/img/icons/safari-pinned-tab.svg +75 -75
  134. package/dist/templates/vue/src/assets/sc_logo.svg +52 -52
  135. package/package.json +2 -2
@@ -1,12 +1,12 @@
1
- # Using a Custom Route Type enables adding more field data to the route level.
2
- template: <%- helper.getAppPrefix(appPrefix, appName) %>ExampleCustomRouteType
3
- fields:
4
- # Note that custom route types inherit from the default route type automatically.
5
- # This is what makes the `pageTitle` field available here, when it's not defined on the custom route type.
6
- pageTitle: Custom Route Type | Sitecore JSS
7
- headline: A Treatise on Route-Level Fields in JSS
8
- author: Myrtle
9
- 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>
10
- placeholders:
11
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
12
- - componentName: Styleguide-CustomRouteType
1
+ # Using a Custom Route Type enables adding more field data to the route level.
2
+ template: <%- helper.getAppPrefix(appPrefix, appName) %>ExampleCustomRouteType
3
+ fields:
4
+ # Note that custom route types inherit from the default route type automatically.
5
+ # This is what makes the `pageTitle` field available here, when it's not defined on the custom route type.
6
+ pageTitle: Custom Route Type | Sitecore JSS
7
+ headline: A Treatise on Route-Level Fields in JSS
8
+ author: Myrtle
9
+ 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>
10
+ placeholders:
11
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-main:
12
+ - componentName: Styleguide-CustomRouteType
@@ -1,263 +1,263 @@
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: Styleguide-Layout
12
- placeholders:
13
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
14
- - componentName: Styleguide-Section
15
- fields:
16
- heading: Content Data
17
- placeholders:
18
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
19
- - componentName: Styleguide-FieldUsage-Text
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: Styleguide-FieldUsage-Text
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: Styleguide-FieldUsage-RichText
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: Styleguide-FieldUsage-Image
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: Styleguide-FieldUsage-File
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: Styleguide-FieldUsage-Number
58
- fields:
59
- heading: Number
60
- description: "<small>Number tells Sitecore to use a number entry for editing.</small>"
61
- sample: 1.21
62
- - componentName: Styleguide-FieldUsage-Checkbox
63
- fields:
64
- heading: Checkbox
65
- description: |
66
- <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>
67
- checkbox: true
68
- checkbox2: false
69
- - componentName: Styleguide-FieldUsage-Date
70
- fields:
71
- heading: Date
72
- description: |
73
- <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>
74
- <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
78
- fields:
79
- heading: General Link
80
- description: <p>A <em>General Link</em> is a field that represents an <code>&lt;a&gt;</code> tag.</p>
81
- externalLink:
82
- href: https://www.sitecore.com
83
- text: Link to Sitecore
84
- # absolute URLs to known routes are converted into 'internal links'
85
- # when imported to Sitecore. Note: target route must have an explicitly specified ID value.
86
- internalLink:
87
- href: /
88
- # 'text' is optional if the link is rendered with a custom body (e.g. child HTML)
89
-
90
- # Will be linked to Sitecore media item on import
91
- mediaLink:
92
- href: /data/media/files/jss.pdf
93
- text: Link to PDF
94
- emailLink:
95
- href: mailto:foo@bar.com
96
- text: Send an Email
97
- # All possible link parameters
98
- paramsLink:
99
- href: https://dev.sitecore.net
100
- text: Sitecore Dev Site
101
- target: _blank
102
- class: fw-bold
103
- title: <a> title attribute
104
- - componentName: Styleguide-FieldUsage-ItemLink
105
- fields:
106
- heading: Item Link
107
- description: |
108
- <p>
109
- <small>
110
- Item Links are a way to reference another content item to use data from it.
111
- Referenced items may be shared.
112
- To reference multiple content items, use a <em>Content List</em> field.<br />
113
- <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.
114
- </small>
115
- </p>
116
- # A shared item link gets its available items from a folder of shared content items.
117
- # Common usages for such a field might be choosing from a controlled list of options,
118
- # perhaps theme colors, alignment options, or switchable shared content blocks (author bios, for example)
119
- sharedItemLink:
120
- # see /data/content/Styleguide/ItemLinkField for definition of this IDs
121
- id: styleguide-item-link-field-shared-1
122
- localItemLink:
123
- template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ItemLink-Item-Template
124
- fields:
125
- textField: Referenced item textField
126
- - componentName: Styleguide-FieldUsage-ContentList
127
- fields:
128
- heading: Content List
129
- description: |
130
- <p>
131
- <small>
132
- Content Lists are a way to reference zero or more other content items.
133
- Referenced items may be shared.
134
- To reference a single content item, use an <em>Item Link</em> field.<br />
135
- <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.
136
- </small>
137
- </p>
138
- # A shared content list gets its available items from a folder of shared content items.
139
- # NOTE: items referenced here are only the _selected items_, not the whole corpus of available options.
140
- # Common usages for such a field might be choosing data items for repeating structures like
141
- # multicolumnar promos or tabs, or shared content pieces like linking one or more authors to an article.
142
- sharedContentList:
143
- # see /data/content/Styleguide/ContentListField for definitions of these IDs
144
- - id: styleguide-content-list-field-shared-1
145
- - id: styleguide-content-list-field-shared-2
146
- localContentList:
147
- # You can also define content lists using an _array of local item definitions_
148
- # note that names are default auto-generated to be unique. Explicitly specified names must be unique.
149
- # NOTE: local item definitions cannot be shared with other content list fields, and are
150
- # generally not preferable compared to using shared definitions.
151
- - template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
152
- fields:
153
- textField: Hello World Item 1
154
- - template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
155
- fields:
156
- textField: Hello World Item 2
157
- - componentName: Styleguide-FieldUsage-Custom
158
- fields:
159
- heading: Custom Fields
160
- description: |
161
- <p>
162
- <small>
163
- Any Sitecore field type can be consumed by JSS.
164
- In this sample we consume the <em>Integer</em> field type.<br />
165
- <strong>Note:</strong> For field types with complex data, custom <code>FieldSerializer</code>s may need to be implemented on the Sitecore side.
166
- </small>
167
- </p>
168
- customIntField: 31337
169
- - componentName: Styleguide-Section
170
- fields:
171
- heading: Layout Patterns
172
- placeholders:
173
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-header:
174
- - componentName: Styleguide-Layout-Reuse
175
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
176
- - componentName: Styleguide-Layout-Reuse
177
- fields:
178
- heading: Reusing Content
179
- 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>
180
- placeholders:
181
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-reuse-example:
182
- # Reference shared content using its ID (this is defined in /data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml)
183
- # Shared content is an 'edit once, reflected everywhere' operation for a content author.
184
- - id: lorem-ipsum-content-block
185
- - id: lorem-ipsum-content-block
186
- # Referencing shared content with `copy: true` will cause it to be shared while disconnected, but _copied on import_.
187
- # Use this for quickly comping layouts with FPO content that will not be shared once actual content is entered.
188
- - id: lorem-ipsum-content-block
189
- copy: true
190
- - componentName: ContentBlock
191
- fields:
192
- 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
194
- fields:
195
- heading: Tabs
196
- description: <p>Creating hierarchical components like tabs is made simpler in JSS because it's easy to introspect the layout structure.</p>
197
- placeholders:
198
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-tabs:
199
- - componentName: Styleguide-Layout-Tabs-Tab
200
- fields:
201
- title: Tab 1
202
- content: <p>Tab 1 contents!</p>
203
- - componentName: Styleguide-Layout-Tabs-Tab
204
- fields:
205
- title: Tab 2
206
- content: <p>Tab 2 contents!</p>
207
- - componentName: Styleguide-Layout-Tabs-Tab
208
- fields:
209
- title: Tab 3
210
- content: <p>Tab 3 contents!</p>
211
- - componentName: Styleguide-Section
212
- fields:
213
- heading: Sitecore Patterns
214
- placeholders:
215
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
216
- - componentName: Styleguide-SitecoreContext
217
- fields:
218
- heading: Sitecore Context
219
- 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
221
- fields:
222
- heading: Route-level Fields
223
- 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
225
- fields:
226
- heading: Component Params
227
- 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>
228
- params:
229
- cssClass: alert alert-success
230
- # IMPORTANT: while params can be defined in the manifest as non-string types,
231
- # they are always sent to the component as strings.
232
- columns: 5
233
- useCallToAction: true
234
- - componentName: Styleguide-Tracking
235
- fields:
236
- heading: Tracking
237
- 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
239
- fields:
240
- heading: Multilingual Patterns
241
- placeholders:
242
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
243
- - componentName: Styleguide-Multilingual
244
- fields:
245
- heading: Translation Patterns
246
- sample: This text can be translated in en.yml
247
- - componentName: Styleguide-Section
248
- fields:
249
- heading: Editing
250
- placeholders:
251
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
252
- - componentName: Styleguide-EditFrame
253
- fields:
254
- heading: Edit Frame
255
- description: <p>Who framed Roger Rabbit? Hard to say. <br />
256
- But JSS now allows to edit frame any piece of content on a page in editing mode. <br />
257
- You can add web edit or field edit buttons, modify edit frame style through CSS class and put the frame wherever you need it.
258
- </p>
259
- applyRedToText: 0
260
- sampleList:
261
- # see /data/content/Styleguide/EditFrameDemo for definitions of these IDs
262
- - id: styleguide-edit-frame-list-item-1
263
- - id: styleguide-edit-frame-list-item-2
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: Styleguide-Layout
12
+ placeholders:
13
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
14
+ - componentName: Styleguide-Section
15
+ fields:
16
+ heading: Content Data
17
+ placeholders:
18
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
19
+ - componentName: Styleguide-FieldUsage-Text
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: Styleguide-FieldUsage-Text
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: Styleguide-FieldUsage-RichText
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: Styleguide-FieldUsage-Image
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: Styleguide-FieldUsage-File
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: Styleguide-FieldUsage-Number
58
+ fields:
59
+ heading: Number
60
+ description: "<small>Number tells Sitecore to use a number entry for editing.</small>"
61
+ sample: 1.21
62
+ - componentName: Styleguide-FieldUsage-Checkbox
63
+ fields:
64
+ heading: Checkbox
65
+ description: |
66
+ <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>
67
+ checkbox: true
68
+ checkbox2: false
69
+ - componentName: Styleguide-FieldUsage-Date
70
+ fields:
71
+ heading: Date
72
+ description: |
73
+ <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>
74
+ <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
78
+ fields:
79
+ heading: General Link
80
+ description: <p>A <em>General Link</em> is a field that represents an <code>&lt;a&gt;</code> tag.</p>
81
+ externalLink:
82
+ href: https://www.sitecore.com
83
+ text: Link to Sitecore
84
+ # absolute URLs to known routes are converted into 'internal links'
85
+ # when imported to Sitecore. Note: target route must have an explicitly specified ID value.
86
+ internalLink:
87
+ href: /
88
+ # 'text' is optional if the link is rendered with a custom body (e.g. child HTML)
89
+
90
+ # Will be linked to Sitecore media item on import
91
+ mediaLink:
92
+ href: /data/media/files/jss.pdf
93
+ text: Link to PDF
94
+ emailLink:
95
+ href: mailto:foo@bar.com
96
+ text: Send an Email
97
+ # All possible link parameters
98
+ paramsLink:
99
+ href: https://dev.sitecore.net
100
+ text: Sitecore Dev Site
101
+ target: _blank
102
+ class: fw-bold
103
+ title: <a> title attribute
104
+ - componentName: Styleguide-FieldUsage-ItemLink
105
+ fields:
106
+ heading: Item Link
107
+ description: |
108
+ <p>
109
+ <small>
110
+ Item Links are a way to reference another content item to use data from it.
111
+ Referenced items may be shared.
112
+ To reference multiple content items, use a <em>Content List</em> field.<br />
113
+ <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.
114
+ </small>
115
+ </p>
116
+ # A shared item link gets its available items from a folder of shared content items.
117
+ # Common usages for such a field might be choosing from a controlled list of options,
118
+ # perhaps theme colors, alignment options, or switchable shared content blocks (author bios, for example)
119
+ sharedItemLink:
120
+ # see /data/content/Styleguide/ItemLinkField for definition of this IDs
121
+ id: styleguide-item-link-field-shared-1
122
+ localItemLink:
123
+ template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ItemLink-Item-Template
124
+ fields:
125
+ textField: Referenced item textField
126
+ - componentName: Styleguide-FieldUsage-ContentList
127
+ fields:
128
+ heading: Content List
129
+ description: |
130
+ <p>
131
+ <small>
132
+ Content Lists are a way to reference zero or more other content items.
133
+ Referenced items may be shared.
134
+ To reference a single content item, use an <em>Item Link</em> field.<br />
135
+ <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.
136
+ </small>
137
+ </p>
138
+ # A shared content list gets its available items from a folder of shared content items.
139
+ # NOTE: items referenced here are only the _selected items_, not the whole corpus of available options.
140
+ # Common usages for such a field might be choosing data items for repeating structures like
141
+ # multicolumnar promos or tabs, or shared content pieces like linking one or more authors to an article.
142
+ sharedContentList:
143
+ # see /data/content/Styleguide/ContentListField for definitions of these IDs
144
+ - id: styleguide-content-list-field-shared-1
145
+ - id: styleguide-content-list-field-shared-2
146
+ localContentList:
147
+ # You can also define content lists using an _array of local item definitions_
148
+ # note that names are default auto-generated to be unique. Explicitly specified names must be unique.
149
+ # NOTE: local item definitions cannot be shared with other content list fields, and are
150
+ # generally not preferable compared to using shared definitions.
151
+ - template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
152
+ fields:
153
+ textField: Hello World Item 1
154
+ - template: <%- helper.getAppPrefix(appPrefix, appName) %>Styleguide-ContentList-Item-Template
155
+ fields:
156
+ textField: Hello World Item 2
157
+ - componentName: Styleguide-FieldUsage-Custom
158
+ fields:
159
+ heading: Custom Fields
160
+ description: |
161
+ <p>
162
+ <small>
163
+ Any Sitecore field type can be consumed by JSS.
164
+ In this sample we consume the <em>Integer</em> field type.<br />
165
+ <strong>Note:</strong> For field types with complex data, custom <code>FieldSerializer</code>s may need to be implemented on the Sitecore side.
166
+ </small>
167
+ </p>
168
+ customIntField: 31337
169
+ - componentName: Styleguide-Section
170
+ fields:
171
+ heading: Layout Patterns
172
+ placeholders:
173
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-header:
174
+ - componentName: Styleguide-Layout-Reuse
175
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
176
+ - componentName: Styleguide-Layout-Reuse
177
+ fields:
178
+ heading: Reusing Content
179
+ 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>
180
+ placeholders:
181
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-reuse-example:
182
+ # Reference shared content using its ID (this is defined in /data/component-content/Styleguide/ContentReuse/LoremIpsumContentBlock/en.yml)
183
+ # Shared content is an 'edit once, reflected everywhere' operation for a content author.
184
+ - id: lorem-ipsum-content-block
185
+ - id: lorem-ipsum-content-block
186
+ # Referencing shared content with `copy: true` will cause it to be shared while disconnected, but _copied on import_.
187
+ # Use this for quickly comping layouts with FPO content that will not be shared once actual content is entered.
188
+ - id: lorem-ipsum-content-block
189
+ copy: true
190
+ - componentName: ContentBlock
191
+ fields:
192
+ 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
194
+ fields:
195
+ heading: Tabs
196
+ description: <p>Creating hierarchical components like tabs is made simpler in JSS because it's easy to introspect the layout structure.</p>
197
+ placeholders:
198
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-tabs:
199
+ - componentName: Styleguide-Layout-Tabs-Tab
200
+ fields:
201
+ title: Tab 1
202
+ content: <p>Tab 1 contents!</p>
203
+ - componentName: Styleguide-Layout-Tabs-Tab
204
+ fields:
205
+ title: Tab 2
206
+ content: <p>Tab 2 contents!</p>
207
+ - componentName: Styleguide-Layout-Tabs-Tab
208
+ fields:
209
+ title: Tab 3
210
+ content: <p>Tab 3 contents!</p>
211
+ - componentName: Styleguide-Section
212
+ fields:
213
+ heading: Sitecore Patterns
214
+ placeholders:
215
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
216
+ - componentName: Styleguide-SitecoreContext
217
+ fields:
218
+ heading: Sitecore Context
219
+ 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
221
+ fields:
222
+ heading: Route-level Fields
223
+ 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
225
+ fields:
226
+ heading: Component Params
227
+ 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>
228
+ params:
229
+ cssClass: alert alert-success
230
+ # IMPORTANT: while params can be defined in the manifest as non-string types,
231
+ # they are always sent to the component as strings.
232
+ columns: 5
233
+ useCallToAction: true
234
+ - componentName: Styleguide-Tracking
235
+ fields:
236
+ heading: Tracking
237
+ 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
239
+ fields:
240
+ heading: Multilingual Patterns
241
+ placeholders:
242
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
243
+ - componentName: Styleguide-Multilingual
244
+ fields:
245
+ heading: Translation Patterns
246
+ sample: This text can be translated in en.yml
247
+ - componentName: Styleguide-Section
248
+ fields:
249
+ heading: Editing
250
+ placeholders:
251
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
252
+ - componentName: Styleguide-EditFrame
253
+ fields:
254
+ heading: Edit Frame
255
+ description: <p>Who framed Roger Rabbit? Hard to say. <br />
256
+ But JSS now allows to edit frame any piece of content on a page in editing mode. <br />
257
+ You can add web edit or field edit buttons, modify edit frame style through CSS class and put the frame wherever you need it.
258
+ </p>
259
+ applyRedToText: 0
260
+ sampleList:
261
+ # see /data/content/Styleguide/EditFrameDemo for definitions of these IDs
262
+ - id: styleguide-edit-frame-list-item-1
263
+ - id: styleguide-edit-frame-list-item-2
@@ -1,26 +1,26 @@
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: Styleguide-Layout
15
- placeholders:
16
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
17
- - componentName: Styleguide-Section
18
- fields:
19
- heading: Multilingual Patterns
20
- placeholders:
21
- <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
22
- - componentName: Styleguide-Multilingual
23
- fields:
24
- heading: Translation Patterns
25
- sample: This text can be translated in <%- language %>.yml
26
-
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: Styleguide-Layout
15
+ placeholders:
16
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-layout:
17
+ - componentName: Styleguide-Section
18
+ fields:
19
+ heading: Multilingual Patterns
20
+ placeholders:
21
+ <%- helper.getAppPrefix(appPrefix, appName) %>jss-styleguide-section:
22
+ - componentName: Styleguide-Multilingual
23
+ fields:
24
+ heading: Translation Patterns
25
+ sample: This text can be translated in <%- language %>.yml
26
+
@@ -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 Danish.
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 Danish.
3
+ name: home
4
+ id: home-page