fds-vue-core 2.0.49 → 2.0.51
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/App.vue.d.ts.map +1 -1
- package/dist/components/FdsTreeView/TreeNode.vue.d.ts.map +1 -1
- package/dist/components/Form/FdsSelect/FdsSelect.vue.d.ts +16 -1
- package/dist/components/Form/FdsSelect/FdsSelect.vue.d.ts.map +1 -1
- package/dist/fds-vue-core.cjs.js +18 -12
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.es.js +18 -12
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +1 -1
package/dist/App.vue.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"App.vue.d.ts","sourceRoot":"","sources":["../src/App.vue"],"names":[],"mappings":";AAuVA,wBACG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreeNode.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FdsTreeView/TreeNode.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TreeNode.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FdsTreeView/TreeNode.vue"],"names":[],"mappings":"AAyYA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAO/C,KAAK,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAA;AAE7D,KAAK,WAAW,GAAG,KAAK,CAAC;;;;;;;;;;;;;;;;;AA4rBzB,wBAGG"}
|
|
@@ -3,7 +3,11 @@ type __VLS_Props = FdsSelectProps;
|
|
|
3
3
|
type __VLS_PublicProps = __VLS_Props & {
|
|
4
4
|
modelValue?: string;
|
|
5
5
|
};
|
|
6
|
-
declare
|
|
6
|
+
declare var __VLS_1: {};
|
|
7
|
+
type __VLS_Slots = {} & {
|
|
8
|
+
default?: (props: typeof __VLS_1) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
11
|
"update:modelValue": (value: string) => any;
|
|
8
12
|
} & {
|
|
9
13
|
change: (ev: Event) => any;
|
|
@@ -21,10 +25,21 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
21
25
|
name: string;
|
|
22
26
|
id: string;
|
|
23
27
|
meta: string;
|
|
28
|
+
options: {
|
|
29
|
+
value: string;
|
|
30
|
+
label: string;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
}[];
|
|
24
33
|
placeholder: string;
|
|
25
34
|
valid: "true" | "false" | "null";
|
|
26
35
|
optional: boolean;
|
|
27
36
|
invalidMessage: string;
|
|
28
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
29
39
|
export default _default;
|
|
40
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
30
45
|
//# sourceMappingURL=FdsSelect.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FdsSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FdsSelect/FdsSelect.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FdsSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FdsSelect/FdsSelect.vue"],"names":[],"mappings":"AA6HA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAK7C,KAAK,WAAW,GAAG,cAAc,CAAC;AAgFlC,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAyIF,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AA4B/C,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;gBAhQrB,CArHqD;;;;;;4EAyXnD,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAY1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -1281,16 +1281,16 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
1281
1281
|
}
|
|
1282
1282
|
return `Fäll ut ${title}`;
|
|
1283
1283
|
};
|
|
1284
|
+
const hasChildrenNodes = vue.computed(() => {
|
|
1285
|
+
const nodesToCheck = props.searchEnabled && treeState?.searchTerm?.value ? filteredNodes.value : props.nodes;
|
|
1286
|
+
return Array.isArray(nodesToCheck) && nodesToCheck.length > 0;
|
|
1287
|
+
});
|
|
1284
1288
|
const indentValue = props.depth * props.indentation;
|
|
1285
1289
|
const indent = vue.computed(() => ({
|
|
1286
1290
|
flexDirection: "row",
|
|
1287
1291
|
alignItems: "center",
|
|
1288
|
-
paddingLeft: `${indentValue}px`
|
|
1292
|
+
paddingLeft: `${indentValue + (hasChildrenNodes.value ? 0 : 4)}px`
|
|
1289
1293
|
}));
|
|
1290
|
-
const hasChildrenNodes = vue.computed(() => {
|
|
1291
|
-
const nodesToCheck = props.searchEnabled && treeState?.searchTerm?.value ? filteredNodes.value : props.nodes;
|
|
1292
|
-
return Array.isArray(nodesToCheck) && nodesToCheck.length > 0;
|
|
1293
|
-
});
|
|
1294
1294
|
const filteredNodes = vue.computed(() => {
|
|
1295
1295
|
const t = String(treeState?.searchTerm?.value || "").trim();
|
|
1296
1296
|
if (!props.searchEnabled || !t || t.length < (treeState?.triggerLength ?? 1)) {
|
|
@@ -1406,9 +1406,13 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
|
|
|
1406
1406
|
return "";
|
|
1407
1407
|
});
|
|
1408
1408
|
const selectedOption = vue.ref(currentOption.value);
|
|
1409
|
-
vue.watch(
|
|
1410
|
-
|
|
1411
|
-
|
|
1409
|
+
vue.watch(
|
|
1410
|
+
currentOption,
|
|
1411
|
+
(newValue) => {
|
|
1412
|
+
selectedOption.value = newValue;
|
|
1413
|
+
},
|
|
1414
|
+
{ immediate: true }
|
|
1415
|
+
);
|
|
1412
1416
|
vue.watch(selectedOption, (newValue) => {
|
|
1413
1417
|
if (newValue) {
|
|
1414
1418
|
handleOptionClick(newValue);
|
|
@@ -2705,7 +2709,7 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
2705
2709
|
name: { default: void 0 },
|
|
2706
2710
|
id: { default: void 0 },
|
|
2707
2711
|
placeholder: { default: "Välj..." },
|
|
2708
|
-
options: {}
|
|
2712
|
+
options: { default: void 0 }
|
|
2709
2713
|
}, {
|
|
2710
2714
|
"modelValue": { default: void 0, required: false },
|
|
2711
2715
|
"modelModifiers": {}
|
|
@@ -2717,6 +2721,8 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
2717
2721
|
const emit = __emit;
|
|
2718
2722
|
const autoId = `fds-select-${Math.random().toString(36).slice(2, 9)}`;
|
|
2719
2723
|
const selectId = vue.computed(() => props.id ?? autoId);
|
|
2724
|
+
const slots = vue.useSlots();
|
|
2725
|
+
const hasDefaultSlot = vue.computed(() => !!slots.default);
|
|
2720
2726
|
const showInvalidMessage = vue.computed(
|
|
2721
2727
|
() => props.valid === "false" && !props.optional && props.invalidMessage && !props.disabled
|
|
2722
2728
|
);
|
|
@@ -2761,14 +2767,14 @@ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
|
|
|
2761
2767
|
onChange: handleChange,
|
|
2762
2768
|
onInput: _cache[1] || (_cache[1] = (e) => emit("input", e))
|
|
2763
2769
|
}), [
|
|
2764
|
-
_ctx.placeholder ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_5$3, vue.toDisplayString(_ctx.placeholder), 1)) : vue.createCommentVNode("", true),
|
|
2765
|
-
(vue.openBlock(true), vue.createElementBlock(vue.Fragment,
|
|
2770
|
+
_ctx.placeholder && !hasDefaultSlot.value ? (vue.openBlock(), vue.createElementBlock("option", _hoisted_5$3, vue.toDisplayString(_ctx.placeholder), 1)) : vue.createCommentVNode("", true),
|
|
2771
|
+
!hasDefaultSlot.value && _ctx.options ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 1 }, vue.renderList(_ctx.options, (option) => {
|
|
2766
2772
|
return vue.openBlock(), vue.createElementBlock("option", {
|
|
2767
2773
|
key: option.value,
|
|
2768
2774
|
value: option.value,
|
|
2769
2775
|
disabled: option.disabled
|
|
2770
2776
|
}, vue.toDisplayString(option.label), 9, _hoisted_6$1);
|
|
2771
|
-
}), 128))
|
|
2777
|
+
}), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 2 })
|
|
2772
2778
|
], 16, _hoisted_4$5), [
|
|
2773
2779
|
[vue.vModelSelect, internalValue.value]
|
|
2774
2780
|
]),
|