@knime/kds-components 0.30.0 → 0.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/index.css +114 -134
- package/dist/index.js +58 -262
- package/dist/index.js.map +1 -1
- package/dist/src/accessories/InlineMessage/KdsInlineMessage.vue.d.ts.map +1 -1
- package/dist/src/buttons/BaseButton.vue.d.ts.map +1 -1
- package/dist/src/containers/FileExplorer/KdsFileExplorer.vue.d.ts +8 -27
- package/dist/src/containers/FileExplorer/KdsFileExplorer.vue.d.ts.map +1 -1
- package/dist/src/forms/Checkbox/BaseCheckbox.vue.d.ts.map +1 -1
- package/dist/src/forms/selects/Dropdown/DropdownContainer.vue.d.ts.map +1 -1
- package/dist/src/layouts/Breadcrumb/KdsBreadcrumb.vue.d.ts.map +1 -1
- package/dist/src/overlays/Popover/KdsPopover.vue.d.ts.map +1 -1
- package/package.json +4 -6
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent, createPropsRestProxy, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, Fragment, renderList, createBlock, normalizeStyle, createCommentVNode, shallowRef, markRaw, readonly, toRef, unref, resolveDynamicComponent, mergeProps, useTemplateRef, createVNode, withCtx, renderSlot, h as h$1, useSlots, getCurrentInstance, useModel, mergeModels, onMounted, onUnmounted, nextTick, useId, withModifiers, inject, provide, resolveComponent, withKeys, watchEffect, useAttrs,
|
|
2
|
-
import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useMutationObserver, onClickOutside, useElementSize, useMousePressed,
|
|
1
|
+
import { defineComponent, createPropsRestProxy, ref, watch, computed, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, Fragment, renderList, createBlock, normalizeStyle, createCommentVNode, shallowRef, markRaw, readonly, toRef, unref, resolveDynamicComponent, mergeProps, useTemplateRef, createVNode, withCtx, renderSlot, h as h$1, useSlots, getCurrentInstance, useModel, mergeModels, onMounted, onUnmounted, nextTick, useId, withModifiers, inject, provide, resolveComponent, withKeys, watchEffect, useAttrs, defineAsyncComponent, toRefs, useCssVars, normalizeProps, guardReactiveProps, createSlots, withDirectives, vShow, onBeforeUpdate, onBeforeUnmount, isRef, vModelText, createTextVNode } from 'vue';
|
|
2
|
+
import { useLocalStorage, useDark, usePreferredDark, useResizeObserver, useMutationObserver, onClickOutside, useVirtualList, useElementSize, useMousePressed, useTemplateRefsList } from '@vueuse/core';
|
|
3
3
|
|
|
4
4
|
import './index.css';const kdsAvatarSize = {
|
|
5
5
|
SMALL: "small",
|
|
@@ -1106,7 +1106,7 @@ const _sfc_main$1x = /* @__PURE__ */ defineComponent({
|
|
|
1106
1106
|
}
|
|
1107
1107
|
});
|
|
1108
1108
|
|
|
1109
|
-
const KdsInlineMessage = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["__scopeId", "data-v-
|
|
1109
|
+
const KdsInlineMessage = /* @__PURE__ */ _export_sfc(_sfc_main$1x, [["__scopeId", "data-v-194a0dfd"]]);
|
|
1110
1110
|
|
|
1111
1111
|
const kdsInlineMessageVariant = {
|
|
1112
1112
|
ERROR: "error",
|
|
@@ -1335,7 +1335,7 @@ const _sfc_main$1t = /* @__PURE__ */ defineComponent({
|
|
|
1335
1335
|
}
|
|
1336
1336
|
});
|
|
1337
1337
|
|
|
1338
|
-
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["__scopeId", "data-v-
|
|
1338
|
+
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$1t, [["__scopeId", "data-v-24ade73a"]]);
|
|
1339
1339
|
|
|
1340
1340
|
const _sfc_main$1s = /* @__PURE__ */ defineComponent({
|
|
1341
1341
|
__name: "KdsButton",
|
|
@@ -2814,7 +2814,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
2814
2814
|
}
|
|
2815
2815
|
});
|
|
2816
2816
|
|
|
2817
|
-
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["__scopeId", "data-v-
|
|
2817
|
+
const KdsPopover = /* @__PURE__ */ _export_sfc(_sfc_main$1i, [["__scopeId", "data-v-3354d162"]]);
|
|
2818
2818
|
|
|
2819
2819
|
const KdsPopover$1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
2820
2820
|
__proto__: null,
|
|
@@ -3363,67 +3363,6 @@ const _sfc_main$1c = /* @__PURE__ */ defineComponent({
|
|
|
3363
3363
|
}
|
|
3364
3364
|
});
|
|
3365
3365
|
|
|
3366
|
-
function debounce(func, debounceMs, { signal, edges } = {}) {
|
|
3367
|
-
let pendingThis = undefined;
|
|
3368
|
-
let pendingArgs = null;
|
|
3369
|
-
const leading = edges != null && edges.includes('leading');
|
|
3370
|
-
const trailing = edges == null || edges.includes('trailing');
|
|
3371
|
-
const invoke = () => {
|
|
3372
|
-
if (pendingArgs !== null) {
|
|
3373
|
-
func.apply(pendingThis, pendingArgs);
|
|
3374
|
-
pendingThis = undefined;
|
|
3375
|
-
pendingArgs = null;
|
|
3376
|
-
}
|
|
3377
|
-
};
|
|
3378
|
-
const onTimerEnd = () => {
|
|
3379
|
-
if (trailing) {
|
|
3380
|
-
invoke();
|
|
3381
|
-
}
|
|
3382
|
-
cancel();
|
|
3383
|
-
};
|
|
3384
|
-
let timeoutId = null;
|
|
3385
|
-
const schedule = () => {
|
|
3386
|
-
if (timeoutId != null) {
|
|
3387
|
-
clearTimeout(timeoutId);
|
|
3388
|
-
}
|
|
3389
|
-
timeoutId = setTimeout(() => {
|
|
3390
|
-
timeoutId = null;
|
|
3391
|
-
onTimerEnd();
|
|
3392
|
-
}, debounceMs);
|
|
3393
|
-
};
|
|
3394
|
-
const cancelTimer = () => {
|
|
3395
|
-
if (timeoutId !== null) {
|
|
3396
|
-
clearTimeout(timeoutId);
|
|
3397
|
-
timeoutId = null;
|
|
3398
|
-
}
|
|
3399
|
-
};
|
|
3400
|
-
const cancel = () => {
|
|
3401
|
-
cancelTimer();
|
|
3402
|
-
pendingThis = undefined;
|
|
3403
|
-
pendingArgs = null;
|
|
3404
|
-
};
|
|
3405
|
-
const flush = () => {
|
|
3406
|
-
invoke();
|
|
3407
|
-
};
|
|
3408
|
-
const debounced = function (...args) {
|
|
3409
|
-
if (signal?.aborted) {
|
|
3410
|
-
return;
|
|
3411
|
-
}
|
|
3412
|
-
pendingThis = this;
|
|
3413
|
-
pendingArgs = args;
|
|
3414
|
-
const isFirstCall = timeoutId == null;
|
|
3415
|
-
schedule();
|
|
3416
|
-
if (leading && isFirstCall) {
|
|
3417
|
-
invoke();
|
|
3418
|
-
}
|
|
3419
|
-
};
|
|
3420
|
-
debounced.schedule = schedule;
|
|
3421
|
-
debounced.cancel = cancel;
|
|
3422
|
-
debounced.flush = flush;
|
|
3423
|
-
signal?.addEventListener('abort', cancel, { once: true });
|
|
3424
|
-
return debounced;
|
|
3425
|
-
}
|
|
3426
|
-
|
|
3427
3366
|
const isMac = () => navigator?.userAgent?.toLowerCase()?.includes("mac");
|
|
3428
3367
|
|
|
3429
3368
|
const createUnwrappedPromise = () => {
|
|
@@ -3446,139 +3385,6 @@ const getMetaOrCtrlKey = () => {
|
|
|
3446
3385
|
return isMac() ? "metaKey" : "ctrlKey";
|
|
3447
3386
|
};
|
|
3448
3387
|
|
|
3449
|
-
var B$1 = Object.defineProperty;
|
|
3450
|
-
var b$1 = (t, e, r) => e in t ? B$1(t, e, { enumerable: true, configurable: true, writable: true, value: r }) : t[e] = r;
|
|
3451
|
-
var u$1 = (t, e, r) => b$1(t, typeof e != "symbol" ? e + "" : e, r);
|
|
3452
|
-
function N$1(t) {
|
|
3453
|
-
return getCurrentScope() ? (onScopeDispose(t), true) : false;
|
|
3454
|
-
}
|
|
3455
|
-
function P$1(t) {
|
|
3456
|
-
return typeof t == "function" ? t() : unref(t);
|
|
3457
|
-
}
|
|
3458
|
-
const R$1 = typeof window < "u" && typeof document < "u";
|
|
3459
|
-
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
3460
|
-
function O$1(t) {
|
|
3461
|
-
var e;
|
|
3462
|
-
const r = P$1(t);
|
|
3463
|
-
return (e = r == null ? void 0 : r.$el) != null ? e : r;
|
|
3464
|
-
}
|
|
3465
|
-
const $$1 = R$1 ? window : void 0;
|
|
3466
|
-
function C$1() {
|
|
3467
|
-
const t = ref(false);
|
|
3468
|
-
return getCurrentInstance() && onMounted(() => {
|
|
3469
|
-
t.value = true;
|
|
3470
|
-
}), t;
|
|
3471
|
-
}
|
|
3472
|
-
function V$1(t) {
|
|
3473
|
-
const e = C$1();
|
|
3474
|
-
return computed(() => (e.value, !!t()));
|
|
3475
|
-
}
|
|
3476
|
-
function x$1(t, e, r = {}) {
|
|
3477
|
-
const { window: n = $$1, ...a } = r;
|
|
3478
|
-
let o;
|
|
3479
|
-
const l = V$1(() => n && "ResizeObserver" in n), i = () => {
|
|
3480
|
-
o && (o.disconnect(), o = void 0);
|
|
3481
|
-
}, f = computed(() => Array.isArray(t) ? t.map((p) => O$1(p)) : [O$1(t)]), c = watch(
|
|
3482
|
-
f,
|
|
3483
|
-
(p) => {
|
|
3484
|
-
if (i(), l.value && n) {
|
|
3485
|
-
o = new ResizeObserver(e);
|
|
3486
|
-
for (const d of p)
|
|
3487
|
-
d && o.observe(d, a);
|
|
3488
|
-
}
|
|
3489
|
-
},
|
|
3490
|
-
{ immediate: true, flush: "post", deep: true }
|
|
3491
|
-
), m = () => {
|
|
3492
|
-
i(), c();
|
|
3493
|
-
};
|
|
3494
|
-
return N$1(m), {
|
|
3495
|
-
isSupported: l,
|
|
3496
|
-
stop: m
|
|
3497
|
-
};
|
|
3498
|
-
}
|
|
3499
|
-
function F$1(t) {
|
|
3500
|
-
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
3501
|
-
}
|
|
3502
|
-
var G$1 = function(e) {
|
|
3503
|
-
var r = null, n, a = function(i) {
|
|
3504
|
-
return function() {
|
|
3505
|
-
r = null, e.apply(i, n);
|
|
3506
|
-
};
|
|
3507
|
-
}, o = function() {
|
|
3508
|
-
for (var i = arguments.length, f = new Array(i), c = 0; c < i; c++)
|
|
3509
|
-
f[c] = arguments[c];
|
|
3510
|
-
n = f, r === null && (r = requestAnimationFrame(a(this)));
|
|
3511
|
-
};
|
|
3512
|
-
return o.cancel = function() {
|
|
3513
|
-
cancelAnimationFrame(r), r = null;
|
|
3514
|
-
}, o;
|
|
3515
|
-
}, j$1 = G$1;
|
|
3516
|
-
const q$1 = /* @__PURE__ */ F$1(j$1), _$1 = 500, w$1 = ({
|
|
3517
|
-
sizeManager: t,
|
|
3518
|
-
buffer: e = _$1
|
|
3519
|
-
}, r = "vertical", n = null) => {
|
|
3520
|
-
const o = ref({ scrollStart: 0, scrollEnd: 0 }), l = r === "vertical", i = n ?? ref(null), f = q$1(() => {
|
|
3521
|
-
if (!i.value)
|
|
3522
|
-
return;
|
|
3523
|
-
const { scrollTop: d, scrollLeft: S, offsetHeight: y, offsetWidth: A } = i.value, g = l ? d : S, L = l ? y : A;
|
|
3524
|
-
o.value = { scrollStart: g, scrollEnd: g + L };
|
|
3525
|
-
});
|
|
3526
|
-
t.onUpdate(f), n || x$1(i, f);
|
|
3527
|
-
const c = computed(() => {
|
|
3528
|
-
const d = t.toIndex(o.value.scrollStart - e), S = Math.min(
|
|
3529
|
-
t.toIndex(o.value.scrollEnd + e) + 1,
|
|
3530
|
-
t.getNumItems()
|
|
3531
|
-
);
|
|
3532
|
-
return { startIndex: d, endIndex: S, toArray: () => Array.from({ length: S - d }, (A, g) => d + g) };
|
|
3533
|
-
}), m = computed(() => t.toOffset(c.value.startIndex)), p = computed(() => ({
|
|
3534
|
-
[`padding${l ? "Top" : "Left"}`]: `${m.value}px`,
|
|
3535
|
-
[l ? "height" : "width"]: `${t.getTotalSize()}px`,
|
|
3536
|
-
/**
|
|
3537
|
-
* Since the height of the element should not be influenced by its padding.
|
|
3538
|
-
* An alternative without box-sizing: "border-box" would be to use margins instead
|
|
3539
|
-
* paddings, but then it is no longer easily possible to absolutely position
|
|
3540
|
-
* other elements (e.g. a cell selection overlay) inside this element.
|
|
3541
|
-
*/
|
|
3542
|
-
boxSizing: "border-box"
|
|
3543
|
-
}));
|
|
3544
|
-
return {
|
|
3545
|
-
containerProps: {
|
|
3546
|
-
ref: i,
|
|
3547
|
-
onScroll: f
|
|
3548
|
-
},
|
|
3549
|
-
indices: c,
|
|
3550
|
-
scrolledAreaStyles: p
|
|
3551
|
-
};
|
|
3552
|
-
}, v$1 = (t, e) => isRef(t) && watch(() => t.value, e), H$1 = (t, e) => Math.floor(t / e);
|
|
3553
|
-
let Y$1 = class Y {
|
|
3554
|
-
constructor(e, r) {
|
|
3555
|
-
u$1(this, "numItems");
|
|
3556
|
-
u$1(this, "size");
|
|
3557
|
-
this.numItems = e, this.size = r;
|
|
3558
|
-
}
|
|
3559
|
-
getNumItems() {
|
|
3560
|
-
return unref(this.numItems);
|
|
3561
|
-
}
|
|
3562
|
-
onUpdate(e) {
|
|
3563
|
-
v$1(this.numItems, e), v$1(this.size, e);
|
|
3564
|
-
}
|
|
3565
|
-
toOffset(e) {
|
|
3566
|
-
return e * unref(this.size);
|
|
3567
|
-
}
|
|
3568
|
-
getTotalSize() {
|
|
3569
|
-
return unref(this.numItems) * unref(this.size);
|
|
3570
|
-
}
|
|
3571
|
-
toIndex(e) {
|
|
3572
|
-
return Math.max(
|
|
3573
|
-
Math.min(
|
|
3574
|
-
H$1(e, unref(this.size)),
|
|
3575
|
-
unref(this.numItems) - 1
|
|
3576
|
-
),
|
|
3577
|
-
0
|
|
3578
|
-
);
|
|
3579
|
-
}
|
|
3580
|
-
};
|
|
3581
|
-
|
|
3582
3388
|
const kdsDimensionComponentHeight12p5x = 200;
|
|
3583
3389
|
const kdsDimensionComponentHeight1p5x = 24;
|
|
3584
3390
|
const kdsDimensionComponentHeight20x = 320;
|
|
@@ -12020,7 +11826,6 @@ const _hoisted_2$q = {
|
|
|
12020
11826
|
key: 0,
|
|
12021
11827
|
class: "empty"
|
|
12022
11828
|
};
|
|
12023
|
-
const VIRTUAL_ITEM_BUFFER = 16;
|
|
12024
11829
|
const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
12025
11830
|
__name: "KdsFileExplorer",
|
|
12026
11831
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -12046,7 +11851,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12046
11851
|
emits: /* @__PURE__ */ mergeModels(["update:selectedItemIds", "changeDirectory", "openFile", "moveItems", "dragend", "drag", "renameFile"], ["update:activeRenamedItemId"]),
|
|
12047
11852
|
setup(__props, { emit: __emit }) {
|
|
12048
11853
|
useCssVars((_ctx) => ({
|
|
12049
|
-
"
|
|
11854
|
+
"v44ee6cb4": itemHeight.value + "px"
|
|
12050
11855
|
}));
|
|
12051
11856
|
const props = __props;
|
|
12052
11857
|
const activeRenamedItemId = useModel(__props, "activeRenamedItemId");
|
|
@@ -12060,39 +11865,35 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12060
11865
|
};
|
|
12061
11866
|
const virtualItemRefs = ref([]);
|
|
12062
11867
|
const itemBack = ref(null);
|
|
12063
|
-
const
|
|
12064
|
-
|
|
12065
|
-
computed(() => props.items.length),
|
|
12066
|
-
itemHeight.value
|
|
12067
|
-
);
|
|
12068
|
-
const {
|
|
12069
|
-
indices: virtualIndices,
|
|
12070
|
-
containerProps,
|
|
12071
|
-
scrolledAreaStyles
|
|
12072
|
-
} = w$1(
|
|
11868
|
+
const { containerProps, wrapperProps, list } = useVirtualList(
|
|
11869
|
+
computed(() => props.items),
|
|
12073
11870
|
{
|
|
12074
|
-
|
|
12075
|
-
|
|
12076
|
-
},
|
|
12077
|
-
"vertical",
|
|
12078
|
-
table
|
|
12079
|
-
);
|
|
12080
|
-
const renderedIndices = computed(() => virtualIndices.value.toArray());
|
|
12081
|
-
const renderedItems = computed(
|
|
12082
|
-
() => renderedIndices.value.map((i) => props.items[i])
|
|
11871
|
+
itemHeight: itemHeight.value
|
|
11872
|
+
}
|
|
12083
11873
|
);
|
|
12084
11874
|
const scrollIntoView = (index, behavior = "smooth") => {
|
|
12085
|
-
|
|
11875
|
+
const container = containerProps.ref.value;
|
|
11876
|
+
if (index === -1 || !container) {
|
|
12086
11877
|
return;
|
|
12087
11878
|
}
|
|
12088
|
-
const
|
|
12089
|
-
const
|
|
12090
|
-
|
|
12091
|
-
|
|
11879
|
+
const rowHeight = itemHeight.value;
|
|
11880
|
+
const peek = 0;
|
|
11881
|
+
const rowTop = index * rowHeight;
|
|
11882
|
+
const rowBottom = rowTop + rowHeight;
|
|
11883
|
+
const viewTop = container.scrollTop;
|
|
11884
|
+
const viewBottom = viewTop + container.clientHeight;
|
|
11885
|
+
const backButton = props.isRootFolder ? 0 : itemHeight.value;
|
|
11886
|
+
if (rowTop < viewTop) {
|
|
11887
|
+
container.scrollTo({
|
|
11888
|
+
top: Math.max(rowTop - peek, 0) + backButton,
|
|
11889
|
+
behavior
|
|
11890
|
+
});
|
|
11891
|
+
} else if (rowBottom + itemHeight.value > viewBottom) {
|
|
11892
|
+
container.scrollTo({
|
|
11893
|
+
top: rowBottom + peek - container.clientHeight + backButton,
|
|
12092
11894
|
behavior
|
|
12093
11895
|
});
|
|
12094
|
-
}
|
|
12095
|
-
debouncedScroll();
|
|
11896
|
+
}
|
|
12096
11897
|
};
|
|
12097
11898
|
const multiSelection = useFocusableMultiSelection({
|
|
12098
11899
|
singleSelectionOnly: toRef(props, "disableMultiSelect"),
|
|
@@ -12200,6 +12001,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12200
12001
|
}
|
|
12201
12002
|
const item = getItemElement(index);
|
|
12202
12003
|
if (item) {
|
|
12004
|
+
scrollIntoView(index, "instant");
|
|
12203
12005
|
item.focus();
|
|
12204
12006
|
} else {
|
|
12205
12007
|
scrollIntoView(index, "instant");
|
|
@@ -12212,7 +12014,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12212
12014
|
}
|
|
12213
12015
|
};
|
|
12214
12016
|
const handleFocusOnTable = (event) => {
|
|
12215
|
-
if (
|
|
12017
|
+
if (containerProps.ref.value?.contains(event.relatedTarget)) {
|
|
12216
12018
|
return;
|
|
12217
12019
|
}
|
|
12218
12020
|
focusIndex(focusedIndex.value, false);
|
|
@@ -12223,6 +12025,9 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12223
12025
|
});
|
|
12224
12026
|
const contextMenuAnchor = ref(null);
|
|
12225
12027
|
const closeContextMenu = (focusLastItem = true) => {
|
|
12028
|
+
if (!contextMenuAnchor.value) {
|
|
12029
|
+
return;
|
|
12030
|
+
}
|
|
12226
12031
|
contextMenuAnchor.value = null;
|
|
12227
12032
|
if (focusLastItem) {
|
|
12228
12033
|
focusIndex(focusedIndex.value, false);
|
|
@@ -12297,11 +12102,10 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12297
12102
|
if (!anchor || !props.contextMenuBuilder) {
|
|
12298
12103
|
return [];
|
|
12299
12104
|
}
|
|
12300
|
-
|
|
12105
|
+
return props.contextMenuBuilder({
|
|
12301
12106
|
selectedItems: selectedItems.value,
|
|
12302
12107
|
anchor
|
|
12303
12108
|
});
|
|
12304
|
-
return builtItems;
|
|
12305
12109
|
});
|
|
12306
12110
|
const onItemClick = (item, event, index) => {
|
|
12307
12111
|
if (item.disabled) {
|
|
@@ -12327,7 +12131,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12327
12131
|
openFileOrEnterFolder(item);
|
|
12328
12132
|
};
|
|
12329
12133
|
onClickOutside(
|
|
12330
|
-
|
|
12134
|
+
containerProps.ref,
|
|
12331
12135
|
() => {
|
|
12332
12136
|
if (focusedIndex.value >= 0) {
|
|
12333
12137
|
resetSelection(focusedIndex.value);
|
|
@@ -12337,7 +12141,6 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12337
12141
|
ignore: [...props.clickOutsideExceptions, "#file-explorer-options-menu"]
|
|
12338
12142
|
}
|
|
12339
12143
|
);
|
|
12340
|
-
useResizeObserver(containerProps.ref, containerProps.onScroll);
|
|
12341
12144
|
const hasOptionsMenu = computed(() => {
|
|
12342
12145
|
return Boolean(props.contextMenuBuilder);
|
|
12343
12146
|
});
|
|
@@ -12368,9 +12171,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12368
12171
|
ref_key: "itemBack",
|
|
12369
12172
|
ref: itemBack,
|
|
12370
12173
|
tabindex: "-1",
|
|
12371
|
-
class: normalizeClass(["file-explorer-item", {
|
|
12372
|
-
"keyboard-focus": unref(keyPressedUntilMouseClick)
|
|
12373
|
-
}]),
|
|
12174
|
+
class: normalizeClass(["file-explorer-item", { "keyboard-focus": unref(keyPressedUntilMouseClick) }]),
|
|
12374
12175
|
"is-dragging": unref(isDragging),
|
|
12375
12176
|
onDragenter: _cache[0] || (_cache[0] = ($event) => unref(onDragEnter)($event, -1, true)),
|
|
12376
12177
|
onDragleave: _cache[1] || (_cache[1] = ($event) => unref(onDragLeave)($event, -1, true)),
|
|
@@ -12380,10 +12181,8 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12380
12181
|
onClick: _cache[4] || (_cache[4] = ($event) => changeDirectory(".."))
|
|
12381
12182
|
}, null, 8, ["class", "is-dragging", "onDragover"])) : createCommentVNode("", true)
|
|
12382
12183
|
]),
|
|
12383
|
-
createElementVNode("tbody",
|
|
12384
|
-
|
|
12385
|
-
}, [
|
|
12386
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(renderedItems.value, (item, vIndex) => {
|
|
12184
|
+
createElementVNode("tbody", normalizeProps(guardReactiveProps(unref(wrapperProps))), [
|
|
12185
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(list), ({ data: item, index }) => {
|
|
12387
12186
|
return openBlock(), createBlock(FileExplorerItem, {
|
|
12388
12187
|
key: item.id,
|
|
12389
12188
|
ref_for: true,
|
|
@@ -12394,35 +12193,28 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12394
12193
|
disabled: item.disabled ?? false,
|
|
12395
12194
|
item,
|
|
12396
12195
|
"is-dragging": unref(isDragging),
|
|
12397
|
-
"is-selected": unref(isSelected)(
|
|
12196
|
+
"is-selected": unref(isSelected)(index),
|
|
12398
12197
|
"is-rename-active": item.id === activeRenamedItemId.value,
|
|
12399
12198
|
"blacklisted-names": blacklistedNames.value,
|
|
12400
12199
|
"is-dragging-enabled": !__props.disableDragging,
|
|
12401
12200
|
"has-options-menu": hasOptionsMenu.value,
|
|
12402
|
-
onDragstart: ($event) => unref(onDragStart)($event,
|
|
12403
|
-
onDragenter: ($event) => unref(onDragEnter)($event,
|
|
12201
|
+
onDragstart: ($event) => unref(onDragStart)($event, index),
|
|
12202
|
+
onDragenter: ($event) => unref(onDragEnter)($event, index),
|
|
12404
12203
|
onDragover: _cache[8] || (_cache[8] = ($event) => unref(onDragOver)($event)),
|
|
12405
|
-
onDragleave: ($event) => unref(onDragLeave)($event,
|
|
12204
|
+
onDragleave: ($event) => unref(onDragLeave)($event, index),
|
|
12406
12205
|
onDragend: ($event) => forwardEmit("dragend", unref(onDragEnd)($event, item)),
|
|
12407
12206
|
onDrag: ($event) => forwardEmit("drag", unref(onDrag)($event, item)),
|
|
12408
|
-
onClick: ($event) => onItemClick(item, $event,
|
|
12409
|
-
onContextmenu: ($event) => openContextMenuByMouse($event, item,
|
|
12207
|
+
onClick: ($event) => onItemClick(item, $event, index),
|
|
12208
|
+
onContextmenu: ($event) => openContextMenuByMouse($event, item, index),
|
|
12410
12209
|
onKeydown: [
|
|
12411
|
-
withKeys(withModifiers(($event) => openContextMenuByKeyboard(item,
|
|
12210
|
+
withKeys(withModifiers(($event) => openContextMenuByKeyboard(item, index), ["shift", "prevent"]), ["f10"]),
|
|
12412
12211
|
withKeys(withModifiers(($event) => handleEnterKey($event, item), ["prevent"]), ["enter"])
|
|
12413
12212
|
],
|
|
12414
|
-
onDrop: ($event) => forwardEmit("moveItems", unref(onDrop)($event,
|
|
12213
|
+
onDrop: ($event) => forwardEmit("moveItems", unref(onDrop)($event, index)),
|
|
12415
12214
|
onDblclick: ($event) => openFileOrEnterFolder(item),
|
|
12416
12215
|
"onRename:submit": _cache[9] || (_cache[9] = ($event) => emit("renameFile", $event)),
|
|
12417
12216
|
"onRename:clear": _cache[10] || (_cache[10] = ($event) => activeRenamedItemId.value = null)
|
|
12418
12217
|
}, createSlots({ _: 2 }, [
|
|
12419
|
-
_ctx.$slots.itemIcon ? {
|
|
12420
|
-
name: "icon",
|
|
12421
|
-
fn: withCtx(() => [
|
|
12422
|
-
renderSlot(_ctx.$slots, "itemIcon", { item }, void 0, true)
|
|
12423
|
-
]),
|
|
12424
|
-
key: "0"
|
|
12425
|
-
} : void 0,
|
|
12426
12218
|
renderList(dynamicColumnSlotNames.value, (name) => {
|
|
12427
12219
|
return {
|
|
12428
12220
|
name,
|
|
@@ -12453,10 +12245,10 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12453
12245
|
}, ["stop"])),
|
|
12454
12246
|
onDblclick: _cache[7] || (_cache[7] = withModifiers(() => {
|
|
12455
12247
|
}, ["stop"])),
|
|
12456
|
-
"onUpdate:modelValue": ($event) => openByOptionsMenu($event, item,
|
|
12248
|
+
"onUpdate:modelValue": ($event) => openByOptionsMenu($event, item, index)
|
|
12457
12249
|
}, null, 8, ["model-value", "size", "aria-expanded", "style", "onUpdate:modelValue"])
|
|
12458
12250
|
]),
|
|
12459
|
-
key: "
|
|
12251
|
+
key: "0"
|
|
12460
12252
|
} : void 0
|
|
12461
12253
|
]), 1032, ["class", "disabled", "item", "is-dragging", "is-selected", "is-rename-active", "blacklisted-names", "is-dragging-enabled", "has-options-menu", "onDragstart", "onDragenter", "onDragleave", "onDragend", "onDrag", "onClick", "onContextmenu", "onKeydown", "onDrop", "onDblclick"]);
|
|
12462
12254
|
}), 128)),
|
|
@@ -12467,7 +12259,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12467
12259
|
}, __props.emptyState), null, 16, ["headline"])
|
|
12468
12260
|
])
|
|
12469
12261
|
])) : createCommentVNode("", true)
|
|
12470
|
-
],
|
|
12262
|
+
], 16),
|
|
12471
12263
|
__props.draggingAnimationMode !== "disabled" ? (openBlock(), createElementBlock("div", {
|
|
12472
12264
|
key: 0,
|
|
12473
12265
|
ref_key: "customPreviewContainer",
|
|
@@ -12512,7 +12304,7 @@ const _sfc_main$13 = /* @__PURE__ */ defineComponent({
|
|
|
12512
12304
|
}
|
|
12513
12305
|
});
|
|
12514
12306
|
|
|
12515
|
-
const KdsFileExplorer = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-
|
|
12307
|
+
const KdsFileExplorer = /* @__PURE__ */ _export_sfc(_sfc_main$13, [["__scopeId", "data-v-da0e6dab"]]);
|
|
12516
12308
|
|
|
12517
12309
|
const kdsFileExplorerSize = {
|
|
12518
12310
|
SMALL: "small",
|
|
@@ -12754,7 +12546,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
12754
12546
|
}
|
|
12755
12547
|
});
|
|
12756
12548
|
|
|
12757
|
-
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-
|
|
12549
|
+
const BaseCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$11, [["__scopeId", "data-v-0bec87ad"]]);
|
|
12758
12550
|
|
|
12759
12551
|
const _sfc_main$10 = /* @__PURE__ */ defineComponent({
|
|
12760
12552
|
__name: "KdsCheckbox",
|
|
@@ -21976,7 +21768,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
21976
21768
|
}
|
|
21977
21769
|
});
|
|
21978
21770
|
|
|
21979
|
-
const DropdownContainer = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-
|
|
21771
|
+
const DropdownContainer = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["__scopeId", "data-v-0a6ce241"]]);
|
|
21980
21772
|
|
|
21981
21773
|
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
21982
21774
|
__name: "KdsDropdown",
|
|
@@ -25649,7 +25441,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
25649
25441
|
key: `${breadcrumbItem.to ?? breadcrumbItem.text ?? "breadcrumb-item"}-${i}`,
|
|
25650
25442
|
ref_for: true,
|
|
25651
25443
|
ref: unref(itemRefs).set,
|
|
25652
|
-
class: normalizeClass({
|
|
25444
|
+
class: normalizeClass({
|
|
25445
|
+
current: isCurrentItem(i),
|
|
25446
|
+
"no-icon": !breadcrumbItem.leadingIcon,
|
|
25447
|
+
"no-text": !breadcrumbItem.text
|
|
25448
|
+
})
|
|
25653
25449
|
}, [
|
|
25654
25450
|
createVNode(BreadcrumbItem, {
|
|
25655
25451
|
item: breadcrumbItem,
|
|
@@ -25671,7 +25467,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
25671
25467
|
}
|
|
25672
25468
|
});
|
|
25673
25469
|
|
|
25674
|
-
const KdsBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-
|
|
25470
|
+
const KdsBreadcrumb = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-8661f06f"]]);
|
|
25675
25471
|
|
|
25676
25472
|
const kdsModalClosedBy = {
|
|
25677
25473
|
ANY: "any",
|