@knime/kds-components 7.1.0 → 7.2.1
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 +22 -0
- package/dist/{KdsIcon-B-82z79O.js → KdsIcon-QaWf9KlK.js} +6 -6
- package/dist/KdsIcon-QaWf9KlK.js.map +1 -0
- package/dist/index.css +53 -53
- package/dist/index.js +349 -303
- package/dist/index.js.map +1 -1
- package/dist/src/components/lists/ListContainer/ListItem/ListItem/KdsListItem.vue.d.ts.map +1 -1
- package/dist/src/components/lists/ListContainer/ListItem/ListItem/types.d.ts +2 -1
- package/dist/src/components/lists/ListContainer/ListItem/ListItem/types.d.ts.map +1 -1
- package/dist/src/layouts/explorer/FileExplorer/useItemDragging/index.d.ts +2 -2
- package/dist/src/layouts/explorer/FileExplorer/useItemDragging/index.d.ts.map +1 -1
- package/dist/src/layouts/overlays/Tooltip/vKdsTooltip.d.ts.map +1 -1
- package/dist/src/util/index.d.ts +3 -0
- package/dist/src/util/index.d.ts.map +1 -1
- package/dist/src/util/multiSelection/index.d.ts +3 -0
- package/dist/src/util/multiSelection/index.d.ts.map +1 -0
- package/dist/src/{layouts/explorer/FileExplorer → util}/multiSelection/multiSelectionStateService.d.ts +10 -10
- package/dist/src/util/multiSelection/multiSelectionStateService.d.ts.map +1 -0
- package/dist/src/{layouts/explorer/FileExplorer → util}/multiSelection/useFocusableMultiSelection.d.ts +3 -3
- package/dist/src/util/multiSelection/useFocusableMultiSelection.d.ts.map +1 -0
- package/dist/src/{layouts/explorer/FileExplorer/multiSelection/useMultiSelection.d.ts → util/multiSelection/useKdsMultiSelection.d.ts} +5 -5
- package/dist/src/util/multiSelection/useKdsMultiSelection.d.ts.map +1 -0
- package/package.json +4 -4
- package/dist/KdsIcon-B-82z79O.js.map +0 -1
- package/dist/src/layouts/explorer/FileExplorer/multiSelection/index.d.ts +0 -3
- package/dist/src/layouts/explorer/FileExplorer/multiSelection/index.d.ts.map +0 -1
- package/dist/src/layouts/explorer/FileExplorer/multiSelection/multiSelectionStateService.d.ts.map +0 -1
- package/dist/src/layouts/explorer/FileExplorer/multiSelection/useFocusableMultiSelection.d.ts.map +0 -1
- package/dist/src/layouts/explorer/FileExplorer/multiSelection/useMultiSelection.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as kdsPopoverRole, c as kdsPopoverTypes, i as kdsPopoverPlacements, l as _plugin_vue_export_helper_default, o as kdsPopoverRoles, r as kdsPopoverPlacement, s as kdsPopoverType, t as KdsPopover_default, u as __exportAll$1 } from "./KdsPopover-DBU9xVEK.js";
|
|
2
|
-
import { a as useKdsIsTruncated, i as elementOverflowsHorizontally, n as useIcon, r as vKdsTooltip, t as KdsIcon_default } from "./KdsIcon-
|
|
2
|
+
import { a as useKdsIsTruncated, i as elementOverflowsHorizontally, n as useIcon, r as vKdsTooltip, t as KdsIcon_default } from "./KdsIcon-QaWf9KlK.js";
|
|
3
3
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createPropsRestProxy, createSlots, createTextVNode, createVNode, defineAsyncComponent, defineComponent, effectScope, getCurrentInstance, guardReactiveProps, h, inject, isRef, mergeModels, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onBeforeUpdate, onMounted, onScopeDispose, onUnmounted, openBlock, provide, readonly, ref, renderList, renderSlot, resolveComponent, resolveDynamicComponent, shallowRef, toDisplayString, toRaw, toRef, toRefs, unref, useAttrs, useCssVars, useId, useModel, useSlots, useTemplateRef, vModelText, vShow, watch, watchEffect, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
4
4
|
import { onClickOutside, useElementSize, useEventListener, useLocalStorage, useMousePressed, usePreferredDark, useRafFn, useResizeObserver, useTemplateRefsList, useVirtualList } from "@vueuse/core";
|
|
5
5
|
import './index.css';//#region src/components/accessories/Avatar/enums.ts
|
|
@@ -11101,6 +11101,7 @@ var KdsListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
11101
11101
|
emit("click", event);
|
|
11102
11102
|
};
|
|
11103
11103
|
const badgeSize = computed(() => __props.variant === kdsListItemVariant.SMALL ? "xxsmall" : "xsmall");
|
|
11104
|
+
const isCheckmark = computed(() => props.trailingIcon === "checkmark");
|
|
11104
11105
|
return (_ctx, _cache) => {
|
|
11105
11106
|
return openBlock(), createElementBlock("div", {
|
|
11106
11107
|
id: props.id,
|
|
@@ -11140,10 +11141,10 @@ var KdsListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
11140
11141
|
"truncated"
|
|
11141
11142
|
]]) : createCommentVNode("", true)]),
|
|
11142
11143
|
createElementVNode("span", _hoisted_7$3, [createElementVNode("span", _hoisted_8$3, [
|
|
11143
|
-
props.shortcut && props.shortcut.length > 0 ? (openBlock(), createBlock(unref(KdsKeyboardShortcut_default), {
|
|
11144
|
+
!isCheckmark.value && props.shortcut && props.shortcut.length > 0 ? (openBlock(), createBlock(unref(KdsKeyboardShortcut_default), {
|
|
11144
11145
|
key: 0,
|
|
11145
11146
|
shortcut: props.shortcut
|
|
11146
|
-
}, null, 8, ["shortcut"])) : props.badge ? (openBlock(), createBlock(KdsBadge_default, {
|
|
11147
|
+
}, null, 8, ["shortcut"])) : !isCheckmark.value && props.badge ? (openBlock(), createBlock(KdsBadge_default, {
|
|
11147
11148
|
key: 1,
|
|
11148
11149
|
size: badgeSize.value,
|
|
11149
11150
|
label: props.badge.label,
|
|
@@ -11174,7 +11175,7 @@ var KdsListItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
|
|
|
11174
11175
|
], 10, _hoisted_1$66);
|
|
11175
11176
|
};
|
|
11176
11177
|
}
|
|
11177
|
-
}), [["__scopeId", "data-v-
|
|
11178
|
+
}), [["__scopeId", "data-v-5a3cda6b"]]);
|
|
11178
11179
|
//#endregion
|
|
11179
11180
|
//#region src/components/lists/ListContainer/ListItem/ListItemSectionTitle/ListItemSectionTitle.vue?vue&type=script&setup=true&lang.ts
|
|
11180
11181
|
var _hoisted_1$65 = { class: "kds-list-item-section-title" };
|
|
@@ -27160,301 +27161,7 @@ var KdsSelectableCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(
|
|
|
27160
27161
|
}
|
|
27161
27162
|
}), [["__scopeId", "data-v-706de5bf"]]);
|
|
27162
27163
|
//#endregion
|
|
27163
|
-
//#region src/util/
|
|
27164
|
-
var defaultKeys = [
|
|
27165
|
-
"Tab",
|
|
27166
|
-
"ArrowUp",
|
|
27167
|
-
"ArrowDown",
|
|
27168
|
-
"ArrowLeft",
|
|
27169
|
-
"ArrowRight",
|
|
27170
|
-
" ",
|
|
27171
|
-
"Enter"
|
|
27172
|
-
];
|
|
27173
|
-
var useKeyPressedUntilMouseClick = (keys = defaultKeys) => {
|
|
27174
|
-
const hasUsedKeyboard = ref(false);
|
|
27175
|
-
const turnKeyboardUsageOn = (event) => {
|
|
27176
|
-
if (keys.includes(event.key)) hasUsedKeyboard.value = true;
|
|
27177
|
-
};
|
|
27178
|
-
const turnKeyboardUsageOff = () => {
|
|
27179
|
-
hasUsedKeyboard.value = false;
|
|
27180
|
-
};
|
|
27181
|
-
onMounted(() => {
|
|
27182
|
-
document.addEventListener("keydown", turnKeyboardUsageOn, { capture: true });
|
|
27183
|
-
document.addEventListener("pointerdown", turnKeyboardUsageOff, { capture: true });
|
|
27184
|
-
});
|
|
27185
|
-
onUnmounted(() => {
|
|
27186
|
-
document.removeEventListener("keydown", turnKeyboardUsageOn, true);
|
|
27187
|
-
document.removeEventListener("pointerdown", turnKeyboardUsageOff, true);
|
|
27188
|
-
});
|
|
27189
|
-
return hasUsedKeyboard;
|
|
27190
|
-
};
|
|
27191
|
-
//#endregion
|
|
27192
|
-
//#region src/layouts/explorer/FileExplorer/FileExplorerItemBase.vue?vue&type=script&lang.ts
|
|
27193
|
-
var FileExplorerItemBase_vue_vue_type_script_lang_default = defineComponent({
|
|
27194
|
-
name: "FileExplorerItemBase",
|
|
27195
|
-
props: {
|
|
27196
|
-
isSelected: {
|
|
27197
|
-
type: Boolean,
|
|
27198
|
-
required: true
|
|
27199
|
-
},
|
|
27200
|
-
isDragging: {
|
|
27201
|
-
type: Boolean,
|
|
27202
|
-
required: true
|
|
27203
|
-
},
|
|
27204
|
-
disabled: {
|
|
27205
|
-
type: Boolean,
|
|
27206
|
-
default: false
|
|
27207
|
-
}
|
|
27208
|
-
}
|
|
27209
|
-
});
|
|
27210
|
-
//#endregion
|
|
27211
|
-
//#region src/layouts/explorer/FileExplorer/FileExplorerItemBase.vue
|
|
27212
|
-
var _hoisted_1$14 = ["aria-disabled"];
|
|
27213
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
27214
|
-
return openBlock(), createElementBlock("tr", {
|
|
27215
|
-
class: normalizeClass(["file-explorer-item-base", {
|
|
27216
|
-
selected: !_ctx.isDragging && _ctx.isSelected,
|
|
27217
|
-
dragging: _ctx.isDragging && _ctx.isSelected,
|
|
27218
|
-
"anything-is-dragged": _ctx.isDragging,
|
|
27219
|
-
disabled: _ctx.disabled
|
|
27220
|
-
}]),
|
|
27221
|
-
"data-test-id": "file-explorer-item",
|
|
27222
|
-
"aria-disabled": _ctx.disabled ? "true" : void 0
|
|
27223
|
-
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$14);
|
|
27224
|
-
}
|
|
27225
|
-
var FileExplorerItemBase_default = /*#__PURE__*/ _plugin_vue_export_helper_default(FileExplorerItemBase_vue_vue_type_script_lang_default, [["render", _sfc_render], ["__scopeId", "data-v-a6f17f58"]]);
|
|
27226
|
-
//#endregion
|
|
27227
|
-
//#region src/layouts/explorer/FileExplorer/useNameValidator/useNameValidator.ts
|
|
27228
|
-
var INVALID_NAME_CHARACTERS = /[*?#:";<>%~|/\\]/;
|
|
27229
|
-
var NAME_CHAR_LIMIT = 255;
|
|
27230
|
-
var UNAVAILABLE_NAME_DEFAULT_MSG = "Name is already in use";
|
|
27231
|
-
var useNameValidator = (options) => {
|
|
27232
|
-
const cleanName = (value) => value.trim();
|
|
27233
|
-
const cleanedName = computed(() => cleanName(options.name.value));
|
|
27234
|
-
const startsWithDot = computed(() => cleanedName.value.startsWith("."));
|
|
27235
|
-
const endsWithDot = computed(() => cleanedName.value.endsWith("."));
|
|
27236
|
-
const isValidName = computed(() => {
|
|
27237
|
-
return !startsWithDot.value && !endsWithDot.value && !INVALID_NAME_CHARACTERS.test(cleanedName.value) && cleanedName.value.length <= NAME_CHAR_LIMIT;
|
|
27238
|
-
});
|
|
27239
|
-
const isNameAvailable = computed(() => !options.blacklistedNames.value.includes(cleanedName.value));
|
|
27240
|
-
return {
|
|
27241
|
-
isValid: computed(() => isValidName.value && isNameAvailable.value),
|
|
27242
|
-
errorMessage: computed(() => {
|
|
27243
|
-
if (startsWithDot.value) return "Name cannot start with a dot (.)";
|
|
27244
|
-
if (endsWithDot.value) return "Name cannot end with a dot (.)";
|
|
27245
|
-
if (!isValidName.value) return "Name contains invalid characters *?#:\";<>%~|/\\ or exceeds 255 characters";
|
|
27246
|
-
if (!isNameAvailable.value) return options.unavailableNameMessage || UNAVAILABLE_NAME_DEFAULT_MSG;
|
|
27247
|
-
return "";
|
|
27248
|
-
}),
|
|
27249
|
-
cleanedName
|
|
27250
|
-
};
|
|
27251
|
-
};
|
|
27252
|
-
//#endregion
|
|
27253
|
-
//#region src/layouts/explorer/FileExplorer/FileExplorerItem.vue?vue&type=script&setup=true&lang.ts
|
|
27254
|
-
var _hoisted_1$13 = { class: "item-icon" };
|
|
27255
|
-
var _hoisted_2$9 = {
|
|
27256
|
-
key: 0,
|
|
27257
|
-
class: "open-indicator"
|
|
27258
|
-
};
|
|
27259
|
-
var _hoisted_3$6 = {
|
|
27260
|
-
key: 0,
|
|
27261
|
-
class: "inner"
|
|
27262
|
-
};
|
|
27263
|
-
var _hoisted_4$6 = {
|
|
27264
|
-
key: 0,
|
|
27265
|
-
class: "item-error"
|
|
27266
|
-
};
|
|
27267
|
-
var _hoisted_5$5 = { class: "inner" };
|
|
27268
|
-
var _hoisted_6$3 = {
|
|
27269
|
-
key: 0,
|
|
27270
|
-
class: /*@__PURE__*/ normalizeClass(["column"])
|
|
27271
|
-
};
|
|
27272
|
-
//#endregion
|
|
27273
|
-
//#region src/layouts/explorer/FileExplorer/FileExplorerItem.vue
|
|
27274
|
-
var FileExplorerItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
27275
|
-
__name: "FileExplorerItem",
|
|
27276
|
-
props: {
|
|
27277
|
-
blacklistedNames: {},
|
|
27278
|
-
item: {},
|
|
27279
|
-
isSelected: { type: Boolean },
|
|
27280
|
-
isDragging: { type: Boolean },
|
|
27281
|
-
isRenameActive: { type: Boolean },
|
|
27282
|
-
disabled: { type: Boolean },
|
|
27283
|
-
isDraggingEnabled: {
|
|
27284
|
-
type: Boolean,
|
|
27285
|
-
default: true
|
|
27286
|
-
},
|
|
27287
|
-
hasOptionsMenu: { type: Boolean }
|
|
27288
|
-
},
|
|
27289
|
-
emits: [
|
|
27290
|
-
"dblclick",
|
|
27291
|
-
"click",
|
|
27292
|
-
"dragstart",
|
|
27293
|
-
"dragenter",
|
|
27294
|
-
"dragover",
|
|
27295
|
-
"drag",
|
|
27296
|
-
"dragleave",
|
|
27297
|
-
"dragend",
|
|
27298
|
-
"drop",
|
|
27299
|
-
"contextmenu",
|
|
27300
|
-
"rename:submit",
|
|
27301
|
-
"rename:clear"
|
|
27302
|
-
],
|
|
27303
|
-
setup(__props, { emit: __emit }) {
|
|
27304
|
-
const props = __props;
|
|
27305
|
-
const { isRenameActive, blacklistedNames } = toRefs(props);
|
|
27306
|
-
const emit = __emit;
|
|
27307
|
-
const renameInput = useTemplateRef("renameInput");
|
|
27308
|
-
const renameValue = ref("");
|
|
27309
|
-
const { isValid, errorMessage, cleanedName } = useNameValidator({
|
|
27310
|
-
blacklistedNames,
|
|
27311
|
-
name: renameValue
|
|
27312
|
-
});
|
|
27313
|
-
const setupRenameInput = async () => {
|
|
27314
|
-
renameValue.value = props.item.name;
|
|
27315
|
-
await nextTick();
|
|
27316
|
-
const inputElement = renameInput.value?.$el.querySelector("input");
|
|
27317
|
-
if (inputElement) {
|
|
27318
|
-
inputElement?.setSelectionRange(0, renameValue.value.length);
|
|
27319
|
-
inputElement?.focus();
|
|
27320
|
-
}
|
|
27321
|
-
};
|
|
27322
|
-
watch(isRenameActive, async (isActive) => {
|
|
27323
|
-
if (isActive) await setupRenameInput();
|
|
27324
|
-
});
|
|
27325
|
-
const baseItem = ref();
|
|
27326
|
-
const focusItem = async () => {
|
|
27327
|
-
await nextTick();
|
|
27328
|
-
baseItem.value?.$el.focus();
|
|
27329
|
-
};
|
|
27330
|
-
const doRename = () => {
|
|
27331
|
-
if (!isValid.value) return;
|
|
27332
|
-
const newName = cleanedName.value;
|
|
27333
|
-
const isSameName = newName === props.item.name;
|
|
27334
|
-
if (newName === "" || isSameName) {
|
|
27335
|
-
emit("rename:clear");
|
|
27336
|
-
focusItem();
|
|
27337
|
-
return;
|
|
27338
|
-
}
|
|
27339
|
-
emit("rename:submit", {
|
|
27340
|
-
itemId: props.item.id,
|
|
27341
|
-
newName
|
|
27342
|
-
});
|
|
27343
|
-
emit("rename:clear");
|
|
27344
|
-
focusItem();
|
|
27345
|
-
};
|
|
27346
|
-
const onRenameSubmit = (keydownEvent) => {
|
|
27347
|
-
if (keydownEvent.key === "Escape") {
|
|
27348
|
-
emit("rename:clear");
|
|
27349
|
-
focusItem();
|
|
27350
|
-
}
|
|
27351
|
-
if (keydownEvent.key === "Enter") doRename();
|
|
27352
|
-
};
|
|
27353
|
-
const renameInputContainer = useTemplateRef("renameInputContainer");
|
|
27354
|
-
onClickOutside(renameInputContainer, () => {
|
|
27355
|
-
doRename();
|
|
27356
|
-
});
|
|
27357
|
-
const slots = useSlots();
|
|
27358
|
-
const dynamicColumnSlotNames = computed(() => Object.keys(slots).filter((key) => key.startsWith("dynamicColumn")));
|
|
27359
|
-
return (_ctx, _cache) => {
|
|
27360
|
-
return openBlock(), createBlock(FileExplorerItemBase_default, {
|
|
27361
|
-
ref_key: "baseItem",
|
|
27362
|
-
ref: baseItem,
|
|
27363
|
-
class: normalizeClass(["file-explorer-item", {
|
|
27364
|
-
disabled: __props.disabled,
|
|
27365
|
-
"has-options-menu": props.hasOptionsMenu
|
|
27366
|
-
}]),
|
|
27367
|
-
"is-dragging": __props.isDragging,
|
|
27368
|
-
"is-selected": __props.isSelected,
|
|
27369
|
-
draggable: __props.isDraggingEnabled && !unref(isRenameActive),
|
|
27370
|
-
disabled: __props.disabled,
|
|
27371
|
-
onDragstart: _cache[2] || (_cache[2] = ($event) => !unref(isRenameActive) && emit("dragstart", $event)),
|
|
27372
|
-
onDragenter: _cache[3] || (_cache[3] = ($event) => !unref(isRenameActive) && emit("dragenter", $event)),
|
|
27373
|
-
onDragover: _cache[4] || (_cache[4] = ($event) => emit("dragover", $event)),
|
|
27374
|
-
onDragleave: _cache[5] || (_cache[5] = ($event) => !unref(isRenameActive) && emit("dragleave", $event)),
|
|
27375
|
-
onDragend: _cache[6] || (_cache[6] = ($event) => !unref(isRenameActive) && emit("dragend", $event)),
|
|
27376
|
-
onDrag: _cache[7] || (_cache[7] = ($event) => emit("drag", $event)),
|
|
27377
|
-
onClick: _cache[8] || (_cache[8] = ($event) => emit("click", $event)),
|
|
27378
|
-
onContextmenu: _cache[9] || (_cache[9] = withModifiers(($event) => !unref(isRenameActive) && emit("contextmenu", $event), ["prevent"])),
|
|
27379
|
-
onDrop: _cache[10] || (_cache[10] = withModifiers(($event) => !unref(isRenameActive) && emit("drop", $event), ["prevent"])),
|
|
27380
|
-
onDblclick: _cache[11] || (_cache[11] = ($event) => !unref(isRenameActive) && emit("dblclick", $event))
|
|
27381
|
-
}, {
|
|
27382
|
-
default: withCtx(() => [
|
|
27383
|
-
createElementVNode("td", _hoisted_1$13, [__props.item.isOpen ? (openBlock(), createElementBlock("span", _hoisted_2$9)) : createCommentVNode("", true), createVNode(KdsIcon_default, {
|
|
27384
|
-
name: __props.item.icon || (__props.item.isDirectory ? "folder" : "file"),
|
|
27385
|
-
size: "small"
|
|
27386
|
-
}, null, 8, ["name"])]),
|
|
27387
|
-
createElementVNode("td", {
|
|
27388
|
-
class: normalizeClass(["column", {
|
|
27389
|
-
light: !__props.item.isDirectory,
|
|
27390
|
-
"rename-active": unref(isRenameActive)
|
|
27391
|
-
}]),
|
|
27392
|
-
"data-test-id": "item-name"
|
|
27393
|
-
}, [!unref(isRenameActive) ? withDirectives((openBlock(), createElementBlock("div", _hoisted_3$6, [createTextVNode(toDisplayString(__props.item.name), 1)])), [[
|
|
27394
|
-
unref(vKdsTooltip),
|
|
27395
|
-
__props.item.name,
|
|
27396
|
-
"truncated"
|
|
27397
|
-
]]) : (openBlock(), createElementBlock("div", {
|
|
27398
|
-
key: 1,
|
|
27399
|
-
ref_key: "renameInputContainer",
|
|
27400
|
-
ref: renameInputContainer,
|
|
27401
|
-
class: "rename-input-container"
|
|
27402
|
-
}, [createVNode(KdsTextInput_default, {
|
|
27403
|
-
ref_key: "renameInput",
|
|
27404
|
-
ref: renameInput,
|
|
27405
|
-
modelValue: renameValue.value,
|
|
27406
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => renameValue.value = $event),
|
|
27407
|
-
class: "rename-input",
|
|
27408
|
-
type: "text",
|
|
27409
|
-
ariaLabel: "rename input",
|
|
27410
|
-
error: !unref(isValid),
|
|
27411
|
-
onKeydown: _cache[1] || (_cache[1] = withModifiers(($event) => onRenameSubmit($event), ["stop"]))
|
|
27412
|
-
}, null, 8, ["modelValue", "error"]), !unref(isValid) ? (openBlock(), createElementBlock("div", _hoisted_4$6, [createElementVNode("span", null, toDisplayString(unref(errorMessage)), 1)])) : createCommentVNode("", true)], 512))], 2),
|
|
27413
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(dynamicColumnSlotNames.value, (name) => {
|
|
27414
|
-
return openBlock(), createElementBlock("td", {
|
|
27415
|
-
key: `dynamicColumn-${name}`,
|
|
27416
|
-
class: normalizeClass(["column", "dynamic-column"])
|
|
27417
|
-
}, [createElementVNode("div", _hoisted_5$5, [renderSlot(_ctx.$slots, name, {
|
|
27418
|
-
isRenameActive: unref(isRenameActive),
|
|
27419
|
-
isSelected: __props.isSelected
|
|
27420
|
-
}, void 0, true)])]);
|
|
27421
|
-
}), 128)),
|
|
27422
|
-
_ctx.$slots.optionsMenu ? (openBlock(), createElementBlock("td", _hoisted_6$3, [renderSlot(_ctx.$slots, "optionsMenu", {}, void 0, true)])) : createCommentVNode("", true)
|
|
27423
|
-
]),
|
|
27424
|
-
_: 3
|
|
27425
|
-
}, 8, [
|
|
27426
|
-
"class",
|
|
27427
|
-
"is-dragging",
|
|
27428
|
-
"is-selected",
|
|
27429
|
-
"draggable",
|
|
27430
|
-
"disabled"
|
|
27431
|
-
]);
|
|
27432
|
-
};
|
|
27433
|
-
}
|
|
27434
|
-
}), [["__scopeId", "data-v-0dc7143f"]]);
|
|
27435
|
-
//#endregion
|
|
27436
|
-
//#region src/layouts/explorer/FileExplorer/FileExplorerItemBack.vue
|
|
27437
|
-
var FileExplorerItemBack_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
27438
|
-
__name: "FileExplorerItemBack",
|
|
27439
|
-
props: { isDragging: { type: Boolean } },
|
|
27440
|
-
setup(__props) {
|
|
27441
|
-
return (_ctx, _cache) => {
|
|
27442
|
-
return withDirectives((openBlock(), createBlock(FileExplorerItemBase_default, {
|
|
27443
|
-
"is-dragging": __props.isDragging,
|
|
27444
|
-
"is-selected": false,
|
|
27445
|
-
class: "file-explorer-item-back"
|
|
27446
|
-
}, {
|
|
27447
|
-
default: withCtx(() => [createElementVNode("td", null, [createVNode(KdsIcon_default, {
|
|
27448
|
-
name: "back",
|
|
27449
|
-
size: "small"
|
|
27450
|
-
})]), _cache[0] || (_cache[0] = createElementVNode("td", { class: "item-name hidden" }, "Go back to parent directory", -1))]),
|
|
27451
|
-
_: 1
|
|
27452
|
-
}, 8, ["is-dragging"])), [[unref(vKdsTooltip), "Go back"]]);
|
|
27453
|
-
};
|
|
27454
|
-
}
|
|
27455
|
-
}), [["__scopeId", "data-v-75b0804e"]]);
|
|
27456
|
-
//#endregion
|
|
27457
|
-
//#region src/layouts/explorer/FileExplorer/multiSelection/multiSelectionStateService.ts
|
|
27164
|
+
//#region src/util/multiSelection/multiSelectionStateService.ts
|
|
27458
27165
|
/**
|
|
27459
27166
|
* Initialize the state of the multi selection service
|
|
27460
27167
|
*/
|
|
@@ -27654,7 +27361,52 @@ var getSelectedIndexes = (state) => {
|
|
|
27654
27361
|
}, []);
|
|
27655
27362
|
};
|
|
27656
27363
|
//#endregion
|
|
27657
|
-
//#region src/
|
|
27364
|
+
//#region src/util/multiSelection/useKdsMultiSelection.ts
|
|
27365
|
+
var useKdsMultiSelection = (options) => {
|
|
27366
|
+
const multiSelectionState = ref(getInitialState());
|
|
27367
|
+
const isSelected = (index) => isItemSelected(multiSelectionState.value, index);
|
|
27368
|
+
const selectedIndexes = computed(() => getSelectedIndexes(multiSelectionState.value));
|
|
27369
|
+
const isMultipleSelectionActive$2 = (index) => isMultipleSelectionActive(multiSelectionState.value, index);
|
|
27370
|
+
const resetSelection = () => {
|
|
27371
|
+
multiSelectionState.value = getInitialState();
|
|
27372
|
+
};
|
|
27373
|
+
const clickItem = (index) => {
|
|
27374
|
+
multiSelectionState.value = click(index);
|
|
27375
|
+
};
|
|
27376
|
+
const ctrlClickItem = (index) => {
|
|
27377
|
+
multiSelectionState.value = ctrlClick(multiSelectionState.value, index);
|
|
27378
|
+
};
|
|
27379
|
+
const shiftClickItem = (index) => {
|
|
27380
|
+
multiSelectionState.value = shiftClick(multiSelectionState.value, index);
|
|
27381
|
+
};
|
|
27382
|
+
const handleSelectionClick = (index, event = null) => {
|
|
27383
|
+
if (!event || options.singleSelectionOnly.value) {
|
|
27384
|
+
clickItem(index);
|
|
27385
|
+
return;
|
|
27386
|
+
}
|
|
27387
|
+
const metaOrCtrlKey = getMetaOrCtrlKey();
|
|
27388
|
+
if (event.shiftKey) {
|
|
27389
|
+
shiftClickItem(index);
|
|
27390
|
+
return;
|
|
27391
|
+
}
|
|
27392
|
+
if (event[metaOrCtrlKey]) {
|
|
27393
|
+
ctrlClickItem(index);
|
|
27394
|
+
return;
|
|
27395
|
+
}
|
|
27396
|
+
clickItem(index);
|
|
27397
|
+
};
|
|
27398
|
+
return {
|
|
27399
|
+
multiSelectionState,
|
|
27400
|
+
isSelected,
|
|
27401
|
+
selectedIndexes,
|
|
27402
|
+
isMultipleSelectionActive: isMultipleSelectionActive$2,
|
|
27403
|
+
resetSelection,
|
|
27404
|
+
handleSelectionClick,
|
|
27405
|
+
ctrlClickItem
|
|
27406
|
+
};
|
|
27407
|
+
};
|
|
27408
|
+
//#endregion
|
|
27409
|
+
//#region src/util/multiSelection/useFocusableMultiSelection.ts
|
|
27658
27410
|
var PAGE_SIZE = 15;
|
|
27659
27411
|
var INVALID_INDEX = -Infinity;
|
|
27660
27412
|
/**
|
|
@@ -27781,6 +27533,300 @@ var useFocusableMultiSelection = (options) => {
|
|
|
27781
27533
|
};
|
|
27782
27534
|
};
|
|
27783
27535
|
//#endregion
|
|
27536
|
+
//#region src/util/useKeyPressedUntilMouseClick.ts
|
|
27537
|
+
var defaultKeys = [
|
|
27538
|
+
"Tab",
|
|
27539
|
+
"ArrowUp",
|
|
27540
|
+
"ArrowDown",
|
|
27541
|
+
"ArrowLeft",
|
|
27542
|
+
"ArrowRight",
|
|
27543
|
+
" ",
|
|
27544
|
+
"Enter"
|
|
27545
|
+
];
|
|
27546
|
+
var useKeyPressedUntilMouseClick = (keys = defaultKeys) => {
|
|
27547
|
+
const hasUsedKeyboard = ref(false);
|
|
27548
|
+
const turnKeyboardUsageOn = (event) => {
|
|
27549
|
+
if (keys.includes(event.key)) hasUsedKeyboard.value = true;
|
|
27550
|
+
};
|
|
27551
|
+
const turnKeyboardUsageOff = () => {
|
|
27552
|
+
hasUsedKeyboard.value = false;
|
|
27553
|
+
};
|
|
27554
|
+
onMounted(() => {
|
|
27555
|
+
document.addEventListener("keydown", turnKeyboardUsageOn, { capture: true });
|
|
27556
|
+
document.addEventListener("pointerdown", turnKeyboardUsageOff, { capture: true });
|
|
27557
|
+
});
|
|
27558
|
+
onUnmounted(() => {
|
|
27559
|
+
document.removeEventListener("keydown", turnKeyboardUsageOn, true);
|
|
27560
|
+
document.removeEventListener("pointerdown", turnKeyboardUsageOff, true);
|
|
27561
|
+
});
|
|
27562
|
+
return hasUsedKeyboard;
|
|
27563
|
+
};
|
|
27564
|
+
//#endregion
|
|
27565
|
+
//#region src/layouts/explorer/FileExplorer/FileExplorerItemBase.vue?vue&type=script&lang.ts
|
|
27566
|
+
var FileExplorerItemBase_vue_vue_type_script_lang_default = defineComponent({
|
|
27567
|
+
name: "FileExplorerItemBase",
|
|
27568
|
+
props: {
|
|
27569
|
+
isSelected: {
|
|
27570
|
+
type: Boolean,
|
|
27571
|
+
required: true
|
|
27572
|
+
},
|
|
27573
|
+
isDragging: {
|
|
27574
|
+
type: Boolean,
|
|
27575
|
+
required: true
|
|
27576
|
+
},
|
|
27577
|
+
disabled: {
|
|
27578
|
+
type: Boolean,
|
|
27579
|
+
default: false
|
|
27580
|
+
}
|
|
27581
|
+
}
|
|
27582
|
+
});
|
|
27583
|
+
//#endregion
|
|
27584
|
+
//#region src/layouts/explorer/FileExplorer/FileExplorerItemBase.vue
|
|
27585
|
+
var _hoisted_1$14 = ["aria-disabled"];
|
|
27586
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
27587
|
+
return openBlock(), createElementBlock("tr", {
|
|
27588
|
+
class: normalizeClass(["file-explorer-item-base", {
|
|
27589
|
+
selected: !_ctx.isDragging && _ctx.isSelected,
|
|
27590
|
+
dragging: _ctx.isDragging && _ctx.isSelected,
|
|
27591
|
+
"anything-is-dragged": _ctx.isDragging,
|
|
27592
|
+
disabled: _ctx.disabled
|
|
27593
|
+
}]),
|
|
27594
|
+
"data-test-id": "file-explorer-item",
|
|
27595
|
+
"aria-disabled": _ctx.disabled ? "true" : void 0
|
|
27596
|
+
}, [renderSlot(_ctx.$slots, "default")], 10, _hoisted_1$14);
|
|
27597
|
+
}
|
|
27598
|
+
var FileExplorerItemBase_default = /*#__PURE__*/ _plugin_vue_export_helper_default(FileExplorerItemBase_vue_vue_type_script_lang_default, [["render", _sfc_render], ["__scopeId", "data-v-a6f17f58"]]);
|
|
27599
|
+
//#endregion
|
|
27600
|
+
//#region src/layouts/explorer/FileExplorer/useNameValidator/useNameValidator.ts
|
|
27601
|
+
var INVALID_NAME_CHARACTERS = /[*?#:";<>%~|/\\]/;
|
|
27602
|
+
var NAME_CHAR_LIMIT = 255;
|
|
27603
|
+
var UNAVAILABLE_NAME_DEFAULT_MSG = "Name is already in use";
|
|
27604
|
+
var useNameValidator = (options) => {
|
|
27605
|
+
const cleanName = (value) => value.trim();
|
|
27606
|
+
const cleanedName = computed(() => cleanName(options.name.value));
|
|
27607
|
+
const startsWithDot = computed(() => cleanedName.value.startsWith("."));
|
|
27608
|
+
const endsWithDot = computed(() => cleanedName.value.endsWith("."));
|
|
27609
|
+
const isValidName = computed(() => {
|
|
27610
|
+
return !startsWithDot.value && !endsWithDot.value && !INVALID_NAME_CHARACTERS.test(cleanedName.value) && cleanedName.value.length <= NAME_CHAR_LIMIT;
|
|
27611
|
+
});
|
|
27612
|
+
const isNameAvailable = computed(() => !options.blacklistedNames.value.includes(cleanedName.value));
|
|
27613
|
+
return {
|
|
27614
|
+
isValid: computed(() => isValidName.value && isNameAvailable.value),
|
|
27615
|
+
errorMessage: computed(() => {
|
|
27616
|
+
if (startsWithDot.value) return "Name cannot start with a dot (.)";
|
|
27617
|
+
if (endsWithDot.value) return "Name cannot end with a dot (.)";
|
|
27618
|
+
if (!isValidName.value) return "Name contains invalid characters *?#:\";<>%~|/\\ or exceeds 255 characters";
|
|
27619
|
+
if (!isNameAvailable.value) return options.unavailableNameMessage || UNAVAILABLE_NAME_DEFAULT_MSG;
|
|
27620
|
+
return "";
|
|
27621
|
+
}),
|
|
27622
|
+
cleanedName
|
|
27623
|
+
};
|
|
27624
|
+
};
|
|
27625
|
+
//#endregion
|
|
27626
|
+
//#region src/layouts/explorer/FileExplorer/FileExplorerItem.vue?vue&type=script&setup=true&lang.ts
|
|
27627
|
+
var _hoisted_1$13 = { class: "item-icon" };
|
|
27628
|
+
var _hoisted_2$9 = {
|
|
27629
|
+
key: 0,
|
|
27630
|
+
class: "open-indicator"
|
|
27631
|
+
};
|
|
27632
|
+
var _hoisted_3$6 = {
|
|
27633
|
+
key: 0,
|
|
27634
|
+
class: "inner"
|
|
27635
|
+
};
|
|
27636
|
+
var _hoisted_4$6 = {
|
|
27637
|
+
key: 0,
|
|
27638
|
+
class: "item-error"
|
|
27639
|
+
};
|
|
27640
|
+
var _hoisted_5$5 = { class: "inner" };
|
|
27641
|
+
var _hoisted_6$3 = {
|
|
27642
|
+
key: 0,
|
|
27643
|
+
class: /*@__PURE__*/ normalizeClass(["column"])
|
|
27644
|
+
};
|
|
27645
|
+
//#endregion
|
|
27646
|
+
//#region src/layouts/explorer/FileExplorer/FileExplorerItem.vue
|
|
27647
|
+
var FileExplorerItem_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
27648
|
+
__name: "FileExplorerItem",
|
|
27649
|
+
props: {
|
|
27650
|
+
blacklistedNames: {},
|
|
27651
|
+
item: {},
|
|
27652
|
+
isSelected: { type: Boolean },
|
|
27653
|
+
isDragging: { type: Boolean },
|
|
27654
|
+
isRenameActive: { type: Boolean },
|
|
27655
|
+
disabled: { type: Boolean },
|
|
27656
|
+
isDraggingEnabled: {
|
|
27657
|
+
type: Boolean,
|
|
27658
|
+
default: true
|
|
27659
|
+
},
|
|
27660
|
+
hasOptionsMenu: { type: Boolean }
|
|
27661
|
+
},
|
|
27662
|
+
emits: [
|
|
27663
|
+
"dblclick",
|
|
27664
|
+
"click",
|
|
27665
|
+
"dragstart",
|
|
27666
|
+
"dragenter",
|
|
27667
|
+
"dragover",
|
|
27668
|
+
"drag",
|
|
27669
|
+
"dragleave",
|
|
27670
|
+
"dragend",
|
|
27671
|
+
"drop",
|
|
27672
|
+
"contextmenu",
|
|
27673
|
+
"rename:submit",
|
|
27674
|
+
"rename:clear"
|
|
27675
|
+
],
|
|
27676
|
+
setup(__props, { emit: __emit }) {
|
|
27677
|
+
const props = __props;
|
|
27678
|
+
const { isRenameActive, blacklistedNames } = toRefs(props);
|
|
27679
|
+
const emit = __emit;
|
|
27680
|
+
const renameInput = useTemplateRef("renameInput");
|
|
27681
|
+
const renameValue = ref("");
|
|
27682
|
+
const { isValid, errorMessage, cleanedName } = useNameValidator({
|
|
27683
|
+
blacklistedNames,
|
|
27684
|
+
name: renameValue
|
|
27685
|
+
});
|
|
27686
|
+
const setupRenameInput = async () => {
|
|
27687
|
+
renameValue.value = props.item.name;
|
|
27688
|
+
await nextTick();
|
|
27689
|
+
const inputElement = renameInput.value?.$el.querySelector("input");
|
|
27690
|
+
if (inputElement) {
|
|
27691
|
+
inputElement?.setSelectionRange(0, renameValue.value.length);
|
|
27692
|
+
inputElement?.focus();
|
|
27693
|
+
}
|
|
27694
|
+
};
|
|
27695
|
+
watch(isRenameActive, async (isActive) => {
|
|
27696
|
+
if (isActive) await setupRenameInput();
|
|
27697
|
+
});
|
|
27698
|
+
const baseItem = ref();
|
|
27699
|
+
const focusItem = async () => {
|
|
27700
|
+
await nextTick();
|
|
27701
|
+
baseItem.value?.$el.focus();
|
|
27702
|
+
};
|
|
27703
|
+
const doRename = () => {
|
|
27704
|
+
if (!isValid.value) return;
|
|
27705
|
+
const newName = cleanedName.value;
|
|
27706
|
+
const isSameName = newName === props.item.name;
|
|
27707
|
+
if (newName === "" || isSameName) {
|
|
27708
|
+
emit("rename:clear");
|
|
27709
|
+
focusItem();
|
|
27710
|
+
return;
|
|
27711
|
+
}
|
|
27712
|
+
emit("rename:submit", {
|
|
27713
|
+
itemId: props.item.id,
|
|
27714
|
+
newName
|
|
27715
|
+
});
|
|
27716
|
+
emit("rename:clear");
|
|
27717
|
+
focusItem();
|
|
27718
|
+
};
|
|
27719
|
+
const onRenameSubmit = (keydownEvent) => {
|
|
27720
|
+
if (keydownEvent.key === "Escape") {
|
|
27721
|
+
emit("rename:clear");
|
|
27722
|
+
focusItem();
|
|
27723
|
+
}
|
|
27724
|
+
if (keydownEvent.key === "Enter") doRename();
|
|
27725
|
+
};
|
|
27726
|
+
const renameInputContainer = useTemplateRef("renameInputContainer");
|
|
27727
|
+
onClickOutside(renameInputContainer, () => {
|
|
27728
|
+
doRename();
|
|
27729
|
+
});
|
|
27730
|
+
const slots = useSlots();
|
|
27731
|
+
const dynamicColumnSlotNames = computed(() => Object.keys(slots).filter((key) => key.startsWith("dynamicColumn")));
|
|
27732
|
+
return (_ctx, _cache) => {
|
|
27733
|
+
return openBlock(), createBlock(FileExplorerItemBase_default, {
|
|
27734
|
+
ref_key: "baseItem",
|
|
27735
|
+
ref: baseItem,
|
|
27736
|
+
class: normalizeClass(["file-explorer-item", {
|
|
27737
|
+
disabled: __props.disabled,
|
|
27738
|
+
"has-options-menu": props.hasOptionsMenu
|
|
27739
|
+
}]),
|
|
27740
|
+
"is-dragging": __props.isDragging,
|
|
27741
|
+
"is-selected": __props.isSelected,
|
|
27742
|
+
draggable: __props.isDraggingEnabled && !unref(isRenameActive),
|
|
27743
|
+
disabled: __props.disabled,
|
|
27744
|
+
onDragstart: _cache[2] || (_cache[2] = ($event) => !unref(isRenameActive) && emit("dragstart", $event)),
|
|
27745
|
+
onDragenter: _cache[3] || (_cache[3] = ($event) => !unref(isRenameActive) && emit("dragenter", $event)),
|
|
27746
|
+
onDragover: _cache[4] || (_cache[4] = ($event) => emit("dragover", $event)),
|
|
27747
|
+
onDragleave: _cache[5] || (_cache[5] = ($event) => !unref(isRenameActive) && emit("dragleave", $event)),
|
|
27748
|
+
onDragend: _cache[6] || (_cache[6] = ($event) => !unref(isRenameActive) && emit("dragend", $event)),
|
|
27749
|
+
onDrag: _cache[7] || (_cache[7] = ($event) => emit("drag", $event)),
|
|
27750
|
+
onClick: _cache[8] || (_cache[8] = ($event) => emit("click", $event)),
|
|
27751
|
+
onContextmenu: _cache[9] || (_cache[9] = withModifiers(($event) => !unref(isRenameActive) && emit("contextmenu", $event), ["prevent"])),
|
|
27752
|
+
onDrop: _cache[10] || (_cache[10] = withModifiers(($event) => !unref(isRenameActive) && emit("drop", $event), ["prevent"])),
|
|
27753
|
+
onDblclick: _cache[11] || (_cache[11] = ($event) => !unref(isRenameActive) && emit("dblclick", $event))
|
|
27754
|
+
}, {
|
|
27755
|
+
default: withCtx(() => [
|
|
27756
|
+
createElementVNode("td", _hoisted_1$13, [__props.item.isOpen ? (openBlock(), createElementBlock("span", _hoisted_2$9)) : createCommentVNode("", true), createVNode(KdsIcon_default, {
|
|
27757
|
+
name: __props.item.icon || (__props.item.isDirectory ? "folder" : "file"),
|
|
27758
|
+
size: "small"
|
|
27759
|
+
}, null, 8, ["name"])]),
|
|
27760
|
+
createElementVNode("td", {
|
|
27761
|
+
class: normalizeClass(["column", {
|
|
27762
|
+
light: !__props.item.isDirectory,
|
|
27763
|
+
"rename-active": unref(isRenameActive)
|
|
27764
|
+
}]),
|
|
27765
|
+
"data-test-id": "item-name"
|
|
27766
|
+
}, [!unref(isRenameActive) ? withDirectives((openBlock(), createElementBlock("div", _hoisted_3$6, [createTextVNode(toDisplayString(__props.item.name), 1)])), [[
|
|
27767
|
+
unref(vKdsTooltip),
|
|
27768
|
+
__props.item.name,
|
|
27769
|
+
"truncated"
|
|
27770
|
+
]]) : (openBlock(), createElementBlock("div", {
|
|
27771
|
+
key: 1,
|
|
27772
|
+
ref_key: "renameInputContainer",
|
|
27773
|
+
ref: renameInputContainer,
|
|
27774
|
+
class: "rename-input-container"
|
|
27775
|
+
}, [createVNode(KdsTextInput_default, {
|
|
27776
|
+
ref_key: "renameInput",
|
|
27777
|
+
ref: renameInput,
|
|
27778
|
+
modelValue: renameValue.value,
|
|
27779
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => renameValue.value = $event),
|
|
27780
|
+
class: "rename-input",
|
|
27781
|
+
type: "text",
|
|
27782
|
+
ariaLabel: "rename input",
|
|
27783
|
+
error: !unref(isValid),
|
|
27784
|
+
onKeydown: _cache[1] || (_cache[1] = withModifiers(($event) => onRenameSubmit($event), ["stop"]))
|
|
27785
|
+
}, null, 8, ["modelValue", "error"]), !unref(isValid) ? (openBlock(), createElementBlock("div", _hoisted_4$6, [createElementVNode("span", null, toDisplayString(unref(errorMessage)), 1)])) : createCommentVNode("", true)], 512))], 2),
|
|
27786
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(dynamicColumnSlotNames.value, (name) => {
|
|
27787
|
+
return openBlock(), createElementBlock("td", {
|
|
27788
|
+
key: `dynamicColumn-${name}`,
|
|
27789
|
+
class: normalizeClass(["column", "dynamic-column"])
|
|
27790
|
+
}, [createElementVNode("div", _hoisted_5$5, [renderSlot(_ctx.$slots, name, {
|
|
27791
|
+
isRenameActive: unref(isRenameActive),
|
|
27792
|
+
isSelected: __props.isSelected
|
|
27793
|
+
}, void 0, true)])]);
|
|
27794
|
+
}), 128)),
|
|
27795
|
+
_ctx.$slots.optionsMenu ? (openBlock(), createElementBlock("td", _hoisted_6$3, [renderSlot(_ctx.$slots, "optionsMenu", {}, void 0, true)])) : createCommentVNode("", true)
|
|
27796
|
+
]),
|
|
27797
|
+
_: 3
|
|
27798
|
+
}, 8, [
|
|
27799
|
+
"class",
|
|
27800
|
+
"is-dragging",
|
|
27801
|
+
"is-selected",
|
|
27802
|
+
"draggable",
|
|
27803
|
+
"disabled"
|
|
27804
|
+
]);
|
|
27805
|
+
};
|
|
27806
|
+
}
|
|
27807
|
+
}), [["__scopeId", "data-v-0dc7143f"]]);
|
|
27808
|
+
//#endregion
|
|
27809
|
+
//#region src/layouts/explorer/FileExplorer/FileExplorerItemBack.vue
|
|
27810
|
+
var FileExplorerItemBack_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
27811
|
+
__name: "FileExplorerItemBack",
|
|
27812
|
+
props: { isDragging: { type: Boolean } },
|
|
27813
|
+
setup(__props) {
|
|
27814
|
+
return (_ctx, _cache) => {
|
|
27815
|
+
return withDirectives((openBlock(), createBlock(FileExplorerItemBase_default, {
|
|
27816
|
+
"is-dragging": __props.isDragging,
|
|
27817
|
+
"is-selected": false,
|
|
27818
|
+
class: "file-explorer-item-back"
|
|
27819
|
+
}, {
|
|
27820
|
+
default: withCtx(() => [createElementVNode("td", null, [createVNode(KdsIcon_default, {
|
|
27821
|
+
name: "back",
|
|
27822
|
+
size: "small"
|
|
27823
|
+
})]), _cache[0] || (_cache[0] = createElementVNode("td", { class: "item-name hidden" }, "Go back to parent directory", -1))]),
|
|
27824
|
+
_: 1
|
|
27825
|
+
}, 8, ["is-dragging"])), [[unref(vKdsTooltip), "Go back"]]);
|
|
27826
|
+
};
|
|
27827
|
+
}
|
|
27828
|
+
}), [["__scopeId", "data-v-75b0804e"]]);
|
|
27829
|
+
//#endregion
|
|
27784
27830
|
//#region ../../node_modules/.pnpm/motion-utils@12.39.0/node_modules/motion-utils/dist/es/array.mjs
|
|
27785
27831
|
function addUniqueItem(arr, item) {
|
|
27786
27832
|
if (arr.indexOf(item) === -1) arr.push(item);
|
|
@@ -33471,7 +33517,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
33471
33517
|
"renameFile"
|
|
33472
33518
|
], ["update:activeRenamedItemId"]),
|
|
33473
33519
|
setup(__props, { emit: __emit }) {
|
|
33474
|
-
useCssVars((_ctx) => ({ "
|
|
33520
|
+
useCssVars((_ctx) => ({ "v15cae343": itemHeight.value + "px" }));
|
|
33475
33521
|
const props = __props;
|
|
33476
33522
|
/** The id of the item currently being renamed. */
|
|
33477
33523
|
const activeRenamedItemId = useModel(__props, "activeRenamedItemId");
|
|
@@ -33835,7 +33881,7 @@ var KdsFileExplorer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/*
|
|
|
33835
33881
|
}, 8, ["model-value"])]);
|
|
33836
33882
|
};
|
|
33837
33883
|
}
|
|
33838
|
-
}), [["__scopeId", "data-v-
|
|
33884
|
+
}), [["__scopeId", "data-v-8ba92819"]]);
|
|
33839
33885
|
//#endregion
|
|
33840
33886
|
//#region src/layouts/explorer/FileExplorer/enums.ts
|
|
33841
33887
|
var kdsFileExplorerSize = {
|
|
@@ -36093,6 +36139,6 @@ var useKdsDarkMode = () => {
|
|
|
36093
36139
|
return shared;
|
|
36094
36140
|
};
|
|
36095
36141
|
//#endregion
|
|
36096
|
-
export { KdsAccordion_default as KdsAccordion, KdsAvatar_default as KdsAvatar, KdsAvatarCounter_default as KdsAvatarCounter, KdsBadge_default as KdsBadge, KdsBanner_default as KdsBanner, KdsBreadcrumb_default as KdsBreadcrumb, KdsButton_default as KdsButton, KdsCard_default as KdsCard, KdsCheckbox_default as KdsCheckbox, KdsCheckboxGroup_default as KdsCheckboxGroup, KdsClickableCard_default as KdsClickableCard, KdsColorInput_default as KdsColorInput, KdsColorSwatch_default as KdsColorSwatch, KdsContextMenu_default as KdsContextMenu, KdsDataType_default as KdsDataType, KdsDateInput_default as KdsDateInput, KdsDateTimeFormatInput_default as KdsDateTimeFormatInput, KdsDateTimeInput_default as KdsDateTimeInput, KdsDescription_default as KdsDescription, KdsDivider_default as KdsDivider, KdsDonutChart_default as KdsDonutChart, KdsDropdown_default as KdsDropdown, KdsDynamicModalProvider_default as KdsDynamicModalProvider, KdsEmptyState_default as KdsEmptyState, KdsFileExplorer_default as KdsFileExplorer, KdsFileSelector_default as KdsFileSelector, KdsIcon_default as KdsIcon, KdsInfoToggleButton_default as KdsInfoToggleButton, KdsInlineMessage_default as KdsInlineMessage, KdsIntervalInput_default as KdsIntervalInput, KdsKeyboardShortcut_default as KdsKeyboardShortcut, KdsLabel_default as KdsLabel, KdsLimitBar_default as KdsLimitBar, KdsLink_default as KdsLink, KdsLinkButton_default as KdsLinkButton, KdsLinkCard_default as KdsLinkCard, KdsListContainer_default as KdsListContainer, KdsLiveStatus_default as KdsLiveStatus, KdsLoadingSkeleton_default as KdsLoadingSkeleton, KdsLoadingSpinner_default as KdsLoadingSpinner, KdsMenu_default as KdsMenu, KdsMenuButton_default as KdsMenuButton, KdsMissingValueIcon_default as KdsMissingValueIcon, KdsModal_default as KdsModal, KdsModalLayout_default as KdsModalLayout, KdsMultiSelectButton_default as KdsMultiSelectButton, KdsMultiSelectDropdown_default as KdsMultiSelectDropdown, KdsNavItem_default as KdsNavItem, KdsNavigation_default as KdsNavigation, KdsNumberInput_default as KdsNumberInput, KdsPanel_default as KdsPanel, KdsPasswordInput_default as KdsPasswordInput, KdsPatternInput_default as KdsPatternInput, KdsPopover_default as KdsPopover, KdsPortIcon_default as KdsPortIcon, KdsPreviewList_default as KdsPreviewList, KdsProgressBar_default as KdsProgressBar, KdsProgressButton_default as KdsProgressButton, KdsRadioButton_default as KdsRadioButton, KdsRadioButtonGroup_default as KdsRadioButtonGroup, KdsResponsiveButtonGroup_default as KdsResponsiveButtonGroup, KdsSearchInput_default as KdsSearchInput, KdsSelectButton_default as KdsSelectButton, KdsSelectableCard_default as KdsSelectableCard, KdsSideDrawer_default as KdsSideDrawer, KdsSortableListBox_default as KdsSortableListBox, KdsSplitButton_default as KdsSplitButton, KdsSplitPanel_default as KdsSplitPanel, KdsSubText_default as KdsSubText, KdsTabBar_default as KdsTabBar, KdsTabPanel_default as KdsTabPanel, KdsTextHighlight_default as KdsTextHighlight, KdsTextInput_default as KdsTextInput, KdsTextarea_default as KdsTextarea, KdsTimeInput_default as KdsTimeInput, KdsToggleButton_default as KdsToggleButton, KdsToggleSwitch_default as KdsToggleSwitch, KdsTree_default as KdsTree, KdsTwinList_default as KdsTwinList, KdsUsernameInput_default as KdsUsernameInput, KdsValueSwitch_default as KdsValueSwitch, KdsVariableToggleButton_default as KdsVariableToggleButton, KdsZonedDateTimeInput_default as KdsZonedDateTimeInput, PORT_SIZE, kdsAccessorySize, kdsAccessorySizes, kdsAccessoryType, kdsAccessoryTypes, kdsActionButtonType, kdsActionButtonTypes, kdsAvatarSize, kdsAvatarSizes, kdsBadgeSize, kdsBadgeSizes, kdsBadgeVariant, kdsBadgeVariants, kdsFeedbackVariant as kdsBannerVariant, kdsFeedbackVariant as kdsInlineMessageVariant, kdsFeedbackVariants as kdsBannerVariants, kdsFeedbackVariants as kdsInlineMessageVariants, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCardBodyVariant, kdsCardBodyVariants, kdsCardVariant, kdsCardVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchSize, kdsColorSwatchSizes, kdsColorSwatchType, kdsColorSwatchTypes, kdsDarkModeType, kdsDarkModeTypes, kdsDataTypeSize, kdsDataTypeSizes, kdsDateFormatCategories, kdsDateFormatCategory, kdsFileExplorerDraggingAnimationMode, kdsFileExplorerDraggingAnimationModes, kdsFileExplorerSize, kdsFileExplorerSizes, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsIntervalDirectionalities, kdsIntervalDirectionality, kdsIntervalInputFormat, kdsIntervalInputFormats, kdsKeyboardShortcutSize, kdsKeyboardShortcutSizes, kdsLimitBarThresholdVariant, kdsLimitBarThresholdVariants, kdsLinkSize, kdsLinkSizes, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSkeletonVariant, kdsLoadingSkeletonVariants, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsPanelBodyOverflow, kdsPanelBodyOverflows, kdsPanelBodyVariant, kdsPanelBodyVariants, kdsPasswordInputAutocomplete, kdsPasswordInputAutocompletes, kdsPasswordInputVariant, kdsPasswordInputVariants, kdsPopoverPlacement, kdsPopoverPlacements, kdsPopoverRole, kdsPopoverRoles, kdsPopoverType, kdsPopoverTypes, kdsPortType, kdsPortTypes, kdsProgressBarSize, kdsProgressBarSizes, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsResponsiveButtonGroupAlignment, kdsResponsiveButtonGroupAlignments, kdsSplitPanelDirection, kdsSplitPanelDirections, kdsTabBarSize, kdsTabBarSizes, kdsTemporalType, kdsTemporalTypes, kdsTimeInputGranularities, kdsTimeInputGranularity, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsToggleSwitchLabelPosition, kdsToggleSwitchLabelPositions, kdsToggleSwitchSize, kdsToggleSwitchSizes, kdsTwinListSearchMode, kdsTwinListSearchModes, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsUsernameInputAutocomplete, kdsUsernameInputAutocompletes, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, vKdsTooltip };
|
|
36142
|
+
export { KdsAccordion_default as KdsAccordion, KdsAvatar_default as KdsAvatar, KdsAvatarCounter_default as KdsAvatarCounter, KdsBadge_default as KdsBadge, KdsBanner_default as KdsBanner, KdsBreadcrumb_default as KdsBreadcrumb, KdsButton_default as KdsButton, KdsCard_default as KdsCard, KdsCheckbox_default as KdsCheckbox, KdsCheckboxGroup_default as KdsCheckboxGroup, KdsClickableCard_default as KdsClickableCard, KdsColorInput_default as KdsColorInput, KdsColorSwatch_default as KdsColorSwatch, KdsContextMenu_default as KdsContextMenu, KdsDataType_default as KdsDataType, KdsDateInput_default as KdsDateInput, KdsDateTimeFormatInput_default as KdsDateTimeFormatInput, KdsDateTimeInput_default as KdsDateTimeInput, KdsDescription_default as KdsDescription, KdsDivider_default as KdsDivider, KdsDonutChart_default as KdsDonutChart, KdsDropdown_default as KdsDropdown, KdsDynamicModalProvider_default as KdsDynamicModalProvider, KdsEmptyState_default as KdsEmptyState, KdsFileExplorer_default as KdsFileExplorer, KdsFileSelector_default as KdsFileSelector, KdsIcon_default as KdsIcon, KdsInfoToggleButton_default as KdsInfoToggleButton, KdsInlineMessage_default as KdsInlineMessage, KdsIntervalInput_default as KdsIntervalInput, KdsKeyboardShortcut_default as KdsKeyboardShortcut, KdsLabel_default as KdsLabel, KdsLimitBar_default as KdsLimitBar, KdsLink_default as KdsLink, KdsLinkButton_default as KdsLinkButton, KdsLinkCard_default as KdsLinkCard, KdsListContainer_default as KdsListContainer, KdsLiveStatus_default as KdsLiveStatus, KdsLoadingSkeleton_default as KdsLoadingSkeleton, KdsLoadingSpinner_default as KdsLoadingSpinner, KdsMenu_default as KdsMenu, KdsMenuButton_default as KdsMenuButton, KdsMissingValueIcon_default as KdsMissingValueIcon, KdsModal_default as KdsModal, KdsModalLayout_default as KdsModalLayout, KdsMultiSelectButton_default as KdsMultiSelectButton, KdsMultiSelectDropdown_default as KdsMultiSelectDropdown, KdsNavItem_default as KdsNavItem, KdsNavigation_default as KdsNavigation, KdsNumberInput_default as KdsNumberInput, KdsPanel_default as KdsPanel, KdsPasswordInput_default as KdsPasswordInput, KdsPatternInput_default as KdsPatternInput, KdsPopover_default as KdsPopover, KdsPortIcon_default as KdsPortIcon, KdsPreviewList_default as KdsPreviewList, KdsProgressBar_default as KdsProgressBar, KdsProgressButton_default as KdsProgressButton, KdsRadioButton_default as KdsRadioButton, KdsRadioButtonGroup_default as KdsRadioButtonGroup, KdsResponsiveButtonGroup_default as KdsResponsiveButtonGroup, KdsSearchInput_default as KdsSearchInput, KdsSelectButton_default as KdsSelectButton, KdsSelectableCard_default as KdsSelectableCard, KdsSideDrawer_default as KdsSideDrawer, KdsSortableListBox_default as KdsSortableListBox, KdsSplitButton_default as KdsSplitButton, KdsSplitPanel_default as KdsSplitPanel, KdsSubText_default as KdsSubText, KdsTabBar_default as KdsTabBar, KdsTabPanel_default as KdsTabPanel, KdsTextHighlight_default as KdsTextHighlight, KdsTextInput_default as KdsTextInput, KdsTextarea_default as KdsTextarea, KdsTimeInput_default as KdsTimeInput, KdsToggleButton_default as KdsToggleButton, KdsToggleSwitch_default as KdsToggleSwitch, KdsTree_default as KdsTree, KdsTwinList_default as KdsTwinList, KdsUsernameInput_default as KdsUsernameInput, KdsValueSwitch_default as KdsValueSwitch, KdsVariableToggleButton_default as KdsVariableToggleButton, KdsZonedDateTimeInput_default as KdsZonedDateTimeInput, PORT_SIZE, kdsAccessorySize, kdsAccessorySizes, kdsAccessoryType, kdsAccessoryTypes, kdsActionButtonType, kdsActionButtonTypes, kdsAvatarSize, kdsAvatarSizes, kdsBadgeSize, kdsBadgeSizes, kdsBadgeVariant, kdsBadgeVariants, kdsFeedbackVariant as kdsBannerVariant, kdsFeedbackVariant as kdsInlineMessageVariant, kdsFeedbackVariants as kdsBannerVariants, kdsFeedbackVariants as kdsInlineMessageVariants, kdsButtonSize, kdsButtonSizes, kdsButtonVariant, kdsButtonVariants, kdsCardBodyVariant, kdsCardBodyVariants, kdsCardVariant, kdsCardVariants, kdsCheckboxGroupAlignment, kdsCheckboxGroupAlignments, kdsCheckboxValue, kdsCheckboxValues, kdsColorSwatchSize, kdsColorSwatchSizes, kdsColorSwatchType, kdsColorSwatchTypes, kdsDarkModeType, kdsDarkModeTypes, kdsDataTypeSize, kdsDataTypeSizes, kdsDateFormatCategories, kdsDateFormatCategory, kdsFileExplorerDraggingAnimationMode, kdsFileExplorerDraggingAnimationModes, kdsFileExplorerSize, kdsFileExplorerSizes, kdsIconName, iconNames as kdsIconNames, kdsIconSize, kdsIconSizes, kdsIntervalDirectionalities, kdsIntervalDirectionality, kdsIntervalInputFormat, kdsIntervalInputFormats, kdsKeyboardShortcutSize, kdsKeyboardShortcutSizes, kdsLimitBarThresholdVariant, kdsLimitBarThresholdVariants, kdsLinkSize, kdsLinkSizes, kdsLiveStatusSize, kdsLiveStatusSizes, kdsLiveStatusStatus, kdsLiveStatusStatuses, kdsLoadingSkeletonVariant, kdsLoadingSkeletonVariants, kdsLoadingSpinnerVariant, kdsLoadingSpinnerVariants, kdsModalClosedBy, kdsModalClosedByOptions, kdsModalHeight, kdsModalHeightSizes, kdsModalVariant, kdsModalVariants, kdsModalWidth, kdsModalWidthSizes, kdsPanelBodyOverflow, kdsPanelBodyOverflows, kdsPanelBodyVariant, kdsPanelBodyVariants, kdsPasswordInputAutocomplete, kdsPasswordInputAutocompletes, kdsPasswordInputVariant, kdsPasswordInputVariants, kdsPopoverPlacement, kdsPopoverPlacements, kdsPopoverRole, kdsPopoverRoles, kdsPopoverType, kdsPopoverTypes, kdsPortType, kdsPortTypes, kdsProgressBarSize, kdsProgressBarSizes, kdsProgressButtonState, kdsProgressButtonStates, kdsRadioButtonGroupAlignment, kdsRadioButtonGroupAlignments, kdsResponsiveButtonGroupAlignment, kdsResponsiveButtonGroupAlignments, kdsSplitPanelDirection, kdsSplitPanelDirections, kdsTabBarSize, kdsTabBarSizes, kdsTemporalType, kdsTemporalTypes, kdsTimeInputGranularities, kdsTimeInputGranularity, kdsToggleButtonVariant, kdsToggleButtonVariants, kdsToggleSwitchLabelPosition, kdsToggleSwitchLabelPositions, kdsToggleSwitchSize, kdsToggleSwitchSizes, kdsTwinListSearchMode, kdsTwinListSearchModes, kdsTypeIconName, typeIconNames as kdsTypeIconNames, kdsUsernameInputAutocomplete, kdsUsernameInputAutocompletes, kdsValueSwitchSize, kdsValueSwitchSizes, kdsValueSwitchVariant, kdsValueSwitchVariants, useKdsDarkMode, useKdsDynamicModal, useKdsIsTruncated, useKdsMultiSelection, vKdsTooltip };
|
|
36097
36143
|
|
|
36098
36144
|
//# sourceMappingURL=index.js.map
|