@revolist/ui 4.0.4-rc → 4.0.6-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/MIGRATION.md +36 -0
- package/OWNERSHIP.md +10 -10
- package/README.md +22 -4
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/badge.view-D30pMUfi.js +14 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-xpZ0v3xf.js → calendar-QWDyYzdo.js} +19 -19
- package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
- package/_chunks/check-BwI7iCAm.js +4 -0
- package/_chunks/choice-chips-A6WR-WJe.js +126 -0
- package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
- package/_chunks/color-picker-BK4W1nd6.js +143 -0
- package/_chunks/{component-C_T2VN5u.js → component-CMkF17YZ.js} +281 -265
- package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
- package/_chunks/configurator-actions-By8WSL2m.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/{control-AHKXD5Eu.js → control-mlH7l0Uq.js} +42 -17
- package/_chunks/{controls-DsNi8V8I.js → controls-FUU-MUKC.js} +171 -186
- package/_chunks/{date-control-DrVFX13g.js → date-control-Dup_P3w5.js} +1 -1
- package/_chunks/{date-time-qIhp5vaX.js → date-time-9z6pAG5T.js} +317 -278
- package/_chunks/dialog.parts-Bi7YbXqS.js +131 -0
- package/_chunks/{duration-CL68Em0o.js → duration-D7oRjsmP.js} +5 -5
- package/_chunks/editor-popup-ByU7qiub.js +82 -0
- package/_chunks/field-configurator-BCINdXpU.js +223 -0
- package/_chunks/{framework-mount--RTLIqE-.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-Cw2zk58T.js +266 -0
- package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
- package/_chunks/native-control-pFMuHf3G.js +644 -0
- package/_chunks/{number-input-BKwA5FnM.js → number-input-DqXV6vgP.js} +7 -7
- package/_chunks/{picker-h1P5RUgp.js → picker-gEGTu1Ki.js} +2 -2
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
- package/_chunks/{popup-CT2uD3go.js → popup-C35Isk7p.js} +115 -104
- package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-DbxdUJr-.js} +1 -1
- package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-B0_13Sja.js} +1 -1
- package/_chunks/request-trail-CCSK6TJA.js +753 -0
- package/_chunks/rich-text-5rnc8lpI.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -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/_variables.scss +33 -32
- package/ai/_chat.scss +28 -3
- package/ai/_style.scss +55 -2
- package/ai/chat.d.ts +3 -1
- package/ai/components.d.ts +13 -2
- package/ai/index.d.ts +1 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +17 -1
- 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 +2 -0
- package/ai/translations.d.ts +1 -1
- package/assignee/assignee.scss +5 -1
- package/assignee/index.js +2 -2
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +33 -32
- package/badge.view.d.ts +8 -0
- package/brush-range/component.d.ts +1 -3
- package/brush-range/component.js +27 -27
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +16 -16
- package/calendar/_calendar.scss +2 -2
- package/calendar/calendar.js +1 -1
- package/calendar/index.js +2 -2
- package/checkbox/checkbox.scss +1 -22
- 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 +1 -1
- package/color-palette/color-picker.js +2 -2
- 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 +9 -7
- 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 +61 -0
- package/configurator-drop-zone.d.ts +38 -0
- package/configurator-drop-zone.js +64 -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-presentation.d.ts +8 -2
- package/control-presentation.js +25 -20
- package/controls.d.ts +1 -2
- 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/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/field.d.ts +3 -2
- package/date-time/index.js +1 -1
- package/date-time/style.scss +64 -7
- 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 +9 -9
- package/dialog/dialog.parts.d.ts +1 -1
- package/dialog/dialog.parts.js +1 -1
- package/distribution-chart/_distribution-chart.scss +12 -54
- package/distribution-chart/area-chart.js +1 -1
- package/distribution-chart/bar-chart.js +1 -1
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/line-chart.js +1 -1
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/editor-dropdown.style.scss +5 -0
- package/dropdown/index.js +2 -2
- 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 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +1 -1
- package/field-configurator.d.ts +27 -0
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/filter/filters/slider/_slider.scss +8 -25
- 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 +5 -6
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +7 -7
- package/form-controls/presentation.js +12 -12
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +22 -21
- package/formatting/styles.scss +2 -47
- package/framework.js +226 -222
- package/history-controls.js +27 -1
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/masked-input/index.js +1 -1
- package/native-control.d.ts +1 -2
- package/native-control.js +1 -1
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native.js +46 -43
- package/number-input/index.js +1 -1
- package/package.json +36 -1
- package/pagination.js +11 -11
- package/pdf-viewer/index.js +1 -1
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +8 -6
- package/preact.js +71 -64
- package/rating-choice.js +1 -1
- package/react-control.d.ts +2 -0
- package/react-control.js +2 -2
- package/react.d.ts +5 -6
- package/react.js +68 -66
- package/reorder-list.js +1 -1
- package/resource-picker/resource-picker-popup.js +1 -1
- package/resource-picker/resource-picker.js +4 -4
- package/rich-text/engine.d.ts +1 -0
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +4 -0
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +2 -0
- package/rich-text/style.scss +165 -70
- package/rich-text/syntax.d.ts +5 -0
- package/rich-text/translations.d.ts +2 -0
- package/search-input/index.js +1 -1
- package/search-input/native.d.ts +21 -2
- package/select.d.ts +3 -1
- package/select.js +1 -1
- package/status-feedback/exit-snapshot.js +4 -4
- package/status-feedback/popover.js +4 -4
- package/styles/_alert.scss +18 -4
- package/styles/_compositions.scss +3 -3
- package/styles/_editor-slider.scss +0 -2
- package/styles/_field-configurator.scss +147 -0
- package/styles/_fields-grid.scss +37 -0
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +28 -19
- package/styles/configurator-actions.scss +141 -0
- package/styles/{legacy-pagination.css → pagination.css} +19 -2
- package/styles.css +1 -1
- package/styles.scss +2 -2
- package/surfaces.d.ts +36 -2
- package/surfaces.js +35 -132
- package/svelte.js +3 -3
- package/switch/index.js +15 -14
- package/time-grid.d.ts +0 -1
- package/time-grid.js +38 -37
- package/timeline-track/index.js +2 -2
- package/ui.css +1 -1
- package/vue.d.ts +26 -30
- package/vue.js +117 -121
- package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
- package/_chunks/choice-chips-CHQTUdLs.js +0 -110
- package/_chunks/color-picker-CudqPYZo.js +0 -138
- package/_chunks/control-tooltip-uscKfAnV.js +0 -100
- package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
- package/_chunks/editor-popup-WDdtVDNA.js +0 -81
- package/_chunks/history-controls-B3u3INEK.js +0 -27
- package/_chunks/mount-DQ1cpppK.js +0 -257
- package/_chunks/native-control-C_yok8_-.js +0 -605
- package/_chunks/request-trail-DSlFix6i.js +0 -618
- package/_chunks/rich-text-CH7gIqOS.js +0 -636
- 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 -10
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/search-input/native.view.d.ts +0 -21
- package/surfaces.view.d.ts +0 -63
- /package/styles/{legacy-rating.css → rating.css} +0 -0
|
@@ -737,5 +737,5 @@ export declare const commonPalettes: readonly [{
|
|
|
737
737
|
readonly colors: {
|
|
738
738
|
[k: string]: "linear-gradient(135deg, #7dd3fc, #2563eb)" | "linear-gradient(135deg, #facc15, #b45309)" | "linear-gradient(135deg, #f9a8d4, #be185d)" | "linear-gradient(135deg, #a5b4fc, #4f46e5)" | "linear-gradient(135deg, #86efac, #15803d)" | "linear-gradient(135deg, #fda4af, #be123c)" | "linear-gradient(135deg, #c4b5fd, #7c3aed)" | "linear-gradient(135deg, #fdba74, #c2410c)";
|
|
739
739
|
};
|
|
740
|
-
readonly consumers: readonly ["packages/ui/src/avatar/index.
|
|
740
|
+
readonly consumers: readonly ["packages/ui/src/avatar/index.tsx", "packages/ui/src/avatar/avatar.style.scss"];
|
|
741
741
|
}];
|
|
@@ -380,7 +380,7 @@ var e = {
|
|
|
380
380
|
title: "Avatar backgrounds",
|
|
381
381
|
usage: "Indexed avatar gradients shared by runtime background helpers and avatar styles.",
|
|
382
382
|
colors: Object.fromEntries(t.map((e, t) => [String(t), e])),
|
|
383
|
-
consumers: ["packages/ui/src/avatar/index.
|
|
383
|
+
consumers: ["packages/ui/src/avatar/index.tsx", "packages/ui/src/avatar/avatar.style.scss"]
|
|
384
384
|
}];
|
|
385
385
|
//#endregion
|
|
386
386
|
export { t as AVATAR_CELL_BACKGROUNDS, e as commonColors, n as commonPalettes };
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export interface NativeColorPickerProps {
|
|
2
|
+
label: string;
|
|
3
|
+
value?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
optional?: boolean;
|
|
6
|
+
defaultLabel: string;
|
|
7
|
+
customLabel: string;
|
|
8
|
+
invalidColor?: string;
|
|
9
|
+
colorLabels: Readonly<Record<string, string>>;
|
|
10
|
+
onChange(value: string | undefined): void;
|
|
11
|
+
}
|
|
12
|
+
/** Native mount API; palette markup and interaction belong to ColorPicker. */
|
|
13
|
+
export declare function mountColorPicker(host: HTMLElement, props: NativeColorPickerProps): {
|
|
14
|
+
destroy(): void;
|
|
15
|
+
};
|
package/component-catalog.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LookupField } from './dropdown/lookup-field';
|
|
1
2
|
import { NumberDraft as PreactNumberDraft } from './number-input/index';
|
|
2
3
|
import { MaskedDraft as PreactMaskedDraft } from './masked-input/index';
|
|
3
4
|
import { DurationField as PreactDurationField, DurationDraft as PreactDurationDraft } from './duration/index';
|
|
@@ -20,16 +21,14 @@ export declare const uiComponents: {
|
|
|
20
21
|
readonly AiSuggestions: typeof ui.AiSuggestions;
|
|
21
22
|
readonly AiActionStatus: typeof ui.AiActionStatus;
|
|
22
23
|
readonly AiResult: typeof ui.AiResult;
|
|
24
|
+
readonly AiResultView: typeof ui.AiResultView;
|
|
25
|
+
readonly AiResultTable: typeof ui.AiResultTable;
|
|
26
|
+
readonly AiResultMetrics: typeof ui.AiResultMetrics;
|
|
27
|
+
readonly AiResultText: typeof ui.AiResultText;
|
|
23
28
|
readonly AiChangePreview: typeof ui.AiChangePreview;
|
|
24
29
|
readonly AiAssistant: typeof ui.AiAssistant;
|
|
25
30
|
readonly AiRequestTrail: typeof ui.AiRequestTrail;
|
|
26
|
-
readonly
|
|
27
|
-
readonly RemovableChip: typeof ui.FilterChip;
|
|
28
|
-
readonly Slider: typeof ui.SingleValueSlider;
|
|
29
|
-
readonly RangeSlider: typeof ui.PreactRangeSlider;
|
|
30
|
-
readonly ResourcePicker: typeof ui.SharedResourcePicker;
|
|
31
|
-
readonly FeedbackPanel: typeof ui.StatusFeedbackPanel;
|
|
32
|
-
readonly Input: import('./_vendor/preact/src/index').FunctionalComponent<import('./_vendor/preact/compat/src/index').PropsWithoutRef<Omit<import("./_vendor/preact/src/index").JSX.InputHTMLAttributes<HTMLInputElement>, "className" | "ref" | "class"> & {
|
|
31
|
+
readonly Input: import('./_vendor/preact/src/index').FunctionalComponent<import('./_vendor/preact/compat/src/index').PropsWithoutRef<Omit<import("./_vendor/preact/src/index").JSX.InputHTMLAttributes<HTMLInputElement>, "ref" | "className" | "class"> & {
|
|
33
32
|
class?: import("./_vendor/preact/src/index").JSX.Signalish<string | undefined> | Record<string, boolean | undefined>;
|
|
34
33
|
className?: import("./_vendor/preact/src/index").JSX.Signalish<string | undefined>;
|
|
35
34
|
}> & {
|
|
@@ -102,6 +101,8 @@ export declare const uiComponents: {
|
|
|
102
101
|
readonly FieldError: typeof ui.FieldError;
|
|
103
102
|
readonly FormSection: typeof ui.FormSection;
|
|
104
103
|
readonly Disclosure: typeof ui.Disclosure;
|
|
104
|
+
readonly CollapsibleSection: typeof ui.CollapsibleSection;
|
|
105
|
+
readonly LookupField: typeof LookupField;
|
|
105
106
|
readonly Panel: typeof ui.Panel;
|
|
106
107
|
readonly Toolbar: typeof ui.Toolbar;
|
|
107
108
|
readonly ToolbarGroup: typeof ui.ToolbarGroup;
|
|
@@ -201,6 +202,7 @@ export declare const uiComponents: {
|
|
|
201
202
|
readonly ReorderList: typeof ui.ReorderList;
|
|
202
203
|
readonly ReorderHandle: typeof ui.ReorderHandle;
|
|
203
204
|
readonly TimelineTrack: typeof ui.TimelineTrack;
|
|
205
|
+
readonly IconToolbar: typeof ui.IconToolbar;
|
|
204
206
|
readonly ActivityMessage: typeof ui.ActivityMessage;
|
|
205
207
|
readonly PdfViewer: typeof ui.PdfViewer;
|
|
206
208
|
readonly PdfViewerToolbar: typeof ui.PdfViewerToolbar;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { FieldRemoveButton as DeleteButton } from './field-configurator';
|
|
2
|
+
import { h, ComponentChildren, ComponentProps, JSX, Ref } from './_vendor/preact/src/index';
|
|
3
|
+
import { DropdownPopup } from './dropdown/popup';
|
|
4
|
+
import { SearchInput } from './search-input/index';
|
|
5
|
+
type ElementRenderer = (...args: any[]) => any;
|
|
6
|
+
export declare const CONFIGURATOR_AREA_ICONS: {
|
|
7
|
+
rows: string;
|
|
8
|
+
columns: string;
|
|
9
|
+
values: string;
|
|
10
|
+
filters: string;
|
|
11
|
+
};
|
|
12
|
+
type ActionTriggerProps = Omit<JSX.IntrinsicElements['button'], 'children' | 'ref'> & {
|
|
13
|
+
icon: 'plus' | 'gear';
|
|
14
|
+
buttonRef?: Ref<HTMLButtonElement>;
|
|
15
|
+
};
|
|
16
|
+
/** The same control renders in Core Fields cells and Preact panels. */
|
|
17
|
+
export declare function renderConfiguratorActionTrigger(createElement: ElementRenderer, { icon, buttonRef, ...props }: ActionTriggerProps): any;
|
|
18
|
+
/** Native button refs and event handlers stay with the adapter. */
|
|
19
|
+
export declare function ConfiguratorActionTrigger(props: ActionTriggerProps): JSX.Element;
|
|
20
|
+
export declare function ConfiguratorRemoveButton(props: ComponentProps<typeof DeleteButton>): h.JSX.Element;
|
|
21
|
+
/** Shared menu row; integrations supply policy, labels and callbacks. */
|
|
22
|
+
export declare function ConfiguratorActionButton({ text, icon, explanation, checked, ...props }: Omit<JSX.IntrinsicElements['button'], 'children'> & {
|
|
23
|
+
text: string;
|
|
24
|
+
icon?: ComponentChildren;
|
|
25
|
+
explanation?: string;
|
|
26
|
+
checked?: boolean;
|
|
27
|
+
}): h.JSX.Element;
|
|
28
|
+
export declare function ConfiguratorActionIcon({ svg }: {
|
|
29
|
+
svg: string;
|
|
30
|
+
}): h.JSX.Element;
|
|
31
|
+
export declare function ConfiguratorZoneActions({ add, clear, children }: {
|
|
32
|
+
add: ComponentProps<typeof ConfiguratorActionTrigger>;
|
|
33
|
+
clear?: ComponentProps<typeof ConfiguratorRemoveButton>;
|
|
34
|
+
children?: ComponentChildren;
|
|
35
|
+
}): h.JSX.Element;
|
|
36
|
+
export declare function ConfiguratorFilterStatus({ label }: {
|
|
37
|
+
label: string;
|
|
38
|
+
}): h.JSX.Element;
|
|
39
|
+
export declare function ConfiguratorFieldCaption({ children, annotation }: {
|
|
40
|
+
children: ComponentChildren;
|
|
41
|
+
annotation?: string;
|
|
42
|
+
}): h.JSX.Element;
|
|
43
|
+
export declare function ConfiguratorHint({ children }: {
|
|
44
|
+
children: ComponentChildren;
|
|
45
|
+
}): h.JSX.Element;
|
|
46
|
+
export declare function ConfiguratorFieldSearch(props: ComponentProps<typeof SearchInput>): h.JSX.Element;
|
|
47
|
+
export declare function ConfiguratorFieldPicker({ children, emptyText }: {
|
|
48
|
+
children?: ComponentChildren;
|
|
49
|
+
emptyText?: string;
|
|
50
|
+
}): h.JSX.Element;
|
|
51
|
+
export declare function ConfiguratorActionGroup({ section, children }: {
|
|
52
|
+
section: 'settings' | 'layout' | 'removal';
|
|
53
|
+
children: ComponentChildren;
|
|
54
|
+
}): h.JSX.Element | null;
|
|
55
|
+
export declare function ConfiguratorActionPanel({ title, accessibleLabel, header, panelRef, onKeyDown, children, ...popup }: Omit<ComponentProps<typeof DropdownPopup>, 'children' | 'popupClassName' | 'topLayer' | 'closeOnClickOutside'> & {
|
|
56
|
+
title: string;
|
|
57
|
+
accessibleLabel?: string;
|
|
58
|
+
header?: ComponentChildren;
|
|
59
|
+
panelRef?: Ref<HTMLDivElement>;
|
|
60
|
+
onKeyDown?: JSX.HTMLAttributes<HTMLDivElement>['onKeyDown'];
|
|
61
|
+
children: ComponentChildren;
|
|
62
|
+
}): h.JSX.Element;
|
|
63
|
+
/** Field identity shared by grid and report authoring controls. */
|
|
64
|
+
export declare function ConfiguratorFieldTypeIcon({ field }: {
|
|
65
|
+
field?: import('./configurator-field-icon').ConfiguratorFieldMetadata;
|
|
66
|
+
}): h.JSX.Element;
|
|
67
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as CONFIGURATOR_AREA_ICONS, n as ConfiguratorActionButton, r as ConfiguratorActionGroup, i as ConfiguratorActionIcon, a as ConfiguratorActionPanel, o as ConfiguratorActionTrigger, s as ConfiguratorFieldCaption, c as ConfiguratorFieldPicker, l as ConfiguratorFieldSearch, u as ConfiguratorFieldTypeIcon, d as ConfiguratorFilterStatus, f as ConfiguratorHint, p as ConfiguratorRemoveButton, m as ConfiguratorZoneActions, h as renderConfiguratorActionTrigger } from "./_chunks/configurator-actions-By8WSL2m.js";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { h } from './_vendor/preact/src/index';
|
|
2
|
+
export interface AggregationListLabels {
|
|
3
|
+
measureAggregation: string;
|
|
4
|
+
aggregationNames: Record<string, string>;
|
|
5
|
+
measureCurrentUnavailable: (operation: string) => string;
|
|
6
|
+
}
|
|
7
|
+
/** Arrow keys explore choices; Enter/Space commit through the existing configuration owner. */
|
|
8
|
+
export declare function ConfiguratorAggregationList({ value, aggregators, i18n, disabled, onChange }: {
|
|
9
|
+
value: string;
|
|
10
|
+
aggregators: string[];
|
|
11
|
+
i18n: AggregationListLabels;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onChange: (value: string, origin: HTMLButtonElement) => void;
|
|
14
|
+
}): h.JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { i as e } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
2
|
+
import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { t as n } from "./_chunks/native-control-pFMuHf3G.js";
|
|
4
|
+
import "./_chunks/check-BwI7iCAm.js";
|
|
5
|
+
import { t as r } from "./_chunks/calculator-CDWOuAcp.js";
|
|
6
|
+
//#region src/configurator-aggregation-list.tsx
|
|
7
|
+
function i({ value: i, aggregators: a, i18n: o, disabled: s, onChange: c }) {
|
|
8
|
+
let l = a.includes(i) ? a : [i, ...a], [u, d] = e(), f = u && a.includes(u) ? u : a.includes(i) ? i : a[0];
|
|
9
|
+
return /* @__PURE__ */ t("section", {
|
|
10
|
+
className: "pivot-aggregation-menu",
|
|
11
|
+
children: [/* @__PURE__ */ t("div", {
|
|
12
|
+
className: "pivot-aggregation-heading",
|
|
13
|
+
children: o.measureAggregation
|
|
14
|
+
}), /* @__PURE__ */ t("div", {
|
|
15
|
+
role: "menu",
|
|
16
|
+
"aria-label": o.measureAggregation,
|
|
17
|
+
children: l.map((e) => /* @__PURE__ */ t(n, {
|
|
18
|
+
type: "button",
|
|
19
|
+
role: "menuitemradio",
|
|
20
|
+
className: "rv-btn pivot-aggregation-option",
|
|
21
|
+
"data-value": e,
|
|
22
|
+
"aria-checked": e === i,
|
|
23
|
+
disabled: s || !a.includes(e),
|
|
24
|
+
tabIndex: !s && e === f ? 0 : -1,
|
|
25
|
+
onFocus: () => d(e),
|
|
26
|
+
onKeyDown: (e) => {
|
|
27
|
+
if (![
|
|
28
|
+
"ArrowUp",
|
|
29
|
+
"ArrowDown",
|
|
30
|
+
"ArrowLeft",
|
|
31
|
+
"ArrowRight",
|
|
32
|
+
"Home",
|
|
33
|
+
"End"
|
|
34
|
+
].includes(e.key)) return;
|
|
35
|
+
e.preventDefault(), e.stopPropagation();
|
|
36
|
+
let t = [...e.currentTarget.parentElement.querySelectorAll("button:not(:disabled)")], n = t.indexOf(e.currentTarget);
|
|
37
|
+
t[e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : (n + (e.key === "ArrowUp" || e.key === "ArrowLeft" ? -1 : 1) + t.length) % t.length]?.focus();
|
|
38
|
+
},
|
|
39
|
+
onClick: (t) => c(e, t.currentTarget),
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ t("span", {
|
|
42
|
+
className: "pivot-field-action-symbol",
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
dangerouslySetInnerHTML: { __html: r }
|
|
45
|
+
}),
|
|
46
|
+
/* @__PURE__ */ t("span", {
|
|
47
|
+
className: "pivot-aggregation-name",
|
|
48
|
+
children: a.includes(e) ? o.aggregationNames[e] ?? e : o.measureCurrentUnavailable(e)
|
|
49
|
+
}),
|
|
50
|
+
e === i && /* @__PURE__ */ t("span", {
|
|
51
|
+
className: "pivot-aggregation-check",
|
|
52
|
+
"aria-hidden": "true",
|
|
53
|
+
dangerouslySetInnerHTML: { __html: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M434.8 70.1c14.3 10.4 17.5 30.4 7.1 44.7l-256 352c-5.5 7.6-14 12.3-23.4 13.1s-18.5-2.7-25.1-9.3l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l101.5 101.5 234-321.7c10.4-14.3 30.4-17.5 44.7-7.1z\"/></svg>" }
|
|
54
|
+
})
|
|
55
|
+
]
|
|
56
|
+
}, e))
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
export { i as ConfiguratorAggregationList };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { h, JSX, ComponentChildren } from './_vendor/preact/src/index';
|
|
2
|
+
export interface ConfiguratorDropZoneProps<Prop extends string | number, Field extends {
|
|
3
|
+
prop: Prop;
|
|
4
|
+
name?: string;
|
|
5
|
+
}, Area extends string> {
|
|
6
|
+
label?: string;
|
|
7
|
+
footer?: ComponentChildren;
|
|
8
|
+
removeLabel?: (index: number, prop: Prop) => string;
|
|
9
|
+
title: string | JSX.Element;
|
|
10
|
+
headerActions?: JSX.Element | null;
|
|
11
|
+
renderActions?: (index: number, prop: Prop) => JSX.Element | null;
|
|
12
|
+
allowFieldRemoving?: boolean;
|
|
13
|
+
panel: Area;
|
|
14
|
+
items: Prop[];
|
|
15
|
+
/** Optional stable identities for repeated measure instances; other zones use their field identities. */
|
|
16
|
+
itemKeys?: readonly (string | number)[];
|
|
17
|
+
dimensions: ReadonlyMap<Prop, Field>;
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
i18n: {
|
|
20
|
+
dragHere: string;
|
|
21
|
+
remove: string;
|
|
22
|
+
};
|
|
23
|
+
onRemove: (index: number) => void;
|
|
24
|
+
onDrop: (target: Area, index?: number, event?: DragEvent) => void;
|
|
25
|
+
canDrop?: (event: DragEvent) => boolean;
|
|
26
|
+
onDragOver: (e: Event) => void;
|
|
27
|
+
onDragEnter: (e: Event) => void;
|
|
28
|
+
onItemDragStart: (index: number, prop: Prop, event?: DragEvent) => void;
|
|
29
|
+
onItemDragEnd: () => void;
|
|
30
|
+
renderItem?: (index: number, item?: Field) => ComponentChildren;
|
|
31
|
+
allowFieldDragging?: boolean;
|
|
32
|
+
dragActive?: boolean;
|
|
33
|
+
renderIcon?: (field?: Field) => ComponentChildren;
|
|
34
|
+
}
|
|
35
|
+
export declare function ConfiguratorDropZone<Prop extends string | number, Field extends {
|
|
36
|
+
prop: Prop;
|
|
37
|
+
name?: string;
|
|
38
|
+
}, Area extends string>({ title, label, footer, removeLabel, headerActions, renderActions, allowFieldRemoving, panel, items, itemKeys, dimensions, placeholder, i18n, renderItem, onRemove, onDrop, onDragOver, canDrop, onDragEnter, onItemDragStart, onItemDragEnd, allowFieldDragging, dragActive, renderIcon, }: ConfiguratorDropZoneProps<Prop, Field, Area>): h.JSX.Element;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { i as e } from "./_chunks/preact.module-BBM36DnO.js";
|
|
2
|
+
import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
|
+
import { a as n, f as r, o as i, p as a, v as o } from "./_chunks/field-configurator-BCINdXpU.js";
|
|
4
|
+
import { useFieldDropTarget as s } from "./field-reorder.hook.js";
|
|
5
|
+
//#region src/configurator-drop-zone.tsx
|
|
6
|
+
function c({ title: c, label: l, footer: u, removeLabel: d, headerActions: f, renderActions: p, allowFieldRemoving: m = !0, panel: h, items: g, itemKeys: _, dimensions: v, placeholder: y, i18n: b, renderItem: x, onRemove: S, onDrop: C, onDragOver: w, canDrop: T = () => !0, onDragEnter: E, onItemDragStart: D, onItemDragEnd: O, allowFieldDragging: k = !0, dragActive: A, renderIcon: j }) {
|
|
7
|
+
let M = g.length === 0, N = s(g.length, {
|
|
8
|
+
enabled: k,
|
|
9
|
+
active: A,
|
|
10
|
+
canDrop: T,
|
|
11
|
+
onDragOver: w,
|
|
12
|
+
onDrop: (e, t) => C(h, e, t)
|
|
13
|
+
});
|
|
14
|
+
return /* @__PURE__ */ t(i, {
|
|
15
|
+
...N.list,
|
|
16
|
+
className: "pivot-layout-zone",
|
|
17
|
+
"aria-label": l,
|
|
18
|
+
"data-pivot-area": h,
|
|
19
|
+
heading: c,
|
|
20
|
+
headingClassName: "zone-title",
|
|
21
|
+
actions: f,
|
|
22
|
+
children: [/* @__PURE__ */ t(r, {
|
|
23
|
+
empty: M,
|
|
24
|
+
placeholder: y ?? b.dragHere,
|
|
25
|
+
className: `min-h-[3rem] overflow-auto grow panel-card ${M ? "empty" : ""} ${N.isOver ? "drag-over" : ""}`,
|
|
26
|
+
...N.list,
|
|
27
|
+
onDragEnter: E,
|
|
28
|
+
children: g.map((r, i) => {
|
|
29
|
+
let s = v.get(r), l = N.position(i);
|
|
30
|
+
return /* @__PURE__ */ t(o, {
|
|
31
|
+
...N.row(i),
|
|
32
|
+
draggable: k,
|
|
33
|
+
onDragStart: (e) => {
|
|
34
|
+
k ? (e.dataTransfer?.setData("text/plain", String(r)), e.dataTransfer && (e.dataTransfer.effectAllowed = "move"), N.start(i), D(i, r, e)) : e.preventDefault();
|
|
35
|
+
},
|
|
36
|
+
onDragEnd: () => {
|
|
37
|
+
N.clear(), O();
|
|
38
|
+
},
|
|
39
|
+
indicator: l && /* @__PURE__ */ t(n, {
|
|
40
|
+
position: l,
|
|
41
|
+
index: N.boundary ?? void 0,
|
|
42
|
+
className: `pivot-zone-drop-divider ${l}`
|
|
43
|
+
}),
|
|
44
|
+
contentClassName: "pivot-dimension-cell",
|
|
45
|
+
icon: j?.(s),
|
|
46
|
+
label: /* @__PURE__ */ t("span", {
|
|
47
|
+
className: "pivot-zone-field-caption flex grow",
|
|
48
|
+
children: x?.(i, s) ?? s?.name ?? r
|
|
49
|
+
}),
|
|
50
|
+
actions: /* @__PURE__ */ t(e, { children: [p?.(i, r), m && /* @__PURE__ */ t(a, {
|
|
51
|
+
className: "pivot-remove-button",
|
|
52
|
+
onClick: () => S(i),
|
|
53
|
+
locale: {
|
|
54
|
+
title: d?.(i, r) ?? b.remove,
|
|
55
|
+
ariaLabel: d?.(i, r) ?? b.remove
|
|
56
|
+
}
|
|
57
|
+
})] })
|
|
58
|
+
}, _?.[i] ?? `${c}-${i}`);
|
|
59
|
+
})
|
|
60
|
+
}), u]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { c as ConfiguratorDropZone };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ConfiguratorFieldMetadata {
|
|
2
|
+
columnType?: string;
|
|
3
|
+
dataType?: 'string' | 'number' | 'date' | 'boolean';
|
|
4
|
+
}
|
|
5
|
+
/** Shared descriptive field identity; never infers or formats source values. */
|
|
6
|
+
export declare function resolveConfiguratorFieldIcon(dimension?: ConfiguratorFieldMetadata): {
|
|
7
|
+
kind: string;
|
|
8
|
+
svg: string;
|
|
9
|
+
label: string;
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as resolveConfiguratorFieldIcon } from "./_chunks/configurator-field-icon-CmcM_sPs.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Return focus only from this editor. Release a temporary tab stop on blur or disposal. */
|
|
2
|
+
export declare function focusConfiguratorOrigin(origin: HTMLElement, root: HTMLElement | null): () => void;
|
|
3
|
+
/** A single mounted owner's lease; synchronous focus callbacks cannot revive a disposed lease. */
|
|
4
|
+
export declare function useConfiguratorOriginFocus(): (origin: HTMLElement, root: HTMLElement | null) => void;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { r as e, t } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
2
|
+
//#region src/configurator-focus.ts
|
|
3
|
+
var n = () => {};
|
|
4
|
+
function r(e, t) {
|
|
5
|
+
if (!e.isConnected || !t?.isConnected || e.ownerDocument !== t.ownerDocument) return !1;
|
|
6
|
+
let n = e.ownerDocument.activeElement;
|
|
7
|
+
return !n || n === e.ownerDocument.body || n === e || t.contains(n);
|
|
8
|
+
}
|
|
9
|
+
function i(e, t) {
|
|
10
|
+
if (!r(e, t)) return n;
|
|
11
|
+
let i = e.ownerDocument, a = i.activeElement;
|
|
12
|
+
if (e.focus({ preventScroll: !0 }), i.activeElement === e || e.hasAttribute("tabindex") || !e.isConnected || !t.isConnected || i.activeElement !== a && i.activeElement !== i.body) return n;
|
|
13
|
+
let o = !0, s = () => {
|
|
14
|
+
o && (o = !1, e.removeEventListener("blur", s), e.getAttribute("tabindex") === "-1" && e.removeAttribute("tabindex"));
|
|
15
|
+
};
|
|
16
|
+
e.setAttribute("tabindex", "-1"), e.addEventListener("blur", s);
|
|
17
|
+
try {
|
|
18
|
+
e.focus({ preventScroll: !0 }), (i.activeElement !== e || !e.isConnected || !t.isConnected) && s();
|
|
19
|
+
} catch (e) {
|
|
20
|
+
throw s(), e;
|
|
21
|
+
}
|
|
22
|
+
return s;
|
|
23
|
+
}
|
|
24
|
+
function a() {
|
|
25
|
+
let a = t(n), o = t(0), s = t(!0);
|
|
26
|
+
return e(() => (s.current = !0, () => {
|
|
27
|
+
s.current = !1, o.current++;
|
|
28
|
+
let e = a.current;
|
|
29
|
+
a.current = n, e();
|
|
30
|
+
}), []), (e, t) => {
|
|
31
|
+
if (!s.current || !r(e, t)) return;
|
|
32
|
+
let c = ++o.current, l = a.current;
|
|
33
|
+
if (a.current = n, l(), !s.current || c !== o.current) return;
|
|
34
|
+
let u = i(e, t);
|
|
35
|
+
!s.current || c !== o.current ? u() : a.current = u;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { i as focusConfiguratorOrigin, a as useConfiguratorOriginFocus };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { h, ComponentChildren } from './_vendor/preact/src/index';
|
|
2
|
+
/** Application-owned content. Return cleanup when mounting another framework or UI. */
|
|
3
|
+
export interface ConfiguratorSection {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
hidden?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
render?: () => ComponentChildren;
|
|
9
|
+
mount?: (host: HTMLElement) => void | (() => void);
|
|
10
|
+
}
|
|
11
|
+
export interface ConfiguratorSectionsConfig {
|
|
12
|
+
/** Custom tabs appended after the built-in tabs. IDs must be unique and cannot replace built-ins. */
|
|
13
|
+
sections?: readonly ConfiguratorSection[];
|
|
14
|
+
initialSection?: string;
|
|
15
|
+
onSectionChange?: (id: string) => void;
|
|
16
|
+
}
|
|
17
|
+
/** Selection follows current availability, without discarding mounted editor drafts. */
|
|
18
|
+
export declare function useConfiguratorSections(config: ConfiguratorSectionsConfig, builtins: readonly ConfiguratorSection[], disabled?: boolean): {
|
|
19
|
+
sections: ConfiguratorSection[];
|
|
20
|
+
custom: ConfiguratorSection[];
|
|
21
|
+
active: string | undefined;
|
|
22
|
+
select: (id: string) => void;
|
|
23
|
+
};
|
|
24
|
+
/** Shared switch spacing and opaque sticky backdrop for every configurator. */
|
|
25
|
+
export declare function ConfiguratorHeader({ children, className }: {
|
|
26
|
+
children?: ComponentChildren;
|
|
27
|
+
className?: string;
|
|
28
|
+
}): h.JSX.Element;
|
|
29
|
+
export declare function ConfiguratorSectionTabs({ sections, active, onChange, prefix, label, className }: {
|
|
30
|
+
sections: readonly ConfiguratorSection[];
|
|
31
|
+
active?: string;
|
|
32
|
+
onChange: (id: string) => void;
|
|
33
|
+
prefix: string;
|
|
34
|
+
label: string;
|
|
35
|
+
className?: string;
|
|
36
|
+
}): h.JSX.Element;
|
|
37
|
+
/** Inactive sections retain chat transcripts and host drafts until removed. */
|
|
38
|
+
export declare function ConfiguratorSectionPanels({ sections, active, prefix }: {
|
|
39
|
+
sections: readonly ConfiguratorSection[];
|
|
40
|
+
active?: string;
|
|
41
|
+
prefix: string;
|
|
42
|
+
}): h.JSX.Element;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { i as e } from "./_chunks/preact.module-BBM36DnO.js";
|
|
2
|
+
import { i as t, r as n, t as r } from "./_chunks/hooks.module-CG3gN83z.js";
|
|
3
|
+
import { t as i } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
4
|
+
import { SegmentedSwitch as a } from "./segmented-switch/index.js";
|
|
5
|
+
//#region src/configurator-sections.tsx
|
|
6
|
+
function o(e, n, r = !1) {
|
|
7
|
+
let i = new Set(n.map((e) => e.id)), a = (e.sections ?? []).filter((e) => !e.id || i.has(e.id) ? !1 : (i.add(e.id), !0)), o = [...n, ...a].filter((e) => !e.hidden).map((e) => r ? {
|
|
8
|
+
...e,
|
|
9
|
+
disabled: !0
|
|
10
|
+
} : e), [s, c] = t(e.initialSection ?? n[0]?.id), l = o.find((e) => e.id === s && (r || !e.disabled))?.id ?? o.find((e) => !e.disabled)?.id ?? (r ? o[0]?.id : void 0);
|
|
11
|
+
return {
|
|
12
|
+
sections: o,
|
|
13
|
+
custom: o.filter((e) => !n.some((t) => t.id === e.id)),
|
|
14
|
+
active: l,
|
|
15
|
+
select: (t) => {
|
|
16
|
+
t !== l && o.some((e) => e.id === t && !e.disabled) && (c(t), e.onSectionChange?.(t));
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function s({ children: e, className: t = "" }) {
|
|
21
|
+
return /* @__PURE__ */ i("header", {
|
|
22
|
+
className: `rv-configurator-header ${t}`,
|
|
23
|
+
children: e
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function c({ sections: e, active: t, onChange: n, prefix: r, label: o, className: s = "" }) {
|
|
27
|
+
return /* @__PURE__ */ i(a, {
|
|
28
|
+
value: t ?? "",
|
|
29
|
+
ariaLabel: o,
|
|
30
|
+
role: "tablist",
|
|
31
|
+
className: `rv-configurator-section-tabs ${s}`,
|
|
32
|
+
options: e.map((e) => ({
|
|
33
|
+
value: e.id,
|
|
34
|
+
label: e.label,
|
|
35
|
+
disabled: e.disabled,
|
|
36
|
+
id: `${r}-tab-${e.id}`,
|
|
37
|
+
ariaControls: `${r}-panel-${e.id}`
|
|
38
|
+
})),
|
|
39
|
+
onChange: n
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function l({ section: e }) {
|
|
43
|
+
let t = r(null);
|
|
44
|
+
return n(() => {
|
|
45
|
+
if (t.current && e.mount) return e.mount(t.current);
|
|
46
|
+
}, [e.mount]), /* @__PURE__ */ i("div", {
|
|
47
|
+
ref: t,
|
|
48
|
+
class: "rv-configurator-section-content",
|
|
49
|
+
children: e.render?.()
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function u({ sections: t, active: n, prefix: r }) {
|
|
53
|
+
return /* @__PURE__ */ i(e, { children: t.map((e) => /* @__PURE__ */ i(d, {
|
|
54
|
+
section: e,
|
|
55
|
+
active: n === e.id,
|
|
56
|
+
prefix: r
|
|
57
|
+
}, e.id)) });
|
|
58
|
+
}
|
|
59
|
+
function d({ section: e, active: t, prefix: n }) {
|
|
60
|
+
let a = r(!1);
|
|
61
|
+
return t && (a.current = !0), /* @__PURE__ */ i("section", {
|
|
62
|
+
hidden: !t,
|
|
63
|
+
role: "tabpanel",
|
|
64
|
+
id: `${n}-panel-${e.id}`,
|
|
65
|
+
"aria-labelledby": `${n}-tab-${e.id}`,
|
|
66
|
+
class: "rv-configurator-custom-section",
|
|
67
|
+
children: a.current && /* @__PURE__ */ i(l, { section: e })
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { s as ConfiguratorHeader, u as ConfiguratorSectionPanels, c as ConfiguratorSectionTabs, o as useConfiguratorSections };
|
|
@@ -1,2 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './control-
|
|
1
|
+
import { ControlTag, ControlAttributes } from './control-attributes';
|
|
2
|
+
export * from './control-attributes';
|
|
3
|
+
export declare function renderControl<H extends (...args: any[]) => any>(h: H, tag: ControlTag, attributes?: ControlAttributes | null, ...children: any[]): ReturnType<H>;
|
|
4
|
+
export declare function createControl<K extends ControlTag>(document: Document, tag: K, attributes?: ControlAttributes): HTMLElementTagNameMap[K];
|
|
5
|
+
export declare function registerControl<T extends object>(component: T, tag: ControlTag): T;
|
|
6
|
+
export declare function nativeControlTag(type: unknown): string | undefined;
|
|
7
|
+
/** Decorate a native icon control after installing its trusted bundled SVG. */
|
|
8
|
+
export declare function decorateIconAction(element: HTMLElement, label: string): void;
|
package/control-presentation.js
CHANGED
|
@@ -1,36 +1,41 @@
|
|
|
1
1
|
import { c as e } from "./_chunks/preact.module-BBM36DnO.js";
|
|
2
2
|
import { t } from "./_chunks/jsxRuntime.module-F6UFnpT-.js";
|
|
3
3
|
import { createPreactElement as n } from "./preact-mount.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { n as r } from "./_chunks/popover-controller-D-AvKQ7B.js";
|
|
5
|
+
import { controlAttributes as i, controlClassName as a } from "./control-attributes.js";
|
|
6
|
+
//#region src/control-presentation.tsx
|
|
7
|
+
function o(e, t, n, ...r) {
|
|
7
8
|
let a = n ?? {};
|
|
8
9
|
if (t === "button" && a.busy === !0) {
|
|
9
|
-
let n =
|
|
10
|
-
return e(t,
|
|
10
|
+
let n = r.length ? r : [a.children];
|
|
11
|
+
return e(t, i(t, a), e("span", {
|
|
11
12
|
class: "rv-button-spinner",
|
|
12
13
|
"aria-hidden": "true"
|
|
13
14
|
}), ...n);
|
|
14
15
|
}
|
|
15
|
-
return e(t,
|
|
16
|
+
return e(t, i(t, a), ...r);
|
|
16
17
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
return i.onChange && !(r === "button" && i.busy) && Object.assign(
|
|
18
|
+
function s(t, r, i = {}) {
|
|
19
|
+
let a = o(e, r, i);
|
|
20
|
+
return i.onChange && !(r === "button" && i.busy) && Object.assign(a.props, { onChange: i.onChange }), n(t, a);
|
|
20
21
|
}
|
|
21
|
-
var
|
|
22
|
-
function
|
|
23
|
-
return
|
|
22
|
+
var c = /* @__PURE__ */ new WeakMap();
|
|
23
|
+
function l(e, t) {
|
|
24
|
+
return c.set(e, t), e;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
return typeof e == "string" ? e : e && (typeof e == "function" || typeof e == "object") ?
|
|
26
|
+
function u(e) {
|
|
27
|
+
return typeof e == "string" ? e : e && (typeof e == "function" || typeof e == "object") ? c.get(e) : void 0;
|
|
27
28
|
}
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
var d = /* @__PURE__ */ new WeakMap();
|
|
30
|
+
function f(e, i) {
|
|
31
|
+
e.classList.add("rv-btn", "rv-btn-ghost", "rv-btn-icon"), e.setAttribute("aria-label", i), d.get(e)?.(), e.removeAttribute("title"), e.querySelector(".rv-control-tooltip")?.remove();
|
|
32
|
+
let a = n(e.ownerDocument, /* @__PURE__ */ t("span", {
|
|
30
33
|
class: "rv-control-tooltip",
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
role: "tooltip",
|
|
35
|
+
hidden: !0,
|
|
36
|
+
children: i
|
|
37
|
+
}));
|
|
38
|
+
e.append(a), d.set(e, new r().bind(e, i, { surface: a }));
|
|
34
39
|
}
|
|
35
40
|
//#endregion
|
|
36
|
-
export {
|
|
41
|
+
export { i as controlAttributes, a as controlClassName, s as createControl, f as decorateIconAction, u as nativeControlTag, l as registerControl, o as renderControl };
|
package/controls.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BadgeOptions } from './badge';
|
|
2
1
|
import { h, ComponentChildren, JSX } from './_vendor/preact/src/index';
|
|
3
2
|
import { SegmentedSwitchProps, SegmentedSwitchValue } from './segmented-switch';
|
|
4
3
|
import { EditorPane, EditorSplitLayout } from './editor-layout';
|
|
@@ -106,7 +105,7 @@ export declare function Panel({ children, className, label }: ShellProps): h.JSX
|
|
|
106
105
|
export declare function Toolbar({ children, className, label }: ShellProps): h.JSX.Element;
|
|
107
106
|
export declare function ToolbarGroup({ children, className, label }: ShellProps): h.JSX.Element;
|
|
108
107
|
export declare function ToolbarSeparator(): h.JSX.Element;
|
|
109
|
-
export
|
|
108
|
+
export { Badge } from './badge.view';
|
|
110
109
|
export declare function CountBadge({ count, label }: {
|
|
111
110
|
count: number;
|
|
112
111
|
label: string;
|
package/controls.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u,
|
|
2
|
-
import { EditorList as
|
|
3
|
-
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F, y as I } from "./_chunks/controls-FUU-MUKC.js";
|
|
2
|
+
import { EditorList as L, EditorListGroup as R, EditorListItem as z, EditorListItemContent as B, EditorPane as V, EditorSplitLayout as H } from "./editor-layout/index.js";
|
|
3
|
+
import { t as U } from "./_chunks/badge.view-D30pMUfi.js";
|
|
4
|
+
export { o as Alert, U as Badge, j as Button, E as ButtonGroup, k as Chip, x as CircularProgress, m as CountBadge, D as DateInput, A as DateTimeInput, g as Disclosure, w as EmptyState, M as FieldError, _ as FieldHint, v as FormSection, O as IconButton, L as Listbox, R as ListboxGroup, z as ListboxOption, B as ListboxOptionContent, T as LoadingOverlay, b as Menu, y as MenuItem, p as MenuSeparator, N as NumberInput, I as NumberStepper, h as Pagination, V as Pane, F as Panel, d as RadioGroup, t as Rating, P as ResizeHandle, f as SegmentedControl, r as Spinner, H as SplitLayout, n as Submenu, l as TabPanel, C as Tabs, e as TextInput, S as Textarea, s as TimeInput, c as ToggleButton, u as Toolbar, i as ToolbarGroup, a as ToolbarSeparator };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** Prefer keeping the field visible, with an optional viewport fit for larger editors. */
|
|
2
2
|
export declare function calculateEditorPopupPosition(anchor: Pick<DOMRect, 'left' | 'right' | 'top' | 'bottom'>, popup: Pick<DOMRect, 'width' | 'height'>, viewport: {
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
5
|
-
}, gap
|
|
5
|
+
}, { gap, inset, fitViewport }?: {
|
|
6
|
+
gap?: number | undefined;
|
|
7
|
+
inset?: number | undefined;
|
|
8
|
+
fitViewport?: boolean | undefined;
|
|
9
|
+
}): {
|
|
6
10
|
placementY: string;
|
|
7
11
|
maxHeight: number;
|
|
8
12
|
top: number;
|
package/core/editor-popup.d.ts
CHANGED
|
@@ -6,6 +6,10 @@ export interface EditorPopupHandle {
|
|
|
6
6
|
export interface EditorPopupOptions {
|
|
7
7
|
label: string;
|
|
8
8
|
className?: string;
|
|
9
|
+
/** Allow overlap with the anchor when the popup needs more vertical room. */
|
|
10
|
+
fitViewport?: boolean;
|
|
11
|
+
/** A separate trigger can toggle the popup without applying the draft. */
|
|
12
|
+
trigger?: HTMLElement;
|
|
9
13
|
onClose?: () => void;
|
|
10
14
|
isAvailable?: () => boolean;
|
|
11
15
|
}
|