@m3ui-vue/m3ui-vue 1.6.0 → 1.6.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/dist/API.md +940 -33
- package/dist/{MButton-CPghlKb0.js → MButton-OQ4wIERQ.js} +2 -2
- package/dist/{MButton-CPghlKb0.js.map → MButton-OQ4wIERQ.js.map} +1 -1
- package/dist/MColorPickerModal-NtkihoK6.js +577 -0
- package/dist/MColorPickerModal-NtkihoK6.js.map +1 -0
- package/dist/{MDialog-X50At1Gk.js → MDialog-DYMnaBlt.js} +3 -3
- package/dist/{MDialog-X50At1Gk.js.map → MDialog-DYMnaBlt.js.map} +1 -1
- package/dist/{MListItem-DVi1j1QI.js → MListItem-D2cNUyzP.js} +211 -168
- package/dist/MListItem-D2cNUyzP.js.map +1 -0
- package/dist/{MLoadingIndicator-vooA3110.js → MLoadingIndicator-DWUj0BAB.js} +2 -2
- package/dist/{MLoadingIndicator-vooA3110.js.map → MLoadingIndicator-DWUj0BAB.js.map} +1 -1
- package/dist/{MMenuItem-CRNZkVVr.js → MMenuItem-BuxYoASE.js} +133 -151
- package/dist/MMenuItem-BuxYoASE.js.map +1 -0
- package/dist/{MSeekBar-BL2W5_rD.js → MSeekBar-C4cn9RIF.js} +2 -2
- package/dist/{MSeekBar-BL2W5_rD.js.map → MSeekBar-C4cn9RIF.js.map} +1 -1
- package/dist/{MSlider-B9NcKTmZ.js → MSlider-BIkA6DiE.js} +2 -2
- package/dist/{MSlider-B9NcKTmZ.js.map → MSlider-BIkA6DiE.js.map} +1 -1
- package/dist/{MSpinner-_XpTRkAg.js → MSpinner-DZkXZJpc.js} +2 -2
- package/dist/{MSpinner-_XpTRkAg.js.map → MSpinner-DZkXZJpc.js.map} +1 -1
- package/dist/{MTextField-DpcPmR5B.js → MTextField-CNH-byir.js} +2 -2
- package/dist/{MTextField-DpcPmR5B.js.map → MTextField-CNH-byir.js.map} +1 -1
- package/dist/MTooltip-CK39Zon4.js +183 -0
- package/dist/MTooltip-CK39Zon4.js.map +1 -0
- package/dist/{_useEscapeStack-C5-BYr8y.js → _popupPosition-nL8SVKPK.js} +20 -2
- package/dist/_popupPosition-nL8SVKPK.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/code-editor.js +1 -1
- package/dist/components/MAddressField.vue.d.ts +54 -0
- package/dist/components/MAudioPlayer.vue.d.ts +1 -1
- package/dist/components/MAudioRecorder.vue.d.ts +51 -0
- package/dist/components/MAvailabilityCalendar.vue.d.ts +1 -1
- package/dist/components/MCameraCapture.vue.d.ts +51 -0
- package/dist/components/MCollapse.vue.d.ts +32 -0
- package/dist/components/MCountrySelect.vue.d.ts +41 -0
- package/dist/components/MCronField.vue.d.ts +26 -0
- package/dist/components/MDashboardGrid.vue.d.ts +65 -0
- package/dist/components/MDiffViewer.vue.d.ts +56 -0
- package/dist/components/MExpansionPanel.vue.d.ts +26 -3
- package/dist/components/MFilterBuilder.vue.d.ts +22 -0
- package/dist/components/MFlex.vue.d.ts +1 -1
- package/dist/components/MMapCluster.vue.d.ts +80 -0
- package/dist/components/MMapDraw.vue.d.ts +79 -0
- package/dist/components/MMentionField.vue.d.ts +102 -0
- package/dist/components/MNotificationCenter.vue.d.ts +57 -0
- package/dist/components/MQRScanner.vue.d.ts +52 -0
- package/dist/components/MQuiz.vue.d.ts +1 -1
- package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
- package/dist/components/MStack.vue.d.ts +1 -1
- package/dist/components/MTimezoneSelect.vue.d.ts +39 -0
- package/dist/components/MToolbar.vue.d.ts +1 -1
- package/dist/components/MVideoPlayer.vue.d.ts +1 -1
- package/dist/components/_MFilterGroup.vue.d.ts +17 -0
- package/dist/composables/_caretPosition.d.ts +6 -0
- package/dist/composables/_useCamera.d.ts +16 -0
- package/dist/composables/_useFollowAnchor.d.ts +15 -0
- package/dist/composables/cron.d.ts +29 -0
- package/dist/composables/dashboardLayout.d.ts +28 -0
- package/dist/composables/filterBuilder.d.ts +55 -0
- package/dist/composables/mapAdapters.d.ts +6 -1
- package/dist/composables/mapSearch.d.ts +1 -0
- package/dist/composables/textDiff.d.ts +24 -0
- package/dist/composables/useLocale.d.ts +108 -0
- package/dist/draw.js +28 -27
- package/dist/draw.js.map +1 -1
- package/dist/flow.js +1 -1
- package/dist/gantt.js +1 -1
- package/dist/index.d.ts +25 -0
- package/dist/locales/index.js +749 -0
- package/dist/locales/index.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +10444 -7495
- package/dist/m3ui.js.map +1 -1
- package/dist/map.d.ts +5 -0
- package/dist/map.js +1509 -617
- package/dist/map.js.map +1 -1
- package/dist/media.js +5 -5
- package/dist/pdf.js +5 -5
- package/dist/rich-text-editor.js +5 -5
- package/dist/styles.css +1 -1
- package/dist/{useLocale-COav9m8C.js → useLocale-DaVSTdm0.js} +108 -1
- package/dist/useLocale-DaVSTdm0.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/MAddressField.test.ts +149 -0
- package/src/__tests__/MAudioRecorder.test.ts +125 -0
- package/src/__tests__/MCameraCapture.test.ts +154 -0
- package/src/__tests__/MCountrySelect.test.ts +67 -0
- package/src/__tests__/MCronField.test.ts +100 -0
- package/src/__tests__/MDashboardGrid.test.ts +122 -0
- package/src/__tests__/MDiffViewer.test.ts +68 -0
- package/src/__tests__/MExpansionPanel.test.ts +107 -0
- package/src/__tests__/MFilterBuilder.test.ts +130 -0
- package/src/__tests__/MMapCluster.test.ts +127 -0
- package/src/__tests__/MMapDraw.test.ts +188 -0
- package/src/__tests__/MMapLayers.test.ts +56 -0
- package/src/__tests__/MMentionField.test.ts +163 -0
- package/src/__tests__/MNotificationCenter.test.ts +94 -0
- package/src/__tests__/_fakeMaplibre.ts +14 -3
- package/src/__tests__/attrsFallthrough.test.ts +4 -0
- package/src/__tests__/cron.test.ts +68 -0
- package/src/__tests__/dashboardLayout.test.ts +45 -0
- package/src/__tests__/filterBuilder.test.ts +91 -0
- package/src/__tests__/followAnchor.test.ts +162 -0
- package/src/__tests__/ssr.test.ts +3 -0
- package/src/__tests__/textDiff.test.ts +37 -0
- package/src/components/MAddressField.vue +301 -0
- package/src/components/MAudioRecorder.vue +334 -0
- package/src/components/MAutocomplete.vue +3 -7
- package/src/components/MCameraCapture.vue +156 -0
- package/src/components/MCollapse.vue +91 -0
- package/src/components/MColorPicker.vue +4 -8
- package/src/components/MCountrySelect.vue +89 -0
- package/src/components/MCronField.vue +251 -0
- package/src/components/MDashboardGrid.vue +382 -0
- package/src/components/MDatePicker.vue +10 -7
- package/src/components/MDateRangePicker.vue +10 -7
- package/src/components/MDiffViewer.vue +234 -0
- package/src/components/MExpansionPanel.vue +56 -48
- package/src/components/MFilterBuilder.vue +47 -0
- package/src/components/MMapBaseLayers.vue +29 -28
- package/src/components/MMapCluster.vue +295 -0
- package/src/components/MMapDraw.vue +601 -0
- package/src/components/MMapMeasure.vue +1 -1
- package/src/components/MMapSearch.vue +1 -9
- package/src/components/MMentionField.vue +373 -0
- package/src/components/MMultiAutocomplete.vue +3 -7
- package/src/components/MMultiSelect.vue +3 -7
- package/src/components/MNotificationCenter.vue +252 -0
- package/src/components/MPhoneInput.vue +3 -10
- package/src/components/MQRScanner.vue +177 -0
- package/src/components/MSelect.vue +3 -7
- package/src/components/MTimePicker.vue +10 -7
- package/src/components/MTimezoneSelect.vue +116 -0
- package/src/components/_MFilterGroup.vue +210 -0
- package/src/composables/_caretPosition.ts +44 -0
- package/src/composables/_useCamera.ts +66 -0
- package/src/composables/_useFollowAnchor.ts +109 -0
- package/src/composables/cron.ts +179 -0
- package/src/composables/dashboardLayout.ts +94 -0
- package/src/composables/filterBuilder.ts +195 -0
- package/src/composables/mapAdapters.ts +29 -15
- package/src/composables/mapSearch.ts +10 -0
- package/src/composables/textDiff.ts +106 -0
- package/src/composables/useLocale.ts +215 -0
- package/src/index.ts +25 -0
- package/src/locales/de.ts +107 -0
- package/src/locales/es.ts +107 -0
- package/src/locales/fr.ts +107 -0
- package/src/locales/ja.ts +107 -0
- package/src/locales/ko.ts +107 -0
- package/src/locales/pt.ts +107 -0
- package/src/locales/zh.ts +107 -0
- package/src/map.ts +5 -0
- package/dist/MListItem-DVi1j1QI.js.map +0 -1
- package/dist/MMenuItem-CRNZkVVr.js.map +0 -1
- package/dist/MTooltip-BL3jPYPT.js +0 -754
- package/dist/MTooltip-BL3jPYPT.js.map +0 -1
- package/dist/_useEscapeStack-C5-BYr8y.js.map +0 -1
- package/dist/useLocale-COav9m8C.js.map +0 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type LngLat } from '../composables/_mapGeometry';
|
|
2
|
+
import type { MapControlPosition } from './MMap.vue';
|
|
3
|
+
/** What `MMapDraw` draws. */
|
|
4
|
+
export type MapDrawMode = 'point' | 'line' | 'polygon';
|
|
5
|
+
type Geometry = {
|
|
6
|
+
type: 'Point';
|
|
7
|
+
coordinates: LngLat;
|
|
8
|
+
} | {
|
|
9
|
+
type: 'LineString';
|
|
10
|
+
coordinates: LngLat[];
|
|
11
|
+
} | {
|
|
12
|
+
type: 'Polygon';
|
|
13
|
+
coordinates: LngLat[][];
|
|
14
|
+
} | {
|
|
15
|
+
type: 'MultiPoint' | 'MultiLineString' | 'MultiPolygon' | 'GeometryCollection';
|
|
16
|
+
[key: string]: unknown;
|
|
17
|
+
};
|
|
18
|
+
/** A shape of `MMapDraw` (a GeoJSON feature). */
|
|
19
|
+
export interface MapDrawFeature {
|
|
20
|
+
type: 'Feature';
|
|
21
|
+
id?: string | number;
|
|
22
|
+
geometry: Geometry;
|
|
23
|
+
properties: Record<string, unknown> | null;
|
|
24
|
+
}
|
|
25
|
+
/** `MMapDraw`'s v-model. */
|
|
26
|
+
export interface MapDrawCollection {
|
|
27
|
+
type: 'FeatureCollection';
|
|
28
|
+
features: MapDrawFeature[];
|
|
29
|
+
}
|
|
30
|
+
type __VLS_Props = {
|
|
31
|
+
/** The shapes (v-model) */
|
|
32
|
+
modelValue?: MapDrawCollection;
|
|
33
|
+
/** The drawing mode (v-model:mode): `'point'`, `'line'`, `'polygon'`, or null. Set it to start drawing from outside */
|
|
34
|
+
mode?: MapDrawMode | null;
|
|
35
|
+
/** Which shapes its control offers, in order */
|
|
36
|
+
modes?: MapDrawMode[];
|
|
37
|
+
/** Its buttons: `false` (drive it with v-model:mode), or a corner (`true` is top-right) */
|
|
38
|
+
control?: boolean | MapControlPosition;
|
|
39
|
+
/** The theme color of the shapes */
|
|
40
|
+
color?: 'primary' | 'secondary' | 'tertiary';
|
|
41
|
+
/** Let the user select, reshape and delete shapes (false: draw only) */
|
|
42
|
+
editable?: boolean;
|
|
43
|
+
};
|
|
44
|
+
declare function select(id: string | number | null): void;
|
|
45
|
+
/** Deletes a shape (the selected one by default). */
|
|
46
|
+
declare function remove(id?: string | number | null): void;
|
|
47
|
+
/** Deletes every shape. */
|
|
48
|
+
declare function clear(): void;
|
|
49
|
+
declare function start(next: MapDrawMode): void;
|
|
50
|
+
/** Ends drawing, keeping the shape when it has enough points. */
|
|
51
|
+
declare function finish(): void;
|
|
52
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
53
|
+
/** Starts drawing a shape (again: finishes) */
|
|
54
|
+
start: typeof start;
|
|
55
|
+
/** Ends drawing, keeping the shape when it has enough points */
|
|
56
|
+
finish: typeof finish;
|
|
57
|
+
/** Selects a shape by id (null: none) */
|
|
58
|
+
select: typeof select;
|
|
59
|
+
/** Deletes a shape (the selected one by default) */
|
|
60
|
+
remove: typeof remove;
|
|
61
|
+
/** Deletes every shape */
|
|
62
|
+
clear: typeof clear;
|
|
63
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
64
|
+
select: (feature: MapDrawFeature | null) => any;
|
|
65
|
+
"update:modelValue": (collection: MapDrawCollection) => any;
|
|
66
|
+
"update:mode": (mode: MapDrawMode | null) => any;
|
|
67
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
68
|
+
onSelect?: ((feature: MapDrawFeature | null) => any) | undefined;
|
|
69
|
+
"onUpdate:modelValue"?: ((collection: MapDrawCollection) => any) | undefined;
|
|
70
|
+
"onUpdate:mode"?: ((mode: MapDrawMode | null) => any) | undefined;
|
|
71
|
+
}>, {
|
|
72
|
+
color: "primary" | "secondary" | "tertiary";
|
|
73
|
+
mode: MapDrawMode | null;
|
|
74
|
+
editable: boolean;
|
|
75
|
+
control: boolean | MapControlPosition;
|
|
76
|
+
modes: MapDrawMode[];
|
|
77
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
78
|
+
declare const _default: typeof __VLS_export;
|
|
79
|
+
export default _default;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/** Something that can be mentioned. */
|
|
2
|
+
export interface MentionItem {
|
|
3
|
+
id: string | number;
|
|
4
|
+
/** What's written into the text after the trigger (spaces allowed: `@Ana López`) */
|
|
5
|
+
label: string;
|
|
6
|
+
/** A second line in the list */
|
|
7
|
+
description?: string;
|
|
8
|
+
/** An image URL; without one, initials (or `icon`) */
|
|
9
|
+
avatar?: string;
|
|
10
|
+
/** A Material Symbol instead of an avatar */
|
|
11
|
+
icon?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Where a trigger character looks things up. */
|
|
14
|
+
export interface MentionSource {
|
|
15
|
+
/** One character: `@`, `#`, `:`… */
|
|
16
|
+
trigger: string;
|
|
17
|
+
/** The items, filtered here as the user types */
|
|
18
|
+
items?: MentionItem[];
|
|
19
|
+
/** Or a lookup of yours (an API): the query in, items out; `signal` aborts a replaced one */
|
|
20
|
+
search?: (query: string, signal: AbortSignal) => Promise<MentionItem[]>;
|
|
21
|
+
/** How many to list (8) */
|
|
22
|
+
limit?: number;
|
|
23
|
+
}
|
|
24
|
+
/** A picked item still in the text. */
|
|
25
|
+
export interface MentionRef {
|
|
26
|
+
trigger: string;
|
|
27
|
+
id: string | number;
|
|
28
|
+
label: string;
|
|
29
|
+
}
|
|
30
|
+
type __VLS_Props = {
|
|
31
|
+
/** The text (v-model) */
|
|
32
|
+
modelValue: string;
|
|
33
|
+
/** The picked items still in the text (v-model:mentions) */
|
|
34
|
+
mentions?: MentionRef[];
|
|
35
|
+
/** Trigger characters and where each looks things up */
|
|
36
|
+
sources: MentionSource[];
|
|
37
|
+
/** Field label */
|
|
38
|
+
label: string;
|
|
39
|
+
/** Field style */
|
|
40
|
+
variant?: 'filled' | 'outlined';
|
|
41
|
+
/** Several lines (a textarea) */
|
|
42
|
+
multiline?: boolean;
|
|
43
|
+
/** Rows when multiline */
|
|
44
|
+
rows?: number;
|
|
45
|
+
/** Grow with the text when multiline */
|
|
46
|
+
autoGrow?: boolean;
|
|
47
|
+
/** Stop growing at this many rows */
|
|
48
|
+
maxRows?: number;
|
|
49
|
+
/** The delay before a `search`, in ms */
|
|
50
|
+
debounce?: number;
|
|
51
|
+
/** Material Symbol on the left */
|
|
52
|
+
leadingIcon?: string;
|
|
53
|
+
/** Helper text below the field */
|
|
54
|
+
hint?: string;
|
|
55
|
+
/** Error state */
|
|
56
|
+
error?: boolean;
|
|
57
|
+
/** Error message shown when `error` is true */
|
|
58
|
+
errorLabel?: string;
|
|
59
|
+
/** Marks it as required */
|
|
60
|
+
required?: boolean;
|
|
61
|
+
/** Disables the field */
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
};
|
|
64
|
+
declare const __VLS_template: () => {
|
|
65
|
+
__VLS_Slots: {
|
|
66
|
+
item?: (props: {
|
|
67
|
+
item: MentionItem;
|
|
68
|
+
source: MentionSource;
|
|
69
|
+
active: boolean;
|
|
70
|
+
}) => any;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
74
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
|
|
75
|
+
/** Focuses the field */
|
|
76
|
+
focus: () => void | undefined;
|
|
77
|
+
/** Inserts text at the caret (a trigger, to open the list from a button: `insert('@')`) */
|
|
78
|
+
insert(text: string): void;
|
|
79
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
80
|
+
"update:modelValue": (text: string) => any;
|
|
81
|
+
"update:mentions": (mentions: MentionRef[]) => any;
|
|
82
|
+
mention: (item: MentionItem, trigger: string) => any;
|
|
83
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
84
|
+
"onUpdate:modelValue"?: ((text: string) => any) | undefined;
|
|
85
|
+
"onUpdate:mentions"?: ((mentions: MentionRef[]) => any) | undefined;
|
|
86
|
+
onMention?: ((item: MentionItem, trigger: string) => any) | undefined;
|
|
87
|
+
}>, {
|
|
88
|
+
variant: "filled" | "outlined";
|
|
89
|
+
multiline: boolean;
|
|
90
|
+
debounce: number;
|
|
91
|
+
rows: number;
|
|
92
|
+
autoGrow: boolean;
|
|
93
|
+
mentions: MentionRef[];
|
|
94
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
95
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
96
|
+
declare const _default: typeof __VLS_export;
|
|
97
|
+
export default _default;
|
|
98
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
99
|
+
new (): {
|
|
100
|
+
$slots: S;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/** One notification of `MNotificationCenter`. */
|
|
2
|
+
export interface InboxNotification {
|
|
3
|
+
id: string | number;
|
|
4
|
+
title: string;
|
|
5
|
+
body?: string;
|
|
6
|
+
/** When: a Date, an ISO string or a timestamp */
|
|
7
|
+
time: Date | string | number;
|
|
8
|
+
read?: boolean;
|
|
9
|
+
/** A Material Symbol */
|
|
10
|
+
icon?: string;
|
|
11
|
+
/** An image URL instead of the icon */
|
|
12
|
+
avatar?: string;
|
|
13
|
+
/** The icon's color: a theme role */
|
|
14
|
+
color?: 'primary' | 'secondary' | 'tertiary' | 'error' | 'success';
|
|
15
|
+
}
|
|
16
|
+
type __VLS_Props = {
|
|
17
|
+
/** The notifications (v-model) */
|
|
18
|
+
modelValue: InboxNotification[];
|
|
19
|
+
/** The header's title (the locale's "Notifications" by default); empty hides the header */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Show the All / Unread filter */
|
|
22
|
+
filter?: boolean;
|
|
23
|
+
/** Let people dismiss notifications */
|
|
24
|
+
dismissible?: boolean;
|
|
25
|
+
/** Limit the height (CSS), scrolling inside */
|
|
26
|
+
maxHeight?: string;
|
|
27
|
+
};
|
|
28
|
+
declare const __VLS_template: () => {
|
|
29
|
+
__VLS_Slots: {
|
|
30
|
+
empty?: (props: {}) => any;
|
|
31
|
+
} & {
|
|
32
|
+
item?: (props: {
|
|
33
|
+
item: InboxNotification;
|
|
34
|
+
}) => any;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
38
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
39
|
+
"update:modelValue": (items: InboxNotification[]) => any;
|
|
40
|
+
open: (item: InboxNotification) => any;
|
|
41
|
+
dismiss: (item: InboxNotification) => any;
|
|
42
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
43
|
+
"onUpdate:modelValue"?: ((items: InboxNotification[]) => any) | undefined;
|
|
44
|
+
onOpen?: ((item: InboxNotification) => any) | undefined;
|
|
45
|
+
onDismiss?: ((item: InboxNotification) => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
filter: boolean;
|
|
48
|
+
dismissible: boolean;
|
|
49
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
50
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
52
|
+
export default _default;
|
|
53
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
54
|
+
new (): {
|
|
55
|
+
$slots: S;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { type CameraError, type CameraFacing } from '../composables/_useCamera';
|
|
2
|
+
/** A code read by `MQRScanner`. */
|
|
3
|
+
export interface ScanResult {
|
|
4
|
+
rawValue: string;
|
|
5
|
+
/** `qr_code`, `ean_13`, `code_128`… */
|
|
6
|
+
format: string;
|
|
7
|
+
}
|
|
8
|
+
/** Your own reader, for browsers without BarcodeDetector: a frame in, a code (or null) out. */
|
|
9
|
+
export type ScanDetector = (frame: ImageData) => ScanResult | null | Promise<ScanResult | null>;
|
|
10
|
+
type __VLS_Props = {
|
|
11
|
+
/** The last code read (v-model) */
|
|
12
|
+
modelValue?: string | null;
|
|
13
|
+
/** What BarcodeDetector looks for */
|
|
14
|
+
formats?: string[];
|
|
15
|
+
/** Your reader instead of BarcodeDetector (e.g. jsQR on the frame) */
|
|
16
|
+
detector?: ScanDetector;
|
|
17
|
+
/** Which camera: the back one (`environment`) or the selfie one (`user`) */
|
|
18
|
+
facing?: CameraFacing;
|
|
19
|
+
/** How often to look, in ms */
|
|
20
|
+
interval?: number;
|
|
21
|
+
/** Stop the camera after the first code */
|
|
22
|
+
once?: boolean;
|
|
23
|
+
/** Start the camera on mount instead of on a button press */
|
|
24
|
+
autostart?: boolean;
|
|
25
|
+
/** The preview's aspect ratio (CSS `aspect-ratio`) */
|
|
26
|
+
aspect?: string;
|
|
27
|
+
};
|
|
28
|
+
declare function stop(): void;
|
|
29
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
30
|
+
/** Starts the camera */
|
|
31
|
+
start: () => Promise<void>;
|
|
32
|
+
/** Stops the camera */
|
|
33
|
+
stop: typeof stop;
|
|
34
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
35
|
+
error: (error: CameraError) => any;
|
|
36
|
+
"update:modelValue": (value: string) => any;
|
|
37
|
+
detect: (result: ScanResult) => any;
|
|
38
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
39
|
+
onError?: ((error: CameraError) => any) | undefined;
|
|
40
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
41
|
+
onDetect?: ((result: ScanResult) => any) | undefined;
|
|
42
|
+
}>, {
|
|
43
|
+
modelValue: string | null;
|
|
44
|
+
once: boolean;
|
|
45
|
+
aspect: string;
|
|
46
|
+
facing: CameraFacing;
|
|
47
|
+
autostart: boolean;
|
|
48
|
+
formats: string[];
|
|
49
|
+
interval: number;
|
|
50
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
51
|
+
declare const _default: typeof __VLS_export;
|
|
52
|
+
export default _default;
|
|
@@ -84,10 +84,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
84
84
|
correct: boolean;
|
|
85
85
|
}) => any) | undefined;
|
|
86
86
|
}>, {
|
|
87
|
+
review: boolean;
|
|
87
88
|
feedback: "immediate" | "end";
|
|
88
89
|
shuffle: boolean;
|
|
89
90
|
shuffleOptions: boolean;
|
|
90
|
-
review: boolean;
|
|
91
91
|
allowRetry: boolean;
|
|
92
92
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
93
93
|
result?: (props: {
|
|
@@ -47,10 +47,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
47
47
|
layout: "multi-browse" | "uncontained" | "hero";
|
|
48
48
|
gap: number;
|
|
49
49
|
animated: boolean;
|
|
50
|
+
interval: number;
|
|
50
51
|
showArrows: boolean;
|
|
51
52
|
showIndicators: boolean;
|
|
52
53
|
autoplay: boolean;
|
|
53
|
-
interval: number;
|
|
54
54
|
visibleItems: number;
|
|
55
55
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
56
56
|
declare const _default: typeof __VLS_export;
|
|
@@ -26,7 +26,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
26
26
|
align: "center" | "start" | "end" | "stretch" | "baseline";
|
|
27
27
|
direction: "row" | "column";
|
|
28
28
|
inline: boolean;
|
|
29
|
-
justify: "
|
|
29
|
+
justify: "between" | "center" | "start" | "end" | "around" | "evenly";
|
|
30
30
|
divider: boolean;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** The IANA time zone name (v-model), or null */
|
|
3
|
+
modelValue?: string | null;
|
|
4
|
+
/** Field label (the locale's "Time zone" by default) */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Only these zones, instead of every one */
|
|
7
|
+
only?: string[];
|
|
8
|
+
/** Start on the user's own zone when the v-model is empty */
|
|
9
|
+
detect?: boolean;
|
|
10
|
+
/** Field style */
|
|
11
|
+
variant?: 'filled' | 'outlined';
|
|
12
|
+
/** Dropdown, or a dialog on small screens */
|
|
13
|
+
mode?: 'docked' | 'modal';
|
|
14
|
+
/** Show a clear button */
|
|
15
|
+
clearable?: boolean;
|
|
16
|
+
/** Helper text below the field */
|
|
17
|
+
hint?: string;
|
|
18
|
+
/** Error state */
|
|
19
|
+
error?: boolean;
|
|
20
|
+
/** Error message shown when `error` is true */
|
|
21
|
+
errorLabel?: string;
|
|
22
|
+
/** Marks it as required */
|
|
23
|
+
required?: boolean;
|
|
24
|
+
/** Disables the field */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
28
|
+
"update:modelValue": (zone: string | null) => any;
|
|
29
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
30
|
+
"onUpdate:modelValue"?: ((zone: string | null) => any) | undefined;
|
|
31
|
+
}>, {
|
|
32
|
+
mode: "docked" | "modal";
|
|
33
|
+
modelValue: string | null;
|
|
34
|
+
variant: "filled" | "outlined";
|
|
35
|
+
clearable: boolean;
|
|
36
|
+
detect: boolean;
|
|
37
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default: typeof __VLS_export;
|
|
39
|
+
export default _default;
|
|
@@ -49,7 +49,7 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
49
49
|
}>, {
|
|
50
50
|
color: "surface" | "primary" | "secondary" | "tertiary";
|
|
51
51
|
variant: "docked" | "floating";
|
|
52
|
-
align: "
|
|
52
|
+
align: "between" | "center" | "start" | "end";
|
|
53
53
|
orientation: "horizontal" | "vertical";
|
|
54
54
|
fabPosition: "none" | "start" | "end";
|
|
55
55
|
collapseOnScroll: string | boolean | HTMLElement | null;
|
|
@@ -189,10 +189,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
189
189
|
rate: number;
|
|
190
190
|
loop: boolean;
|
|
191
191
|
controls: boolean;
|
|
192
|
+
muted: boolean;
|
|
192
193
|
volume: number;
|
|
193
194
|
autoplay: boolean;
|
|
194
195
|
currentTime: number;
|
|
195
|
-
muted: boolean;
|
|
196
196
|
hasPrevious: boolean;
|
|
197
197
|
hasNext: boolean;
|
|
198
198
|
seekStep: number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type FilterField, type FilterGroup } from '../composables/filterBuilder';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
group: FilterGroup;
|
|
4
|
+
fields: FilterField[];
|
|
5
|
+
depth: number;
|
|
6
|
+
maxDepth: number;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
+
remove: () => any;
|
|
11
|
+
update: (group: FilterGroup) => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
13
|
+
onRemove?: (() => any) | undefined;
|
|
14
|
+
onUpdate?: ((group: FilterGroup) => any) | undefined;
|
|
15
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
export type CameraFacing = 'user' | 'environment';
|
|
3
|
+
export type CameraError = 'denied' | 'unavailable' | 'unsupported' | 'failed';
|
|
4
|
+
export declare function useCamera(video: Ref<HTMLVideoElement | null | undefined>, options: {
|
|
5
|
+
facing: () => CameraFacing;
|
|
6
|
+
resolution?: () => number;
|
|
7
|
+
}): {
|
|
8
|
+
stream: import("vue").ShallowRef<MediaStream | null, MediaStream | null>;
|
|
9
|
+
status: Ref<"error" | "live" | "idle" | "starting", "error" | "live" | "idle" | "starting">;
|
|
10
|
+
error: Ref<CameraError | null, CameraError | null>;
|
|
11
|
+
facing: Ref<CameraFacing, CameraFacing>;
|
|
12
|
+
canSwitch: Ref<boolean, boolean>;
|
|
13
|
+
start: (next?: CameraFacing) => Promise<void>;
|
|
14
|
+
stop: () => void;
|
|
15
|
+
switchCamera: () => Promise<void>;
|
|
16
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
/** True when nothing of `el` is visible: outside the window, or cut away by an overflow-clipping ancestor. */
|
|
3
|
+
export declare function isAnchorHidden(el: Element): boolean;
|
|
4
|
+
export declare function useFollowAnchor(options: {
|
|
5
|
+
/** Whether the popup is open: the listeners only exist while it is. */
|
|
6
|
+
open: () => boolean;
|
|
7
|
+
/** The field the popup hangs from. */
|
|
8
|
+
anchor: Ref<HTMLElement | null | undefined>;
|
|
9
|
+
/** The popup (scrolls inside it don't move it). */
|
|
10
|
+
popup: Ref<HTMLElement | null | undefined>;
|
|
11
|
+
/** Re-measures the field and moves the popup. */
|
|
12
|
+
place: () => void;
|
|
13
|
+
/** Closes the popup once the field can't be seen. */
|
|
14
|
+
close: () => void;
|
|
15
|
+
}): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { M3Locale } from './useLocale';
|
|
2
|
+
/** An expression read into the values each field allows. */
|
|
3
|
+
export interface CronSchedule {
|
|
4
|
+
minutes: number[];
|
|
5
|
+
hours: number[];
|
|
6
|
+
days: number[];
|
|
7
|
+
months: number[];
|
|
8
|
+
weekdays: number[];
|
|
9
|
+
/** Which fields were `*` (unrestricted) */
|
|
10
|
+
any: {
|
|
11
|
+
days: boolean;
|
|
12
|
+
weekdays: boolean;
|
|
13
|
+
minutes: boolean;
|
|
14
|
+
hours: boolean;
|
|
15
|
+
months: boolean;
|
|
16
|
+
};
|
|
17
|
+
/** The fields as written (after macros), for describing steps */
|
|
18
|
+
fields: string[];
|
|
19
|
+
}
|
|
20
|
+
/** Reads an expression; null when it isn't valid. */
|
|
21
|
+
export declare function parseCron(expression: string): CronSchedule | null;
|
|
22
|
+
/** Whether an expression is valid. */
|
|
23
|
+
export declare const isValidCron: (expression: string) => boolean;
|
|
24
|
+
/** The next times it runs after `from` (local time), up to `count`, within four years. */
|
|
25
|
+
export declare function nextCronRuns(expression: string, count?: number, from?: Date): Date[];
|
|
26
|
+
/** The locale strings the description uses. */
|
|
27
|
+
export type CronStrings = Pick<M3Locale, 'lang' | 'cronEveryMinute' | 'cronEveryNMinutes' | 'cronHourlyAt' | 'cronAt' | 'cronEveryNHoursAt' | 'cronMinutesOfHours' | 'cronOnDaysOfMonth' | 'cronInMonths' | 'cronRange'>;
|
|
28
|
+
/** A sentence for the expression in the locale's language ("At 09:00, Monday to Friday"), or null when invalid. */
|
|
29
|
+
export declare function describeCron(expression: string, t: CronStrings): string | null;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** A widget's place on the grid, in cells. */
|
|
2
|
+
export interface DashboardItem {
|
|
3
|
+
id: string | number;
|
|
4
|
+
/** Column, from 0 */
|
|
5
|
+
x: number;
|
|
6
|
+
/** Row, from 0 */
|
|
7
|
+
y: number;
|
|
8
|
+
/** Width in columns */
|
|
9
|
+
w: number;
|
|
10
|
+
/** Height in rows */
|
|
11
|
+
h: number;
|
|
12
|
+
minW?: number;
|
|
13
|
+
minH?: number;
|
|
14
|
+
maxW?: number;
|
|
15
|
+
maxH?: number;
|
|
16
|
+
/** Never moves or resizes, and others flow around it */
|
|
17
|
+
static?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Keeps an item inside the columns and its size limits. */
|
|
20
|
+
export declare function clampItem(item: DashboardItem, columns: number): DashboardItem;
|
|
21
|
+
/** Floats every movable item up as far as it goes, top to bottom (static ones stay). */
|
|
22
|
+
export declare function compactLayout(layout: DashboardItem[]): DashboardItem[];
|
|
23
|
+
/** The layout with one item moved and/or resized, the rest pushed out of the way and compacted. */
|
|
24
|
+
export declare function moveItem(layout: DashboardItem[], id: DashboardItem['id'], next: Partial<Pick<DashboardItem, 'x' | 'y' | 'w' | 'h'>>, columns: number): DashboardItem[];
|
|
25
|
+
/** A layout made valid: clamped to the columns, no overlaps, compacted. */
|
|
26
|
+
export declare function normalizeLayout(layout: DashboardItem[], columns: number): DashboardItem[];
|
|
27
|
+
/** How many rows the layout takes. */
|
|
28
|
+
export declare const layoutRows: (layout: DashboardItem[]) => number;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** How a field's values are compared, and which input `MFilterBuilder` shows for them. */
|
|
2
|
+
export type FilterFieldType = 'text' | 'number' | 'date' | 'select' | 'boolean';
|
|
3
|
+
export type FilterOperator = 'contains' | 'notContains' | 'equals' | 'notEquals' | 'startsWith' | 'endsWith' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'in' | 'notIn' | 'isTrue' | 'isFalse' | 'isEmpty' | 'isNotEmpty';
|
|
4
|
+
/** A field that can be filtered on. */
|
|
5
|
+
export interface FilterField {
|
|
6
|
+
/** The row property (a dotted path reaches into nested objects: `address.city`) */
|
|
7
|
+
key: string;
|
|
8
|
+
/** Its name in the UI */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Text by default */
|
|
11
|
+
type?: FilterFieldType;
|
|
12
|
+
/** For `select`: the values to choose from */
|
|
13
|
+
options?: {
|
|
14
|
+
label: string;
|
|
15
|
+
value: unknown;
|
|
16
|
+
}[];
|
|
17
|
+
/** The operators offered, instead of the type's own */
|
|
18
|
+
operators?: FilterOperator[];
|
|
19
|
+
/** Reads the value from a row, instead of `key` */
|
|
20
|
+
accessor?: (row: Record<string, unknown>) => unknown;
|
|
21
|
+
}
|
|
22
|
+
/** One condition: field · operator · value (`[min, max]` for `between`, a list for `in` / `notIn`). */
|
|
23
|
+
export interface FilterRule {
|
|
24
|
+
id: string;
|
|
25
|
+
field: string;
|
|
26
|
+
operator: FilterOperator;
|
|
27
|
+
value?: unknown;
|
|
28
|
+
}
|
|
29
|
+
/** All (`and`) or any (`or`) of its rules and nested groups. */
|
|
30
|
+
export interface FilterGroup {
|
|
31
|
+
id: string;
|
|
32
|
+
combinator: 'and' | 'or';
|
|
33
|
+
rules: (FilterRule | FilterGroup)[];
|
|
34
|
+
}
|
|
35
|
+
/** The operators each type offers, in order (the first is the default for a new rule). */
|
|
36
|
+
export declare const FILTER_OPERATORS: Record<FilterFieldType, FilterOperator[]>;
|
|
37
|
+
/** Operators that take no value. */
|
|
38
|
+
export declare const VALUELESS: FilterOperator[];
|
|
39
|
+
export declare const isGroup: (r: FilterRule | FilterGroup) => r is FilterGroup;
|
|
40
|
+
/** An empty filter (a group matching every row), or one with these rules. */
|
|
41
|
+
export declare function createFilter(rules?: Omit<FilterRule, 'id'>[], combinator?: 'and' | 'or'): FilterGroup;
|
|
42
|
+
/** A new rule on a field, with its type's first operator. */
|
|
43
|
+
export declare function createRule(field: FilterField): FilterRule;
|
|
44
|
+
/** A new nested group. */
|
|
45
|
+
export declare function createGroup(combinator?: 'and' | 'or'): FilterGroup;
|
|
46
|
+
/** The operators a field offers. */
|
|
47
|
+
export declare function operatorsFor(field: FilterField): FilterOperator[];
|
|
48
|
+
/** Whether a rule has what it needs to filter (an operator that takes no value, or a value). */
|
|
49
|
+
export declare function isComplete(rule: FilterRule): boolean;
|
|
50
|
+
/** Whether a row passes the filter. Incomplete rules, and groups with none complete, match everything. */
|
|
51
|
+
export declare function matchesFilter(row: Record<string, unknown>, filter: FilterGroup | null | undefined, fields?: FilterField[]): boolean;
|
|
52
|
+
/** The rows that pass the filter. */
|
|
53
|
+
export declare function filterRows<T extends Record<string, unknown>>(rows: T[], filter: FilterGroup | null | undefined, fields?: FilterField[]): T[];
|
|
54
|
+
/** How many complete rules the filter has (for a "Filters (3)" button). */
|
|
55
|
+
export declare function countRules(filter: FilterGroup | null | undefined): number;
|
|
@@ -66,7 +66,12 @@ export interface MapAdapterContext {
|
|
|
66
66
|
export type MapAdapter = (style: Maplibre.StyleSpecification, context: MapAdapterContext) => MapLayerModel;
|
|
67
67
|
/**
|
|
68
68
|
* Any style: every layer but the background is listed under its id (or `metadata.title`), vector layers identify all
|
|
69
|
-
* their properties, and nothing
|
|
69
|
+
* their properties, and nothing shows on hover. A few neutral keys in a layer's `metadata` refine it:
|
|
70
|
+
* - `base: true` (or `base: { image }`) makes it a base layer for `MMapBaseLayers`, with `image` (here or in
|
|
71
|
+
* `metadata.image`) as its thumbnail; base layers aren't listed in `MMapLayers`
|
|
72
|
+
* - `children`: layer ids shown, hidden and faded along with it (a vector base map's many layers under one entry);
|
|
73
|
+
* the children of a base layer aren't listed either
|
|
74
|
+
* - `listed: false` leaves it out of `MMapLayers`
|
|
70
75
|
*/
|
|
71
76
|
export declare const genericAdapter: MapAdapter;
|
|
72
77
|
export interface OrvianAdapterOptions {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type DiffOp = 'equal' | 'remove' | 'add';
|
|
2
|
+
/** One line of a diff. */
|
|
3
|
+
export interface DiffLine {
|
|
4
|
+
op: DiffOp;
|
|
5
|
+
text: string;
|
|
6
|
+
/** Its number in the original (equal and removed lines) */
|
|
7
|
+
oldLine?: number;
|
|
8
|
+
/** Its number in the modified version (equal and added lines) */
|
|
9
|
+
newLine?: number;
|
|
10
|
+
}
|
|
11
|
+
/** A run of a word diff. */
|
|
12
|
+
export interface DiffPart {
|
|
13
|
+
op: DiffOp;
|
|
14
|
+
text: string;
|
|
15
|
+
}
|
|
16
|
+
/** Every line of `a` → `b` as equal, removed or added, with its line numbers. Removals come before additions. */
|
|
17
|
+
export declare function diffLines(a: string, b: string): DiffLine[];
|
|
18
|
+
/** Two versions of a line split into words, spaces and punctuation, marked as kept, removed or added. */
|
|
19
|
+
export declare function diffWords(a: string, b: string): DiffPart[];
|
|
20
|
+
/** How many lines were added and removed. */
|
|
21
|
+
export declare function diffStats(diff: DiffLine[]): {
|
|
22
|
+
added: number;
|
|
23
|
+
removed: number;
|
|
24
|
+
};
|