fds-vue-core 2.0.31 → 2.0.34

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":"FdsBlockLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Blocks/FdsBlockLink/FdsBlockLink.vue"],"names":[],"mappings":"AA0IA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAoRvD,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8BhD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;6EAInB,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":"FdsBlockLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Blocks/FdsBlockLink/FdsBlockLink.vue"],"names":[],"mappings":"AAwIA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAkRvD,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AA8BhD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;6EAInB,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":"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"}
@@ -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,
@@ -3130,6 +3137,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3130
3137
  ]);
3131
3138
  const headerClasses = vue.computed(() => [
3132
3139
  !props.arrow && !props.icon && "mb-2",
3140
+ !hasDefaultSlot.value && "mb-0!",
3133
3141
  props.icon && "flex-1"
3134
3142
  ]);
3135
3143
  const contentClasses = vue.computed(() => [props.icon ? "items-start gap-3" : "flex-col"]);
@@ -3137,6 +3145,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3137
3145
  const iconClasses = vue.computed(() => [props.disabled && "text-gray-700"]);
3138
3146
  const arrowClasses = vue.computed(() => [props.disabled && "hidden"]);
3139
3147
  const headerTextClasses = vue.computed(() => [props.disabled ? "text-gray-700" : "text-blue-600"]);
3148
+ const hasDefaultSlot = vue.computed(() => !!vue.useSlots().default);
3140
3149
  function handleClick(event) {
3141
3150
  if (props.disabled || !props.interactive) {
3142
3151
  event.preventDefault();
@@ -3213,7 +3222,7 @@ const _sfc_main$9 = /* @__PURE__ */ vue.defineComponent({
3213
3222
  };
3214
3223
  }
3215
3224
  });
3216
- const FdsBlockLink = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-87162f0e"]]);
3225
+ const FdsBlockLink = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-8037b5bf"]]);
3217
3226
  const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3218
3227
  __name: "FdsSticker",
3219
3228
  props: {
@@ -3223,7 +3232,7 @@ const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent({
3223
3232
  setup(__props) {
3224
3233
  const props = __props;
3225
3234
  const stickerClasses = vue.computed(() => [
3226
- "font-bold text-sm leading-tight tracking-normal py-0.5 rounded-xl border border-transparent whitespace-nowrap max-w-full",
3235
+ "font-bold text-sm leading-tight tracking-normal py-0.5 px-2 rounded-xl border border-transparent whitespace-nowrap max-w-full",
3227
3236
  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" : "",
3228
3237
  // Variant colors
3229
3238
  props.variant === "blue" && !props.bullet && "bg-blue-600 text-white",