zartui 3.1.67 → 3.1.69
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 +1 -1
- package/es/index.mjs +1 -1
- package/es/multiple-picker/MultiplePicker.d.ts +22 -22
- package/es/multiple-picker/MultiplePicker.mjs +48 -21
- package/es/multiple-picker/index.d.ts +2 -2
- package/es/tabs/TabsTitle.mjs +12 -0
- package/es/tabs/index.css +1 -1
- package/es/tabs/types.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/multiple-picker/MultiplePicker.d.ts +22 -22
- package/lib/multiple-picker/MultiplePicker.js +48 -21
- package/lib/multiple-picker/index.d.ts +2 -2
- package/lib/tabs/TabsTitle.js +12 -0
- package/lib/tabs/index.css +1 -1
- package/lib/tabs/types.d.ts +1 -1
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +61 -22
- package/lib/zartui.es.js +61 -22
- package/lib/zartui.js +61 -22
- package/lib/zartui.min.js +2 -2
- package/package.json +3 -3
package/lib/zartui.cjs.js
CHANGED
|
@@ -3956,6 +3956,7 @@ var stdin_default$1D = vue.defineComponent({
|
|
|
3956
3956
|
scrollable
|
|
3957
3957
|
} = props;
|
|
3958
3958
|
const isCard = type === "card";
|
|
3959
|
+
const isCapsule = type === "capsule";
|
|
3959
3960
|
if (color && isCard) {
|
|
3960
3961
|
style2.borderColor = color;
|
|
3961
3962
|
if (!disabled) {
|
|
@@ -3966,6 +3967,17 @@ var stdin_default$1D = vue.defineComponent({
|
|
|
3966
3967
|
}
|
|
3967
3968
|
}
|
|
3968
3969
|
}
|
|
3970
|
+
if (isCapsule) {
|
|
3971
|
+
if (!disabled) {
|
|
3972
|
+
if (isActive) {
|
|
3973
|
+
style2.backgroundImage = "linear-gradient(-80deg, #85C0FF 0%, #3388FF 100%)";
|
|
3974
|
+
style2.borderRadius = "14px";
|
|
3975
|
+
style2.color = "#ffffff";
|
|
3976
|
+
} else {
|
|
3977
|
+
style2.backgroundColor = "#ffffff";
|
|
3978
|
+
}
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3969
3981
|
const titleColor = isActive ? activeColor : inactiveColor;
|
|
3970
3982
|
if (titleColor) {
|
|
3971
3983
|
style2.color = titleColor;
|
|
@@ -16942,7 +16954,10 @@ const multiplePickerProps = {
|
|
|
16942
16954
|
showToolbar: truthProp,
|
|
16943
16955
|
showTitle: truthProp,
|
|
16944
16956
|
options: makeArrayProp(),
|
|
16945
|
-
filteredOptions:
|
|
16957
|
+
filteredOptions: {
|
|
16958
|
+
type: Array,
|
|
16959
|
+
default: void 0
|
|
16960
|
+
},
|
|
16946
16961
|
toolbarPosition: makeStringProp("bottom"),
|
|
16947
16962
|
textKey: makeStringProp("text"),
|
|
16948
16963
|
columnCounts: makeNumberProp(3),
|
|
@@ -16966,7 +16981,7 @@ var stdin_default$A = vue.defineComponent({
|
|
|
16966
16981
|
const confirmIndexes = vue.ref(props.selectedIndex);
|
|
16967
16982
|
const confirmValues = vue.ref(props.selectedValue);
|
|
16968
16983
|
const displayOptions = vue.computed(() => {
|
|
16969
|
-
return props.filteredOptions
|
|
16984
|
+
return props.filteredOptions !== void 0 ? props.filteredOptions : currentOptions2.value;
|
|
16970
16985
|
});
|
|
16971
16986
|
const displaySelectedIndexes = vue.computed(() => {
|
|
16972
16987
|
if (!props.filteredOptions || props.filteredOptions.length === 0) {
|
|
@@ -17064,11 +17079,13 @@ var stdin_default$A = vue.defineComponent({
|
|
|
17064
17079
|
if (newValue !== props.showPicker) {
|
|
17065
17080
|
emit("update:showPicker", newValue);
|
|
17066
17081
|
}
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17082
|
+
if (newValue) {
|
|
17083
|
+
currentOptions2.value = deepClone(props.options);
|
|
17084
|
+
confirmIndexes.value = deepClone(currentSelectedIndex.value);
|
|
17085
|
+
confirmValues.value = deepClone(currentSelectedValue.value);
|
|
17086
|
+
getIndexesByValues();
|
|
17087
|
+
updateAllSelectedOptions();
|
|
17088
|
+
}
|
|
17072
17089
|
});
|
|
17073
17090
|
vue.watch(() => props.showPicker, (newValue) => {
|
|
17074
17091
|
var _a;
|
|
@@ -17194,65 +17211,87 @@ var stdin_default$A = vue.defineComponent({
|
|
|
17194
17211
|
const handleSelectAll = () => {
|
|
17195
17212
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
17196
17213
|
confirmIndexes.value = [];
|
|
17214
|
+
confirmValues.value = [];
|
|
17215
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17216
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17197
17217
|
updateAllSelectedOptions();
|
|
17218
|
+
onChange();
|
|
17198
17219
|
return;
|
|
17199
17220
|
}
|
|
17221
|
+
let newIndexes = [];
|
|
17200
17222
|
if (!isAllSelected.value) {
|
|
17201
17223
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
17202
|
-
const selectedIndexes = [];
|
|
17203
17224
|
displayOptions.value.forEach((option2) => {
|
|
17204
17225
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option2.value);
|
|
17205
17226
|
if (originalIndex >= 0) {
|
|
17206
|
-
|
|
17227
|
+
newIndexes.push(originalIndex);
|
|
17207
17228
|
}
|
|
17208
17229
|
});
|
|
17209
|
-
confirmIndexes.value = selectedIndexes;
|
|
17210
17230
|
} else {
|
|
17211
|
-
|
|
17231
|
+
newIndexes = currentOptions2.value.map((_, index2) => index2);
|
|
17212
17232
|
}
|
|
17213
17233
|
} else {
|
|
17214
|
-
|
|
17234
|
+
newIndexes = [];
|
|
17215
17235
|
}
|
|
17236
|
+
confirmIndexes.value = newIndexes;
|
|
17237
|
+
if (confirmIndexes.value.length > 0) {
|
|
17238
|
+
getValuesByIndexes();
|
|
17239
|
+
} else {
|
|
17240
|
+
confirmValues.value = [];
|
|
17241
|
+
}
|
|
17242
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17243
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17216
17244
|
updateAllSelectedOptions();
|
|
17245
|
+
onChange();
|
|
17217
17246
|
};
|
|
17218
17247
|
const onSelectOther = () => {
|
|
17219
17248
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
17220
17249
|
confirmIndexes.value = [];
|
|
17250
|
+
confirmValues.value = [];
|
|
17251
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17252
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17221
17253
|
updateAllSelectedOptions();
|
|
17254
|
+
onChange();
|
|
17222
17255
|
return;
|
|
17223
17256
|
}
|
|
17257
|
+
let newIndexes = [];
|
|
17224
17258
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
17225
|
-
const filteredValues = new Set(displayOptions.value.map((opt) => opt.value));
|
|
17226
17259
|
const currentSelectedInFiltered = /* @__PURE__ */ new Set();
|
|
17227
17260
|
confirmIndexes.value.forEach((idx) => {
|
|
17228
17261
|
var _a;
|
|
17229
17262
|
if (idx >= 0 && idx < currentOptions2.value.length) {
|
|
17230
17263
|
const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
|
|
17231
|
-
|
|
17264
|
+
const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
|
|
17265
|
+
if (isInFilteredList) {
|
|
17232
17266
|
currentSelectedInFiltered.add(idx);
|
|
17233
17267
|
}
|
|
17234
17268
|
}
|
|
17235
17269
|
});
|
|
17236
|
-
const newSelectedIndexes = [];
|
|
17237
17270
|
displayOptions.value.forEach((option2) => {
|
|
17238
17271
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option2.value);
|
|
17239
17272
|
if (originalIndex >= 0) {
|
|
17240
17273
|
if (!currentSelectedInFiltered.has(originalIndex)) {
|
|
17241
|
-
|
|
17274
|
+
newIndexes.push(originalIndex);
|
|
17242
17275
|
}
|
|
17243
17276
|
}
|
|
17244
17277
|
});
|
|
17245
|
-
confirmIndexes.value = newSelectedIndexes;
|
|
17246
17278
|
} else {
|
|
17247
|
-
const temp = new Array();
|
|
17248
17279
|
currentOptions2.value.forEach((_, index2) => {
|
|
17249
17280
|
if (!confirmIndexes.value.includes(index2)) {
|
|
17250
|
-
|
|
17281
|
+
newIndexes.push(index2);
|
|
17251
17282
|
}
|
|
17252
17283
|
});
|
|
17253
|
-
confirmIndexes.value = temp;
|
|
17254
17284
|
}
|
|
17285
|
+
confirmIndexes.value = newIndexes;
|
|
17286
|
+
if (confirmIndexes.value.length > 0) {
|
|
17287
|
+
getValuesByIndexes();
|
|
17288
|
+
} else {
|
|
17289
|
+
confirmValues.value = [];
|
|
17290
|
+
}
|
|
17291
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17292
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17255
17293
|
updateAllSelectedOptions();
|
|
17294
|
+
onChange();
|
|
17256
17295
|
};
|
|
17257
17296
|
const genOptionItems = () => {
|
|
17258
17297
|
let formatOptions = [];
|
|
@@ -17267,7 +17306,7 @@ var stdin_default$A = vue.defineComponent({
|
|
|
17267
17306
|
return vue.createVNode(stdin_default$B, {
|
|
17268
17307
|
"ref": pickerOptions,
|
|
17269
17308
|
"currentIndexes": displaySelectedIndexes.value,
|
|
17270
|
-
"onUpdate:currentIndexes":
|
|
17309
|
+
"onUpdate:currentIndexes": onUpdateCurrentIndexes,
|
|
17271
17310
|
"columnCounts": props.columnCounts,
|
|
17272
17311
|
"initialOptions": formatOptions,
|
|
17273
17312
|
"allowHtml": props.allowHtml,
|
|
@@ -23381,7 +23420,7 @@ const Lazyload = {
|
|
|
23381
23420
|
});
|
|
23382
23421
|
}
|
|
23383
23422
|
};
|
|
23384
|
-
const version = "3.1.
|
|
23423
|
+
const version = "3.1.69";
|
|
23385
23424
|
function install(app) {
|
|
23386
23425
|
const components = [
|
|
23387
23426
|
ActionSheet,
|
package/lib/zartui.es.js
CHANGED
|
@@ -3954,6 +3954,7 @@ var stdin_default$1D = defineComponent({
|
|
|
3954
3954
|
scrollable
|
|
3955
3955
|
} = props;
|
|
3956
3956
|
const isCard = type === "card";
|
|
3957
|
+
const isCapsule = type === "capsule";
|
|
3957
3958
|
if (color && isCard) {
|
|
3958
3959
|
style2.borderColor = color;
|
|
3959
3960
|
if (!disabled) {
|
|
@@ -3964,6 +3965,17 @@ var stdin_default$1D = defineComponent({
|
|
|
3964
3965
|
}
|
|
3965
3966
|
}
|
|
3966
3967
|
}
|
|
3968
|
+
if (isCapsule) {
|
|
3969
|
+
if (!disabled) {
|
|
3970
|
+
if (isActive) {
|
|
3971
|
+
style2.backgroundImage = "linear-gradient(-80deg, #85C0FF 0%, #3388FF 100%)";
|
|
3972
|
+
style2.borderRadius = "14px";
|
|
3973
|
+
style2.color = "#ffffff";
|
|
3974
|
+
} else {
|
|
3975
|
+
style2.backgroundColor = "#ffffff";
|
|
3976
|
+
}
|
|
3977
|
+
}
|
|
3978
|
+
}
|
|
3967
3979
|
const titleColor = isActive ? activeColor : inactiveColor;
|
|
3968
3980
|
if (titleColor) {
|
|
3969
3981
|
style2.color = titleColor;
|
|
@@ -16940,7 +16952,10 @@ const multiplePickerProps = {
|
|
|
16940
16952
|
showToolbar: truthProp,
|
|
16941
16953
|
showTitle: truthProp,
|
|
16942
16954
|
options: makeArrayProp(),
|
|
16943
|
-
filteredOptions:
|
|
16955
|
+
filteredOptions: {
|
|
16956
|
+
type: Array,
|
|
16957
|
+
default: void 0
|
|
16958
|
+
},
|
|
16944
16959
|
toolbarPosition: makeStringProp("bottom"),
|
|
16945
16960
|
textKey: makeStringProp("text"),
|
|
16946
16961
|
columnCounts: makeNumberProp(3),
|
|
@@ -16964,7 +16979,7 @@ var stdin_default$A = defineComponent({
|
|
|
16964
16979
|
const confirmIndexes = ref(props.selectedIndex);
|
|
16965
16980
|
const confirmValues = ref(props.selectedValue);
|
|
16966
16981
|
const displayOptions = computed(() => {
|
|
16967
|
-
return props.filteredOptions
|
|
16982
|
+
return props.filteredOptions !== void 0 ? props.filteredOptions : currentOptions2.value;
|
|
16968
16983
|
});
|
|
16969
16984
|
const displaySelectedIndexes = computed(() => {
|
|
16970
16985
|
if (!props.filteredOptions || props.filteredOptions.length === 0) {
|
|
@@ -17062,11 +17077,13 @@ var stdin_default$A = defineComponent({
|
|
|
17062
17077
|
if (newValue !== props.showPicker) {
|
|
17063
17078
|
emit("update:showPicker", newValue);
|
|
17064
17079
|
}
|
|
17065
|
-
|
|
17066
|
-
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17080
|
+
if (newValue) {
|
|
17081
|
+
currentOptions2.value = deepClone(props.options);
|
|
17082
|
+
confirmIndexes.value = deepClone(currentSelectedIndex.value);
|
|
17083
|
+
confirmValues.value = deepClone(currentSelectedValue.value);
|
|
17084
|
+
getIndexesByValues();
|
|
17085
|
+
updateAllSelectedOptions();
|
|
17086
|
+
}
|
|
17070
17087
|
});
|
|
17071
17088
|
watch(() => props.showPicker, (newValue) => {
|
|
17072
17089
|
var _a;
|
|
@@ -17192,65 +17209,87 @@ var stdin_default$A = defineComponent({
|
|
|
17192
17209
|
const handleSelectAll = () => {
|
|
17193
17210
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
17194
17211
|
confirmIndexes.value = [];
|
|
17212
|
+
confirmValues.value = [];
|
|
17213
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17214
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17195
17215
|
updateAllSelectedOptions();
|
|
17216
|
+
onChange();
|
|
17196
17217
|
return;
|
|
17197
17218
|
}
|
|
17219
|
+
let newIndexes = [];
|
|
17198
17220
|
if (!isAllSelected.value) {
|
|
17199
17221
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
17200
|
-
const selectedIndexes = [];
|
|
17201
17222
|
displayOptions.value.forEach((option2) => {
|
|
17202
17223
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option2.value);
|
|
17203
17224
|
if (originalIndex >= 0) {
|
|
17204
|
-
|
|
17225
|
+
newIndexes.push(originalIndex);
|
|
17205
17226
|
}
|
|
17206
17227
|
});
|
|
17207
|
-
confirmIndexes.value = selectedIndexes;
|
|
17208
17228
|
} else {
|
|
17209
|
-
|
|
17229
|
+
newIndexes = currentOptions2.value.map((_, index2) => index2);
|
|
17210
17230
|
}
|
|
17211
17231
|
} else {
|
|
17212
|
-
|
|
17232
|
+
newIndexes = [];
|
|
17213
17233
|
}
|
|
17234
|
+
confirmIndexes.value = newIndexes;
|
|
17235
|
+
if (confirmIndexes.value.length > 0) {
|
|
17236
|
+
getValuesByIndexes();
|
|
17237
|
+
} else {
|
|
17238
|
+
confirmValues.value = [];
|
|
17239
|
+
}
|
|
17240
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17241
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17214
17242
|
updateAllSelectedOptions();
|
|
17243
|
+
onChange();
|
|
17215
17244
|
};
|
|
17216
17245
|
const onSelectOther = () => {
|
|
17217
17246
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
17218
17247
|
confirmIndexes.value = [];
|
|
17248
|
+
confirmValues.value = [];
|
|
17249
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17250
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17219
17251
|
updateAllSelectedOptions();
|
|
17252
|
+
onChange();
|
|
17220
17253
|
return;
|
|
17221
17254
|
}
|
|
17255
|
+
let newIndexes = [];
|
|
17222
17256
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
17223
|
-
const filteredValues = new Set(displayOptions.value.map((opt) => opt.value));
|
|
17224
17257
|
const currentSelectedInFiltered = /* @__PURE__ */ new Set();
|
|
17225
17258
|
confirmIndexes.value.forEach((idx) => {
|
|
17226
17259
|
var _a;
|
|
17227
17260
|
if (idx >= 0 && idx < currentOptions2.value.length) {
|
|
17228
17261
|
const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
|
|
17229
|
-
|
|
17262
|
+
const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
|
|
17263
|
+
if (isInFilteredList) {
|
|
17230
17264
|
currentSelectedInFiltered.add(idx);
|
|
17231
17265
|
}
|
|
17232
17266
|
}
|
|
17233
17267
|
});
|
|
17234
|
-
const newSelectedIndexes = [];
|
|
17235
17268
|
displayOptions.value.forEach((option2) => {
|
|
17236
17269
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option2.value);
|
|
17237
17270
|
if (originalIndex >= 0) {
|
|
17238
17271
|
if (!currentSelectedInFiltered.has(originalIndex)) {
|
|
17239
|
-
|
|
17272
|
+
newIndexes.push(originalIndex);
|
|
17240
17273
|
}
|
|
17241
17274
|
}
|
|
17242
17275
|
});
|
|
17243
|
-
confirmIndexes.value = newSelectedIndexes;
|
|
17244
17276
|
} else {
|
|
17245
|
-
const temp = new Array();
|
|
17246
17277
|
currentOptions2.value.forEach((_, index2) => {
|
|
17247
17278
|
if (!confirmIndexes.value.includes(index2)) {
|
|
17248
|
-
|
|
17279
|
+
newIndexes.push(index2);
|
|
17249
17280
|
}
|
|
17250
17281
|
});
|
|
17251
|
-
confirmIndexes.value = temp;
|
|
17252
17282
|
}
|
|
17283
|
+
confirmIndexes.value = newIndexes;
|
|
17284
|
+
if (confirmIndexes.value.length > 0) {
|
|
17285
|
+
getValuesByIndexes();
|
|
17286
|
+
} else {
|
|
17287
|
+
confirmValues.value = [];
|
|
17288
|
+
}
|
|
17289
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17290
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17253
17291
|
updateAllSelectedOptions();
|
|
17292
|
+
onChange();
|
|
17254
17293
|
};
|
|
17255
17294
|
const genOptionItems = () => {
|
|
17256
17295
|
let formatOptions = [];
|
|
@@ -17265,7 +17304,7 @@ var stdin_default$A = defineComponent({
|
|
|
17265
17304
|
return createVNode(stdin_default$B, {
|
|
17266
17305
|
"ref": pickerOptions,
|
|
17267
17306
|
"currentIndexes": displaySelectedIndexes.value,
|
|
17268
|
-
"onUpdate:currentIndexes":
|
|
17307
|
+
"onUpdate:currentIndexes": onUpdateCurrentIndexes,
|
|
17269
17308
|
"columnCounts": props.columnCounts,
|
|
17270
17309
|
"initialOptions": formatOptions,
|
|
17271
17310
|
"allowHtml": props.allowHtml,
|
|
@@ -23379,7 +23418,7 @@ const Lazyload = {
|
|
|
23379
23418
|
});
|
|
23380
23419
|
}
|
|
23381
23420
|
};
|
|
23382
|
-
const version = "3.1.
|
|
23421
|
+
const version = "3.1.69";
|
|
23383
23422
|
function install(app) {
|
|
23384
23423
|
const components = [
|
|
23385
23424
|
ActionSheet,
|
package/lib/zartui.js
CHANGED
|
@@ -4223,6 +4223,7 @@
|
|
|
4223
4223
|
scrollable
|
|
4224
4224
|
} = props;
|
|
4225
4225
|
const isCard = type === "card";
|
|
4226
|
+
const isCapsule = type === "capsule";
|
|
4226
4227
|
if (color && isCard) {
|
|
4227
4228
|
style2.borderColor = color;
|
|
4228
4229
|
if (!disabled) {
|
|
@@ -4233,6 +4234,17 @@
|
|
|
4233
4234
|
}
|
|
4234
4235
|
}
|
|
4235
4236
|
}
|
|
4237
|
+
if (isCapsule) {
|
|
4238
|
+
if (!disabled) {
|
|
4239
|
+
if (isActive) {
|
|
4240
|
+
style2.backgroundImage = "linear-gradient(-80deg, #85C0FF 0%, #3388FF 100%)";
|
|
4241
|
+
style2.borderRadius = "14px";
|
|
4242
|
+
style2.color = "#ffffff";
|
|
4243
|
+
} else {
|
|
4244
|
+
style2.backgroundColor = "#ffffff";
|
|
4245
|
+
}
|
|
4246
|
+
}
|
|
4247
|
+
}
|
|
4236
4248
|
const titleColor = isActive ? activeColor : inactiveColor;
|
|
4237
4249
|
if (titleColor) {
|
|
4238
4250
|
style2.color = titleColor;
|
|
@@ -18718,7 +18730,10 @@
|
|
|
18718
18730
|
showToolbar: truthProp,
|
|
18719
18731
|
showTitle: truthProp,
|
|
18720
18732
|
options: makeArrayProp(),
|
|
18721
|
-
filteredOptions:
|
|
18733
|
+
filteredOptions: {
|
|
18734
|
+
type: Array,
|
|
18735
|
+
default: void 0
|
|
18736
|
+
},
|
|
18722
18737
|
toolbarPosition: makeStringProp("bottom"),
|
|
18723
18738
|
textKey: makeStringProp("text"),
|
|
18724
18739
|
columnCounts: makeNumberProp(3),
|
|
@@ -18742,7 +18757,7 @@
|
|
|
18742
18757
|
const confirmIndexes = vue.ref(props.selectedIndex);
|
|
18743
18758
|
const confirmValues = vue.ref(props.selectedValue);
|
|
18744
18759
|
const displayOptions = vue.computed(() => {
|
|
18745
|
-
return props.filteredOptions
|
|
18760
|
+
return props.filteredOptions !== void 0 ? props.filteredOptions : currentOptions2.value;
|
|
18746
18761
|
});
|
|
18747
18762
|
const displaySelectedIndexes = vue.computed(() => {
|
|
18748
18763
|
if (!props.filteredOptions || props.filteredOptions.length === 0) {
|
|
@@ -18840,11 +18855,13 @@
|
|
|
18840
18855
|
if (newValue !== props.showPicker) {
|
|
18841
18856
|
emit("update:showPicker", newValue);
|
|
18842
18857
|
}
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18858
|
+
if (newValue) {
|
|
18859
|
+
currentOptions2.value = deepClone(props.options);
|
|
18860
|
+
confirmIndexes.value = deepClone(currentSelectedIndex.value);
|
|
18861
|
+
confirmValues.value = deepClone(currentSelectedValue.value);
|
|
18862
|
+
getIndexesByValues();
|
|
18863
|
+
updateAllSelectedOptions();
|
|
18864
|
+
}
|
|
18848
18865
|
});
|
|
18849
18866
|
vue.watch(() => props.showPicker, (newValue) => {
|
|
18850
18867
|
var _a;
|
|
@@ -18970,65 +18987,87 @@
|
|
|
18970
18987
|
const handleSelectAll = () => {
|
|
18971
18988
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
18972
18989
|
confirmIndexes.value = [];
|
|
18990
|
+
confirmValues.value = [];
|
|
18991
|
+
emit("update:selectedValue", confirmValues.value);
|
|
18992
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
18973
18993
|
updateAllSelectedOptions();
|
|
18994
|
+
onChange();
|
|
18974
18995
|
return;
|
|
18975
18996
|
}
|
|
18997
|
+
let newIndexes = [];
|
|
18976
18998
|
if (!isAllSelected.value) {
|
|
18977
18999
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
18978
|
-
const selectedIndexes = [];
|
|
18979
19000
|
displayOptions.value.forEach((option) => {
|
|
18980
19001
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option.value);
|
|
18981
19002
|
if (originalIndex >= 0) {
|
|
18982
|
-
|
|
19003
|
+
newIndexes.push(originalIndex);
|
|
18983
19004
|
}
|
|
18984
19005
|
});
|
|
18985
|
-
confirmIndexes.value = selectedIndexes;
|
|
18986
19006
|
} else {
|
|
18987
|
-
|
|
19007
|
+
newIndexes = currentOptions2.value.map((_, index2) => index2);
|
|
18988
19008
|
}
|
|
18989
19009
|
} else {
|
|
18990
|
-
|
|
19010
|
+
newIndexes = [];
|
|
18991
19011
|
}
|
|
19012
|
+
confirmIndexes.value = newIndexes;
|
|
19013
|
+
if (confirmIndexes.value.length > 0) {
|
|
19014
|
+
getValuesByIndexes();
|
|
19015
|
+
} else {
|
|
19016
|
+
confirmValues.value = [];
|
|
19017
|
+
}
|
|
19018
|
+
emit("update:selectedValue", confirmValues.value);
|
|
19019
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
18992
19020
|
updateAllSelectedOptions();
|
|
19021
|
+
onChange();
|
|
18993
19022
|
};
|
|
18994
19023
|
const onSelectOther = () => {
|
|
18995
19024
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
18996
19025
|
confirmIndexes.value = [];
|
|
19026
|
+
confirmValues.value = [];
|
|
19027
|
+
emit("update:selectedValue", confirmValues.value);
|
|
19028
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
18997
19029
|
updateAllSelectedOptions();
|
|
19030
|
+
onChange();
|
|
18998
19031
|
return;
|
|
18999
19032
|
}
|
|
19033
|
+
let newIndexes = [];
|
|
19000
19034
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
19001
|
-
const filteredValues = new Set(displayOptions.value.map((opt) => opt.value));
|
|
19002
19035
|
const currentSelectedInFiltered = /* @__PURE__ */ new Set();
|
|
19003
19036
|
confirmIndexes.value.forEach((idx) => {
|
|
19004
19037
|
var _a;
|
|
19005
19038
|
if (idx >= 0 && idx < currentOptions2.value.length) {
|
|
19006
19039
|
const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
|
|
19007
|
-
|
|
19040
|
+
const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
|
|
19041
|
+
if (isInFilteredList) {
|
|
19008
19042
|
currentSelectedInFiltered.add(idx);
|
|
19009
19043
|
}
|
|
19010
19044
|
}
|
|
19011
19045
|
});
|
|
19012
|
-
const newSelectedIndexes = [];
|
|
19013
19046
|
displayOptions.value.forEach((option) => {
|
|
19014
19047
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option.value);
|
|
19015
19048
|
if (originalIndex >= 0) {
|
|
19016
19049
|
if (!currentSelectedInFiltered.has(originalIndex)) {
|
|
19017
|
-
|
|
19050
|
+
newIndexes.push(originalIndex);
|
|
19018
19051
|
}
|
|
19019
19052
|
}
|
|
19020
19053
|
});
|
|
19021
|
-
confirmIndexes.value = newSelectedIndexes;
|
|
19022
19054
|
} else {
|
|
19023
|
-
const temp = new Array();
|
|
19024
19055
|
currentOptions2.value.forEach((_, index2) => {
|
|
19025
19056
|
if (!confirmIndexes.value.includes(index2)) {
|
|
19026
|
-
|
|
19057
|
+
newIndexes.push(index2);
|
|
19027
19058
|
}
|
|
19028
19059
|
});
|
|
19029
|
-
confirmIndexes.value = temp;
|
|
19030
19060
|
}
|
|
19061
|
+
confirmIndexes.value = newIndexes;
|
|
19062
|
+
if (confirmIndexes.value.length > 0) {
|
|
19063
|
+
getValuesByIndexes();
|
|
19064
|
+
} else {
|
|
19065
|
+
confirmValues.value = [];
|
|
19066
|
+
}
|
|
19067
|
+
emit("update:selectedValue", confirmValues.value);
|
|
19068
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
19031
19069
|
updateAllSelectedOptions();
|
|
19070
|
+
onChange();
|
|
19032
19071
|
};
|
|
19033
19072
|
const genOptionItems = () => {
|
|
19034
19073
|
let formatOptions = [];
|
|
@@ -19043,7 +19082,7 @@
|
|
|
19043
19082
|
return vue.createVNode(stdin_default$B, {
|
|
19044
19083
|
"ref": pickerOptions,
|
|
19045
19084
|
"currentIndexes": displaySelectedIndexes.value,
|
|
19046
|
-
"onUpdate:currentIndexes":
|
|
19085
|
+
"onUpdate:currentIndexes": onUpdateCurrentIndexes,
|
|
19047
19086
|
"columnCounts": props.columnCounts,
|
|
19048
19087
|
"initialOptions": formatOptions,
|
|
19049
19088
|
"allowHtml": props.allowHtml,
|
|
@@ -27441,7 +27480,7 @@
|
|
|
27441
27480
|
});
|
|
27442
27481
|
}
|
|
27443
27482
|
};
|
|
27444
|
-
const version = "3.1.
|
|
27483
|
+
const version = "3.1.69";
|
|
27445
27484
|
function install(app) {
|
|
27446
27485
|
const components = [
|
|
27447
27486
|
ActionSheet,
|