quasar 2.12.7 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/dist/api/QField.json +0 -3
  2. package/dist/api/QSelect.json +1 -1
  3. package/dist/api/QTable.json +54 -1
  4. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  5. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  6. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  7. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  8. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  9. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  10. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  11. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  12. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  13. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  14. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  15. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  16. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  17. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  18. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  19. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  20. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  21. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  22. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  23. package/dist/icon-set/mdi-v7.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +2 -2
  33. package/dist/icon-set/svg-material-icons-round.umd.prod.js +2 -2
  34. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +2 -2
  35. package/dist/icon-set/svg-material-icons.umd.prod.js +2 -2
  36. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +2 -2
  37. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +2 -2
  38. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +2 -2
  39. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-mdi-v7.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  42. package/dist/icon-set/themify.umd.prod.js +1 -1
  43. package/dist/lang/ar-TN.umd.prod.js +1 -1
  44. package/dist/lang/ar.umd.prod.js +1 -1
  45. package/dist/lang/az-Latn.umd.prod.js +1 -1
  46. package/dist/lang/bg.umd.prod.js +1 -1
  47. package/dist/lang/bn.umd.prod.js +1 -1
  48. package/dist/lang/ca.umd.prod.js +1 -1
  49. package/dist/lang/cs.umd.prod.js +1 -1
  50. package/dist/lang/da.umd.prod.js +1 -1
  51. package/dist/lang/de-CH.umd.prod.js +6 -0
  52. package/dist/lang/de-DE.umd.prod.js +6 -0
  53. package/dist/lang/de.umd.prod.js +1 -1
  54. package/dist/lang/el.umd.prod.js +1 -1
  55. package/dist/lang/en-GB.umd.prod.js +1 -1
  56. package/dist/lang/en-US.umd.prod.js +1 -1
  57. package/dist/lang/eo.umd.prod.js +1 -1
  58. package/dist/lang/es.umd.prod.js +1 -1
  59. package/dist/lang/et.umd.prod.js +1 -1
  60. package/dist/lang/eu.umd.prod.js +1 -1
  61. package/dist/lang/fa-IR.umd.prod.js +1 -1
  62. package/dist/lang/fa.umd.prod.js +1 -1
  63. package/dist/lang/fi.umd.prod.js +1 -1
  64. package/dist/lang/fr.umd.prod.js +1 -1
  65. package/dist/lang/gn.umd.prod.js +1 -1
  66. package/dist/lang/he.umd.prod.js +1 -1
  67. package/dist/lang/hi.umd.prod.js +1 -1
  68. package/dist/lang/hr.umd.prod.js +1 -1
  69. package/dist/lang/hu.umd.prod.js +1 -1
  70. package/dist/lang/id.umd.prod.js +1 -1
  71. package/dist/lang/is.umd.prod.js +1 -1
  72. package/dist/lang/it.umd.prod.js +1 -1
  73. package/dist/lang/ja.umd.prod.js +1 -1
  74. package/dist/lang/kk.umd.prod.js +1 -1
  75. package/dist/lang/km.umd.prod.js +1 -1
  76. package/dist/lang/ko-KR.umd.prod.js +1 -1
  77. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  78. package/dist/lang/lt.umd.prod.js +1 -1
  79. package/dist/lang/lu.umd.prod.js +1 -1
  80. package/dist/lang/lv.umd.prod.js +1 -1
  81. package/dist/lang/mk.umd.prod.js +1 -1
  82. package/dist/lang/ml.umd.prod.js +1 -1
  83. package/dist/lang/mm.umd.prod.js +1 -1
  84. package/dist/lang/ms.umd.prod.js +1 -1
  85. package/dist/lang/my.umd.prod.js +1 -1
  86. package/dist/lang/nb-NO.umd.prod.js +1 -1
  87. package/dist/lang/nl.umd.prod.js +1 -1
  88. package/dist/lang/pl.umd.prod.js +1 -1
  89. package/dist/lang/pt-BR.umd.prod.js +1 -1
  90. package/dist/lang/pt.umd.prod.js +1 -1
  91. package/dist/lang/ro.umd.prod.js +1 -1
  92. package/dist/lang/ru.umd.prod.js +1 -1
  93. package/dist/lang/sk.umd.prod.js +1 -1
  94. package/dist/lang/sl.umd.prod.js +1 -1
  95. package/dist/lang/sm.umd.prod.js +1 -1
  96. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  97. package/dist/lang/sr.umd.prod.js +1 -1
  98. package/dist/lang/sv.umd.prod.js +1 -1
  99. package/dist/lang/ta.umd.prod.js +1 -1
  100. package/dist/lang/th.umd.prod.js +1 -1
  101. package/dist/lang/tr.umd.prod.js +1 -1
  102. package/dist/lang/ug.umd.prod.js +1 -1
  103. package/dist/lang/uk.umd.prod.js +1 -1
  104. package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
  105. package/dist/lang/uz-Latn.umd.prod.js +1 -1
  106. package/dist/lang/vi.umd.prod.js +1 -1
  107. package/dist/lang/zh-CN.umd.prod.js +1 -1
  108. package/dist/lang/zh-TW.umd.prod.js +1 -1
  109. package/dist/quasar.addon.prod.css +1 -1
  110. package/dist/quasar.addon.rtl.prod.css +1 -1
  111. package/dist/quasar.cjs.prod.js +2 -2
  112. package/dist/quasar.esm.js +96 -28
  113. package/dist/quasar.esm.prod.js +2 -2
  114. package/dist/quasar.prod.css +1 -1
  115. package/dist/quasar.rtl.prod.css +1 -1
  116. package/dist/quasar.sass +1 -1
  117. package/dist/quasar.umd.js +96 -28
  118. package/dist/quasar.umd.prod.js +2 -2
  119. package/dist/types/index.d.ts +13 -3
  120. package/dist/vetur/quasar-attributes.json +1 -1
  121. package/dist/web-types/web-types.json +2 -6
  122. package/lang/de-CH.js +98 -0
  123. package/lang/de-CH.mjs +93 -0
  124. package/lang/de-DE.js +98 -0
  125. package/lang/de-DE.mjs +93 -0
  126. package/lang/index.json +8 -0
  127. package/package.json +4 -3
  128. package/src/components/field/__tests__/QField.cy.js +156 -0
  129. package/src/components/input/use-mask.js +6 -1
  130. package/src/components/scroll-area/QScrollArea.js +16 -1
  131. package/src/components/select/QSelect.js +42 -17
  132. package/src/components/select/QSelect.json +1 -1
  133. package/src/components/select/__tests__/QSelect.cy.js +2 -1
  134. package/src/components/table/QTable.json +38 -1
  135. package/src/components/table/table-sort.js +5 -0
  136. package/src/components/time/QTime.js +16 -3
  137. package/src/components/tree/QTree.js +8 -3
  138. package/src/composables/private/__tests__/FieldWrapper.vue +17 -2
  139. package/src/composables/private/__tests__/use-field.cy.js +334 -137
  140. package/src/composables/private/__tests__/use-validate.cy.js +162 -15
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.12.7
2
+ * Quasar Framework v2.13.0
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -1651,7 +1651,7 @@ function prepareApp (app, uiOpts, pluginOpts) {
1651
1651
  }
1652
1652
 
1653
1653
  var installQuasar = function (parentApp, opts = {}) {
1654
- const $q = { version: '2.12.7' };
1654
+ const $q = { version: '2.13.0' };
1655
1655
 
1656
1656
  if (globalConfigIsFrozen === false) {
1657
1657
  if (opts.config !== void 0) {
@@ -21619,7 +21619,12 @@ function useMask (props, emit, emitValue, inputRef) {
21619
21619
  ? unmaskValue(masked)
21620
21620
  : masked;
21621
21621
 
21622
- String(props.modelValue) !== val && emitValue(val, true);
21622
+ if (
21623
+ String(props.modelValue) !== val
21624
+ && (props.modelValue !== null || val !== '')
21625
+ ) {
21626
+ emitValue(val, true);
21627
+ }
21623
21628
  }
21624
21629
 
21625
21630
  function moveCursorForPaste (inp, start, end) {
@@ -26300,11 +26305,26 @@ var QScrollArea = createComponent({
26300
26305
  targetRef.value[ dirProps[ axis ].scroll ] = offset;
26301
26306
  }
26302
26307
 
26308
+ let mouseEventTimer = null;
26309
+
26303
26310
  function onMouseenter () {
26304
- hover.value = true;
26311
+ if (mouseEventTimer !== null) {
26312
+ clearTimeout(mouseEventTimer);
26313
+ }
26314
+
26315
+ // setTimeout needed for iOS; see ticket #16210
26316
+ mouseEventTimer = setTimeout(() => {
26317
+ mouseEventTimer = null;
26318
+ hover.value = true;
26319
+ }, proxy.$q.platform.is.ios ? 50 : 0);
26305
26320
  }
26306
26321
 
26307
26322
  function onMouseleave () {
26323
+ if (mouseEventTimer !== null) {
26324
+ clearTimeout(mouseEventTimer);
26325
+ mouseEventTimer = null;
26326
+ }
26327
+
26308
26328
  hover.value = false;
26309
26329
  }
26310
26330
 
@@ -27298,7 +27318,8 @@ var QSelect = createComponent({
27298
27318
  const dialogFieldFocused = ref(false);
27299
27319
  const innerLoadingIndicator = ref(false);
27300
27320
 
27301
- let inputTimer = null, innerValueCache,
27321
+ let filterTimer = null, inputValueTimer = null,
27322
+ innerValueCache,
27302
27323
  hasDialog, userInputValue, filterId = null, defaultInputValue,
27303
27324
  transitionShowComputed, searchBuffer, searchBufferExp;
27304
27325
 
@@ -27743,9 +27764,11 @@ var QSelect = createComponent({
27743
27764
  scrollTo(index);
27744
27765
 
27745
27766
  if (skipInputValue !== true && props.useInput === true && props.fillInput === true) {
27746
- setInputValue(index >= 0
27747
- ? getOptionLabel.value(props.options[ index ])
27748
- : defaultInputValue
27767
+ setInputValue(
27768
+ index >= 0
27769
+ ? getOptionLabel.value(props.options[ index ])
27770
+ : defaultInputValue,
27771
+ true
27749
27772
  );
27750
27773
  }
27751
27774
  }
@@ -27806,9 +27829,13 @@ var QSelect = createComponent({
27806
27829
 
27807
27830
  e.target.value = '';
27808
27831
 
27809
- if (inputTimer !== null) {
27810
- clearTimeout(inputTimer);
27811
- inputTimer = null;
27832
+ if (filterTimer !== null) {
27833
+ clearTimeout(filterTimer);
27834
+ filterTimer = null;
27835
+ }
27836
+ if (inputValueTimer !== null) {
27837
+ clearTimeout(inputValueTimer);
27838
+ inputValueTimer = null;
27812
27839
  }
27813
27840
 
27814
27841
  resetInputValue();
@@ -27899,6 +27926,10 @@ var QSelect = createComponent({
27899
27926
  // backspace
27900
27927
  if (
27901
27928
  e.keyCode === 8
27929
+ && (
27930
+ props.useChips === true
27931
+ || props.clearable === true
27932
+ )
27902
27933
  && props.hideSelected !== true
27903
27934
  && inputValue.value.length === 0
27904
27935
  ) {
@@ -27993,7 +28024,7 @@ var QSelect = createComponent({
27993
28024
  scrollTo(index);
27994
28025
 
27995
28026
  if (index >= 0 && props.useInput === true && props.fillInput === true) {
27996
- setInputValue(getOptionLabel.value(props.options[ index ]));
28027
+ setInputValue(getOptionLabel.value(props.options[ index ]), true);
27997
28028
  }
27998
28029
  });
27999
28030
  }
@@ -28179,9 +28210,13 @@ var QSelect = createComponent({
28179
28210
  }
28180
28211
 
28181
28212
  function onInput (e) {
28182
- if (inputTimer !== null) {
28183
- clearTimeout(inputTimer);
28184
- inputTimer = null;
28213
+ if (filterTimer !== null) {
28214
+ clearTimeout(filterTimer);
28215
+ filterTimer = null;
28216
+ }
28217
+ if (inputValueTimer !== null) {
28218
+ clearTimeout(inputValueTimer);
28219
+ inputValueTimer = null;
28185
28220
  }
28186
28221
 
28187
28222
  if (e && e.target && e.target.qComposing === true) {
@@ -28202,17 +28237,26 @@ var QSelect = createComponent({
28202
28237
  }
28203
28238
 
28204
28239
  if (props.onFilter !== void 0) {
28205
- inputTimer = setTimeout(() => {
28206
- inputTimer = null;
28240
+ filterTimer = setTimeout(() => {
28241
+ filterTimer = null;
28207
28242
  filter(inputValue.value);
28208
28243
  }, props.inputDebounce);
28209
28244
  }
28210
28245
  }
28211
28246
 
28212
- function setInputValue (val) {
28247
+ function setInputValue (val, emitImmediately) {
28213
28248
  if (inputValue.value !== val) {
28214
28249
  inputValue.value = val;
28215
- emit('inputValue', val);
28250
+
28251
+ if (emitImmediately === true || props.inputDebounce === 0 || props.inputDebounce === '0') {
28252
+ emit('inputValue', val);
28253
+ }
28254
+ else {
28255
+ inputValueTimer = setTimeout(() => {
28256
+ inputValueTimer = null;
28257
+ emit('inputValue', val);
28258
+ }, props.inputDebounce);
28259
+ }
28216
28260
  }
28217
28261
  }
28218
28262
 
@@ -28220,7 +28264,7 @@ var QSelect = createComponent({
28220
28264
  userInputValue = internal !== true;
28221
28265
 
28222
28266
  if (props.useInput === true) {
28223
- setInputValue(val);
28267
+ setInputValue(val, true);
28224
28268
 
28225
28269
  if (noFiltering === true || internal !== true) {
28226
28270
  defaultInputValue = val;
@@ -28573,7 +28617,8 @@ var QSelect = createComponent({
28573
28617
  updatePreState();
28574
28618
 
28575
28619
  onBeforeUnmount(() => {
28576
- inputTimer !== null && clearTimeout(inputTimer);
28620
+ filterTimer !== null && clearTimeout(filterTimer);
28621
+ inputValueTimer !== null && clearTimeout(inputValueTimer);
28577
28622
  });
28578
28623
 
28579
28624
  // expose public methods
@@ -31897,6 +31942,9 @@ function useTableSort (props, computedPagination, colList, setPagination) {
31897
31942
  A = val(a),
31898
31943
  B = val(b);
31899
31944
 
31945
+ if (col.rawSort !== void 0) {
31946
+ return col.rawSort(A, B, a, b) * dir
31947
+ }
31900
31948
  if (A === null || A === void 0) {
31901
31949
  return -1 * dir
31902
31950
  }
@@ -31904,6 +31952,8 @@ function useTableSort (props, computedPagination, colList, setPagination) {
31904
31952
  return 1 * dir
31905
31953
  }
31906
31954
  if (col.sort !== void 0) {
31955
+ // gets called without rows that have null/undefined as value
31956
+ // due to the above two statements
31907
31957
  return col.sort(A, B, a, b) * dir
31908
31958
  }
31909
31959
  if (isNumber(A) === true && isNumber(B) === true) {
@@ -34258,23 +34308,36 @@ var QTime = createComponent({
34258
34308
  }
34259
34309
  }
34260
34310
 
34311
+ function goToViewWhenHasModel (newView) {
34312
+ const model = props.modelValue;
34313
+ if (
34314
+ view.value !== newView
34315
+ && model !== void 0
34316
+ && model !== null
34317
+ && model !== ''
34318
+ && typeof model !== 'string'
34319
+ ) {
34320
+ view.value = newView;
34321
+ }
34322
+ }
34323
+
34261
34324
  function verifyAndUpdate () {
34262
34325
  if (hourInSelection.value !== null && hourInSelection.value(innerModel.value.hour) !== true) {
34263
34326
  innerModel.value = __splitDate();
34264
- view.value = 'hour';
34327
+ goToViewWhenHasModel('hour');
34265
34328
  return
34266
34329
  }
34267
34330
 
34268
34331
  if (minuteInSelection.value !== null && minuteInSelection.value(innerModel.value.minute) !== true) {
34269
34332
  innerModel.value.minute = null;
34270
34333
  innerModel.value.second = null;
34271
- view.value = 'minute';
34334
+ goToViewWhenHasModel('minute');
34272
34335
  return
34273
34336
  }
34274
34337
 
34275
34338
  if (props.withSeconds === true && secondInSelection.value !== null && secondInSelection.value(innerModel.value.second) !== true) {
34276
34339
  innerModel.value.second = null;
34277
- view.value = 'second';
34340
+ goToViewWhenHasModel('second');
34278
34341
  return
34279
34342
  }
34280
34343
 
@@ -35160,6 +35223,8 @@ var QTree = createComponent({
35160
35223
  + (m.selected === true ? ' q-tree__node--selected' : '')
35161
35224
  + (m.disabled === true ? ' q-tree__node--disabled' : ''),
35162
35225
  tabindex: m.link === true ? 0 : -1,
35226
+ ariaExpanded: children.length > 0 ? m.expanded : null,
35227
+ role: 'treeitem',
35163
35228
  onClick: (e) => {
35164
35229
  onClick(node, m, e);
35165
35230
  },
@@ -35233,7 +35298,8 @@ var QTree = createComponent({
35233
35298
  body,
35234
35299
  h('div', {
35235
35300
  class: 'q-tree__children'
35236
- + (m.disabled === true ? ' q-tree__node--disabled' : '')
35301
+ + (m.disabled === true ? ' q-tree__node--disabled' : ''),
35302
+ role: 'group'
35237
35303
  }, children)
35238
35304
  ])
35239
35305
  : null
@@ -35251,7 +35317,8 @@ var QTree = createComponent({
35251
35317
  body,
35252
35318
  h('div', {
35253
35319
  class: 'q-tree__children'
35254
- + (m.disabled === true ? ' q-tree__node--disabled' : '')
35320
+ + (m.disabled === true ? ' q-tree__node--disabled' : ''),
35321
+ role: 'group'
35255
35322
  }, children)
35256
35323
  ]),
35257
35324
  [ [ vShow, m.expanded ] ]
@@ -35345,7 +35412,8 @@ var QTree = createComponent({
35345
35412
 
35346
35413
  return h(
35347
35414
  'div', {
35348
- class: classes.value
35415
+ class: classes.value,
35416
+ role: 'tree'
35349
35417
  },
35350
35418
  children.length === 0
35351
35419
  ? (
@@ -40745,7 +40813,7 @@ function runSequentialPromises (
40745
40813
  */
40746
40814
 
40747
40815
  const Quasar = {
40748
- version: '2.12.7',
40816
+ version: '2.13.0',
40749
40817
  install: installQuasar,
40750
40818
  lang: Plugin$8,
40751
40819
  iconSet: Plugin$7