@webitel/ui-sdk 26.6.90 → 26.6.92
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/dist/{clients-IxWZVjVW.js → clients-Bj07uFky.js} +38 -263
- package/dist/{components-BqXO2X92.js → components-HoXxNgtV.js} +483 -481
- package/dist/{composables-CuxX3Ib0.js → composables-vmCh4eqT.js} +18 -20
- package/dist/ui-sdk.css +1 -1
- package/dist/ui-sdk.js +1 -1
- package/dist/ui-sdk.umd.cjs +135 -168
- package/dist/{useValidation-DGl2otXJ.js → useValidation-BedhHNX5.js} +1 -1
- package/dist/{wt-chat-emoji-DMGWnSDG.js → wt-chat-emoji-Bxx-vud5.js} +1 -1
- package/dist/{wt-datepicker-slYQKBRT.js → wt-datepicker-D2GjAUWU.js} +1 -1
- package/dist/{wt-display-chip-items-CL9lPf4i.js → wt-display-chip-items-Dh4I_R3N.js} +1 -1
- package/dist/{wt-expansion-card-afRJCmRw.js → wt-expansion-card-DvLD-TP4.js} +1 -1
- package/dist/{wt-galleria-DGkRyAjw.js → wt-galleria-DT0SOjXk.js} +1 -1
- package/dist/{wt-search-bar-CYCOxWra.js → wt-search-bar-CUxiGcoz.js} +1 -1
- package/dist/{wt-send-message-popup-BV_3DOj4.js → wt-send-message-popup-CfXNIN5B.js} +2 -2
- package/dist/{wt-table-CC01Dw6T.js → wt-table-DS_2J5zF.js} +1 -1
- package/dist/{wt-timepicker-BEeUHumZ.js → wt-timepicker-Bxdc4s3_.js} +1 -1
- package/dist/{wt-type-extension-value-input-Cb_PUwOS.js → wt-type-extension-value-input-CkBLTUKL.js} +2 -2
- package/dist/{wt-vidstack-player-DlSB9Hkq.js → wt-vidstack-player-BJhIWHcT.js} +1 -1
- package/package.json +1 -1
- package/src/components/_internals/composables/useSelect/useSelect.ts +2 -4
- package/src/components/_internals/composables/useSelect/useSelectOptions.ts +2 -18
- package/src/components/wt-datepicker/_internals/composables/useRestoreOnBlur.ts +1 -1
- package/src/components/wt-multi-select/wt-multi-select.vue +8 -5
- package/src/components/wt-single-select/wt-single-select.vue +8 -5
- package/src/locale/en/en.js +2 -0
- package/src/locale/es/es.js +2 -0
- package/src/locale/kz/kz.js +2 -0
- package/src/locale/pl/pl.js +2 -0
- package/src/locale/ro/ro.js +2 -0
- package/src/locale/ru/ru.js +2 -0
- package/src/locale/uk/uk.js +2 -0
- package/src/locale/uz/uz.js +2 -0
- package/src/locale/vi/vi.js +2 -0
- package/src/mixins/validationMixin/vuelidate/useVuelidateValidation.ts +2 -0
- package/types/components/_internals/composables/useSelect/useSelect.d.ts +2 -3
- package/types/components/_internals/composables/useSelect/useSelectOptions.d.ts +2 -3
- package/types/components/wt-multi-select/wt-multi-select.vue.d.ts +6 -2
- package/types/components/wt-single-select/wt-single-select.vue.d.ts +6 -2
- package/types/locale/en/en.d.ts +1 -0
- package/types/locale/es/es.d.ts +1 -0
- package/types/locale/i18n.d.ts +9 -0
- package/types/locale/index.d.ts +9 -0
- package/types/locale/kz/kz.d.ts +1 -0
- package/types/locale/pl/pl.d.ts +1 -0
- package/types/locale/ro/ro.d.ts +1 -0
- package/types/locale/ru/ru.d.ts +1 -0
- package/types/locale/uk/uk.d.ts +1 -0
- package/types/locale/uz/uz.d.ts +1 -0
- package/types/locale/vi/vi.d.ts +1 -0
|
@@ -14,7 +14,7 @@ var i = ({ field: e }) => ({
|
|
|
14
14
|
invalid: l,
|
|
15
15
|
validationText: n(() => {
|
|
16
16
|
let e = "";
|
|
17
|
-
if (c.value && l.value && (o.value.required?.$invalid ? e = a("validation.required") : o.value.numeric?.$invalid ? e = a("validation.numeric") : o.value.email?.$invalid ? e = a("validation.email") : o.value.gatewayHostValidator?.$invalid ? e = a("validation.gatewayHostValidator") : o.value.ipValidator?.$invalid ? e = a("validation.ipValidator") : o.value.macValidator?.$invalid ? e = a("validation.macValidator") : o.value.minValue?.$invalid ? e = a("validation.minValue", { min: o.value.minValue.$params.min }) : o.value.maxValue?.$invalid ? e = a("validation.maxValue", { max: o.value.maxValue.$params.max }) : o.value.maxLength?.$invalid ? e = a("validation.maxLength", { max: o.value.maxLength.$params.max }) : o.value.sipAccountValidator?.$invalid ? e = a("validation.sipAccountValidator") : o.value.minLength?.$invalid ? e = a("validation.minLength", { min: o.value.minLength.$params.min }) : o.value.url?.$invalid ? e = `${a("validation.url")}` : o.value.regExpValidator?.$invalid ? e = `${a("validation.regExpValidator")}` : o.value.sameAs?.$invalid ? e = `${a("validation.sameAs")}` : o.value.domainValidator?.$invalid ? e = `${a("validation.domainValidator")}` : o.value.decimalValidator?.$invalid ? e = `${a("validation.decimalValidator")} ${o.value.decimalValidator.$params.count}` : o.value.websocketValidator?.$invalid ? e = `${a("validation.websocketValidator")}` : o.value.integer?.$invalid ? e = `${a("validation.integer")}` : o.value.regex?.$invalid ? e = o.value.regex?.$message || `${a("validation.isRegExpMatched")} ${o.value.regex?.$params?.regex}` : o.value.nameAlreadyInUse?.$invalid && (e = a("validation.
|
|
17
|
+
if (c.value && l.value && (o.value.required?.$invalid ? e = a("validation.required") : o.value.numeric?.$invalid ? e = a("validation.numeric") : o.value.email?.$invalid ? e = a("validation.email") : o.value.gatewayHostValidator?.$invalid ? e = a("validation.gatewayHostValidator") : o.value.ipValidator?.$invalid ? e = a("validation.ipValidator") : o.value.macValidator?.$invalid ? e = a("validation.macValidator") : o.value.minValue?.$invalid ? e = a("validation.minValue", { min: o.value.minValue.$params.min }) : o.value.maxValue?.$invalid ? e = a("validation.maxValue", { max: o.value.maxValue.$params.max }) : o.value.maxLength?.$invalid ? e = a("validation.maxLength", { max: o.value.maxLength.$params.max }) : o.value.sipAccountValidator?.$invalid ? e = a("validation.sipAccountValidator") : o.value.minLength?.$invalid ? e = a("validation.minLength", { min: o.value.minLength.$params.min }) : o.value.url?.$invalid ? e = `${a("validation.url")}` : o.value.regExpValidator?.$invalid ? e = `${a("validation.regExpValidator")}` : o.value.sameAs?.$invalid ? e = `${a("validation.sameAs")}` : o.value.domainValidator?.$invalid ? e = `${a("validation.domainValidator")}` : o.value.decimalValidator?.$invalid ? e = `${a("validation.decimalValidator")} ${o.value.decimalValidator.$params.count}` : o.value.websocketValidator?.$invalid ? e = `${a("validation.websocketValidator")}` : o.value.integer?.$invalid ? e = `${a("validation.integer")}` : o.value.regex?.$invalid ? e = o.value.regex?.$message || `${a("validation.isRegExpMatched")} ${o.value.regex?.$params?.regex}` : o.value.nameAlreadyInUse?.$invalid ? e = a("validation.nameAlreadyInUse") : o.value.phoneNumberSymbolsValidator?.$invalid && (e = a("validation.phoneNumberSymbolsValidator"))), s?.value) {
|
|
18
18
|
for (let { name: t, text: n } of s.value) o.value[t]?.$invalid && (e = n);
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
@@ -2,7 +2,7 @@ import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
|
2
2
|
import { d as t, f as n, l as r, r as i } from "./enums-De8CDKZ1.js";
|
|
3
3
|
import { a, i as o, n as s, r as c, t as l } from "./toZonedTime-B8L5kbse.js";
|
|
4
4
|
import { t as u } from "./vue-i18n-Db_oYfO8.js";
|
|
5
|
-
import { t as d } from "./useValidation-
|
|
5
|
+
import { t as d } from "./useValidation-BedhHNX5.js";
|
|
6
6
|
import { computed as f, createBlock as p, createCommentVNode as m, createElementBlock as ee, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, guardReactiveProps as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeProps as C, onMounted as w, onUnmounted as T, openBlock as E, renderSlot as D, resolveComponent as O, toDisplayString as k, toRefs as A, unref as j, useModel as M, useTemplateRef as N, vShow as P, withCtx as F, withDirectives as I } from "vue";
|
|
7
7
|
import L from "primevue/datepicker";
|
|
8
8
|
//#region node_modules/date-fns-tz/dist/esm/fromZonedTime/index.js
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, i as t } from "./components-
|
|
1
|
+
import { C as e, i as t } from "./components-HoXxNgtV.js";
|
|
2
2
|
import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
3
3
|
import { t as r } from "./displayText-CtaxzaBz.js";
|
|
4
4
|
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, renderList as f, renderSlot as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { l as t } from "./enums-De8CDKZ1.js";
|
|
3
3
|
import { t as n } from "./useExpansion-DVdIpoOn.js";
|
|
4
|
-
import "./composables-
|
|
4
|
+
import "./composables-vmCh4eqT.js";
|
|
5
5
|
import { t as r } from "./wt-expand-transition-C2p9bR4j.js";
|
|
6
6
|
import { createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, normalizeClass as l, normalizeProps as u, openBlock as d, renderSlot as f, resolveComponent as p, toRef as m, unref as h, vShow as g, withCtx as _, withDirectives as v, withKeys as y } from "vue";
|
|
7
7
|
//#region src/components/wt-expansion-card/wt-expansion-card.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { t } from "./vue-i18n-Db_oYfO8.js";
|
|
3
|
-
import { a as n, o as r } from "./composables-
|
|
3
|
+
import { a as n, o as r } from "./composables-vmCh4eqT.js";
|
|
4
4
|
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeModels as p, mergeProps as m, nextTick as h, normalizeClass as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderSlot as x, resolveComponent as S, toDisplayString as C, unref as w, useAttrs as T, useModel as E, vShow as D, watch as O, withCtx as k, withDirectives as A } from "vue";
|
|
5
5
|
//#region src/modules/DeleteConfirmationPopup/composables/useDeleteConfirmationPopup.js
|
|
6
6
|
var j = () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { t } from "./debounce-Bp3jy7S5.js";
|
|
3
|
-
import { t as n } from "./useValidation-
|
|
3
|
+
import { t as n } from "./useValidation-BedhHNX5.js";
|
|
4
4
|
import { computed as r, createBlock as i, createCommentVNode as a, createElementVNode as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderSlot as p, resolveComponent as m, resolveDirective as h, toDisplayString as g, toRefs as _, unref as v, withCtx as y, withDirectives as b } from "vue";
|
|
5
5
|
//#region src/components/wt-search-bar/wt-search-bar.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var x = { class: "wt-search-bar__icon-controls" }, S = /*#__PURE__*/ e(/* @__PURE__ */ u({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as e, r as t } from "./clients-
|
|
2
|
-
import { n } from "./components-
|
|
1
|
+
import { n as e, r as t } from "./clients-Bj07uFky.js";
|
|
2
|
+
import { n } from "./components-HoXxNgtV.js";
|
|
3
3
|
import { t as r } from "./vue-i18n-Db_oYfO8.js";
|
|
4
4
|
import { createBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, inject as c, mergeProps as l, onMounted as u, openBlock as d, ref as f, resolveComponent as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
5
5
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { t } from "./vue-i18n-Db_oYfO8.js";
|
|
3
3
|
import { n, t as r } from "./sortQueryAdapters-CyYXvnDN.js";
|
|
4
|
-
import { t as i } from "./composables-
|
|
4
|
+
import { t as i } from "./composables-vmCh4eqT.js";
|
|
5
5
|
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createSlots as d, createTextVNode as f, createVNode as p, defineComponent as m, nextTick as h, normalizeStyle as g, onMounted as _, onUnmounted as v, openBlock as y, ref as b, renderList as x, renderSlot as S, resolveComponent as C, resolveDirective as w, toDisplayString as T, useSlots as E, useTemplateRef as D, withCtx as O, withDirectives as k, withModifiers as A } from "vue";
|
|
6
6
|
//#region src/components/wt-table/wt-table.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var j = { class: "wt-table__th__content typo-body-1-bold" }, M = { class: "wt-table__td__actions" }, N = 10, P = /*#__PURE__*/ e(/* @__PURE__ */ m({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
2
2
|
import { l as t, r as n } from "./enums-De8CDKZ1.js";
|
|
3
3
|
import { t as r } from "./vue-i18n-Db_oYfO8.js";
|
|
4
|
-
import { t as i } from "./useValidation-
|
|
4
|
+
import { t as i } from "./useValidation-BedhHNX5.js";
|
|
5
5
|
import { computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, defineComponent as d, guardReactiveProps as f, mergeProps as p, nextTick as m, normalizeClass as h, normalizeProps as g, openBlock as _, renderSlot as v, resolveComponent as y, toDisplayString as b, toRefs as x, unref as S, withCtx as C } from "vue";
|
|
6
6
|
//#region src/components/wt-timepicker/wt-timepicker.vue?vue&type=script&setup=true&lang.ts
|
|
7
7
|
var w = { class: "wt-timepicker__wrapper" }, T = 3600, E = 60, D = /*#__PURE__*/ e(/* @__PURE__ */ d({
|
package/dist/{wt-type-extension-value-input-Cb_PUwOS.js → wt-type-extension-value-input-CkBLTUKL.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as e } from "./clients-
|
|
2
|
-
import { a as t, o as n, r, s as i } from "./components-
|
|
1
|
+
import { t as e } from "./clients-Bj07uFky.js";
|
|
2
|
+
import { a as t, o as n, r, s as i } from "./components-HoXxNgtV.js";
|
|
3
3
|
import { t as a } from "./enums-De8CDKZ1.js";
|
|
4
4
|
import { t as o } from "./vue-i18n-Db_oYfO8.js";
|
|
5
5
|
import { computed as s, createBlock as c, createCommentVNode as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, openBlock as m, renderSlot as h, resolveComponent as g, unref as _, useModel as v } from "vue";
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ export const useSelect = ({
|
|
|
17
17
|
searchMethod,
|
|
18
18
|
selectId,
|
|
19
19
|
isSingle,
|
|
20
|
-
|
|
20
|
+
strictApiOptions = undefined,
|
|
21
21
|
emit = () => {},
|
|
22
22
|
}) => {
|
|
23
23
|
const {
|
|
@@ -32,7 +32,6 @@ export const useSelect = ({
|
|
|
32
32
|
resetAndFetch,
|
|
33
33
|
filterOptionsBase,
|
|
34
34
|
updateSelectedOptionsCache,
|
|
35
|
-
isOptionDisabled,
|
|
36
35
|
} = useSelectOptions({
|
|
37
36
|
selected,
|
|
38
37
|
options,
|
|
@@ -41,7 +40,7 @@ export const useSelect = ({
|
|
|
41
40
|
dataKey,
|
|
42
41
|
allowCustomValues,
|
|
43
42
|
searchMethod,
|
|
44
|
-
|
|
43
|
+
strictApiOptions,
|
|
45
44
|
});
|
|
46
45
|
|
|
47
46
|
const {
|
|
@@ -114,6 +113,5 @@ export const useSelect = ({
|
|
|
114
113
|
onDropdownHide,
|
|
115
114
|
onInputKeydown,
|
|
116
115
|
clearValue,
|
|
117
|
-
isOptionDisabled,
|
|
118
116
|
};
|
|
119
117
|
};
|
|
@@ -16,7 +16,7 @@ export const useSelectOptions = ({
|
|
|
16
16
|
dataKey,
|
|
17
17
|
allowCustomValues,
|
|
18
18
|
searchMethod,
|
|
19
|
-
|
|
19
|
+
strictApiOptions,
|
|
20
20
|
}) => {
|
|
21
21
|
const { t } = useI18n();
|
|
22
22
|
const defaultOptionLabel = 'name';
|
|
@@ -186,7 +186,7 @@ export const useSelectOptions = ({
|
|
|
186
186
|
|
|
187
187
|
const addSelectedValueToList = (newVal) => {
|
|
188
188
|
// If the selected value is not in the list, add it
|
|
189
|
-
if (!newVal || !searchMethod.value) return;
|
|
189
|
+
if (!newVal || !searchMethod.value || strictApiOptions?.value) return;
|
|
190
190
|
const selectedAsArray = toArray(newVal);
|
|
191
191
|
const missingSelected = selectedAsArray.filter(
|
|
192
192
|
(s) => !isOptionSelected(s, filteredOptions.value, dataKey.value),
|
|
@@ -228,21 +228,6 @@ export const useSelectOptions = ({
|
|
|
228
228
|
},
|
|
229
229
|
);
|
|
230
230
|
|
|
231
|
-
const isOptionDisabled = (option: unknown): boolean => {
|
|
232
|
-
if (!disabledOptions?.value) return false;
|
|
233
|
-
return Array.isArray(disabledOptions.value)
|
|
234
|
-
? (disabledOptions.value as unknown[]).some(
|
|
235
|
-
(d) =>
|
|
236
|
-
d != null &&
|
|
237
|
-
typeof d === 'object' &&
|
|
238
|
-
option != null &&
|
|
239
|
-
typeof option === 'object' &&
|
|
240
|
-
(d as Record<string, unknown>)[dataKey.value] ===
|
|
241
|
-
(option as Record<string, unknown>)[dataKey.value],
|
|
242
|
-
)
|
|
243
|
-
: Boolean(disabledOptions.value);
|
|
244
|
-
};
|
|
245
|
-
|
|
246
231
|
return {
|
|
247
232
|
filterText,
|
|
248
233
|
filteredOptions,
|
|
@@ -255,6 +240,5 @@ export const useSelectOptions = ({
|
|
|
255
240
|
resetAndFetch,
|
|
256
241
|
filterOptionsBase,
|
|
257
242
|
updateSelectedOptionsCache,
|
|
258
|
-
isOptionDisabled,
|
|
259
243
|
};
|
|
260
244
|
};
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
:auto-option-focus="true"
|
|
26
26
|
:disabled="disabled"
|
|
27
27
|
:placeholder="placeholder || label"
|
|
28
|
-
:option-disabled="
|
|
28
|
+
:option-disabled="() => !!props.disabledOptions"
|
|
29
29
|
:options="filteredOptions"
|
|
30
30
|
:option-label="(option) => getOptionLabel(option)"
|
|
31
31
|
:option-value="optionValue"
|
|
@@ -141,9 +141,13 @@ interface Props extends SelectProps {
|
|
|
141
141
|
required?: boolean;
|
|
142
142
|
disabled?: boolean;
|
|
143
143
|
/**
|
|
144
|
-
* true disables all options but keeps dropdown visible
|
|
144
|
+
* true disables all options but keeps dropdown visible
|
|
145
145
|
*/
|
|
146
|
-
disabledOptions?: boolean
|
|
146
|
+
disabledOptions?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* true — the select will only show options returned by the API, never prepending the current model value if it is missing from the list
|
|
149
|
+
*/
|
|
150
|
+
strictApiOptions?: boolean;
|
|
147
151
|
/**
|
|
148
152
|
* false disables options search
|
|
149
153
|
*/
|
|
@@ -226,7 +230,6 @@ const {
|
|
|
226
230
|
filterOptions,
|
|
227
231
|
onInputKeydown,
|
|
228
232
|
clearValue,
|
|
229
|
-
isOptionDisabled,
|
|
230
233
|
} = useSelect({
|
|
231
234
|
selected: model,
|
|
232
235
|
options: computed(() => props.options),
|
|
@@ -240,7 +243,7 @@ const {
|
|
|
240
243
|
searchMethod: computed(() => props.searchMethod),
|
|
241
244
|
selectId: computed(() => selectId),
|
|
242
245
|
isSingle: false,
|
|
243
|
-
|
|
246
|
+
strictApiOptions: computed(() => props.strictApiOptions),
|
|
244
247
|
emit,
|
|
245
248
|
});
|
|
246
249
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
:focus-on-hover="false"
|
|
23
23
|
:disabled="disabled"
|
|
24
24
|
:placeholder="placeholder || label"
|
|
25
|
-
:option-disabled="
|
|
25
|
+
:option-disabled="() => !!props.disabledOptions"
|
|
26
26
|
:options="filteredOptions"
|
|
27
27
|
:option-label="(option) => getOptionLabel(option)"
|
|
28
28
|
:option-value="optionValue"
|
|
@@ -118,9 +118,13 @@ interface Props extends SelectProps {
|
|
|
118
118
|
disabled?: boolean;
|
|
119
119
|
size?: string | null;
|
|
120
120
|
/**
|
|
121
|
-
* true disables all options but keeps dropdown visible
|
|
121
|
+
* true disables all options but keeps dropdown visible
|
|
122
122
|
*/
|
|
123
|
-
disabledOptions?: boolean
|
|
123
|
+
disabledOptions?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* true — the select will only show options returned by the API, never prepending the current model value if it is missing from the list
|
|
126
|
+
*/
|
|
127
|
+
strictApiOptions?: boolean;
|
|
124
128
|
/**
|
|
125
129
|
* false disables options search
|
|
126
130
|
*/
|
|
@@ -198,7 +202,6 @@ const {
|
|
|
198
202
|
filterOptions,
|
|
199
203
|
onInputKeydown,
|
|
200
204
|
clearValue,
|
|
201
|
-
isOptionDisabled,
|
|
202
205
|
} = useSelect({
|
|
203
206
|
selected: model,
|
|
204
207
|
options: computed(() => props.options),
|
|
@@ -211,7 +214,7 @@ const {
|
|
|
211
214
|
searchMethod: computed(() => props.searchMethod),
|
|
212
215
|
selectId: computed(() => selectId),
|
|
213
216
|
isSingle: true,
|
|
214
|
-
|
|
217
|
+
strictApiOptions: computed(() => props.strictApiOptions),
|
|
215
218
|
emit,
|
|
216
219
|
});
|
|
217
220
|
|
package/src/locale/en/en.js
CHANGED
|
@@ -483,6 +483,8 @@ export default deepmerge(
|
|
|
483
483
|
'The code must contain only letters (A-Z, a-z) and numbers (0-9), and must start with a letter',
|
|
484
484
|
integer: 'The field should contain only whole numbers',
|
|
485
485
|
nameAlreadyInUse: 'This name is already in use',
|
|
486
|
+
phoneNumberSymbolsValidator:
|
|
487
|
+
"Number must contain letters (a-z, A-Z), numbers (0-9), and special characters: +, -, _, ., !, ~, *, ', (,)",
|
|
486
488
|
},
|
|
487
489
|
webitelUI: {
|
|
488
490
|
searchBar: {
|
package/src/locale/es/es.js
CHANGED
|
@@ -469,6 +469,8 @@ export default {
|
|
|
469
469
|
'El código debe contener solo letras (A-Z, a-z) y números (0-9), y debe comenzar con una letra',
|
|
470
470
|
integer: 'El campo debe contener solo números enteros',
|
|
471
471
|
nameAlreadyInUse: 'Este nombre ya está en uso',
|
|
472
|
+
phoneNumberSymbolsValidator:
|
|
473
|
+
"El número solo puede contener letras (a-z, A-Z), números (0-9) y los símbolos: +, -, _, ., !, ~, *, ', (, )",
|
|
472
474
|
},
|
|
473
475
|
webitelUI: {
|
|
474
476
|
searchBar: {
|
package/src/locale/kz/kz.js
CHANGED
|
@@ -471,6 +471,8 @@ export default {
|
|
|
471
471
|
'Код тек әріптерден (A-Z, a-z) және сандардан (0-9) тұруы керек және әріптен басталуы керек',
|
|
472
472
|
integer: 'Өріс тек бүтін сандарды қамтуы керек',
|
|
473
473
|
nameAlreadyInUse: 'Бұл атау қолданыста',
|
|
474
|
+
phoneNumberSymbolsValidator:
|
|
475
|
+
"Нөмірде тек әріптер (a-z, A-Z), сандар (0-9) және мына таңбалар болуы мүмкін: +, -, _, ., !, ~, *, ', (, )",
|
|
474
476
|
},
|
|
475
477
|
webitelUI: {
|
|
476
478
|
searchBar: {
|
package/src/locale/pl/pl.js
CHANGED
|
@@ -472,6 +472,8 @@ export default {
|
|
|
472
472
|
'Kod musi zawierać tylko litery (A-Z, a-z) i cyfry (0-9) oraz musi zaczynać się od litery',
|
|
473
473
|
integer: 'Pole powinno zawierać tylko liczby całkowite',
|
|
474
474
|
nameAlreadyInUse: 'Ta nazwa jest już używana',
|
|
475
|
+
phoneNumberSymbolsValidator:
|
|
476
|
+
"Numer może zawierać wyłącznie litery (a-z, A-Z), cyfry (0-9) oraz symbole: +, -, _, ., !, ~, *, ', (, )",
|
|
475
477
|
},
|
|
476
478
|
webitelUI: {
|
|
477
479
|
searchBar: {
|
package/src/locale/ro/ro.js
CHANGED
|
@@ -476,6 +476,8 @@ export default {
|
|
|
476
476
|
'Codul trebuie să conțină doar litere (A-Z, a-z) și cifre (0-9), și trebuie să înceapă cu o literă',
|
|
477
477
|
integer: 'Câmpul trebuie să conțină doar numere întregi',
|
|
478
478
|
nameAlreadyInUse: 'Acest nume este deja folosit',
|
|
479
|
+
phoneNumberSymbolsValidator:
|
|
480
|
+
"Numărul poate conține doar litere (a-z, A-Z), cifre (0-9) și simbolurile: +, -, _, ., !, ~, *, ', (, )",
|
|
479
481
|
},
|
|
480
482
|
webitelUI: {
|
|
481
483
|
searchBar: {
|
package/src/locale/ru/ru.js
CHANGED
|
@@ -471,6 +471,8 @@ export default {
|
|
|
471
471
|
'Код должен содержать только буквы (A-Z, a-z) и цифры (0-9) и начинатся с буквы',
|
|
472
472
|
integer: 'Поле должно содержать только целые числа',
|
|
473
473
|
nameAlreadyInUse: 'Это название уже используется',
|
|
474
|
+
phoneNumberSymbolsValidator:
|
|
475
|
+
"Номер может содержать только буквы (a-z, A-Z), цифры (0-9) и символы: +, -, _, ., !, ~, *, ', (, )",
|
|
474
476
|
},
|
|
475
477
|
webitelUI: {
|
|
476
478
|
searchBar: {
|
package/src/locale/uk/uk.js
CHANGED
|
@@ -470,6 +470,8 @@ export default {
|
|
|
470
470
|
'Код повинен містити лише літери (A-Z, a-z) та цифри (0-9) і починатися з літери',
|
|
471
471
|
integer: 'Поле повинно містити лише цілі числа',
|
|
472
472
|
nameAlreadyInUse: 'Така назва вже використовується',
|
|
473
|
+
phoneNumberSymbolsValidator:
|
|
474
|
+
"Номер може містити лише літери (a-z, A-Z), цифри (0-9) та символи: +, -, _, ., !, ~, *, ', (, )",
|
|
473
475
|
},
|
|
474
476
|
webitelUI: {
|
|
475
477
|
searchBar: {
|
package/src/locale/uz/uz.js
CHANGED
|
@@ -476,6 +476,8 @@ export default {
|
|
|
476
476
|
"Kod faqat harflar (A-Z, a-z) va raqamlar (0-9) dan iborat bo'lishi va harf bilan boshlanishi kerak",
|
|
477
477
|
integer: "Maydon faqat butun sonlardan iborat bo'lishi kerak",
|
|
478
478
|
nameAlreadyInUse: 'Ushbu nom allaqachon mavjud',
|
|
479
|
+
phoneNumberSymbolsValidator:
|
|
480
|
+
"Raqamda faqat harflar (a-z, A-Z), raqamlar (0-9) va quyidagi belgilar bo'lishi mumkin: +, -, _, ., !, ~, *, ', (, )",
|
|
479
481
|
},
|
|
480
482
|
webitelUI: {
|
|
481
483
|
searchBar: {
|
package/src/locale/vi/vi.js
CHANGED
|
@@ -475,6 +475,8 @@ export default {
|
|
|
475
475
|
'Mã phải chỉ chứa chữ cái (A-Z, a-z) và số (0-9), và phải bắt đầu bằng chữ cái',
|
|
476
476
|
integer: 'Trường này chỉ được chứa số nguyên',
|
|
477
477
|
nameAlreadyInUse: 'Tên này đã được sử dụng',
|
|
478
|
+
phoneNumberSymbolsValidator:
|
|
479
|
+
"Số chỉ được chứa chữ cái (a-z, A-Z), chữ số (0-9) và các ký tự: +, -, _, ., !, ~, *, ', (, )",
|
|
478
480
|
},
|
|
479
481
|
webitelUI: {
|
|
480
482
|
searchBar: {
|
|
@@ -78,6 +78,8 @@ export const useFieldValidation = ({
|
|
|
78
78
|
`${t('validation.isRegExpMatched')} ${v.value.regex?.$params?.regex}`;
|
|
79
79
|
else if (v.value.nameAlreadyInUse?.$invalid) {
|
|
80
80
|
validationText = t('validation.nameAlreadyInUse');
|
|
81
|
+
} else if (v.value.phoneNumberSymbolsValidator?.$invalid) {
|
|
82
|
+
validationText = t('validation.phoneNumberSymbolsValidator');
|
|
81
83
|
}
|
|
82
84
|
}
|
|
83
85
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useSelect: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, manualCustomValues, filterInput, selectRef, searchMethod, selectId, isSingle,
|
|
1
|
+
export declare const useSelect: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, manualCustomValues, filterInput, selectRef, searchMethod, selectId, isSingle, strictApiOptions, emit, }: {
|
|
2
2
|
selected: any;
|
|
3
3
|
options: any;
|
|
4
4
|
optionLabel: any;
|
|
@@ -11,7 +11,7 @@ export declare const useSelect: ({ selected, options, optionLabel, optionValue,
|
|
|
11
11
|
searchMethod: any;
|
|
12
12
|
selectId: any;
|
|
13
13
|
isSingle: any;
|
|
14
|
-
|
|
14
|
+
strictApiOptions?: any;
|
|
15
15
|
emit?: () => void;
|
|
16
16
|
}) => {
|
|
17
17
|
isLoading: import("vue").Ref<boolean, boolean>;
|
|
@@ -28,5 +28,4 @@ export declare const useSelect: ({ selected, options, optionLabel, optionValue,
|
|
|
28
28
|
onDropdownHide: () => void;
|
|
29
29
|
onInputKeydown: () => void;
|
|
30
30
|
clearValue: () => void;
|
|
31
|
-
isOptionDisabled: (option: unknown) => boolean;
|
|
32
31
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const useSelectOptions: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, searchMethod,
|
|
1
|
+
export declare const useSelectOptions: ({ selected, options, optionLabel, optionValue, dataKey, allowCustomValues, searchMethod, strictApiOptions, }: {
|
|
2
2
|
selected: any;
|
|
3
3
|
options: any;
|
|
4
4
|
optionLabel: any;
|
|
@@ -6,7 +6,7 @@ export declare const useSelectOptions: ({ selected, options, optionLabel, option
|
|
|
6
6
|
dataKey: any;
|
|
7
7
|
allowCustomValues: any;
|
|
8
8
|
searchMethod: any;
|
|
9
|
-
|
|
9
|
+
strictApiOptions: any;
|
|
10
10
|
}) => {
|
|
11
11
|
filterText: import("vue").Ref<string, string>;
|
|
12
12
|
filteredOptions: import("vue").Ref<any, any>;
|
|
@@ -19,5 +19,4 @@ export declare const useSelectOptions: ({ selected, options, optionLabel, option
|
|
|
19
19
|
resetAndFetch: (search?: string) => void;
|
|
20
20
|
filterOptionsBase: (value: any) => void;
|
|
21
21
|
updateSelectedOptionsCache: () => void;
|
|
22
|
-
isOptionDisabled: (option: unknown) => boolean;
|
|
23
22
|
};
|
|
@@ -5,9 +5,13 @@ interface Props extends SelectProps {
|
|
|
5
5
|
required?: boolean;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
/**
|
|
8
|
-
* true disables all options but keeps dropdown visible
|
|
8
|
+
* true disables all options but keeps dropdown visible
|
|
9
9
|
*/
|
|
10
|
-
disabledOptions?: boolean
|
|
10
|
+
disabledOptions?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* true — the select will only show options returned by the API, never prepending the current model value if it is missing from the list
|
|
13
|
+
*/
|
|
14
|
+
strictApiOptions?: boolean;
|
|
11
15
|
/**
|
|
12
16
|
* false disables options search
|
|
13
17
|
*/
|
|
@@ -6,9 +6,13 @@ interface Props extends SelectProps {
|
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
size?: string | null;
|
|
8
8
|
/**
|
|
9
|
-
* true disables all options but keeps dropdown visible
|
|
9
|
+
* true disables all options but keeps dropdown visible
|
|
10
10
|
*/
|
|
11
|
-
disabledOptions?: boolean
|
|
11
|
+
disabledOptions?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* true — the select will only show options returned by the API, never prepending the current model value if it is missing from the list
|
|
14
|
+
*/
|
|
15
|
+
strictApiOptions?: boolean;
|
|
12
16
|
/**
|
|
13
17
|
* false disables options search
|
|
14
18
|
*/
|
package/types/locale/en/en.d.ts
CHANGED
package/types/locale/es/es.d.ts
CHANGED
|
@@ -463,6 +463,7 @@ declare namespace _default {
|
|
|
463
463
|
export let latinWithNumber: string;
|
|
464
464
|
export let integer: string;
|
|
465
465
|
export let nameAlreadyInUse: string;
|
|
466
|
+
export let phoneNumberSymbolsValidator: string;
|
|
466
467
|
}
|
|
467
468
|
export namespace webitelUI {
|
|
468
469
|
export namespace searchBar {
|
package/types/locale/i18n.d.ts
CHANGED
|
@@ -419,6 +419,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
419
419
|
latinWithNumber: string;
|
|
420
420
|
integer: string;
|
|
421
421
|
nameAlreadyInUse: string;
|
|
422
|
+
phoneNumberSymbolsValidator: string;
|
|
422
423
|
};
|
|
423
424
|
webitelUI: {
|
|
424
425
|
searchBar: {
|
|
@@ -1263,6 +1264,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
1263
1264
|
latinWithNumber: string;
|
|
1264
1265
|
integer: string;
|
|
1265
1266
|
nameAlreadyInUse: string;
|
|
1267
|
+
phoneNumberSymbolsValidator: string;
|
|
1266
1268
|
};
|
|
1267
1269
|
webitelUI: {
|
|
1268
1270
|
searchBar: {
|
|
@@ -2091,6 +2093,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
2091
2093
|
latinWithNumber: string;
|
|
2092
2094
|
integer: string;
|
|
2093
2095
|
nameAlreadyInUse: string;
|
|
2096
|
+
phoneNumberSymbolsValidator: string;
|
|
2094
2097
|
};
|
|
2095
2098
|
webitelUI: {
|
|
2096
2099
|
searchBar: {
|
|
@@ -2921,6 +2924,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
2921
2924
|
latinWithNumber: string;
|
|
2922
2925
|
integer: string;
|
|
2923
2926
|
nameAlreadyInUse: string;
|
|
2927
|
+
phoneNumberSymbolsValidator: string;
|
|
2924
2928
|
};
|
|
2925
2929
|
webitelUI: {
|
|
2926
2930
|
searchBar: {
|
|
@@ -3749,6 +3753,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
3749
3753
|
latinWithNumber: string;
|
|
3750
3754
|
integer: string;
|
|
3751
3755
|
nameAlreadyInUse: string;
|
|
3756
|
+
phoneNumberSymbolsValidator: string;
|
|
3752
3757
|
};
|
|
3753
3758
|
webitelUI: {
|
|
3754
3759
|
searchBar: {
|
|
@@ -4579,6 +4584,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
4579
4584
|
latinWithNumber: string;
|
|
4580
4585
|
integer: string;
|
|
4581
4586
|
nameAlreadyInUse: string;
|
|
4587
|
+
phoneNumberSymbolsValidator: string;
|
|
4582
4588
|
};
|
|
4583
4589
|
webitelUI: {
|
|
4584
4590
|
searchBar: {
|
|
@@ -5409,6 +5415,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
5409
5415
|
latinWithNumber: string;
|
|
5410
5416
|
integer: string;
|
|
5411
5417
|
nameAlreadyInUse: string;
|
|
5418
|
+
phoneNumberSymbolsValidator: string;
|
|
5412
5419
|
};
|
|
5413
5420
|
webitelUI: {
|
|
5414
5421
|
searchBar: {
|
|
@@ -6240,6 +6247,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
6240
6247
|
latinWithNumber: string;
|
|
6241
6248
|
integer: string;
|
|
6242
6249
|
nameAlreadyInUse: string;
|
|
6250
|
+
phoneNumberSymbolsValidator: string;
|
|
6243
6251
|
};
|
|
6244
6252
|
webitelUI: {
|
|
6245
6253
|
searchBar: {
|
|
@@ -7070,6 +7078,7 @@ declare const _default: import("vue-i18n").I18n<{
|
|
|
7070
7078
|
latinWithNumber: string;
|
|
7071
7079
|
integer: string;
|
|
7072
7080
|
nameAlreadyInUse: string;
|
|
7081
|
+
phoneNumberSymbolsValidator: string;
|
|
7073
7082
|
};
|
|
7074
7083
|
webitelUI: {
|
|
7075
7084
|
searchBar: {
|
package/types/locale/index.d.ts
CHANGED
|
@@ -429,6 +429,7 @@ export declare const messages: {
|
|
|
429
429
|
latinWithNumber: string;
|
|
430
430
|
integer: string;
|
|
431
431
|
nameAlreadyInUse: string;
|
|
432
|
+
phoneNumberSymbolsValidator: string;
|
|
432
433
|
};
|
|
433
434
|
webitelUI: {
|
|
434
435
|
searchBar: {
|
|
@@ -1273,6 +1274,7 @@ export declare const messages: {
|
|
|
1273
1274
|
latinWithNumber: string;
|
|
1274
1275
|
integer: string;
|
|
1275
1276
|
nameAlreadyInUse: string;
|
|
1277
|
+
phoneNumberSymbolsValidator: string;
|
|
1276
1278
|
};
|
|
1277
1279
|
webitelUI: {
|
|
1278
1280
|
searchBar: {
|
|
@@ -2101,6 +2103,7 @@ export declare const messages: {
|
|
|
2101
2103
|
latinWithNumber: string;
|
|
2102
2104
|
integer: string;
|
|
2103
2105
|
nameAlreadyInUse: string;
|
|
2106
|
+
phoneNumberSymbolsValidator: string;
|
|
2104
2107
|
};
|
|
2105
2108
|
webitelUI: {
|
|
2106
2109
|
searchBar: {
|
|
@@ -2931,6 +2934,7 @@ export declare const messages: {
|
|
|
2931
2934
|
latinWithNumber: string;
|
|
2932
2935
|
integer: string;
|
|
2933
2936
|
nameAlreadyInUse: string;
|
|
2937
|
+
phoneNumberSymbolsValidator: string;
|
|
2934
2938
|
};
|
|
2935
2939
|
webitelUI: {
|
|
2936
2940
|
searchBar: {
|
|
@@ -3759,6 +3763,7 @@ export declare const messages: {
|
|
|
3759
3763
|
latinWithNumber: string;
|
|
3760
3764
|
integer: string;
|
|
3761
3765
|
nameAlreadyInUse: string;
|
|
3766
|
+
phoneNumberSymbolsValidator: string;
|
|
3762
3767
|
};
|
|
3763
3768
|
webitelUI: {
|
|
3764
3769
|
searchBar: {
|
|
@@ -4589,6 +4594,7 @@ export declare const messages: {
|
|
|
4589
4594
|
latinWithNumber: string;
|
|
4590
4595
|
integer: string;
|
|
4591
4596
|
nameAlreadyInUse: string;
|
|
4597
|
+
phoneNumberSymbolsValidator: string;
|
|
4592
4598
|
};
|
|
4593
4599
|
webitelUI: {
|
|
4594
4600
|
searchBar: {
|
|
@@ -5419,6 +5425,7 @@ export declare const messages: {
|
|
|
5419
5425
|
latinWithNumber: string;
|
|
5420
5426
|
integer: string;
|
|
5421
5427
|
nameAlreadyInUse: string;
|
|
5428
|
+
phoneNumberSymbolsValidator: string;
|
|
5422
5429
|
};
|
|
5423
5430
|
webitelUI: {
|
|
5424
5431
|
searchBar: {
|
|
@@ -6250,6 +6257,7 @@ export declare const messages: {
|
|
|
6250
6257
|
latinWithNumber: string;
|
|
6251
6258
|
integer: string;
|
|
6252
6259
|
nameAlreadyInUse: string;
|
|
6260
|
+
phoneNumberSymbolsValidator: string;
|
|
6253
6261
|
};
|
|
6254
6262
|
webitelUI: {
|
|
6255
6263
|
searchBar: {
|
|
@@ -7080,6 +7088,7 @@ export declare const messages: {
|
|
|
7080
7088
|
latinWithNumber: string;
|
|
7081
7089
|
integer: string;
|
|
7082
7090
|
nameAlreadyInUse: string;
|
|
7091
|
+
phoneNumberSymbolsValidator: string;
|
|
7083
7092
|
};
|
|
7084
7093
|
webitelUI: {
|
|
7085
7094
|
searchBar: {
|
package/types/locale/kz/kz.d.ts
CHANGED
|
@@ -463,6 +463,7 @@ declare namespace _default {
|
|
|
463
463
|
export let latinWithNumber: string;
|
|
464
464
|
export let integer: string;
|
|
465
465
|
export let nameAlreadyInUse: string;
|
|
466
|
+
export let phoneNumberSymbolsValidator: string;
|
|
466
467
|
}
|
|
467
468
|
export namespace webitelUI {
|
|
468
469
|
export namespace searchBar {
|