@knime/kds-components 0.2.1 → 0.3.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/dist/Modal/{KdsConfirmDialog.vue.d.ts → KdsDynamicModalProvider.vue.d.ts} +1 -1
- package/dist/Modal/KdsDynamicModalProvider.vue.d.ts.map +1 -0
- package/dist/Modal/KdsModal.vue.d.ts +7 -1
- package/dist/Modal/KdsModal.vue.d.ts.map +1 -1
- package/dist/Modal/KdsModalLayout.vue.d.ts +20 -0
- package/dist/Modal/KdsModalLayout.vue.d.ts.map +1 -0
- package/dist/Modal/types.d.ts +9 -2
- package/dist/Modal/types.d.ts.map +1 -1
- package/dist/index.css +52 -50
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +187 -130
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/Modal/KdsConfirmDialog.vue.d.ts.map +0 -1
- package/dist/Modal/useKdsConfirmDialog.d.ts +0 -150
- package/dist/Modal/useKdsConfirmDialog.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { shallowRef, watch, defineComponent, toRef, createBlock, createElementBlock, unref, openBlock, resolveDynamicComponent, normalizeClass, computed, withCtx, createCommentVNode, toDisplayString, mergeProps, h, useSlots, getCurrentInstance, useId, createElementVNode,
|
|
1
|
+
import { shallowRef, watch, defineComponent, toRef, createBlock, createElementBlock, unref, openBlock, resolveDynamicComponent, normalizeClass, computed, withCtx, createCommentVNode, toDisplayString, mergeProps, h, useSlots, getCurrentInstance, useId, createElementVNode, Fragment, createVNode, renderSlot, useCssVars, useTemplateRef, nextTick, withModifiers, ref, createSlots, renderList, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
2
|
import { useLocalStorage, useDark, usePreferredDark } from '@vueuse/core';
|
|
3
3
|
|
|
4
4
|
import './index.css';const __variableDynamicImportRuntimeHelper = (glob$1, path$13, segs) => {
|
|
@@ -35,7 +35,7 @@ const useIcon = ({
|
|
|
35
35
|
return iconComponent;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
const _sfc_main$
|
|
38
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
39
39
|
__name: "KdsIcon",
|
|
40
40
|
props: {
|
|
41
41
|
name: {},
|
|
@@ -68,13 +68,13 @@ const _export_sfc = (sfc, props) => {
|
|
|
68
68
|
return target;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
71
|
+
const KdsIcon = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-d965b88c"]]);
|
|
72
72
|
|
|
73
|
-
const _hoisted_1$
|
|
73
|
+
const _hoisted_1$5 = {
|
|
74
74
|
key: 1,
|
|
75
75
|
class: "label"
|
|
76
76
|
};
|
|
77
|
-
const _sfc_main$
|
|
77
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
78
78
|
__name: "BaseButton",
|
|
79
79
|
props: {
|
|
80
80
|
variant: { default: "filled" },
|
|
@@ -121,7 +121,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
121
121
|
name: props.leadingIcon,
|
|
122
122
|
size: iconSize.value
|
|
123
123
|
}, null, 8, ["name", "size"])) : createCommentVNode("", true),
|
|
124
|
-
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$
|
|
124
|
+
props.label ? (openBlock(), createElementBlock("span", _hoisted_1$5, toDisplayString(props.label), 1)) : createCommentVNode("", true),
|
|
125
125
|
props.trailingIcon && props.label ? (openBlock(), createBlock(KdsIcon, {
|
|
126
126
|
key: 2,
|
|
127
127
|
name: props.trailingIcon,
|
|
@@ -134,9 +134,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
-
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
137
|
+
const BaseButton = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-f82890d7"]]);
|
|
138
138
|
|
|
139
|
-
const _sfc_main$
|
|
139
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
140
140
|
__name: "KdsButton",
|
|
141
141
|
props: {
|
|
142
142
|
variant: {},
|
|
@@ -187,7 +187,7 @@ const resolveNuxtLinkComponent = () => {
|
|
|
187
187
|
return fallbackComponent;
|
|
188
188
|
};
|
|
189
189
|
|
|
190
|
-
const _sfc_main$
|
|
190
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
191
191
|
__name: "KdsLinkButton",
|
|
192
192
|
props: {
|
|
193
193
|
variant: {},
|
|
@@ -221,15 +221,15 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
221
221
|
}
|
|
222
222
|
});
|
|
223
223
|
|
|
224
|
-
const _hoisted_1$
|
|
224
|
+
const _hoisted_1$4 = ["disabled", "aria-checked", "aria-describedby", "aria-invalid", "title"];
|
|
225
225
|
const _hoisted_2$2 = { class: "control" };
|
|
226
226
|
const _hoisted_3$2 = {
|
|
227
227
|
key: 0,
|
|
228
228
|
class: "content"
|
|
229
229
|
};
|
|
230
|
-
const _hoisted_4
|
|
230
|
+
const _hoisted_4 = { class: "label" };
|
|
231
231
|
const _hoisted_5 = ["id"];
|
|
232
|
-
const _sfc_main$
|
|
232
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
233
233
|
__name: "KdsCheckbox",
|
|
234
234
|
props: {
|
|
235
235
|
modelValue: { type: [Boolean, String], default: false },
|
|
@@ -295,19 +295,19 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
295
295
|
}, null, 8, ["name"])) : createCommentVNode("", true)
|
|
296
296
|
]),
|
|
297
297
|
props.label || props.helperText ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
298
|
-
createElementVNode("div", _hoisted_4
|
|
298
|
+
createElementVNode("div", _hoisted_4, toDisplayString(props.label), 1),
|
|
299
299
|
props.helperText ? (openBlock(), createElementBlock("div", {
|
|
300
300
|
key: 0,
|
|
301
301
|
id: `${unref(id)}-helper`,
|
|
302
302
|
class: "helper-text"
|
|
303
303
|
}, toDisplayString(props.helperText), 9, _hoisted_5)) : createCommentVNode("", true)
|
|
304
304
|
])) : createCommentVNode("", true)
|
|
305
|
-
], 10, _hoisted_1$
|
|
305
|
+
], 10, _hoisted_1$4);
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
});
|
|
309
309
|
|
|
310
|
-
const KdsCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
310
|
+
const KdsCheckbox = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-9fc2815a"]]);
|
|
311
311
|
|
|
312
312
|
const ID_TO_ICON_MAP = {
|
|
313
313
|
// Flow Variables
|
|
@@ -453,8 +453,8 @@ const typeIconNames = [
|
|
|
453
453
|
"xml-datatype"
|
|
454
454
|
];
|
|
455
455
|
|
|
456
|
-
const _hoisted_1$
|
|
457
|
-
const _sfc_main$
|
|
456
|
+
const _hoisted_1$3 = ["title"];
|
|
457
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
458
458
|
__name: "KdsDataType",
|
|
459
459
|
props: {
|
|
460
460
|
iconName: { default: "unknown-datatype" },
|
|
@@ -494,17 +494,63 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
494
494
|
"aria-hidden": "true",
|
|
495
495
|
focusable: "false"
|
|
496
496
|
}, null, 8, ["class"]))
|
|
497
|
-
], 10, _hoisted_1$
|
|
497
|
+
], 10, _hoisted_1$3);
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
const KdsDataType = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__scopeId", "data-v-f7d93fdf"]]);
|
|
503
|
+
|
|
504
|
+
const _hoisted_1$2 = { class: "modal-header" };
|
|
505
|
+
const _hoisted_2$1 = { class: "modal-header-title" };
|
|
506
|
+
const _hoisted_3$1 = {
|
|
507
|
+
key: 0,
|
|
508
|
+
class: "modal-footer"
|
|
509
|
+
};
|
|
510
|
+
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
511
|
+
...{ inheritAttrs: false },
|
|
512
|
+
__name: "KdsModalLayout",
|
|
513
|
+
props: {
|
|
514
|
+
title: {},
|
|
515
|
+
variant: {},
|
|
516
|
+
icon: {},
|
|
517
|
+
onClose: { type: Function }
|
|
518
|
+
},
|
|
519
|
+
setup(__props) {
|
|
520
|
+
const props = __props;
|
|
521
|
+
return (_ctx, _cache) => {
|
|
522
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
523
|
+
createElementVNode("header", _hoisted_1$2, [
|
|
524
|
+
props.icon ? (openBlock(), createBlock(KdsIcon, {
|
|
525
|
+
key: 0,
|
|
526
|
+
name: props.icon,
|
|
527
|
+
size: "medium"
|
|
528
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
529
|
+
createElementVNode("div", _hoisted_2$1, toDisplayString(props.title), 1),
|
|
530
|
+
createVNode(_sfc_main$6, {
|
|
531
|
+
"leading-icon": "x-close",
|
|
532
|
+
variant: "transparent",
|
|
533
|
+
size: "medium",
|
|
534
|
+
title: "Close",
|
|
535
|
+
onClick: props.onClose
|
|
536
|
+
}, null, 8, ["onClick"])
|
|
537
|
+
]),
|
|
538
|
+
createElementVNode("div", {
|
|
539
|
+
class: normalizeClass(["modal-body", `modal-body-variant-${__props.variant}`])
|
|
540
|
+
}, [
|
|
541
|
+
renderSlot(_ctx.$slots, "body", {}, void 0, true)
|
|
542
|
+
], 2),
|
|
543
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$1, [
|
|
544
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
545
|
+
])) : createCommentVNode("", true)
|
|
546
|
+
], 64);
|
|
498
547
|
};
|
|
499
548
|
}
|
|
500
549
|
});
|
|
501
550
|
|
|
502
|
-
const
|
|
551
|
+
const KdsModalLayout = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-5a49b1d8"]]);
|
|
503
552
|
|
|
504
553
|
const _hoisted_1$1 = ["closedby"];
|
|
505
|
-
const _hoisted_2$1 = { class: "modal-header" };
|
|
506
|
-
const _hoisted_3$1 = { class: "modal-header-title" };
|
|
507
|
-
const _hoisted_4 = { class: "modal-footer" };
|
|
508
554
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
509
555
|
__name: "KdsModal",
|
|
510
556
|
props: {
|
|
@@ -519,14 +565,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
519
565
|
emits: ["close"],
|
|
520
566
|
setup(__props, { emit: __emit }) {
|
|
521
567
|
useCssVars((_ctx) => ({
|
|
522
|
-
"
|
|
523
|
-
"
|
|
568
|
+
"v002a6132": cssModalWidth.value,
|
|
569
|
+
"v38bfb8b4": cssModalHeight.value
|
|
524
570
|
}));
|
|
525
571
|
const props = __props;
|
|
526
572
|
const emit = __emit;
|
|
527
573
|
const dialog = useTemplateRef("dialogElement");
|
|
528
|
-
const onClose = (
|
|
529
|
-
emit("close",
|
|
574
|
+
const onClose = (event) => {
|
|
575
|
+
emit("close", event);
|
|
530
576
|
};
|
|
531
577
|
watch(
|
|
532
578
|
() => props.active,
|
|
@@ -565,37 +611,34 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
565
611
|
closedby: __props.closedby,
|
|
566
612
|
onCancel: withModifiers(onClose, ["prevent"])
|
|
567
613
|
}, [
|
|
568
|
-
__props.active ? (
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
591
|
-
])
|
|
592
|
-
], 64)) : createCommentVNode("", true)
|
|
614
|
+
__props.active ? renderSlot(_ctx.$slots, "default", {
|
|
615
|
+
key: 0,
|
|
616
|
+
title: __props.title,
|
|
617
|
+
icon: __props.icon,
|
|
618
|
+
variant: __props.variant,
|
|
619
|
+
onClose
|
|
620
|
+
}, () => [
|
|
621
|
+
createVNode(KdsModalLayout, {
|
|
622
|
+
title: __props.title,
|
|
623
|
+
icon: __props.icon,
|
|
624
|
+
variant: __props.variant,
|
|
625
|
+
onClose
|
|
626
|
+
}, {
|
|
627
|
+
body: withCtx(() => [
|
|
628
|
+
renderSlot(_ctx.$slots, "body", {}, void 0, true)
|
|
629
|
+
]),
|
|
630
|
+
footer: withCtx(() => [
|
|
631
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
632
|
+
]),
|
|
633
|
+
_: 3
|
|
634
|
+
}, 8, ["title", "icon", "variant"])
|
|
635
|
+
], true) : createCommentVNode("", true)
|
|
593
636
|
], 40, _hoisted_1$1);
|
|
594
637
|
};
|
|
595
638
|
}
|
|
596
639
|
});
|
|
597
640
|
|
|
598
|
-
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
641
|
+
const KdsModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-8984a5b0"]]);
|
|
599
642
|
|
|
600
643
|
const createUnwrappedPromise = () => {
|
|
601
644
|
let resolve = () => {
|
|
@@ -619,45 +662,58 @@ const defaultConfirmButton = {
|
|
|
619
662
|
};
|
|
620
663
|
const isActive = ref(false);
|
|
621
664
|
const activeModalConfig = ref(null);
|
|
622
|
-
const unwrappedPromise = ref(
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
665
|
+
const unwrappedPromise = ref(createUnwrappedPromise());
|
|
666
|
+
const resetInternalState = () => {
|
|
667
|
+
isActive.value = false;
|
|
668
|
+
activeModalConfig.value = null;
|
|
669
|
+
unwrappedPromise.value = createUnwrappedPromise();
|
|
670
|
+
};
|
|
671
|
+
const confirm = (doNotAskAgain = false) => {
|
|
672
|
+
unwrappedPromise.value.resolve({
|
|
673
|
+
confirmed: true,
|
|
674
|
+
doNotAskAgain
|
|
675
|
+
});
|
|
676
|
+
resetInternalState();
|
|
677
|
+
};
|
|
678
|
+
const close = () => {
|
|
679
|
+
const isConfirm = activeModalConfig.value?.type === "confirm";
|
|
680
|
+
unwrappedPromise.value.resolve(isConfirm ? { confirmed: false } : void 0);
|
|
681
|
+
resetInternalState();
|
|
682
|
+
};
|
|
683
|
+
const isTemplateBasedConfirm = (config) => {
|
|
626
684
|
return "component" in config;
|
|
627
685
|
};
|
|
628
|
-
const
|
|
629
|
-
|
|
686
|
+
const internal = {
|
|
687
|
+
confirm,
|
|
688
|
+
close,
|
|
689
|
+
isTemplateBasedConfirm
|
|
690
|
+
};
|
|
691
|
+
const useKdsDynamicModal = () => {
|
|
692
|
+
function askConfirmation(config) {
|
|
630
693
|
activeModalConfig.value = {
|
|
631
|
-
|
|
632
|
-
|
|
694
|
+
type: "confirm",
|
|
695
|
+
value: {
|
|
696
|
+
buttons: [defaultCancelButton, defaultConfirmButton],
|
|
697
|
+
...config
|
|
698
|
+
}
|
|
633
699
|
};
|
|
634
700
|
isActive.value = true;
|
|
635
701
|
return unwrappedPromise.value.promise;
|
|
636
702
|
}
|
|
637
|
-
const
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
unwrappedPromise.value.
|
|
644
|
-
confirmed: true,
|
|
645
|
-
doNotAskAgain
|
|
646
|
-
});
|
|
647
|
-
close();
|
|
648
|
-
};
|
|
649
|
-
const cancel = () => {
|
|
650
|
-
unwrappedPromise.value.resolve({ confirmed: false });
|
|
651
|
-
close();
|
|
703
|
+
const showByTemplate = (config) => {
|
|
704
|
+
activeModalConfig.value = {
|
|
705
|
+
type: "dynamic",
|
|
706
|
+
value: config
|
|
707
|
+
};
|
|
708
|
+
isActive.value = true;
|
|
709
|
+
return unwrappedPromise.value.promise;
|
|
652
710
|
};
|
|
653
711
|
return {
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
cancel,
|
|
712
|
+
askConfirmation,
|
|
713
|
+
showByTemplate,
|
|
657
714
|
config: computed(() => activeModalConfig.value),
|
|
658
715
|
isActive: computed(() => isActive.value),
|
|
659
|
-
|
|
660
|
-
isComponentBasedConfig
|
|
716
|
+
close: () => internal.close()
|
|
661
717
|
};
|
|
662
718
|
};
|
|
663
719
|
|
|
@@ -671,73 +727,67 @@ const _hoisted_3 = {
|
|
|
671
727
|
class: "ask-again"
|
|
672
728
|
};
|
|
673
729
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
674
|
-
__name: "
|
|
730
|
+
__name: "KdsDynamicModalProvider",
|
|
675
731
|
setup(__props) {
|
|
676
732
|
const askAgain = ref(false);
|
|
677
|
-
const { config, isActive
|
|
733
|
+
const { config, isActive } = useKdsDynamicModal();
|
|
678
734
|
const reset = () => {
|
|
679
735
|
askAgain.value = false;
|
|
680
736
|
};
|
|
681
737
|
const onConfirm = () => {
|
|
682
|
-
confirm(askAgain.value);
|
|
738
|
+
internal.confirm(askAgain.value);
|
|
683
739
|
reset();
|
|
684
740
|
};
|
|
685
|
-
const
|
|
686
|
-
|
|
741
|
+
const onClose = () => {
|
|
742
|
+
internal.close();
|
|
687
743
|
reset();
|
|
688
744
|
};
|
|
689
|
-
const
|
|
690
|
-
if (button.customHandler) {
|
|
691
|
-
button.
|
|
692
|
-
|
|
693
|
-
}
|
|
694
|
-
onConfirm();
|
|
695
|
-
};
|
|
696
|
-
const handleCancelButtonClick = (button) => {
|
|
697
|
-
if (button.customHandler) {
|
|
698
|
-
button.customHandler({ cancel: onCancel });
|
|
745
|
+
const handleConfirmButton = (button) => {
|
|
746
|
+
if (!button.customHandler) {
|
|
747
|
+
const handler = button.type === "cancel" ? onClose : onConfirm;
|
|
748
|
+
handler();
|
|
699
749
|
return;
|
|
700
750
|
}
|
|
701
|
-
onCancel();
|
|
702
|
-
};
|
|
703
|
-
const handleButtonClick = (button) => {
|
|
704
751
|
if (button.type === "cancel") {
|
|
705
|
-
|
|
706
|
-
}
|
|
707
|
-
|
|
752
|
+
button.customHandler({ cancel: onClose });
|
|
753
|
+
}
|
|
754
|
+
if (button.type === "confirm") {
|
|
755
|
+
button.customHandler({ confirm: onConfirm });
|
|
708
756
|
}
|
|
709
757
|
};
|
|
710
758
|
const defaultVariant = (type) => type === "cancel" ? "transparent" : "filled";
|
|
711
759
|
return (_ctx, _cache) => {
|
|
712
760
|
return openBlock(), createBlock(KdsModal, {
|
|
713
|
-
class: "confirm-
|
|
761
|
+
class: "confirm-modal",
|
|
714
762
|
active: unref(isActive),
|
|
715
|
-
title: unref(config)?.title,
|
|
716
|
-
closedby: unref(config)?.closedby,
|
|
717
|
-
icon: unref(config)?.icon,
|
|
718
|
-
onClose
|
|
719
|
-
}, createSlots({
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
unref(config)
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
763
|
+
title: unref(config)?.value.title,
|
|
764
|
+
closedby: unref(config)?.value.closedby,
|
|
765
|
+
icon: unref(config)?.value.icon,
|
|
766
|
+
onClose
|
|
767
|
+
}, createSlots({ _: 2 }, [
|
|
768
|
+
unref(config)?.type === "confirm" ? {
|
|
769
|
+
name: "body",
|
|
770
|
+
fn: withCtx(() => [
|
|
771
|
+
unref(internal).isTemplateBasedConfirm(unref(config).value) ? (openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), { key: 0 })) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
772
|
+
createElementVNode("div", _hoisted_2, toDisplayString(unref(config).value.message), 1),
|
|
773
|
+
unref(config).value.doNotAskAgain ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
774
|
+
createVNode(KdsCheckbox, {
|
|
775
|
+
modelValue: askAgain.value,
|
|
776
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => askAgain.value = $event),
|
|
777
|
+
label: unref(config).value.doNotAskAgain.label,
|
|
778
|
+
title: unref(config).value.doNotAskAgain.title,
|
|
779
|
+
"helper-text": unref(config).value.doNotAskAgain.helperText
|
|
780
|
+
}, null, 8, ["modelValue", "label", "title", "helper-text"])
|
|
781
|
+
])) : createCommentVNode("", true)
|
|
782
|
+
]))
|
|
783
|
+
]),
|
|
784
|
+
key: "0"
|
|
785
|
+
} : void 0,
|
|
786
|
+
unref(config)?.type === "confirm" ? {
|
|
737
787
|
name: "footer",
|
|
738
788
|
fn: withCtx(() => [
|
|
739
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).buttons, (button, index) => {
|
|
740
|
-
return openBlock(), createBlock(_sfc_main$
|
|
789
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(config).value.buttons, (button, index) => {
|
|
790
|
+
return openBlock(), createBlock(_sfc_main$6, {
|
|
741
791
|
key: index,
|
|
742
792
|
destructive: button.destructive,
|
|
743
793
|
autofocus: button.autofocus,
|
|
@@ -745,18 +795,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
745
795
|
variant: button.variant ?? defaultVariant(button.type),
|
|
746
796
|
class: normalizeClass({ "flush-left": button.flushLeft }),
|
|
747
797
|
"data-test-id": `${button.type}-button`,
|
|
748
|
-
onClick: ($event) =>
|
|
798
|
+
onClick: ($event) => handleConfirmButton(button)
|
|
749
799
|
}, null, 8, ["destructive", "autofocus", "label", "variant", "class", "data-test-id", "onClick"]);
|
|
750
800
|
}), 128))
|
|
751
801
|
]),
|
|
752
|
-
key: "
|
|
802
|
+
key: "1"
|
|
803
|
+
} : void 0,
|
|
804
|
+
unref(config)?.type === "dynamic" ? {
|
|
805
|
+
name: "default",
|
|
806
|
+
fn: withCtx((slotProps) => [
|
|
807
|
+
(openBlock(), createBlock(resolveDynamicComponent(unref(config).value.component), normalizeProps(guardReactiveProps(slotProps)), null, 16))
|
|
808
|
+
]),
|
|
809
|
+
key: "2"
|
|
753
810
|
} : void 0
|
|
754
811
|
]), 1032, ["active", "title", "closedby", "icon"]);
|
|
755
812
|
};
|
|
756
813
|
}
|
|
757
814
|
});
|
|
758
815
|
|
|
759
|
-
const
|
|
816
|
+
const KdsDynamicModalProvider = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d1529fac"]]);
|
|
760
817
|
|
|
761
818
|
const KDS_DARK_MODE_STORAGE_KEY = "KNIME_DARK_MODE";
|
|
762
819
|
const defaultMode = "light";
|
|
@@ -837,5 +894,5 @@ const useKdsLegacyMode = (initialValue = false) => {
|
|
|
837
894
|
};
|
|
838
895
|
};
|
|
839
896
|
|
|
840
|
-
export { _sfc_main$
|
|
897
|
+
export { _sfc_main$6 as KdsButton, KdsCheckbox, KdsDataType, KdsDynamicModalProvider, KdsIcon, _sfc_main$5 as KdsLinkButton, KdsModal, KdsModalLayout, useKdsDarkMode, useKdsDynamicModal, useKdsLegacyMode };
|
|
841
898
|
//# sourceMappingURL=index.js.map
|