@knime/kds-components 13.2.0 → 13.4.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 +24 -0
- package/dist/index.css +96 -117
- package/dist/index.js +295 -215
- package/dist/index.js.map +1 -1
- package/dist/src/components/forms/RadioButton/KdsRadioButtonGroup.vue.d.ts.map +1 -1
- package/dist/src/components/forms/RadioButton/types.d.ts +2 -1
- package/dist/src/components/forms/RadioButton/types.d.ts.map +1 -1
- package/dist/src/components/forms/inputs/BaseInput.vue.d.ts +2 -1
- package/dist/src/components/forms/inputs/BaseInput.vue.d.ts.map +1 -1
- package/dist/src/components/forms/inputs/PasswordInput/KdsPasswordInput.vue.d.ts +13 -0
- package/dist/src/components/forms/inputs/PasswordInput/KdsPasswordInput.vue.d.ts.map +1 -1
- package/dist/src/components/forms/inputs/PasswordInput/types.d.ts +2 -1
- package/dist/src/components/forms/inputs/PasswordInput/types.d.ts.map +1 -1
- package/dist/src/components/forms/inputs/TextInput/KdsTextInput.vue.d.ts +4 -4
- package/dist/src/components/forms/inputs/TextInput/KdsTextInput.vue.d.ts.map +1 -1
- package/dist/src/components/forms/inputs/TextInput/types.d.ts +2 -1
- package/dist/src/components/forms/inputs/TextInput/types.d.ts.map +1 -1
- package/dist/src/components/forms/selects/Dropdown/BaseDropdown.vue.d.ts.map +1 -1
- package/dist/src/components/forms/selects/Dropdown/KdsDropdown.vue.d.ts +4 -4
- package/dist/src/components/forms/selects/Dropdown/KdsDropdown.vue.d.ts.map +1 -1
- package/dist/src/components/forms/selects/Dropdown/types.d.ts +3 -3
- package/dist/src/components/forms/selects/Dropdown/types.d.ts.map +1 -1
- package/dist/src/components/forms/types.d.ts +6 -0
- package/dist/src/components/forms/types.d.ts.map +1 -1
- package/dist/src/layouts/explorer/FileExplorer/FileExplorerItem.vue.d.ts +0 -13
- package/dist/src/layouts/explorer/FileExplorer/FileExplorerItem.vue.d.ts.map +1 -1
- package/dist/src/layouts/explorer/FileExplorer/FileExplorerItemBase.vue.d.ts.map +1 -1
- package/dist/src/layouts/explorer/FileExplorer/FileExplorerRenameModal.vue.d.ts +11 -0
- package/dist/src/layouts/explorer/FileExplorer/FileExplorerRenameModal.vue.d.ts.map +1 -0
- package/dist/src/layouts/explorer/FileExplorer/KdsFileExplorer.vue.d.ts +2 -8
- package/dist/src/layouts/explorer/FileExplorer/KdsFileExplorer.vue.d.ts.map +1 -1
- package/dist/src/layouts/explorer/FileExplorer/index.d.ts +1 -1
- package/dist/src/layouts/explorer/FileExplorer/index.d.ts.map +1 -1
- package/dist/src/layouts/explorer/FileExplorer/types.d.ts +19 -4
- package/dist/src/layouts/explorer/FileExplorer/types.d.ts.map +1 -1
- package/dist/src/layouts/overlays/Modal/KdsModal.vue.d.ts +5 -0
- package/dist/src/layouts/overlays/Modal/KdsModal.vue.d.ts.map +1 -1
- package/dist/src/layouts/overlays/Modal/KdsModalLayout.vue.d.ts.map +1 -1
- package/dist/src/layouts/overlays/Modal/types.d.ts +7 -1
- package/dist/src/layouts/overlays/Modal/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -3761,7 +3761,7 @@ kdsModalHeight.AUTO, kdsModalWidth.MEDIUM, kdsModalClosedBy.CLOSEREQUEST, { ...k
|
|
|
3761
3761
|
//#endregion
|
|
3762
3762
|
//#region src/layouts/overlays/Modal/KdsModalLayout.vue?vue&type=script&setup=true&lang.ts
|
|
3763
3763
|
var _hoisted_1$86 = { class: "modal-header" };
|
|
3764
|
-
var _hoisted_2$54 =
|
|
3764
|
+
var _hoisted_2$54 = ["id"];
|
|
3765
3765
|
var _hoisted_3$39 = ["data-variant"];
|
|
3766
3766
|
var _hoisted_4$33 = {
|
|
3767
3767
|
key: 0,
|
|
@@ -3777,10 +3777,11 @@ var KdsModalLayout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
3777
3777
|
variant: { default: () => kdsModalVariant.PADDED },
|
|
3778
3778
|
leadingIcon: {},
|
|
3779
3779
|
overflow: { default: "auto" },
|
|
3780
|
-
onClose: { type: Function }
|
|
3780
|
+
onClose: { type: Function },
|
|
3781
|
+
headlineId: {}
|
|
3781
3782
|
},
|
|
3782
3783
|
setup(__props) {
|
|
3783
|
-
useCssVars((_ctx) => ({ "
|
|
3784
|
+
useCssVars((_ctx) => ({ "v615a361c": _ctx.overflow }));
|
|
3784
3785
|
const props = createPropsRestProxy(__props, [
|
|
3785
3786
|
"headline",
|
|
3786
3787
|
"variant",
|
|
@@ -3794,7 +3795,10 @@ var KdsModalLayout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
3794
3795
|
name: props.leadingIcon,
|
|
3795
3796
|
size: "medium"
|
|
3796
3797
|
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
3797
|
-
createElementVNode("div",
|
|
3798
|
+
createElementVNode("div", {
|
|
3799
|
+
id: props.headlineId,
|
|
3800
|
+
class: "modal-header-headline"
|
|
3801
|
+
}, toDisplayString(__props.headline), 9, _hoisted_2$54),
|
|
3798
3802
|
createVNode(KdsButton_default, {
|
|
3799
3803
|
"leading-icon": "x-close",
|
|
3800
3804
|
variant: "transparent",
|
|
@@ -3812,10 +3816,10 @@ var KdsModalLayout_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
3812
3816
|
], 64);
|
|
3813
3817
|
};
|
|
3814
3818
|
}
|
|
3815
|
-
}), [["__scopeId", "data-v-
|
|
3819
|
+
}), [["__scopeId", "data-v-7011f6c4"]]);
|
|
3816
3820
|
//#endregion
|
|
3817
3821
|
//#region src/layouts/overlays/Modal/KdsModal.vue?vue&type=script&setup=true&lang.ts
|
|
3818
|
-
var _hoisted_1$85 = ["closedby"];
|
|
3822
|
+
var _hoisted_1$85 = ["closedby", "aria-labelledby"];
|
|
3819
3823
|
//#endregion
|
|
3820
3824
|
//#region src/layouts/overlays/Modal/KdsModal.vue
|
|
3821
3825
|
var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -3835,8 +3839,9 @@ var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
3835
3839
|
},
|
|
3836
3840
|
emits: ["close", "closed"],
|
|
3837
3841
|
setup(__props, { emit: __emit }) {
|
|
3838
|
-
useCssVars((_ctx) => ({ "
|
|
3842
|
+
useCssVars((_ctx) => ({ "v9f67ccd8": _ctx.overflow }));
|
|
3839
3843
|
const emit = __emit;
|
|
3844
|
+
const headlineId = useId();
|
|
3840
3845
|
const dialog = useTemplateRef("dialogElement");
|
|
3841
3846
|
const onClose = (event) => {
|
|
3842
3847
|
emit("close", event);
|
|
@@ -3878,15 +3883,18 @@ var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
3878
3883
|
`overflow-${__props.overflow}`
|
|
3879
3884
|
]),
|
|
3880
3885
|
closedby: __props.closedby,
|
|
3886
|
+
"aria-labelledby": __props.headline ? unref(headlineId) : void 0,
|
|
3881
3887
|
onCancel: withModifiers(onClose, ["prevent"])
|
|
3882
3888
|
}, [renderSlot(_ctx.$slots, "default", {
|
|
3883
3889
|
headline: __props.headline,
|
|
3890
|
+
headlineId: unref(headlineId),
|
|
3884
3891
|
leadingIcon: __props.leadingIcon,
|
|
3885
3892
|
variant: __props.variant,
|
|
3886
3893
|
overflow: __props.overflow,
|
|
3887
3894
|
onClose
|
|
3888
3895
|
}, () => [createVNode(KdsModalLayout_default, {
|
|
3889
3896
|
headline: __props.headline,
|
|
3897
|
+
"headline-id": unref(headlineId),
|
|
3890
3898
|
"leading-icon": __props.leadingIcon,
|
|
3891
3899
|
variant: __props.variant,
|
|
3892
3900
|
overflow: __props.overflow,
|
|
@@ -3897,13 +3905,14 @@ var KdsModal_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
3897
3905
|
_: 3
|
|
3898
3906
|
}, 8, [
|
|
3899
3907
|
"headline",
|
|
3908
|
+
"headline-id",
|
|
3900
3909
|
"leading-icon",
|
|
3901
3910
|
"variant",
|
|
3902
3911
|
"overflow"
|
|
3903
3912
|
])], true)], 42, _hoisted_1$85)) : createCommentVNode("", true);
|
|
3904
3913
|
};
|
|
3905
3914
|
}
|
|
3906
|
-
}), [["__scopeId", "data-v-
|
|
3915
|
+
}), [["__scopeId", "data-v-e325810b"]]);
|
|
3907
3916
|
//#endregion
|
|
3908
3917
|
//#region src/components/accessories/LoadingSpinner/KdsLoadingSpinner.vue?vue&type=script&setup=true&lang.ts
|
|
3909
3918
|
var _hoisted_1$84 = ["data-style"];
|
|
@@ -4014,7 +4023,7 @@ var _hoisted_3$38 = {
|
|
|
4014
4023
|
};
|
|
4015
4024
|
var _hoisted_4$32 = { class: "label" };
|
|
4016
4025
|
var _hoisted_5$18 = ["id"];
|
|
4017
|
-
var _hoisted_6$
|
|
4026
|
+
var _hoisted_6$11 = {
|
|
4018
4027
|
key: 0,
|
|
4019
4028
|
class: "subtext-wrapper"
|
|
4020
4029
|
};
|
|
@@ -4093,7 +4102,7 @@ var BaseCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
4093
4102
|
key: 0,
|
|
4094
4103
|
id: unref(helperId),
|
|
4095
4104
|
class: "helper-text"
|
|
4096
|
-
}, toDisplayString(props.helperText), 9, _hoisted_5$18)) : createCommentVNode("", true)])) : createCommentVNode("", true)], 10, _hoisted_1$82)), [[unref(vKdsTooltip), props.tooltip]]), props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
4105
|
+
}, toDisplayString(props.helperText), 9, _hoisted_5$18)) : createCommentVNode("", true)])) : createCommentVNode("", true)], 10, _hoisted_1$82)), [[unref(vKdsTooltip), props.tooltip]]), props.subText || props.preserveSubTextSpace ? (openBlock(), createElementBlock("div", _hoisted_6$11, [createVNode(KdsSubText_default, {
|
|
4097
4106
|
id: unref(descriptionId),
|
|
4098
4107
|
"sub-text": props.subText,
|
|
4099
4108
|
"preserve-sub-text-space": props.preserveSubTextSpace,
|
|
@@ -10920,7 +10929,7 @@ var _hoisted_2$49 = ["data-text"];
|
|
|
10920
10929
|
var _hoisted_3$35 = { class: "text" };
|
|
10921
10930
|
var _hoisted_4$31 = ["data-text"];
|
|
10922
10931
|
var _hoisted_5$17 = { class: "text" };
|
|
10923
|
-
var _hoisted_6$
|
|
10932
|
+
var _hoisted_6$10 = {
|
|
10924
10933
|
key: 1,
|
|
10925
10934
|
class: "error-description"
|
|
10926
10935
|
};
|
|
@@ -11004,7 +11013,7 @@ var KdsChip_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
11004
11013
|
"disabled",
|
|
11005
11014
|
"class"
|
|
11006
11015
|
])), [[unref(vKdsTooltip), errorTooltip.value]]),
|
|
11007
|
-
errorTooltip.value ? (openBlock(), createElementBlock("span", _hoisted_6$
|
|
11016
|
+
errorTooltip.value ? (openBlock(), createElementBlock("span", _hoisted_6$10, toDisplayString(errorTooltip.value), 1)) : createCommentVNode("", true),
|
|
11008
11017
|
__props.removable ? withDirectives((openBlock(), createElementBlock("button", {
|
|
11009
11018
|
key: 2,
|
|
11010
11019
|
type: "button",
|
|
@@ -11615,7 +11624,7 @@ var _hoisted_5$16 = {
|
|
|
11615
11624
|
key: 0,
|
|
11616
11625
|
class: "prefix"
|
|
11617
11626
|
};
|
|
11618
|
-
var _hoisted_6$
|
|
11627
|
+
var _hoisted_6$9 = {
|
|
11619
11628
|
key: 0,
|
|
11620
11629
|
class: "subtext"
|
|
11621
11630
|
};
|
|
@@ -11731,7 +11740,7 @@ var KdsListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
11731
11740
|
unref(vKdsTooltip),
|
|
11732
11741
|
props.text,
|
|
11733
11742
|
"truncated"
|
|
11734
|
-
]]), props.subText ? withDirectives((openBlock(), createElementBlock("span", _hoisted_6$
|
|
11743
|
+
]]), props.subText ? withDirectives((openBlock(), createElementBlock("span", _hoisted_6$9, [createTextVNode(toDisplayString(props.subText), 1)])), [[
|
|
11735
11744
|
unref(vKdsTooltip),
|
|
11736
11745
|
props.subText,
|
|
11737
11746
|
"truncated"
|
|
@@ -13436,6 +13445,7 @@ var _hoisted_3$31 = [
|
|
|
13436
13445
|
"placeholder",
|
|
13437
13446
|
"disabled",
|
|
13438
13447
|
"autocomplete",
|
|
13448
|
+
"autofocus",
|
|
13439
13449
|
"min",
|
|
13440
13450
|
"maxlength",
|
|
13441
13451
|
"max",
|
|
@@ -13461,7 +13471,7 @@ var _hoisted_5$15 = {
|
|
|
13461
13471
|
key: 4,
|
|
13462
13472
|
class: "trailing-slot"
|
|
13463
13473
|
};
|
|
13464
|
-
var _hoisted_6$
|
|
13474
|
+
var _hoisted_6$8 = {
|
|
13465
13475
|
key: 5,
|
|
13466
13476
|
class: "icon-wrapper trailing"
|
|
13467
13477
|
};
|
|
@@ -13515,7 +13525,8 @@ var BaseInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
13515
13525
|
default: false
|
|
13516
13526
|
},
|
|
13517
13527
|
pattern: {},
|
|
13518
|
-
segments: { default: () => void 0 }
|
|
13528
|
+
segments: { default: () => void 0 },
|
|
13529
|
+
autofocus: { type: Boolean }
|
|
13519
13530
|
}, {
|
|
13520
13531
|
"modelValue": { default: "" },
|
|
13521
13532
|
"modelModifiers": {}
|
|
@@ -13633,6 +13644,7 @@ focus: focusInput });
|
|
|
13633
13644
|
placeholder: props.placeholder,
|
|
13634
13645
|
disabled: __props.disabled,
|
|
13635
13646
|
autocomplete: props.autocomplete,
|
|
13647
|
+
autofocus: props.autofocus,
|
|
13636
13648
|
min: props.min,
|
|
13637
13649
|
maxlength: props.maxlength,
|
|
13638
13650
|
max: props.max,
|
|
@@ -13688,11 +13700,11 @@ focus: focusInput });
|
|
|
13688
13700
|
onClick: withModifiers(clearAndFocusInput, ["stop"])
|
|
13689
13701
|
})) : createCommentVNode("", true),
|
|
13690
13702
|
_ctx.$slots.trailing ? (openBlock(), createElementBlock("div", _hoisted_5$15, [renderSlot(_ctx.$slots, "trailing", {}, void 0, true)])) : createCommentVNode("", true),
|
|
13691
|
-
props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
13703
|
+
props.trailingIcon ? (openBlock(), createElementBlock("div", _hoisted_6$8, [createVNode(KdsIcon_default, { name: props.trailingIcon }, null, 8, ["name"])])) : createCommentVNode("", true)
|
|
13692
13704
|
], 2);
|
|
13693
13705
|
};
|
|
13694
13706
|
}
|
|
13695
|
-
}), [["__scopeId", "data-v-
|
|
13707
|
+
}), [["__scopeId", "data-v-7db4b084"]]);
|
|
13696
13708
|
//#endregion
|
|
13697
13709
|
//#region src/components/forms/selects/Dropdown/filterOptions.ts
|
|
13698
13710
|
/**
|
|
@@ -15639,7 +15651,7 @@ var _hoisted_3$22 = {
|
|
|
15639
15651
|
};
|
|
15640
15652
|
var _hoisted_4$20 = { class: "content" };
|
|
15641
15653
|
var _hoisted_5$12 = { class: "label" };
|
|
15642
|
-
var _hoisted_6$
|
|
15654
|
+
var _hoisted_6$7 = ["id"];
|
|
15643
15655
|
//#endregion
|
|
15644
15656
|
//#region src/components/forms/RadioButton/KdsRadioButton.vue
|
|
15645
15657
|
var KdsRadioButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -15695,7 +15707,7 @@ var KdsRadioButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
15695
15707
|
key: 0,
|
|
15696
15708
|
id: `${unref(id)}-helper`,
|
|
15697
15709
|
class: "helper-text"
|
|
15698
|
-
}, toDisplayString(props.helperText), 9, _hoisted_6$
|
|
15710
|
+
}, toDisplayString(props.helperText), 9, _hoisted_6$7)) : createCommentVNode("", true)])], 10, _hoisted_1$50);
|
|
15699
15711
|
};
|
|
15700
15712
|
}
|
|
15701
15713
|
}), [["__scopeId", "data-v-fdb5a895"]]);
|
|
@@ -15819,7 +15831,8 @@ var KdsRadioButtonGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
15819
15831
|
default: false
|
|
15820
15832
|
},
|
|
15821
15833
|
subText: {},
|
|
15822
|
-
preserveSubTextSpace: { type: Boolean }
|
|
15834
|
+
preserveSubTextSpace: { type: Boolean },
|
|
15835
|
+
autofocus: { type: Boolean }
|
|
15823
15836
|
}, {
|
|
15824
15837
|
"modelValue": {},
|
|
15825
15838
|
"modelModifiers": {}
|
|
@@ -15871,6 +15884,7 @@ var KdsRadioButtonGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
15871
15884
|
text: option.text,
|
|
15872
15885
|
"model-value": modelValue.value === option.id,
|
|
15873
15886
|
tabindex: unref(tabIndexForOption)(index),
|
|
15887
|
+
autofocus: props.autofocus && unref(tabIndexForOption)(index) === 0,
|
|
15874
15888
|
name: unref(groupName),
|
|
15875
15889
|
onKeydown: (e) => unref(handleKeyDown)(e, index),
|
|
15876
15890
|
"onUpdate:modelValue": () => unref(handleClick)(index)
|
|
@@ -15881,6 +15895,7 @@ var KdsRadioButtonGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
15881
15895
|
"text",
|
|
15882
15896
|
"model-value",
|
|
15883
15897
|
"tabindex",
|
|
15898
|
+
"autofocus",
|
|
15884
15899
|
"name",
|
|
15885
15900
|
"onKeydown",
|
|
15886
15901
|
"onUpdate:modelValue"
|
|
@@ -15896,7 +15911,7 @@ var KdsRadioButtonGroup_default = /*#__PURE__*/ _plugin_vue_export_helper_defaul
|
|
|
15896
15911
|
]);
|
|
15897
15912
|
};
|
|
15898
15913
|
}
|
|
15899
|
-
}), [["__scopeId", "data-v-
|
|
15914
|
+
}), [["__scopeId", "data-v-074b4770"]]);
|
|
15900
15915
|
//#endregion
|
|
15901
15916
|
//#region src/components/forms/RadioButton/ValueSwitchItem.vue?vue&type=script&setup=true&lang.ts
|
|
15902
15917
|
var _hoisted_1$49 = [
|
|
@@ -16604,6 +16619,7 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
16604
16619
|
},
|
|
16605
16620
|
autocomplete: {},
|
|
16606
16621
|
maxlength: {},
|
|
16622
|
+
autofocus: { type: Boolean },
|
|
16607
16623
|
suggestions: {},
|
|
16608
16624
|
suggestionsHeadline: {}
|
|
16609
16625
|
}, {
|
|
@@ -16699,6 +16715,7 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
16699
16715
|
maxlength: props.maxlength,
|
|
16700
16716
|
error: __props.error,
|
|
16701
16717
|
autocomplete: hasSuggestions.value ? "off" : props.autocomplete,
|
|
16718
|
+
autofocus: props.autofocus,
|
|
16702
16719
|
role: hasSuggestions.value ? "combobox" : void 0,
|
|
16703
16720
|
"aria-haspopup": hasSuggestions.value ? "listbox" : void 0,
|
|
16704
16721
|
"aria-expanded": hasSuggestions.value ? popoverOpen.value : void 0,
|
|
@@ -16715,6 +16732,7 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
16715
16732
|
"maxlength",
|
|
16716
16733
|
"error",
|
|
16717
16734
|
"autocomplete",
|
|
16735
|
+
"autofocus",
|
|
16718
16736
|
"role",
|
|
16719
16737
|
"aria-haspopup",
|
|
16720
16738
|
"aria-expanded",
|
|
@@ -16756,7 +16774,7 @@ var KdsTextInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
16756
16774
|
]);
|
|
16757
16775
|
};
|
|
16758
16776
|
}
|
|
16759
|
-
}), [["__scopeId", "data-v-
|
|
16777
|
+
}), [["__scopeId", "data-v-20d4bafb"]]);
|
|
16760
16778
|
//#endregion
|
|
16761
16779
|
//#region src/components/forms/inputs/ColorInput/colorUtils.ts
|
|
16762
16780
|
var HEX_RADIX = 16;
|
|
@@ -17379,6 +17397,9 @@ var KdsColorInput_default = /* @__PURE__ */ defineComponent({
|
|
|
17379
17397
|
}
|
|
17380
17398
|
});
|
|
17381
17399
|
//#endregion
|
|
17400
|
+
//#region src/components/forms/inputs/PasswordInput/KdsPasswordInput.vue?vue&type=script&setup=true&lang.ts
|
|
17401
|
+
var STORED_VALUE_PLACEHOLDER = "••••••••••";
|
|
17402
|
+
//#endregion
|
|
17382
17403
|
//#region src/components/forms/inputs/PasswordInput/KdsPasswordInput.vue
|
|
17383
17404
|
var KdsPasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
17384
17405
|
__name: "KdsPasswordInput",
|
|
@@ -17415,9 +17436,14 @@ var KdsPasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
|
17415
17436
|
autocomplete: {}
|
|
17416
17437
|
}, {
|
|
17417
17438
|
"modelValue": { default: "" },
|
|
17418
|
-
"modelModifiers": {}
|
|
17439
|
+
"modelModifiers": {},
|
|
17440
|
+
"hasStoredValue": {
|
|
17441
|
+
type: Boolean,
|
|
17442
|
+
default: false
|
|
17443
|
+
},
|
|
17444
|
+
"hasStoredValueModifiers": {}
|
|
17419
17445
|
}),
|
|
17420
|
-
emits: ["update:modelValue"],
|
|
17446
|
+
emits: ["update:modelValue", "update:hasStoredValue"],
|
|
17421
17447
|
setup(__props, { expose: __expose }) {
|
|
17422
17448
|
const props = createPropsRestProxy(__props, [
|
|
17423
17449
|
"disabled",
|
|
@@ -17429,12 +17455,44 @@ var KdsPasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
|
17429
17455
|
]);
|
|
17430
17456
|
/** The current password value. */
|
|
17431
17457
|
const modelValue = useModel(__props, "modelValue");
|
|
17458
|
+
/**
|
|
17459
|
+
* Whether a previously stored value exists that is not transmitted to the
|
|
17460
|
+
* frontend. It's automatically set to `false` once the user starts typing a
|
|
17461
|
+
* new value and back to `true` when they reset to the stored one.
|
|
17462
|
+
*
|
|
17463
|
+
* The reset button stays available until this is `true` again. To discard a
|
|
17464
|
+
* replaced stored value without offering the reset (e.g. when switching to a
|
|
17465
|
+
* different entity), set it to `true` before setting it to `false`, or
|
|
17466
|
+
* re-mount the component.
|
|
17467
|
+
*/
|
|
17468
|
+
const hasStoredValue = useModel(__props, "hasStoredValue");
|
|
17432
17469
|
const showValue = ref(false);
|
|
17433
|
-
const
|
|
17470
|
+
const isPressingTrailingButton = ref(false);
|
|
17471
|
+
const hasReplacedStoredValue = ref(false);
|
|
17434
17472
|
const input = useTemplateRef("input");
|
|
17435
17473
|
const effectiveToggleLabel = computed(() => props.toggleLabel ?? (__props.variant === "key" ? "Key" : "Password"));
|
|
17474
|
+
const showsStoredValue = computed(() => hasStoredValue.value && modelValue.value === "");
|
|
17475
|
+
const effectivePlaceholder = computed(() => showsStoredValue.value ? STORED_VALUE_PLACEHOLDER : props.placeholder);
|
|
17476
|
+
const canRestoreStoredValue = computed(() => hasReplacedStoredValue.value && !hasStoredValue.value);
|
|
17477
|
+
watch(hasStoredValue, (stored) => {
|
|
17478
|
+
if (stored) showValue.value = false;
|
|
17479
|
+
});
|
|
17480
|
+
const onUpdateModelValue = (value) => {
|
|
17481
|
+
if (hasStoredValue.value && value !== "") {
|
|
17482
|
+
hasStoredValue.value = false;
|
|
17483
|
+
hasReplacedStoredValue.value = true;
|
|
17484
|
+
}
|
|
17485
|
+
modelValue.value = value;
|
|
17486
|
+
};
|
|
17487
|
+
const restoreStoredValue = () => {
|
|
17488
|
+
isPressingTrailingButton.value = false;
|
|
17489
|
+
modelValue.value = "";
|
|
17490
|
+
hasStoredValue.value = true;
|
|
17491
|
+
hasReplacedStoredValue.value = false;
|
|
17492
|
+
input.value?.focus();
|
|
17493
|
+
};
|
|
17436
17494
|
const handleBlur = () => {
|
|
17437
|
-
if (
|
|
17495
|
+
if (isPressingTrailingButton.value) input.value?.focus();
|
|
17438
17496
|
};
|
|
17439
17497
|
__expose({ focus: (options) => input.value?.focus(options) });
|
|
17440
17498
|
return (_ctx, _cache) => {
|
|
@@ -17447,31 +17505,44 @@ var KdsPasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
|
17447
17505
|
ref_key: "input",
|
|
17448
17506
|
ref: input
|
|
17449
17507
|
}, slotProps, {
|
|
17450
|
-
|
|
17451
|
-
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => modelValue.value = $event),
|
|
17508
|
+
"model-value": modelValue.value,
|
|
17452
17509
|
type: showValue.value && __props.showVisibilityToggle ? "text" : "password",
|
|
17453
17510
|
"leading-icon": __props.variant === "key" ? "key" : "lock",
|
|
17454
|
-
placeholder:
|
|
17511
|
+
placeholder: effectivePlaceholder.value,
|
|
17455
17512
|
disabled: __props.disabled,
|
|
17456
17513
|
error: __props.error,
|
|
17457
17514
|
autocomplete: props.autocomplete,
|
|
17458
17515
|
maxlength: props.maxlength,
|
|
17516
|
+
"onUpdate:modelValue": onUpdateModelValue,
|
|
17459
17517
|
onBlur: handleBlur
|
|
17460
17518
|
}), {
|
|
17461
|
-
trailing: withCtx(() => [__props.
|
|
17519
|
+
trailing: withCtx(() => [canRestoreStoredValue.value && !__props.disabled ? (openBlock(), createBlock(KdsButton_default, {
|
|
17462
17520
|
key: 0,
|
|
17521
|
+
variant: "outlined",
|
|
17522
|
+
size: "xsmall",
|
|
17523
|
+
"leading-icon": "undo",
|
|
17524
|
+
ariaLabel: `Reset ${effectiveToggleLabel.value}`,
|
|
17525
|
+
tooltip: `Reset ${effectiveToggleLabel.value}`,
|
|
17526
|
+
onPointerdown: _cache[0] || (_cache[0] = ($event) => isPressingTrailingButton.value = true),
|
|
17527
|
+
onPointerup: _cache[1] || (_cache[1] = ($event) => isPressingTrailingButton.value = false),
|
|
17528
|
+
onPointerleave: _cache[2] || (_cache[2] = ($event) => isPressingTrailingButton.value = false),
|
|
17529
|
+
onPointercancel: _cache[3] || (_cache[3] = ($event) => isPressingTrailingButton.value = false),
|
|
17530
|
+
onClick: withModifiers(restoreStoredValue, ["stop"])
|
|
17531
|
+
}, null, 8, ["ariaLabel", "tooltip"])) : createCommentVNode("", true), __props.showVisibilityToggle && !showsStoredValue.value ? (openBlock(), createBlock(KdsToggleButton_default, {
|
|
17532
|
+
key: 1,
|
|
17463
17533
|
modelValue: showValue.value,
|
|
17464
|
-
"onUpdate:modelValue": _cache[
|
|
17534
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => showValue.value = $event),
|
|
17465
17535
|
variant: "outlined",
|
|
17466
17536
|
size: "xsmall",
|
|
17467
17537
|
"leading-icon": "eye",
|
|
17468
17538
|
ariaLabel: showValue.value ? `Hide ${effectiveToggleLabel.value}` : `Show ${effectiveToggleLabel.value}`,
|
|
17469
17539
|
tooltip: showValue.value ? `Hide ${effectiveToggleLabel.value}` : `Show ${effectiveToggleLabel.value}`,
|
|
17470
17540
|
disabled: __props.disabled,
|
|
17471
|
-
onPointerdown: _cache[
|
|
17472
|
-
onPointerup: _cache[
|
|
17473
|
-
|
|
17474
|
-
|
|
17541
|
+
onPointerdown: _cache[5] || (_cache[5] = ($event) => isPressingTrailingButton.value = true),
|
|
17542
|
+
onPointerup: _cache[6] || (_cache[6] = ($event) => isPressingTrailingButton.value = false),
|
|
17543
|
+
onPointerleave: _cache[7] || (_cache[7] = ($event) => isPressingTrailingButton.value = false),
|
|
17544
|
+
onPointercancel: _cache[8] || (_cache[8] = ($event) => isPressingTrailingButton.value = false),
|
|
17545
|
+
onClick: _cache[9] || (_cache[9] = ($event) => isPressingTrailingButton.value = false)
|
|
17475
17546
|
}, null, 8, [
|
|
17476
17547
|
"modelValue",
|
|
17477
17548
|
"ariaLabel",
|
|
@@ -17480,7 +17551,7 @@ var KdsPasswordInput_default = /* @__PURE__ */ defineComponent({
|
|
|
17480
17551
|
])) : createCommentVNode("", true)]),
|
|
17481
17552
|
_: 1
|
|
17482
17553
|
}, 16, [
|
|
17483
|
-
"
|
|
17554
|
+
"model-value",
|
|
17484
17555
|
"type",
|
|
17485
17556
|
"leading-icon",
|
|
17486
17557
|
"placeholder",
|
|
@@ -21786,7 +21857,7 @@ var _hoisted_4$18 = {
|
|
|
21786
21857
|
"aria-live": "polite"
|
|
21787
21858
|
};
|
|
21788
21859
|
var _hoisted_5$11 = { class: "kds-date-picker-nav-block" };
|
|
21789
|
-
var _hoisted_6$
|
|
21860
|
+
var _hoisted_6$6 = { class: "kds-date-picker-body" };
|
|
21790
21861
|
var MONTHS_PER_YEAR = 12;
|
|
21791
21862
|
var YEAR_PAGE_SIZE = 15;
|
|
21792
21863
|
var REFERENCE_YEAR = 2024;
|
|
@@ -21981,7 +22052,7 @@ var KdsDatePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
21981
22052
|
disabled: nextYearDisabled.value,
|
|
21982
22053
|
onClick: onNextYear
|
|
21983
22054
|
}, null, 8, ["disabled"])) : createCommentVNode("", true)])
|
|
21984
|
-
]), createElementVNode("div", _hoisted_6$
|
|
22055
|
+
]), createElementVNode("div", _hoisted_6$6, [view.value === "day" ? (openBlock(), createBlock(DatePickerDayGrid_default, {
|
|
21985
22056
|
key: 0,
|
|
21986
22057
|
ref_key: "dayGridRef",
|
|
21987
22058
|
ref: dayGridRef,
|
|
@@ -23094,7 +23165,7 @@ var _hoisted_5$10 = {
|
|
|
23094
23165
|
key: 1,
|
|
23095
23166
|
class: "kds-time-picker-actions"
|
|
23096
23167
|
};
|
|
23097
|
-
var _hoisted_6$
|
|
23168
|
+
var _hoisted_6$5 = {
|
|
23098
23169
|
key: 2,
|
|
23099
23170
|
class: "kds-time-picker-actions"
|
|
23100
23171
|
};
|
|
@@ -23234,7 +23305,7 @@ var TimePicker_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
23234
23305
|
"leading-icon": "plus",
|
|
23235
23306
|
label: "Add milliseconds",
|
|
23236
23307
|
onClick: addMilliseconds
|
|
23237
|
-
})])) : createCommentVNode("", true)], 64)) : __props.maxGranularity !== "minute" ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
23308
|
+
})])) : createCommentVNode("", true)], 64)) : __props.maxGranularity !== "minute" ? (openBlock(), createElementBlock("div", _hoisted_6$5, [createVNode(KdsButton_default, {
|
|
23238
23309
|
variant: "outlined",
|
|
23239
23310
|
size: "small",
|
|
23240
23311
|
"leading-icon": "plus",
|
|
@@ -24296,6 +24367,7 @@ var _hoisted_1$35 = [
|
|
|
24296
24367
|
"aria-label",
|
|
24297
24368
|
"aria-invalid",
|
|
24298
24369
|
"aria-controls",
|
|
24370
|
+
"autofocus",
|
|
24299
24371
|
"disabled"
|
|
24300
24372
|
];
|
|
24301
24373
|
var _hoisted_2$22 = {
|
|
@@ -24337,7 +24409,8 @@ var BaseDropdown_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
24337
24409
|
type: Boolean,
|
|
24338
24410
|
default: () => void 0
|
|
24339
24411
|
},
|
|
24340
|
-
popoverId: {}
|
|
24412
|
+
popoverId: {},
|
|
24413
|
+
autofocus: { type: Boolean }
|
|
24341
24414
|
}, {
|
|
24342
24415
|
"open": {
|
|
24343
24416
|
type: Boolean,
|
|
@@ -24395,6 +24468,7 @@ focus: () => triggerEl.value?.focus() });
|
|
|
24395
24468
|
"aria-label": effectiveAriaLabel.value,
|
|
24396
24469
|
"aria-invalid": __props.ariaInvalid,
|
|
24397
24470
|
"aria-controls": props.popoverId,
|
|
24471
|
+
autofocus: props.autofocus,
|
|
24398
24472
|
"aria-haspopup": "dialog",
|
|
24399
24473
|
disabled: __props.disabled,
|
|
24400
24474
|
onClick: _cache[0] || (_cache[0] = ($event) => !__props.disabled && emit("click")),
|
|
@@ -24418,7 +24492,7 @@ focus: () => triggerEl.value?.focus() });
|
|
|
24418
24492
|
], 42, _hoisted_1$35);
|
|
24419
24493
|
};
|
|
24420
24494
|
}
|
|
24421
|
-
}), [["__scopeId", "data-v-
|
|
24495
|
+
}), [["__scopeId", "data-v-b0a01bc2"]]);
|
|
24422
24496
|
//#endregion
|
|
24423
24497
|
//#region src/components/forms/selects/Dropdown/KdsDropdown.vue
|
|
24424
24498
|
var KdsDropdown_default = /* @__PURE__ */ defineComponent({
|
|
@@ -24450,7 +24524,8 @@ var KdsDropdown_default = /* @__PURE__ */ defineComponent({
|
|
|
24450
24524
|
preserveSubTextSpace: {
|
|
24451
24525
|
type: Boolean,
|
|
24452
24526
|
default: false
|
|
24453
|
-
}
|
|
24527
|
+
},
|
|
24528
|
+
autofocus: { type: Boolean }
|
|
24454
24529
|
}, {
|
|
24455
24530
|
"modelValue": { default: "" },
|
|
24456
24531
|
"modelModifiers": {}
|
|
@@ -24515,6 +24590,7 @@ focus: () => baseDropdownEl.value?.focus() });
|
|
|
24515
24590
|
error: __props.error,
|
|
24516
24591
|
missing: !!modelValue.value && !selectedOption.value,
|
|
24517
24592
|
accessory: selectedOption.value?.accessory,
|
|
24593
|
+
autofocus: props.autofocus,
|
|
24518
24594
|
"popover-id": popoverEl.value?.popoverId,
|
|
24519
24595
|
onClick: _cache[1] || (_cache[1] = ($event) => open.value = !open.value)
|
|
24520
24596
|
}), null, 16, [
|
|
@@ -24525,6 +24601,7 @@ focus: () => baseDropdownEl.value?.focus() });
|
|
|
24525
24601
|
"error",
|
|
24526
24602
|
"missing",
|
|
24527
24603
|
"accessory",
|
|
24604
|
+
"autofocus",
|
|
24528
24605
|
"popover-id"
|
|
24529
24606
|
]), createVNode(KdsPopover_default, {
|
|
24530
24607
|
ref_key: "popoverEl",
|
|
@@ -26032,7 +26109,7 @@ var _hoisted_4$12 = {
|
|
|
26032
26109
|
class: "kds-list-count"
|
|
26033
26110
|
};
|
|
26034
26111
|
var _hoisted_5$8 = { class: "kds-button-column" };
|
|
26035
|
-
var _hoisted_6$
|
|
26112
|
+
var _hoisted_6$4 = { class: "kds-list-column" };
|
|
26036
26113
|
var _hoisted_7$2 = { class: "kds-list-header" };
|
|
26037
26114
|
var _hoisted_8$2 = { class: "kds-list-label" };
|
|
26038
26115
|
var _hoisted_9$1 = {
|
|
@@ -26231,7 +26308,7 @@ var TwinListBody_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
26231
26308
|
onClick: _cache[5] || (_cache[5] = ($event) => moveLeft([...modelValue.value.includedValues, ...showUnknownValues.value && modelValue.value.includeUnknownValues ? [UNKNOWN_VALUE_ID] : []]))
|
|
26232
26309
|
}, null, 8, ["disabled"])
|
|
26233
26310
|
]),
|
|
26234
|
-
createElementVNode("div", _hoisted_6$
|
|
26311
|
+
createElementVNode("div", _hoisted_6$4, [createElementVNode("div", _hoisted_7$2, [createElementVNode("span", _hoisted_8$2, toDisplayString(__props.includeLabel), 1), !__props.loading && __props.searchTerm ? (openBlock(), createElementBlock("span", _hoisted_9$1, toDisplayString(rightOptions.value.length) + " of " + toDisplayString(includedItems.value.length), 1)) : createCommentVNode("", true)]), createVNode(unref(KdsMultiSelectListBox_default), {
|
|
26235
26312
|
modelValue: rightSelected.value,
|
|
26236
26313
|
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => rightSelected.value = $event),
|
|
26237
26314
|
class: "kds-list-box",
|
|
@@ -27377,7 +27454,7 @@ var _hoisted_5$7 = [
|
|
|
27377
27454
|
"stroke-dashoffset",
|
|
27378
27455
|
"transform"
|
|
27379
27456
|
];
|
|
27380
|
-
var _hoisted_6$
|
|
27457
|
+
var _hoisted_6$3 = {
|
|
27381
27458
|
key: 0,
|
|
27382
27459
|
class: "donut-text"
|
|
27383
27460
|
};
|
|
@@ -27477,7 +27554,7 @@ var KdsDonutChart_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
27477
27554
|
fill: "transparent",
|
|
27478
27555
|
transform: transformWedge.value
|
|
27479
27556
|
}, null, 10, _hoisted_5$7)) : createCommentVNode("", true)
|
|
27480
|
-
], 8, _hoisted_2$15)), __props.label ? (openBlock(), createElementBlock("div", _hoisted_6$
|
|
27557
|
+
], 8, _hoisted_2$15)), __props.label ? (openBlock(), createElementBlock("div", _hoisted_6$3, [createElementVNode("div", _hoisted_7$1, toDisplayString(__props.label), 1), __props.subText ? (openBlock(), createElementBlock("div", _hoisted_8$1, toDisplayString(__props.subText), 1)) : createCommentVNode("", true)])) : createCommentVNode("", true)]);
|
|
27481
27558
|
};
|
|
27482
27559
|
}
|
|
27483
27560
|
}), [["__scopeId", "data-v-9fb87f23"]]);
|
|
@@ -28188,57 +28265,6 @@ var useFocusableMultiSelection = (options) => {
|
|
|
28188
28265
|
};
|
|
28189
28266
|
};
|
|
28190
28267
|
//#endregion
|
|
28191
|
-
//#region src/util/useKdsNameValidator.ts
|
|
28192
|
-
var INVALID_NAME_CHARACTERS = /[*?#:";<>%~|/\\]/;
|
|
28193
|
-
var NAME_CHAR_LIMIT = 255;
|
|
28194
|
-
var UNAVAILABLE_NAME_DEFAULT_MSG = "Name is already in use";
|
|
28195
|
-
/**
|
|
28196
|
-
* Validates a name for use as a file or folder name.
|
|
28197
|
-
*
|
|
28198
|
-
* A name is valid when it obeys all of these rules:
|
|
28199
|
-
* - It does not start with a dot (`.`).
|
|
28200
|
-
* - It does not end with a dot (`.`).
|
|
28201
|
-
* - It contains none of the characters `*?#:";<>%~|/\`.
|
|
28202
|
-
* - It is 255 characters long or shorter.
|
|
28203
|
-
* - It is not one of `blacklistedNames`.
|
|
28204
|
-
*
|
|
28205
|
-
* No rule requires a non-empty name. An empty name is valid. A name of only
|
|
28206
|
-
* whitespace is valid too, and gives an empty `cleanedName`. Reject these in
|
|
28207
|
-
* the caller when your use case needs a name.
|
|
28208
|
-
*
|
|
28209
|
-
* Every rule applies to the name after the leading and trailing spaces are
|
|
28210
|
-
* removed. Use `cleanedName` as the value to store.
|
|
28211
|
-
*
|
|
28212
|
-
* The messages are in English and cannot be translated. Use
|
|
28213
|
-
* `unavailableNameMessage` to replace the message for a name that is already
|
|
28214
|
-
* taken.
|
|
28215
|
-
*
|
|
28216
|
-
* @param options - The name to validate and the names that are already taken.
|
|
28217
|
-
* @returns The validity, the message for the first broken rule, and the name
|
|
28218
|
-
* without the leading and trailing spaces.
|
|
28219
|
-
*/
|
|
28220
|
-
var useKdsNameValidator = (options) => {
|
|
28221
|
-
const cleanName = (value) => value.trim();
|
|
28222
|
-
const cleanedName = computed(() => cleanName(options.name.value));
|
|
28223
|
-
const startsWithDot = computed(() => cleanedName.value.startsWith("."));
|
|
28224
|
-
const endsWithDot = computed(() => cleanedName.value.endsWith("."));
|
|
28225
|
-
const isValidName = computed(() => {
|
|
28226
|
-
return !startsWithDot.value && !endsWithDot.value && !INVALID_NAME_CHARACTERS.test(cleanedName.value) && cleanedName.value.length <= NAME_CHAR_LIMIT;
|
|
28227
|
-
});
|
|
28228
|
-
const isNameAvailable = computed(() => !options.blacklistedNames.value.includes(cleanedName.value));
|
|
28229
|
-
return {
|
|
28230
|
-
isValid: computed(() => isValidName.value && isNameAvailable.value),
|
|
28231
|
-
errorMessage: computed(() => {
|
|
28232
|
-
if (startsWithDot.value) return "Name cannot start with a dot (.)";
|
|
28233
|
-
if (endsWithDot.value) return "Name cannot end with a dot (.)";
|
|
28234
|
-
if (!isValidName.value) return "Name contains invalid characters *?#:\";<>%~|/\\ or exceeds 255 characters";
|
|
28235
|
-
if (!isNameAvailable.value) return options.unavailableNameMessage || UNAVAILABLE_NAME_DEFAULT_MSG;
|
|
28236
|
-
return "";
|
|
28237
|
-
}),
|
|
28238
|
-
cleanedName
|
|
28239
|
-
};
|
|
28240
|
-
};
|
|
28241
|
-
//#endregion
|
|
28242
28268
|
//#region src/layouts/explorer/FileExplorer/FileExplorerItemBase.vue?vue&type=script&lang.ts
|
|
28243
28269
|
var FileExplorerItemBase_vue_vue_type_script_lang_default = defineComponent({
|
|
28244
28270
|
name: "FileExplorerItemBase",
|
|
@@ -28272,7 +28298,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
28272
28298
|
"aria-disabled": _ctx.disabled ? "true" : void 0
|
|
28273
28299
|
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$17);
|
|
28274
28300
|
}
|
|
28275
|
-
var FileExplorerItemBase_default = /*#__PURE__*/ _plugin_vue_export_helper_default(FileExplorerItemBase_vue_vue_type_script_lang_default, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
28301
|
+
var FileExplorerItemBase_default = /*#__PURE__*/ _plugin_vue_export_helper_default(FileExplorerItemBase_vue_vue_type_script_lang_default, [["render", _sfc_render], ["__scopeId", "data-v-25b14279"]]);
|
|
28276
28302
|
//#endregion
|
|
28277
28303
|
//#region src/layouts/explorer/FileExplorer/FileExplorerItem.vue?vue&type=script&setup=true&lang.ts
|
|
28278
28304
|
var _hoisted_1$16 = { class: "item-icon" };
|
|
@@ -28281,16 +28307,11 @@ var _hoisted_2$13 = {
|
|
|
28281
28307
|
class: "open-indicator"
|
|
28282
28308
|
};
|
|
28283
28309
|
var _hoisted_3$9 = {
|
|
28284
|
-
key: 0,
|
|
28285
28310
|
class: "inner",
|
|
28286
28311
|
"data-drag-ghost-label": ""
|
|
28287
28312
|
};
|
|
28288
|
-
var _hoisted_4$8 = {
|
|
28289
|
-
|
|
28290
|
-
class: "item-error"
|
|
28291
|
-
};
|
|
28292
|
-
var _hoisted_5$6 = { class: "inner" };
|
|
28293
|
-
var _hoisted_6$3 = {
|
|
28313
|
+
var _hoisted_4$8 = { class: "inner" };
|
|
28314
|
+
var _hoisted_5$6 = {
|
|
28294
28315
|
key: 0,
|
|
28295
28316
|
class: /*@__PURE__*/ normalizeClass(["column"])
|
|
28296
28317
|
};
|
|
@@ -28299,11 +28320,9 @@ var _hoisted_6$3 = {
|
|
|
28299
28320
|
var FileExplorerItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
28300
28321
|
__name: "FileExplorerItem",
|
|
28301
28322
|
props: {
|
|
28302
|
-
blacklistedNames: {},
|
|
28303
28323
|
item: {},
|
|
28304
28324
|
isSelected: { type: Boolean },
|
|
28305
28325
|
isDragging: { type: Boolean },
|
|
28306
|
-
isRenameActive: { type: Boolean },
|
|
28307
28326
|
disabled: { type: Boolean },
|
|
28308
28327
|
isDraggingEnabled: {
|
|
28309
28328
|
type: Boolean,
|
|
@@ -28321,88 +28340,33 @@ var FileExplorerItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
28321
28340
|
"dragleave",
|
|
28322
28341
|
"dragend",
|
|
28323
28342
|
"drop",
|
|
28324
|
-
"contextmenu"
|
|
28325
|
-
"rename:submit",
|
|
28326
|
-
"rename:clear"
|
|
28343
|
+
"contextmenu"
|
|
28327
28344
|
],
|
|
28328
28345
|
setup(__props, { emit: __emit }) {
|
|
28329
28346
|
const props = __props;
|
|
28330
|
-
const { isRenameActive, blacklistedNames } = toRefs(props);
|
|
28331
28347
|
const emit = __emit;
|
|
28332
|
-
const renameInput = useTemplateRef("renameInput");
|
|
28333
|
-
const renameValue = ref("");
|
|
28334
|
-
const { isValid, errorMessage, cleanedName } = useKdsNameValidator({
|
|
28335
|
-
blacklistedNames,
|
|
28336
|
-
name: renameValue
|
|
28337
|
-
});
|
|
28338
|
-
const setupRenameInput = async () => {
|
|
28339
|
-
renameValue.value = props.item.name;
|
|
28340
|
-
await nextTick();
|
|
28341
|
-
const inputElement = renameInput.value?.$el.querySelector("input");
|
|
28342
|
-
if (inputElement) {
|
|
28343
|
-
inputElement?.setSelectionRange(0, renameValue.value.length);
|
|
28344
|
-
inputElement?.focus();
|
|
28345
|
-
}
|
|
28346
|
-
};
|
|
28347
|
-
watch(isRenameActive, async (isActive) => {
|
|
28348
|
-
if (isActive) await setupRenameInput();
|
|
28349
|
-
});
|
|
28350
|
-
const baseItem = ref();
|
|
28351
|
-
const focusItem = async () => {
|
|
28352
|
-
await nextTick();
|
|
28353
|
-
baseItem.value?.$el.focus();
|
|
28354
|
-
};
|
|
28355
|
-
const doRename = () => {
|
|
28356
|
-
if (!isValid.value) return;
|
|
28357
|
-
const newName = cleanedName.value;
|
|
28358
|
-
const isSameName = newName === props.item.name;
|
|
28359
|
-
if (newName === "" || isSameName) {
|
|
28360
|
-
emit("rename:clear");
|
|
28361
|
-
focusItem();
|
|
28362
|
-
return;
|
|
28363
|
-
}
|
|
28364
|
-
emit("rename:submit", {
|
|
28365
|
-
itemId: props.item.id,
|
|
28366
|
-
newName
|
|
28367
|
-
});
|
|
28368
|
-
emit("rename:clear");
|
|
28369
|
-
focusItem();
|
|
28370
|
-
};
|
|
28371
|
-
const onRenameSubmit = (keydownEvent) => {
|
|
28372
|
-
if (keydownEvent.key === "Escape") {
|
|
28373
|
-
emit("rename:clear");
|
|
28374
|
-
focusItem();
|
|
28375
|
-
}
|
|
28376
|
-
if (keydownEvent.key === "Enter") doRename();
|
|
28377
|
-
};
|
|
28378
|
-
const renameInputContainer = useTemplateRef("renameInputContainer");
|
|
28379
|
-
onClickOutside(renameInputContainer, () => {
|
|
28380
|
-
doRename();
|
|
28381
|
-
});
|
|
28382
28348
|
const slots = useSlots();
|
|
28383
28349
|
const dynamicColumnSlotNames = computed(() => Object.keys(slots).filter((key) => key.startsWith("dynamicColumn")));
|
|
28384
28350
|
return (_ctx, _cache) => {
|
|
28385
28351
|
return openBlock(), createBlock(FileExplorerItemBase_default, {
|
|
28386
|
-
ref_key: "baseItem",
|
|
28387
|
-
ref: baseItem,
|
|
28388
28352
|
class: normalizeClass(["file-explorer-item", {
|
|
28389
28353
|
disabled: __props.disabled,
|
|
28390
28354
|
"has-options-menu": props.hasOptionsMenu
|
|
28391
28355
|
}]),
|
|
28392
28356
|
"is-dragging": __props.isDragging,
|
|
28393
28357
|
"is-selected": __props.isSelected,
|
|
28394
|
-
draggable: __props.isDraggingEnabled
|
|
28358
|
+
draggable: __props.isDraggingEnabled,
|
|
28395
28359
|
disabled: __props.disabled,
|
|
28396
|
-
onDragstart: _cache[
|
|
28397
|
-
onDragenter: _cache[
|
|
28398
|
-
onDragover: _cache[
|
|
28399
|
-
onDragleave: _cache[
|
|
28400
|
-
onDragend: _cache[
|
|
28401
|
-
onDrag: _cache[
|
|
28402
|
-
onClick: _cache[
|
|
28403
|
-
onContextmenu: _cache[
|
|
28404
|
-
onDrop: _cache[
|
|
28405
|
-
onDblclick: _cache[
|
|
28360
|
+
onDragstart: _cache[0] || (_cache[0] = ($event) => emit("dragstart", $event)),
|
|
28361
|
+
onDragenter: _cache[1] || (_cache[1] = ($event) => emit("dragenter", $event)),
|
|
28362
|
+
onDragover: _cache[2] || (_cache[2] = ($event) => emit("dragover", $event)),
|
|
28363
|
+
onDragleave: _cache[3] || (_cache[3] = ($event) => emit("dragleave", $event)),
|
|
28364
|
+
onDragend: _cache[4] || (_cache[4] = ($event) => emit("dragend", $event)),
|
|
28365
|
+
onDrag: _cache[5] || (_cache[5] = ($event) => emit("drag", $event)),
|
|
28366
|
+
onClick: _cache[6] || (_cache[6] = ($event) => emit("click", $event)),
|
|
28367
|
+
onContextmenu: _cache[7] || (_cache[7] = withModifiers(($event) => emit("contextmenu", $event), ["prevent"])),
|
|
28368
|
+
onDrop: _cache[8] || (_cache[8] = withModifiers(($event) => emit("drop", $event), ["prevent"])),
|
|
28369
|
+
onDblclick: _cache[9] || (_cache[9] = ($event) => emit("dblclick", $event))
|
|
28406
28370
|
}, {
|
|
28407
28371
|
default: withCtx(() => [
|
|
28408
28372
|
createElementVNode("td", _hoisted_1$16, [__props.item.isOpen ? (openBlock(), createElementBlock("span", _hoisted_2$13)) : createCommentVNode("", true), createVNode(KdsIcon_default, {
|
|
@@ -28411,41 +28375,20 @@ var FileExplorerItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
28411
28375
|
"data-drag-ghost-icon": ""
|
|
28412
28376
|
}, null, 8, ["name"])]),
|
|
28413
28377
|
createElementVNode("td", {
|
|
28414
|
-
class: normalizeClass(["column", {
|
|
28415
|
-
light: !__props.item.isDirectory,
|
|
28416
|
-
"rename-active": unref(isRenameActive)
|
|
28417
|
-
}]),
|
|
28378
|
+
class: normalizeClass(["column", { light: !__props.item.isDirectory }]),
|
|
28418
28379
|
"data-test-id": "item-name"
|
|
28419
|
-
}, [
|
|
28380
|
+
}, [withDirectives((openBlock(), createElementBlock("div", _hoisted_3$9, [createTextVNode(toDisplayString(__props.item.name), 1)])), [[
|
|
28420
28381
|
unref(vKdsTooltip),
|
|
28421
28382
|
__props.item.name,
|
|
28422
28383
|
"truncated"
|
|
28423
|
-
]])
|
|
28424
|
-
key: 1,
|
|
28425
|
-
ref_key: "renameInputContainer",
|
|
28426
|
-
ref: renameInputContainer,
|
|
28427
|
-
class: "rename-input-container"
|
|
28428
|
-
}, [createVNode(KdsTextInput_default, {
|
|
28429
|
-
ref_key: "renameInput",
|
|
28430
|
-
ref: renameInput,
|
|
28431
|
-
modelValue: renameValue.value,
|
|
28432
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => renameValue.value = $event),
|
|
28433
|
-
class: "rename-input",
|
|
28434
|
-
type: "text",
|
|
28435
|
-
ariaLabel: "rename input",
|
|
28436
|
-
error: !unref(isValid),
|
|
28437
|
-
onKeydown: _cache[1] || (_cache[1] = withModifiers(($event) => onRenameSubmit($event), ["stop"]))
|
|
28438
|
-
}, null, 8, ["modelValue", "error"]), !unref(isValid) ? (openBlock(), createElementBlock("div", _hoisted_4$8, [createElementVNode("span", null, toDisplayString(unref(errorMessage)), 1)])) : createCommentVNode("", true)], 512))], 2),
|
|
28384
|
+
]])], 2),
|
|
28439
28385
|
(openBlock(true), createElementBlock(Fragment, null, renderList(dynamicColumnSlotNames.value, (name) => {
|
|
28440
28386
|
return openBlock(), createElementBlock("td", {
|
|
28441
28387
|
key: `dynamicColumn-${name}`,
|
|
28442
28388
|
class: normalizeClass(["column", "dynamic-column"])
|
|
28443
|
-
}, [createElementVNode("div",
|
|
28444
|
-
isRenameActive: unref(isRenameActive),
|
|
28445
|
-
isSelected: __props.isSelected
|
|
28446
|
-
}, void 0, true)])]);
|
|
28389
|
+
}, [createElementVNode("div", _hoisted_4$8, [renderSlot(_ctx.$slots, name, { isSelected: __props.isSelected }, void 0, true)])]);
|
|
28447
28390
|
}), 128)),
|
|
28448
|
-
_ctx.$slots.optionsMenu ? (openBlock(), createElementBlock("td",
|
|
28391
|
+
_ctx.$slots.optionsMenu ? (openBlock(), createElementBlock("td", _hoisted_5$6, [renderSlot(_ctx.$slots, "optionsMenu", {}, void 0, true)])) : createCommentVNode("", true)
|
|
28449
28392
|
]),
|
|
28450
28393
|
_: 3
|
|
28451
28394
|
}, 8, [
|
|
@@ -28457,7 +28400,7 @@ var FileExplorerItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/
|
|
|
28457
28400
|
]);
|
|
28458
28401
|
};
|
|
28459
28402
|
}
|
|
28460
|
-
}), [["__scopeId", "data-v-
|
|
28403
|
+
}), [["__scopeId", "data-v-b0610241"]]);
|
|
28461
28404
|
//#endregion
|
|
28462
28405
|
//#region src/layouts/explorer/FileExplorer/FileExplorerItemBack.vue
|
|
28463
28406
|
var FileExplorerItemBack_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
@@ -28480,6 +28423,132 @@ var FileExplorerItemBack_default = /*#__PURE__*/ _plugin_vue_export_helper_defau
|
|
|
28480
28423
|
}
|
|
28481
28424
|
}), [["__scopeId", "data-v-17bcd573"]]);
|
|
28482
28425
|
//#endregion
|
|
28426
|
+
//#region src/util/useKdsNameValidator.ts
|
|
28427
|
+
var INVALID_NAME_CHARACTERS = /[*?#:";<>%~|/\\]/;
|
|
28428
|
+
var NAME_CHAR_LIMIT = 255;
|
|
28429
|
+
var UNAVAILABLE_NAME_DEFAULT_MSG = "Name is already in use";
|
|
28430
|
+
/**
|
|
28431
|
+
* Validates a name for use as a file or folder name.
|
|
28432
|
+
*
|
|
28433
|
+
* A name is valid when it obeys all of these rules:
|
|
28434
|
+
* - It does not start with a dot (`.`).
|
|
28435
|
+
* - It does not end with a dot (`.`).
|
|
28436
|
+
* - It contains none of the characters `*?#:";<>%~|/\`.
|
|
28437
|
+
* - It is 255 characters long or shorter.
|
|
28438
|
+
* - It is not one of `blacklistedNames`.
|
|
28439
|
+
*
|
|
28440
|
+
* No rule requires a non-empty name. An empty name is valid. A name of only
|
|
28441
|
+
* whitespace is valid too, and gives an empty `cleanedName`. Reject these in
|
|
28442
|
+
* the caller when your use case needs a name.
|
|
28443
|
+
*
|
|
28444
|
+
* Every rule applies to the name after the leading and trailing spaces are
|
|
28445
|
+
* removed. Use `cleanedName` as the value to store.
|
|
28446
|
+
*
|
|
28447
|
+
* The messages are in English and cannot be translated. Use
|
|
28448
|
+
* `unavailableNameMessage` to replace the message for a name that is already
|
|
28449
|
+
* taken.
|
|
28450
|
+
*
|
|
28451
|
+
* @param options - The name to validate and the names that are already taken.
|
|
28452
|
+
* @returns The validity, the message for the first broken rule, and the name
|
|
28453
|
+
* without the leading and trailing spaces.
|
|
28454
|
+
*/
|
|
28455
|
+
var useKdsNameValidator = (options) => {
|
|
28456
|
+
const cleanName = (value) => value.trim();
|
|
28457
|
+
const cleanedName = computed(() => cleanName(options.name.value));
|
|
28458
|
+
const startsWithDot = computed(() => cleanedName.value.startsWith("."));
|
|
28459
|
+
const endsWithDot = computed(() => cleanedName.value.endsWith("."));
|
|
28460
|
+
const isValidName = computed(() => {
|
|
28461
|
+
return !startsWithDot.value && !endsWithDot.value && !INVALID_NAME_CHARACTERS.test(cleanedName.value) && cleanedName.value.length <= NAME_CHAR_LIMIT;
|
|
28462
|
+
});
|
|
28463
|
+
const isNameAvailable = computed(() => !options.blacklistedNames.value.includes(cleanedName.value));
|
|
28464
|
+
return {
|
|
28465
|
+
isValid: computed(() => isValidName.value && isNameAvailable.value),
|
|
28466
|
+
errorMessage: computed(() => {
|
|
28467
|
+
if (startsWithDot.value) return "Name cannot start with a dot (.)";
|
|
28468
|
+
if (endsWithDot.value) return "Name cannot end with a dot (.)";
|
|
28469
|
+
if (!isValidName.value) return "Name contains invalid characters *?#:\";<>%~|/\\ or exceeds 255 characters";
|
|
28470
|
+
if (!isNameAvailable.value) return options.unavailableNameMessage || UNAVAILABLE_NAME_DEFAULT_MSG;
|
|
28471
|
+
return "";
|
|
28472
|
+
}),
|
|
28473
|
+
cleanedName
|
|
28474
|
+
};
|
|
28475
|
+
};
|
|
28476
|
+
//#endregion
|
|
28477
|
+
//#region src/layouts/explorer/FileExplorer/FileExplorerRenameModal.vue
|
|
28478
|
+
var FileExplorerRenameModal_default = /* @__PURE__ */ defineComponent({
|
|
28479
|
+
__name: "FileExplorerRenameModal",
|
|
28480
|
+
props: {
|
|
28481
|
+
item: {},
|
|
28482
|
+
blacklistedNames: {}
|
|
28483
|
+
},
|
|
28484
|
+
emits: ["submit", "close"],
|
|
28485
|
+
setup(__props, { emit: __emit }) {
|
|
28486
|
+
const emit = __emit;
|
|
28487
|
+
const renamedItem = ref(null);
|
|
28488
|
+
const renameValue = ref("");
|
|
28489
|
+
const { isValid, errorMessage, cleanedName } = useKdsNameValidator({
|
|
28490
|
+
blacklistedNames: toRef(() => __props.blacklistedNames),
|
|
28491
|
+
name: renameValue,
|
|
28492
|
+
unavailableNameMessage: "Filename already exists. Choose a different name."
|
|
28493
|
+
});
|
|
28494
|
+
const hasError = computed(() => Boolean(__props.item) && !isValid.value);
|
|
28495
|
+
const headline = computed(() => `Rename ${renamedItem.value?.isDirectory ? "folder" : "file"}`);
|
|
28496
|
+
watch(() => __props.item?.id, (newId) => {
|
|
28497
|
+
if (newId && __props.item) {
|
|
28498
|
+
renamedItem.value = __props.item;
|
|
28499
|
+
renameValue.value = __props.item.name;
|
|
28500
|
+
}
|
|
28501
|
+
}, { immediate: true });
|
|
28502
|
+
const doRename = () => {
|
|
28503
|
+
if (!isValid.value || !renamedItem.value) return;
|
|
28504
|
+
const newName = cleanedName.value;
|
|
28505
|
+
if (newName !== "" && newName !== renamedItem.value.name) emit("submit", {
|
|
28506
|
+
itemId: renamedItem.value.id,
|
|
28507
|
+
newName
|
|
28508
|
+
});
|
|
28509
|
+
emit("close");
|
|
28510
|
+
};
|
|
28511
|
+
const selectName = (event) => {
|
|
28512
|
+
if (event.target instanceof HTMLInputElement) event.target.select();
|
|
28513
|
+
};
|
|
28514
|
+
return (_ctx, _cache) => {
|
|
28515
|
+
return openBlock(), createBlock(KdsModal_default, {
|
|
28516
|
+
active: Boolean(__props.item),
|
|
28517
|
+
headline: headline.value,
|
|
28518
|
+
width: "small",
|
|
28519
|
+
closedby: "any",
|
|
28520
|
+
onClose: _cache[2] || (_cache[2] = ($event) => emit("close"))
|
|
28521
|
+
}, {
|
|
28522
|
+
body: withCtx(() => [createElementVNode("form", {
|
|
28523
|
+
onSubmit: withModifiers(doRename, ["prevent"]),
|
|
28524
|
+
onFocusin: selectName
|
|
28525
|
+
}, [createVNode(KdsTextInput_default, {
|
|
28526
|
+
modelValue: renameValue.value,
|
|
28527
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => renameValue.value = $event),
|
|
28528
|
+
label: "New name",
|
|
28529
|
+
autofocus: "",
|
|
28530
|
+
error: hasError.value,
|
|
28531
|
+
"sub-text": hasError.value ? unref(errorMessage) : void 0
|
|
28532
|
+
}, null, 8, [
|
|
28533
|
+
"modelValue",
|
|
28534
|
+
"error",
|
|
28535
|
+
"sub-text"
|
|
28536
|
+
])], 32)]),
|
|
28537
|
+
footer: withCtx(() => [createVNode(KdsButton_default, {
|
|
28538
|
+
label: "Cancel",
|
|
28539
|
+
variant: "transparent",
|
|
28540
|
+
onClick: _cache[1] || (_cache[1] = ($event) => emit("close"))
|
|
28541
|
+
}), createVNode(KdsButton_default, {
|
|
28542
|
+
label: "Rename",
|
|
28543
|
+
disabled: hasError.value,
|
|
28544
|
+
onClick: doRename
|
|
28545
|
+
}, null, 8, ["disabled"])]),
|
|
28546
|
+
_: 1
|
|
28547
|
+
}, 8, ["active", "headline"]);
|
|
28548
|
+
};
|
|
28549
|
+
}
|
|
28550
|
+
});
|
|
28551
|
+
//#endregion
|
|
28483
28552
|
//#region ../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs
|
|
28484
28553
|
function addUniqueItem(arr, item) {
|
|
28485
28554
|
if (arr.indexOf(item) === -1) arr.push(item);
|
|
@@ -34215,7 +34284,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34215
34284
|
"renameFile"
|
|
34216
34285
|
], ["update:activeRenamedItemId"]),
|
|
34217
34286
|
setup(__props, { emit: __emit }) {
|
|
34218
|
-
useCssVars((_ctx) => ({ "
|
|
34287
|
+
useCssVars((_ctx) => ({ "v8a863fbe": itemHeight.value + "px" }));
|
|
34219
34288
|
const props = __props;
|
|
34220
34289
|
/** The id of the item currently being renamed. */
|
|
34221
34290
|
const activeRenamedItemId = useModel(__props, "activeRenamedItemId");
|
|
@@ -34282,6 +34351,11 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34282
34351
|
/** MULTISELECTION */
|
|
34283
34352
|
/** RENAME */
|
|
34284
34353
|
const blacklistedNames = computed(() => props.items.filter((item) => item.id !== activeRenamedItemId.value).map(({ name }) => name));
|
|
34354
|
+
const renamedItem = computed(() => props.items.find((item) => item.id === activeRenamedItemId.value) ?? null);
|
|
34355
|
+
watch(renamedItem, (item) => {
|
|
34356
|
+
if (!item) activeRenamedItemId.value = null;
|
|
34357
|
+
});
|
|
34358
|
+
const renameModal = useTemplateRef("renameModal");
|
|
34285
34359
|
/** RENAME */
|
|
34286
34360
|
/** DRAGGING */
|
|
34287
34361
|
const customPreviewContainer = useTemplateRef("customPreviewContainer");
|
|
@@ -34416,7 +34490,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34416
34490
|
});
|
|
34417
34491
|
const onItemClick = (item, event, index) => {
|
|
34418
34492
|
if (item.disabled) return;
|
|
34419
|
-
|
|
34493
|
+
handleSelectionClick(index, event);
|
|
34420
34494
|
closeContextMenu(false);
|
|
34421
34495
|
};
|
|
34422
34496
|
const openFileOrEnterFolder = (item) => {
|
|
@@ -34437,7 +34511,11 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34437
34511
|
};
|
|
34438
34512
|
onClickOutside(containerProps.ref, () => {
|
|
34439
34513
|
if (focusedIndex.value >= 0) resetSelection(focusedIndex.value);
|
|
34440
|
-
}, { ignore: () => [
|
|
34514
|
+
}, { ignore: () => [
|
|
34515
|
+
...resolveClickOutsideExceptions(),
|
|
34516
|
+
popover,
|
|
34517
|
+
renameModal.value?.$el
|
|
34518
|
+
] });
|
|
34441
34519
|
const hasOptionsMenu = computed(() => {
|
|
34442
34520
|
return Boolean(props.contextMenuBuilder);
|
|
34443
34521
|
});
|
|
@@ -34457,7 +34535,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34457
34535
|
"aria-label": "list of files in the current folder"
|
|
34458
34536
|
}, unref(containerProps), {
|
|
34459
34537
|
onFocus: handleFocusOnTable,
|
|
34460
|
-
onKeydown: _cache[
|
|
34538
|
+
onKeydown: _cache[9] || (_cache[9] = (...args) => unref(handleKeyboardNavigation) && unref(handleKeyboardNavigation)(...args))
|
|
34461
34539
|
}), [createElementVNode("tbody", null, [!__props.isRootFolder ? (openBlock(), createBlock(FileExplorerItemBack_default, {
|
|
34462
34540
|
key: 0,
|
|
34463
34541
|
ref_key: "itemBack",
|
|
@@ -34487,8 +34565,6 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34487
34565
|
item,
|
|
34488
34566
|
"is-dragging": unref(isDragging),
|
|
34489
34567
|
"is-selected": unref(isSelected)(index),
|
|
34490
|
-
"is-rename-active": item.id === activeRenamedItemId.value,
|
|
34491
|
-
"blacklisted-names": blacklistedNames.value,
|
|
34492
34568
|
"is-dragging-enabled": !__props.disableDragging,
|
|
34493
34569
|
"has-options-menu": hasOptionsMenu.value,
|
|
34494
34570
|
onDragstart: ($event) => unref(onDragStart)($event, index),
|
|
@@ -34501,9 +34577,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34501
34577
|
onContextmenu: ($event) => openContextMenuByMouse($event, item, index),
|
|
34502
34578
|
onKeydown: [withKeys(withModifiers(($event) => openContextMenuByKeyboard(item, index), ["shift", "prevent"]), ["f10"]), withKeys(withModifiers(($event) => handleEnterKey($event, item), ["prevent"]), ["enter"])],
|
|
34503
34579
|
onDrop: ($event) => unref(onDrop)($event, index),
|
|
34504
|
-
onDblclick: ($event) => openFileOrEnterFolder(item)
|
|
34505
|
-
"onRename:submit": _cache[9] || (_cache[9] = ($event) => emit("renameFile", $event)),
|
|
34506
|
-
"onRename:clear": _cache[10] || (_cache[10] = ($event) => activeRenamedItemId.value = null)
|
|
34580
|
+
onDblclick: ($event) => openFileOrEnterFolder(item)
|
|
34507
34581
|
}, createSlots({ _: 2 }, [renderList(dynamicColumnSlotNames.value, (name) => {
|
|
34508
34582
|
return {
|
|
34509
34583
|
name,
|
|
@@ -34538,8 +34612,6 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34538
34612
|
"item",
|
|
34539
34613
|
"is-dragging",
|
|
34540
34614
|
"is-selected",
|
|
34541
|
-
"is-rename-active",
|
|
34542
|
-
"blacklisted-names",
|
|
34543
34615
|
"is-dragging-enabled",
|
|
34544
34616
|
"has-options-menu",
|
|
34545
34617
|
"onDragstart",
|
|
@@ -34563,6 +34635,14 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34563
34635
|
ref_key: "customDragPreviewPlaceholder",
|
|
34564
34636
|
ref: customDragPreviewPlaceholder
|
|
34565
34637
|
}, null, 512)], true)], 512)) : createCommentVNode("", true),
|
|
34638
|
+
createVNode(FileExplorerRenameModal_default, {
|
|
34639
|
+
ref_key: "renameModal",
|
|
34640
|
+
ref: renameModal,
|
|
34641
|
+
item: renamedItem.value,
|
|
34642
|
+
"blacklisted-names": blacklistedNames.value,
|
|
34643
|
+
onSubmit: _cache[10] || (_cache[10] = ($event) => emit("renameFile", $event)),
|
|
34644
|
+
onClose: _cache[11] || (_cache[11] = ($event) => activeRenamedItemId.value = null)
|
|
34645
|
+
}, null, 8, ["item", "blacklisted-names"]),
|
|
34566
34646
|
createVNode(KdsPopover_default, {
|
|
34567
34647
|
ref_key: "popover",
|
|
34568
34648
|
ref: popover,
|
|
@@ -34589,7 +34669,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
34589
34669
|
]);
|
|
34590
34670
|
};
|
|
34591
34671
|
}
|
|
34592
|
-
}), [["__scopeId", "data-v-
|
|
34672
|
+
}), [["__scopeId", "data-v-1dd4e671"]]);
|
|
34593
34673
|
//#endregion
|
|
34594
34674
|
//#region src/layouts/explorer/FileExplorer/enums.ts
|
|
34595
34675
|
var kdsFileExplorerSize = {
|