@wssto2/vue-core 0.20.0 → 0.21.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 +15 -0
- package/README.md +2 -1
- package/dist/{AccountMenuItem.vue_vue_type_script_setup_true_lang-rmH1XbU9.js → AccountMenuItem.vue_vue_type_script_setup_true_lang-C2TmmH38.js} +1 -1
- package/dist/{ActionRow.vue_vue_type_script_setup_true_lang-_TDoIg53.js → ActionRow.vue_vue_type_script_setup_true_lang-BEV0drwF.js} +2 -2
- package/dist/{Activity-BDVYmNgy.js → Activity-CZzAt3SH.js} +8 -8
- package/dist/{AdaptivePageShell.vue_vue_type_script_setup_true_lang-DryXyklZ.js → AdaptivePageShell.vue_vue_type_script_setup_true_lang-BkZzuICH.js} +3 -3
- package/dist/{AlertDialog.vue_vue_type_script_setup_true_lang-QYvbly_-.js → AlertDialog.vue_vue_type_script_setup_true_lang-B0UvzCoE.js} +1 -1
- package/dist/{AsyncSection.vue_vue_type_script_setup_true_lang-DRP4BnMb.js → AsyncSection.vue_vue_type_script_setup_true_lang-DuPS_zMX.js} +4 -4
- package/dist/{Banner.vue_vue_type_script_setup_true_lang-ukLpznql.js → Banner.vue_vue_type_script_setup_true_lang-BXZVOhfH.js} +1 -1
- package/dist/{Button.vue_vue_type_script_setup_true_lang-DkRuLqQK.js → Button.vue_vue_type_script_setup_true_lang-CZkTqGtE.js} +1 -1
- package/dist/{Changes-DRij0rEQ.js → Changes-B0bhSNU3.js} +4 -4
- package/dist/CharacteristicsPage-fGnahf62.js +4 -0
- package/dist/{CollectionPage.vue_vue_type_script_setup_true_lang-Aoof1prZ.js → CollectionPage.vue_vue_type_script_setup_true_lang-Bf5WXVFZ.js} +11 -11
- package/dist/CollectionTree.vue_vue_type_script_setup_true_lang-DV0OhquO.js +345 -0
- package/dist/{DataTable.vue_vue_type_script_setup_true_lang-DGcNcRkO.js → DataTable.vue_vue_type_script_setup_true_lang-Cw_E8w48.js} +1 -1
- package/dist/{DateField.vue_vue_type_script_setup_true_lang-J04KjxmR.js → DateField.vue_vue_type_script_setup_true_lang-Cn8CNAwM.js} +4 -4
- package/dist/{DeadLetters-Dpm4UY__.js → DeadLetters--js7aeC6.js} +3 -3
- package/dist/{DiscardChangesModal.vue_vue_type_script_setup_true_lang-CxNVKoYI.js → DiscardChangesModal.vue_vue_type_script_setup_true_lang-lnFUie1d.js} +1 -1
- package/dist/{EmptyState.vue_vue_type_script_setup_true_lang-ByKvrNSg.js → EmptyState.vue_vue_type_script_setup_true_lang-DHmu-UG-.js} +1 -1
- package/dist/{FormGroup.vue_vue_type_script_setup_true_lang-7bIssY9f.js → FormGroup.vue_vue_type_script_setup_true_lang-BUhKKybf.js} +3 -3
- package/dist/{FormRow.vue_vue_type_script_setup_true_lang-okuxbKyI.js → FormRow.vue_vue_type_script_setup_true_lang-B-uth5RB.js} +1 -1
- package/dist/{FormView.vue_vue_type_script_setup_true_lang-CiYprNRr.js → FormView.vue_vue_type_script_setup_true_lang-CoQZG-hB.js} +2 -2
- package/dist/{General-BmVEbYqv.js → General-BGT9H69S.js} +7 -7
- package/dist/{HeaderAction.vue_vue_type_script_setup_true_lang-DVfkuOy-.js → HeaderAction.vue_vue_type_script_setup_true_lang-Uw0vwV-o.js} +2 -2
- package/dist/{Icon.vue_vue_type_script_lang-0pW1XBaE.js → Icon.vue_vue_type_script_lang-BIzh8LF1.js} +41 -37
- package/dist/{IconTile.vue_vue_type_script_setup_true_lang-BWHQiA7d.js → IconTile.vue_vue_type_script_setup_true_lang-DRirnJvd.js} +1 -1
- package/dist/{IncidentRecord-DWY6Bws1.js → IncidentRecord-BETFfXbI.js} +15 -15
- package/dist/{IncidentsList-C21UNIhT.js → IncidentsList-BIr3a2To.js} +5 -5
- package/dist/{LeaveGuardRoot.vue_vue_type_script_setup_true_lang-CpEd_Psg.js → LeaveGuardRoot.vue_vue_type_script_setup_true_lang-DjXYh-p0.js} +1 -1
- package/dist/{Menu.vue_vue_type_script_setup_true_lang-DobycRxf.js → Menu.vue_vue_type_script_setup_true_lang-D2FsOVYA.js} +1 -1
- package/dist/{MenuButton.vue_vue_type_script_setup_true_lang-qDKt6gX9.js → MenuButton.vue_vue_type_script_setup_true_lang-BNzrYIzR.js} +1 -1
- package/dist/{Modal.vue_vue_type_script_setup_true_lang-C0tQAYQ4.js → Modal.vue_vue_type_script_setup_true_lang-BRRMKXOV.js} +2 -2
- package/dist/{NewRolePage-K5zts3e_.js → NewRolePage-B0Y5MrTu.js} +4 -4
- package/dist/{NoAccess.vue_vue_type_script_setup_true_lang-BYnTQCtW.js → NoAccess.vue_vue_type_script_setup_true_lang-CnfE_AEl.js} +1 -1
- package/dist/{NumberField.vue_vue_type_script_setup_true_lang-CxgVJrdv.js → NumberField.vue_vue_type_script_setup_true_lang-BDZ_0TH7.js} +2 -2
- package/dist/{Panel.vue_vue_type_script_setup_true_lang-DTCmFSwg.js → Panel.vue_vue_type_script_setup_true_lang-CwcJadT7.js} +1 -1
- package/dist/{PersonAccess.vue_vue_type_script_setup_true_lang-Kp9g93wE.js → PersonAccess.vue_vue_type_script_setup_true_lang-CJMV9BDQ.js} +10 -10
- package/dist/{PhotoViewer.vue_vue_type_script_setup_true_lang-D2-uQbSV.js → PhotoViewer.vue_vue_type_script_setup_true_lang-BL485L63.js} +1 -1
- package/dist/{ProfilePage-C3mLBer6.js → ProfilePage-CMy2Dkr2.js} +15 -15
- package/dist/{RecordHeader.vue_vue_type_script_setup_true_lang-Dz5Qw8II.js → RecordHeader.vue_vue_type_script_setup_true_lang-D4PcZnbo.js} +2 -2
- package/dist/{ResourcePage.vue_vue_type_script_setup_true_lang-R3eJKPq5.js → ResourcePage.vue_vue_type_script_setup_true_lang-CpGwm2tv.js} +4 -4
- package/dist/{RoleEditor.vue_vue_type_script_setup_true_lang-CGMpBpnK.js → RoleEditor.vue_vue_type_script_setup_true_lang-CMo8PrO7.js} +11 -11
- package/dist/{RolePage-C62_sGxx.js → RolePage-DGFISfM1.js} +12 -12
- package/dist/{RolesPage-CS8ryIQq.js → RolesPage-Bq9EVB_3.js} +8 -8
- package/dist/{SectionList.vue_vue_type_script_setup_true_lang-C6eOVjpa.js → SectionList.vue_vue_type_script_setup_true_lang-BdJ11lZo.js} +2 -2
- package/dist/{SectionNavigator.vue_vue_type_script_setup_true_lang-DqDcFvS0.js → SectionNavigator.vue_vue_type_script_setup_true_lang-CnzECivO.js} +4 -4
- package/dist/{SegmentedField.vue_vue_type_script_setup_true_lang-Du4YUcw9.js → SegmentedField.vue_vue_type_script_setup_true_lang-D3IZil4q.js} +2 -2
- package/dist/{SelectField.vue_vue_type_script_setup_true_lang-BA5YMCXA.js → SelectField.vue_vue_type_script_setup_true_lang-DxCEwED6.js} +6 -6
- package/dist/{ServiceAccountDialog.vue_vue_type_script_setup_true_lang-BoeV2_MN.js → ServiceAccountDialog.vue_vue_type_script_setup_true_lang-DtVXUOdP.js} +7 -7
- package/dist/{ServiceAccountRecord-BDkaaOte.js → ServiceAccountRecord-Dc7Gn52W.js} +17 -17
- package/dist/{ServiceAccountsList-KaZwNlK5.js → ServiceAccountsList-DBUFeka-.js} +9 -9
- package/dist/{Sessions-DhOpUlRc.js → Sessions-BMmqYZrJ.js} +5 -5
- package/dist/{SettingsPage-DPzg7zwX.js → SettingsPage-4Dolsr0t.js} +17 -17
- package/dist/{Sheet.vue_vue_type_script_setup_true_lang-C1jpmLYN.js → Sheet.vue_vue_type_script_setup_true_lang-BVU5yzXe.js} +1 -1
- package/dist/{SignIn-4aUxE2LU.js → SignIn-uFn1ZWG8.js} +6 -6
- package/dist/{SignInPage-B80pQ8tG.js → SignInPage-DouCg9aD.js} +5 -5
- package/dist/{SignIns-CLX8Puf1.js → SignIns-CqN5UNmh.js} +4 -4
- package/dist/SortableList.vue_vue_type_script_setup_true_lang-D2-5Z_jO.js +112 -0
- package/dist/{StatusLine.vue_vue_type_script_setup_true_lang-BN8nG1CW.js → StatusLine.vue_vue_type_script_setup_true_lang-DBkQueB0.js} +1 -1
- package/dist/{SwipeActions.vue_vue_type_script_setup_true_lang-BBqcW3MR.js → SwipeActions.vue_vue_type_script_setup_true_lang-DUjUWq3G.js} +1 -1
- package/dist/{SwitchField.vue_vue_type_script_setup_true_lang-Dw7BbBU4.js → SwitchField.vue_vue_type_script_setup_true_lang-CTMjlNid.js} +2 -2
- package/dist/{Tabs.vue_vue_type_script_setup_true_lang-Cma_ma6V.js → Tabs.vue_vue_type_script_setup_true_lang-7CJto6Mp.js} +1 -1
- package/dist/{TextField.vue_vue_type_script_setup_true_lang-DS6RPR-h.js → TextField.vue_vue_type_script_setup_true_lang-B6Q65aQA.js} +4 -4
- package/dist/{TextareaField.vue_vue_type_script_setup_true_lang-BqpZt1Hv.js → TextareaField.vue_vue_type_script_setup_true_lang-Cj0LKDdo.js} +2 -2
- package/dist/{TimeField.vue_vue_type_script_setup_true_lang-BeS1cfqL.js → TimeField.vue_vue_type_script_setup_true_lang-TSnnjMn1.js} +4 -4
- package/dist/{Timestamp.vue_vue_type_script_setup_true_lang-XbbupD9A.js → Timestamp.vue_vue_type_script_setup_true_lang-0WL7PP0j.js} +1 -1
- package/dist/{UserRecord-BFqw2Pi8.js → UserRecord-CH5oNRLg.js} +7 -7
- package/dist/{UsersList-C52C1lN1.js → UsersList-BmxWpt9h.js} +2 -2
- package/dist/{ViewTabs.vue_vue_type_script_setup_true_lang-CBYrLPL4.js → ViewTabs.vue_vue_type_script_setup_true_lang-BKI5DGuS.js} +1 -1
- package/dist/access/index.js +7 -7
- package/dist/app/index.js +1 -1
- package/dist/{application-cTqMhmFf.js → application-C5fZyCB9.js} +4 -4
- package/dist/button/index.js +1 -1
- package/dist/characteristics/CharacteristicsPage.vue.d.ts +2 -0
- package/dist/characteristics/DeleteDialog.vue.d.ts +22 -0
- package/dist/characteristics/ItemSheet.vue.d.ts +25 -0
- package/dist/characteristics/access.d.ts +3 -0
- package/dist/characteristics/api.d.ts +23 -0
- package/dist/characteristics/context.d.ts +12 -0
- package/dist/characteristics/feature.d.ts +27 -0
- package/dist/characteristics/index.d.ts +10 -0
- package/dist/characteristics/index.js +617 -0
- package/dist/characteristics/model.d.ts +34 -0
- package/dist/characteristics/routes.d.ts +13 -0
- package/dist/collection/CollectionTree.vue.d.ts +51 -0
- package/dist/collection/CollectionTreeBranch.vue.d.ts +12 -0
- package/dist/collection/FileExplorer.vue.d.ts +53 -0
- package/dist/collection/RowMore.vue.d.ts +11 -0
- package/dist/collection/explorer.d.ts +11 -0
- package/dist/collection/index.d.ts +5 -0
- package/dist/collection/index.js +431 -158
- package/dist/collection/tree.d.ts +64 -0
- package/dist/content/index.js +4 -4
- package/dist/controls/SortableList.vue.d.ts +1 -0
- package/dist/controls/index.js +35 -132
- package/dist/form/CharacteristicField.vue.d.ts +36 -0
- package/dist/form/index.d.ts +1 -0
- package/dist/form/index.js +1764 -1922
- package/dist/i18n/index.js +39 -39
- package/dist/icon/core.d.ts +4 -0
- package/dist/icon/index.js +1 -1
- package/dist/identity/index.js +2 -2
- package/dist/incidents/index.js +1 -1
- package/dist/{index-DLkQwWt9.js → index-4wyfEeIw.js} +8 -8
- package/dist/{index-CMx77x5P.js → index-C_ZVaTkR.js} +24 -24
- package/dist/{index-CxUfs3Xz.js → index-OVbtHAtG.js} +9 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/modal/index.js +5 -5
- package/dist/modules/characteristics/entities.d.ts +67 -0
- package/dist/modules/characteristics/routes.d.ts +55 -0
- package/dist/modules/characteristics/schemas.d.ts +50 -0
- package/dist/modules/identity/entities.d.ts +1 -0
- package/dist/notifications/index.js +1 -1
- package/dist/onboarding/index.js +1 -1
- package/dist/{options-DIp_lVAj.js → options-DDCG86OV.js} +2 -2
- package/dist/overlay/index.js +4 -4
- package/dist/page/index.js +7 -7
- package/dist/phone/index.js +3 -3
- package/dist/pwa/index.js +3 -3
- package/dist/resource/index.js +1 -1
- package/dist/{resources-BAxfEEv1.js → resources-DkI60fHL.js} +1 -1
- package/dist/router/index.js +1 -1
- package/dist/routes-DC8BWFz8.js +251 -0
- package/dist/{rowLayout-3W9TvFNt.js → rowLayout-zd3Yw6fO.js} +34 -33
- package/dist/shell/index.js +7 -7
- package/dist/state/index.js +8 -8
- package/dist/styles.css +1 -1
- package/dist/{suggestions-D0-qmRFy.js → suggestions-DZ3B5RVH.js} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/{useCommand-D6K6o6dx.js → useCommand-DerEnzIW.js} +4 -4
- package/dist/{useGroupSheet-Daxi2mzi.js → useGroupSheet-B9TCHIKH.js} +5 -5
- package/dist/{useRecordDialog-CfBp0kuP.js → useRecordDialog-DX97ivZD.js} +1 -1
- package/dist/{useResourceForm-Ddxk7mc0.js → useResourceForm-D8T1snBQ.js} +1 -1
- package/dist/{useTypedEntry-r4AqWlV7.js → useTypedEntry-CTkgM29Y.js} +2 -2
- package/package.json +6 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { InjectionKey } from "vue";
|
|
2
|
+
import type { RowAction } from "./columns";
|
|
3
|
+
/** What a `CollectionTree` node is: its id, its name, its children, and whether it is switched on (`undefined`: it has no switch). */
|
|
4
|
+
export interface TreeNode<Node> {
|
|
5
|
+
readonly id: string | number;
|
|
6
|
+
readonly label: string;
|
|
7
|
+
readonly active?: boolean;
|
|
8
|
+
readonly children?: readonly Node[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* A column besides the name. `visible` says where it applies: a column that belongs to one branch ("Kod marke" under Marke) is blank on
|
|
12
|
+
* every other row. The header always shows, so the columns do not jump when a branch opens.
|
|
13
|
+
*/
|
|
14
|
+
export interface TreeColumn<Node> {
|
|
15
|
+
readonly key: string;
|
|
16
|
+
readonly label: string;
|
|
17
|
+
/** Pixels. */
|
|
18
|
+
readonly width?: number;
|
|
19
|
+
readonly align?: "start" | "center" | "end";
|
|
20
|
+
/** `depth` is 0 for the roots. Default: every row. */
|
|
21
|
+
readonly visible?: (node: Node, depth: number) => boolean;
|
|
22
|
+
}
|
|
23
|
+
/** What `@reorder` says: the node, the parent it stays in (`null`: a root) and where it lands among that parent's children, counted from 0. */
|
|
24
|
+
export interface TreeReorder {
|
|
25
|
+
readonly id: string | number;
|
|
26
|
+
readonly parentId: string | number | null;
|
|
27
|
+
readonly index: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The nodes a search or filter leaves on screen: those that match, and every ancestor of one (a match is never shown without its
|
|
31
|
+
* path). `forced` is the ancestors, which show open while the search lasts.
|
|
32
|
+
*/
|
|
33
|
+
export declare function visibleNodes<Node extends TreeNode<Node>>(nodes: readonly Node[], matches: (node: Node) => boolean): {
|
|
34
|
+
shown: Set<string | number>;
|
|
35
|
+
forced: Set<string | number>;
|
|
36
|
+
};
|
|
37
|
+
/** Whether a node's name contains the text, ignoring case and accents. */
|
|
38
|
+
export declare const matchesText: (label: string, text: string) => boolean;
|
|
39
|
+
/** A node as the branches see it: the typed node of the app, loosely (internal). */
|
|
40
|
+
export interface LooseNode extends TreeNode<LooseNode> {
|
|
41
|
+
readonly [key: string]: unknown;
|
|
42
|
+
}
|
|
43
|
+
/** What `CollectionTree` hands its branches (internal): one object, so the recursion does not repeat a dozen props. */
|
|
44
|
+
export interface TreeContext {
|
|
45
|
+
columns: readonly TreeColumn<LooseNode>[];
|
|
46
|
+
readonly: boolean;
|
|
47
|
+
reorderable: boolean;
|
|
48
|
+
search: string;
|
|
49
|
+
activeLabel: string | undefined;
|
|
50
|
+
isOpen(node: LooseNode): boolean;
|
|
51
|
+
isShown(node: LooseNode): boolean;
|
|
52
|
+
toggle(node: LooseNode): void;
|
|
53
|
+
addLabel(parent: LooseNode | null, level: number): string | null;
|
|
54
|
+
add(parent: LooseNode | null): void;
|
|
55
|
+
open(node: LooseNode): void;
|
|
56
|
+
setActive(node: LooseNode, active: boolean): void;
|
|
57
|
+
reorder(change: TreeReorder): void;
|
|
58
|
+
actions(node: LooseNode, depth: number): readonly RowAction[];
|
|
59
|
+
slot(name: string): ((scope: {
|
|
60
|
+
node: LooseNode;
|
|
61
|
+
depth: number;
|
|
62
|
+
}) => unknown) | undefined;
|
|
63
|
+
}
|
|
64
|
+
export declare const treeContextKey: InjectionKey<TreeContext>;
|
package/dist/content/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { defineComponent as M, computed as _, openBlock as s, createElementBlock as n, Fragment as S, renderList as B, toDisplayString as b, createCommentVNode as w, createElementVNode as i, normalizeClass as $, createVNode as E, unref as p, renderSlot as C, createTextVNode as A, createBlock as D, useModel as se, useId as ne, useTemplateRef as P, watch as Q, nextTick as ae, withModifiers as le, withDirectives as re, vModelText as ie, mergeModels as q, ref as T, withCtx as W, createSlots as ce, resolveDynamicComponent as de, onMounted as ue, onBeforeUnmount as me, normalizeStyle as U } from "vue";
|
|
2
2
|
import { u as G, t as pe } from "../format-C_HXlOYQ.js";
|
|
3
|
-
import { _ as N } from "../Icon.vue_vue_type_script_lang-
|
|
3
|
+
import { _ as N } from "../Icon.vue_vue_type_script_lang-BIzh8LF1.js";
|
|
4
4
|
import { _ as fe } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
5
5
|
import { i as Wt } from "../Avatar.vue_vue_type_script_setup_true_lang-BPj_fkJR.js";
|
|
6
6
|
import { useI18n as F } from "vue-i18n";
|
|
7
7
|
import { _ as be } from "../KeyValue.vue_vue_type_script_setup_true_lang-wcZcvnow.js";
|
|
8
|
-
import { _ as Ht } from "../Panel.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { _ as he } from "../Tabs.vue_vue_type_script_setup_true_lang-
|
|
10
|
-
import { _ as qt } from "../Timestamp.vue_vue_type_script_setup_true_lang-
|
|
8
|
+
import { _ as Ht } from "../Panel.vue_vue_type_script_setup_true_lang-CwcJadT7.js";
|
|
9
|
+
import { _ as he } from "../Tabs.vue_vue_type_script_setup_true_lang-7CJto6Mp.js";
|
|
10
|
+
import { _ as qt } from "../Timestamp.vue_vue_type_script_setup_true_lang-0WL7PP0j.js";
|
|
11
11
|
const ve = ["aria-label"], ge = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "py-1.5 text-center text-caption font-semibold text-content-muted",
|
|
@@ -9,6 +9,7 @@ declare const _default: <Item>(__VLS_props: NonNullable<Awaited<typeof __VLS_set
|
|
|
9
9
|
/** What the handle and the announcement call a row; by default the row's key. */
|
|
10
10
|
itemLabel?: (item: Item) => string;
|
|
11
11
|
disabled?: boolean;
|
|
12
|
+
plain?: boolean;
|
|
12
13
|
} & {
|
|
13
14
|
modelValue: Item[];
|
|
14
15
|
}) & Partial<{}>> & import("vue").PublicProps;
|
package/dist/controls/index.js
CHANGED
|
@@ -1,16 +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 { _ as
|
|
9
|
-
import { c as
|
|
10
|
-
const
|
|
1
|
+
import { _ as C } from "../IconTile.vue_vue_type_script_setup_true_lang-DRirnJvd.js";
|
|
2
|
+
import { defineComponent as p, useSlots as c, openBlock as o, createElementBlock as a, normalizeClass as u, createElementVNode as f, renderSlot as m, toDisplayString as x, createVNode as b, unref as _ } from "vue";
|
|
3
|
+
import { _ as v } from "../Icon.vue_vue_type_script_lang-BIzh8LF1.js";
|
|
4
|
+
import { _ as z } from "../DateButton.vue_vue_type_script_setup_true_lang-CovKG5lN.js";
|
|
5
|
+
import { _ as I } from "../SearchInput.vue_vue_type_script_setup_true_lang-w4eAqyZ9.js";
|
|
6
|
+
import { _ as N } from "../SortableList.vue_vue_type_script_setup_true_lang-D2-5Z_jO.js";
|
|
7
|
+
import { _ as V } from "../Tabs.vue_vue_type_script_setup_true_lang-7CJto6Mp.js";
|
|
8
|
+
import { _ as $ } from "../SwipeActions.vue_vue_type_script_setup_true_lang-DUjUWq3G.js";
|
|
9
|
+
import { c as U, a as j, b as q, d as F } from "../controlSurface-t7OEFESJ.js";
|
|
10
|
+
const h = ["disabled", "aria-haspopup", "aria-expanded", "aria-invalid"], y = { class: "min-w-0 truncate" }, g = {
|
|
11
11
|
key: 1,
|
|
12
12
|
class: "text-content-disabled"
|
|
13
|
-
},
|
|
13
|
+
}, k = /* @__PURE__ */ p({
|
|
14
14
|
__name: "PopupButton",
|
|
15
15
|
props: {
|
|
16
16
|
variant: { default: "filled" },
|
|
@@ -21,135 +21,38 @@ const Q = ["disabled", "aria-haspopup", "aria-expanded", "aria-invalid"], X = {
|
|
|
21
21
|
popup: { default: "listbox" }
|
|
22
22
|
},
|
|
23
23
|
emits: ["click"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
return (
|
|
24
|
+
setup(n, { emit: s }) {
|
|
25
|
+
const e = n, i = s, l = c();
|
|
26
|
+
return (r, t) => (o(), a("button", {
|
|
27
27
|
type: "button",
|
|
28
|
-
disabled:
|
|
29
|
-
"aria-haspopup":
|
|
30
|
-
"aria-expanded":
|
|
31
|
-
"aria-invalid":
|
|
32
|
-
class:
|
|
33
|
-
onClick:
|
|
28
|
+
disabled: e.disabled,
|
|
29
|
+
"aria-haspopup": e.popup,
|
|
30
|
+
"aria-expanded": e.expanded,
|
|
31
|
+
"aria-invalid": e.invalid || void 0,
|
|
32
|
+
class: u(["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", e.variant === "filled" ? ["py-1 pl-2.5 pr-2 text-content-strong", e.expanded ? "bg-fill-strong" : "bg-fill hover:bg-fill-strong"] : ["py-1", e.expanded ? "text-content-link" : "text-content-muted hover:text-content"]]),
|
|
33
|
+
onClick: t[0] || (t[0] = (d) => i("click", d))
|
|
34
34
|
}, [
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
f("span", y, [
|
|
36
|
+
l.default ? m(r.$slots, "default", {}, void 0, void 0, 0) : (o(), a("span", g, x(e.placeholder), 1))
|
|
37
37
|
]),
|
|
38
|
-
|
|
38
|
+
b(_(v), {
|
|
39
39
|
name: "expandUpDownLine",
|
|
40
40
|
size: 14,
|
|
41
41
|
class: "text-content-muted"
|
|
42
42
|
})
|
|
43
|
-
], 10,
|
|
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
|
+
], 10, h));
|
|
141
44
|
}
|
|
142
45
|
});
|
|
143
46
|
export {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
47
|
+
z as DateButton,
|
|
48
|
+
C as IconTile,
|
|
49
|
+
k as PopupButton,
|
|
50
|
+
I as SearchInput,
|
|
51
|
+
N as SortableList,
|
|
52
|
+
$ as SwipeActions,
|
|
53
|
+
V as Tabs,
|
|
54
|
+
U as controlSurface,
|
|
55
|
+
j as controlSurfacePairs,
|
|
56
|
+
q as controlWidth,
|
|
57
|
+
F as controlWidthPair
|
|
155
58
|
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type FieldProps } from "./field";
|
|
2
|
+
import type { SelectOption } from "./options";
|
|
3
|
+
declare const _default: <Value extends string | number = number, Multiple extends boolean = false>(__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<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
readonly "onUpdate:modelValue"?: ((value: Multiple extends true ? Value[] : Value | null) => any) | undefined;
|
|
6
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onUpdate:modelValue"> & (FieldProps & {
|
|
7
|
+
/** The level of the items, from 1. */
|
|
8
|
+
level: number;
|
|
9
|
+
/** The id of the item the choices are children of; required below level 1. `null`: not chosen yet. */
|
|
10
|
+
parent?: number | null;
|
|
11
|
+
/** What a choice saves: `"id"` or the name of a described column. */
|
|
12
|
+
value?: string;
|
|
13
|
+
/** The language of the labels; default the first language the project lists. */
|
|
14
|
+
lang?: string;
|
|
15
|
+
/** Several choices: the model is a list. */
|
|
16
|
+
multiple?: Multiple;
|
|
17
|
+
/** Offers the search box (from the first option). */
|
|
18
|
+
searchable?: boolean;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
/** The chosen options, when the caller has them (a saved record's labels): how an inactive item is named. */
|
|
21
|
+
selected?: SelectOption<Value> | readonly SelectOption<Value>[] | null;
|
|
22
|
+
} & {
|
|
23
|
+
/** One value (`null` for none), or with `multiple` a list of them: the type follows `multiple`, so `form.bind()` fits either. */
|
|
24
|
+
modelValue?: Multiple extends true ? Value[] : Value | null;
|
|
25
|
+
}) & Partial<{}>> & import("vue").PublicProps;
|
|
26
|
+
expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
|
|
27
|
+
attrs: any;
|
|
28
|
+
slots: {};
|
|
29
|
+
emit: (evt: "update:modelValue", value: Multiple extends true ? Value[] : Value | null) => void;
|
|
30
|
+
}>) => import("vue").VNode & {
|
|
31
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
34
|
+
type __VLS_PrettifyLocal<T> = {
|
|
35
|
+
[K in keyof T]: T[K];
|
|
36
|
+
} & {};
|
package/dist/form/index.d.ts
CHANGED
|
@@ -96,3 +96,4 @@ export type { LocaleMode } from "./dynamic/localeMode";
|
|
|
96
96
|
export { thumbnailUrl } from "./dynamic/resources";
|
|
97
97
|
export type { ResourceId, ResourceItem, ResourcePage, ResourceQuery, ResourceSource } from "./dynamic/resources";
|
|
98
98
|
export type { FieldKind, FieldRule, FormSchema, SchemaField, SelectChoice, VisibilityCondition, VisibilityRule } from "./dynamic/schema";
|
|
99
|
+
export { default as CharacteristicField } from "./CharacteristicField.vue";
|