@declarion/react 0.48.2 → 0.49.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/Check-DAfMbQIw.js +38 -0
- package/dist-lib/{DraggableChildrenTable-p2ZSdwzj.js → DraggableChildrenTable-B98Md-Yq.js} +30 -30
- package/dist-lib/{Grid-CjLFAKMZ.js → Grid-BdtEd4R9.js} +2 -2
- package/dist-lib/{LayoutRenderer-DCscqXsv.js → LayoutRenderer-oVU3nEb5.js} +600 -597
- package/dist-lib/ListCardsBody-DYMt1H8l.js +287 -0
- package/dist-lib/{MarkdownRenderer-Sb7zcvj0.js → MarkdownRenderer-E9hbyoUn.js} +1 -1
- package/dist-lib/RefreshControl-B_2eW53M.js +430 -0
- package/dist-lib/{SmartDetailPage.impl-BAW-Tx_H.js → SmartDetailPage.impl-Dg22HOxb.js} +520 -515
- package/dist-lib/SmartListPage.impl-CPhhXT5S.js +2849 -0
- package/dist-lib/{SmartRecordListPage.impl-DtSSlGrI.js → SmartRecordListPage.impl-CF0UKgUj.js} +243 -240
- package/dist-lib/SortHeaderMenu-DodGvb7A.js +106 -0
- package/dist-lib/action-dispatch-CYOw7nkP.js +1984 -0
- package/dist-lib/api/batch.d.ts +5 -2
- package/dist-lib/api/data.d.ts +35 -4
- package/dist-lib/api/entities.d.ts +3 -3
- package/dist-lib/cardProjection-D-AufCh-.js +757 -0
- package/dist-lib/components/{shared → actions}/ObjectActionBar.d.ts +1 -1
- package/dist-lib/components/{shared → actions}/ResponsiveActionBar.d.ts +1 -1
- package/dist-lib/components/fields/cells/factories/date.d.ts +2 -0
- package/dist-lib/components/file-widgets/upload.d.ts +6 -1
- package/dist-lib/components/layout/Layout.d.ts +1 -1
- package/dist-lib/components/layout/TopBar.d.ts +1 -1
- package/dist-lib/components/pages/SmartListPage.d.ts +2 -12
- package/dist-lib/components/pages/SmartListPage.impl.d.ts +4 -0
- package/dist-lib/components/pages/list/ListCardRow.d.ts +40 -0
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +34 -0
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +1 -1
- package/dist-lib/components/pages/list/ListFooter.d.ts +26 -0
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -1
- package/dist-lib/components/pages/list/ListNoRows.d.ts +32 -0
- package/dist-lib/components/pages/list/ListTable.d.ts +34 -0
- package/dist-lib/components/pages/list/ListTableRow.d.ts +18 -0
- package/dist-lib/components/pages/list/ListToolbar.d.ts +43 -0
- package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +14 -0
- package/dist-lib/components/pages/list/page-size.d.ts +3 -0
- package/dist-lib/components/pages/list/sortable-header.d.ts +2 -0
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +37 -0
- package/dist-lib/components/pages/list/useListQuery.d.ts +66 -0
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +61 -0
- package/dist-lib/components/pages/list/useListSelection.d.ts +31 -0
- package/dist-lib/components/pages/list/useListSort.d.ts +45 -0
- package/dist-lib/components/pages/list/useListViews.d.ts +46 -0
- package/dist-lib/components/pages/list/useRowMenu.d.ts +1 -1
- package/dist-lib/components/shared/RefreshControl.d.ts +17 -4
- package/dist-lib/field-classification-DTgUnbzd.js +1134 -0
- package/dist-lib/format-count-DAHCcHZO.js +1551 -0
- package/dist-lib/hooks/useBrandingChrome.d.ts +17 -1
- package/dist-lib/hooks/useText.d.ts +3 -0
- package/dist-lib/hooks/useViews.d.ts +1 -1
- package/dist-lib/index.d.ts +17 -15
- package/dist-lib/index.js +1783 -6287
- package/dist-lib/lib/messages.d.ts +7 -1
- package/dist-lib/lib/rowClickGesture.d.ts +12 -0
- package/dist-lib/lib/timestamp.d.ts +8 -3
- package/dist-lib/peekDraftStore-CnxqkoWN.js +194 -0
- package/dist-lib/record-documents-key-DEFlLxnF.js +27 -0
- package/dist-lib/registry-WypUQQ7t.js +1768 -0
- package/dist-lib/testing.d.ts +17 -2
- package/dist-lib/testing.js +72 -58
- package/dist-lib/types/api.d.ts +54 -12
- package/dist-lib/types/schema.d.ts +22 -6
- package/dist-lib/{useCurrentScreen-BshVTPVq.js → useCurrentScreen-C5Oio-1G.js} +1125 -1068
- package/dist-lib/useListQuery-Dc2vbxqs.js +87 -0
- package/dist-lib/useProperties-C36ENFdY.js +81 -0
- package/dist-lib/{useProperties-DrHFr0A1.js → useTabSearchMirror-sIuYEFaq.js} +116 -194
- package/dist-lib/{value-B1O6QikE.js → value-igT4LsqW.js} +69 -69
- package/package.json +1 -1
- package/dist-lib/RefreshControl-Cnl9nE0x.js +0 -945
- package/dist-lib/registry-CCxnZW2b.js +0 -5281
- /package/dist-lib/components/{shared → actions}/ActionButton.d.ts +0 -0
- /package/dist-lib/components/{shared → actions}/ActionDialog.d.ts +0 -0
- /package/dist-lib/components/{shared → actions}/ActionResultDialog.d.ts +0 -0
- /package/dist-lib/components/{shared → actions}/ActionRunner.d.ts +0 -0
- /package/dist-lib/components/{mass-edit → actions}/PropertyGridEditor.d.ts +0 -0
- /package/dist-lib/components/{shared → actions}/RowActionsKebab.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/AssociationTabs.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/AuditMetaStrip.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/Breadcrumbs.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/HighlightsStrip.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/PageHeader.d.ts +0 -0
- /package/dist-lib/components/{shared → chrome}/RecordHeader.d.ts +0 -0
- /package/dist-lib/components/{shell → layout}/CommandPalette.d.ts +0 -0
- /package/dist-lib/components/{columns → list}/ColumnPicker.d.ts +0 -0
- /package/dist-lib/components/{views → list}/ViewSwitcher.d.ts +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { s as e } from "./DynamicIcon-Dc2j-rg_.js";
|
|
2
|
+
import { cr as t, er as n } from "./useCurrentScreen-C5Oio-1G.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 };
|