@cratis/scene.blueprint.default 4.31.0 → 4.33.0

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 (226) hide show
  1. package/ComponentName.ts +24 -0
  2. package/defaultBlueprint.ts +2 -1
  3. package/defaultBlueprintComponentMetadata.ts +2 -0
  4. package/defaultBlueprintComponents.ts +9 -0
  5. package/dist/cjs/ComponentName.js +8 -0
  6. package/dist/cjs/ComponentName.js.map +1 -1
  7. package/dist/cjs/defaultBlueprint.js +9 -5
  8. package/dist/cjs/defaultBlueprint.js.map +1 -1
  9. package/dist/cjs/defaultBlueprintComponentMetadata.js +8 -0
  10. package/dist/cjs/defaultBlueprintComponentMetadata.js.map +1 -1
  11. package/dist/cjs/defaultBlueprintComponents.js +21 -1
  12. package/dist/cjs/defaultBlueprintComponents.js.map +1 -1
  13. package/dist/cjs/foundation/ActionButton.js +33 -0
  14. package/dist/cjs/foundation/ActionButton.js.map +1 -0
  15. package/dist/cjs/foundation/ChartWrapper.js +520 -0
  16. package/dist/cjs/foundation/ChartWrapper.js.map +1 -0
  17. package/dist/cjs/foundation/ColumnChooser.js +156 -0
  18. package/dist/cjs/foundation/ColumnChooser.js.map +1 -0
  19. package/dist/cjs/foundation/ComponentState.js +42 -0
  20. package/dist/cjs/foundation/ComponentState.js.map +1 -0
  21. package/dist/cjs/foundation/EmptyState.js +31 -0
  22. package/dist/cjs/foundation/EmptyState.js.map +1 -0
  23. package/dist/cjs/foundation/FilterBuilder.js +307 -0
  24. package/dist/cjs/foundation/FilterBuilder.js.map +1 -0
  25. package/dist/cjs/foundation/FoundationIcon.js +58 -0
  26. package/dist/cjs/foundation/FoundationIcon.js.map +1 -0
  27. package/dist/cjs/foundation/FoundationStates.js +62 -0
  28. package/dist/cjs/foundation/FoundationStates.js.map +1 -0
  29. package/dist/cjs/foundation/PermissionRule.js +22 -0
  30. package/dist/cjs/foundation/PermissionRule.js.map +1 -0
  31. package/dist/cjs/foundation/SavedViewsMenu.js +199 -0
  32. package/dist/cjs/foundation/SavedViewsMenu.js.map +1 -0
  33. package/dist/cjs/foundation/StatCard.js +61 -0
  34. package/dist/cjs/foundation/StatCard.js.map +1 -0
  35. package/dist/cjs/foundation/StateFrame.js +200 -0
  36. package/dist/cjs/foundation/StateFrame.js.map +1 -0
  37. package/dist/cjs/foundation/StatusChip.js +64 -0
  38. package/dist/cjs/foundation/StatusChip.js.map +1 -0
  39. package/dist/cjs/foundation/TrendChip.js +93 -0
  40. package/dist/cjs/foundation/TrendChip.js.map +1 -0
  41. package/dist/cjs/foundation/chartGeometry.js +101 -0
  42. package/dist/cjs/foundation/chartGeometry.js.map +1 -0
  43. package/dist/cjs/foundation/columnModel.js +43 -0
  44. package/dist/cjs/foundation/columnModel.js.map +1 -0
  45. package/dist/cjs/foundation/filterModel.js +123 -0
  46. package/dist/cjs/foundation/filterModel.js.map +1 -0
  47. package/dist/cjs/foundation/formatting.js +85 -0
  48. package/dist/cjs/foundation/formatting.js.map +1 -0
  49. package/dist/cjs/foundation/foundationComponentMetadata.js +69 -0
  50. package/dist/cjs/foundation/foundationComponentMetadata.js.map +1 -0
  51. package/dist/cjs/foundation/foundationDescriptors.js +385 -0
  52. package/dist/cjs/foundation/foundationDescriptors.js.map +1 -0
  53. package/dist/cjs/foundation/foundationSamples.js +201 -0
  54. package/dist/cjs/foundation/foundationSamples.js.map +1 -0
  55. package/dist/cjs/foundation/foundationStrings.js +130 -0
  56. package/dist/cjs/foundation/foundationStrings.js.map +1 -0
  57. package/dist/cjs/foundation/useElementWidth.js +31 -0
  58. package/dist/cjs/foundation/useElementWidth.js.map +1 -0
  59. package/dist/cjs/foundation/viewModel.js +24 -0
  60. package/dist/cjs/foundation/viewModel.js.map +1 -0
  61. package/dist/cjs/index.js +90 -0
  62. package/dist/cjs/index.js.map +1 -1
  63. package/dist/cjs/themes/dark.js +9 -1
  64. package/dist/cjs/themes/dark.js.map +1 -1
  65. package/dist/cjs/themes/light.js +10 -2
  66. package/dist/cjs/themes/light.js.map +1 -1
  67. package/dist/esm/ComponentName.d.ts +9 -1
  68. package/dist/esm/ComponentName.d.ts.map +1 -1
  69. package/dist/esm/ComponentName.js +8 -0
  70. package/dist/esm/ComponentName.js.map +1 -1
  71. package/dist/esm/defaultBlueprint.d.ts.map +1 -1
  72. package/dist/esm/defaultBlueprint.js +9 -5
  73. package/dist/esm/defaultBlueprint.js.map +1 -1
  74. package/dist/esm/defaultBlueprintComponentMetadata.d.ts.map +1 -1
  75. package/dist/esm/defaultBlueprintComponentMetadata.js +8 -0
  76. package/dist/esm/defaultBlueprintComponentMetadata.js.map +1 -1
  77. package/dist/esm/defaultBlueprintComponents.d.ts.map +1 -1
  78. package/dist/esm/defaultBlueprintComponents.js +21 -1
  79. package/dist/esm/defaultBlueprintComponents.js.map +1 -1
  80. package/dist/esm/foundation/ActionButton.d.ts +13 -0
  81. package/dist/esm/foundation/ActionButton.d.ts.map +1 -0
  82. package/dist/esm/foundation/ActionButton.js +31 -0
  83. package/dist/esm/foundation/ActionButton.js.map +1 -0
  84. package/dist/esm/foundation/ChartWrapper.d.ts +5 -0
  85. package/dist/esm/foundation/ChartWrapper.d.ts.map +1 -0
  86. package/dist/esm/foundation/ChartWrapper.js +517 -0
  87. package/dist/esm/foundation/ChartWrapper.js.map +1 -0
  88. package/dist/esm/foundation/ColumnChooser.d.ts +3 -0
  89. package/dist/esm/foundation/ColumnChooser.d.ts.map +1 -0
  90. package/dist/esm/foundation/ColumnChooser.js +154 -0
  91. package/dist/esm/foundation/ColumnChooser.js.map +1 -0
  92. package/dist/esm/foundation/ComponentState.d.ts +12 -0
  93. package/dist/esm/foundation/ComponentState.d.ts.map +1 -0
  94. package/dist/esm/foundation/ComponentState.js +38 -0
  95. package/dist/esm/foundation/ComponentState.js.map +1 -0
  96. package/dist/esm/foundation/EmptyState.d.ts +3 -0
  97. package/dist/esm/foundation/EmptyState.d.ts.map +1 -0
  98. package/dist/esm/foundation/EmptyState.js +29 -0
  99. package/dist/esm/foundation/EmptyState.js.map +1 -0
  100. package/dist/esm/foundation/FilterBuilder.d.ts +3 -0
  101. package/dist/esm/foundation/FilterBuilder.d.ts.map +1 -0
  102. package/dist/esm/foundation/FilterBuilder.js +305 -0
  103. package/dist/esm/foundation/FilterBuilder.js.map +1 -0
  104. package/dist/esm/foundation/Foundation.stories.d.ts +37 -0
  105. package/dist/esm/foundation/Foundation.stories.d.ts.map +1 -0
  106. package/dist/esm/foundation/Foundation.stories.js +34 -0
  107. package/dist/esm/foundation/Foundation.stories.js.map +1 -0
  108. package/dist/esm/foundation/FoundationIcon.d.ts +7 -0
  109. package/dist/esm/foundation/FoundationIcon.d.ts.map +1 -0
  110. package/dist/esm/foundation/FoundationIcon.js +55 -0
  111. package/dist/esm/foundation/FoundationIcon.js.map +1 -0
  112. package/dist/esm/foundation/FoundationStates.d.ts +8 -0
  113. package/dist/esm/foundation/FoundationStates.d.ts.map +1 -0
  114. package/dist/esm/foundation/FoundationStates.js +60 -0
  115. package/dist/esm/foundation/FoundationStates.js.map +1 -0
  116. package/dist/esm/foundation/PermissionRule.d.ts +8 -0
  117. package/dist/esm/foundation/PermissionRule.d.ts.map +1 -0
  118. package/dist/esm/foundation/PermissionRule.js +19 -0
  119. package/dist/esm/foundation/PermissionRule.js.map +1 -0
  120. package/dist/esm/foundation/SavedViewsMenu.d.ts +4 -0
  121. package/dist/esm/foundation/SavedViewsMenu.d.ts.map +1 -0
  122. package/dist/esm/foundation/SavedViewsMenu.js +196 -0
  123. package/dist/esm/foundation/SavedViewsMenu.js.map +1 -0
  124. package/dist/esm/foundation/StatCard.d.ts +3 -0
  125. package/dist/esm/foundation/StatCard.d.ts.map +1 -0
  126. package/dist/esm/foundation/StatCard.js +59 -0
  127. package/dist/esm/foundation/StatCard.js.map +1 -0
  128. package/dist/esm/foundation/StateFrame.d.ts +15 -0
  129. package/dist/esm/foundation/StateFrame.d.ts.map +1 -0
  130. package/dist/esm/foundation/StateFrame.js +197 -0
  131. package/dist/esm/foundation/StateFrame.js.map +1 -0
  132. package/dist/esm/foundation/StatusChip.d.ts +13 -0
  133. package/dist/esm/foundation/StatusChip.d.ts.map +1 -0
  134. package/dist/esm/foundation/StatusChip.js +59 -0
  135. package/dist/esm/foundation/StatusChip.js.map +1 -0
  136. package/dist/esm/foundation/TrendChip.d.ts +18 -0
  137. package/dist/esm/foundation/TrendChip.d.ts.map +1 -0
  138. package/dist/esm/foundation/TrendChip.js +88 -0
  139. package/dist/esm/foundation/TrendChip.js.map +1 -0
  140. package/dist/esm/foundation/chartGeometry.d.ts +34 -0
  141. package/dist/esm/foundation/chartGeometry.d.ts.map +1 -0
  142. package/dist/esm/foundation/chartGeometry.js +93 -0
  143. package/dist/esm/foundation/chartGeometry.js.map +1 -0
  144. package/dist/esm/foundation/columnModel.d.ts +11 -0
  145. package/dist/esm/foundation/columnModel.d.ts.map +1 -0
  146. package/dist/esm/foundation/columnModel.js +38 -0
  147. package/dist/esm/foundation/columnModel.js.map +1 -0
  148. package/dist/esm/foundation/filterModel.d.ts +33 -0
  149. package/dist/esm/foundation/filterModel.d.ts.map +1 -0
  150. package/dist/esm/foundation/filterModel.js +112 -0
  151. package/dist/esm/foundation/filterModel.js.map +1 -0
  152. package/dist/esm/foundation/formatting.d.ts +13 -0
  153. package/dist/esm/foundation/formatting.d.ts.map +1 -0
  154. package/dist/esm/foundation/formatting.js +78 -0
  155. package/dist/esm/foundation/formatting.js.map +1 -0
  156. package/dist/esm/foundation/foundationComponentMetadata.d.ts +3 -0
  157. package/dist/esm/foundation/foundationComponentMetadata.d.ts.map +1 -0
  158. package/dist/esm/foundation/foundationComponentMetadata.js +67 -0
  159. package/dist/esm/foundation/foundationComponentMetadata.js.map +1 -0
  160. package/dist/esm/foundation/foundationDescriptors.d.ts +6 -0
  161. package/dist/esm/foundation/foundationDescriptors.d.ts.map +1 -0
  162. package/dist/esm/foundation/foundationDescriptors.js +380 -0
  163. package/dist/esm/foundation/foundationDescriptors.js.map +1 -0
  164. package/dist/esm/foundation/foundationSamples.d.ts +10 -0
  165. package/dist/esm/foundation/foundationSamples.d.ts.map +1 -0
  166. package/dist/esm/foundation/foundationSamples.js +198 -0
  167. package/dist/esm/foundation/foundationSamples.js.map +1 -0
  168. package/dist/esm/foundation/foundationStrings.d.ts +103 -0
  169. package/dist/esm/foundation/foundationStrings.d.ts.map +1 -0
  170. package/dist/esm/foundation/foundationStrings.js +126 -0
  171. package/dist/esm/foundation/foundationStrings.js.map +1 -0
  172. package/dist/esm/foundation/index.d.ts +25 -0
  173. package/dist/esm/foundation/index.d.ts.map +1 -0
  174. package/dist/esm/foundation/index.js +25 -0
  175. package/dist/esm/foundation/index.js.map +1 -0
  176. package/dist/esm/foundation/useElementWidth.d.ts +3 -0
  177. package/dist/esm/foundation/useElementWidth.d.ts.map +1 -0
  178. package/dist/esm/foundation/useElementWidth.js +29 -0
  179. package/dist/esm/foundation/useElementWidth.js.map +1 -0
  180. package/dist/esm/foundation/viewModel.d.ts +7 -0
  181. package/dist/esm/foundation/viewModel.d.ts.map +1 -0
  182. package/dist/esm/foundation/viewModel.js +22 -0
  183. package/dist/esm/foundation/viewModel.js.map +1 -0
  184. package/dist/esm/gallery/widgets.js +1 -1
  185. package/dist/esm/index.d.ts +1 -0
  186. package/dist/esm/index.d.ts.map +1 -1
  187. package/dist/esm/index.js +24 -0
  188. package/dist/esm/index.js.map +1 -1
  189. package/dist/esm/themes/dark.d.ts.map +1 -1
  190. package/dist/esm/themes/dark.js +9 -1
  191. package/dist/esm/themes/dark.js.map +1 -1
  192. package/dist/esm/themes/light.d.ts.map +1 -1
  193. package/dist/esm/themes/light.js +10 -2
  194. package/dist/esm/themes/light.js.map +1 -1
  195. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  196. package/foundation/ActionButton.tsx +39 -0
  197. package/foundation/ChartWrapper.tsx +252 -0
  198. package/foundation/ColumnChooser.tsx +73 -0
  199. package/foundation/ComponentState.ts +53 -0
  200. package/foundation/EmptyState.tsx +22 -0
  201. package/foundation/FilterBuilder.tsx +144 -0
  202. package/foundation/Foundation.stories.tsx +46 -0
  203. package/foundation/FoundationIcon.tsx +49 -0
  204. package/foundation/FoundationStates.tsx +46 -0
  205. package/foundation/PermissionRule.ts +26 -0
  206. package/foundation/SavedViewsMenu.tsx +94 -0
  207. package/foundation/StatCard.tsx +44 -0
  208. package/foundation/StateFrame.tsx +126 -0
  209. package/foundation/StatusChip.tsx +51 -0
  210. package/foundation/TrendChip.tsx +78 -0
  211. package/foundation/chartGeometry.ts +108 -0
  212. package/foundation/columnModel.ts +39 -0
  213. package/foundation/filterModel.ts +111 -0
  214. package/foundation/formatting.ts +69 -0
  215. package/foundation/foundationComponentMetadata.ts +21 -0
  216. package/foundation/foundationDescriptors.ts +204 -0
  217. package/foundation/foundationSamples.ts +63 -0
  218. package/foundation/foundationStrings.ts +137 -0
  219. package/foundation/index.ts +27 -0
  220. package/foundation/useElementWidth.ts +31 -0
  221. package/foundation/viewModel.ts +21 -0
  222. package/index.ts +1 -0
  223. package/package.json +9 -8
  224. package/shell/layout.css +526 -0
  225. package/themes/dark.ts +8 -0
  226. package/themes/light.ts +9 -1
@@ -0,0 +1,385 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_react = require('@cratis/scene.react');
5
+ var ComponentName = require('../ComponentName.js');
6
+ var packageName = require('../packageName.js');
7
+ var chartGeometry = require('./chartGeometry.js');
8
+ var ComponentState = require('./ComponentState.js');
9
+ var filterModel = require('./filterModel.js');
10
+ var formatting = require('./formatting.js');
11
+ var PermissionRule = require('./PermissionRule.js');
12
+ var StatusChip = require('./StatusChip.js');
13
+
14
+ // Copyright (c) Cratis. All rights reserved.
15
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
16
+ /** Data properties take what a screen binds them to: a query's result, a data context or another component's output. */ const bindable = [
17
+ scene_model.BindingSourceKind.DataContext,
18
+ scene_model.BindingSourceKind.QueryResult,
19
+ scene_model.BindingSourceKind.ComponentProperty
20
+ ];
21
+ const text = (path, label, group, description, extra = {})=>({
22
+ path,
23
+ label,
24
+ group,
25
+ valueType: scene_model.PropertyValueType.String,
26
+ ...group === 'Data' ? {
27
+ acceptedBindingKinds: bindable
28
+ } : {},
29
+ ...description === undefined ? {} : {
30
+ description
31
+ },
32
+ ...extra
33
+ });
34
+ const number = (path, label, group, description, extra = {})=>({
35
+ path,
36
+ label,
37
+ group,
38
+ valueType: scene_model.PropertyValueType.Number,
39
+ editorKind: scene_model.PropertyEditorKind.Number,
40
+ ...group === 'Data' ? {
41
+ acceptedBindingKinds: bindable
42
+ } : {},
43
+ ...description === undefined ? {} : {
44
+ description
45
+ },
46
+ ...extra
47
+ });
48
+ const flag = (path, label, group, description, extra = {})=>({
49
+ path,
50
+ label,
51
+ group,
52
+ valueType: scene_model.PropertyValueType.Boolean,
53
+ editorKind: scene_model.PropertyEditorKind.Boolean,
54
+ ...description === undefined ? {} : {
55
+ description
56
+ },
57
+ ...extra
58
+ });
59
+ const choice = (path, label, group, values, defaultValue, description)=>({
60
+ path,
61
+ label,
62
+ group,
63
+ valueType: scene_model.PropertyValueType.Enum,
64
+ editorKind: scene_model.PropertyEditorKind.Enum,
65
+ default: defaultValue,
66
+ choices: Object.entries(values).map(([value, name])=>({
67
+ value,
68
+ label: name
69
+ })),
70
+ ...description === undefined ? {} : {
71
+ description
72
+ }
73
+ });
74
+ const list = (path, label, group, itemLabel, properties, description)=>({
75
+ path,
76
+ label,
77
+ group,
78
+ valueType: scene_model.PropertyValueType.Collection,
79
+ default: [],
80
+ item: {
81
+ label: itemLabel,
82
+ properties
83
+ },
84
+ ...description === undefined ? {} : {
85
+ description
86
+ }
87
+ });
88
+ const rule = (path, label, description)=>choice(path, label, 'Permissions', {
89
+ [PermissionRule.PermissionRule.Enabled]: 'Enabled',
90
+ [PermissionRule.PermissionRule.Disabled]: 'Disabled',
91
+ [PermissionRule.PermissionRule.Hidden]: 'Hidden'
92
+ }, PermissionRule.PermissionRule.Enabled, description);
93
+ /** The properties every data-showing foundation component shares: the standard states (spec Part B 1.4) and the cross-cutting rules of 1.5. */ const standardStateProperties = [
94
+ choice('state', 'Preview state', 'State', {
95
+ [ComponentState.ComponentState.Ready]: 'Ready',
96
+ [ComponentState.ComponentState.Loading]: 'Loading',
97
+ [ComponentState.ComponentState.Empty]: 'Empty',
98
+ [ComponentState.ComponentState.Error]: 'Error',
99
+ [ComponentState.ComponentState.NoPermission]: 'No permission',
100
+ [ComponentState.ComponentState.Partial]: 'Partial'
101
+ }, ComponentState.ComponentState.Ready, 'Forces a state so each can be designed and previewed; empty means the state follows the bound data.'),
102
+ text('error', 'Error message', 'State', 'The message of the error state; setting it puts the component in that state.'),
103
+ flag('loading', 'Loading', 'State', 'Shows the skeleton while the data has not answered.'),
104
+ flag('forbidden', 'Not allowed', 'State', 'Shows the no-permission state, which explains what is missing and shows no data.'),
105
+ text('permissionSubject', 'What access is missing', 'State', 'Names what the user cannot see in the no-permission message.'),
106
+ {
107
+ path: 'failedRegions',
108
+ label: 'Failed regions',
109
+ group: 'State',
110
+ valueType: scene_model.PropertyValueType.Json,
111
+ editorKind: scene_model.PropertyEditorKind.StringList,
112
+ default: [],
113
+ description: 'The parts that failed to load; any entry puts the component in the partial state.'
114
+ },
115
+ text('emptyHeadline', 'Empty headline', 'State'),
116
+ text('emptyHint', 'Empty hint', 'State'),
117
+ text('emptyActionLabel', 'Empty action', 'State', 'The primary action offered when there is nothing to show.'),
118
+ rule('actionPermission', 'Empty action permission', 'Whether the empty state offers its action, refuses it with a reason, or does not render it.'),
119
+ text('label', 'Label', 'Accessibility', 'The accessible name of the region.'),
120
+ text('locale', 'Locale', 'Content', 'The locale dates, numbers and currency are formatted in; empty follows the document.'),
121
+ choice('density', 'Density', 'Appearance', {
122
+ comfortable: 'Comfortable',
123
+ compact: 'Compact'
124
+ }, 'comfortable'),
125
+ {
126
+ path: 'strings',
127
+ label: 'Text overrides',
128
+ group: 'Content',
129
+ valueType: scene_model.PropertyValueType.Object,
130
+ editorKind: scene_model.PropertyEditorKind.StringMap,
131
+ description: 'Replaces the text the component says itself, for localization.'
132
+ }
133
+ ];
134
+ const key = (name)=>scene_react.componentRegistryKey(packageName.defaultBlueprintName, name);
135
+ const formats = {
136
+ [formatting.NumberFormat.Number]: 'Number',
137
+ [formatting.NumberFormat.Currency]: 'Currency',
138
+ [formatting.NumberFormat.Percent]: 'Percent',
139
+ [formatting.NumberFormat.Compact]: 'Compact'
140
+ };
141
+ /** What can be edited on the foundation components (Part B 4). Each declares the shape of its data, never values (SD1). */ const foundationDescriptors = [
142
+ {
143
+ component: key(ComponentName.ComponentName.EmptyState),
144
+ displayName: 'Empty state',
145
+ description: 'An icon, a headline, a hint and one primary action; embeddable in any region.',
146
+ properties: [
147
+ text('headline', 'Headline', 'Content', undefined, {
148
+ default: 'Nothing here yet'
149
+ }),
150
+ text('hint', 'Hint', 'Content'),
151
+ text('icon', 'Icon', 'Appearance'),
152
+ text('actionLabel', 'Primary action', 'Behavior', 'The label of the one action the state offers; its behaviors say what it does.'),
153
+ rule('actionPermission', 'Action permission', 'Whether the action works, refuses with a reason, or is not rendered.'),
154
+ text('locale', 'Locale', 'Content'),
155
+ {
156
+ path: 'strings',
157
+ label: 'Text overrides',
158
+ group: 'Content',
159
+ valueType: scene_model.PropertyValueType.Object,
160
+ editorKind: scene_model.PropertyEditorKind.StringMap
161
+ }
162
+ ]
163
+ },
164
+ {
165
+ component: key(ComponentName.ComponentName.StatCard),
166
+ displayName: 'Stat card',
167
+ description: 'One key figure with its label, trend and the period the trend is compared to.',
168
+ properties: [
169
+ text('label', 'Label', 'Content', 'What the figure measures.', {
170
+ constraints: {
171
+ required: true
172
+ }
173
+ }),
174
+ number('value', 'Value', 'Data', 'The figure; bind it to a query result.'),
175
+ choice('format', 'Format', 'Appearance', formats, formatting.NumberFormat.Number),
176
+ text('currency', 'Currency', 'Appearance', 'The ISO 4217 code when the format is currency.'),
177
+ number('fractionDigits', 'Fraction digits', 'Appearance'),
178
+ number('change', 'Change', 'Data', 'How much the figure moved, as a percentage; bind it to a query result.'),
179
+ choice('goodDirection', 'Good direction', 'Appearance', {
180
+ up: 'Up is good',
181
+ down: 'Down is good'
182
+ }, 'up', 'Which movement is good: a falling response time is.'),
183
+ text('comparison', 'Compared to', 'Content', 'The period the change is compared to, for example "last month".'),
184
+ ...standardStateProperties.filter((property)=>property.path !== 'label')
185
+ ]
186
+ },
187
+ {
188
+ component: key(ComponentName.ComponentName.TrendChip),
189
+ displayName: 'Trend chip',
190
+ description: 'A change drawn as a direction, a magnitude and whether the movement is good.',
191
+ properties: [
192
+ number('change', 'Change', 'Data', 'The movement; bind it to a query result.'),
193
+ choice('format', 'Format', 'Appearance', formats, formatting.NumberFormat.Percent),
194
+ choice('goodDirection', 'Good direction', 'Appearance', {
195
+ up: 'Up is good',
196
+ down: 'Down is good'
197
+ }, 'up'),
198
+ text('comparison', 'Compared to', 'Content'),
199
+ text('locale', 'Locale', 'Content'),
200
+ {
201
+ path: 'strings',
202
+ label: 'Text overrides',
203
+ group: 'Content',
204
+ valueType: scene_model.PropertyValueType.Object,
205
+ editorKind: scene_model.PropertyEditorKind.StringMap
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ component: key(ComponentName.ComponentName.StatusChip),
211
+ displayName: 'Status chip',
212
+ description: 'A status shown as a semantic color, an icon and its text; the text is always shown.',
213
+ properties: [
214
+ text('status', 'Status', 'Data', 'The status text; bind it to a query result.', {
215
+ constraints: {
216
+ required: true
217
+ }
218
+ }),
219
+ choice('tone', 'Tone', 'Appearance', {
220
+ [StatusChip.StatusTone.Success]: 'Success',
221
+ [StatusChip.StatusTone.Warning]: 'Warning',
222
+ [StatusChip.StatusTone.Danger]: 'Danger',
223
+ [StatusChip.StatusTone.Info]: 'Info',
224
+ [StatusChip.StatusTone.Neutral]: 'Neutral'
225
+ }, StatusChip.StatusTone.Neutral, 'The tone picks the icon and the theme color.')
226
+ ]
227
+ },
228
+ {
229
+ component: key(ComponentName.ComponentName.ChartWrapper),
230
+ displayName: 'Chart',
231
+ description: 'One chart - line, bar, stacked, donut or funnel - with a legend and a table of the same data. A donut and a funnel draw the first series.',
232
+ properties: [
233
+ text('title', 'Title', 'Content'),
234
+ choice('kind', 'Chart type', 'Appearance', {
235
+ [chartGeometry.ChartKind.Line]: 'Line',
236
+ [chartGeometry.ChartKind.Bar]: 'Bar',
237
+ [chartGeometry.ChartKind.Stacked]: 'Stacked bar',
238
+ [chartGeometry.ChartKind.Donut]: 'Donut',
239
+ [chartGeometry.ChartKind.Funnel]: 'Funnel'
240
+ }, chartGeometry.ChartKind.Line),
241
+ {
242
+ path: 'categories',
243
+ label: 'Categories',
244
+ group: 'Data',
245
+ valueType: scene_model.PropertyValueType.Json,
246
+ editorKind: scene_model.PropertyEditorKind.StringList,
247
+ default: [],
248
+ acceptedBindingKinds: bindable,
249
+ description: 'The label of each point, bar or slice, in order.'
250
+ },
251
+ {
252
+ ...list('series', 'Series', 'Data', 'Series', [
253
+ text('name', 'Name', 'Data', undefined, {
254
+ constraints: {
255
+ required: true
256
+ }
257
+ }),
258
+ {
259
+ path: 'values',
260
+ label: 'Values',
261
+ group: 'Data',
262
+ valueType: scene_model.PropertyValueType.Json,
263
+ editorKind: scene_model.PropertyEditorKind.NumberList,
264
+ default: [],
265
+ description: 'One value for each category.'
266
+ }
267
+ ], 'What is plotted: a named list of values, one per category.'),
268
+ acceptedBindingKinds: bindable
269
+ },
270
+ choice('format', 'Value format', 'Appearance', formats, formatting.NumberFormat.Number),
271
+ text('currency', 'Currency', 'Appearance', 'The ISO 4217 code when the format is currency.'),
272
+ ...standardStateProperties.filter((property)=>property.path !== 'label')
273
+ ]
274
+ },
275
+ {
276
+ component: key(ComponentName.ComponentName.FilterBuilder),
277
+ displayName: 'Filter builder',
278
+ description: 'Conditions on fields, joined by AND or OR in groups that nest three deep. The filter is published as the value output; the component filters nothing itself.',
279
+ properties: [
280
+ {
281
+ ...list('fields', 'Fields', 'Data', 'Field', [
282
+ text('name', 'Name', 'Data', 'The result field the condition tests.', {
283
+ constraints: {
284
+ required: true
285
+ },
286
+ editorKind: scene_model.PropertyEditorKind.Field
287
+ }),
288
+ text('label', 'Label', 'Content'),
289
+ choice('type', 'Type', 'Data', {
290
+ [filterModel.FilterFieldType.Text]: 'Text',
291
+ [filterModel.FilterFieldType.Number]: 'Number',
292
+ [filterModel.FilterFieldType.Date]: 'Date',
293
+ [filterModel.FilterFieldType.Select]: 'Select',
294
+ [filterModel.FilterFieldType.Boolean]: 'Yes / no'
295
+ }, filterModel.FilterFieldType.Text, 'Decides the operators offered.'),
296
+ {
297
+ path: 'options',
298
+ label: 'Options',
299
+ group: 'Data',
300
+ valueType: scene_model.PropertyValueType.Json,
301
+ editorKind: scene_model.PropertyEditorKind.StringList,
302
+ default: [],
303
+ description: 'The choices of a select field.'
304
+ }
305
+ ], 'What can be filtered.'),
306
+ acceptedBindingKinds: bindable
307
+ },
308
+ {
309
+ path: 'filter',
310
+ label: 'Initial filter',
311
+ group: 'Data',
312
+ valueType: scene_model.PropertyValueType.Object,
313
+ acceptedBindingKinds: bindable,
314
+ description: 'A filter to start from, usually bound to the active saved view.'
315
+ },
316
+ rule('editPermission', 'Edit permission', 'Enabled lets the user change the filter; disabled shows it read-only.'),
317
+ scene_react.valueOutputProperty(scene_model.PropertyValueType.Object, 'The filter as the user has built it: { operator, conditions, groups }, published as it changes.'),
318
+ ...standardStateProperties
319
+ ]
320
+ },
321
+ {
322
+ component: key(ComponentName.ComponentName.ColumnChooser),
323
+ displayName: 'Column chooser',
324
+ description: 'Which columns a table shows, and in what order. Publishes the ordered ids of the visible columns as the value output.',
325
+ properties: [
326
+ {
327
+ ...list('columns', 'Columns', 'Data', 'Column', [
328
+ text('id', 'Id', 'Data', 'The result field the column shows.', {
329
+ constraints: {
330
+ required: true
331
+ },
332
+ editorKind: scene_model.PropertyEditorKind.Field
333
+ }),
334
+ text('label', 'Label', 'Content'),
335
+ flag('visible', 'Visible', 'Content', 'Whether the column starts shown.', {
336
+ default: true
337
+ }),
338
+ flag('locked', 'Always shown', 'Content', 'A locked column cannot be hidden: the identifying column is.')
339
+ ], 'What could be shown.'),
340
+ acceptedBindingKinds: bindable
341
+ },
342
+ scene_react.valueOutputProperty(scene_model.PropertyValueType.Json, 'The ids of the visible columns, in order, published as the user changes them.'),
343
+ ...standardStateProperties
344
+ ]
345
+ },
346
+ {
347
+ component: key(ComponentName.ComponentName.SavedViewsMenu),
348
+ displayName: 'Saved views menu',
349
+ description: 'A list\'s saved views as a menu button, with the current view as its label. Publishes the chosen view id as the value output.',
350
+ properties: [
351
+ {
352
+ ...list('views', 'Views', 'Data', 'View', [
353
+ text('id', 'Id', 'Data', undefined, {
354
+ constraints: {
355
+ required: true
356
+ }
357
+ }),
358
+ text('label', 'Label', 'Content'),
359
+ text('description', 'Description', 'Content')
360
+ ], 'The choices.'),
361
+ acceptedBindingKinds: bindable
362
+ },
363
+ text('activeView', 'Active view', 'Data', 'The id of the view in force; bind it to start from a view.'),
364
+ rule('savePermission', 'Save permission', 'Whether "Save current view" works, refuses with a reason, or is not shown.'),
365
+ rule('managePermission', 'Manage permission', 'Whether "Manage views" works, refuses with a reason, or is not shown.'),
366
+ scene_react.valueOutputProperty(scene_model.PropertyValueType.String, 'The id of the chosen view, published as the user chooses.'),
367
+ {
368
+ path: 'action',
369
+ label: 'Requested action',
370
+ group: 'Outputs',
371
+ valueType: scene_model.PropertyValueType.String,
372
+ readOnly: true,
373
+ output: true,
374
+ description: '"save" or "manage" when the user asks for it; the host acts on it.'
375
+ },
376
+ ...standardStateProperties
377
+ ]
378
+ }
379
+ ];
380
+
381
+ exports.bindable = bindable;
382
+ exports.foundationDescriptors = foundationDescriptors;
383
+ exports.list = list;
384
+ exports.standardStateProperties = standardStateProperties;
385
+ //# sourceMappingURL=foundationDescriptors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"foundationDescriptors.js","sources":["../../../foundation/foundationDescriptors.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingSourceKind, ComponentDescriptor, PropertyDescriptor, PropertyEditorKind, PropertyValueType } from '@cratis/scene.model';\nimport { componentRegistryKey, valueOutputProperty } from '@cratis/scene.react';\nimport { ComponentName } from '../ComponentName';\nimport { defaultBlueprintName } from '../packageName';\nimport { ChartKind } from './chartGeometry';\nimport { ComponentState } from './ComponentState';\nimport { FilterFieldType } from './filterModel';\nimport { NumberFormat } from './formatting';\nimport { PermissionRule } from './PermissionRule';\nimport { StatusTone } from './StatusChip';\n\n/** Data properties take what a screen binds them to: a query's result, a data context or another component's output. */\nexport const bindable = [BindingSourceKind.DataContext, BindingSourceKind.QueryResult, BindingSourceKind.ComponentProperty];\n\nconst text = (path: string, label: string, group: string, description?: string, extra: Partial<PropertyDescriptor> = {}): PropertyDescriptor =>\n ({ path, label, group, valueType: PropertyValueType.String, ...(group === 'Data' ? { acceptedBindingKinds: bindable } : {}), ...(description === undefined ? {} : { description }), ...extra });\n\nconst number = (path: string, label: string, group: string, description?: string, extra: Partial<PropertyDescriptor> = {}): PropertyDescriptor =>\n ({ path, label, group, valueType: PropertyValueType.Number, editorKind: PropertyEditorKind.Number, ...(group === 'Data' ? { acceptedBindingKinds: bindable } : {}), ...(description === undefined ? {} : { description }), ...extra });\n\nconst flag = (path: string, label: string, group: string, description?: string, extra: Partial<PropertyDescriptor> = {}): PropertyDescriptor =>\n ({ path, label, group, valueType: PropertyValueType.Boolean, editorKind: PropertyEditorKind.Boolean, ...(description === undefined ? {} : { description }), ...extra });\n\nconst choice = (path: string, label: string, group: string, values: Record<string, string>, defaultValue: string, description?: string): PropertyDescriptor =>\n ({\n path, label, group, valueType: PropertyValueType.Enum, editorKind: PropertyEditorKind.Enum, default: defaultValue,\n choices: Object.entries(values).map(([value, name]) => ({ value, label: name })), ...(description === undefined ? {} : { description }),\n });\n\nexport const list = (path: string, label: string, group: string, itemLabel: string, properties: PropertyDescriptor[], description?: string): PropertyDescriptor =>\n ({ path, label, group, valueType: PropertyValueType.Collection, default: [], item: { label: itemLabel, properties }, ...(description === undefined ? {} : { description }) });\n\nconst rule = (path: string, label: string, description: string): PropertyDescriptor =>\n choice(path, label, 'Permissions', { [PermissionRule.Enabled]: 'Enabled', [PermissionRule.Disabled]: 'Disabled', [PermissionRule.Hidden]: 'Hidden' }, PermissionRule.Enabled, description);\n\n/** The properties every data-showing foundation component shares: the standard states (spec Part B 1.4) and the cross-cutting rules of 1.5. */\nexport const standardStateProperties: PropertyDescriptor[] = [\n choice('state', 'Preview state', 'State', {\n [ComponentState.Ready]: 'Ready', [ComponentState.Loading]: 'Loading', [ComponentState.Empty]: 'Empty',\n [ComponentState.Error]: 'Error', [ComponentState.NoPermission]: 'No permission', [ComponentState.Partial]: 'Partial',\n }, ComponentState.Ready, 'Forces a state so each can be designed and previewed; empty means the state follows the bound data.'),\n text('error', 'Error message', 'State', 'The message of the error state; setting it puts the component in that state.'),\n flag('loading', 'Loading', 'State', 'Shows the skeleton while the data has not answered.'),\n flag('forbidden', 'Not allowed', 'State', 'Shows the no-permission state, which explains what is missing and shows no data.'),\n text('permissionSubject', 'What access is missing', 'State', 'Names what the user cannot see in the no-permission message.'),\n { path: 'failedRegions', label: 'Failed regions', group: 'State', valueType: PropertyValueType.Json, editorKind: PropertyEditorKind.StringList, default: [], description: 'The parts that failed to load; any entry puts the component in the partial state.' },\n text('emptyHeadline', 'Empty headline', 'State'),\n text('emptyHint', 'Empty hint', 'State'),\n text('emptyActionLabel', 'Empty action', 'State', 'The primary action offered when there is nothing to show.'),\n rule('actionPermission', 'Empty action permission', 'Whether the empty state offers its action, refuses it with a reason, or does not render it.'),\n text('label', 'Label', 'Accessibility', 'The accessible name of the region.'),\n text('locale', 'Locale', 'Content', 'The locale dates, numbers and currency are formatted in; empty follows the document.'),\n choice('density', 'Density', 'Appearance', { comfortable: 'Comfortable', compact: 'Compact' }, 'comfortable'),\n { path: 'strings', label: 'Text overrides', group: 'Content', valueType: PropertyValueType.Object, editorKind: PropertyEditorKind.StringMap, description: 'Replaces the text the component says itself, for localization.' },\n];\n\nconst key = (name: ComponentName) => componentRegistryKey(defaultBlueprintName, name);\n\nconst formats = { [NumberFormat.Number]: 'Number', [NumberFormat.Currency]: 'Currency', [NumberFormat.Percent]: 'Percent', [NumberFormat.Compact]: 'Compact' };\n\n/** What can be edited on the foundation components (Part B 4). Each declares the shape of its data, never values (SD1). */\nexport const foundationDescriptors: ComponentDescriptor[] = [\n {\n component: key(ComponentName.EmptyState),\n displayName: 'Empty state',\n description: 'An icon, a headline, a hint and one primary action; embeddable in any region.',\n properties: [\n text('headline', 'Headline', 'Content', undefined, { default: 'Nothing here yet' }),\n text('hint', 'Hint', 'Content'),\n text('icon', 'Icon', 'Appearance'),\n text('actionLabel', 'Primary action', 'Behavior', 'The label of the one action the state offers; its behaviors say what it does.'),\n rule('actionPermission', 'Action permission', 'Whether the action works, refuses with a reason, or is not rendered.'),\n text('locale', 'Locale', 'Content'),\n { path: 'strings', label: 'Text overrides', group: 'Content', valueType: PropertyValueType.Object, editorKind: PropertyEditorKind.StringMap },\n ],\n },\n {\n component: key(ComponentName.StatCard),\n displayName: 'Stat card',\n description: 'One key figure with its label, trend and the period the trend is compared to.',\n properties: [\n text('label', 'Label', 'Content', 'What the figure measures.', { constraints: { required: true } }),\n number('value', 'Value', 'Data', 'The figure; bind it to a query result.'),\n choice('format', 'Format', 'Appearance', formats, NumberFormat.Number),\n text('currency', 'Currency', 'Appearance', 'The ISO 4217 code when the format is currency.'),\n number('fractionDigits', 'Fraction digits', 'Appearance'),\n number('change', 'Change', 'Data', 'How much the figure moved, as a percentage; bind it to a query result.'),\n choice('goodDirection', 'Good direction', 'Appearance', { up: 'Up is good', down: 'Down is good' }, 'up', 'Which movement is good: a falling response time is.'),\n text('comparison', 'Compared to', 'Content', 'The period the change is compared to, for example \"last month\".'),\n ...standardStateProperties.filter(property => property.path !== 'label'),\n ],\n },\n {\n component: key(ComponentName.TrendChip),\n displayName: 'Trend chip',\n description: 'A change drawn as a direction, a magnitude and whether the movement is good.',\n properties: [\n number('change', 'Change', 'Data', 'The movement; bind it to a query result.'),\n choice('format', 'Format', 'Appearance', formats, NumberFormat.Percent),\n choice('goodDirection', 'Good direction', 'Appearance', { up: 'Up is good', down: 'Down is good' }, 'up'),\n text('comparison', 'Compared to', 'Content'),\n text('locale', 'Locale', 'Content'),\n { path: 'strings', label: 'Text overrides', group: 'Content', valueType: PropertyValueType.Object, editorKind: PropertyEditorKind.StringMap },\n ],\n },\n {\n component: key(ComponentName.StatusChip),\n displayName: 'Status chip',\n description: 'A status shown as a semantic color, an icon and its text; the text is always shown.',\n properties: [\n text('status', 'Status', 'Data', 'The status text; bind it to a query result.', { constraints: { required: true } }),\n choice('tone', 'Tone', 'Appearance', {\n [StatusTone.Success]: 'Success', [StatusTone.Warning]: 'Warning', [StatusTone.Danger]: 'Danger', [StatusTone.Info]: 'Info', [StatusTone.Neutral]: 'Neutral',\n }, StatusTone.Neutral, 'The tone picks the icon and the theme color.'),\n ],\n },\n {\n component: key(ComponentName.ChartWrapper),\n displayName: 'Chart',\n description: 'One chart - line, bar, stacked, donut or funnel - with a legend and a table of the same data. A donut and a funnel draw the first series.',\n properties: [\n text('title', 'Title', 'Content'),\n choice('kind', 'Chart type', 'Appearance', {\n [ChartKind.Line]: 'Line', [ChartKind.Bar]: 'Bar', [ChartKind.Stacked]: 'Stacked bar', [ChartKind.Donut]: 'Donut', [ChartKind.Funnel]: 'Funnel',\n }, ChartKind.Line),\n { path: 'categories', label: 'Categories', group: 'Data', valueType: PropertyValueType.Json, editorKind: PropertyEditorKind.StringList, default: [], acceptedBindingKinds: bindable, description: 'The label of each point, bar or slice, in order.' },\n {\n ...list('series', 'Series', 'Data', 'Series', [\n text('name', 'Name', 'Data', undefined, { constraints: { required: true } }),\n { path: 'values', label: 'Values', group: 'Data', valueType: PropertyValueType.Json, editorKind: PropertyEditorKind.NumberList, default: [], description: 'One value for each category.' },\n ], 'What is plotted: a named list of values, one per category.'),\n acceptedBindingKinds: bindable,\n },\n choice('format', 'Value format', 'Appearance', formats, NumberFormat.Number),\n text('currency', 'Currency', 'Appearance', 'The ISO 4217 code when the format is currency.'),\n ...standardStateProperties.filter(property => property.path !== 'label'),\n ],\n },\n {\n component: key(ComponentName.FilterBuilder),\n displayName: 'Filter builder',\n description: 'Conditions on fields, joined by AND or OR in groups that nest three deep. The filter is published as the value output; the component filters nothing itself.',\n properties: [\n {\n ...list('fields', 'Fields', 'Data', 'Field', [\n text('name', 'Name', 'Data', 'The result field the condition tests.', { constraints: { required: true }, editorKind: PropertyEditorKind.Field }),\n text('label', 'Label', 'Content'),\n choice('type', 'Type', 'Data', {\n [FilterFieldType.Text]: 'Text', [FilterFieldType.Number]: 'Number', [FilterFieldType.Date]: 'Date', [FilterFieldType.Select]: 'Select', [FilterFieldType.Boolean]: 'Yes / no',\n }, FilterFieldType.Text, 'Decides the operators offered.'),\n { path: 'options', label: 'Options', group: 'Data', valueType: PropertyValueType.Json, editorKind: PropertyEditorKind.StringList, default: [], description: 'The choices of a select field.' },\n ], 'What can be filtered.'),\n acceptedBindingKinds: bindable,\n },\n { path: 'filter', label: 'Initial filter', group: 'Data', valueType: PropertyValueType.Object, acceptedBindingKinds: bindable, description: 'A filter to start from, usually bound to the active saved view.' },\n rule('editPermission', 'Edit permission', 'Enabled lets the user change the filter; disabled shows it read-only.'),\n valueOutputProperty(PropertyValueType.Object, 'The filter as the user has built it: { operator, conditions, groups }, published as it changes.'),\n ...standardStateProperties,\n ],\n },\n {\n component: key(ComponentName.ColumnChooser),\n displayName: 'Column chooser',\n description: 'Which columns a table shows, and in what order. Publishes the ordered ids of the visible columns as the value output.',\n properties: [\n {\n ...list('columns', 'Columns', 'Data', 'Column', [\n text('id', 'Id', 'Data', 'The result field the column shows.', { constraints: { required: true }, editorKind: PropertyEditorKind.Field }),\n text('label', 'Label', 'Content'),\n flag('visible', 'Visible', 'Content', 'Whether the column starts shown.', { default: true }),\n flag('locked', 'Always shown', 'Content', 'A locked column cannot be hidden: the identifying column is.'),\n ], 'What could be shown.'),\n acceptedBindingKinds: bindable,\n },\n valueOutputProperty(PropertyValueType.Json, 'The ids of the visible columns, in order, published as the user changes them.'),\n ...standardStateProperties,\n ],\n },\n {\n component: key(ComponentName.SavedViewsMenu),\n displayName: 'Saved views menu',\n description: 'A list\\'s saved views as a menu button, with the current view as its label. Publishes the chosen view id as the value output.',\n properties: [\n {\n ...list('views', 'Views', 'Data', 'View', [\n text('id', 'Id', 'Data', undefined, { constraints: { required: true } }),\n text('label', 'Label', 'Content'),\n text('description', 'Description', 'Content'),\n ], 'The choices.'),\n acceptedBindingKinds: bindable,\n },\n text('activeView', 'Active view', 'Data', 'The id of the view in force; bind it to start from a view.'),\n rule('savePermission', 'Save permission', 'Whether \"Save current view\" works, refuses with a reason, or is not shown.'),\n rule('managePermission', 'Manage permission', 'Whether \"Manage views\" works, refuses with a reason, or is not shown.'),\n valueOutputProperty(PropertyValueType.String, 'The id of the chosen view, published as the user chooses.'),\n { path: 'action', label: 'Requested action', group: 'Outputs', valueType: PropertyValueType.String, readOnly: true, output: true, description: '\"save\" or \"manage\" when the user asks for it; the host acts on it.' },\n ...standardStateProperties,\n ],\n },\n];\n\n"],"names":["bindable","BindingSourceKind","DataContext","QueryResult","ComponentProperty","text","path","label","group","description","extra","valueType","PropertyValueType","String","acceptedBindingKinds","undefined","number","Number","editorKind","PropertyEditorKind","flag","Boolean","choice","values","defaultValue","Enum","default","choices","Object","entries","map","value","name","list","itemLabel","properties","Collection","item","rule","PermissionRule","Enabled","Disabled","Hidden","standardStateProperties","ComponentState","Ready","Loading","Empty","Error","NoPermission","Partial","Json","StringList","comfortable","compact","StringMap","key","componentRegistryKey","defaultBlueprintName","formats","NumberFormat","Currency","Percent","Compact","foundationDescriptors","component","ComponentName","EmptyState","displayName","StatCard","constraints","required","up","down","filter","property","TrendChip","StatusChip","StatusTone","Success","Warning","Danger","Info","Neutral","ChartWrapper","ChartKind","Line","Bar","Stacked","Donut","Funnel","NumberList","FilterBuilder","Field","FilterFieldType","Text","Date","Select","valueOutputProperty","ColumnChooser","SavedViewsMenu","readOnly","output"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AAaA,yHACO,MAAMA,QAAAA,GAAW;AAACC,IAAAA,6BAAAA,CAAkBC,WAAW;AAAED,IAAAA,6BAAAA,CAAkBE,WAAW;AAAEF,IAAAA,6BAAAA,CAAkBG;;AAEzG,MAAMC,IAAAA,GAAO,CAACC,IAAAA,EAAcC,KAAAA,EAAeC,KAAAA,EAAeC,aAAsBC,KAAAA,GAAqC,EAAE,IAClH;AAAEJ,QAAAA,IAAAA;AAAMC,QAAAA,KAAAA;AAAOC,QAAAA,KAAAA;AAAOG,QAAAA,SAAAA,EAAWC,8BAAkBC,MAAM;AAAE,QAAA,GAAIL,UAAU,MAAA,GAAS;YAAEM,oBAAAA,EAAsBd;AAAS,SAAA,GAAI,EAAE;QAAG,GAAIS,WAAAA,KAAgBM,SAAAA,GAAY,EAAC,GAAI;AAAEN,YAAAA;SAAa;AAAG,QAAA,GAAGC;KAAM,CAAA;AAEjM,MAAMM,MAAAA,GAAS,CAACV,IAAAA,EAAcC,KAAAA,EAAeC,KAAAA,EAAeC,aAAsBC,KAAAA,GAAqC,EAAE,IACpH;AAAEJ,QAAAA,IAAAA;AAAMC,QAAAA,KAAAA;AAAOC,QAAAA,KAAAA;AAAOG,QAAAA,SAAAA,EAAWC,8BAAkBK,MAAM;AAAEC,QAAAA,UAAAA,EAAYC,+BAAmBF,MAAM;AAAE,QAAA,GAAIT,UAAU,MAAA,GAAS;YAAEM,oBAAAA,EAAsBd;AAAS,SAAA,GAAI,EAAE;QAAG,GAAIS,WAAAA,KAAgBM,SAAAA,GAAY,EAAC,GAAI;AAAEN,YAAAA;SAAa;AAAG,QAAA,GAAGC;KAAM,CAAA;AAExO,MAAMU,IAAAA,GAAO,CAACd,IAAAA,EAAcC,KAAAA,EAAeC,KAAAA,EAAeC,aAAsBC,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,EAAS,MAAA,EAAQ,MAAA,EAAQ;oBACtC5B,IAAAA,CAAK,IAAA,EAAM,IAAA,EAAM,MAAA,EAAQU,SAAAA,EAAW;wBAAEuD,WAAAA,EAAa;4BAAEC,QAAAA,EAAU;AAAK;AAAE,qBAAA,CAAA;AACtElE,oBAAAA,IAAAA,CAAK,SAAS,OAAA,EAAS,SAAA,CAAA;AACvBA,oBAAAA,IAAAA,CAAK,eAAe,aAAA,EAAe,SAAA;AACtC,iBAAA,EAAE,cAAA,CAAe;gBAClBS,oBAAAA,EAAsBd;AAC1B,aAAA;YACAK,IAAAA,CAAK,YAAA,EAAc,eAAe,MAAA,EAAQ,4DAAA,CAAA;AAC1CiC,YAAAA,IAAAA,CAAK,kBAAkB,iBAAA,EAAmB,4EAAA,CAAA;AAC1CA,YAAAA,IAAAA,CAAK,oBAAoB,mBAAA,EAAqB,uEAAA,CAAA;YAC9C4D,+BAAAA,CAAoBtF,6BAAAA,CAAkBC,MAAM,EAAE,2DAAA,CAAA;AAC9C,YAAA;gBAAEP,IAAAA,EAAM,QAAA;gBAAUC,KAAAA,EAAO,kBAAA;gBAAoBC,KAAAA,EAAO,SAAA;AAAWG,gBAAAA,SAAAA,EAAWC,8BAAkBC,MAAM;gBAAEwF,QAAAA,EAAU,IAAA;gBAAMC,MAAAA,EAAQ,IAAA;gBAAM7F,WAAAA,EAAa;AAAqE,aAAA;AACjNkC,YAAAA,GAAAA;AACN;AACL;;;;;;"}
@@ -0,0 +1,201 @@
1
+ 'use strict';
2
+
3
+ var scene_react = require('@cratis/scene.react');
4
+ var ComponentName = require('../ComponentName.js');
5
+ var packageName = require('../packageName.js');
6
+
7
+ // Copyright (c) Cratis. All rights reserved.
8
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
9
+ const foundationSamples = {
10
+ [ComponentName.ComponentName.EmptyState]: {
11
+ properties: {
12
+ headline: 'No invoices yet',
13
+ hint: 'Invoices you create appear here.',
14
+ icon: 'file',
15
+ actionLabel: 'New invoice'
16
+ },
17
+ data: [],
18
+ stateful: false
19
+ },
20
+ [ComponentName.ComponentName.StatCard]: {
21
+ properties: {
22
+ label: 'Open pipeline',
23
+ value: 1234567,
24
+ format: 'currency',
25
+ currency: 'USD',
26
+ change: 12.5,
27
+ comparison: 'last month',
28
+ locale: 'en-US'
29
+ },
30
+ data: [
31
+ '$1,234,567'
32
+ ],
33
+ stateful: true
34
+ },
35
+ [ComponentName.ComponentName.TrendChip]: {
36
+ properties: {
37
+ change: -3.2,
38
+ goodDirection: 'down',
39
+ comparison: 'last week',
40
+ locale: 'en-US'
41
+ },
42
+ data: [],
43
+ stateful: false
44
+ },
45
+ [ComponentName.ComponentName.StatusChip]: {
46
+ properties: {
47
+ status: 'Awaiting approval',
48
+ tone: 'warning'
49
+ },
50
+ data: [],
51
+ stateful: false
52
+ },
53
+ [ComponentName.ComponentName.ChartWrapper]: {
54
+ properties: {
55
+ title: 'Revenue by quarter',
56
+ kind: 'line',
57
+ categories: [
58
+ 'Q1',
59
+ 'Q2',
60
+ 'Q3',
61
+ 'Q4'
62
+ ],
63
+ series: [
64
+ {
65
+ name: 'Revenue',
66
+ values: [
67
+ 120,
68
+ 180,
69
+ 150,
70
+ 240
71
+ ]
72
+ },
73
+ {
74
+ name: 'Target',
75
+ values: [
76
+ 100,
77
+ 150,
78
+ 200,
79
+ 220
80
+ ]
81
+ }
82
+ ],
83
+ locale: 'en-US'
84
+ },
85
+ data: [
86
+ 'Revenue by quarter'
87
+ ],
88
+ stateful: true
89
+ },
90
+ [ComponentName.ComponentName.FilterBuilder]: {
91
+ properties: {
92
+ fields: [
93
+ {
94
+ name: 'owner',
95
+ label: 'Owner',
96
+ type: 'text'
97
+ },
98
+ {
99
+ name: 'status',
100
+ label: 'Status',
101
+ type: 'select',
102
+ options: [
103
+ 'Open',
104
+ 'Won',
105
+ 'Lost'
106
+ ]
107
+ },
108
+ {
109
+ name: 'value',
110
+ label: 'Value',
111
+ type: 'number'
112
+ }
113
+ ],
114
+ filter: {
115
+ operator: 'and',
116
+ conditions: [
117
+ {
118
+ field: 'status',
119
+ operator: 'is',
120
+ value: 'Open'
121
+ },
122
+ {
123
+ field: 'owner',
124
+ operator: 'contains',
125
+ value: 'Ada'
126
+ }
127
+ ],
128
+ groups: []
129
+ }
130
+ },
131
+ data: [
132
+ '2 active filters'
133
+ ],
134
+ stateful: true
135
+ },
136
+ [ComponentName.ComponentName.ColumnChooser]: {
137
+ properties: {
138
+ columns: [
139
+ {
140
+ id: 'name',
141
+ label: 'Name',
142
+ locked: true
143
+ },
144
+ {
145
+ id: 'owner',
146
+ label: 'Owner'
147
+ },
148
+ {
149
+ id: 'status',
150
+ label: 'Status',
151
+ visible: false
152
+ }
153
+ ]
154
+ },
155
+ data: [
156
+ '3 shown'
157
+ ],
158
+ stateful: true
159
+ },
160
+ [ComponentName.ComponentName.SavedViewsMenu]: {
161
+ properties: {
162
+ views: [
163
+ {
164
+ id: 'all',
165
+ label: 'All leads'
166
+ },
167
+ {
168
+ id: 'mine',
169
+ label: 'Mine'
170
+ },
171
+ {
172
+ id: 'overdue',
173
+ label: 'Overdue'
174
+ }
175
+ ],
176
+ activeView: 'mine'
177
+ },
178
+ data: [
179
+ 'Mine'
180
+ ],
181
+ stateful: true
182
+ }
183
+ };
184
+ /** A scene element for a foundation component, populated with its sample unless properties are given, with the state forced when asked. */ function foundationElement(name, properties, state) {
185
+ const sample = foundationSamples[name];
186
+ return {
187
+ id: `${name}-sample`,
188
+ componentName: scene_react.componentRegistryKey(packageName.defaultBlueprintName, name),
189
+ properties: {
190
+ ...properties ?? sample?.properties ?? {},
191
+ ...state === undefined ? {} : {
192
+ state
193
+ }
194
+ },
195
+ slots: {}
196
+ };
197
+ }
198
+
199
+ exports.foundationElement = foundationElement;
200
+ exports.foundationSamples = foundationSamples;
201
+ //# sourceMappingURL=foundationSamples.js.map