@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":"useEditableCopy.js","sources":["../../../editors/useEditableCopy.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 { useState } from 'react';\n\n/**\n * Keeps a locally editable copy of a value a screen declares, resetting it whenever the declared value\n * itself changes.\n *\n * The editors in `@cratis/components` are controlled components: `ObjectContentEditor`, `SchemaEditor`\n * and `TimeMachine` all render what they are given and report changes through a callback. A Scene screen\n * can only *declare* the starting value - a property bag has no way to receive a callback - so without\n * somewhere to put the result, every one of these would render as a dead surface that discards every\n * keystroke. Local state is what makes them behave like the editors they are while a screen is being\n * designed; a host that needs the edits for real reads them off its own model, not off the screen.\n *\n * The reset is deliberately done during render rather than in an effect: Studio rewrites an element's\n * properties as the designer types, and an effect-based reset would show one frame of the previous\n * value every time.\n */\nexport function useEditableCopy<T>(source: T): [T, (value: T) => void] {\n const [edited, setEdited] = useState(source);\n const [lastSource, setLastSource] = useState(source);\n\n if (lastSource !== source) {\n setLastSource(source);\n setEdited(source);\n return [source, setEdited];\n }\n\n return [edited, setEdited];\n}\n"],"names":["useEditableCopy","source","edited","setEdited","useState","lastSource","setLastSource"],"mappings":";;;;AAAA;AACA;AAIA;;;;;;;;;;;;;;IAeO,SAASA,eAAAA,CAAmBC,MAAS,EAAA;AACxC,IAAA,MAAM,CAACC,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,cAAAA,CAASH,MAAAA,CAAAA;AACrC,IAAA,MAAM,CAACI,UAAAA,EAAYC,aAAAA,CAAc,GAAGF,cAAAA,CAASH,MAAAA,CAAAA;AAE7C,IAAA,IAAII,eAAeJ,MAAAA,EAAQ;QACvBK,aAAAA,CAAcL,MAAAA,CAAAA;QACdE,SAAAA,CAAUF,MAAAA,CAAAA;QACV,OAAO;AAACA,YAAAA,MAAAA;AAAQE,YAAAA;AAAU,SAAA;AAC9B,IAAA;IAEA,OAAO;AAACD,QAAAA,MAAAA;AAAQC,QAAAA;AAAU,KAAA;AAC9B
|
|
1
|
+
{"version":3,"file":"useEditableCopy.js","sources":["../../../editors/useEditableCopy.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 { useState } from 'react';\n\n/**\n * Keeps a locally editable copy of a value a screen declares, resetting it whenever the declared value\n * itself changes.\n *\n * The editors in `@cratis/components` are controlled components: `ObjectContentEditor`, `SchemaEditor`\n * and `TimeMachine` all render what they are given and report changes through a callback. A Scene screen\n * can only *declare* the starting value - a property bag has no way to receive a callback - so without\n * somewhere to put the result, every one of these would render as a dead surface that discards every\n * keystroke. Local state is what makes them behave like the editors they are while a screen is being\n * designed; a host that needs the edits for real reads them off its own model, not off the screen.\n *\n * The reset is deliberately done during render rather than in an effect: Studio rewrites an element's\n * properties as the designer types, and an effect-based reset would show one frame of the previous\n * value every time.\n */\nexport function useEditableCopy<T>(source: T): [T, (value: T) => void] {\n const [edited, setEdited] = useState(source);\n const [lastSource, setLastSource] = useState(source);\n\n if (lastSource !== source) {\n setLastSource(source);\n setEdited(source);\n return [source, setEdited];\n }\n\n return [edited, setEdited];\n}\n"],"names":["useEditableCopy","source","edited","setEdited","useState","lastSource","setLastSource"],"mappings":";;;;AAAA;AACA;AAIA;;;;;;;;;;;;;;IAeO,SAASA,eAAAA,CAAmBC,MAAS,EAAA;AACxC,IAAA,MAAM,CAACC,MAAAA,EAAQC,SAAAA,CAAU,GAAGC,cAAAA,CAASH,MAAAA,CAAAA;AACrC,IAAA,MAAM,CAACI,UAAAA,EAAYC,aAAAA,CAAc,GAAGF,cAAAA,CAASH,MAAAA,CAAAA;AAE7C,IAAA,IAAII,eAAeJ,MAAAA,EAAQ;QACvBK,aAAAA,CAAcL,MAAAA,CAAAA;QACdE,SAAAA,CAAUF,MAAAA,CAAAA;QACV,OAAO;AAACA,YAAAA,MAAAA;AAAQE,YAAAA;AAAU,SAAA;AAC9B,IAAA;IAEA,OAAO;AAACD,QAAAA,MAAAA;AAAQC,QAAAA;AAAU,KAAA;AAC9B;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneCommandForm.js","sources":["../../../forms/SceneCommandForm.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 { ComponentType, lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, BoundConstructor, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty } from '../properties';\n\ninterface AutoCommandFormElementProps {\n command: BoundConstructor;\n exclude?: string[];\n}\n\n/**\n * `AutoCommandForm` types `exclude` as `(keyof TCommand)[]`, which collapses to `never[]` when the\n * command type is only known at runtime - as it always is here, since the class arrives from the binding\n * registry rather than from a type annotation. The conversion states the shape this adapter actually\n * passes; the underlying component reads `exclude` as property names either way.\n */\nconst AutoCommandForm = lazy(async () => ({\n default: (await import('@cratis/components/CommandForm')).AutoCommandForm as unknown as ComponentType<AutoCommandFormElementProps>,\n}));\n\n/**\n * The `Cratis.Components:commandForm` component - `AutoCommandForm` from `@cratis/components/CommandForm`.\n *\n * `AutoCommandForm` rather than `CommandForm`, because a screen that had to list every field by hand\n * would go stale the moment a property is added to the command on the backend. `AutoCommandForm` reads\n * the command's own property descriptors and picks a field component per property type, so the form\n * follows the command - which is the same guarantee Arc's generated proxies give the rest of the stack.\n *\n * A screen that does want to place fields itself puts the field components from this package in the\n * `content` slot and names them individually; `exclude` keeps `AutoCommandForm` from generating a second\n * copy of anything placed that way.\n */\nexport function SceneCommandForm({ element }: 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 <AutoCommandForm command={target} exclude={stringArrayProperty(element.properties, 'exclude')} />\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["AutoCommandForm","lazy","default","SceneCommandForm","element","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","command","exclude","stringArrayProperty","properties"],"mappings":";;;;;;;;;;AAaA;;;;;AAKC,IACD,MAAMA,eAAAA,iBAAkBC,UAAAA,CAAK,WAAa;AACtCC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAC9D,CAAA,CAAA;AAEA;;;;;;;;;;;AAWC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;IAClE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBH,OAAAA,EAASI,uBAAAA,CAAYC,OAAO,CAAA;IAC3E,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeP,OAAAA,EAASA,OAAAA;AAASQ,QAAAA,IAAAA,EAAMJ,wBAAYC,OAAO;QAAEJ,IAAAA,EAAMA;;AAEvF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACV,eAAAA,EAAAA;YAAgBc,OAAAA,EAASR,MAAAA;YAAQS,OAAAA,EAASC,8BAAAA,CAAoBZ,OAAAA,CAAQa,UAAU,EAAE,SAAA;;;AAG/F
|
|
1
|
+
{"version":3,"file":"SceneCommandForm.js","sources":["../../../forms/SceneCommandForm.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 { ComponentType, lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, BoundConstructor, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty } from '../properties';\n\ninterface AutoCommandFormElementProps {\n command: BoundConstructor;\n exclude?: string[];\n}\n\n/**\n * `AutoCommandForm` types `exclude` as `(keyof TCommand)[]`, which collapses to `never[]` when the\n * command type is only known at runtime - as it always is here, since the class arrives from the binding\n * registry rather than from a type annotation. The conversion states the shape this adapter actually\n * passes; the underlying component reads `exclude` as property names either way.\n */\nconst AutoCommandForm = lazy(async () => ({\n default: (await import('@cratis/components/CommandForm')).AutoCommandForm as unknown as ComponentType<AutoCommandFormElementProps>,\n}));\n\n/**\n * The `Cratis.Components:commandForm` component - `AutoCommandForm` from `@cratis/components/CommandForm`.\n *\n * `AutoCommandForm` rather than `CommandForm`, because a screen that had to list every field by hand\n * would go stale the moment a property is added to the command on the backend. `AutoCommandForm` reads\n * the command's own property descriptors and picks a field component per property type, so the form\n * follows the command - which is the same guarantee Arc's generated proxies give the rest of the stack.\n *\n * A screen that does want to place fields itself puts the field components from this package in the\n * `content` slot and names them individually; `exclude` keeps `AutoCommandForm` from generating a second\n * copy of anything placed that way.\n */\nexport function SceneCommandForm({ element }: 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 <AutoCommandForm command={target} exclude={stringArrayProperty(element.properties, 'exclude')} />\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["AutoCommandForm","lazy","default","SceneCommandForm","element","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","command","exclude","stringArrayProperty","properties"],"mappings":";;;;;;;;;;AAaA;;;;;AAKC,IACD,MAAMA,eAAAA,iBAAkBC,UAAAA,CAAK,WAAa;AACtCC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAC9D,CAAA,CAAA;AAEA;;;;;;;;;;;AAWC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;IAClE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBH,OAAAA,EAASI,uBAAAA,CAAYC,OAAO,CAAA;IAC3E,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeP,OAAAA,EAASA,OAAAA;AAASQ,QAAAA,IAAAA,EAAMJ,wBAAYC,OAAO;QAAEJ,IAAAA,EAAMA;;AAEvF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACV,eAAAA,EAAAA;YAAgBc,OAAAA,EAASR,MAAAA;YAAQS,OAAAA,EAASC,8BAAAA,CAAoBZ,OAAAA,CAAQa,UAAU,EAAE,SAAA;;;AAG/F;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandFormField.js","sources":["../../../../forms/fields/CommandFormField.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 } from 'react';\nimport { ExternalComponent } from '@cratis/scene.model';\nimport { ArcRuntimeBoundary, Placeholder } from '../../bindings';\nimport { FieldBinding } from './FieldBinding';\nimport { resolveFieldBinding } from './resolveFieldBinding';\n\nexport interface CommandFormFieldProps {\n /** The element being adapted, read for its `property`, `title` and `description`. */\n element: ExternalComponent;\n\n /** Renders the real `@cratis/components` field, given the binding built from the element. */\n children: (binding: FieldBinding) => ReactNode;\n}\n\n/**\n * The part every command form field adapter does identically: resolve the element's `property` into a\n * {@link FieldBinding}, place a visible placeholder when there is none, and isolate the lazily loaded\n * Arc-bound field behind an {@link ArcRuntimeBoundary}.\n *\n * Factored out rather than repeated twelve times so that the behavior a screen author depends on - an\n * unbound field shows up as an unbound field, and one broken field does not take the form with it - is\n * defined once and cannot drift between field types.\n */\nexport function CommandFormField({ element, children }: CommandFormFieldProps) {\n const binding = resolveFieldBinding(element);\n if (!binding) return <Placeholder element={element} problem=\"Missing 'property'\" />;\n\n return <ArcRuntimeBoundary>{children(binding)}</ArcRuntimeBoundary>;\n}\n"],"names":["CommandFormField","element","children","binding","resolveFieldBinding","_jsx","Placeholder","problem","ArcRuntimeBoundary"],"mappings":";;;;;;;;AAAA;AACA;AAgBA;;;;;;;;AAQC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,QAAQ,EAAyB,EAAA;AACzE,IAAA,MAAMC,UAAUC,uCAAAA,CAAoBH,OAAAA,CAAAA;IACpC,IAAI,CAACE,OAAAA,EAAS,qBAAOE,cAAA,CAACC,uBAAAA,EAAAA;QAAYL,OAAAA,EAASA,OAAAA;QAASM,OAAAA,EAAQ;;AAE5D,IAAA,qBAAOF,cAAA,CAACG,qCAAAA,EAAAA;kBAAoBN,QAAAA,CAASC,OAAAA;;AACzC
|
|
1
|
+
{"version":3,"file":"CommandFormField.js","sources":["../../../../forms/fields/CommandFormField.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 } from 'react';\nimport { ExternalComponent } from '@cratis/scene.model';\nimport { ArcRuntimeBoundary, Placeholder } from '../../bindings';\nimport { FieldBinding } from './FieldBinding';\nimport { resolveFieldBinding } from './resolveFieldBinding';\n\nexport interface CommandFormFieldProps {\n /** The element being adapted, read for its `property`, `title` and `description`. */\n element: ExternalComponent;\n\n /** Renders the real `@cratis/components` field, given the binding built from the element. */\n children: (binding: FieldBinding) => ReactNode;\n}\n\n/**\n * The part every command form field adapter does identically: resolve the element's `property` into a\n * {@link FieldBinding}, place a visible placeholder when there is none, and isolate the lazily loaded\n * Arc-bound field behind an {@link ArcRuntimeBoundary}.\n *\n * Factored out rather than repeated twelve times so that the behavior a screen author depends on - an\n * unbound field shows up as an unbound field, and one broken field does not take the form with it - is\n * defined once and cannot drift between field types.\n */\nexport function CommandFormField({ element, children }: CommandFormFieldProps) {\n const binding = resolveFieldBinding(element);\n if (!binding) return <Placeholder element={element} problem=\"Missing 'property'\" />;\n\n return <ArcRuntimeBoundary>{children(binding)}</ArcRuntimeBoundary>;\n}\n"],"names":["CommandFormField","element","children","binding","resolveFieldBinding","_jsx","Placeholder","problem","ArcRuntimeBoundary"],"mappings":";;;;;;;;AAAA;AACA;AAgBA;;;;;;;;AAQC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,QAAQ,EAAyB,EAAA;AACzE,IAAA,MAAMC,UAAUC,uCAAAA,CAAoBH,OAAAA,CAAAA;IACpC,IAAI,CAACE,OAAAA,EAAS,qBAAOE,cAAA,CAACC,uBAAAA,EAAAA;QAAYL,OAAAA,EAASA,OAAAA;QAASM,OAAAA,EAAQ;;AAE5D,IAAA,qBAAOF,cAAA,CAACG,qCAAAA,EAAAA;kBAAoBN,QAAAA,CAASC,OAAAA;;AACzC;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneCalendarField.js","sources":["../../../../forms/fields/SceneCalendarField.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 { booleanProperty, stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst CalendarField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).CalendarField }));\n\n/** Whether times are shown on a 12- or 24-hour clock. */\nconst hourFormats = ['12', '24'] as const;\n\n/**\n * The `Cratis.Components:calendarField` component - `CalendarField` from `@cratis/components/CommandForm`.\n *\n * Binds to a `Date` property, so the command receives a real date rather than the string an\n * `<input type=\"date\">` produces - which matters because the backend's command record is typed and a\n * string would fail model binding rather than the field.\n *\n * `minDate` and `maxDate` are deliberately not exposed: they would have to come out of the property bag\n * as strings and be parsed here, and a bound range that silently misparses is worse than no bound range.\n * A date range that has to be enforced belongs in the command's validator, where it is authoritative.\n */\nexport function SceneCalendarField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <CalendarField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n dateFormat={stringProperty(element.properties, 'dateFormat')}\n showIcon={booleanProperty(element.properties, 'showIcon')}\n showTime={booleanProperty(element.properties, 'showTime')}\n hourFormat={unionProperty(element.properties, 'hourFormat', hourFormats)}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["CalendarField","lazy","default","hourFormats","SceneCalendarField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","dateFormat","showIcon","booleanProperty","showTime","hourFormat","unionProperty","className"],"mappings":";;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH,0DACA,MAAMG,WAAAA,GAAc;AAAC,IAAA,IAAA;AAAM,IAAA;AAAK,CAAA;AAEhC;;;;;;;;;;AAUC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACN,aAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;gBACXC,WAAAA,EAAaC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,UAAAA,EAAYF,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,YAAA,CAAA;gBAC/CE,QAAAA,EAAUC,0BAAAA,CAAgBT,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;gBAC9CI,QAAAA,EAAUD,0BAAAA,CAAgBT,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAC9CK,gBAAAA,UAAAA,EAAYC,wBAAAA,CAAcZ,OAAAA,CAAQM,UAAU,EAAE,YAAA,EAAcR,WAAAA,CAAAA;gBAC5De,SAAAA,EAAWR,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneCalendarField.js","sources":["../../../../forms/fields/SceneCalendarField.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 { booleanProperty, stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst CalendarField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).CalendarField }));\n\n/** Whether times are shown on a 12- or 24-hour clock. */\nconst hourFormats = ['12', '24'] as const;\n\n/**\n * The `Cratis.Components:calendarField` component - `CalendarField` from `@cratis/components/CommandForm`.\n *\n * Binds to a `Date` property, so the command receives a real date rather than the string an\n * `<input type=\"date\">` produces - which matters because the backend's command record is typed and a\n * string would fail model binding rather than the field.\n *\n * `minDate` and `maxDate` are deliberately not exposed: they would have to come out of the property bag\n * as strings and be parsed here, and a bound range that silently misparses is worse than no bound range.\n * A date range that has to be enforced belongs in the command's validator, where it is authoritative.\n */\nexport function SceneCalendarField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <CalendarField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n dateFormat={stringProperty(element.properties, 'dateFormat')}\n showIcon={booleanProperty(element.properties, 'showIcon')}\n showTime={booleanProperty(element.properties, 'showTime')}\n hourFormat={unionProperty(element.properties, 'hourFormat', hourFormats)}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["CalendarField","lazy","default","hourFormats","SceneCalendarField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","dateFormat","showIcon","booleanProperty","showTime","hourFormat","unionProperty","className"],"mappings":";;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH,0DACA,MAAMG,WAAAA,GAAc;AAAC,IAAA,IAAA;AAAM,IAAA;AAAK,CAAA;AAEhC;;;;;;;;;;AAUC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACN,aAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;gBACXC,WAAAA,EAAaC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,UAAAA,EAAYF,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,YAAA,CAAA;gBAC/CE,QAAAA,EAAUC,0BAAAA,CAAgBT,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;gBAC9CI,QAAAA,EAAUD,0BAAAA,CAAgBT,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAC9CK,gBAAAA,UAAAA,EAAYC,wBAAAA,CAAcZ,OAAAA,CAAQM,UAAU,EAAE,YAAA,EAAcR,WAAAA,CAAAA;gBAC5De,SAAAA,EAAWR,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneCheckboxField.js","sources":["../../../../forms/fields/SceneCheckboxField.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 { stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst CheckboxField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).CheckboxField }));\n\n/**\n * The `Cratis.Components:checkboxField` component - `CheckboxField` from `@cratis/components/CommandForm`.\n *\n * `label` is the text beside the box and is distinct from `title`, which is the field's own label above\n * it - a checkbox usually wants only one of the two, and which one is a layout decision the screen makes.\n */\nexport function SceneCheckboxField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <CheckboxField\n {...binding}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["CheckboxField","lazy","default","SceneCheckboxField","element","_jsx","CommandFormField","binding","label","stringProperty","properties","className"],"mappings":";;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;AAKC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,KAAAA,EAAOC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,OAAA,CAAA;gBAC1CC,SAAAA,EAAWF,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneCheckboxField.js","sources":["../../../../forms/fields/SceneCheckboxField.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 { stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst CheckboxField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).CheckboxField }));\n\n/**\n * The `Cratis.Components:checkboxField` component - `CheckboxField` from `@cratis/components/CommandForm`.\n *\n * `label` is the text beside the box and is distinct from `title`, which is the field's own label above\n * it - a checkbox usually wants only one of the two, and which one is a layout decision the screen makes.\n */\nexport function SceneCheckboxField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <CheckboxField\n {...binding}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["CheckboxField","lazy","default","SceneCheckboxField","element","_jsx","CommandFormField","binding","label","stringProperty","properties","className"],"mappings":";;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;AAKC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,KAAAA,EAAOC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,OAAA,CAAA;gBAC1CC,SAAAA,EAAWF,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneChipsField.js","sources":["../../../../forms/fields/SceneChipsField.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 { booleanProperty, numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst ChipsField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).ChipsField }));\n\n/**\n * The `Cratis.Components:chipsField` component - `ChipsField` from `@cratis/components/CommandForm`.\n *\n * A free-form list of strings - tags, labels, recipients - where the values are typed rather than picked.\n * `multiSelectField` is the right choice whenever the values come from a known set; this one exists for\n * when they do not.\n *\n * There is no `separator` property. PrimeReact 11's `InputTags` commits exactly one tag per `Enter` and\n * no longer splits pasted text, so `@cratis/components` keeps the prop only so existing call sites\n * compile and never reads it. A screen that wrote `separator: ','` and watched a pasted comma-separated\n * list arrive as a single tag would have no way to tell that from a bug, which is precisely why the\n * property is withdrawn rather than passed through.\n */\nexport function SceneChipsField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <ChipsField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n max={numberProperty(element.properties, 'max')}\n addOnBlur={booleanProperty(element.properties, 'addOnBlur')}\n allowDuplicate={booleanProperty(element.properties, 'allowDuplicate')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["ChipsField","lazy","default","SceneChipsField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","max","numberProperty","addOnBlur","booleanProperty","allowDuplicate","className"],"mappings":";;;;;;;AAQA,MAAMA,UAAAA,iBAAaC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAW,CAAA,CAAA;AAE5G;;;;;;;;;;;;AAYC,IACM,SAASG,eAAAA,CAAgB,EAAEC,OAAO,EAA4B,EAAA;AACjE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,UAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,GAAAA,EAAKC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCG,SAAAA,EAAWC,0BAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;gBAC/CK,cAAAA,EAAgBD,0BAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,gBAAA,CAAA;gBACpDM,SAAAA,EAAWP,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneChipsField.js","sources":["../../../../forms/fields/SceneChipsField.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 { booleanProperty, numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst ChipsField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).ChipsField }));\n\n/**\n * The `Cratis.Components:chipsField` component - `ChipsField` from `@cratis/components/CommandForm`.\n *\n * A free-form list of strings - tags, labels, recipients - where the values are typed rather than picked.\n * `multiSelectField` is the right choice whenever the values come from a known set; this one exists for\n * when they do not.\n *\n * There is no `separator` property. PrimeReact 11's `InputTags` commits exactly one tag per `Enter` and\n * no longer splits pasted text, so `@cratis/components` keeps the prop only so existing call sites\n * compile and never reads it. A screen that wrote `separator: ','` and watched a pasted comma-separated\n * list arrive as a single tag would have no way to tell that from a bug, which is precisely why the\n * property is withdrawn rather than passed through.\n */\nexport function SceneChipsField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <ChipsField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n max={numberProperty(element.properties, 'max')}\n addOnBlur={booleanProperty(element.properties, 'addOnBlur')}\n allowDuplicate={booleanProperty(element.properties, 'allowDuplicate')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["ChipsField","lazy","default","SceneChipsField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","max","numberProperty","addOnBlur","booleanProperty","allowDuplicate","className"],"mappings":";;;;;;;AAQA,MAAMA,UAAAA,iBAAaC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAW,CAAA,CAAA;AAE5G;;;;;;;;;;;;AAYC,IACM,SAASG,eAAAA,CAAgB,EAAEC,OAAO,EAA4B,EAAA;AACjE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,UAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,GAAAA,EAAKC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCG,SAAAA,EAAWC,0BAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;gBAC/CK,cAAAA,EAAgBD,0BAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,gBAAA,CAAA;gBACpDM,SAAAA,EAAWP,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneColorPickerField.js","sources":["../../../../forms/fields/SceneColorPickerField.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 { booleanProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst ColorPickerField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).ColorPickerField }));\n\n/**\n * The `Cratis.Components:colorPickerField` component - `ColorPickerField` from\n * `@cratis/components/CommandForm`.\n *\n * Binds a color to a string property. `inline` decides whether the picker is always open or opens from a\n * swatch, which is a layout decision rather than a behavioral one.\n */\nexport function SceneColorPickerField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <ColorPickerField\n {...binding}\n inline={booleanProperty(element.properties, 'inline')}\n defaultColor={stringProperty(element.properties, 'defaultColor')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["ColorPickerField","lazy","default","SceneColorPickerField","element","_jsx","CommandFormField","binding","inline","booleanProperty","properties","defaultColor","stringProperty","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;AAMC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,gBAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,MAAAA,EAAQC,0BAAAA,CAAgBL,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;gBAC5CC,YAAAA,EAAcC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,cAAA,CAAA;gBACjDG,SAAAA,EAAWD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneColorPickerField.js","sources":["../../../../forms/fields/SceneColorPickerField.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 { booleanProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst ColorPickerField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).ColorPickerField }));\n\n/**\n * The `Cratis.Components:colorPickerField` component - `ColorPickerField` from\n * `@cratis/components/CommandForm`.\n *\n * Binds a color to a string property. `inline` decides whether the picker is always open or opens from a\n * swatch, which is a layout decision rather than a behavioral one.\n */\nexport function SceneColorPickerField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <ColorPickerField\n {...binding}\n inline={booleanProperty(element.properties, 'inline')}\n defaultColor={stringProperty(element.properties, 'defaultColor')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["ColorPickerField","lazy","default","SceneColorPickerField","element","_jsx","CommandFormField","binding","inline","booleanProperty","properties","defaultColor","stringProperty","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;AAMC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,gBAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,MAAAA,EAAQC,0BAAAA,CAAgBL,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;gBAC5CC,YAAAA,EAAcC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,cAAA,CAAA;gBACjDG,SAAAA,EAAWD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDropdownField.js","sources":["../../../../forms/fields/SceneDropdownField.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 { objectArrayProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst DropdownField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).DropdownField }));\n\n/**\n * The `Cratis.Components:dropdownField` component - `DropdownField` from `@cratis/components/CommandForm`.\n *\n * Single selection from a fixed list the screen carries inline. `optionLabel` and `optionValue` default\n * to `label` and `value`, the shape an authored list takes when nobody says otherwise, so the common\n * case needs only `options`.\n *\n * Options that have to come from the backend are a different component: bind the list to a query with\n * `dataTable`, or register the lookup as its own query. A property bag is the wrong place for data.\n */\nexport function SceneDropdownField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <DropdownField\n {...binding}\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 className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["DropdownField","lazy","default","SceneDropdownField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","className"],"mappings":";;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;;;;;AASC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,8BAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,SAAAA,EAAWH,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneDropdownField.js","sources":["../../../../forms/fields/SceneDropdownField.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 { objectArrayProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst DropdownField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).DropdownField }));\n\n/**\n * The `Cratis.Components:dropdownField` component - `DropdownField` from `@cratis/components/CommandForm`.\n *\n * Single selection from a fixed list the screen carries inline. `optionLabel` and `optionValue` default\n * to `label` and `value`, the shape an authored list takes when nobody says otherwise, so the common\n * case needs only `options`.\n *\n * Options that have to come from the backend are a different component: bind the list to a query with\n * `dataTable`, or register the lookup as its own query. A property bag is the wrong place for data.\n */\nexport function SceneDropdownField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <DropdownField\n {...binding}\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 className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["DropdownField","lazy","default","SceneDropdownField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","className"],"mappings":";;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;;;;;AASC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,8BAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,SAAAA,EAAWH,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneInputTextField.js","sources":["../../../../forms/fields/SceneInputTextField.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 { stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst InputTextField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).InputTextField }));\n\n/**\n * The HTML input types `InputTextField` supports, as a tuple so `unionProperty` narrows an authored\n * string to exactly one of them and falls back to the component's own default for anything else.\n */\nconst inputTypes = ['text', 'email', 'password', 'color', 'date', 'datetime-local', 'time', 'url', 'tel', 'search'] as const;\n\n/**\n * The `Cratis.Components:inputTextField` component - `InputTextField` from `@cratis/components/CommandForm`.\n *\n * The single-line text field, and the one a screen reaches for most. `type` carries all the way through\n * to the HTML input, so `email`, `password` and `url` fields are this component too rather than separate\n * names - the browser's own keyboard and validation behavior is what differs, not the binding.\n */\nexport function SceneInputTextField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <InputTextField\n {...binding}\n type={unionProperty(element.properties, 'type', inputTypes)}\n placeholder={stringProperty(element.properties, 'placeholder')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["InputTextField","lazy","default","inputTypes","SceneInputTextField","element","_jsx","CommandFormField","binding","type","unionProperty","properties","placeholder","stringProperty","className"],"mappings":";;;;;;;AAQA,MAAMA,cAAAA,iBAAiBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAe,CAAA,CAAA;AAEpH;;;AAGC,IACD,MAAMG,UAAAA,GAAa;AAAC,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,UAAA;AAAY,IAAA,OAAA;AAAS,IAAA,MAAA;AAAQ,IAAA,gBAAA;AAAkB,IAAA,MAAA;AAAQ,IAAA,KAAA;AAAO,IAAA,KAAA;AAAO,IAAA;AAAS,CAAA;AAEnH;;;;;;AAMC,IACM,SAASC,mBAAAA,CAAoB,EAAEC,OAAO,EAA4B,EAAA;AACrE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACN,cAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;AACXC,gBAAAA,IAAAA,EAAMC,wBAAAA,CAAcL,OAAAA,CAAQM,UAAU,EAAE,MAAA,EAAQR,UAAAA,CAAAA;gBAChDS,WAAAA,EAAaC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDG,SAAAA,EAAWD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneInputTextField.js","sources":["../../../../forms/fields/SceneInputTextField.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 { stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst InputTextField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).InputTextField }));\n\n/**\n * The HTML input types `InputTextField` supports, as a tuple so `unionProperty` narrows an authored\n * string to exactly one of them and falls back to the component's own default for anything else.\n */\nconst inputTypes = ['text', 'email', 'password', 'color', 'date', 'datetime-local', 'time', 'url', 'tel', 'search'] as const;\n\n/**\n * The `Cratis.Components:inputTextField` component - `InputTextField` from `@cratis/components/CommandForm`.\n *\n * The single-line text field, and the one a screen reaches for most. `type` carries all the way through\n * to the HTML input, so `email`, `password` and `url` fields are this component too rather than separate\n * names - the browser's own keyboard and validation behavior is what differs, not the binding.\n */\nexport function SceneInputTextField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <InputTextField\n {...binding}\n type={unionProperty(element.properties, 'type', inputTypes)}\n placeholder={stringProperty(element.properties, 'placeholder')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["InputTextField","lazy","default","inputTypes","SceneInputTextField","element","_jsx","CommandFormField","binding","type","unionProperty","properties","placeholder","stringProperty","className"],"mappings":";;;;;;;AAQA,MAAMA,cAAAA,iBAAiBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAe,CAAA,CAAA;AAEpH;;;AAGC,IACD,MAAMG,UAAAA,GAAa;AAAC,IAAA,MAAA;AAAQ,IAAA,OAAA;AAAS,IAAA,UAAA;AAAY,IAAA,OAAA;AAAS,IAAA,MAAA;AAAQ,IAAA,gBAAA;AAAkB,IAAA,MAAA;AAAQ,IAAA,KAAA;AAAO,IAAA,KAAA;AAAO,IAAA;AAAS,CAAA;AAEnH;;;;;;AAMC,IACM,SAASC,mBAAAA,CAAoB,EAAEC,OAAO,EAA4B,EAAA;AACrE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACN,cAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;AACXC,gBAAAA,IAAAA,EAAMC,wBAAAA,CAAcL,OAAAA,CAAQM,UAAU,EAAE,MAAA,EAAQR,UAAAA,CAAAA;gBAChDS,WAAAA,EAAaC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDG,SAAAA,EAAWD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneMultiSelectField.js","sources":["../../../../forms/fields/SceneMultiSelectField.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 { booleanProperty, objectArrayProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst MultiSelectField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).MultiSelectField }));\n\n/**\n * The `Cratis.Components:multiSelectField` component - `MultiSelectField` from\n * `@cratis/components/CommandForm`.\n *\n * The many-valued counterpart to `dropdownField`, binding to a collection property on the command rather\n * than a scalar one.\n *\n * The `display` and `maxSelectedLabels` properties this adapter used to expose are gone. In\n * `@cratis/components` 3.0.0 the field is re-expressed over the library's own `Dropdown` in multiple\n * mode, because PrimeReact 11's `Select` has no `multiple` prop of the version 10 shape and renders the\n * selection through its own value slot - so there is no comma mode, no chip mode, and no label-collapse\n * threshold left to choose between. Both props are still declared upstream so call sites compile, and\n * neither is read. Passing them on would have let a screen state a preference the control cannot honor.\n */\nexport function SceneMultiSelectField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <MultiSelectField\n {...binding}\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 filter={booleanProperty(element.properties, 'filter')}\n showClear={booleanProperty(element.properties, 'showClear')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["MultiSelectField","lazy","default","SceneMultiSelectField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","filter","booleanProperty","showClear","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;;;;AAaC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,gBAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,8BAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,MAAAA,EAAQC,0BAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;gBAC5CO,SAAAA,EAAWD,0BAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;gBAC/CQ,SAAAA,EAAWN,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneMultiSelectField.js","sources":["../../../../forms/fields/SceneMultiSelectField.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 { booleanProperty, objectArrayProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst MultiSelectField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).MultiSelectField }));\n\n/**\n * The `Cratis.Components:multiSelectField` component - `MultiSelectField` from\n * `@cratis/components/CommandForm`.\n *\n * The many-valued counterpart to `dropdownField`, binding to a collection property on the command rather\n * than a scalar one.\n *\n * The `display` and `maxSelectedLabels` properties this adapter used to expose are gone. In\n * `@cratis/components` 3.0.0 the field is re-expressed over the library's own `Dropdown` in multiple\n * mode, because PrimeReact 11's `Select` has no `multiple` prop of the version 10 shape and renders the\n * selection through its own value slot - so there is no comma mode, no chip mode, and no label-collapse\n * threshold left to choose between. Both props are still declared upstream so call sites compile, and\n * neither is read. Passing them on would have let a screen state a preference the control cannot honor.\n */\nexport function SceneMultiSelectField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <MultiSelectField\n {...binding}\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 filter={booleanProperty(element.properties, 'filter')}\n showClear={booleanProperty(element.properties, 'showClear')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["MultiSelectField","lazy","default","SceneMultiSelectField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","filter","booleanProperty","showClear","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;;;;AAaC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,gBAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,8BAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,MAAAA,EAAQC,0BAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;gBAC5CO,SAAAA,EAAWD,0BAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;gBAC/CQ,SAAAA,EAAWN,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneNumberField.js","sources":["../../../../forms/fields/SceneNumberField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst NumberField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).NumberField }));\n\n/**\n * The `Cratis.Components:numberField` component - `NumberField` from `@cratis/components/CommandForm`.\n *\n * PrimeReact's `InputNumber` behind the command binding, so the bound property stays a number rather\n * than the string an `<input type=\"number\">` would hand back. `min`, `max` and `step` are client-side\n * affordances only - the authoritative check is still the backend's validation on the command.\n */\nexport function SceneNumberField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <NumberField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n min={numberProperty(element.properties, 'min')}\n max={numberProperty(element.properties, 'max')}\n step={numberProperty(element.properties, 'step')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["NumberField","lazy","default","SceneNumberField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","min","numberProperty","max","step","className"],"mappings":";;;;;;;AAQA,MAAMA,WAAAA,iBAAcC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAY,CAAA,CAAA;AAE9G;;;;;;AAMC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,WAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,GAAAA,EAAKC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCG,GAAAA,EAAKD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCI,IAAAA,EAAMF,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCK,SAAAA,EAAWN,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneNumberField.js","sources":["../../../../forms/fields/SceneNumberField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst NumberField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).NumberField }));\n\n/**\n * The `Cratis.Components:numberField` component - `NumberField` from `@cratis/components/CommandForm`.\n *\n * PrimeReact's `InputNumber` behind the command binding, so the bound property stays a number rather\n * than the string an `<input type=\"number\">` would hand back. `min`, `max` and `step` are client-side\n * affordances only - the authoritative check is still the backend's validation on the command.\n */\nexport function SceneNumberField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <NumberField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n min={numberProperty(element.properties, 'min')}\n max={numberProperty(element.properties, 'max')}\n step={numberProperty(element.properties, 'step')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["NumberField","lazy","default","SceneNumberField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","min","numberProperty","max","step","className"],"mappings":";;;;;;;AAQA,MAAMA,WAAAA,iBAAcC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAY,CAAA,CAAA;AAE9G;;;;;;AAMC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,WAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,GAAAA,EAAKC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCG,GAAAA,EAAKD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCI,IAAAA,EAAMF,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCK,SAAAA,EAAWN,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneRadioButtonField.js","sources":["../../../../forms/fields/SceneRadioButtonField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioButtonField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioButtonField }));\n\n/**\n * The `Cratis.Components:radioButtonField` component - `RadioButtonField` from\n * `@cratis/components/CommandForm`.\n *\n * One button of a mutually exclusive set, for a screen that needs the choices placed individually rather\n * than as a block. `buttonValue` is the value this particular button writes to the bound property, and\n * the whole set is tied together by every button naming the same `property`.\n *\n * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a\n * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.\n */\nexport function SceneRadioButtonField({ element }: RegisteredComponentProps) {\n const buttonValue = stringProperty(element.properties, 'buttonValue') ?? numberProperty(element.properties, 'buttonValue') ?? '';\n\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioButtonField\n {...binding}\n buttonValue={buttonValue}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioButtonField","lazy","default","SceneRadioButtonField","element","buttonValue","stringProperty","properties","numberProperty","_jsx","CommandFormField","binding","label","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;AAUC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;IACvE,MAAMC,WAAAA,GAAcC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,kBAAkBC,yBAAAA,CAAeJ,OAAAA,CAAQG,UAAU,EAAE,aAAA,CAAA,IAAkB,EAAA;AAE9H,IAAA,qBACIE,cAAA,CAACC,iCAAAA,EAAAA;QAAiBN,OAAAA,EAASA,OAAAA;AACtBO,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACT,gBAAAA,EAAAA;AACI,gBAAA,GAAGW,OAAO;gBACXN,WAAAA,EAAaA,WAAAA;gBACbO,KAAAA,EAAON,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA;gBAC1CM,SAAAA,EAAWP,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneRadioButtonField.js","sources":["../../../../forms/fields/SceneRadioButtonField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioButtonField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioButtonField }));\n\n/**\n * The `Cratis.Components:radioButtonField` component - `RadioButtonField` from\n * `@cratis/components/CommandForm`.\n *\n * One button of a mutually exclusive set, for a screen that needs the choices placed individually rather\n * than as a block. `buttonValue` is the value this particular button writes to the bound property, and\n * the whole set is tied together by every button naming the same `property`.\n *\n * `buttonValue` is read as a string first and a number second, since a choice is usually a string but a\n * numeric code is common enough that forcing it through as `'1'` would bind the wrong value.\n */\nexport function SceneRadioButtonField({ element }: RegisteredComponentProps) {\n const buttonValue = stringProperty(element.properties, 'buttonValue') ?? numberProperty(element.properties, 'buttonValue') ?? '';\n\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioButtonField\n {...binding}\n buttonValue={buttonValue}\n label={stringProperty(element.properties, 'label')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioButtonField","lazy","default","SceneRadioButtonField","element","buttonValue","stringProperty","properties","numberProperty","_jsx","CommandFormField","binding","label","className"],"mappings":";;;;;;;AAQA,MAAMA,gBAAAA,iBAAmBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAiB,CAAA,CAAA;AAExH;;;;;;;;;;AAUC,IACM,SAASG,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;IACvE,MAAMC,WAAAA,GAAcC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,kBAAkBC,yBAAAA,CAAeJ,OAAAA,CAAQG,UAAU,EAAE,aAAA,CAAA,IAAkB,EAAA;AAE9H,IAAA,qBACIE,cAAA,CAACC,iCAAAA,EAAAA;QAAiBN,OAAAA,EAASA,OAAAA;AACtBO,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACT,gBAAAA,EAAAA;AACI,gBAAA,GAAGW,OAAO;gBACXN,WAAAA,EAAaA,WAAAA;gBACbO,KAAAA,EAAON,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA;gBAC1CM,SAAAA,EAAWP,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneRadioGroupField.js","sources":["../../../../forms/fields/SceneRadioGroupField.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 { objectArrayProperty, stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioGroupField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioGroupField }));\n\n/** Whether the group's buttons stack or sit in a row. */\nconst layouts = ['horizontal', 'vertical'] as const;\n\n/**\n * The `Cratis.Components:radioGroupField` component - `RadioGroupField` from\n * `@cratis/components/CommandForm`.\n *\n * A whole mutually exclusive choice from one options list, which is what a screen almost always wants.\n * Use `radioButtonField` only when the individual buttons have to be placed apart from one another.\n */\nexport function SceneRadioGroupField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioGroupField\n {...binding}\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n layout={unionProperty(element.properties, 'layout', layouts)}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioGroupField","lazy","default","layouts","SceneRadioGroupField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","layout","unionProperty","className"],"mappings":";;;;;;;AAQA,MAAMA,eAAAA,iBAAkBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAgB,CAAA,CAAA;AAEtH,0DACA,MAAMG,OAAAA,GAAU;AAAC,IAAA,YAAA;AAAc,IAAA;AAAW,CAAA;AAE1C;;;;;;AAMC,IACM,SAASC,oBAAAA,CAAqB,EAAEC,OAAO,EAA4B,EAAA;AACtE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACN,eAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;AACXC,gBAAAA,OAAAA,EAASC,8BAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEI,gBAAAA,MAAAA,EAAQC,wBAAAA,CAAcX,OAAAA,CAAQM,UAAU,EAAE,QAAA,EAAUR,OAAAA,CAAAA;gBACpDc,SAAAA,EAAWJ,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneRadioGroupField.js","sources":["../../../../forms/fields/SceneRadioGroupField.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 { objectArrayProperty, stringProperty, unionProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst RadioGroupField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).RadioGroupField }));\n\n/** Whether the group's buttons stack or sit in a row. */\nconst layouts = ['horizontal', 'vertical'] as const;\n\n/**\n * The `Cratis.Components:radioGroupField` component - `RadioGroupField` from\n * `@cratis/components/CommandForm`.\n *\n * A whole mutually exclusive choice from one options list, which is what a screen almost always wants.\n * Use `radioButtonField` only when the individual buttons have to be placed apart from one another.\n */\nexport function SceneRadioGroupField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <RadioGroupField\n {...binding}\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n layout={unionProperty(element.properties, 'layout', layouts)}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["RadioGroupField","lazy","default","layouts","SceneRadioGroupField","element","_jsx","CommandFormField","binding","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","layout","unionProperty","className"],"mappings":";;;;;;;AAQA,MAAMA,eAAAA,iBAAkBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAgB,CAAA,CAAA;AAEtH,0DACA,MAAMG,OAAAA,GAAU;AAAC,IAAA,YAAA;AAAc,IAAA;AAAW,CAAA;AAE1C;;;;;;AAMC,IACM,SAASC,oBAAAA,CAAqB,EAAEC,OAAO,EAA4B,EAAA;AACtE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACN,eAAAA,EAAAA;AACI,gBAAA,GAAGQ,OAAO;AACXC,gBAAAA,OAAAA,EAASC,8BAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEI,gBAAAA,MAAAA,EAAQC,wBAAAA,CAAcX,OAAAA,CAAQM,UAAU,EAAE,QAAA,EAAUR,OAAAA,CAAAA;gBACpDc,SAAAA,EAAWJ,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneSliderField.js","sources":["../../../../forms/fields/SceneSliderField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst SliderField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).SliderField }));\n\n/**\n * The `Cratis.Components:sliderField` component - `SliderField` from `@cratis/components/CommandForm`.\n *\n * A numeric field where the range itself is the point - a percentage, a threshold, a weighting. Prefer\n * `numberField` whenever the exact value matters more than its position in a range; a slider trades\n * precision for a sense of scale, and that is only ever a deliberate choice.\n */\nexport function SceneSliderField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <SliderField\n {...binding}\n min={numberProperty(element.properties, 'min')}\n max={numberProperty(element.properties, 'max')}\n step={numberProperty(element.properties, 'step')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["SliderField","lazy","default","SceneSliderField","element","_jsx","CommandFormField","binding","min","numberProperty","properties","max","step","className","stringProperty"],"mappings":";;;;;;;AAQA,MAAMA,WAAAA,iBAAcC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAY,CAAA,CAAA;AAE9G;;;;;;AAMC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,WAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,GAAAA,EAAKC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCC,GAAAA,EAAKF,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCE,IAAAA,EAAMH,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCG,SAAAA,EAAWC,yBAAAA,CAAeV,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneSliderField.js","sources":["../../../../forms/fields/SceneSliderField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst SliderField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).SliderField }));\n\n/**\n * The `Cratis.Components:sliderField` component - `SliderField` from `@cratis/components/CommandForm`.\n *\n * A numeric field where the range itself is the point - a percentage, a threshold, a weighting. Prefer\n * `numberField` whenever the exact value matters more than its position in a range; a slider trades\n * precision for a sense of scale, and that is only ever a deliberate choice.\n */\nexport function SceneSliderField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <SliderField\n {...binding}\n min={numberProperty(element.properties, 'min')}\n max={numberProperty(element.properties, 'max')}\n step={numberProperty(element.properties, 'step')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["SliderField","lazy","default","SceneSliderField","element","_jsx","CommandFormField","binding","min","numberProperty","properties","max","step","className","stringProperty"],"mappings":";;;;;;;AAQA,MAAMA,WAAAA,iBAAcC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAY,CAAA,CAAA;AAE9G;;;;;;AAMC,IACM,SAASG,gBAAAA,CAAiB,EAAEC,OAAO,EAA4B,EAAA;AAClE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,WAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,GAAAA,EAAKC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCC,GAAAA,EAAKF,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCE,IAAAA,EAAMH,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCG,SAAAA,EAAWC,yBAAAA,CAAeV,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneTextAreaField.js","sources":["../../../../forms/fields/SceneTextAreaField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst TextAreaField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).TextAreaField }));\n\n/**\n * The `Cratis.Components:textAreaField` component - `TextAreaField` from `@cratis/components/CommandForm`.\n *\n * The multi-line counterpart to `inputTextField`. A separate name rather than a `multiline` flag on that\n * one, because the two wrap different PrimeReact inputs and take different sizing props - collapsing\n * them would mean a `rows` property that is meaningless half the time.\n */\nexport function SceneTextAreaField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <TextAreaField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n rows={numberProperty(element.properties, 'rows')}\n cols={numberProperty(element.properties, 'cols')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["TextAreaField","lazy","default","SceneTextAreaField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","rows","numberProperty","cols","className"],"mappings":";;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;;AAMC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,IAAAA,EAAMC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCG,IAAAA,EAAMD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCI,SAAAA,EAAWL,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE
|
|
1
|
+
{"version":3,"file":"SceneTextAreaField.js","sources":["../../../../forms/fields/SceneTextAreaField.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { numberProperty, stringProperty } from '../../properties';\nimport { CommandFormField } from './CommandFormField';\n\nconst TextAreaField = lazy(async () => ({ default: (await import('@cratis/components/CommandForm')).TextAreaField }));\n\n/**\n * The `Cratis.Components:textAreaField` component - `TextAreaField` from `@cratis/components/CommandForm`.\n *\n * The multi-line counterpart to `inputTextField`. A separate name rather than a `multiline` flag on that\n * one, because the two wrap different PrimeReact inputs and take different sizing props - collapsing\n * them would mean a `rows` property that is meaningless half the time.\n */\nexport function SceneTextAreaField({ element }: RegisteredComponentProps) {\n return (\n <CommandFormField element={element}>\n {binding => (\n <TextAreaField\n {...binding}\n placeholder={stringProperty(element.properties, 'placeholder')}\n rows={numberProperty(element.properties, 'rows')}\n cols={numberProperty(element.properties, 'cols')}\n className={stringProperty(element.properties, 'className')}\n />\n )}\n </CommandFormField>\n );\n}\n"],"names":["TextAreaField","lazy","default","SceneTextAreaField","element","_jsx","CommandFormField","binding","placeholder","stringProperty","properties","rows","numberProperty","cols","className"],"mappings":";;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,gCAAA,CAAgC,EAAGF;KAAc,CAAA,CAAA;AAElH;;;;;;AAMC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,qBACIC,cAAA,CAACC,iCAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,cAAA,CAACL,aAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,IAAAA,EAAMC,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCG,IAAAA,EAAMD,yBAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,MAAA,CAAA;gBACzCI,SAAAA,EAAWL,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveFieldBinding.js","sources":["../../../../forms/fields/resolveFieldBinding.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 { FieldBinding } from './FieldBinding';\n\n/**\n * Turns an element's `property` name into the {@link FieldBinding} a `@cratis/components` field takes,\n * or `undefined` when the screen never named a property.\n *\n * `undefined` rather than a default accessor, because a field bound to nothing is not a field with an\n * empty value - it is a field that would silently never read or write anything, and the screen author\n * needs to see that. The caller renders a placeholder instead.\n *\n * The label falls back to the property name, so a field is legible before anyone has written a `title`.\n */\nexport function resolveFieldBinding(element: ExternalComponent): FieldBinding | undefined {\n const property = stringProperty(element.properties, 'property');\n if (property === undefined) return undefined;\n\n return {\n value: (instance: Record<string, unknown>) => instance[property],\n title: stringProperty(element.properties, 'title') ?? property,\n description: stringProperty(element.properties, 'description'),\n };\n}\n"],"names":["resolveFieldBinding","element","property","stringProperty","properties","undefined","value","instance","title","description"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;IAUO,SAASA,mBAAAA,CAAoBC,OAA0B,EAAA;AAC1D,IAAA,MAAMC,QAAAA,GAAWC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,UAAA,CAAA;IACpD,IAAIF,QAAAA,KAAaG,WAAW,OAAOA,SAAAA;IAEnC,OAAO;AACHC,QAAAA,KAAAA,EAAO,CAACC,QAAAA,GAAsCA,QAAQ,CAACL,QAAAA,CAAS;AAChEM,QAAAA,KAAAA,EAAOL,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA,IAAYF,QAAAA;QACtDO,WAAAA,EAAaN,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,aAAA;AACpD,KAAA;AACJ
|
|
1
|
+
{"version":3,"file":"resolveFieldBinding.js","sources":["../../../../forms/fields/resolveFieldBinding.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 { FieldBinding } from './FieldBinding';\n\n/**\n * Turns an element's `property` name into the {@link FieldBinding} a `@cratis/components` field takes,\n * or `undefined` when the screen never named a property.\n *\n * `undefined` rather than a default accessor, because a field bound to nothing is not a field with an\n * empty value - it is a field that would silently never read or write anything, and the screen author\n * needs to see that. The caller renders a placeholder instead.\n *\n * The label falls back to the property name, so a field is legible before anyone has written a `title`.\n */\nexport function resolveFieldBinding(element: ExternalComponent): FieldBinding | undefined {\n const property = stringProperty(element.properties, 'property');\n if (property === undefined) return undefined;\n\n return {\n value: (instance: Record<string, unknown>) => instance[property],\n title: stringProperty(element.properties, 'title') ?? property,\n description: stringProperty(element.properties, 'description'),\n };\n}\n"],"names":["resolveFieldBinding","element","property","stringProperty","properties","undefined","value","instance","title","description"],"mappings":";;;;AAAA;AACA;AAMA;;;;;;;;;IAUO,SAASA,mBAAAA,CAAoBC,OAA0B,EAAA;AAC1D,IAAA,MAAMC,QAAAA,GAAWC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,UAAA,CAAA;IACpD,IAAIF,QAAAA,KAAaG,WAAW,OAAOA,SAAAA;IAEnC,OAAO;AACHC,QAAAA,KAAAA,EAAO,CAACC,QAAAA,GAAsCA,QAAQ,CAACL,QAAAA,CAAS;AAChEM,QAAAA,KAAAA,EAAOL,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,OAAA,CAAA,IAAYF,QAAAA;QACtDO,WAAAA,EAAaN,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,aAAA;AACpD,KAAA;AACJ;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDataPage.js","sources":["../../../pages/SceneDataPage.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataPage = lazy(async () => ({ default: (await import('@cratis/components/DataPage')).DataPage }));\n\n/**\n * The `Cratis.Components:dataPage` component - `DataPage` from `@cratis/components/DataPage`.\n *\n * The library's whole list-screen composite in one name: title bar, action toolbar, filterable table and\n * optional details pane, all driven from a single query. It is the single highest-leverage thing this\n * package exposes, because reproducing it out of `table` and `toolbar` in a screen would be pages of\n * modeling for a worse result.\n *\n * The `query` property names an Arc query proxy; the columns and menu items come from the `content`\n * slot as `DataPage.Columns` / `DataPage.MenuItems` children.\n *\n * No `clientFiltering` property, for the same reason `dataTable` no longer exposes one: 3.0.0 keeps the\n * prop so call sites compile but never reads it, and a screen setting that cannot take effect is a worse\n * thing to offer than nothing.\n */\nexport function SceneDataPage({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataPage\n title={stringProperty(element.properties, 'title') ?? ''}\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n >\n {slots.content}\n </DataPage>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataPage","lazy","default","SceneDataPage","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","query","emptyMessage","dataKey","globalFilterFields","stringArrayProperty","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,QAAAA,iBAAWC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,6BAAA,CAA6B,EAAGF;KAAS,CAAA,CAAA;AAErG;;;;;;;;;;;;;;AAcC,IACM,SAASG,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACtE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,QAAAA,EAAAA;AACGe,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,KAAAA,EAAOX,MAAAA;AACPY,YAAAA,YAAAA,EAAcH,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEG,OAAAA,EAASJ,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CI,kBAAAA,EAAoBC,8BAAAA,CAAoBlB,OAAAA,CAAQa,UAAU,EAAE,oBAAA,CAAA;AAE3DZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB
|
|
1
|
+
{"version":3,"file":"SceneDataPage.js","sources":["../../../pages/SceneDataPage.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataPage = lazy(async () => ({ default: (await import('@cratis/components/DataPage')).DataPage }));\n\n/**\n * The `Cratis.Components:dataPage` component - `DataPage` from `@cratis/components/DataPage`.\n *\n * The library's whole list-screen composite in one name: title bar, action toolbar, filterable table and\n * optional details pane, all driven from a single query. It is the single highest-leverage thing this\n * package exposes, because reproducing it out of `table` and `toolbar` in a screen would be pages of\n * modeling for a worse result.\n *\n * The `query` property names an Arc query proxy; the columns and menu items come from the `content`\n * slot as `DataPage.Columns` / `DataPage.MenuItems` children.\n *\n * No `clientFiltering` property, for the same reason `dataTable` no longer exposes one: 3.0.0 keeps the\n * prop so call sites compile but never reads it, and a screen setting that cannot take effect is a worse\n * thing to offer than nothing.\n */\nexport function SceneDataPage({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataPage\n title={stringProperty(element.properties, 'title') ?? ''}\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n >\n {slots.content}\n </DataPage>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataPage","lazy","default","SceneDataPage","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","query","emptyMessage","dataKey","globalFilterFields","stringArrayProperty","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,QAAAA,iBAAWC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,6BAAA,CAA6B,EAAGF;KAAS,CAAA,CAAA;AAErG;;;;;;;;;;;;;;AAcC,IACM,SAASG,aAAAA,CAAc,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACtE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,QAAAA,EAAAA;AACGe,YAAAA,KAAAA,EAAOC,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,KAAAA,EAAOX,MAAAA;AACPY,YAAAA,YAAAA,EAAcH,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEG,OAAAA,EAASJ,yBAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CI,kBAAAA,EAAoBC,8BAAAA,CAAoBlB,OAAAA,CAAQa,UAAU,EAAE,oBAAA,CAAA;AAE3DZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneFormElement.js","sources":["../../../pages/SceneFormElement.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 { FormElement, IconDisplay } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:formElement` component - `FormElement` from `@cratis/components/Common`.\n *\n * Pairs an input with a leading icon addon so a row of unrelated inputs still lines up. The icon can be\n * given two ways, and both are worth supporting: the `icon` property for the common case of a PrimeIcons\n * class name, and an `icon` slot for a screen that wants a real component there. The slot wins when both\n * are present, since a slot is the more specific statement.\n */\nexport function SceneFormElement({ element, slots }: RegisteredComponentProps) {\n const icon = stringProperty(element.properties, 'icon');\n const iconContent = slots.icon?.length ? slots.icon : icon === undefined ? undefined : <IconDisplay icon={icon} />;\n\n return <FormElement icon={iconContent}>{slots.content}</FormElement>;\n}\n"],"names":["SceneFormElement","element","slots","icon","stringProperty","properties","iconContent","length","undefined","_jsx","IconDisplay","FormElement","content"],"mappings":";;;;;;AAOA;;;;;;;AAOC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACzE,IAAA,MAAMC,IAAAA,GAAOC,yBAAAA,CAAeH,OAAAA,CAAQI,UAAU,EAAE,MAAA,CAAA;IAChD,MAAMC,WAAAA,GAAcJ,KAAAA,CAAMC,IAAI,EAAEI,MAAAA,GAASL,KAAAA,CAAMC,IAAI,GAAGA,IAAAA,KAASK,SAAAA,GAAYA,SAAAA,iBAAYC,cAAA,CAACC,kBAAAA,EAAAA;QAAYP,IAAAA,EAAMA;;AAE1G,IAAA,qBAAOM,cAAA,CAACE,kBAAAA,EAAAA;QAAYR,IAAAA,EAAMG,WAAAA;AAAcJ,QAAAA,QAAAA,EAAAA,KAAAA,CAAMU;;AAClD
|
|
1
|
+
{"version":3,"file":"SceneFormElement.js","sources":["../../../pages/SceneFormElement.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 { FormElement, IconDisplay } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:formElement` component - `FormElement` from `@cratis/components/Common`.\n *\n * Pairs an input with a leading icon addon so a row of unrelated inputs still lines up. The icon can be\n * given two ways, and both are worth supporting: the `icon` property for the common case of a PrimeIcons\n * class name, and an `icon` slot for a screen that wants a real component there. The slot wins when both\n * are present, since a slot is the more specific statement.\n */\nexport function SceneFormElement({ element, slots }: RegisteredComponentProps) {\n const icon = stringProperty(element.properties, 'icon');\n const iconContent = slots.icon?.length ? slots.icon : icon === undefined ? undefined : <IconDisplay icon={icon} />;\n\n return <FormElement icon={iconContent}>{slots.content}</FormElement>;\n}\n"],"names":["SceneFormElement","element","slots","icon","stringProperty","properties","iconContent","length","undefined","_jsx","IconDisplay","FormElement","content"],"mappings":";;;;;;AAOA;;;;;;;AAOC,IACM,SAASA,gBAAAA,CAAiB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACzE,IAAA,MAAMC,IAAAA,GAAOC,yBAAAA,CAAeH,OAAAA,CAAQI,UAAU,EAAE,MAAA,CAAA;IAChD,MAAMC,WAAAA,GAAcJ,KAAAA,CAAMC,IAAI,EAAEI,MAAAA,GAASL,KAAAA,CAAMC,IAAI,GAAGA,IAAAA,KAASK,SAAAA,GAAYA,SAAAA,iBAAYC,cAAA,CAACC,kBAAAA,EAAAA;QAAYP,IAAAA,EAAMA;;AAE1G,IAAA,qBAAOM,cAAA,CAACE,kBAAAA,EAAAA;QAAYR,IAAAA,EAAMG,WAAAA;AAAcJ,QAAAA,QAAAA,EAAAA,KAAAA,CAAMU;;AAClD;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScenePage.js","sources":["../../../pages/ScenePage.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 { Page } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:page` component - `Page` from `@cratis/components/Common`.\n *\n * The library's page primitive rather than a plain `div`, because it is what every other component in\n * the library is laid out inside: a full-height flex column whose optional `panel` chrome is drawn from\n * the same `--cratis-*` tokens as the tables and dialogs it contains. A screen that wraps its content in\n * this gets that consistency for free; one that wraps it in a `div` has to reinvent it and will drift.\n *\n * Imported statically - `Page` is one of the library's Arc-free components, so it costs a screen nothing\n * to use it without an Arc runtime present.\n */\nexport function ScenePage({ element, slots }: RegisteredComponentProps) {\n return (\n <Page\n data-scene-id={element.id}\n title={stringProperty(element.properties, 'title') ?? ''}\n showTitle={booleanProperty(element.properties, 'showTitle')}\n panel={booleanProperty(element.properties, 'panel')}\n >\n {slots.content}\n </Page>\n );\n}\n"],"names":["ScenePage","element","slots","_jsx","Page","data-scene-id","id","title","stringProperty","properties","showTitle","booleanProperty","panel","content"],"mappings":";;;;;;AAOA;;;;;;;;;;AAUC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAClE,IAAA,qBACIC,cAAA,CAACC,WAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;AACzBC,QAAAA,KAAAA,EAAOC,yBAAAA,CAAeP,OAAAA,CAAQQ,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;QACtDC,SAAAA,EAAWC,0BAAAA,CAAgBV,OAAAA,CAAQQ,UAAU,EAAE,WAAA,CAAA;QAC/CG,KAAAA,EAAOD,0BAAAA,CAAgBV,OAAAA,CAAQQ,UAAU,EAAE,OAAA,CAAA;AAE1CP,QAAAA,QAAAA,EAAAA,KAAAA,CAAMW;;AAGnB
|
|
1
|
+
{"version":3,"file":"ScenePage.js","sources":["../../../pages/ScenePage.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 { Page } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:page` component - `Page` from `@cratis/components/Common`.\n *\n * The library's page primitive rather than a plain `div`, because it is what every other component in\n * the library is laid out inside: a full-height flex column whose optional `panel` chrome is drawn from\n * the same `--cratis-*` tokens as the tables and dialogs it contains. A screen that wraps its content in\n * this gets that consistency for free; one that wraps it in a `div` has to reinvent it and will drift.\n *\n * Imported statically - `Page` is one of the library's Arc-free components, so it costs a screen nothing\n * to use it without an Arc runtime present.\n */\nexport function ScenePage({ element, slots }: RegisteredComponentProps) {\n return (\n <Page\n data-scene-id={element.id}\n title={stringProperty(element.properties, 'title') ?? ''}\n showTitle={booleanProperty(element.properties, 'showTitle')}\n panel={booleanProperty(element.properties, 'panel')}\n >\n {slots.content}\n </Page>\n );\n}\n"],"names":["ScenePage","element","slots","_jsx","Page","data-scene-id","id","title","stringProperty","properties","showTitle","booleanProperty","panel","content"],"mappings":";;;;;;AAOA;;;;;;;;;;AAUC,IACM,SAASA,SAAAA,CAAU,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAClE,IAAA,qBACIC,cAAA,CAACC,WAAAA,EAAAA;AACGC,QAAAA,eAAAA,EAAeJ,QAAQK,EAAE;AACzBC,QAAAA,KAAAA,EAAOC,yBAAAA,CAAeP,OAAAA,CAAQQ,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;QACtDC,SAAAA,EAAWC,0BAAAA,CAAgBV,OAAAA,CAAQQ,UAAU,EAAE,WAAA,CAAA;QAC/CG,KAAAA,EAAOD,0BAAAA,CAAgBV,OAAAA,CAAQQ,UAAU,EAAE,OAAA,CAAA;AAE1CP,QAAAA,QAAAA,EAAAA,KAAAA,CAAMW;;AAGnB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sources":["../../properties.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 * Narrow readers for an {@link ExternalComponent}'s `properties` bag.\n *\n * The bag is `Record<string, unknown>` because it survives a round trip through JSON - a `.play` screen\n * is authored as text, compiled by Stage, and re-read by Studio, and none of those steps carry a\n * TypeScript type with it. An adapter therefore has to narrow every value it reads, and the tempting\n * shortcut (`element.properties.title as string`) is a lie the compiler will happily believe: a screen\n * that writes `title: 42` then reaches the wrapped component as a number and fails somewhere far away.\n *\n * These helpers all answer the same way - the value when it really is of the asked-for type, `undefined`\n * otherwise - so an adapter reads a property and applies its own default in one expression, and a\n * mistyped property degrades to the default instead of corrupting the render.\n */\n\n/**\n * Reads a string property, or `undefined` when it is absent or not a string.\n */\nexport function stringProperty(properties: Record<string, unknown>, name: string): string | undefined {\n const value = properties[name];\n return typeof value === 'string' ? value : undefined;\n}\n\n/**\n * Reads a boolean property, or `undefined` when it is absent or not a boolean.\n *\n * Deliberately not truthiness: a screen that sets `showTitle: 0` means something different from one that\n * leaves it out, and only the second should fall back to the adapter's default.\n */\nexport function booleanProperty(properties: Record<string, unknown>, name: string): boolean | undefined {\n const value = properties[name];\n return typeof value === 'boolean' ? value : undefined;\n}\n\n/**\n * Reads a numeric property, or `undefined` when it is absent, not a number, or `NaN`.\n *\n * `NaN` is excluded because it is the one number that makes every downstream comparison silently false -\n * a slider with `min: NaN` renders without complaint and behaves as if it had no minimum at all.\n */\nexport function numberProperty(properties: Record<string, unknown>, name: string): number | undefined {\n const value = properties[name];\n return typeof value === 'number' && !Number.isNaN(value) ? value : undefined;\n}\n\n/**\n * Reads an array property, or `undefined` when it is absent or not an array.\n *\n * The element type is deliberately left as `unknown` - narrowing the elements is the caller's job,\n * through {@link stringArrayProperty} or its own mapping - so this helper never has to guess what a\n * heterogeneous list was supposed to be.\n */\nexport function arrayProperty(properties: Record<string, unknown>, name: string): unknown[] | undefined {\n const value = properties[name];\n return Array.isArray(value) ? value : undefined;\n}\n\n/**\n * Reads an array property and keeps only its string elements, or `undefined` when the property is absent\n * or not an array.\n *\n * Non-string elements are dropped rather than rejecting the whole list, because these lists are\n * column names, filter fields and the like: one bad entry should cost that one entry, not the entire\n * table's filtering.\n */\nexport function stringArrayProperty(properties: Record<string, unknown>, name: string): string[] | undefined {\n return arrayProperty(properties, name)?.filter((value): value is string => typeof value === 'string');\n}\n\n/**\n * Reads an object property as a plain record, or `undefined` when it is absent, `null`, or an array.\n *\n * Arrays are excluded even though `typeof [] === 'object'`, because every caller here wants a keyed\n * object - a JSON schema, a document being edited - and an array reaching one of those would be a\n * different bug entirely.\n */\nexport function objectProperty(properties: Record<string, unknown>, name: string): Record<string, unknown> | undefined {\n const value = properties[name];\n return typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as Record<string, unknown>) : undefined;\n}\n\n/**\n * Reads an array property and keeps only its plain-object elements, or `undefined` when the property is\n * absent or not an array.\n *\n * This is what an authored `options` list arrives as - `[{ label: 'Draft', value: 'draft' }, ...]` - and\n * the same forgiving rule as {@link stringArrayProperty} applies: one malformed entry costs that entry,\n * not the whole dropdown.\n */\nexport function objectArrayProperty(properties: Record<string, unknown>, name: string): Record<string, unknown>[] | undefined {\n return arrayProperty(properties, name)?.filter(\n (value): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value)\n );\n}\n\n/**\n * Reads a string property that has to be one of a fixed set of values, or `undefined` when it is absent\n * or outside the set.\n *\n * Several of the wrapped `@cratis/components` props are string literal unions (`'horizontal' | 'vertical'`,\n * `'top' | 'right' | 'bottom' | 'left'`). This is what turns an arbitrary authored string into one of\n * them without an assertion: an unrecognized value falls back to the component's own default rather than\n * being forced through as a value the component never expects to see.\n *\n * @param allowed The permitted values, most usefully written as a `const` tuple so `T` infers as the union.\n */\nexport function unionProperty<T extends string>(properties: Record<string, unknown>, name: string, allowed: readonly T[]): T | undefined {\n const value = stringProperty(properties, name);\n return value !== undefined && (allowed as readonly string[]).includes(value) ? (value as T) : undefined;\n}\n"],"names":["stringProperty","properties","name","value","undefined","booleanProperty","numberProperty","Number","isNaN","arrayProperty","Array","isArray","stringArrayProperty","filter","objectProperty","objectArrayProperty","unionProperty","allowed","includes"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;AAgBC,IACM,SAASA,cAAAA,CAAeC,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQC,SAAAA;AAC/C;AAEA;;;;;AAKC,IACM,SAASC,eAAAA,CAAgBJ,UAAmC,EAAEC,IAAY,EAAA;IAC7E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,SAAA,GAAYA,KAAAA,GAAQC,SAAAA;AAChD;AAEA;;;;;AAKC,IACM,SAASE,cAAAA,CAAeL,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,UAAU,QAAA,IAAY,CAACI,OAAOC,KAAK,CAACL,SAASA,KAAAA,GAAQC,SAAAA;AACvE;AAEA;;;;;;AAMC,IACM,SAASK,aAAAA,CAAcR,UAAmC,EAAEC,IAAY,EAAA;IAC3E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;AAC9B,IAAA,OAAOQ,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAASA,KAAAA,GAAQC,SAAAA;AAC1C;AAEA;;;;;;;AAOC,IACM,SAASQ,mBAAAA,CAAoBX,UAAmC,EAAEC,IAAY,EAAA;AACjF,IAAA,OAAOO,cAAcR,UAAAA,EAAYC,IAAAA,CAAAA,EAAOW,OAAO,CAACV,KAAAA,GAA2B,OAAOA,KAAAA,KAAU,QAAA,CAAA;AAChG;AAEA;;;;;;AAMC,IACM,SAASW,cAAAA,CAAeb,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAAUA,KAAAA,GAAoCC,SAAAA;AACvH;AAEA;;;;;;;AAOC,IACM,SAASW,mBAAAA,CAAoBd,UAAmC,EAAEC,IAAY,EAAA;AACjF,IAAA,OAAOO,aAAAA,CAAcR,UAAAA,EAAYC,IAAAA,CAAAA,EAAOW,MAAAA,CACpC,CAACV,KAAAA,GAA4C,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,CAAAA;AAEnH;AAEA;;;;;;;;;;AAUC,IACM,SAASa,aAAAA,CAAgCf,UAAmC,EAAEC,IAAY,EAAEe,OAAqB,EAAA;IACpH,MAAMd,KAAAA,GAAQH,eAAeC,UAAAA,EAAYC,IAAAA,CAAAA;AACzC,IAAA,OAAOC,UAAUC,SAAAA,IAAca,QAA8BC,QAAQ,CAACf,SAAUA,KAAAA,GAAcC,SAAAA;AAClG
|
|
1
|
+
{"version":3,"file":"properties.js","sources":["../../properties.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 * Narrow readers for an {@link ExternalComponent}'s `properties` bag.\n *\n * The bag is `Record<string, unknown>` because it survives a round trip through JSON - a `.play` screen\n * is authored as text, compiled by Stage, and re-read by Studio, and none of those steps carry a\n * TypeScript type with it. An adapter therefore has to narrow every value it reads, and the tempting\n * shortcut (`element.properties.title as string`) is a lie the compiler will happily believe: a screen\n * that writes `title: 42` then reaches the wrapped component as a number and fails somewhere far away.\n *\n * These helpers all answer the same way - the value when it really is of the asked-for type, `undefined`\n * otherwise - so an adapter reads a property and applies its own default in one expression, and a\n * mistyped property degrades to the default instead of corrupting the render.\n */\n\n/**\n * Reads a string property, or `undefined` when it is absent or not a string.\n */\nexport function stringProperty(properties: Record<string, unknown>, name: string): string | undefined {\n const value = properties[name];\n return typeof value === 'string' ? value : undefined;\n}\n\n/**\n * Reads a boolean property, or `undefined` when it is absent or not a boolean.\n *\n * Deliberately not truthiness: a screen that sets `showTitle: 0` means something different from one that\n * leaves it out, and only the second should fall back to the adapter's default.\n */\nexport function booleanProperty(properties: Record<string, unknown>, name: string): boolean | undefined {\n const value = properties[name];\n return typeof value === 'boolean' ? value : undefined;\n}\n\n/**\n * Reads a numeric property, or `undefined` when it is absent, not a number, or `NaN`.\n *\n * `NaN` is excluded because it is the one number that makes every downstream comparison silently false -\n * a slider with `min: NaN` renders without complaint and behaves as if it had no minimum at all.\n */\nexport function numberProperty(properties: Record<string, unknown>, name: string): number | undefined {\n const value = properties[name];\n return typeof value === 'number' && !Number.isNaN(value) ? value : undefined;\n}\n\n/**\n * Reads an array property, or `undefined` when it is absent or not an array.\n *\n * The element type is deliberately left as `unknown` - narrowing the elements is the caller's job,\n * through {@link stringArrayProperty} or its own mapping - so this helper never has to guess what a\n * heterogeneous list was supposed to be.\n */\nexport function arrayProperty(properties: Record<string, unknown>, name: string): unknown[] | undefined {\n const value = properties[name];\n return Array.isArray(value) ? value : undefined;\n}\n\n/**\n * Reads an array property and keeps only its string elements, or `undefined` when the property is absent\n * or not an array.\n *\n * Non-string elements are dropped rather than rejecting the whole list, because these lists are\n * column names, filter fields and the like: one bad entry should cost that one entry, not the entire\n * table's filtering.\n */\nexport function stringArrayProperty(properties: Record<string, unknown>, name: string): string[] | undefined {\n return arrayProperty(properties, name)?.filter((value): value is string => typeof value === 'string');\n}\n\n/**\n * Reads an object property as a plain record, or `undefined` when it is absent, `null`, or an array.\n *\n * Arrays are excluded even though `typeof [] === 'object'`, because every caller here wants a keyed\n * object - a JSON schema, a document being edited - and an array reaching one of those would be a\n * different bug entirely.\n */\nexport function objectProperty(properties: Record<string, unknown>, name: string): Record<string, unknown> | undefined {\n const value = properties[name];\n return typeof value === 'object' && value !== null && !Array.isArray(value) ? (value as Record<string, unknown>) : undefined;\n}\n\n/**\n * Reads an array property and keeps only its plain-object elements, or `undefined` when the property is\n * absent or not an array.\n *\n * This is what an authored `options` list arrives as - `[{ label: 'Draft', value: 'draft' }, ...]` - and\n * the same forgiving rule as {@link stringArrayProperty} applies: one malformed entry costs that entry,\n * not the whole dropdown.\n */\nexport function objectArrayProperty(properties: Record<string, unknown>, name: string): Record<string, unknown>[] | undefined {\n return arrayProperty(properties, name)?.filter(\n (value): value is Record<string, unknown> => typeof value === 'object' && value !== null && !Array.isArray(value)\n );\n}\n\n/**\n * Reads a string property that has to be one of a fixed set of values, or `undefined` when it is absent\n * or outside the set.\n *\n * Several of the wrapped `@cratis/components` props are string literal unions (`'horizontal' | 'vertical'`,\n * `'top' | 'right' | 'bottom' | 'left'`). This is what turns an arbitrary authored string into one of\n * them without an assertion: an unrecognized value falls back to the component's own default rather than\n * being forced through as a value the component never expects to see.\n *\n * @param allowed The permitted values, most usefully written as a `const` tuple so `T` infers as the union.\n */\nexport function unionProperty<T extends string>(properties: Record<string, unknown>, name: string, allowed: readonly T[]): T | undefined {\n const value = stringProperty(properties, name);\n return value !== undefined && (allowed as readonly string[]).includes(value) ? (value as T) : undefined;\n}\n"],"names":["stringProperty","properties","name","value","undefined","booleanProperty","numberProperty","Number","isNaN","arrayProperty","Array","isArray","stringArrayProperty","filter","objectProperty","objectArrayProperty","unionProperty","allowed","includes"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;AAgBC,IACM,SAASA,cAAAA,CAAeC,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,QAAA,GAAWA,KAAAA,GAAQC,SAAAA;AAC/C;AAEA;;;;;AAKC,IACM,SAASC,eAAAA,CAAgBJ,UAAmC,EAAEC,IAAY,EAAA;IAC7E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,SAAA,GAAYA,KAAAA,GAAQC,SAAAA;AAChD;AAEA;;;;;AAKC,IACM,SAASE,cAAAA,CAAeL,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,UAAU,QAAA,IAAY,CAACI,OAAOC,KAAK,CAACL,SAASA,KAAAA,GAAQC,SAAAA;AACvE;AAEA;;;;;;AAMC,IACM,SAASK,aAAAA,CAAcR,UAAmC,EAAEC,IAAY,EAAA;IAC3E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;AAC9B,IAAA,OAAOQ,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAASA,KAAAA,GAAQC,SAAAA;AAC1C;AAEA;;;;;;;AAOC,IACM,SAASQ,mBAAAA,CAAoBX,UAAmC,EAAEC,IAAY,EAAA;AACjF,IAAA,OAAOO,cAAcR,UAAAA,EAAYC,IAAAA,CAAAA,EAAOW,OAAO,CAACV,KAAAA,GAA2B,OAAOA,KAAAA,KAAU,QAAA,CAAA;AAChG;AAEA;;;;;;AAMC,IACM,SAASW,cAAAA,CAAeb,UAAmC,EAAEC,IAAY,EAAA;IAC5E,MAAMC,KAAAA,GAAQF,UAAU,CAACC,IAAAA,CAAK;IAC9B,OAAO,OAAOC,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,GAAUA,KAAAA,GAAoCC,SAAAA;AACvH;AAEA;;;;;;;AAOC,IACM,SAASW,mBAAAA,CAAoBd,UAAmC,EAAEC,IAAY,EAAA;AACjF,IAAA,OAAOO,aAAAA,CAAcR,UAAAA,EAAYC,IAAAA,CAAAA,EAAOW,MAAAA,CACpC,CAACV,KAAAA,GAA4C,OAAOA,KAAAA,KAAU,QAAA,IAAYA,KAAAA,KAAU,IAAA,IAAQ,CAACO,KAAAA,CAAMC,OAAO,CAACR,KAAAA,CAAAA,CAAAA;AAEnH;AAEA;;;;;;;;;;AAUC,IACM,SAASa,aAAAA,CAAgCf,UAAmC,EAAEC,IAAY,EAAEe,OAAqB,EAAA;IACpH,MAAMd,KAAAA,GAAQH,eAAeC,UAAAA,EAAYC,IAAAA,CAAAA;AACzC,IAAA,OAAOC,UAAUC,SAAAA,IAAca,QAA8BC,QAAQ,CAACf,SAAUA,KAAAA,GAAcC,SAAAA;AAClG;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneToolbar.js","sources":["../../../toolbar/SceneToolbar.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 { Toolbar } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, unionProperty } from '../properties';\n\n/** Whether the toolbar runs down the side or across the top. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbar` component - `Toolbar` from `@cratis/components/Toolbar`.\n *\n * The container for a tool palette: it draws the rounded chrome and, more importantly, establishes the\n * drag context every `toolbarButton` inside it reads. `draggable` therefore belongs here rather than on\n * each button - it is a property of the palette, and setting it per button is how you end up with a\n * palette that is half draggable.\n */\nexport function SceneToolbar({ element, slots }: RegisteredComponentProps) {\n return (\n <Toolbar\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n draggable={booleanProperty(element.properties, 'draggable')}\n >\n {slots.content}\n </Toolbar>\n );\n}\n"],"names":["orientations","SceneToolbar","element","slots","_jsx","Toolbar","orientation","unionProperty","properties","draggable","booleanProperty","content"],"mappings":";;;;;;AAOA,iEACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,cAAA,CAACC,eAAAA,EAAAA;AACGC,QAAAA,WAAAA,EAAaC,wBAAAA,CAAcL,OAAAA,CAAQM,UAAU,EAAE,aAAA,EAAeR,YAAAA,CAAAA;QAC9DS,SAAAA,EAAWC,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;AAE9CL,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB
|
|
1
|
+
{"version":3,"file":"SceneToolbar.js","sources":["../../../toolbar/SceneToolbar.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 { Toolbar } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, unionProperty } from '../properties';\n\n/** Whether the toolbar runs down the side or across the top. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbar` component - `Toolbar` from `@cratis/components/Toolbar`.\n *\n * The container for a tool palette: it draws the rounded chrome and, more importantly, establishes the\n * drag context every `toolbarButton` inside it reads. `draggable` therefore belongs here rather than on\n * each button - it is a property of the palette, and setting it per button is how you end up with a\n * palette that is half draggable.\n */\nexport function SceneToolbar({ element, slots }: RegisteredComponentProps) {\n return (\n <Toolbar\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n draggable={booleanProperty(element.properties, 'draggable')}\n >\n {slots.content}\n </Toolbar>\n );\n}\n"],"names":["orientations","SceneToolbar","element","slots","_jsx","Toolbar","orientation","unionProperty","properties","draggable","booleanProperty","content"],"mappings":";;;;;;AAOA,iEACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,cAAA,CAACC,eAAAA,EAAAA;AACGC,QAAAA,WAAAA,EAAaC,wBAAAA,CAAcL,OAAAA,CAAQM,UAAU,EAAE,aAAA,EAAeR,YAAAA,CAAAA;QAC9DS,SAAAA,EAAWC,0BAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;AAE9CL,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneToolbarButton.js","sources":["../../../toolbar/SceneToolbarButton.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 { ToolbarButton } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\n/** Which side of the button its tooltip appears on. */\nconst tooltipPositions = ['top', 'right', 'bottom', 'left'] as const;\n\n/**\n * The `Cratis.Components:toolbarButton` component - `ToolbarButton` from `@cratis/components/Toolbar`.\n *\n * `title` is required by the underlying component and is not decoration: it is both the tooltip text and\n * the accessible name, so a toolbar of icon-only buttons is still usable by anyone who cannot see the\n * icons. It defaults to the `text` property rather than to an empty string, so a button that has a\n * visible label is never left nameless.\n */\nexport function SceneToolbarButton({ element }: RegisteredComponentProps) {\n const text = stringProperty(element.properties, 'text');\n\n return (\n <ToolbarButton\n icon={stringProperty(element.properties, 'icon')}\n text={text}\n title={stringProperty(element.properties, 'title') ?? text ?? ''}\n active={booleanProperty(element.properties, 'active')}\n tooltipPosition={unionProperty(element.properties, 'tooltipPosition', tooltipPositions)}\n />\n );\n}\n"],"names":["tooltipPositions","SceneToolbarButton","element","text","stringProperty","properties","_jsx","ToolbarButton","icon","title","active","booleanProperty","tooltipPosition","unionProperty"],"mappings":";;;;;;AAOA,wDACA,MAAMA,gBAAAA,GAAmB;AAAC,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAE3D;;;;;;;AAOC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAMC,IAAAA,GAAOC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,MAAA,CAAA;AAEhD,IAAA,qBACIC,cAAA,CAACC,qBAAAA,EAAAA;QACGC,IAAAA,EAAMJ,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,MAAA,CAAA;QACzCF,IAAAA,EAAMA,IAAAA;AACNM,QAAAA,KAAAA,EAAOL,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,YAAYF,IAAAA,IAAQ,EAAA;QAC9DO,MAAAA,EAAQC,0BAAAA,CAAgBT,OAAAA,CAAQG,UAAU,EAAE,QAAA,CAAA;AAC5CO,QAAAA,eAAAA,EAAiBC,wBAAAA,CAAcX,OAAAA,CAAQG,UAAU,EAAE,iBAAA,EAAmBL,gBAAAA;;AAGlF
|
|
1
|
+
{"version":3,"file":"SceneToolbarButton.js","sources":["../../../toolbar/SceneToolbarButton.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 { ToolbarButton } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\n/** Which side of the button its tooltip appears on. */\nconst tooltipPositions = ['top', 'right', 'bottom', 'left'] as const;\n\n/**\n * The `Cratis.Components:toolbarButton` component - `ToolbarButton` from `@cratis/components/Toolbar`.\n *\n * `title` is required by the underlying component and is not decoration: it is both the tooltip text and\n * the accessible name, so a toolbar of icon-only buttons is still usable by anyone who cannot see the\n * icons. It defaults to the `text` property rather than to an empty string, so a button that has a\n * visible label is never left nameless.\n */\nexport function SceneToolbarButton({ element }: RegisteredComponentProps) {\n const text = stringProperty(element.properties, 'text');\n\n return (\n <ToolbarButton\n icon={stringProperty(element.properties, 'icon')}\n text={text}\n title={stringProperty(element.properties, 'title') ?? text ?? ''}\n active={booleanProperty(element.properties, 'active')}\n tooltipPosition={unionProperty(element.properties, 'tooltipPosition', tooltipPositions)}\n />\n );\n}\n"],"names":["tooltipPositions","SceneToolbarButton","element","text","stringProperty","properties","_jsx","ToolbarButton","icon","title","active","booleanProperty","tooltipPosition","unionProperty"],"mappings":";;;;;;AAOA,wDACA,MAAMA,gBAAAA,GAAmB;AAAC,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAE3D;;;;;;;AAOC,IACM,SAASC,kBAAAA,CAAmB,EAAEC,OAAO,EAA4B,EAAA;AACpE,IAAA,MAAMC,IAAAA,GAAOC,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,MAAA,CAAA;AAEhD,IAAA,qBACIC,cAAA,CAACC,qBAAAA,EAAAA;QACGC,IAAAA,EAAMJ,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,MAAA,CAAA;QACzCF,IAAAA,EAAMA,IAAAA;AACNM,QAAAA,KAAAA,EAAOL,yBAAAA,CAAeF,OAAAA,CAAQG,UAAU,EAAE,YAAYF,IAAAA,IAAQ,EAAA;QAC9DO,MAAAA,EAAQC,0BAAAA,CAAgBT,OAAAA,CAAQG,UAAU,EAAE,QAAA,CAAA;AAC5CO,QAAAA,eAAAA,EAAiBC,wBAAAA,CAAcX,OAAAA,CAAQG,UAAU,EAAE,iBAAA,EAAmBL,gBAAAA;;AAGlF;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneToolbarGroup.js","sources":["../../../toolbar/SceneToolbarGroup.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 { ToolbarGroup } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty, unionProperty } from '../properties';\n\n/** Whether the group's buttons stack or sit in a row. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbarGroup` component - `ToolbarGroup` from `@cratis/components/Toolbar`.\n *\n * Keeps related buttons together inside a toolbar. `slotName` opts the group into the library's toolbar\n * slot mechanism, which lets content contributed from elsewhere in the application land in this group -\n * the same idea as Scene's own contribution points, and the reason the property is worth exposing rather\n * than treating the group as purely visual.\n */\nexport function SceneToolbarGroup({ element, slots }: RegisteredComponentProps) {\n return (\n <ToolbarGroup\n slotName={stringProperty(element.properties, 'slotName')}\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n >\n {slots.content}\n </ToolbarGroup>\n );\n}\n"],"names":["orientations","SceneToolbarGroup","element","slots","_jsx","ToolbarGroup","slotName","stringProperty","properties","orientation","unionProperty","content"],"mappings":";;;;;;AAOA,0DACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,iBAAAA,CAAkB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAC1E,IAAA,qBACIC,cAAA,CAACC,oBAAAA,EAAAA;QACGC,QAAAA,EAAUC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAC7CC,QAAAA,WAAAA,EAAaC,wBAAAA,CAAcR,OAAAA,CAAQM,UAAU,EAAE,aAAA,EAAeR,YAAAA,CAAAA;AAE7DG,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB
|
|
1
|
+
{"version":3,"file":"SceneToolbarGroup.js","sources":["../../../toolbar/SceneToolbarGroup.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 { ToolbarGroup } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { stringProperty, unionProperty } from '../properties';\n\n/** Whether the group's buttons stack or sit in a row. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbarGroup` component - `ToolbarGroup` from `@cratis/components/Toolbar`.\n *\n * Keeps related buttons together inside a toolbar. `slotName` opts the group into the library's toolbar\n * slot mechanism, which lets content contributed from elsewhere in the application land in this group -\n * the same idea as Scene's own contribution points, and the reason the property is worth exposing rather\n * than treating the group as purely visual.\n */\nexport function SceneToolbarGroup({ element, slots }: RegisteredComponentProps) {\n return (\n <ToolbarGroup\n slotName={stringProperty(element.properties, 'slotName')}\n orientation={unionProperty(element.properties, 'orientation', orientations)}\n >\n {slots.content}\n </ToolbarGroup>\n );\n}\n"],"names":["orientations","SceneToolbarGroup","element","slots","_jsx","ToolbarGroup","slotName","stringProperty","properties","orientation","unionProperty","content"],"mappings":";;;;;;AAOA,0DACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,iBAAAA,CAAkB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AAC1E,IAAA,qBACIC,cAAA,CAACC,oBAAAA,EAAAA;QACGC,QAAAA,EAAUC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAC7CC,QAAAA,WAAAA,EAAaC,wBAAAA,CAAcR,OAAAA,CAAQM,UAAU,EAAE,aAAA,EAAeR,YAAAA,CAAAA;AAE7DG,QAAAA,QAAAA,EAAAA,KAAAA,CAAMQ;;AAGnB;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneToolbarSeparator.js","sources":["../../../toolbar/SceneToolbarSeparator.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 { ToolbarSeparator } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { unionProperty } from '../properties';\n\n/** Whether the separator is drawn as a horizontal rule or a vertical one. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbarSeparator` component - `ToolbarSeparator` from\n * `@cratis/components/Toolbar`.\n *\n * The divider between groups of tools. Its `orientation` describes the *toolbar* it sits in rather than\n * the line it draws - a vertical toolbar gets a horizontal rule - which matches how the toolbar's own\n * `orientation` reads, so a screen sets the same value on both.\n */\nexport function SceneToolbarSeparator({ element }: RegisteredComponentProps) {\n return <ToolbarSeparator orientation={unionProperty(element.properties, 'orientation', orientations)} />;\n}\n"],"names":["orientations","SceneToolbarSeparator","element","_jsx","ToolbarSeparator","orientation","unionProperty","properties"],"mappings":";;;;;;AAOA,8EACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBAAOC,cAAA,CAACC,wBAAAA,EAAAA;AAAiBC,QAAAA,WAAAA,EAAaC,wBAAAA,CAAcJ,OAAAA,CAAQK,UAAU,EAAE,aAAA,EAAeP,YAAAA;;AAC3F
|
|
1
|
+
{"version":3,"file":"SceneToolbarSeparator.js","sources":["../../../toolbar/SceneToolbarSeparator.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 { ToolbarSeparator } from '@cratis/components/Toolbar';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { unionProperty } from '../properties';\n\n/** Whether the separator is drawn as a horizontal rule or a vertical one. */\nconst orientations = ['vertical', 'horizontal'] as const;\n\n/**\n * The `Cratis.Components:toolbarSeparator` component - `ToolbarSeparator` from\n * `@cratis/components/Toolbar`.\n *\n * The divider between groups of tools. Its `orientation` describes the *toolbar* it sits in rather than\n * the line it draws - a vertical toolbar gets a horizontal rule - which matches how the toolbar's own\n * `orientation` reads, so a screen sets the same value on both.\n */\nexport function SceneToolbarSeparator({ element }: RegisteredComponentProps) {\n return <ToolbarSeparator orientation={unionProperty(element.properties, 'orientation', orientations)} />;\n}\n"],"names":["orientations","SceneToolbarSeparator","element","_jsx","ToolbarSeparator","orientation","unionProperty","properties"],"mappings":";;;;;;AAOA,8EACA,MAAMA,YAAAA,GAAe;AAAC,IAAA,UAAA;AAAY,IAAA;AAAa,CAAA;AAE/C;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsB,EAAEC,OAAO,EAA4B,EAAA;AACvE,IAAA,qBAAOC,cAAA,CAACC,wBAAAA,EAAAA;AAAiBC,QAAAA,WAAAA,EAAaC,wBAAAA,CAAcJ,OAAAA,CAAQK,UAAU,EAAE,aAAA,EAAeP,YAAAA;;AAC3F;;"}
|
|
@@ -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,GAAA,CAACC,aAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,GAAA,CAACE,QAAAA,EAAAA;AAASC,YAAAA,QAAAA,gBAAUH,GAAA,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,GAAA,CAACC,aAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,GAAA,CAACE,QAAAA,EAAAA;AAASC,YAAAA,QAAAA,gBAAUH,GAAA,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,GAAA,CAACC,WAAAA,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,GAAA,CAACC,WAAAA,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,IAAA,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,IAAA,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,WAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,WAAAA,CAAYE,OAAO,GAAG;AAC3B,CAAA;AAEA;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsBC,OAA0B,EAAEC,IAAiB,EAAA;AAC/E,IAAA,MAAMC,OAAOC,cAAAA,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,WAAAA,CAAYC,KAAK,GAAGU,YAAAA,CAAaL,QAAQM,cAAAA,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,WAAAA,CAAYC,KAAK,GAAG,OAAA;IACrB,CAACD,WAAAA,CAAYE,OAAO,GAAG;AAC3B,CAAA;AAEA;;;;;;;AAOC,IACM,SAASC,qBAAAA,CAAsBC,OAA0B,EAAEC,IAAiB,EAAA;AAC/E,IAAA,MAAMC,OAAOC,cAAAA,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,WAAAA,CAAYC,KAAK,GAAGU,YAAAA,CAAaL,QAAQM,cAAAA,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,GAAA,CAACC,QAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,mBAAAA,CAAoBJ,OAAAA,CAAQK,UAAU,EAAE,cAAc,EAAE;AACjEC,QAAAA,WAAAA,EAAaC,cAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,QAAAA,WAAAA,EAAaD,cAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;QAClEI,WAAAA,EAAaF,cAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA;QAChDK,QAAAA,EAAUC,eAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,UAAA,CAAA;QAC9CO,SAAAA,EAAWD,eAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,WAAA,CAAA;QAC/CQ,MAAAA,EAAQF,eAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,QAAA,CAAA;QAC5CS,SAAAA,EAAWP,cAAAA,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,GAAA,CAACC,QAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,mBAAAA,CAAoBJ,OAAAA,CAAQK,UAAU,EAAE,cAAc,EAAE;AACjEC,QAAAA,WAAAA,EAAaC,cAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,QAAAA,WAAAA,EAAaD,cAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;QAClEI,WAAAA,EAAaF,cAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA;QAChDK,QAAAA,EAAUC,eAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,UAAA,CAAA;QAC9CO,SAAAA,EAAWD,eAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,WAAA,CAAA;QAC/CQ,MAAAA,EAAQF,eAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,QAAA,CAAA;QAC5CS,SAAAA,EAAWP,cAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,WAAA;;AAG1D;;"}
|