@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,106 @@
1
+ import { s as e } from "./DynamicIcon-DW5krHuX.js";
2
+ import { cr as t, er as n } from "./useCurrentScreen-D3XH5ptA.js";
3
+ import { useRef as r, useState as i } from "react";
4
+ import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
5
+ //#region src/components/pages/list/SortHeaderMenu.tsx
6
+ function c({ field: c, activeDir: l, activeNulls: u, inMultiSort: d, canAppend: f, onApply: p, onAppend: m, onClearColumn: h, onClearAll: g }) {
7
+ let _ = r(null), [v, y] = i(!1), b = [
8
+ {
9
+ label: "Sort ascending, empty last",
10
+ dir: "asc",
11
+ nulls: "last",
12
+ icon: e.arrowUp
13
+ },
14
+ {
15
+ label: "Sort ascending, empty first",
16
+ dir: "asc",
17
+ nulls: "first",
18
+ icon: e.arrowUp
19
+ },
20
+ {
21
+ label: "Sort descending, empty last",
22
+ dir: "desc",
23
+ nulls: "last",
24
+ icon: e.arrowDown
25
+ },
26
+ {
27
+ label: "Sort descending, empty first",
28
+ dir: "desc",
29
+ nulls: "first",
30
+ icon: e.arrowDown
31
+ }
32
+ ], x = u ?? "last", S = !d && f;
33
+ return /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("button", {
34
+ ref: _,
35
+ type: "button",
36
+ "aria-label": `Sort options for ${c}`,
37
+ title: "Sort options. Shift-click the header to add this column to multi-sort.",
38
+ onClick: (e) => {
39
+ e.stopPropagation(), y((e) => !e);
40
+ },
41
+ style: {
42
+ display: "inline-flex",
43
+ alignItems: "center",
44
+ justifyContent: "center",
45
+ width: 16,
46
+ height: 16,
47
+ padding: 0,
48
+ background: "transparent",
49
+ border: "none",
50
+ color: "var(--text-3)",
51
+ cursor: "pointer",
52
+ opacity: v ? 1 : .55
53
+ },
54
+ children: /* @__PURE__ */ o(e.cheveron, { size: 12 })
55
+ }), /* @__PURE__ */ s(t, {
56
+ open: v,
57
+ anchor: _.current,
58
+ onClose: () => y(!1),
59
+ align: "start",
60
+ width: 240,
61
+ children: [
62
+ b.map((t) => {
63
+ let r = l === t.dir && x === t.nulls, i = t.icon;
64
+ return /* @__PURE__ */ o(n, {
65
+ icon: /* @__PURE__ */ s("span", {
66
+ style: {
67
+ display: "inline-flex",
68
+ alignItems: "center",
69
+ gap: 2
70
+ },
71
+ children: [/* @__PURE__ */ o(i, { size: 11 }), r ? /* @__PURE__ */ o(e.check, { size: 11 }) : null]
72
+ }),
73
+ onClick: () => {
74
+ y(!1), p(t.dir, t.nulls);
75
+ },
76
+ children: t.label
77
+ }, `${t.dir}:${t.nulls}`);
78
+ }),
79
+ S ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o(n, { divider: !0 }), /* @__PURE__ */ o(n, {
80
+ icon: /* @__PURE__ */ o(e.plus, { size: 11 }),
81
+ onClick: () => {
82
+ y(!1), m("asc", u);
83
+ },
84
+ children: "Add to multi-sort (Shift-click shortcut)"
85
+ })] }) : null,
86
+ /* @__PURE__ */ o(n, { divider: !0 }),
87
+ /* @__PURE__ */ o(n, {
88
+ disabled: l === !1,
89
+ onClick: () => {
90
+ y(!1), l !== !1 && h();
91
+ },
92
+ children: "Clear sort on this column"
93
+ }),
94
+ /* @__PURE__ */ o(n, { divider: !0 }),
95
+ /* @__PURE__ */ o(n, {
96
+ disabled: l === !1,
97
+ onClick: () => {
98
+ y(!1), g();
99
+ },
100
+ children: "Clear all sorts"
101
+ })
102
+ ]
103
+ })] });
104
+ }
105
+ //#endregion
106
+ export { c as SortHeaderMenu };