@cratis/scene.components 1.1.0 → 3.0.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/.storybook/main.ts +0 -6
- package/.storybook/preview.tsx +33 -12
- package/README.md +21 -11
- package/common/SceneDropdown.tsx +10 -3
- package/common/SceneTooltip.tsx +5 -1
- package/cratisComponentsPackage.ts +18 -14
- package/data/SceneDataTable.tsx +7 -2
- package/data/SceneObservableDataTable.tsx +5 -2
- package/dialogs/SceneCommandDialog.tsx +11 -1
- package/dialogs/SceneDialog.tsx +13 -1
- package/dist/cjs/common/SceneDropdown.js +10 -3
- package/dist/cjs/common/SceneDropdown.js.map +1 -1
- package/dist/cjs/common/SceneTooltip.js +3 -1
- package/dist/cjs/common/SceneTooltip.js.map +1 -1
- package/dist/cjs/cratisComponentsPackage.js +18 -14
- package/dist/cjs/cratisComponentsPackage.js.map +1 -1
- package/dist/cjs/data/SceneDataTable.js +6 -1
- package/dist/cjs/data/SceneDataTable.js.map +1 -1
- package/dist/cjs/data/SceneObservableDataTable.js +4 -1
- package/dist/cjs/data/SceneObservableDataTable.js.map +1 -1
- package/dist/cjs/dialogs/SceneCommandDialog.js +11 -1
- package/dist/cjs/dialogs/SceneCommandDialog.js.map +1 -1
- package/dist/cjs/dialogs/SceneDialog.js +13 -1
- package/dist/cjs/dialogs/SceneDialog.js.map +1 -1
- package/dist/cjs/forms/fields/SceneChipsField.js +6 -1
- package/dist/cjs/forms/fields/SceneChipsField.js.map +1 -1
- package/dist/cjs/forms/fields/SceneMultiSelectField.js +7 -6
- package/dist/cjs/forms/fields/SceneMultiSelectField.js.map +1 -1
- package/dist/cjs/pages/SceneDataPage.js +5 -2
- package/dist/cjs/pages/SceneDataPage.js.map +1 -1
- package/dist/esm/common/SceneDropdown.d.ts.map +1 -1
- package/dist/esm/common/SceneDropdown.js +10 -3
- package/dist/esm/common/SceneDropdown.js.map +1 -1
- package/dist/esm/common/SceneTooltip.d.ts.map +1 -1
- package/dist/esm/common/SceneTooltip.js +3 -1
- package/dist/esm/common/SceneTooltip.js.map +1 -1
- package/dist/esm/cratisComponentsPackage.d.ts.map +1 -1
- package/dist/esm/cratisComponentsPackage.js +18 -14
- package/dist/esm/cratisComponentsPackage.js.map +1 -1
- package/dist/esm/data/SceneDataTable.d.ts.map +1 -1
- package/dist/esm/data/SceneDataTable.js +7 -2
- package/dist/esm/data/SceneDataTable.js.map +1 -1
- package/dist/esm/data/SceneObservableDataTable.d.ts.map +1 -1
- package/dist/esm/data/SceneObservableDataTable.js +5 -2
- package/dist/esm/data/SceneObservableDataTable.js.map +1 -1
- package/dist/esm/dialogs/SceneCommandDialog.d.ts.map +1 -1
- package/dist/esm/dialogs/SceneCommandDialog.js +11 -1
- package/dist/esm/dialogs/SceneCommandDialog.js.map +1 -1
- package/dist/esm/dialogs/SceneDialog.d.ts.map +1 -1
- package/dist/esm/dialogs/SceneDialog.js +13 -1
- package/dist/esm/dialogs/SceneDialog.js.map +1 -1
- package/dist/esm/editors/for_SceneObjectNavigationalBar/when_navigating_back_up_the_trail.js.map +1 -1
- package/dist/esm/for_cratisComponentsPackage/when_resolving_its_dependencies.js +5 -5
- package/dist/esm/for_cratisComponentsPackage/when_resolving_its_dependencies.js.map +1 -1
- package/dist/esm/forms/fields/SceneChipsField.d.ts.map +1 -1
- package/dist/esm/forms/fields/SceneChipsField.js +6 -1
- package/dist/esm/forms/fields/SceneChipsField.js.map +1 -1
- package/dist/esm/forms/fields/SceneMultiSelectField.d.ts.map +1 -1
- package/dist/esm/forms/fields/SceneMultiSelectField.js +8 -7
- package/dist/esm/forms/fields/SceneMultiSelectField.js.map +1 -1
- package/dist/esm/pages/SceneDataPage.d.ts.map +1 -1
- package/dist/esm/pages/SceneDataPage.js +6 -3
- package/dist/esm/pages/SceneDataPage.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/editors/for_SceneObjectNavigationalBar/when_navigating_back_up_the_trail.tsx +6 -0
- package/for_cratisComponentsPackage/when_resolving_its_dependencies.ts +16 -6
- package/forms/fields/SceneChipsField.tsx +6 -1
- package/forms/fields/SceneMultiSelectField.tsx +8 -6
- package/package.json +23 -13
- package/pages/SceneDataPage.tsx +6 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneCommandDialog.js","sources":["../../../dialogs/SceneCommandDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, stringProperty } from '../properties';\n\nconst CommandDialog = lazy(async () => ({ default: (await import('@cratis/components/CommandDialog')).CommandDialog }));\n\n/**\n * The `Cratis.Components:commandDialog` component - `CommandDialog` from `@cratis/components/CommandDialog`.\n *\n * A dialog whose confirm button *is* the command's execution: it binds the form to the command, submits\n * on confirm, feeds the backend's validation results back onto the fields, and only closes when the\n * command succeeded. That last part is the reason to use it rather than composing `dialog` with\n * `commandForm` - a hand-composed pair has no way to keep the dialog open on a rejected command without\n * reimplementing the protocol.\n *\n * The `command` property names an Arc command proxy; the fields go in the `content` slot.\n */\nexport function SceneCommandDialog({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Command);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Command} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <CommandDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n command={target}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n
|
|
1
|
+
{"version":3,"file":"SceneCommandDialog.js","sources":["../../../dialogs/SceneCommandDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, stringProperty } from '../properties';\n\nconst CommandDialog = lazy(async () => ({ default: (await import('@cratis/components/CommandDialog')).CommandDialog }));\n\n/**\n * The `Cratis.Components:commandDialog` component - `CommandDialog` from `@cratis/components/CommandDialog`.\n *\n * A dialog whose confirm button *is* the command's execution: it binds the form to the command, submits\n * on confirm, feeds the backend's validation results back onto the fields, and only closes when the\n * command succeeded. That last part is the reason to use it rather than composing `dialog` with\n * `commandForm` - a hand-composed pair has no way to keep the dialog open on a rejected command without\n * reimplementing the protocol.\n *\n * The `command` property names an Arc command proxy; the fields go in the `content` slot.\n *\n * `dismissable` and `closeAriaLabel` are here rather than on `dialog` alone because `CommandDialog`\n * forwards both to the dialog it wraps, and in `@cratis/components` 3.0.0 that forwarding actually\n * happens - 2.x accepted the two props and dropped them on the floor. `dismissable` matters more on a\n * command dialog than anywhere else: it decides whether a half-filled form can be abandoned with\n * `Escape` or a backdrop click, which is a decision about the command, not about the chrome.\n *\n * The `resizable` property this adapter used to carry is gone. It is still declared upstream so call\n * sites compile, but PrimeReact 11's headless dialog has no resize handle and nothing reads the prop.\n */\nexport function SceneCommandDialog({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Command);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Command} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <CommandDialog\n title={stringProperty(element.properties, 'title') ?? ''}\n command={target}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n dismissable={booleanProperty(element.properties, 'dismissable')}\n okLabel={stringProperty(element.properties, 'okLabel')}\n cancelLabel={stringProperty(element.properties, 'cancelLabel')}\n closeAriaLabel={stringProperty(element.properties, 'closeAriaLabel')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </CommandDialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["CommandDialog","lazy","default","SceneCommandDialog","element","slots","name","target","resolveElementBinding","BindingKind","Command","_jsx","MissingBinding","kind","ArcRuntimeBoundary","title","stringProperty","properties","command","visible","booleanProperty","width","dismissable","okLabel","cancelLabel","closeAriaLabel","className","content"],"mappings":";;;;;;;;AAQA,MAAMA,aAAAA,iBAAgBC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,kCAAA,CAAkC,EAAGF;KAAc,CAAA,CAAA;AAEpH;;;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASG,kBAAAA,CAAmB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IAC3E,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,qBAAAA,CAAsBJ,OAAAA,EAASK,WAAAA,CAAYC,OAAO,CAAA;IAC3E,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,GAAA,CAACC,cAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,YAAYC,OAAO;QAAEJ,IAAAA,EAAMA;;AAEvF,IAAA,qBACIK,GAAA,CAACG,kBAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,GAAA,CAACX,aAAAA,EAAAA;AACGe,YAAAA,KAAAA,EAAOC,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,OAAAA,EAASX,MAAAA;AACTY,YAAAA,OAAAA,EAASC,eAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA,IAAc,IAAA;YAC3DI,KAAAA,EAAOL,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA;YAC1CK,WAAAA,EAAaF,eAAAA,CAAgBhB,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;YACjDM,OAAAA,EAASP,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CO,WAAAA,EAAaR,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,aAAA,CAAA;YAChDQ,cAAAA,EAAgBT,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,gBAAA,CAAA;YACnDS,SAAAA,EAAWV,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,WAAA,CAAA;AAE7CZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMsB;;;AAIvB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDialog.d.ts","sourceRoot":"","sources":["../../../dialogs/SceneDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SceneDialog.d.ts","sourceRoot":"","sources":["../../../dialogs/SceneDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AA6B/D,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAmBvE"}
|
|
@@ -18,17 +18,29 @@ const Dialog = /*#__PURE__*/ lazy(async ()=>({
|
|
|
18
18
|
*
|
|
19
19
|
* `visible` defaults to `true` because a dialog placed on a screen is being placed to be seen; a host
|
|
20
20
|
* that controls visibility sets the property explicitly.
|
|
21
|
+
*
|
|
22
|
+
* `dismissable` replaces the `resizable` property this adapter used to carry, and the swap is the whole
|
|
23
|
+
* PrimeReact 11 story in miniature. `resizable` is still declared on `DialogProps` so call sites compile,
|
|
24
|
+
* but version 11's headless dialog has no resize handle and the library never reads the prop - a screen
|
|
25
|
+
* setting it got nothing. `dismissable` is the opposite: 3.0.0 added it and honors it, and it decides
|
|
26
|
+
* whether the header close button, backdrop click and `Escape` are offered at all. Leaving it unset keeps
|
|
27
|
+
* the library's own default, so a screen opts into a dismiss affordance rather than having one imposed.
|
|
28
|
+
*
|
|
29
|
+
* `closeAriaLabel` names that close button. It is separate from every other label here because it is the
|
|
30
|
+
* only one a screen reader reads and nobody sees, which is exactly why it gets forgotten - offering it
|
|
31
|
+
* next to `okLabel` and `cancelLabel` is what makes localizing a dialog a complete job.
|
|
21
32
|
*/ function SceneDialog({ element, slots }) {
|
|
22
33
|
return /*#__PURE__*/ jsx(ArcRuntimeBoundary, {
|
|
23
34
|
children: /*#__PURE__*/ jsx(Dialog, {
|
|
24
35
|
title: stringProperty(element.properties, 'title') ?? '',
|
|
25
36
|
visible: booleanProperty(element.properties, 'visible') ?? true,
|
|
26
37
|
width: stringProperty(element.properties, 'width'),
|
|
27
|
-
|
|
38
|
+
dismissable: booleanProperty(element.properties, 'dismissable'),
|
|
28
39
|
isValid: booleanProperty(element.properties, 'isValid'),
|
|
29
40
|
isBusy: booleanProperty(element.properties, 'isBusy'),
|
|
30
41
|
okLabel: stringProperty(element.properties, 'okLabel'),
|
|
31
42
|
cancelLabel: stringProperty(element.properties, 'cancelLabel'),
|
|
43
|
+
closeAriaLabel: stringProperty(element.properties, 'closeAriaLabel'),
|
|
32
44
|
className: stringProperty(element.properties, 'className'),
|
|
33
45
|
children: slots.content
|
|
34
46
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDialog.js","sources":["../../../dialogs/SceneDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary } from '../bindings';\nimport { booleanProperty, stringProperty } from '../properties';\n\nconst Dialog = lazy(async () => ({ default: (await import('@cratis/components/Dialogs')).Dialog }));\n\n/**\n * The `Cratis.Components:dialog` component, registered under the bare name `dialog` - `Dialog` from\n * `@cratis/components/Dialogs`.\n *\n * Shadowing PrimeReact's `dialog` deliberately. PrimeReact's is a modal frame and nothing more; this one\n * resolves its result through Arc's dialog context, so a screen's dialog participates in the same\n * request/response protocol as the rest of the application - a caller awaits a `DialogResult` instead of\n * threading `visible` state and callbacks by hand.\n *\n * `visible` defaults to `true` because a dialog placed on a screen is being placed to be seen; a host\n * that controls visibility sets the property explicitly.\n */\nexport function SceneDialog({ element, slots }: RegisteredComponentProps) {\n return (\n <ArcRuntimeBoundary>\n <Dialog\n title={stringProperty(element.properties, 'title') ?? ''}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n
|
|
1
|
+
{"version":3,"file":"SceneDialog.js","sources":["../../../dialogs/SceneDialog.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary } from '../bindings';\nimport { booleanProperty, stringProperty } from '../properties';\n\nconst Dialog = lazy(async () => ({ default: (await import('@cratis/components/Dialogs')).Dialog }));\n\n/**\n * The `Cratis.Components:dialog` component, registered under the bare name `dialog` - `Dialog` from\n * `@cratis/components/Dialogs`.\n *\n * Shadowing PrimeReact's `dialog` deliberately. PrimeReact's is a modal frame and nothing more; this one\n * resolves its result through Arc's dialog context, so a screen's dialog participates in the same\n * request/response protocol as the rest of the application - a caller awaits a `DialogResult` instead of\n * threading `visible` state and callbacks by hand.\n *\n * `visible` defaults to `true` because a dialog placed on a screen is being placed to be seen; a host\n * that controls visibility sets the property explicitly.\n *\n * `dismissable` replaces the `resizable` property this adapter used to carry, and the swap is the whole\n * PrimeReact 11 story in miniature. `resizable` is still declared on `DialogProps` so call sites compile,\n * but version 11's headless dialog has no resize handle and the library never reads the prop - a screen\n * setting it got nothing. `dismissable` is the opposite: 3.0.0 added it and honors it, and it decides\n * whether the header close button, backdrop click and `Escape` are offered at all. Leaving it unset keeps\n * the library's own default, so a screen opts into a dismiss affordance rather than having one imposed.\n *\n * `closeAriaLabel` names that close button. It is separate from every other label here because it is the\n * only one a screen reader reads and nobody sees, which is exactly why it gets forgotten - offering it\n * next to `okLabel` and `cancelLabel` is what makes localizing a dialog a complete job.\n */\nexport function SceneDialog({ element, slots }: RegisteredComponentProps) {\n return (\n <ArcRuntimeBoundary>\n <Dialog\n title={stringProperty(element.properties, 'title') ?? ''}\n visible={booleanProperty(element.properties, 'visible') ?? true}\n width={stringProperty(element.properties, 'width')}\n dismissable={booleanProperty(element.properties, 'dismissable')}\n isValid={booleanProperty(element.properties, 'isValid')}\n isBusy={booleanProperty(element.properties, 'isBusy')}\n okLabel={stringProperty(element.properties, 'okLabel')}\n cancelLabel={stringProperty(element.properties, 'cancelLabel')}\n closeAriaLabel={stringProperty(element.properties, 'closeAriaLabel')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </Dialog>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["Dialog","lazy","default","SceneDialog","element","slots","_jsx","ArcRuntimeBoundary","title","stringProperty","properties","visible","booleanProperty","width","dismissable","isValid","isBusy","okLabel","cancelLabel","closeAriaLabel","className","content"],"mappings":";;;;;;AAQA,MAAMA,MAAAA,iBAASC,IAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,4BAAA,CAA4B,EAAGF;KAAO,CAAA,CAAA;AAEhG;;;;;;;;;;;;;;;;;;;;;;AAsBC,IACM,SAASG,WAAAA,CAAY,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACpE,IAAA,qBACIC,GAAA,CAACC,kBAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAD,GAAA,CAACN,MAAAA,EAAAA;AACGQ,YAAAA,KAAAA,EAAOC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;AACtDC,YAAAA,OAAAA,EAASC,eAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA,IAAc,IAAA;YAC3DG,KAAAA,EAAOJ,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,OAAA,CAAA;YAC1CI,WAAAA,EAAaF,eAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;YACjDK,OAAAA,EAASH,eAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA;YAC7CM,MAAAA,EAAQJ,eAAAA,CAAgBR,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;YAC5CO,OAAAA,EAASR,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA;YAC5CQ,WAAAA,EAAaT,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;YAChDS,cAAAA,EAAgBV,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,gBAAA,CAAA;YACnDU,SAAAA,EAAWX,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;AAE7CL,YAAAA,QAAAA,EAAAA,KAAAA,CAAMgB;;;AAIvB;;;;"}
|
package/dist/esm/editors/for_SceneObjectNavigationalBar/when_navigating_back_up_the_trail.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"when_navigating_back_up_the_trail.js","sourceRoot":"","sources":["../../../../editors/for_SceneObjectNavigationalBar/when_navigating_back_up_the_trail.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE3E,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;
|
|
1
|
+
{"version":3,"file":"when_navigating_back_up_the_trail.js","sourceRoot":"","sources":["../../../../editors/for_SceneObjectNavigationalBar/when_navigating_back_up_the_trail.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAE3E,QAAQ,CAAC,mCAAmC,EAAE,GAAG,EAAE;IAO/C,UAAU,CAAC,GAAG,EAAE;QACZ,MAAM,OAAO,GAAG,iBAAiB,CAAC,yCAAyC,EAAE,EAAE,cAAc,EAAE,CAAC,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;QACpI,MAAM,CAAC,KAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,GAAI,CAAC,CAAC;QACpE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,WAAY,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IACrH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,WAAY,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;IAChH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;AACxG,CAAC,CAAC,CAAC"}
|
|
@@ -14,14 +14,14 @@ const tailwind = {
|
|
|
14
14
|
};
|
|
15
15
|
const primeReact = {
|
|
16
16
|
name: 'PrimeReact',
|
|
17
|
-
version: '
|
|
17
|
+
version: '11.1.0',
|
|
18
18
|
kind: PackageKind.ComponentLibrary,
|
|
19
19
|
dependencies: [{ name: 'Tailwind' }],
|
|
20
20
|
components: ['button', 'table', 'dialog'],
|
|
21
21
|
layouts: [],
|
|
22
22
|
screenTemplates: [],
|
|
23
23
|
dialogTemplates: [],
|
|
24
|
-
themes: ['lara-light-blue', 'lara-dark-blue'],
|
|
24
|
+
themes: ['aura-light-blue', 'aura-dark-blue', 'lara-light-blue', 'lara-dark-blue'],
|
|
25
25
|
};
|
|
26
26
|
describe('when resolving its dependencies', () => {
|
|
27
27
|
const catalog = [tailwind, primeReact, cratisComponentsPackageManifest];
|
|
@@ -39,10 +39,10 @@ describe('when resolving its dependencies', () => {
|
|
|
39
39
|
{ package: 'Cratis.Components', dependsOn: 'Tailwind' },
|
|
40
40
|
]));
|
|
41
41
|
});
|
|
42
|
-
describe('and PrimeReact is older than the
|
|
43
|
-
const older = resolvePackageDependencies(['Cratis.Components'], [tailwind, { ...primeReact, version: '10.8
|
|
42
|
+
describe('and PrimeReact is older than the major version the library is built against', () => {
|
|
43
|
+
const older = resolvePackageDependencies(['Cratis.Components'], [tailwind, { ...primeReact, version: '10.9.8' }, cratisComponentsPackageManifest]);
|
|
44
44
|
it('should report the version conflict', () => older.versionConflicts.should.deep.equal([
|
|
45
|
-
{ package: 'Cratis.Components', dependsOn: 'PrimeReact', requiredRange: '>=
|
|
45
|
+
{ package: 'Cratis.Components', dependsOn: 'PrimeReact', requiredRange: '>=11.0.0', actualVersion: '10.9.8' },
|
|
46
46
|
]));
|
|
47
47
|
});
|
|
48
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"when_resolving_its_dependencies.js","sourceRoot":"","sources":["../../../for_cratisComponentsPackage/when_resolving_its_dependencies.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAM7E,MAAM,QAAQ,GAAiB;IAC3B,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,WAAW,CAAC,OAAO;IACzB,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,EAAE;IACnB,MAAM,EAAE,EAAE;CACb,CAAC;
|
|
1
|
+
{"version":3,"file":"when_resolving_its_dependencies.js","sourceRoot":"","sources":["../../../for_cratisComponentsPackage/when_resolving_its_dependencies.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAgB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAM7E,MAAM,QAAQ,GAAiB;IAC3B,IAAI,EAAE,UAAU;IAChB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,WAAW,CAAC,OAAO;IACzB,YAAY,EAAE,EAAE;IAChB,UAAU,EAAE,EAAE;IACd,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,EAAE;IACnB,MAAM,EAAE,EAAE;CACb,CAAC;AAaF,MAAM,UAAU,GAAiB;IAC7B,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,WAAW,CAAC,gBAAgB;IAClC,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IACpC,UAAU,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC;IACzC,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,EAAE;IACnB,MAAM,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,CAAC;CACrF,CAAC;AAEF,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC7C,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,+BAA+B,CAAC,CAAC;IACxE,MAAM,SAAS,GAAG,0BAA0B,CAAC,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC,CAAC;IAE7E,EAAE,CAAC,oDAAoD,EAAE,GAAG,EAAE,CAC1D,SAAS,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAE3F,EAAE,CAAC,6DAA6D,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IACvI,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACnF,EAAE,CAAC,mCAAmC,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAChG,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IAC3E,EAAE,CAAC,6BAA6B,EAAE,GAAG,EAAE,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;IAE3F,QAAQ,CAAC,0CAA0C,EAAE,GAAG,EAAE;QACtD,MAAM,mBAAmB,GAAG,0BAA0B,CAAC,CAAC,mBAAmB,CAAC,EAAE,CAAC,+BAA+B,CAAC,CAAC,CAAC;QAEjH,EAAE,CAAC,yEAAyE,EAAE,GAAG,EAAE,CAC/E,mBAAmB,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YAC1C,EAAE,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,YAAY,EAAE;YACzD,EAAE,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,UAAU,EAAE;SAC1D,CAAC,CAAC,CAAC;IACZ,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,6EAA6E,EAAE,GAAG,EAAE;QACzF,MAAM,KAAK,GAAG,0BAA0B,CAAC,CAAC,mBAAmB,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,GAAG,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,+BAA+B,CAAC,CAAC,CAAC;QAEnJ,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE,CAC1C,KAAK,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;YACrC,EAAE,OAAO,EAAE,mBAAmB,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE;SAChH,CAAC,CAAC,CAAC;IACZ,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneChipsField.d.ts","sourceRoot":"","sources":["../../../../forms/fields/SceneChipsField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SceneChipsField.d.ts","sourceRoot":"","sources":["../../../../forms/fields/SceneChipsField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAmB/D,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAepE"}
|
|
@@ -12,6 +12,12 @@ const ChipsField = /*#__PURE__*/ lazy(async ()=>({
|
|
|
12
12
|
* A free-form list of strings - tags, labels, recipients - where the values are typed rather than picked.
|
|
13
13
|
* `multiSelectField` is the right choice whenever the values come from a known set; this one exists for
|
|
14
14
|
* when they do not.
|
|
15
|
+
*
|
|
16
|
+
* There is no `separator` property. PrimeReact 11's `InputTags` commits exactly one tag per `Enter` and
|
|
17
|
+
* no longer splits pasted text, so `@cratis/components` keeps the prop only so existing call sites
|
|
18
|
+
* compile and never reads it. A screen that wrote `separator: ','` and watched a pasted comma-separated
|
|
19
|
+
* list arrive as a single tag would have no way to tell that from a bug, which is precisely why the
|
|
20
|
+
* property is withdrawn rather than passed through.
|
|
15
21
|
*/ function SceneChipsField({ element }) {
|
|
16
22
|
return /*#__PURE__*/ jsx(CommandFormField, {
|
|
17
23
|
element: element,
|
|
@@ -19,7 +25,6 @@ const ChipsField = /*#__PURE__*/ lazy(async ()=>({
|
|
|
19
25
|
...binding,
|
|
20
26
|
placeholder: stringProperty(element.properties, 'placeholder'),
|
|
21
27
|
max: numberProperty(element.properties, 'max'),
|
|
22
|
-
separator: stringProperty(element.properties, 'separator'),
|
|
23
28
|
addOnBlur: booleanProperty(element.properties, 'addOnBlur'),
|
|
24
29
|
allowDuplicate: booleanProperty(element.properties, 'allowDuplicate'),
|
|
25
30
|
className: stringProperty(element.properties, 'className')
|
|
@@ -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 */\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
|
|
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,IAAAA,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,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,UAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;gBACXC,WAAAA,EAAaC,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDC,GAAAA,EAAKC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,KAAA,CAAA;gBACxCG,SAAAA,EAAWC,eAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;gBAC/CK,cAAAA,EAAgBD,eAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,gBAAA,CAAA;gBACpDM,SAAAA,EAAWP,cAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneMultiSelectField.d.ts","sourceRoot":"","sources":["../../../../forms/fields/SceneMultiSelectField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SceneMultiSelectField.d.ts","sourceRoot":"","sources":["../../../../forms/fields/SceneMultiSelectField.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAoB/D,wBAAgB,qBAAqB,CAAC,EAAE,OAAO,EAAE,EAAE,wBAAwB,+BAiB1E"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { lazy } from 'react';
|
|
3
|
-
import { stringProperty, booleanProperty,
|
|
3
|
+
import { stringProperty, booleanProperty, objectArrayProperty } from '../../properties.js';
|
|
4
4
|
import { CommandFormField } from './CommandFormField.js';
|
|
5
5
|
|
|
6
6
|
const MultiSelectField = /*#__PURE__*/ lazy(async ()=>({
|
|
7
7
|
default: (await import('@cratis/components/CommandForm')).MultiSelectField
|
|
8
8
|
}));
|
|
9
|
-
/** How the current selection is summarized in the closed control. */ const displayModes = [
|
|
10
|
-
'comma',
|
|
11
|
-
'chip'
|
|
12
|
-
];
|
|
13
9
|
/**
|
|
14
10
|
* The `Cratis.Components:multiSelectField` component - `MultiSelectField` from
|
|
15
11
|
* `@cratis/components/CommandForm`.
|
|
16
12
|
*
|
|
17
13
|
* The many-valued counterpart to `dropdownField`, binding to a collection property on the command rather
|
|
18
14
|
* than a scalar one.
|
|
15
|
+
*
|
|
16
|
+
* The `display` and `maxSelectedLabels` properties this adapter used to expose are gone. In
|
|
17
|
+
* `@cratis/components` 3.0.0 the field is re-expressed over the library's own `Dropdown` in multiple
|
|
18
|
+
* mode, because PrimeReact 11's `Select` has no `multiple` prop of the version 10 shape and renders the
|
|
19
|
+
* selection through its own value slot - so there is no comma mode, no chip mode, and no label-collapse
|
|
20
|
+
* threshold left to choose between. Both props are still declared upstream so call sites compile, and
|
|
21
|
+
* neither is read. Passing them on would have let a screen state a preference the control cannot honor.
|
|
19
22
|
*/ function SceneMultiSelectField({ element }) {
|
|
20
23
|
return /*#__PURE__*/ jsx(CommandFormField, {
|
|
21
24
|
element: element,
|
|
@@ -25,8 +28,6 @@ const MultiSelectField = /*#__PURE__*/ lazy(async ()=>({
|
|
|
25
28
|
optionLabel: stringProperty(element.properties, 'optionLabel') ?? 'label',
|
|
26
29
|
optionValue: stringProperty(element.properties, 'optionValue') ?? 'value',
|
|
27
30
|
placeholder: stringProperty(element.properties, 'placeholder'),
|
|
28
|
-
display: unionProperty(element.properties, 'display', displayModes),
|
|
29
|
-
maxSelectedLabels: numberProperty(element.properties, 'maxSelectedLabels'),
|
|
30
31
|
filter: booleanProperty(element.properties, 'filter'),
|
|
31
32
|
showClear: booleanProperty(element.properties, 'showClear'),
|
|
32
33
|
className: stringProperty(element.properties, 'className')
|
|
@@ -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,
|
|
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,IAAAA,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,GAAA,CAACC,gBAAAA,EAAAA;QAAiBF,OAAAA,EAASA,OAAAA;AACtBG,QAAAA,QAAAA,EAAAA,CAAAA,wBACGF,GAAA,CAACL,gBAAAA,EAAAA;AACI,gBAAA,GAAGO,OAAO;AACXC,gBAAAA,OAAAA,EAASC,mBAAAA,CAAoBL,OAAAA,CAAQM,UAAU,EAAE,cAAc,EAAE;AACjEC,gBAAAA,WAAAA,EAAaC,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,gBAAAA,WAAAA,EAAaD,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;gBAClEI,WAAAA,EAAaF,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,aAAA,CAAA;gBAChDK,MAAAA,EAAQC,eAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,QAAA,CAAA;gBAC5CO,SAAAA,EAAWD,eAAAA,CAAgBZ,OAAAA,CAAQM,UAAU,EAAE,WAAA,CAAA;gBAC/CQ,SAAAA,EAAWN,cAAAA,CAAeR,OAAAA,CAAQM,UAAU,EAAE,WAAA;;;AAKlE;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SceneDataPage.d.ts","sourceRoot":"","sources":["../../../pages/SceneDataPage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"SceneDataPage.d.ts","sourceRoot":"","sources":["../../../pages/SceneDataPage.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAqB/D,wBAAgB,aAAa,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,wBAAwB,+BAiBzE"}
|
|
@@ -4,7 +4,7 @@ import { BindingKind } from '../bindings/BindingKind.js';
|
|
|
4
4
|
import { resolveElementBinding } from '../bindings/resolveElementBinding.js';
|
|
5
5
|
import { MissingBinding } from '../bindings/MissingBinding.js';
|
|
6
6
|
import { ArcRuntimeBoundary } from '../bindings/ArcRuntimeBoundary.js';
|
|
7
|
-
import {
|
|
7
|
+
import { stringArrayProperty, stringProperty } from '../properties.js';
|
|
8
8
|
|
|
9
9
|
const DataPage = /*#__PURE__*/ lazy(async ()=>({
|
|
10
10
|
default: (await import('@cratis/components/DataPage')).DataPage
|
|
@@ -12,13 +12,17 @@ const DataPage = /*#__PURE__*/ lazy(async ()=>({
|
|
|
12
12
|
/**
|
|
13
13
|
* The `Cratis.Components:dataPage` component - `DataPage` from `@cratis/components/DataPage`.
|
|
14
14
|
*
|
|
15
|
-
* The library's whole list-screen composite in one name: title bar,
|
|
15
|
+
* The library's whole list-screen composite in one name: title bar, action toolbar, filterable table and
|
|
16
16
|
* optional details pane, all driven from a single query. It is the single highest-leverage thing this
|
|
17
17
|
* package exposes, because reproducing it out of `table` and `toolbar` in a screen would be pages of
|
|
18
18
|
* modeling for a worse result.
|
|
19
19
|
*
|
|
20
20
|
* The `query` property names an Arc query proxy; the columns and menu items come from the `content`
|
|
21
21
|
* slot as `DataPage.Columns` / `DataPage.MenuItems` children.
|
|
22
|
+
*
|
|
23
|
+
* No `clientFiltering` property, for the same reason `dataTable` no longer exposes one: 3.0.0 keeps the
|
|
24
|
+
* prop so call sites compile but never reads it, and a screen setting that cannot take effect is a worse
|
|
25
|
+
* thing to offer than nothing.
|
|
22
26
|
*/ function SceneDataPage({ element, slots }) {
|
|
23
27
|
const { name, target } = resolveElementBinding(element, BindingKind.Query);
|
|
24
28
|
if (!target) return /*#__PURE__*/ jsx(MissingBinding, {
|
|
@@ -33,7 +37,6 @@ const DataPage = /*#__PURE__*/ lazy(async ()=>({
|
|
|
33
37
|
emptyMessage: stringProperty(element.properties, 'emptyMessage') ?? '',
|
|
34
38
|
dataKey: stringProperty(element.properties, 'dataKey'),
|
|
35
39
|
globalFilterFields: stringArrayProperty(element.properties, 'globalFilterFields'),
|
|
36
|
-
clientFiltering: booleanProperty(element.properties, 'clientFiltering'),
|
|
37
40
|
children: slots.content
|
|
38
41
|
})
|
|
39
42
|
});
|
|
@@ -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 {
|
|
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,IAAAA,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,qBAAAA,CAAsBJ,OAAAA,EAASK,WAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,GAAA,CAACC,cAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,YAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,GAAA,CAACG,kBAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,GAAA,CAACX,QAAAA,EAAAA;AACGe,YAAAA,KAAAA,EAAOC,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,OAAA,CAAA,IAAY,EAAA;YACtDC,KAAAA,EAAOX,MAAAA;AACPY,YAAAA,YAAAA,EAAcH,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEG,OAAAA,EAASJ,cAAAA,CAAeZ,OAAAA,CAAQa,UAAU,EAAE,SAAA,CAAA;YAC5CI,kBAAAA,EAAoBC,mBAAAA,CAAoBlB,OAAAA,CAAQa,UAAU,EAAE,oBAAA,CAAA;AAE3DZ,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;;;"}
|