quasar 2.7.7 → 2.8.1
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/api/Loading.json +57 -1
- package/dist/api/QBtnDropdown.json +4 -0
- package/dist/api/QEditor.json +105 -97
- package/dist/api/QField.json +6 -0
- package/dist/api/QFile.json +6 -0
- package/dist/api/QInput.json +6 -0
- package/dist/api/QSelect.json +6 -0
- package/dist/api/QTable.json +36 -49
- package/dist/api/QUploader.json +86 -8
- package/dist/icon-set/bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6-pro.umd.prod.js +1 -1
- package/dist/icon-set/fontawesome-v6.umd.prod.js +1 -1
- package/dist/icon-set/ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/material-icons.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-outlined.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-rounded.umd.prod.js +1 -1
- package/dist/icon-set/material-symbols-sharp.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v3.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v4.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v5.umd.prod.js +1 -1
- package/dist/icon-set/mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-bootstrap-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-eva-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-fontawesome-v6.umd.prod.js +2 -2
- package/dist/icon-set/svg-ionicons-v4.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v5.umd.prod.js +1 -1
- package/dist/icon-set/svg-ionicons-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-line-awesome.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-outlined.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-round.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons-sharp.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-icons.umd.prod.js +1 -1
- package/dist/icon-set/svg-material-symbols-outlined.umd.prod.js +2 -2
- package/dist/icon-set/svg-material-symbols-rounded.umd.prod.js +2 -2
- package/dist/icon-set/svg-material-symbols-sharp.umd.prod.js +2 -2
- package/dist/icon-set/svg-mdi-v6.umd.prod.js +1 -1
- package/dist/icon-set/svg-themify.umd.prod.js +1 -1
- package/dist/icon-set/themify.umd.prod.js +1 -1
- package/dist/lang/ar-TN.umd.prod.js +1 -1
- package/dist/lang/ar.umd.prod.js +1 -1
- package/dist/lang/az-Latn.umd.prod.js +1 -1
- package/dist/lang/bg.umd.prod.js +1 -1
- package/dist/lang/bn.umd.prod.js +1 -1
- package/dist/lang/ca.umd.prod.js +1 -1
- package/dist/lang/cs.umd.prod.js +1 -1
- package/dist/lang/da.umd.prod.js +1 -1
- package/dist/lang/de.umd.prod.js +1 -1
- package/dist/lang/el.umd.prod.js +1 -1
- package/dist/lang/en-GB.umd.prod.js +1 -1
- package/dist/lang/en-US.umd.prod.js +1 -1
- package/dist/lang/eo.umd.prod.js +1 -1
- package/dist/lang/es.umd.prod.js +1 -1
- package/dist/lang/et.umd.prod.js +1 -1
- package/dist/lang/eu.umd.prod.js +1 -1
- package/dist/lang/fa-IR.umd.prod.js +1 -1
- package/dist/lang/fa.umd.prod.js +1 -1
- package/dist/lang/fi.umd.prod.js +1 -1
- package/dist/lang/fr.umd.prod.js +1 -1
- package/dist/lang/gn.umd.prod.js +1 -1
- package/dist/lang/he.umd.prod.js +1 -1
- package/dist/lang/hr.umd.prod.js +1 -1
- package/dist/lang/hu.umd.prod.js +1 -1
- package/dist/lang/id.umd.prod.js +1 -1
- package/dist/lang/is.umd.prod.js +1 -1
- package/dist/lang/it.umd.prod.js +1 -1
- package/dist/lang/ja.umd.prod.js +1 -1
- package/dist/lang/km.umd.prod.js +1 -1
- package/dist/lang/ko-KR.umd.prod.js +1 -1
- package/dist/lang/kur-CKB.umd.prod.js +1 -1
- package/dist/lang/kz.umd.prod.js +1 -1
- package/dist/lang/lt.umd.prod.js +1 -1
- package/dist/lang/lu.umd.prod.js +1 -1
- package/dist/lang/lv.umd.prod.js +1 -1
- package/dist/lang/ml.umd.prod.js +1 -1
- package/dist/lang/mm.umd.prod.js +1 -1
- package/dist/lang/ms.umd.prod.js +1 -1
- package/dist/lang/my.umd.prod.js +1 -1
- package/dist/lang/nb-NO.umd.prod.js +1 -1
- package/dist/lang/nl.umd.prod.js +1 -1
- package/dist/lang/pl.umd.prod.js +1 -1
- package/dist/lang/pt-BR.umd.prod.js +1 -1
- package/dist/lang/pt.umd.prod.js +1 -1
- package/dist/lang/ro.umd.prod.js +1 -1
- package/dist/lang/ru.umd.prod.js +1 -1
- package/dist/lang/sk.umd.prod.js +1 -1
- package/dist/lang/sl.umd.prod.js +1 -1
- package/dist/lang/sm.umd.prod.js +1 -1
- package/dist/lang/sr-CYR.umd.prod.js +1 -1
- package/dist/lang/sr.umd.prod.js +1 -1
- package/dist/lang/sv.umd.prod.js +1 -1
- package/dist/lang/ta.umd.prod.js +1 -1
- package/dist/lang/th.umd.prod.js +1 -1
- package/dist/lang/tr.umd.prod.js +1 -1
- package/dist/lang/ug.umd.prod.js +1 -1
- package/dist/lang/uk.umd.prod.js +1 -1
- package/dist/lang/uz-Cyrl.umd.prod.js +1 -1
- package/dist/lang/uz-Latn.umd.prod.js +1 -1
- package/dist/lang/vi.umd.prod.js +1 -1
- package/dist/lang/zh-CN.umd.prod.js +1 -1
- package/dist/lang/zh-TW.umd.prod.js +1 -1
- package/dist/quasar.cjs.prod.js +2 -2
- package/dist/quasar.esm.js +39647 -0
- package/dist/quasar.esm.prod.js +2 -2
- package/dist/quasar.sass +1 -1
- package/dist/quasar.umd.js +355 -295
- package/dist/quasar.umd.prod.js +2 -2
- package/dist/transforms/import-map.json +1 -0
- package/dist/types/index.d.ts +223 -117
- package/dist/web-types/web-types.json +6 -1
- package/package.json +1 -1
- package/src/components/banner/QBanner.js +2 -2
- package/src/components/bar/QBar.js +2 -2
- package/src/components/btn-dropdown/QBtnDropdown.js +8 -2
- package/src/components/btn-dropdown/QBtnDropdown.json +5 -0
- package/src/components/card/QCard.js +2 -2
- package/src/components/carousel/QCarousel.js +1 -1
- package/src/components/date/QDate.js +6 -6
- package/src/components/dialog-plugin/DialogPlugin.js +1 -1
- package/src/components/editor/QEditor.js +5 -5
- package/src/components/editor/QEditor.json +76 -67
- package/src/components/infinite-scroll/QInfiniteScroll.js +7 -7
- package/src/components/page-sticky/use-page-sticky.js +1 -2
- package/src/components/popup-edit/QPopupEdit.js +10 -10
- package/src/components/popup-proxy/QPopupProxy.js +7 -7
- package/src/components/pull-to-refresh/QPullToRefresh.js +3 -3
- package/src/components/range/QRange.js +5 -1
- package/src/components/resize-observer/QResizeObserver.js +6 -6
- package/src/components/scroll-area/QScrollArea.js +25 -25
- package/src/components/scroll-observer/QScrollObserver.js +3 -3
- package/src/components/select/QSelect.js +2 -1
- package/src/components/slider/QSlider.js +5 -1
- package/src/components/slider/use-slider.js +1 -1
- package/src/components/table/QTable.json +28 -50
- package/src/components/table/table-column-selection.js +1 -1
- package/src/components/table/table-pagination.js +0 -4
- package/src/components/table/table-sort.js +1 -1
- package/src/components/time/QTime.js +5 -5
- package/src/components/tree/QTree.js +2 -2
- package/src/components/uploader/QUploader.json +107 -0
- package/src/components/uploader/__tests__/QUploader.spec.js +33 -2
- package/src/components/uploader/uploader-core.js +48 -53
- package/src/composables/private/use-field.js +5 -4
- package/src/composables/private/use-file.js +1 -0
- package/src/composables/private/use-panel.js +7 -7
- package/src/composables/private/use-portal.js +7 -7
- package/src/composables/private/use-validate.json +7 -0
- package/src/directives/ClosePopup.js +4 -4
- package/src/directives/Intersection.js +1 -1
- package/src/index.dev.js +16 -0
- package/src/{index.all.js → index.ssr.js} +0 -0
- package/src/install-quasar.js +1 -1
- package/src/plugins/Loading.js +122 -73
- package/src/plugins/Loading.json +48 -1
- package/src/plugins/LoadingBar.js +1 -1
- package/src/plugins/Notify.js +1 -1
- package/src/utils/create-uploader-component.js +1 -1
- package/src/utils/date.js +1 -1
- package/src/utils/dom.js +2 -5
- package/src/utils/{private/is.js → is.js} +11 -7
- package/src/utils/morph.js +1 -1
- package/src/utils/open-url.js +7 -2
- package/src/utils/private/click-outside.js +3 -3
- package/src/utils/private/date-persian.js +12 -12
- package/src/utils/private/portal.js +24 -24
- package/src/utils/private/vm.js +10 -9
- package/src/utils/private/web-storage.js +1 -1
- package/src/utils.js +2 -0
|
@@ -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
|
|
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
|
-
|
|
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(
|
|
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(
|
|
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
|
|
435
|
-
|
|
436
|
-
|
|
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
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
: state[ key ]
|
|
459
|
-
}
|
|
451
|
+
pickFiles,
|
|
452
|
+
addFiles
|
|
453
|
+
})
|
|
460
454
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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,
|
|
462
|
+
// expose public api (methods & computed props)
|
|
463
|
+
Object.assign(proxy, publicApi)
|
|
469
464
|
|
|
470
465
|
return () => {
|
|
471
466
|
const children = [
|
|
@@ -504,7 +504,8 @@ export default function (state) {
|
|
|
504
504
|
|
|
505
505
|
return h('div', {
|
|
506
506
|
class: 'q-field__bottom row items-start q-field__bottom--'
|
|
507
|
-
+ (props.hideBottomSpace !== true ? 'animated' : 'stale')
|
|
507
|
+
+ (props.hideBottomSpace !== true ? 'animated' : 'stale'),
|
|
508
|
+
onClick: prevent
|
|
508
509
|
}, [
|
|
509
510
|
props.hideBottomSpace === true
|
|
510
511
|
? main
|
|
@@ -527,9 +528,6 @@ export default function (state) {
|
|
|
527
528
|
}, content)
|
|
528
529
|
}
|
|
529
530
|
|
|
530
|
-
// expose public methods
|
|
531
|
-
Object.assign(proxy, { focus, blur })
|
|
532
|
-
|
|
533
531
|
let shouldActivate = false
|
|
534
532
|
|
|
535
533
|
onDeactivated(() => {
|
|
@@ -552,6 +550,9 @@ export default function (state) {
|
|
|
552
550
|
clearTimeout(focusoutTimer)
|
|
553
551
|
})
|
|
554
552
|
|
|
553
|
+
// expose public methods
|
|
554
|
+
Object.assign(proxy, { focus, blur })
|
|
555
|
+
|
|
555
556
|
return function renderField () {
|
|
556
557
|
const labelAttrs = state.getControl === void 0 && slots.control === void 0
|
|
557
558
|
? {
|
|
@@ -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 {
|
|
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
|
-
|
|
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 =
|
|
83
|
-
if (index
|
|
84
|
-
|
|
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
|
-
//
|
|
96
|
-
|
|
95
|
+
// needed for portal vm detection
|
|
96
|
+
vm.proxy.__qPortalInnerRef = innerRef
|
|
97
97
|
|
|
98
98
|
return {
|
|
99
99
|
showPortal,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createDirective } from '../utils/private/create.js'
|
|
2
|
-
import { closePortals,
|
|
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
|
|
38
|
-
if (
|
|
39
|
-
closePortals(
|
|
37
|
+
const proxy = getPortalProxy(el)
|
|
38
|
+
if (proxy !== void 0) {
|
|
39
|
+
closePortals(proxy, evt, ctx.depth)
|
|
40
40
|
}
|
|
41
41
|
})
|
|
42
42
|
},
|
package/src/index.dev.js
ADDED
|
@@ -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
|
package/src/install-quasar.js
CHANGED
|
@@ -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/
|
|
13
|
+
import { isObject } from './utils/is.js'
|
|
14
14
|
|
|
15
15
|
const autoInstalledPlugins = [
|
|
16
16
|
Platform,
|