eco-vue-js 0.10.19 → 0.10.20
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":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AAkKA;
|
1
|
+
{"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AAkKA;AAubA,OAAO,KAAK,EAAC,qBAAqB,EAA8B,WAAW,EAAC,MAAM,SAAS,CAAA;yBAa1E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,kBAAkB,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eACnI,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAspB1D,mBAAmB,CAAC;;;;;;;sSAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;;2BAncrB,MAAM,KAAG,IAAI;MAmc8B,GAAG,IAAI;WACpE,GAAG;;gBAvZD,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YACf,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;YAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,OAAO,CAAA;YACjB,KAAK,EAAE,OAAO,CAAA;YACd,MAAM,CAAC,EAAE,MAAM,CAAA;SAChB,KAAK,IAAI;gBACF,MAAM,IAAI;;gBATV,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YACf,MAAM,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAA;YAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,OAAO,CAAA;YACjB,KAAK,EAAE,OAAO,CAAA;YACd,MAAM,CAAC,EAAE,MAAM,CAAA;SAChB,KAAK,IAAI;gBACF,MAAM,IAAI;;;YAlQd,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;YAChC,4BAA4B,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC9D,YAAY,GAAG,IAAI;;;;;YAgpBmB,OAAO,CAAC,OAAO,WAAW,CAAC;;AAhqBvE,wBAgqB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -123,15 +123,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
123
123
|
const loadingOptionIndex = ref(null);
|
124
124
|
const loadingCreate = ref(false);
|
125
125
|
const isDisabled = computed(() => props.loading || props.readonly || props.disabled);
|
126
|
-
const hasCreateOption = computed(() => props.createOption && !optionsFiltered.value.some((option) => props.valueGetter(option) === search.value));
|
126
|
+
const hasCreateOption = computed(() => props.createOption && (!optionsFiltered.value.some((option) => props.valueGetter(option) === search.value) || isModelValueSearch.value));
|
127
127
|
const close = () => {
|
128
|
-
|
129
|
-
focused.value = false;
|
130
|
-
if (props.selectOnClose && search.value && !isModelValueSearch.value) {
|
128
|
+
if (props.selectOnClose && focused.value && !isModelValueSearch.value) {
|
131
129
|
const optionExact = optionsFiltered.value.find((option) => props.valueGetter(option) === search.value);
|
132
130
|
if (optionExact) select(props.valueGetter(optionExact));
|
133
131
|
else create(search.value);
|
134
132
|
}
|
133
|
+
isOpen.value = false;
|
134
|
+
focused.value = false;
|
135
135
|
search.value = "";
|
136
136
|
};
|
137
137
|
const setLoadingOptionIndex = (value) => {
|
@@ -214,6 +214,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
214
214
|
inputRef.value?.focus();
|
215
215
|
};
|
216
216
|
const blur = () => {
|
217
|
+
focused.value = false;
|
217
218
|
inputRef.value?.blur();
|
218
219
|
};
|
219
220
|
const setSearch = (value) => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AAyHA;AAsSA,OAAO,KAAK,EAAC,gBAAgB,EAAE,qBAAqB,EAA6B,MAAM,SAAS,CAAA;yBAW/E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eAC5H,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;
|
1
|
+
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AAyHA;AAsSA,OAAO,KAAK,EAAC,gBAAgB,EAAE,qBAAqB,EAA6B,MAAM,SAAS,CAAA;yBAW/E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,e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C9B,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;YAC1C,YAAY,GAAG,IAAI;YACnB,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;;;;;YA6eM,OAAO,CAAC,OAAO,WAAW,CAAC;;AApgBvE,wBAogB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -241,7 +241,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
241
241
|
loading: _ctx.loading || isFetchingPrefix.value,
|
242
242
|
disabled: isDisabled.value,
|
243
243
|
"empty-stub": !search.value && _ctx.emptyStub ? _ctx.emptyStub : void 0,
|
244
|
-
"allow-create": _ctx.createOption && !hasSearchOption.value,
|
244
|
+
"allow-create": _ctx.createOption && (!hasSearchOption.value || isModelValueSearch.value),
|
245
245
|
"hide-option-icon": _ctx.hideOptionIcon,
|
246
246
|
"value-getter": _ctx.valueGetter,
|
247
247
|
"loading-create": loadingCreate.value,
|