@simsustech/quasar-components 0.11.0 → 0.11.2
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/CHANGELOG.md +12 -0
- package/dist/flags.js +1 -1
- package/dist/form.js +17 -9
- package/dist/general.js +1 -1
- package/dist/{index-CkV53iOe.js → index-DnmJt2wP.js} +1 -1
- package/dist/{nl-CYbwXc14.js → nl-BTgHOvpQ.js} +2 -2
- package/dist/{nl-DOn8oMdw.js → nl-db4MMX_N.js} +1 -1
- package/dist/types/ui/authentication/AccountsTable.vue.d.ts +1 -1
- package/dist/types/ui/authentication/OtpInput.vue.d.ts +4 -5
- package/dist/types/ui/form/DatePicker.vue.d.ts +4 -11
- package/dist/types/ui/form/FilteredModelSelect.vue.d.ts +1 -1
- package/dist/types/ui/form/FormInput.vue.d.ts +2 -1
- package/dist/types/ui/form/FormItem.vue.d.ts +2 -1
- package/dist/types/ui/form/PostalCodeInput.vue.d.ts +2 -2
- package/dist/types/ui/general/QDrawerList.vue.d.ts +2 -1
- package/package.json +20 -20
- package/src/ui/flags/lang/nl.ts +2 -2
- package/src/ui/form/DateInput.vue +1 -0
- package/src/ui/form/PostalCodeInput.vue +18 -7
- package/src/ui/form/lang/nl.ts +1 -1
- /package/dist/{style.css → quasar-components.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @simsustech/quasar-components
|
|
2
2
|
|
|
3
|
+
## 0.11.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 56d905c: feat(PostalCodeInput): use optional country prop instead of locale
|
|
8
|
+
|
|
9
|
+
## 0.11.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 11d936a: fix(DateInput): add pattern attribute for numbers only input
|
|
14
|
+
|
|
3
15
|
## 0.11.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/flags.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g, cR, a, k, i, b, m, h, j, l, c, p, o, n, d5, q, E, v, t, x, L, K, s, M, z, c5, A, J, C, D, H, r, B, G, F, w, y, P, X, $, S, _, cz, a7, a0, U, O, V, Y, a1, a3, Q, a4, W, a5, a6, av, a9, a8, aa, ab, d, ac, ah, ad, d1, e, ag, ct, aj, an, am, ak, bt, al, ao, as, cS, aA, au, ap, aE, aw, ax, az, at, aF, aB, af, ay, cr, aD, aC, aG, aH, aM, aJ, aL, a2, aI, aN, aQ, aP, aT, aV, aU, I, aS, aR, aO, aW, aZ, aX, a_, aY, b0, b5, N, b1, Z, c7, b2, b3, b4, R, a$, b6, b8, c8, bc, cu, d6, ba, b9, bd, be, b7, bb, bz, bv, bu, bx, c9, bh, bn, bg, bl, bB, bw, bf, bN, bo, bp, by, bm, bq, bk, bi, bs, bj, bA, bC, bG, bJ, bM, bK, bI, bF, bO, bE, bD, bL, bH, bP, bT, bW, aq, bU, bX, bQ, bZ, ca, bY, b$, bS, b_, bR, bV, c0, c4, c1, ch, c2, c3, cf, co, ci, cv, cy, ck, c6, cn, cx, cm, cj, cd, cg, cp, cw, cs, ce, ae, cl, cA, ai, cN, T, ar, cG, cE, cC, cH, cF, cM, cK, cI, cL, cJ, cO, cB, cD, cQ, cP, cU, cT, u, cV, cW, aK, cb, cY, c_, c$, cZ, cX, d0, cc, d2, br, cq, d3, d4 } from "./index-
|
|
1
|
+
import { g, cR, a, k, i, b, m, h, j, l, c, p, o, n, d5, q, E, v, t, x, L, K, s, M, z, c5, A, J, C, D, H, r, B, G, F, w, y, P, X, $, S, _, cz, a7, a0, U, O, V, Y, a1, a3, Q, a4, W, a5, a6, av, a9, a8, aa, ab, d, ac, ah, ad, d1, e, ag, ct, aj, an, am, ak, bt, al, ao, as, cS, aA, au, ap, aE, aw, ax, az, at, aF, aB, af, ay, cr, aD, aC, aG, aH, aM, aJ, aL, a2, aI, aN, aQ, aP, aT, aV, aU, I, aS, aR, aO, aW, aZ, aX, a_, aY, b0, b5, N, b1, Z, c7, b2, b3, b4, R, a$, b6, b8, c8, bc, cu, d6, ba, b9, bd, be, b7, bb, bz, bv, bu, bx, c9, bh, bn, bg, bl, bB, bw, bf, bN, bo, bp, by, bm, bq, bk, bi, bs, bj, bA, bC, bG, bJ, bM, bK, bI, bF, bO, bE, bD, bL, bH, bP, bT, bW, aq, bU, bX, bQ, bZ, ca, bY, b$, bS, b_, bR, bV, c0, c4, c1, ch, c2, c3, cf, co, ci, cv, cy, ck, c6, cn, cx, cm, cj, cd, cg, cp, cw, cs, ce, ae, cl, cA, ai, cN, T, ar, cG, cE, cC, cH, cF, cM, cK, cI, cL, cJ, cO, cB, cD, cQ, cP, cU, cT, u, cV, cW, aK, cb, cY, c_, c$, cZ, cX, d0, cc, d2, br, cq, d3, d4 } from "./index-DnmJt2wP.js";
|
|
2
2
|
export {
|
|
3
3
|
g as ad,
|
|
4
4
|
cR as ae,
|
package/dist/form.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ref, defineComponent, useAttrs, withAsyncContext, watch, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, computed, useSlots, renderSlot, createCommentVNode, createSlots, renderList,
|
|
1
|
+
import { ref, defineComponent, useAttrs, withAsyncContext, watch, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, toRefs, computed, useSlots, renderSlot, createCommentVNode, createSlots, renderList, resolveDirective, createElementBlock, Fragment, resolveDynamicComponent, createElementVNode, withDirectives } from "vue";
|
|
2
2
|
import { useQuasar, QSelect, QItem, QItemSection, QItemLabel, QInput, QDate, QIcon, QTooltip, QBtn, QPopupProxy, QField, QEditor } from "quasar";
|
|
3
|
-
import { f as flags, u as useLang$1 } from "./index-
|
|
3
|
+
import { f as flags, u as useLang$1 } from "./index-DnmJt2wP.js";
|
|
4
4
|
const lang$1 = {
|
|
5
5
|
isoName: "en-US",
|
|
6
6
|
yes: "Yes",
|
|
@@ -80,7 +80,7 @@ const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty
|
|
|
80
80
|
const lang = ref(lang$1);
|
|
81
81
|
const locales = /* @__PURE__ */ Object.assign({
|
|
82
82
|
"./en-US.ts": () => Promise.resolve().then(() => enUS),
|
|
83
|
-
"./nl.ts": () => import("./nl-
|
|
83
|
+
"./nl.ts": () => import("./nl-db4MMX_N.js")
|
|
84
84
|
});
|
|
85
85
|
const useLang = () => {
|
|
86
86
|
return lang;
|
|
@@ -197,7 +197,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
197
197
|
__name: "PostalCodeInput",
|
|
198
198
|
props: {
|
|
199
199
|
modelValue: {},
|
|
200
|
-
|
|
200
|
+
country: {},
|
|
201
201
|
required: { type: Boolean }
|
|
202
202
|
},
|
|
203
203
|
emits: ["update:modelValue"],
|
|
@@ -205,24 +205,32 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
205
205
|
const props = __props;
|
|
206
206
|
const lang2 = useLang();
|
|
207
207
|
const attrs = useAttrs();
|
|
208
|
+
const { country } = toRefs(props);
|
|
208
209
|
const masks = ref({
|
|
209
|
-
|
|
210
|
+
NL: "#### AA"
|
|
210
211
|
});
|
|
211
212
|
const validations = ref({
|
|
212
|
-
|
|
213
|
+
NL: [
|
|
213
214
|
(val) => !val || // Do not check an empty string
|
|
214
215
|
/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(val) || lang2.value.postalCode.validations.invalidPostalCode
|
|
215
216
|
]
|
|
216
217
|
});
|
|
218
|
+
const computedMask = computed(() => {
|
|
219
|
+
if (country.value && masks.value[country.value])
|
|
220
|
+
return masks.value[country.value];
|
|
221
|
+
return void 0;
|
|
222
|
+
});
|
|
217
223
|
const computedValidations = computed(() => {
|
|
218
|
-
const val =
|
|
224
|
+
const val = [];
|
|
225
|
+
if (country.value && validations.value[country.value])
|
|
226
|
+
val.push(...validations.value[country.value]);
|
|
219
227
|
if (props.required)
|
|
220
228
|
val.push((val2) => !!val2 || lang2.value.validations.fieldRequired);
|
|
221
229
|
return val;
|
|
222
230
|
});
|
|
223
231
|
return (_ctx, _cache) => {
|
|
224
232
|
return openBlock(), createBlock(unref(QInput), mergeProps(unref(attrs), {
|
|
225
|
-
mask:
|
|
233
|
+
mask: computedMask.value,
|
|
226
234
|
rules: computedValidations.value,
|
|
227
235
|
"model-value": _ctx.modelValue,
|
|
228
236
|
label: `${unref(lang2).postalCode.postalCode}${_ctx.required ? "*" : ""}`,
|
|
@@ -523,7 +531,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
523
531
|
key: part,
|
|
524
532
|
borderless: "",
|
|
525
533
|
ref_for: true
|
|
526
|
-
}, dateProps.value[part]), {
|
|
534
|
+
}, dateProps.value[part], { pattern: "[0-9]*" }), {
|
|
527
535
|
after: withCtx(() => [
|
|
528
536
|
index < 2 ? (openBlock(), createElementBlock("a", _hoisted_1$1, "-")) : createCommentVNode("", true)
|
|
529
537
|
]),
|
package/dist/general.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { l as loadLang, u as useLang, _ as _sfc_main$5 } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-D133pxTB.js";
|
|
2
2
|
import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QBtn, QToolbarTitle, QToolbar, QHeader, QPage, QPageContainer, QLayout, QPageSticky, QSelect, QItemSection, QItemLabel, QItem, QList } from "quasar";
|
|
3
3
|
import { defineComponent, watch, ref, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, normalizeClass, createCommentVNode, toRefs, useAttrs, computed, mergeProps, createElementBlock, resolveDynamicComponent, createTextVNode, toDisplayString } from "vue";
|
|
4
|
-
import { f as flags, u as useLang$1 } from "./index-
|
|
4
|
+
import { f as flags, u as useLang$1 } from "./index-DnmJt2wP.js";
|
|
5
5
|
const _hoisted_1$2 = { class: "text-h6" };
|
|
6
6
|
const _hoisted_2 = { class: "text-subtitle2" };
|
|
7
7
|
const __default__$2 = {
|
|
@@ -387,7 +387,7 @@ const enUS$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
|
|
|
387
387
|
const lang = ref(lang$1);
|
|
388
388
|
const locales = /* @__PURE__ */ Object.assign({
|
|
389
389
|
"./en-US.ts": () => Promise.resolve().then(() => enUS$1),
|
|
390
|
-
"./nl.ts": () => import("./nl-
|
|
390
|
+
"./nl.ts": () => import("./nl-BTgHOvpQ.js")
|
|
391
391
|
});
|
|
392
392
|
const useLang = () => {
|
|
393
393
|
return lang;
|
|
@@ -26,7 +26,7 @@ declare const _default: <T extends Account>(__VLS_props: NonNullable<Awaited<typ
|
|
|
26
26
|
}) => any) | undefined;
|
|
27
27
|
readonly "onUpdate:pagination"?: ((pagination: Pagination) => any) | undefined;
|
|
28
28
|
readonly "onUpdate:criteria"?: ((criteria: Criteria) => any) | undefined;
|
|
29
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onAddRole" | "onRemoveRole" | "onUpdate:pagination" | "onUpdate:criteria"> & {
|
|
29
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onAddRole" | "onRemoveRole" | "onUpdate:pagination" | "onUpdate:criteria"> & Partial<{}> & {
|
|
30
30
|
modelValue: T[];
|
|
31
31
|
count: number;
|
|
32
32
|
pagination: Pagination;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
2
|
modelValue: string;
|
|
3
|
-
}
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
4
5
|
"update:modelValue": (...args: any[]) => void;
|
|
5
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
6
|
-
modelValue: string;
|
|
7
|
-
}> & Readonly<{
|
|
6
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
7
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
9
8
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
9
|
export default _default;
|
|
@@ -3,7 +3,7 @@ export interface Period {
|
|
|
3
3
|
endDate: string;
|
|
4
4
|
type: 'unavailable';
|
|
5
5
|
}
|
|
6
|
-
|
|
6
|
+
type __VLS_Props = {
|
|
7
7
|
modelValue: string | null | undefined | {
|
|
8
8
|
from: string;
|
|
9
9
|
to: string;
|
|
@@ -11,20 +11,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11
11
|
periods?: Period[];
|
|
12
12
|
range?: boolean;
|
|
13
13
|
options?: (date: string) => boolean;
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
15
16
|
"update:modelValue": (val: string | {
|
|
16
17
|
from: string;
|
|
17
18
|
to: string;
|
|
18
19
|
}) => any;
|
|
19
|
-
}, string, import("vue").PublicProps, Readonly<{
|
|
20
|
-
modelValue: string | null | undefined | {
|
|
21
|
-
from: string;
|
|
22
|
-
to: string;
|
|
23
|
-
};
|
|
24
|
-
periods?: Period[];
|
|
25
|
-
range?: boolean;
|
|
26
|
-
options?: (date: string) => boolean;
|
|
27
|
-
}> & Readonly<{
|
|
20
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
28
21
|
"onUpdate:modelValue"?: ((val: string | {
|
|
29
22
|
from: string;
|
|
30
23
|
to: string;
|
|
@@ -9,7 +9,7 @@ declare const _default: <T extends {
|
|
|
9
9
|
done: (success?: boolean) => void;
|
|
10
10
|
}) => any) | undefined;
|
|
11
11
|
readonly "onUpdate:model-value"?: ((id: number) => any) | undefined;
|
|
12
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFilter" | "onUpdate:model-value"> & {
|
|
12
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, "onFilter" | "onUpdate:model-value"> & Partial<{}> & {
|
|
13
13
|
modelValue?: number | number[] | null;
|
|
14
14
|
labelKey: string;
|
|
15
15
|
labelFunction?: (option: unknown) => string;
|
|
@@ -6,9 +6,10 @@ export interface Props {
|
|
|
6
6
|
required?: boolean;
|
|
7
7
|
}
|
|
8
8
|
declare function __VLS_template(): {
|
|
9
|
+
attrs: Partial<{}>;
|
|
9
10
|
slots: Partial<Record<NonNullable<string | number>, (_: any) => any>>;
|
|
10
11
|
refs: {};
|
|
11
|
-
|
|
12
|
+
rootEl: any;
|
|
12
13
|
};
|
|
13
14
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
15
|
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -5,12 +5,13 @@ export interface Props {
|
|
|
5
5
|
field?: FormItems;
|
|
6
6
|
}
|
|
7
7
|
declare function __VLS_template(): {
|
|
8
|
+
attrs: Partial<{}>;
|
|
8
9
|
slots: {
|
|
9
10
|
avatar?(_: {}): any;
|
|
10
11
|
side?(_: {}): any;
|
|
11
12
|
};
|
|
12
13
|
refs: {};
|
|
13
|
-
|
|
14
|
+
rootEl: any;
|
|
14
15
|
};
|
|
15
16
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
17
|
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type PostalCodeCountries = 'NL';
|
|
2
2
|
export interface Props {
|
|
3
3
|
modelValue?: string;
|
|
4
|
-
|
|
4
|
+
country?: PostalCodeCountries;
|
|
5
5
|
required?: boolean;
|
|
6
6
|
}
|
|
7
7
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
2
3
|
slots: {
|
|
3
4
|
default?(_: {}): any;
|
|
4
5
|
};
|
|
5
6
|
refs: {};
|
|
6
|
-
|
|
7
|
+
rootEl: any;
|
|
7
8
|
};
|
|
8
9
|
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
10
|
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simsustech/quasar-components",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"author": "Stefan van Herwijnen",
|
|
5
5
|
"description": "High level components for Quasar Framework",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,34 +49,34 @@
|
|
|
49
49
|
"validator": "^13.12.0"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"quasar": "^2.
|
|
52
|
+
"quasar": "^2.17.4"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@types/node": "^22.
|
|
55
|
+
"@types/node": "^22.10.0",
|
|
56
56
|
"@types/validator": "^13.12.2",
|
|
57
|
-
"@types/ws": "^8.5.
|
|
58
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
59
|
-
"@typescript-eslint/parser": "^8.
|
|
60
|
-
"@vitejs/plugin-vue": "^5.1
|
|
61
|
-
"@vue/server-renderer": "^3.5.
|
|
62
|
-
"eslint": "^9.
|
|
57
|
+
"@types/ws": "^8.5.13",
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "^8.16.0",
|
|
59
|
+
"@typescript-eslint/parser": "^8.16.0",
|
|
60
|
+
"@vitejs/plugin-vue": "^5.2.1",
|
|
61
|
+
"@vue/server-renderer": "^3.5.13",
|
|
62
|
+
"eslint": "^9.15.0",
|
|
63
63
|
"eslint-config-prettier": "^9.1.0",
|
|
64
64
|
"eslint-plugin-prettier": "^5.2.1",
|
|
65
65
|
"eslint-plugin-prettier-vue": "^5.0.0",
|
|
66
|
-
"eslint-plugin-vue": "^9.
|
|
66
|
+
"eslint-plugin-vue": "^9.31.0",
|
|
67
67
|
"glob": "^11.0.0",
|
|
68
|
-
"local-pkg": "^0.5.
|
|
69
|
-
"prettier": "^3.
|
|
70
|
-
"quasar": "^2.17.
|
|
68
|
+
"local-pkg": "^0.5.1",
|
|
69
|
+
"prettier": "^3.4.1",
|
|
70
|
+
"quasar": "^2.17.4",
|
|
71
71
|
"rimraf": "^6.0.1",
|
|
72
|
-
"typescript": "
|
|
73
|
-
"typescript-eslint": "^8.
|
|
74
|
-
"unplugin-vue-components": "^0.27.
|
|
75
|
-
"vite": "^
|
|
76
|
-
"vue": "^3.5.
|
|
72
|
+
"typescript": "5.6.3",
|
|
73
|
+
"typescript-eslint": "^8.16.0",
|
|
74
|
+
"unplugin-vue-components": "^0.27.5",
|
|
75
|
+
"vite": "^6.0.1",
|
|
76
|
+
"vue": "^3.5.13",
|
|
77
77
|
"vue-eslint-parser": "^9.4.3",
|
|
78
|
-
"vue-router": "^4.
|
|
79
|
-
"vue-tsc": "^2.1.
|
|
78
|
+
"vue-router": "^4.5.0",
|
|
79
|
+
"vue-tsc": "^2.1.10"
|
|
80
80
|
},
|
|
81
81
|
"scripts": {
|
|
82
82
|
"build:plugin": "vite build",
|
package/src/ui/flags/lang/nl.ts
CHANGED
|
@@ -326,8 +326,8 @@ const lang: Language = {
|
|
|
326
326
|
da: 'Dansk',
|
|
327
327
|
de: 'Deutsch',
|
|
328
328
|
el: 'ελληνικά',
|
|
329
|
-
'en-GB': '
|
|
330
|
-
'en-US': '
|
|
329
|
+
'en-GB': 'Emgels (UK)',
|
|
330
|
+
'en-US': 'Engels (US)',
|
|
331
331
|
eo: 'Esperanto',
|
|
332
332
|
es: 'Español',
|
|
333
333
|
et: 'Eesti',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<q-input
|
|
3
3
|
v-bind="attrs"
|
|
4
|
-
:mask="
|
|
4
|
+
:mask="computedMask"
|
|
5
5
|
:rules="computedValidations"
|
|
6
6
|
:model-value="modelValue"
|
|
7
7
|
:label="`${lang.postalCode.postalCode}${required ? '*' : ''}`"
|
|
@@ -10,27 +10,30 @@
|
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script setup lang="ts">
|
|
13
|
-
import { computed, ref, useAttrs } from 'vue'
|
|
13
|
+
import { computed, ref, toRefs, useAttrs } from 'vue'
|
|
14
14
|
import { QInput } from 'quasar'
|
|
15
15
|
import { useLang } from './lang'
|
|
16
16
|
|
|
17
|
-
export type
|
|
17
|
+
export type PostalCodeCountries = 'NL'
|
|
18
18
|
|
|
19
19
|
export interface Props {
|
|
20
20
|
modelValue?: string
|
|
21
|
-
|
|
21
|
+
country?: PostalCodeCountries
|
|
22
22
|
required?: boolean
|
|
23
23
|
}
|
|
24
24
|
const props = defineProps<Props>()
|
|
25
25
|
const lang = useLang()
|
|
26
26
|
const attrs = useAttrs()
|
|
27
|
+
|
|
28
|
+
const { country } = toRefs(props)
|
|
29
|
+
|
|
27
30
|
const masks = ref({
|
|
28
|
-
|
|
31
|
+
NL: '#### AA'
|
|
29
32
|
})
|
|
30
33
|
defineEmits(['update:modelValue'])
|
|
31
34
|
|
|
32
35
|
const validations = ref({
|
|
33
|
-
|
|
36
|
+
NL: [
|
|
34
37
|
(val: string) =>
|
|
35
38
|
!val || // Do not check an empty string
|
|
36
39
|
/^[1-9][0-9]{3} ?(?!sa|sd|ss)[a-z]{2}$/i.test(val) ||
|
|
@@ -38,8 +41,16 @@ const validations = ref({
|
|
|
38
41
|
]
|
|
39
42
|
})
|
|
40
43
|
|
|
44
|
+
const computedMask = computed(() => {
|
|
45
|
+
if (country.value && masks.value[country.value])
|
|
46
|
+
return masks.value[country.value]
|
|
47
|
+
return undefined
|
|
48
|
+
})
|
|
49
|
+
|
|
41
50
|
const computedValidations = computed(() => {
|
|
42
|
-
const val =
|
|
51
|
+
const val = []
|
|
52
|
+
if (country.value && validations.value[country.value])
|
|
53
|
+
val.push(...validations.value[country.value])
|
|
43
54
|
if (props.required)
|
|
44
55
|
val.push((val: string) => !!val || lang.value.validations.fieldRequired)
|
|
45
56
|
return val
|
package/src/ui/form/lang/nl.ts
CHANGED
|
File without changes
|