@revolist/ui 4.0.1-rc → 4.0.2-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/README.md +6 -5
- package/_chunks/calendar-CpaUK7w1.js +248 -0
- package/_chunks/chart-frame-BC99KjGa.js +127 -0
- package/_chunks/choice-chips-Cs4D-3nH.js +110 -0
- package/_chunks/{color-palette-BmZ7kH9R.js → color-palette-BBMFmUNA.js} +41 -41
- package/_chunks/color-picker-D90Jg-M8.js +138 -0
- package/_chunks/compat.module-DDB2pm9O.js +229 -0
- package/_chunks/component-YDcfoOLz.js +859 -0
- package/_chunks/{control-tooltip-BCNzQCXE.js → control-tooltip-ztgmsG7H.js} +29 -29
- package/_chunks/{controller-CmLo-Ajc.js → controller-hRBm_Lfz.js} +15 -15
- package/_chunks/{controls-NEL5tDaz.js → controls-DIum-E66.js} +192 -192
- package/_chunks/{date-control-CYCkb1aQ.js → date-control-BJSzu79z.js} +21 -21
- package/_chunks/date-time-BxPJusp9.js +770 -0
- package/_chunks/{delete-button-DnpmDNEJ.js → delete-button-Bblyah10.js} +1 -1
- package/_chunks/dialog.parts-DBqo3Qwb.js +134 -0
- package/_chunks/{dropdown-CkGQBm1Q.js → dropdown-voWqmwAe.js} +102 -102
- package/_chunks/duration-87U2EoMS.js +271 -0
- package/_chunks/editor-commit-Bq3wSgvr.js +12 -0
- package/_chunks/{editor-popup-B7fu_A_T.js → editor-popup-D3JdS8l3.js} +8 -8
- package/_chunks/framework-mount-C-Zwm44H.js +54 -0
- package/_chunks/hooks.module-CG3gN83z.js +157 -0
- package/_chunks/jsxRuntime.module-F6UFnpT-.js +30 -0
- package/_chunks/mount-DZe_6VtR.js +90 -0
- package/_chunks/native.view-ByyZ1CT5.js +32 -0
- package/_chunks/{number-input-NnH57J4j.js → number-input-BeIadZuL.js} +89 -89
- package/_chunks/picker-DpP7iQLA.js +122 -0
- package/_chunks/preact.module-BBM36DnO.js +290 -0
- package/_chunks/{rating-choice-CWAsNQNS.js → rating-choice-Ca8ZBty3.js} +10 -10
- package/_chunks/reorder-list-Cc3KmfAN.js +59 -0
- package/_chunks/request-trail-IdNiFvKH.js +347 -0
- package/_chunks/{rich-text-2Rla349o.js → rich-text-BzI1DyfF.js} +167 -167
- 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/components.d.ts +1 -1
- package/ai/index.js +2 -2
- package/ai/request-trail.d.ts +1 -1
- package/ai/translation-context.d.ts +1 -1
- package/alert.d.ts +2 -2
- package/assignee/field.d.ts +2 -2
- package/assignee/index.js +87 -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.js +1 -1
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.js +3 -3
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +35 -35
- 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 +19 -19
- package/control-presentation.js +18 -18
- package/controls.d.ts +4 -4
- package/controls.js +1 -1
- 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/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 +1 -1
- package/distribution-chart/bar-chart.js +6 -6
- package/distribution-chart/chart-frame.d.ts +1 -1
- 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 +1 -1
- package/dropdown/content.js +83 -82
- package/dropdown/dropdown.service.d.ts +1 -1
- package/dropdown/dropdown.service.js +9 -9
- package/dropdown/index.js +1 -1
- 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 +17 -16
- package/duration/controls.d.ts +1 -1
- package/duration/index.d.ts +2 -2
- package/duration/index.js +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/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 +31 -31
- package/form-controls/index.js +20 -20
- package/form-controls/presentation.d.ts +1 -1
- package/form-controls/presentation.js +44 -44
- 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 +99 -98
- 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 +19 -19
- 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 +11 -11
- package/native-control.js +12 -12
- package/native.js +39 -39
- package/number-input/index.d.ts +1 -1
- package/number-input/index.js +1 -1
- package/package.json +1 -2
- 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/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.js +14 -14
- package/rating-choice.d.ts +1 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +1 -1
- package/react.js +19 -19
- 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/rich-text/index.d.ts +1 -1
- package/rich-text/index.js +1 -1
- package/rich-text/toolbar.d.ts +1 -1
- package/search-input/index.js +12 -12
- package/segmented-switch/index.d.ts +1 -1
- package/segmented-switch/index.js +1 -1
- package/status-feedback/render.d.ts +2 -2
- package/status-feedback/render.js +13 -13
- package/surfaces.js +34 -34
- package/svelte.js +2 -2
- 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 +1 -1
- package/timeline-track/index.js +75 -75
- package/vue-adapter.d.ts +1 -1
- package/vue.d.ts +116 -116
- package/vue.js +121 -121
- 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/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
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { createPreactElement as e, releasePreactElement as t } from "../preact-mount.js";
|
|
2
|
-
import { ButtonControl as n, Input as r } from "../native-control.js";
|
|
3
|
-
import { t as i } from "./xmark-DD_PBvZI.js";
|
|
4
|
-
import { h as a } from "preact";
|
|
5
|
-
import { Fragment as o, jsx as s, jsxs as c } from "preact/jsx-runtime";
|
|
6
|
-
import { forwardRef as l } from "preact/compat";
|
|
7
|
-
//#region src/dialog/dialog-action-footer.view.tsx
|
|
8
|
-
function u({ cancel: e = {}, save: t = {}, deleteAction: r = !1, reset: i = !1, start: a, end: o, children: l, actionsClass: u = "", class: d = "", ...f }) {
|
|
9
|
-
let p = (e, t, r, i = "", a = "button") => {
|
|
10
|
-
if (t === !1) return null;
|
|
11
|
-
let { label: o = r, class: c = "", ...l } = t;
|
|
12
|
-
return /* @__PURE__ */ s(n, {
|
|
13
|
-
type: a,
|
|
14
|
-
...l,
|
|
15
|
-
class: `rv-btn ${i} ${c}`,
|
|
16
|
-
"data-dialog-action": e,
|
|
17
|
-
children: o
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ c("footer", {
|
|
21
|
-
...f,
|
|
22
|
-
class: `rv-dialog__footer rv-dialog__action-footer ${d}`,
|
|
23
|
-
children: [l, /* @__PURE__ */ c("div", {
|
|
24
|
-
class: "rv-dialog__action-panel",
|
|
25
|
-
children: [/* @__PURE__ */ c("div", {
|
|
26
|
-
class: "rv-dialog__action-start",
|
|
27
|
-
children: [
|
|
28
|
-
a,
|
|
29
|
-
p("delete", r, "Delete", "rv-btn-danger-outline"),
|
|
30
|
-
p("reset", i, "Reset")
|
|
31
|
-
]
|
|
32
|
-
}), /* @__PURE__ */ c("div", {
|
|
33
|
-
class: `rv-dialog__actions ${u}`,
|
|
34
|
-
children: [
|
|
35
|
-
o,
|
|
36
|
-
p("cancel", e, "Cancel"),
|
|
37
|
-
p("save", t, "Save", "rv-btn-primary", "submit")
|
|
38
|
-
]
|
|
39
|
-
})]
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function d(e, t) {
|
|
44
|
-
return /* @__PURE__ */ s(u, { ...t });
|
|
45
|
-
}
|
|
46
|
-
function f(n, r) {
|
|
47
|
-
let i = e(n.ownerDocument, /* @__PURE__ */ s(u, { ...r }));
|
|
48
|
-
return n.append(i), { destroy() {
|
|
49
|
-
t(i);
|
|
50
|
-
} };
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/dialog/dialog.parts.tsx
|
|
54
|
-
var p = l(({ class: e = "", ...t }, n) => /* @__PURE__ */ s("header", {
|
|
55
|
-
...t,
|
|
56
|
-
ref: n,
|
|
57
|
-
class: `rv-dialog__header ${e}`
|
|
58
|
-
}));
|
|
59
|
-
function m({ class: e = "", ...t }) {
|
|
60
|
-
return /* @__PURE__ */ s("form", {
|
|
61
|
-
...t,
|
|
62
|
-
class: `rv-dialog__surface ${e}`
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
var h = l(({ class: e = "", ...t }, n) => /* @__PURE__ */ s("div", {
|
|
66
|
-
...t,
|
|
67
|
-
ref: n,
|
|
68
|
-
class: `rv-dialog__body ${e}`
|
|
69
|
-
})), g = l(({ class: e = "", ...t }, n) => /* @__PURE__ */ s("footer", {
|
|
70
|
-
...t,
|
|
71
|
-
ref: n,
|
|
72
|
-
class: `rv-dialog__footer ${e}`
|
|
73
|
-
})), _ = l(({ class: e = "", ...t }, n) => /* @__PURE__ */ s("div", {
|
|
74
|
-
...t,
|
|
75
|
-
ref: n,
|
|
76
|
-
class: `rv-dialog__actions ${e}`
|
|
77
|
-
}));
|
|
78
|
-
function v({ class: e = "", iconClass: t = "", ...r }) {
|
|
79
|
-
return /* @__PURE__ */ s(n, {
|
|
80
|
-
...r,
|
|
81
|
-
unstyled: !0,
|
|
82
|
-
type: "button",
|
|
83
|
-
class: `rv-dialog__close ${e}`,
|
|
84
|
-
children: /* @__PURE__ */ s("span", {
|
|
85
|
-
class: `rv-dialog__close-icon ${t}`,
|
|
86
|
-
"aria-hidden": "true",
|
|
87
|
-
dangerouslySetInnerHTML: { __html: i }
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
var y = l(({ class: e = "", ...t }, n) => /* @__PURE__ */ s(r, {
|
|
92
|
-
...t,
|
|
93
|
-
ref: n,
|
|
94
|
-
class: `rv-dialog__title-input ${e}`
|
|
95
|
-
})), b = l(({ titleId: e, title: t, name: n, description: r, inputLabel: i, titleHidden: a, headingClass: l = "", kickerClass: u = "", titleClass: d = "", inputProps: f, closeLabel: m, closeProps: h, onClose: g, class: _ = "", ...b }, x) => /* @__PURE__ */ c(p, {
|
|
96
|
-
...b,
|
|
97
|
-
ref: x,
|
|
98
|
-
class: `rv-dialog__header--editable ${_}`,
|
|
99
|
-
children: [/* @__PURE__ */ c("div", {
|
|
100
|
-
class: `rv-dialog__heading ${l}`,
|
|
101
|
-
children: [
|
|
102
|
-
!a && n && /* @__PURE__ */ s("span", {
|
|
103
|
-
class: `rv-dialog__kicker ${u}`,
|
|
104
|
-
children: n
|
|
105
|
-
}),
|
|
106
|
-
!a && (f === !1 ? /* @__PURE__ */ s("h3", {
|
|
107
|
-
id: e,
|
|
108
|
-
class: `rv-dialog__title ${d}`,
|
|
109
|
-
children: t
|
|
110
|
-
}) : /* @__PURE__ */ c(o, { children: [/* @__PURE__ */ s("h3", {
|
|
111
|
-
id: e,
|
|
112
|
-
class: `rv-dialog__sr-only ${d}`,
|
|
113
|
-
children: t
|
|
114
|
-
}), /* @__PURE__ */ s(y, {
|
|
115
|
-
"aria-label": i,
|
|
116
|
-
value: t,
|
|
117
|
-
...f
|
|
118
|
-
})] })),
|
|
119
|
-
r && /* @__PURE__ */ s("div", {
|
|
120
|
-
class: "rv-dialog__description",
|
|
121
|
-
children: r
|
|
122
|
-
})
|
|
123
|
-
]
|
|
124
|
-
}), g && /* @__PURE__ */ s(v, {
|
|
125
|
-
...h,
|
|
126
|
-
"aria-label": m,
|
|
127
|
-
onClick: g
|
|
128
|
-
})]
|
|
129
|
-
}));
|
|
130
|
-
function x(e) {
|
|
131
|
-
return d(a, e);
|
|
132
|
-
}
|
|
133
|
-
//#endregion
|
|
134
|
-
export { g as a, y as c, f as d, d as f, v as i, b as l, _ as n, m as o, h as r, p as s, x as t, u };
|
|
@@ -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 };
|