forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDialog.json
More file actions
348 lines (302 loc) · 11.8 KB
/
Dialog.json
File metadata and controls
348 lines (302 loc) · 11.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
{
"mixins": [ "utils/global-dialog" ],
"meta": {
"docsUrl": "https://v1.quasar.dev/quasar-plugins/dialog"
},
"injection": "$q.dialog",
"methods": {
"create": {
"tsInjectionPoint": true,
"params": {
"opts": {
"desc": "Dialog options",
"tsType": "QDialogOptions",
"definition": {
"title": {
"type": "String",
"desc": "A text for the heading title of the dialog",
"examples": [ "Continue?" ]
},
"message": {
"type": "String",
"desc": "A text with more information about what needs to be input, selected or confirmed.",
"examples": [ "Are you certain you want to continue?" ]
},
"html": {
"type": "Boolean",
"desc": "Render title and message as HTML; This can lead to XSS attacks, so make sure that you sanitize the message first"
},
"position": {
"type": "String",
"desc": "Position of the Dialog on screen. Standard is centered.",
"values": [ "top", "right", "bottom", "left", "standard" ],
"default": "standard"
},
"prompt": {
"type": "Object",
"desc": "An object definition of the input field for the prompting question.",
"examples": [ "prompt: { model: this.promptVal, type: 'number' }" ],
"definition": {
"model": {
"type": "String",
"desc": "The initial value of the input",
"required": true,
"__exemption": [ "examples" ]
},
"type": {
"type": "String",
"desc": "Optional property to determine the input field type",
"default": "text",
"examples": [ "text", "number", "textarea" ]
},
"isValid": {
"type": "Function",
"desc": "Is typed content valid?",
"params": {
"val": {
"type": "String",
"desc": "The value of the input",
"__exemption": [ "examples" ]
}
},
"returns": {
"type": "Boolean",
"desc": "The text passed validation or not"
}
},
"attrs": {
"type": "Object",
"desc": "Attributes to pass to prompt control",
"examples": [ "{ autocomplete: 'off' }" ],
"addedIn": "v1.9.12"
},
"label": {
"type": "String",
"desc": "A text label that will “float” up above the input field, once the field gets focus",
"examples": [ "Username" ],
"addedIn": "v1.9.3"
},
"stackLabel": {
"type": "Boolean",
"desc": "Label will be always shown above the field regardless of field content (if any)",
"addedIn": "v1.9.3"
},
"filled": {
"type": "Boolean",
"desc": "Use 'filled' design for the field",
"addedIn": "v1.9.3"
},
"outlined": {
"type": "Boolean",
"desc": "Use 'outlined' design for the field",
"addedIn": "v1.9.3"
},
"standout": {
"type": [ "Boolean", "String" ],
"desc": "Use 'standout' design for the field; Specifies classes to be applied when focused (overriding default ones)",
"examples": [
"standout",
"standout=\"bg-primary text-white\""
],
"addedIn": "v1.9.3"
},
"rounded": {
"extends": "rounded",
"addedIn": "v1.12.3"
},
"square": {
"type": "Boolean",
"desc": "Remove border-radius so borders are squared; Overrides 'rounded' prop",
"addedIn": "v1.12.3"
},
"counter": {
"type": "Boolean",
"desc": "Show an automatic counter on bottom right",
"addedIn": "v1.12.3"
},
"maxlength": {
"type": [ "String", "Number" ],
"desc": "Specify a max length of model",
"examples": [ "12" ],
"addedIn": "v1.12.3"
},
"prefix": {
"type": "String",
"desc": "Prefix",
"examples": [ "$" ],
"addedIn": "v1.12.3"
},
"suffix": {
"type": "String",
"desc": "Suffix",
"examples": [ "@gmail.com" ],
"addedIn": "v1.12.3"
}
}
},
"options": {
"type": "Object",
"desc": "An object definition for creating the selection form content",
"examples": [ "{ model: this.dialogSelection, type: 'radio', items: [...listOfItems] }" ],
"definition": {
"model": {
"type": [ "String", "Array" ],
"desc": "The value of the selection (String if it's of type radio or Array otherwise)",
"required": true,
"examples": [ "[]" ]
},
"type": {
"type": "String",
"desc": "The type of selection",
"default": "radio",
"values": [ "radio", "checkbox", "toggle" ]
},
"items": {
"type": "Array",
"desc": "The list of options to interact with; Equivalent to options prop of the QOptionsGroup component",
"examples": [
"[ { label: 'Option 1', value: 'op1' }, { label: 'Option 2', value: 'op2' }, { label: 'Option 3', value: 'op3' } ]"
]
},
"isValid": {
"type": "Function",
"desc": "Is the model valid?",
"params": {
"model": {
"type": [ "String", "Array" ],
"desc": "The current model (String if it's of type radio or Array otherwise)",
"examples": [
"opt2",
"[ 'opt1' ]",
"[]",
"[ 'opt1', 'opt3' ]"
]
}
},
"returns": {
"type": "Boolean",
"desc": "The selection passed validation or not"
}
}
}
},
"progress": {
"type": [ "Boolean", "Object" ],
"desc": "Display a Quasar spinner (if value is true, then the defaults are used); Useful for conveying the idea that something is happening behind the covers; Tip: use along with persistent, ok: false and update() method",
"definition": {
"spinner": {
"type": "Component",
"desc": "One of the QSpinners"
},
"color": {
"extends": "color"
}
},
"addedIn": "v1.14.0"
},
"ok": {
"type": [ "String", "Object", "Boolean" ],
"desc": "Props for an 'OK' button",
"definition": {
"...props": {
"type": "Any",
"desc": "See QBtn for available props",
"__exemption": [ "examples" ]
}
}
},
"cancel": {
"type": [ "String", "Object", "Boolean" ],
"desc": "Props for a 'CANCEL' button",
"definition": {
"...props": {
"type": "Any",
"desc": "See QBtn for available props",
"__exemption": [ "examples" ]
}
}
},
"focus": {
"type": "String",
"desc": "What button to focus, unless you also have 'prompt' or 'options'",
"values": [ "ok", "cancel", "none" ],
"default": "ok",
"addedIn": "v1.5.0"
},
"stackButtons": {
"type": "Boolean",
"desc": "Makes buttons be stacked instead of vertically aligned"
},
"color": {
"extends": "color"
},
"dark": {
"extends": "dark",
"desc": "Apply dark mode"
},
"persistent": {
"type": "Boolean",
"desc": "User cannot dismiss Dialog if clicking outside of it or hitting ESC key; Also, an app route change won't dismiss it"
},
"noEscDismiss": {
"type": "Boolean",
"desc": "User cannot dismiss Dialog by hitting ESC key; No need to set it if 'persistent' prop is also set"
},
"noBackdropDismiss": {
"type": "Boolean",
"desc": "User cannot dismiss Dialog by clicking outside of it; No need to set it if 'persistent' prop is also set"
},
"noRouteDismiss": {
"type": "Boolean",
"desc": "Changing route app won't dismiss Dialog; No need to set it if 'persistent' prop is also set"
},
"seamless": {
"type": "Boolean",
"desc": "Put Dialog into seamless mode; Does not use a backdrop so user is able to interact with the rest of the page too"
},
"maximized": {
"type": "Boolean",
"desc": "Put Dialog into maximized mode"
},
"fullWidth": {
"type": "Boolean",
"desc": "Dialog will try to render with same width as the window"
},
"fullHeight": {
"type": "Boolean",
"desc": "Dialog will try to render with same height as the window"
},
"transitionShow": {
"extends": "transition",
"default": "scale"
},
"transitionHide": {
"extends": "transition",
"default": "scale"
},
"component": {
"type": "Any",
"desc": "Use custom dialog component; use along with 'parent' prop where possible; if using this prop, all others described here will be supplied to your custom component",
"__exemption": [ "examples" ]
},
"parent": {
"type": "Object",
"desc": "Required if using 'component' prop and you need access to vuex store, router and so on; Specify Vue parent component",
"examples": [ "parent: this" ]
},
"root": {
"type": "Object",
"desc": "Deprecated alias for parent",
"examples": [ "root: this" ]
},
"...props": {
"type": "Any",
"desc": "User defined props which will be forwarded to underlying custom component if 'component' prop is used",
"__exemption": [ "examples" ]
}
}
}
}
}
}
}