@revolist/ui 4.0.2-rc → 4.0.2
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/MIGRATION.md +36 -0
- package/OWNERSHIP.md +32 -32
- package/README.md +405 -265
- package/_button.scss +6 -2
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-CpaUK7w1.js → calendar-CgXQgkga.js} +28 -18
- package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
- package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
- package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
- package/_chunks/choice-chips-SkllS5Kl.js +126 -0
- package/_chunks/clock-BOhPNlW3.js +4 -0
- package/_chunks/{color-palette-BBMFmUNA.js → color-palette-DMJUChWC.js} +20 -22
- package/_chunks/{color-picker-D90Jg-M8.js → color-picker-BpCTuIdm.js} +77 -72
- package/_chunks/{component-YDcfoOLz.js → component-CfeHXgIw.js} +301 -282
- package/_chunks/{component-metadata-BENbgTjU.js → component-metadata-BKd7U8OW.js} +0 -12
- package/_chunks/configurator-actions-DnStE6Yl.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/control-Dcrjsunl.js +118 -0
- package/_chunks/{controls-DIum-E66.js → controls-B_6NJarZ.js} +217 -182
- package/_chunks/{date-control-BJSzu79z.js → date-control-C4h4m75W.js} +1 -1
- package/_chunks/{date-time-BxPJusp9.js → date-time-CTOSbzb0.js} +344 -307
- package/_chunks/{delete-button-Bblyah10.js → delete-button-CW9vjLnk.js} +6 -6
- package/_chunks/dialog.parts-3w5FR06n.js +131 -0
- package/_chunks/{duration-87U2EoMS.js → duration-Bf2OS1V5.js} +19 -18
- package/_chunks/editor-popup-ByU7qiub.js +82 -0
- package/_chunks/field-configurator-D5dZRhDe.js +288 -0
- package/_chunks/field-context-D57PnBbH.js +5 -0
- package/_chunks/{framework-mount-C-Zwm44H.js → framework-mount-Bk4O_T7T.js} +1 -1
- package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/mount-BRdcG60g.js +267 -0
- package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
- package/_chunks/native-control-B_fVA5bL.js +649 -0
- package/_chunks/{number-input-BeIadZuL.js → number-input-CmM6_2vR.js} +7 -7
- package/_chunks/{picker-DpP7iQLA.js → picker-DTqET-2W.js} +2 -2
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/popup-C35Isk7p.js +378 -0
- package/_chunks/{rating-choice-Ca8ZBty3.js → rating-choice-C-6wcb9U.js} +1 -1
- package/_chunks/render-m5eMMwFR.js +83 -0
- package/_chunks/{reorder-list-Cc3KmfAN.js → reorder-list-DIl1gkV6.js} +1 -1
- package/_chunks/request-trail-DrhdpWiH.js +762 -0
- package/_chunks/rich-text-BnilBbhU.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/rotate-right-Iha5ScJ1.js +4 -0
- package/_chunks/selection-list-tooltips-C5oMJe26.js +42 -0
- package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
- package/_chunks/tooltip-D4xkio5G.js +54 -0
- package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
- package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
- package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
- package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
- package/_dialog.scss +55 -21
- package/_form.scss +71 -21
- package/_legend.scss +25 -7
- package/_shared/data-query/index.d.ts +2 -2
- package/_shared/data-query/load-options.d.ts +2 -2
- package/_variables.scss +34 -32
- package/_view-switcher.scss +6 -0
- package/activity-message.d.ts +1 -1
- package/ai/_chat.scss +227 -0
- package/ai/_style.scss +170 -39
- package/ai/chat.d.ts +65 -0
- package/ai/components.d.ts +34 -5
- package/ai/index.d.ts +3 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +59 -6
- package/ai/prompt-history.d.ts +13 -0
- package/ai/request-trail.d.ts +9 -3
- package/ai/results/_style.scss +83 -0
- package/ai/results/index.d.ts +11 -0
- package/ai/results/metrics.d.ts +5 -0
- package/ai/results/table.d.ts +5 -0
- package/ai/results/text.d.ts +5 -0
- package/ai/results/types.d.ts +29 -0
- package/ai/transcript.d.ts +27 -0
- package/ai/translations.d.ts +1 -1
- package/angular/angular.d.ts +1 -1
- package/angular/angular.js +13 -10
- package/assignee/assignee.scss +28 -6
- package/assignee/index.js +34 -35
- package/avatar/avatar.style.scss +23 -6
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +33 -32
- package/badge.d.ts +1 -1
- package/badge.view.d.ts +8 -0
- package/brush-range/_brush-range.scss +55 -49
- package/brush-range/component.d.ts +1 -3
- package/brush-range/component.js +27 -27
- package/buttons/delete-button.d.ts +2 -1
- package/buttons/delete-button.js +1 -1
- package/buttons/delete-button.style.scss +6 -2
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.js +1 -1
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +2 -1
- package/buttons/svg-button.js +19 -19
- package/calendar/_calendar.scss +27 -26
- package/calendar/calendar.js +1 -1
- package/calendar/header.js +1 -2
- package/calendar/index.js +2 -2
- package/cell-input.scss +3 -7
- package/cell-visuals/badge.style.scss +6 -3
- package/cell-visuals/bar-chart.style.scss +2 -1
- package/cell-visuals/column-type.style.css +12 -0
- package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
- package/cell-visuals/progress-line.style.scss +1 -4
- package/cell-visuals/sparkline.style.scss +2 -1
- package/cell-visuals/timeline.style.css +4 -2
- package/checkbox/checkbox.scss +6 -24
- package/choice-chips/index.d.ts +3 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +88 -25
- package/color-palette/color-picker.js +2 -2
- package/color-palette/color-picker.style.scss +23 -10
- package/color-palette/common-palettes.d.ts +1 -1
- package/color-palette/common-palettes.js +1 -1
- package/color-palette/native.d.ts +15 -2
- package/component-catalog.d.ts +24 -11
- package/configurator-actions.d.ts +67 -0
- package/configurator-actions.js +1 -0
- package/configurator-aggregation-list.d.ts +14 -0
- package/configurator-aggregation-list.js +63 -0
- package/configurator-drop-zone.d.ts +39 -0
- package/configurator-drop-zone.js +66 -0
- package/configurator-field-icon.d.ts +10 -0
- package/configurator-field-icon.js +1 -0
- package/configurator-focus.d.ts +4 -0
- package/configurator-focus.js +39 -0
- package/configurator-sections.d.ts +42 -0
- package/configurator-sections.js +71 -0
- package/control-attributes.js +7 -7
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +25 -20
- package/controls.d.ts +19 -7
- package/controls.js +4 -3
- package/core/editor-popup-position.d.ts +6 -2
- package/core/editor-popup.d.ts +4 -0
- package/core/editor-popup.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/selection-list-tooltips.d.ts +2 -0
- package/core/title-tooltip.d.ts +2 -0
- package/core/tooltip-session.d.ts +29 -0
- package/core/tooltip-surface.d.ts +13 -0
- package/core/tooltip-text.d.ts +6 -0
- package/core/tooltip.d.ts +35 -0
- package/core/top-layer-popup.d.ts +4 -0
- package/core/top-layer-popup.js +1 -23
- package/date-time/attach.d.ts +1 -1
- package/date-time/date-control.d.ts +1 -1
- package/date-time/field.d.ts +3 -2
- package/date-time/index.js +1 -1
- package/date-time/style.scss +242 -39
- package/date-time/time-selection.d.ts +3 -1
- package/date-time/types.d.ts +5 -1
- package/dialog/dialog-action-footer.d.ts +17 -2
- package/dialog/dialog.dom.d.ts +15 -2
- package/dialog/dialog.dom.js +3 -3
- package/dialog/dialog.parts.d.ts +1 -1
- package/dialog/dialog.parts.js +1 -1
- package/distribution-chart/_distribution-chart.scss +113 -77
- package/distribution-chart/area-chart.js +1 -1
- package/distribution-chart/bar-chart.d.ts +5 -2
- package/distribution-chart/bar-chart.js +7 -3
- package/distribution-chart/chart-frame.d.ts +2 -1
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/line-chart.js +1 -1
- package/dropdown/content.d.ts +2 -1
- package/dropdown/content.js +1 -142
- package/dropdown/control.d.ts +14 -0
- package/dropdown/control.js +1 -0
- package/dropdown/control.view.d.ts +6 -0
- package/dropdown/dropdown.types.d.ts +5 -1
- package/dropdown/editor-dropdown.style.scss +54 -16
- package/dropdown/index.d.ts +1 -1
- package/dropdown/index.js +3 -4
- package/dropdown/lookup-field.d.ts +5 -0
- package/dropdown/lookup-field.js +2 -1
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -141
- package/duration/index.js +1 -1
- package/duration/style.scss +1 -1
- package/editor-actions.js +1 -1
- package/editor-layout/index.d.ts +4 -4
- package/editor-layout/index.js +39 -34
- package/editor-layout/style.scss +82 -18
- package/field-configurator.d.ts +39 -1
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/fieldset.d.ts +3 -0
- package/filter/filters/slider/_single-slider.scss +57 -38
- package/filter/filters/slider/_slider.scss +41 -33
- package/filter/filters/slider/control.js +2 -0
- package/filter/filters/slider/runtime.js +49 -22
- package/filter/filters/slider/single.js +1 -1
- package/filter-badge.js +1 -1
- package/filter-controls.d.ts +0 -1
- package/filter-controls.js +9 -10
- package/form-controls/field-context.d.ts +5 -0
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +4 -9
- package/form-controls/presentation.d.ts +1 -1
- package/form-controls/presentation.js +53 -45
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +40 -35
- package/formatting/styles.scss +14 -57
- package/framework.js +237 -226
- package/history-controls.d.ts +14 -0
- package/history-controls.js +27 -0
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/icons/icon.d.ts +1 -1
- package/legend.d.ts +1 -1
- package/masked-input/index.js +1 -1
- package/native-control.d.ts +6 -5
- package/native-control.js +3 -26
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native-styles.scss +6 -2
- package/native.d.ts +3 -3
- package/native.js +41 -37
- package/number-input/index.d.ts +1 -1
- package/number-input/index.js +1 -1
- package/package.json +88 -14
- package/pagination.d.ts +3 -0
- package/pagination.js +50 -40
- package/pdf-viewer/header.d.ts +1 -1
- package/pdf-viewer/index.d.ts +2 -2
- package/pdf-viewer/index.js +1 -1
- package/pdf-viewer/search-bar.d.ts +1 -1
- package/pdf-viewer/status.d.ts +1 -1
- package/pdf-viewer/style.scss +205 -45
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +15 -10
- package/preact.js +109 -64
- package/progress/_bar.scss +9 -3
- package/progress/_circular.scss +2 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +4 -2
- package/react-control.d.ts +1 -0
- package/react.d.ts +20 -11
- package/react.js +72 -88
- package/reorder-list.d.ts +1 -1
- package/reorder-list.js +1 -1
- package/reorder-list.scss +59 -17
- package/resource-picker/resource-picker-popup.js +1 -1
- package/resource-picker/resource-picker.js +73 -71
- package/resource-picker/resource-picker.scss +66 -35
- package/rich-text/engine.d.ts +17 -19
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +11 -7
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +6 -3
- package/rich-text/render-model.d.ts +4 -5
- package/rich-text/style.scss +295 -55
- package/rich-text/syntax.d.ts +5 -2
- package/rich-text/toolbar.d.ts +6 -6
- package/rich-text/translations.d.ts +5 -15
- package/search-input/index.js +1 -1
- package/search-input/native.d.ts +21 -2
- package/select.d.ts +22 -0
- package/select.js +1 -0
- package/selection-list.d.ts +1 -0
- package/selection-list.js +3 -1
- package/status-feedback/exit-snapshot.js +1 -1
- package/status-feedback/index.js +2 -2
- package/status-feedback/popover.js +9 -9
- package/status-feedback/render.js +3 -44
- package/status-feedback/status-feedback.scss +130 -34
- package/status-feedback/types.d.ts +4 -0
- package/status-feedback/use-auto-dismiss.d.ts +3 -0
- package/styles/_activity-message.scss +24 -7
- package/styles/_alert.scss +78 -17
- package/styles/_cell-editor-frame.scss +11 -0
- package/styles/_compositions.scss +404 -82
- package/styles/_control.scss +42 -12
- package/styles/_disclosure.scss +15 -5
- package/styles/_editor-counter.scss +16 -6
- package/styles/_editor-slider.scss +8 -4
- package/styles/_field-configurator.scss +321 -23
- package/styles/_fields-grid.scss +49 -0
- package/styles/_filter-controls.scss +10 -2
- package/styles/_icon-action.scss +48 -15
- package/styles/_loading.scss +12 -3
- package/styles/_motion.scss +32 -9
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +376 -116
- package/styles/_theme.scss +130 -86
- package/styles/_thresholds.scss +28 -25
- package/styles/_time-grid.scss +8 -3
- package/styles/_tokens.scss +6 -1
- package/styles/configurator-actions.scss +241 -0
- package/styles/pagination.css +213 -0
- package/styles/{legacy-rating.css → rating.css} +8 -3
- package/styles.css +1 -1
- package/styles.scss +3 -5
- package/surfaces.d.ts +38 -2
- package/surfaces.js +37 -134
- package/svelte/UiComponent.server.js +1 -48
- package/svelte/UiComponent.svelte +44 -32
- package/svelte.d.ts +1 -1
- package/svelte.js +33 -68
- package/switch/index.js +15 -14
- package/time-grid.d.ts +0 -1
- package/time-grid.js +38 -37
- package/timeline-track/_style.scss +96 -24
- package/timeline-track/component.d.ts +5 -1
- package/timeline-track/index.js +71 -54
- package/timeline-track/model.d.ts +9 -0
- package/timeline-track/model.js +10 -1
- package/ui.css +1 -1
- package/view-switcher.d.ts +23 -0
- package/vue.d.ts +51 -35
- package/vue.js +149 -178
- package/_chunks/chart-frame-BC99KjGa.js +0 -127
- package/_chunks/choice-chips-Cs4D-3nH.js +0 -110
- package/_chunks/compat.module-DDB2pm9O.js +0 -229
- package/_chunks/control-tooltip-ztgmsG7H.js +0 -100
- package/_chunks/dialog.parts-DBqo3Qwb.js +0 -134
- package/_chunks/dropdown-voWqmwAe.js +0 -357
- package/_chunks/editor-popup-D3JdS8l3.js +0 -81
- package/_chunks/mount-DZe_6VtR.js +0 -90
- package/_chunks/request-trail-IdNiFvKH.js +0 -347
- package/_chunks/rich-text-BzI1DyfF.js +0 -477
- package/avatar/index.view.d.ts +0 -25
- package/color-palette/native.view.d.ts +0 -15
- package/control-presentation.view.d.ts +0 -8
- package/dialog/dialog-action-footer.view.d.ts +0 -20
- package/dialog/dialog.dom.view.d.ts +0 -15
- package/form-controls/index.view.d.ts +0 -12
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/react-native-select.d.ts +0 -6
- package/search-input/native.view.d.ts +0 -21
- package/styles/legacy-pagination.css +0 -112
- package/surfaces.view.d.ts +0 -63
- package/vue-native-select.d.ts +0 -9
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { c as e, i as t } from "./preact.module-BBM36DnO.js";
|
|
2
|
-
import { t as n } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import { n as r } from "./compat.module-DDB2pm9O.js";
|
|
4
|
-
import { createPreactElement as i, releasePreactElement as a } from "../preact-mount.js";
|
|
5
|
-
import { ButtonControl as o, Input as s } from "../native-control.js";
|
|
6
|
-
import { t as c } from "./xmark-DD_PBvZI.js";
|
|
7
|
-
//#region src/dialog/dialog-action-footer.view.tsx
|
|
8
|
-
function l({ cancel: e = {}, save: t = {}, deleteAction: r = !1, reset: i = !1, start: a, end: s, children: c, actionsClass: l = "", class: u = "", ...d }) {
|
|
9
|
-
let f = (e, t, r, i = "", a = "button") => {
|
|
10
|
-
if (t === !1) return null;
|
|
11
|
-
let { label: s = r, class: c = "", ...l } = t;
|
|
12
|
-
return /* @__PURE__ */ n(o, {
|
|
13
|
-
type: a,
|
|
14
|
-
...l,
|
|
15
|
-
class: `rv-btn ${i} ${c}`,
|
|
16
|
-
"data-dialog-action": e,
|
|
17
|
-
children: s
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
return /* @__PURE__ */ n("footer", {
|
|
21
|
-
...d,
|
|
22
|
-
class: `rv-dialog__footer rv-dialog__action-footer ${u}`,
|
|
23
|
-
children: [c, /* @__PURE__ */ n("div", {
|
|
24
|
-
class: "rv-dialog__action-panel",
|
|
25
|
-
children: [/* @__PURE__ */ n("div", {
|
|
26
|
-
class: "rv-dialog__action-start",
|
|
27
|
-
children: [
|
|
28
|
-
a,
|
|
29
|
-
f("delete", r, "Delete", "rv-btn-danger-outline"),
|
|
30
|
-
f("reset", i, "Reset")
|
|
31
|
-
]
|
|
32
|
-
}), /* @__PURE__ */ n("div", {
|
|
33
|
-
class: `rv-dialog__actions ${l}`,
|
|
34
|
-
children: [
|
|
35
|
-
s,
|
|
36
|
-
f("cancel", e, "Cancel"),
|
|
37
|
-
f("save", t, "Save", "rv-btn-primary", "submit")
|
|
38
|
-
]
|
|
39
|
-
})]
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
function u(e, t) {
|
|
44
|
-
return /* @__PURE__ */ n(l, { ...t });
|
|
45
|
-
}
|
|
46
|
-
function d(e, t) {
|
|
47
|
-
let r = i(e.ownerDocument, /* @__PURE__ */ n(l, { ...t }));
|
|
48
|
-
return e.append(r), { destroy() {
|
|
49
|
-
a(r);
|
|
50
|
-
} };
|
|
51
|
-
}
|
|
52
|
-
//#endregion
|
|
53
|
-
//#region src/dialog/dialog.parts.tsx
|
|
54
|
-
var f = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("header", {
|
|
55
|
-
...t,
|
|
56
|
-
ref: r,
|
|
57
|
-
class: `rv-dialog__header ${e}`
|
|
58
|
-
}));
|
|
59
|
-
function p({ class: e = "", ...t }) {
|
|
60
|
-
return /* @__PURE__ */ n("form", {
|
|
61
|
-
...t,
|
|
62
|
-
class: `rv-dialog__surface ${e}`
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
var m = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("div", {
|
|
66
|
-
...t,
|
|
67
|
-
ref: r,
|
|
68
|
-
class: `rv-dialog__body ${e}`
|
|
69
|
-
})), h = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("footer", {
|
|
70
|
-
...t,
|
|
71
|
-
ref: r,
|
|
72
|
-
class: `rv-dialog__footer ${e}`
|
|
73
|
-
})), g = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n("div", {
|
|
74
|
-
...t,
|
|
75
|
-
ref: r,
|
|
76
|
-
class: `rv-dialog__actions ${e}`
|
|
77
|
-
}));
|
|
78
|
-
function _({ class: e = "", iconClass: t = "", ...r }) {
|
|
79
|
-
return /* @__PURE__ */ n(o, {
|
|
80
|
-
...r,
|
|
81
|
-
unstyled: !0,
|
|
82
|
-
type: "button",
|
|
83
|
-
class: `rv-dialog__close ${e}`,
|
|
84
|
-
children: /* @__PURE__ */ n("span", {
|
|
85
|
-
class: `rv-dialog__close-icon ${t}`,
|
|
86
|
-
"aria-hidden": "true",
|
|
87
|
-
dangerouslySetInnerHTML: { __html: c }
|
|
88
|
-
})
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
var v = r(({ class: e = "", ...t }, r) => /* @__PURE__ */ n(s, {
|
|
92
|
-
...t,
|
|
93
|
-
ref: r,
|
|
94
|
-
class: `rv-dialog__title-input ${e}`
|
|
95
|
-
})), y = r(({ titleId: e, title: r, name: i, description: a, inputLabel: o, titleHidden: s, headingClass: c = "", kickerClass: l = "", titleClass: u = "", inputProps: d, closeLabel: p, closeProps: m, onClose: h, class: g = "", ...y }, b) => /* @__PURE__ */ n(f, {
|
|
96
|
-
...y,
|
|
97
|
-
ref: b,
|
|
98
|
-
class: `rv-dialog__header--editable ${g}`,
|
|
99
|
-
children: [/* @__PURE__ */ n("div", {
|
|
100
|
-
class: `rv-dialog__heading ${c}`,
|
|
101
|
-
children: [
|
|
102
|
-
!s && i && /* @__PURE__ */ n("span", {
|
|
103
|
-
class: `rv-dialog__kicker ${l}`,
|
|
104
|
-
children: i
|
|
105
|
-
}),
|
|
106
|
-
!s && (d === !1 ? /* @__PURE__ */ n("h3", {
|
|
107
|
-
id: e,
|
|
108
|
-
class: `rv-dialog__title ${u}`,
|
|
109
|
-
children: r
|
|
110
|
-
}) : /* @__PURE__ */ n(t, { children: [/* @__PURE__ */ n("h3", {
|
|
111
|
-
id: e,
|
|
112
|
-
class: `rv-dialog__sr-only ${u}`,
|
|
113
|
-
children: r
|
|
114
|
-
}), /* @__PURE__ */ n(v, {
|
|
115
|
-
"aria-label": o,
|
|
116
|
-
value: r,
|
|
117
|
-
...d
|
|
118
|
-
})] })),
|
|
119
|
-
a && /* @__PURE__ */ n("div", {
|
|
120
|
-
class: "rv-dialog__description",
|
|
121
|
-
children: a
|
|
122
|
-
})
|
|
123
|
-
]
|
|
124
|
-
}), h && /* @__PURE__ */ n(_, {
|
|
125
|
-
...m,
|
|
126
|
-
"aria-label": p,
|
|
127
|
-
onClick: h
|
|
128
|
-
})]
|
|
129
|
-
}));
|
|
130
|
-
function b(t) {
|
|
131
|
-
return u(e, t);
|
|
132
|
-
}
|
|
133
|
-
//#endregion
|
|
134
|
-
export { h as a, v as c, d, u as f, _ as i, y as l, g as n, p as o, m as r, f as s, b as t, l as u };
|
|
@@ -1,357 +0,0 @@
|
|
|
1
|
-
import { c as e, r as t } from "./preact.module-BBM36DnO.js";
|
|
2
|
-
import { c as n, i as r, n as i, r as a, t as o } from "./hooks.module-CG3gN83z.js";
|
|
3
|
-
import { t as s } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
-
import { t as c } from "./chevron-down-GbplLa6s.js";
|
|
5
|
-
import { RemoveButton as l } from "../buttons/remove-button.js";
|
|
6
|
-
import { DropdownPopup as u } from "../dropdown/popup.js";
|
|
7
|
-
import { DropdownPopupContent as d } from "../dropdown/content.js";
|
|
8
|
-
//#region src/dropdown/remote.ts
|
|
9
|
-
var f = {
|
|
10
|
-
loading: "Loading…",
|
|
11
|
-
empty: "No results found",
|
|
12
|
-
error: "Unable to load options.",
|
|
13
|
-
retry: "Retry",
|
|
14
|
-
loadMore: "Load more",
|
|
15
|
-
unavailable: (e) => `Unavailable (${String(e)})`
|
|
16
|
-
}, p = class {
|
|
17
|
-
source;
|
|
18
|
-
context;
|
|
19
|
-
changed;
|
|
20
|
-
text;
|
|
21
|
-
settings;
|
|
22
|
-
cache = /* @__PURE__ */ new Map();
|
|
23
|
-
ids = [];
|
|
24
|
-
items = [];
|
|
25
|
-
query = "";
|
|
26
|
-
cursor;
|
|
27
|
-
seen = /* @__PURE__ */ new Set();
|
|
28
|
-
searchAbort;
|
|
29
|
-
resolveAbort;
|
|
30
|
-
timer;
|
|
31
|
-
generation = 0;
|
|
32
|
-
resolution = 0;
|
|
33
|
-
disposed = !1;
|
|
34
|
-
loading = !1;
|
|
35
|
-
searchFailed = !1;
|
|
36
|
-
failedCursor;
|
|
37
|
-
resolveFailed = !1;
|
|
38
|
-
opened = !1;
|
|
39
|
-
constructor(e, t, n, r = f, i = {}) {
|
|
40
|
-
this.source = e, this.context = t, this.changed = n, this.text = r, this.settings = i;
|
|
41
|
-
}
|
|
42
|
-
remember(e) {
|
|
43
|
-
for (let t of e) {
|
|
44
|
-
if (typeof t.value != "string" && (typeof t.value != "number" || !Number.isFinite(t.value))) throw TypeError("Remote dropdown values must be finite numeric or string IDs.");
|
|
45
|
-
this.cache.set(t.value, t);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
emit() {
|
|
49
|
-
this.disposed || this.changed({
|
|
50
|
-
items: [...this.items],
|
|
51
|
-
selected: this.ids.map((e) => this.cache.get(e) ?? {
|
|
52
|
-
value: e,
|
|
53
|
-
label: this.text.unavailable(e),
|
|
54
|
-
unresolved: !0
|
|
55
|
-
}),
|
|
56
|
-
loading: this.loading,
|
|
57
|
-
error: this.searchFailed || this.resolveFailed,
|
|
58
|
-
hasMore: this.cursor !== void 0
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
setSelected(e, t = []) {
|
|
62
|
-
this.remember(t), this.ids = [...new Set(e)], this.resolveAbort?.abort();
|
|
63
|
-
let n = ++this.resolution, r = this.ids.filter((e) => !this.cache.has(e));
|
|
64
|
-
if (this.resolveFailed = !1, this.emit(), !r.length || this.disposed) return;
|
|
65
|
-
let i = this.resolveAbort = new AbortController();
|
|
66
|
-
Promise.resolve().then(() => this.source.resolve({
|
|
67
|
-
ids: r,
|
|
68
|
-
signal: i.signal,
|
|
69
|
-
context: this.context
|
|
70
|
-
})).then((e) => {
|
|
71
|
-
this.disposed || i.signal.aborted || n !== this.resolution || (this.remember(e), this.emit());
|
|
72
|
-
}).catch(() => {
|
|
73
|
-
this.disposed || i.signal.aborted || n !== this.resolution || (this.resolveFailed = !0, this.emit());
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
search(e, t = !1) {
|
|
77
|
-
this.disposed || (this.opened = !0, this.query = e, this.searchAbort?.abort(), clearTimeout(this.timer), ++this.generation, this.items = [], this.cursor = void 0, this.seen.clear(), this.loading = !0, this.searchFailed = !1, this.emit(), t ? this.page(void 0, this.generation) : this.timer = setTimeout(() => void this.page(void 0, this.generation), this.settings.debounceMs ?? 200));
|
|
78
|
-
}
|
|
79
|
-
async page(e, t) {
|
|
80
|
-
if (this.disposed || t !== this.generation || this.seen.has(e)) return;
|
|
81
|
-
this.seen.add(e), this.loading = !0, this.searchFailed = !1, this.emit();
|
|
82
|
-
let n = this.searchAbort = new AbortController();
|
|
83
|
-
try {
|
|
84
|
-
let r = await this.source.search({
|
|
85
|
-
query: this.query,
|
|
86
|
-
cursor: e,
|
|
87
|
-
pageSize: this.settings.pageSize ?? 50,
|
|
88
|
-
signal: n.signal,
|
|
89
|
-
context: this.context
|
|
90
|
-
});
|
|
91
|
-
if (this.disposed || n.signal.aborted || t !== this.generation) return;
|
|
92
|
-
this.remember(r.items);
|
|
93
|
-
let i = new Map(this.items.map((e) => [e.value, e]));
|
|
94
|
-
r.items.forEach((e) => i.set(e.value, e)), this.items = [...i.values()], this.cursor = r.nextCursor ?? void 0, this.seen.has(this.cursor) && (this.cursor = void 0);
|
|
95
|
-
} catch {
|
|
96
|
-
if (this.disposed || n.signal.aborted || t !== this.generation) return;
|
|
97
|
-
this.seen.delete(e), this.failedCursor = e, this.searchFailed = !0;
|
|
98
|
-
} finally {
|
|
99
|
-
!this.disposed && !n.signal.aborted && t === this.generation && (this.loading = !1, this.emit());
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
loadMore() {
|
|
103
|
-
!this.loading && !this.searchFailed && this.cursor !== void 0 && this.page(this.cursor, this.generation);
|
|
104
|
-
}
|
|
105
|
-
retry() {
|
|
106
|
-
this.resolveFailed && this.setSelected(this.ids), this.searchFailed && this.opened && this.page(this.failedCursor, this.generation);
|
|
107
|
-
}
|
|
108
|
-
close() {
|
|
109
|
-
this.opened = !1, this.searchAbort?.abort(), clearTimeout(this.timer), ++this.generation, this.loading = !1, this.emit();
|
|
110
|
-
}
|
|
111
|
-
destroy() {
|
|
112
|
-
this.disposed = !0, this.close(), this.resolveAbort?.abort(), ++this.resolution;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
//#endregion
|
|
116
|
-
//#region src/dropdown/remote-hook.ts
|
|
117
|
-
function ee(e) {
|
|
118
|
-
let t = i(() => ({
|
|
119
|
-
...f,
|
|
120
|
-
...e.remoteText
|
|
121
|
-
}), [e.remoteText]), [s, c] = r({
|
|
122
|
-
items: [],
|
|
123
|
-
selected: [],
|
|
124
|
-
loading: !1,
|
|
125
|
-
error: !1,
|
|
126
|
-
hasMore: !1
|
|
127
|
-
}), l = o(), u = e.value === null || e.value === void 0 ? [] : Array.isArray(e.value) ? e.value : [e.value], d = JSON.stringify(u);
|
|
128
|
-
return a(() => {
|
|
129
|
-
if (!e.dataSource || e.disabled) {
|
|
130
|
-
c({
|
|
131
|
-
items: [],
|
|
132
|
-
selected: [],
|
|
133
|
-
loading: !1,
|
|
134
|
-
error: !1,
|
|
135
|
-
hasMore: !1
|
|
136
|
-
});
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
let n = new p(e.dataSource, e.dataContext, c, t);
|
|
140
|
-
return l.current = n, () => {
|
|
141
|
-
n.destroy(), l.current === n && (l.current = void 0);
|
|
142
|
-
};
|
|
143
|
-
}, [
|
|
144
|
-
e.dataSource,
|
|
145
|
-
e.dataContext,
|
|
146
|
-
e.disabled,
|
|
147
|
-
t
|
|
148
|
-
]), a(() => {
|
|
149
|
-
l.current?.setSelected(u, e.source);
|
|
150
|
-
}, [
|
|
151
|
-
d,
|
|
152
|
-
e.source,
|
|
153
|
-
e.dataSource,
|
|
154
|
-
e.dataContext,
|
|
155
|
-
e.disabled,
|
|
156
|
-
t
|
|
157
|
-
]), n(() => {
|
|
158
|
-
e.open ? l.current?.search(e.initialQuery, !0) : l.current?.close();
|
|
159
|
-
}, [
|
|
160
|
-
e.open,
|
|
161
|
-
e.dataSource,
|
|
162
|
-
e.dataContext,
|
|
163
|
-
e.disabled,
|
|
164
|
-
e.initialQuery,
|
|
165
|
-
t
|
|
166
|
-
]), {
|
|
167
|
-
...s,
|
|
168
|
-
text: t,
|
|
169
|
-
search: (e) => l.current?.search(e),
|
|
170
|
-
loadMore: () => l.current?.loadMore(),
|
|
171
|
-
retry: () => l.current?.retry()
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
//#endregion
|
|
175
|
-
//#region src/dropdown/index.tsx
|
|
176
|
-
var m = ({ options: t, className: n, renderValue: r }) => /* @__PURE__ */ s("span", {
|
|
177
|
-
className: `selected-value ${n}`,
|
|
178
|
-
children: r ? r(e, t[0]) : t[0].label
|
|
179
|
-
}), h = ({ options: t, removeOption: n, className: r, renderValue: i, disabled: a, removeLabel: o }) => /* @__PURE__ */ s("div", {
|
|
180
|
-
className: `selected-values ${r}`,
|
|
181
|
-
children: t.map((t, r) => /* @__PURE__ */ s("span", {
|
|
182
|
-
className: "selected-tag",
|
|
183
|
-
children: [i ? i(e, t) : t.label, !a && !t.disabled && /* @__PURE__ */ s(l, {
|
|
184
|
-
compact: !0,
|
|
185
|
-
onClick: (e) => {
|
|
186
|
-
e.stopPropagation(), n(t);
|
|
187
|
-
},
|
|
188
|
-
locale: {
|
|
189
|
-
title: o?.(t.label) ?? `Remove ${t.label}`,
|
|
190
|
-
ariaLabel: o?.(t.label) ?? `Remove ${t.label}`
|
|
191
|
-
}
|
|
192
|
-
})]
|
|
193
|
-
}, r))
|
|
194
|
-
}), g = ({ className: e }) => /* @__PURE__ */ s("span", {
|
|
195
|
-
className: `dropdown-arrow ${e}`,
|
|
196
|
-
"aria-hidden": "true",
|
|
197
|
-
dangerouslySetInnerHTML: { __html: c }
|
|
198
|
-
}), te = ({ placeholder: e, className: t }) => [/* @__PURE__ */ s("span", {
|
|
199
|
-
className: `placeholder px-2 ${t}`,
|
|
200
|
-
children: e
|
|
201
|
-
}), /* @__PURE__ */ s(g, { className: "mr-2" })];
|
|
202
|
-
function _({ source: t, dataSource: a, dataContext: c, remoteText: l, value: f, onChange: p, placeholder: _ = "Select an option", disabled: v = !1, name: y, id: b, className: ne = "", style: re, config: x = {}, renderContent: S, renderOption: ie, renderValue: C, renderPlaceholder: w, renderSelectedValue: T, renderNoResults: ae, onClose: E, beforeOutsideClose: D, environment: O }) {
|
|
203
|
-
let { search: k = !1, searchPlaceholder: A = "Search...", closeOnClickOutside: j = !0, autoOpen: M = !1, multiSelect: N = !1, portalTarget: P, ariaLabel: F, ariaLabelledBy: I, ariaDescribedBy: L, popupClassName: R, maxHeight: oe } = x, z = o(null), B = P ?? (x.topLayer ? z.current?.closest("revo-grid") : void 0) ?? (typeof document < "u" ? document.body : null), V = i(() => b || `dropdown-${Math.random().toString(36).substring(2, 9)}`, [b]), H = `${V}-listbox`, se = `${V}-search`, U = `${V}-menu`, [W, G] = r(M && !v), [ce, K] = r(!v && (M || !!x.autoFocus)), q = o(M), J = x.theme ?? "default";
|
|
204
|
-
n(() => {
|
|
205
|
-
M && !q.current && !v && (K(!0), G(!0)), q.current = M;
|
|
206
|
-
}, [M, v]), n(() => {
|
|
207
|
-
v && W && (G(!1), E?.(!1));
|
|
208
|
-
}, [v, W]);
|
|
209
|
-
let Y = ee({
|
|
210
|
-
dataSource: a,
|
|
211
|
-
dataContext: c,
|
|
212
|
-
remoteText: l,
|
|
213
|
-
value: f,
|
|
214
|
-
disabled: v,
|
|
215
|
-
source: t,
|
|
216
|
-
open: W,
|
|
217
|
-
initialQuery: x.initialSearch ?? ""
|
|
218
|
-
}), X = a ? [...new Map([...Y.selected, ...Y.items].map((e) => [e.value, e])).values()] : t, Z = i(() => {
|
|
219
|
-
if (f === void 0) return [];
|
|
220
|
-
if (N && Array.isArray(f)) return X.filter((e) => f.some((t) => JSON.stringify(t) === JSON.stringify(e.value)));
|
|
221
|
-
{
|
|
222
|
-
let e = X.find((e) => JSON.stringify(e.value) === JSON.stringify(f));
|
|
223
|
-
return e ? [e] : [];
|
|
224
|
-
}
|
|
225
|
-
}, [
|
|
226
|
-
f,
|
|
227
|
-
X,
|
|
228
|
-
N
|
|
229
|
-
]), Q = () => {
|
|
230
|
-
v || G((e) => {
|
|
231
|
-
let t = !e;
|
|
232
|
-
return t && K(!0), t;
|
|
233
|
-
});
|
|
234
|
-
}, $ = (e = !1) => {
|
|
235
|
-
G((t) => (t && E?.(e), !1));
|
|
236
|
-
};
|
|
237
|
-
n(() => {
|
|
238
|
-
if (!W) return;
|
|
239
|
-
let e = z.current;
|
|
240
|
-
if (e) return O?.onOpen?.(e, $);
|
|
241
|
-
}, [W]);
|
|
242
|
-
let le = (e) => {
|
|
243
|
-
if (!(v || e.disabled)) {
|
|
244
|
-
if (N) {
|
|
245
|
-
let t = Z.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), n;
|
|
246
|
-
n = t ? Z.filter((t) => JSON.stringify(t.value) !== JSON.stringify(e.value)) : [...Z, e], p && p(n.map((e) => e.value));
|
|
247
|
-
} else p && p(e.value), $();
|
|
248
|
-
}
|
|
249
|
-
};
|
|
250
|
-
return n(() => {
|
|
251
|
-
if (!j || !W) return;
|
|
252
|
-
let e = B?.ownerDocument ?? z.current?.ownerDocument ?? (typeof document < "u" ? document : void 0);
|
|
253
|
-
if (!e) return;
|
|
254
|
-
let t = (t) => {
|
|
255
|
-
let n = e.getElementById(U), r = t.target;
|
|
256
|
-
if (n && r && !n.contains(r) && z.current && !z.current.contains(r)) {
|
|
257
|
-
if (D?.() === !1) {
|
|
258
|
-
t.preventDefault(), t.stopImmediatePropagation();
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
$();
|
|
262
|
-
}
|
|
263
|
-
}, n = !!D;
|
|
264
|
-
return e.addEventListener("pointerdown", t, n), () => {
|
|
265
|
-
e.removeEventListener("pointerdown", t, n);
|
|
266
|
-
};
|
|
267
|
-
}, [
|
|
268
|
-
j,
|
|
269
|
-
W,
|
|
270
|
-
U,
|
|
271
|
-
B,
|
|
272
|
-
D
|
|
273
|
-
]), /* @__PURE__ */ s("div", {
|
|
274
|
-
className: `dropdown-container ${ne} ${v ? "disabled" : ""}`,
|
|
275
|
-
style: re,
|
|
276
|
-
children: [
|
|
277
|
-
/* @__PURE__ */ s("div", {
|
|
278
|
-
ref: z,
|
|
279
|
-
className: `dropdown-trigger ${W ? "open" : ""}`,
|
|
280
|
-
role: "combobox",
|
|
281
|
-
"aria-haspopup": S ? "dialog" : "listbox",
|
|
282
|
-
"aria-expanded": W && !v,
|
|
283
|
-
"aria-disabled": v,
|
|
284
|
-
"aria-owns": H,
|
|
285
|
-
"aria-controls": H,
|
|
286
|
-
"aria-label": F,
|
|
287
|
-
"aria-labelledby": I,
|
|
288
|
-
"aria-describedby": L,
|
|
289
|
-
tabIndex: v ? -1 : 0,
|
|
290
|
-
onClick: v ? void 0 : Q,
|
|
291
|
-
onKeyDown: (e) => {
|
|
292
|
-
v || e.target !== e.currentTarget || (W && e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), $()) : !W && (e.key === "Enter" || e.key === " " || e.key === "ArrowDown") && (e.preventDefault(), e.stopPropagation(), Q()));
|
|
293
|
-
},
|
|
294
|
-
children: (() => {
|
|
295
|
-
let t = [g({})];
|
|
296
|
-
return T ? T(e, Z, t) : Z.length > 0 ? N ? [/* @__PURE__ */ s(h, {
|
|
297
|
-
options: Z,
|
|
298
|
-
removeOption: le,
|
|
299
|
-
renderValue: C,
|
|
300
|
-
disabled: v,
|
|
301
|
-
removeLabel: x.removeLabel
|
|
302
|
-
}), /* @__PURE__ */ s(g, { className: "mr-2" })] : [/* @__PURE__ */ s(m, {
|
|
303
|
-
options: Z,
|
|
304
|
-
renderValue: C
|
|
305
|
-
}), /* @__PURE__ */ s(g, { className: "mr-2" })] : w ? w(e, _, t) : /* @__PURE__ */ s(te, { placeholder: _ });
|
|
306
|
-
})()
|
|
307
|
-
}),
|
|
308
|
-
W && !v && /* @__PURE__ */ s(u, {
|
|
309
|
-
onPointerRelease: O?.onPointerRelease,
|
|
310
|
-
topLayer: x.topLayer,
|
|
311
|
-
triggerRef: z,
|
|
312
|
-
portalTarget: B,
|
|
313
|
-
theme: J,
|
|
314
|
-
dropdownMenuId: U,
|
|
315
|
-
popupClassName: R,
|
|
316
|
-
maxHeight: oe,
|
|
317
|
-
children: S ? S({
|
|
318
|
-
id: H,
|
|
319
|
-
close: $
|
|
320
|
-
}) : /* @__PURE__ */ s(d, {
|
|
321
|
-
options: a ? Y.items : X,
|
|
322
|
-
selectedValues: a ? Y.selected : void 0,
|
|
323
|
-
remote: a ? Y : void 0,
|
|
324
|
-
value: f,
|
|
325
|
-
onChange: (e) => {
|
|
326
|
-
v || p?.(e);
|
|
327
|
-
},
|
|
328
|
-
config: {
|
|
329
|
-
...x,
|
|
330
|
-
autoFocus: x.autoFocus || ce
|
|
331
|
-
},
|
|
332
|
-
multiSelect: N,
|
|
333
|
-
search: !!a || k,
|
|
334
|
-
searchPlaceholder: A,
|
|
335
|
-
listboxId: H,
|
|
336
|
-
searchId: se,
|
|
337
|
-
renderOption: ie,
|
|
338
|
-
renderNoResults: ae,
|
|
339
|
-
onClose: $,
|
|
340
|
-
theme: J
|
|
341
|
-
})
|
|
342
|
-
}),
|
|
343
|
-
y && /* @__PURE__ */ s("input", {
|
|
344
|
-
type: "hidden",
|
|
345
|
-
name: y,
|
|
346
|
-
value: JSON.stringify(N ? Z.map((e) => e.value) : Z[0]?.value || "")
|
|
347
|
-
})
|
|
348
|
-
]
|
|
349
|
-
});
|
|
350
|
-
}
|
|
351
|
-
var v = (e, n) => {
|
|
352
|
-
t(/* @__PURE__ */ s(_, { ...n }), e);
|
|
353
|
-
}, y = (e) => {
|
|
354
|
-
t(null, e);
|
|
355
|
-
};
|
|
356
|
-
//#endregion
|
|
357
|
-
export { v as n, y as r, _ as t };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { calculateAnchoredPopoverPosition as e } from "../core/anchored-popover.js";
|
|
2
|
-
import { t } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
-
import { createPreactElement as n, releasePreactElement as r } from "../preact-mount.js";
|
|
4
|
-
import { hideTopLayerPopup as i, showTopLayerPopup as a } from "../core/top-layer-popup.js";
|
|
5
|
-
import { t as o } from "./editor-commit-Bq3wSgvr.js";
|
|
6
|
-
//#region src/core/editor-popup-position.ts
|
|
7
|
-
function s(t, n, r, i = 4, a = 8) {
|
|
8
|
-
let o = Math.max(0, r.height - a - t.bottom - i), s = Math.max(0, t.top - a - i), c = n.height <= o || o >= s ? "below" : "above", l = c === "below" ? o : s, u = Math.min(n.height, l);
|
|
9
|
-
return {
|
|
10
|
-
...e(t, n, r, i, a),
|
|
11
|
-
placementY: c,
|
|
12
|
-
maxHeight: l,
|
|
13
|
-
top: c === "below" ? t.bottom + i : t.top - u - i
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
//#region src/core/editor-popup.tsx
|
|
18
|
-
var c = /* @__PURE__ */ new WeakMap();
|
|
19
|
-
function l(e, l, u) {
|
|
20
|
-
let d = e.ownerDocument, f = d.defaultView;
|
|
21
|
-
c.get(d)?.close();
|
|
22
|
-
let p = !1, m, h = (e) => (m = e, () => {
|
|
23
|
-
m === e && (m = void 0);
|
|
24
|
-
}), g = () => {
|
|
25
|
-
p || (p = !0, T.disconnect(), w?.disconnect(), d.removeEventListener("pointerdown", v, !0), d.removeEventListener("keydown", y, !0), d.removeEventListener("scroll", b, !0), f.removeEventListener("resize", g), i(x, S), r(x), x.remove(), c.get(d)?.element === x && c.delete(d), u.onClose?.(), e.isConnected && e.focus({ preventScroll: !0 }));
|
|
26
|
-
}, _ = (e) => e ? x.contains(e) ? !0 : [...x.querySelectorAll("[aria-controls]")].some((t) => t.getAttribute("aria-controls")?.split(" ").some((t) => d.getElementById(t)?.contains(e))) : !1, v = (t) => {
|
|
27
|
-
_(t.target) || e.contains(t.target) || (u.isAvailable && !u.isAvailable() ? g() : m?.() === !1 ? (t.preventDefault(), t.stopPropagation()) : g());
|
|
28
|
-
}, y = (e) => {
|
|
29
|
-
if (e.key === "Escape") {
|
|
30
|
-
if (x.querySelector("[aria-expanded=\"true\"]")) return;
|
|
31
|
-
e.preventDefault(), e.stopPropagation(), g();
|
|
32
|
-
}
|
|
33
|
-
if (e.key === "Tab" && x.contains(e.target)) {
|
|
34
|
-
let t = [...x.querySelectorAll("button:not(:disabled),input:not(:disabled),textarea:not(:disabled),select:not(:disabled),[contenteditable=\"true\"],[tabindex=\"0\"]")].filter((e) => e.tabIndex >= 0 && e.getClientRects().length), n = t[0], r = t.at(-1);
|
|
35
|
-
e.shiftKey && d.activeElement === n ? (e.preventDefault(), r?.focus()) : !e.shiftKey && d.activeElement === r && (e.preventDefault(), n?.focus());
|
|
36
|
-
}
|
|
37
|
-
}, b = (t) => {
|
|
38
|
-
let n = t.target;
|
|
39
|
-
_(n) || n && (n.contains(e) || E?.contains(n)) && C();
|
|
40
|
-
}, x = n(d, /* @__PURE__ */ t("div", {
|
|
41
|
-
class: `rv-editor-popup ${u.className ?? ""}`,
|
|
42
|
-
role: "dialog",
|
|
43
|
-
"aria-label": u.label,
|
|
44
|
-
onKeyDown: (e) => e.stopPropagation(),
|
|
45
|
-
onKeyUp: (e) => e.stopPropagation(),
|
|
46
|
-
onMouseDown: (e) => e.stopPropagation(),
|
|
47
|
-
onClick: (e) => e.stopPropagation(),
|
|
48
|
-
children: /* @__PURE__ */ t(o.Provider, {
|
|
49
|
-
value: h,
|
|
50
|
-
children: l(g)
|
|
51
|
-
})
|
|
52
|
-
}));
|
|
53
|
-
x.style.direction = f.getComputedStyle(e).direction, (e.closest("dialog, [role=\"dialog\"], [role=\"menu\"]") ?? e.closest("revo-grid") ?? d.body).append(x);
|
|
54
|
-
let S = a(x, "block"), C = () => {
|
|
55
|
-
x.style.maxHeight = "";
|
|
56
|
-
let t = s(e.getBoundingClientRect(), x.getBoundingClientRect(), {
|
|
57
|
-
width: f.innerWidth,
|
|
58
|
-
height: f.innerHeight
|
|
59
|
-
});
|
|
60
|
-
x.style.maxHeight = `${t.maxHeight}px`, x.style.left = `${t.left}px`, x.style.top = `${t.top}px`, x.dataset.placement = t.placementY;
|
|
61
|
-
};
|
|
62
|
-
C();
|
|
63
|
-
let w = typeof f.ResizeObserver == "function" ? new f.ResizeObserver(C) : void 0;
|
|
64
|
-
w?.observe(x), w?.observe(e);
|
|
65
|
-
let T = new MutationObserver(() => {
|
|
66
|
-
(!e.isConnected || !x.isConnected || u.isAvailable && !u.isAvailable()) && g();
|
|
67
|
-
});
|
|
68
|
-
T.observe(d.body, {
|
|
69
|
-
childList: !0,
|
|
70
|
-
subtree: !0
|
|
71
|
-
});
|
|
72
|
-
let E = e.closest("revo-grid");
|
|
73
|
-
E && u.isAvailable && T.observe(E, { attributes: !0 }), d.addEventListener("pointerdown", v, !0), d.addEventListener("keydown", y, !0), d.addEventListener("scroll", b, !0), f.addEventListener("resize", g);
|
|
74
|
-
let D = {
|
|
75
|
-
element: x,
|
|
76
|
-
close: g
|
|
77
|
-
};
|
|
78
|
-
return c.set(d, D), x.querySelector("[autofocus],input,textarea,button,[tabindex=\"0\"]")?.focus({ preventScroll: !0 }), D;
|
|
79
|
-
}
|
|
80
|
-
//#endregion
|
|
81
|
-
export { l 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-IdNiFvKH.js";
|
|
2
|
-
import { r as s } from "./preact.module-BBM36DnO.js";
|
|
3
|
-
import { c, i as l, t as u } from "./hooks.module-CG3gN83z.js";
|
|
4
|
-
import { t as d } from "./jsxRuntime.module-F6UFnpT-.js";
|
|
5
|
-
import { n as f } from "./controls-DIum-E66.js";
|
|
6
|
-
//#region src/ai/mount.tsx
|
|
7
|
-
function p(p, m) {
|
|
8
|
-
let h = (e) => n(e, m.translations), g = !1;
|
|
9
|
-
function _({ state: n }) {
|
|
10
|
-
let [s, g] = l(""), _ = u(), v = n.phase === "understanding" || n.phase === "applying", y = n.steps ?? [];
|
|
11
|
-
c(() => {
|
|
12
|
-
if (v || n.phase === "idle" || _.current === void 0) return;
|
|
13
|
-
let e = _.current;
|
|
14
|
-
_.current = void 0, n.phase === "completed" && g((t) => t.trim() === e ? "" : t);
|
|
15
|
-
}, [n]);
|
|
16
|
-
let b = (e) => {
|
|
17
|
-
_.current = e.trim(), m.onSubmit(e);
|
|
18
|
-
};
|
|
19
|
-
return /* @__PURE__ */ d(a, {
|
|
20
|
-
translations: m.translations,
|
|
21
|
-
label: m.label,
|
|
22
|
-
busy: v,
|
|
23
|
-
footer: m.footer,
|
|
24
|
-
children: [
|
|
25
|
-
/* @__PURE__ */ d(i, {
|
|
26
|
-
items: n.suggestions?.length ? n.suggestions : m.suggestions ?? [],
|
|
27
|
-
onSelect: (e) => {
|
|
28
|
-
v || (g(e), b(e));
|
|
29
|
-
},
|
|
30
|
-
disabled: v
|
|
31
|
-
}),
|
|
32
|
-
/* @__PURE__ */ d(t, {
|
|
33
|
-
...m.prompt,
|
|
34
|
-
value: s,
|
|
35
|
-
onValueChange: g,
|
|
36
|
-
onSubmit: b,
|
|
37
|
-
onStop: m.onStop,
|
|
38
|
-
busy: v,
|
|
39
|
-
hint: y.length ? "" : m.prompt?.hint,
|
|
40
|
-
actions: /* @__PURE__ */ d(o, {
|
|
41
|
-
...m.trail,
|
|
42
|
-
items: y,
|
|
43
|
-
onRemove: (e) => m.onRemoveStep?.(e),
|
|
44
|
-
onClear: m.onReset,
|
|
45
|
-
onEmpty: () => p.querySelector("textarea")?.focus(),
|
|
46
|
-
disabled: v,
|
|
47
|
-
removalsDisabled: !m.onRemoveStep || n.canEditSteps === !1,
|
|
48
|
-
clearDescription: m.trail?.clearDescription ?? "Restore the starting view",
|
|
49
|
-
clearLabel: m.trail?.clearLabel ?? m.resetLabel ?? "Clear all",
|
|
50
|
-
changedMessage: !v && y.length > 0 && n.canEditSteps === !1 ? m.trail?.changedMessage ?? "The view changed manually. Start a new request to continue." : void 0
|
|
51
|
-
})
|
|
52
|
-
}),
|
|
53
|
-
/* @__PURE__ */ d(r, {
|
|
54
|
-
phase: n.phase,
|
|
55
|
-
message: n.phase === "completed" ? "" : n.message
|
|
56
|
-
}),
|
|
57
|
-
n.phase === "completed" && /* @__PURE__ */ d(e, {
|
|
58
|
-
summary: n.message,
|
|
59
|
-
matchedRows: n.matchedRows,
|
|
60
|
-
countLabel: m.countLabel
|
|
61
|
-
}),
|
|
62
|
-
/* @__PURE__ */ d("div", {
|
|
63
|
-
class: "rv-ai-result-actions",
|
|
64
|
-
children: [/* @__PURE__ */ d(f, {
|
|
65
|
-
disabled: v || !n.canRestore,
|
|
66
|
-
onClick: m.onRestore,
|
|
67
|
-
size: "compact",
|
|
68
|
-
children: h(m.restoreLabel ?? "Restore previous view")
|
|
69
|
-
}), !y.length && /* @__PURE__ */ d(f, {
|
|
70
|
-
disabled: v,
|
|
71
|
-
onClick: m.onReset,
|
|
72
|
-
size: "compact",
|
|
73
|
-
variant: "ghost",
|
|
74
|
-
children: h(m.resetLabel ?? "Reset view")
|
|
75
|
-
})]
|
|
76
|
-
})
|
|
77
|
-
]
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
return {
|
|
81
|
-
update(e) {
|
|
82
|
-
g || s(/* @__PURE__ */ d(_, { state: e }), p);
|
|
83
|
-
},
|
|
84
|
-
destroy() {
|
|
85
|
-
g || (g = !0, s(null, p));
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
//#endregion
|
|
90
|
-
export { p as t };
|