@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.
Files changed (70) hide show
  1. package/.storybook/main.ts +0 -6
  2. package/.storybook/preview.tsx +33 -12
  3. package/README.md +21 -11
  4. package/common/SceneDropdown.tsx +10 -3
  5. package/common/SceneTooltip.tsx +5 -1
  6. package/cratisComponentsPackage.ts +18 -14
  7. package/data/SceneDataTable.tsx +7 -2
  8. package/data/SceneObservableDataTable.tsx +5 -2
  9. package/dialogs/SceneCommandDialog.tsx +11 -1
  10. package/dialogs/SceneDialog.tsx +13 -1
  11. package/dist/cjs/common/SceneDropdown.js +10 -3
  12. package/dist/cjs/common/SceneDropdown.js.map +1 -1
  13. package/dist/cjs/common/SceneTooltip.js +3 -1
  14. package/dist/cjs/common/SceneTooltip.js.map +1 -1
  15. package/dist/cjs/cratisComponentsPackage.js +18 -14
  16. package/dist/cjs/cratisComponentsPackage.js.map +1 -1
  17. package/dist/cjs/data/SceneDataTable.js +6 -1
  18. package/dist/cjs/data/SceneDataTable.js.map +1 -1
  19. package/dist/cjs/data/SceneObservableDataTable.js +4 -1
  20. package/dist/cjs/data/SceneObservableDataTable.js.map +1 -1
  21. package/dist/cjs/dialogs/SceneCommandDialog.js +11 -1
  22. package/dist/cjs/dialogs/SceneCommandDialog.js.map +1 -1
  23. package/dist/cjs/dialogs/SceneDialog.js +13 -1
  24. package/dist/cjs/dialogs/SceneDialog.js.map +1 -1
  25. package/dist/cjs/forms/fields/SceneChipsField.js +6 -1
  26. package/dist/cjs/forms/fields/SceneChipsField.js.map +1 -1
  27. package/dist/cjs/forms/fields/SceneMultiSelectField.js +7 -6
  28. package/dist/cjs/forms/fields/SceneMultiSelectField.js.map +1 -1
  29. package/dist/cjs/pages/SceneDataPage.js +5 -2
  30. package/dist/cjs/pages/SceneDataPage.js.map +1 -1
  31. package/dist/esm/common/SceneDropdown.d.ts.map +1 -1
  32. package/dist/esm/common/SceneDropdown.js +10 -3
  33. package/dist/esm/common/SceneDropdown.js.map +1 -1
  34. package/dist/esm/common/SceneTooltip.d.ts.map +1 -1
  35. package/dist/esm/common/SceneTooltip.js +3 -1
  36. package/dist/esm/common/SceneTooltip.js.map +1 -1
  37. package/dist/esm/cratisComponentsPackage.d.ts.map +1 -1
  38. package/dist/esm/cratisComponentsPackage.js +18 -14
  39. package/dist/esm/cratisComponentsPackage.js.map +1 -1
  40. package/dist/esm/data/SceneDataTable.d.ts.map +1 -1
  41. package/dist/esm/data/SceneDataTable.js +7 -2
  42. package/dist/esm/data/SceneDataTable.js.map +1 -1
  43. package/dist/esm/data/SceneObservableDataTable.d.ts.map +1 -1
  44. package/dist/esm/data/SceneObservableDataTable.js +5 -2
  45. package/dist/esm/data/SceneObservableDataTable.js.map +1 -1
  46. package/dist/esm/dialogs/SceneCommandDialog.d.ts.map +1 -1
  47. package/dist/esm/dialogs/SceneCommandDialog.js +11 -1
  48. package/dist/esm/dialogs/SceneCommandDialog.js.map +1 -1
  49. package/dist/esm/dialogs/SceneDialog.d.ts.map +1 -1
  50. package/dist/esm/dialogs/SceneDialog.js +13 -1
  51. package/dist/esm/dialogs/SceneDialog.js.map +1 -1
  52. package/dist/esm/editors/for_SceneObjectNavigationalBar/when_navigating_back_up_the_trail.js.map +1 -1
  53. package/dist/esm/for_cratisComponentsPackage/when_resolving_its_dependencies.js +5 -5
  54. package/dist/esm/for_cratisComponentsPackage/when_resolving_its_dependencies.js.map +1 -1
  55. package/dist/esm/forms/fields/SceneChipsField.d.ts.map +1 -1
  56. package/dist/esm/forms/fields/SceneChipsField.js +6 -1
  57. package/dist/esm/forms/fields/SceneChipsField.js.map +1 -1
  58. package/dist/esm/forms/fields/SceneMultiSelectField.d.ts.map +1 -1
  59. package/dist/esm/forms/fields/SceneMultiSelectField.js +8 -7
  60. package/dist/esm/forms/fields/SceneMultiSelectField.js.map +1 -1
  61. package/dist/esm/pages/SceneDataPage.d.ts.map +1 -1
  62. package/dist/esm/pages/SceneDataPage.js +6 -3
  63. package/dist/esm/pages/SceneDataPage.js.map +1 -1
  64. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  65. package/editors/for_SceneObjectNavigationalBar/when_navigating_back_up_the_trail.tsx +6 -0
  66. package/for_cratisComponentsPackage/when_resolving_its_dependencies.ts +16 -6
  67. package/forms/fields/SceneChipsField.tsx +6 -1
  68. package/forms/fields/SceneMultiSelectField.tsx +8 -6
  69. package/package.json +23 -13
  70. package/pages/SceneDataPage.tsx +6 -3
@@ -39,12 +39,6 @@ const config: StorybookConfig = {
39
39
  ...(config.build.rollupOptions ?? {}),
40
40
  external: [/^@cratis\/arc/, '@cratis/fundamentals'],
41
41
  };
42
- // Vite 8 minifies CSS with lightningcss, which rejects the whole bundle over one invalid file:
43
- // `@cratis/components@2.9.0` ships `dist/esm/TimeMachine/Properties.css` with `//` line comments,
44
- // which are not CSS. esbuild's minifier tolerates them. This is an upstream defect and the
45
- // workaround belongs here, in preview tooling, rather than anywhere it could hide the problem -
46
- // remove this line once the Components package ships that file with `/* */` comments.
47
- config.build.cssMinify = 'esbuild';
48
42
  return config;
49
43
  },
50
44
  };
@@ -4,26 +4,47 @@
4
4
  import type { Preview } from '@storybook/react';
5
5
  import { CratisComponentsProvider } from '@cratis/components/Common';
6
6
 
7
- // The three layers a `@cratis/components` component needs to look like itself, in the order they
8
- // resolve. PrimeReact 10 ships every widget's *structural* CSS inside the theme file - there is no
9
- // separate primitives stylesheet - so without a theme the wrapped widgets render as bare HTML. The
10
- // library's own sheet adds its Tailwind utilities and the `--cratis-*` token layer on top, and this
11
- // package's bridge puts Scene's `--scene-*` tokens in front of that wherever a Scene theme is applied.
12
- import 'primereact/resources/themes/lara-light-blue/theme.css';
13
- import 'primeicons/primeicons.css';
7
+ // The stylesheet stack a `@cratis/components` component needs, in the order the layers resolve.
8
+ //
9
+ // Components 4 owns its own markup and styling outright - there is no PrimeReact underneath it any more,
10
+ // and so no preset and no `--p-*` values behind the tokens. A look is one thing now: a sheet that assigns
11
+ // the library's own `--cratis-*` tokens.
12
+ //
13
+ // `tokens` declares the `--cratis-*` layer every component stylesheet reads, `styles` is that component
14
+ // CSS plus the compiled Tailwind utilities and the vendored Allotment sheet `DataPage`'s split view needs,
15
+ // `theme` fills the tokens in, and this package's bridge puts Scene's `--scene-*` tokens in front of all
16
+ // of it wherever a Scene theme is applied. Each layer consumes the one before it, so the order is not
17
+ // cosmetic.
18
+ import '@cratis/components/tokens';
14
19
  import '@cratis/components/styles';
20
+ import '@cratis/components/theme';
21
+ // Components 4 renders an `Icon` given a string as `<i className={icon} />` - a consumer-owned icon font,
22
+ // whichever one the consumer happens to load. These stories demonstrate that with `pi pi-*`, so the
23
+ // preview loads primeicons to make them visible. It is a Storybook devDependency for exactly this reason
24
+ // and nothing in the package's own source reaches for it.
25
+ import 'primeicons/primeicons.css';
15
26
  import '../theme/sceneTokenBridge.css';
16
27
 
28
+ // The baseline theme is scoped to a `cratis-theme` ancestor rather than to `:root`, so something has to
29
+ // carry the class. `<body>` rather than a wrapper inside each story, because overlays - dialogs, select
30
+ // panels, the filter panel - are portaled to `document.body`; a wrapper would leave every one of them
31
+ // outside the themed subtree and rendering unstyled.
32
+ document.body.classList.add('cratis-theme');
33
+
17
34
  /**
18
- * Every story renders inside `CratisComponentsProvider`, the library's own configuration provider over
19
- * PrimeReact's. Without it the wrapped components fall back to PrimeReact's defaults rather than
20
- * Cratis', so a story would be showing something subtly different from what an application renders -
21
- * which defeats the point of having stories at all.
35
+ * Every story renders inside `CratisComponentsProvider`, so a story shows what an application shows.
36
+ *
37
+ * Components 4 narrowed the provider to configuration the library itself owns - `locale` and `messages`.
38
+ * The renderer keys it used to carry (`license`, `theme`, `defaults`, `pt`, `ripple`, `unstyled`) existed
39
+ * to configure PrimeReact underneath, and there is no PrimeReact underneath any more. `unstyled` in
40
+ * particular is gone rather than defaulted: the imported `@cratis/components/theme` is the look now, and
41
+ * `theme/sceneTokenBridge.css` overrides its `--cratis-*` tokens directly, which is what lets the `Themed`
42
+ * story visibly take over from the baseline.
22
43
  */
23
44
  const preview: Preview = {
24
45
  decorators: [
25
46
  Story => (
26
- <CratisComponentsProvider>
47
+ <CratisComponentsProvider value={{ locale: 'en-US' }}>
27
48
  <Story />
28
49
  </CratisComponentsProvider>
29
50
  ),
package/README.md CHANGED
@@ -130,8 +130,13 @@ both packages write themes in one language: `primary.color`, `primary.contrastCo
130
130
  for a faceted browser that has nothing to show at design time. An application that wants it imports it
131
131
  directly.
132
132
  - **`card`** — see above.
133
- - **`column`** — PrimeReact's `Column` is a configuration element and belongs to the PrimeReact package;
134
- a duplicate here would be a shadow with nothing behind it. Columns come through the `content` slot.
133
+ - **`column`** — a column is a configuration element, not a rendered component: it declares `field`,
134
+ `header`, `sortable` and `filter`, and the table reads those off its children. Columns therefore come
135
+ through the `content` slot, and declaring a name here would add a registry entry for something no
136
+ screen resolves on its own. Note that the *ownership* of `Column` moved in PrimeReact 11 — `primereact/column`
137
+ was removed and `@cratis/components` now ships its own (`@cratis/components/DataTables`, re-exported from
138
+ `DataPage`) — so if a `column` name is ever wanted, this is the package that would have the component
139
+ behind it. The decision not to declare one is unchanged; only the reason for it is different.
135
140
  - **Event handlers** — Scene has no action-binding seam yet. Where a callback drives a component's own
136
141
  visible state the adapter holds it (`useEditableCopy`), so the breadcrumb, schema editor and time machine
137
142
  behave like themselves; where it would reach outside, the adapter exposes nothing rather than a handler
@@ -181,12 +186,17 @@ yarn lint:ci
181
186
  yarn build-storybook
182
187
  ```
183
188
 
184
- Two notes on the Storybook and Vitest configuration, both worked around in this folder and both upstream
185
- issues rather than ours:
186
-
187
- - `@cratis/components@2.9.0` ships `dist/esm/TimeMachine/Properties.css` with `//` line comments, which are
188
- not valid CSS. Vite 8's default lightningcss minifier rejects the whole bundle over it, so
189
- `.storybook/main.ts` sets `cssMinify: 'esbuild'`.
190
- - `@cratis/components` and PrimeReact are published as ESM that still uses directory imports
191
- (`primereact/api`), which Node's own resolver rejects. `vite.config.mts` inlines both so Vite resolves them
192
- instead.
189
+ Two workarounds used to live in this folder for upstream problems that `@cratis/components` 3.0.0 and
190
+ PrimeReact 11 removed the cause of. Both are gone, and neither should come back without new evidence:
191
+
192
+ - `.storybook/main.ts` no longer forces `cssMinify: 'esbuild'`. It was there because
193
+ `@cratis/components@2.9.0` shipped `dist/esm/TimeMachine/Properties.css` with `//` line comments, which
194
+ are not CSS, and Vite's default lightningcss minifier rejects a whole bundle over one invalid file.
195
+ 3.0.0 takes CSS out of the JavaScript module graph entirely: there are no per-component stylesheets any
196
+ more, only `styles.css`, `tokens.css` and `theme.css` at the package root, and all three minify cleanly
197
+ under lightningcss.
198
+ - `vite.config.mts` no longer inlines `@cratis/components` and `primereact` for Vitest. That existed
199
+ because both were published as ESM using directory imports (`primereact/api`), which Node's own resolver
200
+ rejects. `primereact/api` does not exist in version 11 at all; PrimeReact's `exports` map now resolves
201
+ `./*` to a concrete `./*/index.mjs`, and every `@cratis/components` subpath points at a real file, so
202
+ Node loads them natively and Vitest can externalize them as it does every other dependency.
@@ -8,9 +8,16 @@ import { booleanProperty, objectArrayProperty, stringProperty } from '../propert
8
8
  /**
9
9
  * The `Cratis.Components:dropdown` component - `Dropdown` from `@cratis/components/Dropdown`.
10
10
  *
11
- * The library's own `Dropdown` rather than PrimeReact's, because it carries the overlay z-index fix the
12
- * library applies across every overlay it owns - a dropdown inside a dialog renders above the dialog
13
- * instead of behind it, which is the single most common overlay bug in a PrimeReact application.
11
+ * The library's own `Dropdown` rather than PrimeReact's `Select`, and the reason changed with PrimeReact
12
+ * 11. It used to be the overlay z-index fix: a version 10 dropdown panel opened inside a dialog rendered
13
+ * within the dialog's own subtree and could land under its mask, so the library appended every overlay to
14
+ * the document body and handed out z-indexes itself. Version 11 does both natively - the select panel
15
+ * portals to the body and the shared z-index registry puts a later overlay above whatever is already
16
+ * open - and `@cratis/components` 3.0.0 accordingly deleted that workaround. What the wrapper is worth
17
+ * now is its curated surface: a single/multi select expressed in `options` / `optionLabel` /
18
+ * `optionValue` terms, where version 11's `Select` is compositional (`Select.Root`, `.Trigger`,
19
+ * `.Portal`, `.Popup`, `.List`, `.Option`) and would have to be assembled here, in an adapter whose whole
20
+ * input is a property bag.
14
21
  *
15
22
  * This is the standalone dropdown, not the command-form one: it takes its options from the screen and is
16
23
  * not bound to a command property. Use `dropdownField` inside a `commandForm`.
@@ -22,7 +22,11 @@ export function SceneTooltip({ element, slots }: RegisteredComponentProps) {
22
22
  position={unionProperty(element.properties, 'position', positions)}
23
23
  disabled={booleanProperty(element.properties, 'disabled')}
24
24
  >
25
- {slots.content}
25
+ {/* Components 4 takes a single focusable trigger, which it clones to attach its own
26
+ class and part attributes, and a Scene slot is a list. The span is that one element:
27
+ without it a slot holding anything other than exactly one node fails to type, and a
28
+ slot is authored content we cannot assume the shape of. */}
29
+ <span>{slots.content}</span>
26
30
  </Tooltip>
27
31
  );
28
32
  }
@@ -9,23 +9,27 @@ import { cratisComponents, cratisComponentsPackageName } from './cratisComponent
9
9
  * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.
10
10
  *
11
11
  * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is
12
- * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its
13
- * own styling is a compiled Tailwind utility sheet (`@cratis/components/styles`) plus a `--cratis-*`
14
- * token layer. Activate it in a profile without PrimeReact and nothing renders; activate it without
15
- * Tailwind and everything renders unstyled. Both are stated as dependencies so a package picker can say
16
- * so while the profile is being configured, instead of leaving it to be discovered when the page opens.
12
+ * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own
13
+ * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and
14
+ * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact
15
+ * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as
16
+ * dependencies so a package picker can say so while the profile is being configured, instead of leaving
17
+ * it to be discovered when the page opens.
17
18
  *
18
- * The version ranges are the real ones the library carries: `>=10.9.0` for PrimeReact because its
19
- * `--cratis-*` tokens resolve PrimeReact 11's design tokens first and fall back to the version 10 theme
20
- * variables, so it spans the upgrade window; `^4.0.0` for Tailwind because the utility sheet is compiled
21
- * against Tailwind 4.
19
+ * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0
20
+ * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the
21
+ * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`
22
+ * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window
23
+ * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of
24
+ * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is
25
+ * compiled against Tailwind 4.
22
26
  */
23
27
  export const cratisComponentsPackageManifest: ScenePackage = {
24
28
  name: cratisComponentsPackageName,
25
- version: '2.8.1',
29
+ version: '3.0.0',
26
30
  kind: PackageKind.ComponentLibrary,
27
31
  dependencies: [
28
- { name: 'PrimeReact', versionRange: '>=10.9.0' },
32
+ { name: 'PrimeReact', versionRange: '>=11.0.0' },
29
33
  { name: 'Tailwind', versionRange: '^4.0.0' },
30
34
  ],
31
35
  components: [
@@ -78,9 +82,9 @@ export const cratisComponentsPackageManifest: ScenePackage = {
78
82
  dialogTemplates: [],
79
83
 
80
84
  // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads
81
- // a `--cratis-*` variable layer that resolves whatever PrimeReact theme - or Scene theme, through
82
- // this package's token bridge - happens to be active. Shipping a theme here would be this library
83
- // asserting a look it was specifically built not to have.
85
+ // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a
86
+ // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.
87
+ // Shipping a theme here would be this library asserting a look it was specifically built not to have.
84
88
  themes: [],
85
89
 
86
90
  displayName: 'Cratis Components',
@@ -4,7 +4,7 @@
4
4
  import { lazy } from 'react';
5
5
  import { RegisteredComponentProps } from '@cratis/scene.react';
6
6
  import { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';
7
- import { booleanProperty, stringArrayProperty, stringProperty } from '../properties';
7
+ import { stringArrayProperty, stringProperty } from '../properties';
8
8
 
9
9
  const DataTableForQuery = lazy(async () => ({ default: (await import('@cratis/components/DataTables')).DataTableForQuery }));
10
10
 
@@ -19,6 +19,12 @@ const DataTableForQuery = lazy(async () => ({ default: (await import('@cratis/co
19
19
  * back into it, where PrimeReact's `DataTable` is handed rows and knows nothing about where they came from.
20
20
  *
21
21
  * The `query` property names an Arc query proxy; the columns come from the `content` slot.
22
+ *
23
+ * There is deliberately no `clientFiltering` property. `@cratis/components` 3.0.0 still accepts the prop
24
+ * so existing call sites compile, but it no longer does anything - filtering is always applied to the
25
+ * loaded page. Exposing a screen property that reads as a choice and silently is not would be worse than
26
+ * not offering it, so a screen that set it now gets a property-not-recognized signal rather than a
27
+ * setting that quietly stopped mattering.
22
28
  */
23
29
  export function SceneDataTable({ element, slots }: RegisteredComponentProps) {
24
30
  const { name, target } = resolveElementBinding(element, BindingKind.Query);
@@ -31,7 +37,6 @@ export function SceneDataTable({ element, slots }: RegisteredComponentProps) {
31
37
  emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}
32
38
  dataKey={stringProperty(element.properties, 'dataKey')}
33
39
  globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}
34
- clientFiltering={booleanProperty(element.properties, 'clientFiltering')}
35
40
  className={stringProperty(element.properties, 'className')}
36
41
  >
37
42
  {slots.content}
@@ -4,7 +4,7 @@
4
4
  import { lazy } from 'react';
5
5
  import { RegisteredComponentProps } from '@cratis/scene.react';
6
6
  import { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';
7
- import { booleanProperty, stringArrayProperty, stringProperty } from '../properties';
7
+ import { stringArrayProperty, stringProperty } from '../properties';
8
8
 
9
9
  const DataTableForObservableQuery = lazy(async () => ({
10
10
  default: (await import('@cratis/components/DataTables')).DataTableForObservableQuery,
@@ -19,6 +19,10 @@ const DataTableForObservableQuery = lazy(async () => ({
19
19
  * re-renders when the server's read model changes, and a plain query does not. A screen that names an
20
20
  * observable query here is stating that its data is live, which is a design decision worth being able to
21
21
  * read off the screen.
22
+ *
23
+ * As with `dataTable`, no `clientFiltering` property is exposed: `@cratis/components` 3.0.0 keeps the
24
+ * prop for source compatibility but ignores it, and a screen property that cannot change anything is
25
+ * worse than an absent one.
22
26
  */
23
27
  export function SceneObservableDataTable({ element, slots }: RegisteredComponentProps) {
24
28
  const { name, target } = resolveElementBinding(element, BindingKind.Query);
@@ -31,7 +35,6 @@ export function SceneObservableDataTable({ element, slots }: RegisteredComponent
31
35
  emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}
32
36
  dataKey={stringProperty(element.properties, 'dataKey')}
33
37
  globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}
34
- clientFiltering={booleanProperty(element.properties, 'clientFiltering')}
35
38
  className={stringProperty(element.properties, 'className')}
36
39
  >
37
40
  {slots.content}
@@ -18,6 +18,15 @@ const CommandDialog = lazy(async () => ({ default: (await import('@cratis/compon
18
18
  * reimplementing the protocol.
19
19
  *
20
20
  * The `command` property names an Arc command proxy; the fields go in the `content` slot.
21
+ *
22
+ * `dismissable` and `closeAriaLabel` are here rather than on `dialog` alone because `CommandDialog`
23
+ * forwards both to the dialog it wraps, and in `@cratis/components` 3.0.0 that forwarding actually
24
+ * happens - 2.x accepted the two props and dropped them on the floor. `dismissable` matters more on a
25
+ * command dialog than anywhere else: it decides whether a half-filled form can be abandoned with
26
+ * `Escape` or a backdrop click, which is a decision about the command, not about the chrome.
27
+ *
28
+ * The `resizable` property this adapter used to carry is gone. It is still declared upstream so call
29
+ * sites compile, but PrimeReact 11's headless dialog has no resize handle and nothing reads the prop.
21
30
  */
22
31
  export function SceneCommandDialog({ element, slots }: RegisteredComponentProps) {
23
32
  const { name, target } = resolveElementBinding(element, BindingKind.Command);
@@ -30,9 +39,10 @@ export function SceneCommandDialog({ element, slots }: RegisteredComponentProps)
30
39
  command={target}
31
40
  visible={booleanProperty(element.properties, 'visible') ?? true}
32
41
  width={stringProperty(element.properties, 'width')}
33
- resizable={booleanProperty(element.properties, 'resizable')}
42
+ dismissable={booleanProperty(element.properties, 'dismissable')}
34
43
  okLabel={stringProperty(element.properties, 'okLabel')}
35
44
  cancelLabel={stringProperty(element.properties, 'cancelLabel')}
45
+ closeAriaLabel={stringProperty(element.properties, 'closeAriaLabel')}
36
46
  className={stringProperty(element.properties, 'className')}
37
47
  >
38
48
  {slots.content}
@@ -19,6 +19,17 @@ const Dialog = lazy(async () => ({ default: (await import('@cratis/components/Di
19
19
  *
20
20
  * `visible` defaults to `true` because a dialog placed on a screen is being placed to be seen; a host
21
21
  * that controls visibility sets the property explicitly.
22
+ *
23
+ * `dismissable` replaces the `resizable` property this adapter used to carry, and the swap is the whole
24
+ * PrimeReact 11 story in miniature. `resizable` is still declared on `DialogProps` so call sites compile,
25
+ * but version 11's headless dialog has no resize handle and the library never reads the prop - a screen
26
+ * setting it got nothing. `dismissable` is the opposite: 3.0.0 added it and honors it, and it decides
27
+ * whether the header close button, backdrop click and `Escape` are offered at all. Leaving it unset keeps
28
+ * the library's own default, so a screen opts into a dismiss affordance rather than having one imposed.
29
+ *
30
+ * `closeAriaLabel` names that close button. It is separate from every other label here because it is the
31
+ * only one a screen reader reads and nobody sees, which is exactly why it gets forgotten - offering it
32
+ * next to `okLabel` and `cancelLabel` is what makes localizing a dialog a complete job.
22
33
  */
23
34
  export function SceneDialog({ element, slots }: RegisteredComponentProps) {
24
35
  return (
@@ -27,11 +38,12 @@ export function SceneDialog({ element, slots }: RegisteredComponentProps) {
27
38
  title={stringProperty(element.properties, 'title') ?? ''}
28
39
  visible={booleanProperty(element.properties, 'visible') ?? true}
29
40
  width={stringProperty(element.properties, 'width')}
30
- resizable={booleanProperty(element.properties, 'resizable')}
41
+ dismissable={booleanProperty(element.properties, 'dismissable')}
31
42
  isValid={booleanProperty(element.properties, 'isValid')}
32
43
  isBusy={booleanProperty(element.properties, 'isBusy')}
33
44
  okLabel={stringProperty(element.properties, 'okLabel')}
34
45
  cancelLabel={stringProperty(element.properties, 'cancelLabel')}
46
+ closeAriaLabel={stringProperty(element.properties, 'closeAriaLabel')}
35
47
  className={stringProperty(element.properties, 'className')}
36
48
  >
37
49
  {slots.content}
@@ -7,9 +7,16 @@ var properties = require('../properties.js');
7
7
  /**
8
8
  * The `Cratis.Components:dropdown` component - `Dropdown` from `@cratis/components/Dropdown`.
9
9
  *
10
- * The library's own `Dropdown` rather than PrimeReact's, because it carries the overlay z-index fix the
11
- * library applies across every overlay it owns - a dropdown inside a dialog renders above the dialog
12
- * instead of behind it, which is the single most common overlay bug in a PrimeReact application.
10
+ * The library's own `Dropdown` rather than PrimeReact's `Select`, and the reason changed with PrimeReact
11
+ * 11. It used to be the overlay z-index fix: a version 10 dropdown panel opened inside a dialog rendered
12
+ * within the dialog's own subtree and could land under its mask, so the library appended every overlay to
13
+ * the document body and handed out z-indexes itself. Version 11 does both natively - the select panel
14
+ * portals to the body and the shared z-index registry puts a later overlay above whatever is already
15
+ * open - and `@cratis/components` 3.0.0 accordingly deleted that workaround. What the wrapper is worth
16
+ * now is its curated surface: a single/multi select expressed in `options` / `optionLabel` /
17
+ * `optionValue` terms, where version 11's `Select` is compositional (`Select.Root`, `.Trigger`,
18
+ * `.Portal`, `.Popup`, `.List`, `.Option`) and would have to be assembled here, in an adapter whose whole
19
+ * input is a property bag.
13
20
  *
14
21
  * This is the standalone dropdown, not the command-form one: it takes its options from the screen and is
15
22
  * not bound to a command property. Use `dropdownField` inside a `commandForm`.
@@ -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, because it carries the overlay z-index fix the\n * library applies across every overlay it owns - a dropdown inside a dialog renders above the dialog\n * instead of behind it, which is the single most common overlay bug in a PrimeReact application.\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;;;;;;;;;AASC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,qBACIC,cAAA,CAACC,iBAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,8BAAAA,CAAoBJ,OAAAA,CAAQK,UAAU,EAAE,cAAc,EAAE;AACjEC,QAAAA,WAAAA,EAAaC,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,QAAAA,WAAAA,EAAaD,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;QAClEI,WAAAA,EAAaF,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA;QAChDK,QAAAA,EAAUC,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,UAAA,CAAA;QAC9CO,SAAAA,EAAWD,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,WAAA,CAAA;QAC/CQ,MAAAA,EAAQF,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,QAAA,CAAA;QAC5CS,SAAAA,EAAWP,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,WAAA;;AAG1D;;;;"}
1
+ {"version":3,"file":"SceneDropdown.js","sources":["../../../common/SceneDropdown.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Dropdown } from '@cratis/components/Dropdown';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, objectArrayProperty, stringProperty } from '../properties';\n\n/**\n * The `Cratis.Components:dropdown` component - `Dropdown` from `@cratis/components/Dropdown`.\n *\n * The library's own `Dropdown` rather than PrimeReact's `Select`, and the reason changed with PrimeReact\n * 11. It used to be the overlay z-index fix: a version 10 dropdown panel opened inside a dialog rendered\n * within the dialog's own subtree and could land under its mask, so the library appended every overlay to\n * the document body and handed out z-indexes itself. Version 11 does both natively - the select panel\n * portals to the body and the shared z-index registry puts a later overlay above whatever is already\n * open - and `@cratis/components` 3.0.0 accordingly deleted that workaround. What the wrapper is worth\n * now is its curated surface: a single/multi select expressed in `options` / `optionLabel` /\n * `optionValue` terms, where version 11's `Select` is compositional (`Select.Root`, `.Trigger`,\n * `.Portal`, `.Popup`, `.List`, `.Option`) and would have to be assembled here, in an adapter whose whole\n * input is a property bag.\n *\n * This is the standalone dropdown, not the command-form one: it takes its options from the screen and is\n * not bound to a command property. Use `dropdownField` inside a `commandForm`.\n */\nexport function SceneDropdown({ element }: RegisteredComponentProps) {\n return (\n <Dropdown\n options={objectArrayProperty(element.properties, 'options') ?? []}\n optionLabel={stringProperty(element.properties, 'optionLabel') ?? 'label'}\n optionValue={stringProperty(element.properties, 'optionValue') ?? 'value'}\n placeholder={stringProperty(element.properties, 'placeholder')}\n disabled={booleanProperty(element.properties, 'disabled')}\n showClear={booleanProperty(element.properties, 'showClear')}\n filter={booleanProperty(element.properties, 'filter')}\n className={stringProperty(element.properties, 'className')}\n />\n );\n}\n"],"names":["SceneDropdown","element","_jsx","Dropdown","options","objectArrayProperty","properties","optionLabel","stringProperty","optionValue","placeholder","disabled","booleanProperty","showClear","filter","className"],"mappings":";;;;;;AAOA;;;;;;;;;;;;;;;;AAgBC,IACM,SAASA,aAAAA,CAAc,EAAEC,OAAO,EAA4B,EAAA;AAC/D,IAAA,qBACIC,cAAA,CAACC,iBAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,8BAAAA,CAAoBJ,OAAAA,CAAQK,UAAU,EAAE,cAAc,EAAE;AACjEC,QAAAA,WAAAA,EAAaC,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;AAClEG,QAAAA,WAAAA,EAAaD,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA,IAAkB,OAAA;QAClEI,WAAAA,EAAaF,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,aAAA,CAAA;QAChDK,QAAAA,EAAUC,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,UAAA,CAAA;QAC9CO,SAAAA,EAAWD,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,WAAA,CAAA;QAC/CQ,MAAAA,EAAQF,0BAAAA,CAAgBX,OAAAA,CAAQK,UAAU,EAAE,QAAA,CAAA;QAC5CS,SAAAA,EAAWP,yBAAAA,CAAeP,OAAAA,CAAQK,UAAU,EAAE,WAAA;;AAG1D;;;;"}
@@ -21,7 +21,9 @@ var properties = require('../properties.js');
21
21
  content: properties.stringProperty(element.properties, 'content') ?? '',
22
22
  position: properties.unionProperty(element.properties, 'position', positions),
23
23
  disabled: properties.booleanProperty(element.properties, 'disabled'),
24
- children: slots.content
24
+ children: /*#__PURE__*/ jsxRuntime.jsx("span", {
25
+ children: slots.content
26
+ })
25
27
  });
26
28
  }
27
29
 
@@ -1 +1 @@
1
- {"version":3,"file":"SceneTooltip.js","sources":["../../../common/SceneTooltip.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Tooltip } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\n/** Which side of the wrapped content the tooltip appears on. */\nconst positions = ['top', 'right', 'bottom', 'left'] as const;\n\n/**\n * The `Cratis.Components:tooltip` component - `Tooltip` from `@cratis/components/Common`.\n *\n * Wraps whatever is in its `content` slot and explains it on hover. `disabled` exists so a screen can\n * keep the wrapper in place while turning the hint off, rather than restructuring the element tree to\n * remove it - the tree is authored, and a conditional wrapper would be a worse thing to model.\n */\nexport function SceneTooltip({ element, slots }: RegisteredComponentProps) {\n return (\n <Tooltip\n content={stringProperty(element.properties, 'content') ?? ''}\n position={unionProperty(element.properties, 'position', positions)}\n disabled={booleanProperty(element.properties, 'disabled')}\n >\n {slots.content}\n </Tooltip>\n );\n}\n"],"names":["positions","SceneTooltip","element","slots","_jsx","Tooltip","content","stringProperty","properties","position","unionProperty","disabled","booleanProperty"],"mappings":";;;;;;AAOA,iEACA,MAAMA,SAAAA,GAAY;AAAC,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAEpD;;;;;;AAMC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,cAAA,CAACC,cAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA,IAAc,EAAA;AAC1DC,QAAAA,QAAAA,EAAUC,wBAAAA,CAAcR,OAAAA,CAAQM,UAAU,EAAE,UAAA,EAAYR,SAAAA,CAAAA;QACxDW,QAAAA,EAAUC,0BAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAE7CL,QAAAA,QAAAA,EAAAA,KAAAA,CAAMG;;AAGnB;;;;"}
1
+ {"version":3,"file":"SceneTooltip.js","sources":["../../../common/SceneTooltip.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Tooltip } from '@cratis/components/Common';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { booleanProperty, stringProperty, unionProperty } from '../properties';\n\n/** Which side of the wrapped content the tooltip appears on. */\nconst positions = ['top', 'right', 'bottom', 'left'] as const;\n\n/**\n * The `Cratis.Components:tooltip` component - `Tooltip` from `@cratis/components/Common`.\n *\n * Wraps whatever is in its `content` slot and explains it on hover. `disabled` exists so a screen can\n * keep the wrapper in place while turning the hint off, rather than restructuring the element tree to\n * remove it - the tree is authored, and a conditional wrapper would be a worse thing to model.\n */\nexport function SceneTooltip({ element, slots }: RegisteredComponentProps) {\n return (\n <Tooltip\n content={stringProperty(element.properties, 'content') ?? ''}\n position={unionProperty(element.properties, 'position', positions)}\n disabled={booleanProperty(element.properties, 'disabled')}\n >\n {/* Components 4 takes a single focusable trigger, which it clones to attach its own\n class and part attributes, and a Scene slot is a list. The span is that one element:\n without it a slot holding anything other than exactly one node fails to type, and a\n slot is authored content we cannot assume the shape of. */}\n <span>{slots.content}</span>\n </Tooltip>\n );\n}\n"],"names":["positions","SceneTooltip","element","slots","_jsx","Tooltip","content","stringProperty","properties","position","unionProperty","disabled","booleanProperty","span"],"mappings":";;;;;;AAOA,iEACA,MAAMA,SAAAA,GAAY;AAAC,IAAA,KAAA;AAAO,IAAA,OAAA;AAAS,IAAA,QAAA;AAAU,IAAA;AAAO,CAAA;AAEpD;;;;;;AAMC,IACM,SAASC,YAAAA,CAAa,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;AACrE,IAAA,qBACIC,cAAA,CAACC,cAAAA,EAAAA;AACGC,QAAAA,OAAAA,EAASC,yBAAAA,CAAeL,OAAAA,CAAQM,UAAU,EAAE,SAAA,CAAA,IAAc,EAAA;AAC1DC,QAAAA,QAAAA,EAAUC,wBAAAA,CAAcR,OAAAA,CAAQM,UAAU,EAAE,UAAA,EAAYR,SAAAA,CAAAA;QACxDW,QAAAA,EAAUC,0BAAAA,CAAgBV,OAAAA,CAAQM,UAAU,EAAE,UAAA,CAAA;AAM9C,QAAA,QAAA,gBAAAJ,cAAA,CAACS,MAAAA,EAAAA;AAAMV,YAAAA,QAAAA,EAAAA,KAAAA,CAAMG;;;AAGzB;;;;"}
@@ -9,24 +9,28 @@ var cratisComponents = require('./cratisComponents.js');
9
9
  * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.
10
10
  *
11
11
  * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is
12
- * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its
13
- * own styling is a compiled Tailwind utility sheet (`@cratis/components/styles`) plus a `--cratis-*`
14
- * token layer. Activate it in a profile without PrimeReact and nothing renders; activate it without
15
- * Tailwind and everything renders unstyled. Both are stated as dependencies so a package picker can say
16
- * so while the profile is being configured, instead of leaving it to be discovered when the page opens.
12
+ * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own
13
+ * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and
14
+ * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact
15
+ * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as
16
+ * dependencies so a package picker can say so while the profile is being configured, instead of leaving
17
+ * it to be discovered when the page opens.
17
18
  *
18
- * The version ranges are the real ones the library carries: `>=10.9.0` for PrimeReact because its
19
- * `--cratis-*` tokens resolve PrimeReact 11's design tokens first and fall back to the version 10 theme
20
- * variables, so it spans the upgrade window; `^4.0.0` for Tailwind because the utility sheet is compiled
21
- * against Tailwind 4.
19
+ * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0
20
+ * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the
21
+ * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`
22
+ * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window
23
+ * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of
24
+ * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is
25
+ * compiled against Tailwind 4.
22
26
  */ const cratisComponentsPackageManifest = {
23
27
  name: cratisComponents.cratisComponentsPackageName,
24
- version: '2.8.1',
28
+ version: '3.0.0',
25
29
  kind: scene_model.PackageKind.ComponentLibrary,
26
30
  dependencies: [
27
31
  {
28
32
  name: 'PrimeReact',
29
- versionRange: '>=10.9.0'
33
+ versionRange: '>=11.0.0'
30
34
  },
31
35
  {
32
36
  name: 'Tailwind',
@@ -81,9 +85,9 @@ var cratisComponents = require('./cratisComponents.js');
81
85
  screenTemplates: [],
82
86
  dialogTemplates: [],
83
87
  // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads
84
- // a `--cratis-*` variable layer that resolves whatever PrimeReact theme - or Scene theme, through
85
- // this package's token bridge - happens to be active. Shipping a theme here would be this library
86
- // asserting a look it was specifically built not to have.
88
+ // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a
89
+ // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.
90
+ // Shipping a theme here would be this library asserting a look it was specifically built not to have.
87
91
  themes: [],
88
92
  displayName: 'Cratis Components',
89
93
  description: "Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind.",
@@ -1 +1 @@
1
- {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its\n * own styling is a compiled Tailwind utility sheet (`@cratis/components/styles`) plus a `--cratis-*`\n * token layer. Activate it in a profile without PrimeReact and nothing renders; activate it without\n * Tailwind and everything renders unstyled. Both are stated as dependencies so a package picker can say\n * so while the profile is being configured, instead of leaving it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries: `>=10.9.0` for PrimeReact because its\n * `--cratis-*` tokens resolve PrimeReact 11's design tokens first and fall back to the version 10 theme\n * variables, so it spans the upgrade window; `^4.0.0` for Tailwind because the utility sheet is compiled\n * against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '2.8.1',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=10.9.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever PrimeReact theme - or Scene theme, through\n // this package's token bridge - happens to be active. Shipping a theme here would be this library\n // asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind.\",\n module: '@cratis/scene.components',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","cratisComponentsPackage","manifest","cratisComponents"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;UAeaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,4CAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,uFAAA;IACbC,MAAAA,EAAQ;AACZ;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUlB,+BAAAA;IACVS,UAAAA,EAAYU;AAChB;;;;;"}
1
+ {"version":3,"file":"cratisComponentsPackage.js","sources":["../../cratisComponentsPackage.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { cratisComponents, cratisComponentsPackageName } from './cratisComponents';\n\n/**\n * The `Cratis.Components` package's declaration - what a profile gets when it lists this package.\n *\n * This is the concrete case the whole package-dependency mechanism exists for. `@cratis/components` is\n * not a self-contained library: every component in it is a wrapper over a PrimeReact widget, and its own\n * styling is a `--cratis-*` token layer (`@cratis/components/tokens`) plus the component stylesheets and\n * compiled Tailwind utilities in `@cratis/components/styles`. Activate it in a profile without PrimeReact\n * and nothing renders; activate it without Tailwind and everything renders unstyled. Both are stated as\n * dependencies so a package picker can say so while the profile is being configured, instead of leaving\n * it to be discovered when the page opens.\n *\n * The version ranges are the real ones the library carries. `>=11.0.0` for PrimeReact: version 3.0.0\n * declares `primereact@^11` as a peer dependency and is built against version 11's component set, so the\n * span across the major boundary that the previous `>=10.9.0` range described is over. The `--cratis-*`\n * tokens still resolve a version 10 theme variable as their last fallback, but that is an upgrade-window\n * courtesy for an application with a compiled version 10 stylesheet still on the page - not a version of\n * PrimeReact this package can be activated against. `^4.0.0` for Tailwind, because the utility sheet is\n * compiled against Tailwind 4.\n */\nexport const cratisComponentsPackageManifest: ScenePackage = {\n name: cratisComponentsPackageName,\n version: '3.0.0',\n kind: PackageKind.ComponentLibrary,\n dependencies: [\n { name: 'PrimeReact', versionRange: '>=11.0.0' },\n { name: 'Tailwind', versionRange: '^4.0.0' },\n ],\n components: [\n 'page',\n 'dataPage',\n 'formElement',\n 'dataTable',\n 'table',\n 'observableDataTable',\n 'commandForm',\n 'inputTextField',\n 'numberField',\n 'checkboxField',\n 'textAreaField',\n 'dropdownField',\n 'sliderField',\n 'calendarField',\n 'colorPickerField',\n 'multiSelectField',\n 'chipsField',\n 'radioButtonField',\n 'radioGroupField',\n 'dialog',\n 'confirmationDialog',\n 'busyIndicatorDialog',\n 'commandDialog',\n 'stepperCommandDialog',\n 'icon',\n 'tooltip',\n 'dropdown',\n 'errorBoundary',\n 'objectContentEditor',\n 'objectNavigationalBar',\n 'schemaEditor',\n 'timeMachine',\n 'filterPanel',\n 'toolbar',\n 'toolbarButton',\n 'toolbarGroup',\n 'toolbarSeparator',\n ],\n\n // A component library ships components, and nothing else. Layouts, screen templates and dialog\n // templates all belong to a Blueprint: they are decisions about what an application looks like as a\n // whole, and this package deliberately makes none of them - it provides the Arc-bound composites a\n // template is *built from*, so that a blueprint can place a `dataPage` in a slot and configure it,\n // rather than shipping one opinionated data page nobody can rearrange.\n layouts: [],\n screenTemplates: [],\n dialogTemplates: [],\n\n // No themes either, for a different reason: `@cratis/components` has no palette of its own. It reads\n // a `--cratis-*` variable layer that resolves whatever is in front of it - the `--p-*` properties a\n // PrimeReact 11 preset emits at runtime, or a Scene theme through this package's token bridge.\n // Shipping a theme here would be this library asserting a look it was specifically built not to have.\n themes: [],\n\n displayName: 'Cratis Components',\n description: \"Cratis' Arc-bound data, form and dialog composites, built on PrimeReact and Tailwind.\",\n module: '@cratis/scene.components',\n};\n\n/**\n * The `Cratis.Components` package as a loadable bundle - the manifest above, plus the React components\n * behind the names it declares.\n *\n * No `layouts`, `screenTemplates`, `dialogTemplates` or `themes` are provided, matching a manifest that\n * declares none of them; `validatePackageBundle` is what proves the two halves agree.\n */\nexport const cratisComponentsPackage: ScenePackageBundle = {\n manifest: cratisComponentsPackageManifest,\n components: cratisComponents,\n};\n"],"names":["cratisComponentsPackageManifest","name","cratisComponentsPackageName","version","kind","PackageKind","ComponentLibrary","dependencies","versionRange","components","layouts","screenTemplates","dialogTemplates","themes","displayName","description","module","cratisComponentsPackage","manifest","cratisComponents"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;;UAmBaA,+BAAAA,GAAgD;IACzDC,IAAAA,EAAMC,4CAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,gBAAgB;IAClCC,YAAAA,EAAc;AACV,QAAA;YAAEN,IAAAA,EAAM,YAAA;YAAcO,YAAAA,EAAc;AAAW,SAAA;AAC/C,QAAA;YAAEP,IAAAA,EAAM,UAAA;YAAYO,YAAAA,EAAc;AAAS;AAC9C,KAAA;IACDC,UAAAA,EAAY;AACR,QAAA,MAAA;AACA,QAAA,UAAA;AACA,QAAA,aAAA;AACA,QAAA,WAAA;AACA,QAAA,OAAA;AACA,QAAA,qBAAA;AACA,QAAA,aAAA;AACA,QAAA,gBAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,eAAA;AACA,QAAA,aAAA;AACA,QAAA,eAAA;AACA,QAAA,kBAAA;AACA,QAAA,kBAAA;AACA,QAAA,YAAA;AACA,QAAA,kBAAA;AACA,QAAA,iBAAA;AACA,QAAA,QAAA;AACA,QAAA,oBAAA;AACA,QAAA,qBAAA;AACA,QAAA,eAAA;AACA,QAAA,sBAAA;AACA,QAAA,MAAA;AACA,QAAA,SAAA;AACA,QAAA,UAAA;AACA,QAAA,eAAA;AACA,QAAA,qBAAA;AACA,QAAA,uBAAA;AACA,QAAA,cAAA;AACA,QAAA,aAAA;AACA,QAAA,aAAA;AACA,QAAA,SAAA;AACA,QAAA,eAAA;AACA,QAAA,cAAA;AACA,QAAA;AACH,KAAA;;;;;;AAODC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiB,EAAE;AACnBC,IAAAA,eAAAA,EAAiB,EAAE;;;;;AAMnBC,IAAAA,MAAAA,EAAQ,EAAE;IAEVC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa,uFAAA;IACbC,MAAAA,EAAQ;AACZ;AAEA;;;;;;UAOaC,uBAAAA,GAA8C;IACvDC,QAAAA,EAAUlB,+BAAAA;IACVS,UAAAA,EAAYU;AAChB;;;;;"}
@@ -22,6 +22,12 @@ const DataTableForQuery = /*#__PURE__*/ react.lazy(async ()=>({
22
22
  * back into it, where PrimeReact's `DataTable` is handed rows and knows nothing about where they came from.
23
23
  *
24
24
  * The `query` property names an Arc query proxy; the columns come from the `content` slot.
25
+ *
26
+ * There is deliberately no `clientFiltering` property. `@cratis/components` 3.0.0 still accepts the prop
27
+ * so existing call sites compile, but it no longer does anything - filtering is always applied to the
28
+ * loaded page. Exposing a screen property that reads as a choice and silently is not would be worse than
29
+ * not offering it, so a screen that set it now gets a property-not-recognized signal rather than a
30
+ * setting that quietly stopped mattering.
25
31
  */ function SceneDataTable({ element, slots }) {
26
32
  const { name, target } = resolveElementBinding.resolveElementBinding(element, BindingKind.BindingKind.Query);
27
33
  if (!target) return /*#__PURE__*/ jsxRuntime.jsx(MissingBinding.MissingBinding, {
@@ -35,7 +41,6 @@ const DataTableForQuery = /*#__PURE__*/ react.lazy(async ()=>({
35
41
  emptyMessage: properties.stringProperty(element.properties, 'emptyMessage') ?? '',
36
42
  dataKey: properties.stringProperty(element.properties, 'dataKey'),
37
43
  globalFilterFields: properties.stringArrayProperty(element.properties, 'globalFilterFields'),
38
- clientFiltering: properties.booleanProperty(element.properties, 'clientFiltering'),
39
44
  className: properties.stringProperty(element.properties, 'className'),
40
45
  children: slots.content
41
46
  })
@@ -1 +1 @@
1
- {"version":3,"file":"SceneDataTable.js","sources":["../../../data/SceneDataTable.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForQuery = lazy(async () => ({ default: (await import('@cratis/components/DataTables')).DataTableForQuery }));\n\n/**\n * The `Cratis.Components:dataTable` component, also registered as `table` - `DataTableForQuery` from\n * `@cratis/components/DataTables`.\n *\n * Registering it under the bare name `table` as well is override priority working as designed: a profile\n * listing `core`, `PrimeReact` and `Cratis.Components` in that order resolves `table` here and records\n * the other two as shadowed. That is the right outcome, because this is a strictly better `table` for a\n * Cratis application - it performs the query, pages against the server, and wires filtering and sorting\n * back into it, where PrimeReact's `DataTable` is handed rows and knows nothing about where they came from.\n *\n * The `query` property names an Arc query proxy; the columns come from the `content` slot.\n */\nexport function SceneDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForQuery\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n clientFiltering={booleanProperty(element.properties, 'clientFiltering')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForQuery","lazy","default","SceneDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","clientFiltering","booleanProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,iBAAAA,iBAAoBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,+BAAA,CAA+B,EAAGF;KAAkB,CAAA,CAAA;AAEzH;;;;;;;;;;;AAWC,IACM,SAASG,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,iBAAAA,EAAAA;YACGe,KAAAA,EAAOR,MAAAA;AACPS,YAAAA,YAAAA,EAAcC,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEC,OAAAA,EAASF,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,SAAA,CAAA;YAC5CE,kBAAAA,EAAoBC,8BAAAA,CAAoBjB,OAAAA,CAAQc,UAAU,EAAE,oBAAA,CAAA;YAC5DI,eAAAA,EAAiBC,0BAAAA,CAAgBnB,OAAAA,CAAQc,UAAU,EAAE,iBAAA,CAAA;YACrDM,SAAAA,EAAWP,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,WAAA,CAAA;AAE7Cb,YAAAA,QAAAA,EAAAA,KAAAA,CAAMoB;;;AAIvB;;;;"}
1
+ {"version":3,"file":"SceneDataTable.js","sources":["../../../data/SceneDataTable.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForQuery = lazy(async () => ({ default: (await import('@cratis/components/DataTables')).DataTableForQuery }));\n\n/**\n * The `Cratis.Components:dataTable` component, also registered as `table` - `DataTableForQuery` from\n * `@cratis/components/DataTables`.\n *\n * Registering it under the bare name `table` as well is override priority working as designed: a profile\n * listing `core`, `PrimeReact` and `Cratis.Components` in that order resolves `table` here and records\n * the other two as shadowed. That is the right outcome, because this is a strictly better `table` for a\n * Cratis application - it performs the query, pages against the server, and wires filtering and sorting\n * back into it, where PrimeReact's `DataTable` is handed rows and knows nothing about where they came from.\n *\n * The `query` property names an Arc query proxy; the columns come from the `content` slot.\n *\n * There is deliberately no `clientFiltering` property. `@cratis/components` 3.0.0 still accepts the prop\n * so existing call sites compile, but it no longer does anything - filtering is always applied to the\n * loaded page. Exposing a screen property that reads as a choice and silently is not would be worse than\n * not offering it, so a screen that set it now gets a property-not-recognized signal rather than a\n * setting that quietly stopped mattering.\n */\nexport function SceneDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForQuery\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForQuery","lazy","default","SceneDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,iBAAAA,iBAAoBC,UAAAA,CAAK,WAAa;AAAEC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,+BAAA,CAA+B,EAAGF;KAAkB,CAAA,CAAA;AAEzH;;;;;;;;;;;;;;;;;AAiBC,IACM,SAASG,cAAAA,CAAe,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACvE,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,iBAAAA,EAAAA;YACGe,KAAAA,EAAOR,MAAAA;AACPS,YAAAA,YAAAA,EAAcC,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEC,OAAAA,EAASF,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,SAAA,CAAA;YAC5CE,kBAAAA,EAAoBC,8BAAAA,CAAoBjB,OAAAA,CAAQc,UAAU,EAAE,oBAAA,CAAA;YAC5DI,SAAAA,EAAWL,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,WAAA,CAAA;AAE7Cb,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;;;"}
@@ -20,6 +20,10 @@ const DataTableForObservableQuery = /*#__PURE__*/ react.lazy(async ()=>({
20
20
  * re-renders when the server's read model changes, and a plain query does not. A screen that names an
21
21
  * observable query here is stating that its data is live, which is a design decision worth being able to
22
22
  * read off the screen.
23
+ *
24
+ * As with `dataTable`, no `clientFiltering` property is exposed: `@cratis/components` 3.0.0 keeps the
25
+ * prop for source compatibility but ignores it, and a screen property that cannot change anything is
26
+ * worse than an absent one.
23
27
  */ function SceneObservableDataTable({ element, slots }) {
24
28
  const { name, target } = resolveElementBinding.resolveElementBinding(element, BindingKind.BindingKind.Query);
25
29
  if (!target) return /*#__PURE__*/ jsxRuntime.jsx(MissingBinding.MissingBinding, {
@@ -33,7 +37,6 @@ const DataTableForObservableQuery = /*#__PURE__*/ react.lazy(async ()=>({
33
37
  emptyMessage: properties.stringProperty(element.properties, 'emptyMessage') ?? '',
34
38
  dataKey: properties.stringProperty(element.properties, 'dataKey'),
35
39
  globalFilterFields: properties.stringArrayProperty(element.properties, 'globalFilterFields'),
36
- clientFiltering: properties.booleanProperty(element.properties, 'clientFiltering'),
37
40
  className: properties.stringProperty(element.properties, 'className'),
38
41
  children: slots.content
39
42
  })
@@ -1 +1 @@
1
- {"version":3,"file":"SceneObservableDataTable.js","sources":["../../../data/SceneObservableDataTable.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { booleanProperty, stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForObservableQuery = lazy(async () => ({\n default: (await import('@cratis/components/DataTables')).DataTableForObservableQuery,\n}));\n\n/**\n * The `Cratis.Components:observableDataTable` component - `DataTableForObservableQuery` from\n * `@cratis/components/DataTables`.\n *\n * A separate name rather than a flag on `dataTable`, because the distinction is in the *proxy* a host\n * registers, not in how the table is configured: an observable query opens a WebSocket subscription and\n * re-renders when the server's read model changes, and a plain query does not. A screen that names an\n * observable query here is stating that its data is live, which is a design decision worth being able to\n * read off the screen.\n */\nexport function SceneObservableDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForObservableQuery\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n clientFiltering={booleanProperty(element.properties, 'clientFiltering')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForObservableQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForObservableQuery","lazy","default","SceneObservableDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","clientFiltering","booleanProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,2BAAAA,iBAA8BC,UAAAA,CAAK,WAAa;AAClDC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,+BAAA,CAA+B,EAAGF;KAC7D,CAAA,CAAA;AAEA;;;;;;;;;AASC,IACM,SAASG,wBAAAA,CAAyB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACjF,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,2BAAAA,EAAAA;YACGe,KAAAA,EAAOR,MAAAA;AACPS,YAAAA,YAAAA,EAAcC,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEC,OAAAA,EAASF,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,SAAA,CAAA;YAC5CE,kBAAAA,EAAoBC,8BAAAA,CAAoBjB,OAAAA,CAAQc,UAAU,EAAE,oBAAA,CAAA;YAC5DI,eAAAA,EAAiBC,0BAAAA,CAAgBnB,OAAAA,CAAQc,UAAU,EAAE,iBAAA,CAAA;YACrDM,SAAAA,EAAWP,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,WAAA,CAAA;AAE7Cb,YAAAA,QAAAA,EAAAA,KAAAA,CAAMoB;;;AAIvB;;;;"}
1
+ {"version":3,"file":"SceneObservableDataTable.js","sources":["../../../data/SceneObservableDataTable.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { lazy } from 'react';\nimport { RegisteredComponentProps } from '@cratis/scene.react';\nimport { ArcRuntimeBoundary, BindingKind, MissingBinding, resolveElementBinding } from '../bindings';\nimport { stringArrayProperty, stringProperty } from '../properties';\n\nconst DataTableForObservableQuery = lazy(async () => ({\n default: (await import('@cratis/components/DataTables')).DataTableForObservableQuery,\n}));\n\n/**\n * The `Cratis.Components:observableDataTable` component - `DataTableForObservableQuery` from\n * `@cratis/components/DataTables`.\n *\n * A separate name rather than a flag on `dataTable`, because the distinction is in the *proxy* a host\n * registers, not in how the table is configured: an observable query opens a WebSocket subscription and\n * re-renders when the server's read model changes, and a plain query does not. A screen that names an\n * observable query here is stating that its data is live, which is a design decision worth being able to\n * read off the screen.\n *\n * As with `dataTable`, no `clientFiltering` property is exposed: `@cratis/components` 3.0.0 keeps the\n * prop for source compatibility but ignores it, and a screen property that cannot change anything is\n * worse than an absent one.\n */\nexport function SceneObservableDataTable({ element, slots }: RegisteredComponentProps) {\n const { name, target } = resolveElementBinding(element, BindingKind.Query);\n if (!target) return <MissingBinding element={element} kind={BindingKind.Query} name={name} />;\n\n return (\n <ArcRuntimeBoundary>\n <DataTableForObservableQuery\n query={target}\n emptyMessage={stringProperty(element.properties, 'emptyMessage') ?? ''}\n dataKey={stringProperty(element.properties, 'dataKey')}\n globalFilterFields={stringArrayProperty(element.properties, 'globalFilterFields')}\n className={stringProperty(element.properties, 'className')}\n >\n {slots.content}\n </DataTableForObservableQuery>\n </ArcRuntimeBoundary>\n );\n}\n"],"names":["DataTableForObservableQuery","lazy","default","SceneObservableDataTable","element","slots","name","target","resolveElementBinding","BindingKind","Query","_jsx","MissingBinding","kind","ArcRuntimeBoundary","query","emptyMessage","stringProperty","properties","dataKey","globalFilterFields","stringArrayProperty","className","content"],"mappings":";;;;;;;;;;AAQA,MAAMA,2BAAAA,iBAA8BC,UAAAA,CAAK,WAAa;AAClDC,QAAAA,OAAAA,EAAS,CAAC,MAAM,OAAO,+BAAA,CAA+B,EAAGF;KAC7D,CAAA,CAAA;AAEA;;;;;;;;;;;;;AAaC,IACM,SAASG,wBAAAA,CAAyB,EAAEC,OAAO,EAAEC,KAAK,EAA4B,EAAA;IACjF,MAAM,EAAEC,IAAI,EAAEC,MAAM,EAAE,GAAGC,2CAAAA,CAAsBJ,OAAAA,EAASK,uBAAAA,CAAYC,KAAK,CAAA;IACzE,IAAI,CAACH,MAAAA,EAAQ,qBAAOI,cAAA,CAACC,6BAAAA,EAAAA;QAAeR,OAAAA,EAASA,OAAAA;AAASS,QAAAA,IAAAA,EAAMJ,wBAAYC,KAAK;QAAEJ,IAAAA,EAAMA;;AAErF,IAAA,qBACIK,cAAA,CAACG,qCAAAA,EAAAA;AACG,QAAA,QAAA,gBAAAH,cAAA,CAACX,2BAAAA,EAAAA;YACGe,KAAAA,EAAOR,MAAAA;AACPS,YAAAA,YAAAA,EAAcC,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,cAAA,CAAA,IAAmB,EAAA;YACpEC,OAAAA,EAASF,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,SAAA,CAAA;YAC5CE,kBAAAA,EAAoBC,8BAAAA,CAAoBjB,OAAAA,CAAQc,UAAU,EAAE,oBAAA,CAAA;YAC5DI,SAAAA,EAAWL,yBAAAA,CAAeb,OAAAA,CAAQc,UAAU,EAAE,WAAA,CAAA;AAE7Cb,YAAAA,QAAAA,EAAAA,KAAAA,CAAMkB;;;AAIvB;;;;"}