@simsustech/quasar-components 0.11.25 → 0.12.0

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/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-D-I0Gws4.js";
2
2
  import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QLayout, QHeader, QToolbar, QBtn, QToolbarTitle, QPageContainer, QPage, QPageSticky, QSpace, QList } from "quasar";
3
3
  import { defineComponent, watch, ref, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, createCommentVNode, toRefs, normalizeClass, createElementBlock } from "vue";
4
- import { _ as _sfc_main$6 } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-DFwcmPnu.js";
4
+ import { _ as _sfc_main$6 } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-e2EDOyzk.js";
5
5
  const _hoisted_1$1 = { class: "text-h6" };
6
6
  const _hoisted_2$1 = { class: "text-subtitle2" };
7
7
  const __default__$2 = {
@@ -132,17 +132,17 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
132
132
  createVNode(_component_q_layout, {
133
133
  view: "LHh lpR fff",
134
134
  container: "",
135
- class: "bg-light-surface dark:bg-dark-surface",
135
+ class: "bg-$light-surface dark:bg-$dark-surface",
136
136
  style: { "min-width": "85vw" }
137
137
  }, {
138
138
  default: withCtx(() => [
139
- createVNode(_component_q_header, { class: "bg-light-surface-container-high dark:bg-dark-surface-container-high" }, {
139
+ createVNode(_component_q_header, { class: "bg-$light-surface-container-high dark:bg-$dark-surface-container-high" }, {
140
140
  default: withCtx(() => [
141
141
  createVNode(_component_q_toolbar, null, {
142
142
  default: withCtx(() => [
143
143
  createVNode(_component_q_btn, {
144
144
  icon: __props.icons.close,
145
- class: "text-light-on-surface dark:text-dark-on-surface",
145
+ class: "text-$light-on-surface dark:text-$dark-on-surface",
146
146
  flat: "",
147
147
  round: "",
148
148
  dense: "",
@@ -157,7 +157,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
157
157
  !__props.display ? (openBlock(), createBlock(_sfc_main$5, {
158
158
  key: 0,
159
159
  flat: "",
160
- class: "text-light-primary dark:text-dark-primary",
160
+ class: "text-$light-primary dark:text-$dark-primary",
161
161
  type: __props.buttonType,
162
162
  onSubmit: submit
163
163
  }, null, 8, ["type"])) : createCommentVNode("", true)
@@ -320,23 +320,23 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
320
320
  const emit = __emit;
321
321
  const { modelValue, languageImports, locales } = toRefs(props);
322
322
  const $q = useQuasar();
323
- watch(modelValue, (langIso) => {
324
- try {
325
- languageImports.value[langIso]().then(
326
- // langList[`../../../node_modules/quasar/lang/${langIso}.mjs`]().then(
327
- (lang) => {
323
+ const updateModelValue = (v) => {
324
+ const iso639 = v.split("-").at(0);
325
+ for (const i of [iso639, v]) {
326
+ try {
327
+ languageImports.value[i]().then((lang) => {
328
328
  $q.lang.set(lang.default);
329
- }
330
- );
331
- } catch (e) {
332
- console.error(e);
329
+ });
330
+ } catch {
331
+ }
333
332
  }
334
- });
333
+ emit("update:modelValue", v);
334
+ };
335
335
  return (_ctx, _cache) => {
336
336
  return openBlock(), createBlock(_sfc_main$6, {
337
337
  "model-value": unref(modelValue),
338
338
  locales: unref(locales),
339
- "onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => emit("update:modelValue", val))
339
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => updateModelValue(val))
340
340
  }, null, 8, ["model-value", "locales"]);
341
341
  };
342
342
  }
package/dist/md3.js CHANGED
@@ -7,6 +7,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
7
7
  type: {},
8
8
  showSticky: { type: Boolean },
9
9
  seekAttention: { type: Boolean },
10
+ disable: { type: Boolean },
10
11
  busEmits: {},
11
12
  icons: {}
12
13
  },
@@ -37,8 +38,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
37
38
  }),
38
39
  fab: "",
39
40
  icon: unref(addIcon),
41
+ disable: __props.disable,
40
42
  onClick: _cache[0] || (_cache[0] = ($event) => unref(bus).emit(__props.busEmits.add))
41
- }, null, 8, ["class", "icon"])) : createCommentVNode("", true),
43
+ }, null, 8, ["class", "icon", "disable"])) : createCommentVNode("", true),
42
44
  __props.busEmits.edit && unref(type) === "edit" ? (openBlock(), createBlock(_component_q_btn, {
43
45
  key: 1,
44
46
  id: "fabEdit",
@@ -50,8 +52,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
50
52
  }),
51
53
  fab: "",
52
54
  icon: unref(editIcon),
55
+ disable: __props.disable,
53
56
  onClick: _cache[1] || (_cache[1] = ($event) => unref(bus).emit(__props.busEmits.edit))
54
- }, null, 8, ["class", "icon"])) : createCommentVNode("", true)
57
+ }, null, 8, ["class", "icon", "disable"])) : createCommentVNode("", true)
55
58
  ])) : createCommentVNode("", true),
56
59
  __props.showSticky ? (openBlock(), createBlock(_component_q_page_sticky, {
57
60
  key: 1,
@@ -69,8 +72,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
69
72
  }),
70
73
  fab: "",
71
74
  icon: unref(addIcon),
75
+ disable: __props.disable,
72
76
  onClick: _cache[2] || (_cache[2] = ($event) => unref(bus).emit(__props.busEmits.add))
73
- }, null, 8, ["class", "icon"])) : createCommentVNode("", true),
77
+ }, null, 8, ["class", "icon", "disable"])) : createCommentVNode("", true),
74
78
  __props.busEmits.edit && unref(type) === "edit" ? (openBlock(), createBlock(_component_q_btn, {
75
79
  key: 1,
76
80
  class: normalizeClass({
@@ -81,8 +85,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
81
85
  }),
82
86
  fab: "",
83
87
  icon: unref(editIcon),
88
+ disable: __props.disable,
84
89
  onClick: _cache[3] || (_cache[3] = ($event) => unref(bus).emit(__props.busEmits.edit))
85
- }, null, 8, ["class", "icon"])) : createCommentVNode("", true)
90
+ }, null, 8, ["class", "icon", "disable"])) : createCommentVNode("", true)
86
91
  ]),
87
92
  _: 1
88
93
  })) : createCommentVNode("", true)
@@ -0,0 +1,209 @@
1
+ const lang = {
2
+ isoName: "nl",
3
+ yes: "Ja",
4
+ no: "Nee",
5
+ selectMultiple: "Selecteer één of meerdere",
6
+ noResultsAvailable: "Geen resultaten beschikbaar.",
7
+ buttons: {
8
+ close: "Sluiten"
9
+ },
10
+ email: {
11
+ subject: "Onderwerp"
12
+ },
13
+ fields: {
14
+ name: "Naam",
15
+ firstName: "Voornaam",
16
+ lastName: "Achternaam",
17
+ address: "Adres",
18
+ postalCode: "Postcode",
19
+ city: "Woonplaats",
20
+ telephoneNumber: "Telefoonnummer"
21
+ },
22
+ validations: {
23
+ fieldRequired: "Veld is vereist."
24
+ },
25
+ gender: {
26
+ gender: "Geslacht",
27
+ male: "Mannelijk",
28
+ female: "Vrouwelijk",
29
+ other: "Anders"
30
+ },
31
+ postalCode: {
32
+ postalCode: "Postcode",
33
+ validations: {
34
+ invalidPostalCode: "Ongeldige postcode"
35
+ }
36
+ },
37
+ datePicker: {
38
+ date: "Datum",
39
+ placeholder: "JJJJ/MM/DD",
40
+ YYYY: "JJJJ",
41
+ MM: "MM",
42
+ DD: "DD",
43
+ validations: {
44
+ unavailableRange: "De geselecteerde periode bevat ongeschikbare datums."
45
+ }
46
+ },
47
+ currency: {
48
+ currency: "Valuta",
49
+ EUR: "Euro",
50
+ USD: "USD"
51
+ },
52
+ locale: {
53
+ locale: "Regio"
54
+ },
55
+ cron: {
56
+ name: "Herhaling",
57
+ minute: "Minuut",
58
+ hour: "Uur",
59
+ dayOfMonth: "Dag van maand",
60
+ month: "Maand",
61
+ dayOfWeek: "Dag van week",
62
+ every: {
63
+ minute: "Iedere minuut",
64
+ hour: "Ieder uur",
65
+ dayOfMonth: "Iedere dag",
66
+ month: "Iedere maand",
67
+ dayOfWeek: "Iedere dag van de week"
68
+ },
69
+ validations: {
70
+ invalidCron: "Cron regel is ongeldig."
71
+ }
72
+ },
73
+ countries: {
74
+ SA: "Saudi-Arabië",
75
+ BD: "Bangladesh",
76
+ IN: "India",
77
+ CZ: "Tsjechië",
78
+ DK: "Denemarken",
79
+ AT: "Oostenrijk",
80
+ CH: "Zwitserland",
81
+ DE: "Duitsland",
82
+ GR: "Griekenland",
83
+ AU: "Australië",
84
+ CA: "Canada",
85
+ GB: "Verenigd Koninkrijk",
86
+ IE: "Ierland",
87
+ NZ: "Nieuw-Zeeland",
88
+ US: "Verenigde Staten",
89
+ ZA: "Zuid-Afrika",
90
+ AR: "Argentinië",
91
+ CL: "Chili",
92
+ CO: "Colombia",
93
+ ES: "Spanje",
94
+ MX: "Mexico",
95
+ FI: "Finland",
96
+ BE: "België",
97
+ FR: "Frankrijk",
98
+ IL: "Israël",
99
+ HU: "Hongarije",
100
+ ID: "Indonesië",
101
+ IT: "Italië",
102
+ JP: "Japan",
103
+ KR: "Zuid-Korea",
104
+ NL: "Nederland",
105
+ NO: "Noorwegen",
106
+ PL: "Polen",
107
+ BR: "Brazilië",
108
+ PT: "Portugal",
109
+ RO: "Roemenië",
110
+ RU: "Rusland",
111
+ SK: "Slowakije",
112
+ SE: "Zweden",
113
+ LK: "Sri Lanka",
114
+ TH: "Thailand",
115
+ TR: "Turkije",
116
+ CN: "China",
117
+ HK: "Hongkong",
118
+ TW: "Taiwan"
119
+ },
120
+ languages: {
121
+ ar: "Arabisch",
122
+ bn: "Bengaals",
123
+ cs: "Tsjechisch",
124
+ da: "Deens",
125
+ de: "Duits",
126
+ el: "Grieks",
127
+ en: "Engels",
128
+ es: "Spaans",
129
+ fi: "Fins",
130
+ fr: "Frans",
131
+ he: "Hebreeuws",
132
+ hi: "Hindi",
133
+ hu: "Hongaars",
134
+ id: "Indonesisch",
135
+ it: "Italiaans",
136
+ ja: "Japans",
137
+ ko: "Koreaans",
138
+ nl: "Nederlands",
139
+ no: "Noors",
140
+ pl: "Pools",
141
+ pt: "Portugees",
142
+ ro: "Roemeens",
143
+ ru: "Russisch",
144
+ sk: "Slowaaks",
145
+ sv: "Zweeds",
146
+ ta: "Tamil",
147
+ th: "Thais",
148
+ tr: "Turks",
149
+ zh: "Chinees"
150
+ },
151
+ bcp47: {
152
+ "ar-SA": { language: "Arabisch", country: "Saoedi-Arabië" },
153
+ "bn-BD": { language: "Bengaals", country: "Bangladesh" },
154
+ "bn-IN": { language: "Bengaals", country: "India" },
155
+ "cs-CZ": { language: "Tsjechisch", country: "Tsjechië" },
156
+ "da-DK": { language: "Deens", country: "Denemarken" },
157
+ "de-AT": { language: "Duits", country: "Oostenrijk" },
158
+ "de-CH": { language: "Duits", country: "Zwitserland" },
159
+ "de-DE": { language: "Duits", country: "Duitsland" },
160
+ "el-GR": { language: "Grieks", country: "Griekenland" },
161
+ "en-AU": { language: "Engels", country: "Australië" },
162
+ "en-CA": { language: "Engels", country: "Canada" },
163
+ "en-GB": { language: "Engels", country: "Verenigd Koninkrijk" },
164
+ "en-IE": { language: "Engels", country: "Ierland" },
165
+ "en-IN": { language: "Engels", country: "India" },
166
+ "en-NZ": { language: "Engels", country: "Nieuw-Zeeland" },
167
+ "en-US": { language: "Engels", country: "Verenigde Staten" },
168
+ "en-ZA": { language: "Engels", country: "Zuid-Afrika" },
169
+ "es-AR": { language: "Spaans", country: "Argentinië" },
170
+ "es-CL": { language: "Spaans", country: "Chili" },
171
+ "es-CO": { language: "Spaans", country: "Colombia" },
172
+ "es-ES": { language: "Spaans", country: "Spanje" },
173
+ "es-MX": { language: "Spaans", country: "Mexico" },
174
+ "es-US": { language: "Spaans", country: "Verenigde Staten" },
175
+ "fi-FI": { language: "Fins", country: "Finland" },
176
+ "fr-BE": { language: "Frans", country: "België" },
177
+ "fr-CA": { language: "Frans", country: "Canada" },
178
+ "fr-CH": { language: "Frans", country: "Zwitserland" },
179
+ "fr-FR": { language: "Frans", country: "Frankrijk" },
180
+ "he-IL": { language: "Hebreeuws", country: "Israël" },
181
+ "hi-IN": { language: "Hindi", country: "India" },
182
+ "hu-HU": { language: "Hongaars", country: "Hongarije" },
183
+ "id-ID": { language: "Indonesisch", country: "Indonesië" },
184
+ "it-CH": { language: "Italiaans", country: "Zwitserland" },
185
+ "it-IT": { language: "Italiaans", country: "Italië" },
186
+ "ja-JP": { language: "Japans", country: "Japan" },
187
+ "ko-KR": { language: "Koreaans", country: "Zuid-Korea" },
188
+ "nl-BE": { language: "Nederlands", country: "België" },
189
+ "nl-NL": { language: "Nederlands", country: "Nederland" },
190
+ "no-NO": { language: "Noors", country: "Noorwegen" },
191
+ "pl-PL": { language: "Pools", country: "Polen" },
192
+ "pt-BR": { language: "Portugees", country: "Brazilië" },
193
+ "pt-PT": { language: "Portugees", country: "Portugal" },
194
+ "ro-RO": { language: "Roemeens", country: "Roemenië" },
195
+ "ru-RU": { language: "Russisch", country: "Russische Federatie" },
196
+ "sk-SK": { language: "Slowaaks", country: "Slowakije" },
197
+ "sv-SE": { language: "Zweeds", country: "Zweden" },
198
+ "ta-IN": { language: "Tamil", country: "India" },
199
+ "ta-LK": { language: "Tamil", country: "Sri Lanka" },
200
+ "th-TH": { language: "Thais", country: "Thailand" },
201
+ "tr-TR": { language: "Turks", country: "Turkije" },
202
+ "zh-CN": { language: "Chinees", country: "China" },
203
+ "zh-HK": { language: "Chinees", country: "Hongkong" },
204
+ "zh-TW": { language: "Chinees", country: "Taiwan" }
205
+ }
206
+ };
207
+ export {
208
+ lang as default
209
+ };
@@ -0,0 +1,19 @@
1
+ import { ISO3166 } from './lang/index.js';
2
+ export interface Props {
3
+ modelValue: ISO3166;
4
+ countries: {
5
+ icon: string;
6
+ iso3166: ISO3166;
7
+ }[];
8
+ isItem?: boolean;
9
+ }
10
+ declare const __VLS_export: import("vue").DefineComponent<Props, {
11
+ variables: import("vue").Ref<{}, {}>;
12
+ functions: import("vue").Ref<{}, {}>;
13
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (...args: any[]) => void;
15
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -1,13 +1,25 @@
1
- import { Language } from './lang/index.js';
1
+ import { type Language, type Locales } from './lang/index.js';
2
2
  export interface Props {
3
- modelValue: keyof Language['countries'];
3
+ modelValue: Locales;
4
4
  locales: {
5
5
  icon: string;
6
- isoName: keyof Language['languages'];
6
+ bcp47: Locales;
7
7
  }[];
8
8
  isItem?: boolean;
9
9
  }
10
- declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ declare const __VLS_export: import("vue").DefineComponent<Props, {
11
+ variables: import("vue").Ref<{}, {}>;
12
+ functions: import("vue").Ref<{
13
+ getCountryLabel: (v: keyof Language["bcp47"]) => string;
14
+ getLanguageLabel: (v: keyof Language["bcp47"]) => string;
15
+ }, {
16
+ getCountryLabel: (v: keyof Language["bcp47"]) => string;
17
+ getLanguageLabel: (v: keyof Language["bcp47"]) => string;
18
+ } | {
19
+ getCountryLabel: (v: keyof Language["bcp47"]) => string;
20
+ getLanguageLabel: (v: keyof Language["bcp47"]) => string;
21
+ }>;
22
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
23
  "update:modelValue": (...args: any[]) => void;
12
24
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
13
25
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
@@ -13,4 +13,5 @@ export { default as CurrencySelect } from './CurrencySelect.vue';
13
13
  export { default as LocaleSelect } from './LocaleSelect.vue';
14
14
  export { default as FilteredModelSelect } from './FilteredModelSelect.vue';
15
15
  export { default as CronScheduleInput } from './CronScheduleInput.vue';
16
- export { useLang, loadLang } from './lang/index.js';
16
+ export { default as CountrySelect } from './CountrySelect.vue';
17
+ export { useLang, loadLang, type Locales, type ISO3166, type ISO639 } from './lang/index.js';