quasar 2.7.6 → 2.8.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 (176) hide show
  1. package/dist/api/Loading.json +57 -1
  2. package/dist/api/QBtnDropdown.json +4 -0
  3. package/dist/api/QEditor.json +105 -97
  4. package/dist/api/QField.json +6 -0
  5. package/dist/api/QFile.json +6 -0
  6. package/dist/api/QInput.json +6 -0
  7. package/dist/api/QSelect.json +6 -0
  8. package/dist/api/QTable.json +36 -49
  9. package/dist/api/QUploader.json +86 -8
  10. package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
  11. package/dist/icon-set/eva-icons.umd.prod.js +1 -1
  12. package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
  13. package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
  14. package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
  15. package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
  16. package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
  17. package/dist/icon-set/line-awesome.umd.prod.js +1 -1
  18. package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
  19. package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
  20. package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
  21. package/dist/icon-set/material-icons.umd.prod.js +1 -1
  22. package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
  23. package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
  24. package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
  25. package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
  26. package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
  27. package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
  28. package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
  29. package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
  30. package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
  31. package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
  32. package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +2 -2
  33. package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
  34. package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
  35. package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
  36. package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
  37. package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
  38. package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
  39. package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
  40. package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
  41. package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +2 -2
  42. package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +2 -2
  43. package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +2 -2
  44. package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
  45. package/dist/icon-set/svg-themify.umd.prod.js +1 -1
  46. package/dist/icon-set/themify.umd.prod.js +1 -1
  47. package/dist/lang/ar-TN.umd.prod.js +1 -1
  48. package/dist/lang/ar.umd.prod.js +1 -1
  49. package/dist/lang/az-Latn.umd.prod.js +1 -1
  50. package/dist/lang/bg.umd.prod.js +1 -1
  51. package/dist/lang/bn.umd.prod.js +1 -1
  52. package/dist/lang/ca.umd.prod.js +1 -1
  53. package/dist/lang/cs.umd.prod.js +1 -1
  54. package/dist/lang/da.umd.prod.js +1 -1
  55. package/dist/lang/de.umd.prod.js +1 -1
  56. package/dist/lang/el.umd.prod.js +1 -1
  57. package/dist/lang/en-GB.umd.prod.js +1 -1
  58. package/dist/lang/en-US.umd.prod.js +1 -1
  59. package/dist/lang/eo.umd.prod.js +1 -1
  60. package/dist/lang/es.umd.prod.js +1 -1
  61. package/dist/lang/et.umd.prod.js +1 -1
  62. package/dist/lang/eu.umd.prod.js +1 -1
  63. package/dist/lang/fa-IR.umd.prod.js +1 -1
  64. package/dist/lang/fa.umd.prod.js +1 -1
  65. package/dist/lang/fi.umd.prod.js +1 -1
  66. package/dist/lang/fr.umd.prod.js +1 -1
  67. package/dist/lang/gn.umd.prod.js +1 -1
  68. package/dist/lang/he.umd.prod.js +1 -1
  69. package/dist/lang/hr.umd.prod.js +1 -1
  70. package/dist/lang/hu.umd.prod.js +1 -1
  71. package/dist/lang/id.umd.prod.js +1 -1
  72. package/dist/lang/is.umd.prod.js +1 -1
  73. package/dist/lang/it.umd.prod.js +1 -1
  74. package/dist/lang/ja.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/kz.umd.prod.js +1 -1
  79. package/dist/lang/lt.umd.prod.js +1 -1
  80. package/dist/lang/lu.umd.prod.js +1 -1
  81. package/dist/lang/lv.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.cjs.prod.js +2 -2
  110. package/dist/quasar.esm.js +39646 -0
  111. package/dist/quasar.sass +1 -1
  112. package/dist/quasar.umd.js +355 -296
  113. package/dist/quasar.umd.prod.js +2 -2
  114. package/dist/transforms/import-map.json +1 -0
  115. package/dist/types/index.d.ts +223 -117
  116. package/dist/web-types/web-types.json +6 -1
  117. package/package.json +1 -1
  118. package/src/components/banner/QBanner.js +2 -2
  119. package/src/components/bar/QBar.js +2 -2
  120. package/src/components/btn-dropdown/QBtnDropdown.js +8 -2
  121. package/src/components/btn-dropdown/QBtnDropdown.json +5 -0
  122. package/src/components/card/QCard.js +2 -2
  123. package/src/components/carousel/QCarousel.js +1 -1
  124. package/src/components/date/QDate.js +6 -6
  125. package/src/components/dialog-plugin/DialogPlugin.js +1 -1
  126. package/src/components/editor/QEditor.js +5 -5
  127. package/src/components/editor/QEditor.json +76 -67
  128. package/src/components/infinite-scroll/QInfiniteScroll.js +7 -7
  129. package/src/components/page-sticky/use-page-sticky.js +1 -2
  130. package/src/components/popup-edit/QPopupEdit.js +10 -10
  131. package/src/components/popup-proxy/QPopupProxy.js +7 -7
  132. package/src/components/pull-to-refresh/QPullToRefresh.js +3 -3
  133. package/src/components/range/QRange.js +5 -1
  134. package/src/components/resize-observer/QResizeObserver.js +6 -6
  135. package/src/components/scroll-area/QScrollArea.js +25 -25
  136. package/src/components/scroll-observer/QScrollObserver.js +3 -3
  137. package/src/components/select/QSelect.js +2 -1
  138. package/src/components/slider/QSlider.js +5 -1
  139. package/src/components/slider/use-slider.js +1 -1
  140. package/src/components/table/QTable.json +28 -50
  141. package/src/components/table/table-column-selection.js +1 -1
  142. package/src/components/table/table-pagination.js +0 -4
  143. package/src/components/table/table-sort.js +1 -1
  144. package/src/components/time/QTime.js +5 -5
  145. package/src/components/tree/QTree.js +2 -2
  146. package/src/components/uploader/QUploader.json +107 -0
  147. package/src/components/uploader/__tests__/QUploader.spec.js +33 -2
  148. package/src/components/uploader/uploader-core.js +48 -53
  149. package/src/composables/private/use-field.js +3 -3
  150. package/src/composables/private/use-file.js +1 -0
  151. package/src/composables/private/use-panel.js +7 -7
  152. package/src/composables/private/use-portal.js +7 -7
  153. package/src/composables/private/use-validate.json +7 -0
  154. package/src/directives/ClosePopup.js +4 -4
  155. package/src/directives/Intersection.js +1 -1
  156. package/src/index.dev.js +16 -0
  157. package/src/{index.all.js → index.ssr.js} +0 -0
  158. package/src/install-quasar.js +1 -1
  159. package/src/plugins/Loading.js +122 -73
  160. package/src/plugins/Loading.json +48 -1
  161. package/src/plugins/LoadingBar.js +1 -1
  162. package/src/plugins/Notify.js +1 -1
  163. package/src/utils/create-uploader-component.js +1 -1
  164. package/src/utils/date.js +1 -1
  165. package/src/utils/dom.js +2 -5
  166. package/src/utils/{private/is.js → is.js} +11 -7
  167. package/src/utils/morph.js +1 -1
  168. package/src/utils/open-url.js +7 -2
  169. package/src/utils/private/click-outside.js +3 -3
  170. package/src/utils/private/date-persian.js +12 -12
  171. package/src/utils/private/global-dialog.js +3 -3
  172. package/src/utils/private/portal.js +24 -24
  173. package/src/utils/private/vm.js +10 -9
  174. package/src/utils/private/web-storage.js +1 -1
  175. package/src/utils.js +2 -0
  176. package/dist/quasar.esm.prod.js +0 -6
@@ -151,6 +151,113 @@
151
151
  "__exemption": ["examples"]
152
152
  }
153
153
  }
154
+ },
155
+
156
+ "updateFileStatus": {
157
+ "desc": "Update the status of a file",
158
+ "params": {
159
+ "file": {
160
+ "type": "Object",
161
+ "desc": "File to update (instance of File)",
162
+ "required": true,
163
+ "__exemption": ["examples"]
164
+ },
165
+ "status": {
166
+ "type": "String",
167
+ "desc": "Status of file",
168
+ "values": [ "idle", "failed", "uploading", "uploaded" ],
169
+ "required": true
170
+ },
171
+ "uploadedSize": {
172
+ "type": "Number",
173
+ "desc": "The number of uploaded bytes of the file; Is required explicitly only when status is NOT 'uploaded'",
174
+ "required": true,
175
+ "__exemption": ["examples"]
176
+ }
177
+ }
178
+ },
179
+
180
+ "isAlive": {
181
+ "desc": "Is the component alive (activated but not unmounted); Useful to determine if you still need to compute anything going further",
182
+ "returns": {
183
+ "type": "Boolean",
184
+ "desc": "If true, the current component is still activated and mounted"
185
+ }
186
+ },
187
+
188
+ "pickFiles": {
189
+ "desc": "Trigger the file picker dialog; The event must come from a user interaction event handler",
190
+ "params": {
191
+ "evt": {
192
+ "extends": "evt",
193
+ "required": true,
194
+ "desc": "JS event object of the original user interaction handler"
195
+ }
196
+ }
197
+ },
198
+
199
+ "addFiles": {
200
+ "desc": "Manually add files to the queue",
201
+ "params": {
202
+ "files": {
203
+ "type": "Array",
204
+ "required": true,
205
+ "desc": "Must be an array of instances of JS File type"
206
+ }
207
+ }
208
+ }
209
+ },
210
+
211
+ "computedProps": {
212
+ "files": {
213
+ "type": "Array",
214
+ "desc": "List of all files",
215
+ "__exemption": [ "examples" ]
216
+ },
217
+
218
+ "queuedFiles": {
219
+ "type": "Array",
220
+ "desc": "List of files that are waiting to be uploaded",
221
+ "__exemption": [ "examples" ]
222
+ },
223
+
224
+ "uploadedFiles": {
225
+ "type": "Array",
226
+ "desc": "List of files that have been uploaded",
227
+ "__exemption": [ "examples" ]
228
+ },
229
+
230
+ "uploadedSize": {
231
+ "type": "Number",
232
+ "desc": "Size of all uploaded files in bytes",
233
+ "examples": [ 1024 ]
234
+ },
235
+
236
+ "uploadSizeLabel": {
237
+ "type": "String",
238
+ "desc": "Label for the size total of all files",
239
+ "examples": [ "1.0MB" ]
240
+ },
241
+
242
+ "uploadProgressLabel": {
243
+ "type": "String",
244
+ "desc": "Label for the upload progress (in %)",
245
+ "examples": [ "52.76%" ]
246
+ },
247
+
248
+ "canAddFiles": {
249
+ "type": "Boolean",
250
+ "desc": "Whether new files can be added to the list"
251
+ },
252
+
253
+ "canUpload": {
254
+ "type": "Boolean",
255
+ "desc": "Whether the files can be uploaded"
256
+ },
257
+
258
+ "isBusy": {
259
+ "type": "Boolean",
260
+ "desc": "The component state is set as busy; User should not be able to interact with the component"
154
261
  }
155
262
  }
156
263
  }
@@ -1,3 +1,6 @@
1
+ import { mount } from '@cypress/vue'
2
+ import QUploader from '../QUploader'
3
+
1
4
  describe('Uploader API', () => {
2
5
  describe('Props', () => {
3
6
  describe('Category: behavior', () => {
@@ -83,8 +86,36 @@ describe('Uploader API', () => {
83
86
 
84
87
  describe('Slots', () => {
85
88
  describe('(slot): header', () => {
86
- it.skip(' ', () => {
87
- //
89
+ it('renders correctly using the scope', () => {
90
+ // Taken from ui/dev/src/pages/form/uploader.vue
91
+ const headerSlot = `
92
+ <template #header="scope">
93
+ <div class="row no-wrap items-center q-pa-sm q-gutter-xs">
94
+ <q-btn v-if="scope.queuedFiles.length > 0" icon="clear_all" @click="scope.removeQueuedFiles" round dense flat />
95
+ <q-btn v-if="scope.uploadedFiles.length > 0" icon="done_all" @click="scope.removeUploadedFiles" round dense flat />
96
+ <q-spinner v-if="scope.isUploading" class="q-uploader__spinner" />
97
+ <div class="col">
98
+ <div class="q-uploader__title">
99
+ Upload your files
100
+ </div>
101
+ <div class="q-uploader__subtitle">
102
+ {{ scope.uploadSizeLabel }} / {{ scope.uploadProgressLabel }}
103
+ </div>
104
+ </div>
105
+ <q-btn v-if="scope.canAddFiles" type="a" icon="add_box" @click="scope.pickFiles" round dense flat>
106
+ <q-uploader-add-trigger />
107
+ </q-btn>
108
+ <q-btn v-if="scope.canUpload" icon="cloud_upload" @click="scope.upload" round dense flat />
109
+ <q-btn v-if="scope.isUploading" icon="clear" @click="scope.abort" round dense flat />
110
+ </div>
111
+ </template>
112
+ `
113
+
114
+ mount(QUploader, {
115
+ slots: {
116
+ header: headerSlot
117
+ }
118
+ })
88
119
  })
89
120
  })
90
121
 
@@ -11,6 +11,7 @@ import useFile, { useFileProps, useFileEmits } from '../../composables/private/u
11
11
  import { stop } from '../../utils/event.js'
12
12
  import { humanStorageSize } from '../../utils/format.js'
13
13
  import { uploaderKey } from '../../utils/private/symbols.js'
14
+ import { injectProp, injectMultipleProps } from '../../utils/private/inject-obj-prop.js'
14
15
 
15
16
  function getProgressLabel (p) {
16
17
  return (p * 100).toFixed(2) + '%'
@@ -76,6 +77,12 @@ export function getRenderer (getPlugin) {
76
77
  proxy.$forceUpdate()
77
78
  }
78
79
 
80
+ const editable = computed(() => props.disable !== true && props.readonly !== true)
81
+ const dnd = ref(false)
82
+
83
+ const rootRef = ref(null)
84
+ const inputRef = ref(null)
85
+
79
86
  const state = {
80
87
  files: ref([]),
81
88
  queuedFiles: ref([]),
@@ -88,22 +95,6 @@ export function getRenderer (getPlugin) {
88
95
  }
89
96
  }
90
97
 
91
- Object.assign(state, getPlugin({ props, slots, emit, helpers: state }))
92
-
93
- const uploadSize = ref(0)
94
- const editable = computed(() => props.disable !== true && props.readonly !== true)
95
-
96
- if (state.isBusy === void 0) {
97
- state.isBusy = ref(false)
98
- }
99
-
100
- const dnd = ref(false)
101
-
102
- const rootRef = ref(null)
103
- const inputRef = ref(null)
104
-
105
- provide(uploaderKey, renderInput)
106
-
107
98
  const {
108
99
  pickFiles,
109
100
  addFiles,
@@ -115,6 +106,21 @@ export function getRenderer (getPlugin) {
115
106
  maxTotalSizeNumber
116
107
  } = useFile({ editable, dnd, getFileInput, addFilesToQueue })
117
108
 
109
+ Object.assign(state, getPlugin({ props, slots, emit, helpers: state }))
110
+
111
+ if (state.isBusy === void 0) {
112
+ state.isBusy = ref(false)
113
+ }
114
+
115
+ const uploadSize = ref(0)
116
+ const uploadProgress = computed(() => (
117
+ uploadSize.value === 0
118
+ ? 0
119
+ : state.uploadedSize.value / uploadSize.value
120
+ ))
121
+ const uploadProgressLabel = computed(() => getProgressLabel(uploadProgress.value))
122
+ const uploadSizeLabel = computed(() => humanStorageSize(uploadSize.value))
123
+
118
124
  const canAddFiles = computed(() =>
119
125
  editable.value === true
120
126
  && state.isUploading.value !== true
@@ -133,14 +139,7 @@ export function getRenderer (getPlugin) {
133
139
  && state.queuedFiles.value.length > 0
134
140
  )
135
141
 
136
- const uploadProgress = computed(() => (
137
- uploadSize.value === 0
138
- ? 0
139
- : state.uploadedSize.value / uploadSize.value
140
- ))
141
-
142
- const uploadProgressLabel = computed(() => getProgressLabel(uploadProgress.value))
143
- const uploadSizeLabel = computed(() => humanStorageSize(uploadSize.value))
142
+ provide(uploaderKey, renderInput)
144
143
 
145
144
  const classes = computed(() =>
146
145
  'q-uploader column no-wrap'
@@ -335,7 +334,7 @@ export function getRenderer (getPlugin) {
335
334
 
336
335
  function getHeader () {
337
336
  if (slots.header !== void 0) {
338
- return slots.header(slotScope.value)
337
+ return slots.header(publicApi)
339
338
  }
340
339
 
341
340
  return [
@@ -372,7 +371,7 @@ export function getRenderer (getPlugin) {
372
371
 
373
372
  function getList () {
374
373
  if (slots.list !== void 0) {
375
- return slots.list(slotScope.value)
374
+ return slots.list(publicApi)
376
375
  }
377
376
 
378
377
  return state.files.value.map(file => h('div', {
@@ -431,41 +430,37 @@ export function getRenderer (getPlugin) {
431
430
  state.files.value.length > 0 && revokeImgURLs()
432
431
  })
433
432
 
434
- const publicMethods = {
435
- pickFiles,
436
- addFiles,
433
+ const publicApi = {}
434
+
435
+ for (const key in state) {
436
+ if (isRef(state[ key ]) === true) {
437
+ injectProp(publicApi, key, () => state[ key ].value)
438
+ }
439
+ else { // method or non-computed prop
440
+ publicApi[ key ] = state[ key ]
441
+ }
442
+ }
443
+
444
+ Object.assign(publicApi, {
445
+ upload,
437
446
  reset,
438
447
  removeUploadedFiles,
439
448
  removeQueuedFiles,
440
449
  removeFile,
441
- upload,
442
- abort: state.abort
443
- }
444
-
445
- // TODO: the result of this computed, especially the dynamic part, isn't currently typed
446
- // This result in an error with Volar when accessing the state (eg. files array)
447
- const slotScope = computed(() => {
448
- const acc = {
449
- canAddFiles: canAddFiles.value,
450
- canUpload: canUpload.value,
451
- uploadSizeLabel: uploadSizeLabel.value,
452
- uploadProgressLabel: uploadProgressLabel.value
453
- }
454
450
 
455
- for (const key in state) {
456
- acc[ key ] = isRef(state[ key ]) === true
457
- ? state[ key ].value
458
- : state[ key ]
459
- }
451
+ pickFiles,
452
+ addFiles
453
+ })
460
454
 
461
- // TODO: (Qv3) Put the QUploader instance under `ref`
462
- // property for consistency and flexibility
463
- // return { ref: { ...acc, ...publicMethods } }
464
- return { ...acc, ...publicMethods }
455
+ injectMultipleProps(publicApi, {
456
+ canAddFiles: () => canAddFiles.value,
457
+ canUpload: () => canUpload.value,
458
+ uploadSizeLabel: () => uploadSizeLabel.value,
459
+ uploadProgressLabel: () => uploadProgressLabel.value
465
460
  })
466
461
 
467
- // expose public methods
468
- Object.assign(proxy, publicMethods)
462
+ // expose public api (methods & computed props)
463
+ Object.assign(proxy, publicApi)
469
464
 
470
465
  return () => {
471
466
  const children = [
@@ -527,9 +527,6 @@ export default function (state) {
527
527
  }, content)
528
528
  }
529
529
 
530
- // expose public methods
531
- Object.assign(proxy, { focus, blur })
532
-
533
530
  let shouldActivate = false
534
531
 
535
532
  onDeactivated(() => {
@@ -552,6 +549,9 @@ export default function (state) {
552
549
  clearTimeout(focusoutTimer)
553
550
  })
554
551
 
552
+ // expose public methods
553
+ Object.assign(proxy, { focus, blur })
554
+
555
555
  return function renderField () {
556
556
  const labelAttrs = state.getControl === void 0 && slots.control === void 0
557
557
  ? {
@@ -221,6 +221,7 @@ export default function ({
221
221
  onDragover,
222
222
  processFiles,
223
223
  getDndNode,
224
+
224
225
  maxFilesNumber,
225
226
  maxTotalSizeNumber
226
227
  }
@@ -126,13 +126,6 @@ export default function () {
126
126
  function nextPanel () { goToPanelByOffset(1) }
127
127
  function previousPanel () { goToPanelByOffset(-1) }
128
128
 
129
- // expose public methods
130
- Object.assign(proxy, {
131
- next: nextPanel,
132
- previous: previousPanel,
133
- goTo: goToPanel
134
- })
135
-
136
129
  function goToPanel (name) {
137
130
  emit('update:modelValue', name)
138
131
  }
@@ -257,6 +250,13 @@ export default function () {
257
250
  return panels
258
251
  }
259
252
 
253
+ // expose public methods
254
+ Object.assign(proxy, {
255
+ next: nextPanel,
256
+ previous: previousPanel,
257
+ goTo: goToPanel
258
+ })
259
+
260
260
  return {
261
261
  panelIndex,
262
262
  panelDirectives,
@@ -3,7 +3,7 @@ import { h, ref, onUnmounted, Teleport } from 'vue'
3
3
  import { noop } from '../../utils/event.js'
4
4
  import { addFocusWaitFlag, removeFocusWaitFlag } from '../../utils/private/focus-manager.js'
5
5
  import { createGlobalNode, removeGlobalNode } from '../../utils/private/global-nodes.js'
6
- import { portalList } from '../../utils/private/portal.js'
6
+ import { portalProxyList } from '../../utils/private/portal.js'
7
7
 
8
8
  function isOnGlobalDialog (vm) {
9
9
  vm = vm.parent
@@ -64,7 +64,7 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
64
64
  portalIsActive.value = true
65
65
 
66
66
  // register portal
67
- portalList.push(vm.proxy)
67
+ portalProxyList.push(vm.proxy)
68
68
 
69
69
  addFocusWaitFlag(focusObj)
70
70
  }
@@ -79,9 +79,9 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
79
79
  portalIsActive.value = false
80
80
 
81
81
  // unregister portal
82
- const index = portalList.indexOf(vm.proxy)
83
- if (index > -1) {
84
- portalList.splice(index, 1)
82
+ const index = portalProxyList.indexOf(vm.proxy)
83
+ if (index !== -1) {
84
+ portalProxyList.splice(index, 1)
85
85
  }
86
86
 
87
87
  if (portalEl !== null) {
@@ -92,8 +92,8 @@ export default function (vm, innerRef, renderPortalContent, checkGlobalDialog) {
92
92
 
93
93
  onUnmounted(() => { hidePortal(true) })
94
94
 
95
- // expose publicly needed stuff for portal utils
96
- Object.assign(vm.proxy, { __qPortalInnerRef: innerRef })
95
+ // needed for portal vm detection
96
+ vm.proxy.__qPortalInnerRef = innerRef
97
97
 
98
98
  return {
99
99
  showPortal,
@@ -74,5 +74,12 @@
74
74
  ]
75
75
  }
76
76
  }
77
+ },
78
+
79
+ "computedProps": {
80
+ "hasError": {
81
+ "type": "Boolean",
82
+ "desc": "Whether the component is in error state"
83
+ }
77
84
  }
78
85
  }
@@ -1,5 +1,5 @@
1
1
  import { createDirective } from '../utils/private/create.js'
2
- import { closePortals, getPortalVm } from '../utils/private/portal.js'
2
+ import { closePortals, getPortalProxy } from '../utils/private/portal.js'
3
3
  import { isKeyCode } from '../utils/private/key-composition.js'
4
4
  import getSSRProps from '../utils/private/noop-ssr-directive-transform.js'
5
5
 
@@ -34,9 +34,9 @@ export default createDirective(__QUASAR_SSR_SERVER__
34
34
  handler (evt) {
35
35
  // allow @click to be emitted
36
36
  ctx.depth !== 0 && setTimeout(() => {
37
- const vm = getPortalVm(el)
38
- if (vm !== void 0) {
39
- closePortals(vm, evt, ctx.depth)
37
+ const proxy = getPortalProxy(el)
38
+ if (proxy !== void 0) {
39
+ closePortals(proxy, evt, ctx.depth)
40
40
  }
41
41
  })
42
42
  },
@@ -1,5 +1,5 @@
1
1
  import { createDirective } from '../utils/private/create.js'
2
- import { isDeepEqual } from '../utils/private/is.js'
2
+ import { isDeepEqual } from '../utils/is.js'
3
3
  import getSSRProps from '../utils/private/noop-ssr-directive-transform.js'
4
4
 
5
5
  const defaultCfg = {
@@ -0,0 +1,16 @@
1
+ import installQuasar from './install-quasar.js'
2
+ import lang from './lang.js'
3
+ import iconSet from './icon-set.js'
4
+
5
+ export * from './components.js'
6
+ export * from './directives.js'
7
+ export * from './plugins.js'
8
+ export * from './composables.js'
9
+ export * from './utils.js'
10
+
11
+ export const Quasar = {
12
+ version: __QUASAR_VERSION__,
13
+ install: installQuasar,
14
+ lang,
15
+ iconSet
16
+ }
File without changes
@@ -10,7 +10,7 @@ import IconSet from './icon-set.js'
10
10
 
11
11
  import { quasarKey } from './utils/private/symbols.js'
12
12
  import { globalConfig, globalConfigIsFrozen, freezeGlobalConfig } from './utils/private/global-config.js'
13
- import { isObject } from './utils/private/is.js'
13
+ import { isObject } from './utils/is.js'
14
14
 
15
15
  const autoInstalledPlugins = [
16
16
  Platform,