@cratis/scene.components 3.4.0 → 3.5.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 +51 -2
- package/bindings/ArcBoundComponents.tsx +40 -0
- package/bindings/BoundConstructor.ts +5 -5
- package/bindings/for_requireArcProxy/NativeProxies.ts +28 -0
- package/bindings/for_requireArcProxy/when_mounting_bound_adapters.tsx +71 -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 +2 -1
- package/cratisComponentsPackage.ts +2 -1
- package/data/SceneDataTable.tsx +1 -1
- package/data/SceneObservableDataTable.tsx +1 -1
- package/data/SceneSingleResult.tsx +29 -0
- package/data/SingleResultRuntime.tsx +89 -0
- package/data/SingleResultStatus.tsx +13 -0
- package/data/for_SceneDataTable/when_forwarding_query_arguments.tsx +4 -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/requireArcProxy.js +25 -0
- package/dist/cjs/bindings/requireArcProxy.js.map +1 -0
- package/dist/cjs/cratisComponents.js +2 -0
- package/dist/cjs/cratisComponents.js.map +1 -1
- package/dist/cjs/cratisComponentsPackage.js +2 -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 +122 -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/fields/SceneRadioButtonField.js +4 -1
- package/dist/cjs/forms/fields/SceneRadioButtonField.js.map +1 -1
- package/dist/cjs/index.js +2 -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/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 +2 -0
- package/dist/esm/cratisComponents.js.map +1 -1
- package/dist/esm/cratisComponentsPackage.d.ts.map +1 -1
- package/dist/esm/cratisComponentsPackage.js +2 -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 +9 -0
- package/dist/esm/data/SingleResultRuntime.d.ts.map +1 -0
- package/dist/esm/data/SingleResultRuntime.js +118 -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 +4 -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_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/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/index.js +1 -0
- 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_single_result.ts +20 -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/package.json +19 -7
- package/pages/SceneDataPage.tsx +1 -1
|
@@ -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,KAAgC,EAAGC;KAAe,CAAA,CAAA;AAEvH;;;;;;;;;;;;;;;;;;;;AAoBC,IACM,SAASC,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,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,MAAMQ,cAAAA,GAAiBC,yBAAAA,CAAeX,OAAAA,CAAQY,UAAU,EAAE,gBAAA,CAAA;AAC1D,IAAA,IAAIZ,QAAQY,UAAU,CAACF,cAAc,KAAKG,SAAAA,IAAaH,mBAAmBG,SAAAA,EAAW;AACjF,QAAA,qBAAON,cAAA,CAACO,uBAAAA,EAAAA;YAAYd,OAAAA,EAASA,OAAAA;YAASe,OAAAA,EAAQ;;AAClD,IAAA;AAEA,IAAA,qBACIR,cAAA,CAACS,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAT,cAAA,CAACZ,iBAAAA,EAAAA;YACGsB,KAAAA,EAAOd,MAAAA;YACN,GAAIO,cAAAA,KAAmBG,SAAAA,GAAY,EAAC,GAAI;AAAEH,gBAAAA;aAAgB;AAC3DQ,YAAAA,YAAAA,EAAcC,yBAAAA,CAAenB,OAAAA,CAAQY,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEQ,OAAAA,EAASD,yBAAAA,CAAenB,OAAAA,CAAQY,UAAU,EAAE,SAAA,CAAA;YAC5CS,kBAAAA,EAAoBC,8BAAAA,CAAoBtB,OAAAA,CAAQY,UAAU,EAAE,oBAAA,CAAA;YAC5DW,SAAAA,EAAWJ,yBAAAA,CAAenB,OAAAA,CAAQY,UAAU,EAAE,WAAA,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,122 @@
|
|
|
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 SingleResultStatus = require('./SingleResultStatus.js');
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Private execution owner. Arc owns validation, routing, HTTP and deserialization; this component
|
|
12
|
+
* owns only request lifetime and presentation. No shared cache can hand B the result belonging to A.
|
|
13
|
+
*/ function SingleResultRuntime({ query, queryArguments, resultField }) {
|
|
14
|
+
const arc = react.useContext(arc_react.ArcContext);
|
|
15
|
+
const { microservice, apiBasePath, origin, httpHeadersCallback, queryVersion } = arc;
|
|
16
|
+
// Identity is deliberate: hosts replace immutable committed arguments rather than mutating them.
|
|
17
|
+
const request = react.useMemo(()=>({
|
|
18
|
+
query,
|
|
19
|
+
queryArguments,
|
|
20
|
+
resultField,
|
|
21
|
+
microservice,
|
|
22
|
+
apiBasePath,
|
|
23
|
+
origin,
|
|
24
|
+
httpHeadersCallback,
|
|
25
|
+
queryVersion
|
|
26
|
+
}), [
|
|
27
|
+
query,
|
|
28
|
+
queryArguments,
|
|
29
|
+
resultField,
|
|
30
|
+
microservice,
|
|
31
|
+
apiBasePath,
|
|
32
|
+
origin,
|
|
33
|
+
httpHeadersCallback,
|
|
34
|
+
queryVersion
|
|
35
|
+
]);
|
|
36
|
+
const [settled, setSettled] = react.useState();
|
|
37
|
+
react.useEffect(()=>{
|
|
38
|
+
// Each effect setup is a generation, including StrictMode's setup/cleanup/setup replay.
|
|
39
|
+
let current = true;
|
|
40
|
+
let instance;
|
|
41
|
+
const publish = (outcome)=>{
|
|
42
|
+
if (current) setSettled({
|
|
43
|
+
request,
|
|
44
|
+
outcome
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const execute = async ()=>{
|
|
48
|
+
try {
|
|
49
|
+
// The registry intentionally stores constructors without an eager Arc dependency.
|
|
50
|
+
instance = new request.query();
|
|
51
|
+
if (instance.enumerable !== false) {
|
|
52
|
+
publish({
|
|
53
|
+
state: 'failure'
|
|
54
|
+
});
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
instance.setMicroservice(request.microservice);
|
|
58
|
+
instance.setApiBasePath(request.apiBasePath ?? '');
|
|
59
|
+
instance.setOrigin(request.origin ?? '');
|
|
60
|
+
instance.setHttpHeadersCallback(request.httpHeadersCallback ?? (()=>({})));
|
|
61
|
+
// Native perform validates required arguments and proxy rules before HTTP. No copying,
|
|
62
|
+
// defaults, business validation, route construction or array wrapping happens here.
|
|
63
|
+
const result = await instance.perform(request.queryArguments);
|
|
64
|
+
if (!current) return;
|
|
65
|
+
if (result.isSuccess !== true || result.isAuthorized !== true || result.isValid !== true || result.hasExceptions !== false || result.isReady === false) {
|
|
66
|
+
publish({
|
|
67
|
+
state: 'failure'
|
|
68
|
+
});
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (result.data === null || result.data === undefined) {
|
|
72
|
+
publish({
|
|
73
|
+
state: 'notFound'
|
|
74
|
+
});
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
if (typeof result.data !== 'object' || Array.isArray(result.data)) {
|
|
78
|
+
publish({
|
|
79
|
+
state: 'failure'
|
|
80
|
+
});
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
// Only one own data field, never a path, inherited member, getter or expression.
|
|
84
|
+
const descriptor = Object.getOwnPropertyDescriptor(result.data, request.resultField);
|
|
85
|
+
const value = descriptor && 'value' in descriptor ? descriptor.value : undefined;
|
|
86
|
+
if (typeof value === 'string' || typeof value === 'boolean' || typeof value === 'number' && Number.isFinite(value)) {
|
|
87
|
+
publish({
|
|
88
|
+
state: 'success',
|
|
89
|
+
value: String(value)
|
|
90
|
+
});
|
|
91
|
+
} else {
|
|
92
|
+
publish({
|
|
93
|
+
state: 'failure'
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
} catch {
|
|
97
|
+
// Includes native AbortError rejections. Disposed generations cannot publish or leak
|
|
98
|
+
// an unhandled promise, even when the HTTP boundary ignores cancellation.
|
|
99
|
+
publish({
|
|
100
|
+
state: 'failure'
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
void execute();
|
|
105
|
+
return ()=>{
|
|
106
|
+
current = false;
|
|
107
|
+
instance?.abortController?.abort();
|
|
108
|
+
};
|
|
109
|
+
}, [
|
|
110
|
+
request
|
|
111
|
+
]);
|
|
112
|
+
// Mask old data during the render that changes inputs, before effect cleanup/setup runs.
|
|
113
|
+
if (settled?.request !== request) return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
|
|
114
|
+
state: "loading"
|
|
115
|
+
});
|
|
116
|
+
return /*#__PURE__*/ jsxRuntime.jsx(SingleResultStatus.SingleResultStatus, {
|
|
117
|
+
...settled.outcome
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
exports.default = SingleResultRuntime;
|
|
122
|
+
//# 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 type { BoundConstructor } from '../bindings/BoundConstructor';\nimport { SingleResultStatus } from './SingleResultStatus';\n\ninterface Props {\n query: BoundConstructor;\n queryArguments: Record<string, unknown>;\n resultField: string;\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 }: 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, microservice, apiBasePath, origin, httpHeadersCallback, queryVersion }),\n [query, queryArguments, resultField, 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 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","arc","useContext","ArcContext","microservice","apiBasePath","origin","httpHeadersCallback","queryVersion","request","useMemo","settled","setSettled","useState","useEffect","current","instance","publish","outcome","execute","enumerable","state","setMicroservice","setApiBasePath","setOrigin","setHttpHeadersCallback","result","perform","isSuccess","isAuthorized","isValid","hasExceptions","isReady","data","undefined","Array","isArray","descriptor","Object","getOwnPropertyDescriptor","value","Number","isFinite","String","abortController","abort","_jsx","SingleResultStatus"],"mappings":";;;;;;;;;AAiBA;;;IAIe,SAASA,mBAAAA,CAAoB,EAAEC,KAAK,EAAEC,cAAc,EAAEC,WAAW,EAAS,EAAA;AACrF,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,GAAUC,aAAAA,CAAQ,KAAO;AAAEZ,YAAAA,KAAAA;AAAOC,YAAAA,cAAAA;AAAgBC,YAAAA,WAAAA;AAAaI,YAAAA,YAAAA;AAAcC,YAAAA,WAAAA;AAAaC,YAAAA,MAAAA;AAAQC,YAAAA,mBAAAA;AAAqBC,YAAAA;AAAa,SAAA,CAAA,EACtI;AAACV,QAAAA,KAAAA;AAAOC,QAAAA,cAAAA;AAAgBC,QAAAA,WAAAA;AAAaI,QAAAA,YAAAA;AAAcC,QAAAA,WAAAA;AAAaC,QAAAA,MAAAA;AAAQC,QAAAA,mBAAAA;AAAqBC,QAAAA;AAAa,KAAA,CAAA;IAC9G,MAAM,CAACG,OAAAA,EAASC,UAAAA,CAAW,GAAGC,cAAAA,EAAAA;IAE9BC,eAAAA,CAAU,IAAA;;AAEN,QAAA,IAAIC,OAAAA,GAAU,IAAA;QACd,IAAIC,QAAAA;AACJ,QAAA,MAAMC,UAAU,CAACC,OAAAA,GAAAA;AACb,YAAA,IAAIH,SAASH,UAAAA,CAAW;AAAEH,gBAAAA,OAAAA;AAASS,gBAAAA;AAAQ,aAAA,CAAA;AAC/C,QAAA,CAAA;AACA,QAAA,MAAMC,OAAAA,GAAU,UAAA;YACZ,IAAI;;gBAEAH,QAAAA,GAAW,IAAIP,QAAQX,KAAK,EAAA;gBAC5B,IAAIkB,QAAAA,CAASI,UAAU,KAAK,KAAA,EAAO;oBAC/BH,OAAAA,CAAQ;wBAAEI,KAAAA,EAAO;AAAU,qBAAA,CAAA;AAC3B,oBAAA;AACJ,gBAAA;gBACAL,QAAAA,CAASM,eAAe,CAACb,OAAAA,CAAQL,YAAY,CAAA;AAC7CY,gBAAAA,QAAAA,CAASO,cAAc,CAACd,OAAAA,CAAQJ,WAAW,IAAI,EAAA,CAAA;AAC/CW,gBAAAA,QAAAA,CAASQ,SAAS,CAACf,OAAAA,CAAQH,MAAM,IAAI,EAAA,CAAA;gBACrCU,QAAAA,CAASS,sBAAsB,CAAChB,OAAAA,CAAQF,mBAAmB,KAAK,KAAO,EAAC,CAAC,CAAA,CAAA;;;AAGzE,gBAAA,MAAMmB,SAAS,MAAMV,QAAAA,CAASW,OAAO,CAAClB,QAAQV,cAAc,CAAA;AAC5D,gBAAA,IAAI,CAACgB,OAAAA,EAAS;AACd,gBAAA,IAAIW,OAAOE,SAAS,KAAK,QAAQF,MAAAA,CAAOG,YAAY,KAAK,IAAA,IAAQH,MAAAA,CAAOI,OAAO,KAAK,IAAA,IAAQJ,OAAOK,aAAa,KAAK,SAASL,MAAAA,CAAOM,OAAO,KAAK,KAAA,EAAO;oBACpJf,OAAAA,CAAQ;wBAAEI,KAAAA,EAAO;AAAU,qBAAA,CAAA;AAC3B,oBAAA;AACJ,gBAAA;AACA,gBAAA,IAAIK,OAAOO,IAAI,KAAK,QAAQP,MAAAA,CAAOO,IAAI,KAAKC,SAAAA,EAAW;oBACnDjB,OAAAA,CAAQ;wBAAEI,KAAAA,EAAO;AAAW,qBAAA,CAAA;AAC5B,oBAAA;AACJ,gBAAA;gBACA,IAAI,OAAOK,MAAAA,CAAOO,IAAI,KAAK,QAAA,IAAYE,MAAMC,OAAO,CAACV,MAAAA,CAAOO,IAAI,CAAA,EAAG;oBAC/DhB,OAAAA,CAAQ;wBAAEI,KAAAA,EAAO;AAAU,qBAAA,CAAA;AAC3B,oBAAA;AACJ,gBAAA;;gBAEA,MAAMgB,UAAAA,GAAaC,OAAOC,wBAAwB,CAACb,OAAOO,IAAI,EAAExB,QAAQT,WAAW,CAAA;AACnF,gBAAA,MAAMwC,QAAiBH,UAAAA,IAAc,OAAA,IAAWA,UAAAA,GAAaA,UAAAA,CAAWG,KAAK,GAAGN,SAAAA;AAChF,gBAAA,IAAI,OAAOM,KAAAA,KAAU,QAAA,IAAY,OAAOA,KAAAA,KAAU,SAAA,IAAc,OAAOA,KAAAA,KAAU,QAAA,IAAYC,MAAAA,CAAOC,QAAQ,CAACF,KAAAA,CAAAA,EAAS;oBAClHvB,OAAAA,CAAQ;wBAAEI,KAAAA,EAAO,SAAA;AAAWmB,wBAAAA,KAAAA,EAAOG,MAAAA,CAAOH,KAAAA;AAAO,qBAAA,CAAA;gBACrD,CAAA,MAAO;oBACHvB,OAAAA,CAAQ;wBAAEI,KAAAA,EAAO;AAAU,qBAAA,CAAA;AAC/B,gBAAA;AACJ,YAAA,CAAA,CAAE,OAAM;;;gBAGJJ,OAAAA,CAAQ;oBAAEI,KAAAA,EAAO;AAAU,iBAAA,CAAA;AAC/B,YAAA;AACJ,QAAA,CAAA;QACA,KAAKF,OAAAA,EAAAA;QACL,OAAO,IAAA;YACHJ,OAAAA,GAAU,KAAA;AACVC,YAAAA,QAAAA,EAAU4B,eAAAA,EAAiBC,KAAAA,EAAAA;AAC/B,QAAA,CAAA;IACJ,CAAA,EAAG;AAACpC,QAAAA;AAAQ,KAAA,CAAA;;AAGZ,IAAA,IAAIE,OAAAA,EAASF,OAAAA,KAAYA,OAAAA,EAAS,qBAAOqC,cAAA,CAACC,qCAAAA,EAAAA;QAAmB1B,KAAAA,EAAM;;AACnE,IAAA,qBAAOyB,cAAA,CAACC,qCAAAA,EAAAA;AAAoB,QAAA,GAAGpC,QAAQO;;AAC3C;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
|
|
5
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
6
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
7
|
+
const messages = {
|
|
8
|
+
idle: 'Idle',
|
|
9
|
+
loading: 'Loading',
|
|
10
|
+
notFound: 'Not found',
|
|
11
|
+
failure: 'Unable to load result',
|
|
12
|
+
success: ''
|
|
13
|
+
};
|
|
14
|
+
/** Internal shared presentation; never exposes query exception messages or server stack traces. */ function SingleResultStatus({ state, value }) {
|
|
15
|
+
return /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
16
|
+
role: state === 'failure' ? 'alert' : 'status',
|
|
17
|
+
"data-scene-single-result": state,
|
|
18
|
+
children: state === 'success' ? value : messages[state]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
exports.SingleResultStatus = SingleResultStatus;
|
|
23
|
+
//# sourceMappingURL=SingleResultStatus.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleResultStatus.js","sources":["../../../data/SingleResultStatus.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\ntype State = 'idle' | 'loading' | 'notFound' | 'failure' | 'success';\n\nconst messages = { idle: 'Idle', loading: 'Loading', notFound: 'Not found', failure: 'Unable to load result', success: '' };\n\n/** Internal shared presentation; never exposes query exception messages or server stack traces. */\nexport function SingleResultStatus({ state, value }: { state: State; value?: string }) {\n return <span role={state === 'failure' ? 'alert' : 'status'} data-scene-single-result={state}>\n {state === 'success' ? value : messages[state]}\n </span>;\n}\n"],"names":["messages","idle","loading","notFound","failure","success","SingleResultStatus","state","value","_jsx","span","role","data-scene-single-result"],"mappings":";;;;AAAA;AACA;AAIA,MAAMA,QAAAA,GAAW;IAAEC,IAAAA,EAAM,MAAA;IAAQC,OAAAA,EAAS,SAAA;IAAWC,QAAAA,EAAU,WAAA;IAAaC,OAAAA,EAAS,uBAAA;IAAyBC,OAAAA,EAAS;AAAG,CAAA;AAE1H,oGACO,SAASC,kBAAAA,CAAmB,EAAEC,KAAK,EAAEC,KAAK,EAAoC,EAAA;AACjF,IAAA,qBAAOC,cAAA,CAACC,MAAAA,EAAAA;QAAKC,IAAAA,EAAMJ,KAAAA,KAAU,YAAY,OAAA,GAAU,QAAA;QAAUK,0BAAAA,EAA0BL,KAAAA;AAClFA,QAAAA,QAAAA,EAAAA,KAAAA,KAAU,SAAA,GAAYC,KAAAA,GAAQR,QAAQ,CAACO,KAAAA;;AAEhD;;"}
|
|
@@ -9,7 +9,7 @@ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
|
|
|
9
9
|
var properties = require('../properties.js');
|
|
10
10
|
|
|
11
11
|
const CommandDialog = /*#__PURE__*/ react.lazy(async ()=>({
|
|
12
|
-
default: (await
|
|
12
|
+
default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundCommandDialog
|
|
13
13
|
}));
|
|
14
14
|
/**
|
|
15
15
|
* The `Cratis.Components:commandDialog` component - `CommandDialog` from `@cratis/components/CommandDialog`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneCommandDialog.js","sources":["../../../dialogs/SceneCommandDialog.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, stringProperty } from '../properties';\n\nconst CommandDialog = lazy(async () => ({ default: (await import('
|
|
1
|
+
{"version":3,"file":"SceneCommandDialog.js","sources":["../../../dialogs/SceneCommandDialog.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, stringProperty } from '../properties';\n\nconst CommandDialog = lazy(async () => ({ default: (await import('../bindings/ArcBoundComponents')).BoundCommandDialog }));\n\n/**\n * The `Cratis.Components:commandDialog` component - `CommandDialog` from `@cratis/components/CommandDialog`.\n *\n * A dialog whose confirm button *is* the command's execution: it binds the form to the command, submits\n * on confirm, feeds the backend's validation results back onto the fields, and only closes when the\n * command succeeded. That last part is the reason to use it rather than composing `dialog` with\n * `commandForm` - a hand-composed pair has no way to keep the dialog open on a rejected command without\n * reimplementing the protocol.\n *\n * The `command` property names an Arc command proxy; the fields go in the `content` slot.\n *\n * `dismissable` and `closeAriaLabel` are here rather than on `dialog` alone because `CommandDialog`\n * forwards both to the dialog it wraps, and in `@cratis/components` 3.0.0 that forwarding actually\n * happens - 2.x accepted the two props and dropped them on the floor. `dismissable` matters more on a\n * command dialog than anywhere else: it decides whether a half-filled form can be abandoned with\n * `Escape` or a backdrop click, which is a decision about the command, not about the chrome.\n *\n * The `resizable` property this adapter used to carry is gone. It is still declared upstream so call\n * sites compile, but PrimeReact 11's headless dialog has no resize handle and nothing reads the prop.\n */\nexport function SceneCommandDialog({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Command);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Command} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <CommandDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n command={target}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n dismissable={booleanProperty(element.properties, 'dismissable')}\n okLabel={stringProperty(element.properties, 'okLabel')}\n cancelLabel={stringProperty(element.properties, 'cancelLabel')}\n closeAriaLabel={stringProperty(element.properties, 'closeAriaLabel')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </CommandDialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["CommandDialog","lazy","default","BoundCommandDialog","SceneCommandDialog","element","slots","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","command","visible","booleanProperty","width","dismissable","okLabel","cancelLabel","closeAriaLabel","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KAAgC,EAAGC;KAAmB,CAAA,CAAA;AAEvH;;;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC3E,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,OAAO,CAAA;IAC3E,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,OAAO;QAAEJ,IAAAA,EAAMA;;AAEvF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACZ,aAAAA,EAAAA;AACGgB,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,OAAAA,EAASX,MAAAA;AACTY,YAAAA,OAAAA,EAASC,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA,IAAc,IAAA;YAC3DI,KAAAA,EAAOL,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA;YAC1CK,WAAAA,EAAaF,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;YACjDM,OAAAA,EAASP,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CO,WAAAA,EAAaR,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;YAChDQ,cAAAA,EAAgBT,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,gBAAA,CAAA;YACnDS,SAAAA,EAAWV,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,WAAA,CAAA;AAE7CZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMsB;;;AAIvB;;"}
|
|
@@ -9,7 +9,7 @@ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
|
|
|
9
9
|
var properties = require('../properties.js');
|
|
10
10
|
|
|
11
11
|
const StepperCommandDialog = /*#__PURE__*/ react.lazy(async ()=>({
|
|
12
|
-
default: (await
|
|
12
|
+
default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundStepperCommandDialog
|
|
13
13
|
}));
|
|
14
14
|
/** Whether the step headers run across the top or down the side. */ const orientations = [
|
|
15
15
|
'horizontal',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneStepperCommandDialog.js","sources":["../../../dialogs/SceneStepperCommandDialog.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, stringProperty, unionProperty } from '../properties';\n\nconst StepperCommandDialog = lazy(async () => ({\n default: (await import('
|
|
1
|
+
{"version":3,"file":"SceneStepperCommandDialog.js","sources":["../../../dialogs/SceneStepperCommandDialog.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, stringProperty, unionProperty } from '../properties';\n\nconst StepperCommandDialog = lazy(async () => ({\n default: (await import('../bindings/ArcBoundComponents')).BoundStepperCommandDialog,\n}));\n\n/** Whether the step headers run across the top or down the side. */\nconst orientations = ['horizontal', 'vertical'] as const;\n\n/**\n * The `Cratis.Components:stepperCommandDialog` component - `StepperCommandDialog` from\n * `@cratis/components/CommandDialog`.\n *\n * `commandDialog` split across steps, for a command with more fields than fit one screen. It stays a\n * single command: the steps partition the *fields*, not the intent, and nothing is submitted until the\n * last step - so a half-finished wizard leaves no trace, which is exactly what a command should do.\n *\n * `linear` decides whether a step can be skipped ahead of the one before it. The step panels go in the\n * `content` slot.\n */\nexport function SceneStepperCommandDialog({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Command);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Command} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <StepperCommandDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n command={target}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n linear={booleanProperty(element.properties, 'linear')}\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n okLabel={stringProperty(element.properties, 'okLabel')}\n nextLabel={stringProperty(element.properties, 'nextLabel')}\n previousLabel={stringProperty(element.properties, 'previousLabel')}\n showCancel={booleanProperty(element.properties, 'showCancel')}\n cancelLabel={stringProperty(element.properties, 'cancelLabel')}\n >\n {slots.content}\n </StepperCommandDialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["StepperCommandDialog","lazy","default","BoundStepperCommandDialog","orientations","SceneStepperCommandDialog","element","slots","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","command","visible","booleanProperty","width","linear","orientation","unionProperty","okLabel","nextLabel","previousLabel","showCancel","cancelLabel","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,oBAAAA,iBAAuBC,UAAAA,CAAK,WAAa;AAC3CC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KAAgC,EAAGC;KAC9D,CAAA,CAAA;AAEA,qEACA,MAAMC,YAAAA,GAAe;AAAC,IAAA,YAAA;AAAc,IAAA;AAAW,CAAA;AAE/C;;;;;;;;;;AAUC,IACM,SAASC,yBAAAA,CAA0B,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAClF,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,OAAO,CAAA;IAC3E,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,OAAO;QAAEJ,IAAAA,EAAMA;;AAEvF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACb,oBAAAA,EAAAA;AACGiB,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,OAAAA,EAASX,MAAAA;AACTY,YAAAA,OAAAA,EAASC,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA,IAAc,IAAA;YAC3DI,KAAAA,EAAOL,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA;YAC1CK,MAAAA,EAAQF,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,QAAA,CAAA;AAC5CM,YAAAA,WAAAA,EAAaC,wBAAAA,CAAcpB,OAAAA,CAAQa,UAAU,EAAE,aAAA,EAAef,YAAAA,CAAAA;YAC9DuB,OAAAA,EAAST,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CS,SAAAA,EAAWV,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,WAAA,CAAA;YAC9CU,aAAAA,EAAeX,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,eAAA,CAAA;YAClDW,UAAAA,EAAYR,0BAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,YAAA,CAAA;YAChDY,WAAAA,EAAab,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;AAE/CZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMyB;;;AAIvB;;"}
|
|
@@ -19,11 +19,14 @@ const RadioButtonField = /*#__PURE__*/ react.lazy(async ()=>({
|
|
|
19
19
|
* `buttonValue` is read as a string first and a number second, since a choice is usually a string but a
|
|
20
20
|
* numeric code is common enough that forcing it through as `'1'` would bind the wrong value.
|
|
21
21
|
*/ function SceneRadioButtonField({ element }) {
|
|
22
|
+
// Use the same reader as CommandFormField's binding gate; that gate owns missing-property feedback.
|
|
23
|
+
const name = properties.stringProperty(element.properties, 'property');
|
|
22
24
|
const buttonValue = properties.stringProperty(element.properties, 'buttonValue') ?? properties.numberProperty(element.properties, 'buttonValue') ?? '';
|
|
23
25
|
return /*#__PURE__*/ jsxRuntime.jsx(CommandFormField.CommandFormField, {
|
|
24
26
|
element: element,
|
|
25
|
-
children: (binding)
|
|
27
|
+
children: (binding)=>name !== undefined && /*#__PURE__*/ jsxRuntime.jsx(RadioButtonField, {
|
|
26
28
|
...binding,
|
|
29
|
+
name: name,
|
|
27
30
|
buttonValue: buttonValue,
|
|
28
31
|
label: properties.stringProperty(element.properties, 'label'),
|
|
29
32
|
className: properties.stringProperty(element.properties, 'className')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneRadioButtonField.js","sources":["../../../../forms/fields/SceneRadioButtonField.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 { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioButtonField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioButtonField }));\n\n/**\n * The `Cratis.Components:radioButtonField` component - `RadioButtonField` from\n * `@cratis/components/CommandForm`.\n *\n * One button of a mutually exclusive set, for a screen that needs the choices placed individually rather\n * than as a block. `buttonValue` is the value this particular button writes to the bound property, and\n * the whole set is tied together by every button naming the same `property`.\n *\n * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a\n * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.\n */\nexport function SceneRadioButtonField({ element }: RegisteredComponentProps) {\n const buttonValue = stringProperty(element.properties, 'buttonValue') ?? numberProperty(element.properties, 'buttonValue') ?? '';\n\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioButtonField\n {...binding}\n buttonValue={buttonValue}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioButtonField","lazy","default","SceneRadioButtonField","element","
|
|
1
|
+
{"version":3,"file":"SceneRadioButtonField.js","sources":["../../../../forms/fields/SceneRadioButtonField.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 { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioButtonField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioButtonField }));\n\n/**\n * The `Cratis.Components:radioButtonField` component - `RadioButtonField` from\n * `@cratis/components/CommandForm`.\n *\n * One button of a mutually exclusive set, for a screen that needs the choices placed individually rather\n * than as a block. `buttonValue` is the value this particular button writes to the bound property, and\n * the whole set is tied together by every button naming the same `property`.\n *\n * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a\n * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.\n */\nexport function SceneRadioButtonField({ element }: RegisteredComponentProps) {\n // Use the same reader as CommandFormField's binding gate; that gate owns missing-property feedback.\n const name = stringProperty(element.properties, 'property');\n const buttonValue = stringProperty(element.properties, 'buttonValue') ?? numberProperty(element.properties, 'buttonValue') ?? '';\n\n return (\n <CommandFormField element={element}>\n {binding => name !== undefined && (\n <RadioButtonField\n {...binding}\n name={name}\n buttonValue={buttonValue}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioButtonField","lazy","default","SceneRadioButtonField","element","name","stringProperty","properties","buttonValue","numberProperty","_jsx","CommandFormField","binding","undefined","label","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;AAUC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;;AAEvE,IAAA,MAAMC,IAAAA,GAAOC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,UAAA,CAAA;IAChD,MAAMC,WAAAA,GAAcF,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,kBAAkBE,yBAAAA,CAAeL,OAAAA,CAAQG,UAAU,EAAE,aAAA,CAAA,IAAkB,EAAA;AAE9H,IAAA,qBACIG,cAAA,CAACC,iCAAAA,EAAAA;QAAiBP,OAAAA,EAASA,OAAAA;kBACtBQ,CAAAA,OAAAA,GAAWP,IAAAA,KAASQ,SAAAA,kBACjBH,cAAA,CAACV,gBAAAA,EAAAA;AACI,gBAAA,GAAGY,OAAO;gBACXP,IAAAA,EAAMA,IAAAA;gBACNG,WAAAA,EAAaA,WAAAA;gBACbM,KAAAA,EAAOR,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA;gBAC1CQ,SAAAA,EAAWT,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -10,6 +10,7 @@ var ArcRuntimeBoundary = require('./bindings/ArcRuntimeBoundary.js');
|
|
|
10
10
|
var ScenePage = require('./pages/ScenePage.js');
|
|
11
11
|
var SceneDataPage = require('./pages/SceneDataPage.js');
|
|
12
12
|
var SceneFormElement = require('./pages/SceneFormElement.js');
|
|
13
|
+
var SceneSingleResult = require('./data/SceneSingleResult.js');
|
|
13
14
|
var SceneDataTable = require('./data/SceneDataTable.js');
|
|
14
15
|
var SceneObservableDataTable = require('./data/SceneObservableDataTable.js');
|
|
15
16
|
var SceneCommandForm = require('./forms/SceneCommandForm.js');
|
|
@@ -78,6 +79,7 @@ exports.ArcRuntimeBoundary = ArcRuntimeBoundary.ArcRuntimeBoundary;
|
|
|
78
79
|
exports.ScenePage = ScenePage.ScenePage;
|
|
79
80
|
exports.SceneDataPage = SceneDataPage.SceneDataPage;
|
|
80
81
|
exports.SceneFormElement = SceneFormElement.SceneFormElement;
|
|
82
|
+
exports.SceneSingleResult = SceneSingleResult.SceneSingleResult;
|
|
81
83
|
exports.SceneDataTable = SceneDataTable.SceneDataTable;
|
|
82
84
|
exports.SceneObservableDataTable = SceneObservableDataTable.SceneObservableDataTable;
|
|
83
85
|
exports.SceneCommandForm = SceneCommandForm.SceneCommandForm;
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -9,7 +9,7 @@ var ArcRuntimeBoundary = require('../bindings/ArcRuntimeBoundary.js');
|
|
|
9
9
|
var properties = require('../properties.js');
|
|
10
10
|
|
|
11
11
|
const DataPage = /*#__PURE__*/ react.lazy(async ()=>({
|
|
12
|
-
default: (await
|
|
12
|
+
default: (await Promise.resolve().then(function () { return require('../bindings/ArcBoundComponents.js'); })).BoundDataPage
|
|
13
13
|
}));
|
|
14
14
|
/**
|
|
15
15
|
* The `Cratis.Components:dataPage` component - `DataPage` from `@cratis/components/DataPage`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDataPage.js","sources":["../../../pages/SceneDataPage.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 DataPage = lazy(async () => ({ default: (await import('
|
|
1
|
+
{"version":3,"file":"SceneDataPage.js","sources":["../../../pages/SceneDataPage.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 DataPage = lazy(async () => ({ default: (await import('../bindings/ArcBoundComponents')).BoundDataPage }));\n\n/**\n * The `Cratis.Components:dataPage` component - `DataPage` from `@cratis/components/DataPage`.\n *\n * The library's whole list-screen composite in one name: title bar, action toolbar, filterable table and\n * optional details pane, all driven from a single query. It is the single highest-leverage thing this\n * package exposes, because reproducing it out of `table` and `toolbar` in a screen would be pages of\n * modeling for a worse result.\n *\n * The `query` property names an Arc query proxy; the columns and menu items come from the `content`\n * slot as `DataPage.Columns` / `DataPage.MenuItems` children.\n *\n * No `clientFiltering` property, for the same reason `dataTable` no longer exposes one: 3.0.0 keeps the\n * prop so call sites compile but never reads it, and a screen setting that cannot take effect is a worse\n * thing to offer than nothing.\n */\nexport function SceneDataPage({ 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 <DataPage\n title={stringProperty(element.properties, 'title') ?? ''}\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n >\n {slots.content}\n </DataPage>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataPage","lazy","default","BoundDataPage","SceneDataPage","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","query","emptyMessage","dataKey","globalFilterFields","stringArrayProperty","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,QAAAA,iBAAWC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,oDAAO,mCAAA,KAAgC,EAAGC;KAAc,CAAA,CAAA;AAE7G;;;;;;;;;;;;;;AAcC,IACM,SAASC,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACtE,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,QAAAA,EAAAA;AACGgB,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,KAAAA,EAAOX,MAAAA;AACPY,YAAAA,YAAAA,EAAcH,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEG,OAAAA,EAASJ,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CI,kBAAAA,EAAoBC,8BAAAA,CAAoBlB,OAAAA,CAAQa,UAAU,EAAE,oBAAA,CAAA;AAE3DZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import { DataTableForQuery, DataTableForObservableQuery } from '@cratis/components/DataTables';
|
|
3
|
+
import { DataPage } from '@cratis/components/DataPage';
|
|
4
|
+
import { CommandDialog, StepperCommandDialog } from '@cratis/components/CommandDialog';
|
|
5
|
+
import type { BoundConstructor } from './BoundConstructor';
|
|
6
|
+
type QueryProps<T> = Omit<T, 'query'> & {
|
|
7
|
+
query: BoundConstructor;
|
|
8
|
+
};
|
|
9
|
+
type CommandProps<T> = Omit<T, 'command'> & {
|
|
10
|
+
command: BoundConstructor;
|
|
11
|
+
};
|
|
12
|
+
export declare function BoundDataTable({ query, ...props }: QueryProps<ComponentProps<typeof DataTableForQuery>>): import("react").JSX.Element;
|
|
13
|
+
export declare function BoundObservableDataTable({ query, ...props }: QueryProps<ComponentProps<typeof DataTableForObservableQuery>>): import("react").JSX.Element;
|
|
14
|
+
export declare function BoundDataPage({ query, ...props }: QueryProps<ComponentProps<typeof DataPage>>): import("react").JSX.Element;
|
|
15
|
+
export declare function BoundCommandDialog({ command, ...props }: CommandProps<ComponentProps<typeof CommandDialog>>): import("react").JSX.Element;
|
|
16
|
+
export declare function BoundStepperCommandDialog({ command, ...props }: CommandProps<ComponentProps<typeof StepperCommandDialog>>): import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=ArcBoundComponents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArcBoundComponents.d.ts","sourceRoot":"","sources":["../../../bindings/ArcBoundComponents.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAE,iBAAiB,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC/F,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAG3D,KAAK,UAAU,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,EAAE,gBAAgB,CAAA;CAAE,CAAC;AACpE,KAAK,YAAY,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG;IAAE,OAAO,EAAE,gBAAgB,CAAA;CAAE,CAAC;AAI1E,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,CAAC,+BAEvG;AAED,wBAAgB,wBAAwB,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,CAAC,cAAc,CAAC,OAAO,2BAA2B,CAAC,CAAC,+BAE3H;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,CAAC,+BAK7F;AAED,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,+BAE3G;AAED,wBAAgB,yBAAyB,CAAC,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,CAAC,+BAEzH"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ObservableQueryFor, QueryFor } from '@cratis/arc/queries';
|
|
3
|
+
import { Command } from '@cratis/arc/commands';
|
|
4
|
+
import { DataTableForObservableQuery, DataTableForQuery } from '@cratis/components/DataTables';
|
|
5
|
+
import { DataPage } from '@cratis/components/DataPage';
|
|
6
|
+
import { StepperCommandDialog, CommandDialog } from '@cratis/components/CommandDialog';
|
|
7
|
+
import { requireArcProxy } from './requireArcProxy.js';
|
|
8
|
+
|
|
9
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
10
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
11
|
+
// Runtime-only module: import dynamically beneath ArcRuntimeBoundary, never through the barrel.
|
|
12
|
+
// Scene carries property names and argument objects, not compile-time row schemas. These adapters
|
|
13
|
+
// support generated object/collection queries, as required by the Components public prop contracts.
|
|
14
|
+
function BoundDataTable({ query, ...props }) {
|
|
15
|
+
return /*#__PURE__*/ jsx(DataTableForQuery, {
|
|
16
|
+
...props,
|
|
17
|
+
query: requireArcProxy(query, QueryFor, 'query')
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function BoundObservableDataTable({ query, ...props }) {
|
|
21
|
+
return /*#__PURE__*/ jsx(DataTableForObservableQuery, {
|
|
22
|
+
...props,
|
|
23
|
+
query: requireArcProxy(query, ObservableQueryFor, 'observable query')
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function BoundDataPage({ query, ...props }) {
|
|
27
|
+
const base = query.prototype instanceof ObservableQueryFor ? ObservableQueryFor : QueryFor;
|
|
28
|
+
// This chooses only the kind of the supplied constructor, never another registered binding.
|
|
29
|
+
const proxy = requireArcProxy(query, base, 'query');
|
|
30
|
+
return /*#__PURE__*/ jsx(DataPage, {
|
|
31
|
+
...props,
|
|
32
|
+
query: proxy
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function BoundCommandDialog({ command, ...props }) {
|
|
36
|
+
return /*#__PURE__*/ jsx(CommandDialog, {
|
|
37
|
+
...props,
|
|
38
|
+
command: requireArcProxy(command, Command, 'command')
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function BoundStepperCommandDialog({ command, ...props }) {
|
|
42
|
+
return /*#__PURE__*/ jsx(StepperCommandDialog, {
|
|
43
|
+
...props,
|
|
44
|
+
command: requireArcProxy(command, Command, 'command')
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { BoundCommandDialog, BoundDataPage, BoundDataTable, BoundObservableDataTable, BoundStepperCommandDialog };
|
|
49
|
+
//# sourceMappingURL=ArcBoundComponents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArcBoundComponents.js","sources":["../../../bindings/ArcBoundComponents.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\n// Runtime-only module: import dynamically beneath ArcRuntimeBoundary, never through the barrel.\nimport type { ComponentProps } from 'react';\nimport { QueryFor, ObservableQueryFor } from '@cratis/arc/queries';\nimport { Command } from '@cratis/arc/commands';\nimport { DataTableForQuery, DataTableForObservableQuery } from '@cratis/components/DataTables';\nimport { DataPage } from '@cratis/components/DataPage';\nimport { CommandDialog, StepperCommandDialog } from '@cratis/components/CommandDialog';\nimport type { BoundConstructor } from './BoundConstructor';\nimport { requireArcProxy } from './requireArcProxy';\n\ntype QueryProps<T> = Omit<T, 'query'> & { query: BoundConstructor };\ntype CommandProps<T> = Omit<T, 'command'> & { command: BoundConstructor };\n\n// Scene carries property names and argument objects, not compile-time row schemas. These adapters\n// support generated object/collection queries, as required by the Components public prop contracts.\nexport function BoundDataTable({ query, ...props }: QueryProps<ComponentProps<typeof DataTableForQuery>>) {\n return <DataTableForQuery {...props} query={requireArcProxy(query, QueryFor<object, object>, 'query')} />;\n}\n\nexport function BoundObservableDataTable({ query, ...props }: QueryProps<ComponentProps<typeof DataTableForObservableQuery>>) {\n return <DataTableForObservableQuery {...props} query={requireArcProxy(query, ObservableQueryFor<object, object>, 'observable query')} />;\n}\n\nexport function BoundDataPage({ query, ...props }: QueryProps<ComponentProps<typeof DataPage>>) {\n const base = query.prototype instanceof ObservableQueryFor ? ObservableQueryFor<object, object> : QueryFor<object, object>;\n // This chooses only the kind of the supplied constructor, never another registered binding.\n const proxy = requireArcProxy<QueryFor<object, object> | ObservableQueryFor<object, object>>(query, base, 'query');\n return <DataPage {...props} query={proxy} />;\n}\n\nexport function BoundCommandDialog({ command, ...props }: CommandProps<ComponentProps<typeof CommandDialog>>) {\n return <CommandDialog {...props} command={requireArcProxy(command, Command<object, object>, 'command')} />;\n}\n\nexport function BoundStepperCommandDialog({ command, ...props }: CommandProps<ComponentProps<typeof StepperCommandDialog>>) {\n return <StepperCommandDialog {...props} command={requireArcProxy(command, Command<object, object>, 'command')} />;\n}\n"],"names":["BoundDataTable","query","props","_jsx","DataTableForQuery","requireArcProxy","QueryFor","BoundObservableDataTable","DataTableForObservableQuery","ObservableQueryFor","BoundDataPage","base","prototype","proxy","DataPage","BoundCommandDialog","command","CommandDialog","Command","BoundStepperCommandDialog","StepperCommandDialog"],"mappings":";;;;;;;;AAAA;AACA;AAEA;AAaA;AACA;AACO,SAASA,cAAAA,CAAe,EAAEC,KAAK,EAAE,GAAGC,KAAAA,EAA6D,EAAA;AACpG,IAAA,qBAAOC,GAAA,CAACC,iBAAAA,EAAAA;AAAmB,QAAA,GAAGF,KAAK;QAAED,KAAAA,EAAOI,eAAAA,CAAgBJ,OAAOK,QAAAA,EAA0B,OAAA;;AACjG;AAEO,SAASC,wBAAAA,CAAyB,EAAEN,KAAK,EAAE,GAAGC,KAAAA,EAAuE,EAAA;AACxH,IAAA,qBAAOC,GAAA,CAACK,2BAAAA,EAAAA;AAA6B,QAAA,GAAGN,KAAK;QAAED,KAAAA,EAAOI,eAAAA,CAAgBJ,OAAOQ,kBAAAA,EAAoC,kBAAA;;AACrH;AAEO,SAASC,aAAAA,CAAc,EAAET,KAAK,EAAE,GAAGC,KAAAA,EAAoD,EAAA;AAC1F,IAAA,MAAMS,IAAAA,GAAOV,KAAAA,CAAMW,SAAS,YAAYH,qBAAqBA,kBAAAA,GAAqCH,QAAAA;;IAElG,MAAMO,KAAAA,GAAQR,eAAAA,CAA+EJ,KAAAA,EAAOU,IAAAA,EAAM,OAAA,CAAA;AAC1G,IAAA,qBAAOR,GAAA,CAACW,QAAAA,EAAAA;AAAU,QAAA,GAAGZ,KAAK;QAAED,KAAAA,EAAOY;;AACvC;AAEO,SAASE,kBAAAA,CAAmB,EAAEC,OAAO,EAAE,GAAGd,KAAAA,EAA2D,EAAA;AACxG,IAAA,qBAAOC,GAAA,CAACc,aAAAA,EAAAA;AAAe,QAAA,GAAGf,KAAK;QAAEc,OAAAA,EAASX,eAAAA,CAAgBW,SAASE,OAAAA,EAAyB,SAAA;;AAChG;AAEO,SAASC,yBAAAA,CAA0B,EAAEH,OAAO,EAAE,GAAGd,KAAAA,EAAkE,EAAA;AACtH,IAAA,qBAAOC,GAAA,CAACiB,oBAAAA,EAAAA;AAAsB,QAAA,GAAGlB,KAAK;QAAEc,OAAAA,EAASX,eAAAA,CAAgBW,SAASE,OAAAA,EAAyB,SAAA;;AACvG;;"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { QueryFor, ObservableQueryFor } from '@cratis/arc/queries';
|
|
2
|
+
import { Command } from '@cratis/arc/commands';
|
|
3
|
+
export declare class Snapshot extends QueryFor<object[], {
|
|
4
|
+
projectId: string;
|
|
5
|
+
}> {
|
|
6
|
+
readonly route = "/projects";
|
|
7
|
+
readonly parameterDescriptors: never[];
|
|
8
|
+
readonly requiredRequestParameters: string[];
|
|
9
|
+
defaultValue: never[];
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
12
|
+
export declare class Live extends ObservableQueryFor<object[], object> {
|
|
13
|
+
readonly route = "/projects";
|
|
14
|
+
readonly parameterDescriptors: never[];
|
|
15
|
+
readonly requiredRequestParameters: never[];
|
|
16
|
+
readonly defaultValue: never[];
|
|
17
|
+
constructor();
|
|
18
|
+
}
|
|
19
|
+
export declare class Save extends Command {
|
|
20
|
+
readonly route = "/save";
|
|
21
|
+
readonly propertyDescriptors: never[];
|
|
22
|
+
readonly requestParameters: never[];
|
|
23
|
+
constructor();
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=NativeProxies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeProxies.d.ts","sourceRoot":"","sources":["../../../../bindings/for_requireArcProxy/NativeProxies.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,qBAAa,QAAS,SAAQ,QAAQ,CAAC,MAAM,EAAE,EAAE;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;IACnE,QAAQ,CAAC,KAAK,eAAe;IAC7B,QAAQ,CAAC,oBAAoB,UAAM;IACnC,QAAQ,CAAC,yBAAyB,WAAiB;IACnD,YAAY,UAAM;IAClB,cAA4F;CAC/F;AAED,qBAAa,IAAK,SAAQ,kBAAkB,CAAC,MAAM,EAAE,EAAE,MAAM,CAAC;IAC1D,QAAQ,CAAC,KAAK,eAAe;IAC7B,QAAQ,CAAC,oBAAoB,UAAM;IACnC,QAAQ,CAAC,yBAAyB,UAAM;IACxC,QAAQ,CAAC,YAAY,UAAM;IAC3B,cAA4F;CAC/F;AAED,qBAAa,IAAK,SAAQ,OAAO;IAC7B,QAAQ,CAAC,KAAK,WAAW;IACzB,QAAQ,CAAC,mBAAmB,UAAM;IAClC,QAAQ,CAAC,iBAAiB,UAAM;IAChC,cAA6F;CAChG"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { QueryFor, ObservableQueryFor } from '@cratis/arc/queries';
|
|
2
|
+
import { Command } from '@cratis/arc/commands';
|
|
3
|
+
export class Snapshot extends QueryFor {
|
|
4
|
+
route = '/projects';
|
|
5
|
+
parameterDescriptors = [];
|
|
6
|
+
requiredRequestParameters = ['projectId'];
|
|
7
|
+
defaultValue = [];
|
|
8
|
+
constructor() { super(Object, true); throw new Error('Must not construct during binding'); }
|
|
9
|
+
}
|
|
10
|
+
export class Live extends ObservableQueryFor {
|
|
11
|
+
route = '/projects';
|
|
12
|
+
parameterDescriptors = [];
|
|
13
|
+
requiredRequestParameters = [];
|
|
14
|
+
defaultValue = [];
|
|
15
|
+
constructor() { super(Object, true); throw new Error('Must not construct during binding'); }
|
|
16
|
+
}
|
|
17
|
+
export class Save extends Command {
|
|
18
|
+
route = '/save';
|
|
19
|
+
propertyDescriptors = [];
|
|
20
|
+
requestParameters = [];
|
|
21
|
+
constructor() { super(Object, false); throw new Error('Must not construct during binding'); }
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=NativeProxies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeProxies.js","sourceRoot":"","sources":["../../../../bindings/for_requireArcProxy/NativeProxies.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAE/C,MAAM,OAAO,QAAS,SAAQ,QAAyC;IAC1D,KAAK,GAAG,WAAW,CAAC;IACpB,oBAAoB,GAAG,EAAE,CAAC;IAC1B,yBAAyB,GAAG,CAAC,WAAW,CAAC,CAAC;IACnD,YAAY,GAAG,EAAE,CAAC;IAClB,gBAAgB,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC,CAAC;CAC/F;AAED,MAAM,OAAO,IAAK,SAAQ,kBAAoC;IACjD,KAAK,GAAG,WAAW,CAAC;IACpB,oBAAoB,GAAG,EAAE,CAAC;IAC1B,yBAAyB,GAAG,EAAE,CAAC;IAC/B,YAAY,GAAG,EAAE,CAAC;IAC3B,gBAAgB,KAAK,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC,CAAC;CAC/F;AAED,MAAM,OAAO,IAAK,SAAQ,OAAO;IACpB,KAAK,GAAG,OAAO,CAAC;IAChB,mBAAmB,GAAG,EAAE,CAAC;IACzB,iBAAiB,GAAG,EAAE,CAAC;IAChC,gBAAgB,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC,CAAC,CAAC;CAChG"}
|