fds-vue-core 2.0.30 → 2.0.33

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.
@@ -1 +1 @@
1
- {"version":3,"file":"TreeNode.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FdsTreeView/TreeNode.vue"],"names":[],"mappings":"AA2XA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAO5C,KAAK,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAA;AAE1D,KAAK,WAAW,GAAG,KAAK,CAAC;;;;;;;;;;;;;;;;;AAisBzB,wBAGG"}
1
+ {"version":3,"file":"TreeNode.vue.d.ts","sourceRoot":"","sources":["../../../src/components/FdsTreeView/TreeNode.vue"],"names":[],"mappings":"AAqYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAO5C,KAAK,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,aAAa,CAAC,CAAC,CAAC,CAAA;AAE1D,KAAK,WAAW,GAAG,KAAK,CAAC;;;;;;;;;;;;;;;;;AAwrBzB,wBAGG"}
@@ -1 +1 @@
1
- {"version":3,"file":"FdsRadio.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FdsRadio/FdsRadio.vue"],"names":[],"mappings":"AAuFA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5C,KAAK,WAAW,GAAG,aAAa,CAAC;AA0DjC,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B,CAAC;AAmEF,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;;;;;;;;;;;;4EAOnB,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"}
1
+ {"version":3,"file":"FdsRadio.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/FdsRadio/FdsRadio.vue"],"names":[],"mappings":"AAqFA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAK5C,KAAK,WAAW,GAAG,aAAa,CAAC;AAwDjC,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC5B,CAAC;AAmEF,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;;;;;;;;;;;;4EAOnB,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"}
@@ -1 +1 @@
1
- {"version":3,"file":"FdsTableHead.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/FdsTableHead/FdsTableHead.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAE7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAgBnC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAmBrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAoBtB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAoBvB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAoB3B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAoB1B,CAAA"}
1
+ {"version":3,"file":"FdsTableHead.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/FdsTableHead/FdsTableHead.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAE7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAcnC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,OAAO,EAAE,KAmBrB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAmBtB,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,KAoBvB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAoBxB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAoB3B,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,KAoB1B,CAAA"}
@@ -13,7 +13,6 @@ declare const __VLS_component: import("vue").DefineComponent<FdsTableHeadProps,
13
13
  icon: import("./types").TableHeadIcon;
14
14
  align: import("./types").TableAlign;
15
15
  heading: string;
16
- sortable: boolean;
17
16
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
18
17
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
19
18
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"FdsTableHead.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/FdsTableHead/FdsTableHead.vue"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAoHhD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAsB/C,QAAA,MAAM,eAAe;;;;;;;;;4EAInB,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"}
1
+ {"version":3,"file":"FdsTableHead.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/FdsTableHead/FdsTableHead.vue"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAmHhD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAsB/C,QAAA,MAAM,eAAe;;;;;;;;4EAInB,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"}
@@ -2,7 +2,6 @@ export type TableAlign = 'left' | 'center' | 'right';
2
2
  export type TableHeadIcon = 'sort' | 'ascending' | 'descending';
3
3
  export interface FdsTableHeadProps {
4
4
  heading?: string;
5
- sortable?: boolean;
6
5
  align?: TableAlign;
7
6
  icon?: TableHeadIcon;
8
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/FdsTableHead/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;AACpD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAA;AAE/D,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/FdsTableHead/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;AACpD,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAA;AAE/D,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,IAAI,CAAC,EAAE,aAAa,CAAA;CACrB"}
@@ -1210,17 +1210,18 @@ const _sfc_main$s = /* @__PURE__ */ vue.defineComponent({
1210
1210
  };
1211
1211
  }
1212
1212
  });
1213
- const _hoisted_1$m = { class: "flex items-center" };
1214
- const _hoisted_2$e = ["innerHTML"];
1215
- const _hoisted_3$a = { key: 1 };
1216
- const _hoisted_4$9 = { key: 0 };
1217
- const _hoisted_5$6 = {
1213
+ const _hoisted_1$m = { class: "flex items-start" };
1214
+ const _hoisted_2$e = { class: "flex-1 flex" };
1215
+ const _hoisted_3$a = ["innerHTML"];
1216
+ const _hoisted_4$9 = { key: 1 };
1217
+ const _hoisted_5$6 = { key: 0 };
1218
+ const _hoisted_6$3 = {
1218
1219
  key: 2,
1219
1220
  class: "items-center max-h-[28px]"
1220
1221
  };
1221
- const _hoisted_6$3 = { class: "flex flex-col gap-2" };
1222
- const _hoisted_7$3 = ["onClick"];
1223
- const _hoisted_8$2 = { key: 0 };
1222
+ const _hoisted_7$3 = { class: "flex flex-col gap-2" };
1223
+ const _hoisted_8$2 = ["onClick"];
1224
+ const _hoisted_9$2 = { key: 0 };
1224
1225
  const popoverWidth = 327;
1225
1226
  const popoverHeight = 80;
1226
1227
  const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
@@ -1397,6 +1398,15 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1397
1398
  if (treeState?.isParentOnlySelected(props.nodeId)) return "parent";
1398
1399
  return "";
1399
1400
  });
1401
+ const selectedOption = vue.ref(currentOption.value);
1402
+ vue.watch(currentOption, (newValue) => {
1403
+ selectedOption.value = newValue;
1404
+ }, { immediate: true });
1405
+ vue.watch(selectedOption, (newValue) => {
1406
+ if (newValue) {
1407
+ handleOptionClick(newValue);
1408
+ }
1409
+ });
1400
1410
  const handleOptionClick = (option) => {
1401
1411
  if (option === "parent_and_children") {
1402
1412
  treeState?.selectNodeAndAllChildren(props.nodeId);
@@ -1427,25 +1437,26 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1427
1437
  key: 1,
1428
1438
  style: vue.normalizeStyle({ minWidth: `${_ctx.indentation}px` })
1429
1439
  }, null, 4)) : vue.createCommentVNode("", true),
1430
- vue.createVNode(_sfc_main$v, {
1431
- id: `checkbox-${props.nodeId}`,
1432
- checked: vue.unref(treeState)?.isNodeSelected(props.nodeId),
1433
- indeterminate: _ctx.showIndeterminate && (vue.unref(treeState)?.isNodeIndeterminateById(props.nodeId) ?? false),
1434
- onChange: _cache[1] || (_cache[1] = ($event) => vue.unref(treeState)?.toggleSelectNode(props.nodeId, props.title, props.data)),
1435
- class: "flex-1 flex"
1436
- }, {
1437
- label: vue.withCtx(() => [
1438
- vue.createElementVNode("span", null, [
1439
- shouldHighlightSearch.value && _ctx.title ? (vue.openBlock(), vue.createElementBlock("span", {
1440
- key: 0,
1441
- innerHTML: vue.unref(treeState)?.highlightText(_ctx.title, vue.unref(treeState)?.searchTerm?.value)
1442
- }, null, 8, _hoisted_2$e)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$a, vue.toDisplayString(_ctx.title), 1))
1440
+ vue.createElementVNode("div", _hoisted_2$e, [
1441
+ vue.createVNode(_sfc_main$v, {
1442
+ id: `checkbox-${props.nodeId}`,
1443
+ checked: vue.unref(treeState)?.isNodeSelected(props.nodeId),
1444
+ indeterminate: _ctx.showIndeterminate && (vue.unref(treeState)?.isNodeIndeterminateById(props.nodeId) ?? false),
1445
+ onChange: _cache[1] || (_cache[1] = ($event) => vue.unref(treeState)?.toggleSelectNode(props.nodeId, props.title, props.data))
1446
+ }, {
1447
+ default: vue.withCtx(() => [
1448
+ vue.createElementVNode("span", null, [
1449
+ shouldHighlightSearch.value && _ctx.title ? (vue.openBlock(), vue.createElementBlock("span", {
1450
+ key: 0,
1451
+ innerHTML: vue.unref(treeState)?.highlightText(_ctx.title, vue.unref(treeState)?.searchTerm?.value)
1452
+ }, null, 8, _hoisted_3$a)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$9, vue.toDisplayString(_ctx.title), 1))
1453
+ ]),
1454
+ childCount.value !== null ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_5$6, " (+" + vue.toDisplayString(childCount.value) + ")", 1)) : vue.createCommentVNode("", true)
1443
1455
  ]),
1444
- childCount.value !== null ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$9, " (+" + vue.toDisplayString(childCount.value) + ")", 1)) : vue.createCommentVNode("", true)
1445
- ]),
1446
- _: 1
1447
- }, 8, ["id", "checked", "indeterminate"]),
1448
- vue.unref(treeState)?.isParentOrChildrenSelected(props.nodeId) && !(vue.unref(treeState)?.isNodeIndeterminateById(props.nodeId) ?? false) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5$6, [
1456
+ _: 1
1457
+ }, 8, ["id", "checked", "indeterminate"])
1458
+ ]),
1459
+ vue.unref(treeState)?.isParentOrChildrenSelected(props.nodeId) && !(vue.unref(treeState)?.isNodeIndeterminateById(props.nodeId) ?? false) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6$3, [
1449
1460
  vue.createVNode(_sfc_main$t, {
1450
1461
  ref_key: "triggerRef",
1451
1462
  ref: triggerRef,
@@ -1481,11 +1492,11 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1481
1492
  width: popoverWidth + "px",
1482
1493
  minHeight: popoverHeight + "px"
1483
1494
  }),
1484
- onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
1495
+ onClick: _cache[4] || (_cache[4] = vue.withModifiers(() => {
1485
1496
  }, ["stop"])),
1486
1497
  onFocusout: onPanelFocusOut
1487
1498
  }, [
1488
- vue.createElementVNode("div", _hoisted_6$3, [
1499
+ vue.createElementVNode("div", _hoisted_7$3, [
1489
1500
  (vue.openBlock(), vue.createElementBlock(vue.Fragment, null, vue.renderList(options, (option) => {
1490
1501
  return vue.createElementVNode("div", {
1491
1502
  key: option.value,
@@ -1497,26 +1508,22 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1497
1508
  class: "cursor-pointer"
1498
1509
  }, [
1499
1510
  vue.createVNode(_sfc_main$s, {
1500
- checked: currentOption.value === option.value,
1511
+ modelValue: selectedOption.value,
1512
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => selectedOption.value = $event),
1501
1513
  id: `tree-popover-${props.nodeId}-${option.value}`,
1502
1514
  name: `tree-popover-${props.nodeId}`,
1503
1515
  value: option.value,
1504
- onChange: () => handleOptionClick(option.value),
1505
1516
  onBlur: closePopover,
1506
- onKeydown: [
1507
- vue.withKeys(vue.withModifiers(($event) => handleOptionClick(option.value), ["prevent"]), ["enter"]),
1508
- vue.withKeys(vue.withModifiers(($event) => handleOptionClick(option.value), ["prevent"]), ["space"])
1509
- ],
1510
1517
  label: option.label
1511
- }, null, 8, ["checked", "id", "name", "value", "onChange", "onKeydown", "label"])
1512
- ], 8, _hoisted_7$3);
1518
+ }, null, 8, ["modelValue", "id", "name", "value", "label"])
1519
+ ], 8, _hoisted_8$2);
1513
1520
  }), 64))
1514
1521
  ]),
1515
1522
  vue.createVNode(_sfc_main$t, {
1516
1523
  icon: "cross",
1517
1524
  id: "tree-popover-close-button",
1518
1525
  size: "24px",
1519
- onClick: _cache[2] || (_cache[2] = ($event) => closePopover()),
1526
+ onClick: _cache[3] || (_cache[3] = ($event) => closePopover()),
1520
1527
  class: "fill-blue-500",
1521
1528
  ariaLabel: "Stäng"
1522
1529
  })
@@ -1528,7 +1535,7 @@ const _sfc_main$r = /* @__PURE__ */ vue.defineComponent({
1528
1535
  ])) : vue.createCommentVNode("", true)
1529
1536
  ])
1530
1537
  ], 4),
1531
- vue.unref(expandedNodes).has(props.nodeId) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_8$2, [
1538
+ vue.unref(expandedNodes).has(props.nodeId) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9$2, [
1532
1539
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(filteredNodes.value, (child) => {
1533
1540
  return vue.openBlock(), vue.createBlock(_component_TreeNode, {
1534
1541
  key: child.nodeId,
@@ -2803,9 +2810,8 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
2803
2810
  __name: "FdsTableHead",
2804
2811
  props: {
2805
2812
  heading: { default: void 0 },
2806
- sortable: { type: Boolean, default: false },
2807
2813
  align: { default: "left" },
2808
- icon: { default: "sort" }
2814
+ icon: { default: void 0 }
2809
2815
  },
2810
2816
  emits: ["sort"],
2811
2817
  setup(__props) {
@@ -2821,7 +2827,7 @@ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
2821
2827
  const iconName = vue.computed(() => props.icon);
2822
2828
  return (_ctx, _cache) => {
2823
2829
  return vue.openBlock(), vue.createElementBlock("th", _hoisted_1$a, [
2824
- _ctx.sortable && iconName.value ? (vue.openBlock(), vue.createElementBlock("button", {
2830
+ iconName.value ? (vue.openBlock(), vue.createElementBlock("button", {
2825
2831
  key: 0,
2826
2832
  class: vue.normalizeClass(headerClasses.value),
2827
2833
  onClick: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("sort"))
@@ -3224,7 +3230,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3224
3230
  setup(__props) {
3225
3231
  const props = __props;
3226
3232
  const stickerClasses = vue.computed(() => [
3227
- "font-bold text-sm leading-tight tracking-normal py-0.5 rounded-xl border border-transparent whitespace-nowrap max-w-full",
3233
+ "font-bold text-sm leading-tight tracking-normal py-0.5 px-2 rounded-xl border border-transparent whitespace-nowrap max-w-full",
3228
3234
  props.bullet ? "text-base! bg-transparent flex-wrap justify-start items-baseline text-base font-normal leading-5 text-gray-700 border-transparent p-0 mr-3" : "",
3229
3235
  // Variant colors
3230
3236
  props.variant === "blue" && !props.bullet && "bg-blue-600 text-white",