laif-ds 0.2.74 → 0.2.75
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/CHANGELOG.md +431 -0
- package/dist/agent-docs/adoption-report.json +614 -0
- package/dist/agent-docs/components/Accordion.md +46 -16
- package/dist/agent-docs/components/Alert.md +90 -95
- package/dist/agent-docs/components/AlertDialog.md +132 -126
- package/dist/agent-docs/components/AppEditor.md +90 -90
- package/dist/agent-docs/components/AppRadioGroup.md +18 -18
- package/dist/agent-docs/components/AppSidebar.md +129 -122
- package/dist/agent-docs/components/AppStepper.md +81 -77
- package/dist/agent-docs/components/AspectRatio.md +70 -62
- package/dist/agent-docs/components/AudioVisualizer.md +5 -5
- package/dist/agent-docs/components/Avatar.md +112 -113
- package/dist/agent-docs/components/Badge.md +123 -118
- package/dist/agent-docs/components/Breadcrumb.md +8 -1
- package/dist/agent-docs/components/Button.md +131 -129
- package/dist/agent-docs/components/Card.md +172 -147
- package/dist/agent-docs/components/Carousel.md +148 -129
- package/dist/agent-docs/components/Chat.md +121 -109
- package/dist/agent-docs/components/ChatMessage.md +72 -61
- package/dist/agent-docs/components/Checkbox.md +150 -135
- package/dist/agent-docs/components/CircularProgress.md +53 -49
- package/dist/agent-docs/components/CodeHighlighter.md +4 -4
- package/dist/agent-docs/components/Collapsible.md +114 -95
- package/dist/agent-docs/components/Command.md +141 -142
- package/dist/agent-docs/components/Confirmer.md +182 -175
- package/dist/agent-docs/components/ContextMenu.md +196 -191
- package/dist/agent-docs/components/DataCrossTable.md +114 -94
- package/dist/agent-docs/components/DataTable.md +29 -24
- package/dist/agent-docs/components/Dialog.md +130 -125
- package/dist/agent-docs/components/Drawer.md +141 -127
- package/dist/agent-docs/components/FilePreviewer.md +138 -139
- package/dist/agent-docs/components/FileUploader.md +143 -129
- package/dist/agent-docs/components/Form.md +3 -1
- package/dist/agent-docs/components/FormComposer.md +163 -137
- package/dist/agent-docs/components/GanttChart.md +125 -122
- package/dist/agent-docs/components/HoverCard.md +1 -1
- package/dist/agent-docs/components/Icon.md +98 -99
- package/dist/agent-docs/components/Input.md +173 -138
- package/dist/agent-docs/components/InputOtp.md +6 -1
- package/dist/agent-docs/components/InputSelector.md +94 -97
- package/dist/agent-docs/components/InterruptPrompt.md +4 -4
- package/dist/agent-docs/components/MarkdownRenderer.md +5 -2
- package/dist/agent-docs/components/Menubar.md +60 -57
- package/dist/agent-docs/components/MessageInput.md +134 -131
- package/dist/agent-docs/components/MessageList.md +110 -96
- package/dist/agent-docs/components/MultipleSelector.md +147 -146
- package/dist/agent-docs/components/NavigationMenu.md +6 -2
- package/dist/agent-docs/components/Popover.md +112 -103
- package/dist/agent-docs/components/PromptSuggestions.md +5 -5
- package/dist/agent-docs/components/RadioGroup.md +97 -90
- package/dist/agent-docs/components/Resizable.md +4 -1
- package/dist/agent-docs/components/ResizePrompt.md +12 -13
- package/dist/agent-docs/components/ScrollArea.md +6 -2
- package/dist/agent-docs/components/SecurePdfViewer.md +10 -6
- package/dist/agent-docs/components/Select.md +131 -132
- package/dist/agent-docs/components/Sheet.md +8 -1
- package/dist/agent-docs/components/ShikiHighlighter.md +5 -5
- package/dist/agent-docs/components/Sidebar.md +94 -85
- package/dist/agent-docs/components/Slider.md +62 -58
- package/dist/agent-docs/components/Sonner.md +1 -0
- package/dist/agent-docs/components/Spinner.md +14 -14
- package/dist/agent-docs/components/Stepper.md +93 -67
- package/dist/agent-docs/components/Switch.md +41 -42
- package/dist/agent-docs/components/TableSkeleton.md +8 -8
- package/dist/agent-docs/components/Tabs.md +106 -86
- package/dist/agent-docs/components/TextArea.md +51 -52
- package/dist/agent-docs/components/ThemeSwitcher.md +72 -69
- package/dist/agent-docs/components/Toaster.md +1 -0
- package/dist/agent-docs/components/Tooltip.md +102 -91
- package/dist/agent-docs/components/Typo.md +68 -65
- package/dist/agent-docs/components/WeeklyCalendar.md +63 -64
- package/dist/agent-docs/manifest.json +5979 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +6 -6
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +18 -18
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +10 -10
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +9 -9
- package/dist/components/ui/app-checkbox.js +1 -1
- package/dist/components/ui/app-dialog.js +70 -64
- package/dist/components/ui/app-editor.js +51 -51
- package/dist/components/ui/app-form.js +81 -81
- package/dist/components/ui/app-multiple-select-dropdown.js +36 -36
- package/dist/components/ui/app-select.js +109 -104
- package/dist/components/ui/app-sidebar.js +41 -41
- package/dist/components/ui/app-stepper.js +1 -1
- package/dist/components/ui/app-time-picker.js +18 -18
- package/dist/components/ui/app-tooltip.js +1 -1
- package/dist/components/ui/async-select.js +5 -5
- package/dist/components/ui/audio-visualizer.js +61 -58
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/carousel.js +2 -2
- package/dist/components/ui/chart.js +1 -1
- package/dist/components/ui/chat-message.js +8 -8
- package/dist/components/ui/chat.js +86 -88
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/date-picker.js +20 -20
- package/dist/components/ui/file-preview/index.js +13 -13
- package/dist/components/ui/file-previewer.js +12 -11
- package/dist/components/ui/form.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +56 -56
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +12 -12
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +4 -4
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/RepeteadBars/RepeteadBars.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Chart.js +23 -23
- package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +34 -34
- package/dist/components/ui/gantt/components/Controls/Controls.js +5 -5
- package/dist/components/ui/gantt/components/Gantt/Gantt.js +4 -4
- package/dist/components/ui/gantt/hooks/useGanttCalculate.js +25 -18
- package/dist/components/ui/input-selector.js +1 -1
- package/dist/components/ui/input.js +23 -23
- package/dist/components/ui/kanban.js +8 -9
- package/dist/components/ui/markdown-renderer.js +41 -35
- package/dist/components/ui/message-input.js +45 -44
- package/dist/components/ui/multiple-selector.js +91 -82
- package/dist/components/ui/secure-pdf-viewer.js +19 -7
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/spinner.js +4 -4
- package/dist/components/ui/stepper.js +157 -138
- package/dist/components/ui/tables/data-cross-table/data-cross-table-buttons.js +29 -29
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +258 -246
- package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +4 -1
- package/dist/components/ui/tables/data-table/components/data-table-body.js +204 -368
- package/dist/components/ui/tables/data-table/components/data-table-filter-inputs.js +114 -112
- package/dist/components/ui/tables/data-table/components/data-table-filters.js +116 -96
- package/dist/components/ui/tables/data-table/components/data-table-header.js +210 -0
- package/dist/components/ui/tables/data-table/components/data-table-searchbar.js +8 -8
- package/dist/components/ui/tables/data-table/components/data-table-skeleton-rows.js +33 -0
- package/dist/components/ui/tables/data-table/data-table.js +256 -250
- package/dist/components/ui/tables/data-table/data-table.service.js +112 -97
- package/dist/components/ui/tables/data-table/data-table.utils.js +2 -0
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/theme-switcher.js +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/weekly-calendar/appointment-card.js +16 -16
- package/dist/components/ui/weekly-calendar/calendar-context.js +6 -6
- package/dist/components/ui/weekly-calendar/calendar-header.js +12 -12
- package/dist/components/ui/weekly-calendar/day-column.js +16 -16
- package/dist/components/ui/weekly-calendar/time-column.js +4 -4
- package/dist/components/ui/weekly-calendar/weekly-calendar.js +4 -4
- package/dist/hooks/use-audio-recording.js +1 -1
- package/dist/hooks/use-auto-scroll.js +18 -18
- package/dist/hooks/use-autosize-textarea.js +12 -13
- package/dist/index.d.ts +67 -43
- package/dist/index.js +229 -229
- package/dist/lib/utils.js +6 -6
- package/dist/styles.v3.css +1 -1
- package/package.json +14 -4
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { getListMultiSelectFilterOptions as v, getListSingleSelectFilterOptions as D, getDateTimeFilterOptions as
|
|
3
|
-
import { defaultDataTableI18n as
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
switch (
|
|
2
|
+
import { getListMultiSelectFilterOptions as v, getListSingleSelectFilterOptions as D, getDateTimeFilterOptions as b, getDateFilterOptions as A, getBooleanFilterOptions as F, getNumberFilterOptions as k, getStringFilterOptions as x } from "./data-table-constants.js";
|
|
3
|
+
import { defaultDataTableI18n as d } from "./data-table-i18n.js";
|
|
4
|
+
function C(e, a = "string") {
|
|
5
|
+
const t = (s) => {
|
|
6
|
+
switch (s) {
|
|
7
7
|
case "string":
|
|
8
|
-
return
|
|
8
|
+
return x(d)?.[0]?.value ?? "like";
|
|
9
9
|
case "number":
|
|
10
|
-
return
|
|
10
|
+
return k(d)?.[0]?.value ?? "eq";
|
|
11
11
|
case "boolean":
|
|
12
|
-
return
|
|
12
|
+
return F(d)?.[0]?.value ?? "eq";
|
|
13
13
|
case "date":
|
|
14
|
-
return
|
|
14
|
+
return A(d)?.[0]?.value ?? "eq";
|
|
15
15
|
case "datetime":
|
|
16
|
-
return
|
|
16
|
+
return b(d)?.[0]?.value ?? "date_time_before";
|
|
17
17
|
case "list_single_select":
|
|
18
|
-
return D(
|
|
18
|
+
return D(d)?.[0]?.value ?? "array_overlap";
|
|
19
19
|
case "list_multi_select":
|
|
20
|
-
return v(
|
|
20
|
+
return v(d)?.[0]?.value ?? "array_overlap";
|
|
21
21
|
default:
|
|
22
22
|
return "eq";
|
|
23
23
|
}
|
|
@@ -27,14 +27,14 @@ function L(e, s = "string") {
|
|
|
27
27
|
columnId: e?.id || "",
|
|
28
28
|
columnLabel: e?.column.columnDef.meta?.headerLabel || (typeof e?.column.columnDef.header == "string" ? e.column.columnDef.header : "") || e?.id || "",
|
|
29
29
|
columnAccessorKey: (e?.column.columnDef && "accessorKey" in e.column.columnDef && typeof e.column.columnDef.accessorKey == "string" ? e.column.columnDef.accessorKey : e?.id) || "",
|
|
30
|
-
columnType: e?.column.columnDef.meta?.type ||
|
|
31
|
-
operator:
|
|
30
|
+
columnType: e?.column.columnDef.meta?.type || a,
|
|
31
|
+
operator: t(
|
|
32
32
|
e?.column.columnDef.meta?.type
|
|
33
33
|
),
|
|
34
34
|
listOptions: e?.column.columnDef.meta?.listOptions
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function L() {
|
|
38
38
|
const e = () => crypto.randomUUID();
|
|
39
39
|
return {
|
|
40
40
|
id: e(),
|
|
@@ -56,61 +56,61 @@ function O() {
|
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
|
-
function I(e,
|
|
60
|
-
const
|
|
59
|
+
function I(e, a) {
|
|
60
|
+
const t = e.filter((n) => n.operator === "eq_null" || n.operator === "n_eq_null" || n.operator === "checked" || n.operator === "unchecked" ? !0 : n.value === void 0 || n.value === "" ? !1 : n.columnType === "list_multi_select" ? (Array.isArray(n.value) ? n.value.filter((i) => i !== void 0) : [n.value].filter((i) => i !== void 0)).length > 0 : !0), o = a ? ((n) => {
|
|
61
61
|
const p = (i) => {
|
|
62
|
-
const
|
|
63
|
-
[
|
|
64
|
-
operator:
|
|
65
|
-
value:
|
|
62
|
+
const g = i.conditions.filter((u) => !u.columnId || !u.operator ? !1 : u.operator === "eq_null" || u.operator === "n_eq_null" || u.operator === "checked" || u.operator === "unchecked" ? !0 : u.value === void 0 ? !1 : u.columnType === "list_multi_select" ? (Array.isArray(u.value) ? u.value.filter((_) => _ !== void 0) : [u.value].filter((_) => _ !== void 0)).length > 0 : !0).map((u) => ({
|
|
63
|
+
[u.columnAccessorKey]: {
|
|
64
|
+
operator: u.operator,
|
|
65
|
+
value: u.operator === "eq_null" || u.operator === "n_eq_null" || u.operator === "checked" || u.operator === "unchecked" ? !0 : u.columnType === "list_single_select" ? Array.isArray(u.value) ? u.value.filter((f) => f !== void 0) : [u.value].filter((f) => f !== void 0) : u.value
|
|
66
66
|
}
|
|
67
|
-
})),
|
|
68
|
-
...
|
|
69
|
-
...
|
|
67
|
+
})), y = i.groups?.map(p).filter(Boolean) || [], m = [
|
|
68
|
+
...g,
|
|
69
|
+
...y
|
|
70
70
|
];
|
|
71
|
-
return
|
|
71
|
+
return m.length === 0 ? null : m.length === 1 ? m[0] : i.logicalOperator === "AND" ? { _and: m } : { _or: m };
|
|
72
72
|
};
|
|
73
73
|
return p(n.rootGroup);
|
|
74
|
-
})(
|
|
74
|
+
})(a) : null, c = t.map(
|
|
75
75
|
(n) => ({
|
|
76
76
|
[n.columnAccessorKey]: {
|
|
77
77
|
operator: n.operator,
|
|
78
78
|
value: n.operator === "eq_null" || n.operator === "n_eq_null" || n.operator === "checked" || n.operator === "unchecked" ? !0 : n.columnType === "list_single_select" ? Array.isArray(n.value) ? n.value.filter((p) => p !== void 0) : [n.value].filter((p) => p !== void 0) : n.value ?? ""
|
|
79
79
|
}
|
|
80
80
|
})
|
|
81
|
-
),
|
|
82
|
-
...
|
|
81
|
+
), r = [
|
|
82
|
+
...o ? [o] : [],
|
|
83
83
|
...c
|
|
84
84
|
];
|
|
85
|
-
return
|
|
85
|
+
return r.length > 0 ? r.length === 1 ? r[0] : { _and: r } : {};
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function O(e, a) {
|
|
88
88
|
const {
|
|
89
|
-
rowHeight:
|
|
90
|
-
headerHeight:
|
|
91
|
-
containerHeight:
|
|
89
|
+
rowHeight: t = 1,
|
|
90
|
+
headerHeight: s = 1,
|
|
91
|
+
containerHeight: o = 1,
|
|
92
92
|
onPageChange: c,
|
|
93
|
-
setPagination:
|
|
94
|
-
} =
|
|
95
|
-
(l -
|
|
93
|
+
setPagination: r
|
|
94
|
+
} = a, l = e?.offsetHeight || o, n = Math.floor(
|
|
95
|
+
(l - s) / t
|
|
96
96
|
), p = n > 1 ? n : 1;
|
|
97
|
-
|
|
97
|
+
r((i) => {
|
|
98
98
|
if (i.pageSize !== p) {
|
|
99
99
|
if (c) {
|
|
100
|
-
const
|
|
100
|
+
const g = Math.max(
|
|
101
101
|
0,
|
|
102
102
|
Math.ceil(i.pageSize * (i.pageIndex + 1) / p) - 1
|
|
103
|
-
),
|
|
104
|
-
c(
|
|
103
|
+
), y = Math.min(i.pageIndex, g);
|
|
104
|
+
c(y, p);
|
|
105
105
|
}
|
|
106
106
|
return { ...i, pageSize: p };
|
|
107
107
|
}
|
|
108
108
|
return i;
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function T(e, a, t) {
|
|
112
112
|
if (e == null)
|
|
113
|
-
switch (
|
|
113
|
+
switch (a) {
|
|
114
114
|
case "eq_null":
|
|
115
115
|
return !0;
|
|
116
116
|
case "n_eq_null":
|
|
@@ -118,42 +118,42 @@ function q(e, s, r) {
|
|
|
118
118
|
default:
|
|
119
119
|
return !1;
|
|
120
120
|
}
|
|
121
|
-
const
|
|
122
|
-
switch (
|
|
121
|
+
const s = (r) => r == null || typeof r == "string" ? r : String(r), o = s(e), c = s(t);
|
|
122
|
+
switch (a) {
|
|
123
123
|
case "eq":
|
|
124
|
-
return
|
|
124
|
+
return o === c;
|
|
125
125
|
case "ne":
|
|
126
|
-
return
|
|
126
|
+
return o !== c;
|
|
127
127
|
case "lt":
|
|
128
|
-
return typeof e == "number" && typeof
|
|
128
|
+
return typeof e == "number" && typeof t == "number" ? e < t : o < c;
|
|
129
129
|
case "le":
|
|
130
|
-
return typeof e == "number" && typeof
|
|
130
|
+
return typeof e == "number" && typeof t == "number" ? e <= t : o <= c;
|
|
131
131
|
case "gt":
|
|
132
|
-
return typeof e == "number" && typeof
|
|
132
|
+
return typeof e == "number" && typeof t == "number" ? e > t : o > c;
|
|
133
133
|
case "ge":
|
|
134
|
-
return typeof e == "number" && typeof
|
|
134
|
+
return typeof e == "number" && typeof t == "number" ? e >= t : o >= c;
|
|
135
135
|
case "like":
|
|
136
|
-
return
|
|
136
|
+
return o?.toLowerCase().includes(c?.toLowerCase());
|
|
137
137
|
case "n_like":
|
|
138
|
-
return !
|
|
138
|
+
return !o?.toLowerCase().includes(c?.toLowerCase());
|
|
139
139
|
case "starts_with":
|
|
140
|
-
return
|
|
140
|
+
return o?.toLowerCase().startsWith(c?.toLowerCase());
|
|
141
141
|
case "ends_with":
|
|
142
|
-
return
|
|
142
|
+
return o?.toLowerCase().endsWith(c?.toLowerCase());
|
|
143
143
|
case "eq_null":
|
|
144
144
|
return e == null || e === "";
|
|
145
145
|
case "n_eq_null":
|
|
146
146
|
return e != null && e !== "";
|
|
147
147
|
case "array_overlap":
|
|
148
|
-
return Array.isArray(e) && Array.isArray(
|
|
149
|
-
(
|
|
150
|
-
(l) =>
|
|
148
|
+
return Array.isArray(e) && Array.isArray(t) ? t.length === 0 ? !0 : e.length === 0 ? !1 : t.some(
|
|
149
|
+
(r) => e.some(
|
|
150
|
+
(l) => s(l) === s(r)
|
|
151
151
|
)
|
|
152
152
|
) : !1;
|
|
153
153
|
case "n_array_overlap":
|
|
154
|
-
return Array.isArray(e) && Array.isArray(
|
|
155
|
-
(
|
|
156
|
-
(l) =>
|
|
154
|
+
return Array.isArray(e) && Array.isArray(t) ? t.length === 0 || e.length === 0 ? !0 : !t.some(
|
|
155
|
+
(r) => e.some(
|
|
156
|
+
(l) => s(l) === s(r)
|
|
157
157
|
)
|
|
158
158
|
) : !0;
|
|
159
159
|
case "checked":
|
|
@@ -162,67 +162,67 @@ function q(e, s, r) {
|
|
|
162
162
|
return e === !1;
|
|
163
163
|
case "date_before":
|
|
164
164
|
try {
|
|
165
|
-
const
|
|
166
|
-
return
|
|
165
|
+
const r = new Date(e), l = new Date(t);
|
|
166
|
+
return r.setHours(0, 0, 0, 0), l.setHours(0, 0, 0, 0), r < l;
|
|
167
167
|
} catch {
|
|
168
168
|
return !1;
|
|
169
169
|
}
|
|
170
170
|
case "date_after":
|
|
171
171
|
try {
|
|
172
|
-
const
|
|
173
|
-
return
|
|
172
|
+
const r = new Date(e), l = new Date(t);
|
|
173
|
+
return r.setHours(0, 0, 0, 0), l.setHours(0, 0, 0, 0), r > l;
|
|
174
174
|
} catch {
|
|
175
175
|
return !1;
|
|
176
176
|
}
|
|
177
177
|
case "date_time_before":
|
|
178
178
|
try {
|
|
179
|
-
const
|
|
180
|
-
return
|
|
179
|
+
const r = new Date(e), l = new Date(t);
|
|
180
|
+
return r < l;
|
|
181
181
|
} catch {
|
|
182
182
|
return !1;
|
|
183
183
|
}
|
|
184
184
|
case "date_time_after":
|
|
185
185
|
try {
|
|
186
|
-
const
|
|
187
|
-
return
|
|
186
|
+
const r = new Date(e), l = new Date(t);
|
|
187
|
+
return r > l;
|
|
188
188
|
} catch {
|
|
189
189
|
return !1;
|
|
190
190
|
}
|
|
191
191
|
default:
|
|
192
|
-
return console.warn(`Unknown filter operator: ${
|
|
192
|
+
return console.warn(`Unknown filter operator: ${a}`), !0;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
function h(e,
|
|
196
|
-
if (!
|
|
195
|
+
function h(e, a) {
|
|
196
|
+
if (!a || Object.keys(a).length === 0)
|
|
197
197
|
return !0;
|
|
198
|
-
if ("_and" in
|
|
199
|
-
return
|
|
200
|
-
(
|
|
198
|
+
if ("_and" in a && Array.isArray(a._and))
|
|
199
|
+
return a._and.every(
|
|
200
|
+
(t) => h(e, t)
|
|
201
201
|
);
|
|
202
|
-
if ("_or" in
|
|
203
|
-
return
|
|
204
|
-
(
|
|
202
|
+
if ("_or" in a && Array.isArray(a._or))
|
|
203
|
+
return a._or.some(
|
|
204
|
+
(t) => h(e, t)
|
|
205
205
|
);
|
|
206
|
-
for (const [
|
|
207
|
-
if (!
|
|
208
|
-
const
|
|
209
|
-
if (!
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
206
|
+
for (const [t, s] of Object.entries(a))
|
|
207
|
+
if (!t.startsWith("_") && typeof s == "object" && s !== null && "operator" in s) {
|
|
208
|
+
const o = e.getValue(t);
|
|
209
|
+
if (!T(
|
|
210
|
+
o,
|
|
211
|
+
s.operator,
|
|
212
|
+
s.value
|
|
213
213
|
)) return !1;
|
|
214
214
|
}
|
|
215
215
|
return !0;
|
|
216
216
|
}
|
|
217
|
-
function
|
|
218
|
-
let
|
|
219
|
-
return function(...
|
|
220
|
-
clearTimeout(
|
|
221
|
-
e(...
|
|
222
|
-
},
|
|
217
|
+
function z(e, a) {
|
|
218
|
+
let t;
|
|
219
|
+
return function(...s) {
|
|
220
|
+
clearTimeout(t), t = setTimeout(() => {
|
|
221
|
+
e(...s);
|
|
222
|
+
}, a);
|
|
223
223
|
};
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function H(e) {
|
|
226
226
|
switch (e) {
|
|
227
227
|
case "string":
|
|
228
228
|
return "CaseUpper";
|
|
@@ -244,13 +244,28 @@ function M(e) {
|
|
|
244
244
|
return "FileQuestionMark";
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
+
function K(e, a, t, s) {
|
|
248
|
+
const o = a[e];
|
|
249
|
+
if (!o || !t || o.side !== t) return;
|
|
250
|
+
const c = o.side === "left" ? `${o.offset}px` : void 0, r = o.side === "right" ? `${o.offset}px` : void 0;
|
|
251
|
+
return {
|
|
252
|
+
position: "sticky",
|
|
253
|
+
left: c,
|
|
254
|
+
right: r,
|
|
255
|
+
zIndex: s ? 49 : 48,
|
|
256
|
+
background: "var(--d-background)",
|
|
257
|
+
// Use separate shadow for pinned columns to avoid conflicts
|
|
258
|
+
boxShadow: t === "left" ? `inset -1px ${s ? "0" : "-1px"} 0 var(--d-border), 2px 0 4px -2px rgba(0,0,0,0.1)` : `inset 1px ${s ? "0" : "-1px"} 0 var(--d-border), -2px 0 4px -2px rgba(0,0,0,0.1)`
|
|
259
|
+
};
|
|
260
|
+
}
|
|
247
261
|
export {
|
|
248
|
-
|
|
262
|
+
T as applyClientSideFilter,
|
|
249
263
|
h as applySearchFilterToRow,
|
|
250
264
|
I as buildSearchFilter,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
265
|
+
C as createBadgeFilterFromHeader,
|
|
266
|
+
L as createDefaultAdvancedFilter,
|
|
267
|
+
z as debounce,
|
|
268
|
+
H as getIconFromColumnType,
|
|
269
|
+
K as getPinnedStyle,
|
|
270
|
+
O as updatePageSizeFromContainer
|
|
256
271
|
};
|
|
@@ -228,6 +228,7 @@ function $(e, t, r) {
|
|
|
228
228
|
return {
|
|
229
229
|
...a,
|
|
230
230
|
meta: {
|
|
231
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
231
232
|
...a.meta,
|
|
232
233
|
listOptions: n
|
|
233
234
|
}
|
|
@@ -242,6 +243,7 @@ function M(e, t) {
|
|
|
242
243
|
return l ? {
|
|
243
244
|
...r,
|
|
244
245
|
meta: {
|
|
246
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
245
247
|
...r.meta,
|
|
246
248
|
pinned: l
|
|
247
249
|
}
|
|
@@ -25,8 +25,8 @@ function h({
|
|
|
25
25
|
e.text.base,
|
|
26
26
|
e.text.placeholder,
|
|
27
27
|
e.interaction.disabled,
|
|
28
|
-
"flex min-h-16 w-full
|
|
29
|
-
"
|
|
28
|
+
"flex min-h-16 w-full max-w-full min-w-0 px-3 py-2 shadow-xs transition-[color,box-shadow] outline-none md:text-sm",
|
|
29
|
+
"overflow-x-hidden break-words whitespace-pre-wrap",
|
|
30
30
|
// Focus states
|
|
31
31
|
"focus-visible:ring-d-ring/50 focus-visible:border-d-ring focus-visible:ring-[3px]",
|
|
32
32
|
e.input.invalid,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as h } from "react/jsx-runtime";
|
|
3
|
-
import { cn as r } from "../../lib/utils.js";
|
|
4
3
|
import { useControllableState as p } from "../../node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
|
|
5
4
|
import { useState as b, useEffect as g } from "react";
|
|
5
|
+
import { cn as r } from "../../lib/utils.js";
|
|
6
6
|
import v from "../../node_modules/lucide-react/dist/esm/icons/monitor.js";
|
|
7
7
|
import x from "../../node_modules/lucide-react/dist/esm/icons/sun.js";
|
|
8
8
|
import y from "../../node_modules/lucide-react/dist/esm/icons/moon.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import * as d from "react";
|
|
4
3
|
import { Root as u, Item as m } from "../../node_modules/@radix-ui/react-toggle-group/dist/index.js";
|
|
5
|
-
import
|
|
4
|
+
import * as d from "react";
|
|
6
5
|
import { toggleVariants as g } from "./toggle.js";
|
|
6
|
+
import { cn as s } from "../../lib/utils.js";
|
|
7
7
|
const l = d.createContext({
|
|
8
8
|
size: "default",
|
|
9
9
|
variant: "default"
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as l, jsxs as s } from "react/jsx-runtime";
|
|
3
|
-
import { useMemo as n } from "react";
|
|
4
3
|
import c from "../../../_virtual/dayjs.min.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { hexContrast as
|
|
8
|
-
import { TooltipProvider as
|
|
9
|
-
import { Typo as
|
|
4
|
+
import { l as n } from "../../../_virtual/lodash.js";
|
|
5
|
+
import { useMemo as m } from "react";
|
|
6
|
+
import { hexContrast as b, hexToRgba as u, cn as v } from "../../../lib/utils.js";
|
|
7
|
+
import { TooltipProvider as g, Tooltip as T, TooltipTrigger as N, TooltipContent as y } from "../tooltip.js";
|
|
8
|
+
import { Typo as C } from "../typo.js";
|
|
9
|
+
import { useCalendar as k } from "./calendar-context.js";
|
|
10
10
|
const H = ({ appointment: e }) => {
|
|
11
|
-
const { setSelectedAppointmentId: h } =
|
|
11
|
+
const { setSelectedAppointmentId: h } = k(), f = m(() => {
|
|
12
12
|
if (e.color)
|
|
13
13
|
return {
|
|
14
14
|
backgroundColor: u(e.color, 0.75),
|
|
15
15
|
borderColor: u(e.color, 1),
|
|
16
|
-
color:
|
|
16
|
+
color: b(e.color),
|
|
17
17
|
backdropFilter: "blur(5px)"
|
|
18
18
|
};
|
|
19
|
-
}, [e.color]), o = e.endTime || c(`2000-01-01 ${e.startTime}`).add(1, "hour").format("HH:mm"), x =
|
|
19
|
+
}, [e.color]), o = e.endTime || c(`2000-01-01 ${e.startTime}`).add(1, "hour").format("HH:mm"), x = m(() => {
|
|
20
20
|
const r = c(`2000-01-01 ${e.startTime}`), a = c(`2000-01-01 ${o}`).diff(r, "minute"), i = Math.floor(a / 60), d = a % 60;
|
|
21
21
|
return i === 0 ? `${d}m` : d === 0 ? `${i}h` : `${i}h ${d}m`;
|
|
22
22
|
}, [e.startTime, o]);
|
|
23
|
-
return /* @__PURE__ */ l(
|
|
24
|
-
/* @__PURE__ */ l(
|
|
23
|
+
return /* @__PURE__ */ l(g, { delayDuration: 300, children: /* @__PURE__ */ s(T, { children: [
|
|
24
|
+
/* @__PURE__ */ l(N, { asChild: !0, children: /* @__PURE__ */ s(
|
|
25
25
|
"div",
|
|
26
26
|
{
|
|
27
27
|
onClick: (r) => {
|
|
28
28
|
r.preventDefault(), r.stopPropagation(), h(e.id);
|
|
29
29
|
},
|
|
30
30
|
style: f,
|
|
31
|
-
className:
|
|
31
|
+
className: v(
|
|
32
32
|
"border-d-border flex h-full cursor-pointer flex-col justify-start rounded-r-md border border-l-4 p-2 shadow-md transition-all duration-200 ease-in-out hover:scale-105",
|
|
33
33
|
e.className
|
|
34
34
|
),
|
|
@@ -55,8 +55,8 @@ const H = ({ appointment: e }) => {
|
|
|
55
55
|
]
|
|
56
56
|
}
|
|
57
57
|
) }),
|
|
58
|
-
/* @__PURE__ */ s(
|
|
59
|
-
e?.title && /* @__PURE__ */ s(
|
|
58
|
+
/* @__PURE__ */ s(y, { side: "right", variant: "card", children: [
|
|
59
|
+
e?.title && /* @__PURE__ */ s(C, { children: [
|
|
60
60
|
e?.title,
|
|
61
61
|
" (",
|
|
62
62
|
x,
|
|
@@ -77,10 +77,10 @@ const H = ({ appointment: e }) => {
|
|
|
77
77
|
className: "flex items-start justify-between gap-4 py-1 text-right",
|
|
78
78
|
children: [
|
|
79
79
|
/* @__PURE__ */ s("span", { className: "font-medium", children: [
|
|
80
|
-
|
|
80
|
+
n.upperFirst(r.key),
|
|
81
81
|
":"
|
|
82
82
|
] }),
|
|
83
|
-
/* @__PURE__ */ l("span", { className: "text-d-accent-foreground max-w-[200px]", children: typeof r.value == "string" ?
|
|
83
|
+
/* @__PURE__ */ l("span", { className: "text-d-accent-foreground max-w-[200px]", children: typeof r.value == "string" ? n.upperFirst(r.value) : r.value })
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
t
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as i } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
4
|
-
import C from "
|
|
5
|
-
const r =
|
|
3
|
+
import u from "../../../_virtual/dayjs.min.js";
|
|
4
|
+
import { useState as t, useEffect as c, createContext as m, useContext as C } from "react";
|
|
5
|
+
const r = m(
|
|
6
6
|
void 0
|
|
7
7
|
), x = () => {
|
|
8
|
-
const e =
|
|
8
|
+
const e = C(r);
|
|
9
9
|
if (!e)
|
|
10
10
|
throw new Error("useCalendar must be used within a CalendarProvider");
|
|
11
11
|
return e;
|
|
12
12
|
}, I = ({ children: e, value: n }) => {
|
|
13
13
|
const [o, s] = t(null), [a, l] = t(null);
|
|
14
|
-
return
|
|
14
|
+
return c(() => {
|
|
15
15
|
const d = setInterval(() => {
|
|
16
|
-
l(
|
|
16
|
+
l(u().format("HH:mm"));
|
|
17
17
|
}, 1e3);
|
|
18
18
|
return () => clearInterval(d);
|
|
19
19
|
}, []), /* @__PURE__ */ i(
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
|
3
|
-
import d from "../../../_virtual/dayjs.min.js";
|
|
4
3
|
import "../../../_virtual/it.js";
|
|
5
|
-
import
|
|
6
|
-
import { l as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import d from "../../../_virtual/dayjs.min.js";
|
|
5
|
+
import { l as h } from "../../../_virtual/lodash.js";
|
|
6
|
+
import { Button as g } from "../button.js";
|
|
7
|
+
import { Icon as a } from "../icon.js";
|
|
8
|
+
import { Typo as s } from "../typo.js";
|
|
9
|
+
import { useCalendar as v } from "./calendar-context.js";
|
|
10
10
|
d.locale("it");
|
|
11
11
|
const O = () => {
|
|
12
12
|
const {
|
|
@@ -17,11 +17,11 @@ const O = () => {
|
|
|
17
17
|
goToPreviousWeek: c,
|
|
18
18
|
goToNextWeek: m,
|
|
19
19
|
goToCurrentWeek: f
|
|
20
|
-
} =
|
|
20
|
+
} = v(), o = d().startOf("isoWeek").add(n, "week"), p = o.endOf("isoWeek"), u = n === 0;
|
|
21
21
|
return !i && !t ? null : /* @__PURE__ */ e("div", { className: "border-d-border bg-d-card border-t border-r border-l px-4 py-2", children: i && /* @__PURE__ */ r("div", { className: "flex flex-wrap items-center justify-between gap-4", children: [
|
|
22
22
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
23
23
|
/* @__PURE__ */ e(
|
|
24
|
-
|
|
24
|
+
g,
|
|
25
25
|
{
|
|
26
26
|
onClick: f,
|
|
27
27
|
variant: "ghost",
|
|
@@ -31,12 +31,12 @@ const O = () => {
|
|
|
31
31
|
children: l
|
|
32
32
|
}
|
|
33
33
|
),
|
|
34
|
-
/* @__PURE__ */ e("div", { className: "hover:bg-d-accent cursor-pointer rounded-full p-2", children: /* @__PURE__ */ e(
|
|
35
|
-
/* @__PURE__ */ e("div", { className: "hover:bg-d-accent cursor-pointer rounded-full p-2", children: /* @__PURE__ */ e(
|
|
34
|
+
/* @__PURE__ */ e("div", { className: "hover:bg-d-accent cursor-pointer rounded-full p-2", children: /* @__PURE__ */ e(a, { onClick: c, name: "ChevronLeft" }) }),
|
|
35
|
+
/* @__PURE__ */ e("div", { className: "hover:bg-d-accent cursor-pointer rounded-full p-2", children: /* @__PURE__ */ e(a, { onClick: m, name: "ChevronRight" }) })
|
|
36
36
|
] }),
|
|
37
37
|
/* @__PURE__ */ r("div", { className: "flex flex-col items-center py-2 text-center leading-tight", children: [
|
|
38
|
-
/* @__PURE__ */ e(
|
|
39
|
-
/* @__PURE__ */ r(
|
|
38
|
+
/* @__PURE__ */ e(s, { variant: "h5", children: h.upperFirst(o.format("MMMM YYYY")) }),
|
|
39
|
+
/* @__PURE__ */ r(s, { variant: "small", className: "text-d-muted-foreground", children: [
|
|
40
40
|
o.format("D"),
|
|
41
41
|
" – ",
|
|
42
42
|
p.format("D MMM")
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
3
|
-
import A from "react";
|
|
4
3
|
import N from "../../../_virtual/dayjs.min.js";
|
|
5
|
-
import
|
|
6
|
-
import { AppointmentCard as W } from "./appointment-card.js";
|
|
7
|
-
import { Typo as g } from "../typo.js";
|
|
8
|
-
import { Badge as n } from "../badge.js";
|
|
4
|
+
import A from "react";
|
|
9
5
|
import { cn as m } from "../../../lib/utils.js";
|
|
10
|
-
import {
|
|
6
|
+
import { Badge as n } from "../badge.js";
|
|
7
|
+
import { Tooltip as g, TooltipTrigger as M, TooltipContent as T } from "../tooltip.js";
|
|
8
|
+
import { Typo as w } from "../typo.js";
|
|
9
|
+
import { AppointmentCard as I } from "./appointment-card.js";
|
|
10
|
+
import { useCalendar as W } from "./calendar-context.js";
|
|
11
11
|
const F = ({ date: d, weekdayInfo: h }) => {
|
|
12
12
|
const {
|
|
13
13
|
calendarStartHour: l,
|
|
@@ -15,7 +15,7 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
15
15
|
enableGrouping: f,
|
|
16
16
|
appointmentsByDay: j,
|
|
17
17
|
groupedAppointmentsByDay: D
|
|
18
|
-
} =
|
|
18
|
+
} = W(), O = A.useMemo(() => Array.from(
|
|
19
19
|
{ length: p - l + 1 },
|
|
20
20
|
(e, a) => `${(a + l).toString().padStart(2, "0")}:00`
|
|
21
21
|
), [l, p]), u = d.format("YYYY-MM-DD"), o = f ? D[u] || {} : { default: j[u] || [] }, s = d.isSame(N(), "day"), t = Object.keys(o), c = t.length > 1, b = (e) => {
|
|
@@ -29,7 +29,7 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
29
29
|
height: `${k}px`,
|
|
30
30
|
zIndex: 10
|
|
31
31
|
},
|
|
32
|
-
children: /* @__PURE__ */ r(
|
|
32
|
+
children: /* @__PURE__ */ r(I, { appointment: e })
|
|
33
33
|
},
|
|
34
34
|
e.id
|
|
35
35
|
);
|
|
@@ -53,7 +53,7 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
53
53
|
),
|
|
54
54
|
children: /* @__PURE__ */ i("div", { className: "flex flex-col items-start justify-center gap-0", children: [
|
|
55
55
|
/* @__PURE__ */ r(
|
|
56
|
-
|
|
56
|
+
w,
|
|
57
57
|
{
|
|
58
58
|
variant: "h5",
|
|
59
59
|
className: m("mb-0", s ? "text-d-primary" : ""),
|
|
@@ -61,7 +61,7 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
61
61
|
}
|
|
62
62
|
),
|
|
63
63
|
/* @__PURE__ */ r(
|
|
64
|
-
|
|
64
|
+
w,
|
|
65
65
|
{
|
|
66
66
|
variant: "small",
|
|
67
67
|
className: m(
|
|
@@ -79,8 +79,8 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
79
79
|
{
|
|
80
80
|
className: "border-d-border flex flex-1 items-center justify-center border-r px-2 py-1.5 last:border-r-0",
|
|
81
81
|
style: { minWidth: "120px" },
|
|
82
|
-
children: e.length > 10 ? /* @__PURE__ */ i(
|
|
83
|
-
/* @__PURE__ */ r(
|
|
82
|
+
children: e.length > 10 ? /* @__PURE__ */ i(g, { children: [
|
|
83
|
+
/* @__PURE__ */ r(M, { asChild: !0, children: /* @__PURE__ */ r(
|
|
84
84
|
n,
|
|
85
85
|
{
|
|
86
86
|
variant: s ? "outline-primary" : "outline",
|
|
@@ -89,7 +89,7 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
89
89
|
}
|
|
90
90
|
) }),
|
|
91
91
|
/* @__PURE__ */ r(
|
|
92
|
-
|
|
92
|
+
T,
|
|
93
93
|
{
|
|
94
94
|
sideOffset: 4,
|
|
95
95
|
className: "max-w-xs text-center break-words",
|
|
@@ -106,8 +106,8 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
106
106
|
)
|
|
107
107
|
},
|
|
108
108
|
e
|
|
109
|
-
)) : /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center px-2 py-1.5", children: t[0].length > 15 ? /* @__PURE__ */ i(
|
|
110
|
-
/* @__PURE__ */ r(
|
|
109
|
+
)) : /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center px-2 py-1.5", children: t[0].length > 15 ? /* @__PURE__ */ i(g, { children: [
|
|
110
|
+
/* @__PURE__ */ r(M, { asChild: !0, children: /* @__PURE__ */ r(
|
|
111
111
|
n,
|
|
112
112
|
{
|
|
113
113
|
variant: s ? "outline-primary" : "outline",
|
|
@@ -116,7 +116,7 @@ const F = ({ date: d, weekdayInfo: h }) => {
|
|
|
116
116
|
}
|
|
117
117
|
) }),
|
|
118
118
|
/* @__PURE__ */ r(
|
|
119
|
-
|
|
119
|
+
T,
|
|
120
120
|
{
|
|
121
121
|
sideOffset: 4,
|
|
122
122
|
className: "max-w-xs text-center break-words",
|