quasar 2.2.3 → 2.2.4

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 (109) hide show
  1. package/dist/api/QTree.json +6 -0
  2. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  3. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  4. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  5. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  6. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  7. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  8. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  9. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  10. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  11. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  12. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  13. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  14. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  15. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  16. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  17. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  18. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  19. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  20. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  21. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  22. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  23. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  24. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  25. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  26. package/dist/icon-set/svg-mdi-v4.umd.prod.js +1 -1
  27. package/dist/icon-set/svg-mdi-v5.umd.prod.js +1 -1
  28. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  30. package/dist/icon-set/themify.umd.prod.js +1 -1
  31. package/dist/lang/ar.umd.prod.js +1 -1
  32. package/dist/lang/az-Latn.umd.prod.js +1 -1
  33. package/dist/lang/bg.umd.prod.js +1 -1
  34. package/dist/lang/bn.umd.prod.js +1 -1
  35. package/dist/lang/ca.umd.prod.js +1 -1
  36. package/dist/lang/cs.umd.prod.js +1 -1
  37. package/dist/lang/da.umd.prod.js +1 -1
  38. package/dist/lang/de.umd.prod.js +1 -1
  39. package/dist/lang/el.umd.prod.js +1 -1
  40. package/dist/lang/en-GB.umd.prod.js +1 -1
  41. package/dist/lang/en-US.umd.prod.js +1 -1
  42. package/dist/lang/eo.umd.prod.js +1 -1
  43. package/dist/lang/es.umd.prod.js +1 -1
  44. package/dist/lang/et.umd.prod.js +1 -1
  45. package/dist/lang/fa-IR.umd.prod.js +1 -1
  46. package/dist/lang/fa.umd.prod.js +1 -1
  47. package/dist/lang/fi.umd.prod.js +1 -1
  48. package/dist/lang/fr.umd.prod.js +1 -1
  49. package/dist/lang/gn.umd.prod.js +1 -1
  50. package/dist/lang/he.umd.prod.js +1 -1
  51. package/dist/lang/hr.umd.prod.js +1 -1
  52. package/dist/lang/hu.umd.prod.js +1 -1
  53. package/dist/lang/id.umd.prod.js +1 -1
  54. package/dist/lang/is.umd.prod.js +1 -1
  55. package/dist/lang/it.umd.prod.js +1 -1
  56. package/dist/lang/ja.umd.prod.js +1 -1
  57. package/dist/lang/km.umd.prod.js +1 -1
  58. package/dist/lang/ko-KR.umd.prod.js +1 -1
  59. package/dist/lang/kur-CKB.umd.prod.js +1 -1
  60. package/dist/lang/lt.umd.prod.js +1 -1
  61. package/dist/lang/lu.umd.prod.js +1 -1
  62. package/dist/lang/lv.umd.prod.js +1 -1
  63. package/dist/lang/ml.umd.prod.js +1 -1
  64. package/dist/lang/ms.umd.prod.js +1 -1
  65. package/dist/lang/nb-NO.umd.prod.js +1 -1
  66. package/dist/lang/nl.umd.prod.js +1 -1
  67. package/dist/lang/pl.umd.prod.js +1 -1
  68. package/dist/lang/pt-BR.umd.prod.js +1 -1
  69. package/dist/lang/pt.umd.prod.js +1 -1
  70. package/dist/lang/ro.umd.prod.js +1 -1
  71. package/dist/lang/ru.umd.prod.js +1 -1
  72. package/dist/lang/sk.umd.prod.js +1 -1
  73. package/dist/lang/sl.umd.prod.js +1 -1
  74. package/dist/lang/sr-CYR.umd.prod.js +1 -1
  75. package/dist/lang/sr.umd.prod.js +1 -1
  76. package/dist/lang/sv.umd.prod.js +1 -1
  77. package/dist/lang/ta.umd.prod.js +1 -1
  78. package/dist/lang/th.umd.prod.js +1 -1
  79. package/dist/lang/tr.umd.prod.js +1 -1
  80. package/dist/lang/ug.umd.prod.js +1 -1
  81. package/dist/lang/uk.umd.prod.js +1 -1
  82. package/dist/lang/vi.umd.prod.js +1 -1
  83. package/dist/lang/zh-CN.umd.prod.js +1 -1
  84. package/dist/lang/zh-TW.umd.prod.js +1 -1
  85. package/dist/quasar.cjs.prod.js +2 -2
  86. package/dist/quasar.css +51 -2
  87. package/dist/quasar.esm.prod.js +2 -2
  88. package/dist/quasar.prod.css +1 -1
  89. package/dist/quasar.rtl.css +118 -2
  90. package/dist/quasar.rtl.prod.css +1 -1
  91. package/dist/quasar.sass +43 -4
  92. package/dist/quasar.umd.js +39 -41
  93. package/dist/quasar.umd.prod.js +2 -2
  94. package/dist/ssr-directives/Morph.js +1 -1
  95. package/dist/types/index.d.ts +4 -0
  96. package/dist/vetur/quasar-attributes.json +4 -0
  97. package/dist/vetur/quasar-tags.json +1 -0
  98. package/dist/web-types/web-types.json +11 -1
  99. package/package.json +1 -1
  100. package/src/components/select/QSelect.js +8 -18
  101. package/src/components/tabs/QTabs.js +1 -1
  102. package/src/components/time/QTime.js +6 -5
  103. package/src/components/tree/QTree.js +9 -5
  104. package/src/components/tree/QTree.json +5 -0
  105. package/src/components/tree/QTree.sass +52 -4
  106. package/src/components/uploader/uploader-core.js +2 -7
  107. package/src/composables/private/use-file.js +8 -0
  108. package/src/composables/private/use-model-toggle.js +1 -1
  109. package/src/utils/date.js +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Quasar Framework v2.2.3
2
+ * Quasar Framework v2.2.4
3
3
  * (c) 2015-present Razvan Stoenescu
4
4
  * Released under the MIT License.
5
5
  */
@@ -11918,6 +11918,10 @@ export interface QTreeProps {
11918
11918
  * Color name for selected nodes (from the Quasar Color Palette)
11919
11919
  */
11920
11920
  selectedColor?: string | undefined;
11921
+ /**
11922
+ * Dense mode; occupies less space
11923
+ */
11924
+ dense?: boolean | undefined;
11921
11925
  /**
11922
11926
  * Notify the component that the background is a dark color
11923
11927
  */
@@ -5347,6 +5347,10 @@
5347
5347
  "type": "string",
5348
5348
  "description": "Color name for selected nodes (from the Quasar Color Palette)"
5349
5349
  },
5350
+ "q-tree/dense": {
5351
+ "type": "boolean",
5352
+ "description": "Dense mode; occupies less space"
5353
+ },
5350
5354
  "q-tree/dark": {
5351
5355
  "type": "boolean",
5352
5356
  "description": "Notify the component that the background is a dark color"
@@ -1924,6 +1924,7 @@
1924
1924
  "control-color",
1925
1925
  "text-color",
1926
1926
  "selected-color",
1927
+ "dense",
1927
1928
  "dark",
1928
1929
  "icon",
1929
1930
  "tick-strategy",
@@ -2,7 +2,7 @@
2
2
  "$schema": "",
3
3
  "framework": "vue",
4
4
  "name": "quasar",
5
- "version": "2.2.3",
5
+ "version": "2.2.4",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "types-syntax": "typescript",
@@ -17427,6 +17427,16 @@
17427
17427
  "description": "Color name for selected nodes (from the Quasar Color Palette)\n\nExamples:\nprimary\nteal-10",
17428
17428
  "doc-url": "https://v2.quasar.dev/vue-components/tree"
17429
17429
  },
17430
+ {
17431
+ "name": "dense",
17432
+ "value": {
17433
+ "kind": "expression",
17434
+ "type": "boolean"
17435
+ },
17436
+ "description": "Dense mode; occupies less space",
17437
+ "doc-url": "https://v2.quasar.dev/vue-components/tree",
17438
+ "type": "boolean"
17439
+ },
17430
17440
  {
17431
17441
  "name": "dark",
17432
17442
  "value": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "quasar",
3
- "version": "2.2.3",
3
+ "version": "2.2.4",
4
4
  "description": "Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time",
5
5
  "main": "dist/quasar.cjs.prod.js",
6
6
  "module": "dist/quasar.esm.prod.js",
@@ -933,6 +933,12 @@ export default createComponent({
933
933
  }
934
934
 
935
935
  function getAllOptions () {
936
+ if (noOptions.value === true) {
937
+ return slots[ 'no-option' ] !== void 0
938
+ ? slots[ 'no-option' ]({ inputValue: inputValue.value })
939
+ : void 0
940
+ }
941
+
936
942
  const fn = slots.option !== void 0
937
943
  ? slots.option
938
944
  : scope => {
@@ -1114,14 +1120,6 @@ export default createComponent({
1114
1120
  }
1115
1121
 
1116
1122
  function getMenu () {
1117
- const child = noOptions.value === true
1118
- ? (
1119
- slots[ 'no-option' ] !== void 0
1120
- ? () => slots[ 'no-option' ]({ inputValue: inputValue.value })
1121
- : void 0
1122
- )
1123
- : getAllOptions
1124
-
1125
1123
  return h(QMenu, {
1126
1124
  ref: menuRef,
1127
1125
  class: menuContentClass.value,
@@ -1146,7 +1144,7 @@ export default createComponent({
1146
1144
  onBeforeShow: onControlPopupShow,
1147
1145
  onBeforeHide: onMenuBeforeHide,
1148
1146
  onShow: onMenuShow
1149
- }, child)
1147
+ }, getAllOptions)
1150
1148
  }
1151
1149
 
1152
1150
  function onMenuBeforeHide (e) {
@@ -1203,15 +1201,7 @@ export default createComponent({
1203
1201
  ...listboxAttrs.value,
1204
1202
  onClick: prevent,
1205
1203
  onScrollPassive: onVirtualScrollEvt
1206
- }, (
1207
- noOptions.value === true
1208
- ? (
1209
- slots[ 'no-option' ] !== void 0
1210
- ? slots[ 'no-option' ]({ inputValue: inputValue.value })
1211
- : null
1212
- )
1213
- : getAllOptions()
1214
- ))
1204
+ }, getAllOptions())
1215
1205
  )
1216
1206
 
1217
1207
  return h(QDialog, {
@@ -63,7 +63,7 @@ export default createComponent({
63
63
 
64
64
  contentClass: String,
65
65
 
66
- 'onUpdate:modelValue': Function
66
+ 'onUpdate:modelValue': [ Function, Array ]
67
67
  },
68
68
 
69
69
  setup (props, { slots, emit }) {
@@ -659,21 +659,22 @@ export default createComponent({
659
659
  function setHour (hour) {
660
660
  if (innerModel.value.hour !== hour) {
661
661
  innerModel.value.hour = hour
662
- innerModel.value.minute = null
663
- innerModel.value.second = null
662
+ verifyAndUpdate()
664
663
  }
665
664
  }
666
665
 
667
666
  function setMinute (minute) {
668
667
  if (innerModel.value.minute !== minute) {
669
668
  innerModel.value.minute = minute
670
- innerModel.value.second = null
671
- props.withSeconds !== true && updateValue({ minute })
669
+ verifyAndUpdate()
672
670
  }
673
671
  }
674
672
 
675
673
  function setSecond (second) {
676
- innerModel.value.second !== second && updateValue({ second })
674
+ if (innerModel.value.second !== second) {
675
+ innerModel.value.second = second
676
+ verifyAndUpdate()
677
+ }
677
678
  }
678
679
 
679
680
  const setModel = {
@@ -14,6 +14,8 @@ import { createComponent } from '../../utils/private/create.js'
14
14
  import { stopAndPrevent } from '../../utils/event.js'
15
15
  import { shouldIgnoreKey } from '../../utils/private/key-composition.js'
16
16
 
17
+ const tickStrategyOptions = [ 'none', 'strict', 'leaf', 'leaf-filtered' ]
18
+
17
19
  export default createComponent({
18
20
  name: 'QTree',
19
21
 
@@ -37,6 +39,8 @@ export default createComponent({
37
39
  default: 'children'
38
40
  },
39
41
 
42
+ dense: Boolean,
43
+
40
44
  color: String,
41
45
  controlColor: String,
42
46
  textColor: String,
@@ -47,7 +51,7 @@ export default createComponent({
47
51
  tickStrategy: {
48
52
  type: String,
49
53
  default: 'none',
50
- validator: v => [ 'none', 'strict', 'leaf', 'leaf-filtered' ].includes(v)
54
+ validator: v => tickStrategyOptions.includes(v)
51
55
  },
52
56
  ticked: Array, // v-model:ticked
53
57
  expanded: Array, // v-model:expanded
@@ -92,7 +96,7 @@ export default createComponent({
92
96
  })
93
97
 
94
98
  const classes = computed(() =>
95
- 'q-tree'
99
+ `q-tree q-tree--${ props.dense === true ? 'dense' : 'standard' }`
96
100
  + (props.noConnectors === true ? ' q-tree--no-connectors' : '')
97
101
  + (isDark.value === true ? ' q-tree--dark' : '')
98
102
  + (props.color !== void 0 ? ` text-${ props.color }` : '')
@@ -534,13 +538,13 @@ export default createComponent({
534
538
 
535
539
  m.lazy === 'loading'
536
540
  ? h(QSpinner, {
537
- class: 'q-tree__spinner q-mr-xs',
541
+ class: 'q-tree__spinner',
538
542
  color: computedControlColor.value
539
543
  })
540
544
  : (
541
545
  isParent === true
542
546
  ? h(QIcon, {
543
- class: 'q-tree__arrow q-mr-xs'
547
+ class: 'q-tree__arrow'
544
548
  + (m.expanded === true ? ' q-tree__arrow--rotate' : ''),
545
549
  name: computedIcon.value,
546
550
  onClick (e) { onExpandClick(node, m, e) }
@@ -550,7 +554,7 @@ export default createComponent({
550
554
 
551
555
  m.hasTicking === true && m.noTick !== true
552
556
  ? h(QCheckbox, {
553
- class: 'q-mr-xs',
557
+ class: 'q-tree__tickbox',
554
558
  modelValue: m.indeterminate === true ? null : m.ticked,
555
559
  color: computedControlColor.value,
556
560
  dark: isDark.value,
@@ -61,6 +61,11 @@
61
61
  "desc": "Color name for selected nodes (from the Quasar Color Palette)"
62
62
  },
63
63
 
64
+ "dense": {
65
+ "extends": "dense",
66
+ "addedIn": "v2.2.4"
67
+ },
68
+
64
69
  "dark": {
65
70
  "extends": "dark"
66
71
  },
@@ -39,7 +39,7 @@
39
39
  position: absolute
40
40
  top: -3px
41
41
  bottom: 50%
42
- width: 35px
42
+ width: 31px
43
43
  left: -35px
44
44
  border-left: 1px solid currentColor
45
45
  border-bottom: 1px solid currentColor
@@ -84,11 +84,13 @@
84
84
  &__node--selected .q-tree__node-header-content
85
85
  color: $grey
86
86
 
87
- &__icon, &__node-header-content .q-icon, &__spinner
87
+ &__icon,
88
+ &__node-header-content .q-icon
88
89
  font-size: 21px
89
90
 
90
91
  &__img
91
92
  height: 42px
93
+ border-radius: 2px
92
94
 
93
95
  &__avatar, &__node-header-content .q-avatar
94
96
  font-size: 28px
@@ -96,15 +98,20 @@
96
98
  width: 28px
97
99
  height: 28px
98
100
 
99
- &__arrow, &__spinner
101
+ &__arrow,
102
+ &__spinner
100
103
  font-size: 16px
101
104
 
102
105
  &__arrow
103
106
  transition: transform .3s
107
+ margin-right: 4px
104
108
 
105
109
  &--rotate
106
110
  transform: rotate3d(0, 0, 1, 90deg)
107
111
 
112
+ &__tickbox
113
+ margin-right: 4px
114
+
108
115
  // remove connectors before root
109
116
  > .q-tree__node
110
117
  padding: 0
@@ -123,10 +130,51 @@
123
130
  .q-tree__node-body:after
124
131
  display: none !important
125
132
 
133
+ &--dense .q-tree
134
+ &__arrow,
135
+ &__spinner
136
+ margin-right: 1px
137
+
138
+ &__img
139
+ height: 32px
140
+
141
+ &__tickbox
142
+ margin-right: 3px
143
+
144
+ &__node
145
+ padding: 0
146
+ &:after
147
+ top: 0
148
+ left: -8px
149
+
150
+ &__node-header
151
+ margin-top: 0
152
+ padding: 1px
153
+ &:before
154
+ top: 0
155
+ left: -8px
156
+ width: 8px
157
+
158
+ &__node--child
159
+ padding-left: 17px
160
+ > .q-tree__node-header:before
161
+ left: -25px
162
+ width: 21px
163
+
164
+ &__node-body
165
+ padding: 0 0 2px
166
+
167
+ &__node--parent > .q-tree__node-collapsible > .q-tree__node-body
168
+ padding: 0 0 2px 20px
169
+ &:after
170
+ left: 8px
171
+
172
+ &__children
173
+ padding-left: 16px
174
+
126
175
  [dir=rtl]
127
176
  .q-tree__arrow
128
177
  transform: rotate3d(0, 0, 1, 180deg) #{"/* rtl:ignore */"}
129
178
 
130
179
  &--rotate
131
180
  transform: rotate3d(0, 0, 1, 90deg) #{"/* rtl:ignore */"}
132
-
@@ -260,20 +260,15 @@ export function getRenderer (getPlugin) {
260
260
  }
261
261
 
262
262
  function addFilesToQueue (e, fileList) {
263
- const processedFiles = processFiles(e, fileList, state.files.value, true)
263
+ const localFiles = processFiles(e, fileList, state.files.value, true)
264
264
 
265
- if (processedFiles === void 0) { return }
266
-
267
- const localFiles = processedFiles
268
- .filter(file => state.files.value.findIndex(f => file.name === f.name) === -1)
265
+ if (localFiles === void 0) { return }
269
266
 
270
267
  const fileInput = getFileInput()
271
268
  if (fileInput !== void 0 && fileInput !== null) {
272
269
  fileInput.value = ''
273
270
  }
274
271
 
275
- if (localFiles === void 0) { return }
276
-
277
272
  localFiles.forEach(file => {
278
273
  state.updateFileStatus(file, 'idle')
279
274
  uploadSize.value += file.size
@@ -112,6 +112,14 @@ export default function ({
112
112
  files = [ files[ 0 ] ]
113
113
  }
114
114
 
115
+ // Avoid duplicate files
116
+ const filenameMap = currentFileList.map(entry => entry.name)
117
+ files = filterFiles(files, rejectedFiles, 'duplicate', file => {
118
+ return filenameMap.includes(file.name) === false
119
+ })
120
+
121
+ if (files.length === 0) { return done() }
122
+
115
123
  if (props.maxTotalSize !== void 0) {
116
124
  let size = append === true
117
125
  ? currentFileList.reduce((total, file) => total + file.size, 0)
@@ -8,7 +8,7 @@ export const useModelToggleProps = {
8
8
  default: null
9
9
  },
10
10
 
11
- 'onUpdate:modelValue': Function
11
+ 'onUpdate:modelValue': [ Function, Array ]
12
12
  }
13
13
 
14
14
  export const useModelToggleEmits = [
package/src/utils/date.js CHANGED
@@ -403,7 +403,7 @@ export function __splitDate (str, mask, dateLocale, calendar, defaultModel) {
403
403
  }
404
404
  }
405
405
 
406
- date.dateHash = date.year + '/' + pad(date.month) + '/' + pad(date.day)
406
+ date.dateHash = pad(date.year, 6) + '/' + pad(date.month) + '/' + pad(date.day)
407
407
  date.timeHash = pad(date.hour) + ':' + pad(date.minute) + ':' + pad(date.second) + tzString
408
408
 
409
409
  return date