@declarion/react 0.48.2 → 0.50.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 (88) hide show
  1. package/dist-lib/Check-DAfMbQIw.js +38 -0
  2. package/dist-lib/{DraggableChildrenTable-p2ZSdwzj.js → DraggableChildrenTable-Dar8C-Z9.js} +31 -31
  3. package/dist-lib/DynamicIcon-DW5krHuX.js +280 -0
  4. package/dist-lib/{Grid-CjLFAKMZ.js → Grid-BkHtfsty.js} +2 -2
  5. package/dist-lib/{LayoutRenderer-DCscqXsv.js → LayoutRenderer-Cic7IAop.js} +601 -598
  6. package/dist-lib/ListCardsBody-Dko91bLv.js +287 -0
  7. package/dist-lib/{MarkdownRenderer-Sb7zcvj0.js → MarkdownRenderer-CJrVG5HZ.js} +1 -1
  8. package/dist-lib/RefreshControl-BS8WWL8i.js +430 -0
  9. package/dist-lib/{SmartDetailPage.impl-BAW-Tx_H.js → SmartDetailPage.impl-DxRDo0p2.js} +521 -516
  10. package/dist-lib/SmartListPage.impl-CNdq5Vts.js +2849 -0
  11. package/dist-lib/{SmartRecordListPage.impl-DtSSlGrI.js → SmartRecordListPage.impl-3ct7f4rT.js} +244 -241
  12. package/dist-lib/SortHeaderMenu-NgjkW8QZ.js +106 -0
  13. package/dist-lib/action-dispatch-hVrm3Hrg.js +1984 -0
  14. package/dist-lib/api/batch.d.ts +5 -2
  15. package/dist-lib/api/data.d.ts +35 -4
  16. package/dist-lib/api/entities.d.ts +3 -3
  17. package/dist-lib/cardProjection-BR-fXPvJ.js +757 -0
  18. package/dist-lib/components/{shared → actions}/ObjectActionBar.d.ts +1 -1
  19. package/dist-lib/components/{shared → actions}/ResponsiveActionBar.d.ts +1 -1
  20. package/dist-lib/components/fields/cells/factories/date.d.ts +2 -0
  21. package/dist-lib/components/file-widgets/upload.d.ts +6 -1
  22. package/dist-lib/components/layout/Layout.d.ts +1 -1
  23. package/dist-lib/components/layout/TopBar.d.ts +1 -1
  24. package/dist-lib/components/pages/SmartListPage.d.ts +2 -12
  25. package/dist-lib/components/pages/SmartListPage.impl.d.ts +4 -0
  26. package/dist-lib/components/pages/list/ListCardRow.d.ts +40 -0
  27. package/dist-lib/components/pages/list/ListCardsBody.d.ts +34 -0
  28. package/dist-lib/components/pages/list/ListFloatbar.d.ts +1 -1
  29. package/dist-lib/components/pages/list/ListFooter.d.ts +26 -0
  30. package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
  31. package/dist-lib/components/pages/list/ListNoRows.d.ts +32 -0
  32. package/dist-lib/components/pages/list/ListTable.d.ts +34 -0
  33. package/dist-lib/components/pages/list/ListTableRow.d.ts +18 -0
  34. package/dist-lib/components/pages/list/ListToolbar.d.ts +43 -0
  35. package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +14 -0
  36. package/dist-lib/components/pages/list/page-size.d.ts +3 -0
  37. package/dist-lib/components/pages/list/sortable-header.d.ts +2 -0
  38. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +37 -0
  39. package/dist-lib/components/pages/list/useListQuery.d.ts +66 -0
  40. package/dist-lib/components/pages/list/useListRowInteraction.d.ts +61 -0
  41. package/dist-lib/components/pages/list/useListSelection.d.ts +31 -0
  42. package/dist-lib/components/pages/list/useListSort.d.ts +45 -0
  43. package/dist-lib/components/pages/list/useListViews.d.ts +46 -0
  44. package/dist-lib/components/pages/list/useRowMenu.d.ts +1 -1
  45. package/dist-lib/components/primitives/Icons.d.ts +5 -0
  46. package/dist-lib/components/shared/RefreshControl.d.ts +17 -4
  47. package/dist-lib/field-classification-Bm0mgbwA.js +1134 -0
  48. package/dist-lib/format-count-BfRGwx2v.js +1551 -0
  49. package/dist-lib/hooks/useBrandingChrome.d.ts +17 -1
  50. package/dist-lib/hooks/useText.d.ts +3 -0
  51. package/dist-lib/hooks/useViews.d.ts +1 -1
  52. package/dist-lib/icons.js +1 -1
  53. package/dist-lib/index.d.ts +17 -15
  54. package/dist-lib/index.js +1784 -6288
  55. package/dist-lib/lib/messages.d.ts +7 -1
  56. package/dist-lib/lib/rowClickGesture.d.ts +12 -0
  57. package/dist-lib/lib/timestamp.d.ts +8 -3
  58. package/dist-lib/peekDraftStore-bb4WroTA.js +194 -0
  59. package/dist-lib/record-documents-key-8fdm7C10.js +27 -0
  60. package/dist-lib/registry-CgeGoWpW.js +1768 -0
  61. package/dist-lib/testing.d.ts +17 -2
  62. package/dist-lib/testing.js +72 -58
  63. package/dist-lib/types/api.d.ts +54 -12
  64. package/dist-lib/types/schema.d.ts +22 -6
  65. package/dist-lib/{useCurrentScreen-BshVTPVq.js → useCurrentScreen-D3XH5ptA.js} +1127 -1070
  66. package/dist-lib/useListQuery-CfuINl-0.js +87 -0
  67. package/dist-lib/useProperties-DNocaxBX.js +81 -0
  68. package/dist-lib/{useProperties-DrHFr0A1.js → useTabSearchMirror-d0BAUIcQ.js} +116 -194
  69. package/dist-lib/{value-B1O6QikE.js → value-D71J0sJq.js} +69 -69
  70. package/package.json +1 -1
  71. package/dist-lib/DynamicIcon-Dc2j-rg_.js +0 -275
  72. package/dist-lib/RefreshControl-Cnl9nE0x.js +0 -945
  73. package/dist-lib/registry-CCxnZW2b.js +0 -5281
  74. /package/dist-lib/components/{shared → actions}/ActionButton.d.ts +0 -0
  75. /package/dist-lib/components/{shared → actions}/ActionDialog.d.ts +0 -0
  76. /package/dist-lib/components/{shared → actions}/ActionResultDialog.d.ts +0 -0
  77. /package/dist-lib/components/{shared → actions}/ActionRunner.d.ts +0 -0
  78. /package/dist-lib/components/{mass-edit → actions}/PropertyGridEditor.d.ts +0 -0
  79. /package/dist-lib/components/{shared → actions}/RowActionsKebab.d.ts +0 -0
  80. /package/dist-lib/components/{shared → chrome}/AssociationTabs.d.ts +0 -0
  81. /package/dist-lib/components/{shared → chrome}/AuditMetaStrip.d.ts +0 -0
  82. /package/dist-lib/components/{shared → chrome}/Breadcrumbs.d.ts +0 -0
  83. /package/dist-lib/components/{shared → chrome}/HighlightsStrip.d.ts +0 -0
  84. /package/dist-lib/components/{shared → chrome}/PageHeader.d.ts +0 -0
  85. /package/dist-lib/components/{shared → chrome}/RecordHeader.d.ts +0 -0
  86. /package/dist-lib/components/{shell → layout}/CommandPalette.d.ts +0 -0
  87. /package/dist-lib/components/{columns → list}/ColumnPicker.d.ts +0 -0
  88. /package/dist-lib/components/{views → list}/ViewSwitcher.d.ts +0 -0
@@ -0,0 +1,46 @@
1
+ import type { FilterNode } from "../../../lib/filters";
2
+ import { type Screen } from "../../../types/schema";
3
+ import type { ViewItem } from "../../../components/list/ViewSwitcher";
4
+ interface ListViewsInput {
5
+ screenCode: string;
6
+ screen: Screen | undefined;
7
+ searchParams: URLSearchParams;
8
+ setSearchParams: (next: URLSearchParams, options?: {
9
+ replace?: boolean;
10
+ }) => void;
11
+ userId: string | undefined;
12
+ tenantId: string | undefined;
13
+ /** A malformed `?filters=` bookmark. A visible recoverable state must not be
14
+ * replaced by a personal default view before the user can see it. */
15
+ filterError: boolean;
16
+ /** The live layout, compared against the saved one to decide dirtiness and
17
+ * written into a save. */
18
+ filters: FilterNode[];
19
+ visibleColumns: string[];
20
+ sort: string | undefined;
21
+ }
22
+ /** Which saved view a list screen is showing, and every way that changes. */
23
+ export interface ListViews {
24
+ all: ViewItem[];
25
+ activeId: string | null;
26
+ active: ViewItem | undefined;
27
+ /** True when the live layout differs from what the active view saved. */
28
+ isDirty: boolean;
29
+ /** Open a view, or clear to no view. Also the reset gesture: open the same
30
+ * view again. */
31
+ apply: (view: ViewItem) => void;
32
+ saveAsNew: (name: string) => Promise<void>;
33
+ overwriteActive: () => Promise<void>;
34
+ isSaving: boolean;
35
+ }
36
+ /**
37
+ * The saved views a list screen offers.
38
+ *
39
+ * A view owns the LOGICAL layout - filters, columns, sort - and nothing else.
40
+ * Column widths are per device and never travel in one.
41
+ */
42
+ export declare function useListViews({ screenCode, screen, searchParams, setSearchParams, userId, tenantId, filterError, filters, visibleColumns, sort, }: ListViewsInput): ListViews;
43
+ /** The name a save dialog offers to overwrite, or null when the active view is
44
+ * not the caller's to overwrite. */
45
+ export declare function overwritableViewName(active: ViewItem | undefined): string | null;
46
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { type ResolvedActionLayoutNode } from "../../../lib/actions";
2
- import type { ActionRunHandler, WidgetContext } from "../../../components/shared/ResponsiveActionBar";
2
+ import type { ActionRunHandler, WidgetContext } from "../../../components/actions/ResponsiveActionBar";
3
3
  import type { Action, Entity, Screen } from "../../../types/schema";
4
4
  export interface UseRowMenuArgs {
5
5
  row: Record<string, unknown>;
@@ -17,6 +17,7 @@ export declare const Icon: {
17
17
  ban: FC<IconProps>;
18
18
  bell: FC<IconProps>;
19
19
  bolt: FC<IconProps>;
20
+ "book-open": FC<IconProps>;
20
21
  box: FC<IconProps>;
21
22
  boxes: FC<IconProps>;
22
23
  branch: FC<IconProps>;
@@ -51,8 +52,10 @@ export declare const Icon: {
51
52
  "file-diff": FC<IconProps>;
52
53
  filePlus: FC<IconProps>;
53
54
  filter: FC<IconProps>;
55
+ fingerprint: FC<IconProps>;
54
56
  flow: FC<IconProps>;
55
57
  folder: FC<IconProps>;
58
+ gavel: FC<IconProps>;
56
59
  "git-branch": FC<IconProps>;
57
60
  globe: FC<IconProps>;
58
61
  grid: FC<IconProps>;
@@ -81,6 +84,7 @@ export declare const Icon: {
81
84
  "log-in": FC<IconProps>;
82
85
  logout: FC<IconProps>;
83
86
  menu: FC<IconProps>;
87
+ "messages-square": FC<IconProps>;
84
88
  minus: FC<IconProps>;
85
89
  moon: FC<IconProps>;
86
90
  more: FC<IconProps>;
@@ -96,6 +100,7 @@ export declare const Icon: {
96
100
  repeat: FC<IconProps>;
97
101
  right: FC<IconProps>;
98
102
  save: FC<IconProps>;
103
+ scale: FC<IconProps>;
99
104
  sched: FC<IconProps>;
100
105
  search: FC<IconProps>;
101
106
  settings: FC<IconProps>;
@@ -1,6 +1,19 @@
1
- import type { LiveObjectResult } from "../../hooks/useLiveObject";
2
- export interface RefreshControlProps<T extends Record<string, unknown> = Record<string, unknown>> {
3
- liveObject: Pick<LiveObjectResult<T>, "refetch" | "isFetching" | "isLoading" | "isLive">;
1
+ /**
2
+ * What the control needs, which is less than any one caller happens to have.
3
+ *
4
+ * A detail page hands it a `useLiveObject` result; a list hands it a refresh
5
+ * that cancels in-flight queries first and returns nothing. Typing `refetch` as
6
+ * react-query's own signature would have made the second caller impossible and
7
+ * left the list with a copy of this component - which is how the two surfaces
8
+ * drifted in the first place.
9
+ */
10
+ export interface RefreshControlProps {
11
+ liveObject: {
12
+ refetch: () => unknown;
13
+ isFetching: boolean;
14
+ isLoading: boolean;
15
+ isLive: boolean;
16
+ };
4
17
  realtime?: boolean;
5
18
  }
6
- export declare function RefreshControl<T extends Record<string, unknown> = Record<string, unknown>>({ liveObject, realtime, }: RefreshControlProps<T>): import("react").JSX.Element;
19
+ export declare function RefreshControl({ liveObject, realtime }: RefreshControlProps): import("react").JSX.Element;