quasar 1.16.0 → 1.17.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 (304) hide show
  1. package/dist/api/BottomSheet.json +2 -2
  2. package/dist/api/Loading.json +0 -2
  3. package/dist/api/Notify.json +15 -15
  4. package/dist/api/QAvatar.json +1 -1
  5. package/dist/api/QBreadcrumbsEl.json +32 -11
  6. package/dist/api/QBtn.json +35 -14
  7. package/dist/api/QBtnDropdown.json +36 -15
  8. package/dist/api/QBtnToggle.json +1 -1
  9. package/dist/api/QCarousel.json +7 -7
  10. package/dist/api/QCarouselSlide.json +2 -2
  11. package/dist/api/QChatMessage.json +1 -5
  12. package/dist/api/QChip.json +4 -4
  13. package/dist/api/QColor.json +6 -0
  14. package/dist/api/QDialog.json +7 -1
  15. package/dist/api/QExpansionItem.json +34 -13
  16. package/dist/api/QFab.json +34 -2
  17. package/dist/api/QFabAction.json +9 -1
  18. package/dist/api/QField.json +80 -6
  19. package/dist/api/QFile.json +80 -6
  20. package/dist/api/QImg.json +2 -2
  21. package/dist/api/QInnerLoading.json +32 -0
  22. package/dist/api/QInput.json +82 -6
  23. package/dist/api/QItem.json +31 -10
  24. package/dist/api/QOptionGroup.json +58 -1
  25. package/dist/api/QPagination.json +4 -4
  26. package/dist/api/QParallax.json +1 -1
  27. package/dist/api/QPopupEdit.json +14 -7
  28. package/dist/api/QPullToRefresh.json +1 -1
  29. package/dist/api/QRange.json +581 -96
  30. package/dist/api/QRating.json +3 -3
  31. package/dist/api/QRouteTab.json +32 -12
  32. package/dist/api/QScrollArea.json +188 -20
  33. package/dist/api/QSelect.json +81 -9
  34. package/dist/api/QSeparator.json +1 -1
  35. package/dist/api/QSlider.json +499 -34
  36. package/dist/api/QStep.json +4 -4
  37. package/dist/api/QStepper.json +4 -4
  38. package/dist/api/QTab.json +1 -1
  39. package/dist/api/QTable.json +4 -4
  40. package/dist/api/QTabs.json +9 -0
  41. package/dist/api/QTimelineEntry.json +2 -2
  42. package/dist/api/QToggle.json +1 -1
  43. package/dist/api/QTree.json +7 -1
  44. package/dist/api/QVideo.json +10 -0
  45. package/dist/icon-set/bootstrap-icons.umd.min.js +1 -1
  46. package/dist/icon-set/eva-icons.umd.min.js +1 -1
  47. package/dist/icon-set/fontawesome-v5-pro.umd.min.js +1 -1
  48. package/dist/icon-set/fontawesome-v5.umd.min.js +1 -1
  49. package/dist/icon-set/ionicons-v4.umd.min.js +1 -1
  50. package/dist/icon-set/line-awesome.umd.min.js +1 -1
  51. package/dist/icon-set/material-icons-outlined.umd.min.js +1 -1
  52. package/dist/icon-set/material-icons-round.umd.min.js +1 -1
  53. package/dist/icon-set/material-icons-sharp.umd.min.js +1 -1
  54. package/dist/icon-set/material-icons.umd.min.js +1 -1
  55. package/dist/icon-set/mdi-v3.umd.min.js +1 -1
  56. package/dist/icon-set/mdi-v4.umd.min.js +1 -1
  57. package/dist/icon-set/mdi-v5.umd.min.js +1 -1
  58. package/dist/icon-set/mdi-v6.umd.min.js +1 -1
  59. package/dist/icon-set/svg-bootstrap-icons.umd.min.js +1 -1
  60. package/dist/icon-set/svg-eva-icons.umd.min.js +1 -1
  61. package/dist/icon-set/svg-fontawesome-v5.umd.min.js +1 -1
  62. package/dist/icon-set/svg-ionicons-v4.umd.min.js +1 -1
  63. package/dist/icon-set/svg-ionicons-v5.umd.min.js +1 -1
  64. package/dist/icon-set/svg-ionicons-v6.umd.min.js +6 -0
  65. package/dist/icon-set/svg-line-awesome.umd.min.js +1 -1
  66. package/dist/icon-set/svg-material-icons-outlined.umd.min.js +1 -1
  67. package/dist/icon-set/svg-material-icons-round.umd.min.js +1 -1
  68. package/dist/icon-set/svg-material-icons-sharp.umd.min.js +1 -1
  69. package/dist/icon-set/svg-material-icons.umd.min.js +1 -1
  70. package/dist/icon-set/svg-mdi-v4.umd.min.js +1 -1
  71. package/dist/icon-set/svg-mdi-v5.umd.min.js +1 -1
  72. package/dist/icon-set/svg-mdi-v6.umd.min.js +1 -1
  73. package/dist/icon-set/svg-themify.umd.min.js +1 -1
  74. package/dist/icon-set/themify.umd.min.js +1 -1
  75. package/dist/lang/ar.umd.min.js +2 -2
  76. package/dist/lang/az-latn.umd.min.js +1 -1
  77. package/dist/lang/bg.umd.min.js +1 -1
  78. package/dist/lang/ca.umd.min.js +1 -1
  79. package/dist/lang/cs.umd.min.js +1 -1
  80. package/dist/lang/da.umd.min.js +1 -1
  81. package/dist/lang/de.umd.min.js +2 -2
  82. package/dist/lang/el.umd.min.js +1 -1
  83. package/dist/lang/en-gb.umd.min.js +1 -1
  84. package/dist/lang/en-us.umd.min.js +1 -1
  85. package/dist/lang/eo.umd.min.js +1 -1
  86. package/dist/lang/es.umd.min.js +1 -1
  87. package/dist/lang/et.umd.min.js +1 -1
  88. package/dist/lang/fa-ir.umd.min.js +1 -1
  89. package/dist/lang/fa.umd.min.js +1 -1
  90. package/dist/lang/fi.umd.min.js +1 -1
  91. package/dist/lang/fr.umd.min.js +2 -2
  92. package/dist/lang/gn.umd.min.js +1 -1
  93. package/dist/lang/he.umd.min.js +1 -1
  94. package/dist/lang/hr.umd.min.js +1 -1
  95. package/dist/lang/hu.umd.min.js +1 -1
  96. package/dist/lang/id.umd.min.js +1 -1
  97. package/dist/lang/is.umd.min.js +1 -1
  98. package/dist/lang/it.umd.min.js +1 -1
  99. package/dist/lang/ja.umd.min.js +1 -1
  100. package/dist/lang/km.umd.min.js +1 -1
  101. package/dist/lang/ko-kr.umd.min.js +1 -1
  102. package/dist/lang/kur-ckb.umd.min.js +1 -1
  103. package/dist/lang/lu.umd.min.js +1 -1
  104. package/dist/lang/lv.umd.min.js +1 -1
  105. package/dist/lang/ml.umd.min.js +1 -1
  106. package/dist/lang/ms.umd.min.js +1 -1
  107. package/dist/lang/nb-no.umd.min.js +1 -1
  108. package/dist/lang/nl.umd.min.js +1 -1
  109. package/dist/lang/pl.umd.min.js +1 -1
  110. package/dist/lang/pt-br.umd.min.js +1 -1
  111. package/dist/lang/pt.umd.min.js +1 -1
  112. package/dist/lang/ro.umd.min.js +1 -1
  113. package/dist/lang/ru.umd.min.js +1 -1
  114. package/dist/lang/sk.umd.min.js +1 -1
  115. package/dist/lang/sl.umd.min.js +1 -1
  116. package/dist/lang/sr.umd.min.js +2 -2
  117. package/dist/lang/sv.umd.min.js +1 -1
  118. package/dist/lang/ta.umd.min.js +1 -1
  119. package/dist/lang/th.umd.min.js +1 -1
  120. package/dist/lang/tr.umd.min.js +1 -1
  121. package/dist/lang/ug.umd.min.js +2 -2
  122. package/dist/lang/uk.umd.min.js +1 -1
  123. package/dist/lang/vi.umd.min.js +1 -1
  124. package/dist/lang/zh-hans.umd.min.js +2 -2
  125. package/dist/lang/zh-hant.umd.min.js +2 -2
  126. package/dist/quasar.addon.css +1 -1
  127. package/dist/quasar.addon.rtl.css +1 -1
  128. package/dist/quasar.common.js +2 -2
  129. package/dist/quasar.css +376 -228
  130. package/dist/quasar.esm.js +2 -2
  131. package/dist/quasar.ie.polyfills.js +1 -1
  132. package/dist/quasar.ie.polyfills.umd.min.js +1 -1
  133. package/dist/quasar.min.css +1 -1
  134. package/dist/quasar.rtl.css +508 -304
  135. package/dist/quasar.rtl.min.css +1 -1
  136. package/dist/quasar.sass +324 -210
  137. package/dist/quasar.styl +324 -210
  138. package/dist/quasar.umd.js +3098 -1836
  139. package/dist/quasar.umd.min.js +2 -2
  140. package/dist/quasar.umd.modern.js +3057 -1817
  141. package/dist/quasar.umd.modern.min.js +2 -2
  142. package/dist/transform-asset-urls.json +20 -0
  143. package/dist/types/index.d.ts +421 -103
  144. package/dist/types/utils/scroll.d.ts +1 -0
  145. package/dist/vetur/quasar-attributes.json +313 -89
  146. package/dist/vetur/quasar-tags.json +74 -18
  147. package/dist/web-types/web-types.json +1289 -259
  148. package/icon-set/svg-ionicons-v6.js +225 -0
  149. package/lang/ar.js +1 -1
  150. package/lang/de.js +1 -1
  151. package/lang/fa-ir.js +3 -1
  152. package/lang/fa.js +3 -1
  153. package/lang/fr.js +1 -1
  154. package/lang/index.json +1 -1
  155. package/lang/kur-ckb.js +2 -2
  156. package/lang/sr.js +4 -4
  157. package/lang/ug.js +48 -46
  158. package/lang/zh-hans.js +1 -1
  159. package/lang/zh-hant.js +18 -18
  160. package/package.json +1 -1
  161. package/src/api.extends.json +1 -2
  162. package/src/components/breadcrumbs/QBreadcrumbs.js +15 -11
  163. package/src/components/breadcrumbs/QBreadcrumbs.sass +0 -3
  164. package/src/components/breadcrumbs/QBreadcrumbs.styl +0 -3
  165. package/src/components/breadcrumbs/QBreadcrumbsEl.js +25 -9
  166. package/src/components/btn/QBtn.js +3 -3
  167. package/src/components/btn-dropdown/QBtnDropdown.sass +2 -0
  168. package/src/components/btn-dropdown/QBtnDropdown.styl +2 -0
  169. package/src/components/carousel/QCarousel.js +6 -2
  170. package/src/components/carousel/QCarousel.json +9 -1
  171. package/src/components/carousel/QCarouselSlide.json +2 -2
  172. package/src/components/chat/QChatMessage.json +1 -1
  173. package/src/components/color/QColor.js +100 -85
  174. package/src/components/color/QColor.json +7 -0
  175. package/src/components/color/QColor.sass +14 -24
  176. package/src/components/color/QColor.styl +14 -24
  177. package/src/components/date/QDate.js +7 -1
  178. package/src/components/date/QDate.sass +2 -0
  179. package/src/components/date/QDate.styl +2 -0
  180. package/src/components/dialog/QDialog.js +8 -4
  181. package/src/components/dialog/QDialog.json +8 -1
  182. package/src/components/drawer/QDrawer.js +16 -15
  183. package/src/components/editor/QEditor.js +2 -2
  184. package/src/components/editor/QEditor.sass +13 -1
  185. package/src/components/editor/QEditor.styl +13 -1
  186. package/src/components/expansion-item/QExpansionItem.js +13 -11
  187. package/src/components/fab/QFab.js +20 -11
  188. package/src/components/fab/QFab.json +35 -0
  189. package/src/components/fab/QFabAction.js +16 -9
  190. package/src/components/fab/QFabAction.json +10 -0
  191. package/src/components/field/QField.js +28 -23
  192. package/src/components/field/__QField.json +72 -8
  193. package/src/components/file/QFile.js +12 -4
  194. package/src/components/file/QFile.sass +4 -3
  195. package/src/components/file/QFile.styl +4 -3
  196. package/src/components/footer/QFooter.js +1 -1
  197. package/src/components/form/QForm.js +1 -1
  198. package/src/components/header/QHeader.js +1 -1
  199. package/src/components/icon/QIcon.js +54 -49
  200. package/src/components/img/QImg.json +2 -2
  201. package/src/components/infinite-scroll/QInfiniteScroll.js +49 -36
  202. package/src/components/inner-loading/QInnerLoading.js +54 -22
  203. package/src/components/inner-loading/QInnerLoading.json +29 -0
  204. package/src/components/inner-loading/QInnerLoading.sass +3 -0
  205. package/src/components/inner-loading/QInnerLoading.styl +3 -0
  206. package/src/components/item/QItem.js +9 -15
  207. package/src/components/linear-progress/QLinearProgress.js +6 -2
  208. package/src/components/menu/QMenu.js +5 -1
  209. package/src/components/option-group/QOptionGroup.js +32 -22
  210. package/src/components/option-group/QOptionGroup.json +50 -1
  211. package/src/components/parallax/QParallax.js +3 -0
  212. package/src/components/parallax/QParallax.json +1 -1
  213. package/src/components/popup-edit/QPopupEdit.js +41 -16
  214. package/src/components/popup-edit/QPopupEdit.json +15 -8
  215. package/src/components/range/QRange.js +223 -278
  216. package/src/components/range/QRange.json +11 -122
  217. package/src/components/rating/QRating.js +56 -38
  218. package/src/components/rating/QRating.json +3 -3
  219. package/src/components/rating/QRating.sass +8 -6
  220. package/src/components/rating/QRating.styl +8 -6
  221. package/src/components/resize-observer/QResizeObserver.js +15 -10
  222. package/src/components/scroll-area/QScrollArea.js +342 -126
  223. package/src/components/scroll-area/QScrollArea.json +164 -20
  224. package/src/components/scroll-area/QScrollArea.sass +4 -0
  225. package/src/components/scroll-area/QScrollArea.styl +4 -0
  226. package/src/components/scroll-observer/QScrollObserver.js +9 -2
  227. package/src/components/select/QSelect.js +8 -2
  228. package/src/components/separator/QSeparator.js +0 -1
  229. package/src/components/separator/QSeparator.json +1 -1
  230. package/src/components/slider/QSlider.js +97 -140
  231. package/src/components/slider/QSlider.json +1 -122
  232. package/src/components/slider/QSlider.sass +205 -139
  233. package/src/components/slider/QSlider.styl +205 -139
  234. package/src/components/slider/slider-utils.js +468 -123
  235. package/src/components/slider/slider-utils.json +546 -0
  236. package/src/components/stepper/QStepper.js +1 -1
  237. package/src/components/stepper/QStepper.sass +25 -26
  238. package/src/components/stepper/QStepper.styl +25 -26
  239. package/src/components/table/QTable.sass +3 -0
  240. package/src/components/table/QTable.styl +3 -0
  241. package/src/components/tabs/QRouteTab.js +13 -13
  242. package/src/components/tabs/QRouteTab.json +0 -7
  243. package/src/components/tabs/QTab.js +71 -20
  244. package/src/components/tabs/QTabs.js +237 -52
  245. package/src/components/tabs/QTabs.json +8 -0
  246. package/src/components/tabs/QTabs.sass +6 -6
  247. package/src/components/tabs/QTabs.styl +6 -6
  248. package/src/components/time/QTime.js +6 -2
  249. package/src/components/timeline/QTimelineEntry.json +1 -1
  250. package/src/components/tree/QTree.js +10 -6
  251. package/src/components/tree/QTree.json +5 -0
  252. package/src/components/tree/QTree.sass +58 -4
  253. package/src/components/tree/QTree.styl +58 -4
  254. package/src/components/uploader/QUploaderBase.js +15 -19
  255. package/src/components/video/QVideo.js +4 -1
  256. package/src/components/video/QVideo.json +11 -0
  257. package/src/components/virtual-scroll/QVirtualScroll.sass +1 -0
  258. package/src/components/virtual-scroll/QVirtualScroll.styl +1 -0
  259. package/src/css/core/helpers.sass +3 -0
  260. package/src/css/core/helpers.styl +3 -0
  261. package/src/css/core/positioning.sass +5 -0
  262. package/src/css/core/positioning.styl +5 -0
  263. package/src/css/normalize.sass +0 -7
  264. package/src/css/normalize.styl +0 -7
  265. package/src/css/variables.sass +4 -6
  266. package/src/css/variables.styl +4 -6
  267. package/src/directives/Scroll.js +2 -2
  268. package/src/directives/ScrollFire.js +1 -0
  269. package/src/ie-compat/ie.js +13 -13
  270. package/src/install.js +1 -1
  271. package/src/lang.js +7 -4
  272. package/src/mixins/anchor.js +3 -13
  273. package/src/mixins/btn.js +30 -38
  274. package/src/mixins/btn.json +26 -11
  275. package/src/mixins/file.js +27 -5
  276. package/src/mixins/fullscreen.js +16 -4
  277. package/src/mixins/portal.js +10 -10
  278. package/src/mixins/router-link.js +88 -14
  279. package/src/mixins/router-link.json +26 -10
  280. package/src/mixins/validate.js +33 -15
  281. package/src/mixins/virtual-scroll.js +40 -42
  282. package/src/plugins/AppFullscreen.js +41 -16
  283. package/src/plugins/BottomSheet.json +1 -1
  284. package/src/plugins/Cookies.js +1 -1
  285. package/src/plugins/Loading.js +8 -0
  286. package/src/plugins/LoadingBar.js +9 -0
  287. package/src/plugins/Notify.js +351 -333
  288. package/src/plugins/Notify.json +10 -10
  289. package/src/plugins/Notify.sass +9 -3
  290. package/src/plugins/Notify.styl +9 -3
  291. package/src/utils/clone.js +53 -4
  292. package/src/utils/date.js +134 -69
  293. package/src/utils/dom.js +28 -9
  294. package/src/utils/extend.js +2 -2
  295. package/src/utils/focus-manager.js +8 -10
  296. package/src/utils/global-dialog.js +18 -1
  297. package/src/utils/is.js +2 -2
  298. package/src/utils/morph.js +2 -12
  299. package/src/utils/scroll.js +71 -35
  300. package/src/.DS_Store +0 -0
  301. package/src/components/.DS_Store +0 -0
  302. package/src/components/layout/.DS_Store +0 -0
  303. package/src/css/.DS_Store +0 -0
  304. package/src/utils/.DS_Store +0 -0
@@ -106,27 +106,37 @@ export default Vue.extend({
106
106
  class: this.classes,
107
107
  attrs: this.attrs,
108
108
  on: { ...this.qListeners }
109
- }, this.options.map(opt => h('div', [
110
- h(this.component, {
111
- props: {
112
- value: this.value,
113
- val: opt.value,
114
- name: opt.name === void 0 ? this.name : opt.name,
115
- disable: this.disable || opt.disable,
116
- label: opt.label,
117
- leftLabel: opt.leftLabel === void 0 ? this.leftLabel : opt.leftLabel,
118
- color: opt.color === void 0 ? this.color : opt.color,
119
- checkedIcon: opt.checkedIcon,
120
- uncheckedIcon: opt.uncheckedIcon,
121
- dark: opt.dark || this.isDark,
122
- size: opt.size === void 0 ? this.size : opt.size,
123
- dense: this.dense,
124
- keepColor: opt.keepColor === void 0 ? this.keepColor : opt.keepColor
125
- },
126
- on: cache(this, 'inp', {
127
- input: this.__update
128
- })
129
- })
130
- ])))
109
+ }, this.options.map((opt, i) => {
110
+ const child = this.$scopedSlots[ 'label-' + i ] !== void 0
111
+ ? this.$scopedSlots[ 'label-' + i ](opt)
112
+ : (
113
+ this.$scopedSlots.label !== void 0
114
+ ? this.$scopedSlots.label(opt)
115
+ : void 0
116
+ )
117
+
118
+ return h('div', [
119
+ h(this.component, {
120
+ props: {
121
+ value: this.value,
122
+ val: opt.value,
123
+ name: opt.name === void 0 ? this.name : opt.name,
124
+ disable: this.disable || opt.disable,
125
+ label: child === void 0 ? opt.label : void 0,
126
+ leftLabel: opt.leftLabel === void 0 ? this.leftLabel : opt.leftLabel,
127
+ color: opt.color === void 0 ? this.color : opt.color,
128
+ checkedIcon: opt.checkedIcon,
129
+ uncheckedIcon: opt.uncheckedIcon,
130
+ dark: opt.dark || this.isDark,
131
+ size: opt.size === void 0 ? this.size : opt.size,
132
+ dense: this.dense,
133
+ keepColor: opt.keepColor === void 0 ? this.keepColor : opt.keepColor
134
+ },
135
+ on: cache(this, 'inp', {
136
+ input: this.__update
137
+ })
138
+ }, child)
139
+ ])
140
+ }))
131
141
  }
132
142
  })
@@ -19,7 +19,30 @@
19
19
 
20
20
  "options": {
21
21
  "type": "Array",
22
- "desc": "Array of objects with value and label props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly",
22
+ "desc": "Array of objects with value, label, and disable (optional) props. The binary components will be created according to this array; Props from QToggle, QCheckbox or QRadio can also be added as key/value pairs to control the components singularly",
23
+ "definition": {
24
+ "label": {
25
+ "type": "String",
26
+ "desc": "Label to display along the component",
27
+ "required": true,
28
+ "examples": [ "Option 1", "Option 2", "Option 3" ]
29
+ },
30
+ "value": {
31
+ "type": "Any",
32
+ "desc": "Value of the option that will be used by the component model",
33
+ "required": true,
34
+ "examples": [ "op1", "op2", "op3" ]
35
+ },
36
+ "disable": {
37
+ "type": "Boolean",
38
+ "desc": "If true, the option will be disabled"
39
+ },
40
+ "...props": {
41
+ "type": "Any",
42
+ "desc": "Any other props from QToggle, QCheckbox, or QRadio",
43
+ "examples": [ "val=\"car\"", ":true-value=\"trueValue\"", "checked-icon=\"visibility\"" ]
44
+ }
45
+ },
23
46
  "examples": [
24
47
  ":options=\"[ { label: 'Option 1', value: 'op1' }, { label: 'Option 2', value: 'op2' }, { label: 'Option 3', value: 'op3', disable: true } ]\""
25
48
  ],
@@ -82,6 +105,32 @@
82
105
  }
83
106
  },
84
107
 
108
+ "scopedSlots": {
109
+ "label": {
110
+ "desc": "Generic slot for all labels",
111
+ "scope": {
112
+ "opt": {
113
+ "type": "Object",
114
+ "desc": "The corresponding option entry from the 'options' prop",
115
+ "__exemption": [ "examples" ]
116
+ }
117
+ },
118
+ "addedIn": "v1.17"
119
+ },
120
+
121
+ "label-[name]": {
122
+ "desc": "Slot to define the specific label for the option at '[name]' where name is a 0-based index; Overrides the generic 'label' slot if used",
123
+ "scope": {
124
+ "opt": {
125
+ "type": "Object",
126
+ "desc": "The corresponding option entry from the 'options' prop",
127
+ "__exemption": [ "examples" ]
128
+ }
129
+ },
130
+ "addedIn": "v1.17"
131
+ }
132
+ },
133
+
85
134
  "events": {
86
135
  "input": {
87
136
  "extends": "input"
@@ -103,6 +103,9 @@ export default Vue.extend({
103
103
  __stop () {
104
104
  if (this.working === true) {
105
105
  this.working = false
106
+ this.__setPos.cancel()
107
+ this.__update.cancel()
108
+ this.__resizeHandler.cancel()
106
109
  this.__scrollTarget.removeEventListener('scroll', this.__updatePos, passive)
107
110
  window.removeEventListener('resize', this.__resizeHandler, passive)
108
111
  this.__scrollTarget = void 0
@@ -13,7 +13,7 @@
13
13
  "desc": "Path to image (unless a 'media' slot is used)",
14
14
  "transformAssetUrls": true,
15
15
  "examples": [
16
- "(statics folder) src=\"statics/img/something.png\"",
16
+ "(public folder) src=\"img/something.png\"",
17
17
  "(assets folder) src=\"~assets/my-img.png\"",
18
18
  "(relative path format) :src=\"require('./my_img.jpg')\"",
19
19
  "(URL) src=\"https://some-site.net/some-img.jpg\""
@@ -49,7 +49,8 @@ export default Vue.extend({
49
49
 
50
50
  data () {
51
51
  return {
52
- initialValue: ''
52
+ modelChanged: false,
53
+ model: null
53
54
  }
54
55
  },
55
56
 
@@ -59,15 +60,30 @@ export default Vue.extend({
59
60
  (this.contentClass !== void 0 ? ` ${this.contentClass}` : '')
60
61
  },
61
62
 
63
+ modelValue () {
64
+ return this.modelChanged === true ? this.model : this.value
65
+ },
66
+
67
+ initialValue () {
68
+ return this.modelChanged !== true ? this.model : this.value
69
+ },
70
+
62
71
  defaultSlotScope () {
63
- return {
72
+ const acc = {
64
73
  initialValue: this.initialValue,
65
- value: this.value,
66
- emitValue: this.__emitValue,
74
+ updatePosition: this.__reposition,
75
+ emitValue: this.__changeModel,
67
76
  validate: this.validate,
68
77
  set: this.set,
69
78
  cancel: this.cancel
70
79
  }
80
+
81
+ Object.defineProperty(acc, 'value', {
82
+ get: () => this.modelValue,
83
+ set: this.__changeModel
84
+ })
85
+
86
+ return acc
71
87
  },
72
88
 
73
89
  menuProps () {
@@ -81,19 +97,20 @@ export default Vue.extend({
81
97
 
82
98
  methods: {
83
99
  set () {
84
- if (this.validate(this.value) !== true) {
100
+ if (this.validate(this.modelValue) !== true) {
85
101
  return
86
102
  }
87
103
  if (this.__hasChanged() === true) {
88
- this.$emit('save', this.value, this.initialValue)
104
+ this.$emit('save', this.modelValue, this.initialValue)
105
+ this.modelChanged === true && this.$emit('input', this.modelValue)
89
106
  }
90
107
  this.__close()
91
108
  },
92
109
 
93
110
  cancel () {
94
111
  if (this.__hasChanged() === true) {
95
- this.$emit('input', this.initialValue)
96
- this.$emit('cancel', this.value, this.initialValue)
112
+ this.$emit('cancel', this.modelValue, this.initialValue)
113
+ this.modelChanged !== true && this.$emit('input', this.initialValue)
97
114
  }
98
115
  this.__close()
99
116
  },
@@ -107,12 +124,13 @@ export default Vue.extend({
107
124
  },
108
125
 
109
126
  __hasChanged () {
110
- return isDeepEqual(this.value, this.initialValue) === false
127
+ return isDeepEqual(this.modelValue, this.initialValue) === false
111
128
  },
112
129
 
113
- __emitValue (val) {
130
+ __changeModel (val) {
114
131
  if (this.disable !== true) {
115
- this.$emit('input', val)
132
+ this.model = val
133
+ this.modelChanged = true
116
134
  }
117
135
  },
118
136
 
@@ -172,32 +190,39 @@ export default Vue.extend({
172
190
  on: cache(this, 'menu', {
173
191
  'before-show': () => {
174
192
  this.validated = false
175
- this.initialValue = clone(this.value)
193
+ this.modelChanged = false
194
+ this.model = clone(this.value)
176
195
  this.watcher = this.$watch('value', this.__reposition)
177
196
  this.$emit('before-show')
178
197
  },
198
+
179
199
  show: () => {
180
200
  this.$emit('show')
181
201
  },
202
+
182
203
  'escape-key': this.cancel,
204
+
183
205
  'before-hide': () => {
184
206
  this.watcher()
185
207
 
186
208
  if (this.validated === false && this.__hasChanged() === true) {
187
- if (this.autoSave === true && this.validate(this.value) === true) {
188
- this.$emit('save', this.value, this.initialValue)
209
+ if (this.autoSave === true && this.validate(this.model) === true) {
210
+ this.$emit('save', this.modelValue, this.initialValue)
211
+ this.modelChanged === true && this.$emit('input', this.modelValue)
189
212
  }
190
213
  else {
191
- this.$emit('cancel', this.value, this.initialValue)
192
- this.$emit('input', this.initialValue)
214
+ this.$emit('cancel', this.modelValue, this.initialValue)
215
+ this.modelChanged !== true && this.$emit('input', this.initialValue)
193
216
  }
194
217
  }
195
218
 
196
219
  this.$emit('before-hide')
197
220
  },
221
+
198
222
  hide: () => {
199
223
  this.$emit('hide')
200
224
  },
225
+
201
226
  keyup: e => {
202
227
  isKeyCode(e, 13) === true && this.set()
203
228
  }
@@ -11,13 +11,6 @@
11
11
  "category": "model"
12
12
  },
13
13
 
14
- "auto-save": {
15
- "type": "Boolean",
16
- "desc": "Automatically save the model (if changed) when user clicks/taps outside of the popup; It does not apply to ESC key",
17
- "category": "behavior",
18
- "addedIn": "v1.9.0"
19
- },
20
-
21
14
  "title": {
22
15
  "type": "String",
23
16
  "desc": "Optional title (unless 'title' slot is used)",
@@ -45,6 +38,13 @@
45
38
  "category": "content"
46
39
  },
47
40
 
41
+ "auto-save": {
42
+ "type": "Boolean",
43
+ "desc": "Automatically save the model (if changed) when user clicks/taps outside of the popup; It does not apply to ESC key",
44
+ "category": "behavior",
45
+ "addedIn": "v1.9.0"
46
+ },
47
+
48
48
  "content-class": {
49
49
  "type": "String",
50
50
  "desc": "Class definitions to be attributed to the content",
@@ -182,7 +182,7 @@
182
182
 
183
183
  "scopedSlots": {
184
184
  "default": {
185
- "desc": "Used for injecting the form component",
185
+ "desc": "Used for injecting the form component; Do NOT destructure it",
186
186
  "scope": {
187
187
  "initialValue": {
188
188
  "type": "Any",
@@ -232,6 +232,13 @@
232
232
  "desc": "Function that cancels the editing and reverts the value to the initialValue",
233
233
  "params": null,
234
234
  "returns": null
235
+ },
236
+ "updatePosition": {
237
+ "type": "Function",
238
+ "desc": "There are some custom scenarios for which Quasar cannot automatically reposition the component without significant performance drawbacks so the optimal solution is for you to call this method when you need it",
239
+ "params": null,
240
+ "returns": null,
241
+ "addedIn": "v1.17"
235
242
  }
236
243
  }
237
244
  }