@simsustech/quasar-components 0.7.1 → 0.8.1

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/form.js +216 -37
  3. package/dist/general.js +14 -11
  4. package/dist/{nl-DF7uv7-9.js → nl-DvM_wB4u.js} +9 -0
  5. package/dist/types/ui/authentication/ConsentList.vue.d.ts +4 -3
  6. package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +8 -8
  7. package/dist/types/ui/authentication/EmailChangeStepper.vue.d.ts +3 -3
  8. package/dist/types/ui/authentication/LoginButton.vue.d.ts +7 -7
  9. package/dist/types/ui/authentication/LoginForm.vue.d.ts +8 -8
  10. package/dist/types/ui/authentication/OtpInput.vue.d.ts +3 -3
  11. package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +12 -12
  12. package/dist/types/ui/authentication/PasswordChangeStepper.vue.d.ts +3 -3
  13. package/dist/types/ui/authentication/RegisterForm.vue.d.ts +12 -12
  14. package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +8 -8
  15. package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +8 -8
  16. package/dist/types/ui/authentication/VerificationSlider.vue.d.ts +3 -3
  17. package/dist/types/ui/form/BooleanItem.vue.d.ts +2 -2
  18. package/dist/types/ui/form/BooleanSelect.vue.d.ts +3 -3
  19. package/dist/types/ui/form/CurrencySelect.vue.d.ts +20 -0
  20. package/dist/types/ui/form/DateInput.vue.d.ts +12 -12
  21. package/dist/types/ui/form/DatePicker.vue.d.ts +7 -7
  22. package/dist/types/ui/form/EmailInput.vue.d.ts +3 -3
  23. package/dist/types/ui/form/FilteredModelSelect.vue.d.ts +27 -24
  24. package/dist/types/ui/form/FormInput.vue.d.ts +2 -2
  25. package/dist/types/ui/form/FormItem.vue.d.ts +7 -7
  26. package/dist/types/ui/form/GenderItem.vue.d.ts +2 -2
  27. package/dist/types/ui/form/GenderSelect.vue.d.ts +3 -3
  28. package/dist/types/ui/form/LocaleSelect.vue.d.ts +15 -0
  29. package/dist/types/ui/form/PostalCodeInput.vue.d.ts +3 -3
  30. package/dist/types/ui/form/TelephoneNumberInput.vue.d.ts +3 -3
  31. package/dist/types/ui/form/index.d.ts +2 -0
  32. package/dist/types/ui/form/lang/index.d.ts +18 -0
  33. package/dist/types/ui/general/QLanguageSelect.vue.d.ts +5 -3
  34. package/dist/types/ui/general/QStyledCard.vue.d.ts +8 -8
  35. package/dist/types/ui/general/QStyledLayout.vue.d.ts +8 -8
  36. package/dist/types/ui/general/ResourcePage.vue.d.ts +11 -26
  37. package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +8 -8
  38. package/eslint.config.js +29 -0
  39. package/package.json +20 -17
  40. package/src/ui/flags/index.ts +2 -1
  41. package/src/ui/form/CurrencySelect.vue +49 -0
  42. package/src/ui/form/DateInput.vue +1 -1
  43. package/src/ui/form/FilteredModelSelect.vue +37 -11
  44. package/src/ui/form/LocaleSelect.vue +68 -0
  45. package/src/ui/form/index.ts +2 -0
  46. package/src/ui/form/lang/en-US.ts +9 -0
  47. package/src/ui/form/lang/index.ts +10 -1
  48. package/src/ui/form/lang/nl.ts +9 -0
  49. package/src/ui/general/QLanguageSelect.vue +1 -2
  50. package/src/ui/general/ResourcePage.vue +10 -11
  51. package/src/ui/icons/index.ts +1 -1
  52. package/.eslintignore +0 -2
  53. package/.eslintrc.cjs +0 -19
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @simsustech/quasar-components
2
2
 
3
+ ## 0.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 0b24daf: feat: add fab slot to ResourcePage
8
+ - 92a0c62: feat(components): add header-side slot to ResourcePage
9
+ - c750af3: fix: fix DateInput label
10
+ - 572c7e5: feat: add label to LocaleSelect
11
+
12
+ ## 0.8.0
13
+
14
+ ### Minor Changes
15
+
16
+ - 050612f: Add CurrencySelect and LocaleSelect components
17
+
18
+ ### Patch Changes
19
+
20
+ - d749926: chore: update package.json
21
+ - cba0aa7: chore: update package.json
22
+
3
23
  ## 0.7.1
4
24
 
5
25
  ### Patch Changes
package/dist/form.js CHANGED
@@ -1,5 +1,6 @@
1
- import { ref, defineComponent, useAttrs, withAsyncContext, watch, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, computed, useSlots, renderSlot, createCommentVNode, toRefs, resolveDirective, createElementBlock, Fragment, renderList, resolveDynamicComponent, createElementVNode, withDirectives, createSlots } from "vue";
1
+ import { ref, defineComponent, useAttrs, withAsyncContext, watch, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, computed, useSlots, renderSlot, createCommentVNode, toRefs, resolveDirective, createElementBlock, Fragment, renderList, resolveDynamicComponent, createElementVNode, withDirectives, onMounted, createSlots } from "vue";
2
2
  import { useQuasar, QSelect, QItem, QItemSection, QItemLabel, QInput, QDate, QIcon, QTooltip, QBtn, QPopupProxy, QField, QEditor } from "quasar";
3
+ import { e as enUs, n as nl, u as useLang$1 } from "./en-US-BEeILC7o.js";
3
4
  const lang$1 = {
4
5
  isoName: "en-US",
5
6
  yes: "Yes",
@@ -36,6 +37,7 @@ const lang$1 = {
36
37
  }
37
38
  },
38
39
  datePicker: {
40
+ date: "Date",
39
41
  placeholder: "YYYY/MM/DD",
40
42
  YYYY: "YYYY",
41
43
  MM: "MM",
@@ -43,6 +45,14 @@ const lang$1 = {
43
45
  validations: {
44
46
  unavailableRange: "The selected period contains unavailable dates."
45
47
  }
48
+ },
49
+ currency: {
50
+ currency: "Currency",
51
+ EUR: "Euro",
52
+ USD: "USD"
53
+ },
54
+ locale: {
55
+ locale: "Locale"
46
56
  }
47
57
  };
48
58
  const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
@@ -53,7 +63,7 @@ var define_import_meta_env_default = { BASE_URL: "/", MODE: "production", DEV: f
53
63
  const lang = ref(lang$1);
54
64
  const locales = /* @__PURE__ */ Object.assign({
55
65
  "./en-US.ts": () => Promise.resolve().then(() => enUS),
56
- "./nl.ts": () => import("./nl-DF7uv7-9.js")
66
+ "./nl.ts": () => import("./nl-DvM_wB4u.js")
57
67
  });
58
68
  const useLang = () => {
59
69
  return lang;
@@ -77,7 +87,7 @@ const loadLang = async (isoName) => {
77
87
  loadingLanguage = false;
78
88
  }
79
89
  };
80
- const _sfc_main$b = /* @__PURE__ */ defineComponent({
90
+ const _sfc_main$d = /* @__PURE__ */ defineComponent({
81
91
  __name: "GenderSelect",
82
92
  props: {
83
93
  modelValue: {},
@@ -130,7 +140,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
130
140
  };
131
141
  }
132
142
  });
133
- const _sfc_main$a = /* @__PURE__ */ defineComponent({
143
+ const _sfc_main$c = /* @__PURE__ */ defineComponent({
134
144
  __name: "GenderItem",
135
145
  props: {
136
146
  modelValue: {}
@@ -170,7 +180,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
170
180
  };
171
181
  }
172
182
  });
173
- const _sfc_main$9 = /* @__PURE__ */ defineComponent({
183
+ const _sfc_main$b = /* @__PURE__ */ defineComponent({
174
184
  __name: "PostalCodeInput",
175
185
  props: {
176
186
  modelValue: {},
@@ -208,7 +218,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
208
218
  };
209
219
  }
210
220
  });
211
- const _sfc_main$8 = /* @__PURE__ */ defineComponent({
221
+ const _sfc_main$a = /* @__PURE__ */ defineComponent({
212
222
  __name: "FormItem",
213
223
  props: {
214
224
  modelValue: {},
@@ -269,7 +279,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
269
279
  };
270
280
  }
271
281
  });
272
- const _sfc_main$7 = /* @__PURE__ */ defineComponent({
282
+ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
273
283
  __name: "FormInput",
274
284
  props: {
275
285
  modelValue: {},
@@ -302,7 +312,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
302
312
  };
303
313
  }
304
314
  });
305
- const _sfc_main$6 = /* @__PURE__ */ defineComponent({
315
+ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
306
316
  __name: "TelephoneNumberInput",
307
317
  props: {
308
318
  modelValue: {},
@@ -328,12 +338,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
328
338
  };
329
339
  }
330
340
  });
331
- const _hoisted_1 = {
341
+ const _hoisted_1$1 = {
332
342
  key: 0,
333
343
  style: { "margin-left": "-0.5em", "margin-top": "0.75em" }
334
344
  };
335
- const _hoisted_2 = { class: "row items-center justify-end" };
336
- const _sfc_main$5 = /* @__PURE__ */ defineComponent({
345
+ const _hoisted_2$1 = { class: "row items-center justify-end" };
346
+ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
337
347
  __name: "DateInput",
338
348
  props: {
339
349
  modelValue: {},
@@ -479,17 +489,18 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
479
489
  "model-value": unref(modelValue),
480
490
  "bottom-slots": "",
481
491
  rules: validations.value,
482
- label: _ctx.label,
492
+ label: `${_ctx.label}${_ctx.required ? "*" : ""}`,
483
493
  "stack-label": ""
484
494
  }, {
485
495
  control: withCtx(() => [
486
496
  (openBlock(true), createElementBlock(Fragment, null, renderList(unref(format).split("-"), (part, index) => {
487
497
  return openBlock(), createBlock(resolveDynamicComponent(unref(QInput)), mergeProps({
488
498
  key: part,
489
- borderless: ""
499
+ borderless: "",
500
+ ref_for: true
490
501
  }, dateProps.value[part]), {
491
502
  after: withCtx(() => [
492
- index < 2 ? (openBlock(), createElementBlock("a", _hoisted_1, "-")) : createCommentVNode("", true)
503
+ index < 2 ? (openBlock(), createElementBlock("a", _hoisted_1$1, "-")) : createCommentVNode("", true)
493
504
  ]),
494
505
  _: 2
495
506
  }, 1040);
@@ -526,7 +537,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
526
537
  "onUpdate:modelValue": setDate
527
538
  }), {
528
539
  default: withCtx(() => [
529
- createElementVNode("div", _hoisted_2, [
540
+ createElementVNode("div", _hoisted_2$1, [
530
541
  withDirectives(createVNode(_component_q_btn, {
531
542
  label: unref(lang2).buttons.close,
532
543
  color: "primary",
@@ -551,7 +562,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
551
562
  };
552
563
  }
553
564
  });
554
- const _sfc_main$4 = /* @__PURE__ */ defineComponent({
565
+ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
555
566
  __name: "BooleanSelect",
556
567
  props: {
557
568
  modelValue: { type: [Boolean, null] },
@@ -597,7 +608,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
597
608
  };
598
609
  }
599
610
  });
600
- const _sfc_main$3 = /* @__PURE__ */ defineComponent({
611
+ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
601
612
  __name: "BooleanItem",
602
613
  props: {
603
614
  modelValue: { type: [Boolean, null] },
@@ -641,7 +652,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
641
652
  const __default__$1 = {
642
653
  name: "EmailInput"
643
654
  };
644
- const _sfc_main$2 = /* @__PURE__ */ defineComponent({
655
+ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
645
656
  ...__default__$1,
646
657
  props: {
647
658
  subject: {},
@@ -678,7 +689,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
678
689
  };
679
690
  }
680
691
  });
681
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
692
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
682
693
  __name: "DatePicker",
683
694
  props: {
684
695
  modelValue: {},
@@ -744,6 +755,141 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
744
755
  };
745
756
  }
746
757
  });
758
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
759
+ __name: "CurrencySelect",
760
+ props: {
761
+ modelValue: {},
762
+ required: { type: Boolean }
763
+ },
764
+ emits: ["update:modelValue"],
765
+ setup(__props) {
766
+ const props = __props;
767
+ const attrs = useAttrs();
768
+ const lang2 = useLang();
769
+ const currencyOptions = ref([
770
+ {
771
+ label: lang2.value.currency.EUR,
772
+ value: "EUR"
773
+ },
774
+ {
775
+ label: lang2.value.currency.USD,
776
+ value: "USD"
777
+ }
778
+ ]);
779
+ const validations = ref([]);
780
+ if (props.required)
781
+ validations.value.push(
782
+ (val) => !!val || lang2.value.validations.fieldRequired
783
+ );
784
+ return (_ctx, _cache) => {
785
+ return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
786
+ rules: validations.value,
787
+ "model-value": _ctx.modelValue,
788
+ options: currencyOptions.value,
789
+ label: `${unref(lang2).currency.currency}${_ctx.required ? "*" : ""}`,
790
+ "emit-value": "",
791
+ "map-options": "",
792
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
793
+ }), null, 16, ["rules", "model-value", "options", "label"]);
794
+ };
795
+ }
796
+ });
797
+ const _hoisted_1 = { key: 0 };
798
+ const _hoisted_2 = { key: 1 };
799
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
800
+ __name: "LocaleSelect",
801
+ props: {
802
+ modelValue: {},
803
+ required: { type: Boolean }
804
+ },
805
+ setup(__props) {
806
+ const props = __props;
807
+ const { modelValue } = toRefs(props);
808
+ const attrs = useAttrs();
809
+ const lang2 = useLang();
810
+ const flagsLang = useLang$1();
811
+ const languageOptions = [
812
+ {
813
+ label: flagsLang.value.languages["en-US"],
814
+ value: "en-US"
815
+ },
816
+ {
817
+ label: flagsLang.value.languages.nl,
818
+ value: "nl"
819
+ }
820
+ ];
821
+ return (_ctx, _cache) => {
822
+ const _component_q_item_section = QItemSection;
823
+ const _component_q_item_label = QItemLabel;
824
+ const _component_q_item = QItem;
825
+ return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
826
+ options: languageOptions,
827
+ "model-value": unref(modelValue),
828
+ label: `${unref(lang2).locale.locale}${_ctx.required ? "*" : ""}`,
829
+ "emit-value": "",
830
+ "map-options": ""
831
+ }), {
832
+ selected: withCtx(() => [
833
+ unref(modelValue) === "en-US" ? (openBlock(), createElementBlock("div", _hoisted_1, [
834
+ createVNode(unref(enUs)),
835
+ createTextVNode(" " + toDisplayString(unref(flagsLang).languages["en-US"]), 1)
836
+ ])) : createCommentVNode("", true),
837
+ unref(modelValue) === "nl" ? (openBlock(), createElementBlock("div", _hoisted_2, [
838
+ createVNode(unref(nl)),
839
+ createTextVNode(" " + toDisplayString(unref(flagsLang).languages.nl), 1)
840
+ ])) : createCommentVNode("", true)
841
+ ]),
842
+ option: withCtx((scope) => [
843
+ scope.opt.value === "en-US" ? (openBlock(), createBlock(_component_q_item, normalizeProps(mergeProps({ key: 0 }, scope.itemProps)), {
844
+ default: withCtx(() => [
845
+ createVNode(_component_q_item_section, { avatar: "" }, {
846
+ default: withCtx(() => [
847
+ createVNode(unref(enUs))
848
+ ]),
849
+ _: 1
850
+ }),
851
+ createVNode(_component_q_item_section, null, {
852
+ default: withCtx(() => [
853
+ createVNode(_component_q_item_label, null, {
854
+ default: withCtx(() => [
855
+ createTextVNode(toDisplayString(unref(flagsLang).languages["en-US"]), 1)
856
+ ]),
857
+ _: 1
858
+ })
859
+ ]),
860
+ _: 1
861
+ })
862
+ ]),
863
+ _: 2
864
+ }, 1040)) : createCommentVNode("", true),
865
+ scope.opt.value === "nl" ? (openBlock(), createBlock(_component_q_item, normalizeProps(mergeProps({ key: 1 }, scope.itemProps)), {
866
+ default: withCtx(() => [
867
+ createVNode(_component_q_item_section, { avatar: "" }, {
868
+ default: withCtx(() => [
869
+ createVNode(unref(nl))
870
+ ]),
871
+ _: 1
872
+ }),
873
+ createVNode(_component_q_item_section, null, {
874
+ default: withCtx(() => [
875
+ createVNode(_component_q_item_label, null, {
876
+ default: withCtx(() => [
877
+ createTextVNode(toDisplayString(unref(flagsLang).languages.nl), 1)
878
+ ]),
879
+ _: 1
880
+ })
881
+ ]),
882
+ _: 1
883
+ })
884
+ ]),
885
+ _: 2
886
+ }, 1040)) : createCommentVNode("", true)
887
+ ]),
888
+ _: 1
889
+ }, 16, ["model-value", "label"]);
890
+ };
891
+ }
892
+ });
747
893
  const __default__ = {
748
894
  name: "FilteredModelSelect"
749
895
  };
@@ -752,7 +898,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
752
898
  props: {
753
899
  modelValue: {},
754
900
  labelKey: {},
901
+ labelFunction: { type: Function },
755
902
  valueKey: {},
903
+ extraFields: {},
756
904
  filteredOptions: {},
757
905
  required: { type: Boolean },
758
906
  onFilter: {},
@@ -766,14 +914,34 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
766
914
  const attrs = useAttrs();
767
915
  const emit = __emit;
768
916
  const lang2 = useLang();
769
- const { modelValue, onFilter, filteredOptions, labelKey, valueKey } = toRefs(props);
917
+ const {
918
+ modelValue,
919
+ onFilter,
920
+ filteredOptions,
921
+ labelKey,
922
+ valueKey,
923
+ labelFunction,
924
+ extraFields
925
+ } = toRefs(props);
770
926
  const options = computed(() => {
771
927
  var _a;
772
928
  if (filteredOptions.value.length) {
773
- return (_a = filteredOptions.value) == null ? void 0 : _a.map((option) => ({
774
- label: option[labelKey.value],
775
- value: option[valueKey.value || "id"]
776
- }));
929
+ return (_a = filteredOptions.value) == null ? void 0 : _a.map((option) => {
930
+ var _a2;
931
+ return {
932
+ label: labelFunction.value ? labelFunction.value(option) : option[labelKey.value],
933
+ value: option[valueKey.value || "id"],
934
+ extraFields: (_a2 = extraFields.value) == null ? void 0 : _a2.reduce(
935
+ (result, key) => {
936
+ if (option.hasOwnProperty(key)) {
937
+ result[key] = option[key];
938
+ }
939
+ return result;
940
+ },
941
+ {}
942
+ )
943
+ };
944
+ });
777
945
  }
778
946
  return [];
779
947
  });
@@ -809,6 +977,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
809
977
  }
810
978
  });
811
979
  });
980
+ onMounted(() => {
981
+ if (!options.value.length)
982
+ emit("filter", {
983
+ ids: selectedIds.value,
984
+ searchPhrase: "",
985
+ done: () => {
986
+ }
987
+ });
988
+ });
812
989
  return (_ctx, _cache) => {
813
990
  return openBlock(), createBlock(unref(QSelect), mergeProps({
814
991
  ref_key: "selectRef",
@@ -835,11 +1012,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
835
1012
  ]),
836
1013
  _: 2
837
1014
  }, [
838
- renderList(Object.keys(_ctx.$slots), (slot, index) => {
1015
+ renderList(_ctx.$slots, (_, slot) => {
839
1016
  return {
840
1017
  name: slot,
841
1018
  fn: withCtx((scope) => [
842
- renderSlot(_ctx.$slots, slot, { scope })
1019
+ renderSlot(_ctx.$slots, slot, normalizeProps(guardReactiveProps(scope || {})))
843
1020
  ])
844
1021
  };
845
1022
  })
@@ -848,18 +1025,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
848
1025
  }
849
1026
  });
850
1027
  export {
851
- _sfc_main$3 as BooleanItem,
852
- _sfc_main$4 as BooleanSelect,
853
- _sfc_main$5 as DateInput,
854
- _sfc_main$1 as DatePicker,
855
- _sfc_main$2 as EmailInput,
1028
+ _sfc_main$5 as BooleanItem,
1029
+ _sfc_main$6 as BooleanSelect,
1030
+ _sfc_main$2 as CurrencySelect,
1031
+ _sfc_main$7 as DateInput,
1032
+ _sfc_main$3 as DatePicker,
1033
+ _sfc_main$4 as EmailInput,
856
1034
  _sfc_main as FilteredModelSelect,
857
- _sfc_main$7 as FormInput,
858
- _sfc_main$8 as FormItem,
859
- _sfc_main$a as GenderItem,
860
- _sfc_main$b as GenderSelect,
861
- _sfc_main$9 as PostalCodeInput,
862
- _sfc_main$6 as TelephoneNumberInput,
1035
+ _sfc_main$9 as FormInput,
1036
+ _sfc_main$a as FormItem,
1037
+ _sfc_main$c as GenderItem,
1038
+ _sfc_main$d as GenderSelect,
1039
+ _sfc_main$1 as LocaleSelect,
1040
+ _sfc_main$b as PostalCodeInput,
1041
+ _sfc_main$8 as TelephoneNumberInput,
863
1042
  loadLang,
864
1043
  useLang
865
1044
  };
package/dist/general.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { l as loadLang, u as useLang, _ as _sfc_main$5 } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-DAnZaTMl.js";
2
- import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QBtn, QToolbarTitle, QToolbar, QHeader, QPage, QPageContainer, QLayout, QSpace, QPageSticky, QSelect, QItemSection, QItemLabel, QItem, QList } from "quasar";
3
- import { defineComponent, watch, ref, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, normalizeClass, createCommentVNode, toRefs, useAttrs, computed, mergeProps, createTextVNode, toDisplayString } from "vue";
2
+ import { useQuasar, QCard, QCardSection, QCardActions, QDialog, QBtn, QToolbarTitle, QToolbar, QHeader, QPage, QPageContainer, QLayout, QPageSticky, QSelect, QItemSection, QItemLabel, QItem, QList } from "quasar";
3
+ import { defineComponent, watch, ref, openBlock, createBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, normalizeProps, guardReactiveProps, normalizeClass, createCommentVNode, useSlots, toRefs, useAttrs, computed, mergeProps, createTextVNode, toDisplayString } from "vue";
4
4
  import { e as enUs, n as nl } from "./en-US-BEeILC7o.js";
5
5
  const _hoisted_1$1 = { class: "text-h6" };
6
6
  const _hoisted_2 = { class: "text-subtitle2" };
@@ -207,11 +207,12 @@ const __default__ = {
207
207
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
208
208
  ...__default__,
209
209
  props: {
210
- type: { default: "create" },
211
- disabled: { type: Boolean, default: false }
210
+ type: {},
211
+ disabled: { type: Boolean }
212
212
  },
213
213
  emits: ["create", "update"],
214
214
  setup(__props, { expose: __expose, emit: __emit }) {
215
+ const slots = useSlots();
215
216
  const props = __props;
216
217
  const emit = __emit;
217
218
  const $q = useQuasar();
@@ -221,7 +222,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
221
222
  watch($q.lang, (val) => {
222
223
  loadLang($q.lang.isoName);
223
224
  });
224
- const { disabled } = toRefs(props);
225
+ const { type, disabled } = toRefs(props);
226
+ if (!type.value && !slots.fab)
227
+ type.value = "create";
225
228
  const done = () => "";
226
229
  const create = (evt) => disabled.value ? () => {
227
230
  } : emit("create", { done });
@@ -240,7 +243,6 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
240
243
  return (_ctx, _cache) => {
241
244
  const _component_q_btn = QBtn;
242
245
  const _component_q_toolbar_title = QToolbarTitle;
243
- const _component_q_space = QSpace;
244
246
  const _component_q_toolbar = QToolbar;
245
247
  const _component_q_page_sticky = QPageSticky;
246
248
  const _component_q_page = QPage;
@@ -258,7 +260,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
258
260
  class: normalizeClass(["shadow-2", { "bg-dark": unref($q).dark.isActive, "bg-white": !unref($q).dark.isActive }])
259
261
  }, {
260
262
  default: withCtx(() => [
261
- _ctx.type === "create" ? (openBlock(), createBlock(_component_q_btn, {
263
+ renderSlot(_ctx.$slots, "fab"),
264
+ unref(type) === "create" ? (openBlock(), createBlock(_component_q_btn, {
262
265
  key: 0,
263
266
  disable: unref(disabled),
264
267
  flat: "",
@@ -269,7 +272,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
269
272
  icon: "add",
270
273
  class: "q-mr-sm bg-primary text-white",
271
274
  onClick: create
272
- }, null, 8, ["disable"])) : (openBlock(), createBlock(_component_q_btn, {
275
+ }, null, 8, ["disable"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
273
276
  key: 1,
274
277
  disable: unref(disabled),
275
278
  flat: "",
@@ -280,14 +283,14 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
280
283
  icon: "edit",
281
284
  class: "q-mr-sm bg-primary text-white",
282
285
  onClick: update
283
- }, null, 8, ["disable"])),
284
- createVNode(_component_q_toolbar_title, { shrink: "" }, {
286
+ }, null, 8, ["disable"])) : createCommentVNode("", true),
287
+ createVNode(_component_q_toolbar_title, null, {
285
288
  default: withCtx(() => [
286
289
  renderSlot(_ctx.$slots, "header")
287
290
  ]),
288
291
  _: 3
289
292
  }),
290
- createVNode(_component_q_space)
293
+ renderSlot(_ctx.$slots, "header-side")
291
294
  ]),
292
295
  _: 3
293
296
  }, 8, ["class"])
@@ -34,6 +34,7 @@ const lang = {
34
34
  }
35
35
  },
36
36
  datePicker: {
37
+ date: "Datum",
37
38
  placeholder: "JJJJ/MM/DD",
38
39
  YYYY: "JJJJ",
39
40
  MM: "MM",
@@ -41,6 +42,14 @@ const lang = {
41
42
  validations: {
42
43
  unavailableRange: "De geselecteerde periode bevat ongeschikbare datums."
43
44
  }
45
+ },
46
+ currency: {
47
+ currency: "Valuta",
48
+ EUR: "Euro",
49
+ USD: "USD"
50
+ },
51
+ locale: {
52
+ locale: "Land"
44
53
  }
45
54
  };
46
55
  export {
@@ -9,17 +9,18 @@ export interface Props {
9
9
  name: string;
10
10
  }[];
11
11
  }
12
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {
12
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {
13
13
  variables: import("vue").Ref<{
14
14
  message: (name: string) => string;
15
15
  allow: string;
16
16
  deny: string;
17
17
  }>;
18
18
  functions: import("vue").Ref<{}>;
19
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>;
19
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>;
20
20
  export default _default;
21
+
21
22
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
22
- type __VLS_TypePropsToRuntimeProps<T> = {
23
+ type __VLS_TypePropsToOption<T> = {
23
24
  [K in keyof T]-?: {} extends Pick<T, K> ? {
24
25
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
25
26
  } : {
@@ -6,7 +6,7 @@ export interface Props {
6
6
  style?: Partial<CSSStyleDeclaration>;
7
7
  })>;
8
8
  }
9
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {
9
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {
10
10
  variables: import("vue").Ref<{
11
11
  header: string;
12
12
  }>;
@@ -23,7 +23,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
23
23
  otp: string;
24
24
  done: () => void;
25
25
  }) => void;
26
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
26
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
27
27
  onSubmit?: ((args_0: {
28
28
  email: string;
29
29
  newEmail: string;
@@ -39,8 +39,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
39
39
  }): any;
40
40
  }>;
41
41
  export default _default;
42
+ type __VLS_WithTemplateSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
42
47
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
43
- type __VLS_TypePropsToRuntimeProps<T> = {
48
+ type __VLS_TypePropsToOption<T> = {
44
49
  [K in keyof T]-?: {} extends Pick<T, K> ? {
45
50
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
46
51
  } : {
@@ -48,8 +53,3 @@ type __VLS_TypePropsToRuntimeProps<T> = {
48
53
  required: true;
49
54
  };
50
55
  };
51
- type __VLS_WithTemplateSlots<T, S> = T & {
52
- new (): {
53
- $slots: S;
54
- };
55
- };
@@ -4,7 +4,7 @@ export interface Props {
4
4
  style?: Partial<CSSStyleDeclaration>;
5
5
  })>;
6
6
  }
7
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {
7
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {
8
8
  variables: import("vue").Ref<{
9
9
  header: string;
10
10
  emailChanged: string;
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
26
26
  otp: string;
27
27
  done: () => void;
28
28
  }) => void;
29
- }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & {
29
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>> & {
30
30
  onChangeEmail?: ((args_0: {
31
31
  email: string;
32
32
  newEmail: string;
@@ -40,7 +40,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimePr
40
40
  }, {}, {}>;
41
41
  export default _default;
42
42
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
43
- type __VLS_TypePropsToRuntimeProps<T> = {
43
+ type __VLS_TypePropsToOption<T> = {
44
44
  [K in keyof T]-?: {} extends Pick<T, K> ? {
45
45
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
46
46
  } : {
@@ -1,12 +1,17 @@
1
1
  export interface Props {
2
2
  withNetwork?: string;
3
3
  }
4
- declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>>, {}, {}>, {
4
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}, {}>, {
5
5
  icon?(_: {}): any;
6
6
  }>;
7
7
  export default _default;
8
+ type __VLS_WithTemplateSlots<T, S> = T & {
9
+ new (): {
10
+ $slots: S;
11
+ };
12
+ };
8
13
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
9
- type __VLS_TypePropsToRuntimeProps<T> = {
14
+ type __VLS_TypePropsToOption<T> = {
10
15
  [K in keyof T]-?: {} extends Pick<T, K> ? {
11
16
  type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
12
17
  } : {
@@ -14,8 +19,3 @@ type __VLS_TypePropsToRuntimeProps<T> = {
14
19
  required: true;
15
20
  };
16
21
  };
17
- type __VLS_WithTemplateSlots<T, S> = T & {
18
- new (): {
19
- $slots: S;
20
- };
21
- };