quasar 2.12.6 → 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 (141) 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 +122 -48
  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 +122 -48
  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/slider/use-slider.js +13 -12
  135. package/src/components/table/QTable.json +38 -1
  136. package/src/components/table/table-sort.js +5 -0
  137. package/src/components/time/QTime.js +16 -3
  138. package/src/components/tree/QTree.js +22 -12
  139. package/src/composables/private/__tests__/FieldWrapper.vue +17 -2
  140. package/src/composables/private/__tests__/use-field.cy.js +334 -137
  141. package/src/composables/private/__tests__/use-validate.cy.js +162 -15
package/dist/quasar.sass CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.12.6
2
+ * Quasar Framework v2.13.0
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.12.6
2
+ * Quasar Framework v2.13.0
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -1653,7 +1653,7 @@
1653
1653
  }
1654
1654
 
1655
1655
  var installQuasar = function (parentApp, opts = {}) {
1656
- const $q = { version: '2.12.6' };
1656
+ const $q = { version: '2.13.0' };
1657
1657
 
1658
1658
  if (globalConfigIsFrozen === false) {
1659
1659
  if (opts.config !== void 0) {
@@ -8923,9 +8923,12 @@
8923
8923
  + (props.innerTrackColor !== void 0 ? ` bg-${ props.innerTrackColor }` : '')
8924
8924
  );
8925
8925
  const innerBarStyle = vue.computed(() => {
8926
+ const innerDiff = innerMaxRatio.value - innerMinRatio.value;
8926
8927
  const acc = {
8927
8928
  [ positionProp.value ]: `${ 100 * innerMinRatio.value }%`,
8928
- [ sizeProp.value ]: `${ 100 * (innerMaxRatio.value - innerMinRatio.value) }%`
8929
+ [ sizeProp.value ]: innerDiff === 0
8930
+ ? '2px'
8931
+ : `${ 100 * innerDiff }%`
8929
8932
  };
8930
8933
  if (props.innerTrackImg !== void 0) {
8931
8934
  acc.backgroundImage = `url(${ props.innerTrackImg }) !important`;
@@ -9019,18 +9022,16 @@
9019
9022
  }));
9020
9023
 
9021
9024
  const markerStyle = vue.computed(() => {
9022
- if (innerBarLen.value !== 0) {
9023
- const size = 100 * markerStep.value / innerBarLen.value;
9025
+ const size = innerBarLen.value === 0
9026
+ ? '2px'
9027
+ : 100 * markerStep.value / innerBarLen.value;
9024
9028
 
9025
- return {
9026
- ...innerBarStyle.value,
9027
- backgroundSize: props.vertical === true
9028
- ? `2px ${ size }%`
9029
- : `${ size }% 2px`
9030
- }
9029
+ return {
9030
+ ...innerBarStyle.value,
9031
+ backgroundSize: props.vertical === true
9032
+ ? `2px ${ size }%`
9033
+ : `${ size }% 2px`
9031
9034
  }
9032
-
9033
- return null
9034
9035
  });
9035
9036
 
9036
9037
  function getMarkerList (def) {
@@ -21615,7 +21616,12 @@
21615
21616
  ? unmaskValue(masked)
21616
21617
  : masked;
21617
21618
 
21618
- String(props.modelValue) !== val && emitValue(val, true);
21619
+ if (
21620
+ String(props.modelValue) !== val
21621
+ && (props.modelValue !== null || val !== '')
21622
+ ) {
21623
+ emitValue(val, true);
21624
+ }
21619
21625
  }
21620
21626
 
21621
21627
  function moveCursorForPaste (inp, start, end) {
@@ -26296,11 +26302,26 @@
26296
26302
  targetRef.value[ dirProps[ axis ].scroll ] = offset;
26297
26303
  }
26298
26304
 
26305
+ let mouseEventTimer = null;
26306
+
26299
26307
  function onMouseenter () {
26300
- hover.value = true;
26308
+ if (mouseEventTimer !== null) {
26309
+ clearTimeout(mouseEventTimer);
26310
+ }
26311
+
26312
+ // setTimeout needed for iOS; see ticket #16210
26313
+ mouseEventTimer = setTimeout(() => {
26314
+ mouseEventTimer = null;
26315
+ hover.value = true;
26316
+ }, proxy.$q.platform.is.ios ? 50 : 0);
26301
26317
  }
26302
26318
 
26303
26319
  function onMouseleave () {
26320
+ if (mouseEventTimer !== null) {
26321
+ clearTimeout(mouseEventTimer);
26322
+ mouseEventTimer = null;
26323
+ }
26324
+
26304
26325
  hover.value = false;
26305
26326
  }
26306
26327
 
@@ -27294,7 +27315,8 @@
27294
27315
  const dialogFieldFocused = vue.ref(false);
27295
27316
  const innerLoadingIndicator = vue.ref(false);
27296
27317
 
27297
- let inputTimer = null, innerValueCache,
27318
+ let filterTimer = null, inputValueTimer = null,
27319
+ innerValueCache,
27298
27320
  hasDialog, userInputValue, filterId = null, defaultInputValue,
27299
27321
  transitionShowComputed, searchBuffer, searchBufferExp;
27300
27322
 
@@ -27739,9 +27761,11 @@
27739
27761
  scrollTo(index);
27740
27762
 
27741
27763
  if (skipInputValue !== true && props.useInput === true && props.fillInput === true) {
27742
- setInputValue(index >= 0
27743
- ? getOptionLabel.value(props.options[ index ])
27744
- : defaultInputValue
27764
+ setInputValue(
27765
+ index >= 0
27766
+ ? getOptionLabel.value(props.options[ index ])
27767
+ : defaultInputValue,
27768
+ true
27745
27769
  );
27746
27770
  }
27747
27771
  }
@@ -27802,9 +27826,13 @@
27802
27826
 
27803
27827
  e.target.value = '';
27804
27828
 
27805
- if (inputTimer !== null) {
27806
- clearTimeout(inputTimer);
27807
- inputTimer = null;
27829
+ if (filterTimer !== null) {
27830
+ clearTimeout(filterTimer);
27831
+ filterTimer = null;
27832
+ }
27833
+ if (inputValueTimer !== null) {
27834
+ clearTimeout(inputValueTimer);
27835
+ inputValueTimer = null;
27808
27836
  }
27809
27837
 
27810
27838
  resetInputValue();
@@ -27895,6 +27923,10 @@
27895
27923
  // backspace
27896
27924
  if (
27897
27925
  e.keyCode === 8
27926
+ && (
27927
+ props.useChips === true
27928
+ || props.clearable === true
27929
+ )
27898
27930
  && props.hideSelected !== true
27899
27931
  && inputValue.value.length === 0
27900
27932
  ) {
@@ -27989,7 +28021,7 @@
27989
28021
  scrollTo(index);
27990
28022
 
27991
28023
  if (index >= 0 && props.useInput === true && props.fillInput === true) {
27992
- setInputValue(getOptionLabel.value(props.options[ index ]));
28024
+ setInputValue(getOptionLabel.value(props.options[ index ]), true);
27993
28025
  }
27994
28026
  });
27995
28027
  }
@@ -28175,9 +28207,13 @@
28175
28207
  }
28176
28208
 
28177
28209
  function onInput (e) {
28178
- if (inputTimer !== null) {
28179
- clearTimeout(inputTimer);
28180
- inputTimer = null;
28210
+ if (filterTimer !== null) {
28211
+ clearTimeout(filterTimer);
28212
+ filterTimer = null;
28213
+ }
28214
+ if (inputValueTimer !== null) {
28215
+ clearTimeout(inputValueTimer);
28216
+ inputValueTimer = null;
28181
28217
  }
28182
28218
 
28183
28219
  if (e && e.target && e.target.qComposing === true) {
@@ -28198,17 +28234,26 @@
28198
28234
  }
28199
28235
 
28200
28236
  if (props.onFilter !== void 0) {
28201
- inputTimer = setTimeout(() => {
28202
- inputTimer = null;
28237
+ filterTimer = setTimeout(() => {
28238
+ filterTimer = null;
28203
28239
  filter(inputValue.value);
28204
28240
  }, props.inputDebounce);
28205
28241
  }
28206
28242
  }
28207
28243
 
28208
- function setInputValue (val) {
28244
+ function setInputValue (val, emitImmediately) {
28209
28245
  if (inputValue.value !== val) {
28210
28246
  inputValue.value = val;
28211
- emit('inputValue', val);
28247
+
28248
+ if (emitImmediately === true || props.inputDebounce === 0 || props.inputDebounce === '0') {
28249
+ emit('inputValue', val);
28250
+ }
28251
+ else {
28252
+ inputValueTimer = setTimeout(() => {
28253
+ inputValueTimer = null;
28254
+ emit('inputValue', val);
28255
+ }, props.inputDebounce);
28256
+ }
28212
28257
  }
28213
28258
  }
28214
28259
 
@@ -28216,7 +28261,7 @@
28216
28261
  userInputValue = internal !== true;
28217
28262
 
28218
28263
  if (props.useInput === true) {
28219
- setInputValue(val);
28264
+ setInputValue(val, true);
28220
28265
 
28221
28266
  if (noFiltering === true || internal !== true) {
28222
28267
  defaultInputValue = val;
@@ -28569,7 +28614,8 @@
28569
28614
  updatePreState();
28570
28615
 
28571
28616
  vue.onBeforeUnmount(() => {
28572
- inputTimer !== null && clearTimeout(inputTimer);
28617
+ filterTimer !== null && clearTimeout(filterTimer);
28618
+ inputValueTimer !== null && clearTimeout(inputValueTimer);
28573
28619
  });
28574
28620
 
28575
28621
  // expose public methods
@@ -31893,6 +31939,9 @@
31893
31939
  A = val(a),
31894
31940
  B = val(b);
31895
31941
 
31942
+ if (col.rawSort !== void 0) {
31943
+ return col.rawSort(A, B, a, b) * dir
31944
+ }
31896
31945
  if (A === null || A === void 0) {
31897
31946
  return -1 * dir
31898
31947
  }
@@ -31900,6 +31949,8 @@
31900
31949
  return 1 * dir
31901
31950
  }
31902
31951
  if (col.sort !== void 0) {
31952
+ // gets called without rows that have null/undefined as value
31953
+ // due to the above two statements
31903
31954
  return col.sort(A, B, a, b) * dir
31904
31955
  }
31905
31956
  if (isNumber(A) === true && isNumber(B) === true) {
@@ -34254,23 +34305,36 @@
34254
34305
  }
34255
34306
  }
34256
34307
 
34308
+ function goToViewWhenHasModel (newView) {
34309
+ const model = props.modelValue;
34310
+ if (
34311
+ view.value !== newView
34312
+ && model !== void 0
34313
+ && model !== null
34314
+ && model !== ''
34315
+ && typeof model !== 'string'
34316
+ ) {
34317
+ view.value = newView;
34318
+ }
34319
+ }
34320
+
34257
34321
  function verifyAndUpdate () {
34258
34322
  if (hourInSelection.value !== null && hourInSelection.value(innerModel.value.hour) !== true) {
34259
34323
  innerModel.value = __splitDate();
34260
- view.value = 'hour';
34324
+ goToViewWhenHasModel('hour');
34261
34325
  return
34262
34326
  }
34263
34327
 
34264
34328
  if (minuteInSelection.value !== null && minuteInSelection.value(innerModel.value.minute) !== true) {
34265
34329
  innerModel.value.minute = null;
34266
34330
  innerModel.value.second = null;
34267
- view.value = 'minute';
34331
+ goToViewWhenHasModel('minute');
34268
34332
  return
34269
34333
  }
34270
34334
 
34271
34335
  if (props.withSeconds === true && secondInSelection.value !== null && secondInSelection.value(innerModel.value.second) !== true) {
34272
34336
  innerModel.value.second = null;
34273
- view.value = 'second';
34337
+ goToViewWhenHasModel('second');
34274
34338
  return
34275
34339
  }
34276
34340
 
@@ -35132,6 +35196,7 @@
35132
35196
  let body = node.body
35133
35197
  ? slots[ `body-${ node.body }` ] || slots[ 'default-body' ]
35134
35198
  : slots[ 'default-body' ];
35199
+
35135
35200
  const slotScope = header !== void 0 || body !== void 0
35136
35201
  ? getSlotScope(node, m, key)
35137
35202
  : null;
@@ -35155,6 +35220,8 @@
35155
35220
  + (m.selected === true ? ' q-tree__node--selected' : '')
35156
35221
  + (m.disabled === true ? ' q-tree__node--disabled' : ''),
35157
35222
  tabindex: m.link === true ? 0 : -1,
35223
+ ariaExpanded: children.length > 0 ? m.expanded : null,
35224
+ role: 'treeitem',
35158
35225
  onClick: (e) => {
35159
35226
  onClick(node, m, e);
35160
35227
  },
@@ -35219,16 +35286,21 @@
35219
35286
  isParent === true
35220
35287
  ? (
35221
35288
  props.noTransition === true
35222
- ? vue.h('div', {
35223
- class: 'q-tree__node-collapsible' + textColorClass.value,
35224
- key: `${ key }__q`
35225
- }, [
35226
- body,
35227
- vue.h('div', {
35228
- class: 'q-tree__children'
35229
- + (m.disabled === true ? ' q-tree__node--disabled' : '')
35230
- }, m.expanded ? children : null)
35231
- ])
35289
+ ? (
35290
+ m.expanded === true
35291
+ ? vue.h('div', {
35292
+ class: 'q-tree__node-collapsible' + textColorClass.value,
35293
+ key: `${ key }__q`
35294
+ }, [
35295
+ body,
35296
+ vue.h('div', {
35297
+ class: 'q-tree__children'
35298
+ + (m.disabled === true ? ' q-tree__node--disabled' : ''),
35299
+ role: 'group'
35300
+ }, children)
35301
+ ])
35302
+ : null
35303
+ )
35232
35304
 
35233
35305
  : vue.h(QSlideTransition, {
35234
35306
  duration: props.duration,
@@ -35242,7 +35314,8 @@
35242
35314
  body,
35243
35315
  vue.h('div', {
35244
35316
  class: 'q-tree__children'
35245
- + (m.disabled === true ? ' q-tree__node--disabled' : '')
35317
+ + (m.disabled === true ? ' q-tree__node--disabled' : ''),
35318
+ role: 'group'
35246
35319
  }, children)
35247
35320
  ]),
35248
35321
  [ [ vue.vShow, m.expanded ] ]
@@ -35336,7 +35409,8 @@
35336
35409
 
35337
35410
  return vue.h(
35338
35411
  'div', {
35339
- class: classes.value
35412
+ class: classes.value,
35413
+ role: 'tree'
35340
35414
  },
35341
35415
  children.length === 0
35342
35416
  ? (
@@ -40926,7 +41000,7 @@
40926
41000
  */
40927
41001
 
40928
41002
  var index_umd = {
40929
- version: '2.12.6',
41003
+ version: '2.13.0',
40930
41004
  install (app, opts) {
40931
41005
  installQuasar(app, {
40932
41006
  components,