@cratis/scene.components 3.1.0 → 3.3.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/dist/cjs/bindings/ArcRuntimeBoundary.js.map +1 -1
- package/dist/cjs/bindings/BindingKind.js.map +1 -1
- package/dist/cjs/bindings/MissingBinding.js.map +1 -1
- package/dist/cjs/bindings/Placeholder.js.map +1 -1
- package/dist/cjs/bindings/bindingRegistry.js.map +1 -1
- package/dist/cjs/bindings/resolveElementBinding.js.map +1 -1
- package/dist/cjs/common/SceneDropdown.js.map +1 -1
- package/dist/cjs/common/SceneErrorBoundary.js.map +1 -1
- package/dist/cjs/common/SceneIcon.js.map +1 -1
- package/dist/cjs/common/SceneTooltip.js.map +1 -1
- package/dist/cjs/cratisComponents.js.map +1 -1
- package/dist/cjs/cratisComponentsPackage.js.map +1 -1
- package/dist/cjs/data/SceneDataTable.js.map +1 -1
- package/dist/cjs/data/SceneObservableDataTable.js.map +1 -1
- package/dist/cjs/dialogs/SceneBusyIndicatorDialog.js.map +1 -1
- package/dist/cjs/dialogs/SceneCommandDialog.js.map +1 -1
- package/dist/cjs/dialogs/SceneConfirmationDialog.js.map +1 -1
- package/dist/cjs/dialogs/SceneDialog.js.map +1 -1
- package/dist/cjs/dialogs/SceneStepperCommandDialog.js.map +1 -1
- package/dist/cjs/editors/SceneFilterPanel.js.map +1 -1
- package/dist/cjs/editors/SceneObjectContentEditor.js.map +1 -1
- package/dist/cjs/editors/SceneObjectNavigationalBar.js.map +1 -1
- package/dist/cjs/editors/SceneSchemaEditor.js.map +1 -1
- package/dist/cjs/editors/SceneTimeMachine.js.map +1 -1
- package/dist/cjs/editors/filterDefinitions.js.map +1 -1
- package/dist/cjs/editors/timeMachineVersions.js.map +1 -1
- package/dist/cjs/editors/useEditableCopy.js.map +1 -1
- package/dist/cjs/forms/SceneCommandForm.js.map +1 -1
- package/dist/cjs/forms/fields/CommandFormField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneCalendarField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneCheckboxField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneChipsField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneColorPickerField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneDropdownField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneInputTextField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneMultiSelectField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneNumberField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneRadioButtonField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneRadioGroupField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneSliderField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneTextAreaField.js.map +1 -1
- package/dist/cjs/forms/fields/resolveFieldBinding.js.map +1 -1
- package/dist/cjs/pages/SceneDataPage.js.map +1 -1
- package/dist/cjs/pages/SceneFormElement.js.map +1 -1
- package/dist/cjs/pages/ScenePage.js.map +1 -1
- package/dist/cjs/properties.js.map +1 -1
- package/dist/cjs/toolbar/SceneToolbar.js.map +1 -1
- package/dist/cjs/toolbar/SceneToolbarButton.js.map +1 -1
- package/dist/cjs/toolbar/SceneToolbarGroup.js.map +1 -1
- package/dist/cjs/toolbar/SceneToolbarSeparator.js.map +1 -1
- package/dist/esm/bindings/ArcRuntimeBoundary.js.map +1 -1
- package/dist/esm/bindings/BindingKind.js.map +1 -1
- package/dist/esm/bindings/MissingBinding.js.map +1 -1
- package/dist/esm/bindings/Placeholder.js.map +1 -1
- package/dist/esm/bindings/bindingRegistry.js.map +1 -1
- package/dist/esm/bindings/resolveElementBinding.js.map +1 -1
- package/dist/esm/common/SceneDropdown.js.map +1 -1
- package/dist/esm/common/SceneErrorBoundary.js.map +1 -1
- package/dist/esm/common/SceneIcon.js.map +1 -1
- package/dist/esm/common/SceneTooltip.js.map +1 -1
- package/dist/esm/cratisComponents.js.map +1 -1
- package/dist/esm/cratisComponentsPackage.js.map +1 -1
- package/dist/esm/data/SceneDataTable.js.map +1 -1
- package/dist/esm/data/SceneObservableDataTable.js.map +1 -1
- package/dist/esm/dialogs/SceneBusyIndicatorDialog.js.map +1 -1
- package/dist/esm/dialogs/SceneCommandDialog.js.map +1 -1
- package/dist/esm/dialogs/SceneConfirmationDialog.js.map +1 -1
- package/dist/esm/dialogs/SceneDialog.js.map +1 -1
- package/dist/esm/dialogs/SceneStepperCommandDialog.js.map +1 -1
- package/dist/esm/editors/SceneFilterPanel.js.map +1 -1
- package/dist/esm/editors/SceneObjectContentEditor.js.map +1 -1
- package/dist/esm/editors/SceneObjectNavigationalBar.js.map +1 -1
- package/dist/esm/editors/SceneSchemaEditor.js.map +1 -1
- package/dist/esm/editors/SceneTimeMachine.js.map +1 -1
- package/dist/esm/editors/filterDefinitions.js.map +1 -1
- package/dist/esm/editors/timeMachineVersions.js.map +1 -1
- package/dist/esm/editors/useEditableCopy.js.map +1 -1
- package/dist/esm/forms/SceneCommandForm.js.map +1 -1
- package/dist/esm/forms/fields/CommandFormField.js.map +1 -1
- package/dist/esm/forms/fields/SceneCalendarField.js.map +1 -1
- package/dist/esm/forms/fields/SceneCheckboxField.js.map +1 -1
- package/dist/esm/forms/fields/SceneChipsField.js.map +1 -1
- package/dist/esm/forms/fields/SceneColorPickerField.js.map +1 -1
- package/dist/esm/forms/fields/SceneDropdownField.js.map +1 -1
- package/dist/esm/forms/fields/SceneInputTextField.js.map +1 -1
- package/dist/esm/forms/fields/SceneMultiSelectField.js.map +1 -1
- package/dist/esm/forms/fields/SceneNumberField.js.map +1 -1
- package/dist/esm/forms/fields/SceneRadioButtonField.js.map +1 -1
- package/dist/esm/forms/fields/SceneRadioGroupField.js.map +1 -1
- package/dist/esm/forms/fields/SceneSliderField.js.map +1 -1
- package/dist/esm/forms/fields/SceneTextAreaField.js.map +1 -1
- package/dist/esm/forms/fields/resolveFieldBinding.js.map +1 -1
- package/dist/esm/pages/SceneDataPage.js.map +1 -1
- package/dist/esm/pages/SceneFormElement.js.map +1 -1
- package/dist/esm/pages/ScenePage.js.map +1 -1
- package/dist/esm/properties.js.map +1 -1
- package/dist/esm/toolbar/SceneToolbar.js.map +1 -1
- package/dist/esm/toolbar/SceneToolbarButton.js.map +1 -1
- package/dist/esm/toolbar/SceneToolbarGroup.js.map +1 -1
- package/dist/esm/toolbar/SceneToolbarSeparator.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArcRuntimeBoundary.js","sources":["../../../bindings/ArcRuntimeBoundary.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 { ReactNode, Suspense } from 'react';\nimport { ErrorBoundary } from '@cratis/components/Common';\n\nexport interface ArcRuntimeBoundaryProps {\n /** The lazily loaded, Arc-bound content this boundary isolates. */\n children: ReactNode;\n}\n\n/**\n * Isolates one Arc-bound component so that neither loading it nor failing to load it can take the\n * surrounding screen down with it.\n *\n * The Arc-bound half of `@cratis/components` - `DataPage`, the data tables, `CommandForm` and its\n * fields, every dialog - reaches `@cratis/arc` and `@cratis/arc.react` at import time. Those are peer\n * dependencies the *host* supplies, and a design surface is not a host: Studio previews a screen without\n * an Arc client, without a backend, and often without a single binding registered. This package\n * therefore imports every Arc-bound component through a dynamic `import()` rather than a static one, so\n * that a screen made only of the library's Arc-free components never pulls the Arc runtime in at all.\n *\n * That deferral has two visible states, and this covers both: `Suspense` while the chunk is in flight,\n * and the library's own `ErrorBoundary` when it cannot be loaded - which is what a host without Arc\n * installed will see. One dashed-out region, not a blank screen and not a thrown render.\n *\n * `ErrorBoundary` is used by composition rather than by writing another one: an error boundary is the\n * one thing React still requires a class for, and `@cratis/components` already ships that class.\n */\nexport function ArcRuntimeBoundary({ children }: ArcRuntimeBoundaryProps) {\n return (\n <ErrorBoundary>\n <Suspense fallback={<span data-scene-arc-loading=''>Loading</span>}>{children}</Suspense>\n </ErrorBoundary>\n );\n}\n"],"names":["ArcRuntimeBoundary","children","_jsx","ErrorBoundary","Suspense","fallback","span","data-scene-arc-loading"],"mappings":";;;;;;AAWA;;;;;;;;;;;;;;;;;AAiBC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,QAAQ,EAA2B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,oBAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACE,cAAAA,EAAAA;AAASC,YAAAA,QAAAA,gBAAUH,cAAA,CAACI,MAAAA,EAAAA;gBAAKC,wBAAAA,EAAuB,EAAA;AAAG,gBAAA,QAAA,EAAA;;AAAiBN,YAAAA,QAAAA,EAAAA;;;AAGjF
|
|
1
|
+
{"version":3,"file":"ArcRuntimeBoundary.js","sources":["../../../bindings/ArcRuntimeBoundary.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 { ReactNode, Suspense } from 'react';\nimport { ErrorBoundary } from '@cratis/components/Common';\n\nexport interface ArcRuntimeBoundaryProps {\n /** The lazily loaded, Arc-bound content this boundary isolates. */\n children: ReactNode;\n}\n\n/**\n * Isolates one Arc-bound component so that neither loading it nor failing to load it can take the\n * surrounding screen down with it.\n *\n * The Arc-bound half of `@cratis/components` - `DataPage`, the data tables, `CommandForm` and its\n * fields, every dialog - reaches `@cratis/arc` and `@cratis/arc.react` at import time. Those are peer\n * dependencies the *host* supplies, and a design surface is not a host: Studio previews a screen without\n * an Arc client, without a backend, and often without a single binding registered. This package\n * therefore imports every Arc-bound component through a dynamic `import()` rather than a static one, so\n * that a screen made only of the library's Arc-free components never pulls the Arc runtime in at all.\n *\n * That deferral has two visible states, and this covers both: `Suspense` while the chunk is in flight,\n * and the library's own `ErrorBoundary` when it cannot be loaded - which is what a host without Arc\n * installed will see. One dashed-out region, not a blank screen and not a thrown render.\n *\n * `ErrorBoundary` is used by composition rather than by writing another one: an error boundary is the\n * one thing React still requires a class for, and `@cratis/components` already ships that class.\n */\nexport function ArcRuntimeBoundary({ children }: ArcRuntimeBoundaryProps) {\n return (\n <ErrorBoundary>\n <Suspense fallback={<span data-scene-arc-loading=''>Loading</span>}>{children}</Suspense>\n </ErrorBoundary>\n );\n}\n"],"names":["ArcRuntimeBoundary","children","_jsx","ErrorBoundary","Suspense","fallback","span","data-scene-arc-loading"],"mappings":";;;;;;AAWA;;;;;;;;;;;;;;;;;AAiBC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,QAAQ,EAA2B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,oBAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACE,cAAAA,EAAAA;AAASC,YAAAA,QAAAA,gBAAUH,cAAA,CAACI,MAAAA,EAAAA;gBAAKC,wBAAAA,EAAuB,EAAA;AAAG,gBAAA,QAAA,EAAA;;AAAiBN,YAAAA,QAAAA,EAAAA;;;AAGjF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BindingKind.js","sources":["../../../bindings/BindingKind.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\n/**\n * What a name in a screen is expected to resolve to when it is looked up in the binding registry.\n *\n * Queries and commands are kept apart rather than sharing one namespace because they are opposite halves\n * of CQRS and a screen means exactly one of them at each site: `data Invoices via query AllInvoices`\n * cannot be satisfied by a command of the same name, and letting it be satisfied would turn a modeling\n * mistake into a runtime one.\n */\nexport enum BindingKind {\n /** An Arc query proxy - what a data table or data page reads its rows from. */\n Query = 'query',\n\n /** An Arc command proxy - what a command form or command dialog submits. */\n Command = 'command',\n}\n"],"names":["BindingKind"],"mappings":";;AAAA;AACA;AAEA;;;;;;;IAQO,IAAKA,WAAAA,iBAAAA,SAAAA,WAAAA,EAAAA;oFACqE,WAAA,CAAA,OAAA,CAAA,GAAA,OAAA;iFAGH,WAAA,CAAA,SAAA,CAAA,GAAA,SAAA;AAJlEA,IAAAA,OAAAA,WAAAA;AAMX,CAAA,CAAA,EAAA
|
|
1
|
+
{"version":3,"file":"BindingKind.js","sources":["../../../bindings/BindingKind.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\n/**\n * What a name in a screen is expected to resolve to when it is looked up in the binding registry.\n *\n * Queries and commands are kept apart rather than sharing one namespace because they are opposite halves\n * of CQRS and a screen means exactly one of them at each site: `data Invoices via query AllInvoices`\n * cannot be satisfied by a command of the same name, and letting it be satisfied would turn a modeling\n * mistake into a runtime one.\n */\nexport enum BindingKind {\n /** An Arc query proxy - what a data table or data page reads its rows from. */\n Query = 'query',\n\n /** An Arc command proxy - what a command form or command dialog submits. */\n Command = 'command',\n}\n"],"names":["BindingKind"],"mappings":";;AAAA;AACA;AAEA;;;;;;;IAQO,IAAKA,WAAAA,iBAAAA,SAAAA,WAAAA,EAAAA;oFACqE,WAAA,CAAA,OAAA,CAAA,GAAA,OAAA;iFAGH,WAAA,CAAA,SAAA,CAAA,GAAA,SAAA;AAJlEA,IAAAA,OAAAA,WAAAA;AAMX,CAAA,CAAA,EAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MissingBinding.js","sources":["../../../bindings/MissingBinding.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 { ExternalComponent } from '@cratis/scene.model';\nimport { BindingKind } from './BindingKind';\nimport { Placeholder } from './Placeholder';\n\nexport interface MissingBindingProps {\n /** The element whose binding could not be satisfied. */\n element: ExternalComponent;\n\n /** Whether a query or a command was wanted. */\n kind: BindingKind;\n\n /**\n * The name the screen asked for, or `undefined` when the screen never named one. The two are\n * different mistakes and get different messages - a screen that names `AllInvoices` needs the host\n * to register it, while a screen that names nothing needs editing.\n */\n name?: string;\n}\n\n/**\n * The placeholder an Arc-bound adapter renders instead of its real component when the binding it needs\n * is not available.\n *\n * It names the binding, because that is the only actionable part: the fix is either to register that\n * name in the host or to correct the name in the screen, and the message has to be enough to tell those\n * two apart without opening a debugger.\n */\nexport function MissingBinding({ element, kind, name }: MissingBindingProps) {\n const problem = name === undefined ? `Missing ${kind} binding` : `Unresolved ${kind} binding '${name}'`;\n return <Placeholder element={element} problem={problem} />;\n}\n"],"names":["MissingBinding","element","kind","name","problem","undefined","_jsx","Placeholder"],"mappings":";;;;;AAAA;AACA;AAqBA;;;;;;;IAQO,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAuB,EAAA;AACvE,IAAA,MAAMC,UAAUD,IAAAA,KAASE,SAAAA,GAAY,CAAC,QAAQ,EAAEH,KAAK,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAEA,IAAAA,CAAK,UAAU,EAAEC,IAAAA,CAAK,CAAC,CAAC;AACvG,IAAA,qBAAOG,cAAA,CAACC,uBAAAA,EAAAA;QAAYN,OAAAA,EAASA,OAAAA;QAASG,OAAAA,EAASA;;AACnD
|
|
1
|
+
{"version":3,"file":"MissingBinding.js","sources":["../../../bindings/MissingBinding.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 { ExternalComponent } from '@cratis/scene.model';\nimport { BindingKind } from './BindingKind';\nimport { Placeholder } from './Placeholder';\n\nexport interface MissingBindingProps {\n /** The element whose binding could not be satisfied. */\n element: ExternalComponent;\n\n /** Whether a query or a command was wanted. */\n kind: BindingKind;\n\n /**\n * The name the screen asked for, or `undefined` when the screen never named one. The two are\n * different mistakes and get different messages - a screen that names `AllInvoices` needs the host\n * to register it, while a screen that names nothing needs editing.\n */\n name?: string;\n}\n\n/**\n * The placeholder an Arc-bound adapter renders instead of its real component when the binding it needs\n * is not available.\n *\n * It names the binding, because that is the only actionable part: the fix is either to register that\n * name in the host or to correct the name in the screen, and the message has to be enough to tell those\n * two apart without opening a debugger.\n */\nexport function MissingBinding({ element, kind, name }: MissingBindingProps) {\n const problem = name === undefined ? `Missing ${kind} binding` : `Unresolved ${kind} binding '${name}'`;\n return <Placeholder element={element} problem={problem} />;\n}\n"],"names":["MissingBinding","element","kind","name","problem","undefined","_jsx","Placeholder"],"mappings":";;;;;AAAA;AACA;AAqBA;;;;;;;IAQO,SAASA,cAAAA,CAAe,EAAEC,OAAO,EAAEC,IAAI,EAAEC,IAAI,EAAuB,EAAA;AACvE,IAAA,MAAMC,UAAUD,IAAAA,KAASE,SAAAA,GAAY,CAAC,QAAQ,EAAEH,KAAK,QAAQ,CAAC,GAAG,CAAC,WAAW,EAAEA,IAAAA,CAAK,UAAU,EAAEC,IAAAA,CAAK,CAAC,CAAC;AACvG,IAAA,qBAAOG,cAAA,CAACC,uBAAAA,EAAAA;QAAYN,OAAAA,EAASA,OAAAA;QAASG,OAAAA,EAASA;;AACnD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.js","sources":["../../../bindings/Placeholder.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 { ExternalComponent } from '@cratis/scene.model';\n\nexport interface PlaceholderProps {\n /**\n * The element that could not be rendered as configured. Its `componentName` names what was being\n * rendered, which is most of what makes the placeholder actionable.\n */\n element: ExternalComponent;\n\n /**\n * What is wrong, phrased as the problem rather than the remedy - `Unresolved query binding 'AllInvoices'`.\n */\n problem: string;\n}\n\n/**\n * The stand-in an adapter renders when it has been given a screen it cannot honor - a binding name\n * nothing is registered under, or a required property the screen never set.\n *\n * Deliberately the same presentation as `UnresolvedComponent` in `@cratis/scene.react`: a dashed red box\n * that states the problem in monospace. They are the same class of failure seen at two different depths -\n * the renderer could not find the component, or the component could not find what it needs - and a\n * designer scanning a preview should recognize both instantly as \"something here is not wired up\".\n *\n * Rendering this rather than throwing is the whole point. Studio's design-time preview usually has no\n * bindings registered at all, and it still has to show a usable layout: one unbound table must cost one\n * dashed box, not the entire screen.\n */\nexport function Placeholder({ element, problem }: PlaceholderProps) {\n return (\n <div\n data-scene-id={element.id}\n data-scene-placeholder={element.componentName}\n style={{ border: '1px dashed red', color: 'red', padding: '0.25rem 0.5rem', fontFamily: 'monospace' }}\n >\n {problem} on {element.componentName}\n </div>\n );\n}\n"],"names":["Placeholder","element","problem","_jsxs","div","data-scene-id","id","data-scene-placeholder","componentName","style","border","color","padding","fontFamily"],"mappings":";;;;AAAA;AACA;AAiBA;;;;;;;;;;;;AAYC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAAEC,OAAO,EAAoB,EAAA;AAC9D,IAAA,qBACIC,eAAA,CAACC,KAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;AACzBC,QAAAA,wBAAAA,EAAwBN,QAAQO,aAAa;QAC7CC,KAAAA,EAAO;YAAEC,MAAAA,EAAQ,gBAAA;YAAkBC,KAAAA,EAAO,KAAA;YAAOC,OAAAA,EAAS,gBAAA;YAAkBC,UAAAA,EAAY;AAAY,SAAA;;AAEnGX,YAAAA,OAAAA;AAAQ,YAAA,MAAA;AAAKD,YAAAA,OAAAA,CAAQO;;;AAGlC
|
|
1
|
+
{"version":3,"file":"Placeholder.js","sources":["../../../bindings/Placeholder.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 { ExternalComponent } from '@cratis/scene.model';\n\nexport interface PlaceholderProps {\n /**\n * The element that could not be rendered as configured. Its `componentName` names what was being\n * rendered, which is most of what makes the placeholder actionable.\n */\n element: ExternalComponent;\n\n /**\n * What is wrong, phrased as the problem rather than the remedy - `Unresolved query binding 'AllInvoices'`.\n */\n problem: string;\n}\n\n/**\n * The stand-in an adapter renders when it has been given a screen it cannot honor - a binding name\n * nothing is registered under, or a required property the screen never set.\n *\n * Deliberately the same presentation as `UnresolvedComponent` in `@cratis/scene.react`: a dashed red box\n * that states the problem in monospace. They are the same class of failure seen at two different depths -\n * the renderer could not find the component, or the component could not find what it needs - and a\n * designer scanning a preview should recognize both instantly as \"something here is not wired up\".\n *\n * Rendering this rather than throwing is the whole point. Studio's design-time preview usually has no\n * bindings registered at all, and it still has to show a usable layout: one unbound table must cost one\n * dashed box, not the entire screen.\n */\nexport function Placeholder({ element, problem }: PlaceholderProps) {\n return (\n <div\n data-scene-id={element.id}\n data-scene-placeholder={element.componentName}\n style={{ border: '1px dashed red', color: 'red', padding: '0.25rem 0.5rem', fontFamily: 'monospace' }}\n >\n {problem} on {element.componentName}\n </div>\n );\n}\n"],"names":["Placeholder","element","problem","_jsxs","div","data-scene-id","id","data-scene-placeholder","componentName","style","border","color","padding","fontFamily"],"mappings":";;;;AAAA;AACA;AAiBA;;;;;;;;;;;;AAYC,IACM,SAASA,WAAAA,CAAY,EAAEC,OAAO,EAAEC,OAAO,EAAoB,EAAA;AAC9D,IAAA,qBACIC,eAAA,CAACC,KAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;AACzBC,QAAAA,wBAAAA,EAAwBN,QAAQO,aAAa;QAC7CC,KAAAA,EAAO;YAAEC,MAAAA,EAAQ,gBAAA;YAAkBC,KAAAA,EAAO,KAAA;YAAOC,OAAAA,EAAS,gBAAA;YAAkBC,UAAAA,EAAY;AAAY,SAAA;;AAEnGX,YAAAA,OAAAA;AAAQ,YAAA,MAAA;AAAKD,YAAAA,OAAAA,CAAQO;;;AAGlC;;"}
|
|
@@ -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\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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveElementBinding.js","sources":["../../../bindings/resolveElementBinding.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 { ExternalComponent } from '@cratis/scene.model';\nimport { stringProperty } from '../properties';\nimport { BindingKind } from './BindingKind';\nimport { ElementBinding } from './ElementBinding';\nimport { resolveCommand, resolveQuery } from './bindingRegistry';\n\n/**\n * The property an element carries its binding name in, per kind. Queries and commands use different\n * property names so a single element could in principle carry both - a command dialog launched from a\n * data page, say - without the two names colliding.\n */\nconst bindingPropertyNames: Record<BindingKind, string> = {\n [BindingKind.Query]: 'query',\n [BindingKind.Command]: 'command',\n};\n\n/**\n * Reads the binding name an element carries for the given kind and looks it up in the binding registry.\n *\n * Every Arc-bound adapter starts here, so the \"name in, class out\" step happens in exactly one place and\n * every adapter reports a missing binding the same way. Nothing throws: an absent property and an\n * unregistered name both come back as an {@link ElementBinding} with no `target`, which the adapter\n * turns into a visible placeholder.\n */\nexport function resolveElementBinding(element: ExternalComponent, kind: BindingKind): ElementBinding {\n const name = stringProperty(element.properties, bindingPropertyNames[kind]);\n if (name === undefined) return {};\n\n return { name, target: kind === BindingKind.Query ? resolveQuery(name) : resolveCommand(name) };\n}\n"],"names":["bindingPropertyNames","BindingKind","Query","Command","resolveElementBinding","element","kind","name","stringProperty","properties","undefined","target","resolveQuery","resolveCommand"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;AAIC,IACD,MAAMA,oBAAAA,GAAoD;IACtD,CAACC,uBAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,uBAAAA,CAAYE,OAAO,GAAG;AAC3B,CAAA;AAEA;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsBC,OAA0B,EAAEC,IAAiB,EAAA;AAC/E,IAAA,MAAMC,OAAOC,yBAAAA,CAAeH,OAAAA,CAAQI,UAAU,EAAET,oBAAoB,CAACM,IAAAA,CAAK,CAAA;IAC1E,IAAIC,IAAAA,KAASG,SAAAA,EAAW,OAAO,EAAC;IAEhC,OAAO;AAAEH,QAAAA,IAAAA;AAAMI,QAAAA,MAAAA,EAAQL,SAASL,uBAAAA,CAAYC,KAAK,GAAGU,4BAAAA,CAAaL,QAAQM,8BAAAA,CAAeN,IAAAA;AAAM,KAAA;AAClG
|
|
1
|
+
{"version":3,"file":"resolveElementBinding.js","sources":["../../../bindings/resolveElementBinding.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 { ExternalComponent } from '@cratis/scene.model';\nimport { stringProperty } from '../properties';\nimport { BindingKind } from './BindingKind';\nimport { ElementBinding } from './ElementBinding';\nimport { resolveCommand, resolveQuery } from './bindingRegistry';\n\n/**\n * The property an element carries its binding name in, per kind. Queries and commands use different\n * property names so a single element could in principle carry both - a command dialog launched from a\n * data page, say - without the two names colliding.\n */\nconst bindingPropertyNames: Record<BindingKind, string> = {\n [BindingKind.Query]: 'query',\n [BindingKind.Command]: 'command',\n};\n\n/**\n * Reads the binding name an element carries for the given kind and looks it up in the binding registry.\n *\n * Every Arc-bound adapter starts here, so the \"name in, class out\" step happens in exactly one place and\n * every adapter reports a missing binding the same way. Nothing throws: an absent property and an\n * unregistered name both come back as an {@link ElementBinding} with no `target`, which the adapter\n * turns into a visible placeholder.\n */\nexport function resolveElementBinding(element: ExternalComponent, kind: BindingKind): ElementBinding {\n const name = stringProperty(element.properties, bindingPropertyNames[kind]);\n if (name === undefined) return {};\n\n return { name, target: kind === BindingKind.Query ? resolveQuery(name) : resolveCommand(name) };\n}\n"],"names":["bindingPropertyNames","BindingKind","Query","Command","resolveElementBinding","element","kind","name","stringProperty","properties","undefined","target","resolveQuery","resolveCommand"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;AAIC,IACD,MAAMA,oBAAAA,GAAoD;IACtD,CAACC,uBAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,uBAAAA,CAAYE,OAAO,GAAG;AAC3B,CAAA;AAEA;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsBC,OAA0B,EAAEC,IAAiB,EAAA;AAC/E,IAAA,MAAMC,OAAOC,yBAAAA,CAAeH,OAAAA,CAAQI,UAAU,EAAET,oBAAoB,CAACM,IAAAA,CAAK,CAAA;IAC1E,IAAIC,IAAAA,KAASG,SAAAA,EAAW,OAAO,EAAC;IAEhC,OAAO;AAAEH,QAAAA,IAAAA;AAAMI,QAAAA,MAAAA,EAAQL,SAASL,uBAAAA,CAAYC,KAAK,GAAGU,4BAAAA,CAAaL,QAAQM,8BAAAA,CAAeN,IAAAA;AAAM,KAAA;AAClG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDropdown.js","sources":["../../../common/SceneDropdown.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 { Dropdown } from '@cratis/components/Dropdown';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:dropdown` component - `Dropdown` from `@cratis/components/Dropdown`.\n *\n * The library's own `Dropdown` rather than PrimeReact's `Select`, and the reason changed with PrimeReact\n * 11. It used to be the overlay z-index fix: a version 10 dropdown panel opened inside a dialog rendered\n * within the dialog's own subtree and could land under its mask, so the library appended every overlay to\n * the document body and handed out z-indexes itself. Version 11 does both natively - the select panel\n * portals to the body and the shared z-index registry puts a later overlay above whatever is already\n * open - and `@cratis/components` 3.0.0 accordingly deleted that workaround. What the wrapper is worth\n * now is its curated surface: a single/multi select expressed in `options` / `optionLabel` /\n * `optionValue` terms, where version 11's `Select` is compositional (`Select.Root`, `.Trigger`,\n * `.Portal`, `.Popup`, `.List`, `.Option`) and would have to be assembled here, in an adapter whose whole\n * input is a property bag.\n *\n * This is the standalone dropdown, not the command-form one: it takes its options from the screen and is\n * not bound to a command property. Use `dropdownField` inside a `commandForm`.\n */\nexport function SceneDropdown({ element }: RegisteredComponentProps) {\n return (\n <Dropdown\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n placeholder={stringProperty(element.properties, 'placeholder')}\n disabled={booleanProperty(element.properties, 'disabled')}\n showClear={booleanProperty(element.properties, 'showClear')}\n filter={booleanProperty(element.properties, 'filter')}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneDropdown","element","_jsx","Dropdown","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","disabled","booleanProperty","showClear","filter","className"],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;AAgBC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,qBACIC,cAAA,CAACC,iBAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,8BAAAA,CAAoBJ,OAAAA,CAAQK,UAAU,EAAE,cAAc,EAAE;AACjEC,QAAAA,WAAAA,EAAaC,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,QAAAA,WAAAA,EAAaD,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;QAClEI,WAAAA,EAAaF,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA;QAChDK,QAAAA,EAAUC,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,UAAA,CAAA;QAC9CO,SAAAA,EAAWD,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,WAAA,CAAA;QAC/CQ,MAAAA,EAAQF,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,QAAA,CAAA;QAC5CS,SAAAA,EAAWP,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,WAAA;;AAG1D
|
|
1
|
+
{"version":3,"file":"SceneDropdown.js","sources":["../../../common/SceneDropdown.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 { Dropdown } from '@cratis/components/Dropdown';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:dropdown` component - `Dropdown` from `@cratis/components/Dropdown`.\n *\n * The library's own `Dropdown` rather than PrimeReact's `Select`, and the reason changed with PrimeReact\n * 11. It used to be the overlay z-index fix: a version 10 dropdown panel opened inside a dialog rendered\n * within the dialog's own subtree and could land under its mask, so the library appended every overlay to\n * the document body and handed out z-indexes itself. Version 11 does both natively - the select panel\n * portals to the body and the shared z-index registry puts a later overlay above whatever is already\n * open - and `@cratis/components` 3.0.0 accordingly deleted that workaround. What the wrapper is worth\n * now is its curated surface: a single/multi select expressed in `options` / `optionLabel` /\n * `optionValue` terms, where version 11's `Select` is compositional (`Select.Root`, `.Trigger`,\n * `.Portal`, `.Popup`, `.List`, `.Option`) and would have to be assembled here, in an adapter whose whole\n * input is a property bag.\n *\n * This is the standalone dropdown, not the command-form one: it takes its options from the screen and is\n * not bound to a command property. Use `dropdownField` inside a `commandForm`.\n */\nexport function SceneDropdown({ element }: RegisteredComponentProps) {\n return (\n <Dropdown\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n placeholder={stringProperty(element.properties, 'placeholder')}\n disabled={booleanProperty(element.properties, 'disabled')}\n showClear={booleanProperty(element.properties, 'showClear')}\n filter={booleanProperty(element.properties, 'filter')}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneDropdown","element","_jsx","Dropdown","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","disabled","booleanProperty","showClear","filter","className"],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;AAgBC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,qBACIC,cAAA,CAACC,iBAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,8BAAAA,CAAoBJ,OAAAA,CAAQK,UAAU,EAAE,cAAc,EAAE;AACjEC,QAAAA,WAAAA,EAAaC,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,QAAAA,WAAAA,EAAaD,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;QAClEI,WAAAA,EAAaF,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA;QAChDK,QAAAA,EAAUC,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,UAAA,CAAA;QAC9CO,SAAAA,EAAWD,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,WAAA,CAAA;QAC/CQ,MAAAA,EAAQF,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,QAAA,CAAA;QAC5CS,SAAAA,EAAWP,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,WAAA;;AAG1D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneErrorBoundary.js","sources":["../../../common/SceneErrorBoundary.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 { ErrorBoundary } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\n\n/**\n * The `Cratis.Components:errorBoundary` component - `ErrorBoundary` from `@cratis/components/Common`.\n *\n * Lets a screen decide where a failure stops. React's default is that a throw anywhere unmounts the\n * whole tree, which for a composed screen means one broken region takes the navigation with it; placing\n * a boundary around a region scopes that to the region. Which regions deserve one is a design decision\n * about the screen, which is precisely why it belongs in the screen rather than in the renderer.\n */\nexport function SceneErrorBoundary({ slots }: RegisteredComponentProps) {\n return <ErrorBoundary>{slots.content}</ErrorBoundary>;\n}\n"],"names":["SceneErrorBoundary","slots","_jsx","ErrorBoundary","content"],"mappings":";;;;;AAMA;;;;;;;AAOC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,KAAK,EAA4B,EAAA;AAClE,IAAA,qBAAOC,cAAA,CAACC,oBAAAA,EAAAA;AAAeF,QAAAA,QAAAA,EAAAA,KAAAA,CAAMG;;AACjC
|
|
1
|
+
{"version":3,"file":"SceneErrorBoundary.js","sources":["../../../common/SceneErrorBoundary.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 { ErrorBoundary } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\n\n/**\n * The `Cratis.Components:errorBoundary` component - `ErrorBoundary` from `@cratis/components/Common`.\n *\n * Lets a screen decide where a failure stops. React's default is that a throw anywhere unmounts the\n * whole tree, which for a composed screen means one broken region takes the navigation with it; placing\n * a boundary around a region scopes that to the region. Which regions deserve one is a design decision\n * about the screen, which is precisely why it belongs in the screen rather than in the renderer.\n */\nexport function SceneErrorBoundary({ slots }: RegisteredComponentProps) {\n return <ErrorBoundary>{slots.content}</ErrorBoundary>;\n}\n"],"names":["SceneErrorBoundary","slots","_jsx","ErrorBoundary","content"],"mappings":";;;;;AAMA;;;;;;;AAOC,IACM,SAASA,kBAAAA,CAAmB,EAAEC,KAAK,EAA4B,EAAA;AAClE,IAAA,qBAAOC,cAAA,CAACC,oBAAAA,EAAAA;AAAeF,QAAAA,QAAAA,EAAAA,KAAAA,CAAMG;;AACjC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneIcon.js","sources":["../../../common/SceneIcon.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 { IconDisplay } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:icon` component - `IconDisplay` from `@cratis/components/Common`.\n *\n * Takes an icon class name (`pi pi-check`) rather than an image, and normalizes the shorthand forms\n * people actually write - `pi-check` on its own, or a bare name - into the class PrimeIcons expects.\n * That normalization is the whole reason to route a screen's icons through this rather than emitting an\n * `<i>`: a screen author writes what they remember and it still renders.\n */\nexport function SceneIcon({ element }: RegisteredComponentProps) {\n return <IconDisplay icon={stringProperty(element.properties, 'icon') ?? ''} className={stringProperty(element.properties, 'className')} />;\n}\n"],"names":["SceneIcon","element","_jsx","IconDisplay","icon","stringProperty","properties","className"],"mappings":";;;;;;AAOA;;;;;;;AAOC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;AAC3D,IAAA,qBAAOC,cAAA,CAACC,kBAAAA,EAAAA;AAAYC,QAAAA,IAAAA,EAAMC,yBAAAA,CAAeJ,OAAAA,CAAQK,UAAU,EAAE,MAAA,CAAA,IAAW,EAAA;QAAIC,SAAAA,EAAWF,yBAAAA,CAAeJ,OAAAA,CAAQK,UAAU,EAAE,WAAA;;AAC9H
|
|
1
|
+
{"version":3,"file":"SceneIcon.js","sources":["../../../common/SceneIcon.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 { IconDisplay } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:icon` component - `IconDisplay` from `@cratis/components/Common`.\n *\n * Takes an icon class name (`pi pi-check`) rather than an image, and normalizes the shorthand forms\n * people actually write - `pi-check` on its own, or a bare name - into the class PrimeIcons expects.\n * That normalization is the whole reason to route a screen's icons through this rather than emitting an\n * `<i>`: a screen author writes what they remember and it still renders.\n */\nexport function SceneIcon({ element }: RegisteredComponentProps) {\n return <IconDisplay icon={stringProperty(element.properties, 'icon') ?? ''} className={stringProperty(element.properties, 'className')} />;\n}\n"],"names":["SceneIcon","element","_jsx","IconDisplay","icon","stringProperty","properties","className"],"mappings":";;;;;;AAOA;;;;;;;AAOC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAA4B,EAAA;AAC3D,IAAA,qBAAOC,cAAA,CAACC,kBAAAA,EAAAA;AAAYC,QAAAA,IAAAA,EAAMC,yBAAAA,CAAeJ,OAAAA,CAAQK,UAAU,EAAE,MAAA,CAAA,IAAW,EAAA;QAAIC,SAAAA,EAAWF,yBAAAA,CAAeJ,OAAAA,CAAQK,UAAU,EAAE,WAAA;;AAC9H;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneTooltip.js","sources":["../../../common/SceneTooltip.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 { Tooltip } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\n/** Which side of the wrapped content the tooltip appears on. */\nconst positions = ['top', 'right', 'bottom', 'left'] as const;\n\n/**\n * The `Cratis.Components:tooltip` component - `Tooltip` from `@cratis/components/Common`.\n *\n * Wraps whatever is in its `content` slot and explains it on hover. `disabled` exists so a screen can\n * keep the wrapper in place while turning the hint off, rather than restructuring the element tree to\n * remove it - the tree is authored, and a conditional wrapper would be a worse thing to model.\n */\nexport function SceneTooltip({ element, slots }: RegisteredComponentProps) {\n return (\n <Tooltip\n content={stringProperty(element.properties, 'content') ?? ''}\n position={unionProperty(element.properties, 'position', positions)}\n disabled={booleanProperty(element.properties, 'disabled')}\n >\n {/* Components 4 takes a single focusable trigger, which it clones to attach its own\n class and part attributes, and a Scene slot is a list. The span is that one element:\n without it a slot holding anything other than exactly one node fails to type, and a\n slot is authored content we cannot assume the shape of. */}\n <span>{slots.content}</span>\n </Tooltip>\n );\n}\n"],"names":["positions","SceneTooltip","element","slots","_jsx","Tooltip","content","stringProperty","properties","position","unionProperty","disabled","booleanProperty","span"],"mappings":";;;;;;AAOA,iEACA,MAAMA,SAAAA,GAAY;AAAC,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAEpD;;;;;;AAMC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,cAAA,CAACC,cAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA,IAAc,EAAA;AAC1DC,QAAAA,QAAAA,EAAUC,wBAAAA,CAAcR,OAAAA,CAAQM,UAAU,EAAE,UAAA,EAAYR,SAAAA,CAAAA;QACxDW,QAAAA,EAAUC,0BAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAM9C,QAAA,QAAA,gBAAAJ,cAAA,CAACS,MAAAA,EAAAA;AAAMV,YAAAA,QAAAA,EAAAA,KAAAA,CAAMG;;;AAGzB
|
|
1
|
+
{"version":3,"file":"SceneTooltip.js","sources":["../../../common/SceneTooltip.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 { Tooltip } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\n/** Which side of the wrapped content the tooltip appears on. */\nconst positions = ['top', 'right', 'bottom', 'left'] as const;\n\n/**\n * The `Cratis.Components:tooltip` component - `Tooltip` from `@cratis/components/Common`.\n *\n * Wraps whatever is in its `content` slot and explains it on hover. `disabled` exists so a screen can\n * keep the wrapper in place while turning the hint off, rather than restructuring the element tree to\n * remove it - the tree is authored, and a conditional wrapper would be a worse thing to model.\n */\nexport function SceneTooltip({ element, slots }: RegisteredComponentProps) {\n return (\n <Tooltip\n content={stringProperty(element.properties, 'content') ?? ''}\n position={unionProperty(element.properties, 'position', positions)}\n disabled={booleanProperty(element.properties, 'disabled')}\n >\n {/* Components 4 takes a single focusable trigger, which it clones to attach its own\n class and part attributes, and a Scene slot is a list. The span is that one element:\n without it a slot holding anything other than exactly one node fails to type, and a\n slot is authored content we cannot assume the shape of. */}\n <span>{slots.content}</span>\n </Tooltip>\n );\n}\n"],"names":["positions","SceneTooltip","element","slots","_jsx","Tooltip","content","stringProperty","properties","position","unionProperty","disabled","booleanProperty","span"],"mappings":";;;;;;AAOA,iEACA,MAAMA,SAAAA,GAAY;AAAC,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAEpD;;;;;;AAMC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,cAAA,CAACC,cAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA,IAAc,EAAA;AAC1DC,QAAAA,QAAAA,EAAUC,wBAAAA,CAAcR,OAAAA,CAAQM,UAAU,EAAE,UAAA,EAAYR,SAAAA,CAAAA;QACxDW,QAAAA,EAAUC,0BAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAM9C,QAAA,QAAA,gBAAAJ,cAAA,CAACS,MAAAA,EAAAA;AAAMV,YAAAA,QAAAA,EAAAA,KAAAA,CAAMG;;;AAGzB;;"}
|
|
@@ -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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAyBA;;;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,WAAA,CAAA,GAAeM,6BAAAA;IAClE,CAACJ,gCAAAA,CAAqBF,2BAAAA,EAA6B,OAAA,CAAA,GAAWM,6BAAAA;IAC9D,CAACJ,gCAAAA,CAAqBF,2BAAAA,EAA6B,qBAAA,CAAA,GAAyBO,iDAAAA;IAE5E,CAACL,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBQ,iCAAAA;IACpE,CAACN,gCAAAA,CAAqBF,2BAAAA,EAA6B,gBAAA,CAAA,GAAoBS,uCAAAA;IACvE,CAACP,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBU,iCAAAA;IACpE,CAACR,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBW,qCAAAA;IACtE,CAACT,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBY,qCAAAA;IACtE,CAACV,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBa,qCAAAA;IACtE,CAACX,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBc,iCAAAA;IACpE,CAACZ,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBe,qCAAAA;IACtE,CAACb,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBgB,2CAAAA;IACzE,CAACd,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBiB,2CAAAA;IACzE,CAACf,gCAAAA,CAAqBF,2BAAAA,EAA6B,YAAA,CAAA,GAAgBkB,+BAAAA;IACnE,CAAChB,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBmB,2CAAAA;IACzE,CAACjB,gCAAAA,CAAqBF,2BAAAA,EAA6B,iBAAA,CAAA,GAAqBoB,yCAAAA;IAExE,CAAClB,gCAAAA,CAAqBF,2BAAAA,EAA6B,QAAA,CAAA,GAAYqB,uBAAAA;IAC/D,CAACnB,gCAAAA,CAAqBF,2BAAAA,EAA6B,oBAAA,CAAA,GAAwBsB,+CAAAA;IAC3E,CAACpB,gCAAAA,CAAqBF,2BAAAA,EAA6B,qBAAA,CAAA,GAAyBuB,iDAAAA;IAC5E,CAACrB,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBwB,qCAAAA;IACtE,CAACtB,gCAAAA,CAAqBF,2BAAAA,EAA6B,sBAAA,CAAA,GAA0ByB,mDAAAA;IAE7E,CAACvB,gCAAAA,CAAqBF,2BAAAA,EAA6B,MAAA,CAAA,GAAU0B,mBAAAA;IAC7D,CAACxB,gCAAAA,CAAqBF,2BAAAA,EAA6B,SAAA,CAAA,GAAa2B,yBAAAA;IAChE,CAACzB,gCAAAA,CAAqBF,2BAAAA,EAA6B,UAAA,CAAA,GAAc4B,2BAAAA;IACjE,CAAC1B,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmB6B,qCAAAA;IAEtE,CAAC3B,gCAAAA,CAAqBF,2BAAAA,EAA6B,qBAAA,CAAA,GAAyB8B,iDAAAA;IAC5E,CAAC5B,gCAAAA,CAAqBF,2BAAAA,EAA6B,uBAAA,CAAA,GAA2B+B,qDAAAA;IAC9E,CAAC7B,gCAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBgC,mCAAAA;IACrE,CAAC9B,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBiC,iCAAAA;IACpE,CAAC/B,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBkC,iCAAAA;IAEpE,CAAChC,gCAAAA,CAAqBF,2BAAAA,EAA6B,SAAA,CAAA,GAAamC,yBAAAA;IAChE,CAACjC,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBoC,qCAAAA;IACtE,CAAClC,gCAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBqC,mCAAAA;IACrE,CAACnC,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBsC;AAC7E
|
|
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAyBA;;;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,WAAA,CAAA,GAAeM,6BAAAA;IAClE,CAACJ,gCAAAA,CAAqBF,2BAAAA,EAA6B,OAAA,CAAA,GAAWM,6BAAAA;IAC9D,CAACJ,gCAAAA,CAAqBF,2BAAAA,EAA6B,qBAAA,CAAA,GAAyBO,iDAAAA;IAE5E,CAACL,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBQ,iCAAAA;IACpE,CAACN,gCAAAA,CAAqBF,2BAAAA,EAA6B,gBAAA,CAAA,GAAoBS,uCAAAA;IACvE,CAACP,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBU,iCAAAA;IACpE,CAACR,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBW,qCAAAA;IACtE,CAACT,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBY,qCAAAA;IACtE,CAACV,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBa,qCAAAA;IACtE,CAACX,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBc,iCAAAA;IACpE,CAACZ,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBe,qCAAAA;IACtE,CAACb,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBgB,2CAAAA;IACzE,CAACd,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBiB,2CAAAA;IACzE,CAACf,gCAAAA,CAAqBF,2BAAAA,EAA6B,YAAA,CAAA,GAAgBkB,+BAAAA;IACnE,CAAChB,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBmB,2CAAAA;IACzE,CAACjB,gCAAAA,CAAqBF,2BAAAA,EAA6B,iBAAA,CAAA,GAAqBoB,yCAAAA;IAExE,CAAClB,gCAAAA,CAAqBF,2BAAAA,EAA6B,QAAA,CAAA,GAAYqB,uBAAAA;IAC/D,CAACnB,gCAAAA,CAAqBF,2BAAAA,EAA6B,oBAAA,CAAA,GAAwBsB,+CAAAA;IAC3E,CAACpB,gCAAAA,CAAqBF,2BAAAA,EAA6B,qBAAA,CAAA,GAAyBuB,iDAAAA;IAC5E,CAACrB,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBwB,qCAAAA;IACtE,CAACtB,gCAAAA,CAAqBF,2BAAAA,EAA6B,sBAAA,CAAA,GAA0ByB,mDAAAA;IAE7E,CAACvB,gCAAAA,CAAqBF,2BAAAA,EAA6B,MAAA,CAAA,GAAU0B,mBAAAA;IAC7D,CAACxB,gCAAAA,CAAqBF,2BAAAA,EAA6B,SAAA,CAAA,GAAa2B,yBAAAA;IAChE,CAACzB,gCAAAA,CAAqBF,2BAAAA,EAA6B,UAAA,CAAA,GAAc4B,2BAAAA;IACjE,CAAC1B,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmB6B,qCAAAA;IAEtE,CAAC3B,gCAAAA,CAAqBF,2BAAAA,EAA6B,qBAAA,CAAA,GAAyB8B,iDAAAA;IAC5E,CAAC5B,gCAAAA,CAAqBF,2BAAAA,EAA6B,uBAAA,CAAA,GAA2B+B,qDAAAA;IAC9E,CAAC7B,gCAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBgC,mCAAAA;IACrE,CAAC9B,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBiC,iCAAAA;IACpE,CAAC/B,gCAAAA,CAAqBF,2BAAAA,EAA6B,aAAA,CAAA,GAAiBkC,iCAAAA;IAEpE,CAAChC,gCAAAA,CAAqBF,2BAAAA,EAA6B,SAAA,CAAA,GAAamC,yBAAAA;IAChE,CAACjC,gCAAAA,CAAqBF,2BAAAA,EAA6B,eAAA,CAAA,GAAmBoC,qCAAAA;IACtE,CAAClC,gCAAAA,CAAqBF,2BAAAA,EAA6B,cAAA,CAAA,GAAkBqC,mCAAAA;IACrE,CAACnC,gCAAAA,CAAqBF,2BAAAA,EAA6B,kBAAA,CAAA,GAAsBsC;AAC7E;;;"}
|
|
@@ -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.\",\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,uFAAA;IACbC,MAAAA,EAAQ,0BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY;AAChB
|
|
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.\",\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,uFAAA;IACbC,MAAAA,EAAQ,0BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUpB,+BAAAA;IACVS,UAAAA,EAAYY;AAChB;;;"}
|
|
@@ -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 { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForQuery = lazy(async () => ({ default: (await import('@cratis/components/DataTables')).DataTableForQuery }));\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 *\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 return (\n <ArcRuntimeBoundary>\n <DataTableForQuery\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 </DataTableForQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForQuery","lazy","default","SceneDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,iBAAAA,iBAAoBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,+BAAA,CAA+B,EAAGF;KAAkB,CAAA,CAAA;AAEzH;;;;;;;;;;;;;;;;;AAiBC,IACM,SAASG,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,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,iBAAAA,EAAAA;YACGe,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
|
|
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 { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForQuery = lazy(async () => ({ default: (await import('@cratis/components/DataTables')).DataTableForQuery }));\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 *\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 return (\n <ArcRuntimeBoundary>\n <DataTableForQuery\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 </DataTableForQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForQuery","lazy","default","SceneDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,iBAAAA,iBAAoBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,+BAAA,CAA+B,EAAGF;KAAkB,CAAA,CAAA;AAEzH;;;;;;;;;;;;;;;;;AAiBC,IACM,SAASG,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,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,iBAAAA,EAAAA;YACGe,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;;"}
|
|
@@ -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('@cratis/components/DataTables')).DataTableForObservableQuery,\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","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,OAAO,+BAAA,CAA+B,EAAGF;KAC7D,CAAA,CAAA;AAEA;;;;;;;;;;;;;AAaC,IACM,SAASG,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,CAACX,2BAAAA,EAAAA;YACGe,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
|
|
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('@cratis/components/DataTables')).DataTableForObservableQuery,\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","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,OAAO,+BAAA,CAA+B,EAAGF;KAC7D,CAAA,CAAA;AAEA;;;;;;;;;;;;;AAaC,IACM,SAASG,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,CAACX,2BAAAA,EAAAA;YACGe,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;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneBusyIndicatorDialog.js","sources":["../../../dialogs/SceneBusyIndicatorDialog.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 } from '../bindings';\nimport { stringProperty } from '../properties';\n\nconst BusyIndicatorDialog = lazy(async () => ({ default: (await import('@cratis/components/Dialogs')).BusyIndicatorDialog }));\n\n/**\n * The `Cratis.Components:busyIndicatorDialog` component - `BusyIndicatorDialog` from\n * `@cratis/components/Dialogs`.\n *\n * The blocking spinner shown while a long-running command is in flight. In a running application it is\n * the Arc dialog host that renders it, threading its own `title` and `message` through; exposing it as a\n * Scene component is what lets a screen show the same chrome at design time, so its wording and\n * placement can be designed rather than discovered the first time an operation takes a while.\n */\nexport function SceneBusyIndicatorDialog({ element }: RegisteredComponentProps) {\n return (\n <ArcRuntimeBoundary>\n <BusyIndicatorDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n message={stringProperty(element.properties, 'message') ?? ''}\n />\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["BusyIndicatorDialog","lazy","default","SceneBusyIndicatorDialog","element","_jsx","ArcRuntimeBoundary","title","stringProperty","properties","message"],"mappings":";;;;;;;;AAQA,MAAMA,mBAAAA,iBAAsBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,4BAAA,CAA4B,EAAGF;KAAoB,CAAA,CAAA;AAE1H;;;;;;;;AAQC,IACM,SAASG,wBAAAA,CAAyB,EAAEC,OAAO,EAA4B,EAAA;AAC1E,IAAA,qBACIC,cAAA,CAACC,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACL,mBAAAA,EAAAA;AACGO,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeJ,OAAAA,CAAQK,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;AACtDC,YAAAA,OAAAA,EAASF,yBAAAA,CAAeJ,OAAAA,CAAQK,UAAU,EAAE,SAAA,CAAA,IAAc;;;AAI1E
|
|
1
|
+
{"version":3,"file":"SceneBusyIndicatorDialog.js","sources":["../../../dialogs/SceneBusyIndicatorDialog.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 } from '../bindings';\nimport { stringProperty } from '../properties';\n\nconst BusyIndicatorDialog = lazy(async () => ({ default: (await import('@cratis/components/Dialogs')).BusyIndicatorDialog }));\n\n/**\n * The `Cratis.Components:busyIndicatorDialog` component - `BusyIndicatorDialog` from\n * `@cratis/components/Dialogs`.\n *\n * The blocking spinner shown while a long-running command is in flight. In a running application it is\n * the Arc dialog host that renders it, threading its own `title` and `message` through; exposing it as a\n * Scene component is what lets a screen show the same chrome at design time, so its wording and\n * placement can be designed rather than discovered the first time an operation takes a while.\n */\nexport function SceneBusyIndicatorDialog({ element }: RegisteredComponentProps) {\n return (\n <ArcRuntimeBoundary>\n <BusyIndicatorDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n message={stringProperty(element.properties, 'message') ?? ''}\n />\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["BusyIndicatorDialog","lazy","default","SceneBusyIndicatorDialog","element","_jsx","ArcRuntimeBoundary","title","stringProperty","properties","message"],"mappings":";;;;;;;;AAQA,MAAMA,mBAAAA,iBAAsBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,4BAAA,CAA4B,EAAGF;KAAoB,CAAA,CAAA;AAE1H;;;;;;;;AAQC,IACM,SAASG,wBAAAA,CAAyB,EAAEC,OAAO,EAA4B,EAAA;AAC1E,IAAA,qBACIC,cAAA,CAACC,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACL,mBAAAA,EAAAA;AACGO,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeJ,OAAAA,CAAQK,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;AACtDC,YAAAA,OAAAA,EAASF,yBAAAA,CAAeJ,OAAAA,CAAQK,UAAU,EAAE,SAAA,CAAA,IAAc;;;AAI1E;;"}
|
|
@@ -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('@cratis/components/CommandDialog')).CommandDialog }));\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","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,OAAO,kCAAA,CAAkC,EAAGF;KAAc,CAAA,CAAA;AAEpH;;;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASG,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,CAACX,aAAAA,EAAAA;AACGe,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
|
|
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('@cratis/components/CommandDialog')).CommandDialog }));\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","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,OAAO,kCAAA,CAAkC,EAAGF;KAAc,CAAA,CAAA;AAEpH;;;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASG,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,CAACX,aAAAA,EAAAA;AACGe,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;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneConfirmationDialog.js","sources":["../../../dialogs/SceneConfirmationDialog.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 { ArcRuntimeBoundary } from '../bindings';\n\nconst ConfirmationDialog = lazy(async () => ({ default: (await import('@cratis/components/Dialogs')).ConfirmationDialog }));\n\n/**\n * The `Cratis.Components:confirmationDialog` component - `ConfirmationDialog` from\n * `@cratis/components/Dialogs`.\n *\n * Takes no properties by design: it is not a dialog a screen configures, it is the host that renders\n * whatever confirmation the running application has asked for through Arc's dialog service. A screen\n * places it once, near the root, and every `Are you sure?` in the application appears there.\n */\nexport function SceneConfirmationDialog() {\n return (\n <ArcRuntimeBoundary>\n <ConfirmationDialog />\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["ConfirmationDialog","lazy","default","SceneConfirmationDialog","_jsx","ArcRuntimeBoundary"],"mappings":";;;;;;;AAMA,MAAMA,kBAAAA,iBAAqBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,4BAAA,CAA4B,EAAGF;KAAmB,CAAA,CAAA;AAExH;;;;;;;AAOC,IACM,SAASG,uBAAAA,GAAAA;AACZ,IAAA,qBACIC,cAAA,CAACC,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACJ,kBAAAA,EAAAA,EAAAA;;AAGb
|
|
1
|
+
{"version":3,"file":"SceneConfirmationDialog.js","sources":["../../../dialogs/SceneConfirmationDialog.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 { ArcRuntimeBoundary } from '../bindings';\n\nconst ConfirmationDialog = lazy(async () => ({ default: (await import('@cratis/components/Dialogs')).ConfirmationDialog }));\n\n/**\n * The `Cratis.Components:confirmationDialog` component - `ConfirmationDialog` from\n * `@cratis/components/Dialogs`.\n *\n * Takes no properties by design: it is not a dialog a screen configures, it is the host that renders\n * whatever confirmation the running application has asked for through Arc's dialog service. A screen\n * places it once, near the root, and every `Are you sure?` in the application appears there.\n */\nexport function SceneConfirmationDialog() {\n return (\n <ArcRuntimeBoundary>\n <ConfirmationDialog />\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["ConfirmationDialog","lazy","default","SceneConfirmationDialog","_jsx","ArcRuntimeBoundary"],"mappings":";;;;;;;AAMA,MAAMA,kBAAAA,iBAAqBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,4BAAA,CAA4B,EAAGF;KAAmB,CAAA,CAAA;AAExH;;;;;;;AAOC,IACM,SAASG,uBAAAA,GAAAA;AACZ,IAAA,qBACIC,cAAA,CAACC,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACJ,kBAAAA,EAAAA,EAAAA;;AAGb;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDialog.js","sources":["../../../dialogs/SceneDialog.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 } from '../bindings';\nimport { booleanProperty, stringProperty } from '../properties';\n\nconst Dialog = lazy(async () => ({ default: (await import('@cratis/components/Dialogs')).Dialog }));\n\n/**\n * The `Cratis.Components:dialog` component, registered under the bare name `dialog` - `Dialog` from\n * `@cratis/components/Dialogs`.\n *\n * Shadowing PrimeReact's `dialog` deliberately. PrimeReact's is a modal frame and nothing more; this one\n * resolves its result through Arc's dialog context, so a screen's dialog participates in the same\n * request/response protocol as the rest of the application - a caller awaits a `DialogResult` instead of\n * threading `visible` state and callbacks by hand.\n *\n * `visible` defaults to `true` because a dialog placed on a screen is being placed to be seen; a host\n * that controls visibility sets the property explicitly.\n *\n * `dismissable` replaces the `resizable` property this adapter used to carry, and the swap is the whole\n * PrimeReact 11 story in miniature. `resizable` is still declared on `DialogProps` so call sites compile,\n * but version 11's headless dialog has no resize handle and the library never reads the prop - a screen\n * setting it got nothing. `dismissable` is the opposite: 3.0.0 added it and honors it, and it decides\n * whether the header close button, backdrop click and `Escape` are offered at all. Leaving it unset keeps\n * the library's own default, so a screen opts into a dismiss affordance rather than having one imposed.\n *\n * `closeAriaLabel` names that close button. It is separate from every other label here because it is the\n * only one a screen reader reads and nobody sees, which is exactly why it gets forgotten - offering it\n * next to `okLabel` and `cancelLabel` is what makes localizing a dialog a complete job.\n */\nexport function SceneDialog({ element, slots }: RegisteredComponentProps) {\n return (\n <ArcRuntimeBoundary>\n <Dialog\n title={stringProperty(element.properties, 'title') ?? ''}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n dismissable={booleanProperty(element.properties, 'dismissable')}\n isValid={booleanProperty(element.properties, 'isValid')}\n isBusy={booleanProperty(element.properties, 'isBusy')}\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 </Dialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["Dialog","lazy","default","SceneDialog","element","slots","_jsx","ArcRuntimeBoundary","title","stringProperty","properties","visible","booleanProperty","width","dismissable","isValid","isBusy","okLabel","cancelLabel","closeAriaLabel","className","content"],"mappings":";;;;;;;;AAQA,MAAMA,MAAAA,iBAASC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,4BAAA,CAA4B,EAAGF;KAAO,CAAA,CAAA;AAEhG;;;;;;;;;;;;;;;;;;;;;;AAsBC,IACM,SAASG,WAAAA,CAAY,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACN,MAAAA,EAAAA;AACGQ,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;AACtDC,YAAAA,OAAAA,EAASC,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA,IAAc,IAAA;YAC3DG,KAAAA,EAAOJ,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,OAAA,CAAA;YAC1CI,WAAAA,EAAaF,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;YACjDK,OAAAA,EAASH,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA;YAC7CM,MAAAA,EAAQJ,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;YAC5CO,OAAAA,EAASR,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA;YAC5CQ,WAAAA,EAAaT,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;YAChDS,cAAAA,EAAgBV,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,gBAAA,CAAA;YACnDU,SAAAA,EAAWX,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;AAE7CL,YAAAA,QAAAA,EAAAA,KAAAA,CAAMgB;;;AAIvB
|
|
1
|
+
{"version":3,"file":"SceneDialog.js","sources":["../../../dialogs/SceneDialog.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 } from '../bindings';\nimport { booleanProperty, stringProperty } from '../properties';\n\nconst Dialog = lazy(async () => ({ default: (await import('@cratis/components/Dialogs')).Dialog }));\n\n/**\n * The `Cratis.Components:dialog` component, registered under the bare name `dialog` - `Dialog` from\n * `@cratis/components/Dialogs`.\n *\n * Shadowing PrimeReact's `dialog` deliberately. PrimeReact's is a modal frame and nothing more; this one\n * resolves its result through Arc's dialog context, so a screen's dialog participates in the same\n * request/response protocol as the rest of the application - a caller awaits a `DialogResult` instead of\n * threading `visible` state and callbacks by hand.\n *\n * `visible` defaults to `true` because a dialog placed on a screen is being placed to be seen; a host\n * that controls visibility sets the property explicitly.\n *\n * `dismissable` replaces the `resizable` property this adapter used to carry, and the swap is the whole\n * PrimeReact 11 story in miniature. `resizable` is still declared on `DialogProps` so call sites compile,\n * but version 11's headless dialog has no resize handle and the library never reads the prop - a screen\n * setting it got nothing. `dismissable` is the opposite: 3.0.0 added it and honors it, and it decides\n * whether the header close button, backdrop click and `Escape` are offered at all. Leaving it unset keeps\n * the library's own default, so a screen opts into a dismiss affordance rather than having one imposed.\n *\n * `closeAriaLabel` names that close button. It is separate from every other label here because it is the\n * only one a screen reader reads and nobody sees, which is exactly why it gets forgotten - offering it\n * next to `okLabel` and `cancelLabel` is what makes localizing a dialog a complete job.\n */\nexport function SceneDialog({ element, slots }: RegisteredComponentProps) {\n return (\n <ArcRuntimeBoundary>\n <Dialog\n title={stringProperty(element.properties, 'title') ?? ''}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n dismissable={booleanProperty(element.properties, 'dismissable')}\n isValid={booleanProperty(element.properties, 'isValid')}\n isBusy={booleanProperty(element.properties, 'isBusy')}\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 </Dialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["Dialog","lazy","default","SceneDialog","element","slots","_jsx","ArcRuntimeBoundary","title","stringProperty","properties","visible","booleanProperty","width","dismissable","isValid","isBusy","okLabel","cancelLabel","closeAriaLabel","className","content"],"mappings":";;;;;;;;AAQA,MAAMA,MAAAA,iBAASC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,4BAAA,CAA4B,EAAGF;KAAO,CAAA,CAAA;AAEhG;;;;;;;;;;;;;;;;;;;;;;AAsBC,IACM,SAASG,WAAAA,CAAY,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,cAAA,CAACN,MAAAA,EAAAA;AACGQ,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;AACtDC,YAAAA,OAAAA,EAASC,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA,IAAc,IAAA;YAC3DG,KAAAA,EAAOJ,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,OAAA,CAAA;YAC1CI,WAAAA,EAAaF,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;YACjDK,OAAAA,EAASH,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA;YAC7CM,MAAAA,EAAQJ,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;YAC5CO,OAAAA,EAASR,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA;YAC5CQ,WAAAA,EAAaT,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;YAChDS,cAAAA,EAAgBV,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,gBAAA,CAAA;YACnDU,SAAAA,EAAWX,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;AAE7CL,YAAAA,QAAAA,EAAAA,KAAAA,CAAMgB;;;AAIvB;;"}
|
|
@@ -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('@cratis/components/CommandDialog')).StepperCommandDialog,\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","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,OAAO,kCAAA,CAAkC,EAAGF;KAChE,CAAA,CAAA;AAEA,qEACA,MAAMG,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,CAACZ,oBAAAA,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,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
|
|
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('@cratis/components/CommandDialog')).StepperCommandDialog,\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","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,OAAO,kCAAA,CAAkC,EAAGF;KAChE,CAAA,CAAA;AAEA,qEACA,MAAMG,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,CAACZ,oBAAAA,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,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;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneFilterPanel.js","sources":["../../../editors/SceneFilterPanel.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 { useMemo, useRef, useState } from 'react';\nimport { FilterPanel, useFilterState } from '@cratis/components/Filter';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\nimport { filterDefinitions } from './filterDefinitions';\n\n/**\n * The `Cratis.Components:filterPanel` component - `FilterPanel` from `@cratis/components/Filter`.\n *\n * `FilterPanel` is a portal anchored to a button: it renders next to whatever opened it, which means it\n * cannot be placed on a screen on its own. So this adapter is the whole control - the toggle button and\n * the panel it anchors - and a screen places one element instead of having to model an anchor\n * relationship the element tree has no way to express.\n *\n * Selection state comes from the library's own `useFilterState`, so the toggling, clearing and range\n * behavior is the library's rather than a second implementation of it here.\n */\nexport function SceneFilterPanel({ element, slots }: RegisteredComponentProps) {\n const filters = useMemo(() => filterDefinitions(element.properties), [element.properties]);\n const anchorRef = useRef<HTMLButtonElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const state = useFilterState(filters);\n\n return (\n <>\n <button type='button' ref={anchorRef} data-scene-id={element.id} onClick={() => setIsOpen(open => !open)}>\n {stringProperty(element.properties, 'label') ?? 'Filters'}\n </button>\n <FilterPanel\n isOpen={isOpen}\n filters={filters}\n filterValues={state.filterValues}\n rangeValues={state.rangeValues}\n customValues={state.customValues}\n searchPlaceholder={stringProperty(element.properties, 'searchPlaceholder')}\n expandedFilterKey={state.expandedFilterKey}\n anchorRef={anchorRef}\n onClose={() => setIsOpen(false)}\n onFilterToggle={state.handleToggleFilter}\n onFilterClear={state.handleClearFilter}\n onRangeChange={state.handleRangeChange}\n onExpandedFilterChange={state.setExpandedFilterKey}\n onCustomValueChange={state.handleCustomValueChange}\n >\n {slots.content}\n </FilterPanel>\n </>\n );\n}\n"],"names":["SceneFilterPanel","element","slots","filters","useMemo","filterDefinitions","properties","anchorRef","useRef","isOpen","setIsOpen","useState","state","useFilterState","_jsxs","_Fragment","_jsx","button","type","ref","data-scene-id","id","onClick","open","stringProperty","FilterPanel","filterValues","rangeValues","customValues","searchPlaceholder","expandedFilterKey","onClose","onFilterToggle","handleToggleFilter","onFilterClear","handleClearFilter","onRangeChange","handleRangeChange","onExpandedFilterChange","setExpandedFilterKey","onCustomValueChange","handleCustomValueChange","content"],"mappings":";;;;;;;;AASA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACzE,IAAA,MAAMC,UAAUC,aAAAA,CAAQ,IAAMC,mCAAAA,CAAkBJ,OAAAA,CAAQK,UAAU,CAAA,EAAG;AAACL,QAAAA,OAAAA,CAAQK;AAAW,KAAA,CAAA;AACzF,IAAA,MAAMC,YAAYC,YAAAA,CAA0B,IAAA,CAAA;AAC5C,IAAA,MAAM,CAACC,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,cAAAA,CAAS,KAAA,CAAA;AACrC,IAAA,MAAMC,QAAQC,qBAAAA,CAAeV,OAAAA,CAAAA;IAE7B,qBACIW,eAAA,CAAAC,mBAAA,EAAA;;0BACIC,cAAA,CAACC,QAAAA,EAAAA;gBAAOC,IAAAA,EAAK,QAAA;gBAASC,GAAAA,EAAKZ,SAAAA;AAAWa,gBAAAA,eAAAA,EAAenB,QAAQoB,EAAE;AAAEC,gBAAAA,OAAAA,EAAS,IAAMZ,SAAAA,CAAUa,CAAAA,IAAAA,GAAQ,CAACA,IAAAA,CAAAA;0BAC9FC,yBAAAA,CAAevB,OAAAA,CAAQK,UAAU,EAAE,OAAA,CAAA,IAAY;;0BAEpDU,cAAA,CAACS,kBAAAA,EAAAA;gBACGhB,MAAAA,EAAQA,MAAAA;gBACRN,OAAAA,EAASA,OAAAA;AACTuB,gBAAAA,YAAAA,EAAcd,MAAMc,YAAY;AAChCC,gBAAAA,WAAAA,EAAaf,MAAMe,WAAW;AAC9BC,gBAAAA,YAAAA,EAAchB,MAAMgB,YAAY;gBAChCC,iBAAAA,EAAmBL,yBAAAA,CAAevB,OAAAA,CAAQK,UAAU,EAAE,mBAAA,CAAA;AACtDwB,gBAAAA,iBAAAA,EAAmBlB,MAAMkB,iBAAiB;gBAC1CvB,SAAAA,EAAWA,SAAAA;AACXwB,gBAAAA,OAAAA,EAAS,IAAMrB,SAAAA,CAAU,KAAA,CAAA;AACzBsB,gBAAAA,cAAAA,EAAgBpB,MAAMqB,kBAAkB;AACxCC,gBAAAA,aAAAA,EAAetB,MAAMuB,iBAAiB;AACtCC,gBAAAA,aAAAA,EAAexB,MAAMyB,iBAAiB;AACtCC,gBAAAA,sBAAAA,EAAwB1B,MAAM2B,oBAAoB;AAClDC,gBAAAA,mBAAAA,EAAqB5B,MAAM6B,uBAAuB;AAEjDvC,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMwC;;;;AAIvB
|
|
1
|
+
{"version":3,"file":"SceneFilterPanel.js","sources":["../../../editors/SceneFilterPanel.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 { useMemo, useRef, useState } from 'react';\nimport { FilterPanel, useFilterState } from '@cratis/components/Filter';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\nimport { filterDefinitions } from './filterDefinitions';\n\n/**\n * The `Cratis.Components:filterPanel` component - `FilterPanel` from `@cratis/components/Filter`.\n *\n * `FilterPanel` is a portal anchored to a button: it renders next to whatever opened it, which means it\n * cannot be placed on a screen on its own. So this adapter is the whole control - the toggle button and\n * the panel it anchors - and a screen places one element instead of having to model an anchor\n * relationship the element tree has no way to express.\n *\n * Selection state comes from the library's own `useFilterState`, so the toggling, clearing and range\n * behavior is the library's rather than a second implementation of it here.\n */\nexport function SceneFilterPanel({ element, slots }: RegisteredComponentProps) {\n const filters = useMemo(() => filterDefinitions(element.properties), [element.properties]);\n const anchorRef = useRef<HTMLButtonElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const state = useFilterState(filters);\n\n return (\n <>\n <button type='button' ref={anchorRef} data-scene-id={element.id} onClick={() => setIsOpen(open => !open)}>\n {stringProperty(element.properties, 'label') ?? 'Filters'}\n </button>\n <FilterPanel\n isOpen={isOpen}\n filters={filters}\n filterValues={state.filterValues}\n rangeValues={state.rangeValues}\n customValues={state.customValues}\n searchPlaceholder={stringProperty(element.properties, 'searchPlaceholder')}\n expandedFilterKey={state.expandedFilterKey}\n anchorRef={anchorRef}\n onClose={() => setIsOpen(false)}\n onFilterToggle={state.handleToggleFilter}\n onFilterClear={state.handleClearFilter}\n onRangeChange={state.handleRangeChange}\n onExpandedFilterChange={state.setExpandedFilterKey}\n onCustomValueChange={state.handleCustomValueChange}\n >\n {slots.content}\n </FilterPanel>\n </>\n );\n}\n"],"names":["SceneFilterPanel","element","slots","filters","useMemo","filterDefinitions","properties","anchorRef","useRef","isOpen","setIsOpen","useState","state","useFilterState","_jsxs","_Fragment","_jsx","button","type","ref","data-scene-id","id","onClick","open","stringProperty","FilterPanel","filterValues","rangeValues","customValues","searchPlaceholder","expandedFilterKey","onClose","onFilterToggle","handleToggleFilter","onFilterClear","handleClearFilter","onRangeChange","handleRangeChange","onExpandedFilterChange","setExpandedFilterKey","onCustomValueChange","handleCustomValueChange","content"],"mappings":";;;;;;;;AASA;;;;;;;;;;AAUC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACzE,IAAA,MAAMC,UAAUC,aAAAA,CAAQ,IAAMC,mCAAAA,CAAkBJ,OAAAA,CAAQK,UAAU,CAAA,EAAG;AAACL,QAAAA,OAAAA,CAAQK;AAAW,KAAA,CAAA;AACzF,IAAA,MAAMC,YAAYC,YAAAA,CAA0B,IAAA,CAAA;AAC5C,IAAA,MAAM,CAACC,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,cAAAA,CAAS,KAAA,CAAA;AACrC,IAAA,MAAMC,QAAQC,qBAAAA,CAAeV,OAAAA,CAAAA;IAE7B,qBACIW,eAAA,CAAAC,mBAAA,EAAA;;0BACIC,cAAA,CAACC,QAAAA,EAAAA;gBAAOC,IAAAA,EAAK,QAAA;gBAASC,GAAAA,EAAKZ,SAAAA;AAAWa,gBAAAA,eAAAA,EAAenB,QAAQoB,EAAE;AAAEC,gBAAAA,OAAAA,EAAS,IAAMZ,SAAAA,CAAUa,CAAAA,IAAAA,GAAQ,CAACA,IAAAA,CAAAA;0BAC9FC,yBAAAA,CAAevB,OAAAA,CAAQK,UAAU,EAAE,OAAA,CAAA,IAAY;;0BAEpDU,cAAA,CAACS,kBAAAA,EAAAA;gBACGhB,MAAAA,EAAQA,MAAAA;gBACRN,OAAAA,EAASA,OAAAA;AACTuB,gBAAAA,YAAAA,EAAcd,MAAMc,YAAY;AAChCC,gBAAAA,WAAAA,EAAaf,MAAMe,WAAW;AAC9BC,gBAAAA,YAAAA,EAAchB,MAAMgB,YAAY;gBAChCC,iBAAAA,EAAmBL,yBAAAA,CAAevB,OAAAA,CAAQK,UAAU,EAAE,mBAAA,CAAA;AACtDwB,gBAAAA,iBAAAA,EAAmBlB,MAAMkB,iBAAiB;gBAC1CvB,SAAAA,EAAWA,SAAAA;AACXwB,gBAAAA,OAAAA,EAAS,IAAMrB,SAAAA,CAAU,KAAA,CAAA;AACzBsB,gBAAAA,cAAAA,EAAgBpB,MAAMqB,kBAAkB;AACxCC,gBAAAA,aAAAA,EAAetB,MAAMuB,iBAAiB;AACtCC,gBAAAA,aAAAA,EAAexB,MAAMyB,iBAAiB;AACtCC,gBAAAA,sBAAAA,EAAwB1B,MAAM2B,oBAAoB;AAClDC,gBAAAA,mBAAAA,EAAqB5B,MAAM6B,uBAAuB;AAEjDvC,gBAAAA,QAAAA,EAAAA,KAAAA,CAAMwC;;;;AAIvB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneObjectContentEditor.js","sources":["../../../editors/SceneObjectContentEditor.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 { useMemo } from 'react';\nimport { ObjectContentEditor } from '@cratis/components/ObjectContentEditor';\nimport { Json, JsonSchema } from '@cratis/components/types';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectProperty, stringProperty } from '../properties';\nimport { useEditableCopy } from './useEditableCopy';\n\n/**\n * The `Cratis.Components:objectContentEditor` component - `ObjectContentEditor` from\n * `@cratis/components/ObjectContentEditor`.\n *\n * Renders an arbitrary JSON document against its schema, so nested objects and arrays are navigable and\n * each value is edited with a control that matches its declared type. That is what makes it worth\n * exposing to a screen at all: the alternative is a textarea full of JSON, which is not an editor.\n *\n * `object` and `schema` come through the property bag as plain JSON, which is exactly what they are at\n * runtime - the conversions state that, since the property bag is typed as unknown values by definition.\n */\nexport function SceneObjectContentEditor({ element }: RegisteredComponentProps) {\n const declared = useMemo(() => (objectProperty(element.properties, 'object') ?? {}) as unknown as Json, [element.properties]);\n const schema = useMemo(() => (objectProperty(element.properties, 'schema') ?? {}) as unknown as JsonSchema, [element.properties]);\n const [object, setObject] = useEditableCopy(declared);\n\n return (\n <ObjectContentEditor\n object={object}\n schema={schema}\n editMode={booleanProperty(element.properties, 'editMode')}\n onChange={setObject}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneObjectContentEditor","element","declared","useMemo","objectProperty","properties","schema","object","setObject","useEditableCopy","_jsx","ObjectContentEditor","editMode","booleanProperty","onChange","className","stringProperty"],"mappings":";;;;;;;;AAUA;;;;;;;;;;AAUC,IACM,SAASA,wBAAAA,CAAyB,EAAEC,OAAO,EAA4B,EAAA;IAC1E,MAAMC,QAAAA,GAAWC,cAAQ,IAAOC,yBAAAA,CAAeH,QAAQI,UAAU,EAAE,QAAA,CAAA,IAAa,EAAC,EAAuB;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;IAC5H,MAAMC,MAAAA,GAASH,cAAQ,IAAOC,yBAAAA,CAAeH,QAAQI,UAAU,EAAE,QAAA,CAAA,IAAa,EAAC,EAA6B;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;AAChI,IAAA,MAAM,CAACE,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,+BAAAA,CAAgBP,QAAAA,CAAAA;AAE5C,IAAA,qBACIQ,cAAA,CAACC,uCAAAA,EAAAA;QACGJ,MAAAA,EAAQA,MAAAA;QACRD,MAAAA,EAAQA,MAAAA;QACRM,QAAAA,EAAUC,0BAAAA,CAAgBZ,OAAAA,CAAQI,UAAU,EAAE,UAAA,CAAA;QAC9CS,QAAAA,EAAUN,SAAAA;QACVO,SAAAA,EAAWC,yBAAAA,CAAef,OAAAA,CAAQI,UAAU,EAAE,WAAA;;AAG1D
|
|
1
|
+
{"version":3,"file":"SceneObjectContentEditor.js","sources":["../../../editors/SceneObjectContentEditor.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 { useMemo } from 'react';\nimport { ObjectContentEditor } from '@cratis/components/ObjectContentEditor';\nimport { Json, JsonSchema } from '@cratis/components/types';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectProperty, stringProperty } from '../properties';\nimport { useEditableCopy } from './useEditableCopy';\n\n/**\n * The `Cratis.Components:objectContentEditor` component - `ObjectContentEditor` from\n * `@cratis/components/ObjectContentEditor`.\n *\n * Renders an arbitrary JSON document against its schema, so nested objects and arrays are navigable and\n * each value is edited with a control that matches its declared type. That is what makes it worth\n * exposing to a screen at all: the alternative is a textarea full of JSON, which is not an editor.\n *\n * `object` and `schema` come through the property bag as plain JSON, which is exactly what they are at\n * runtime - the conversions state that, since the property bag is typed as unknown values by definition.\n */\nexport function SceneObjectContentEditor({ element }: RegisteredComponentProps) {\n const declared = useMemo(() => (objectProperty(element.properties, 'object') ?? {}) as unknown as Json, [element.properties]);\n const schema = useMemo(() => (objectProperty(element.properties, 'schema') ?? {}) as unknown as JsonSchema, [element.properties]);\n const [object, setObject] = useEditableCopy(declared);\n\n return (\n <ObjectContentEditor\n object={object}\n schema={schema}\n editMode={booleanProperty(element.properties, 'editMode')}\n onChange={setObject}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneObjectContentEditor","element","declared","useMemo","objectProperty","properties","schema","object","setObject","useEditableCopy","_jsx","ObjectContentEditor","editMode","booleanProperty","onChange","className","stringProperty"],"mappings":";;;;;;;;AAUA;;;;;;;;;;AAUC,IACM,SAASA,wBAAAA,CAAyB,EAAEC,OAAO,EAA4B,EAAA;IAC1E,MAAMC,QAAAA,GAAWC,cAAQ,IAAOC,yBAAAA,CAAeH,QAAQI,UAAU,EAAE,QAAA,CAAA,IAAa,EAAC,EAAuB;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;IAC5H,MAAMC,MAAAA,GAASH,cAAQ,IAAOC,yBAAAA,CAAeH,QAAQI,UAAU,EAAE,QAAA,CAAA,IAAa,EAAC,EAA6B;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;AAChI,IAAA,MAAM,CAACE,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,+BAAAA,CAAgBP,QAAAA,CAAAA;AAE5C,IAAA,qBACIQ,cAAA,CAACC,uCAAAA,EAAAA;QACGJ,MAAAA,EAAQA,MAAAA;QACRD,MAAAA,EAAQA,MAAAA;QACRM,QAAAA,EAAUC,0BAAAA,CAAgBZ,OAAAA,CAAQI,UAAU,EAAE,UAAA,CAAA;QAC9CS,QAAAA,EAAUN,SAAAA;QACVO,SAAAA,EAAWC,yBAAAA,CAAef,OAAAA,CAAQI,UAAU,EAAE,WAAA;;AAG1D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneObjectNavigationalBar.js","sources":["../../../editors/SceneObjectNavigationalBar.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 { useMemo } from 'react';\nimport { ObjectNavigationalBar } from '@cratis/components/ObjectNavigationalBar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringArrayProperty, stringProperty } from '../properties';\nimport { useEditableCopy } from './useEditableCopy';\n\n/**\n * The `Cratis.Components:objectNavigationalBar` component - `ObjectNavigationalBar` from\n * `@cratis/components/ObjectNavigationalBar`.\n *\n * The breadcrumb trail that says where you are inside a nested document, and lets you climb back out.\n * Clicking a crumb truncates the trail to it, which is behavior the component reports rather than\n * performs - so this adapter holds the trail and applies the truncation, and the bar is a working\n * breadcrumb on a screen instead of a row of inert labels.\n *\n * The reported index is how many segments to *keep*, not the position of the crumb clicked: the bar\n * prepends a `Root` crumb at index 0, so clicking the first real segment reports 1. `slice(0, index)` is\n * what that means, and it is also exactly what the back arrow asks for when it reports `length - 1`.\n */\nexport function SceneObjectNavigationalBar({ element }: RegisteredComponentProps) {\n const declared = useMemo(() => stringArrayProperty(element.properties, 'navigationPath') ?? [], [element.properties]);\n const [navigationPath, setNavigationPath] = useEditableCopy(declared);\n\n return (\n <ObjectNavigationalBar\n navigationPath={navigationPath}\n onNavigate={index => setNavigationPath(navigationPath.slice(0, index))}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneObjectNavigationalBar","element","declared","useMemo","stringArrayProperty","properties","navigationPath","setNavigationPath","useEditableCopy","_jsx","ObjectNavigationalBar","onNavigate","index","slice","className","stringProperty"],"mappings":";;;;;;;;AASA;;;;;;;;;;;;AAYC,IACM,SAASA,0BAAAA,CAA2B,EAAEC,OAAO,EAA4B,EAAA;IAC5E,MAAMC,QAAAA,GAAWC,cAAQ,IAAMC,8BAAAA,CAAoBH,QAAQI,UAAU,EAAE,gBAAA,CAAA,IAAqB,EAAE,EAAE;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;AACpH,IAAA,MAAM,CAACC,cAAAA,EAAgBC,iBAAAA,CAAkB,GAAGC,+BAAAA,CAAgBN,QAAAA,CAAAA;AAE5D,IAAA,qBACIO,cAAA,CAACC,2CAAAA,EAAAA;QACGJ,cAAAA,EAAgBA,cAAAA;AAChBK,QAAAA,UAAAA,EAAYC,CAAAA,KAAAA,GAASL,iBAAAA,CAAkBD,cAAAA,CAAeO,KAAK,CAAC,CAAA,EAAGD,KAAAA,CAAAA,CAAAA;QAC/DE,SAAAA,EAAWC,yBAAAA,CAAed,OAAAA,CAAQI,UAAU,EAAE,WAAA;;AAG1D
|
|
1
|
+
{"version":3,"file":"SceneObjectNavigationalBar.js","sources":["../../../editors/SceneObjectNavigationalBar.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 { useMemo } from 'react';\nimport { ObjectNavigationalBar } from '@cratis/components/ObjectNavigationalBar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringArrayProperty, stringProperty } from '../properties';\nimport { useEditableCopy } from './useEditableCopy';\n\n/**\n * The `Cratis.Components:objectNavigationalBar` component - `ObjectNavigationalBar` from\n * `@cratis/components/ObjectNavigationalBar`.\n *\n * The breadcrumb trail that says where you are inside a nested document, and lets you climb back out.\n * Clicking a crumb truncates the trail to it, which is behavior the component reports rather than\n * performs - so this adapter holds the trail and applies the truncation, and the bar is a working\n * breadcrumb on a screen instead of a row of inert labels.\n *\n * The reported index is how many segments to *keep*, not the position of the crumb clicked: the bar\n * prepends a `Root` crumb at index 0, so clicking the first real segment reports 1. `slice(0, index)` is\n * what that means, and it is also exactly what the back arrow asks for when it reports `length - 1`.\n */\nexport function SceneObjectNavigationalBar({ element }: RegisteredComponentProps) {\n const declared = useMemo(() => stringArrayProperty(element.properties, 'navigationPath') ?? [], [element.properties]);\n const [navigationPath, setNavigationPath] = useEditableCopy(declared);\n\n return (\n <ObjectNavigationalBar\n navigationPath={navigationPath}\n onNavigate={index => setNavigationPath(navigationPath.slice(0, index))}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneObjectNavigationalBar","element","declared","useMemo","stringArrayProperty","properties","navigationPath","setNavigationPath","useEditableCopy","_jsx","ObjectNavigationalBar","onNavigate","index","slice","className","stringProperty"],"mappings":";;;;;;;;AASA;;;;;;;;;;;;AAYC,IACM,SAASA,0BAAAA,CAA2B,EAAEC,OAAO,EAA4B,EAAA;IAC5E,MAAMC,QAAAA,GAAWC,cAAQ,IAAMC,8BAAAA,CAAoBH,QAAQI,UAAU,EAAE,gBAAA,CAAA,IAAqB,EAAE,EAAE;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;AACpH,IAAA,MAAM,CAACC,cAAAA,EAAgBC,iBAAAA,CAAkB,GAAGC,+BAAAA,CAAgBN,QAAAA,CAAAA;AAE5D,IAAA,qBACIO,cAAA,CAACC,2CAAAA,EAAAA;QACGJ,cAAAA,EAAgBA,cAAAA;AAChBK,QAAAA,UAAAA,EAAYC,CAAAA,KAAAA,GAASL,iBAAAA,CAAkBD,cAAAA,CAAeO,KAAK,CAAC,CAAA,EAAGD,KAAAA,CAAAA,CAAAA;QAC/DE,SAAAA,EAAWC,yBAAAA,CAAed,OAAAA,CAAQI,UAAU,EAAE,WAAA;;AAG1D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneSchemaEditor.js","sources":["../../../editors/SceneSchemaEditor.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 { useMemo } from 'react';\nimport { SchemaEditor } from '@cratis/components/SchemaEditor';\nimport { JsonSchema } from '@cratis/components/types';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectProperty, stringProperty } from '../properties';\nimport { useEditableCopy } from './useEditableCopy';\n\n/**\n * The `Cratis.Components:schemaEditor` component - `SchemaEditor` from `@cratis/components/SchemaEditor`.\n *\n * Edits a JSON schema as a typed property tree rather than as text. In a Cratis application this is how\n * an event type's shape is inspected and evolved, so `canEdit` and `canNotEditReason` are a pair worth\n * setting together - a schema is often deliberately read-only, and saying *why* in the same place is\n * what keeps that from looking like a bug.\n */\nexport function SceneSchemaEditor({ element }: RegisteredComponentProps) {\n const declared = useMemo(() => (objectProperty(element.properties, 'schema') ?? {}) as unknown as JsonSchema, [element.properties]);\n const [schema, setSchema] = useEditableCopy(declared);\n\n return (\n <SchemaEditor\n schema={schema}\n eventTypeName={stringProperty(element.properties, 'eventTypeName')}\n canEdit={booleanProperty(element.properties, 'canEdit')}\n canNotEditReason={stringProperty(element.properties, 'canNotEditReason')}\n editMode={booleanProperty(element.properties, 'editMode')}\n onChange={setSchema}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneSchemaEditor","element","declared","useMemo","objectProperty","properties","schema","setSchema","useEditableCopy","_jsx","SchemaEditor","eventTypeName","stringProperty","canEdit","booleanProperty","canNotEditReason","editMode","onChange","className"],"mappings":";;;;;;;;AAUA;;;;;;;AAOC,IACM,SAASA,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;IACnE,MAAMC,QAAAA,GAAWC,cAAQ,IAAOC,yBAAAA,CAAeH,QAAQI,UAAU,EAAE,QAAA,CAAA,IAAa,EAAC,EAA6B;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;AAClI,IAAA,MAAM,CAACC,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,+BAAAA,CAAgBN,QAAAA,CAAAA;AAE5C,IAAA,qBACIO,cAAA,CAACC,yBAAAA,EAAAA;QACGJ,MAAAA,EAAQA,MAAAA;QACRK,aAAAA,EAAeC,yBAAAA,CAAeX,OAAAA,CAAQI,UAAU,EAAE,eAAA,CAAA;QAClDQ,OAAAA,EAASC,0BAAAA,CAAgBb,OAAAA,CAAQI,UAAU,EAAE,SAAA,CAAA;QAC7CU,gBAAAA,EAAkBH,yBAAAA,CAAeX,OAAAA,CAAQI,UAAU,EAAE,kBAAA,CAAA;QACrDW,QAAAA,EAAUF,0BAAAA,CAAgBb,OAAAA,CAAQI,UAAU,EAAE,UAAA,CAAA;QAC9CY,QAAAA,EAAUV,SAAAA;QACVW,SAAAA,EAAWN,yBAAAA,CAAeX,OAAAA,CAAQI,UAAU,EAAE,WAAA;;AAG1D
|
|
1
|
+
{"version":3,"file":"SceneSchemaEditor.js","sources":["../../../editors/SceneSchemaEditor.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 { useMemo } from 'react';\nimport { SchemaEditor } from '@cratis/components/SchemaEditor';\nimport { JsonSchema } from '@cratis/components/types';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectProperty, stringProperty } from '../properties';\nimport { useEditableCopy } from './useEditableCopy';\n\n/**\n * The `Cratis.Components:schemaEditor` component - `SchemaEditor` from `@cratis/components/SchemaEditor`.\n *\n * Edits a JSON schema as a typed property tree rather than as text. In a Cratis application this is how\n * an event type's shape is inspected and evolved, so `canEdit` and `canNotEditReason` are a pair worth\n * setting together - a schema is often deliberately read-only, and saying *why* in the same place is\n * what keeps that from looking like a bug.\n */\nexport function SceneSchemaEditor({ element }: RegisteredComponentProps) {\n const declared = useMemo(() => (objectProperty(element.properties, 'schema') ?? {}) as unknown as JsonSchema, [element.properties]);\n const [schema, setSchema] = useEditableCopy(declared);\n\n return (\n <SchemaEditor\n schema={schema}\n eventTypeName={stringProperty(element.properties, 'eventTypeName')}\n canEdit={booleanProperty(element.properties, 'canEdit')}\n canNotEditReason={stringProperty(element.properties, 'canNotEditReason')}\n editMode={booleanProperty(element.properties, 'editMode')}\n onChange={setSchema}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneSchemaEditor","element","declared","useMemo","objectProperty","properties","schema","setSchema","useEditableCopy","_jsx","SchemaEditor","eventTypeName","stringProperty","canEdit","booleanProperty","canNotEditReason","editMode","onChange","className"],"mappings":";;;;;;;;AAUA;;;;;;;AAOC,IACM,SAASA,iBAAAA,CAAkB,EAAEC,OAAO,EAA4B,EAAA;IACnE,MAAMC,QAAAA,GAAWC,cAAQ,IAAOC,yBAAAA,CAAeH,QAAQI,UAAU,EAAE,QAAA,CAAA,IAAa,EAAC,EAA6B;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;AAClI,IAAA,MAAM,CAACC,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,+BAAAA,CAAgBN,QAAAA,CAAAA;AAE5C,IAAA,qBACIO,cAAA,CAACC,yBAAAA,EAAAA;QACGJ,MAAAA,EAAQA,MAAAA;QACRK,aAAAA,EAAeC,yBAAAA,CAAeX,OAAAA,CAAQI,UAAU,EAAE,eAAA,CAAA;QAClDQ,OAAAA,EAASC,0BAAAA,CAAgBb,OAAAA,CAAQI,UAAU,EAAE,SAAA,CAAA;QAC7CU,gBAAAA,EAAkBH,yBAAAA,CAAeX,OAAAA,CAAQI,UAAU,EAAE,kBAAA,CAAA;QACrDW,QAAAA,EAAUF,0BAAAA,CAAgBb,OAAAA,CAAQI,UAAU,EAAE,UAAA,CAAA;QAC9CY,QAAAA,EAAUV,SAAAA;QACVW,SAAAA,EAAWN,yBAAAA,CAAeX,OAAAA,CAAQI,UAAU,EAAE,WAAA;;AAG1D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneTimeMachine.js","sources":["../../../editors/SceneTimeMachine.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 { useMemo } from 'react';\nimport { TimeMachine } from '@cratis/components/TimeMachine';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty } from '../properties';\nimport { timeMachineVersions } from './timeMachineVersions';\nimport { useEditableCopy } from './useEditableCopy';\n\n/**\n * The `Cratis.Components:timeMachine` component - `TimeMachine` from `@cratis/components/TimeMachine`.\n *\n * Scrubs through successive versions of something on a timeline - which in an event-sourced application\n * is the most natural way to look at anything, since every read model *has* a history rather than only a\n * current value. The selected version is held here so the timeline scrubs on a screen; a host that wants\n * to drive the selection renders the component itself.\n */\nexport function SceneTimeMachine({ element }: RegisteredComponentProps) {\n const versions = useMemo(() => timeMachineVersions(element.properties), [element.properties]);\n const declaredIndex = numberProperty(element.properties, 'currentVersionIndex') ?? 0;\n const [currentVersionIndex, setCurrentVersionIndex] = useEditableCopy(declaredIndex);\n\n return (\n <TimeMachine\n versions={versions}\n currentVersionIndex={currentVersionIndex}\n onVersionChange={setCurrentVersionIndex}\n scrollSensitivity={numberProperty(element.properties, 'scrollSensitivity')}\n />\n );\n}\n"],"names":["SceneTimeMachine","element","versions","useMemo","timeMachineVersions","properties","declaredIndex","numberProperty","currentVersionIndex","setCurrentVersionIndex","useEditableCopy","_jsx","TimeMachine","onVersionChange","scrollSensitivity"],"mappings":";;;;;;;;;AAUA;;;;;;;AAOC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAMC,WAAWC,aAAAA,CAAQ,IAAMC,uCAAAA,CAAoBH,OAAAA,CAAQI,UAAU,CAAA,EAAG;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;AAC5F,IAAA,MAAMC,aAAAA,GAAgBC,yBAAAA,CAAeN,OAAAA,CAAQI,UAAU,EAAE,qBAAA,CAAA,IAA0B,CAAA;AACnF,IAAA,MAAM,CAACG,mBAAAA,EAAqBC,sBAAAA,CAAuB,GAAGC,+BAAAA,CAAgBJ,aAAAA,CAAAA;AAEtE,IAAA,qBACIK,cAAA,CAACC,uBAAAA,EAAAA;QACGV,QAAAA,EAAUA,QAAAA;QACVM,mBAAAA,EAAqBA,mBAAAA;QACrBK,eAAAA,EAAiBJ,sBAAAA;QACjBK,iBAAAA,EAAmBP,yBAAAA,CAAeN,OAAAA,CAAQI,UAAU,EAAE,mBAAA;;AAGlE
|
|
1
|
+
{"version":3,"file":"SceneTimeMachine.js","sources":["../../../editors/SceneTimeMachine.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 { useMemo } from 'react';\nimport { TimeMachine } from '@cratis/components/TimeMachine';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty } from '../properties';\nimport { timeMachineVersions } from './timeMachineVersions';\nimport { useEditableCopy } from './useEditableCopy';\n\n/**\n * The `Cratis.Components:timeMachine` component - `TimeMachine` from `@cratis/components/TimeMachine`.\n *\n * Scrubs through successive versions of something on a timeline - which in an event-sourced application\n * is the most natural way to look at anything, since every read model *has* a history rather than only a\n * current value. The selected version is held here so the timeline scrubs on a screen; a host that wants\n * to drive the selection renders the component itself.\n */\nexport function SceneTimeMachine({ element }: RegisteredComponentProps) {\n const versions = useMemo(() => timeMachineVersions(element.properties), [element.properties]);\n const declaredIndex = numberProperty(element.properties, 'currentVersionIndex') ?? 0;\n const [currentVersionIndex, setCurrentVersionIndex] = useEditableCopy(declaredIndex);\n\n return (\n <TimeMachine\n versions={versions}\n currentVersionIndex={currentVersionIndex}\n onVersionChange={setCurrentVersionIndex}\n scrollSensitivity={numberProperty(element.properties, 'scrollSensitivity')}\n />\n );\n}\n"],"names":["SceneTimeMachine","element","versions","useMemo","timeMachineVersions","properties","declaredIndex","numberProperty","currentVersionIndex","setCurrentVersionIndex","useEditableCopy","_jsx","TimeMachine","onVersionChange","scrollSensitivity"],"mappings":";;;;;;;;;AAUA;;;;;;;AAOC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,MAAMC,WAAWC,aAAAA,CAAQ,IAAMC,uCAAAA,CAAoBH,OAAAA,CAAQI,UAAU,CAAA,EAAG;AAACJ,QAAAA,OAAAA,CAAQI;AAAW,KAAA,CAAA;AAC5F,IAAA,MAAMC,aAAAA,GAAgBC,yBAAAA,CAAeN,OAAAA,CAAQI,UAAU,EAAE,qBAAA,CAAA,IAA0B,CAAA;AACnF,IAAA,MAAM,CAACG,mBAAAA,EAAqBC,sBAAAA,CAAuB,GAAGC,+BAAAA,CAAgBJ,aAAAA,CAAAA;AAEtE,IAAA,qBACIK,cAAA,CAACC,uBAAAA,EAAAA;QACGV,QAAAA,EAAUA,QAAAA;QACVM,mBAAAA,EAAqBA,mBAAAA;QACrBK,eAAAA,EAAiBJ,sBAAAA;QACjBK,iBAAAA,EAAmBP,yBAAAA,CAAeN,OAAAA,CAAQI,UAAU,EAAE,mBAAA;;AAGlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filterDefinitions.js","sources":["../../../editors/filterDefinitions.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 { FilterDefinition, FilterOption, FilterValue } from '@cratis/components/Filter';\nimport { booleanProperty, numberProperty, objectArrayProperty, stringProperty, unionProperty } from '../properties';\n\n/** The value kinds a filter can be declared over. */\nconst filterTypes = ['string', 'number', 'date', 'custom'] as const;\n\n/**\n * Reads a `filters` property into the `FilterDefinition` list `FilterPanel` renders.\n *\n * A definition needs a `key` and a `label`; an entry without both is dropped, since a filter with no key\n * has nothing to filter on and one with no label cannot be shown. Everything else is optional and falls\n * through to the panel's own defaults.\n */\nexport function filterDefinitions(properties: Record<string, unknown>): FilterDefinition[] {\n const entries = objectArrayProperty(properties, 'filters') ?? [];\n\n return entries\n .map((entry): FilterDefinition | undefined => {\n const key = stringProperty(entry, 'key');\n const label = stringProperty(entry, 'label');\n if (key === undefined || label === undefined) return undefined;\n\n return {\n key,\n label,\n type: unionProperty(entry, 'type', filterTypes),\n multi: booleanProperty(entry, 'multi'),\n options: filterOptions(entry),\n searchable: booleanProperty(entry, 'searchable'),\n searchPlaceholder: stringProperty(entry, 'searchPlaceholder'),\n buckets: numberProperty(entry, 'buckets'),\n };\n })\n .filter((definition): definition is FilterDefinition => definition !== undefined);\n}\n\n/**\n * Reads one filter's selectable options. An option's `value` is what gets applied and its `key` is what\n * the panel tracks selection by; `value` falls back to the key so the common case of a plain string\n * choice needs only `key` and `label`.\n */\nfunction filterOptions(entry: Record<string, unknown>): FilterOption[] | undefined {\n const options = objectArrayProperty(entry, 'options');\n if (options === undefined) return undefined;\n\n return options\n .map((option): FilterOption | undefined => {\n const key = stringProperty(option, 'key');\n const label = stringProperty(option, 'label');\n if (key === undefined || label === undefined) return undefined;\n\n const value: FilterValue = stringProperty(option, 'value') ?? numberProperty(option, 'value') ?? booleanProperty(option, 'value') ?? key;\n return { key, label, value, count: numberProperty(option, 'count') };\n })\n .filter((option): option is FilterOption => option !== undefined);\n}\n"],"names":["filterTypes","filterDefinitions","properties","entries","objectArrayProperty","map","entry","key","stringProperty","label","undefined","type","unionProperty","multi","booleanProperty","options","filterOptions","searchable","searchPlaceholder","buckets","numberProperty","filter","definition","option","value","count"],"mappings":";;;;AAAA;AACA;AAKA,sDACA,MAAMA,WAAAA,GAAc;AAAC,IAAA,QAAA;AAAU,IAAA,QAAA;AAAU,IAAA,MAAA;AAAQ,IAAA;AAAS,CAAA;AAE1D;;;;;;IAOO,SAASC,iBAAAA,CAAkBC,YAAmC,EAAA;AACjE,IAAA,MAAMC,OAAAA,GAAUC,8BAAAA,CAAoBF,YAAAA,EAAY,SAAA,CAAA,IAAc,EAAE;IAEhE,OAAOC,OAAAA,CACFE,GAAG,CAAC,CAACC,KAAAA,GAAAA;QACF,MAAMC,GAAAA,GAAMC,0BAAeF,KAAAA,EAAO,KAAA,CAAA;QAClC,MAAMG,KAAAA,GAAQD,0BAAeF,KAAAA,EAAO,OAAA,CAAA;AACpC,QAAA,IAAIC,GAAAA,KAAQG,SAAAA,IAAaD,KAAAA,KAAUC,SAAAA,EAAW,OAAOA,SAAAA;QAErD,OAAO;AACHH,YAAAA,GAAAA;AACAE,YAAAA,KAAAA;YACAE,IAAAA,EAAMC,wBAAAA,CAAcN,OAAO,MAAA,EAAQN,WAAAA,CAAAA;AACnCa,YAAAA,KAAAA,EAAOC,2BAAgBR,KAAAA,EAAO,OAAA,CAAA;AAC9BS,YAAAA,OAAAA,EAASC,aAAAA,CAAcV,KAAAA,CAAAA;AACvBW,YAAAA,UAAAA,EAAYH,2BAAgBR,KAAAA,EAAO,YAAA,CAAA;AACnCY,YAAAA,iBAAAA,EAAmBV,0BAAeF,KAAAA,EAAO,mBAAA,CAAA;AACzCa,YAAAA,OAAAA,EAASC,0BAAed,KAAAA,EAAO,SAAA;AACnC,SAAA;AACJ,IAAA,CAAA,CAAA,CACCe,MAAM,CAAC,CAACC,UAAAA,GAA+CA,UAAAA,KAAeZ,SAAAA,CAAAA;AAC/E;AAEA;;;;IAKA,SAASM,cAAcV,KAA8B,EAAA;IACjD,MAAMS,OAAAA,GAAUX,+BAAoBE,KAAAA,EAAO,SAAA,CAAA;IAC3C,IAAIS,OAAAA,KAAYL,WAAW,OAAOA,SAAAA;IAElC,OAAOK,OAAAA,CACFV,GAAG,CAAC,CAACkB,MAAAA,GAAAA;QACF,MAAMhB,GAAAA,GAAMC,0BAAee,MAAAA,EAAQ,KAAA,CAAA;QACnC,MAAMd,KAAAA,GAAQD,0BAAee,MAAAA,EAAQ,OAAA,CAAA;AACrC,QAAA,IAAIhB,GAAAA,KAAQG,SAAAA,IAAaD,KAAAA,KAAUC,SAAAA,EAAW,OAAOA,SAAAA;QAErD,MAAMc,KAAAA,GAAqBhB,0BAAee,MAAAA,EAAQ,OAAA,CAAA,IAAYH,0BAAeG,MAAAA,EAAQ,OAAA,CAAA,IAAYT,0BAAAA,CAAgBS,MAAAA,EAAQ,OAAA,CAAA,IAAYhB,GAAAA;QACrI,OAAO;AAAEA,YAAAA,GAAAA;AAAKE,YAAAA,KAAAA;AAAOe,YAAAA,KAAAA;AAAOC,YAAAA,KAAAA,EAAOL,0BAAeG,MAAAA,EAAQ,OAAA;AAAS,SAAA;AACvE,IAAA,CAAA,CAAA,CACCF,MAAM,CAAC,CAACE,MAAAA,GAAmCA,MAAAA,KAAWb,SAAAA,CAAAA;AAC/D
|
|
1
|
+
{"version":3,"file":"filterDefinitions.js","sources":["../../../editors/filterDefinitions.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 { FilterDefinition, FilterOption, FilterValue } from '@cratis/components/Filter';\nimport { booleanProperty, numberProperty, objectArrayProperty, stringProperty, unionProperty } from '../properties';\n\n/** The value kinds a filter can be declared over. */\nconst filterTypes = ['string', 'number', 'date', 'custom'] as const;\n\n/**\n * Reads a `filters` property into the `FilterDefinition` list `FilterPanel` renders.\n *\n * A definition needs a `key` and a `label`; an entry without both is dropped, since a filter with no key\n * has nothing to filter on and one with no label cannot be shown. Everything else is optional and falls\n * through to the panel's own defaults.\n */\nexport function filterDefinitions(properties: Record<string, unknown>): FilterDefinition[] {\n const entries = objectArrayProperty(properties, 'filters') ?? [];\n\n return entries\n .map((entry): FilterDefinition | undefined => {\n const key = stringProperty(entry, 'key');\n const label = stringProperty(entry, 'label');\n if (key === undefined || label === undefined) return undefined;\n\n return {\n key,\n label,\n type: unionProperty(entry, 'type', filterTypes),\n multi: booleanProperty(entry, 'multi'),\n options: filterOptions(entry),\n searchable: booleanProperty(entry, 'searchable'),\n searchPlaceholder: stringProperty(entry, 'searchPlaceholder'),\n buckets: numberProperty(entry, 'buckets'),\n };\n })\n .filter((definition): definition is FilterDefinition => definition !== undefined);\n}\n\n/**\n * Reads one filter's selectable options. An option's `value` is what gets applied and its `key` is what\n * the panel tracks selection by; `value` falls back to the key so the common case of a plain string\n * choice needs only `key` and `label`.\n */\nfunction filterOptions(entry: Record<string, unknown>): FilterOption[] | undefined {\n const options = objectArrayProperty(entry, 'options');\n if (options === undefined) return undefined;\n\n return options\n .map((option): FilterOption | undefined => {\n const key = stringProperty(option, 'key');\n const label = stringProperty(option, 'label');\n if (key === undefined || label === undefined) return undefined;\n\n const value: FilterValue = stringProperty(option, 'value') ?? numberProperty(option, 'value') ?? booleanProperty(option, 'value') ?? key;\n return { key, label, value, count: numberProperty(option, 'count') };\n })\n .filter((option): option is FilterOption => option !== undefined);\n}\n"],"names":["filterTypes","filterDefinitions","properties","entries","objectArrayProperty","map","entry","key","stringProperty","label","undefined","type","unionProperty","multi","booleanProperty","options","filterOptions","searchable","searchPlaceholder","buckets","numberProperty","filter","definition","option","value","count"],"mappings":";;;;AAAA;AACA;AAKA,sDACA,MAAMA,WAAAA,GAAc;AAAC,IAAA,QAAA;AAAU,IAAA,QAAA;AAAU,IAAA,MAAA;AAAQ,IAAA;AAAS,CAAA;AAE1D;;;;;;IAOO,SAASC,iBAAAA,CAAkBC,YAAmC,EAAA;AACjE,IAAA,MAAMC,OAAAA,GAAUC,8BAAAA,CAAoBF,YAAAA,EAAY,SAAA,CAAA,IAAc,EAAE;IAEhE,OAAOC,OAAAA,CACFE,GAAG,CAAC,CAACC,KAAAA,GAAAA;QACF,MAAMC,GAAAA,GAAMC,0BAAeF,KAAAA,EAAO,KAAA,CAAA;QAClC,MAAMG,KAAAA,GAAQD,0BAAeF,KAAAA,EAAO,OAAA,CAAA;AACpC,QAAA,IAAIC,GAAAA,KAAQG,SAAAA,IAAaD,KAAAA,KAAUC,SAAAA,EAAW,OAAOA,SAAAA;QAErD,OAAO;AACHH,YAAAA,GAAAA;AACAE,YAAAA,KAAAA;YACAE,IAAAA,EAAMC,wBAAAA,CAAcN,OAAO,MAAA,EAAQN,WAAAA,CAAAA;AACnCa,YAAAA,KAAAA,EAAOC,2BAAgBR,KAAAA,EAAO,OAAA,CAAA;AAC9BS,YAAAA,OAAAA,EAASC,aAAAA,CAAcV,KAAAA,CAAAA;AACvBW,YAAAA,UAAAA,EAAYH,2BAAgBR,KAAAA,EAAO,YAAA,CAAA;AACnCY,YAAAA,iBAAAA,EAAmBV,0BAAeF,KAAAA,EAAO,mBAAA,CAAA;AACzCa,YAAAA,OAAAA,EAASC,0BAAed,KAAAA,EAAO,SAAA;AACnC,SAAA;AACJ,IAAA,CAAA,CAAA,CACCe,MAAM,CAAC,CAACC,UAAAA,GAA+CA,UAAAA,KAAeZ,SAAAA,CAAAA;AAC/E;AAEA;;;;IAKA,SAASM,cAAcV,KAA8B,EAAA;IACjD,MAAMS,OAAAA,GAAUX,+BAAoBE,KAAAA,EAAO,SAAA,CAAA;IAC3C,IAAIS,OAAAA,KAAYL,WAAW,OAAOA,SAAAA;IAElC,OAAOK,OAAAA,CACFV,GAAG,CAAC,CAACkB,MAAAA,GAAAA;QACF,MAAMhB,GAAAA,GAAMC,0BAAee,MAAAA,EAAQ,KAAA,CAAA;QACnC,MAAMd,KAAAA,GAAQD,0BAAee,MAAAA,EAAQ,OAAA,CAAA;AACrC,QAAA,IAAIhB,GAAAA,KAAQG,SAAAA,IAAaD,KAAAA,KAAUC,SAAAA,EAAW,OAAOA,SAAAA;QAErD,MAAMc,KAAAA,GAAqBhB,0BAAee,MAAAA,EAAQ,OAAA,CAAA,IAAYH,0BAAeG,MAAAA,EAAQ,OAAA,CAAA,IAAYT,0BAAAA,CAAgBS,MAAAA,EAAQ,OAAA,CAAA,IAAYhB,GAAAA;QACrI,OAAO;AAAEA,YAAAA,GAAAA;AAAKE,YAAAA,KAAAA;AAAOe,YAAAA,KAAAA;AAAOC,YAAAA,KAAAA,EAAOL,0BAAeG,MAAAA,EAAQ,OAAA;AAAS,SAAA;AACvE,IAAA,CAAA,CAAA,CACCF,MAAM,CAAC,CAACE,MAAAA,GAAmCA,MAAAA,KAAWb,SAAAA,CAAAA;AAC/D;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeMachineVersions.js","sources":["../../../editors/timeMachineVersions.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 { Version } from '@cratis/components/TimeMachine';\nimport { numberProperty, objectArrayProperty, stringProperty } from '../properties';\n\n/**\n * Reads a `versions` property into the `Version` list `TimeMachine` renders.\n *\n * An entry without an `id`, a `label` and a parseable `timestamp` is dropped rather than defaulted,\n * because `TimeMachine`'s whole job is to place versions on a timeline: a version invented at the epoch\n * would not be a slightly wrong entry, it would silently reorder every real one around it. A dropped\n * entry is visibly one item short; a fabricated one is a timeline that lies.\n *\n * `content` is rendered as text. A version whose content is a whole element tree is not something a\n * property bag can carry, and pretending otherwise would be the wrong seam - that belongs in a screen\n * template, not in a property.\n */\nexport function timeMachineVersions(properties: Record<string, unknown>): Version[] {\n const entries = objectArrayProperty(properties, 'versions') ?? [];\n\n return entries\n .map((entry): Version | undefined => {\n const id = stringProperty(entry, 'id');\n const label = stringProperty(entry, 'label');\n const timestamp = timestampOf(entry);\n if (id === undefined || label === undefined || timestamp === undefined) return undefined;\n\n return { id, label, timestamp, content: stringProperty(entry, 'content') ?? '' };\n })\n .filter((version): version is Version => version !== undefined);\n}\n\n/**\n * Reads an entry's `timestamp`, accepting both the ISO string a `.play` screen writes and the epoch\n * number a serializer may produce, and rejecting anything that does not parse into a real date.\n */\nfunction timestampOf(entry: Record<string, unknown>): Date | undefined {\n const value = stringProperty(entry, 'timestamp') ?? numberProperty(entry, 'timestamp');\n if (value === undefined) return undefined;\n\n const timestamp = new Date(value);\n return Number.isNaN(timestamp.getTime()) ? undefined : timestamp;\n}\n"],"names":["timeMachineVersions","properties","entries","objectArrayProperty","map","entry","id","stringProperty","label","timestamp","timestampOf","undefined","content","filter","version","value","numberProperty","Date","Number","isNaN","getTime"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;;;;;IAYO,SAASA,mBAAAA,CAAoBC,YAAmC,EAAA;AACnE,IAAA,MAAMC,OAAAA,GAAUC,8BAAAA,CAAoBF,YAAAA,EAAY,UAAA,CAAA,IAAe,EAAE;IAEjE,OAAOC,OAAAA,CACFE,GAAG,CAAC,CAACC,KAAAA,GAAAA;QACF,MAAMC,EAAAA,GAAKC,0BAAeF,KAAAA,EAAO,IAAA,CAAA;QACjC,MAAMG,KAAAA,GAAQD,0BAAeF,KAAAA,EAAO,OAAA,CAAA;AACpC,QAAA,MAAMI,YAAYC,WAAAA,CAAYL,KAAAA,CAAAA;AAC9B,QAAA,IAAIC,OAAOK,SAAAA,IAAaH,KAAAA,KAAUG,SAAAA,IAAaF,SAAAA,KAAcE,WAAW,OAAOA,SAAAA;QAE/E,OAAO;AAAEL,YAAAA,EAAAA;AAAIE,YAAAA,KAAAA;AAAOC,YAAAA,SAAAA;YAAWG,OAAAA,EAASL,yBAAAA,CAAeF,OAAO,SAAA,CAAA,IAAc;AAAG,SAAA;AACnF,IAAA,CAAA,CAAA,CACCQ,MAAM,CAAC,CAACC,OAAAA,GAAgCA,OAAAA,KAAYH,SAAAA,CAAAA;AAC7D;AAEA;;;IAIA,SAASD,YAAYL,KAA8B,EAAA;AAC/C,IAAA,MAAMU,KAAAA,GAAQR,yBAAAA,CAAeF,KAAAA,EAAO,WAAA,CAAA,IAAgBW,0BAAeX,KAAAA,EAAO,WAAA,CAAA;IAC1E,IAAIU,KAAAA,KAAUJ,WAAW,OAAOA,SAAAA;IAEhC,MAAMF,SAAAA,GAAY,IAAIQ,IAAAA,CAAKF,KAAAA,CAAAA;AAC3B,IAAA,OAAOG,OAAOC,KAAK,CAACV,SAAAA,CAAUW,OAAO,MAAMT,SAAAA,GAAYF,SAAAA;AAC3D
|
|
1
|
+
{"version":3,"file":"timeMachineVersions.js","sources":["../../../editors/timeMachineVersions.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 { Version } from '@cratis/components/TimeMachine';\nimport { numberProperty, objectArrayProperty, stringProperty } from '../properties';\n\n/**\n * Reads a `versions` property into the `Version` list `TimeMachine` renders.\n *\n * An entry without an `id`, a `label` and a parseable `timestamp` is dropped rather than defaulted,\n * because `TimeMachine`'s whole job is to place versions on a timeline: a version invented at the epoch\n * would not be a slightly wrong entry, it would silently reorder every real one around it. A dropped\n * entry is visibly one item short; a fabricated one is a timeline that lies.\n *\n * `content` is rendered as text. A version whose content is a whole element tree is not something a\n * property bag can carry, and pretending otherwise would be the wrong seam - that belongs in a screen\n * template, not in a property.\n */\nexport function timeMachineVersions(properties: Record<string, unknown>): Version[] {\n const entries = objectArrayProperty(properties, 'versions') ?? [];\n\n return entries\n .map((entry): Version | undefined => {\n const id = stringProperty(entry, 'id');\n const label = stringProperty(entry, 'label');\n const timestamp = timestampOf(entry);\n if (id === undefined || label === undefined || timestamp === undefined) return undefined;\n\n return { id, label, timestamp, content: stringProperty(entry, 'content') ?? '' };\n })\n .filter((version): version is Version => version !== undefined);\n}\n\n/**\n * Reads an entry's `timestamp`, accepting both the ISO string a `.play` screen writes and the epoch\n * number a serializer may produce, and rejecting anything that does not parse into a real date.\n */\nfunction timestampOf(entry: Record<string, unknown>): Date | undefined {\n const value = stringProperty(entry, 'timestamp') ?? numberProperty(entry, 'timestamp');\n if (value === undefined) return undefined;\n\n const timestamp = new Date(value);\n return Number.isNaN(timestamp.getTime()) ? undefined : timestamp;\n}\n"],"names":["timeMachineVersions","properties","entries","objectArrayProperty","map","entry","id","stringProperty","label","timestamp","timestampOf","undefined","content","filter","version","value","numberProperty","Date","Number","isNaN","getTime"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;;;;;IAYO,SAASA,mBAAAA,CAAoBC,YAAmC,EAAA;AACnE,IAAA,MAAMC,OAAAA,GAAUC,8BAAAA,CAAoBF,YAAAA,EAAY,UAAA,CAAA,IAAe,EAAE;IAEjE,OAAOC,OAAAA,CACFE,GAAG,CAAC,CAACC,KAAAA,GAAAA;QACF,MAAMC,EAAAA,GAAKC,0BAAeF,KAAAA,EAAO,IAAA,CAAA;QACjC,MAAMG,KAAAA,GAAQD,0BAAeF,KAAAA,EAAO,OAAA,CAAA;AACpC,QAAA,MAAMI,YAAYC,WAAAA,CAAYL,KAAAA,CAAAA;AAC9B,QAAA,IAAIC,OAAOK,SAAAA,IAAaH,KAAAA,KAAUG,SAAAA,IAAaF,SAAAA,KAAcE,WAAW,OAAOA,SAAAA;QAE/E,OAAO;AAAEL,YAAAA,EAAAA;AAAIE,YAAAA,KAAAA;AAAOC,YAAAA,SAAAA;YAAWG,OAAAA,EAASL,yBAAAA,CAAeF,OAAO,SAAA,CAAA,IAAc;AAAG,SAAA;AACnF,IAAA,CAAA,CAAA,CACCQ,MAAM,CAAC,CAACC,OAAAA,GAAgCA,OAAAA,KAAYH,SAAAA,CAAAA;AAC7D;AAEA;;;IAIA,SAASD,YAAYL,KAA8B,EAAA;AAC/C,IAAA,MAAMU,KAAAA,GAAQR,yBAAAA,CAAeF,KAAAA,EAAO,WAAA,CAAA,IAAgBW,0BAAeX,KAAAA,EAAO,WAAA,CAAA;IAC1E,IAAIU,KAAAA,KAAUJ,WAAW,OAAOA,SAAAA;IAEhC,MAAMF,SAAAA,GAAY,IAAIQ,IAAAA,CAAKF,KAAAA,CAAAA;AAC3B,IAAA,OAAOG,OAAOC,KAAK,CAACV,SAAAA,CAAUW,OAAO,MAAMT,SAAAA,GAAYF,SAAAA;AAC3D;;"}
|