@simsustech/quasar-components 0.11.22 → 0.11.24

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 (52) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/{LocaleSelect.vue_vue_type_script_setup_true_lang-CMvTDKR3.js → LocaleSelect.vue_vue_type_script_setup_true_lang-DThzjchm.js} +7 -4
  3. package/dist/{QSubmitButton.vue_vue_type_script_setup_true_lang-UtpXkOh7.js → QSubmitButton.vue_vue_type_script_setup_true_lang-D-I0Gws4.js} +3 -3
  4. package/dist/authentication.js +95 -110
  5. package/dist/form.js +79 -89
  6. package/dist/general.js +23 -31
  7. package/dist/md3.js +87 -137
  8. package/dist/types/ui/authentication/AccountsTable.vue.d.ts +22 -17
  9. package/dist/types/ui/authentication/ConsentList.vue.d.ts +3 -2
  10. package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +3 -2
  11. package/dist/types/ui/authentication/EmailChangeStepper.vue.d.ts +3 -2
  12. package/dist/types/ui/authentication/LoginButton.vue.d.ts +3 -2
  13. package/dist/types/ui/authentication/LoginForm.vue.d.ts +3 -2
  14. package/dist/types/ui/authentication/LogoutButton.vue.d.ts +3 -2
  15. package/dist/types/ui/authentication/LogoutForm.vue.d.ts +3 -2
  16. package/dist/types/ui/authentication/OtpInput.vue.d.ts +2 -1
  17. package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +3 -2
  18. package/dist/types/ui/authentication/PasswordChangeStepper.vue.d.ts +3 -2
  19. package/dist/types/ui/authentication/RegisterForm.vue.d.ts +3 -2
  20. package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +3 -2
  21. package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +3 -2
  22. package/dist/types/ui/authentication/VerificationSlider.vue.d.ts +3 -2
  23. package/dist/types/ui/form/BooleanItem.vue.d.ts +2 -1
  24. package/dist/types/ui/form/BooleanSelect.vue.d.ts +2 -1
  25. package/dist/types/ui/form/CronScheduleInput.vue.d.ts +2 -1
  26. package/dist/types/ui/form/CurrencySelect.vue.d.ts +2 -1
  27. package/dist/types/ui/form/DateInput.vue.d.ts +5 -4
  28. package/dist/types/ui/form/DatePicker.vue.d.ts +2 -1
  29. package/dist/types/ui/form/EmailInput.vue.d.ts +3 -2
  30. package/dist/types/ui/form/FilteredModelSelect.vue.d.ts +19 -15
  31. package/dist/types/ui/form/FormInput.vue.d.ts +5 -4
  32. package/dist/types/ui/form/FormItem.vue.d.ts +6 -5
  33. package/dist/types/ui/form/GenderItem.vue.d.ts +2 -1
  34. package/dist/types/ui/form/GenderSelect.vue.d.ts +2 -1
  35. package/dist/types/ui/form/LocaleSelect.vue.d.ts +6 -1
  36. package/dist/types/ui/form/PostalCodeInput.vue.d.ts +2 -1
  37. package/dist/types/ui/form/TelephoneNumberInput.vue.d.ts +2 -1
  38. package/dist/types/ui/general/QDrawerList.vue.d.ts +5 -4
  39. package/dist/types/ui/general/QLanguageSelect.vue.d.ts +6 -1
  40. package/dist/types/ui/general/QStyledCard.vue.d.ts +3 -2
  41. package/dist/types/ui/general/QStyledLayout.vue.d.ts +3 -2
  42. package/dist/types/ui/general/QSubmitButton.vue.d.ts +3 -2
  43. package/dist/types/ui/general/ResourcePage.vue.d.ts +3 -2
  44. package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +3 -2
  45. package/dist/types/ui/md3/Md3Layout.vue.d.ts +11 -10
  46. package/dist/types/ui/md3/NavigationRailFabs.vue.d.ts +2 -1
  47. package/dist/vite-plugin.js +2 -1
  48. package/package.json +28 -28
  49. package/src/ui/form/DateInput.vue +2 -1
  50. package/src/ui/form/LocaleSelect.vue +2 -0
  51. package/src/ui/general/QLanguageSelect.vue +3 -1
  52. package/src/vite-plugin.ts +2 -1
package/dist/form.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defineComponent, useAttrs, withAsyncContext, watch, ref, createBlock, openBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, toRefs, computed, useSlots, createCommentVNode, renderSlot, createSlots, renderList, resolveDirective, createElementVNode, withDirectives, createElementBlock, Fragment, resolveDynamicComponent } from "vue";
1
+ import { defineComponent, useAttrs, withAsyncContext, watch, ref, openBlock, createBlock, unref, mergeProps, normalizeProps, guardReactiveProps, withCtx, createVNode, createTextVNode, toDisplayString, toRefs, computed, useSlots, renderSlot, createCommentVNode, createSlots, renderList, resolveDirective, createElementVNode, withDirectives, createElementBlock, Fragment, resolveDynamicComponent } from "vue";
2
2
  import { useQuasar, QSelect, QItem, QItemSection, QItemLabel, QInput, QField, QIcon, QTooltip, QPopupProxy, QDate, QBtn, QEditor } from "quasar";
3
- import { u as useLang, l as loadLang } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-CMvTDKR3.js";
4
- import { _ } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-CMvTDKR3.js";
3
+ import { l as loadLang, u as useLang } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-DThzjchm.js";
4
+ import { _ } from "./LocaleSelect.vue_vue_type_script_setup_true_lang-DThzjchm.js";
5
5
  const _sfc_main$d = /* @__PURE__ */ defineComponent({
6
6
  __name: "GenderSelect",
7
7
  props: {
@@ -44,9 +44,9 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
44
44
  return (_ctx, _cache) => {
45
45
  return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
46
46
  rules: validations.value,
47
- "model-value": _ctx.modelValue,
47
+ "model-value": __props.modelValue,
48
48
  options: genderOptions.value,
49
- label: `${unref(lang).gender.gender}${_ctx.required ? "*" : ""}`,
49
+ label: `${unref(lang).gender.gender}${__props.required ? "*" : ""}`,
50
50
  "emit-value": "",
51
51
  "map-options": "",
52
52
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
@@ -80,7 +80,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
80
80
  }),
81
81
  createVNode(unref(QItemLabel), null, {
82
82
  default: withCtx(() => [
83
- createTextVNode(toDisplayString(_ctx.modelValue ? unref(lang).gender[_ctx.modelValue] : ""), 1)
83
+ createTextVNode(toDisplayString(__props.modelValue ? unref(lang).gender[__props.modelValue] : ""), 1)
84
84
  ]),
85
85
  _: 1
86
86
  })
@@ -132,8 +132,8 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
132
132
  return openBlock(), createBlock(unref(QInput), mergeProps(unref(attrs), {
133
133
  mask: computedMask.value,
134
134
  rules: computedValidations.value,
135
- "model-value": _ctx.modelValue,
136
- label: `${unref(lang).postalCode.postalCode}${_ctx.required ? "*" : ""}`,
135
+ "model-value": __props.modelValue,
136
+ label: `${unref(lang).postalCode.postalCode}${__props.required ? "*" : ""}`,
137
137
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
138
138
  }), null, 16, ["mask", "rules", "model-value", "label"]);
139
139
  };
@@ -171,13 +171,13 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
171
171
  default: withCtx(() => [
172
172
  createVNode(unref(QItemLabel), { overline: "" }, {
173
173
  default: withCtx(() => [
174
- createTextVNode(toDisplayString(_ctx.label ? _ctx.label : _ctx.field ? unref(lang).fields[_ctx.field] : ""), 1)
174
+ createTextVNode(toDisplayString(__props.label ? __props.label : __props.field ? unref(lang).fields[__props.field] : ""), 1)
175
175
  ]),
176
176
  _: 1
177
177
  }),
178
178
  createVNode(unref(QItemLabel), { class: "break-all" }, {
179
179
  default: withCtx(() => [
180
- createTextVNode(toDisplayString(_ctx.modelValue || "-"), 1)
180
+ createTextVNode(toDisplayString(__props.modelValue || "-"), 1)
181
181
  ]),
182
182
  _: 1
183
183
  })
@@ -224,8 +224,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
224
224
  return (_ctx, _cache) => {
225
225
  return openBlock(), createBlock(unref(QInput), mergeProps(unref(attrs), {
226
226
  rules: validations.value,
227
- "model-value": _ctx.modelValue,
228
- label: `${_ctx.field ? unref(lang).fields[_ctx.field] : _ctx.label ? _ctx.label : ""}${_ctx.required ? "*" : ""}`,
227
+ "model-value": __props.modelValue,
228
+ label: `${__props.field ? unref(lang).fields[__props.field] : __props.label ? __props.label : ""}${__props.required ? "*" : ""}`,
229
229
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
230
230
  }), createSlots({ _: 2 }, [
231
231
  renderList(_ctx.$slots, (_2, slot) => {
@@ -259,8 +259,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
259
259
  return (_ctx, _cache) => {
260
260
  return openBlock(), createBlock(unref(QInput), mergeProps(unref(attrs), {
261
261
  rules: validations.value,
262
- "model-value": _ctx.modelValue,
263
- label: `${unref(lang).fields.telephoneNumber}${_ctx.required ? "*" : ""}`,
262
+ "model-value": __props.modelValue,
263
+ label: `${unref(lang).fields.telephoneNumber}${__props.required ? "*" : ""}`,
264
264
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
265
265
  }), null, 16, ["rules", "model-value", "label"]);
266
266
  };
@@ -328,7 +328,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
328
328
  const date = `${year.value}-${String(month.value).padStart(2, "0")}-${String(day.value).padStart(2, "0")}`;
329
329
  if (year.value && month.value && day.value && !isNaN(Date.parse(date))) {
330
330
  emit("update:modelValue", date);
331
- } else {
331
+ } else if (modelValue.value !== null) {
332
332
  emit("update:modelValue", null);
333
333
  }
334
334
  });
@@ -355,10 +355,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
355
355
  });
356
356
  setInternalDate(modelValue.value);
357
357
  const goToNextElement = (e) => {
358
- var _a, _b, _c, _d;
359
358
  if (["Minus", "Slash"].includes(e.code)) {
360
359
  e.preventDefault();
361
- const next = (_d = (_c = (_b = (_a = e.currentTarget.parentElement) == null ? void 0 : _a.parentElement) == null ? void 0 : _b.parentElement) == null ? void 0 : _c.parentElement) == null ? void 0 : _d.nextElementSibling;
360
+ const next = e.currentTarget.parentElement?.parentElement?.parentElement?.parentElement?.nextElementSibling;
362
361
  if (next) {
363
362
  next.focus();
364
363
  }
@@ -436,8 +435,9 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
436
435
  "model-value": unref(modelValue),
437
436
  "bottom-slots": "",
438
437
  rules: validations.value,
439
- label: `${_ctx.label}${_ctx.required ? "*" : ""}`,
440
- "stack-label": ""
438
+ label: `${__props.label}${__props.required ? "*" : ""}`,
439
+ "stack-label": "",
440
+ "lazy-rules": ""
441
441
  }, createSlots({
442
442
  control: withCtx(() => [
443
443
  createElementVNode("div", _hoisted_1$1, [
@@ -463,14 +463,14 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
463
463
  ])
464
464
  ]),
465
465
  append: withCtx(() => [
466
- _ctx.clearable ? (openBlock(), createBlock(_component_q_icon, {
466
+ __props.clearable ? (openBlock(), createBlock(_component_q_icon, {
467
467
  key: 0,
468
- name: _ctx.icons.clear,
468
+ name: __props.icons.clear,
469
469
  class: "cursor-pointer",
470
470
  onClick: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", null))
471
471
  }, null, 8, ["name"])) : createCommentVNode("", true),
472
472
  createVNode(_component_q_icon, {
473
- name: _ctx.icons.event,
473
+ name: __props.icons.event,
474
474
  class: "cursor-pointer"
475
475
  }, {
476
476
  default: withCtx(() => [
@@ -485,28 +485,25 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
485
485
  "transition-show": "scale",
486
486
  "transition-hide": "scale"
487
487
  }, {
488
- default: withCtx(() => {
489
- var _a;
490
- return [
491
- createVNode(unref(QDate), mergeProps(_ctx.date, {
492
- "model-value": (_a = unref(modelValue)) == null ? void 0 : _a.replaceAll("-", "/"),
493
- "onUpdate:modelValue": setDate
494
- }), {
495
- default: withCtx(() => [
496
- createElementVNode("div", _hoisted_3, [
497
- withDirectives(createVNode(_component_q_btn, {
498
- label: unref(lang).buttons.close,
499
- color: "primary",
500
- flat: ""
501
- }, null, 8, ["label"]), [
502
- [_directive_close_popup]
503
- ])
488
+ default: withCtx(() => [
489
+ createVNode(unref(QDate), mergeProps(__props.date, {
490
+ "model-value": unref(modelValue)?.replaceAll("-", "/"),
491
+ "onUpdate:modelValue": setDate
492
+ }), {
493
+ default: withCtx(() => [
494
+ createElementVNode("div", _hoisted_3, [
495
+ withDirectives(createVNode(_component_q_btn, {
496
+ label: unref(lang).buttons.close,
497
+ color: "primary",
498
+ flat: ""
499
+ }, null, 8, ["label"]), [
500
+ [_directive_close_popup]
504
501
  ])
505
- ]),
506
- _: 1
507
- }, 16, ["model-value"])
508
- ];
509
- }),
502
+ ])
503
+ ]),
504
+ _: 1
505
+ }, 16, ["model-value"])
506
+ ]),
510
507
  _: 1
511
508
  })
512
509
  ]),
@@ -562,9 +559,9 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
562
559
  return (_ctx, _cache) => {
563
560
  return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
564
561
  rules: validations.value,
565
- "model-value": _ctx.modelValue,
562
+ "model-value": __props.modelValue,
566
563
  options: booleanOptions.value,
567
- label: `${_ctx.label}${_ctx.required ? "*" : ""}`,
564
+ label: `${__props.label}${__props.required ? "*" : ""}`,
568
565
  "emit-value": "",
569
566
  "map-options": "",
570
567
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
@@ -593,13 +590,13 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
593
590
  default: withCtx(() => [
594
591
  createVNode(unref(QItemLabel), { overline: "" }, {
595
592
  default: withCtx(() => [
596
- createTextVNode(toDisplayString(_ctx.label), 1)
593
+ createTextVNode(toDisplayString(__props.label), 1)
597
594
  ]),
598
595
  _: 1
599
596
  }),
600
597
  createVNode(unref(QItemLabel), null, {
601
598
  default: withCtx(() => [
602
- createTextVNode(toDisplayString(_ctx.modelValue === null ? "-" : _ctx.modelValue ? unref(lang).yes : unref(lang).no), 1)
599
+ createTextVNode(toDisplayString(__props.modelValue === null ? "-" : __props.modelValue ? unref(lang).yes : unref(lang).no), 1)
603
600
  ]),
604
601
  _: 1
605
602
  })
@@ -640,12 +637,12 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
640
637
  createVNode(unref(QInput), {
641
638
  outlined: "",
642
639
  placeholder: unref(lang).email.subject,
643
- "model-value": _ctx.subject,
640
+ "model-value": __props.subject,
644
641
  type: "text",
645
642
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => emit("update:subject", $event))
646
643
  }, null, 8, ["placeholder", "model-value"]),
647
644
  createVNode(unref(QEditor), {
648
- "model-value": _ctx.body,
645
+ "model-value": __props.body,
649
646
  toolbar: [
650
647
  ["left", "center", "right", "justify"],
651
648
  ["bold", "italic", "underline", "strike"],
@@ -675,11 +672,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
675
672
  const lang = useLang();
676
673
  const { periods, range, options: parentOptions } = toRefs(props);
677
674
  const update = (val) => {
678
- var _a;
679
675
  if (val && typeof val !== "string") {
680
676
  const parsedFrom = val.from.replaceAll("/", "-");
681
677
  const parsedTo = val.to.replaceAll("/", "-");
682
- const unavailablePeriods = (_a = periods == null ? void 0 : periods.value) == null ? void 0 : _a.filter(
678
+ const unavailablePeriods = periods?.value?.filter(
683
679
  (period) => period.type === "unavailable"
684
680
  );
685
681
  if (unavailablePeriods) {
@@ -696,11 +692,10 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
696
692
  emit("update:modelValue", val);
697
693
  };
698
694
  const dateOptions = function(date) {
699
- var _a;
700
695
  let parentResult = true;
701
- if (parentOptions == null ? void 0 : parentOptions.value) parentResult = parentOptions.value(date);
696
+ if (parentOptions?.value) parentResult = parentOptions.value(date);
702
697
  const parsedDate = date.replaceAll("/", "-");
703
- const unavailablePeriods = (_a = periods == null ? void 0 : periods.value) == null ? void 0 : _a.filter(
698
+ const unavailablePeriods = periods?.value?.filter(
704
699
  (period) => period.type === "unavailable"
705
700
  );
706
701
  if (unavailablePeriods) {
@@ -715,7 +710,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
715
710
  return (_ctx, _cache) => {
716
711
  const _component_q_date = QDate;
717
712
  return openBlock(), createBlock(_component_q_date, mergeProps(unref(attrs), {
718
- "model-value": _ctx.modelValue,
713
+ "model-value": __props.modelValue,
719
714
  "onUpdate:modelValue": update,
720
715
  options: dateOptions,
721
716
  range: unref(range)
@@ -752,9 +747,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
752
747
  return (_ctx, _cache) => {
753
748
  return openBlock(), createBlock(unref(QSelect), mergeProps(unref(attrs), {
754
749
  rules: validations.value,
755
- "model-value": _ctx.modelValue,
750
+ "model-value": __props.modelValue,
756
751
  options: currencyOptions.value,
757
- label: `${unref(lang).currency.currency}${_ctx.required ? "*" : ""}`,
752
+ label: `${unref(lang).currency.currency}${__props.required ? "*" : ""}`,
758
753
  "emit-value": "",
759
754
  "map-options": "",
760
755
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event))
@@ -793,24 +788,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
793
788
  extraFields
794
789
  } = toRefs(props);
795
790
  const options = computed(() => {
796
- var _a;
797
791
  if (filteredOptions.value.length) {
798
- return (_a = filteredOptions.value) == null ? void 0 : _a.map((option) => {
799
- var _a2;
800
- return {
801
- label: labelFunction.value ? labelFunction.value(option) : option[labelKey.value],
802
- value: option[valueKey.value || "id"],
803
- extraFields: (_a2 = extraFields.value) == null ? void 0 : _a2.reduce(
804
- (result, key) => {
805
- if (option.hasOwnProperty(key)) {
806
- result[key] = option[key];
807
- }
808
- return result;
809
- },
810
- {}
811
- )
812
- };
813
- });
792
+ return filteredOptions.value?.map((option) => ({
793
+ label: labelFunction.value ? labelFunction.value(option) : option[labelKey.value],
794
+ value: option[valueKey.value || "id"],
795
+ extraFields: extraFields.value?.reduce(
796
+ (result, key) => {
797
+ if (option.hasOwnProperty(key)) {
798
+ result[key] = option[key];
799
+ }
800
+ return result;
801
+ },
802
+ {}
803
+ )
804
+ }));
814
805
  }
815
806
  return [];
816
807
  });
@@ -837,8 +828,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
837
828
  };
838
829
  const selectRef = ref();
839
830
  watch(modelValue, () => {
840
- var _a;
841
- if (!((_a = options.value) == null ? void 0 : _a.find((val) => val.value === modelValue.value)))
831
+ if (!options.value?.find((val) => val.value === modelValue.value))
842
832
  emit("filter", {
843
833
  ids: selectedIds.value,
844
834
  searchPhrase: "",
@@ -855,22 +845,22 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
855
845
  }, unref(attrs), {
856
846
  "model-value": unref(modelValue),
857
847
  options: options.value,
858
- label: `${_ctx.label}${_ctx.required ? "*" : ""}`,
859
- hint: _ctx.multiple ? unref(lang).selectMultiple : void 0,
848
+ label: `${__props.label}${__props.required ? "*" : ""}`,
849
+ hint: __props.multiple ? unref(lang).selectMultiple : void 0,
860
850
  "emit-value": "",
861
851
  "map-options": "",
862
- "fill-input": !_ctx.multiple,
852
+ "fill-input": !__props.multiple,
863
853
  "use-input": !!unref(onFilter),
864
- "hide-selected": !_ctx.multiple && !!unref(onFilter) || Number.isNaN(unref(modelValue)),
865
- multiple: _ctx.multiple,
866
- "bottom-slots": !!_ctx.hint,
854
+ "hide-selected": !__props.multiple && !!unref(onFilter) || Number.isNaN(unref(modelValue)),
855
+ multiple: __props.multiple,
856
+ "bottom-slots": !!__props.hint,
867
857
  "input-debounce": "500",
868
- rules: _ctx.required ? [requiredValidation.value] : [],
858
+ rules: __props.required ? [requiredValidation.value] : [],
869
859
  onFilter: filterFn,
870
860
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:model-value", $event))
871
861
  }), createSlots({
872
862
  hint: withCtx(() => [
873
- createTextVNode(toDisplayString(_ctx.hint), 1)
863
+ createTextVNode(toDisplayString(__props.hint), 1)
874
864
  ]),
875
865
  "no-option": withCtx(() => [
876
866
  createVNode(_component_q_item, null, {
@@ -993,13 +983,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
993
983
  return openBlock(), createBlock(_component_q_field, {
994
984
  "model-value": unref(modelValue),
995
985
  rules: validations.value,
996
- label: `${unref(label)}${_ctx.required ? "*" : ""}`,
986
+ label: `${unref(label)}${__props.required ? "*" : ""}`,
997
987
  "stack-label": "",
998
988
  borderless: ""
999
989
  }, {
1000
990
  control: withCtx(() => [
1001
991
  createElementVNode("div", _hoisted_1, [
1002
- _ctx.showHour ? (openBlock(), createBlock(_component_q_select, {
992
+ __props.showHour ? (openBlock(), createBlock(_component_q_select, {
1003
993
  key: 0,
1004
994
  modelValue: hour.value,
1005
995
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => hour.value = $event),
@@ -1022,7 +1012,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1022
1012
  ]),
1023
1013
  _: 1
1024
1014
  }, 8, ["modelValue", "options", "hint"])) : createCommentVNode("", true),
1025
- _ctx.showMinute ? (openBlock(), createBlock(_component_q_select, {
1015
+ __props.showMinute ? (openBlock(), createBlock(_component_q_select, {
1026
1016
  key: 1,
1027
1017
  modelValue: minute.value,
1028
1018
  "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => minute.value = $event),
@@ -1091,8 +1081,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1091
1081
  _: 1
1092
1082
  }, 8, ["modelValue", "options", "hint", "placeholder"])
1093
1083
  ]),
1094
- _ctx.showDayOfWeek ? (openBlock(), createElementBlock("div", _hoisted_2, [
1095
- _ctx.showDayOfWeek ? (openBlock(), createBlock(_component_q_select, {
1084
+ __props.showDayOfWeek ? (openBlock(), createElementBlock("div", _hoisted_2, [
1085
+ __props.showDayOfWeek ? (openBlock(), createBlock(_component_q_select, {
1096
1086
  key: 0,
1097
1087
  modelValue: dayOfWeek.value,
1098
1088
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => dayOfWeek.value = $event),
package/dist/general.js CHANGED
@@ -1,7 +1,7 @@
1
- import { u as useLang, l as loadLang, _ as _sfc_main$5 } from "./QSubmitButton.vue_vue_type_script_setup_true_lang-UtpXkOh7.js";
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
- import { defineComponent, watch, ref, createBlock, openBlock, 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-CMvTDKR3.js";
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-DThzjchm.js";
5
5
  const _hoisted_1$1 = { class: "text-h6" };
6
6
  const _hoisted_2$1 = { class: "text-subtitle2" };
7
7
  const __default__$2 = {
@@ -57,7 +57,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
57
57
  ]),
58
58
  _: 3
59
59
  }),
60
- createVNode(_component_q_card_actions, normalizeProps(guardReactiveProps(_ctx.actions)), {
60
+ createVNode(_component_q_card_actions, normalizeProps(guardReactiveProps(__props.actions)), {
61
61
  default: withCtx(() => [
62
62
  renderSlot(_ctx.$slots, "actions")
63
63
  ]),
@@ -94,25 +94,15 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
94
94
  const submit = (evt) => {
95
95
  emit("submit", {
96
96
  done: (success = true) => {
97
- var _a;
98
97
  evt.done();
99
- if (success) (_a = dialogRef.value) == null ? void 0 : _a.hide();
98
+ if (success) dialogRef.value?.hide();
100
99
  }
101
100
  });
102
101
  };
103
102
  const dialogRef = ref();
104
- const open = () => {
105
- var _a;
106
- return (_a = dialogRef.value) == null ? void 0 : _a.show();
107
- };
108
- const close = () => {
109
- var _a;
110
- return (_a = dialogRef.value) == null ? void 0 : _a.hide();
111
- };
112
- const toggle = () => {
113
- var _a;
114
- return (_a = dialogRef.value) == null ? void 0 : _a.toggle();
115
- };
103
+ const open = () => dialogRef.value?.show();
104
+ const close = () => dialogRef.value?.hide();
105
+ const toggle = () => dialogRef.value?.toggle();
116
106
  const variables = ref({
117
107
  // header: lang.value.some.nested.prop
118
108
  });
@@ -151,7 +141,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
151
141
  createVNode(_component_q_toolbar, null, {
152
142
  default: withCtx(() => [
153
143
  createVNode(_component_q_btn, {
154
- icon: _ctx.icons.close,
144
+ icon: __props.icons.close,
155
145
  class: "text-light-on-surface dark:text-dark-on-surface",
156
146
  flat: "",
157
147
  round: "",
@@ -164,11 +154,11 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
164
154
  ]),
165
155
  _: 3
166
156
  }),
167
- !_ctx.display ? (openBlock(), createBlock(_sfc_main$5, {
157
+ !__props.display ? (openBlock(), createBlock(_sfc_main$5, {
168
158
  key: 0,
169
159
  flat: "",
170
160
  class: "text-light-primary dark:text-dark-primary",
171
- type: _ctx.buttonType,
161
+ type: __props.buttonType,
172
162
  onSubmit: submit
173
163
  }, null, 8, ["type"])) : createCommentVNode("", true)
174
164
  ]),
@@ -180,7 +170,7 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
180
170
  createVNode(_component_q_page_container, { style: { "margin-bottom": "50px" } }, {
181
171
  default: withCtx(() => [
182
172
  createVNode(_component_q_page, {
183
- padding: _ctx.padding,
173
+ padding: __props.padding,
184
174
  class: "q-pb-xl"
185
175
  }, {
186
176
  default: withCtx(() => [
@@ -253,7 +243,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
253
243
  class: normalizeClass(["shadow-2", { "bg-dark": unref($q).dark.isActive, "bg-white": !unref($q).dark.isActive }])
254
244
  }, {
255
245
  default: withCtx(() => [
256
- _ctx.topBarFab ? (openBlock(), createElementBlock("div", _hoisted_2, [
246
+ __props.topBarFab ? (openBlock(), createElementBlock("div", _hoisted_2, [
257
247
  renderSlot(_ctx.$slots, "fab"),
258
248
  unref(type) === "create" ? (openBlock(), createBlock(_component_q_btn, {
259
249
  key: 0,
@@ -263,7 +253,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
263
253
  round: "",
264
254
  size: "lg",
265
255
  dense: "",
266
- icon: _ctx.icons.add,
256
+ icon: __props.icons.add,
267
257
  class: "q-mr-sm bg-primary text-white",
268
258
  onClick: create
269
259
  }, null, 8, ["disable", "icon"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
@@ -274,31 +264,31 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
274
264
  round: "",
275
265
  size: "lg",
276
266
  dense: "",
277
- icon: _ctx.icons.edit,
267
+ icon: __props.icons.edit,
278
268
  class: "q-mr-sm bg-primary text-white",
279
269
  onClick: update
280
270
  }, null, 8, ["disable", "icon"])) : createCommentVNode("", true)
281
271
  ])) : createCommentVNode("", true),
282
- createVNode(_component_q_toolbar_title, { shrink: _ctx.topBarShrink }, {
272
+ createVNode(_component_q_toolbar_title, { shrink: __props.topBarShrink }, {
283
273
  default: withCtx(() => [
284
274
  renderSlot(_ctx.$slots, "header")
285
275
  ]),
286
276
  _: 3
287
277
  }, 8, ["shrink"]),
288
- !_ctx.topBarFab ? (openBlock(), createElementBlock("div", _hoisted_3, [
278
+ !__props.topBarFab ? (openBlock(), createElementBlock("div", _hoisted_3, [
289
279
  renderSlot(_ctx.$slots, "top-bar-buttons"),
290
280
  unref(type) === "create" ? (openBlock(), createBlock(_component_q_btn, {
291
281
  key: 0,
292
282
  disable: unref(disabled),
293
283
  label: unref(lang).add,
294
- icon: _ctx.icons.add,
284
+ icon: __props.icons.add,
295
285
  outline: "",
296
286
  onClick: create
297
287
  }, null, 8, ["disable", "label", "icon"])) : unref(type) === "update" ? (openBlock(), createBlock(_component_q_btn, {
298
288
  key: 1,
299
289
  disable: unref(disabled),
300
290
  label: unref(lang).edit,
301
- icon: _ctx.icons.edit,
291
+ icon: __props.icons.edit,
302
292
  outline: "",
303
293
  onClick: update
304
294
  }, null, 8, ["disable", "label", "icon"])) : createCommentVNode("", true)
@@ -324,8 +314,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
324
314
  languageImports: {},
325
315
  locales: {}
326
316
  },
327
- setup(__props) {
317
+ emits: ["update:modelValue"],
318
+ setup(__props, { emit: __emit }) {
328
319
  const props = __props;
320
+ const emit = __emit;
329
321
  const { modelValue, languageImports, locales } = toRefs(props);
330
322
  const $q = useQuasar();
331
323
  watch(modelValue, (langIso) => {
@@ -344,7 +336,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
344
336
  return openBlock(), createBlock(_sfc_main$6, {
345
337
  "model-value": unref(modelValue),
346
338
  locales: unref(locales),
347
- "onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => _ctx.$emit("update:model-value", val))
339
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = (val) => emit("update:modelValue", val))
348
340
  }, null, 8, ["model-value", "locales"]);
349
341
  };
350
342
  }