@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,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { r as t, t as n } from "../_chunks/chart-frame-BC99KjGa.js";
|
|
3
3
|
//#region src/distribution-chart/bar-chart.tsx
|
|
4
4
|
function r(r) {
|
|
5
|
-
let { values: i, max: a } =
|
|
6
|
-
return /* @__PURE__ */ n
|
|
5
|
+
let { values: i, max: a } = t(r.data);
|
|
6
|
+
return /* @__PURE__ */ e(n, {
|
|
7
7
|
...r,
|
|
8
8
|
variant: "bar",
|
|
9
|
-
renderDatum: (
|
|
9
|
+
renderDatum: (t, n) => /* @__PURE__ */ e("span", {
|
|
10
10
|
class: "rv-distribution-chart__bar",
|
|
11
|
-
style: { height: `${Math.max(3, i[
|
|
11
|
+
style: { height: `${Math.max(3, i[n] / a * 100)}%` },
|
|
12
12
|
"aria-hidden": "true"
|
|
13
13
|
})
|
|
14
14
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { BarChart as t } from "./bar-chart.js";
|
|
3
|
+
import { LineChart as n } from "./line-chart.js";
|
|
4
|
+
import { AreaChart as r } from "./area-chart.js";
|
|
5
5
|
//#region src/distribution-chart/index.tsx
|
|
6
6
|
function i({ type: i = "bar", ...a }) {
|
|
7
|
-
return
|
|
7
|
+
return e(i === "line" ? n : i === "area" ? r : t, { ...a });
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { r as AreaChart, t as BarChart, i as DistributionChart, n as LineChart };
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { t as e } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
2
|
+
import { i as t, n, r, t as i } from "../_chunks/chart-frame-BC99KjGa.js";
|
|
3
3
|
//#region src/distribution-chart/line-chart.tsx
|
|
4
4
|
function a(a) {
|
|
5
|
-
let { points: o } =
|
|
6
|
-
return /* @__PURE__ */ i
|
|
5
|
+
let { points: o } = r(a.data);
|
|
6
|
+
return /* @__PURE__ */ e(i, {
|
|
7
7
|
...a,
|
|
8
8
|
variant: "line",
|
|
9
9
|
positions: o,
|
|
10
|
-
renderDatum: () => a.showPoints === !1 ? null : /* @__PURE__ */
|
|
10
|
+
renderDatum: () => a.showPoints === !1 ? null : /* @__PURE__ */ e("span", {
|
|
11
11
|
class: "rv-distribution-chart__point",
|
|
12
12
|
"aria-hidden": "true"
|
|
13
13
|
}),
|
|
14
|
-
children: o.length > 0 && /* @__PURE__ */
|
|
15
|
-
class: `rv-distribution-chart__series rv-distribution-chart__segment${a.data[
|
|
16
|
-
d:
|
|
14
|
+
children: o.length > 0 && /* @__PURE__ */ e(n, { children: o.slice(1).map((n, r) => /* @__PURE__ */ e("path", {
|
|
15
|
+
class: `rv-distribution-chart__series rv-distribution-chart__segment${a.data[r].selected && a.data[r + 1].selected ? " is-selected" : ""}`,
|
|
16
|
+
d: t(o[r], n, a.interpolation),
|
|
17
17
|
"vector-effect": "non-scaling-stroke"
|
|
18
|
-
}, a.data[
|
|
18
|
+
}, a.data[r].key)) })
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
//#endregion
|
package/dropdown/content.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ComponentChildren, RefObject } from 'preact';
|
|
1
|
+
import { h, ComponentChildren, RefObject } from '../_vendor/preact/src/index';
|
|
2
2
|
import { DropdownConfig, DropdownOption } from './dropdown.types';
|
|
3
3
|
import { RemoteDropdownState, DropdownRemoteText } from './remote';
|
|
4
4
|
type DropdownContentProps<T = any> = {
|
package/dropdown/content.js
CHANGED
|
@@ -1,141 +1,142 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { c as e, i as t } from "../_chunks/preact.module-BBM36DnO.js";
|
|
2
|
+
import { c as n, o as r, t as i } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
3
|
+
import { t as a } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
+
import "../_chunks/compat.module-DDB2pm9O.js";
|
|
5
|
+
import { ButtonControl as o } from "../native-control.js";
|
|
6
|
+
import { useDropdownService as s } from "./dropdown.service.js";
|
|
6
7
|
//#region src/dropdown/content.tsx
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
selected:
|
|
10
|
-
search:
|
|
11
|
-
}),
|
|
12
|
-
return
|
|
13
|
-
if (!
|
|
8
|
+
function c({ options: e, selectedValues: t, remote: r, value: c, onChange: u, config: d, multiSelect: f, search: p, searchPlaceholder: m, listboxId: h, searchId: g, renderOption: _, renderNoResults: v, onClose: y, theme: b }) {
|
|
9
|
+
let x = i(null), S = i(null), C = i(null), { searchValue: w, focusedIndex: T, selectedOptions: E, filteredOptions: D, handleSelect: O, handleKeyDown: k, handleSearchChange: A, setFocusedIndex: j } = s(e, c, u, d, y, r && {
|
|
10
|
+
selected: t ?? [],
|
|
11
|
+
search: r.search
|
|
12
|
+
}), M = T >= 0 && T < D.length && !D[T].disabled ? `${h}-option-${T}` : void 0;
|
|
13
|
+
return n(() => {
|
|
14
|
+
if (!d.autoFocus) return;
|
|
14
15
|
let e = () => {
|
|
15
|
-
|
|
16
|
-
}, t =
|
|
16
|
+
p && x.current ? x.current.focus({ preventScroll: !0 }) : S.current?.focus({ preventScroll: !0 });
|
|
17
|
+
}, t = S.current?.ownerDocument.defaultView ?? (typeof window < "u" ? window : void 0);
|
|
17
18
|
if (!t) return;
|
|
18
19
|
e();
|
|
19
20
|
let n = t.setTimeout(e, 0), r = t.requestAnimationFrame(e), i = t.setTimeout(e, 16);
|
|
20
21
|
return () => {
|
|
21
22
|
t.clearTimeout(n), t.cancelAnimationFrame(r), t.clearTimeout(i);
|
|
22
23
|
};
|
|
23
|
-
}, [
|
|
24
|
-
ref:
|
|
24
|
+
}, [d.autoFocus, p]), /* @__PURE__ */ a("div", {
|
|
25
|
+
ref: S,
|
|
25
26
|
className: "dropdown-listbox",
|
|
26
|
-
"data-theme":
|
|
27
|
+
"data-theme": b ?? "default",
|
|
27
28
|
role: "listbox",
|
|
28
|
-
id:
|
|
29
|
-
"aria-multiselectable":
|
|
30
|
-
"aria-activedescendant":
|
|
29
|
+
id: h,
|
|
30
|
+
"aria-multiselectable": f,
|
|
31
|
+
"aria-activedescendant": M,
|
|
31
32
|
tabIndex: -1,
|
|
32
|
-
"aria-busy":
|
|
33
|
+
"aria-busy": r?.loading,
|
|
33
34
|
onScrollCapture: (e) => {
|
|
34
35
|
let t = e.target;
|
|
35
|
-
|
|
36
|
+
r && t.scrollHeight - t.scrollTop - t.clientHeight < 48 && r.loadMore();
|
|
36
37
|
},
|
|
37
38
|
onKeyUp: (e) => e.stopPropagation(),
|
|
38
39
|
onKeyDown: (e) => {
|
|
39
|
-
e.stopPropagation(), e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(),
|
|
40
|
+
e.stopPropagation(), e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), y(!1)) : e.key === "Tab" ? (e.preventDefault(), e.stopPropagation(), d.closeOnTab && y(!0)) : (e.key !== " " || e.target !== x.current) && k(e);
|
|
40
41
|
},
|
|
41
42
|
children: [
|
|
42
|
-
|
|
43
|
+
p && /* @__PURE__ */ a("div", {
|
|
43
44
|
className: "dropdown-search",
|
|
44
|
-
children: /* @__PURE__ */
|
|
45
|
-
ref:
|
|
45
|
+
children: /* @__PURE__ */ a("input", {
|
|
46
|
+
ref: x,
|
|
46
47
|
type: "text",
|
|
47
|
-
id:
|
|
48
|
-
className: `dropdown-search-input ${
|
|
49
|
-
placeholder:
|
|
50
|
-
value:
|
|
51
|
-
onChange:
|
|
52
|
-
onInput:
|
|
53
|
-
"aria-label":
|
|
48
|
+
id: g,
|
|
49
|
+
className: `dropdown-search-input ${b ? `theme-${b}` : ""}`,
|
|
50
|
+
placeholder: m,
|
|
51
|
+
value: w,
|
|
52
|
+
onChange: A,
|
|
53
|
+
onInput: A,
|
|
54
|
+
"aria-label": d.searchAriaLabel ?? "Search options"
|
|
54
55
|
})
|
|
55
56
|
}),
|
|
56
|
-
|
|
57
|
+
r?.loading && /* @__PURE__ */ a("div", {
|
|
57
58
|
role: "status",
|
|
58
|
-
children:
|
|
59
|
+
children: r.text.loading
|
|
59
60
|
}),
|
|
60
|
-
|
|
61
|
+
r?.error && /* @__PURE__ */ a("div", {
|
|
61
62
|
role: "alert",
|
|
62
63
|
children: [
|
|
63
|
-
|
|
64
|
+
r.text.error,
|
|
64
65
|
" ",
|
|
65
|
-
/* @__PURE__ */
|
|
66
|
-
onClick:
|
|
67
|
-
children:
|
|
66
|
+
/* @__PURE__ */ a(o, {
|
|
67
|
+
onClick: r.retry,
|
|
68
|
+
children: r.text.retry
|
|
68
69
|
})
|
|
69
70
|
]
|
|
70
71
|
}),
|
|
71
|
-
/* @__PURE__ */
|
|
72
|
-
options:
|
|
73
|
-
filteredOptions:
|
|
74
|
-
multiSelect:
|
|
75
|
-
focusedIndex:
|
|
76
|
-
selectedOptions:
|
|
77
|
-
onKeyDown:
|
|
78
|
-
onSelect:
|
|
79
|
-
onFocusChange:
|
|
80
|
-
renderOption:
|
|
81
|
-
renderNoResults:
|
|
82
|
-
dropdownListRef:
|
|
83
|
-
theme:
|
|
84
|
-
optionIdPrefix:
|
|
72
|
+
/* @__PURE__ */ a(l, {
|
|
73
|
+
options: e,
|
|
74
|
+
filteredOptions: D,
|
|
75
|
+
multiSelect: f,
|
|
76
|
+
focusedIndex: T,
|
|
77
|
+
selectedOptions: E,
|
|
78
|
+
onKeyDown: k,
|
|
79
|
+
onSelect: O,
|
|
80
|
+
onFocusChange: j,
|
|
81
|
+
renderOption: _,
|
|
82
|
+
renderNoResults: r ? () => r.loading || r.error ? null : r.text.empty : v,
|
|
83
|
+
dropdownListRef: C,
|
|
84
|
+
theme: b,
|
|
85
|
+
optionIdPrefix: h
|
|
85
86
|
}),
|
|
86
|
-
|
|
87
|
-
disabled:
|
|
88
|
-
onClick:
|
|
89
|
-
children:
|
|
87
|
+
r?.hasMore && /* @__PURE__ */ a(o, {
|
|
88
|
+
disabled: r.loading,
|
|
89
|
+
onClick: r.loadMore,
|
|
90
|
+
children: r.text.loadMore
|
|
90
91
|
})
|
|
91
92
|
]
|
|
92
93
|
});
|
|
93
94
|
}
|
|
94
|
-
function
|
|
95
|
-
let
|
|
96
|
-
let r =
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
id: `${
|
|
95
|
+
function l({ options: n, filteredOptions: i, multiSelect: o, focusedIndex: s, selectedOptions: c, onKeyDown: l, onSelect: u, onFocusChange: d, renderOption: f, renderNoResults: p, dropdownListRef: m, theme: h, optionIdPrefix: g }) {
|
|
96
|
+
let _ = r((e) => c.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [c]), v = r((t, n) => {
|
|
97
|
+
let r = _(t), i = s === n;
|
|
98
|
+
return /* @__PURE__ */ a("li", {
|
|
99
|
+
id: `${g}-option-${n}`,
|
|
99
100
|
role: "option",
|
|
100
101
|
"aria-selected": r,
|
|
101
|
-
"aria-disabled":
|
|
102
|
+
"aria-disabled": t.disabled,
|
|
102
103
|
tabIndex: -1,
|
|
103
|
-
className: `dropdown-option ${r ? "selected" : ""} ${
|
|
104
|
-
onClick: () =>
|
|
104
|
+
className: `dropdown-option ${r ? "selected" : ""} ${i ? "focused" : ""} ${t.disabled ? "disabled" : ""} ${h ? `theme-${h}` : ""}`,
|
|
105
|
+
onClick: () => u(t),
|
|
105
106
|
onMouseEnter: () => {
|
|
106
|
-
|
|
107
|
+
t.disabled || d(n);
|
|
107
108
|
},
|
|
108
|
-
children:
|
|
109
|
+
children: f ? f(e, t, r) : /* @__PURE__ */ a("div", {
|
|
109
110
|
className: "option-content",
|
|
110
|
-
children: [
|
|
111
|
+
children: [o && /* @__PURE__ */ a("input", {
|
|
111
112
|
type: "checkbox",
|
|
112
113
|
checked: r,
|
|
113
114
|
readOnly: !0,
|
|
114
|
-
disabled:
|
|
115
|
+
disabled: t.disabled,
|
|
115
116
|
tabIndex: -1,
|
|
116
117
|
"aria-hidden": "true"
|
|
117
|
-
}), /* @__PURE__ */
|
|
118
|
+
}), /* @__PURE__ */ a("span", { children: t.label })]
|
|
118
119
|
})
|
|
119
|
-
}, `${
|
|
120
|
+
}, `${t.label}-${n}`);
|
|
120
121
|
}, [
|
|
121
|
-
c,
|
|
122
|
-
d,
|
|
123
|
-
v,
|
|
124
122
|
s,
|
|
125
|
-
|
|
123
|
+
u,
|
|
124
|
+
_,
|
|
125
|
+
o,
|
|
126
126
|
f,
|
|
127
|
-
|
|
127
|
+
d,
|
|
128
|
+
h
|
|
128
129
|
]);
|
|
129
|
-
return /* @__PURE__ */
|
|
130
|
-
ref:
|
|
130
|
+
return /* @__PURE__ */ a(t, { children: /* @__PURE__ */ a("ul", {
|
|
131
|
+
ref: m,
|
|
131
132
|
className: "dropdown-options",
|
|
132
133
|
role: "presentation",
|
|
133
134
|
tabIndex: -1,
|
|
134
|
-
children:
|
|
135
|
+
children: i.length > 0 ? i.map(v) : /* @__PURE__ */ a("li", {
|
|
135
136
|
className: "no-results",
|
|
136
|
-
children:
|
|
137
|
+
children: p ? p(e) : /* @__PURE__ */ a("span", { children: "No results found" })
|
|
137
138
|
})
|
|
138
139
|
}) });
|
|
139
140
|
}
|
|
140
141
|
//#endregion
|
|
141
|
-
export {
|
|
142
|
+
export { l as DropdownContent, c as DropdownPopupContent };
|
|
@@ -14,6 +14,6 @@ export declare function useDropdownService<T = any>(options: DropdownOption<T>[]
|
|
|
14
14
|
handleKeyDown: (e: KeyboardEvent) => void;
|
|
15
15
|
handleSearchChange: (e: DropdownInputEvent) => void;
|
|
16
16
|
isOptionSelected: (option: DropdownOption<T>) => boolean;
|
|
17
|
-
setFocusedIndex: import('preact/hooks').Dispatch<import('preact/hooks').StateUpdater<number>>;
|
|
17
|
+
setFocusedIndex: import('../_vendor/preact/hooks/src/index').Dispatch<import('../_vendor/preact/hooks/src/index').StateUpdater<number>>;
|
|
18
18
|
};
|
|
19
19
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as e, i as t, n, o as r, t as i } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
2
2
|
//#region src/dropdown/dropdown.service.ts
|
|
3
3
|
var a = (e, t) => e.label.toLowerCase().includes(t.toLowerCase()), o = (e, t, n) => {
|
|
4
4
|
if (n === "none") return 0;
|
|
@@ -12,8 +12,8 @@ function s(e, t, n) {
|
|
|
12
12
|
return r ? [r] : [];
|
|
13
13
|
}
|
|
14
14
|
function c(c, l, u, d = {}, f, p) {
|
|
15
|
-
let { search: m = !1, filterFunction: h = a, sortDirection: g = "none", sortFunction: _ = o, multiSelect: v = !1, autocomplete: y = !1, initialSearch: b = "" } = d, [x, S] =
|
|
16
|
-
|
|
15
|
+
let { search: m = !1, filterFunction: h = a, sortDirection: g = "none", sortFunction: _ = o, multiSelect: v = !1, autocomplete: y = !1, initialSearch: b = "" } = d, [x, S] = t(b), [C, w] = t(-1), [T, E] = t(() => s(c, l, v)), D = i(!1);
|
|
16
|
+
e(() => {
|
|
17
17
|
E(p?.selected ?? s(c, l, v));
|
|
18
18
|
}, [
|
|
19
19
|
l,
|
|
@@ -34,9 +34,9 @@ function c(c, l, u, d = {}, f, p) {
|
|
|
34
34
|
_,
|
|
35
35
|
!!p
|
|
36
36
|
]);
|
|
37
|
-
|
|
37
|
+
e(() => {
|
|
38
38
|
D.current = !1, S(b);
|
|
39
|
-
}, [b]),
|
|
39
|
+
}, [b]), e(() => {
|
|
40
40
|
O.length ? w((e) => {
|
|
41
41
|
if (D.current && e >= 0 && e < O.length && !O[e].disabled) return e;
|
|
42
42
|
let t = O.findIndex((e) => !e.disabled && T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)));
|
|
@@ -47,7 +47,7 @@ function c(c, l, u, d = {}, f, p) {
|
|
|
47
47
|
return e >= 0 && e < O.length && !O[e].disabled ? e : t >= 0 ? t : O.findIndex((e) => !e.disabled);
|
|
48
48
|
}) : w(-1);
|
|
49
49
|
}, [O, T]);
|
|
50
|
-
let k =
|
|
50
|
+
let k = r((e) => {
|
|
51
51
|
if (!e.disabled) {
|
|
52
52
|
if (v) {
|
|
53
53
|
let t = T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), n;
|
|
@@ -74,7 +74,7 @@ function c(c, l, u, d = {}, f, p) {
|
|
|
74
74
|
selectedOptions: T,
|
|
75
75
|
filteredOptions: O,
|
|
76
76
|
handleSelect: k,
|
|
77
|
-
handleKeyDown:
|
|
77
|
+
handleKeyDown: r((e) => {
|
|
78
78
|
switch (e.key) {
|
|
79
79
|
case "Escape":
|
|
80
80
|
e.preventDefault(), e.stopPropagation();
|
|
@@ -93,11 +93,11 @@ function c(c, l, u, d = {}, f, p) {
|
|
|
93
93
|
C,
|
|
94
94
|
k
|
|
95
95
|
]),
|
|
96
|
-
handleSearchChange:
|
|
96
|
+
handleSearchChange: r((e) => {
|
|
97
97
|
let t = e.currentTarget.value;
|
|
98
98
|
t !== x && (D.current = !1, S(t), p?.search(t), w(-1));
|
|
99
99
|
}, [p, x]),
|
|
100
|
-
isOptionSelected:
|
|
100
|
+
isOptionSelected: r((e) => T.some((t) => JSON.stringify(t.value) === JSON.stringify(e.value)), [T]),
|
|
101
101
|
setFocusedIndex: w
|
|
102
102
|
};
|
|
103
103
|
}
|
package/dropdown/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { DropdownPopup as e } from "./popup.js";
|
|
2
|
-
import { n as t, r as n, t as r } from "../_chunks/dropdown-
|
|
2
|
+
import { n as t, r as n, t as r } from "../_chunks/dropdown-voWqmwAe.js";
|
|
3
3
|
import { DropdownPopupContent as i } from "./content.js";
|
|
4
4
|
export { r as Dropdown, e as DropdownPopup, i as DropdownPopupContent, t as defineDropdown, n as destroyDropdown };
|
|
@@ -26,4 +26,4 @@ export declare function LookupField({ initial, options, context, apply, cancel,
|
|
|
26
26
|
context: unknown;
|
|
27
27
|
apply: (value: LookupId | LookupId[] | null) => void;
|
|
28
28
|
cancel: () => void;
|
|
29
|
-
}): import("preact").JSX.Element;
|
|
29
|
+
}): import("../_vendor/preact/src/index").JSX.Element;
|
package/dropdown/lookup-field.js
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { i as e, t } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
2
|
+
import { t as n } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { t as r } from "../_chunks/dropdown-voWqmwAe.js";
|
|
4
|
+
import { n as i } from "../_chunks/editor-commit-Bq3wSgvr.js";
|
|
5
|
+
import { EditorActions as a } from "../editor-actions.js";
|
|
6
6
|
//#region src/dropdown/lookup-field.tsx
|
|
7
|
-
function
|
|
8
|
-
let [
|
|
9
|
-
return
|
|
10
|
-
if (!
|
|
11
|
-
let e =
|
|
12
|
-
return
|
|
13
|
-
},
|
|
7
|
+
function o({ initial: o, options: s, context: c, apply: l, cancel: u }) {
|
|
8
|
+
let [d, f] = e(o), [p, m] = e(!1), h = s.autoApply !== !1, g = t(!1), _ = t(o), v = d === null || Array.isArray(d) && !d.length;
|
|
9
|
+
return i(() => {
|
|
10
|
+
if (!g.current) return !0;
|
|
11
|
+
let e = _.current;
|
|
12
|
+
return s.required && (e === null || Array.isArray(e) && !e.length) ? !1 : (g.current && (g.current = !1, l(e)), !0);
|
|
13
|
+
}, h), /* @__PURE__ */ n("div", {
|
|
14
14
|
class: "rv-lookup-editor",
|
|
15
15
|
onKeyDown: (e) => {
|
|
16
|
-
(e.ctrlKey || e.metaKey) && e.key === "Enter" && !(
|
|
16
|
+
(e.ctrlKey || e.metaKey) && e.key === "Enter" && !(s.required && v) && (e.preventDefault(), l(d));
|
|
17
17
|
},
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
source:
|
|
21
|
-
dataSource:
|
|
22
|
-
dataContext:
|
|
23
|
-
remoteText:
|
|
24
|
-
value:
|
|
19
|
+
/* @__PURE__ */ n(r, {
|
|
20
|
+
source: s.source ?? [],
|
|
21
|
+
dataSource: s.dataSource,
|
|
22
|
+
dataContext: c,
|
|
23
|
+
remoteText: s.text,
|
|
24
|
+
value: d === null ? void 0 : d,
|
|
25
25
|
onChange: (e) => {
|
|
26
|
-
|
|
26
|
+
g.current = !0, m(!0), _.current = e, f(e);
|
|
27
27
|
let t = e === null || Array.isArray(e) && !e.length;
|
|
28
|
-
|
|
28
|
+
h && !s.multiple && !(s.required && t) && (g.current = !1, l(e));
|
|
29
29
|
},
|
|
30
|
-
placeholder:
|
|
31
|
-
renderOption:
|
|
32
|
-
renderValue:
|
|
30
|
+
placeholder: s.placeholder ?? s.text?.placeholder,
|
|
31
|
+
renderOption: s.renderOption,
|
|
32
|
+
renderValue: s.renderValue,
|
|
33
33
|
config: {
|
|
34
34
|
search: !0,
|
|
35
|
-
multiSelect:
|
|
35
|
+
multiSelect: s.multiple,
|
|
36
36
|
topLayer: !0,
|
|
37
37
|
autoFocus: !0,
|
|
38
|
-
ariaLabel:
|
|
39
|
-
searchPlaceholder:
|
|
40
|
-
searchAriaLabel:
|
|
41
|
-
removeLabel:
|
|
38
|
+
ariaLabel: s.text?.label ?? "Linked records",
|
|
39
|
+
searchPlaceholder: s.text?.searchPlaceholder,
|
|
40
|
+
searchAriaLabel: s.text?.searchLabel,
|
|
41
|
+
removeLabel: s.text?.removeLabel
|
|
42
42
|
}
|
|
43
43
|
}),
|
|
44
|
-
|
|
44
|
+
s.required && v && p && /* @__PURE__ */ n("span", {
|
|
45
45
|
role: "alert",
|
|
46
46
|
class: "rv-editor-error",
|
|
47
|
-
children:
|
|
47
|
+
children: s.text?.requiredValue ?? "Select at least one record."
|
|
48
48
|
}),
|
|
49
|
-
/* @__PURE__ */ a
|
|
50
|
-
showConfirm:
|
|
51
|
-
text:
|
|
52
|
-
disabled:
|
|
53
|
-
cancel:
|
|
54
|
-
apply: () =>
|
|
55
|
-
clear:
|
|
56
|
-
let e =
|
|
57
|
-
|
|
49
|
+
/* @__PURE__ */ n(a, {
|
|
50
|
+
showConfirm: s.showActions ?? !h,
|
|
51
|
+
text: s.actions,
|
|
52
|
+
disabled: s.required && v,
|
|
53
|
+
cancel: u,
|
|
54
|
+
apply: () => l(d),
|
|
55
|
+
clear: s.required ? void 0 : () => {
|
|
56
|
+
let e = s.multiple ? [] : null;
|
|
57
|
+
h ? l(e) : (_.current = e, f(e));
|
|
58
58
|
}
|
|
59
59
|
})
|
|
60
60
|
]
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
//#endregion
|
|
64
|
-
export {
|
|
64
|
+
export { o as LookupField };
|
package/dropdown/popup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h, ComponentChildren, RefObject } from 'preact';
|
|
1
|
+
import { h, ComponentChildren, RefObject } from '../_vendor/preact/src/index';
|
|
2
2
|
export type DropdownPopupProps = {
|
|
3
3
|
onPointerRelease?: (event: MouseEvent | TouchEvent) => void;
|
|
4
4
|
triggerRef: RefObject<HTMLDivElement>;
|
package/dropdown/popup.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { c as e, i as t, r as n, t as r } from "../_chunks/hooks.module-CG3gN83z.js";
|
|
2
|
+
import { t as i } from "../_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { t as a } from "../_chunks/compat.module-DDB2pm9O.js";
|
|
4
|
+
import { hideTopLayerPopup as o, showTopLayerPopup as s } from "../core/top-layer-popup.js";
|
|
5
|
+
import { inheritUiMotion as c } from "../core/motion.js";
|
|
5
6
|
//#region src/dropdown/popup.tsx
|
|
6
7
|
var l = 5, u = 4;
|
|
7
8
|
function d(e, t, n) {
|
|
@@ -28,15 +29,15 @@ function d(e, t, n) {
|
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
function f({ onPointerRelease: f, triggerRef: p, children: m, portalTarget: h, theme: g, dropdownMenuId: _, popupClassName: v, closeOnClickOutside: y = !1, onClose: b, align: x = "start", matchTriggerWidth: S = !1, maxHeight: C, observePopupResize: w = !0, topLayer: T = !1 }) {
|
|
31
|
-
let E =
|
|
32
|
+
let E = r(null), [D, O] = t({
|
|
32
33
|
top: 0,
|
|
33
34
|
left: 0,
|
|
34
35
|
display: "none"
|
|
35
36
|
});
|
|
36
|
-
|
|
37
|
+
n(() => {
|
|
37
38
|
let e = p.current, t = E.current;
|
|
38
|
-
if (e && t) return
|
|
39
|
-
}, [h, p]),
|
|
39
|
+
if (e && t) return c(e, t);
|
|
40
|
+
}, [h, p]), e(() => {
|
|
40
41
|
let e = p.current;
|
|
41
42
|
if (!e) return;
|
|
42
43
|
let t = e.ownerDocument.defaultView ?? window, n = () => {
|
|
@@ -83,14 +84,14 @@ function f({ onPointerRelease: f, triggerRef: p, children: m, portalTarget: h, t
|
|
|
83
84
|
w,
|
|
84
85
|
h,
|
|
85
86
|
p
|
|
86
|
-
]),
|
|
87
|
-
let
|
|
88
|
-
if (!T || !
|
|
89
|
-
let
|
|
87
|
+
]), n(() => {
|
|
88
|
+
let e = E.current;
|
|
89
|
+
if (!T || !e) return;
|
|
90
|
+
let t = s(e);
|
|
90
91
|
return () => {
|
|
91
|
-
e
|
|
92
|
+
o(e, t);
|
|
92
93
|
};
|
|
93
|
-
}, [h, T]),
|
|
94
|
+
}, [h, T]), n(() => {
|
|
94
95
|
if (!y || !b) return;
|
|
95
96
|
let e = h?.ownerDocument ?? E.current?.ownerDocument ?? p.current?.ownerDocument ?? (typeof document < "u" ? document : void 0);
|
|
96
97
|
if (!e) return;
|
|
@@ -113,7 +114,7 @@ function f({ onPointerRelease: f, triggerRef: p, children: m, portalTarget: h, t
|
|
|
113
114
|
h,
|
|
114
115
|
p
|
|
115
116
|
]);
|
|
116
|
-
let k = /* @__PURE__ */
|
|
117
|
+
let k = /* @__PURE__ */ i("div", {
|
|
117
118
|
ref: E,
|
|
118
119
|
id: _,
|
|
119
120
|
className: `revo-dropdown-menu ${v || ""}`,
|
|
@@ -134,7 +135,7 @@ function f({ onPointerRelease: f, triggerRef: p, children: m, portalTarget: h, t
|
|
|
134
135
|
},
|
|
135
136
|
children: m
|
|
136
137
|
});
|
|
137
|
-
return h ?
|
|
138
|
+
return h ? a(k, h) : k;
|
|
138
139
|
}
|
|
139
140
|
//#endregion
|
|
140
141
|
export { f as DropdownPopup };
|
package/duration/controls.d.ts
CHANGED
|
@@ -10,4 +10,4 @@ export declare function DurationControls(props: DurationFieldOptions & {
|
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
onChange: (value: number, unit?: DurationUnit, elapsed?: boolean) => void;
|
|
12
12
|
onCommit?: (value: number, unit?: DurationUnit, elapsed?: boolean) => void;
|
|
13
|
-
}): import("preact").JSX.Element;
|
|
13
|
+
}): import("../_vendor/preact/src/index").JSX.Element;
|
package/duration/index.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface DurationFieldProps extends DurationFieldOptions {
|
|
|
30
30
|
readOnly?: boolean;
|
|
31
31
|
className?: string;
|
|
32
32
|
}
|
|
33
|
-
export declare function DurationField(props: DurationFieldProps): import("preact").JSX.Element;
|
|
33
|
+
export declare function DurationField(props: DurationFieldProps): import("../_vendor/preact/src/index").JSX.Element;
|
|
34
34
|
export type { DurationControlOptions, ParsedDuration };
|
|
35
35
|
/** Shared staged duration form for grid adapters; scheduling stays in product commands. */
|
|
36
36
|
export declare function DurationDraft({ value, options, apply, cancel, }: {
|
|
@@ -42,4 +42,4 @@ export declare function DurationDraft({ value, options, apply, cancel, }: {
|
|
|
42
42
|
};
|
|
43
43
|
apply: (value: ParsedDuration | null) => void;
|
|
44
44
|
cancel: () => void;
|
|
45
|
-
}): import("preact").JSX.Element;
|
|
45
|
+
}): import("../_vendor/preact/src/index").JSX.Element;
|