@revolist/ui 4.0.1-rc → 4.0.3-rc
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/LICENSE +21 -0
- package/README.md +345 -262
- package/_chunks/calendar-xpZ0v3xf.js +258 -0
- package/_chunks/chart-frame-Cmc7xU1i.js +130 -0
- package/_chunks/choice-chips-CHQTUdLs.js +110 -0
- package/_chunks/clock-BOhPNlW3.js +4 -0
- package/_chunks/{color-palette-BmZ7kH9R.js → color-palette-D8vyPfld.js} +41 -41
- package/_chunks/color-picker-CudqPYZo.js +138 -0
- package/_chunks/component-C_T2VN5u.js +863 -0
- package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BMOOmqx5.js} +0 -4
- package/_chunks/control-AHKXD5Eu.js +93 -0
- package/_chunks/{control-tooltip-BCNzQCXE.js → control-tooltip-uscKfAnV.js} +29 -29
- package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
- package/_chunks/{controls-NEL5tDaz.js → controls-DsNi8V8I.js} +229 -214
- package/_chunks/{date-control-CYCkb1aQ.js → date-control-DrVFX13g.js} +21 -21
- package/_chunks/date-time-qIhp5vaX.js +768 -0
- package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-CW9vjLnk.js} +7 -7
- package/_chunks/dialog.parts-CKGkC5zP.js +134 -0
- package/_chunks/duration-CL68Em0o.js +272 -0
- package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
- package/_chunks/{editor-popup-B7fu_A_T.js → editor-popup-WDdtVDNA.js} +8 -8
- package/_chunks/field-context-D57PnBbH.js +5 -0
- package/_chunks/framework-mount--RTLIqE-.js +54 -0
- package/_chunks/history-controls-B3u3INEK.js +27 -0
- package/_chunks/hooks.module-CG3gN83z.js +157 -0
- package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
- package/_chunks/mount-DQ1cpppK.js +257 -0
- package/_chunks/native-control-C_yok8_-.js +605 -0
- package/_chunks/native.view-ByyZ1CT5.js +32 -0
- package/_chunks/{number-input-NnH57J4j.js → number-input-BKwA5FnM.js} +89 -89
- package/_chunks/picker-h1P5RUgp.js +122 -0
- package/_chunks/popup-CT2uD3go.js +367 -0
- package/_chunks/preact.module-BBM36DnO.js +290 -0
- package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-DZgmaic0.js} +10 -10
- package/_chunks/render-m5eMMwFR.js +83 -0
- package/_chunks/reorder-list-CSlqAGHw.js +59 -0
- package/_chunks/request-trail-DSlFix6i.js +618 -0
- package/_chunks/rich-text-CH7gIqOS.js +636 -0
- package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
- package/_form.scss +1 -1
- package/_vendor/preact/LICENSE +21 -0
- package/_vendor/preact/compat/src/index.d.ts +353 -0
- package/_vendor/preact/compat/src/suspense-list.d.ts +16 -0
- package/_vendor/preact/compat/src/suspense.d.ts +19 -0
- package/_vendor/preact/hooks/src/index.d.ts +145 -0
- package/_vendor/preact/src/dom.d.ts +2548 -0
- package/_vendor/preact/src/index.d.ts +373 -0
- package/_vendor/preact/src/jsx.d.ts +2958 -0
- package/activity-message.d.ts +1 -1
- package/activity-message.js +16 -16
- package/ai/_chat.scss +195 -0
- package/ai/_style.scss +105 -34
- package/ai/chat.d.ts +63 -0
- package/ai/components.d.ts +20 -4
- package/ai/index.d.ts +2 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +30 -1
- package/ai/prompt-history.d.ts +13 -0
- package/ai/request-trail.d.ts +1 -1
- package/ai/transcript.d.ts +25 -0
- package/ai/translation-context.d.ts +1 -1
- package/ai/translations.d.ts +1 -1
- package/alert.d.ts +2 -2
- package/angular/angular.js +0 -3
- package/assignee/field.d.ts +2 -2
- package/assignee/index.js +86 -87
- package/assignee/layout.d.ts +2 -2
- package/assignee/picker.d.ts +1 -1
- package/avatar/index.js +25 -25
- package/avatar/index.view.d.ts +1 -1
- package/brush-range/component.d.ts +1 -1
- package/brush-range/component.js +30 -30
- package/buttons/delete-button.d.ts +2 -1
- package/buttons/delete-button.js +1 -1
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.js +3 -3
- package/buttons/svg-button.d.ts +2 -1
- package/buttons/svg-button.js +35 -35
- package/calendar/_calendar.scss +7 -2
- package/calendar/calendar.d.ts +1 -1
- package/calendar/calendar.js +1 -1
- package/calendar/caption.d.ts +1 -1
- package/calendar/day.d.ts +1 -1
- package/calendar/day.js +4 -4
- package/calendar/header.d.ts +1 -1
- package/calendar/header.js +35 -35
- package/calendar/index.js +2 -2
- package/calendar/month-grid.d.ts +1 -1
- package/calendar/month-grid.js +37 -37
- package/calendar/picker.d.ts +1 -1
- package/calendar/types.d.ts +1 -1
- package/calendar/year-grid.d.ts +1 -1
- package/calendar/year-grid.js +12 -12
- package/checkbox/index.d.ts +2 -2
- package/checkbox/index.js +9 -9
- package/choice-chips/index.d.ts +1 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.d.ts +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-picker.d.ts +1 -1
- package/color-palette/color-picker.js +2 -2
- package/component-catalog.d.ts +34 -23
- package/control-attributes.js +7 -7
- package/control-presentation.js +18 -18
- package/controls.d.ts +12 -10
- package/controls.js +3 -3
- package/core/editor-commit.d.ts +1 -1
- package/core/editor-popup.d.ts +1 -1
- package/core/editor-popup.js +1 -1
- package/date-time/date-control.d.ts +1 -1
- package/date-time/field.d.ts +2 -2
- package/date-time/index.js +1 -1
- package/date-time/picker.d.ts +1 -1
- package/date-time/style.scss +4 -4
- package/date-time/time-control.d.ts +1 -1
- package/date-time/time-selection.d.ts +1 -1
- package/date-time/types.d.ts +1 -1
- package/dialog/dialog-action-footer.view.d.ts +1 -1
- package/dialog/dialog.dom.js +52 -52
- package/dialog/dialog.parts.d.ts +18 -18
- package/dialog/dialog.parts.js +1 -1
- package/dialog/dialog.preact.d.ts +1 -1
- package/dialog/dialog.preact.js +6 -6
- package/distribution-chart/area-chart.d.ts +1 -1
- package/distribution-chart/area-chart.js +25 -25
- package/distribution-chart/bar-chart.d.ts +6 -3
- package/distribution-chart/bar-chart.js +10 -6
- package/distribution-chart/chart-frame.d.ts +3 -2
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/index.js +6 -6
- package/distribution-chart/line-chart.d.ts +1 -1
- package/distribution-chart/line-chart.js +9 -9
- package/distribution-chart/types.d.ts +1 -1
- package/dropdown/content.d.ts +3 -2
- package/dropdown/content.js +1 -141
- package/dropdown/control.d.ts +14 -0
- package/dropdown/control.js +1 -0
- package/dropdown/control.view.d.ts +6 -0
- package/dropdown/dropdown.service.d.ts +1 -1
- package/dropdown/dropdown.service.js +9 -9
- package/dropdown/dropdown.types.d.ts +4 -0
- package/dropdown/editor-dropdown.style.scss +37 -9
- package/dropdown/index.d.ts +1 -1
- package/dropdown/index.js +3 -4
- package/dropdown/lookup-field.d.ts +1 -1
- package/dropdown/lookup-field.js +41 -41
- package/dropdown/popup.d.ts +1 -1
- package/dropdown/popup.js +1 -140
- package/duration/controls.d.ts +1 -1
- package/duration/index.d.ts +2 -2
- package/duration/index.js +1 -1
- package/duration/style.scss +1 -1
- package/editor-actions.d.ts +1 -1
- package/editor-actions.js +21 -20
- package/editor-layout/index.d.ts +1 -1
- package/editor-layout/index.js +27 -27
- package/field-configurator.d.ts +1 -1
- package/field-configurator.js +93 -93
- package/field-reorder.hook.js +32 -32
- package/fieldset.d.ts +3 -0
- package/filter/filters/slider/preact.js +3 -3
- package/filter/filters/slider/single.d.ts +1 -1
- package/filter/filters/slider/single.js +23 -23
- package/filter-badge.d.ts +1 -1
- package/filter-badge.js +23 -22
- package/filter-controls.d.ts +1 -1
- package/filter-controls.js +30 -30
- package/form-controls/field-context.d.ts +5 -0
- package/form-controls/index.js +16 -21
- package/form-controls/index.view.d.ts +2 -4
- package/form-controls/presentation.d.ts +1 -1
- package/form-controls/presentation.js +59 -51
- package/formatting/comparison-preview.d.ts +1 -1
- package/formatting/control-tooltip.d.ts +1 -1
- package/formatting/icon-controls.d.ts +1 -1
- package/formatting/index.js +105 -100
- package/formatting/inspector-section.d.ts +1 -1
- package/formatting/typography-controls.d.ts +1 -1
- package/framework-mount.d.ts +1 -1
- package/framework.js +215 -207
- package/history-controls.d.ts +14 -0
- package/history-controls.js +1 -0
- package/icons/icon.d.ts +1 -1
- package/icons/icon.js +1 -1
- package/legend.d.ts +1 -1
- package/legend.js +12 -12
- package/masked-input/index.d.ts +1 -1
- package/masked-input/index.js +109 -109
- package/native-control.d.ts +14 -12
- package/native-control.js +3 -26
- package/native-styles.css +1 -1
- package/native.js +40 -39
- package/number-input/index.d.ts +1 -1
- package/number-input/index.js +1 -1
- package/package.json +18 -14
- package/pagination.d.ts +3 -0
- package/pagination.js +43 -33
- package/pdf-viewer/component.d.ts +1 -1
- package/pdf-viewer/controller.js +1 -1
- package/pdf-viewer/header.d.ts +1 -1
- package/pdf-viewer/index.js +13 -13
- package/pdf-viewer/search-bar.d.ts +1 -1
- package/pdf-viewer/status.d.ts +1 -1
- package/pdf-viewer/style.scss +3 -4
- package/pdf-viewer/toolbar.d.ts +1 -1
- package/pickers.d.ts +1 -1
- package/preact-mount.d.ts +1 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +2 -0
- package/preact.js +62 -62
- package/rating-choice.d.ts +1 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +1 -1
- package/react-control.d.ts +0 -1
- package/react-control.js +2 -2
- package/react.d.ts +13 -3
- package/react.js +71 -88
- package/reorder-list.d.ts +1 -1
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-avatar.d.ts +1 -1
- package/resource-picker/resource-picker-avatar.js +14 -14
- package/resource-picker/resource-picker-option.d.ts +1 -1
- package/resource-picker/resource-picker-option.js +28 -28
- package/resource-picker/resource-picker-popup.d.ts +1 -1
- package/resource-picker/resource-picker-popup.js +3 -3
- package/resource-picker/resource-picker.d.ts +1 -1
- package/resource-picker/resource-picker.js +88 -88
- package/resource-picker/resource-picker.scss +6 -3
- package/rich-text/engine.d.ts +16 -19
- package/rich-text/index.d.ts +7 -7
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +4 -3
- package/rich-text/render-model.d.ts +4 -5
- package/rich-text/style.scss +3 -12
- package/rich-text/toolbar.d.ts +7 -7
- package/rich-text/translations.d.ts +3 -15
- package/search-input/index.js +12 -12
- package/segmented-switch/index.d.ts +1 -1
- package/segmented-switch/index.js +1 -1
- package/select.d.ts +20 -0
- package/select.js +1 -0
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/index.js +2 -2
- package/status-feedback/popover.js +10 -10
- package/status-feedback/render.d.ts +2 -2
- package/status-feedback/render.js +3 -44
- package/status-feedback/status-feedback.scss +7 -0
- package/status-feedback/types.d.ts +4 -0
- package/status-feedback/use-auto-dismiss.d.ts +3 -0
- package/styles/_compositions.scss +3 -1
- package/styles/_control.scss +12 -4
- package/styles/_primitives.scss +9 -8
- package/styles.css +1 -1
- package/surfaces.js +49 -49
- package/svelte/UiComponent.server.js +1 -48
- package/svelte/UiComponent.svelte +0 -21
- package/svelte.js +33 -68
- package/switch/index.js +15 -15
- package/time-grid.d.ts +1 -1
- package/time-grid.js +58 -58
- package/timeline-track/component.d.ts +5 -1
- package/timeline-track/index.js +91 -74
- package/timeline-track/model.d.ts +9 -0
- package/timeline-track/model.js +10 -1
- package/ui.css +1 -1
- package/vue-adapter.d.ts +1 -1
- package/vue.d.ts +138 -119
- package/vue.js +150 -174
- package/_chunks/calendar-BsDxCYhI.js +0 -248
- package/_chunks/chart-frame-BvxbmEU9.js +0 -126
- package/_chunks/choice-chips-0HfOnK_4.js +0 -110
- package/_chunks/color-picker-BRv-__AM.js +0 -138
- package/_chunks/component-D4PH5UZT.js +0 -859
- package/_chunks/date-time-DjucJmbc.js +0 -769
- package/_chunks/dialog.parts-Dt3KinUz.js +0 -134
- package/_chunks/dropdown-CkGQBm1Q.js +0 -357
- package/_chunks/duration-BCaktcvz.js +0 -270
- package/_chunks/editor-commit-D6Rf5rGz.js +0 -12
- package/_chunks/framework-mount-BKIOsvY-.js +0 -54
- package/_chunks/mount-0-8opf1j.js +0 -90
- package/_chunks/native.view-8q_nwQ7x.js +0 -32
- package/_chunks/picker-oazJ7sO_.js +0 -121
- package/_chunks/reorder-list-BV3kZXso.js +0 -59
- package/_chunks/request-trail-D0oVzdRd.js +0 -347
- package/_chunks/rich-text-2Rla349o.js +0 -477
- package/react-native-select.d.ts +0 -6
- package/rich-text/syntax.d.ts +0 -2
- package/vue-native-select.d.ts +0 -9
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { Input as e, Select as t } from "../native-control.js";
|
|
2
|
-
import { SegmentedSwitch as n } from "../segmented-switch/index.js";
|
|
3
|
-
import { SingleValueSlider as r } from "../filter/filters/slider/single.js";
|
|
4
|
-
import { n as i } from "./editor-commit-D6Rf5rGz.js";
|
|
5
|
-
import { EditorActions as a } from "../editor-actions.js";
|
|
6
|
-
import { useEffect as o, useRef as s, useState as c } from "preact/hooks";
|
|
7
|
-
import { Fragment as l, jsx as u, jsxs as d } from "preact/jsx-runtime";
|
|
8
|
-
//#region ../dates/src/duration.ts
|
|
9
|
-
var f = {
|
|
10
|
-
m: "minute",
|
|
11
|
-
min: "minute",
|
|
12
|
-
mins: "minute",
|
|
13
|
-
minute: "minute",
|
|
14
|
-
minutes: "minute",
|
|
15
|
-
h: "hour",
|
|
16
|
-
hr: "hour",
|
|
17
|
-
hrs: "hour",
|
|
18
|
-
hour: "hour",
|
|
19
|
-
hours: "hour",
|
|
20
|
-
d: "day",
|
|
21
|
-
day: "day",
|
|
22
|
-
days: "day",
|
|
23
|
-
w: "week",
|
|
24
|
-
wk: "week",
|
|
25
|
-
wks: "week",
|
|
26
|
-
week: "week",
|
|
27
|
-
weeks: "week",
|
|
28
|
-
mo: "month",
|
|
29
|
-
mon: "month",
|
|
30
|
-
mons: "month",
|
|
31
|
-
month: "month",
|
|
32
|
-
months: "month",
|
|
33
|
-
q: "quarter",
|
|
34
|
-
qr: "quarter",
|
|
35
|
-
qtr: "quarter",
|
|
36
|
-
qtrs: "quarter",
|
|
37
|
-
quarter: "quarter",
|
|
38
|
-
quarters: "quarter",
|
|
39
|
-
y: "year",
|
|
40
|
-
yr: "year",
|
|
41
|
-
yrs: "year",
|
|
42
|
-
year: "year",
|
|
43
|
-
years: "year"
|
|
44
|
-
}, p = {
|
|
45
|
-
minute: ["minute", "minutes"],
|
|
46
|
-
hour: ["hour", "hours"],
|
|
47
|
-
day: ["day", "days"],
|
|
48
|
-
week: ["week", "weeks"],
|
|
49
|
-
month: ["month", "months"],
|
|
50
|
-
quarter: ["quarter", "quarters"],
|
|
51
|
-
year: ["year", "years"]
|
|
52
|
-
};
|
|
53
|
-
function m(e) {
|
|
54
|
-
return typeof e == "number" && Number.isFinite(e) ? Math.min(20, Math.max(0, Math.floor(e))) : 1;
|
|
55
|
-
}
|
|
56
|
-
function h(e, t) {
|
|
57
|
-
let n = t?.defaultUnit ?? "day";
|
|
58
|
-
if (typeof e == "number") return Number.isFinite(e) && e >= 0 ? {
|
|
59
|
-
value: e,
|
|
60
|
-
unit: n,
|
|
61
|
-
elapsed: !1
|
|
62
|
-
} : null;
|
|
63
|
-
if (typeof e != "string") return null;
|
|
64
|
-
let r = e.trim().toLowerCase();
|
|
65
|
-
if (!r) return null;
|
|
66
|
-
let i = r.match(/^([+]?(?:\d+(?:\.\d+)?|\.\d+))\s*(.*)$/);
|
|
67
|
-
if (!i) return null;
|
|
68
|
-
let a = Number(i[1]);
|
|
69
|
-
if (!Number.isFinite(a) || a < 0) return null;
|
|
70
|
-
let o = i[2].trim().replace(/\s+/g, " "), s = !1;
|
|
71
|
-
if (o.startsWith("elapsed ") ? (s = !0, o = o.slice(8).trim()) : o.startsWith("e") && o.length > 1 && f[o.slice(1)] && (s = !0, o = o.slice(1)), s && t?.allowElapsed === !1) return null;
|
|
72
|
-
let c = o ? f[o] : n;
|
|
73
|
-
return c ? {
|
|
74
|
-
value: a,
|
|
75
|
-
unit: c,
|
|
76
|
-
elapsed: s
|
|
77
|
-
} : null;
|
|
78
|
-
}
|
|
79
|
-
function g(e, t) {
|
|
80
|
-
return Number(e.toFixed(m(t)));
|
|
81
|
-
}
|
|
82
|
-
function _(e, t, n) {
|
|
83
|
-
let r = g(e, n?.maximumFractionDigits ?? 1), i = p[t], a = Math.abs(Math.abs(r) - 1) < 1e-9 ? i[0] : i[1];
|
|
84
|
-
return `${r} ${n?.elapsed ? "elapsed " : ""}${a}`;
|
|
85
|
-
}
|
|
86
|
-
//#endregion
|
|
87
|
-
//#region ../dates/src/duration-control.ts
|
|
88
|
-
function v(e, t) {
|
|
89
|
-
if (e == null || typeof e == "string" && !e.trim()) return {
|
|
90
|
-
valid: !t.required,
|
|
91
|
-
value: null
|
|
92
|
-
};
|
|
93
|
-
let n = h(typeof e == "object" && e && "unit" in e && "value" in e ? `${String(e.value)}${"elapsed" in e && e.elapsed ? " elapsed " : " "}${String(e.unit)}` : e, {
|
|
94
|
-
...t,
|
|
95
|
-
allowElapsed: t.allowElapsed ?? !1
|
|
96
|
-
}), r = !!n && (!t.allowedUnits || t.allowedUnits.includes(n.unit)) && (t.min === void 0 || n.value >= t.min) && (t.max === void 0 || n.value <= t.max);
|
|
97
|
-
return {
|
|
98
|
-
valid: r,
|
|
99
|
-
value: r ? n : null
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
//#endregion
|
|
103
|
-
//#region src/duration/controls.tsx
|
|
104
|
-
var y = {
|
|
105
|
-
minute: "min",
|
|
106
|
-
hour: "hour",
|
|
107
|
-
day: "day",
|
|
108
|
-
week: "week",
|
|
109
|
-
month: "month",
|
|
110
|
-
quarter: "qtr",
|
|
111
|
-
year: "year"
|
|
112
|
-
};
|
|
113
|
-
function b(e) {
|
|
114
|
-
let { unit: i, amount: a } = e, o = e.onCommit ?? e.onChange, s = [...new Set(e.allowedUnits ?? Object.keys(y))], c = typeof e.slider == "object" ? e.slider : {}, f = Number.isFinite(e.min) ? Math.max(0, e.min) : 0, p = Math.max(f + 100, a), m = Number.isFinite(e.max) ? e.max : Number.isFinite(c.max) ? c.max : p, h = Number.isFinite(c.step) && c.step > 0 ? c.step : 1;
|
|
115
|
-
return /* @__PURE__ */ d(l, { children: [e.slider && /* @__PURE__ */ d("span", {
|
|
116
|
-
class: "rv-duration-field__slider",
|
|
117
|
-
children: [/* @__PURE__ */ u(r, {
|
|
118
|
-
min: f,
|
|
119
|
-
max: m,
|
|
120
|
-
step: h,
|
|
121
|
-
value: e.amount,
|
|
122
|
-
disabled: e.disabled || m <= f,
|
|
123
|
-
ariaLabel: e.label ?? "Duration",
|
|
124
|
-
ariaValueText: e.draft,
|
|
125
|
-
onChange: (t) => e.onChange(t),
|
|
126
|
-
onCommit: e.onCommit ? (t) => e.onCommit?.(t) : void 0
|
|
127
|
-
}), /* @__PURE__ */ d("span", {
|
|
128
|
-
class: "rv-duration-field__bounds",
|
|
129
|
-
"aria-hidden": "true",
|
|
130
|
-
children: [/* @__PURE__ */ u("span", { children: f }), /* @__PURE__ */ d("span", { children: [
|
|
131
|
-
m,
|
|
132
|
-
" ",
|
|
133
|
-
e.unitLabels?.[i] ?? y[i]
|
|
134
|
-
] })]
|
|
135
|
-
})]
|
|
136
|
-
}), e.unitButtons && /* @__PURE__ */ d("span", {
|
|
137
|
-
class: "rv-duration-field__modes",
|
|
138
|
-
children: [s.length === 0 ? null : s.length > 5 ? /* @__PURE__ */ u(t, {
|
|
139
|
-
"aria-label": e.unitLabel ?? "Duration unit",
|
|
140
|
-
value: i,
|
|
141
|
-
disabled: e.disabled,
|
|
142
|
-
onChange: (e) => o(a, e.currentTarget.value),
|
|
143
|
-
children: s.map((t) => /* @__PURE__ */ u("option", {
|
|
144
|
-
value: t,
|
|
145
|
-
children: e.unitLabels?.[t] ?? y[t]
|
|
146
|
-
}, t))
|
|
147
|
-
}) : /* @__PURE__ */ u(n, {
|
|
148
|
-
role: "radiogroup",
|
|
149
|
-
ariaLabel: e.unitLabel ?? "Duration unit",
|
|
150
|
-
value: i,
|
|
151
|
-
options: s.map((t) => ({
|
|
152
|
-
value: t,
|
|
153
|
-
label: e.unitLabels?.[t] ?? y[t],
|
|
154
|
-
ariaLabel: e.unitLabels?.[t] ?? t
|
|
155
|
-
})),
|
|
156
|
-
disabled: e.disabled,
|
|
157
|
-
onChange: (e) => o(a, e)
|
|
158
|
-
}), e.allowElapsed && /* @__PURE__ */ u(n, {
|
|
159
|
-
role: "radiogroup",
|
|
160
|
-
ariaLabel: e.modeLabel ?? "Duration mode",
|
|
161
|
-
value: e.elapsed ? "elapsed" : "working",
|
|
162
|
-
options: [{
|
|
163
|
-
value: "working",
|
|
164
|
-
label: e.workingLabel ?? "Working"
|
|
165
|
-
}, {
|
|
166
|
-
value: "elapsed",
|
|
167
|
-
label: e.elapsedLabel ?? "Elapsed"
|
|
168
|
-
}],
|
|
169
|
-
disabled: e.disabled,
|
|
170
|
-
onChange: (e) => o(a, i, e === "elapsed")
|
|
171
|
-
})]
|
|
172
|
-
})] });
|
|
173
|
-
}
|
|
174
|
-
//#endregion
|
|
175
|
-
//#region src/duration/index.tsx
|
|
176
|
-
function x(t) {
|
|
177
|
-
let n = (e) => e && typeof e == "object" ? _(e.value, e.unit, {
|
|
178
|
-
elapsed: e.elapsed,
|
|
179
|
-
maximumFractionDigits: t.maximumFractionDigits ?? 10
|
|
180
|
-
}) : e === null ? "" : String(e), [r, i] = c(() => v(t.value, t).value?.unit ?? t.defaultUnit), [a, l] = c(() => n(t.value)), f = s(t.value);
|
|
181
|
-
o(() => {
|
|
182
|
-
t.value !== f.current && (f.current = t.value, l(n(t.value)), i(v(t.value, t).value?.unit ?? t.defaultUnit));
|
|
183
|
-
}, [t.value]);
|
|
184
|
-
let p = {
|
|
185
|
-
...t,
|
|
186
|
-
defaultUnit: t.unitButtons ? r : t.defaultUnit
|
|
187
|
-
}, m = v(a, p);
|
|
188
|
-
o(() => t.onValidityChange?.(m.valid), [m.valid]);
|
|
189
|
-
let h = t.disabled || t.readOnly, g = m.value, y = g?.unit ?? r, x = g?.value ?? 0, S = (e) => {
|
|
190
|
-
l(e), t.onDraftChange?.(e);
|
|
191
|
-
let n = v(e, p);
|
|
192
|
-
n.valid && (n.value && i(n.value.unit), f.current = n.value, t.onChange(n.value));
|
|
193
|
-
}, C = (e, n = y, r = g?.elapsed ?? !1, i = !1) => {
|
|
194
|
-
if (h) return;
|
|
195
|
-
let a = _(e, n, {
|
|
196
|
-
elapsed: r,
|
|
197
|
-
maximumFractionDigits: t.maximumFractionDigits ?? 10
|
|
198
|
-
});
|
|
199
|
-
S(a);
|
|
200
|
-
let o = v(a, p);
|
|
201
|
-
i && o.valid && t.onCommit?.(o.value);
|
|
202
|
-
};
|
|
203
|
-
return /* @__PURE__ */ d("span", {
|
|
204
|
-
class: `rv-duration-field ${t.className ?? ""}`,
|
|
205
|
-
children: [
|
|
206
|
-
/* @__PURE__ */ u(e, {
|
|
207
|
-
type: "text",
|
|
208
|
-
"aria-label": t.label ?? "Duration",
|
|
209
|
-
"aria-invalid": !m.valid,
|
|
210
|
-
value: a,
|
|
211
|
-
disabled: t.disabled,
|
|
212
|
-
readOnly: t.readOnly,
|
|
213
|
-
placeholder: t.placeholder ?? `2 ${t.unitLabels?.[t.defaultUnit] ?? t.defaultUnit}`,
|
|
214
|
-
onInput: (e) => S(e.currentTarget.value)
|
|
215
|
-
}),
|
|
216
|
-
/* @__PURE__ */ u(b, {
|
|
217
|
-
...t,
|
|
218
|
-
unit: y,
|
|
219
|
-
amount: x,
|
|
220
|
-
draft: a,
|
|
221
|
-
elapsed: g?.elapsed ?? !1,
|
|
222
|
-
disabled: h || !m.valid && !!a.trim(),
|
|
223
|
-
onChange: C,
|
|
224
|
-
onCommit: (e, t, n) => C(e, t, n, !0)
|
|
225
|
-
}),
|
|
226
|
-
!m.valid && /* @__PURE__ */ u("span", {
|
|
227
|
-
role: "alert",
|
|
228
|
-
class: "rv-editor-error",
|
|
229
|
-
children: t.invalidText ?? "Enter a valid duration within the allowed units and bounds."
|
|
230
|
-
})
|
|
231
|
-
]
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
function S({ value: e, options: t, apply: n, cancel: r }) {
|
|
235
|
-
let [o, l] = c(!1), [f, p] = c(e), [m, h] = c(0), g = t.autoApply !== !1, _ = s(!1), y = s(e), b = (e = !1) => {
|
|
236
|
-
let r = v(y.current, t);
|
|
237
|
-
return r.valid ? ((e || !g || _.current) && (_.current = !1, n(r.value)), !0) : !1;
|
|
238
|
-
};
|
|
239
|
-
return i(b, g), /* @__PURE__ */ d("div", {
|
|
240
|
-
onKeyDown: (e) => {
|
|
241
|
-
let t = e.target instanceof HTMLInputElement && e.target.type === "text";
|
|
242
|
-
!e.isComposing && e.key === "Enter" && (g && t || e.ctrlKey || e.metaKey) && (e.preventDefault(), b(!0));
|
|
243
|
-
},
|
|
244
|
-
children: [/* @__PURE__ */ u(x, {
|
|
245
|
-
...t,
|
|
246
|
-
value: f,
|
|
247
|
-
onChange: (e) => {
|
|
248
|
-
_.current = !0, p(e);
|
|
249
|
-
},
|
|
250
|
-
onDraftChange: (e) => {
|
|
251
|
-
_.current = !0, y.current = e;
|
|
252
|
-
},
|
|
253
|
-
onCommit: g ? (e) => {
|
|
254
|
-
_.current = !1, n(e);
|
|
255
|
-
} : void 0,
|
|
256
|
-
onValidityChange: l
|
|
257
|
-
}, m), /* @__PURE__ */ u(a, {
|
|
258
|
-
showConfirm: t.showActions ?? !g,
|
|
259
|
-
text: t.actions,
|
|
260
|
-
disabled: !o,
|
|
261
|
-
apply: () => b(!0),
|
|
262
|
-
cancel: r,
|
|
263
|
-
clear: t.required ? void 0 : () => {
|
|
264
|
-
g ? n(null) : (y.current = null, p(null), h((e) => e + 1));
|
|
265
|
-
}
|
|
266
|
-
})]
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
//#endregion
|
|
270
|
-
export { x as n, S as t };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createContext as e } from "preact";
|
|
2
|
-
import { useContext as t, useLayoutEffect as n, useRef as r } from "preact/hooks";
|
|
3
|
-
//#region src/core/editor-commit.tsx
|
|
4
|
-
var i = e(void 0);
|
|
5
|
-
function a(e, a = !0) {
|
|
6
|
-
let o = t(i), s = r(e);
|
|
7
|
-
s.current = e, n(() => {
|
|
8
|
-
if (a) return o?.(() => s.current());
|
|
9
|
-
}, [o, a]);
|
|
10
|
-
}
|
|
11
|
-
//#endregion
|
|
12
|
-
export { a as n, i as t };
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./component-metadata-BENbgTjU.js";
|
|
2
|
-
import { h as t, render as n } from "preact";
|
|
3
|
-
import { useLayoutEffect as r, useRef as i } from "preact/hooks";
|
|
4
|
-
//#region src/framework-mount.ts
|
|
5
|
-
function a(e, a) {
|
|
6
|
-
let o = /* @__PURE__ */ new Map(), s = !1, c = 0;
|
|
7
|
-
function l({ content: e, scope: n }) {
|
|
8
|
-
let l = i(null);
|
|
9
|
-
return r(() => {
|
|
10
|
-
let t = l.current;
|
|
11
|
-
if (!t || s) return;
|
|
12
|
-
let r = o.get(t)?.id ?? c++;
|
|
13
|
-
o.set(t, {
|
|
14
|
-
id: r,
|
|
15
|
-
element: t,
|
|
16
|
-
content: e,
|
|
17
|
-
scope: n
|
|
18
|
-
}), a([...o.values()]);
|
|
19
|
-
}, [e, n]), r(() => {
|
|
20
|
-
let e = l.current;
|
|
21
|
-
return () => {
|
|
22
|
-
e && o.delete(e), s || a([...o.values()]);
|
|
23
|
-
};
|
|
24
|
-
}, []), t("span", {
|
|
25
|
-
ref: l,
|
|
26
|
-
style: { display: "contents" },
|
|
27
|
-
"data-rv-framework-content": ""
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
let u = (e, n = {}) => t(l, {
|
|
31
|
-
content: e,
|
|
32
|
-
scope: n
|
|
33
|
-
});
|
|
34
|
-
return {
|
|
35
|
-
render(r, i, a) {
|
|
36
|
-
if (s) throw Error("Cannot update a destroyed UI mount");
|
|
37
|
-
n(t(r, a ? a(i, u) : i), e);
|
|
38
|
-
},
|
|
39
|
-
destroy() {
|
|
40
|
-
s || (s = !0, n(null, e), o.clear());
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
function o(t, n, r, i) {
|
|
45
|
-
let a = { ...n }, o = e(t);
|
|
46
|
-
for (let [e, t] of Object.entries(r)) {
|
|
47
|
-
if (t == null) continue;
|
|
48
|
-
let n = o[e];
|
|
49
|
-
n ? a[n.prop] = (...e) => (n.skipFactory && (e = e.slice(1)), i(t, Object.fromEntries(n.args.map((t, n) => [t, e[n]])))) : a[e === "default" ? "children" : e] = i(t);
|
|
50
|
-
}
|
|
51
|
-
return a;
|
|
52
|
-
}
|
|
53
|
-
//#endregion
|
|
54
|
-
export { o as n, a as t };
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { a as e, i as t, l as n, n as r, o as i, r as a, t as o } from "./request-trail-D0oVzdRd.js";
|
|
2
|
-
import { n as s } from "./controls-NEL5tDaz.js";
|
|
3
|
-
import { render as c } from "preact";
|
|
4
|
-
import { useEffect as l, useRef as u, useState as d } from "preact/hooks";
|
|
5
|
-
import { jsx as f, jsxs as p } from "preact/jsx-runtime";
|
|
6
|
-
//#region src/ai/mount.tsx
|
|
7
|
-
function m(m, h) {
|
|
8
|
-
let g = (e) => n(e, h.translations), _ = !1;
|
|
9
|
-
function v({ state: n }) {
|
|
10
|
-
let [c, _] = d(""), v = u(), y = n.phase === "understanding" || n.phase === "applying", b = n.steps ?? [];
|
|
11
|
-
l(() => {
|
|
12
|
-
if (y || n.phase === "idle" || v.current === void 0) return;
|
|
13
|
-
let e = v.current;
|
|
14
|
-
v.current = void 0, n.phase === "completed" && _((t) => t.trim() === e ? "" : t);
|
|
15
|
-
}, [n]);
|
|
16
|
-
let x = (e) => {
|
|
17
|
-
v.current = e.trim(), h.onSubmit(e);
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ p(a, {
|
|
20
|
-
translations: h.translations,
|
|
21
|
-
label: h.label,
|
|
22
|
-
busy: y,
|
|
23
|
-
footer: h.footer,
|
|
24
|
-
children: [
|
|
25
|
-
/* @__PURE__ */ f(i, {
|
|
26
|
-
items: n.suggestions?.length ? n.suggestions : h.suggestions ?? [],
|
|
27
|
-
onSelect: (e) => {
|
|
28
|
-
y || (_(e), x(e));
|
|
29
|
-
},
|
|
30
|
-
disabled: y
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ f(t, {
|
|
33
|
-
...h.prompt,
|
|
34
|
-
value: c,
|
|
35
|
-
onValueChange: _,
|
|
36
|
-
onSubmit: x,
|
|
37
|
-
onStop: h.onStop,
|
|
38
|
-
busy: y,
|
|
39
|
-
hint: b.length ? "" : h.prompt?.hint,
|
|
40
|
-
actions: /* @__PURE__ */ f(o, {
|
|
41
|
-
...h.trail,
|
|
42
|
-
items: b,
|
|
43
|
-
onRemove: (e) => h.onRemoveStep?.(e),
|
|
44
|
-
onClear: h.onReset,
|
|
45
|
-
onEmpty: () => m.querySelector("textarea")?.focus(),
|
|
46
|
-
disabled: y,
|
|
47
|
-
removalsDisabled: !h.onRemoveStep || n.canEditSteps === !1,
|
|
48
|
-
clearDescription: h.trail?.clearDescription ?? "Restore the starting view",
|
|
49
|
-
clearLabel: h.trail?.clearLabel ?? h.resetLabel ?? "Clear all",
|
|
50
|
-
changedMessage: !y && b.length > 0 && n.canEditSteps === !1 ? h.trail?.changedMessage ?? "The view changed manually. Start a new request to continue." : void 0
|
|
51
|
-
})
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ f(r, {
|
|
54
|
-
phase: n.phase,
|
|
55
|
-
message: n.phase === "completed" ? "" : n.message
|
|
56
|
-
}),
|
|
57
|
-
n.phase === "completed" && /* @__PURE__ */ f(e, {
|
|
58
|
-
summary: n.message,
|
|
59
|
-
matchedRows: n.matchedRows,
|
|
60
|
-
countLabel: h.countLabel
|
|
61
|
-
}),
|
|
62
|
-
/* @__PURE__ */ p("div", {
|
|
63
|
-
class: "rv-ai-result-actions",
|
|
64
|
-
children: [/* @__PURE__ */ f(s, {
|
|
65
|
-
disabled: y || !n.canRestore,
|
|
66
|
-
onClick: h.onRestore,
|
|
67
|
-
size: "compact",
|
|
68
|
-
children: g(h.restoreLabel ?? "Restore previous view")
|
|
69
|
-
}), !b.length && /* @__PURE__ */ f(s, {
|
|
70
|
-
disabled: y,
|
|
71
|
-
onClick: h.onReset,
|
|
72
|
-
size: "compact",
|
|
73
|
-
variant: "ghost",
|
|
74
|
-
children: g(h.resetLabel ?? "Reset view")
|
|
75
|
-
})]
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
update(e) {
|
|
82
|
-
_ || c(/* @__PURE__ */ f(v, { state: e }), m);
|
|
83
|
-
},
|
|
84
|
-
destroy() {
|
|
85
|
-
_ || (_ = !0, c(null, m));
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
//#endregion
|
|
90
|
-
export { m as t };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { createPreactElement as e } from "../preact-mount.js";
|
|
2
|
-
import { controlClassName as t } from "../control-attributes.js";
|
|
3
|
-
import { renderControl as n } from "../control-presentation.js";
|
|
4
|
-
import { h as r } from "preact";
|
|
5
|
-
import { jsx as i } from "preact/jsx-runtime";
|
|
6
|
-
//#region src/search-input/native.view.tsx
|
|
7
|
-
function a(e, r) {
|
|
8
|
-
let { shortcut: i, hideIcon: a, inputAttributes: o = {} } = r;
|
|
9
|
-
return e("div", {
|
|
10
|
-
class: t("rv-search-input", a && "rv-search-input--no-icon", i === void 0 && "rv-search-input--no-shortcut", r.rootClassName),
|
|
11
|
-
"data-testid": r.testId
|
|
12
|
-
}, !a && e("span", {
|
|
13
|
-
class: t("rv-search-input-icon", r.iconClassName),
|
|
14
|
-
"aria-hidden": "true"
|
|
15
|
-
}, r.icon), r.leading, n(e, "input", {
|
|
16
|
-
type: "search",
|
|
17
|
-
...o,
|
|
18
|
-
class: t(r.inputClassName, o.class)
|
|
19
|
-
}), i !== void 0 && e("span", { class: t("rv-search-input-shortcut", r.shortcutClassName) }, i), r.trailing);
|
|
20
|
-
}
|
|
21
|
-
function o(t, n) {
|
|
22
|
-
let o = e(t, a(r, {
|
|
23
|
-
...n,
|
|
24
|
-
icon: /* @__PURE__ */ i("span", { dangerouslySetInnerHTML: { __html: n.iconSvg } })
|
|
25
|
-
}));
|
|
26
|
-
return {
|
|
27
|
-
root: o,
|
|
28
|
-
input: o.querySelector("input")
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
//#endregion
|
|
32
|
-
export { a as n, o as t };
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { ButtonControl as e } from "../native-control.js";
|
|
2
|
-
import { DEFAULT_CALENDAR_TRANSLATIONS as t } from "../calendar/translations.js";
|
|
3
|
-
import { n } from "./iso-B0YHBK7m.js";
|
|
4
|
-
import { f as r, h as i, m as a, o, p as s } from "./model-mPO2tG2f.js";
|
|
5
|
-
import { t as c } from "./calendar-BsDxCYhI.js";
|
|
6
|
-
import { useState as l } from "preact/hooks";
|
|
7
|
-
import { Fragment as u, jsx as d, jsxs as f } from "preact/jsx-runtime";
|
|
8
|
-
//#region src/calendar/picker.tsx
|
|
9
|
-
function p(p) {
|
|
10
|
-
let { selected: m, onSelectionChange: ee, presets: h, mode: g = "single", min: _ = 0, max: v = Infinity, required: y = !1, excludeDisabled: b = !1, month: x, defaultMonth: S, onMonthChange: C, ...w } = p, T = typeof m == "string" ? m : Array.isArray(m) ? m[0] : m?.from, [E, D] = l(S ?? T ?? p.referenceDate ?? i()), [O, k] = l(T ?? E), [A, j] = l(), [M, N] = l(), P = (e) => {
|
|
11
|
-
j(e), N(void 0);
|
|
12
|
-
}, F = x ?? E, I = p.views?.filter((e) => e === "month" || e === "year"), L = I?.length ? I : p.views || p.enableYearView === !1 ? ["month"] : ["month", "year"], [R, z] = l(p.defaultView && L.includes(p.defaultView) ? p.defaultView : L[0]), B = L.includes(R) ? R : L[0], V = (e) => {
|
|
13
|
-
D(e), P(), C?.(e);
|
|
14
|
-
}, H = p.translations?.invalidSelection ?? t.invalidSelection, U = (e, t = H) => {
|
|
15
|
-
j(e), N(t), p.onInvalidSelection?.(t, e);
|
|
16
|
-
}, W = (e) => !!(p.minDate && e < p.minDate || p.maxDate && e > p.maxDate || p.isDateDisabled?.(e) || p.isMonthDisabled?.(r(e, p.calendarSystem))), G = (e) => {
|
|
17
|
-
if (!e.to) return !W(e.from);
|
|
18
|
-
let t = a(e.from, e.to);
|
|
19
|
-
if (t < _ || t > v || t < 0 || W(e.from) || W(e.to)) return !1;
|
|
20
|
-
if (b) {
|
|
21
|
-
if (t > 366e3) return !1;
|
|
22
|
-
for (let t = e.from; t <= e.to; t = s(t, 1)) if (W(t)) return !1;
|
|
23
|
-
}
|
|
24
|
-
return !0;
|
|
25
|
-
}, K = (e) => {
|
|
26
|
-
if (p.mode === "multiple") {
|
|
27
|
-
let t = p.selected ?? [], n = t.includes(e), r = n ? t.filter((t) => t !== e) : [...t, e];
|
|
28
|
-
if (n && r.length < Math.max(_, +!!y) || r.length > v) {
|
|
29
|
-
U(e);
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
p.onSelectionChange(r);
|
|
33
|
-
} else if (p.mode === "range") {
|
|
34
|
-
let t = p.selected;
|
|
35
|
-
if (!t || t.to) {
|
|
36
|
-
p.onSelectionChange({ from: e }), P();
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
let n = o(t.from, e);
|
|
40
|
-
if (!G(n)) {
|
|
41
|
-
b && a(n.from, n.to) >= _ && a(n.from, n.to) <= v && p.onSelectionChange({ from: e }), U(e);
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
p.onSelectionChange(n), P();
|
|
45
|
-
} else p.onSelectionChange(p.selected === e && !y ? void 0 : e);
|
|
46
|
-
}, q = p.mode === "range" ? p.selected : void 0, J = typeof m == "string" ? {
|
|
47
|
-
from: m,
|
|
48
|
-
to: m
|
|
49
|
-
} : q ? {
|
|
50
|
-
from: q.from,
|
|
51
|
-
to: q.to ?? q.from
|
|
52
|
-
} : void 0, Y = q && !q.to && A ? o(q.from, A) : void 0, X = (e) => {
|
|
53
|
-
let t = p.validateSelection?.(e, {
|
|
54
|
-
month: r(F, p.calendarSystem),
|
|
55
|
-
view: B,
|
|
56
|
-
selection: J,
|
|
57
|
-
preview: Y,
|
|
58
|
-
referenceDate: p.referenceDate ?? (p.referenceInstant ? n(p.referenceInstant, p.timeZone ?? "UTC") : void 0)
|
|
59
|
-
});
|
|
60
|
-
if (t === !1 || typeof t == "string") return typeof t == "string" ? t : H;
|
|
61
|
-
}, Z = Y && !G(Y) ? H : void 0, Q = M ?? Z, $ = (e) => {
|
|
62
|
-
let t = X(e);
|
|
63
|
-
return !t || (U(e, t), !1);
|
|
64
|
-
}, te = (e) => {
|
|
65
|
-
let t = e.selection, n;
|
|
66
|
-
if (p.mode === "multiple") {
|
|
67
|
-
if (!Array.isArray(t) || t.length < Math.max(_, +!!y) || t.length > v || t.some(W)) return;
|
|
68
|
-
let e = [...new Set(t)];
|
|
69
|
-
if (e.length < Math.max(_, +!!y) || !e.every($)) return;
|
|
70
|
-
p.onSelectionChange(e), n = e[0] ?? F;
|
|
71
|
-
} else if (p.mode === "range") {
|
|
72
|
-
if (!t?.from || !G(t) || !$(t.from) || t.to && !$(t.to)) return;
|
|
73
|
-
p.onSelectionChange(t), n = t.from;
|
|
74
|
-
} else {
|
|
75
|
-
if (typeof t != "string" || W(t) || !$(t)) return;
|
|
76
|
-
p.onSelectionChange(t), n = t;
|
|
77
|
-
}
|
|
78
|
-
k(n), V(r(n, p.calendarSystem)), P();
|
|
79
|
-
};
|
|
80
|
-
return /* @__PURE__ */ d(c, {
|
|
81
|
-
...w,
|
|
82
|
-
onViewChange: (e) => {
|
|
83
|
-
z(e), P(), p.onViewChange?.(e);
|
|
84
|
-
},
|
|
85
|
-
month: F,
|
|
86
|
-
focusedDate: O,
|
|
87
|
-
onFocusedDateChange: k,
|
|
88
|
-
onMonthChange: V,
|
|
89
|
-
selection: J,
|
|
90
|
-
selectedDates: p.mode === "multiple" ? p.selected : void 0,
|
|
91
|
-
preview: Y,
|
|
92
|
-
previewInvalid: !!(Y && Q),
|
|
93
|
-
previewDescription: g === "range" ? Q ?? "" : void 0,
|
|
94
|
-
onInvalidSelection: (e, t) => U(t, e),
|
|
95
|
-
fixedWeeks: p.fixedWeeks ?? !1,
|
|
96
|
-
showOutsideDays: p.showOutsideDays ?? !0,
|
|
97
|
-
allowOutsideMonthSelection: p.allowOutsideMonthSelection ?? !0,
|
|
98
|
-
onPresetSelect: (e) => {
|
|
99
|
-
if (p.mode === "multiple") {
|
|
100
|
-
let t = p.selected ?? [];
|
|
101
|
-
if (t.includes(e)) return;
|
|
102
|
-
if (t.length >= v) {
|
|
103
|
-
U(e);
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
p.onSelectionChange([...t, e]);
|
|
107
|
-
} else p.mode === "range" ? p.onSelectionChange({ from: e }) : p.onSelectionChange(e);
|
|
108
|
-
},
|
|
109
|
-
onSelect: K,
|
|
110
|
-
onPreviewDateChange: P,
|
|
111
|
-
footer: h?.length || p.footer ? /* @__PURE__ */ f(u, { children: [h?.length ? /* @__PURE__ */ d("div", {
|
|
112
|
-
class: "revo-calendar__presets",
|
|
113
|
-
children: h.map((t) => /* @__PURE__ */ d(e, {
|
|
114
|
-
onClick: () => te(t),
|
|
115
|
-
children: t.label
|
|
116
|
-
}, t.label))
|
|
117
|
-
}) : null, p.footer] }) : void 0
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
//#endregion
|
|
121
|
-
export { p as t };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { ButtonControl as e } from "../native-control.js";
|
|
2
|
-
import { fieldDropIndex as t, fieldListDropIndex as n } from "../field-reorder.js";
|
|
3
|
-
import { createElement as r } from "preact";
|
|
4
|
-
import { jsx as i, jsxs as a } from "preact/jsx-runtime";
|
|
5
|
-
//#region ../../node_modules/.pnpm/@fortawesome+fontawesome-free@7.3.1/node_modules/@fortawesome/fontawesome-free/svgs/solid/grip-vertical.svg?raw
|
|
6
|
-
var o = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 320 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M128 40c0-22.1-17.9-40-40-40L40 0C17.9 0 0 17.9 0 40L0 88c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zm0 192c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM0 424l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 40c0-22.1-17.9-40-40-40L232 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48zM192 232l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40zM320 424c0-22.1-17.9-40-40-40l-48 0c-22.1 0-40 17.9-40 40l0 48c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-48z\"/></svg>";
|
|
7
|
-
//#endregion
|
|
8
|
-
//#region src/reorder-list.tsx
|
|
9
|
-
function s({ items: e, itemKey: o, renderItem: s, renderHandle: c, itemAttributes: l, className: u = "", rowClassName: d = "", endClassName: f = "", draggedKey: p, dropIndex: m, empty: h, onDragOver: g, onDrop: _ }) {
|
|
10
|
-
let v = (e, n) => {
|
|
11
|
-
let r = e.currentTarget.getBoundingClientRect();
|
|
12
|
-
return t(e.clientY, r.top, r.height, n, m ?? null);
|
|
13
|
-
}, y = (t) => {
|
|
14
|
-
let r = t.currentTarget;
|
|
15
|
-
if (t.target.closest(".rv-reorder-drop-end")?.parentElement === r) return e.length;
|
|
16
|
-
let i = Array.from(r.querySelectorAll(":scope > .rv-reorder-row"));
|
|
17
|
-
return n(t.clientY, i.map((e) => e.getBoundingClientRect()), m ?? null, e.length);
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ a("div", {
|
|
20
|
-
class: `rv-reorder-list ${u}${m === e.length ? " drop-at-end" : ""}`,
|
|
21
|
-
onDragOver: (e) => {
|
|
22
|
-
e.target.closest(".rv-reorder-row")?.parentElement !== e.currentTarget && (e.stopPropagation(), g(e, y(e)));
|
|
23
|
-
},
|
|
24
|
-
onDrop: (e) => {
|
|
25
|
-
e.target.closest(".rv-reorder-row")?.parentElement !== e.currentTarget && (e.stopPropagation(), _(e, y(e)));
|
|
26
|
-
},
|
|
27
|
-
children: [
|
|
28
|
-
!e.length && h,
|
|
29
|
-
e.map((e, t) => /* @__PURE__ */ r("div", {
|
|
30
|
-
...l?.(e, t),
|
|
31
|
-
key: o(e),
|
|
32
|
-
class: `rv-reorder-row ${typeof d == "function" ? d(e, t) : d}${p === o(e) ? " dragging" : ""}${m === t ? " drop-before" : ""}`,
|
|
33
|
-
onDragOver: (e) => {
|
|
34
|
-
e.stopPropagation(), g(e, v(e, t));
|
|
35
|
-
},
|
|
36
|
-
onDrop: (e) => {
|
|
37
|
-
e.stopPropagation(), _(e, v(e, t));
|
|
38
|
-
}
|
|
39
|
-
}, c?.(e, t), s(e, t))),
|
|
40
|
-
/* @__PURE__ */ i("div", {
|
|
41
|
-
class: `rv-reorder-drop-end ${f}`,
|
|
42
|
-
"aria-hidden": "true"
|
|
43
|
-
})
|
|
44
|
-
]
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
function c({ className: t = "", children: n, ...r }) {
|
|
48
|
-
return /* @__PURE__ */ a(e, {
|
|
49
|
-
type: "button",
|
|
50
|
-
...r,
|
|
51
|
-
class: `rv-btn-ghost rv-reorder-handle ${t}`,
|
|
52
|
-
children: [/* @__PURE__ */ i("span", {
|
|
53
|
-
"aria-hidden": "true",
|
|
54
|
-
dangerouslySetInnerHTML: { __html: o }
|
|
55
|
-
}), n]
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
//#endregion
|
|
59
|
-
export { s as n, c as t };
|