@wssto2/vue-core 0.19.0 → 0.20.0
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/CHANGELOG.md +16 -0
- package/README.md +3 -0
- package/dist/{AccessGate.vue_vue_type_script_setup_true_lang-Bg8JFAOT.js → AccessGate.vue_vue_type_script_setup_true_lang-Dw_pnsh9.js} +1 -1
- package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-BIYgaihv.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-rmH1XbU9.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-B5IMNnTf.js → ActionRow.vue_vue_type_script_setup_true_lang-_TDoIg53.js} +2 -2
- package/dist/{Activity-CiYn5E6A.js → Activity-BDVYmNgy.js} +9 -9
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-oXWQTfBs.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-DryXyklZ.js} +6 -6
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-WuGvAOrj.js → AlertDialog.vue_vue_type_script_setup_true_lang-QYvbly_-.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-CX8mpXRE.js → AsyncSection.vue_vue_type_script_setup_true_lang-DRP4BnMb.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-sv0phngk.js → Banner.vue_vue_type_script_setup_true_lang-ukLpznql.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-JrqhO99l.js → Button.vue_vue_type_script_setup_true_lang-DkRuLqQK.js} +1 -1
- package/dist/{Changes-Cy8STpLX.js → Changes-DRij0rEQ.js} +5 -5
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Dr6nFNBB.js → CollectionPage.vue_vue_type_script_setup_true_lang-Aoof1prZ.js} +12 -12
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-D372wlxR.js → DataTable.vue_vue_type_script_setup_true_lang-DGcNcRkO.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-D0KcfW8R.js → DateField.vue_vue_type_script_setup_true_lang-J04KjxmR.js} +4 -4
- package/dist/{DeadLetters-DhJkMpd_.js → DeadLetters-Dpm4UY__.js} +4 -4
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-92szOrYd.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-CxNVKoYI.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-DbZiO2RF.js → EmptyState.vue_vue_type_script_setup_true_lang-ByKvrNSg.js} +1 -1
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-lvAuBG-0.js → FormGroup.vue_vue_type_script_setup_true_lang-7bIssY9f.js} +4 -4
- package/dist/{FormRow.vue_vue_type_script_setup_true_lang-CpgNVQF4.js → FormRow.vue_vue_type_script_setup_true_lang-okuxbKyI.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-D01Jr4UU.js → FormView.vue_vue_type_script_setup_true_lang-CiYprNRr.js} +2 -2
- package/dist/{General-CwTPC5UP.js → General-BmVEbYqv.js} +8 -8
- package/dist/{HeaderAction.vue_vue_type_script_setup_true_lang-Da59TLBh.js → HeaderAction.vue_vue_type_script_setup_true_lang-DVfkuOy-.js} +2 -2
- package/dist/{Icon.vue_vue_type_script_lang-BhhsFYwp.js → Icon.vue_vue_type_script_lang-0pW1XBaE.js} +35 -33
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-BmxCuUZ9.js → IconTile.vue_vue_type_script_setup_true_lang-BWHQiA7d.js} +1 -1
- package/dist/{IncidentRecord-hXEGuLGg.js → IncidentRecord-DWY6Bws1.js} +17 -17
- package/dist/{IncidentsList-C41VyDwK.js → IncidentsList-C21UNIhT.js} +6 -6
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CrGrjrlO.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CpEd_Psg.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-Cqu4Ebsb.js → Menu.vue_vue_type_script_setup_true_lang-DobycRxf.js} +1 -1
- package/dist/{MenuButton.vue_vue_type_script_setup_true_lang-C-XRr5f2.js → MenuButton.vue_vue_type_script_setup_true_lang-qDKt6gX9.js} +1 -1
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-CZ7WrDwu.js → Modal.vue_vue_type_script_setup_true_lang-C0tQAYQ4.js} +2 -2
- package/dist/{NewRolePage-BYYZJkK7.js → NewRolePage-K5zts3e_.js} +4 -4
- package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-BHzZtZ50.js → NoAccess.vue_vue_type_script_setup_true_lang-BYnTQCtW.js} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-BhNZgEW6.js → NumberField.vue_vue_type_script_setup_true_lang-CxgVJrdv.js} +2 -2
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-D_Wg42hu.js → Panel.vue_vue_type_script_setup_true_lang-DTCmFSwg.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-mYFuG-Y3.js → PersonAccess.vue_vue_type_script_setup_true_lang-Kp9g93wE.js} +12 -12
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-DmMg1T_V.js → PhotoViewer.vue_vue_type_script_setup_true_lang-D2-uQbSV.js} +1 -1
- package/dist/{ProfilePage-DGEsIycR.js → ProfilePage-C3mLBer6.js} +17 -17
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-B3BnYg1x.js → RecordHeader.vue_vue_type_script_setup_true_lang-Dz5Qw8II.js} +2 -2
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-1iZtj3rh.js → ResourcePage.vue_vue_type_script_setup_true_lang-R3eJKPq5.js} +4 -4
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-BslSDDiM.js → RoleEditor.vue_vue_type_script_setup_true_lang-CGMpBpnK.js} +12 -12
- package/dist/{RolePage-C08ZUqw1.js → RolePage-C62_sGxx.js} +13 -13
- package/dist/{RolesPage-FOuY1VKg.js → RolesPage-CS8ryIQq.js} +9 -9
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-CodyVezo.js → SectionList.vue_vue_type_script_setup_true_lang-C6eOVjpa.js} +3 -3
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DCTFxfPB.js → SectionNavigator.vue_vue_type_script_setup_true_lang-DqDcFvS0.js} +6 -6
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-CLR6EvzO.js → SegmentedField.vue_vue_type_script_setup_true_lang-Du4YUcw9.js} +2 -2
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-D5xYofdb.js → SelectField.vue_vue_type_script_setup_true_lang-BA5YMCXA.js} +6 -6
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-CDr4WNIb.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-BoeV2_MN.js} +8 -8
- package/dist/{ServiceAccountRecord-kWwIQGZb.js → ServiceAccountRecord-BDkaaOte.js} +18 -18
- package/dist/{ServiceAccountsList-CKy9_YHP.js → ServiceAccountsList-KaZwNlK5.js} +10 -10
- package/dist/{Sessions-BDc8gdYH.js → Sessions-DhOpUlRc.js} +7 -7
- package/dist/{SettingsPage-t-8kmFVT.js → SettingsPage-DPzg7zwX.js} +18 -18
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-C1jpmLYN.js +163 -0
- package/dist/{SignIn-CqtkvtCZ.js → SignIn-4aUxE2LU.js} +8 -8
- package/dist/{SignInPage-DcdNKZIb.js → SignInPage-B80pQ8tG.js} +6 -6
- package/dist/{SignIns-D4-nGu0B.js → SignIns-CLX8Puf1.js} +5 -5
- package/dist/{StatusLine.vue_vue_type_script_setup_true_lang-DsdQmLq6.js → StatusLine.vue_vue_type_script_setup_true_lang-BN8nG1CW.js} +1 -1
- package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-D8SiC0G7.js → SwipeActions.vue_vue_type_script_setup_true_lang-BBqcW3MR.js} +1 -1
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-CLtcuofe.js → SwitchField.vue_vue_type_script_setup_true_lang-Dw7BbBU4.js} +2 -2
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-Cma_ma6V.js +169 -0
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-CVGh-p3J.js → TextField.vue_vue_type_script_setup_true_lang-DS6RPR-h.js} +4 -4
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-YxUlNHSk.js → TextareaField.vue_vue_type_script_setup_true_lang-BqpZt1Hv.js} +2 -2
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-DHNC_MLt.js → TimeField.vue_vue_type_script_setup_true_lang-BeS1cfqL.js} +4 -4
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-d_KuxWjH.js → Timestamp.vue_vue_type_script_setup_true_lang-XbbupD9A.js} +1 -1
- package/dist/{UserRecord-CwZCr9Im.js → UserRecord-BFqw2Pi8.js} +10 -10
- package/dist/{UsersList-Cn19sFgv.js → UsersList-C52C1lN1.js} +3 -3
- package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-BjdDXE3T.js → ViewTabs.vue_vue_type_script_setup_true_lang-CBYrLPL4.js} +1 -1
- package/dist/access/index.js +7 -7
- package/dist/app/index.js +2 -2
- package/dist/{application-CDSweJb9.js → application-cTqMhmFf.js} +8 -8
- package/dist/{back-LcLlFodC.js → back-CeozxCgQ.js} +2 -2
- package/dist/button/index.js +1 -1
- package/dist/collection/index.js +9 -9
- package/dist/content/DiffView.vue.d.ts +22 -0
- package/dist/content/PreviewFrame.vue.d.ts +46 -0
- package/dist/content/diff.d.ts +27 -0
- package/dist/content/index.d.ts +4 -0
- package/dist/content/index.js +552 -218
- package/dist/content/previewFrame.d.ts +50 -0
- package/dist/{contributions-B0x5x5xD.js → contributions-BSmIRPg1.js} +1 -1
- package/dist/controls/SortableList.vue.d.ts +31 -0
- package/dist/controls/Tabs.vue.d.ts +2 -0
- package/dist/controls/index.d.ts +1 -0
- package/dist/controls/index.js +132 -33
- package/dist/form/CodeEditor.vue.d.ts +61 -0
- package/dist/form/I18nField.vue.d.ts +1 -1
- package/dist/form/MarkerList.vue.d.ts +20 -0
- package/dist/form/TextareaField.vue.d.ts +1 -1
- package/dist/form/index.d.ts +2 -0
- package/dist/form/index.js +1550 -1428
- package/dist/{guards-CNJ0ATVC.js → guards-BP9x7CLF.js} +1 -1
- package/dist/i18n/index.js +18 -18
- package/dist/icon/core.d.ts +2 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/index.js +3 -3
- package/dist/identity/profile/EmailChangeDialog.vue.d.ts +2 -2
- package/dist/incidents/index.js +1 -1
- package/dist/{index-BA2w8uwD.js → index-CMx77x5P.js} +27 -27
- package/dist/{index-1HS7O2-e.js → index-CxUfs3Xz.js} +10 -10
- package/dist/{index-SLJWm40T.js → index-DLkQwWt9.js} +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/Sheet.vue.d.ts +13 -0
- package/dist/modal/TabbedSheet.vue.d.ts +46 -0
- package/dist/modal/index.d.ts +1 -0
- package/dist/modal/index.js +123 -41
- package/dist/navigation-C05vGEN8.js +55 -0
- package/dist/{neighbors-Dg_LU9ry.js → neighbors-BqfO6zf3.js} +2 -2
- package/dist/notifications/index.js +1 -1
- package/dist/onboarding/index.js +2 -2
- package/dist/{options-mOOX6JSS.js → options-DIp_lVAj.js} +2 -2
- package/dist/overlay/index.js +4 -4
- package/dist/page/SectionNavigator.vue.d.ts +1 -1
- package/dist/page/SplitPane.vue.d.ts +54 -0
- package/dist/page/WorkbenchPage.vue.d.ts +72 -0
- package/dist/page/index.d.ts +2 -0
- package/dist/page/index.js +343 -104
- package/dist/phone/index.js +3 -3
- package/dist/platform/index.js +3 -3
- package/dist/platform/navigation.d.ts +10 -0
- package/dist/{platform-DU9QFts8.js → platform-YWfOO7b2.js} +94 -88
- package/dist/pwa/index.js +3 -3
- package/dist/resource/index.js +1 -1
- package/dist/{resources-BZLlAtoS.js → resources-BAxfEEv1.js} +1 -1
- package/dist/router/index.js +4 -4
- package/dist/router/navigation.d.ts +2 -0
- package/dist/{rowLayout-PIuD7MGo.js → rowLayout-3W9TvFNt.js} +5 -5
- package/dist/{sectionIndex-BS0ic5W7.js → sectionIndex-CSr457Lb.js} +2 -2
- package/dist/{sections-BpiRLntE.js → sections-DXso1JSV.js} +2 -2
- package/dist/shell/NavigationList.vue.d.ts +1 -1
- package/dist/shell/index.js +522 -501
- package/dist/shell/navigationGroups.d.ts +4 -1
- package/dist/state/index.js +8 -8
- package/dist/{state-z1iPF1DT.js → state-DqCZdet7.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{suggestions-DeMgs_ki.js → suggestions-D0-qmRFy.js} +1 -1
- package/dist/testing/index.js +2 -2
- package/dist/{useCommand-DQKvro1n.js → useCommand-D6K6o6dx.js} +4 -4
- package/dist/{useGroupSheet-CRw3MUmX.js → useGroupSheet-Daxi2mzi.js} +5 -5
- package/dist/{usePreferences-DB29UTFD.js → usePreferences-D38x73re.js} +1 -1
- package/dist/{useRecordDialog-0azHxxvm.js → useRecordDialog-CfBp0kuP.js} +1 -1
- package/dist/{useResourceForm-zVuWerSn.js → useResourceForm-Ddxk7mc0.js} +1 -1
- package/dist/{useTypedEntry-BsMV66Yc.js → useTypedEntry-r4AqWlV7.js} +2 -2
- package/package.json +1 -1
- package/dist/Sheet.vue_vue_type_script_setup_true_lang-BG8HUNfs.js +0 -145
- package/dist/Tabs.vue_vue_type_script_setup_true_lang-tpkGp98F.js +0 -155
- package/dist/navigation-d-JAPBGA.js +0 -53
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/** The widths a page is previewed at, in CSS pixels. */
|
|
2
|
+
export declare const PREVIEW_WIDTHS: {
|
|
3
|
+
readonly desktop: 1280;
|
|
4
|
+
readonly tablet: 768;
|
|
5
|
+
readonly mobile: 375;
|
|
6
|
+
};
|
|
7
|
+
export type PreviewDevice = keyof typeof PREVIEW_WIDTHS;
|
|
8
|
+
/**
|
|
9
|
+
* How much a page rendered at `width` px must shrink to fit `available` px: never above 1 (a narrow page is not stretched), and 1 while
|
|
10
|
+
* the pane has not been measured yet.
|
|
11
|
+
*/
|
|
12
|
+
export declare function previewScale(available: number, width: number): number;
|
|
13
|
+
/**
|
|
14
|
+
* What the previewed page tells the editor, as `window.parent.postMessage(action, origin)` from the page's own script: the edit,
|
|
15
|
+
* delete, add, reorder, duplicate and copy-locale buttons the page draws on its components. `id` names the component.
|
|
16
|
+
*/
|
|
17
|
+
export type PreviewAction = {
|
|
18
|
+
type: "edit";
|
|
19
|
+
id: string;
|
|
20
|
+
} | {
|
|
21
|
+
type: "delete";
|
|
22
|
+
id: string;
|
|
23
|
+
} | {
|
|
24
|
+
type: "duplicate";
|
|
25
|
+
id: string;
|
|
26
|
+
}
|
|
27
|
+
/** A new component after the one `after` names; without it, at the start. */
|
|
28
|
+
| {
|
|
29
|
+
type: "add";
|
|
30
|
+
after?: string;
|
|
31
|
+
}
|
|
32
|
+
/** The component moves to position `to` (from 0). */
|
|
33
|
+
| {
|
|
34
|
+
type: "reorder";
|
|
35
|
+
id: string;
|
|
36
|
+
to: number;
|
|
37
|
+
}
|
|
38
|
+
/** Fill the component's current language with the text of `from`. */
|
|
39
|
+
| {
|
|
40
|
+
type: "copy-locale";
|
|
41
|
+
id: string;
|
|
42
|
+
from: string;
|
|
43
|
+
};
|
|
44
|
+
/** What the editor tells the page, through `PreviewFrame.post()`: anything with a `type`. */
|
|
45
|
+
export type PreviewCommand = {
|
|
46
|
+
type: string;
|
|
47
|
+
[key: string]: unknown;
|
|
48
|
+
};
|
|
49
|
+
/** The default reading of a message from the page: one of `PreviewAction`, with the fields its kind needs, or null. */
|
|
50
|
+
export declare function parsePreviewAction(data: unknown): PreviewAction | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as i, h as l } from "vue";
|
|
2
2
|
import { d as u } from "./context-Ch1r4fdN.js";
|
|
3
|
-
import { h as a } from "./platform-
|
|
3
|
+
import { h as a } from "./platform-YWfOO7b2.js";
|
|
4
4
|
function h(o, n) {
|
|
5
5
|
const t = o.map(({ contribution: e }) => e).sort((e, r) => (e.order ?? 0) - (r.order ?? 0));
|
|
6
6
|
return {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const _default: <Item>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
3
|
+
readonly onMove?: ((item: Item, from: number, to: number) => any) | undefined;
|
|
4
|
+
readonly "onUpdate:modelValue"?: ((value: Item[]) => any) | undefined;
|
|
5
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue" | "onMove"> & ({
|
|
6
|
+
itemKey: (keyof Item & string) | ((item: Item) => string | number);
|
|
7
|
+
/** The accessible name of the list. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** What the handle and the announcement call a row; by default the row's key. */
|
|
10
|
+
itemLabel?: (item: Item) => string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
} & {
|
|
13
|
+
modelValue: Item[];
|
|
14
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
15
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {
|
|
18
|
+
item?: (scope: {
|
|
19
|
+
item: Item;
|
|
20
|
+
index: number;
|
|
21
|
+
dragging: boolean;
|
|
22
|
+
}) => unknown;
|
|
23
|
+
};
|
|
24
|
+
emit: ((evt: "move", item: Item, from: number, to: number) => void) & ((evt: "update:modelValue", value: Item[]) => void);
|
|
25
|
+
}>) => import("vue").VNode & {
|
|
26
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
27
|
+
};
|
|
28
|
+
export default _default;
|
|
29
|
+
type __VLS_PrettifyLocal<T> = {
|
|
30
|
+
[K in keyof T]: T[K];
|
|
31
|
+
} & {};
|
|
@@ -13,6 +13,8 @@ export interface TabItem<Value extends string | number = string | number> {
|
|
|
13
13
|
badge?: string | number;
|
|
14
14
|
/** The reason this tab needs attention; shown as an icon with this text as its name. */
|
|
15
15
|
warning?: string;
|
|
16
|
+
/** A failed field inside this tab: a red icon with this text as its name (a warning is amber and softer). */
|
|
17
|
+
error?: string;
|
|
16
18
|
to?: RouteLocationRaw;
|
|
17
19
|
}
|
|
18
20
|
declare const _default: <Value extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
package/dist/controls/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export { default as IconTile } from "./IconTile.vue";
|
|
|
2
2
|
export { default as PopupButton } from "./PopupButton.vue";
|
|
3
3
|
export { default as DateButton } from "./DateButton.vue";
|
|
4
4
|
export { default as SearchInput } from "./SearchInput.vue";
|
|
5
|
+
export { default as SortableList } from "./SortableList.vue";
|
|
5
6
|
export { default as Tabs, type TabItem } from "./Tabs.vue";
|
|
6
7
|
export { default as SwipeActions, type SwipeAction } from "./SwipeActions.vue";
|
|
7
8
|
export { controlSurface, controlSurfacePairs, controlWidth, controlWidthPair, type ClassPair, type ControlKind, type ControlState, type ControlWidth, } from "./controlSurface";
|
package/dist/controls/index.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { _ as
|
|
4
|
-
import { _ as
|
|
5
|
-
import { _ as
|
|
6
|
-
import {
|
|
7
|
-
import { _ as
|
|
8
|
-
import {
|
|
9
|
-
|
|
1
|
+
import { _ as pe } from "../IconTile.vue_vue_type_script_setup_true_lang-BWHQiA7d.js";
|
|
2
|
+
import { defineComponent as P, useSlots as N, openBlock as u, createElementBlock as p, normalizeClass as A, createElementVNode as b, renderSlot as C, toDisplayString as w, createVNode as D, unref as c, useModel as U, useId as q, useTemplateRef as F, ref as $, computed as O, Fragment as R, renderList as W, normalizeStyle as j, createCommentVNode as G, mergeModels as I, nextTick as H } from "vue";
|
|
3
|
+
import { _ as M } from "../Icon.vue_vue_type_script_lang-0pW1XBaE.js";
|
|
4
|
+
import { _ as me } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
|
|
5
|
+
import { _ as ve } from "../SearchInput.vue_vue_type_script_setup_true_lang-w4eAqyZ9.js";
|
|
6
|
+
import { useI18n as J } from "vue-i18n";
|
|
7
|
+
import { _ as ge } from "../Tabs.vue_vue_type_script_setup_true_lang-Cma_ma6V.js";
|
|
8
|
+
import { _ as _e } from "../SwipeActions.vue_vue_type_script_setup_true_lang-BBqcW3MR.js";
|
|
9
|
+
import { c as we, a as ke, b as Le, d as Se } from "../controlSurface-t7OEFESJ.js";
|
|
10
|
+
const Q = ["disabled", "aria-haspopup", "aria-expanded", "aria-invalid"], X = { class: "min-w-0 truncate" }, Z = {
|
|
10
11
|
key: 1,
|
|
11
12
|
class: "text-content-disabled"
|
|
12
|
-
},
|
|
13
|
+
}, ie = /* @__PURE__ */ P({
|
|
13
14
|
__name: "PopupButton",
|
|
14
15
|
props: {
|
|
15
16
|
variant: { default: "filled" },
|
|
@@ -20,37 +21,135 @@ const h = ["disabled", "aria-haspopup", "aria-expanded", "aria-invalid"], y = {
|
|
|
20
21
|
popup: { default: "listbox" }
|
|
21
22
|
},
|
|
22
23
|
emits: ["click"],
|
|
23
|
-
setup(
|
|
24
|
-
const
|
|
25
|
-
return (
|
|
24
|
+
setup(v, { emit: _ }) {
|
|
25
|
+
const o = v, s = _, x = N();
|
|
26
|
+
return (f, m) => (u(), p("button", {
|
|
26
27
|
type: "button",
|
|
27
|
-
disabled:
|
|
28
|
-
"aria-haspopup":
|
|
29
|
-
"aria-expanded":
|
|
30
|
-
"aria-invalid":
|
|
31
|
-
class:
|
|
32
|
-
onClick:
|
|
28
|
+
disabled: o.disabled,
|
|
29
|
+
"aria-haspopup": o.popup,
|
|
30
|
+
"aria-expanded": o.expanded,
|
|
31
|
+
"aria-invalid": o.invalid || void 0,
|
|
32
|
+
class: A(["hit-target inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-control text-body transition-colors duration-motion-fast ease-motion-standard focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-border-focus disabled:cursor-not-allowed disabled:opacity-45", o.variant === "filled" ? ["py-1 pl-2.5 pr-2 text-content-strong", o.expanded ? "bg-fill-strong" : "bg-fill hover:bg-fill-strong"] : ["py-1", o.expanded ? "text-content-link" : "text-content-muted hover:text-content"]]),
|
|
33
|
+
onClick: m[0] || (m[0] = (y) => s("click", y))
|
|
33
34
|
}, [
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
b("span", X, [
|
|
36
|
+
x.default ? C(f.$slots, "default", {}, void 0, void 0, 0) : (u(), p("span", Z, w(o.placeholder), 1))
|
|
36
37
|
]),
|
|
37
|
-
|
|
38
|
+
D(c(M), {
|
|
38
39
|
name: "expandUpDownLine",
|
|
39
40
|
size: 14,
|
|
40
41
|
class: "text-content-muted"
|
|
41
42
|
})
|
|
42
|
-
], 10,
|
|
43
|
+
], 10, Q));
|
|
44
|
+
}
|
|
45
|
+
}), ee = ["aria-label"], te = ["aria-label", "aria-describedby", "onKeydown", "onPointerdown"], oe = { class: "min-w-0 flex-1 py-1.5 pr-2" }, ae = ["id"], ne = {
|
|
46
|
+
role: "status",
|
|
47
|
+
"aria-live": "polite",
|
|
48
|
+
class: "sr-only",
|
|
49
|
+
"data-sortable-live": ""
|
|
50
|
+
}, de = /* @__PURE__ */ P({
|
|
51
|
+
__name: "SortableList",
|
|
52
|
+
props: /* @__PURE__ */ I({
|
|
53
|
+
itemKey: {},
|
|
54
|
+
label: { default: void 0 },
|
|
55
|
+
itemLabel: { type: Function, default: void 0 },
|
|
56
|
+
disabled: { type: Boolean, default: !1 }
|
|
57
|
+
}, {
|
|
58
|
+
modelValue: { required: !0 },
|
|
59
|
+
modelModifiers: {}
|
|
60
|
+
}),
|
|
61
|
+
emits: /* @__PURE__ */ I(["move"], ["update:modelValue"]),
|
|
62
|
+
setup(v, { emit: _ }) {
|
|
63
|
+
const o = v, s = U(v, "modelValue"), x = _, { t: f } = J(), m = q(), y = F("list"), k = $(""), a = $(null), L = (e) => typeof o.itemKey == "function" ? o.itemKey(e) : e[o.itemKey], S = (e) => o.itemLabel?.(e) ?? String(L(e)), T = O(() => s.value.length);
|
|
64
|
+
function B(e, r) {
|
|
65
|
+
const t = Math.min(Math.max(r, 0), s.value.length - 1);
|
|
66
|
+
if (e === t) return !1;
|
|
67
|
+
const n = [...s.value], [l] = n.splice(e, 1);
|
|
68
|
+
return n.splice(t, 0, l), s.value = n, x("move", l, e, t), k.value = f("core.sortable.moved", { item: S(l), position: t + 1, total: T.value }), !0;
|
|
69
|
+
}
|
|
70
|
+
async function V(e, r) {
|
|
71
|
+
if (!e.altKey || e.key !== "ArrowUp" && e.key !== "ArrowDown") return;
|
|
72
|
+
e.preventDefault();
|
|
73
|
+
const t = e.currentTarget;
|
|
74
|
+
B(r, r + (e.key === "ArrowUp" ? -1 : 1)) && (await H(), document.activeElement !== t && t.focus());
|
|
75
|
+
}
|
|
76
|
+
function z() {
|
|
77
|
+
return Array.from(y.value?.querySelectorAll(":scope > [data-sortable-row]") ?? []);
|
|
78
|
+
}
|
|
79
|
+
function Y(e, r) {
|
|
80
|
+
if (o.disabled || e.button !== 0) return;
|
|
81
|
+
const t = e.currentTarget;
|
|
82
|
+
t.setPointerCapture?.(e.pointerId);
|
|
83
|
+
const n = e.clientY;
|
|
84
|
+
a.value = { from: r, to: r, offset: 0 };
|
|
85
|
+
const l = (i) => {
|
|
86
|
+
const d = z().map((h) => h.getBoundingClientRect()), K = d.findIndex((h) => i < h.top + h.height / 2);
|
|
87
|
+
return K < 0 ? d.length - 1 : K;
|
|
88
|
+
}, E = (i) => {
|
|
89
|
+
a.value && (a.value = { from: r, to: l(i.clientY), offset: i.clientY - n });
|
|
90
|
+
}, g = (i) => {
|
|
91
|
+
t.removeEventListener("pointermove", E), t.removeEventListener("pointerup", g), t.removeEventListener("pointercancel", g);
|
|
92
|
+
const d = i.type === "pointerup" ? a.value : null;
|
|
93
|
+
a.value = null, d && B(d.from, d.to);
|
|
94
|
+
};
|
|
95
|
+
t.addEventListener("pointermove", E), t.addEventListener("pointerup", g), t.addEventListener("pointercancel", g);
|
|
96
|
+
}
|
|
97
|
+
return (e, r) => (u(), p("div", null, [
|
|
98
|
+
b("ul", {
|
|
99
|
+
ref_key: "list",
|
|
100
|
+
ref: y,
|
|
101
|
+
"aria-label": o.label,
|
|
102
|
+
class: "flex flex-col gap-1.5",
|
|
103
|
+
"data-sortable-list": ""
|
|
104
|
+
}, [
|
|
105
|
+
(u(!0), p(R, null, W(s.value, (t, n) => (u(), p("li", {
|
|
106
|
+
key: L(t),
|
|
107
|
+
"data-sortable-row": "",
|
|
108
|
+
class: A(["relative flex items-stretch gap-1 rounded-md border border-border-separator bg-surface-cell", [a.value?.from === n ? "z-10 shadow-md" : "", a.value && a.value.from !== n && a.value.to === n ? a.value.to > a.value.from ? "border-b-2 border-b-border-focus" : "border-t-2 border-t-border-focus" : ""]]),
|
|
109
|
+
style: j(a.value?.from === n ? { transform: `translateY(${a.value.offset}px)` } : void 0)
|
|
110
|
+
}, [
|
|
111
|
+
o.disabled ? G("", !0) : (u(), p("button", {
|
|
112
|
+
key: 0,
|
|
113
|
+
type: "button",
|
|
114
|
+
"data-sortable-handle": "",
|
|
115
|
+
"aria-label": c(f)("core.sortable.handle", { item: S(t) }),
|
|
116
|
+
"aria-describedby": c(m),
|
|
117
|
+
class: "flex w-7 shrink-0 cursor-grab touch-none items-center justify-center rounded-l-md text-content-muted hover:bg-fill focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-border-focus",
|
|
118
|
+
onKeydown: (l) => V(l, n),
|
|
119
|
+
onPointerdown: (l) => Y(l, n)
|
|
120
|
+
}, [
|
|
121
|
+
D(c(M), {
|
|
122
|
+
name: "draggable",
|
|
123
|
+
size: 16
|
|
124
|
+
})
|
|
125
|
+
], 40, te)),
|
|
126
|
+
b("div", oe, [
|
|
127
|
+
C(e.$slots, "item", {
|
|
128
|
+
item: t,
|
|
129
|
+
index: n,
|
|
130
|
+
dragging: a.value?.from === n
|
|
131
|
+
})
|
|
132
|
+
])
|
|
133
|
+
], 6))), 128))
|
|
134
|
+
], 8, ee),
|
|
135
|
+
b("p", {
|
|
136
|
+
id: c(m),
|
|
137
|
+
class: "sr-only"
|
|
138
|
+
}, w(c(f)("core.sortable.hint")), 9, ae),
|
|
139
|
+
b("p", ne, w(k.value), 1)
|
|
140
|
+
]));
|
|
43
141
|
}
|
|
44
142
|
});
|
|
45
143
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
144
|
+
me as DateButton,
|
|
145
|
+
pe as IconTile,
|
|
146
|
+
ie as PopupButton,
|
|
147
|
+
ve as SearchInput,
|
|
148
|
+
de as SortableList,
|
|
149
|
+
_e as SwipeActions,
|
|
150
|
+
ge as Tabs,
|
|
151
|
+
we as controlSurface,
|
|
152
|
+
ke as controlSurfacePairs,
|
|
153
|
+
Le as controlWidth,
|
|
154
|
+
Se as controlWidthPair
|
|
56
155
|
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type CodeLanguage, type CodeMarker } from "./codeEditor";
|
|
2
|
+
/**
|
|
3
|
+
* The editor of `CodeField` without the field around it (no label, no error row, no border): source code in a box that you place
|
|
4
|
+
* yourself, as the pane of a workbench. It is CodeMirror 6, optional peer dependencies loaded when the editor first shows (see
|
|
5
|
+
* `loadCodeEditor`); an application that never shows one never loads them.
|
|
6
|
+
*
|
|
7
|
+
* - `fill`: the editor takes the height of its parent (which must have one); otherwise `height`.
|
|
8
|
+
* - `reveal(line, column?)` (template ref): puts the cursor there, scrolls it into view and focuses the editor. A call made while
|
|
9
|
+
* the editor is still loading is carried out when it is ready.
|
|
10
|
+
* - `@cursor`: `{ line, column }` (from 1) whenever the cursor moves, for a "Line 14, column 8" readout.
|
|
11
|
+
* - `markers`: the server's findings, drawn in the gutter and as an underline (the browser checks nothing).
|
|
12
|
+
* - `@save`: Ctrl/Cmd+S (the browser's own save is suppressed). Tab indents; Esc, then Tab, moves on to the next control.
|
|
13
|
+
*
|
|
14
|
+
* <CodeEditor ref="editor" v-model="source" language="liquid" fill :markers="lint" label="Template" @save="save" @cursor="at = $event" />
|
|
15
|
+
* editor.value?.reveal(14, 8)
|
|
16
|
+
*/
|
|
17
|
+
type __VLS_Props = {
|
|
18
|
+
modelValue?: string;
|
|
19
|
+
language?: CodeLanguage;
|
|
20
|
+
/** Visible and selectable, not editable. */
|
|
21
|
+
readonly?: boolean;
|
|
22
|
+
lineNumbers?: boolean;
|
|
23
|
+
/** The editor takes the height of its parent instead of `height`. */
|
|
24
|
+
fill?: boolean;
|
|
25
|
+
/** Any CSS length; ignored with `fill`. */
|
|
26
|
+
height?: string;
|
|
27
|
+
markers?: readonly CodeMarker[];
|
|
28
|
+
/** The accessible name of the editor. */
|
|
29
|
+
label?: string;
|
|
30
|
+
};
|
|
31
|
+
declare function reveal(line: number, column?: number): void;
|
|
32
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
33
|
+
focus: () => void | undefined;
|
|
34
|
+
reveal: typeof reveal;
|
|
35
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
36
|
+
save: () => any;
|
|
37
|
+
failed: () => any;
|
|
38
|
+
"update:modelValue": (source: string) => any;
|
|
39
|
+
cursor: (position: {
|
|
40
|
+
line: number;
|
|
41
|
+
column: number;
|
|
42
|
+
}) => any;
|
|
43
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
44
|
+
onSave?: (() => any) | undefined;
|
|
45
|
+
onFailed?: (() => any) | undefined;
|
|
46
|
+
"onUpdate:modelValue"?: ((source: string) => any) | undefined;
|
|
47
|
+
onCursor?: ((position: {
|
|
48
|
+
line: number;
|
|
49
|
+
column: number;
|
|
50
|
+
}) => any) | undefined;
|
|
51
|
+
}>, {
|
|
52
|
+
fill: boolean;
|
|
53
|
+
label: string;
|
|
54
|
+
height: string;
|
|
55
|
+
modelValue: string;
|
|
56
|
+
readonly: boolean;
|
|
57
|
+
language: CodeLanguage;
|
|
58
|
+
lineNumbers: boolean;
|
|
59
|
+
markers: readonly CodeMarker[];
|
|
60
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
61
|
+
export default _default;
|
|
@@ -40,8 +40,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
40
40
|
required: boolean;
|
|
41
41
|
presentation: "control" | "value";
|
|
42
42
|
maxLength: number;
|
|
43
|
-
labelHidden: boolean;
|
|
44
43
|
rows: number;
|
|
44
|
+
labelHidden: boolean;
|
|
45
45
|
hint: string;
|
|
46
46
|
editable: boolean;
|
|
47
47
|
lockedReason: string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { CodeMarker } from "./codeEditor";
|
|
2
|
+
/**
|
|
3
|
+
* The findings of the server's linter as a list under the editor: errors first, then warnings, each group headed by its count
|
|
4
|
+
* ("2 greške"; the plural forms of the locale), each finding one button ("Redak 6, stupac 2 · message") that reports `select`
|
|
5
|
+
* so the app can `reveal` the line in the `CodeEditor`. Nothing to list shows "All clear" ("U redu"). Severity is a word and an
|
|
6
|
+
* icon, never a colour alone. The buttons are in the tab order.
|
|
7
|
+
*
|
|
8
|
+
* <MarkerList :markers="lint" @select="(marker) => editor?.reveal(marker.line, marker.column)" />
|
|
9
|
+
*
|
|
10
|
+
* Counts use the plural rules of the application's locale: `createApplication` installs them; a bare `createI18n` needs `pluralRules: slavicPluralRules`.
|
|
11
|
+
*/
|
|
12
|
+
type __VLS_Props = {
|
|
13
|
+
markers: readonly CodeMarker[];
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
16
|
+
select: (marker: CodeMarker) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
onSelect?: ((marker: CodeMarker) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
@@ -37,9 +37,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps,
|
|
|
37
37
|
required: boolean;
|
|
38
38
|
presentation: "control" | "value";
|
|
39
39
|
maxLength: number;
|
|
40
|
+
rows: number;
|
|
40
41
|
stacked: boolean;
|
|
41
42
|
labelHidden: boolean;
|
|
42
|
-
rows: number;
|
|
43
43
|
hint: string;
|
|
44
44
|
editable: boolean;
|
|
45
45
|
lockedReason: string;
|
package/dist/form/index.d.ts
CHANGED
|
@@ -85,7 +85,9 @@ export { default as DynamicForm } from "./dynamic/DynamicForm.vue";
|
|
|
85
85
|
export { default as RepeatField } from "./dynamic/RepeatField.vue";
|
|
86
86
|
export { default as ResourceField } from "./dynamic/ResourceField.vue";
|
|
87
87
|
export { default as RichTextField } from "./dynamic/RichTextField.vue";
|
|
88
|
+
export { default as CodeEditor } from "./CodeEditor.vue";
|
|
88
89
|
export { default as CodeField } from "./CodeField.vue";
|
|
90
|
+
export { default as MarkerList } from "./MarkerList.vue";
|
|
89
91
|
export type { CodeLanguage, CodeMarker } from "./codeEditor";
|
|
90
92
|
export { evaluateVisibility, isEmptyValue } from "./dynamic/visibility";
|
|
91
93
|
export { buildValidator } from "./dynamic/validator";
|