@cratis/scene.components 4.8.0 → 4.9.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 (47) hide show
  1. package/cratisComponentsDescriptors.ts +53 -1
  2. package/cratisComponentsPackage.ts +15 -0
  3. package/dist/cjs/cratisComponentsDescriptors.js +150 -0
  4. package/dist/cjs/cratisComponentsDescriptors.js.map +1 -1
  5. package/dist/cjs/cratisComponentsPackage.js +32 -2
  6. package/dist/cjs/cratisComponentsPackage.js.map +1 -1
  7. package/dist/cjs/forms/CommandFormRuntime.js +11 -4
  8. package/dist/cjs/forms/CommandFormRuntime.js.map +1 -1
  9. package/dist/cjs/forms/ExplicitCommandField.js +13 -7
  10. package/dist/cjs/forms/ExplicitCommandField.js.map +1 -1
  11. package/dist/cjs/forms/SceneCommandForm.js +10 -3
  12. package/dist/cjs/forms/SceneCommandForm.js.map +1 -1
  13. package/dist/cjs/forms/commandInputs.js +8 -2
  14. package/dist/cjs/forms/commandInputs.js.map +1 -1
  15. package/dist/cjs/forms/generateCommandFieldsAction.js +58 -0
  16. package/dist/cjs/forms/generateCommandFieldsAction.js.map +1 -0
  17. package/dist/esm/cratisComponentsDescriptors.d.ts.map +1 -1
  18. package/dist/esm/cratisComponentsDescriptors.js +151 -1
  19. package/dist/esm/cratisComponentsDescriptors.js.map +1 -1
  20. package/dist/esm/cratisComponentsPackage.d.ts.map +1 -1
  21. package/dist/esm/cratisComponentsPackage.js +32 -2
  22. package/dist/esm/cratisComponentsPackage.js.map +1 -1
  23. package/dist/esm/forms/CommandFormRuntime.d.ts +2 -1
  24. package/dist/esm/forms/CommandFormRuntime.d.ts.map +1 -1
  25. package/dist/esm/forms/CommandFormRuntime.js +11 -4
  26. package/dist/esm/forms/CommandFormRuntime.js.map +1 -1
  27. package/dist/esm/forms/ExplicitCommandField.d.ts.map +1 -1
  28. package/dist/esm/forms/ExplicitCommandField.js +13 -7
  29. package/dist/esm/forms/ExplicitCommandField.js.map +1 -1
  30. package/dist/esm/forms/SceneCommandForm.d.ts.map +1 -1
  31. package/dist/esm/forms/SceneCommandForm.js +11 -4
  32. package/dist/esm/forms/SceneCommandForm.js.map +1 -1
  33. package/dist/esm/forms/commandInputs.d.ts +2 -0
  34. package/dist/esm/forms/commandInputs.d.ts.map +1 -1
  35. package/dist/esm/forms/commandInputs.js +9 -3
  36. package/dist/esm/forms/commandInputs.js.map +1 -1
  37. package/dist/esm/forms/generateCommandFieldsAction.d.ts +3 -0
  38. package/dist/esm/forms/generateCommandFieldsAction.d.ts.map +1 -0
  39. package/dist/esm/forms/generateCommandFieldsAction.js +56 -0
  40. package/dist/esm/forms/generateCommandFieldsAction.js.map +1 -0
  41. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  42. package/forms/CommandFormRuntime.tsx +5 -2
  43. package/forms/ExplicitCommandField.tsx +4 -2
  44. package/forms/SceneCommandForm.tsx +5 -3
  45. package/forms/commandInputs.ts +7 -3
  46. package/forms/generateCommandFieldsAction.ts +46 -0
  47. package/package.json +7 -7
@@ -16,16 +16,22 @@ var properties = require('../properties.js');
16
16
  if (!input || Object.keys(input).some((key)=>![
17
17
  'property',
18
18
  'type',
19
- 'label'
19
+ 'label',
20
+ 'column',
21
+ 'width'
20
22
  ].includes(key))) return undefined;
21
23
  const property = properties.stringProperty(input, 'property');
22
24
  const label = properties.stringProperty(input, 'label');
23
25
  if (!property?.trim() || !label?.trim() || input.type !== 'string' && input.type !== 'guid' || seen.has(property)) return undefined;
24
26
  seen.add(property);
27
+ const column = properties.numberProperty(input, 'column');
28
+ const width = properties.stringProperty(input, 'width');
25
29
  inputs.push({
26
30
  property,
27
31
  type: input.type,
28
- label
32
+ label,
33
+ column,
34
+ width
29
35
  });
30
36
  }
31
37
  return inputs;
@@ -1 +1 @@
1
- {"version":3,"file":"commandInputs.js","sources":["../../../forms/commandInputs.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 { arrayProperty, objectProperty, stringProperty } from '../properties';\n\n/** Exact, case-sensitive names from a generated command's propertyDescriptors. */\nexport interface CommandInput {\n property: string;\n type: 'string' | 'guid';\n label: string;\n}\n\n/** An absent declaration selects legacy auto mode; a present but invalid declaration never does. */\nexport function commandInputs(properties: Record<string, unknown>): CommandInput[] | undefined {\n const values = arrayProperty(properties, 'inputs');\n if (!values?.length) return undefined;\n const inputs: CommandInput[] = [];\n const seen = new Set<string>();\n for (const value of values) {\n const input = objectProperty({ value }, 'value');\n if (!input || Object.keys(input).some(key => !['property', 'type', 'label'].includes(key))) return undefined;\n const property = stringProperty(input, 'property');\n const label = stringProperty(input, 'label');\n if (!property?.trim() || !label?.trim() || (input.type !== 'string' && input.type !== 'guid') || seen.has(property)) return undefined;\n seen.add(property);\n inputs.push({ property, type: input.type, label });\n }\n return inputs;\n}\n"],"names":["commandInputs","properties","values","arrayProperty","length","undefined","inputs","seen","Set","value","input","objectProperty","Object","keys","some","key","includes","property","stringProperty","label","trim","type","has","add","push"],"mappings":";;;;AAAA;AACA;AAWA,qGACO,SAASA,aAAAA,CAAcC,YAAmC,EAAA;IAC7D,MAAMC,MAAAA,GAASC,yBAAcF,YAAAA,EAAY,QAAA,CAAA;IACzC,IAAI,CAACC,MAAAA,EAAQE,MAAAA,EAAQ,OAAOC,SAAAA;AAC5B,IAAA,MAAMC,SAAyB,EAAE;AACjC,IAAA,MAAMC,OAAO,IAAIC,GAAAA,EAAAA;IACjB,KAAK,MAAMC,SAASP,MAAAA,CAAQ;AACxB,QAAA,MAAMQ,QAAQC,yBAAAA,CAAe;AAAEF,YAAAA;SAAM,EAAG,OAAA,CAAA;QACxC,IAAI,CAACC,KAAAA,IAASE,MAAAA,CAAOC,IAAI,CAACH,OAAOI,IAAI,CAACC,CAAAA,GAAAA,GAAO,CAAC;AAAC,gBAAA,UAAA;AAAY,gBAAA,MAAA;AAAQ,gBAAA;aAAQ,CAACC,QAAQ,CAACD,GAAAA,CAAAA,CAAAA,EAAO,OAAOV,SAAAA;QACnG,MAAMY,QAAAA,GAAWC,0BAAeR,KAAAA,EAAO,UAAA,CAAA;QACvC,MAAMS,KAAAA,GAAQD,0BAAeR,KAAAA,EAAO,OAAA,CAAA;AACpC,QAAA,IAAI,CAACO,QAAAA,EAAUG,IAAAA,EAAAA,IAAU,CAACD,KAAAA,EAAOC,IAAAA,EAAAA,IAAWV,MAAMW,IAAI,KAAK,QAAA,IAAYX,KAAAA,CAAMW,IAAI,KAAK,MAAA,IAAWd,KAAKe,GAAG,CAACL,WAAW,OAAOZ,SAAAA;AAC5HE,QAAAA,IAAAA,CAAKgB,GAAG,CAACN,QAAAA,CAAAA;AACTX,QAAAA,MAAAA,CAAOkB,IAAI,CAAC;AAAEP,YAAAA,QAAAA;AAAUI,YAAAA,IAAAA,EAAMX,MAAMW,IAAI;AAAEF,YAAAA;AAAM,SAAA,CAAA;AACpD,IAAA;IACA,OAAOb,MAAAA;AACX;;"}
1
+ {"version":3,"file":"commandInputs.js","sources":["../../../forms/commandInputs.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 { arrayProperty, numberProperty, objectProperty, stringProperty } from '../properties';\n\n/** Exact, case-sensitive names from a generated command's propertyDescriptors. */\nexport interface CommandInput {\n property: string;\n type: 'string' | 'guid';\n label: string;\n column?: number;\n width?: string;\n}\n\n/** An absent declaration selects legacy auto mode; a present but invalid declaration never does. */\nexport function commandInputs(properties: Record<string, unknown>): CommandInput[] | undefined {\n const values = arrayProperty(properties, 'inputs');\n if (!values?.length) return undefined;\n const inputs: CommandInput[] = [];\n const seen = new Set<string>();\n for (const value of values) {\n const input = objectProperty({ value }, 'value');\n if (!input || Object.keys(input).some(key => !['property', 'type', 'label', 'column', 'width'].includes(key))) return undefined;\n const property = stringProperty(input, 'property');\n const label = stringProperty(input, 'label');\n if (!property?.trim() || !label?.trim() || (input.type !== 'string' && input.type !== 'guid') || seen.has(property)) return undefined;\n seen.add(property);\n const column = numberProperty(input, 'column');\n const width = stringProperty(input, 'width');\n inputs.push({ property, type: input.type, label, column, width });\n }\n return inputs;\n}\n"],"names":["commandInputs","properties","values","arrayProperty","length","undefined","inputs","seen","Set","value","input","objectProperty","Object","keys","some","key","includes","property","stringProperty","label","trim","type","has","add","column","numberProperty","width","push"],"mappings":";;;;AAAA;AACA;AAaA,qGACO,SAASA,aAAAA,CAAcC,YAAmC,EAAA;IAC7D,MAAMC,MAAAA,GAASC,yBAAcF,YAAAA,EAAY,QAAA,CAAA;IACzC,IAAI,CAACC,MAAAA,EAAQE,MAAAA,EAAQ,OAAOC,SAAAA;AAC5B,IAAA,MAAMC,SAAyB,EAAE;AACjC,IAAA,MAAMC,OAAO,IAAIC,GAAAA,EAAAA;IACjB,KAAK,MAAMC,SAASP,MAAAA,CAAQ;AACxB,QAAA,MAAMQ,QAAQC,yBAAAA,CAAe;AAAEF,YAAAA;SAAM,EAAG,OAAA,CAAA;QACxC,IAAI,CAACC,KAAAA,IAASE,MAAAA,CAAOC,IAAI,CAACH,OAAOI,IAAI,CAACC,CAAAA,GAAAA,GAAO,CAAC;AAAC,gBAAA,UAAA;AAAY,gBAAA,MAAA;AAAQ,gBAAA,OAAA;AAAS,gBAAA,QAAA;AAAU,gBAAA;aAAQ,CAACC,QAAQ,CAACD,GAAAA,CAAAA,CAAAA,EAAO,OAAOV,SAAAA;QACtH,MAAMY,QAAAA,GAAWC,0BAAeR,KAAAA,EAAO,UAAA,CAAA;QACvC,MAAMS,KAAAA,GAAQD,0BAAeR,KAAAA,EAAO,OAAA,CAAA;AACpC,QAAA,IAAI,CAACO,QAAAA,EAAUG,IAAAA,EAAAA,IAAU,CAACD,KAAAA,EAAOC,IAAAA,EAAAA,IAAWV,MAAMW,IAAI,KAAK,QAAA,IAAYX,KAAAA,CAAMW,IAAI,KAAK,MAAA,IAAWd,KAAKe,GAAG,CAACL,WAAW,OAAOZ,SAAAA;AAC5HE,QAAAA,IAAAA,CAAKgB,GAAG,CAACN,QAAAA,CAAAA;QACT,MAAMO,MAAAA,GAASC,0BAAef,KAAAA,EAAO,QAAA,CAAA;QACrC,MAAMgB,KAAAA,GAAQR,0BAAeR,KAAAA,EAAO,OAAA,CAAA;AACpCJ,QAAAA,MAAAA,CAAOqB,IAAI,CAAC;AAAEV,YAAAA,QAAAA;AAAUI,YAAAA,IAAAA,EAAMX,MAAMW,IAAI;AAAEF,YAAAA,KAAAA;AAAOK,YAAAA,MAAAA;AAAQE,YAAAA;AAAM,SAAA,CAAA;AACnE,IAAA;IACA,OAAOpB,MAAAA;AACX;;"}
@@ -0,0 +1,58 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ const generateCommandFieldsAction = {
8
+ descriptor: {
9
+ id: 'Cratis.Components.commandForm.generateFields',
10
+ label: 'Generate fields',
11
+ placement: scene_model.DesignTimeActionPlacement.Toolbar,
12
+ availability: 'commandForm.canGenerateFields',
13
+ description: 'Creates a deterministic editable field layout from the selected command metadata.'
14
+ },
15
+ isVisible: (context)=>context.element.componentName.endsWith(':commandForm'),
16
+ isEnabled: (context)=>Array.isArray(context.commandMetadata?.properties) && !Array.isArray(context.element.properties.inputs),
17
+ execute: (context)=>generateCommandFields(context)
18
+ };
19
+ function generateCommandFields(context) {
20
+ const properties = context.commandMetadata?.properties ?? [];
21
+ if (!properties.length) return {
22
+ edits: [],
23
+ diagnostics: [
24
+ 'No command metadata was supplied.'
25
+ ]
26
+ };
27
+ if (Array.isArray(context.element.properties.inputs)) {
28
+ return {
29
+ edits: [],
30
+ diagnostics: [
31
+ 'The form already has authored fields; Generate fields will not overwrite them.'
32
+ ]
33
+ };
34
+ }
35
+ return {
36
+ diagnostics: [],
37
+ edits: [
38
+ {
39
+ kind: scene_model.SceneEditKind.SetProperty,
40
+ nodeId: context.element.id,
41
+ path: 'inputs',
42
+ value: properties.map((property, index)=>({
43
+ property: property.name,
44
+ type: property.type === 'Guid' || property.type === 'guid' ? 'guid' : 'string',
45
+ label: property.label ?? humanize(property.name),
46
+ column: index % 2 + 1,
47
+ width: '1fr'
48
+ }))
49
+ }
50
+ ]
51
+ };
52
+ }
53
+ function humanize(name) {
54
+ return name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/^./, (value)=>value.toUpperCase());
55
+ }
56
+
57
+ exports.generateCommandFieldsAction = generateCommandFieldsAction;
58
+ //# sourceMappingURL=generateCommandFieldsAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateCommandFieldsAction.js","sources":["../../../forms/generateCommandFieldsAction.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 { DesignTimeAction, DesignTimeActionContext, DesignTimeActionResult } from '@cratis/scene.react';\nimport { DesignTimeActionPlacement, SceneEditKind } from '@cratis/scene.model';\n\nexport const generateCommandFieldsAction: DesignTimeAction = {\n descriptor: {\n id: 'Cratis.Components.commandForm.generateFields',\n label: 'Generate fields',\n placement: DesignTimeActionPlacement.Toolbar,\n availability: 'commandForm.canGenerateFields',\n description: 'Creates a deterministic editable field layout from the selected command metadata.',\n },\n isVisible: context => context.element.componentName.endsWith(':commandForm'),\n isEnabled: context => Array.isArray(context.commandMetadata?.properties) && !Array.isArray(context.element.properties.inputs),\n execute: context => generateCommandFields(context),\n};\n\nfunction generateCommandFields(context: DesignTimeActionContext): DesignTimeActionResult {\n const properties = context.commandMetadata?.properties ?? [];\n if (!properties.length) return { edits: [], diagnostics: ['No command metadata was supplied.'] };\n if (Array.isArray(context.element.properties.inputs)) {\n return { edits: [], diagnostics: ['The form already has authored fields; Generate fields will not overwrite them.'] };\n }\n\n return {\n diagnostics: [],\n edits: [{\n kind: SceneEditKind.SetProperty,\n nodeId: context.element.id,\n path: 'inputs',\n value: properties.map((property, index) => ({\n property: property.name,\n type: property.type === 'Guid' || property.type === 'guid' ? 'guid' : 'string',\n label: property.label ?? humanize(property.name),\n column: (index % 2) + 1,\n width: '1fr',\n })),\n }],\n };\n}\n\nfunction humanize(name: string): string {\n return name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').replace(/^./, value => value.toUpperCase());\n}\n"],"names":["generateCommandFieldsAction","descriptor","id","label","placement","DesignTimeActionPlacement","Toolbar","availability","description","isVisible","context","element","componentName","endsWith","isEnabled","Array","isArray","commandMetadata","properties","inputs","execute","generateCommandFields","length","edits","diagnostics","kind","SceneEditKind","SetProperty","nodeId","path","value","map","property","index","name","type","humanize","column","width","replace","toUpperCase"],"mappings":";;;;AAAA;AACA;MAKaA,2BAAAA,GAAgD;IACzDC,UAAAA,EAAY;QACRC,EAAAA,EAAI,8CAAA;QACJC,KAAAA,EAAO,iBAAA;AACPC,QAAAA,SAAAA,EAAWC,sCAA0BC,OAAO;QAC5CC,YAAAA,EAAc,+BAAA;QACdC,WAAAA,EAAa;AACjB,KAAA;IACAC,SAAAA,EAAWC,CAAAA,UAAWA,OAAAA,CAAQC,OAAO,CAACC,aAAa,CAACC,QAAQ,CAAC,cAAA,CAAA;AAC7DC,IAAAA,SAAAA,EAAWJ,CAAAA,OAAAA,GAAWK,KAAAA,CAAMC,OAAO,CAACN,OAAAA,CAAQO,eAAe,EAAEC,UAAAA,CAAAA,IAAe,CAACH,KAAAA,CAAMC,OAAO,CAACN,OAAAA,CAAQC,OAAO,CAACO,UAAU,CAACC,MAAM,CAAA;IAC5HC,OAAAA,EAASV,CAAAA,UAAWW,qBAAAA,CAAsBX,OAAAA;AAC9C;AAEA,SAASW,sBAAsBX,OAAgC,EAAA;AAC3D,IAAA,MAAMQ,UAAAA,GAAaR,OAAAA,CAAQO,eAAe,EAAEC,cAAc,EAAE;AAC5D,IAAA,IAAI,CAACA,UAAAA,CAAWI,MAAM,EAAE,OAAO;AAAEC,QAAAA,KAAAA,EAAO,EAAE;QAAEC,WAAAA,EAAa;AAAC,YAA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AAM,2BAA2B,EAAE,mBAAmB,EAI5D,CAAC"}
1
+ {"version":3,"file":"cratisComponentsDescriptors.d.ts","sourceRoot":"","sources":["../../cratisComponentsDescriptors.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkC,mBAAmB,EAAsF,MAAM,qBAAqB,CAAC;AA+E9K,eAAO,MAAM,2BAA2B,EAAE,mBAAmB,EAiB5D,CAAC"}
@@ -1,4 +1,4 @@
1
- import { QueryResultShape, PropertyValueType } from '@cratis/scene.model';
1
+ import { QueryResultShape, PropertyValueType, BindingMode, BindingSourceKind, DesignTimeActionPlacement } from '@cratis/scene.model';
2
2
  import { componentRegistryKey } from '@cratis/scene.react';
3
3
 
4
4
  // Copyright (c) Cratis. All rights reserved.
@@ -51,6 +51,141 @@ const key = (name)=>componentRegistryKey('Cratis.Components', name);
51
51
  valueType: PropertyValueType.Object,
52
52
  editorKind: 'resultFieldList',
53
53
  description: 'The result fields the table\'s search box looks in.'
54
+ },
55
+ {
56
+ path: 'selectedItem',
57
+ label: 'Selected item',
58
+ group: 'Outputs',
59
+ valueType: PropertyValueType.Object,
60
+ readOnly: true,
61
+ output: true,
62
+ bindingMode: BindingMode.OneWay,
63
+ description: 'The currently selected row, or null after selection is cleared.'
64
+ }
65
+ ];
66
+ const commandFormProperties = [
67
+ {
68
+ path: 'command',
69
+ label: 'Command',
70
+ group: 'Command',
71
+ valueType: PropertyValueType.String,
72
+ editorKind: 'commandBinding',
73
+ constraints: {
74
+ required: true
75
+ },
76
+ description: 'The Arc command proxy rendered through the native command form runtime.'
77
+ },
78
+ {
79
+ path: 'mode',
80
+ label: 'Mode',
81
+ group: 'Layout',
82
+ valueType: PropertyValueType.Enum,
83
+ choices: [
84
+ {
85
+ value: 'auto',
86
+ label: 'Auto'
87
+ },
88
+ {
89
+ value: 'manual',
90
+ label: 'Manual'
91
+ }
92
+ ],
93
+ default: 'auto',
94
+ description: 'Auto follows command metadata; manual renders explicit inputs inside the same native form boundary.'
95
+ },
96
+ {
97
+ path: 'columns',
98
+ label: 'Columns',
99
+ group: 'Layout',
100
+ valueType: PropertyValueType.Number,
101
+ default: 1
102
+ },
103
+ {
104
+ path: 'fieldWidths',
105
+ label: 'Field widths',
106
+ group: 'Layout',
107
+ valueType: PropertyValueType.Object,
108
+ editorKind: 'fieldWidths'
109
+ },
110
+ {
111
+ path: 'inputs',
112
+ label: 'Fields',
113
+ group: 'Layout',
114
+ valueType: PropertyValueType.Collection,
115
+ editorKind: 'commandFields',
116
+ acceptedBindingKinds: [
117
+ BindingSourceKind.DataContext,
118
+ BindingSourceKind.ComponentProperty
119
+ ],
120
+ item: {
121
+ label: 'Field',
122
+ properties: [
123
+ {
124
+ path: 'property',
125
+ label: 'Property',
126
+ group: 'Field',
127
+ valueType: PropertyValueType.String
128
+ },
129
+ {
130
+ path: 'type',
131
+ label: 'Type',
132
+ group: 'Field',
133
+ valueType: PropertyValueType.Enum,
134
+ choices: [
135
+ {
136
+ value: 'string',
137
+ label: 'String'
138
+ },
139
+ {
140
+ value: 'guid',
141
+ label: 'Guid'
142
+ }
143
+ ]
144
+ },
145
+ {
146
+ path: 'label',
147
+ label: 'Label',
148
+ group: 'Field',
149
+ valueType: PropertyValueType.String
150
+ },
151
+ {
152
+ path: 'column',
153
+ label: 'Column',
154
+ group: 'Layout',
155
+ valueType: PropertyValueType.Number
156
+ },
157
+ {
158
+ path: 'width',
159
+ label: 'Width',
160
+ group: 'Layout',
161
+ valueType: PropertyValueType.String
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ {
167
+ path: 'exclude',
168
+ label: 'Excluded fields',
169
+ group: 'Command',
170
+ valueType: PropertyValueType.Collection,
171
+ item: {
172
+ label: 'Excluded field',
173
+ properties: [
174
+ {
175
+ path: 'property',
176
+ label: 'Property',
177
+ group: 'Field',
178
+ valueType: PropertyValueType.String
179
+ }
180
+ ]
181
+ }
182
+ },
183
+ {
184
+ path: 'submitLabel',
185
+ label: 'Submit label',
186
+ group: 'Content',
187
+ valueType: PropertyValueType.String,
188
+ default: 'Submit'
54
189
  }
55
190
  ];
56
191
  /**
@@ -74,6 +209,21 @@ const key = (name)=>componentRegistryKey('Cratis.Components', name);
74
209
  component: key('observableDataTable'),
75
210
  displayName: 'Live data table',
76
211
  properties: dataTableProperties
212
+ },
213
+ {
214
+ component: key('commandForm'),
215
+ displayName: 'Command form',
216
+ editorKind: 'commandFormDesigner',
217
+ properties: commandFormProperties,
218
+ actions: [
219
+ {
220
+ id: 'Cratis.Components.commandForm.generateFields',
221
+ label: 'Generate fields',
222
+ placement: DesignTimeActionPlacement.Toolbar,
223
+ availability: 'commandForm.canGenerateFields',
224
+ description: 'Creates a deterministic editable field layout from the selected command metadata.'
225
+ }
226
+ ]
77
227
  }
78
228
  ];
79
229
 
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsDescriptors.js","sources":["../../cratisComponentsDescriptors.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 { ComponentDescriptor, PropertyDescriptor, PropertyValueType, QueryResultShape } from '@cratis/scene.model';\nimport { componentRegistryKey } from '@cratis/scene.react';\n\n// The package name, spelled out so describing components does not pull every adapter (and its UI dependencies) in\n// with it; the bundle's validation checks each key against the manifest.\nconst key = (name: string) => componentRegistryKey('Cratis.Components', name);\n\n/**\n * The properties every query-bound data table shares: which query feeds it, and the few settings that shape how\n * it shows the result.\n *\n * `query` is a `QueryReference`, so an editor binds it to a host-supplied query candidate and validates the\n * arguments against it. What is stored is a `QueryBinding`; a plain query name - what screens carried before\n * bindings existed - is still read, as a binding with no explicit connections. The columns are not properties:\n * they are the `content` slot's children, edited as nodes.\n */\nconst dataTableProperties: PropertyDescriptor[] = [\n {\n path: 'query', label: 'Query', group: 'Data', valueType: PropertyValueType.QueryReference, editorKind: 'queryBinding',\n description: 'The collection query that feeds the table.',\n constraints: { required: true, resultShapes: [QueryResultShape.Collection] },\n },\n { path: 'emptyMessage', label: 'Empty message', group: 'Content', valueType: PropertyValueType.String, default: '' },\n {\n path: 'dataKey', label: 'Row identity', group: 'Data', valueType: PropertyValueType.String, editorKind: 'resultField',\n description: 'The result field that identifies a row.',\n },\n {\n path: 'globalFilterFields', label: 'Searchable fields', group: 'Data', valueType: PropertyValueType.Object, editorKind: 'resultFieldList',\n description: 'The result fields the table\\'s search box looks in.',\n },\n];\n\n/**\n * What can be edited on the `Cratis.Components` package's components.\n *\n * Only the query-bound tables are described so far; the form, dialog and editor composites carry\n * Arc proxy classes by name and are configured through their own tooling. A package adds a descriptor here the\n * same way it adds a component to the manifest.\n */\nexport const cratisComponentsDescriptors: ComponentDescriptor[] = [\n { component: key('dataTable'), displayName: 'Data table', properties: dataTableProperties },\n { component: key('table'), displayName: 'Table', properties: dataTableProperties },\n { component: key('observableDataTable'), displayName: 'Live data table', properties: dataTableProperties },\n];\n"],"names":["key","name","componentRegistryKey","dataTableProperties","path","label","group","valueType","PropertyValueType","QueryReference","editorKind","description","constraints","required","resultShapes","QueryResultShape","Collection","String","default","Object","cratisComponentsDescriptors","component","displayName","properties"],"mappings":";;;AAAA;AACA;AAKA;AACA;AACA,MAAMA,GAAAA,GAAM,CAACC,IAAAA,GAAiBC,oBAAAA,CAAqB,mBAAA,EAAqBD,IAAAA,CAAAA;AAExE;;;;;;;;AAQC,IACD,MAAME,mBAAAA,GAA4C;AAC9C,IAAA;QACIC,IAAAA,EAAM,OAAA;QAASC,KAAAA,EAAO,OAAA;QAASC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBC,cAAc;QAAEC,UAAAA,EAAY,cAAA;QACvGC,WAAAA,EAAa,4CAAA;QACbC,WAAAA,EAAa;YAAEC,QAAAA,EAAU,IAAA;YAAMC,YAAAA,EAAc;AAACC,gBAAAA,gBAAAA,CAAiBC;AAAW;AAAC;AAC/E,KAAA;AACA,IAAA;QAAEZ,IAAAA,EAAM,cAAA;QAAgBC,KAAAA,EAAO,eAAA;QAAiBC,KAAAA,EAAO,SAAA;AAAWC,QAAAA,SAAAA,EAAWC,kBAAkBS,MAAM;QAAEC,OAAAA,EAAS;AAAG,KAAA;AACnH,IAAA;QACId,IAAAA,EAAM,SAAA;QAAWC,KAAAA,EAAO,cAAA;QAAgBC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBS,MAAM;QAAEP,UAAAA,EAAY,aAAA;QACxGC,WAAAA,EAAa;AACjB,KAAA;AACA,IAAA;QACIP,IAAAA,EAAM,oBAAA;QAAsBC,KAAAA,EAAO,mBAAA;QAAqBC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBW,MAAM;QAAET,UAAAA,EAAY,iBAAA;QACxHC,WAAAA,EAAa;AACjB;AACH,CAAA;AAED;;;;;;UAOaS,2BAAAA,GAAqD;AAC9D,IAAA;AAAEC,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,WAAA,CAAA;QAAcsB,WAAAA,EAAa,YAAA;QAAcC,UAAAA,EAAYpB;AAAoB,KAAA;AAC1F,IAAA;AAAEkB,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,OAAA,CAAA;QAAUsB,WAAAA,EAAa,OAAA;QAASC,UAAAA,EAAYpB;AAAoB,KAAA;AACjF,IAAA;AAAEkB,QAAAA,SAAAA,EAAWrB,GAAAA,CAAI,qBAAA,CAAA;QAAwBsB,WAAAA,EAAa,iBAAA;QAAmBC,UAAAA,EAAYpB;AAAoB;;;"}
1
+ {"version":3,"file":"cratisComponentsDescriptors.js","sources":["../../cratisComponentsDescriptors.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 { BindingMode, BindingSourceKind, ComponentDescriptor, DesignTimeActionPlacement, PropertyDescriptor, PropertyValueType, QueryResultShape } from '@cratis/scene.model';\nimport { componentRegistryKey } from '@cratis/scene.react';\n\n// The package name, spelled out so describing components does not pull every adapter (and its UI dependencies) in\n// with it; the bundle's validation checks each key against the manifest.\nconst key = (name: string) => componentRegistryKey('Cratis.Components', name);\n\n/**\n * The properties every query-bound data table shares: which query feeds it, and the few settings that shape how\n * it shows the result.\n *\n * `query` is a `QueryReference`, so an editor binds it to a host-supplied query candidate and validates the\n * arguments against it. What is stored is a `QueryBinding`; a plain query name - what screens carried before\n * bindings existed - is still read, as a binding with no explicit connections. The columns are not properties:\n * they are the `content` slot's children, edited as nodes.\n */\nconst dataTableProperties: PropertyDescriptor[] = [\n {\n path: 'query', label: 'Query', group: 'Data', valueType: PropertyValueType.QueryReference, editorKind: 'queryBinding',\n description: 'The collection query that feeds the table.',\n constraints: { required: true, resultShapes: [QueryResultShape.Collection] },\n },\n { path: 'emptyMessage', label: 'Empty message', group: 'Content', valueType: PropertyValueType.String, default: '' },\n {\n path: 'dataKey', label: 'Row identity', group: 'Data', valueType: PropertyValueType.String, editorKind: 'resultField',\n description: 'The result field that identifies a row.',\n },\n {\n path: 'globalFilterFields', label: 'Searchable fields', group: 'Data', valueType: PropertyValueType.Object, editorKind: 'resultFieldList',\n description: 'The result fields the table\\'s search box looks in.',\n },\n {\n path: 'selectedItem', label: 'Selected item', group: 'Outputs', valueType: PropertyValueType.Object, readOnly: true,\n output: true, bindingMode: BindingMode.OneWay,\n description: 'The currently selected row, or null after selection is cleared.',\n },\n];\n\nconst commandFormProperties: PropertyDescriptor[] = [\n {\n path: 'command', label: 'Command', group: 'Command', valueType: PropertyValueType.String, editorKind: 'commandBinding',\n constraints: { required: true },\n description: 'The Arc command proxy rendered through the native command form runtime.',\n },\n {\n path: 'mode', label: 'Mode', group: 'Layout', valueType: PropertyValueType.Enum,\n choices: [{ value: 'auto', label: 'Auto' }, { value: 'manual', label: 'Manual' }], default: 'auto',\n description: 'Auto follows command metadata; manual renders explicit inputs inside the same native form boundary.',\n },\n { path: 'columns', label: 'Columns', group: 'Layout', valueType: PropertyValueType.Number, default: 1 },\n { path: 'fieldWidths', label: 'Field widths', group: 'Layout', valueType: PropertyValueType.Object, editorKind: 'fieldWidths' },\n {\n path: 'inputs', label: 'Fields', group: 'Layout', valueType: PropertyValueType.Collection, editorKind: 'commandFields',\n acceptedBindingKinds: [BindingSourceKind.DataContext, BindingSourceKind.ComponentProperty],\n item: {\n label: 'Field',\n properties: [\n { path: 'property', label: 'Property', group: 'Field', valueType: PropertyValueType.String },\n { path: 'type', label: 'Type', group: 'Field', valueType: PropertyValueType.Enum, choices: [{ value: 'string', label: 'String' }, { value: 'guid', label: 'Guid' }] },\n { path: 'label', label: 'Label', group: 'Field', valueType: PropertyValueType.String },\n { path: 'column', label: 'Column', group: 'Layout', valueType: PropertyValueType.Number },\n { path: 'width', label: 'Width', group: 'Layout', valueType: PropertyValueType.String },\n ],\n },\n },\n {\n path: 'exclude', label: 'Excluded fields', group: 'Command', valueType: PropertyValueType.Collection,\n item: { label: 'Excluded field', properties: [{ path: 'property', label: 'Property', group: 'Field', valueType: PropertyValueType.String }] },\n },\n { path: 'submitLabel', label: 'Submit label', group: 'Content', valueType: PropertyValueType.String, default: 'Submit' },\n];\n\n/**\n * What can be edited on the `Cratis.Components` package's components.\n *\n * Only the query-bound tables are described so far; the form, dialog and editor composites carry\n * Arc proxy classes by name and are configured through their own tooling. A package adds a descriptor here the\n * same way it adds a component to the manifest.\n */\nexport const cratisComponentsDescriptors: ComponentDescriptor[] = [\n { component: key('dataTable'), displayName: 'Data table', properties: dataTableProperties },\n { component: key('table'), displayName: 'Table', properties: dataTableProperties },\n { component: key('observableDataTable'), displayName: 'Live data table', properties: dataTableProperties },\n {\n component: key('commandForm'),\n displayName: 'Command form',\n editorKind: 'commandFormDesigner',\n properties: commandFormProperties,\n actions: [{\n id: 'Cratis.Components.commandForm.generateFields',\n label: 'Generate fields',\n placement: DesignTimeActionPlacement.Toolbar,\n availability: 'commandForm.canGenerateFields',\n description: 'Creates a deterministic editable field layout from the selected command metadata.',\n }],\n },\n];\n"],"names":["key","name","componentRegistryKey","dataTableProperties","path","label","group","valueType","PropertyValueType","QueryReference","editorKind","description","constraints","required","resultShapes","QueryResultShape","Collection","String","default","Object","readOnly","output","bindingMode","BindingMode","OneWay","commandFormProperties","Enum","choices","value","Number","acceptedBindingKinds","BindingSourceKind","DataContext","ComponentProperty","item","properties","cratisComponentsDescriptors","component","displayName","actions","id","placement","DesignTimeActionPlacement","Toolbar","availability"],"mappings":";;;AAAA;AACA;AAKA;AACA;AACA,MAAMA,GAAAA,GAAM,CAACC,IAAAA,GAAiBC,oBAAAA,CAAqB,mBAAA,EAAqBD,IAAAA,CAAAA;AAExE;;;;;;;;AAQC,IACD,MAAME,mBAAAA,GAA4C;AAC9C,IAAA;QACIC,IAAAA,EAAM,OAAA;QAASC,KAAAA,EAAO,OAAA;QAASC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBC,cAAc;QAAEC,UAAAA,EAAY,cAAA;QACvGC,WAAAA,EAAa,4CAAA;QACbC,WAAAA,EAAa;YAAEC,QAAAA,EAAU,IAAA;YAAMC,YAAAA,EAAc;AAACC,gBAAAA,gBAAAA,CAAiBC;AAAW;AAAC;AAC/E,KAAA;AACA,IAAA;QAAEZ,IAAAA,EAAM,cAAA;QAAgBC,KAAAA,EAAO,eAAA;QAAiBC,KAAAA,EAAO,SAAA;AAAWC,QAAAA,SAAAA,EAAWC,kBAAkBS,MAAM;QAAEC,OAAAA,EAAS;AAAG,KAAA;AACnH,IAAA;QACId,IAAAA,EAAM,SAAA;QAAWC,KAAAA,EAAO,cAAA;QAAgBC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBS,MAAM;QAAEP,UAAAA,EAAY,aAAA;QACxGC,WAAAA,EAAa;AACjB,KAAA;AACA,IAAA;QACIP,IAAAA,EAAM,oBAAA;QAAsBC,KAAAA,EAAO,mBAAA;QAAqBC,KAAAA,EAAO,MAAA;AAAQC,QAAAA,SAAAA,EAAWC,kBAAkBW,MAAM;QAAET,UAAAA,EAAY,iBAAA;QACxHC,WAA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;QACZc,OAAAA,EAAS;AAAC,YAAA;gBACNC,EAAAA,EAAI,8CAAA;gBACJnC,KAAAA,EAAO,iBAAA;AACPoC,gBAAAA,SAAAA,EAAWC,0BAA0BC,OAAO;gBAC5CC,YAAAA,EAAc,+BAAA;gBACdjC,WAAAA,EAAa;AACjB;AAAE;AACN;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsPackage.d.ts","sourceRoot":"","sources":["../../cratisComponentsPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAuBzD,eAAO,MAAM,+BAA+B,EAAE,YAsE7C,CAAC;AASF,eAAO,MAAM,uBAAuB,EAAE,kBAIrC,CAAC"}
1
+ {"version":3,"file":"cratisComponentsPackage.d.ts","sourceRoot":"","sources":["../../cratisComponentsPackage.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAwBzD,eAAO,MAAM,+BAA+B,EAAE,YA+E7C,CAAC;AASF,eAAO,MAAM,uBAAuB,EAAE,kBASrC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { PackageKind } from '@cratis/scene.model';
2
2
  import { cratisComponents, cratisComponentsPackageName } from './cratisComponents.js';
3
3
  import { cratisComponentsDescriptors } from './cratisComponentsDescriptors.js';
4
+ import { generateCommandFieldsAction } from './forms/generateCommandFieldsAction.js';
4
5
 
5
6
  // Copyright (c) Cratis. All rights reserved.
6
7
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -94,7 +95,31 @@ import { cratisComponentsDescriptors } from './cratisComponentsDescriptors.js';
94
95
  description: "Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.",
95
96
  module: '@cratis/scene.components',
96
97
  license: 'MIT',
97
- licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
98
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
99
+ designTime: {
100
+ previews: [],
101
+ designers: [
102
+ 'commandFormDesigner'
103
+ ],
104
+ propertyEditors: [
105
+ 'commandBinding',
106
+ 'commandFields',
107
+ 'fieldWidths'
108
+ ],
109
+ propertyDisplays: [],
110
+ actions: [
111
+ 'Cratis.Components.commandForm.generateFields'
112
+ ]
113
+ },
114
+ assets: [
115
+ '@cratis/components/styles',
116
+ '@cratis/components/tokens'
117
+ ],
118
+ runtimeSingletons: [
119
+ 'react',
120
+ '@cratis/arc',
121
+ '@cratis/components'
122
+ ]
98
123
  };
99
124
  /**
100
125
  * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components
@@ -105,7 +130,12 @@ import { cratisComponentsDescriptors } from './cratisComponentsDescriptors.js';
105
130
  */ const cratisComponentsPackage = {
106
131
  manifest: cratisComponentsPackageManifest,
107
132
  components: cratisComponents,
108
- descriptors: cratisComponentsDescriptors
133
+ descriptors: cratisComponentsDescriptors,
134
+ designTime: {
135
+ actions: {
136
+ [generateCommandFieldsAction.descriptor.id]: generateCommandFieldsAction
137
+ }
138
+ }
109
139
  };
110
140
 
111
141
  export { cratisComponentsPackage, cratisComponentsPackageManifest };
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\nimport { cratisComponentsDescriptors } from './cratisComponentsDescriptors';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'singleResult',\n 'queryInputForm',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.\",\n module: '@cratis/scene.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n descriptors: cratisComponentsDescriptors,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents","descriptors","cratisComponentsDescriptors"],"mappings":";;;;AAAA;AACA;AAOA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EA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;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY,gBAAAA;IACZC,WAAAA,EAAaC;AACjB;;"}
1
+ {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\nimport { cratisComponentsDescriptors } from './cratisComponentsDescriptors';\nimport { generateCommandFieldsAction } from './forms/generateCommandFieldsAction';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'singleResult',\n 'queryInputForm',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind. dataTable and table accept optional object-valued queryArguments for collection queries. singleResult displays one read-only scalar own resultField of an optional model using an explicit query, object queryArguments and enabled: true. queryInputForm commits explicit string inputs on submit to the same optional-single runtime; drafts never execute a query.\",\n module: '@cratis/scene.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n designTime: {\n previews: [],\n designers: ['commandFormDesigner'],\n propertyEditors: ['commandBinding', 'commandFields', 'fieldWidths'],\n propertyDisplays: [],\n actions: ['Cratis.Components.commandForm.generateFields'],\n },\n assets: ['@cratis/components/styles', '@cratis/components/tokens'],\n runtimeSingletons: ['react', '@cratis/arc', '@cratis/components'],\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n descriptors: cratisComponentsDescriptors,\n designTime: {\n actions: {\n [generateCommandFieldsAction.descriptor.id]: generateCommandFieldsAction,\n },\n },\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","designTime","previews","designers","propertyEditors","propertyDisplays","actions","assets","runtimeSingletons","cratisComponentsPackage","manifest","cratisComponents","descriptors","cratisComponentsDescriptors","generateCommandFieldsAction","descriptor","id"],"mappings":";;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,2BAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,cAAA;AACA,QAAA,gBAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,g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uBAAAA,GAA8C;IACvDC,QAAAA,EAAU5B,+BAAAA;IACVS,UAAAA,EAAYoB,gBAAAA;IACZC,WAAAA,EAAaC,2BAAAA;IACbZ,UAAAA,EAAY;QACRK,OAAAA,EAAS;AACL,YAAA,CAACQ,2BAAAA,CAA4BC,UAAU,CAACC,EAAE,GAAGF;AACjD;AACJ;AACJ;;"}
@@ -5,7 +5,8 @@ interface CommandFormRuntimeProps {
5
5
  inputs?: CommandInput[];
6
6
  exclude?: string[];
7
7
  submitLabel: string;
8
+ columns?: number;
8
9
  }
9
- export default function CommandFormRuntime({ command, inputs, exclude, submitLabel }: CommandFormRuntimeProps): import("react").JSX.Element;
10
+ export default function CommandFormRuntime({ command, inputs, exclude, submitLabel, columns }: CommandFormRuntimeProps): import("react").JSX.Element;
10
11
  export {};
11
12
  //# sourceMappingURL=CommandFormRuntime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CommandFormRuntime.d.ts","sourceRoot":"","sources":["../../../forms/CommandFormRuntime.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,UAAU,uBAAuB;IAC7B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACvB;AA4CD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,uBAAuB,+BAS5G"}
1
+ {"version":3,"file":"CommandFormRuntime.d.ts","sourceRoot":"","sources":["../../../forms/CommandFormRuntime.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAIpD,UAAU,uBAAuB;IAC7B,OAAO,EAAE,gBAAgB,CAAC;IAC1B,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AA4CD,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,OAAW,EAAE,EAAE,uBAAuB,+BAWzH"}
@@ -45,7 +45,7 @@ const NativeAutoCommandForm = AutoCommandForm;
45
45
  }
46
46
  return undefined;
47
47
  }
48
- /** Private lazy entry point: importing the Scene registry must not import Arc. */ function CommandFormRuntime({ command, inputs, exclude, submitLabel }) {
48
+ /** Private lazy entry point: importing the Scene registry must not import Arc. */ function CommandFormRuntime({ command, inputs, exclude, submitLabel, columns = 1 }) {
49
49
  const error = capability(command, inputs, exclude);
50
50
  if (error) return /*#__PURE__*/ jsx("div", {
51
51
  role: "alert",
@@ -56,9 +56,16 @@ const NativeAutoCommandForm = AutoCommandForm;
56
56
  command: command,
57
57
  showTitles: false,
58
58
  children: [
59
- inputs.map((input)=>/*#__PURE__*/ jsx(ExplicitCommandField, {
60
- input: input
61
- }, input.property)),
59
+ /*#__PURE__*/ jsx("div", {
60
+ style: {
61
+ display: 'grid',
62
+ gridTemplateColumns: `repeat(${Math.max(1, columns)}, minmax(0, 1fr))`,
63
+ gap: '1rem'
64
+ },
65
+ children: inputs.map((input)=>/*#__PURE__*/ jsx(ExplicitCommandField, {
66
+ input: input
67
+ }, input.property))
68
+ }),
62
69
  /*#__PURE__*/ jsx(CommandFormSubmit, {
63
70
  label: submitLabel
64
71
  })
@@ -1 +1 @@
1
- {"version":3,"file":"CommandFormRuntime.js","sources":["../../../forms/CommandFormRuntime.tsx"],"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 type { ComponentType, ReactNode } from 'react';\nimport { AutoCommandForm } from '@cratis/components/CommandForm';\nimport { CommandForm } from '@cratis/arc.react/commands';\nimport { Guid } from '@cratis/fundamentals';\nimport type { BoundConstructor } from '../bindings';\nimport type { CommandInput } from './commandInputs';\nimport { CommandFormSubmit } from './CommandFormSubmit';\nimport { ExplicitCommandField } from './ExplicitCommandField';\n\ninterface CommandFormRuntimeProps {\n command: BoundConstructor;\n inputs?: CommandInput[];\n exclude?: string[];\n submitLabel: string;\n}\n\n// Runtime bindings erase the proxy's keys; the optional footer is a Components >=4.13 contract.\nconst NativeAutoCommandForm = AutoCommandForm as unknown as ComponentType<{\n command: BoundConstructor;\n exclude?: string[];\n footer?: ReactNode;\n}>;\n\ntype Descriptor = { name: string; type: unknown; isOptional: boolean };\n\n/** Verify the whole command before mounting any native form: partial forms must never execute. */\nfunction capability(command: BoundConstructor, inputs?: CommandInput[], exclude?: string[]): string | undefined {\n let descriptors: unknown;\n try { descriptors = (new command() as { propertyDescriptors?: unknown }).propertyDescriptors; }\n catch { return 'Unable to inspect command proxy'; }\n if (!Array.isArray(descriptors)) return 'Command proxy has no property descriptors';\n const byName = new Map<string, Descriptor>();\n for (const descriptor of descriptors) {\n if (!descriptor || typeof descriptor.name !== 'string' || !descriptor.name ||\n typeof descriptor.isOptional !== 'boolean' || byName.has(descriptor.name)) return 'Ambiguous or invalid command property descriptors';\n byName.set(descriptor.name, descriptor);\n }\n if (inputs) {\n for (const input of inputs) {\n const descriptor = byName.get(input.property);\n if (!descriptor) return `Unknown command property '${input.property}'`;\n if (descriptor.type !== (input.type === 'guid' ? Guid : String)) return `Command property '${input.property}' type does not match '${input.type}'`;\n }\n for (const descriptor of byName.values()) {\n if (!descriptor.isOptional && !inputs.some(input => input.property === descriptor.name)) return `Required command property '${descriptor.name}' has no input`;\n }\n } else {\n for (const descriptor of byName.values()) {\n if (!descriptor.isOptional && (exclude?.includes(descriptor.name) ||\n ![String, Number, Boolean, Date].includes(descriptor.type as typeof String))) {\n return `Required command property '${descriptor.name}' has no supported automatic field; declare inputs`;\n }\n }\n }\n return undefined;\n}\n\n/** Private lazy entry point: importing the Scene registry must not import Arc. */\nexport default function CommandFormRuntime({ command, inputs, exclude, submitLabel }: CommandFormRuntimeProps) {\n const error = capability(command, inputs, exclude);\n if (error) return <div role='alert'>{error}</div>;\n // The registry's never-argument constructor is erased; Arc creates this checked proxy with no args.\n if (inputs) return <CommandForm command={command as unknown as new () => object} showTitles={false}>\n {inputs.map(input => <ExplicitCommandField key={input.property} input={input} />)}\n <CommandFormSubmit label={submitLabel} />\n </CommandForm>;\n return <NativeAutoCommandForm command={command} exclude={exclude} footer={<CommandFormSubmit label={submitLabel} />} />;\n}\n"],"names":["NativeAutoCommandForm","AutoCommandForm","capability","command","inputs","exclude","descriptors","propertyDescriptors","Array","isArray","byName","Map","descriptor","name","isOptional","has","set","input","get","property","type","Guid","String","values","some","includes","Number","Boolean","Date","undefined","CommandFormRuntime","submitLabel","error","_jsx","div","role","_jsxs","CommandForm","showTitles","map","ExplicitCommandField","CommandFormSubmit","label","footer"],"mappings":";;;;;;;AAAA;AACA;AAkBA;AACA,MAAMA,qBAAAA,GAAwBC,eAAAA;AAQ9B,mGACA,SAASC,UAAAA,CAAWC,OAAyB,EAAEC,MAAuB,EAAEC,OAAkB,EAAA;IACtF,IAAIC,WAAAA;IACJ,IAAI;QAAEA,WAAAA,GAAe,IAAIH,OAAAA,EAAAA,CAAgDI,mBAAmB;AAAE,IAAA,CAAA,CAC9F,OAAM;QAAE,OAAO,iCAAA;AAAmC,IAAA;AAClD,IAAA,IAAI,CAACC,KAAAA,CAAMC,OAAO,CAACH,cAAc,OAAO,2CAAA;AACxC,IAAA,MAAMI,SAAS,IAAIC,GAAAA,EAAAA;IACnB,KAAK,MAAMC,cAAcN,WAAAA,CAAa;QAClC,IAAI,CAACM,cAAc,OAAOA,UAAAA,CAAWC,IAAI,KAAK,QA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sx"],"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 type { ComponentType, ReactNode } from 'react';\nimport { AutoCommandForm } from '@cratis/components/CommandForm';\nimport { CommandForm } from '@cratis/arc.react/commands';\nimport { Guid } from '@cratis/fundamentals';\nimport type { BoundConstructor } from '../bindings';\nimport type { CommandInput } from './commandInputs';\nimport { CommandFormSubmit } from './CommandFormSubmit';\nimport { ExplicitCommandField } from './ExplicitCommandField';\n\ninterface CommandFormRuntimeProps {\n command: BoundConstructor;\n inputs?: CommandInput[];\n exclude?: string[];\n submitLabel: string;\n columns?: number;\n}\n\n// Runtime bindings erase the proxy's keys; the optional footer is a Components >=4.13 contract.\nconst NativeAutoCommandForm = AutoCommandForm as unknown as ComponentType<{\n command: BoundConstructor;\n exclude?: string[];\n footer?: ReactNode;\n}>;\n\ntype Descriptor = { name: string; type: unknown; isOptional: boolean };\n\n/** Verify the whole command before mounting any native form: partial forms must never execute. */\nfunction capability(command: BoundConstructor, inputs?: CommandInput[], exclude?: string[]): string | undefined {\n let descriptors: unknown;\n try { descriptors = (new command() as { propertyDescriptors?: unknown }).propertyDescriptors; }\n catch { return 'Unable to inspect command proxy'; }\n if (!Array.isArray(descriptors)) return 'Command proxy has no property descriptors';\n const byName = new Map<string, Descriptor>();\n for (const descriptor of descriptors) {\n if (!descriptor || typeof descriptor.name !== 'string' || !descriptor.name ||\n typeof descriptor.isOptional !== 'boolean' || byName.has(descriptor.name)) return 'Ambiguous or invalid command property descriptors';\n byName.set(descriptor.name, descriptor);\n }\n if (inputs) {\n for (const input of inputs) {\n const descriptor = byName.get(input.property);\n if (!descriptor) return `Unknown command property '${input.property}'`;\n if (descriptor.type !== (input.type === 'guid' ? Guid : String)) return `Command property '${input.property}' type does not match '${input.type}'`;\n }\n for (const descriptor of byName.values()) {\n if (!descriptor.isOptional && !inputs.some(input => input.property === descriptor.name)) return `Required command property '${descriptor.name}' has no input`;\n }\n } else {\n for (const descriptor of byName.values()) {\n if (!descriptor.isOptional && (exclude?.includes(descriptor.name) ||\n ![String, Number, Boolean, Date].includes(descriptor.type as typeof String))) {\n return `Required command property '${descriptor.name}' has no supported automatic field; declare inputs`;\n }\n }\n }\n return undefined;\n}\n\n/** Private lazy entry point: importing the Scene registry must not import Arc. */\nexport default function CommandFormRuntime({ command, inputs, exclude, submitLabel, columns = 1 }: CommandFormRuntimeProps) {\n const error = capability(command, inputs, exclude);\n if (error) return <div role='alert'>{error}</div>;\n // The registry's never-argument constructor is erased; Arc creates this checked proxy with no args.\n if (inputs) return <CommandForm command={command as unknown as new () => object} showTitles={false}>\n <div style={{ display: 'grid', gridTemplateColumns: `repeat(${Math.max(1, columns)}, minmax(0, 1fr))`, gap: '1rem' }}>\n {inputs.map(input => <ExplicitCommandField key={input.property} input={input} />)}\n </div>\n <CommandFormSubmit label={submitLabel} />\n </CommandForm>;\n return <NativeAutoCommandForm command={command} exclude={exclude} footer={<CommandFormSubmit label={submitLabel} />} />;\n}\n"],"names":["NativeAutoCommandForm","AutoCommandForm","capability","command","inputs","exclude","descriptors","propertyDescriptors","Array","isArray","byName","Map","descriptor","name","isOptional","has","set","input","get","property","type","Guid","String","values","some","includes","Number","Boolean","Date","undefined","CommandFormRuntime","submitLabel","columns","error","_jsx","div","role","_jsxs","CommandForm","showTitles","style","display","gridTemplateColumns","Math","max","gap","map","ExplicitCommandField","CommandFormSubmit","label","footer"],"mappings":";;;;;;;AAAA;AACA;AAmBA;AACA,MAAMA,qBAAAA,GAAwBC,eAAAA;AAQ9B,mGACA,SAASC,UAAAA,CAAWC,OAAyB,EAAEC,MAAuB,EAAEC,OAAkB,EAAA;IACtF,IAAIC,WAAAA;IACJ,IAAI;QAAEA,WAAAA,GAAe,IAAIH,OAAAA,EAAAA,CAAgDI,mBAAmB;AAAE,IAAA,CAAA,CAC9F,OAAM;QAAE,OAAO,iCAAA;AAAmC,IAAA;AAClD,IAAA,IAAI,CAACC,KAAAA,CAAMC,OA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,CAAAA,KAAAA,iBAASiB,GAAA,CAACa,oBAAAA,EAAAA;wBAA0C9B,KAAAA,EAAOA;AAAvBA,qBAAAA,EAAAA,KAAAA,CAAME,QAAQ,CAAA;;0BAElEe,GAAA,CAACc,iBAAAA,EAAAA;gBAAkBC,KAAAA,EAAOlB;;;;AAE9B,IAAA,qBAAOG,GAAA,CAAClC,qBAAAA,EAAAA;QAAsBG,OAAAA,EAASA,OAAAA;QAASE,OAAAA,EAASA,OAAAA;AAAS6C,QAAAA,MAAAA,gBAAQhB,GAAA,CAACc,iBAAAA,EAAAA;YAAkBC,KAAAA,EAAOlB;;;AACxG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ExplicitCommandField.d.ts","sourceRoot":"","sources":["../../../forms/ExplicitCommandField.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA4EpD,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAGtE"}
1
+ {"version":3,"file":"ExplicitCommandField.d.ts","sourceRoot":"","sources":["../../../forms/ExplicitCommandField.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AA4EpD,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,YAAY,CAAA;CAAE,+BAKtE"}
@@ -93,13 +93,19 @@ const NativeTextField = asCommandFormField(TextControl, {
93
93
  defaultValue: ''
94
94
  });
95
95
  /** Opaque child is self-bound by Arc's native runtime binding, with an exact fieldName. */ function ExplicitCommandField({ input }) {
96
- return /*#__PURE__*/ jsx(NativeTextField, {
97
- fieldName: input.property,
98
- value: (command)=>command[input.property],
99
- property: input.property,
100
- guid: input.type === 'guid',
101
- label: input.label,
102
- title: input.label
96
+ return /*#__PURE__*/ jsx("div", {
97
+ style: {
98
+ gridColumn: input.column === undefined ? undefined : `${input.column}`,
99
+ width: input.width
100
+ },
101
+ children: /*#__PURE__*/ jsx(NativeTextField, {
102
+ fieldName: input.property,
103
+ value: (command)=>command[input.property],
104
+ property: input.property,
105
+ guid: input.type === 'guid',
106
+ label: input.label,
107
+ title: input.label
108
+ })
103
109
  });
104
110
  }
105
111
 
@@ -1 +1 @@
1
- {"version":3,"file":"ExplicitCommandField.js","sources":["../../../forms/ExplicitCommandField.tsx"],"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 { useId, useLayoutEffect, useRef, useState } from 'react';\nimport { asCommandFormField, useCommandFormContext } from '@cratis/arc.react/commands';\nimport { Guid } from '@cratis/fundamentals';\nimport type { CommandInput } from './commandInputs';\n\ninterface TextProps {\n value: unknown;\n onChange: (value: unknown) => void;\n onBlur?: () => void;\n invalid: boolean;\n required: boolean;\n errors: string[];\n label: string;\n property: string;\n guid: boolean;\n}\n\nfunction TextControl({ value, onChange, onBlur, invalid, required, errors, label, property, guid }: TextProps) {\n const id = useId();\n const context = useCommandFormContext();\n const { setCustomFieldError } = context;\n // Keep the latest native getter: the context snapshot can be stale when another field sets an\n // error and this field unmounts in the same event.\n const contextRef = useRef(context);\n contextRef.current = context;\n // The draft is intentionally independent of the typed proxy value: malformed text must never\n // reappear as a stale previously valid Guid in the command's serialized payload.\n const [draft, setDraft] = useState(() => value instanceof Guid && !value.equals(Guid.empty) ? value.toString() : '');\n const draftRef = useRef(draft);\n const ownedError = useRef<string | undefined>(undefined);\n const updateError = (error: string | undefined) => {\n const current = contextRef.current.getFieldError(property);\n // Do not replace or erase another producer's error for this field.\n if (ownedError.current !== undefined && current !== ownedError.current) {\n ownedError.current = undefined;\n return;\n }\n if (ownedError.current === undefined && Object.hasOwn(contextRef.current.customFieldErrors, property)) return;\n if (error === undefined && ownedError.current === undefined) return;\n ownedError.current = error;\n setCustomFieldError(property, error);\n };\n // A label/required change must recalculate the message without disposing the field's error.\n // Only a different field/type or an actual unmount relinquishes ownership.\n useLayoutEffect(() => () => {\n if (ownedError.current !== undefined && contextRef.current.getFieldError(property) === ownedError.current) {\n contextRef.current.setCustomFieldError(property, undefined);\n }\n ownedError.current = undefined;\n }, [property, guid]);\n useLayoutEffect(() => {\n if (guid) {\n const current = draftRef.current || (value instanceof Guid && !value.equals(Guid.empty) ? value.toString() : '');\n updateError(!current ? required ? `${label} is required` : undefined :\n !Guid.isGuid(current) ? `${label} must be a valid GUID` : undefined);\n }\n }, [guid, required, property, label, setCustomFieldError]);\n const text = guid ? draft : typeof value === 'string' ? value : '';\n return <div>\n <label htmlFor={id}>{label}</label>\n <input id={id} name={property} type='text' required={required} value={text}\n aria-invalid={invalid} aria-describedby={errors.length ? `${id}-error` : undefined}\n onBlur={onBlur} onChange={event => {\n const next = event.currentTarget.value;\n if (!guid) { onChange(next); return; }\n draftRef.current = next;\n setDraft(next);\n const error = !next ? required ? `${label} is required` : undefined : !Guid.isGuid(next) ? `${label} must be a valid GUID` : undefined;\n // A malformed draft clears the previously typed value, not just its display.\n onChange(error || !next ? undefined : Guid.parse(next));\n updateError(error);\n }} />\n {errors.length > 0 && <div id={`${id}-error`} role='alert'>{errors[0]}</div>}\n </div>;\n}\n\nconst NativeTextField = asCommandFormField<TextProps>(TextControl, { defaultValue: '' });\n\n/** Opaque child is self-bound by Arc's native runtime binding, with an exact fieldName. */\nexport function ExplicitCommandField({ input }: { input: CommandInput }) {\n return <NativeTextField fieldName={input.property} value={(command: Record<string, unknown>) => command[input.property]}\n property={input.property} guid={input.type === 'guid'} label={input.label} title={input.label} />;\n}\n"],"names":["TextControl","value","onChange","onBlur","invalid","required","errors","label","property","guid","id","useId","context","useCommandFormContext","setCustomFieldError","contextRef","useRef","current","draft","setDraft","useState","Guid","equals","empty","toString","draftRef","ownedError","undefined","updateError","error","getFieldError","Object","hasOwn","customFieldErrors","useLayoutEffect","isGuid","text","_jsxs","div","_jsx","htmlFor","input","name","type","aria-invalid","aria-describedby","length","event","next","currentTarget","parse","role","NativeTextField","asCommandFormField","defaultValue","ExplicitCommandField","fieldName","command","title"],"mappings":";;;;;AAoBA,SAASA,YAAY,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,IAAI,EAAa,EAAA;AACzG,IAAA,MAAMC,EAAAA,GAAKC,KAAAA,EAAAA;AACX,IAAA,MAAMC,OAAAA,GAAUC,qBAAAA,EAAAA;IAChB,MAAM,EAAEC,mBAAmB,EAAE,GAAGF,OAAAA;;;AAGhC,IAAA,MAAMG,aAAaC,MAAAA,CAAOJ,OAAAA,CAAAA;AAC1BG,IAAAA,UAAAA,CAAWE,OAAO,GAAGL,OAAAA;;;AAGrB,IAAA,MAAM,CAACM,KAAAA,EAAOC,QAAAA,CAAS,GAAGC,QAAAA,CAAS,IAAMnB,KAAAA,YAAiBoB,IAAAA,IAAQ,CAACpB,KAAAA,CAAMqB,MAAM,CAACD,IAAAA,CAAKE,KAAK,CAAA,GAAItB,KAAAA,CAAMuB,QAAQ,EAAA,GAAK,EAAA,CAAA;AACjH,IAAA,MAAMC,WAAWT,MAAAA,CAAOE,KAAAA,CAAAA;AACxB,IAAA,MAAMQ,aAAaV,MAAAA,CAA2BW,SAAAA,CAAAA;AAC9C,IAAA,MAAMC,cAAc,CAACC,KAAAA,GAAAA;AACjB,QAAA,MAAMZ,OAAAA,GAAUF,UAAAA,CAAWE,OAAO,CAACa,aAAa,CAACtB,QAAAA,CAAAA;;AAEjD,QAAA,IAAIkB,WAAWT,OAAO,KAAKU,aAAaV,OAAAA,KAAYS,UAAAA,CAAWT,OAAO,EAAE;AACpES,YAAAA,UAAAA,CAAWT,OAAO,GAAGU,SAAAA;AACrB,YAAA;AACJ,QAAA;AACA,QAAA,IAAID,UAAAA,CAAWT,OAAO,KAAKU,SAAAA,IAAaI,MAAAA,CAAOC,MAAM,CAACjB,UAAAA,CAAWE,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zB,oBAAAA,QAAAA,CAAS2B,SAAS,CAACmB,IAAAA,GAAOrB,SAAAA,GAAYN,IAAAA,CAAK6B,KAAK,CAACF,IAAAA,CAAAA,CAAAA;oBACjDpB,WAAAA,CAAYC,KAAAA,CAAAA;AAChB,gBAAA;;YACHvB,MAAAA,CAAOwC,MAAM,GAAG,CAAA,kBAAKP,GAAA,CAACD,KAAAA,EAAAA;gBAAI5B,EAAAA,EAAI,CAAA,EAAGA,EAAAA,CAAG,MAAM,CAAC;gBAAEyC,IAAAA,EAAK,OAAA;AAAS7C,gBAAAA,QAAAA,EAAAA,MAAM,CAAC,CAAA;;;;AAE3E;AAEA,MAAM8C,eAAAA,GAAkBC,mBAA8BrD,WAAAA,EAAa;IAAEsD,YAAAA,EAAc;AAAG,CAAA,CAAA;AAEtF,4FACO,SAASC,oBAAAA,CAAqB,EAAEd,KAAK,EAA2B,EAAA;AACnE,IAAA,qBAAOF,GAAA,CAACa,eAAAA,EAAAA;AAAgBI,QAAAA,SAAAA,EAAWf,MAAMjC,QAAQ;AAAEP,QAAAA,KAAAA,EAAO,CAACwD,OAAAA,GAAqCA,OAAO,CAAChB,KAAAA,CAAMjC,QAAQ,CAAC;AACnHA,QAAAA,QAAAA,EAAUiC,MAAMjC,QAAQ;QAAEC,IAAAA,EAAMgC,KAAAA,CAAME,IAAI,KAAK,MAAA;AAAQpC,QAAAA,KAAAA,EAAOkC,MAAMlC,KAAK;AAAEmD,QAAAA,KAAAA,EAAOjB,MAAMlC;;AAChG;;"}
1
+ {"version":3,"file":"ExplicitCommandField.js","sources":["../../../forms/ExplicitCommandField.tsx"],"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 { useId, useLayoutEffect, useRef, useState } from 'react';\nimport { asCommandFormField, useCommandFormContext } from '@cratis/arc.react/commands';\nimport { Guid } from '@cratis/fundamentals';\nimport type { CommandInput } from './commandInputs';\n\ninterface TextProps {\n value: unknown;\n onChange: (value: unknown) => void;\n onBlur?: () => void;\n invalid: boolean;\n required: boolean;\n errors: string[];\n label: string;\n property: string;\n guid: boolean;\n}\n\nfunction TextControl({ value, onChange, onBlur, invalid, required, errors, label, property, guid }: TextProps) {\n const id = useId();\n const context = useCommandFormContext();\n const { setCustomFieldError } = context;\n // Keep the latest native getter: the context snapshot can be stale when another field sets an\n // error and this field unmounts in the same event.\n const contextRef = useRef(context);\n contextRef.current = context;\n // The draft is intentionally independent of the typed proxy value: malformed text must never\n // reappear as a stale previously valid Guid in the command's serialized payload.\n const [draft, setDraft] = useState(() => value instanceof Guid && !value.equals(Guid.empty) ? value.toString() : '');\n const draftRef = useRef(draft);\n const ownedError = useRef<string | undefined>(undefined);\n const updateError = (error: string | undefined) => {\n const current = contextRef.current.getFieldError(property);\n // Do not replace or erase another producer's error for this field.\n if (ownedError.current !== undefined && current !== ownedError.current) {\n ownedError.current = undefined;\n return;\n }\n if (ownedError.current === undefined && Object.hasOwn(contextRef.current.customFieldErrors, property)) return;\n if (error === undefined && ownedError.current === undefined) return;\n ownedError.current = error;\n setCustomFieldError(property, error);\n };\n // A label/required change must recalculate the message without disposing the field's error.\n // Only a different field/type or an actual unmount relinquishes ownership.\n useLayoutEffect(() => () => {\n if (ownedError.current !== undefined && contextRef.current.getFieldError(property) === ownedError.current) {\n contextRef.current.setCustomFieldError(property, undefined);\n }\n ownedError.current = undefined;\n }, [property, guid]);\n useLayoutEffect(() => {\n if (guid) {\n const current = draftRef.current || (value instanceof Guid && !value.equals(Guid.empty) ? value.toString() : '');\n updateError(!current ? required ? `${label} is required` : undefined :\n !Guid.isGuid(current) ? `${label} must be a valid GUID` : undefined);\n }\n }, [guid, required, property, label, setCustomFieldError]);\n const text = guid ? draft : typeof value === 'string' ? value : '';\n return <div>\n <label htmlFor={id}>{label}</label>\n <input id={id} name={property} type='text' required={required} value={text}\n aria-invalid={invalid} aria-describedby={errors.length ? `${id}-error` : undefined}\n onBlur={onBlur} onChange={event => {\n const next = event.currentTarget.value;\n if (!guid) { onChange(next); return; }\n draftRef.current = next;\n setDraft(next);\n const error = !next ? required ? `${label} is required` : undefined : !Guid.isGuid(next) ? `${label} must be a valid GUID` : undefined;\n // A malformed draft clears the previously typed value, not just its display.\n onChange(error || !next ? undefined : Guid.parse(next));\n updateError(error);\n }} />\n {errors.length > 0 && <div id={`${id}-error`} role='alert'>{errors[0]}</div>}\n </div>;\n}\n\nconst NativeTextField = asCommandFormField<TextProps>(TextControl, { defaultValue: '' });\n\n/** Opaque child is self-bound by Arc's native runtime binding, with an exact fieldName. */\nexport function ExplicitCommandField({ input }: { input: CommandInput }) {\n return <div style={{ gridColumn: input.column === undefined ? undefined : `${input.column}`, width: input.width }}>\n <NativeTextField fieldName={input.property} value={(command: Record<string, unknown>) => command[input.property]}\n property={input.property} guid={input.type === 'guid'} label={input.label} title={input.label} />\n </div>;\n}\n"],"names":["TextControl","value","onChange","onBlur","invalid","required","errors","label","property","guid","id","useId","context","useCommandFormContext","setCustomFieldError","contextRef","useRef","current","draft","setDraft","useState","Guid","equals","empty","toString","draftRef","ownedError","undefined","updateError","error","getFieldError","Object","hasOwn","customFieldErrors","useLayoutEffect","isGuid","text","_jsxs","div","_jsx","htmlFor","input","name","type","aria-invalid","aria-describedby","length","event","next","currentTarget","parse","role","NativeTextField","asCommandFormField","defaultValue","ExplicitCommandField","style","gridColumn","column","width","fieldName","command","title"],"mappings":";;;;;AAoBA,SAASA,YAAY,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,IAAI,EAAa,EAAA;AACzG,IAAA,MAAMC,EAAAA,GAAKC,KAAAA,EAAAA;AACX,IAAA,MAAMC,OAAAA,GAAUC,qBAAAA,EAAAA;IAChB,MAAM,EAAEC,mBAAmB,EAAE,GAAGF,OAAAA;;;AAGhC,IAAA,MAAMG,aAAaC,MAAAA,CAAOJ,OAAAA,CAAAA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BrD,WAAAA,EAAa;IAAEsD,YAAAA,EAAc;AAAG,CAAA,CAAA;AAEtF,4FACO,SAASC,oBAAAA,CAAqB,EAAEd,KAAK,EAA2B,EAAA;AACnE,IAAA,qBAAOF,GAAA,CAACD,KAAAA,EAAAA;QAAIkB,KAAAA,EAAO;YAAEC,UAAAA,EAAYhB,KAAAA,CAAMiB,MAAM,KAAK/B,SAAAA,GAAYA,YAAY,CAAA,EAAGc,KAAAA,CAAMiB,MAAM,CAAA,CAAE;AAAEC,YAAAA,KAAAA,EAAOlB,MAAMkB;AAAM,SAAA;AAC5G,QAAA,QAAA,gBAAApB,GAAA,CAACa,eAAAA,EAAAA;AAAgBQ,YAAAA,SAAAA,EAAWnB,MAAMjC,QAAQ;AAAEP,YAAAA,KAAAA,EAAO,CAAC4D,OAAAA,GAAqCA,OAAO,CAACpB,KAAAA,CAAMjC,QAAQ,CAAC;AAC5GA,YAAAA,QAAAA,EAAUiC,MAAMjC,QAAQ;YAAEC,IAAAA,EAAMgC,KAAAA,CAAME,IAAI,KAAK,MAAA;AAAQpC,YAAAA,KAAAA,EAAOkC,MAAMlC,KAAK;AAAEuD,YAAAA,KAAAA,EAAOrB,MAAMlC;;;AAEpG;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"SceneCommandForm.d.ts","sourceRoot":"","sources":["../../../forms/SceneCommandForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAyB/D,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAkBrE"}
1
+ {"version":3,"file":"SceneCommandForm.d.ts","sourceRoot":"","sources":["../../../forms/SceneCommandForm.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAyB/D,wBAAgB,gBAAgB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAoBrE"}