@cratis/scene.components 1.1.0 → 2.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 -8
- package/README.md +21 -11
- package/common/SceneDropdown.tsx +10 -3
- 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/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/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 +2 -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 +13 -1
- 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 +19 -13
- package/pages/SceneDataPage.tsx +6 -3
package/dist/esm/editors/for_SceneObjectNavigationalBar/when_navigating_back_up_the_trail.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { fireEvent, render, screen } from '@testing-library/react';
|
|
3
|
+
import { PrimeReactProvider } from '@primereact/core';
|
|
3
4
|
import { externalComponent } from '../../given';
|
|
4
5
|
import { SceneObjectNavigationalBar } from '../SceneObjectNavigationalBar';
|
|
5
6
|
describe('when navigating back up the trail', () => {
|
|
6
7
|
beforeEach(() => {
|
|
7
8
|
const element = externalComponent('Cratis.Components:objectNavigationalBar', { navigationPath: ['shipping', 'address', 'street'] });
|
|
8
|
-
render(_jsx(SceneObjectNavigationalBar, { element: element, slots: {} }));
|
|
9
|
+
render(_jsx(PrimeReactProvider, { children: _jsx(SceneObjectNavigationalBar, { element: element, slots: {} }) }));
|
|
9
10
|
fireEvent.click(screen.getByText('address'));
|
|
10
11
|
});
|
|
11
12
|
it('should keep the crumb that was clicked', () => screen.getByText('address').textContent.should.equal('address'));
|
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":";AA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|
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,E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,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;;;;"}
|