@cratis/scene.components 3.4.0 → 3.6.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.
- package/README.md +87 -3
- package/bindings/ArcBoundComponents.tsx +40 -0
- package/bindings/BoundConstructor.ts +5 -5
- package/bindings/bindingRegistry.ts +52 -4
- package/bindings/for_bindingRegistry/when_registering_query_identities.ts +81 -0
- package/bindings/for_requireArcProxy/NativeProxies.ts +28 -0
- package/bindings/for_requireArcProxy/when_mounting_bound_adapters.tsx +73 -0
- package/bindings/for_requireArcProxy/when_previewing_without_arc.tsx +37 -0
- package/bindings/for_requireArcProxy/when_validating_a_proxy.ts +44 -0
- package/bindings/requireArcProxy.ts +24 -0
- package/cratisComponents.ts +4 -1
- package/cratisComponentsPackage.ts +3 -1
- package/data/SceneDataTable.tsx +1 -1
- package/data/SceneObservableDataTable.tsx +1 -1
- package/data/SceneSingleResult.tsx +29 -0
- package/data/SingleResultRuntime.tsx +103 -0
- package/data/SingleResultStatus.tsx +13 -0
- package/data/for_SceneDataTable/when_forwarding_query_arguments.tsx +23 -2
- package/data/for_SceneSingleResult/when_executing_a_native_query.tsx +290 -0
- package/data/for_SceneSingleResult/when_gating_the_lazy_runtime.tsx +60 -0
- package/data/index.ts +1 -0
- package/dialogs/SceneCommandDialog.tsx +1 -1
- package/dialogs/SceneStepperCommandDialog.tsx +1 -1
- package/dist/cjs/bindings/ArcBoundComponents.js +55 -0
- package/dist/cjs/bindings/ArcBoundComponents.js.map +1 -0
- package/dist/cjs/bindings/bindingRegistry.js +52 -4
- package/dist/cjs/bindings/bindingRegistry.js.map +1 -1
- package/dist/cjs/bindings/requireArcProxy.js +25 -0
- package/dist/cjs/bindings/requireArcProxy.js.map +1 -0
- package/dist/cjs/cratisComponents.js +4 -0
- package/dist/cjs/cratisComponents.js.map +1 -1
- package/dist/cjs/cratisComponentsPackage.js +3 -1
- package/dist/cjs/cratisComponentsPackage.js.map +1 -1
- package/dist/cjs/data/SceneDataTable.js +1 -1
- package/dist/cjs/data/SceneDataTable.js.map +1 -1
- package/dist/cjs/data/SceneObservableDataTable.js +1 -1
- package/dist/cjs/data/SceneObservableDataTable.js.map +1 -1
- package/dist/cjs/data/SceneSingleResult.js +41 -0
- package/dist/cjs/data/SceneSingleResult.js.map +1 -0
- package/dist/cjs/data/SingleResultRuntime.js +137 -0
- package/dist/cjs/data/SingleResultRuntime.js.map +1 -0
- package/dist/cjs/data/SingleResultStatus.js +23 -0
- package/dist/cjs/data/SingleResultStatus.js.map +1 -0
- package/dist/cjs/dialogs/SceneCommandDialog.js +1 -1
- package/dist/cjs/dialogs/SceneCommandDialog.js.map +1 -1
- package/dist/cjs/dialogs/SceneStepperCommandDialog.js +1 -1
- package/dist/cjs/dialogs/SceneStepperCommandDialog.js.map +1 -1
- package/dist/cjs/forms/SceneQueryInputForm.js +141 -0
- package/dist/cjs/forms/SceneQueryInputForm.js.map +1 -0
- package/dist/cjs/forms/fields/SceneRadioButtonField.js +4 -1
- package/dist/cjs/forms/fields/SceneRadioButtonField.js.map +1 -1
- package/dist/cjs/forms/queryInputs.js +50 -0
- package/dist/cjs/forms/queryInputs.js.map +1 -0
- package/dist/cjs/index.js +8 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/pages/SceneDataPage.js +1 -1
- package/dist/cjs/pages/SceneDataPage.js.map +1 -1
- package/dist/esm/bindings/ArcBoundComponents.d.ts +18 -0
- package/dist/esm/bindings/ArcBoundComponents.d.ts.map +1 -0
- package/dist/esm/bindings/ArcBoundComponents.js +49 -0
- package/dist/esm/bindings/ArcBoundComponents.js.map +1 -0
- package/dist/esm/bindings/bindingRegistry.d.ts +4 -0
- package/dist/esm/bindings/bindingRegistry.d.ts.map +1 -1
- package/dist/esm/bindings/bindingRegistry.js +49 -5
- package/dist/esm/bindings/bindingRegistry.js.map +1 -1
- package/dist/esm/bindings/for_bindingRegistry/when_registering_query_identities.d.ts +2 -0
- package/dist/esm/bindings/for_bindingRegistry/when_registering_query_identities.d.ts.map +1 -0
- package/dist/esm/bindings/for_bindingRegistry/when_registering_query_identities.js +73 -0
- package/dist/esm/bindings/for_bindingRegistry/when_registering_query_identities.js.map +1 -0
- package/dist/esm/bindings/for_requireArcProxy/NativeProxies.d.ts +25 -0
- package/dist/esm/bindings/for_requireArcProxy/NativeProxies.d.ts.map +1 -0
- package/dist/esm/bindings/for_requireArcProxy/NativeProxies.js +23 -0
- package/dist/esm/bindings/for_requireArcProxy/NativeProxies.js.map +1 -0
- package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.d.ts +2 -0
- package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.d.ts.map +1 -0
- package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.js +56 -0
- package/dist/esm/bindings/for_requireArcProxy/when_mounting_bound_adapters.js.map +1 -0
- package/dist/esm/bindings/for_requireArcProxy/when_previewing_without_arc.d.ts +2 -0
- package/dist/esm/bindings/for_requireArcProxy/when_previewing_without_arc.d.ts.map +1 -0
- package/dist/esm/bindings/for_requireArcProxy/when_previewing_without_arc.js +32 -0
- package/dist/esm/bindings/for_requireArcProxy/when_previewing_without_arc.js.map +1 -0
- package/dist/esm/bindings/for_requireArcProxy/when_validating_a_proxy.d.ts +2 -0
- package/dist/esm/bindings/for_requireArcProxy/when_validating_a_proxy.d.ts.map +1 -0
- package/dist/esm/bindings/for_requireArcProxy/when_validating_a_proxy.js +45 -0
- package/dist/esm/bindings/for_requireArcProxy/when_validating_a_proxy.js.map +1 -0
- package/dist/esm/bindings/requireArcProxy.d.ts +5 -0
- package/dist/esm/bindings/requireArcProxy.d.ts.map +1 -0
- package/dist/esm/bindings/requireArcProxy.js +23 -0
- package/dist/esm/bindings/requireArcProxy.js.map +1 -0
- package/dist/esm/cratisComponents.d.ts.map +1 -1
- package/dist/esm/cratisComponents.js +4 -0
- package/dist/esm/cratisComponents.js.map +1 -1
- package/dist/esm/cratisComponentsPackage.d.ts.map +1 -1
- package/dist/esm/cratisComponentsPackage.js +3 -1
- package/dist/esm/cratisComponentsPackage.js.map +1 -1
- package/dist/esm/data/SceneDataTable.js +1 -1
- package/dist/esm/data/SceneDataTable.js.map +1 -1
- package/dist/esm/data/SceneObservableDataTable.js +1 -1
- package/dist/esm/data/SceneObservableDataTable.js.map +1 -1
- package/dist/esm/data/SceneSingleResult.d.ts +3 -0
- package/dist/esm/data/SceneSingleResult.d.ts.map +1 -0
- package/dist/esm/data/SceneSingleResult.js +39 -0
- package/dist/esm/data/SceneSingleResult.js.map +1 -0
- package/dist/esm/data/SingleResultRuntime.d.ts +10 -0
- package/dist/esm/data/SingleResultRuntime.d.ts.map +1 -0
- package/dist/esm/data/SingleResultRuntime.js +133 -0
- package/dist/esm/data/SingleResultRuntime.js.map +1 -0
- package/dist/esm/data/SingleResultStatus.d.ts +7 -0
- package/dist/esm/data/SingleResultStatus.d.ts.map +1 -0
- package/dist/esm/data/SingleResultStatus.js +21 -0
- package/dist/esm/data/SingleResultStatus.js.map +1 -0
- package/dist/esm/data/for_SceneDataTable/when_forwarding_query_arguments.js +21 -4
- package/dist/esm/data/for_SceneDataTable/when_forwarding_query_arguments.js.map +1 -1
- package/dist/esm/data/for_SceneSingleResult/when_executing_a_native_query.d.ts +2 -0
- package/dist/esm/data/for_SceneSingleResult/when_executing_a_native_query.d.ts.map +1 -0
- package/dist/esm/data/for_SceneSingleResult/when_executing_a_native_query.js +255 -0
- package/dist/esm/data/for_SceneSingleResult/when_executing_a_native_query.js.map +1 -0
- package/dist/esm/data/for_SceneSingleResult/when_gating_the_lazy_runtime.d.ts +2 -0
- package/dist/esm/data/for_SceneSingleResult/when_gating_the_lazy_runtime.d.ts.map +1 -0
- package/dist/esm/data/for_SceneSingleResult/when_gating_the_lazy_runtime.js +54 -0
- package/dist/esm/data/for_SceneSingleResult/when_gating_the_lazy_runtime.js.map +1 -0
- package/dist/esm/data/index.d.ts +1 -0
- package/dist/esm/data/index.d.ts.map +1 -1
- package/dist/esm/data/index.js +1 -0
- package/dist/esm/data/index.js.map +1 -1
- package/dist/esm/dialogs/SceneCommandDialog.js +1 -1
- package/dist/esm/dialogs/SceneCommandDialog.js.map +1 -1
- package/dist/esm/dialogs/SceneStepperCommandDialog.js +1 -1
- package/dist/esm/dialogs/SceneStepperCommandDialog.js.map +1 -1
- package/dist/esm/for_cratisComponentsPackage/when_describing_query_input_form.d.ts +2 -0
- package/dist/esm/for_cratisComponentsPackage/when_describing_query_input_form.d.ts.map +1 -0
- package/dist/esm/for_cratisComponentsPackage/when_describing_query_input_form.js +14 -0
- package/dist/esm/for_cratisComponentsPackage/when_describing_query_input_form.js.map +1 -0
- package/dist/esm/for_cratisComponentsPackage/when_describing_single_result.d.ts +2 -0
- package/dist/esm/for_cratisComponentsPackage/when_describing_single_result.d.ts.map +1 -0
- package/dist/esm/for_cratisComponentsPackage/when_describing_single_result.js +16 -0
- package/dist/esm/for_cratisComponentsPackage/when_describing_single_result.js.map +1 -0
- package/dist/esm/forms/SceneQueryInputForm.d.ts +3 -0
- package/dist/esm/forms/SceneQueryInputForm.d.ts.map +1 -0
- package/dist/esm/forms/SceneQueryInputForm.js +139 -0
- package/dist/esm/forms/SceneQueryInputForm.js.map +1 -0
- package/dist/esm/forms/fields/SceneRadioButtonField.d.ts.map +1 -1
- package/dist/esm/forms/fields/SceneRadioButtonField.js +4 -1
- package/dist/esm/forms/fields/SceneRadioButtonField.js.map +1 -1
- package/dist/esm/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.d.ts +2 -0
- package/dist/esm/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.d.ts.map +1 -0
- package/dist/esm/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.js +38 -0
- package/dist/esm/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.js.map +1 -0
- package/dist/esm/forms/fields/for_resolveFieldBinding/when_resolving_a_field_binding.js +4 -0
- package/dist/esm/forms/fields/for_resolveFieldBinding/when_resolving_a_field_binding.js.map +1 -1
- package/dist/esm/forms/for_SceneQueryInputForm/ProjectLookup.d.ts +26 -0
- package/dist/esm/forms/for_SceneQueryInputForm/ProjectLookup.d.ts.map +1 -0
- package/dist/esm/forms/for_SceneQueryInputForm/ProjectLookup.js +44 -0
- package/dist/esm/forms/for_SceneQueryInputForm/ProjectLookup.js.map +1 -0
- package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.d.ts +2 -0
- package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.d.ts.map +1 -0
- package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.js +175 -0
- package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.js.map +1 -0
- package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_native_queries.d.ts +2 -0
- package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_native_queries.d.ts.map +1 -0
- package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_native_queries.js +413 -0
- package/dist/esm/forms/for_SceneQueryInputForm/when_submitting_native_queries.js.map +1 -0
- package/dist/esm/forms/index.d.ts +2 -0
- package/dist/esm/forms/index.d.ts.map +1 -1
- package/dist/esm/forms/index.js +1 -0
- package/dist/esm/forms/index.js.map +1 -1
- package/dist/esm/forms/queryInputs.d.ts +10 -0
- package/dist/esm/forms/queryInputs.d.ts.map +1 -0
- package/dist/esm/forms/queryInputs.js +47 -0
- package/dist/esm/forms/queryInputs.js.map +1 -0
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/pages/SceneDataPage.js +1 -1
- package/dist/esm/pages/SceneDataPage.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/for_cratisComponentsPackage/when_describing_query_input_form.ts +17 -0
- package/for_cratisComponentsPackage/when_describing_single_result.ts +20 -0
- package/forms/SceneQueryInputForm.tsx +79 -0
- package/forms/fields/SceneRadioButtonField.tsx +4 -1
- package/forms/fields/for_SceneRadioButtonField/when_mapping_the_group_name.tsx +45 -0
- package/forms/fields/for_resolveFieldBinding/when_resolving_a_field_binding.ts +6 -0
- package/forms/for_SceneQueryInputForm/ProjectLookup.ts +54 -0
- package/forms/for_SceneQueryInputForm/when_submitting_generated_guid_parameters.tsx +188 -0
- package/forms/for_SceneQueryInputForm/when_submitting_native_queries.tsx +423 -0
- package/forms/index.ts +2 -0
- package/forms/queryInputs.ts +50 -0
- package/package.json +23 -7
- package/pages/SceneDataPage.tsx +1 -1
|
@@ -4,6 +4,40 @@
|
|
|
4
4
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
5
|
const queries = new Map();
|
|
6
6
|
const commands = new Map();
|
|
7
|
+
// Opt-in identities are separate from the legacy last-registration-wins namespace.
|
|
8
|
+
const queryIdentities = new Map();
|
|
9
|
+
const queryBindingListeners = new Set();
|
|
10
|
+
function notifyQueryBindings() {
|
|
11
|
+
for (const listener of queryBindingListeners)listener();
|
|
12
|
+
}
|
|
13
|
+
/** Subscribe to exact-binding changes. Existing adapters retain their render-time lookup contract. */ function subscribeQueryBindings(listener) {
|
|
14
|
+
queryBindingListeners.add(listener);
|
|
15
|
+
return ()=>{
|
|
16
|
+
queryBindingListeners.delete(listener);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Registers one source identity for an exact query name. The same identity replaces on hot reload;
|
|
21
|
+
* different identities remain distinct candidates, even when their constructors happen to match.
|
|
22
|
+
* Legacy resolution also accepts a unique identity when no legacy registration exists.
|
|
23
|
+
*/ function registerQueryIdentity(name, identity, queryClass) {
|
|
24
|
+
const candidates = queryIdentities.get(name) ?? new Map();
|
|
25
|
+
candidates.set(identity, queryClass);
|
|
26
|
+
queryIdentities.set(name, candidates);
|
|
27
|
+
notifyQueryBindings();
|
|
28
|
+
}
|
|
29
|
+
/** Removes a source identity when a generated module is removed or renamed. */ function unregisterQueryIdentity(name, identity) {
|
|
30
|
+
const candidates = queryIdentities.get(name);
|
|
31
|
+
candidates?.delete(identity);
|
|
32
|
+
if (candidates?.size === 0) queryIdentities.delete(name);
|
|
33
|
+
notifyQueryBindings();
|
|
34
|
+
}
|
|
35
|
+
/** Exact binding: a legacy registration counts as one candidate alongside opt-in identities. */ function resolveExactQuery(name) {
|
|
36
|
+
const legacy = queries.get(name);
|
|
37
|
+
const candidates = queryIdentities.get(name);
|
|
38
|
+
if ((legacy ? 1 : 0) + (candidates?.size ?? 0) > 1) return 'ambiguous';
|
|
39
|
+
return legacy ?? candidates?.values().next().value;
|
|
40
|
+
}
|
|
7
41
|
/**
|
|
8
42
|
* Registers an Arc query proxy under the name screens refer to it by.
|
|
9
43
|
*
|
|
@@ -21,6 +55,7 @@ const commands = new Map();
|
|
|
21
55
|
* the previous run.
|
|
22
56
|
*/ function registerQuery(name, queryClass) {
|
|
23
57
|
queries.set(name, queryClass);
|
|
58
|
+
notifyQueryBindings();
|
|
24
59
|
}
|
|
25
60
|
/**
|
|
26
61
|
* Registers several query proxies at once, keyed by the name screens refer to each by.
|
|
@@ -34,13 +69,17 @@ const commands = new Map();
|
|
|
34
69
|
}
|
|
35
70
|
}
|
|
36
71
|
/**
|
|
37
|
-
*
|
|
72
|
+
* Legacy registrations are authoritative. Otherwise resolve a unique source identity, or `undefined`
|
|
73
|
+
* when absent or ambiguous (existing adapters display their unresolved-binding placeholder).
|
|
38
74
|
*
|
|
39
75
|
* `undefined` rather than a throw: design-time preview in Studio normally has nothing registered at all,
|
|
40
76
|
* and a screen still has to render so its layout can be worked on. Every adapter turns `undefined` into
|
|
41
77
|
* a visible placeholder naming the binding it wanted.
|
|
42
78
|
*/ function resolveQuery(name) {
|
|
43
|
-
|
|
79
|
+
const legacy = queries.get(name);
|
|
80
|
+
if (legacy) return legacy;
|
|
81
|
+
const candidates = queryIdentities.get(name);
|
|
82
|
+
return candidates?.size === 1 ? candidates.values().next().value : undefined;
|
|
44
83
|
}
|
|
45
84
|
/**
|
|
46
85
|
* Registers an Arc command proxy under the name screens refer to it by. The command half of
|
|
@@ -61,14 +100,17 @@ const commands = new Map();
|
|
|
61
100
|
return commands.get(name);
|
|
62
101
|
}
|
|
63
102
|
/**
|
|
64
|
-
*
|
|
103
|
+
* The sorted union of legacy and identity query names, including ambiguous names.
|
|
65
104
|
*
|
|
66
105
|
* A design-time tool uses this to offer the names a screen can actually bind to, and a diagnostics
|
|
67
106
|
* surface uses it to explain a placeholder - "this screen wants `AllInvoices`, and here is what is
|
|
68
107
|
* registered" is a far more useful message than the placeholder alone.
|
|
69
108
|
*/ function registeredQueryNames() {
|
|
70
109
|
return [
|
|
71
|
-
...
|
|
110
|
+
...new Set([
|
|
111
|
+
...queries.keys(),
|
|
112
|
+
...queryIdentities.keys()
|
|
113
|
+
])
|
|
72
114
|
].sort();
|
|
73
115
|
}
|
|
74
116
|
/**
|
|
@@ -87,6 +129,8 @@ const commands = new Map();
|
|
|
87
129
|
*/ function clearBindings() {
|
|
88
130
|
queries.clear();
|
|
89
131
|
commands.clear();
|
|
132
|
+
queryIdentities.clear();
|
|
133
|
+
notifyQueryBindings();
|
|
90
134
|
}
|
|
91
135
|
|
|
92
136
|
exports.clearBindings = clearBindings;
|
|
@@ -94,8 +138,12 @@ exports.registerCommand = registerCommand;
|
|
|
94
138
|
exports.registerCommands = registerCommands;
|
|
95
139
|
exports.registerQueries = registerQueries;
|
|
96
140
|
exports.registerQuery = registerQuery;
|
|
141
|
+
exports.registerQueryIdentity = registerQueryIdentity;
|
|
97
142
|
exports.registeredCommandNames = registeredCommandNames;
|
|
98
143
|
exports.registeredQueryNames = registeredQueryNames;
|
|
99
144
|
exports.resolveCommand = resolveCommand;
|
|
145
|
+
exports.resolveExactQuery = resolveExactQuery;
|
|
100
146
|
exports.resolveQuery = resolveQuery;
|
|
147
|
+
exports.subscribeQueryBindings = subscribeQueryBindings;
|
|
148
|
+
exports.unregisterQueryIdentity = unregisterQueryIdentity;
|
|
101
149
|
//# sourceMappingURL=bindingRegistry.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bindingRegistry.js","sources":["../../../bindings/bindingRegistry.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 { BoundConstructor } from './BoundConstructor';\n\nconst queries = new Map<string, BoundConstructor>();\nconst commands = new Map<string, BoundConstructor>();\n\n/**\n * Registers an Arc query proxy under the name screens refer to it by.\n *\n * This is the seam that makes the Arc-bound half of `@cratis/components` usable from Scene at all. A\n * screen says `data Invoices via query AllInvoices`, and by the time that reaches a renderer it is an\n * `ExternalComponent` whose `properties` bag holds the *string* `'AllInvoices'` - a property bag carries\n * plain values and named slots, and there is no way to put a TypeScript class into one. `DataTableForQuery`\n * needs the class. The name is the only thing that survives the trip, so the name is what the lookup has\n * to be keyed on, and a host that owns the generated proxies is the only party that can supply the class\n * behind it.\n *\n * A host - Stage's generated application, or Studio's preview when it is wired to a real backend -\n * registers every proxy a screen can name, once, during startup. Registering the same name twice\n * replaces the earlier registration, so a host can re-register on hot reload without having to unwind\n * the previous run.\n */\nexport function registerQuery(name: string, queryClass: BoundConstructor): void {\n queries.set(name, queryClass);\n}\n\n/**\n * Registers several query proxies at once, keyed by the name screens refer to each by.\n *\n * Stage generates a module that exports every proxy it produced; handing that module's exports straight\n * to this is the whole of a generated host's registration step, and it stays correct as proxies are\n * added and removed without anyone editing a list.\n */\nexport function registerQueries(bindings: Record<string, BoundConstructor>): void {\n for (const [name, queryClass] of Object.entries(bindings)) {\n registerQuery(name, queryClass);\n }\n}\n\n/**\n * The query proxy registered under a name, or `undefined` when nothing is registered under it.\n *\n * `undefined` rather than a throw: design-time preview in Studio normally has nothing registered at all,\n * and a screen still has to render so its layout can be worked on. Every adapter turns `undefined` into\n * a visible placeholder naming the binding it wanted.\n */\nexport function resolveQuery(name: string): BoundConstructor | undefined {\n return queries.get(name);\n}\n\n/**\n * Registers an Arc command proxy under the name screens refer to it by. The command half of\n * {@link registerQuery}, with the same contract.\n */\nexport function registerCommand(name: string, commandClass: BoundConstructor): void {\n commands.set(name, commandClass);\n}\n\n/**\n * Registers several command proxies at once, keyed by the name screens refer to each by.\n */\nexport function registerCommands(bindings: Record<string, BoundConstructor>): void {\n for (const [name, commandClass] of Object.entries(bindings)) {\n registerCommand(name, commandClass);\n }\n}\n\n/**\n * The command proxy registered under a name, or `undefined` when nothing is registered under it.\n */\nexport function resolveCommand(name: string): BoundConstructor | undefined {\n return commands.get(name);\n}\n\n/**\n * Every registered query name, sorted.\n *\n * A design-time tool uses this to offer the names a screen can actually bind to, and a diagnostics\n * surface uses it to explain a placeholder - \"this screen wants `AllInvoices`, and here is what is\n * registered\" is a far more useful message than the placeholder alone.\n */\nexport function registeredQueryNames(): string[] {\n return [...queries.keys()].sort();\n}\n\n/**\n * Every registered command name, sorted.\n */\nexport function registeredCommandNames(): string[] {\n return [...commands.keys()].sort();\n}\n\n/**\n * Forgets every registered query and command.\n *\n * The registry is module-level state, which is right for a host that registers once at startup but wrong\n * for anything that switches between applications - Studio previewing a different project, or a spec\n * that must not inherit what the previous one registered. Both need a way back to empty.\n */\nexport function clearBindings(): void {\n queries.clear();\n commands.clear();\n}\n"],"names":["queries","Map","commands","registerQuery","name","queryClass","set","registerQueries","bindings","Object","entries","resolveQuery","get","registerCommand","commandClass","registerCommands","resolveCommand","registeredQueryNames","keys","sort","registeredCommandNames","clearBindings","clear"],"mappings":";;AAAA;AACA;AAIA,MAAMA,UAAU,IAAIC,GAAAA,EAAAA;AACpB,MAAMC,WAAW,IAAID,GAAAA,EAAAA;AAErB;;;;;;;;;;;;;;;AAeC,IACM,SAASE,aAAAA,CAAcC,IAAY,EAAEC,UAA4B,EAAA;IACpEL,OAAAA,CAAQM,GAAG,CAACF,IAAAA,EAAMC,UAAAA,CAAAA;AACtB;AAEA;;;;;;IAOO,SAASE,eAAAA,CAAgBC,QAA0C,EAAA;IACtE,KAAK,MAAM,CAACJ,IAAAA,EAAMC,UAAAA,CAAW,IAAII,MAAAA,CAAOC,OAAO,CAACF,QAAAA,CAAAA,CAAW;AACvDL,QAAAA,aAAAA,CAAcC,IAAAA,EAAMC,UAAAA,CAAAA;AACxB,IAAA;AACJ;AAEA;;;;;;IAOO,SAASM,YAAAA,CAAaP,IAAY,EAAA;IACrC,OAAOJ,OAAAA,CAAQY,GAAG,CAACR,IAAAA,CAAAA;AACvB;AAEA;;;AAGC,IACM,SAASS,eAAAA,CAAgBT,IAAY,EAAEU,YAA8B,EAAA;IACxEZ,QAAAA,CAASI,GAAG,CAACF,IAAAA,EAAMU,YAAAA,CAAAA;AACvB;AAEA;;IAGO,SAASC,gBAAAA,CAAiBP,QAA0C,EAAA;IACvE,KAAK,MAAM,CAACJ,IAAAA,EAAMU,YAAAA,CAAa,IAAIL,MAAAA,CAAOC,OAAO,CAACF,QAAAA,CAAAA,CAAW;AACzDK,QAAAA,eAAAA,CAAgBT,IAAAA,EAAMU,YAAAA,CAAAA;AAC1B,IAAA;AACJ;AAEA;;IAGO,SAASE,cAAAA,CAAeZ,IAAY,EAAA;IACvC,OAAOF,QAAAA,CAASU,GAAG,CAACR,IAAAA,CAAAA;AACxB;AAEA;;;;;;AAMC,IACM,SAASa,oBAAAA,GAAAA;IACZ,OAAO;AAAIjB,QAAAA,GAAAA,OAAAA,CAAQkB,IAAI;AAAG,KAAA,CAACC,IAAI,EAAA;AACnC;AAEA;;AAEC,IACM,SAASC,sBAAAA,GAAAA;IACZ,OAAO;AAAIlB,QAAAA,GAAAA,QAAAA,CAASgB,IAAI;AAAG,KAAA,CAACC,IAAI,EAAA;AACpC;AAEA;;;;;;AAMC,IACM,SAASE,aAAAA,GAAAA;AACZrB,IAAAA,OAAAA,CAAQsB,KAAK,EAAA;AACbpB,IAAAA,QAAAA,CAASoB,KAAK,EAAA;AAClB;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"bindingRegistry.js","sources":["../../../bindings/bindingRegistry.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 { BoundConstructor } from './BoundConstructor';\n\nconst queries = new Map<string, BoundConstructor>();\nconst commands = new Map<string, BoundConstructor>();\n// Opt-in identities are separate from the legacy last-registration-wins namespace.\nconst queryIdentities = new Map<string, Map<string, BoundConstructor>>();\nconst queryBindingListeners = new Set<() => void>();\n\nfunction notifyQueryBindings(): void {\n for (const listener of queryBindingListeners) listener();\n}\n\n/** Subscribe to exact-binding changes. Existing adapters retain their render-time lookup contract. */\nexport function subscribeQueryBindings(listener: () => void): () => void {\n queryBindingListeners.add(listener);\n return () => { queryBindingListeners.delete(listener); };\n}\n\n/**\n * Registers one source identity for an exact query name. The same identity replaces on hot reload;\n * different identities remain distinct candidates, even when their constructors happen to match.\n * Legacy resolution also accepts a unique identity when no legacy registration exists.\n */\nexport function registerQueryIdentity(name: string, identity: string, queryClass: BoundConstructor): void {\n const candidates = queryIdentities.get(name) ?? new Map<string, BoundConstructor>();\n candidates.set(identity, queryClass);\n queryIdentities.set(name, candidates);\n notifyQueryBindings();\n}\n\n/** Removes a source identity when a generated module is removed or renamed. */\nexport function unregisterQueryIdentity(name: string, identity: string): void {\n const candidates = queryIdentities.get(name);\n candidates?.delete(identity);\n if (candidates?.size === 0) queryIdentities.delete(name);\n notifyQueryBindings();\n}\n\n/** Exact binding: a legacy registration counts as one candidate alongside opt-in identities. */\nexport function resolveExactQuery(name: string): BoundConstructor | 'ambiguous' | undefined {\n const legacy = queries.get(name);\n const candidates = queryIdentities.get(name);\n if ((legacy ? 1 : 0) + (candidates?.size ?? 0) > 1) return 'ambiguous';\n return legacy ?? candidates?.values().next().value;\n}\n\n/**\n * Registers an Arc query proxy under the name screens refer to it by.\n *\n * This is the seam that makes the Arc-bound half of `@cratis/components` usable from Scene at all. A\n * screen says `data Invoices via query AllInvoices`, and by the time that reaches a renderer it is an\n * `ExternalComponent` whose `properties` bag holds the *string* `'AllInvoices'` - a property bag carries\n * plain values and named slots, and there is no way to put a TypeScript class into one. `DataTableForQuery`\n * needs the class. The name is the only thing that survives the trip, so the name is what the lookup has\n * to be keyed on, and a host that owns the generated proxies is the only party that can supply the class\n * behind it.\n *\n * A host - Stage's generated application, or Studio's preview when it is wired to a real backend -\n * registers every proxy a screen can name, once, during startup. Registering the same name twice\n * replaces the earlier registration, so a host can re-register on hot reload without having to unwind\n * the previous run.\n */\nexport function registerQuery(name: string, queryClass: BoundConstructor): void {\n queries.set(name, queryClass);\n notifyQueryBindings();\n}\n\n/**\n * Registers several query proxies at once, keyed by the name screens refer to each by.\n *\n * Stage generates a module that exports every proxy it produced; handing that module's exports straight\n * to this is the whole of a generated host's registration step, and it stays correct as proxies are\n * added and removed without anyone editing a list.\n */\nexport function registerQueries(bindings: Record<string, BoundConstructor>): void {\n for (const [name, queryClass] of Object.entries(bindings)) {\n registerQuery(name, queryClass);\n }\n}\n\n/**\n * Legacy registrations are authoritative. Otherwise resolve a unique source identity, or `undefined`\n * when absent or ambiguous (existing adapters display their unresolved-binding placeholder).\n *\n * `undefined` rather than a throw: design-time preview in Studio normally has nothing registered at all,\n * and a screen still has to render so its layout can be worked on. Every adapter turns `undefined` into\n * a visible placeholder naming the binding it wanted.\n */\nexport function resolveQuery(name: string): BoundConstructor | undefined {\n const legacy = queries.get(name);\n if (legacy) return legacy;\n const candidates = queryIdentities.get(name);\n return candidates?.size === 1 ? candidates.values().next().value : undefined;\n}\n\n/**\n * Registers an Arc command proxy under the name screens refer to it by. The command half of\n * {@link registerQuery}, with the same contract.\n */\nexport function registerCommand(name: string, commandClass: BoundConstructor): void {\n commands.set(name, commandClass);\n}\n\n/**\n * Registers several command proxies at once, keyed by the name screens refer to each by.\n */\nexport function registerCommands(bindings: Record<string, BoundConstructor>): void {\n for (const [name, commandClass] of Object.entries(bindings)) {\n registerCommand(name, commandClass);\n }\n}\n\n/**\n * The command proxy registered under a name, or `undefined` when nothing is registered under it.\n */\nexport function resolveCommand(name: string): BoundConstructor | undefined {\n return commands.get(name);\n}\n\n/**\n * The sorted union of legacy and identity query names, including ambiguous names.\n *\n * A design-time tool uses this to offer the names a screen can actually bind to, and a diagnostics\n * surface uses it to explain a placeholder - \"this screen wants `AllInvoices`, and here is what is\n * registered\" is a far more useful message than the placeholder alone.\n */\nexport function registeredQueryNames(): string[] {\n return [...new Set([...queries.keys(), ...queryIdentities.keys()])].sort();\n}\n\n/**\n * Every registered command name, sorted.\n */\nexport function registeredCommandNames(): string[] {\n return [...commands.keys()].sort();\n}\n\n/**\n * Forgets every registered query and command.\n *\n * The registry is module-level state, which is right for a host that registers once at startup but wrong\n * for anything that switches between applications - Studio previewing a different project, or a spec\n * that must not inherit what the previous one registered. Both need a way back to empty.\n */\nexport function clearBindings(): void {\n queries.clear();\n commands.clear();\n queryIdentities.clear();\n notifyQueryBindings();\n}\n"],"names":["queries","Map","commands","queryIdentities","queryBindingListeners","Set","notifyQueryBindings","listener","subscribeQueryBindings","add","delete","registerQueryIdentity","name","identity","queryClass","candidates","get","set","unregisterQueryIdentity","size","resolveExactQuery","legacy","values","next","value","registerQuery","registerQueries","bindings","Object","entries","resolveQuery","undefined","registerCommand","commandClass","registerCommands","resolveCommand","registeredQueryNames","keys","sort","registeredCommandNames","clearBindings","clear"],"mappings":";;AAAA;AACA;AAIA,MAAMA,UAAU,IAAIC,GAAAA,EAAAA;AACpB,MAAMC,WAAW,IAAID,GAAAA,EAAAA;AACrB;AACA,MAAME,kBAAkB,IAAIF,GAAAA,EAAAA;AAC5B,MAAMG,wBAAwB,IAAIC,GAAAA,EAAAA;AAElC,SAASC,mBAAAA,GAAAA;IACL,KAAK,MAAMC,YAAYH,qBAAAA,CAAuBG,QAAAA,EAAAA;AAClD;AAEA,uGACO,SAASC,sBAAAA,CAAuBD,QAAoB,EAAA;AACvDH,IAAAA,qBAAAA,CAAsBK,GAAG,CAACF,QAAAA,CAAAA;IAC1B,OAAO,IAAA;AAAQH,QAAAA,qBAAAA,CAAsBM,MAAM,CAACH,QAAAA,CAAAA;AAAW,IAAA,CAAA;AAC3D;AA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A,GAAAA,OAAAA,CAAQqC,IAAI,EAAA;AAAOlC,YAAAA,GAAAA,eAAAA,CAAgBkC,IAAI;AAAG,SAAA;AAAE,KAAA,CAACC,IAAI,EAAA;AAC5E;AAEA;;AAEC,IACM,SAASC,sBAAAA,GAAAA;IACZ,OAAO;AAAIrC,QAAAA,GAAAA,QAAAA,CAASmC,IAAI;AAAG,KAAA,CAACC,IAAI,EAAA;AACpC;AAEA;;;;;;AAMC,IACM,SAASE,aAAAA,GAAAA;AACZxC,IAAAA,OAAAA,CAAQyC,KAAK,EAAA;AACbvC,IAAAA,QAAAA,CAASuC,KAAK,EAAA;AACdtC,IAAAA,eAAAA,CAAgBsC,KAAK,EAAA;AACrBnC,IAAAA,mBAAAA,EAAAA;AACJ;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/**
|
|
6
|
+
* Bridge for the generated, zero-argument Arc proxies consumed by Components. The registry remains
|
|
7
|
+
* open to arbitrary constructors; only mounting an Arc adapter requires this narrower contract.
|
|
8
|
+
* Check inheritance without constructing a proxy (constructors can have side effects).
|
|
9
|
+
*
|
|
10
|
+
* This is not structural interface validation: the host still owns the generated subclass's data,
|
|
11
|
+
* argument and implementation correctness. Prototype identity deliberately rejects duck-typed proxies
|
|
12
|
+
* and proxies from a second Arc installation. The arity check enforces the generated convention,
|
|
13
|
+
* not general JavaScript constructor safety (defaults/rest parameters can hide requirements).
|
|
14
|
+
* The single assertion bridges the registry under that host-owned generated-proxy contract; it is
|
|
15
|
+
* not a proof of arbitrary subclass behavior or of erased row/argument types.
|
|
16
|
+
*/ function requireArcProxy(target, base, kind) {
|
|
17
|
+
const prototype = target.prototype;
|
|
18
|
+
if (target.length !== 0 || typeof prototype !== 'object' || prototype === null || !Object.prototype.isPrototypeOf.call(base.prototype, prototype)) {
|
|
19
|
+
throw new Error(`Invalid ${kind} binding '${target.name}': expected a zero-argument Arc ${kind} proxy`);
|
|
20
|
+
}
|
|
21
|
+
return target;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
exports.requireArcProxy = requireArcProxy;
|
|
25
|
+
//# sourceMappingURL=requireArcProxy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"requireArcProxy.js","sources":["../../../bindings/requireArcProxy.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 type { BoundConstructor } from './BoundConstructor';\n\n/**\n * Bridge for the generated, zero-argument Arc proxies consumed by Components. The registry remains\n * open to arbitrary constructors; only mounting an Arc adapter requires this narrower contract.\n * Check inheritance without constructing a proxy (constructors can have side effects).\n *\n * This is not structural interface validation: the host still owns the generated subclass's data,\n * argument and implementation correctness. Prototype identity deliberately rejects duck-typed proxies\n * and proxies from a second Arc installation. The arity check enforces the generated convention,\n * not general JavaScript constructor safety (defaults/rest parameters can hide requirements).\n * The single assertion bridges the registry under that host-owned generated-proxy contract; it is\n * not a proof of arbitrary subclass behavior or of erased row/argument types.\n */\nexport function requireArcProxy<T extends object>(target: BoundConstructor, base: { prototype: T }, kind: string): new () => T {\n const prototype: unknown = target.prototype;\n if (target.length !== 0 || typeof prototype !== 'object' || prototype === null || !Object.prototype.isPrototypeOf.call(base.prototype, prototype)) {\n throw new Error(`Invalid ${kind} binding '${target.name}': expected a zero-argument Arc ${kind} proxy`);\n }\n return target as new () => T;\n}\n"],"names":["requireArcProxy","target","base","kind","prototype","length","Object","isPrototypeOf","call","Error","name"],"mappings":";;AAAA;AACA;AAIA;;;;;;;;;;;AAWC,IACM,SAASA,eAAAA,CAAkCC,MAAwB,EAAEC,IAAsB,EAAEC,IAAY,EAAA;IAC5G,MAAMC,SAAAA,GAAqBH,OAAOG,SAAS;IAC3C,IAAIH,MAAAA,CAAOI,MAAM,KAAK,CAAA,IAAK,OAAOD,SAAAA,KAAc,QAAA,IAAYA,cAAc,IAAA,IAAQ,CAACE,OAAOF,SAAS,CAACG,aAAa,CAACC,IAAI,CAACN,IAAAA,CAAKE,SAAS,EAAEA,SAAAA,CAAAA,EAAY;AAC/I,QAAA,MAAM,IAAIK,KAAAA,CAAM,CAAC,QAAQ,EAAEN,IAAAA,CAAK,UAAU,EAAEF,MAAAA,CAAOS,IAAI,CAAC,gCAAgC,EAAEP,IAAAA,CAAK,MAAM,CAAC,CAAA;AAC1G,IAAA;IACA,OAAOF,MAAAA;AACX;;"}
|
|
@@ -4,9 +4,11 @@ var scene_react = require('@cratis/scene.react');
|
|
|
4
4
|
var ScenePage = require('./pages/ScenePage.js');
|
|
5
5
|
var SceneDataPage = require('./pages/SceneDataPage.js');
|
|
6
6
|
var SceneFormElement = require('./pages/SceneFormElement.js');
|
|
7
|
+
var SceneSingleResult = require('./data/SceneSingleResult.js');
|
|
7
8
|
var SceneDataTable = require('./data/SceneDataTable.js');
|
|
8
9
|
var SceneObservableDataTable = require('./data/SceneObservableDataTable.js');
|
|
9
10
|
var SceneCommandForm = require('./forms/SceneCommandForm.js');
|
|
11
|
+
var SceneQueryInputForm = require('./forms/SceneQueryInputForm.js');
|
|
10
12
|
require('react/jsx-runtime');
|
|
11
13
|
require('./bindings/resolveElementBinding.js');
|
|
12
14
|
require('react');
|
|
@@ -65,9 +67,11 @@ var SceneToolbarSeparator = require('./toolbar/SceneToolbarSeparator.js');
|
|
|
65
67
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'page')]: ScenePage.ScenePage,
|
|
66
68
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'dataPage')]: SceneDataPage.SceneDataPage,
|
|
67
69
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'formElement')]: SceneFormElement.SceneFormElement,
|
|
70
|
+
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'singleResult')]: SceneSingleResult.SceneSingleResult,
|
|
68
71
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'dataTable')]: SceneDataTable.SceneDataTable,
|
|
69
72
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'table')]: SceneDataTable.SceneDataTable,
|
|
70
73
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'observableDataTable')]: SceneObservableDataTable.SceneObservableDataTable,
|
|
74
|
+
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'queryInputForm')]: SceneQueryInputForm.SceneQueryInputForm,
|
|
71
75
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'commandForm')]: SceneCommandForm.SceneCommandForm,
|
|
72
76
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'inputTextField')]: SceneInputTextField.SceneInputTextField,
|
|
73
77
|
[scene_react.componentRegistryKey(cratisComponentsPackageName, 'numberField')]: SceneNumberField.SceneNumberField,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cratisComponents.js","sources":["../../cratisComponents.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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';\nimport { SceneDataPage, SceneFormElement, ScenePage } from './pages';\nimport { SceneDataTable, SceneObservableDataTable } from './data';\nimport {\n SceneCalendarField,\n SceneCheckboxField,\n SceneChipsField,\n SceneColorPickerField,\n SceneCommandForm,\n SceneDropdownField,\n SceneInputTextField,\n SceneMultiSelectField,\n SceneNumberField,\n SceneRadioButtonField,\n SceneRadioGroupField,\n SceneSliderField,\n SceneTextAreaField,\n} from './forms';\nimport { SceneBusyIndicatorDialog, SceneCommandDialog, SceneConfirmationDialog, SceneDialog, SceneStepperCommandDialog } from './dialogs';\nimport { SceneDropdown, SceneErrorBoundary, SceneIcon, SceneTooltip } from './common';\nimport { SceneFilterPanel, SceneObjectContentEditor, SceneObjectNavigationalBar, SceneSchemaEditor, SceneTimeMachine } from './editors';\nimport { SceneToolbar, SceneToolbarButton, SceneToolbarGroup, SceneToolbarSeparator } from './toolbar';\n\n/**\n * The package name every component here is registered under, and the one a screen writes when it\n * qualifies a name explicitly (`Cratis.Components.table`).\n */\nexport const cratisComponentsPackageName = 'Cratis.Components';\n\n/**\n * The `Cratis.Components` package's component registry - the abstract names a screen can resolve to a\n * real `@cratis/components` component.\n *\n * Names are `lowerCamelCase` and deliberately *abstract*: a screen names `dataTable`, not\n * `DataTableForQuery`, so the same screen resolves against whichever package a profile ranks highest.\n * Two of them - `table` and `dialog` - are names `core` and `PrimeReact` also declare, and that overlap\n * is the point: a profile listing `core`, `PrimeReact`, `Cratis.Components` in that order resolves both\n * here and records the others as shadowed, which is override priority doing exactly what it exists for.\n *\n * `table` and `dataTable` are the same component under two names. `dataTable` says what it is; `table`\n * is what a screen written against the base vocabulary already says, and both should land on the\n * query-aware implementation.\n */\nexport const cratisComponents: ComponentRegistry = {\n [componentRegistryKey(cratisComponentsPackageName, 'page')]: ScenePage,\n [componentRegistryKey(cratisComponentsPackageName, 'dataPage')]: SceneDataPage,\n [componentRegistryKey(cratisComponentsPackageName, 'formElement')]: SceneFormElement,\n\n [componentRegistryKey(cratisComponentsPackageName, 'dataTable')]: SceneDataTable,\n [componentRegistryKey(cratisComponentsPackageName, 'table')]: SceneDataTable,\n [componentRegistryKey(cratisComponentsPackageName, 'observableDataTable')]: SceneObservableDataTable,\n\n [componentRegistryKey(cratisComponentsPackageName, 'commandForm')]: SceneCommandForm,\n [componentRegistryKey(cratisComponentsPackageName, 'inputTextField')]: SceneInputTextField,\n [componentRegistryKey(cratisComponentsPackageName, 'numberField')]: SceneNumberField,\n [componentRegistryKey(cratisComponentsPackageName, 'checkboxField')]: SceneCheckboxField,\n [componentRegistryKey(cratisComponentsPackageName, 'textAreaField')]: SceneTextAreaField,\n [componentRegistryKey(cratisComponentsPackageName, 'dropdownField')]: SceneDropdownField,\n [componentRegistryKey(cratisComponentsPackageName, 'sliderField')]: SceneSliderField,\n [componentRegistryKey(cratisComponentsPackageName, 'calendarField')]: SceneCalendarField,\n [componentRegistryKey(cratisComponentsPackageName, 'colorPickerField')]: SceneColorPickerField,\n [componentRegistryKey(cratisComponentsPackageName, 'multiSelectField')]: SceneMultiSelectField,\n [componentRegistryKey(cratisComponentsPackageName, 'chipsField')]: SceneChipsField,\n [componentRegistryKey(cratisComponentsPackageName, 'radioButtonField')]: SceneRadioButtonField,\n [componentRegistryKey(cratisComponentsPackageName, 'radioGroupField')]: SceneRadioGroupField,\n\n [componentRegistryKey(cratisComponentsPackageName, 'dialog')]: SceneDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'confirmationDialog')]: SceneConfirmationDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'busyIndicatorDialog')]: SceneBusyIndicatorDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'commandDialog')]: SceneCommandDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'stepperCommandDialog')]: SceneStepperCommandDialog,\n\n [componentRegistryKey(cratisComponentsPackageName, 'icon')]: SceneIcon,\n [componentRegistryKey(cratisComponentsPackageName, 'tooltip')]: SceneTooltip,\n [componentRegistryKey(cratisComponentsPackageName, 'dropdown')]: SceneDropdown,\n [componentRegistryKey(cratisComponentsPackageName, 'errorBoundary')]: SceneErrorBoundary,\n\n [componentRegistryKey(cratisComponentsPackageName, 'objectContentEditor')]: SceneObjectContentEditor,\n [componentRegistryKey(cratisComponentsPackageName, 'objectNavigationalBar')]: SceneObjectNavigationalBar,\n [componentRegistryKey(cratisComponentsPackageName, 'schemaEditor')]: SceneSchemaEditor,\n [componentRegistryKey(cratisComponentsPackageName, 'timeMachine')]: SceneTimeMachine,\n [componentRegistryKey(cratisComponentsPackageName, 'filterPanel')]: SceneFilterPanel,\n\n [componentRegistryKey(cratisComponentsPackageName, 'toolbar')]: SceneToolbar,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarButton')]: SceneToolbarButton,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarGroup')]: SceneToolbarGroup,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarSeparator')]: SceneToolbarSeparator,\n};\n"],"names":["cratisComponentsPackageName","cratisComponents","componentRegistryKey","ScenePage","SceneDataPage","SceneFormElement","SceneDataTable","SceneObservableDataTable","SceneCommandForm","SceneInputTextField","SceneNumberField","SceneCheckboxField","SceneTextAreaField","SceneDropdownField","SceneSliderField","SceneCalendarField","SceneColorPickerField","SceneMultiSelectField","SceneChipsField","SceneRadioButtonField","SceneRadioGroupField","SceneDialog","SceneConfirmationDialog","SceneBusyIndicatorDialog","SceneCommandDialog","SceneStepperCommandDialog","SceneIcon","SceneTooltip","SceneDropdown","SceneErrorBoundary","SceneObjectContentEditor","SceneObjectNavigationalBar","SceneSchemaEditor","SceneTimeMachine","SceneFilterPanel","SceneToolbar","SceneToolbarButton","SceneToolbarGroup","SceneToolbarSeparator"],"mappings":"
|
|
1
|
+
{"version":3,"file":"cratisComponents.js","sources":["../../cratisComponents.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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';\nimport { SceneDataPage, SceneFormElement, ScenePage } from './pages';\nimport { SceneDataTable, SceneObservableDataTable, SceneSingleResult } from './data';\nimport {\n SceneCalendarField,\n SceneCheckboxField,\n SceneChipsField,\n SceneColorPickerField,\n SceneCommandForm,\n SceneQueryInputForm,\n SceneDropdownField,\n SceneInputTextField,\n SceneMultiSelectField,\n SceneNumberField,\n SceneRadioButtonField,\n SceneRadioGroupField,\n SceneSliderField,\n SceneTextAreaField,\n} from './forms';\nimport { SceneBusyIndicatorDialog, SceneCommandDialog, SceneConfirmationDialog, SceneDialog, SceneStepperCommandDialog } from './dialogs';\nimport { SceneDropdown, SceneErrorBoundary, SceneIcon, SceneTooltip } from './common';\nimport { SceneFilterPanel, SceneObjectContentEditor, SceneObjectNavigationalBar, SceneSchemaEditor, SceneTimeMachine } from './editors';\nimport { SceneToolbar, SceneToolbarButton, SceneToolbarGroup, SceneToolbarSeparator } from './toolbar';\n\n/**\n * The package name every component here is registered under, and the one a screen writes when it\n * qualifies a name explicitly (`Cratis.Components.table`).\n */\nexport const cratisComponentsPackageName = 'Cratis.Components';\n\n/**\n * The `Cratis.Components` package's component registry - the abstract names a screen can resolve to a\n * real `@cratis/components` component.\n *\n * Names are `lowerCamelCase` and deliberately *abstract*: a screen names `dataTable`, not\n * `DataTableForQuery`, so the same screen resolves against whichever package a profile ranks highest.\n * Two of them - `table` and `dialog` - are names `core` and `PrimeReact` also declare, and that overlap\n * is the point: a profile listing `core`, `PrimeReact`, `Cratis.Components` in that order resolves both\n * here and records the others as shadowed, which is override priority doing exactly what it exists for.\n *\n * `table` and `dataTable` are the same component under two names. `dataTable` says what it is; `table`\n * is what a screen written against the base vocabulary already says, and both should land on the\n * query-aware implementation.\n */\nexport const cratisComponents: ComponentRegistry = {\n [componentRegistryKey(cratisComponentsPackageName, 'page')]: ScenePage,\n [componentRegistryKey(cratisComponentsPackageName, 'dataPage')]: SceneDataPage,\n [componentRegistryKey(cratisComponentsPackageName, 'formElement')]: SceneFormElement,\n\n [componentRegistryKey(cratisComponentsPackageName, 'singleResult')]: SceneSingleResult,\n [componentRegistryKey(cratisComponentsPackageName, 'dataTable')]: SceneDataTable,\n [componentRegistryKey(cratisComponentsPackageName, 'table')]: SceneDataTable,\n [componentRegistryKey(cratisComponentsPackageName, 'observableDataTable')]: SceneObservableDataTable,\n\n [componentRegistryKey(cratisComponentsPackageName, 'queryInputForm')]: SceneQueryInputForm,\n [componentRegistryKey(cratisComponentsPackageName, 'commandForm')]: SceneCommandForm,\n [componentRegistryKey(cratisComponentsPackageName, 'inputTextField')]: SceneInputTextField,\n [componentRegistryKey(cratisComponentsPackageName, 'numberField')]: SceneNumberField,\n [componentRegistryKey(cratisComponentsPackageName, 'checkboxField')]: SceneCheckboxField,\n [componentRegistryKey(cratisComponentsPackageName, 'textAreaField')]: SceneTextAreaField,\n [componentRegistryKey(cratisComponentsPackageName, 'dropdownField')]: SceneDropdownField,\n [componentRegistryKey(cratisComponentsPackageName, 'sliderField')]: SceneSliderField,\n [componentRegistryKey(cratisComponentsPackageName, 'calendarField')]: SceneCalendarField,\n [componentRegistryKey(cratisComponentsPackageName, 'colorPickerField')]: SceneColorPickerField,\n [componentRegistryKey(cratisComponentsPackageName, 'multiSelectField')]: SceneMultiSelectField,\n [componentRegistryKey(cratisComponentsPackageName, 'chipsField')]: SceneChipsField,\n [componentRegistryKey(cratisComponentsPackageName, 'radioButtonField')]: SceneRadioButtonField,\n [componentRegistryKey(cratisComponentsPackageName, 'radioGroupField')]: SceneRadioGroupField,\n\n [componentRegistryKey(cratisComponentsPackageName, 'dialog')]: SceneDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'confirmationDialog')]: SceneConfirmationDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'busyIndicatorDialog')]: SceneBusyIndicatorDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'commandDialog')]: SceneCommandDialog,\n [componentRegistryKey(cratisComponentsPackageName, 'stepperCommandDialog')]: SceneStepperCommandDialog,\n\n [componentRegistryKey(cratisComponentsPackageName, 'icon')]: SceneIcon,\n [componentRegistryKey(cratisComponentsPackageName, 'tooltip')]: SceneTooltip,\n [componentRegistryKey(cratisComponentsPackageName, 'dropdown')]: SceneDropdown,\n [componentRegistryKey(cratisComponentsPackageName, 'errorBoundary')]: SceneErrorBoundary,\n\n [componentRegistryKey(cratisComponentsPackageName, 'objectContentEditor')]: SceneObjectContentEditor,\n [componentRegistryKey(cratisComponentsPackageName, 'objectNavigationalBar')]: SceneObjectNavigationalBar,\n [componentRegistryKey(cratisComponentsPackageName, 'schemaEditor')]: SceneSchemaEditor,\n [componentRegistryKey(cratisComponentsPackageName, 'timeMachine')]: SceneTimeMachine,\n [componentRegistryKey(cratisComponentsPackageName, 'filterPanel')]: SceneFilterPanel,\n\n [componentRegistryKey(cratisComponentsPackageName, 'toolbar')]: SceneToolbar,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarButton')]: SceneToolbarButton,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarGroup')]: SceneToolbarGroup,\n [componentRegistryKey(cratisComponentsPackageName, 'toolbarSeparator')]: SceneToolbarSeparator,\n};\n"],"names":["cratisComponentsPackageName","cratisComponents","componentRegistryKey","ScenePage","SceneDataPage","SceneFormElement","SceneSingleResult","SceneDataTable","SceneObservableDataTable","SceneQueryInputForm","SceneCommandForm","SceneInputTextField","SceneNumberField","SceneCheckboxField","SceneTextAreaField","SceneDropdownField","SceneSliderField","SceneCalendarField","SceneColorPickerField","SceneMultiSelectField","SceneChipsField","SceneRadioButtonField","SceneRadioGroupField","SceneDialog","SceneConfirmationDialog","SceneBusyIndicatorDialog","SceneCommandDialog","SceneStepperCommandDialog","SceneIcon","SceneTooltip","SceneDropdown","SceneErrorBoundary","SceneObjectContentEditor","SceneObjectNavigationalBar","SceneSchemaEditor","SceneTimeMachine","SceneFilterPanel","SceneToolbar","SceneToolbarButton","SceneToolbarGroup","SceneToolbarSeparator"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AA0BA;;;IAIO,MAAMA,2BAAAA,GAA8B;AAE3C;;;;;;;;;;;;;UAcaC,gBAAAA,GAAsC;IAC/C,CAACC,gCAAAA,CAAqBF,2BAAAA,EAA6B,MAAA,CAAA,GAAUG,mBAAAA;IAC7D,CAACD,gCAAAA,CAAqBF,2BAAAA,EAA6B,UAAA,CAAA,GAAcI,2BAAAA;IACjE,CAACF,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBK,iCAAAA;IAEpE,CAACH,gCAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBM,mCAAAA;IACrE,CAACJ,gCAAAA,CAAqBF,2BAAAA,EAA6B,WAAA,CAAA,GAAeO,6BAAAA;IAClE,CAACL,gCAAAA,CAA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AAkBuC,mCAAAA;IACrE,CAACrC,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBwC;AAC7E;;;"}
|
|
@@ -41,6 +41,8 @@ var cratisComponents = require('./cratisComponents.js');
|
|
|
41
41
|
'page',
|
|
42
42
|
'dataPage',
|
|
43
43
|
'formElement',
|
|
44
|
+
'singleResult',
|
|
45
|
+
'queryInputForm',
|
|
44
46
|
'dataTable',
|
|
45
47
|
'table',
|
|
46
48
|
'observableDataTable',
|
|
@@ -90,7 +92,7 @@ var cratisComponents = require('./cratisComponents.js');
|
|
|
90
92
|
// Shipping a theme here would be this library asserting a look it was specifically built not to have.
|
|
91
93
|
themes: [],
|
|
92
94
|
displayName: 'Cratis Components',
|
|
93
|
-
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.",
|
|
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.",
|
|
94
96
|
module: '@cratis/scene.components',
|
|
95
97
|
license: 'MIT',
|
|
96
98
|
licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
|
|
@@ -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';\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 '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.\",\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};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,4CAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,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,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,
|
|
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';\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};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","license","licenseUrl","cratisComponentsPackage","manifest","cratisComponents"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,4CAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C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properties = require('../properties.js');
|
|
11
11
|
|
|
12
12
|
const DataTableForQuery = /*#__PURE__*/ react.lazy(async ()=>({
|
|
13
|
-
default: (await
|
|
13
|
+
default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundDataTable
|
|
14
14
|
}));
|
|
15
15
|
/**
|
|
16
16
|
* The `Cratis.Components:dataTable` component, also registered as `table` - `DataTableForQuery` from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDataTable.js","sources":["../../../data/SceneDataTable.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { objectProperty, stringArrayProperty, stringProperty } from '../properties';\nimport { Placeholder } from '../bindings/Placeholder';\n\nconst DataTableForQuery = lazy(async () => ({ default: (await import('
|
|
1
|
+
{"version":3,"file":"SceneDataTable.js","sources":["../../../data/SceneDataTable.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { objectProperty, stringArrayProperty, stringProperty } from '../properties';\nimport { Placeholder } from '../bindings/Placeholder';\n\nconst DataTableForQuery = lazy(async () => ({ default: (await import('../bindings/ArcBoundComponents')).BoundDataTable }));\n\n/**\n * The `Cratis.Components:dataTable` component, also registered as `table` - `DataTableForQuery` from\n * `@cratis/components/DataTables`.\n *\n * Registering it under the bare name `table` as well is override priority working as designed: a profile\n * listing `core`, `PrimeReact` and `Cratis.Components` in that order resolves `table` here and records\n * the other two as shadowed. That is the right outcome, because this is a strictly better `table` for a\n * Cratis application - it performs the query, pages against the server, and wires filtering and sorting\n * back into it, where PrimeReact's `DataTable` is handed rows and knows nothing about where they came from.\n *\n * The `query` property names an Arc query proxy; the columns come from the `content` slot.\n * Optional `queryArguments` is an explicit object forwarded unchanged to that proxy. Invalid values\n * render a placeholder rather than accidentally executing a query without its arguments. This remains\n * a collection table; forwarding arguments does not make optional single-result queries compatible.\n *\n * There is deliberately no `clientFiltering` property. `@cratis/components` 3.0.0 still accepts the prop\n * so existing call sites compile, but it no longer does anything - filtering is always applied to the\n * loaded page. Exposing a screen property that reads as a choice and silently is not would be worse than\n * not offering it, so a screen that set it now gets a property-not-recognized signal rather than a\n * setting that quietly stopped mattering.\n */\nexport function SceneDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n const queryArguments = objectProperty(element.properties, 'queryArguments');\n if (element.properties.queryArguments !== undefined && queryArguments === undefined) {\n return <Placeholder element={element} problem='Invalid queryArguments: expected an object' />;\n }\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForQuery\n query={target}\n {...(queryArguments === undefined ? {} : { queryArguments })}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForQuery","lazy","default","BoundDataTable","SceneDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","queryArguments","objectProperty","properties","undefined","Placeholder","problem","ArcRuntimeBoundary","query","emptyMessage","stringProperty","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;;AASA,MAAMA,iBAAAA,iBAAoBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KA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CAAA;AAE7CX,YAAAA,QAAAA,EAAAA,KAAAA,CAAMuB;;;AAIvB;;"}
|
|
@@ -9,7 +9,7 @@ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
|
|
|
9
9
|
var properties = require('../properties.js');
|
|
10
10
|
|
|
11
11
|
const DataTableForObservableQuery = /*#__PURE__*/ react.lazy(async ()=>({
|
|
12
|
-
default: (await
|
|
12
|
+
default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundObservableDataTable
|
|
13
13
|
}));
|
|
14
14
|
/**
|
|
15
15
|
* The `Cratis.Components:observableDataTable` component - `DataTableForObservableQuery` from
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneObservableDataTable.js","sources":["../../../data/SceneObservableDataTable.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForObservableQuery = lazy(async () => ({\n default: (await import('
|
|
1
|
+
{"version":3,"file":"SceneObservableDataTable.js","sources":["../../../data/SceneObservableDataTable.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForObservableQuery = lazy(async () => ({\n default: (await import('../bindings/ArcBoundComponents')).BoundObservableDataTable,\n}));\n\n/**\n * The `Cratis.Components:observableDataTable` component - `DataTableForObservableQuery` from\n * `@cratis/components/DataTables`.\n *\n * A separate name rather than a flag on `dataTable`, because the distinction is in the *proxy* a host\n * registers, not in how the table is configured: an observable query opens a WebSocket subscription and\n * re-renders when the server's read model changes, and a plain query does not. A screen that names an\n * observable query here is stating that its data is live, which is a design decision worth being able to\n * read off the screen.\n *\n * As with `dataTable`, no `clientFiltering` property is exposed: `@cratis/components` 3.0.0 keeps the\n * prop for source compatibility but ignores it, and a screen property that cannot change anything is\n * worse than an absent one.\n */\nexport function SceneObservableDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForObservableQuery\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForObservableQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForObservableQuery","lazy","default","BoundObservableDataTable","SceneObservableDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,2BAAAA,iBAA8BC,UAAAA,CAAK,WAAa;AAClDC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KAAgC,EAAGC;KAC9D,CAAA,CAAA;AAEA;;;;;;;;;;;;;AAaC,IACM,SAASC,wBAAAA,CAAyB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACjF,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACZ,2BAAAA,EAAAA;YACGgB,KAAAA,EAAOR,MAAAA;AACPS,YAAAA,YAAAA,EAAcC,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEC,OAAAA,EAASF,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,SAAA,CAAA;YAC5CE,kBAAAA,EAAoBC,8BAAAA,CAAoBjB,OAAAA,CAAQc,UAAU,EAAE,oBAAA,CAAA;YAC5DI,SAAAA,EAAWL,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,WAAA,CAAA;AAE7Cb,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('react');
|
|
5
|
+
var BindingKind = require('../bindings/BindingKind.js');
|
|
6
|
+
var resolveElementBinding = require('../bindings/resolveElementBinding.js');
|
|
7
|
+
var MissingBinding = require('../bindings/MissingBinding.js');
|
|
8
|
+
var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
|
|
9
|
+
var properties = require('../properties.js');
|
|
10
|
+
var SingleResultStatus = require('./SingleResultStatus.js');
|
|
11
|
+
|
|
12
|
+
const SingleResultRuntime = /*#__PURE__*/ react.lazy(()=>Promise.resolve().then(function () { return require('./SingleResultRuntime.js'); }));
|
|
13
|
+
/** Read-only scalar field of an optional single model; the host owns and commits the input. */ function SceneSingleResult({ element }) {
|
|
14
|
+
const { name, target } = resolveElementBinding.resolveElementBinding(element, BindingKind.BindingKind.Query);
|
|
15
|
+
if (!target) return /*#__PURE__*/ jsxRuntime.jsx(MissingBinding.MissingBinding, {
|
|
16
|
+
element: element,
|
|
17
|
+
kind: BindingKind.BindingKind.Query,
|
|
18
|
+
name: name
|
|
19
|
+
});
|
|
20
|
+
// Nothing, including loading Arc, happens until the host explicitly commits its input.
|
|
21
|
+
if (!element.isEnabled || properties.booleanProperty(element.properties, 'enabled') !== true) {
|
|
22
|
+
return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
|
|
23
|
+
state: "idle"
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
const queryArguments = properties.objectProperty(element.properties, 'queryArguments');
|
|
27
|
+
const resultField = properties.stringProperty(element.properties, 'resultField');
|
|
28
|
+
if (!queryArguments || !resultField) return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
|
|
29
|
+
state: "failure"
|
|
30
|
+
});
|
|
31
|
+
return /*#__PURE__*/ jsxRuntime.jsx(ArcRuntimeBoundary.ArcRuntimeBoundary, {
|
|
32
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(SingleResultRuntime, {
|
|
33
|
+
query: target,
|
|
34
|
+
queryArguments: queryArguments,
|
|
35
|
+
resultField: resultField
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
exports.SceneSingleResult = SceneSingleResult;
|
|
41
|
+
//# sourceMappingURL=SceneSingleResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SceneSingleResult.js","sources":["../../../data/SceneSingleResult.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 { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, objectProperty, stringProperty } from '../properties';\nimport { SingleResultStatus } from './SingleResultStatus';\n\nconst SingleResultRuntime = lazy(() => import('./SingleResultRuntime'));\n\n/** Read-only scalar field of an optional single model; the host owns and commits the input. */\nexport function SceneSingleResult({ element }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n // Nothing, including loading Arc, happens until the host explicitly commits its input.\n if (!element.isEnabled || booleanProperty(element.properties, 'enabled') !== true) {\n return <SingleResultStatus state='idle' />;\n }\n\n const queryArguments = objectProperty(element.properties, 'queryArguments');\n const resultField = stringProperty(element.properties, 'resultField');\n if (!queryArguments || !resultField) return <SingleResultStatus state='failure' />;\n\n return <ArcRuntimeBoundary>\n <SingleResultRuntime query={target} queryArguments={queryArguments} resultField={resultField} />\n </ArcRuntimeBoundary>;\n}\n"],"names":["SingleResultRuntime","lazy","SceneSingleResult","element","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","isEnabled","booleanProperty","properties","SingleResultStatus","state","queryArguments","objectProperty","resultField","stringProperty","ArcRuntimeBoundary","query"],"mappings":";;;;;;;;;;;AASA,MAAMA,mBAAAA,iBAAsBC,UAAAA,CAAK,IAAM,oDAAO,0BAAA,KAAA,CAAA;AAE9C,gGACO,SAASC,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;IACnE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBH,OAAAA,EAASI,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeP,OAAAA,EAASA,OAAAA;AAASQ,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;;IAGrF,IAAI,CAACD,QAAQS,SAAS,IAAIC,2BAAgBV,OAAAA,CAAQW,UAAU,EAAE,SAAA,CAAA,KAAe,IAAA,EAAM;AAC/E,QAAA,qBAAOL,cAAA,CAACM,qCAAAA,EAAAA;YAAmBC,KAAAA,EAAM;;AACrC,IAAA;AAEA,IAAA,MAAMC,cAAAA,GAAiBC,yBAAAA,CAAef,OAAAA,CAAQW,UAAU,EAAE,gBAAA,CAAA;AAC1D,IAAA,MAAMK,WAAAA,GAAcC,yBAAAA,CAAejB,OAAAA,CAAQW,UAAU,EAAE,aAAA,CAAA;AACvD,IAAA,IAAI,CAACG,cAAAA,IAAkB,CAACE,WAAAA,EAAa,qBAAOV,cAAA,CAACM,qCAAAA,EAAAA;QAAmBC,KAAAA,EAAM;;AAEtE,IAAA,qBAAOP,cAAA,CAACY,qCAAAA,EAAAA;AACJ,QAAA,QAAA,gBAAAZ,cAAA,CAACT,mBAAAA,EAAAA;YAAoBsB,KAAAA,EAAOjB,MAAAA;YAAQY,cAAAA,EAAgBA,cAAAA;YAAgBE,WAAAA,EAAaA;;;AAEzF;;"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
var react = require('react');
|
|
7
|
+
var arc_react = require('@cratis/arc.react');
|
|
8
|
+
var fundamentals = require('@cratis/fundamentals');
|
|
9
|
+
var SingleResultStatus = require('./SingleResultStatus.js');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Private execution owner. Arc owns validation, routing, HTTP and deserialization; this component
|
|
13
|
+
* owns only request lifetime and presentation. No shared cache can hand B the result belonging to A.
|
|
14
|
+
*/ function SingleResultRuntime({ query, queryArguments, resultField, stringInputs = false }) {
|
|
15
|
+
const arc = react.useContext(arc_react.ArcContext);
|
|
16
|
+
const { microservice, apiBasePath, origin, httpHeadersCallback, queryVersion } = arc;
|
|
17
|
+
// Identity is deliberate: hosts replace immutable committed arguments rather than mutating them.
|
|
18
|
+
const request = react.useMemo(()=>({
|
|
19
|
+
query,
|
|
20
|
+
queryArguments,
|
|
21
|
+
resultField,
|
|
22
|
+
stringInputs,
|
|
23
|
+
microservice,
|
|
24
|
+
apiBasePath,
|
|
25
|
+
origin,
|
|
26
|
+
httpHeadersCallback,
|
|
27
|
+
queryVersion
|
|
28
|
+
}), [
|
|
29
|
+
query,
|
|
30
|
+
queryArguments,
|
|
31
|
+
resultField,
|
|
32
|
+
stringInputs,
|
|
33
|
+
microservice,
|
|
34
|
+
apiBasePath,
|
|
35
|
+
origin,
|
|
36
|
+
httpHeadersCallback,
|
|
37
|
+
queryVersion
|
|
38
|
+
]);
|
|
39
|
+
const [settled, setSettled] = react.useState();
|
|
40
|
+
react.useEffect(()=>{
|
|
41
|
+
// Each effect setup is a generation, including StrictMode's setup/cleanup/setup replay.
|
|
42
|
+
let current = true;
|
|
43
|
+
let instance;
|
|
44
|
+
const publish = (outcome)=>{
|
|
45
|
+
if (current) setSettled({
|
|
46
|
+
request,
|
|
47
|
+
outcome
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
const execute = async ()=>{
|
|
51
|
+
try {
|
|
52
|
+
// The registry intentionally stores constructors without an eager Arc dependency.
|
|
53
|
+
instance = new request.query();
|
|
54
|
+
if (instance.enumerable !== false) {
|
|
55
|
+
publish({
|
|
56
|
+
state: 'failure'
|
|
57
|
+
});
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// Arc perform does not validate argument-to-descriptor types. The form supports only
|
|
61
|
+
// scalar String/Guid inputs, matched by exact name and constructor, never by naming
|
|
62
|
+
// convention. This check is lazy and form-only; singleResult's host contract is intact.
|
|
63
|
+
if (request.stringInputs && !Object.entries(request.queryArguments).every(([name, value])=>{
|
|
64
|
+
const descriptors = instance.parameterDescriptors.filter((descriptor)=>descriptor.name === name);
|
|
65
|
+
return typeof value === 'string' && descriptors.length === 1 && !descriptors[0].isEnumerable && (descriptors[0].type === String || descriptors[0].type === fundamentals.Guid);
|
|
66
|
+
})) {
|
|
67
|
+
publish({
|
|
68
|
+
state: 'failure'
|
|
69
|
+
});
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
instance.setMicroservice(request.microservice);
|
|
73
|
+
instance.setApiBasePath(request.apiBasePath ?? '');
|
|
74
|
+
instance.setOrigin(request.origin ?? '');
|
|
75
|
+
instance.setHttpHeadersCallback(request.httpHeadersCallback ?? (()=>({})));
|
|
76
|
+
// Native perform validates required arguments and proxy rules before HTTP. No copying,
|
|
77
|
+
// defaults, business validation, route construction or array wrapping happens here.
|
|
78
|
+
const result = await instance.perform(request.queryArguments);
|
|
79
|
+
if (!current) return;
|
|
80
|
+
if (result.isSuccess !== true || result.isAuthorized !== true || result.isValid !== true || result.hasExceptions !== false || result.isReady === false) {
|
|
81
|
+
publish({
|
|
82
|
+
state: 'failure'
|
|
83
|
+
});
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (result.data === null || result.data === undefined) {
|
|
87
|
+
publish({
|
|
88
|
+
state: 'notFound'
|
|
89
|
+
});
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
if (typeof result.data !== 'object' || Array.isArray(result.data)) {
|
|
93
|
+
publish({
|
|
94
|
+
state: 'failure'
|
|
95
|
+
});
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
// Only one own data field, never a path, inherited member, getter or expression.
|
|
99
|
+
const descriptor = Object.getOwnPropertyDescriptor(result.data, request.resultField);
|
|
100
|
+
const value = descriptor && 'value' in descriptor ? descriptor.value : undefined;
|
|
101
|
+
if (typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' && Number.isFinite(value)) {
|
|
102
|
+
publish({
|
|
103
|
+
state: 'success',
|
|
104
|
+
value: String(value)
|
|
105
|
+
});
|
|
106
|
+
} else {
|
|
107
|
+
publish({
|
|
108
|
+
state: 'failure'
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
} catch {
|
|
112
|
+
// Includes native AbortError rejections. Disposed generations cannot publish or leak
|
|
113
|
+
// an unhandled promise, even when the HTTP boundary ignores cancellation.
|
|
114
|
+
publish({
|
|
115
|
+
state: 'failure'
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
void execute();
|
|
120
|
+
return ()=>{
|
|
121
|
+
current = false;
|
|
122
|
+
instance?.abortController?.abort();
|
|
123
|
+
};
|
|
124
|
+
}, [
|
|
125
|
+
request
|
|
126
|
+
]);
|
|
127
|
+
// Mask old data during the render that changes inputs, before effect cleanup/setup runs.
|
|
128
|
+
if (settled?.request !== request) return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
|
|
129
|
+
state: "loading"
|
|
130
|
+
});
|
|
131
|
+
return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
|
|
132
|
+
...settled.outcome
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
exports.default = SingleResultRuntime;
|
|
137
|
+
//# sourceMappingURL=SingleResultRuntime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleResultRuntime.js","sources":["../../../data/SingleResultRuntime.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 { useContext, useEffect, useMemo, useState } from 'react';\nimport { ArcContext } from '@cratis/arc.react';\nimport type { QueryFor } from '@cratis/arc/queries';\nimport { Guid } from '@cratis/fundamentals';\nimport type { BoundConstructor } from '../bindings/BoundConstructor';\nimport { SingleResultStatus } from './SingleResultStatus';\n\ninterface Props {\n query: BoundConstructor;\n queryArguments: Record<string, unknown>;\n resultField: string;\n /** queryInputForm alone opts into scalar String/Guid descriptor mapping; no value conversion. */\n stringInputs?: boolean;\n}\n\ntype Outcome = { state: 'failure' | 'notFound' } | { state: 'success'; value: string };\n\n/**\n * Private execution owner. Arc owns validation, routing, HTTP and deserialization; this component\n * owns only request lifetime and presentation. No shared cache can hand B the result belonging to A.\n */\nexport default function SingleResultRuntime({ query, queryArguments, resultField, stringInputs = false }: Props) {\n const arc = useContext(ArcContext);\n const { microservice, apiBasePath, origin, httpHeadersCallback, queryVersion } = arc;\n // Identity is deliberate: hosts replace immutable committed arguments rather than mutating them.\n const request = useMemo(() => ({ query, queryArguments, resultField, stringInputs, microservice, apiBasePath, origin, httpHeadersCallback, queryVersion }),\n [query, queryArguments, resultField, stringInputs, microservice, apiBasePath, origin, httpHeadersCallback, queryVersion]);\n const [settled, setSettled] = useState<{ request: typeof request; outcome: Outcome }>();\n\n useEffect(() => {\n // Each effect setup is a generation, including StrictMode's setup/cleanup/setup replay.\n let current = true;\n let instance: QueryFor<unknown, Record<string, unknown>> | undefined;\n const publish = (outcome: Outcome) => {\n if (current) setSettled({ request, outcome });\n };\n const execute = async () => {\n try {\n // The registry intentionally stores constructors without an eager Arc dependency.\n instance = new request.query() as QueryFor<unknown, Record<string, unknown>>;\n if (instance.enumerable !== false) {\n publish({ state: 'failure' });\n return;\n }\n // Arc perform does not validate argument-to-descriptor types. The form supports only\n // scalar String/Guid inputs, matched by exact name and constructor, never by naming\n // convention. This check is lazy and form-only; singleResult's host contract is intact.\n if (request.stringInputs && !Object.entries(request.queryArguments).every(([name, value]) => {\n const descriptors = instance!.parameterDescriptors.filter(descriptor => descriptor.name === name);\n return typeof value === 'string' && descriptors.length === 1 && !descriptors[0].isEnumerable\n && (descriptors[0].type === String || descriptors[0].type === Guid);\n })) {\n publish({ state: 'failure' });\n return;\n }\n instance.setMicroservice(request.microservice);\n instance.setApiBasePath(request.apiBasePath ?? '');\n instance.setOrigin(request.origin ?? '');\n instance.setHttpHeadersCallback(request.httpHeadersCallback ?? (() => ({})));\n // Native perform validates required arguments and proxy rules before HTTP. No copying,\n // defaults, business validation, route construction or array wrapping happens here.\n const result = await instance.perform(request.queryArguments);\n if (!current) return;\n if (result.isSuccess !== true || result.isAuthorized !== true || result.isValid !== true || result.hasExceptions !== false || result.isReady === false) {\n publish({ state: 'failure' });\n return;\n }\n if (result.data === null || result.data === undefined) {\n publish({ state: 'notFound' });\n return;\n }\n if (typeof result.data !== 'object' || Array.isArray(result.data)) {\n publish({ state: 'failure' });\n return;\n }\n // Only one own data field, never a path, inherited member, getter or expression.\n const descriptor = Object.getOwnPropertyDescriptor(result.data, request.resultField);\n const value: unknown = descriptor && 'value' in descriptor ? descriptor.value : undefined;\n if (typeof value === 'string' || typeof value === 'boolean' || (typeof value === 'number' && Number.isFinite(value))) {\n publish({ state: 'success', value: String(value) });\n } else {\n publish({ state: 'failure' });\n }\n } catch {\n // Includes native AbortError rejections. Disposed generations cannot publish or leak\n // an unhandled promise, even when the HTTP boundary ignores cancellation.\n publish({ state: 'failure' });\n }\n };\n void execute();\n return () => {\n current = false;\n instance?.abortController?.abort();\n };\n }, [request]);\n\n // Mask old data during the render that changes inputs, before effect cleanup/setup runs.\n if (settled?.request !== request) return <SingleResultStatus state='loading' />;\n return <SingleResultStatus {...settled.outcome} />;\n}\n"],"names":["SingleResultRuntime","query","queryArguments","resultField","stringInputs","arc","useContext","ArcContext","microservice","apiBasePath","origin","httpHeadersCallback","queryVersion","request","useMemo","settled","setSettled","useState","useEffect","current","instance","publish","outcome","execute","enumerable","state","Object","entries","every","name","value","descriptors","parameterDescriptors","filter","descriptor","length","isEnumerable","type","String","Guid","setMicroservice","setApiBasePath","setOrigin","setHttpHeadersCallback","result","perform","isSuccess","isAuthorized","isValid","hasExceptions","isReady","data","undefined","Array","isArray","getOwnPropertyDescriptor","Number","isFinite","abortController","abort","_jsx","SingleResultStatus"],"mappings":";;;;;;;;;;AAoBA;;;AAGC,IACc,SAASA,mBAAAA,CAAoB,EAAEC,KAAK,EAAEC,cAAc,EAAEC,WAAW,EAAEC,YAAAA,GAAe,KAAK,EAAS,EAAA;AAC3G,IAAA,MAAMC,MAAMC,gBAAAA,CAAWC,oBAAAA,CAAAA;IACvB,MAAM,EAAEC,YAAY,EAAEC,WAAW,EAAEC,MAAM,EAAEC,mBAAmB,EAAEC,YAAY,EAAE,GAAGP,GAAAA;;IAEjF,MAAMQ,OAAAA,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