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/es/index.d.ts CHANGED
@@ -84,4 +84,4 @@ declare namespace _default {
84
84
  }
85
85
  export default _default;
86
86
  export function install(app: any): void;
87
- export const version: "3.1.66";
87
+ export const version: "3.1.67";
package/es/index.mjs CHANGED
@@ -77,7 +77,7 @@ import { Timeline } from "./timeline/index.mjs";
77
77
  import { Toast } from "./toast/index.mjs";
78
78
  import { Uploader } from "./uploader/index.mjs";
79
79
  import { Video } from "./video/index.mjs";
80
- const version = "3.1.66";
80
+ const version = "3.1.67";
81
81
  function install(app) {
82
82
  const components = [
83
83
  ActionSheet,
@@ -85,22 +85,22 @@ var stdin_default = defineComponent({
85
85
  };
86
86
  const onUpdateCurrentIndexes = (newVal) => {
87
87
  if (props.filteredOptions && props.filteredOptions.length > 0) {
88
- const selectedValues = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
88
+ const selectedValuesInFiltered = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
89
89
  var _a;
90
90
  return (_a = displayOptions.value[idx]) == null ? void 0 : _a.value;
91
91
  });
92
92
  const newSelectedIndexes = /* @__PURE__ */ new Set();
93
+ const filteredValuesSet = new Set(displayOptions.value.map((opt) => opt.value));
93
94
  confirmIndexes.value.forEach((idx) => {
94
95
  var _a;
95
96
  if (idx >= 0 && idx < currentOptions.value.length) {
96
97
  const value = (_a = currentOptions.value[idx]) == null ? void 0 : _a.value;
97
- const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
98
- if (!isInFilteredList) {
98
+ if (!filteredValuesSet.has(value)) {
99
99
  newSelectedIndexes.add(idx);
100
100
  }
101
101
  }
102
102
  });
103
- selectedValues.forEach((value) => {
103
+ selectedValuesInFiltered.forEach((value) => {
104
104
  const originalIndex = currentOptions.value.findIndex((opt) => opt.value === value);
105
105
  if (originalIndex >= 0) {
106
106
  newSelectedIndexes.add(originalIndex);
@@ -363,7 +363,7 @@ var stdin_default = defineComponent({
363
363
  });
364
364
  };
365
365
  const genOptions = () => {
366
- const showEmpty = props.filteredOptions && props.filteredOptions.length === 0;
366
+ const showEmpty = !displayOptions.value || displayOptions.value.length === 0;
367
367
  return _createVNode("div", {
368
368
  "class": bem("options")
369
369
  }, [showEmpty ? _createVNode(Empty, {
package/lib/index.d.ts CHANGED
@@ -84,4 +84,4 @@ declare namespace _default {
84
84
  }
85
85
  export default _default;
86
86
  export function install(app: any): void;
87
- export const version: "3.1.66";
87
+ export const version: "3.1.67";
package/lib/index.js CHANGED
@@ -182,7 +182,7 @@ __reExport(stdin_exports, require("./timeline"), module.exports);
182
182
  __reExport(stdin_exports, require("./toast"), module.exports);
183
183
  __reExport(stdin_exports, require("./uploader"), module.exports);
184
184
  __reExport(stdin_exports, require("./video"), module.exports);
185
- const version = "3.1.66";
185
+ const version = "3.1.67";
186
186
  function install(app) {
187
187
  const components = [
188
188
  import_action_sheet.ActionSheet,
@@ -117,22 +117,22 @@ var stdin_default = (0, import_vue.defineComponent)({
117
117
  };
118
118
  const onUpdateCurrentIndexes = (newVal) => {
119
119
  if (props.filteredOptions && props.filteredOptions.length > 0) {
120
- const selectedValues = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
120
+ const selectedValuesInFiltered = newVal.filter((idx) => idx >= 0 && idx < displayOptions.value.length).map((idx) => {
121
121
  var _a;
122
122
  return (_a = displayOptions.value[idx]) == null ? void 0 : _a.value;
123
123
  });
124
124
  const newSelectedIndexes = /* @__PURE__ */ new Set();
125
+ const filteredValuesSet = new Set(displayOptions.value.map((opt) => opt.value));
125
126
  confirmIndexes.value.forEach((idx) => {
126
127
  var _a;
127
128
  if (idx >= 0 && idx < currentOptions.value.length) {
128
129
  const value = (_a = currentOptions.value[idx]) == null ? void 0 : _a.value;
129
- const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
130
- if (!isInFilteredList) {
130
+ if (!filteredValuesSet.has(value)) {
131
131
  newSelectedIndexes.add(idx);
132
132
  }
133
133
  }
134
134
  });
135
- selectedValues.forEach((value) => {
135
+ selectedValuesInFiltered.forEach((value) => {
136
136
  const originalIndex = currentOptions.value.findIndex((opt) => opt.value === value);
137
137
  if (originalIndex >= 0) {
138
138
  newSelectedIndexes.add(originalIndex);
@@ -395,7 +395,7 @@ var stdin_default = (0, import_vue.defineComponent)({
395
395
  });
396
396
  };
397
397
  const genOptions = () => {
398
- const showEmpty = props.filteredOptions && props.filteredOptions.length === 0;
398
+ const showEmpty = !displayOptions.value || displayOptions.value.length === 0;
399
399
  return (0, import_vue.createVNode)("div", {
400
400
  "class": bem("options")
401
401
  }, [showEmpty ? (0, import_vue.createVNode)(import_empty.default, {