fds-vue-core 8.1.0 → 8.2.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.
@@ -849,7 +849,7 @@ const _sfc_main$L = /* @__PURE__ */ vue.defineComponent({
849
849
  }
850
850
  });
851
851
  const _hoisted_1$z = { class: "flex items-start gap-2" };
852
- const _hoisted_2$r = { class: "h-7 flex items-center" };
852
+ const _hoisted_2$q = { class: "h-7 flex items-center" };
853
853
  const _hoisted_3$l = { class: "leading-7" };
854
854
  const _hoisted_4$j = { class: "relative h-7" };
855
855
  const _hoisted_5$h = {
@@ -913,7 +913,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
913
913
  class: vue.normalizeClass(["font-bold w-full justify-between items-start flex gap-2", { "mb-2": (isExpanded.value || !__props.collapsable) && vue.unref(hasSlot) }])
914
914
  }, [
915
915
  vue.createElementVNode("div", _hoisted_1$z, [
916
- vue.createElementVNode("div", _hoisted_2$r, [
916
+ vue.createElementVNode("div", _hoisted_2$q, [
917
917
  vue.createVNode(_sfc_main$M, {
918
918
  name: "alert",
919
919
  size: 24,
@@ -953,7 +953,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
953
953
  }
954
954
  });
955
955
  const _hoisted_1$y = ["id"];
956
- const _hoisted_2$q = {
956
+ const _hoisted_2$p = {
957
957
  key: 0,
958
958
  class: "flex items-start justify-between gap-4 mb-4"
959
959
  };
@@ -1004,7 +1004,7 @@ const _sfc_main$J = /* @__PURE__ */ vue.defineComponent({
1004
1004
  class: contentClasses.value,
1005
1005
  style: borderLeftStyle.value
1006
1006
  }, rootAttrs.value), [
1007
- __props.heading ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_2$q, [
1007
+ __props.heading ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_2$p, [
1008
1008
  vue.createElementVNode("div", _hoisted_3$k, [
1009
1009
  vue.createElementVNode("h3", {
1010
1010
  class: vue.normalizeClass(headerClasses.value)
@@ -1070,7 +1070,7 @@ const _sfc_main$I = /* @__PURE__ */ vue.defineComponent({
1070
1070
  }
1071
1071
  });
1072
1072
  const _hoisted_1$x = { class: "leading-6 w-full flex justify-between gap-4" };
1073
- const _hoisted_2$p = {
1073
+ const _hoisted_2$o = {
1074
1074
  key: 0,
1075
1075
  class: "flex items-center mr-4"
1076
1076
  };
@@ -1157,7 +1157,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
1157
1157
  vue.createElementVNode("span", {
1158
1158
  class: vue.normalizeClass(["flex items-center", { "inline-flex items-start": __props.icon }])
1159
1159
  }, [
1160
- __props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$p, [
1160
+ __props.icon ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$o, [
1161
1161
  vue.createVNode(_sfc_main$M, {
1162
1162
  name: __props.icon,
1163
1163
  size: 24,
@@ -1205,7 +1205,7 @@ const _sfc_main$H = /* @__PURE__ */ vue.defineComponent({
1205
1205
  }
1206
1206
  });
1207
1207
  const _hoisted_1$w = ["id"];
1208
- const _hoisted_2$o = {
1208
+ const _hoisted_2$n = {
1209
1209
  key: 0,
1210
1210
  class: "flex items-start gap-4"
1211
1211
  };
@@ -1261,7 +1261,7 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
1261
1261
  id: contentBlockId.value,
1262
1262
  class: contentClasses.value
1263
1263
  }, rootAttrs.value), [
1264
- __props.iconSize === "large" && __props.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$o, [
1264
+ __props.iconSize === "large" && __props.icon ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$n, [
1265
1265
  vue.createVNode(_sfc_main$M, {
1266
1266
  name: __props.icon,
1267
1267
  size: largeIconSize,
@@ -1309,7 +1309,7 @@ const _sfc_main$G = /* @__PURE__ */ vue.defineComponent({
1309
1309
  }
1310
1310
  });
1311
1311
  const _hoisted_1$v = { class: "mb-0-last-child" };
1312
- const _hoisted_2$n = {
1312
+ const _hoisted_2$m = {
1313
1313
  key: 0,
1314
1314
  class: "flex items-end"
1315
1315
  };
@@ -1448,7 +1448,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
1448
1448
  vue.createElementVNode("div", _hoisted_1$v, [
1449
1449
  vue.renderSlot(_ctx.$slots, "default")
1450
1450
  ]),
1451
- vue.unref(hasStickerSlot) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$n, [
1451
+ vue.unref(hasStickerSlot) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$m, [
1452
1452
  vue.renderSlot(_ctx.$slots, "sticker")
1453
1453
  ])) : vue.createCommentVNode("", true)
1454
1454
  ], 2)
@@ -1552,8 +1552,7 @@ const _sfc_main$E = /* @__PURE__ */ vue.defineComponent({
1552
1552
  }
1553
1553
  });
1554
1554
  const _hoisted_1$t = ["aria-disabled"];
1555
- const _hoisted_2$m = { class: "pt-0.5" };
1556
- const elBase$2 = "box-border appearance-none inline-flex items-start justify-center w-fit shadow-none p-0.5 text-base select-none m-0 rounded-md text-left align-start no-underline transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
1555
+ const elBase$2 = "box-border appearance-none inline-flex items-center justify-center w-fit min-h-0 shadow-none p-0.5 text-base select-none m-0 rounded-md text-left align-middle no-underline transition-[box-shadow,border-color,background-color] duration-200 font-main font-bold text-base leading-5 tracking-normal focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500";
1557
1556
  const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
1558
1557
  ...{
1559
1558
  inheritAttrs: false
@@ -1583,7 +1582,10 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
1583
1582
  const props = __props;
1584
1583
  const emit = __emit;
1585
1584
  const { disabled, href, target, rel, attrs } = useAttrsWithDefaults(props);
1586
- const rootClasses = vue.computed(() => ["flex transition-opacity duration-200", props.block && "block w-full"]);
1585
+ const rootClasses = vue.computed(() => [
1586
+ props.block ? "flex w-full" : "inline-flex shrink-0 self-center",
1587
+ "transition-opacity duration-200"
1588
+ ]);
1587
1589
  const externalClass = vue.computed(() => attrs.class);
1588
1590
  const variantClasses2 = vue.computed(
1589
1591
  () => props.invert ? "border-0 font-normal text-white bg-transparent focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white hover:bg-blue-800 active:bg-blue-900" : "border-0 font-normal text-blue-600 bg-transparent focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500 hover:bg-blue_t-100 active:bg-blue_t-200"
@@ -1652,7 +1654,7 @@ const _sfc_main$D = /* @__PURE__ */ vue.defineComponent({
1652
1654
  size: __props.iconSize
1653
1655
  }, null, 8, ["class", "name", "size"])
1654
1656
  ], 2)) : vue.createCommentVNode("", true),
1655
- vue.createElementVNode("span", _hoisted_2$m, vue.toDisplayString(__props.text), 1)
1657
+ vue.createElementVNode("span", null, vue.toDisplayString(__props.text), 1)
1656
1658
  ]),
1657
1659
  _: 1
1658
1660
  }, 16, ["type", "disabled", "data-testid", "class"]))
@@ -6391,7 +6393,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
6391
6393
  {
6392
6394
  "sm:flex-row sm:justify-end": !props.alignLeftFooter,
6393
6395
  "sm:flex-row sm:justify-start": props.alignLeftFooter,
6394
- "sticky bg-white bottom-0 shadow-[0px_-8px_16px_0px_rgba(255,255,255,0.59)] z-[2] -mx-6 px-6 pb-6": props.stickyFooter
6396
+ "sticky bg-white bottom-0 shadow-[0px_-8px_16px_0px_rgba(255,255,255,0.59)] z-[2] -mx-6 p-6 mt-0!": props.stickyFooter
6395
6397
  }
6396
6398
  ]);
6397
6399
  const setHtmlOverflow = (value) => {
@@ -11202,6 +11204,26 @@ const _sfc_main$m = /* @__PURE__ */ vue.defineComponent({
11202
11204
  };
11203
11205
  }
11204
11206
  });
11207
+ function debounce(fn, delayMs) {
11208
+ let timeoutId;
11209
+ const debounced = (...args) => {
11210
+ if (timeoutId !== void 0) {
11211
+ clearTimeout(timeoutId);
11212
+ }
11213
+ const delay = typeof delayMs === "function" ? delayMs() : delayMs;
11214
+ timeoutId = setTimeout(() => {
11215
+ timeoutId = void 0;
11216
+ fn(...args);
11217
+ }, delay);
11218
+ };
11219
+ debounced.cancel = () => {
11220
+ if (timeoutId !== void 0) {
11221
+ clearTimeout(timeoutId);
11222
+ timeoutId = void 0;
11223
+ }
11224
+ };
11225
+ return debounced;
11226
+ }
11205
11227
  const _hoisted_1$f = ["id"];
11206
11228
  const _hoisted_2$c = { class: "flex items-center justify-start gap-1 w-[100px]" };
11207
11229
  const _hoisted_3$c = { class: "flex items-center justify-center w-auto gap-2 order-0 sm:order-0" };
@@ -11246,15 +11268,6 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
11246
11268
  internalValue.value = newValue;
11247
11269
  }
11248
11270
  );
11249
- const debounce = (fn, delay = 300) => {
11250
- let timer;
11251
- return (...args) => {
11252
- clearTimeout(timer);
11253
- timer = setTimeout(() => {
11254
- fn(...args);
11255
- }, delay);
11256
- };
11257
- };
11258
11271
  const handlePageChange = debounce((event) => {
11259
11272
  const target = event.target;
11260
11273
  const incomingPage = Number.parseInt(target.value);
@@ -11273,7 +11286,7 @@ const _sfc_main$l = /* @__PURE__ */ vue.defineComponent({
11273
11286
  }
11274
11287
  internalValue.value = page;
11275
11288
  emit("paginate", { target: { id: inputId.value }, detail: page });
11276
- }, 500);
11289
+ }, 300);
11277
11290
  const handlePagination = (action) => {
11278
11291
  let page = 0;
11279
11292
  switch (action) {
@@ -11858,13 +11871,6 @@ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
11858
11871
  },
11859
11872
  { immediate: true }
11860
11873
  );
11861
- const debounce = (fn, delay) => {
11862
- let timeout;
11863
- return (...args) => {
11864
- clearTimeout(timeout);
11865
- timeout = setTimeout(() => fn(...args), delay);
11866
- };
11867
- };
11868
11874
  const debouncedEmitChange = debounce((value) => {
11869
11875
  const formattedValue = formatPidWithDash(value);
11870
11876
  emit("change", formattedValue);
@@ -12743,26 +12749,24 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
12743
12749
  },
12744
12750
  { immediate: true }
12745
12751
  );
12746
- let changeTimeout = null;
12747
- let inputTimeout = null;
12748
12752
  const isDebouncingChange = vue.ref(false);
12749
12753
  const isSearching = vue.computed(() => isDebouncingChange.value || props.loading);
12750
- const debouncedEmitChange = (value) => {
12751
- if (changeTimeout) clearTimeout(changeTimeout);
12752
- const delay = Math.max(0, props.debounceMs ?? 500);
12753
- isDebouncingChange.value = true;
12754
- changeTimeout = setTimeout(() => {
12755
- const formattedValue = formatPidWithDash(value);
12756
- emit("change", formattedValue);
12754
+ const debouncedEmitChange = debounce(
12755
+ (value) => {
12756
+ emit("change", formatPidWithDash(value));
12757
12757
  isDebouncingChange.value = false;
12758
- }, delay);
12759
- };
12760
- const debouncedEmitInput = (ev) => {
12761
- if (inputTimeout) clearTimeout(inputTimeout);
12762
- const delay = Math.max(0, props.debounceMs ?? 500);
12763
- inputTimeout = setTimeout(() => {
12758
+ },
12759
+ () => Math.max(0, props.debounceMs ?? 500)
12760
+ );
12761
+ const debouncedEmitInput = debounce(
12762
+ (ev) => {
12764
12763
  emit("input", ev);
12765
- }, delay);
12764
+ },
12765
+ () => Math.max(0, props.debounceMs ?? 500)
12766
+ );
12767
+ const scheduleDebouncedEmitChange = (value) => {
12768
+ isDebouncingChange.value = true;
12769
+ debouncedEmitChange(value);
12766
12770
  };
12767
12771
  vue.watch(
12768
12772
  () => searchTerm.value,
@@ -12772,7 +12776,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
12772
12776
  }
12773
12777
  filterAndPaginate();
12774
12778
  if (isMultiple.value || selectedItem.value === null) {
12775
- debouncedEmitChange(newValue);
12779
+ scheduleDebouncedEmitChange(newValue);
12776
12780
  }
12777
12781
  }
12778
12782
  );
@@ -13122,8 +13126,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
13122
13126
  });
13123
13127
  vue.onBeforeUnmount(() => {
13124
13128
  window.removeEventListener("mouseup", onClickOutside);
13125
- if (changeTimeout) clearTimeout(changeTimeout);
13126
- if (inputTimeout) clearTimeout(inputTimeout);
13129
+ debouncedEmitChange.cancel();
13130
+ debouncedEmitInput.cancel();
13127
13131
  isDebouncingChange.value = false;
13128
13132
  const input = getInputElement();
13129
13133
  if (input) {
@@ -20105,6 +20109,7 @@ exports.buildCountryOptions = buildCountryOptions;
20105
20109
  exports.capitalizeFirstLetter = capitalizeFirstLetter;
20106
20110
  exports.clearUnsavedChanges = clearUnsavedChanges;
20107
20111
  exports.countryCodeToFlag = countryCodeToFlag;
20112
+ exports.debounce = debounce;
20108
20113
  exports.default = FdsVueCorePlugin;
20109
20114
  exports.filterCountryOptions = filterCountryOptions;
20110
20115
  exports.formatPidWithDash = formatPidWithDash;