zartui 3.1.66 → 3.1.67

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/lib/zartui.cjs.js CHANGED
@@ -17002,22 +17002,22 @@ var stdin_default$A = vue.defineComponent({
17002
17002
  };
17003
17003
  const onUpdateCurrentIndexes = (newVal) => {
17004
17004
  if (props.filteredOptions && props.filteredOptions.length > 0) {
17005
- const selectedValues = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
17005
+ const selectedValuesInFiltered = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
17006
17006
  var _a;
17007
17007
  return (_a = displayOptions.value[idx]) == null ? void 0 : _a.value;
17008
17008
  });
17009
17009
  const newSelectedIndexes = /* @__PURE__ */ new Set();
17010
+ const filteredValuesSet = new Set(displayOptions.value.map((opt) => opt.value));
17010
17011
  confirmIndexes.value.forEach((idx) => {
17011
17012
  var _a;
17012
17013
  if (idx >= 0 && idx < currentOptions2.value.length) {
17013
17014
  const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
17014
- const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
17015
- if (!isInFilteredList) {
17015
+ if (!filteredValuesSet.has(value)) {
17016
17016
  newSelectedIndexes.add(idx);
17017
17017
  }
17018
17018
  }
17019
17019
  });
17020
- selectedValues.forEach((value) => {
17020
+ selectedValuesInFiltered.forEach((value) => {
17021
17021
  const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === value);
17022
17022
  if (originalIndex >= 0) {
17023
17023
  newSelectedIndexes.add(originalIndex);
@@ -17280,7 +17280,7 @@ var stdin_default$A = vue.defineComponent({
17280
17280
  });
17281
17281
  };
17282
17282
  const genOptions2 = () => {
17283
- const showEmpty = props.filteredOptions && props.filteredOptions.length === 0;
17283
+ const showEmpty = !displayOptions.value || displayOptions.value.length === 0;
17284
17284
  return vue.createVNode("div", {
17285
17285
  "class": bem$s("options")
17286
17286
  }, [showEmpty ? vue.createVNode(stdin_default$$, {
@@ -23381,7 +23381,7 @@ const Lazyload = {
23381
23381
  });
23382
23382
  }
23383
23383
  };
23384
- const version = "3.1.66";
23384
+ const version = "3.1.67";
23385
23385
  function install(app) {
23386
23386
  const components = [
23387
23387
  ActionSheet,
package/lib/zartui.es.js CHANGED
@@ -17000,22 +17000,22 @@ var stdin_default$A = defineComponent({
17000
17000
  };
17001
17001
  const onUpdateCurrentIndexes = (newVal) => {
17002
17002
  if (props.filteredOptions && props.filteredOptions.length > 0) {
17003
- const selectedValues = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
17003
+ const selectedValuesInFiltered = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
17004
17004
  var _a;
17005
17005
  return (_a = displayOptions.value[idx]) == null ? void 0 : _a.value;
17006
17006
  });
17007
17007
  const newSelectedIndexes = /* @__PURE__ */ new Set();
17008
+ const filteredValuesSet = new Set(displayOptions.value.map((opt) => opt.value));
17008
17009
  confirmIndexes.value.forEach((idx) => {
17009
17010
  var _a;
17010
17011
  if (idx >= 0 && idx < currentOptions2.value.length) {
17011
17012
  const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
17012
- const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
17013
- if (!isInFilteredList) {
17013
+ if (!filteredValuesSet.has(value)) {
17014
17014
  newSelectedIndexes.add(idx);
17015
17015
  }
17016
17016
  }
17017
17017
  });
17018
- selectedValues.forEach((value) => {
17018
+ selectedValuesInFiltered.forEach((value) => {
17019
17019
  const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === value);
17020
17020
  if (originalIndex >= 0) {
17021
17021
  newSelectedIndexes.add(originalIndex);
@@ -17278,7 +17278,7 @@ var stdin_default$A = defineComponent({
17278
17278
  });
17279
17279
  };
17280
17280
  const genOptions2 = () => {
17281
- const showEmpty = props.filteredOptions && props.filteredOptions.length === 0;
17281
+ const showEmpty = !displayOptions.value || displayOptions.value.length === 0;
17282
17282
  return createVNode("div", {
17283
17283
  "class": bem$s("options")
17284
17284
  }, [showEmpty ? createVNode(stdin_default$$, {
@@ -23379,7 +23379,7 @@ const Lazyload = {
23379
23379
  });
23380
23380
  }
23381
23381
  };
23382
- const version = "3.1.66";
23382
+ const version = "3.1.67";
23383
23383
  function install(app) {
23384
23384
  const components = [
23385
23385
  ActionSheet,
package/lib/zartui.js CHANGED
@@ -18778,22 +18778,22 @@
18778
18778
  };
18779
18779
  const onUpdateCurrentIndexes = (newVal) => {
18780
18780
  if (props.filteredOptions && props.filteredOptions.length > 0) {
18781
- const selectedValues = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
18781
+ const selectedValuesInFiltered = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
18782
18782
  var _a;
18783
18783
  return (_a = displayOptions.value[idx]) == null ? void 0 : _a.value;
18784
18784
  });
18785
18785
  const newSelectedIndexes = /* @__PURE__ */ new Set();
18786
+ const filteredValuesSet = new Set(displayOptions.value.map((opt) => opt.value));
18786
18787
  confirmIndexes.value.forEach((idx) => {
18787
18788
  var _a;
18788
18789
  if (idx >= 0 && idx < currentOptions2.value.length) {
18789
18790
  const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
18790
- const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
18791
- if (!isInFilteredList) {
18791
+ if (!filteredValuesSet.has(value)) {
18792
18792
  newSelectedIndexes.add(idx);
18793
18793
  }
18794
18794
  }
18795
18795
  });
18796
- selectedValues.forEach((value) => {
18796
+ selectedValuesInFiltered.forEach((value) => {
18797
18797
  const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === value);
18798
18798
  if (originalIndex >= 0) {
18799
18799
  newSelectedIndexes.add(originalIndex);
@@ -19056,7 +19056,7 @@
19056
19056
  });
19057
19057
  };
19058
19058
  const genOptions2 = () => {
19059
- const showEmpty = props.filteredOptions && props.filteredOptions.length === 0;
19059
+ const showEmpty = !displayOptions.value || displayOptions.value.length === 0;
19060
19060
  return vue.createVNode("div", {
19061
19061
  "class": bem$s("options")
19062
19062
  }, [showEmpty ? vue.createVNode(stdin_default$$, {
@@ -27441,7 +27441,7 @@
27441
27441
  });
27442
27442
  }
27443
27443
  };
27444
- const version = "3.1.66";
27444
+ const version = "3.1.67";
27445
27445
  function install(app) {
27446
27446
  const components = [
27447
27447
  ActionSheet,