@juit/vue-z 0.0.23 → 0.0.25

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/index.js CHANGED
@@ -1,6 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
1
  import { QBtnDropdown, QTooltip, QBtnGroup, QBtn, QList, patterns, QInput, QIcon, useDialogPluginComponent, QDialog, QCard, QCardSection, QCardActions, QSeparator, QLinearProgress, QForm, QSelect, QItem, QItemSection, QSpinner, QItemLabel, QPopupProxy, QDate, QChip, is, useQuasar, QTr, QTh, QCheckbox, QTable, QTd, Dialog, Quasar } from "quasar";
5
2
  import { defineComponent, ref, useSlots, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot, createCommentVNode, createElementBlock, Fragment, createTextVNode, toDisplayString, inject, reactive, watch, triggerRef, onBeforeUnmount, provide, shallowRef, computed, normalizeProps, guardReactiveProps, mergeModels, useModel, createVNode, normalizeClass, onMounted, createElementVNode, withModifiers, createSlots, renderList, normalizeStyle, nextTick, useAttrs, warn, toRaw, h, getCurrentScope } from "vue";
6
3
  import { useTranslator, ISO_COUNTRIES } from "@juit/vue-i18n";
@@ -203,18 +200,9 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
203
200
  const _props = __props;
204
201
  const _slots = useSlots();
205
202
  __expose({
206
- show: () => {
207
- var _a;
208
- return (_a = _ref.value) == null ? void 0 : _a.show();
209
- },
210
- hide: () => {
211
- var _a;
212
- return (_a = _ref.value) == null ? void 0 : _a.hide();
213
- },
214
- toggle: () => {
215
- var _a;
216
- return (_a = _ref.value) == null ? void 0 : _a.toggle();
217
- }
203
+ show: () => _ref.value?.show(),
204
+ hide: () => _ref.value?.hide(),
205
+ toggle: () => _ref.value?.toggle()
218
206
  });
219
207
  return (_ctx, _cache) => {
220
208
  return openBlock(), createBlock(unref(QBtnDropdown), mergeProps({
@@ -1013,9 +1001,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1013
1001
  const _slots = useSlots();
1014
1002
  const _hasFocus = ref(false);
1015
1003
  const _state = computed(() => {
1016
- var _a, _b;
1017
- if ((_a = _helper.value) == null ? void 0 : _a.isDisabled) return "disabled";
1018
- if ((_b = _helper.value) == null ? void 0 : _b.isEditable) return "editable";
1004
+ if (_helper.value?.isDisabled) return "disabled";
1005
+ if (_helper.value?.isEditable) return "editable";
1019
1006
  return "inactive";
1020
1007
  });
1021
1008
  const _disabled = computed(() => _state.value === "disabled");
@@ -1030,37 +1017,21 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1030
1017
  if (!_props.onClear) return void 0;
1031
1018
  if (!_value.value) return void 0;
1032
1019
  return () => {
1033
- var _a, _b;
1034
- (_a = _qinput.value) == null ? void 0 : _a.focus();
1035
- (_b = _props.onClear) == null ? void 0 : _b.call(_props);
1020
+ _qinput.value?.focus();
1021
+ _props.onClear?.();
1036
1022
  };
1037
1023
  });
1038
1024
  __expose({
1039
1025
  /** Focus on this control */
1040
- focus: () => {
1041
- var _a;
1042
- return (_a = _qinput.value) == null ? void 0 : _a.focus();
1043
- },
1026
+ focus: () => _qinput.value?.focus(),
1044
1027
  /** Reset validation for this field */
1045
- resetValidation: () => {
1046
- var _a;
1047
- return (_a = _qinput.value) == null ? void 0 : _a.resetValidation();
1048
- },
1028
+ resetValidation: () => _qinput.value?.resetValidation(),
1049
1029
  /** Force validation of this field */
1050
- validate: () => {
1051
- var _a;
1052
- return ((_a = _qinput.value) == null ? void 0 : _a.validate()) || false;
1053
- },
1030
+ validate: () => _qinput.value?.validate() || false,
1054
1031
  /** If the field has validation errors or not */
1055
- hasError: computed(() => {
1056
- var _a;
1057
- return ((_a = _qinput.value) == null ? void 0 : _a.hasError) || false;
1058
- }),
1032
+ hasError: computed(() => _qinput.value?.hasError || false),
1059
1033
  /** The native element of the input */
1060
- nativeEl: computed(() => {
1061
- var _a;
1062
- return (_a = _qinput.value) == null ? void 0 : _a.nativeEl;
1063
- }),
1034
+ nativeEl: computed(() => _qinput.value?.nativeEl),
1064
1035
  /** A flag indicating whether this field is _editable_ or not */
1065
1036
  isEditable: _editable,
1066
1037
  /** A flag indicating whether this field is _disabled_ or not */
@@ -1078,13 +1049,9 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1078
1049
  if (rules.length === 0) rules.push(() => true);
1079
1050
  return rules;
1080
1051
  });
1081
- watch([_editable, _rules], () => {
1082
- var _a;
1083
- return (_a = _qinput.value) == null ? void 0 : _a.resetValidation();
1084
- });
1052
+ watch([_editable, _rules], () => _qinput.value?.resetValidation());
1085
1053
  formReadyState(() => {
1086
- var _a;
1087
- if ((_a = _qinput.value) == null ? void 0 : _a.hasError) return false;
1054
+ if (_qinput.value?.hasError) return false;
1088
1055
  if (_props.required) return !!_value.value;
1089
1056
  return true;
1090
1057
  });
@@ -1095,8 +1062,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1095
1062
  const _onKeydown = (event) => void _emit("keydown", event);
1096
1063
  const _onKeyup = (event) => void _emit("keyup", event);
1097
1064
  function _onClick(event) {
1098
- var _a;
1099
- if (_editable.value) (_a = _props.onClick) == null ? void 0 : _a.call(_props, event);
1065
+ if (_editable.value) _props.onClick?.(event);
1100
1066
  }
1101
1067
  function _onKeydownClear(event) {
1102
1068
  if (!_props.onClear) return;
@@ -1137,19 +1103,13 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1137
1103
  onMounted(() => {
1138
1104
  if (!_qinput.value) throw new Error("No QInput ref");
1139
1105
  if (!_helper.value) throw new Error("No ZFormHelper ref");
1140
- watch(() => {
1141
- var _a;
1142
- return (_a = _qinput.value) == null ? void 0 : _a.nativeEl;
1143
- }, (newElement, oldElement) => {
1106
+ watch(() => _qinput.value?.nativeEl, (newElement, oldElement) => {
1144
1107
  _removeEventListeners(oldElement);
1145
1108
  _addEventListeners(newElement);
1146
1109
  if (newElement) newElement.inputMode = _props.mode;
1147
1110
  }, { immediate: true });
1148
1111
  });
1149
- onBeforeUnmount(() => {
1150
- var _a;
1151
- return _removeEventListeners((_a = _qinput.value) == null ? void 0 : _a.nativeEl);
1152
- });
1112
+ onBeforeUnmount(() => _removeEventListeners(_qinput.value?.nativeEl));
1153
1113
  return (_ctx, _cache) => {
1154
1114
  return openBlock(), createElementBlock("div", _hoisted_1$b, [
1155
1115
  createVNode(_sfc_main$C, {
@@ -1193,70 +1153,67 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
1193
1153
  "model-value": _value.value,
1194
1154
  "onUpdate:modelValue": _update
1195
1155
  }, {
1196
- append: withCtx(() => {
1197
- var _a;
1198
- return [
1199
- _editable.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1200
- ((_a = _qinput.value) == null ? void 0 : _a.hasError) ? (openBlock(), createBlock(unref(QIcon), {
1156
+ append: withCtx(() => [
1157
+ _editable.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1158
+ _qinput.value?.hasError ? (openBlock(), createBlock(unref(QIcon), {
1159
+ key: 0,
1160
+ name: unref(icons).error,
1161
+ class: "z-icon z-icon-error"
1162
+ }, null, 8, ["name"])) : createCommentVNode("", true),
1163
+ __props.required && !_value.value ? (openBlock(), createBlock(unref(QIcon), {
1164
+ key: 1,
1165
+ name: unref(icons).required,
1166
+ class: "z-icon"
1167
+ }, null, 8, ["name"])) : _onClear.value ? (openBlock(), createBlock(unref(QIcon), {
1168
+ key: 2,
1169
+ name: unref(icons).cancel,
1170
+ class: "z-icon z-icon-clickable",
1171
+ onClick: _onClear.value
1172
+ }, null, 8, ["name", "onClick"])) : createCommentVNode("", true)
1173
+ ], 64)) : createCommentVNode("", true),
1174
+ __props.icon ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1175
+ __props.onClickIcon && formProps2.editable ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1176
+ __props.icon ? (openBlock(), createBlock(unref(QIcon), {
1201
1177
  key: 0,
1202
- name: unref(icons).error,
1203
- class: "z-icon z-icon-error"
1204
- }, null, 8, ["name"])) : createCommentVNode("", true),
1205
- __props.required && !_value.value ? (openBlock(), createBlock(unref(QIcon), {
1206
- key: 1,
1207
- name: unref(icons).required,
1208
- class: "z-icon"
1209
- }, null, 8, ["name"])) : _onClear.value ? (openBlock(), createBlock(unref(QIcon), {
1210
- key: 2,
1211
- name: unref(icons).cancel,
1212
1178
  class: "z-icon z-icon-clickable",
1213
- onClick: _onClear.value
1179
+ name: __props.icon,
1180
+ onClick: withModifiers(__props.onClickIcon, ["stop"])
1214
1181
  }, null, 8, ["name", "onClick"])) : createCommentVNode("", true)
1215
- ], 64)) : createCommentVNode("", true),
1216
- __props.icon ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1217
- __props.onClickIcon && formProps2.editable ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
1182
+ ], 64)) : __props.link && !formProps2.formEditable ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1183
+ typeof __props.link === "string" ? (openBlock(), createElementBlock("a", {
1184
+ key: 0,
1185
+ href: __props.link,
1186
+ class: "z-icon-link",
1187
+ onClick: withModifiers(() => {
1188
+ }, ["stop"])
1189
+ }, [
1218
1190
  __props.icon ? (openBlock(), createBlock(unref(QIcon), {
1219
1191
  key: 0,
1220
1192
  class: "z-icon z-icon-clickable",
1221
- name: __props.icon,
1222
- onClick: withModifiers(__props.onClickIcon, ["stop"])
1223
- }, null, 8, ["name", "onClick"])) : createCommentVNode("", true)
1224
- ], 64)) : __props.link && !formProps2.formEditable ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
1225
- typeof __props.link === "string" ? (openBlock(), createElementBlock("a", {
1226
- key: 0,
1227
- href: __props.link,
1228
- class: "z-icon-link",
1229
- onClick: withModifiers(() => {
1230
- }, ["stop"])
1231
- }, [
1193
+ name: __props.icon
1194
+ }, null, 8, ["name"])) : createCommentVNode("", true)
1195
+ ], 8, _hoisted_5$3)) : (openBlock(), createBlock(unref(RouterLink), {
1196
+ key: 1,
1197
+ to: __props.link,
1198
+ class: "z-icon-link"
1199
+ }, {
1200
+ default: withCtx(() => [
1232
1201
  __props.icon ? (openBlock(), createBlock(unref(QIcon), {
1233
1202
  key: 0,
1234
1203
  class: "z-icon z-icon-clickable",
1235
1204
  name: __props.icon
1236
1205
  }, null, 8, ["name"])) : createCommentVNode("", true)
1237
- ], 8, _hoisted_5$3)) : (openBlock(), createBlock(unref(RouterLink), {
1238
- key: 1,
1239
- to: __props.link,
1240
- class: "z-icon-link"
1241
- }, {
1242
- default: withCtx(() => [
1243
- __props.icon ? (openBlock(), createBlock(unref(QIcon), {
1244
- key: 0,
1245
- class: "z-icon z-icon-clickable",
1246
- name: __props.icon
1247
- }, null, 8, ["name"])) : createCommentVNode("", true)
1248
- ]),
1249
- _: 1
1250
- }, 8, ["to"]))
1251
- ], 64)) : (openBlock(), createBlock(unref(QIcon), {
1252
- key: 2,
1253
- class: "z-icon",
1254
- name: __props.icon
1255
- }, null, 8, ["name"]))
1256
- ], 64)) : createCommentVNode("", true),
1257
- _slots.append ? renderSlot(_ctx.$slots, "append", normalizeProps(mergeProps({ key: 2 }, formProps2)), void 0, true) : createCommentVNode("", true)
1258
- ];
1259
- }),
1206
+ ]),
1207
+ _: 1
1208
+ }, 8, ["to"]))
1209
+ ], 64)) : (openBlock(), createBlock(unref(QIcon), {
1210
+ key: 2,
1211
+ class: "z-icon",
1212
+ name: __props.icon
1213
+ }, null, 8, ["name"]))
1214
+ ], 64)) : createCommentVNode("", true),
1215
+ _slots.append ? renderSlot(_ctx.$slots, "append", normalizeProps(mergeProps({ key: 2 }, formProps2)), void 0, true) : createCommentVNode("", true)
1216
+ ]),
1260
1217
  default: withCtx(() => [
1261
1218
  _value.value && __props.suffix ? (openBlock(), createElementBlock("div", _hoisted_2$6, [
1262
1219
  createElementVNode("span", _hoisted_3$5, toDisplayString(_value.value), 1),
@@ -1382,25 +1339,13 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
1382
1339
  });
1383
1340
  __expose({
1384
1341
  /** Focus on this control */
1385
- focus: () => {
1386
- var _a;
1387
- return (_a = _ztext.value) == null ? void 0 : _a.focus();
1388
- },
1342
+ focus: () => _ztext.value?.focus(),
1389
1343
  /** Reset validation for this field */
1390
- resetValidation: () => {
1391
- var _a;
1392
- return (_a = _ztext.value) == null ? void 0 : _a.resetValidation();
1393
- },
1344
+ resetValidation: () => _ztext.value?.resetValidation(),
1394
1345
  /** Force validation of this field */
1395
- validate: () => {
1396
- var _a;
1397
- return ((_a = _ztext.value) == null ? void 0 : _a.validate()) || false;
1398
- },
1346
+ validate: () => _ztext.value?.validate() || false,
1399
1347
  /** If the field has validation errors or not */
1400
- hasError: computed(() => {
1401
- var _a;
1402
- return ((_a = _ztext.value) == null ? void 0 : _a.hasError) || false;
1403
- })
1348
+ hasError: computed(() => _ztext.value?.hasError || false)
1404
1349
  });
1405
1350
  onMounted(() => {
1406
1351
  if (!_ztext.value) throw new Error("No ZText ref");
@@ -1459,10 +1404,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1459
1404
  const value = useModel(__props, "modelValue");
1460
1405
  __expose({
1461
1406
  /** Focus on this control */
1462
- focus: () => {
1463
- var _a;
1464
- return (_a = _zstring.value) == null ? void 0 : _a.focus();
1465
- }
1407
+ focus: () => _zstring.value?.focus()
1466
1408
  });
1467
1409
  onMounted(() => {
1468
1410
  if (!_zstring.value) throw new Error("No QInput ref");
@@ -1588,14 +1530,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
1588
1530
  const state = useModel(__props, "modelValue");
1589
1531
  const emit = __emit;
1590
1532
  __expose({
1591
- show: () => {
1592
- var _a;
1593
- return (_a = dialogRef.value) == null ? void 0 : _a.show();
1594
- },
1595
- shake: () => {
1596
- var _a;
1597
- return (_a = dialogRef.value) == null ? void 0 : _a.shake();
1598
- },
1533
+ show: () => dialogRef.value?.show(),
1534
+ shake: () => dialogRef.value?.shake(),
1599
1535
  confirm: onDialogOK,
1600
1536
  cancel: onDialogCancel
1601
1537
  });
@@ -1706,22 +1642,10 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1706
1642
  const dialog = ref();
1707
1643
  const emit = __emit;
1708
1644
  __expose({
1709
- show: () => {
1710
- var _a;
1711
- return (_a = dialog.value) == null ? void 0 : _a.show();
1712
- },
1713
- shake: () => {
1714
- var _a;
1715
- return (_a = dialog.value) == null ? void 0 : _a.shake();
1716
- },
1717
- confirm: (value) => {
1718
- var _a;
1719
- return (_a = dialog.value) == null ? void 0 : _a.confirm(value);
1720
- },
1721
- cancel: () => {
1722
- var _a;
1723
- return (_a = dialog.value) == null ? void 0 : _a.cancel();
1724
- }
1645
+ show: () => dialog.value?.show(),
1646
+ shake: () => dialog.value?.shake(),
1647
+ confirm: (value) => dialog.value?.confirm(value),
1648
+ cancel: () => dialog.value?.cancel()
1725
1649
  });
1726
1650
  return (_ctx, _cache) => {
1727
1651
  return openBlock(), createBlock(ZDialog, {
@@ -1747,20 +1671,14 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
1747
1671
  label: __props.cancel || unref(t)({ en: "Cancel", de: "Abbrechen" }),
1748
1672
  icon: __props.cancelIcon,
1749
1673
  color: __props.cancelColor,
1750
- onClick: _cache[0] || (_cache[0] = ($event) => {
1751
- var _a;
1752
- return (_a = dialog.value) == null ? void 0 : _a.cancel();
1753
- })
1674
+ onClick: _cache[0] || (_cache[0] = ($event) => dialog.value?.cancel())
1754
1675
  }, null, 8, ["label", "icon", "color"]),
1755
1676
  createVNode(ZBtn, {
1756
1677
  class: "col",
1757
1678
  label: __props.confirm || unref(t)({ en: "Confirm", de: "Bestätigen" }),
1758
1679
  icon: __props.confirmIcon,
1759
1680
  color: __props.confirmColor,
1760
- onClick: _cache[1] || (_cache[1] = ($event) => {
1761
- var _a;
1762
- return (_a = dialog.value) == null ? void 0 : _a.confirm();
1763
- })
1681
+ onClick: _cache[1] || (_cache[1] = ($event) => dialog.value?.confirm())
1764
1682
  }, null, 8, ["label", "icon", "color"])
1765
1683
  ]),
1766
1684
  _: 1
@@ -1820,14 +1738,8 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
1820
1738
  });
1821
1739
  const _emit = __emit;
1822
1740
  __expose({
1823
- show: () => {
1824
- var _a;
1825
- return (_a = _dialog.value) == null ? void 0 : _a.show();
1826
- },
1827
- hide: () => {
1828
- var _a;
1829
- return (_a = _dialog.value) == null ? void 0 : _a.cancel();
1830
- }
1741
+ show: () => _dialog.value?.show(),
1742
+ hide: () => _dialog.value?.cancel()
1831
1743
  });
1832
1744
  return (_ctx, _cache) => {
1833
1745
  return openBlock(), createBlock(ZDialog, {
@@ -1922,31 +1834,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1922
1834
  lazyRules: void 0
1923
1835
  }));
1924
1836
  __expose({
1925
- focus: () => {
1926
- var _a;
1927
- return (_a = _qform.value) == null ? void 0 : _a.focus();
1928
- },
1837
+ focus: () => _qform.value?.focus(),
1929
1838
  validate: (shouldFocus) => _qform.value ? _qform.value.validate(shouldFocus) : Promise.reject(new Error("No QForm")),
1930
- resetValidation: () => {
1931
- var _a;
1932
- return (_a = _qform.value) == null ? void 0 : _a.resetValidation();
1933
- },
1934
- submit: () => {
1935
- var _a;
1936
- return (_a = _qform.value) == null ? void 0 : _a.submit();
1937
- },
1938
- reset: () => {
1939
- var _a;
1940
- return (_a = _qform.value) == null ? void 0 : _a.reset();
1941
- },
1942
- getValidationComponents: () => {
1943
- var _a;
1944
- return (_a = _qform.value) == null ? void 0 : _a.getValidationComponents();
1945
- },
1946
- isReady: computed(() => {
1947
- var _a;
1948
- return ((_a = _zinputs.value) == null ? void 0 : _a.isReady) || false;
1949
- })
1839
+ resetValidation: () => _qform.value?.resetValidation(),
1840
+ submit: () => _qform.value?.submit(),
1841
+ reset: () => _qform.value?.reset(),
1842
+ getValidationComponents: () => _qform.value?.getValidationComponents(),
1843
+ isReady: computed(() => _zinputs.value?.isReady || false)
1950
1844
  });
1951
1845
  onMounted(() => {
1952
1846
  if (!_zinputs.value) throw new Error("No ZInputGroup ref");
@@ -1983,7 +1877,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
1983
1877
  });
1984
1878
  function loader(parent) {
1985
1879
  const _loading = ref(0);
1986
- const loading = computed(() => (parent == null ? void 0 : parent.loading.value) || _loading.value > 0);
1880
+ const loading = computed(() => parent?.loading.value || _loading.value > 0);
1987
1881
  async function load(callback) {
1988
1882
  _loading.value++;
1989
1883
  try {
@@ -2088,10 +1982,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2088
1982
  const _emit = __emit;
2089
1983
  __expose({
2090
1984
  /** Focus on this control */
2091
- focus: () => {
2092
- var _a;
2093
- return (_a = _qselect.value) == null ? void 0 : _a.focus();
2094
- }
1985
+ focus: () => _qselect.value?.focus()
2095
1986
  });
2096
1987
  const _options = shallowRef([]);
2097
1988
  const _rules = computed(() => {
@@ -2101,7 +1992,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2101
1992
  rules.push(..._props.rules);
2102
1993
  return [(value) => {
2103
1994
  for (const rule of rules) {
2104
- const result = rule((value == null ? void 0 : value.label) || "");
1995
+ const result = rule(value?.label || "");
2105
1996
  if (typeof result === "string") return result;
2106
1997
  if (result === false) return false;
2107
1998
  }
@@ -2110,26 +2001,23 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2110
2001
  });
2111
2002
  const _selected = shallowRef(_input.value ? { label: _input.value, value: _input.value } : void 0);
2112
2003
  function _onSelected(option) {
2113
- var _a;
2114
2004
  _selected.value = option;
2115
2005
  _input.value = option.label;
2116
2006
  _autocompleter.cancel();
2117
- (_a = _qselect.value) == null ? void 0 : _a.hidePopup();
2007
+ _qselect.value?.hidePopup();
2118
2008
  _options.value = [];
2119
2009
  _emit("selected", option);
2120
2010
  }
2121
2011
  watch(_input, (value) => {
2122
- var _a;
2123
- (_a = _qselect.value) == null ? void 0 : _a.updateInputValue(value, true);
2012
+ _qselect.value?.updateInputValue(value, true);
2124
2013
  if (value) _selected.value = { label: value, value };
2125
2014
  else if (_selected.value) _selected.value = void 0;
2126
2015
  }, { immediate: true });
2127
2016
  function _onInputValue(value) {
2128
- var _a;
2129
2017
  value = value.trim().replace(/\s+/g, " ");
2130
2018
  if (value === _input.value) return;
2131
2019
  _input.value = value;
2132
- (_a = _qselect.value) == null ? void 0 : _a.validate();
2020
+ _qselect.value?.validate();
2133
2021
  const found = _options.value.find((option) => option.label === value);
2134
2022
  if (!found) _autocomplete(value);
2135
2023
  }
@@ -2137,10 +2025,9 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2137
2025
  _options.value = [];
2138
2026
  }
2139
2027
  function _onPopupShow() {
2140
- var _a, _b, _c, _d;
2141
- if (!((_b = (_a = _qselect.value) == null ? void 0 : _a.options) == null ? void 0 : _b.length)) return;
2142
- (_c = _qselect.value) == null ? void 0 : _c.setOptionIndex(-1);
2143
- (_d = _qselect.value) == null ? void 0 : _d.moveOptionSelection(1, true);
2028
+ if (!_qselect.value?.options?.length) return;
2029
+ _qselect.value?.setOptionIndex(-1);
2030
+ _qselect.value?.moveOptionSelection(1, true);
2144
2031
  }
2145
2032
  function onKeydown(event) {
2146
2033
  if (!_qselect.value) return;
@@ -2156,10 +2043,8 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2156
2043
  const { load, loading } = createLoader(true);
2157
2044
  class Autocompleter {
2158
2045
  constructor(text) {
2159
- __publicField(this, "_canceled", false);
2160
2046
  this.text = text;
2161
2047
  nextTick(() => load(async () => {
2162
- var _a;
2163
2048
  if (this._canceled) return;
2164
2049
  const results = text ? await _props.onAutocomplete(text) : [];
2165
2050
  const options = Object.freeze(results.map((option) => {
@@ -2167,14 +2052,12 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2167
2052
  return option;
2168
2053
  }));
2169
2054
  if (this._canceled) return;
2170
- if (options.length === 0) (_a = _qselect.value) == null ? void 0 : _a.hidePopup();
2055
+ if (options.length === 0) _qselect.value?.hidePopup();
2171
2056
  _options.value = options;
2172
- nextTick(() => {
2173
- var _a2, _b, _c;
2174
- return ((_b = (_a2 = _qselect.value) == null ? void 0 : _a2.options) == null ? void 0 : _b.length) && ((_c = _qselect.value) == null ? void 0 : _c.showPopup());
2175
- });
2057
+ nextTick(() => _qselect.value?.options?.length && _qselect.value?.showPopup());
2176
2058
  }));
2177
2059
  }
2060
+ _canceled = false;
2178
2061
  /** Cancel this autocompleter */
2179
2062
  cancel() {
2180
2063
  this._canceled = true;
@@ -2240,31 +2123,28 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
2240
2123
  size: "xs"
2241
2124
  })
2242
2125
  ]),
2243
- append: withCtx(() => {
2244
- var _a;
2245
- return [
2246
- ((_a = _qselect.value) == null ? void 0 : _a.hasError) ? (openBlock(), createBlock(unref(QIcon), {
2247
- key: 0,
2248
- name: unref(icons).error,
2249
- class: "z-icon z-icon-error"
2250
- }, null, 8, ["name"])) : createCommentVNode("", true),
2251
- formProps2.editable && _selected.value && __props.clearable ? (openBlock(), createBlock(unref(QIcon), {
2252
- key: 1,
2253
- name: unref(icons).cancel,
2254
- class: "z-icon z-icon-clickable",
2255
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _input.value = "", ["stop", "prevent"]))
2256
- }, null, 8, ["name"])) : !_selected.value && __props.required ? (openBlock(), createBlock(unref(QIcon), {
2257
- key: 2,
2258
- name: unref(icons).required,
2259
- class: "z-icon"
2260
- }, null, 8, ["name"])) : createCommentVNode("", true),
2261
- __props.icon ? (openBlock(), createBlock(unref(QIcon), {
2262
- key: 3,
2263
- name: __props.icon,
2264
- class: "z-icon"
2265
- }, null, 8, ["name"])) : createCommentVNode("", true)
2266
- ];
2267
- }),
2126
+ append: withCtx(() => [
2127
+ _qselect.value?.hasError ? (openBlock(), createBlock(unref(QIcon), {
2128
+ key: 0,
2129
+ name: unref(icons).error,
2130
+ class: "z-icon z-icon-error"
2131
+ }, null, 8, ["name"])) : createCommentVNode("", true),
2132
+ formProps2.editable && _selected.value && __props.clearable ? (openBlock(), createBlock(unref(QIcon), {
2133
+ key: 1,
2134
+ name: unref(icons).cancel,
2135
+ class: "z-icon z-icon-clickable",
2136
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _input.value = "", ["stop", "prevent"]))
2137
+ }, null, 8, ["name"])) : !_selected.value && __props.required ? (openBlock(), createBlock(unref(QIcon), {
2138
+ key: 2,
2139
+ name: unref(icons).required,
2140
+ class: "z-icon"
2141
+ }, null, 8, ["name"])) : createCommentVNode("", true),
2142
+ __props.icon ? (openBlock(), createBlock(unref(QIcon), {
2143
+ key: 3,
2144
+ name: __props.icon,
2145
+ class: "z-icon"
2146
+ }, null, 8, ["name"])) : createCommentVNode("", true)
2147
+ ]),
2268
2148
  option: withCtx((scope) => [
2269
2149
  _slots.option ? renderSlot(_ctx.$slots, "option", normalizeProps(mergeProps({ key: 0 }, scope))) : (openBlock(), createBlock(unref(QItem), mergeProps({ key: 1 }, scope.itemProps, { dense: "" }), {
2270
2150
  default: withCtx(() => [
@@ -2374,16 +2254,12 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2374
2254
  const _emit = __emit;
2375
2255
  __expose({
2376
2256
  /** Focus on this control */
2377
- focus: () => {
2378
- var _a;
2379
- return (_a = _zautocomplete.value) == null ? void 0 : _a.focus();
2380
- }
2257
+ focus: () => _zautocomplete.value?.focus()
2381
2258
  });
2382
2259
  let _googleService = void 0;
2383
2260
  async function _predictAddress(value) {
2384
- var _a, _b, _c;
2385
2261
  if (!_googleService) {
2386
- if (!((_c = (_b = (_a = globalThis.google) == null ? void 0 : _a.maps) == null ? void 0 : _b.places) == null ? void 0 : _c.AutocompleteService)) {
2262
+ if (!globalThis.google?.maps?.places?.AutocompleteService) {
2387
2263
  throw new Error("Google Maps AutocompleteService not available");
2388
2264
  }
2389
2265
  _googleService = new google.maps.places.AutocompleteService();
@@ -2422,8 +2298,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2422
2298
  return predictions;
2423
2299
  }
2424
2300
  async function _fillAddress(option) {
2425
- var _a, _b, _c;
2426
- if (!((_c = (_b = (_a = globalThis.google) == null ? void 0 : _a.maps) == null ? void 0 : _b.places) == null ? void 0 : _c.Place)) {
2301
+ if (!globalThis.google?.maps?.places?.Place) {
2427
2302
  throw new Error("Google Maps Place not available");
2428
2303
  }
2429
2304
  const place = new google.maps.places.Place({ id: option.value });
@@ -2576,25 +2451,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2576
2451
  const _slots = useSlots();
2577
2452
  __expose({
2578
2453
  /** Focus on this control */
2579
- focus: () => {
2580
- var _a;
2581
- return (_a = _qselect.value) == null ? void 0 : _a.focus();
2582
- },
2454
+ focus: () => _qselect.value?.focus(),
2583
2455
  /** Reset validation for this field */
2584
- resetValidation: () => {
2585
- var _a;
2586
- return (_a = _qselect.value) == null ? void 0 : _a.resetValidation();
2587
- },
2456
+ resetValidation: () => _qselect.value?.resetValidation(),
2588
2457
  /** Force validation of this field */
2589
- validate: () => {
2590
- var _a;
2591
- return ((_a = _qselect.value) == null ? void 0 : _a.validate()) || false;
2592
- },
2458
+ validate: () => _qselect.value?.validate() || false,
2593
2459
  /** If the field has validation errors or not */
2594
- hasError: computed(() => {
2595
- var _a;
2596
- return ((_a = _qselect.value) == null ? void 0 : _a.hasError) || false;
2597
- })
2460
+ hasError: computed(() => _qselect.value?.hasError || false)
2598
2461
  });
2599
2462
  const _options = computed(() => {
2600
2463
  if (Array.isArray(_props.options)) {
@@ -2605,16 +2468,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2605
2468
  const _rules = computed(() => {
2606
2469
  return _props.required ? [validators.required()] : [() => true];
2607
2470
  });
2608
- watch([() => {
2609
- var _a;
2610
- return (_a = _helper.value) == null ? void 0 : _a.isEditable;
2611
- }, _rules], () => {
2612
- var _a;
2613
- return (_a = _qselect.value) == null ? void 0 : _a.resetValidation();
2614
- });
2471
+ watch([() => _helper.value?.isEditable, _rules], () => _qselect.value?.resetValidation());
2615
2472
  formReadyState(() => {
2616
- var _a;
2617
- if ((_a = _qselect.value) == null ? void 0 : _a.hasError) return false;
2473
+ if (_qselect.value?.hasError) return false;
2618
2474
  if (_props.required) return !!_value.value;
2619
2475
  return true;
2620
2476
  });
@@ -2661,38 +2517,35 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2661
2517
  options: _options.value,
2662
2518
  behavior: "menu"
2663
2519
  }, createSlots({
2664
- append: withCtx(() => {
2665
- var _a;
2666
- return [
2667
- _slots.prepend ? renderSlot(_ctx.$slots, "prepend", normalizeProps(mergeProps({ key: 0 }, formProps2))) : createCommentVNode("", true),
2668
- formProps2.editable ? (openBlock(), createBlock(unref(QIcon), {
2669
- key: 1,
2670
- name: unref(icons).select,
2671
- class: "z-icon"
2672
- }, null, 8, ["name"])) : createCommentVNode("", true),
2673
- ((_a = _qselect.value) == null ? void 0 : _a.hasError) ? (openBlock(), createBlock(unref(QIcon), {
2674
- key: 2,
2675
- name: unref(icons).error,
2676
- class: "z-icon z-icon-error"
2677
- }, null, 8, ["name"])) : createCommentVNode("", true),
2678
- formProps2.editable && _value.value && __props.clearable ? (openBlock(), createBlock(unref(QIcon), {
2679
- key: 3,
2680
- name: unref(icons).cancel,
2681
- class: "z-icon z-icon-clickable",
2682
- onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _value.value = "", ["stop", "prevent"]))
2683
- }, null, 8, ["name"])) : !_value.value && __props.required ? (openBlock(), createBlock(unref(QIcon), {
2684
- key: 4,
2685
- name: unref(icons).required,
2686
- class: "z-icon"
2687
- }, null, 8, ["name"])) : createCommentVNode("", true),
2688
- __props.icon ? (openBlock(), createBlock(unref(QIcon), {
2689
- key: 5,
2690
- name: __props.icon,
2691
- class: "z-icon"
2692
- }, null, 8, ["name"])) : createCommentVNode("", true),
2693
- _slots.append ? renderSlot(_ctx.$slots, "append", normalizeProps(mergeProps({ key: 6 }, formProps2))) : createCommentVNode("", true)
2694
- ];
2695
- }),
2520
+ append: withCtx(() => [
2521
+ _slots.prepend ? renderSlot(_ctx.$slots, "prepend", normalizeProps(mergeProps({ key: 0 }, formProps2))) : createCommentVNode("", true),
2522
+ formProps2.editable ? (openBlock(), createBlock(unref(QIcon), {
2523
+ key: 1,
2524
+ name: unref(icons).select,
2525
+ class: "z-icon"
2526
+ }, null, 8, ["name"])) : createCommentVNode("", true),
2527
+ _qselect.value?.hasError ? (openBlock(), createBlock(unref(QIcon), {
2528
+ key: 2,
2529
+ name: unref(icons).error,
2530
+ class: "z-icon z-icon-error"
2531
+ }, null, 8, ["name"])) : createCommentVNode("", true),
2532
+ formProps2.editable && _value.value && __props.clearable ? (openBlock(), createBlock(unref(QIcon), {
2533
+ key: 3,
2534
+ name: unref(icons).cancel,
2535
+ class: "z-icon z-icon-clickable",
2536
+ onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _value.value = "", ["stop", "prevent"]))
2537
+ }, null, 8, ["name"])) : !_value.value && __props.required ? (openBlock(), createBlock(unref(QIcon), {
2538
+ key: 4,
2539
+ name: unref(icons).required,
2540
+ class: "z-icon"
2541
+ }, null, 8, ["name"])) : createCommentVNode("", true),
2542
+ __props.icon ? (openBlock(), createBlock(unref(QIcon), {
2543
+ key: 5,
2544
+ name: __props.icon,
2545
+ class: "z-icon"
2546
+ }, null, 8, ["name"])) : createCommentVNode("", true),
2547
+ _slots.append ? renderSlot(_ctx.$slots, "append", normalizeProps(mergeProps({ key: 6 }, formProps2))) : createCommentVNode("", true)
2548
+ ]),
2696
2549
  _: 2
2697
2550
  }, [
2698
2551
  _slots.option ? {
@@ -2927,10 +2780,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2927
2780
  return `${from} - ${to}`;
2928
2781
  }
2929
2782
  });
2930
- const _target = computed(() => {
2931
- var _a;
2932
- return ((_a = _ztext.value) == null ? void 0 : _a.$el.querySelector(".q-field__inner")) || void 0;
2933
- });
2783
+ const _target = computed(() => _ztext.value?.$el.querySelector(".q-field__inner") || void 0);
2934
2784
  const _hiding = ref(false);
2935
2785
  function _today() {
2936
2786
  const today = /* @__PURE__ */ new Date();
@@ -2940,13 +2790,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2940
2790
  return `${year}-${month}-${day}`;
2941
2791
  }
2942
2792
  function _onClick(event) {
2943
- var _a;
2944
- if (!_hiding.value) (_a = _qpopup.value) == null ? void 0 : _a.toggle();
2793
+ if (!_hiding.value) _qpopup.value?.toggle();
2945
2794
  event.stopPropagation();
2946
2795
  event.preventDefault();
2947
2796
  }
2948
2797
  function _onUpdate(value) {
2949
- var _a;
2950
2798
  if (!value) return;
2951
2799
  if (value !== _value.value) {
2952
2800
  if (typeof value === "string") {
@@ -2961,15 +2809,14 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2961
2809
  };
2962
2810
  }
2963
2811
  }
2964
- (_a = _qpopup.value) == null ? void 0 : _a.hide();
2812
+ _qpopup.value?.hide();
2965
2813
  }
2966
2814
  const _onClear = computed(() => {
2967
- var _a;
2968
2815
  if (_props.clearable === false) return void 0;
2969
2816
  if (_props.clearable === true) return () => _value.value = void 0;
2970
2817
  if (_props.clearable === "today") {
2971
2818
  const today = _today();
2972
- if (((_a = _value.value) == null ? void 0 : _a.from) === today && _value.value.to === today) return void 0;
2819
+ if (_value.value?.from === today && _value.value.to === today) return void 0;
2973
2820
  return () => _value.value = { from: today, to: today };
2974
2821
  } else return void 0;
2975
2822
  });
@@ -2985,20 +2832,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
2985
2832
  });
2986
2833
  __expose({
2987
2834
  /** Reset validation for this field */
2988
- resetValidation: () => {
2989
- var _a;
2990
- return (_a = _ztext.value) == null ? void 0 : _a.resetValidation();
2991
- },
2835
+ resetValidation: () => _ztext.value?.resetValidation(),
2992
2836
  /** Force validation of this field */
2993
- validate: () => {
2994
- var _a;
2995
- return ((_a = _ztext.value) == null ? void 0 : _a.validate()) || false;
2996
- },
2837
+ validate: () => _ztext.value?.validate() || false,
2997
2838
  /** If the field has validation errors or not */
2998
- hasError: computed(() => {
2999
- var _a;
3000
- return ((_a = _ztext.value) == null ? void 0 : _a.hasError) || false;
3001
- }),
2839
+ hasError: computed(() => _ztext.value?.hasError || false),
3002
2840
  /** Return _today_ in date format (`yyyy-mm-dd`) in the current timezone */
3003
2841
  today: () => _today()
3004
2842
  });
@@ -3020,41 +2858,38 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
3020
2858
  "on-clear": _onClear.value,
3021
2859
  onClick: _onClick
3022
2860
  }), {
3023
- append: withCtx(() => {
3024
- var _a;
3025
- return [
3026
- createVNode(unref(QPopupProxy), {
3027
- ref_key: "_qpopup",
3028
- ref: _qpopup,
3029
- "no-parent-event": "",
3030
- target: _target.value,
3031
- onBeforeHide: _cache[0] || (_cache[0] = ($event) => _hiding.value = true),
3032
- onHide: _cache[1] || (_cache[1] = ($event) => _hiding.value = false)
3033
- }, {
3034
- default: withCtx(() => [
3035
- createVNode(unref(QDate), {
3036
- minimal: "",
3037
- range: "",
3038
- mask: "YYYY-MM-DD",
3039
- "model-value": _value.value || "",
3040
- "first-day-of-week": 1,
3041
- "onUpdate:modelValue": _onUpdate
3042
- }, null, 8, ["model-value"])
3043
- ]),
3044
- _: 1
3045
- }, 8, ["target"]),
3046
- ((_a = _ztext.value) == null ? void 0 : _a.isEditable) ? (openBlock(), createBlock(unref(QIcon), {
3047
- key: 0,
3048
- class: "z-icon z-icon-clickable",
3049
- name: __props.icon,
3050
- onClick: _onClick
3051
- }, null, 8, ["name"])) : (openBlock(), createBlock(unref(QIcon), {
3052
- key: 1,
3053
- class: "z-icon",
3054
- name: __props.icon
3055
- }, null, 8, ["name"]))
3056
- ];
3057
- }),
2861
+ append: withCtx(() => [
2862
+ createVNode(unref(QPopupProxy), {
2863
+ ref_key: "_qpopup",
2864
+ ref: _qpopup,
2865
+ "no-parent-event": "",
2866
+ target: _target.value,
2867
+ onBeforeHide: _cache[0] || (_cache[0] = ($event) => _hiding.value = true),
2868
+ onHide: _cache[1] || (_cache[1] = ($event) => _hiding.value = false)
2869
+ }, {
2870
+ default: withCtx(() => [
2871
+ createVNode(unref(QDate), {
2872
+ minimal: "",
2873
+ range: "",
2874
+ mask: "YYYY-MM-DD",
2875
+ "model-value": _value.value || "",
2876
+ "first-day-of-week": 1,
2877
+ "onUpdate:modelValue": _onUpdate
2878
+ }, null, 8, ["model-value"])
2879
+ ]),
2880
+ _: 1
2881
+ }, 8, ["target"]),
2882
+ _ztext.value?.isEditable ? (openBlock(), createBlock(unref(QIcon), {
2883
+ key: 0,
2884
+ class: "z-icon z-icon-clickable",
2885
+ name: __props.icon,
2886
+ onClick: _onClick
2887
+ }, null, 8, ["name"])) : (openBlock(), createBlock(unref(QIcon), {
2888
+ key: 1,
2889
+ class: "z-icon",
2890
+ name: __props.icon
2891
+ }, null, 8, ["name"]))
2892
+ ]),
3058
2893
  _: 1
3059
2894
  }, 16, ["model-value", "label", "placeholder", "hint", "bottom-slots", "editable", "disabled", "readonly", "required", "on-clear"]);
3060
2895
  };
@@ -3123,10 +2958,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3123
2958
  const _props = __props;
3124
2959
  const _value = useModel(__props, "modelValue");
3125
2960
  const _localized = computed(() => d(_value.value, _props.format, "UTC"));
3126
- const _target = computed(() => {
3127
- var _a;
3128
- return ((_a = _ztext.value) == null ? void 0 : _a.$el.querySelector(".q-field__inner")) || void 0;
3129
- });
2961
+ const _target = computed(() => _ztext.value?.$el.querySelector(".q-field__inner") || void 0);
3130
2962
  const _hiding = ref(false);
3131
2963
  function _today() {
3132
2964
  const today = /* @__PURE__ */ new Date();
@@ -3136,16 +2968,14 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3136
2968
  return `${year}-${month}-${day}`;
3137
2969
  }
3138
2970
  function _onClick(event) {
3139
- var _a;
3140
- if (!_hiding.value) (_a = _qpopup.value) == null ? void 0 : _a.toggle();
2971
+ if (!_hiding.value) _qpopup.value?.toggle();
3141
2972
  event.stopPropagation();
3142
2973
  event.preventDefault();
3143
2974
  }
3144
2975
  function _onUpdate(value) {
3145
- var _a;
3146
2976
  if (!value) return;
3147
2977
  if (value !== _value.value) _value.value = value;
3148
- (_a = _qpopup.value) == null ? void 0 : _a.hide();
2978
+ _qpopup.value?.hide();
3149
2979
  }
3150
2980
  const _onClear = computed(() => {
3151
2981
  if (_props.clearable === false) return void 0;
@@ -3162,20 +2992,11 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3162
2992
  });
3163
2993
  __expose({
3164
2994
  /** Reset validation for this field */
3165
- resetValidation: () => {
3166
- var _a;
3167
- return (_a = _ztext.value) == null ? void 0 : _a.resetValidation();
3168
- },
2995
+ resetValidation: () => _ztext.value?.resetValidation(),
3169
2996
  /** Force validation of this field */
3170
- validate: () => {
3171
- var _a;
3172
- return ((_a = _ztext.value) == null ? void 0 : _a.validate()) || false;
3173
- },
2997
+ validate: () => _ztext.value?.validate() || false,
3174
2998
  /** If the field has validation errors or not */
3175
- hasError: computed(() => {
3176
- var _a;
3177
- return ((_a = _ztext.value) == null ? void 0 : _a.hasError) || false;
3178
- }),
2999
+ hasError: computed(() => _ztext.value?.hasError || false),
3179
3000
  /** Return _today_ in date format (`yyyy-mm-dd`) in the current timezone */
3180
3001
  today: () => _today()
3181
3002
  });
@@ -3197,40 +3018,37 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
3197
3018
  "on-clear": _onClear.value,
3198
3019
  onClick: _onClick
3199
3020
  }), {
3200
- append: withCtx(() => {
3201
- var _a;
3202
- return [
3203
- createVNode(unref(QPopupProxy), {
3204
- ref_key: "_qpopup",
3205
- ref: _qpopup,
3206
- "no-parent-event": "",
3207
- target: _target.value,
3208
- onBeforeHide: _cache[0] || (_cache[0] = ($event) => _hiding.value = true),
3209
- onHide: _cache[1] || (_cache[1] = ($event) => _hiding.value = false)
3210
- }, {
3211
- default: withCtx(() => [
3212
- createVNode(unref(QDate), {
3213
- minimal: "",
3214
- mask: "YYYY-MM-DD",
3215
- "model-value": _value.value,
3216
- "first-day-of-week": 1,
3217
- "onUpdate:modelValue": _onUpdate
3218
- }, null, 8, ["model-value"])
3219
- ]),
3220
- _: 1
3221
- }, 8, ["target"]),
3222
- ((_a = _ztext.value) == null ? void 0 : _a.isEditable) ? (openBlock(), createBlock(unref(QIcon), {
3223
- key: 0,
3224
- class: "z-icon z-icon-clickable",
3225
- name: __props.icon,
3226
- onClick: _onClick
3227
- }, null, 8, ["name"])) : (openBlock(), createBlock(unref(QIcon), {
3228
- key: 1,
3229
- class: "z-icon",
3230
- name: __props.icon
3231
- }, null, 8, ["name"]))
3232
- ];
3233
- }),
3021
+ append: withCtx(() => [
3022
+ createVNode(unref(QPopupProxy), {
3023
+ ref_key: "_qpopup",
3024
+ ref: _qpopup,
3025
+ "no-parent-event": "",
3026
+ target: _target.value,
3027
+ onBeforeHide: _cache[0] || (_cache[0] = ($event) => _hiding.value = true),
3028
+ onHide: _cache[1] || (_cache[1] = ($event) => _hiding.value = false)
3029
+ }, {
3030
+ default: withCtx(() => [
3031
+ createVNode(unref(QDate), {
3032
+ minimal: "",
3033
+ mask: "YYYY-MM-DD",
3034
+ "model-value": _value.value,
3035
+ "first-day-of-week": 1,
3036
+ "onUpdate:modelValue": _onUpdate
3037
+ }, null, 8, ["model-value"])
3038
+ ]),
3039
+ _: 1
3040
+ }, 8, ["target"]),
3041
+ _ztext.value?.isEditable ? (openBlock(), createBlock(unref(QIcon), {
3042
+ key: 0,
3043
+ class: "z-icon z-icon-clickable",
3044
+ name: __props.icon,
3045
+ onClick: _onClick
3046
+ }, null, 8, ["name"])) : (openBlock(), createBlock(unref(QIcon), {
3047
+ key: 1,
3048
+ class: "z-icon",
3049
+ name: __props.icon
3050
+ }, null, 8, ["name"]))
3051
+ ]),
3234
3052
  _: 1
3235
3053
  }, 16, ["model-value", "label", "placeholder", "hint", "bottom-slots", "editable", "disabled", "readonly", "required", "on-clear"]);
3236
3054
  };
@@ -3295,25 +3113,13 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
3295
3113
  const _value = useModel(__props, "modelValue");
3296
3114
  __expose({
3297
3115
  /** Focus on this control */
3298
- focus: () => {
3299
- var _a;
3300
- return (_a = _ztext.value) == null ? void 0 : _a.focus();
3301
- },
3116
+ focus: () => _ztext.value?.focus(),
3302
3117
  /** Reset validation for this field */
3303
- resetValidation: () => {
3304
- var _a;
3305
- return (_a = _ztext.value) == null ? void 0 : _a.resetValidation();
3306
- },
3118
+ resetValidation: () => _ztext.value?.resetValidation(),
3307
3119
  /** Force validation of this field */
3308
- validate: () => {
3309
- var _a;
3310
- return ((_a = _ztext.value) == null ? void 0 : _a.validate()) || false;
3311
- },
3120
+ validate: () => _ztext.value?.validate() || false,
3312
3121
  /** If the field has validation errors or not */
3313
- hasError: computed(() => {
3314
- var _a;
3315
- return ((_a = _ztext.value) == null ? void 0 : _a.hasError) || false;
3316
- })
3122
+ hasError: computed(() => _ztext.value?.hasError || false)
3317
3123
  });
3318
3124
  const _suffix = computed(() => {
3319
3125
  if (!_value.value) return "";
@@ -3352,9 +3158,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
3352
3158
  return String.fromCharCode((10 - sum % 10) % 10 + 48);
3353
3159
  }
3354
3160
  function _onBeforeinput(event) {
3355
- var _a;
3356
3161
  if (event.inputType !== "insertText") return;
3357
- if ((_a = event.data) == null ? void 0 : _a.match(/^\d+$/)) return;
3162
+ if (event.data?.match(/^\d+$/)) return;
3358
3163
  event.preventDefault();
3359
3164
  }
3360
3165
  function _onKeydown(event) {
@@ -3369,7 +3174,6 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
3369
3174
  if (!_ztext.value) throw new Error("No ZText ref");
3370
3175
  });
3371
3176
  return (_ctx, _cache) => {
3372
- var _a;
3373
3177
  return openBlock(), createBlock(ZText, mergeProps({
3374
3178
  ref_key: "_ztext",
3375
3179
  ref: _ztext
@@ -3390,7 +3194,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
3390
3194
  rules: _rules.value,
3391
3195
  "lazy-rules": _ctx.lazyRules,
3392
3196
  "max-length": 13,
3393
- suffix: ((_a = _ztext.value) == null ? void 0 : _a.isEditable) ? _suffix.value : void 0,
3197
+ suffix: _ztext.value?.isEditable ? _suffix.value : void 0,
3394
3198
  onClear: _cache[1] || (_cache[1] = ($event) => _value.value = ""),
3395
3199
  onBeforeinput: _onBeforeinput,
3396
3200
  onKeydown: _onKeydown
@@ -3631,30 +3435,15 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
3631
3435
  const _slots = useSlots();
3632
3436
  __expose({
3633
3437
  /** Focus on this control */
3634
- focus: () => {
3635
- var _a;
3636
- return (_a = _ztext.value) == null ? void 0 : _a.focus();
3637
- },
3438
+ focus: () => _ztext.value?.focus(),
3638
3439
  /** Reset validation for this field */
3639
- resetValidation: () => {
3640
- var _a;
3641
- return (_a = _ztext.value) == null ? void 0 : _a.resetValidation();
3642
- },
3440
+ resetValidation: () => _ztext.value?.resetValidation(),
3643
3441
  /** Force validation of this field */
3644
- validate: () => {
3645
- var _a;
3646
- return ((_a = _ztext.value) == null ? void 0 : _a.validate()) || false;
3647
- },
3442
+ validate: () => _ztext.value?.validate() || false,
3648
3443
  /** If the field has validation errors or not */
3649
- hasError: computed(() => {
3650
- var _a;
3651
- return ((_a = _ztext.value) == null ? void 0 : _a.hasError) || false;
3652
- }),
3444
+ hasError: computed(() => _ztext.value?.hasError || false),
3653
3445
  /** If the field has validation errors or not */
3654
- isEditable: computed(() => {
3655
- var _a;
3656
- return ((_a = _ztext.value) == null ? void 0 : _a.isEditable) || false;
3657
- })
3446
+ isEditable: computed(() => _ztext.value?.isEditable || false)
3658
3447
  });
3659
3448
  const _rules = computed(() => {
3660
3449
  const rules = [
@@ -3680,12 +3469,11 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
3680
3469
  const dsep = computed(() => 1.23.toLocaleString(translator.locale)[1]);
3681
3470
  const _string = ref(_formatNumber(_number.value));
3682
3471
  function _onBeforeinput(event) {
3683
- var _a;
3684
3472
  const element = event.target;
3685
3473
  if (event.inputType !== "insertText") return;
3686
3474
  if (
3687
3475
  // have we typed only digits???
3688
- ((_a = event.data) == null ? void 0 : _a.match(/^\d+$/)) || // have we typed the only decimal separator???
3476
+ event.data?.match(/^\d+$/) || // have we typed the only decimal separator???
3689
3477
  event.data === dsep.value && element.value.indexOf(dsep.value) < 0 || // have we typed a negation sign (at the beginning of the input)???
3690
3478
  event.data === "-" && element.value[0] !== "-" && element.selectionStart === 0
3691
3479
  ) return;
@@ -3700,21 +3488,17 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
3700
3488
  return event.preventDefault();
3701
3489
  }
3702
3490
  function _formatNumber(number) {
3703
- var _a;
3704
3491
  if (number === null) return "";
3705
3492
  return number.toLocaleString(translator.locale, {
3706
3493
  maximumFractionDigits: 20,
3707
- useGrouping: !((_a = _ztext.value) == null ? void 0 : _a.hasFocus)
3494
+ useGrouping: !_ztext.value?.hasFocus
3708
3495
  });
3709
3496
  }
3710
3497
  function _parseNumber(string) {
3711
3498
  string = string.replaceAll(tsep.value, "").replaceAll(dsep.value, ".").replaceAll(/[^-.\d]/g, "");
3712
3499
  return string === "" ? null : string === "-" ? null : parseFloat(string) || 0;
3713
3500
  }
3714
- watch([() => {
3715
- var _a;
3716
- return (_a = _ztext.value) == null ? void 0 : _a.hasFocus;
3717
- }, () => translator.locale], () => {
3501
+ watch([() => _ztext.value?.hasFocus, () => translator.locale], () => {
3718
3502
  _string.value = _formatNumber(_number.value);
3719
3503
  });
3720
3504
  watch(_number, (number) => {
@@ -3834,40 +3618,24 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
3834
3618
  const _slots = useSlots();
3835
3619
  __expose({
3836
3620
  /** Focus on this control */
3837
- focus: () => {
3838
- var _a;
3839
- return (_a = _znumber.value) == null ? void 0 : _a.focus();
3840
- },
3621
+ focus: () => _znumber.value?.focus(),
3841
3622
  /** Reset validation for this field */
3842
- resetValidation: () => {
3843
- var _a;
3844
- return (_a = _znumber.value) == null ? void 0 : _a.resetValidation();
3845
- },
3623
+ resetValidation: () => _znumber.value?.resetValidation(),
3846
3624
  /** Force validation of this field */
3847
- validate: () => {
3848
- var _a;
3849
- return ((_a = _znumber.value) == null ? void 0 : _a.validate()) || false;
3850
- },
3625
+ validate: () => _znumber.value?.validate() || false,
3851
3626
  /** If the field has validation errors or not */
3852
- hasError: computed(() => {
3853
- var _a;
3854
- return ((_a = _znumber.value) == null ? void 0 : _a.hasError) || false;
3855
- })
3627
+ hasError: computed(() => _znumber.value?.hasError || false)
3856
3628
  });
3857
3629
  onMounted(() => {
3858
3630
  if (!_znumber.value) throw new Error("No ZNullableNumber ref");
3859
- nextTick(() => {
3860
- var _a;
3861
- return (_a = _znumber.value) == null ? void 0 : _a.resetValidation();
3862
- });
3631
+ nextTick(() => _znumber.value?.resetValidation());
3863
3632
  });
3864
3633
  return (_ctx, _cache) => {
3865
- var _a;
3866
3634
  return openBlock(), createBlock(_sfc_main$g, mergeProps({
3867
3635
  ref_key: "_znumber",
3868
3636
  ref: _znumber
3869
3637
  }, { ..._ctx.$attrs, required: false, validateNull: true }, {
3870
- "model-value": ((_a = _znumber.value) == null ? void 0 : _a.isEditable) ? _number.value || null : _number.value,
3638
+ "model-value": _znumber.value?.isEditable ? _number.value || null : _number.value,
3871
3639
  mode: __props.mode,
3872
3640
  label: __props.label,
3873
3641
  placeholder: `0${__props.suffix}`,
@@ -3963,25 +3731,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3963
3731
  const _visible = ref(false);
3964
3732
  __expose({
3965
3733
  /** Focus on this control */
3966
- focus: () => {
3967
- var _a;
3968
- return (_a = _ztext.value) == null ? void 0 : _a.focus();
3969
- },
3734
+ focus: () => _ztext.value?.focus(),
3970
3735
  /** Reset validation for this field */
3971
- resetValidation: () => {
3972
- var _a;
3973
- return (_a = _ztext.value) == null ? void 0 : _a.resetValidation();
3974
- },
3736
+ resetValidation: () => _ztext.value?.resetValidation(),
3975
3737
  /** Force validation of this field */
3976
- validate: () => {
3977
- var _a;
3978
- return ((_a = _ztext.value) == null ? void 0 : _a.validate()) || false;
3979
- },
3738
+ validate: () => _ztext.value?.validate() || false,
3980
3739
  /** If the field has validation errors or not */
3981
- hasError: computed(() => {
3982
- var _a;
3983
- return ((_a = _ztext.value) == null ? void 0 : _a.hasError) || false;
3984
- })
3740
+ hasError: computed(() => _ztext.value?.hasError || false)
3985
3741
  });
3986
3742
  onMounted(() => {
3987
3743
  if (!_ztext.value) throw new Error("No ZText ref");
@@ -4102,52 +3858,27 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4102
3858
  emit("show");
4103
3859
  }
4104
3860
  function onHide() {
4105
- var _a;
4106
3861
  emit("hide");
4107
- (_a = _ztext.value) == null ? void 0 : _a.validate();
3862
+ _ztext.value?.validate();
4108
3863
  }
4109
3864
  watch(() => _props.value, () => {
4110
- nextTick(() => {
4111
- var _a;
4112
- return (_a = _ztext.value) == null ? void 0 : _a.validate();
4113
- });
3865
+ nextTick(() => _ztext.value?.validate());
4114
3866
  });
4115
3867
  __expose({
4116
3868
  /** Reset validation for this field */
4117
- resetValidation: () => {
4118
- var _a;
4119
- return (_a = _ztext.value) == null ? void 0 : _a.resetValidation();
4120
- },
3869
+ resetValidation: () => _ztext.value?.resetValidation(),
4121
3870
  /** Force validation of this field */
4122
- validate: () => {
4123
- var _a;
4124
- return ((_a = _ztext.value) == null ? void 0 : _a.validate()) || false;
4125
- },
3871
+ validate: () => _ztext.value?.validate() || false,
4126
3872
  /** If the field has validation errors or not */
4127
- hasError: computed(() => {
4128
- var _a;
4129
- return ((_a = _ztext.value) == null ? void 0 : _a.hasError) || false;
4130
- }),
3873
+ hasError: computed(() => _ztext.value?.hasError || false),
4131
3874
  /** Show the picker dialog */
4132
- show: () => {
4133
- var _a;
4134
- return (_a = _zdialog.value) == null ? void 0 : _a.show();
4135
- },
3875
+ show: () => _zdialog.value?.show(),
4136
3876
  /** Hide the picker dialog, confirming it with a value */
4137
- confirm: (value) => {
4138
- var _a;
4139
- return (_a = _zdialog.value) == null ? void 0 : _a.confirm(value);
4140
- },
3877
+ confirm: (value) => _zdialog.value?.confirm(value),
4141
3878
  /** Hide the picker dialog, cancelling it without a value */
4142
- cancel: () => {
4143
- var _a;
4144
- return (_a = _zdialog.value) == null ? void 0 : _a.cancel();
4145
- },
3879
+ cancel: () => _zdialog.value?.cancel(),
4146
3880
  /** Hide the picker dialog */
4147
- shake: () => {
4148
- var _a;
4149
- return (_a = _zdialog.value) == null ? void 0 : _a.shake();
4150
- }
3881
+ shake: () => _zdialog.value?.shake()
4151
3882
  });
4152
3883
  onMounted(() => {
4153
3884
  if (!_ztext.value) throw new Error("No ZText ref");
@@ -4171,14 +3902,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4171
3902
  readonly: _ctx.readonly,
4172
3903
  required: __props.required,
4173
3904
  "on-clear": __props.onClear,
4174
- onClick: _cache[1] || (_cache[1] = ($event) => {
4175
- var _a;
4176
- return (_a = _zdialog.value) == null ? void 0 : _a.show();
4177
- }),
4178
- onClickIcon: _cache[2] || (_cache[2] = ($event) => {
4179
- var _a;
4180
- return (_a = _zdialog.value) == null ? void 0 : _a.show();
4181
- })
3905
+ onClick: _cache[1] || (_cache[1] = ($event) => _zdialog.value?.show()),
3906
+ onClickIcon: _cache[2] || (_cache[2] = ($event) => _zdialog.value?.show())
4182
3907
  }), {
4183
3908
  append: withCtx((formProps2) => [
4184
3909
  createVNode(ZDialog, {
@@ -4324,10 +4049,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
4324
4049
  const _value = useModel(__props, "modelValue");
4325
4050
  __expose({
4326
4051
  /** Focus on this control */
4327
- focus: () => {
4328
- var _a;
4329
- return (_a = _qselect.value) == null ? void 0 : _a.focus();
4330
- }
4052
+ focus: () => _qselect.value?.focus()
4331
4053
  });
4332
4054
  const _options = shallowRef([]);
4333
4055
  const _tags = ref([]);
@@ -4364,16 +4086,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
4364
4086
  const options = _tags.value.filter((val) => val.indexOf(needle) >= 0).filter((val) => _value.value.indexOf(val) < 0);
4365
4087
  _options.value = Object.freeze(options);
4366
4088
  }, (select) => {
4367
- var _a;
4368
- if (text && ((_a = select.options) == null ? void 0 : _a.length)) {
4089
+ if (text && select.options?.length) {
4369
4090
  select.setOptionIndex(-1);
4370
4091
  select.moveOptionSelection(1, false);
4371
4092
  }
4372
4093
  });
4373
4094
  }
4374
4095
  function _add(_) {
4375
- var _a;
4376
- (_a = _qselect.value) == null ? void 0 : _a.updateInputValue("");
4096
+ _qselect.value?.updateInputValue("");
4377
4097
  }
4378
4098
  onMounted(() => {
4379
4099
  if (!_qselect.value) throw new Error("No QSelect ref");
@@ -4877,32 +4597,19 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
4877
4597
  return true;
4878
4598
  }];
4879
4599
  function _onBeforeinput(event) {
4880
- var _a;
4881
4600
  if (event.inputType !== "insertText") return;
4882
- if ((_a = event.data) == null ? void 0 : _a.match(/^[0-9+ ]$/)) return;
4601
+ if (event.data?.match(/^[0-9+ ]$/)) return;
4883
4602
  event.preventDefault();
4884
4603
  }
4885
4604
  __expose({
4886
4605
  /** Focus on this control */
4887
- focus: () => {
4888
- var _a;
4889
- return (_a = _ztext.value) == null ? void 0 : _a.focus();
4890
- },
4606
+ focus: () => _ztext.value?.focus(),
4891
4607
  /** Reset validation for this field */
4892
- resetValidation: () => {
4893
- var _a;
4894
- return (_a = _ztext.value) == null ? void 0 : _a.resetValidation();
4895
- },
4608
+ resetValidation: () => _ztext.value?.resetValidation(),
4896
4609
  /** Force validation of this field */
4897
- validate: () => {
4898
- var _a;
4899
- return ((_a = _ztext.value) == null ? void 0 : _a.validate()) || false;
4900
- },
4610
+ validate: () => _ztext.value?.validate() || false,
4901
4611
  /** If the field has validation errors or not */
4902
- hasError: computed(() => {
4903
- var _a;
4904
- return ((_a = _ztext.value) == null ? void 0 : _a.hasError) || false;
4905
- })
4612
+ hasError: computed(() => _ztext.value?.hasError || false)
4906
4613
  });
4907
4614
  onMounted(() => {
4908
4615
  if (!_ztext.value) throw new Error("No ZText ref");
@@ -5030,17 +4737,13 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
5030
4737
  const _backup = structuredClone(toRaw(_props.value));
5031
4738
  const _form = ref();
5032
4739
  const _modified = computed(() => !is.deepEqual(_props.value, _backup));
5033
- const _submittable = computed(() => {
5034
- var _a;
5035
- return _modified.value && ((_a = _form.value) == null ? void 0 : _a.isReady);
5036
- });
4740
+ const _submittable = computed(() => _modified.value && _form.value?.isReady);
5037
4741
  function _cancel() {
5038
4742
  _emit("cancel");
5039
4743
  }
5040
4744
  async function _submit() {
5041
- var _a;
5042
4745
  if (!_submittable.value) return;
5043
- const valid = await ((_a = _form.value) == null ? void 0 : _a.validate());
4746
+ const valid = await _form.value?.validate();
5044
4747
  if (valid) _emit("save");
5045
4748
  }
5046
4749
  return (_ctx, _cache) => {
@@ -5350,10 +5053,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5350
5053
  let _backup = void 0;
5351
5054
  const _form = ref();
5352
5055
  const _modified = computed(() => _editing.value && !is.deepEqual(_value.value, _backup));
5353
- const _ready = computed(() => {
5354
- var _a;
5355
- return (_a = _form.value) == null ? void 0 : _a.isReady;
5356
- });
5056
+ const _ready = computed(() => _form.value?.isReady);
5357
5057
  const _submittable = computed(() => _modified.value && _ready);
5358
5058
  const _showData = ref(false);
5359
5059
  const _showJson = ref(false);
@@ -5377,33 +5077,27 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
5377
5077
  });
5378
5078
  }
5379
5079
  async function _submit() {
5380
- var _a;
5381
5080
  if (!_props.onSave) return;
5382
5081
  if (!_submittable.value) return;
5383
- const valid = await ((_a = _form.value) == null ? void 0 : _a.validate());
5082
+ const valid = await _form.value?.validate();
5384
5083
  if (valid) _props.onSave();
5385
5084
  }
5386
5085
  async function _delete() {
5387
5086
  if (_value.value.deleted) return;
5388
5087
  await load(async () => {
5389
- var _a;
5390
5088
  const result = await confirmDelete();
5391
- if (result) (_a = _props.onDelete) == null ? void 0 : _a.call(_props);
5089
+ if (result) _props.onDelete?.();
5392
5090
  });
5393
5091
  }
5394
5092
  async function _restore() {
5395
5093
  if (!_value.value.deleted) return;
5396
5094
  await load(async () => {
5397
- var _a;
5398
5095
  const result = await confirmRestore();
5399
- if (result) (_a = _props.onRestore) == null ? void 0 : _a.call(_props);
5096
+ if (result) _props.onRestore?.();
5400
5097
  });
5401
5098
  }
5402
5099
  __expose({
5403
- validate: async () => {
5404
- var _a;
5405
- return await ((_a = _form.value) == null ? void 0 : _a.validate()) || false;
5406
- },
5100
+ validate: async () => await _form.value?.validate() || false,
5407
5101
  modified: _modified,
5408
5102
  submittable: _submittable,
5409
5103
  isReady: _ready
@@ -6432,79 +6126,64 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
6432
6126
  dense: __props.dense
6433
6127
  }, null, 8, ["modelValue", "selection", "borders", "loading", "columns", "slot-data", "dense"])
6434
6128
  ]),
6435
- body: withCtx((scope) => {
6436
- var _a, _b;
6437
- return [
6438
- createVNode(unref(QTr), {
6439
- props: scope,
6440
- style: normalizeStyle((_a = __props.rowStyle) == null ? void 0 : _a.call(__props, scope.row)),
6441
- class: normalizeClass(`
6129
+ body: withCtx((scope) => [
6130
+ createVNode(unref(QTr), {
6131
+ props: scope,
6132
+ style: normalizeStyle(__props.rowStyle?.(scope.row)),
6133
+ class: normalizeClass(`
6442
6134
  ${scope.__trClass}
6443
- ${((_b = __props.rowClass) == null ? void 0 : _b.call(__props, scope.row)) || ""}
6135
+ ${__props.rowClass?.(scope.row) || ""}
6444
6136
  ${_ctx.onRowClick ? "cursor-pointer" : ""}
6445
6137
  `),
6446
- onClick: ($event) => {
6447
- var _a2;
6448
- return (_a2 = _ctx.onRowClick) == null ? void 0 : _a2.call(_ctx, $event, scope.row, scope.rowIndex);
6449
- },
6450
- onDblclick: ($event) => {
6451
- var _a2;
6452
- return (_a2 = _ctx.onRowDblclick) == null ? void 0 : _a2.call(_ctx, $event, scope.row, scope.rowIndex);
6453
- },
6454
- onContextmenu: ($event) => {
6455
- var _a2;
6456
- return (_a2 = _ctx.onRowContextmenu) == null ? void 0 : _a2.call(_ctx, $event, scope.row, scope.rowIndex);
6457
- }
6458
- }, {
6459
- default: withCtx(() => {
6460
- var _a2;
6461
- return [
6462
- (openBlock(true), createElementBlock(Fragment, null, renderList([(_a2 = __props.rowLink) == null ? void 0 : _a2.call(__props, scope.row)], (link) => {
6463
- return openBlock(), createElementBlock(Fragment, { key: link }, [
6464
- scope.selected !== void 0 ? (openBlock(), createBlock(unref(QTd), {
6465
- key: 0,
6466
- class: "text-center shrink"
6467
- }, {
6468
- default: withCtx(() => [
6469
- createVNode(unref(QCheckbox), {
6470
- modelValue: scope.selected,
6471
- "onUpdate:modelValue": ($event) => scope.selected = $event,
6472
- dense: "",
6473
- size: __props.dense ? "xs" : void 0
6474
- }, null, 8, ["modelValue", "onUpdate:modelValue", "size"])
6475
- ]),
6476
- _: 2
6477
- }, 1024)) : createCommentVNode("", true),
6478
- (openBlock(true), createElementBlock(Fragment, null, renderList(scope.cols, (col) => {
6479
- return openBlock(), createBlock(unref(QTd), {
6480
- key: col.name,
6481
- props: scope
6482
- }, {
6138
+ onClick: ($event) => _ctx.onRowClick?.($event, scope.row, scope.rowIndex),
6139
+ onDblclick: ($event) => _ctx.onRowDblclick?.($event, scope.row, scope.rowIndex),
6140
+ onContextmenu: ($event) => _ctx.onRowContextmenu?.($event, scope.row, scope.rowIndex)
6141
+ }, {
6142
+ default: withCtx(() => [
6143
+ (openBlock(true), createElementBlock(Fragment, null, renderList([__props.rowLink?.(scope.row)], (link) => {
6144
+ return openBlock(), createElementBlock(Fragment, { key: link }, [
6145
+ scope.selected !== void 0 ? (openBlock(), createBlock(unref(QTd), {
6146
+ key: 0,
6147
+ class: "text-center shrink"
6148
+ }, {
6149
+ default: withCtx(() => [
6150
+ createVNode(unref(QCheckbox), {
6151
+ modelValue: scope.selected,
6152
+ "onUpdate:modelValue": ($event) => scope.selected = $event,
6153
+ dense: "",
6154
+ size: __props.dense ? "xs" : void 0
6155
+ }, null, 8, ["modelValue", "onUpdate:modelValue", "size"])
6156
+ ]),
6157
+ _: 2
6158
+ }, 1024)) : createCommentVNode("", true),
6159
+ (openBlock(true), createElementBlock(Fragment, null, renderList(scope.cols, (col) => {
6160
+ return openBlock(), createBlock(unref(QTd), {
6161
+ key: col.name,
6162
+ props: scope
6163
+ }, {
6164
+ default: withCtx(() => [
6165
+ createVNode(unref(TableLink), { to: link }, {
6483
6166
  default: withCtx(() => [
6484
- createVNode(unref(TableLink), { to: link }, {
6485
- default: withCtx(() => [
6486
- slots[`data-${col.name}`] ? (openBlock(), createElementBlock("div", _hoisted_4, [
6487
- renderSlot(_ctx.$slots, `data-${col.name}`, {
6488
- index: scope.rowIndex,
6489
- row: scope.row,
6490
- value: col.value
6491
- }, void 0, true)
6492
- ])) : (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(col.value), 1))
6493
- ]),
6494
- _: 2
6495
- }, 1032, ["to"])
6167
+ slots[`data-${col.name}`] ? (openBlock(), createElementBlock("div", _hoisted_4, [
6168
+ renderSlot(_ctx.$slots, `data-${col.name}`, {
6169
+ index: scope.rowIndex,
6170
+ row: scope.row,
6171
+ value: col.value
6172
+ }, void 0, true)
6173
+ ])) : (openBlock(), createElementBlock("div", _hoisted_5, toDisplayString(col.value), 1))
6496
6174
  ]),
6497
6175
  _: 2
6498
- }, 1032, ["props"]);
6499
- }), 128))
6500
- ], 64);
6176
+ }, 1032, ["to"])
6177
+ ]),
6178
+ _: 2
6179
+ }, 1032, ["props"]);
6501
6180
  }), 128))
6502
- ];
6503
- }),
6504
- _: 2
6505
- }, 1032, ["props", "style", "class", "onClick", "onDblclick", "onContextmenu"])
6506
- ];
6507
- }),
6181
+ ], 64);
6182
+ }), 128))
6183
+ ]),
6184
+ _: 2
6185
+ }, 1032, ["props", "style", "class", "onClick", "onDblclick", "onContextmenu"])
6186
+ ]),
6508
6187
  "no-data": withCtx(() => [
6509
6188
  __props.loading ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
6510
6189
  createVNode(unref(QSpinner), {