buefy 3.0.4 → 3.0.6
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/buefy.d.ts +257 -136
- package/dist/buefy.esm.js +212 -48
- package/dist/buefy.esm.min.js +2 -2
- package/dist/buefy.js +212 -46
- package/dist/buefy.min.js +2 -2
- package/dist/cjs/{Autocomplete-DEUs3z7g.js → Autocomplete-b0JUESTO.js} +3 -3
- package/dist/cjs/{Button-Cq7yqI8p.js → Button-Dw6VG6n7.js} +2 -2
- package/dist/cjs/{Checkbox-GPzAMQqM.js → Checkbox-cujzPKDl.js} +31 -3
- package/dist/cjs/{CompatFallthroughMixin-hhK0Gkhr.js → CompatFallthroughMixin-DI5L88ey.js} +1 -1
- package/dist/cjs/{Datepicker-B-9ReBe6.js → Datepicker-DVB975q3.js} +9 -9
- package/dist/cjs/{Dropdown-DtpKU9qf.js → Dropdown-CFh_lLvm.js} +2 -1
- package/dist/cjs/{DropdownItem-IMOKyRGV.js → DropdownItem-D2Ky1QIH.js} +1 -1
- package/dist/cjs/{Field-19ZCJFF8.js → Field-Dy73xhhY.js} +1 -1
- package/dist/cjs/{FormElementMixin-DavX4iOv.js → FormElementMixin-17PQ7TPR.js} +1 -1
- package/dist/cjs/{Icon-lsDKE2wQ.js → Icon-DrFLI3Zg.js} +48 -6
- package/dist/cjs/{Image-CocPwU3n.js → Image-D4AGl_2Z.js} +1 -1
- package/dist/cjs/{Input-BcloGeZ3.js → Input-z4Vlmbj8.js} +4 -4
- package/dist/cjs/{Modal-D1aZUehE.js → Modal-CVyLPawO.js} +1 -1
- package/dist/cjs/{NoticeMixin--3RjH43z.js → NoticeMixin-BlwAiMRV.js} +1 -1
- package/dist/cjs/{Pagination-D1MVdiLp.js → Pagination-54NHaQvi.js} +2 -2
- package/dist/cjs/{Progress-DT9Qc8Id.js → Progress-BlXLJ3zb.js} +1 -1
- package/dist/cjs/{Select-DayPKwCY.js → Select-DRXaEjlP.js} +3 -3
- package/dist/cjs/{TabbedChildMixin-B3JUUwcf.js → TabbedChildMixin-BFHsIyg6.js} +1 -1
- package/dist/cjs/{Tag-BprnwJJ1.js → Tag-BdL2uH8x.js} +1 -1
- package/dist/cjs/{Timepicker-CDZ3V-2J.js → Timepicker-ujQPxzDF.js} +6 -6
- package/dist/cjs/{TimepickerMixin-C9WVvcUL.js → TimepickerMixin-C9OA8jWF.js} +3 -3
- package/dist/cjs/{Tooltip-Cgighv0j.js → Tooltip-j_3eF7QD.js} +1 -1
- package/dist/cjs/autocomplete.js +7 -6
- package/dist/cjs/breadcrumb.js +2 -2
- package/dist/cjs/button.js +4 -3
- package/dist/cjs/carousel.js +5 -4
- package/dist/cjs/checkbox.js +3 -1
- package/dist/cjs/clockpicker.js +8 -7
- package/dist/cjs/colorpicker.js +12 -11
- package/dist/cjs/{config-DR826Ki2.js → config-CXSF5Vky.js} +2 -1
- package/dist/cjs/config.js +1 -1
- package/dist/cjs/datepicker.js +11 -10
- package/dist/cjs/datetimepicker.js +13 -12
- package/dist/cjs/dialog.js +5 -4
- package/dist/cjs/dropdown.js +3 -3
- package/dist/cjs/field.js +2 -2
- package/dist/cjs/icon.js +5 -2
- package/dist/cjs/iconAliases-DoayKo0q.js +100 -0
- package/dist/cjs/image.js +2 -2
- package/dist/cjs/{index-SLOXD6k3.js → index-N35FRTpu.js} +9 -9
- package/dist/cjs/index.js +27 -24
- package/dist/cjs/input.js +6 -5
- package/dist/cjs/menu.js +4 -3
- package/dist/cjs/message.js +4 -3
- package/dist/cjs/modal.js +2 -2
- package/dist/cjs/navbar.js +2 -2
- package/dist/cjs/notification.js +5 -4
- package/dist/cjs/numberinput.js +6 -5
- package/dist/cjs/pagination.js +4 -3
- package/dist/cjs/progress.js +2 -2
- package/dist/cjs/rate.js +3 -2
- package/dist/cjs/select.js +6 -5
- package/dist/cjs/sidebar.js +1 -1
- package/dist/cjs/slider.js +3 -3
- package/dist/cjs/snackbar.js +2 -2
- package/dist/cjs/steps.js +4 -3
- package/dist/cjs/switch.js +1 -1
- package/dist/cjs/table.js +9 -8
- package/dist/cjs/tabs.js +4 -3
- package/dist/cjs/tag.js +4 -3
- package/dist/cjs/taginput.js +8 -7
- package/dist/cjs/timepicker.js +12 -11
- package/dist/cjs/toast.js +2 -2
- package/dist/cjs/tooltip.js +2 -2
- package/dist/cjs/upload.js +3 -3
- package/dist/components/autocomplete/index.js +122 -6
- package/dist/components/autocomplete/index.min.js +2 -2
- package/dist/components/breadcrumb/index.js +1 -1
- package/dist/components/breadcrumb/index.min.js +1 -1
- package/dist/components/button/index.js +122 -6
- package/dist/components/button/index.min.js +2 -2
- package/dist/components/carousel/index.js +123 -7
- package/dist/components/carousel/index.min.js +2 -2
- package/dist/components/checkbox/index.js +106 -4
- package/dist/components/checkbox/index.min.js +2 -2
- package/dist/components/clockpicker/index.js +127 -10
- package/dist/components/clockpicker/index.min.js +2 -2
- package/dist/components/collapse/index.js +1 -1
- package/dist/components/collapse/index.min.js +1 -1
- package/dist/components/colorpicker/index.js +128 -11
- package/dist/components/colorpicker/index.min.js +2 -2
- package/dist/components/datepicker/index.js +135 -18
- package/dist/components/datepicker/index.min.js +2 -2
- package/dist/components/datetimepicker/index.js +127 -10
- package/dist/components/datetimepicker/index.min.js +2 -2
- package/dist/components/dialog/index.js +122 -6
- package/dist/components/dialog/index.min.js +2 -2
- package/dist/components/dropdown/index.js +2 -1
- package/dist/components/dropdown/index.min.js +2 -2
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.min.js +1 -1
- package/dist/components/icon/index.js +124 -6
- package/dist/components/icon/index.min.js +2 -2
- package/dist/components/image/index.js +1 -1
- package/dist/components/image/index.min.js +1 -1
- package/dist/components/input/index.js +122 -6
- package/dist/components/input/index.min.js +2 -2
- package/dist/components/loading/index.js +1 -1
- package/dist/components/loading/index.min.js +1 -1
- package/dist/components/menu/index.js +124 -8
- package/dist/components/menu/index.min.js +2 -2
- package/dist/components/message/index.js +122 -6
- package/dist/components/message/index.min.js +2 -2
- package/dist/components/modal/index.js +1 -1
- package/dist/components/modal/index.min.js +1 -1
- package/dist/components/navbar/index.js +1 -1
- package/dist/components/navbar/index.min.js +1 -1
- package/dist/components/notification/index.js +122 -6
- package/dist/components/notification/index.min.js +2 -2
- package/dist/components/numberinput/index.js +122 -6
- package/dist/components/numberinput/index.min.js +2 -2
- package/dist/components/pagination/index.js +122 -6
- package/dist/components/pagination/index.min.js +2 -2
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/index.min.js +1 -1
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/index.min.js +1 -1
- package/dist/components/rate/index.js +122 -6
- package/dist/components/rate/index.min.js +2 -2
- package/dist/components/select/index.js +122 -6
- package/dist/components/select/index.min.js +2 -2
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/index.min.js +1 -1
- package/dist/components/skeleton/index.js +1 -1
- package/dist/components/skeleton/index.min.js +1 -1
- package/dist/components/slider/index.js +1 -1
- package/dist/components/slider/index.min.js +1 -1
- package/dist/components/snackbar/index.js +1 -1
- package/dist/components/snackbar/index.min.js +1 -1
- package/dist/components/steps/index.js +122 -6
- package/dist/components/steps/index.min.js +2 -2
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/index.min.js +1 -1
- package/dist/components/table/index.js +156 -13
- package/dist/components/table/index.min.js +2 -2
- package/dist/components/tabs/index.js +122 -6
- package/dist/components/tabs/index.min.js +2 -2
- package/dist/components/tag/index.js +122 -6
- package/dist/components/tag/index.min.js +2 -2
- package/dist/components/taginput/index.js +122 -6
- package/dist/components/taginput/index.min.js +2 -2
- package/dist/components/timepicker/index.js +135 -18
- package/dist/components/timepicker/index.min.js +2 -2
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/index.min.js +1 -1
- package/dist/components/tooltip/index.js +1 -1
- package/dist/components/tooltip/index.min.js +1 -1
- package/dist/components/upload/index.js +1 -1
- package/dist/components/upload/index.min.js +1 -1
- package/dist/css/buefy.css +21 -38
- package/dist/css/buefy.css.map +1 -1
- package/dist/css/buefy.min.css +1 -1
- package/dist/css/versions/buefy-no-reset.css +21 -38
- package/dist/css/versions/buefy-no-reset.css.map +1 -1
- package/dist/css/versions/buefy-no-reset.min.css +1 -1
- package/dist/css/versions/buefy-standalone.css +21 -38
- package/dist/css/versions/buefy-standalone.css.map +1 -1
- package/dist/css/versions/buefy-standalone.min.css +1 -1
- package/dist/esm/{Autocomplete-CZ8DmXsB.js → Autocomplete-BsBIH0Mj.js} +4 -4
- package/dist/esm/{Button-DyUYShTZ.js → Button-BTP__-p5.js} +3 -3
- package/dist/esm/{Checkbox-KUMz0sfA.js → Checkbox-C6pO3IzG.js} +32 -4
- package/dist/esm/{CompatFallthroughMixin-C8LPuwDr.js → CompatFallthroughMixin-LfFRwwlz.js} +1 -1
- package/dist/esm/{Datepicker-Bl8Wfdkn.js → Datepicker-CrVKrZBF.js} +10 -10
- package/dist/esm/{Dropdown-CGTYVyoL.js → Dropdown-GHauDDcD.js} +3 -2
- package/dist/esm/{DropdownItem-Cn3nM0A3.js → DropdownItem-By3tSZk2.js} +2 -2
- package/dist/esm/{Field-B7bX_uUg.js → Field-CU8ZBgMh.js} +2 -2
- package/dist/esm/{FormElementMixin-Dd_wkBN5.js → FormElementMixin-CKI7b4I4.js} +1 -1
- package/dist/esm/{Icon-DPyGDeRK.js → Icon-pQAdaqZb.js} +49 -7
- package/dist/esm/{Image-DhX-4hlV.js → Image-COmzg-EK.js} +2 -2
- package/dist/esm/{Input-C4L520az.js → Input-CErQ1Jyw.js} +5 -5
- package/dist/esm/{Loading-tuQoo6TU.js → Loading-BSqhV1Gi.js} +1 -1
- package/dist/esm/{Modal-EiR_KNGZ.js → Modal-C13NJijf.js} +2 -2
- package/dist/esm/{NoticeMixin-ByNlva3T.js → NoticeMixin-TQEF1Kx6.js} +1 -1
- package/dist/esm/{Pagination-B-LAJQay.js → Pagination-DvgzxH87.js} +3 -3
- package/dist/esm/{Progress-BPGTVZgr.js → Progress-AeKn1Ttq.js} +2 -2
- package/dist/esm/{Select-bl4qUzij.js → Select-CbkuxvSQ.js} +4 -4
- package/dist/esm/{TabbedChildMixin-C4i6WP9j.js → TabbedChildMixin-Bdu5A4iY.js} +1 -1
- package/dist/esm/{Tag-jS5Bcj6N.js → Tag-Dx_-Tavp.js} +2 -2
- package/dist/esm/{Timepicker-DnkqnOBT.js → Timepicker-0ojuPkqd.js} +7 -7
- package/dist/esm/{TimepickerMixin-Bikh6_Fg.js → TimepickerMixin-oNahYGFZ.js} +3 -3
- package/dist/esm/{Tooltip-CtDSXAqa.js → Tooltip-BnzQFdnQ.js} +2 -2
- package/dist/esm/autocomplete.js +7 -6
- package/dist/esm/breadcrumb.js +3 -3
- package/dist/esm/button.js +4 -3
- package/dist/esm/carousel.js +6 -5
- package/dist/esm/checkbox.js +4 -2
- package/dist/esm/clockpicker.js +9 -8
- package/dist/esm/colorpicker.js +12 -11
- package/dist/esm/{config-CKuo-p6e.js → config-f4Dyy8TN.js} +2 -1
- package/dist/esm/config.js +1 -1
- package/dist/esm/datepicker.js +11 -10
- package/dist/esm/datetimepicker.js +14 -13
- package/dist/esm/dialog.js +6 -5
- package/dist/esm/dropdown.js +3 -3
- package/dist/esm/field.js +2 -2
- package/dist/esm/icon.js +3 -2
- package/dist/esm/iconAliases-B-CydxNj.js +97 -0
- package/dist/esm/image.js +2 -2
- package/dist/esm/{index-BE58-KfV.js → index-BYVep8cv.js} +11 -11
- package/dist/esm/index.js +27 -26
- package/dist/esm/input.js +6 -5
- package/dist/esm/loading.js +1 -1
- package/dist/esm/menu.js +5 -4
- package/dist/esm/message.js +5 -4
- package/dist/esm/modal.js +2 -2
- package/dist/esm/navbar.js +3 -3
- package/dist/esm/notification.js +6 -5
- package/dist/esm/numberinput.js +7 -6
- package/dist/esm/pagination.js +4 -3
- package/dist/esm/progress.js +3 -3
- package/dist/esm/radio.js +1 -1
- package/dist/esm/rate.js +4 -3
- package/dist/esm/select.js +6 -5
- package/dist/esm/sidebar.js +2 -2
- package/dist/esm/slider.js +4 -4
- package/dist/esm/snackbar.js +3 -3
- package/dist/esm/steps.js +5 -4
- package/dist/esm/switch.js +2 -2
- package/dist/esm/table.js +11 -10
- package/dist/esm/tabs.js +5 -4
- package/dist/esm/tag.js +5 -4
- package/dist/esm/taginput.js +9 -8
- package/dist/esm/timepicker.js +12 -11
- package/dist/esm/toast.js +3 -3
- package/dist/esm/tooltip.js +2 -2
- package/dist/esm/upload.js +4 -4
- package/dist/tsdoc-metadata.json +1 -1
- package/package.json +2 -2
- package/src/components/carousel/CarouselList.vue +1 -1
- package/src/components/carousel/__snapshots__/CarouselList.spec.ts.snap +1 -1
- package/src/components/checkbox/Checkbox.spec.ts +66 -2
- package/src/components/checkbox/Checkbox.vue +25 -1
- package/src/components/checkbox/__snapshots__/Checkbox.spec.ts.snap +1 -1
- package/src/components/datepicker/__snapshots__/Datepicker.spec.ts.snap +2 -2
- package/src/components/dropdown/Dropdown.spec.ts +15 -0
- package/src/components/dropdown/Dropdown.vue +5 -0
- package/src/components/icon/Icon.spec.ts +67 -0
- package/src/components/icon/Icon.vue +40 -5
- package/src/components/icon/__snapshots__/Icon.spec.ts.snap +1 -1
- package/src/components/icon/index.ts +10 -0
- package/src/components/table/__snapshots__/TableMobileSort.spec.ts.snap +1 -1
- package/src/scss/components/_checkbox.scss +13 -16
- package/src/utils/config.ts +104 -2
- package/src/utils/iconAliases.ts +86 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
|
|
@@ -160,6 +160,81 @@
|
|
|
160
160
|
return icons;
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
+
const defaultIconAliases = {
|
|
164
|
+
checkboxOn: {
|
|
165
|
+
type: "svg",
|
|
166
|
+
viewBox: "0 0 1 1",
|
|
167
|
+
path: "M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z"
|
|
168
|
+
},
|
|
169
|
+
checkboxIndeterminate: {
|
|
170
|
+
type: "svg",
|
|
171
|
+
viewBox: "0 0 1 1",
|
|
172
|
+
path: "M 0.15,0.4 L 0.85,0.4 L 0.85,0.6 L 0.15,0.6 Z"
|
|
173
|
+
},
|
|
174
|
+
chevronLeft: {
|
|
175
|
+
type: "svg",
|
|
176
|
+
path: "M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"
|
|
177
|
+
},
|
|
178
|
+
chevronRight: {
|
|
179
|
+
type: "svg",
|
|
180
|
+
path: "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
|
|
181
|
+
},
|
|
182
|
+
chevronDown: {
|
|
183
|
+
type: "svg",
|
|
184
|
+
path: "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"
|
|
185
|
+
},
|
|
186
|
+
chevronUp: {
|
|
187
|
+
type: "svg",
|
|
188
|
+
path: "M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"
|
|
189
|
+
},
|
|
190
|
+
menuDown: {
|
|
191
|
+
type: "svg",
|
|
192
|
+
path: "M7,10L12,15L17,10H7Z"
|
|
193
|
+
},
|
|
194
|
+
menuUp: {
|
|
195
|
+
type: "svg",
|
|
196
|
+
path: "M7,14L12,9L17,14H7Z"
|
|
197
|
+
},
|
|
198
|
+
check: {
|
|
199
|
+
type: "svg",
|
|
200
|
+
path: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"
|
|
201
|
+
},
|
|
202
|
+
alertCircle: {
|
|
203
|
+
type: "svg",
|
|
204
|
+
path: "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"
|
|
205
|
+
},
|
|
206
|
+
alert: {
|
|
207
|
+
type: "svg",
|
|
208
|
+
path: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"
|
|
209
|
+
},
|
|
210
|
+
information: {
|
|
211
|
+
type: "svg",
|
|
212
|
+
path: "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"
|
|
213
|
+
},
|
|
214
|
+
close: {
|
|
215
|
+
type: "svg",
|
|
216
|
+
path: "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
|
|
217
|
+
},
|
|
218
|
+
closeCircle: {
|
|
219
|
+
type: "svg",
|
|
220
|
+
path: "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"
|
|
221
|
+
},
|
|
222
|
+
eye: {
|
|
223
|
+
type: "svg",
|
|
224
|
+
path: "M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"
|
|
225
|
+
},
|
|
226
|
+
eyeOff: {
|
|
227
|
+
type: "svg",
|
|
228
|
+
path: "M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.18 16.38,18.6L16.81,19L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
function getIconAliases() {
|
|
232
|
+
return defaultIconAliases;
|
|
233
|
+
}
|
|
234
|
+
function resolveAlias(name) {
|
|
235
|
+
return getIconAliases()[name];
|
|
236
|
+
}
|
|
237
|
+
|
|
163
238
|
var _sfc_main$1 = vue.defineComponent({
|
|
164
239
|
name: "BIcon",
|
|
165
240
|
props: {
|
|
@@ -168,8 +243,11 @@
|
|
|
168
243
|
pack: String,
|
|
169
244
|
icon: {
|
|
170
245
|
type: String,
|
|
171
|
-
required:
|
|
246
|
+
required: false,
|
|
247
|
+
default: void 0
|
|
172
248
|
},
|
|
249
|
+
/** Key into IconAliases (e.g. "chevronLeft"). Takes precedence over icon/pack. */
|
|
250
|
+
alias: String,
|
|
173
251
|
size: String,
|
|
174
252
|
customSize: String,
|
|
175
253
|
customClass: String,
|
|
@@ -177,6 +255,26 @@
|
|
|
177
255
|
// This is used internally to show both MDI and FA icon
|
|
178
256
|
},
|
|
179
257
|
computed: {
|
|
258
|
+
resolvedAlias() {
|
|
259
|
+
var _a;
|
|
260
|
+
if (!this.alias) return null;
|
|
261
|
+
return (_a = resolveAlias(this.alias)) != null ? _a : null;
|
|
262
|
+
},
|
|
263
|
+
isSvgAlias() {
|
|
264
|
+
var _a;
|
|
265
|
+
return ((_a = this.resolvedAlias) == null ? void 0 : _a.type) === "svg";
|
|
266
|
+
},
|
|
267
|
+
isComponentAlias() {
|
|
268
|
+
var _a;
|
|
269
|
+
return ((_a = this.resolvedAlias) == null ? void 0 : _a.type) === "component";
|
|
270
|
+
},
|
|
271
|
+
// Typed accessors used in the template
|
|
272
|
+
resolvedAliasSvg() {
|
|
273
|
+
return this.resolvedAlias;
|
|
274
|
+
},
|
|
275
|
+
resolvedAliasComponent() {
|
|
276
|
+
return this.resolvedAlias;
|
|
277
|
+
},
|
|
180
278
|
iconConfig() {
|
|
181
279
|
const allIcons = getIcons();
|
|
182
280
|
return allIcons[this.newPack];
|
|
@@ -193,7 +291,8 @@
|
|
|
193
291
|
* internal icons are always MDI.
|
|
194
292
|
*/
|
|
195
293
|
newIcon() {
|
|
196
|
-
|
|
294
|
+
var _a;
|
|
295
|
+
return `${this.iconPrefix}${this.getEquivalentIconOf((_a = this.icon) != null ? _a : "")}`;
|
|
197
296
|
},
|
|
198
297
|
newPack() {
|
|
199
298
|
return this.pack || config.defaultIconPack;
|
|
@@ -260,6 +359,8 @@
|
|
|
260
359
|
return target;
|
|
261
360
|
};
|
|
262
361
|
|
|
362
|
+
const _hoisted_1$3 = ["viewBox"];
|
|
363
|
+
const _hoisted_2$3 = ["d"];
|
|
263
364
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
264
365
|
return vue.openBlock(), vue.createElementBlock(
|
|
265
366
|
"span",
|
|
@@ -267,17 +368,32 @@
|
|
|
267
368
|
class: vue.normalizeClass(["icon", [_ctx.newType, _ctx.size]])
|
|
268
369
|
},
|
|
269
370
|
[
|
|
270
|
-
|
|
371
|
+
_ctx.isSvgAlias ? (vue.openBlock(), vue.createElementBlock("svg", {
|
|
372
|
+
key: 0,
|
|
373
|
+
viewBox: _ctx.resolvedAliasSvg.viewBox || "0 0 24 24",
|
|
374
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
375
|
+
class: vue.normalizeClass(_ctx.customClass),
|
|
376
|
+
"aria-hidden": "true"
|
|
377
|
+
}, [
|
|
378
|
+
vue.createElementVNode("path", {
|
|
379
|
+
fill: "currentColor",
|
|
380
|
+
d: _ctx.resolvedAliasSvg.path
|
|
381
|
+
}, null, 8, _hoisted_2$3)
|
|
382
|
+
], 10, _hoisted_1$3)) : _ctx.isComponentAlias ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.resolvedAliasComponent.component), {
|
|
383
|
+
key: 1,
|
|
384
|
+
icon: _ctx.resolvedAliasComponent.icon,
|
|
385
|
+
class: vue.normalizeClass(_ctx.customClass)
|
|
386
|
+
}, null, 8, ["icon", "class"])) : !_ctx.useIconComponent ? (vue.openBlock(), vue.createElementBlock(
|
|
271
387
|
"i",
|
|
272
388
|
{
|
|
273
|
-
key:
|
|
389
|
+
key: 2,
|
|
274
390
|
class: vue.normalizeClass([_ctx.newPack, _ctx.newIcon, _ctx.newCustomSize, _ctx.customClass])
|
|
275
391
|
},
|
|
276
392
|
null,
|
|
277
393
|
2
|
|
278
394
|
/* CLASS */
|
|
279
395
|
)) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.useIconComponent), {
|
|
280
|
-
key:
|
|
396
|
+
key: 3,
|
|
281
397
|
icon: [_ctx.newPack, _ctx.newIcon],
|
|
282
398
|
size: _ctx.newCustomSize,
|
|
283
399
|
class: vue.normalizeClass([_ctx.customClass])
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Dialog={},e.Vue)}(this,(function(e,t){"use strict";const n=(e,t=!1)=>e?t?e.querySelectorAll('*[tabindex="-1"]'):e.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null;let o;const i={beforeMount:(e,{value:t=!0})=>{if(t){let t=n(e),i=n(e,!0);t&&t.length>0&&(o=o=>{t=n(e),i=n(e,!0);const a=t[0],l=t[t.length-1];o.target===a&&o.shiftKey&&"Tab"===o.key?(o.preventDefault(),l.focus()):(o.target===l||Array.from(i).indexOf(o.target)>=0)&&!o.shiftKey&&"Tab"===o.key&&(o.preventDefault(),a.focus())},e.addEventListener("keydown",o))}},unmounted:e=>{e.removeEventListener("keydown",o)}};let a={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultModalCanCancel:["escape","x","outside","button"],defaultTrapFocus:!0,defaultAutoFocus:!0,defaultButtonRounded:!1,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"]};function l(e){void 0!==e.remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)}function s(e){if(!e)return;const{component:t}=e;return t?t.exposed&&t.exposeProxy||t.proxy:void 0}const c={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},r=()=>{const e="fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}};var d=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n};var u=d(t.defineComponent({name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:{type:String,required:!0},size:String,customSize:String,customClass:String,both:Boolean},computed:{iconConfig(){return{mdi:c,fa:r(),fas:r(),far:r(),fad:r(),fab:r(),fal:r(),"fa-solid":r(),"fa-regular":r(),"fa-light":r(),"fa-thin":r(),"fa-duotone":r(),"fa-brands":r()}[this.newPack]},iconPrefix(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon(){return`${this.iconPrefix}${this.getEquivalentIconOf(this.icon)}`},newPack(){return this.pack||a.defaultIconPack},newType(){if(!this.type)return;let e=[];if("string"==typeof this.type)e=this.type.split("-");else for(const t in this.type)if(this.type[t]){e=t.split("-");break}if(e.length<=1)return;const[,...t]=e;return`has-text-${t.join("-")}`},newCustomSize(){return this.customSize||this.customSizeByPack},customSizeByPack(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent(){return this.component||a.defaultIconComponent}},methods:{getEquivalentIconOf(e){if(!this.both)return e;if(null==this.iconConfig)return e;const t=this.iconConfig;return t&&t.internalIcons&&t.internalIcons[e]?t.internalIcons[e]:e}}}),[["render",function(e,n,o,i,a,l){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["icon",[e.newType,e.size]])},[e.useIconComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.useIconComponent),{key:1,icon:[e.newPack,e.newIcon],size:e.newCustomSize,class:t.normalizeClass([e.customClass])},null,8,["icon","size","class"])):(t.openBlock(),t.createElementBlock("i",{key:0,class:t.normalizeClass([e.newPack,e.newIcon,e.newCustomSize,e.customClass])},null,2))],2)}]]);const m=["clip","keep"],p=["dialog","alertdialog"],f=t.defineComponent({name:"BModal",directives:{trapFocus:i},props:{modelValue:Boolean,component:[Object,Function,String],content:{type:[String,Object,Array]},programmatic:Boolean,props:Object,events:{type:Object,default:()=>({})},width:{type:[String,Number],default:960},hasModalCard:Boolean,animation:{type:String,default:"zoom-out"},canCancel:{type:[Array,Boolean],default:()=>a.defaultModalCanCancel},cancelCallback:{type:Function,default:()=>{}},scroll:{type:String,default:()=>"clip",validator:e=>m.indexOf(e)>=0},fullScreen:Boolean,trapFocus:{type:Boolean,default:()=>a.defaultTrapFocus},autoFocus:{type:Boolean,default:()=>a.defaultAutoFocus},customClass:String,customContentClass:[String,Array,Object],ariaRole:{type:String,validator:e=>p.indexOf(e)>=0},ariaModal:Boolean,ariaLabel:{type:String,validator:e=>Boolean(e)},closeButtonAriaLabel:{type:String,default:"close"},destroyOnHide:{type:Boolean,default:!0},renderOnMounted:{type:Boolean,default:!1}},emits:{"after-enter":()=>!0,"after-leave":()=>!0,cancel:e=>!0,close:()=>!0,"update:modelValue":e=>!0},data(){return{isActive:this.modelValue||!1,savedScrollTop:null,newWidth:"number"==typeof this.width?this.width+"px":this.width,animating:!this.modelValue,destroyed:!(this.modelValue||this.renderOnMounted)}},computed:{cancelOptions(){return"boolean"==typeof this.canCancel?this.canCancel?a.defaultModalCanCancel:[]:this.canCancel},showX(){return this.cancelOptions.indexOf("x")>=0},customStyle(){return this.fullScreen?null:{maxWidth:this.newWidth}}},watch:{modelValue(e){this.isActive=e},isActive(e){e&&(this.destroyed=!1),this.handleScroll(),this.$nextTick((()=>{e&&this.$el&&this.$el.focus&&this.autoFocus&&this.$el.focus()}))}},methods:{handleScroll(){"undefined"!=typeof window&&("clip"!==this.scroll?(this.savedScrollTop=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop,this.isActive?document.body.classList.add("is-noscroll"):document.body.classList.remove("is-noscroll"),this.isActive?document.body.style.top=`-${this.savedScrollTop}px`:(document.documentElement.scrollTop=this.savedScrollTop,document.body.style.top="",this.savedScrollTop=null)):this.isActive?document.documentElement.classList.add("is-clipped"):document.documentElement.classList.remove("is-clipped"))},cancel(e){this.cancelOptions.indexOf(e)<0||(this.$emit("cancel",e),this.cancelCallback.apply(null,[e]),this.close())},close(){this.$emit("close"),this.$emit("update:modelValue",!1),this.programmatic&&(this.isActive=!1,setTimeout((()=>{l(this.$el)}),150))},keyPress({key:e}){!this.isActive||"Escape"!==e&&"Esc"!==e||this.cancel("escape")},afterEnter(){this.animating=!1,this.$emit("after-enter")},beforeLeave(){this.animating=!0},afterLeave(){this.destroyOnHide&&(this.destroyed=!0),this.$emit("after-leave")}},created(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},mounted(){this.programmatic?(document.body.appendChild(this.$el),this.isActive=!0):this.isActive&&this.handleScroll()},beforeUnmount(){if("undefined"!=typeof window){document.removeEventListener("keyup",this.keyPress),document.documentElement.classList.remove("is-clipped");const e=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop;document.body.classList.remove("is-noscroll"),document.documentElement.scrollTop=e,document.body.style.top=""}}}),h=["role","aria-label","aria-modal"],g=["innerHTML"],y=["aria-label"];var v=d(f,[["render",function(e,n,o,i,a,l){const s=t.resolveDirective("trap-focus");return t.openBlock(),t.createBlock(t.Transition,{name:e.animation,onAfterEnter:e.afterEnter,onBeforeLeave:e.beforeLeave,onAfterLeave:e.afterLeave},{default:t.withCtx((()=>[e.destroyed?t.createCommentVNode("v-if",!0):t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["modal is-active",[{"is-full-screen":e.fullScreen},e.customClass]]),tabindex:"-1",role:e.ariaRole,"aria-label":e.ariaLabel,"aria-modal":e.ariaModal||void 0},[t.createElementVNode("div",{class:"modal-background",onClick:n[0]||(n[0]=t=>e.cancel("outside"))}),t.createElementVNode("div",{class:t.normalizeClass(["animation-content",[{"modal-content":!e.hasModalCard},e.customContentClass]]),style:t.normalizeStyle(e.customStyle)},[e.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.component),t.mergeProps({key:0},e.props,t.toHandlers(e.events),{"can-cancel":e.canCancel,onClose:e.close}),null,16,["can-cancel","onClose"])):e.content?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" eslint-disable-next-line vue/no-v-html "),t.createElementVNode("div",{innerHTML:e.content},null,8,g)],64)):t.renderSlot(e.$slots,"default",{key:2,canCancel:e.canCancel,close:e.close})],6),e.showX?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:0,class:"modal-close is-large","aria-label":e.closeButtonAriaLabel,onClick:n[1]||(n[1]=t=>e.cancel("x"))},null,8,y)),[[t.vShow,!e.animating]]):t.createCommentVNode("v-if",!0)],10,h)),[[t.vShow,e.isActive],[s,e.trapFocus]])])),_:3},8,["name","onAfterEnter","onBeforeLeave","onAfterLeave"])}]]);const C=["button","submit","reset"];var b=t.defineComponent({name:"BButton",components:{BIcon:u},inheritAttrs:!1,props:{type:[String,Object],size:String,label:String,iconPack:String,iconLeft:String,iconRight:String,rounded:{type:Boolean,default:()=>a.defaultButtonRounded},loading:Boolean,outlined:Boolean,expanded:Boolean,inverted:Boolean,focused:Boolean,active:Boolean,hovered:Boolean,selected:Boolean,nativeType:{type:String,default:"button",validator:e=>C.indexOf(e)>=0},tag:{type:[String,Object],default:"button",validator:e=>"object"==typeof e||a.defaultLinkTags.indexOf(e)>=0}},computed:{computedTag(){return void 0!==this.$attrs.disabled&&!1!==this.$attrs.disabled?"button":this.tag},iconSize(){return this.size&&"is-medium"!==this.size?"is-large"===this.size?"is-medium":this.size:"is-small"}}});const k={key:1},B={key:2};var S=d(b,[["render",function(e,n,o,i,a,l){const s=t.resolveComponent("b-icon");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.computedTag),t.mergeProps({class:"button"},e.$attrs,{type:"string"==typeof e.computedTag&&["button","input"].includes(e.computedTag)?e.nativeType:void 0,class:[e.size,e.type,{"is-rounded":e.rounded,"is-loading":e.loading,"is-outlined":e.outlined,"is-fullwidth":e.expanded,"is-inverted":e.inverted,"is-focused":e.focused,"is-active":e.active,"is-hovered":e.hovered,"is-selected":e.selected}]}),{default:t.withCtx((()=>[e.iconLeft?(t.openBlock(),t.createBlock(s,{key:0,pack:e.iconPack,icon:e.iconLeft,size:e.iconSize},null,8,["pack","icon","size"])):t.createCommentVNode("v-if",!0),e.label?(t.openBlock(),t.createElementBlock("span",k,t.toDisplayString(e.label),1)):e.$slots.default?(t.openBlock(),t.createElementBlock("span",B,[t.renderSlot(e.$slots,"default")])):t.createCommentVNode("v-if",!0),e.iconRight?(t.openBlock(),t.createBlock(s,{key:3,pack:e.iconPack,icon:e.iconRight,size:e.iconSize},null,8,["pack","icon","size"])):t.createCommentVNode("v-if",!0)])),_:3},16,["type","class"])}]]),x=Object.defineProperty,w=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,V=(e,t,n)=>t in e?x(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const T=t.defineComponent({name:"BDialog",components:{BIcon:u,BButton:S},directives:{trapFocus:i},extends:v,props:{customClass:{type:String,default:""},customContentClass:{type:String,default:""},title:String,message:[String,Array],icon:String,iconPack:String,hasIcon:Boolean,type:{type:String,default:"is-primary"},size:String,confirmText:{type:String,default:()=>"OK"},cancelText:{type:String,default:()=>"Cancel"},hasInput:Boolean,inputAttrs:{type:Object,default:()=>({})},confirmCallback:{type:Function,default:()=>{}},closeOnConfirm:{type:Boolean,default:!0},container:{type:String,default:()=>a.defaultContainerElement},focusOn:{type:String,default:"confirm"}},emits:{confirm:(e,t)=>!0},data(){return{prompt:this.hasInput&&this.inputAttrs.value||"",isActive:!1,validationMessage:"",isCompositing:!1,isLoading:!1}},computed:{safeInputAttrs(){const e=((e,t)=>{for(var n in t||(t={}))E.call(t,n)&&V(e,n,t[n]);if(w)for(var n of w(t))O.call(t,n)&&V(e,n,t[n]);return e})({},this.inputAttrs);return delete e.value,void 0===e.required&&(e.required=!0),e},dialogClass(){return[this.size,{"has-custom-container":null!==this.container}]},iconByType(){switch(this.type){case"is-info":return"information";case"is-success":return"check-circle";case"is-warning":return"alert";case"is-danger":return"alert-circle";default:return null}},showCancel(){return this.cancelOptions.indexOf("button")>=0}},methods:{confirm(){const e=this.$refs.input;if(null!=e){if(this.isCompositing)return;if(!e.checkValidity())return this.validationMessage=e.validationMessage,void this.$nextTick((()=>e.select()))}this.$emit("confirm",this.prompt,this),this.confirmCallback(this.prompt,this),this.closeOnConfirm&&this.close()},close(){this.isActive=!1,this.isLoading=!1,setTimeout((()=>{l(this.$el)}),150)},startLoading(){this.isLoading=!0},cancelLoading(){this.isLoading=!1}},beforeMount(){"undefined"!=typeof window&&this.$nextTick((()=>{(document.querySelector(this.container)||document.body).appendChild(this.$el)}))},mounted(){this.isActive=!0,this.$nextTick((()=>{this.hasInput?this.$refs.input.focus():"cancel"===this.focusOn&&this.showCancel?this.$refs.cancelButton.$el.focus():this.$refs.confirmButton.$el.focus()}))}}),L=["role","aria-modal"],z={key:0,class:"modal-card-head"},N={class:"modal-card-title"},A={class:"media"},P={key:0,class:"media-left"},$={class:"media-content"},I=["innerHTML"],_={key:0,class:"field"},M={class:"control"},j={class:"help is-danger"},D={class:"modal-card-foot"},F={class:"buttons"};var q=d(T,[["render",function(e,n,o,i,a,l){const s=t.resolveComponent("b-icon"),c=t.resolveComponent("b-button"),r=t.resolveDirective("trap-focus");return t.openBlock(),t.createBlock(t.Transition,{name:e.animation},{default:t.withCtx((()=>[e.isActive?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["dialog modal is-active",[e.dialogClass,e.customClass]]),role:e.ariaRole,"aria-modal":e.ariaModal},[t.createElementVNode("div",{class:"modal-background",onClick:n[0]||(n[0]=t=>e.cancel("outside"))}),t.createElementVNode("div",{class:t.normalizeClass(["modal-card animation-content",e.customContentClass])},[e.title?(t.openBlock(),t.createElementBlock("header",z,[t.createElementVNode("p",N,t.toDisplayString(e.title),1)])):t.createCommentVNode("v-if",!0),t.createElementVNode("section",{class:t.normalizeClass(["modal-card-body",{"is-titleless":!e.title,"is-flex":e.hasIcon}])},[t.createElementVNode("div",A,[e.hasIcon&&(e.icon||e.iconByType)?(t.openBlock(),t.createElementBlock("div",P,[t.createVNode(s,{icon:e.icon?e.icon:e.iconByType,pack:e.iconPack,type:e.type,both:!e.icon,size:"is-large"},null,8,["icon","pack","type","both"])])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",$,[t.createElementVNode("p",null,[e.$slots.default?t.renderSlot(e.$slots,"default",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" eslint-disable-next-line vue/no-v-html "),t.createElementVNode("div",{innerHTML:e.message},null,8,I)],64))]),e.hasInput?(t.openBlock(),t.createElementBlock("div",_,[t.createElementVNode("div",M,[t.withDirectives(t.createElementVNode("input",t.mergeProps({"onUpdate:modelValue":n[1]||(n[1]=t=>e.prompt=t),class:["input",{"is-danger":e.validationMessage}],ref:"input"},e.safeInputAttrs,{onCompositionstart:n[2]||(n[2]=t=>e.isCompositing=!0),onCompositionend:n[3]||(n[3]=t=>e.isCompositing=!1),onKeydown:n[4]||(n[4]=t.withKeys(((...t)=>e.confirm&&e.confirm(...t)),["enter"]))}),null,16),[[t.vModelDynamic,e.prompt]])]),t.createElementVNode("p",j,t.toDisplayString(e.validationMessage),1)])):t.createCommentVNode("v-if",!0)])])],2),t.createElementVNode("footer",D,[t.createElementVNode("div",F,[e.showCancel?(t.openBlock(),t.createBlock(c,{key:0,ref:"cancelButton",disabled:e.isLoading,onClick:n[5]||(n[5]=t=>e.cancel("button"))},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.cancelText),1)])),_:1},8,["disabled"])):t.createCommentVNode("v-if",!0),t.createVNode(c,{type:e.type,ref:"confirmButton",loading:e.isLoading,onClick:e.confirm},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.confirmText),1)])),_:1},8,["type","loading","onClick"])])])],2)],10,L)),[[r,e.trapFocus]]):t.createCommentVNode("v-if",!0)])),_:3},8,["name"])}]]);var R=Object.defineProperty,H=Object.defineProperties,K=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,X=(e,t,n)=>t in e?R(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G=(e,t)=>{for(var n in t||(t={}))W.call(t,n)&&X(e,n,t[n]);if(U)for(var n of U(t))Y.call(t,n)&&X(e,n,t[n]);return e};function J(e,n){let o;return Array.isArray(e.message)&&(o=e.message,delete e.message),function(){const i=document.createElement("div"),a=t.createApp({data:()=>({dialogVNode:null}),methods:{close(){const e=s(this.dialogVNode);e&&e.close()},startLoading(){const e=s(this.dialogVNode);e&&e.startLoading()},cancelLoading(){const e=s(this.dialogVNode);e&&e.cancelLoading()}},render(){var n;return this.dialogVNode=t.h(q,(n=G({},e),H(n,K({onConfirm:e=>{},onCancel:e=>{a.unmount()},confirmCallback:(t,n)=>{null!=e.onConfirm&&e.onConfirm(t,n)},cancelCallback:t=>{null!=e.onCancel&&e.onCancel(t)}}))),o?{default:()=>o}:void 0),this.dialogVNode}});return n&&function(e,t){const{_context:n}=e,{_context:o}=t;o.config=n.config,o.mixins=n.mixins,o.components=n.components,o.directives=n.directives,o.provides=n.provides,o.optionsCache=n.optionsCache,o.propsCache=n.propsCache,o.emitsCache=n.emitsCache,"__VUE_I18N_SYMBOL__"in e&&(t.__VUE_I18N_SYMBOL__=e.__VUE_I18N_SYMBOL__)}(n,a),a.mount(i)}()}class Q{constructor(e){var t;X(this,"app"+"",t),this.app=e}alert(e){let t;return t="string"==typeof e?{message:e}:e,t=G({canCancel:!1},t),J(t,this.app)}confirm(e){return J(e,this.app)}prompt(e){return J(G({hasInput:!0},e),this.app)}}const Z=Symbol("Buefy Dialog");const ee={install(e){((e,t)=>{const n=t.name;if(null==n)throw new Error("Buefy.registerComponent: missing component name");e.component(n,t)})(e,q),((e,t,n,o)=>{e.config.globalProperties.$buefy||(e.config.globalProperties.$buefy={}),e.config.globalProperties.$buefy[t]=n,e.provide(o,n)})(e,"dialog",new Q(e),Z)}};e.BDialog=q,e.DialogProgrammatic=Q,e.default=ee,e.useDialog=function(){return t.inject(Z)},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Dialog={},e.Vue)}(this,(function(e,t){"use strict";const n=(e,t=!1)=>e?t?e.querySelectorAll('*[tabindex="-1"]'):e.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null;let o;const i={beforeMount:(e,{value:t=!0})=>{if(t){let t=n(e),i=n(e,!0);t&&t.length>0&&(o=o=>{t=n(e),i=n(e,!0);const a=t[0],s=t[t.length-1];o.target===a&&o.shiftKey&&"Tab"===o.key?(o.preventDefault(),s.focus()):(o.target===s||Array.from(i).indexOf(o.target)>=0)&&!o.shiftKey&&"Tab"===o.key&&(o.preventDefault(),a.focus())},e.addEventListener("keydown",o))}},unmounted:e=>{e.removeEventListener("keydown",o)}};let a={defaultContainerElement:null,defaultIconPack:"mdi",defaultIconComponent:null,defaultModalCanCancel:["escape","x","outside","button"],defaultTrapFocus:!0,defaultAutoFocus:!0,defaultButtonRounded:!1,defaultLinkTags:["a","button","input","router-link","nuxt-link","n-link","RouterLink","NuxtLink","NLink"]};function s(e){void 0!==e.remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)}function l(e){if(!e)return;const{component:t}=e;return t?t.exposed&&t.exposeProxy||t.proxy:void 0}const c={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},r=()=>{const e="fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}},d={checkboxOn:{type:"svg",viewBox:"0 0 1 1",path:"M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z"},checkboxIndeterminate:{type:"svg",viewBox:"0 0 1 1",path:"M 0.15,0.4 L 0.85,0.4 L 0.85,0.6 L 0.15,0.6 Z"},chevronLeft:{type:"svg",path:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},chevronRight:{type:"svg",path:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},chevronDown:{type:"svg",path:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},chevronUp:{type:"svg",path:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"},menuDown:{type:"svg",path:"M7,10L12,15L17,10H7Z"},menuUp:{type:"svg",path:"M7,14L12,9L17,14H7Z"},check:{type:"svg",path:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},alertCircle:{type:"svg",path:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},alert:{type:"svg",path:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"},information:{type:"svg",path:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},close:{type:"svg",path:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},closeCircle:{type:"svg",path:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},eye:{type:"svg",path:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"},eyeOff:{type:"svg",path:"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.18 16.38,18.6L16.81,19L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"}};function u(e){return d[e]}var p=t.defineComponent({name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:{type:String,required:!1,default:void 0},alias:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{resolvedAlias(){var e;return this.alias&&null!=(e=u(this.alias))?e:null},isSvgAlias(){var e;return"svg"===(null==(e=this.resolvedAlias)?void 0:e.type)},isComponentAlias(){var e;return"component"===(null==(e=this.resolvedAlias)?void 0:e.type)},resolvedAliasSvg(){return this.resolvedAlias},resolvedAliasComponent(){return this.resolvedAlias},iconConfig(){return{mdi:c,fa:r(),fas:r(),far:r(),fad:r(),fab:r(),fal:r(),"fa-solid":r(),"fa-regular":r(),"fa-light":r(),"fa-thin":r(),"fa-duotone":r(),"fa-brands":r()}[this.newPack]},iconPrefix(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon(){var e;return`${this.iconPrefix}${this.getEquivalentIconOf(null!=(e=this.icon)?e:"")}`},newPack(){return this.pack||a.defaultIconPack},newType(){if(!this.type)return;let e=[];if("string"==typeof this.type)e=this.type.split("-");else for(const t in this.type)if(this.type[t]){e=t.split("-");break}if(e.length<=1)return;const[,...t]=e;return`has-text-${t.join("-")}`},newCustomSize(){return this.customSize||this.customSizeByPack},customSizeByPack(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent(){return this.component||a.defaultIconComponent}},methods:{getEquivalentIconOf(e){if(!this.both)return e;if(null==this.iconConfig)return e;const t=this.iconConfig;return t&&t.internalIcons&&t.internalIcons[e]?t.internalIcons[e]:e}}}),m=(e,t)=>{const n=e.__vccOpts||e;for(const[e,o]of t)n[e]=o;return n};const f=["viewBox"],h=["d"];var v=m(p,[["render",function(e,n,o,i,a,s){return t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(["icon",[e.newType,e.size]])},[e.isSvgAlias?(t.openBlock(),t.createElementBlock("svg",{key:0,viewBox:e.resolvedAliasSvg.viewBox||"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:t.normalizeClass(e.customClass),"aria-hidden":"true"},[t.createElementVNode("path",{fill:"currentColor",d:e.resolvedAliasSvg.path},null,8,h)],10,f)):e.isComponentAlias?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.resolvedAliasComponent.component),{key:1,icon:e.resolvedAliasComponent.icon,class:t.normalizeClass(e.customClass)},null,8,["icon","class"])):e.useIconComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.useIconComponent),{key:3,icon:[e.newPack,e.newIcon],size:e.newCustomSize,class:t.normalizeClass([e.customClass])},null,8,["icon","size","class"])):(t.openBlock(),t.createElementBlock("i",{key:2,class:t.normalizeClass([e.newPack,e.newIcon,e.newCustomSize,e.customClass])},null,2))],2)}]]);const g=["clip","keep"],y=["dialog","alertdialog"],C=t.defineComponent({name:"BModal",directives:{trapFocus:i},props:{modelValue:Boolean,component:[Object,Function,String],content:{type:[String,Object,Array]},programmatic:Boolean,props:Object,events:{type:Object,default:()=>({})},width:{type:[String,Number],default:960},hasModalCard:Boolean,animation:{type:String,default:"zoom-out"},canCancel:{type:[Array,Boolean],default:()=>a.defaultModalCanCancel},cancelCallback:{type:Function,default:()=>{}},scroll:{type:String,default:()=>"clip",validator:e=>g.indexOf(e)>=0},fullScreen:Boolean,trapFocus:{type:Boolean,default:()=>a.defaultTrapFocus},autoFocus:{type:Boolean,default:()=>a.defaultAutoFocus},customClass:String,customContentClass:[String,Array,Object],ariaRole:{type:String,validator:e=>y.indexOf(e)>=0},ariaModal:Boolean,ariaLabel:{type:String,validator:e=>Boolean(e)},closeButtonAriaLabel:{type:String,default:"close"},destroyOnHide:{type:Boolean,default:!0},renderOnMounted:{type:Boolean,default:!1}},emits:{"after-enter":()=>!0,"after-leave":()=>!0,cancel:e=>!0,close:()=>!0,"update:modelValue":e=>!0},data(){return{isActive:this.modelValue||!1,savedScrollTop:null,newWidth:"number"==typeof this.width?this.width+"px":this.width,animating:!this.modelValue,destroyed:!(this.modelValue||this.renderOnMounted)}},computed:{cancelOptions(){return"boolean"==typeof this.canCancel?this.canCancel?a.defaultModalCanCancel:[]:this.canCancel},showX(){return this.cancelOptions.indexOf("x")>=0},customStyle(){return this.fullScreen?null:{maxWidth:this.newWidth}}},watch:{modelValue(e){this.isActive=e},isActive(e){e&&(this.destroyed=!1),this.handleScroll(),this.$nextTick((()=>{e&&this.$el&&this.$el.focus&&this.autoFocus&&this.$el.focus()}))}},methods:{handleScroll(){"undefined"!=typeof window&&("clip"!==this.scroll?(this.savedScrollTop=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop,this.isActive?document.body.classList.add("is-noscroll"):document.body.classList.remove("is-noscroll"),this.isActive?document.body.style.top=`-${this.savedScrollTop}px`:(document.documentElement.scrollTop=this.savedScrollTop,document.body.style.top="",this.savedScrollTop=null)):this.isActive?document.documentElement.classList.add("is-clipped"):document.documentElement.classList.remove("is-clipped"))},cancel(e){this.cancelOptions.indexOf(e)<0||(this.$emit("cancel",e),this.cancelCallback.apply(null,[e]),this.close())},close(){this.$emit("close"),this.$emit("update:modelValue",!1),this.programmatic&&(this.isActive=!1,setTimeout((()=>{s(this.$el)}),150))},keyPress({key:e}){!this.isActive||"Escape"!==e&&"Esc"!==e||this.cancel("escape")},afterEnter(){this.animating=!1,this.$emit("after-enter")},beforeLeave(){this.animating=!0},afterLeave(){this.destroyOnHide&&(this.destroyed=!0),this.$emit("after-leave")}},created(){"undefined"!=typeof window&&document.addEventListener("keyup",this.keyPress)},mounted(){this.programmatic?(document.body.appendChild(this.$el),this.isActive=!0):this.isActive&&this.handleScroll()},beforeUnmount(){if("undefined"!=typeof window){document.removeEventListener("keyup",this.keyPress),document.documentElement.classList.remove("is-clipped");const e=this.savedScrollTop?this.savedScrollTop:document.documentElement.scrollTop;document.body.classList.remove("is-noscroll"),document.documentElement.scrollTop=e,document.body.style.top=""}}}),k=["role","aria-label","aria-modal"],b=["innerHTML"],L=["aria-label"];var B=m(C,[["render",function(e,n,o,i,a,s){const l=t.resolveDirective("trap-focus");return t.openBlock(),t.createBlock(t.Transition,{name:e.animation,onAfterEnter:e.afterEnter,onBeforeLeave:e.beforeLeave,onAfterLeave:e.afterLeave},{default:t.withCtx((()=>[e.destroyed?t.createCommentVNode("v-if",!0):t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["modal is-active",[{"is-full-screen":e.fullScreen},e.customClass]]),tabindex:"-1",role:e.ariaRole,"aria-label":e.ariaLabel,"aria-modal":e.ariaModal||void 0},[t.createElementVNode("div",{class:"modal-background",onClick:n[0]||(n[0]=t=>e.cancel("outside"))}),t.createElementVNode("div",{class:t.normalizeClass(["animation-content",[{"modal-content":!e.hasModalCard},e.customContentClass]]),style:t.normalizeStyle(e.customStyle)},[e.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.component),t.mergeProps({key:0},e.props,t.toHandlers(e.events),{"can-cancel":e.canCancel,onClose:e.close}),null,16,["can-cancel","onClose"])):e.content?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" eslint-disable-next-line vue/no-v-html "),t.createElementVNode("div",{innerHTML:e.content},null,8,b)],64)):t.renderSlot(e.$slots,"default",{key:2,canCancel:e.canCancel,close:e.close})],6),e.showX?t.withDirectives((t.openBlock(),t.createElementBlock("button",{key:0,class:"modal-close is-large","aria-label":e.closeButtonAriaLabel,onClick:n[1]||(n[1]=t=>e.cancel("x"))},null,8,L)),[[t.vShow,!e.animating]]):t.createCommentVNode("v-if",!0)],10,k)),[[t.vShow,e.isActive],[l,e.trapFocus]])])),_:3},8,["name","onAfterEnter","onBeforeLeave","onAfterLeave"])}]]);const S=["button","submit","reset"];var w=t.defineComponent({name:"BButton",components:{BIcon:v},inheritAttrs:!1,props:{type:[String,Object],size:String,label:String,iconPack:String,iconLeft:String,iconRight:String,rounded:{type:Boolean,default:()=>a.defaultButtonRounded},loading:Boolean,outlined:Boolean,expanded:Boolean,inverted:Boolean,focused:Boolean,active:Boolean,hovered:Boolean,selected:Boolean,nativeType:{type:String,default:"button",validator:e=>S.indexOf(e)>=0},tag:{type:[String,Object],default:"button",validator:e=>"object"==typeof e||a.defaultLinkTags.indexOf(e)>=0}},computed:{computedTag(){return void 0!==this.$attrs.disabled&&!1!==this.$attrs.disabled?"button":this.tag},iconSize(){return this.size&&"is-medium"!==this.size?"is-large"===this.size?"is-medium":this.size:"is-small"}}});const x={key:1},A={key:2};var E=m(w,[["render",function(e,n,o,i,a,s){const l=t.resolveComponent("b-icon");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.computedTag),t.mergeProps({class:"button"},e.$attrs,{type:"string"==typeof e.computedTag&&["button","input"].includes(e.computedTag)?e.nativeType:void 0,class:[e.size,e.type,{"is-rounded":e.rounded,"is-loading":e.loading,"is-outlined":e.outlined,"is-fullwidth":e.expanded,"is-inverted":e.inverted,"is-focused":e.focused,"is-active":e.active,"is-hovered":e.hovered,"is-selected":e.selected}]}),{default:t.withCtx((()=>[e.iconLeft?(t.openBlock(),t.createBlock(l,{key:0,pack:e.iconPack,icon:e.iconLeft,size:e.iconSize},null,8,["pack","icon","size"])):t.createCommentVNode("v-if",!0),e.label?(t.openBlock(),t.createElementBlock("span",x,t.toDisplayString(e.label),1)):e.$slots.default?(t.openBlock(),t.createElementBlock("span",A,[t.renderSlot(e.$slots,"default")])):t.createCommentVNode("v-if",!0),e.iconRight?(t.openBlock(),t.createBlock(l,{key:3,pack:e.iconPack,icon:e.iconRight,size:e.iconSize},null,8,["pack","icon","size"])):t.createCommentVNode("v-if",!0)])),_:3},16,["type","class"])}]]),V=Object.defineProperty,M=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,T=(e,t,n)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;const N=t.defineComponent({name:"BDialog",components:{BIcon:v,BButton:E},directives:{trapFocus:i},extends:B,props:{customClass:{type:String,default:""},customContentClass:{type:String,default:""},title:String,message:[String,Array],icon:String,iconPack:String,hasIcon:Boolean,type:{type:String,default:"is-primary"},size:String,confirmText:{type:String,default:()=>"OK"},cancelText:{type:String,default:()=>"Cancel"},hasInput:Boolean,inputAttrs:{type:Object,default:()=>({})},confirmCallback:{type:Function,default:()=>{}},closeOnConfirm:{type:Boolean,default:!0},container:{type:String,default:()=>a.defaultContainerElement},focusOn:{type:String,default:"confirm"}},emits:{confirm:(e,t)=>!0},data(){return{prompt:this.hasInput&&this.inputAttrs.value||"",isActive:!1,validationMessage:"",isCompositing:!1,isLoading:!1}},computed:{safeInputAttrs(){const e=((e,t)=>{for(var n in t||(t={}))O.call(t,n)&&T(e,n,t[n]);if(M)for(var n of M(t))z.call(t,n)&&T(e,n,t[n]);return e})({},this.inputAttrs);return delete e.value,void 0===e.required&&(e.required=!0),e},dialogClass(){return[this.size,{"has-custom-container":null!==this.container}]},iconByType(){switch(this.type){case"is-info":return"information";case"is-success":return"check-circle";case"is-warning":return"alert";case"is-danger":return"alert-circle";default:return null}},showCancel(){return this.cancelOptions.indexOf("button")>=0}},methods:{confirm(){const e=this.$refs.input;if(null!=e){if(this.isCompositing)return;if(!e.checkValidity())return this.validationMessage=e.validationMessage,void this.$nextTick((()=>e.select()))}this.$emit("confirm",this.prompt,this),this.confirmCallback(this.prompt,this),this.closeOnConfirm&&this.close()},close(){this.isActive=!1,this.isLoading=!1,setTimeout((()=>{s(this.$el)}),150)},startLoading(){this.isLoading=!0},cancelLoading(){this.isLoading=!1}},beforeMount(){"undefined"!=typeof window&&this.$nextTick((()=>{(document.querySelector(this.container)||document.body).appendChild(this.$el)}))},mounted(){this.isActive=!0,this.$nextTick((()=>{this.hasInput?this.$refs.input.focus():"cancel"===this.focusOn&&this.showCancel?this.$refs.cancelButton.$el.focus():this.$refs.confirmButton.$el.focus()}))}}),P=["role","aria-modal"],$={key:0,class:"modal-card-head"},I={class:"modal-card-title"},_={class:"media"},D={key:0,class:"media-left"},j={class:"media-content"},H=["innerHTML"],F={key:0,class:"field"},Z={class:"control"},R={class:"help is-danger"},q={class:"modal-card-foot"},U={class:"buttons"};var K=m(N,[["render",function(e,n,o,i,a,s){const l=t.resolveComponent("b-icon"),c=t.resolveComponent("b-button"),r=t.resolveDirective("trap-focus");return t.openBlock(),t.createBlock(t.Transition,{name:e.animation},{default:t.withCtx((()=>[e.isActive?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["dialog modal is-active",[e.dialogClass,e.customClass]]),role:e.ariaRole,"aria-modal":e.ariaModal},[t.createElementVNode("div",{class:"modal-background",onClick:n[0]||(n[0]=t=>e.cancel("outside"))}),t.createElementVNode("div",{class:t.normalizeClass(["modal-card animation-content",e.customContentClass])},[e.title?(t.openBlock(),t.createElementBlock("header",$,[t.createElementVNode("p",I,t.toDisplayString(e.title),1)])):t.createCommentVNode("v-if",!0),t.createElementVNode("section",{class:t.normalizeClass(["modal-card-body",{"is-titleless":!e.title,"is-flex":e.hasIcon}])},[t.createElementVNode("div",_,[e.hasIcon&&(e.icon||e.iconByType)?(t.openBlock(),t.createElementBlock("div",D,[t.createVNode(l,{icon:e.icon?e.icon:e.iconByType,pack:e.iconPack,type:e.type,both:!e.icon,size:"is-large"},null,8,["icon","pack","type","both"])])):t.createCommentVNode("v-if",!0),t.createElementVNode("div",j,[t.createElementVNode("p",null,[e.$slots.default?t.renderSlot(e.$slots,"default",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createCommentVNode(" eslint-disable-next-line vue/no-v-html "),t.createElementVNode("div",{innerHTML:e.message},null,8,H)],64))]),e.hasInput?(t.openBlock(),t.createElementBlock("div",F,[t.createElementVNode("div",Z,[t.withDirectives(t.createElementVNode("input",t.mergeProps({"onUpdate:modelValue":n[1]||(n[1]=t=>e.prompt=t),class:["input",{"is-danger":e.validationMessage}],ref:"input"},e.safeInputAttrs,{onCompositionstart:n[2]||(n[2]=t=>e.isCompositing=!0),onCompositionend:n[3]||(n[3]=t=>e.isCompositing=!1),onKeydown:n[4]||(n[4]=t.withKeys(((...t)=>e.confirm&&e.confirm(...t)),["enter"]))}),null,16),[[t.vModelDynamic,e.prompt]])]),t.createElementVNode("p",R,t.toDisplayString(e.validationMessage),1)])):t.createCommentVNode("v-if",!0)])])],2),t.createElementVNode("footer",q,[t.createElementVNode("div",U,[e.showCancel?(t.openBlock(),t.createBlock(c,{key:0,ref:"cancelButton",disabled:e.isLoading,onClick:n[5]||(n[5]=t=>e.cancel("button"))},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.cancelText),1)])),_:1},8,["disabled"])):t.createCommentVNode("v-if",!0),t.createVNode(c,{type:e.type,ref:"confirmButton",loading:e.isLoading,onClick:e.confirm},{default:t.withCtx((()=>[t.createTextVNode(t.toDisplayString(e.confirmText),1)])),_:1},8,["type","loading","onClick"])])])],2)],10,P)),[[r,e.trapFocus]]):t.createCommentVNode("v-if",!0)])),_:3},8,["name"])}]]);var W=Object.defineProperty,Y=Object.defineProperties,X=Object.getOwnPropertyDescriptors,G=Object.getOwnPropertySymbols,J=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,ee=(e,t,n)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,te=(e,t)=>{for(var n in t||(t={}))J.call(t,n)&&ee(e,n,t[n]);if(G)for(var n of G(t))Q.call(t,n)&&ee(e,n,t[n]);return e};function ne(e,n){let o;return Array.isArray(e.message)&&(o=e.message,delete e.message),function(){const i=document.createElement("div"),a=t.createApp({data:()=>({dialogVNode:null}),methods:{close(){const e=l(this.dialogVNode);e&&e.close()},startLoading(){const e=l(this.dialogVNode);e&&e.startLoading()},cancelLoading(){const e=l(this.dialogVNode);e&&e.cancelLoading()}},render(){var n;return this.dialogVNode=t.h(K,(n=te({},e),Y(n,X({onConfirm:e=>{},onCancel:e=>{a.unmount()},confirmCallback:(t,n)=>{null!=e.onConfirm&&e.onConfirm(t,n)},cancelCallback:t=>{null!=e.onCancel&&e.onCancel(t)}}))),o?{default:()=>o}:void 0),this.dialogVNode}});return n&&function(e,t){const{_context:n}=e,{_context:o}=t;o.config=n.config,o.mixins=n.mixins,o.components=n.components,o.directives=n.directives,o.provides=n.provides,o.optionsCache=n.optionsCache,o.propsCache=n.propsCache,o.emitsCache=n.emitsCache,"__VUE_I18N_SYMBOL__"in e&&(t.__VUE_I18N_SYMBOL__=e.__VUE_I18N_SYMBOL__)}(n,a),a.mount(i)}()}class oe{constructor(e){var t;ee(this,"app"+"",t),this.app=e}alert(e){let t;return t="string"==typeof e?{message:e}:e,t=te({canCancel:!1},t),ne(t,this.app)}confirm(e){return ne(e,this.app)}prompt(e){return ne(te({hasInput:!0},e),this.app)}}const ie=Symbol("Buefy Dialog");const ae={install(e){((e,t)=>{const n=t.name;if(null==n)throw new Error("Buefy.registerComponent: missing component name");e.component(n,t)})(e,K),((e,t,n,o)=>{e.config.globalProperties.$buefy||(e.config.globalProperties.$buefy={}),e.config.globalProperties.$buefy[t]=n,e.provide(o,n)})(e,"dialog",new oe(e),ie)}};e.BDialog=K,e.DialogProgrammatic=oe,e.default=ae,e.useDialog=function(){return t.inject(ie)},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
|
|
@@ -459,6 +459,7 @@
|
|
|
459
459
|
if (typeof window !== "undefined") {
|
|
460
460
|
document.removeEventListener("click", this.clickedOutside);
|
|
461
461
|
document.removeEventListener("keyup", this.keyPress);
|
|
462
|
+
document.documentElement.classList.remove("is-clipped-touch");
|
|
462
463
|
}
|
|
463
464
|
if (this.appendToBody) {
|
|
464
465
|
removeElement(this.$data._bodyEl);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Dropdown={},e.Vue)}(this,(function(e,t){"use strict";const i=(e,t=!1)=>e?t?e.querySelectorAll('*[tabindex="-1"]'):e.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null;let o;const s={beforeMount:(e,{value:t=!0})=>{if(t){let t=i(e),s=i(e,!0);t&&t.length>0&&(o=o=>{t=i(e),s=i(e,!0);const n=t[0],l=t[t.length-1];o.target===n&&o.shiftKey&&"Tab"===o.key?(o.preventDefault(),l.focus()):(o.target===l||Array.from(s).indexOf(o.target)>=0)&&!o.shiftKey&&"Tab"===o.key&&(o.preventDefault(),n.focus())},e.addEventListener("keydown",o))}},unmounted:e=>{e.removeEventListener("keydown",o)}};let n=!0,l=!0;const a=["escape","outside"],d=Symbol("bdropdown");var r=t.defineComponent({name:"BDropdown",directives:{trapFocus:s},provide(){return{[d]:this}},props:{modelValue:{type:[String,Number,Boolean,Object,Array,Function],default:null},disabled:Boolean,inline:Boolean,scrollable:Boolean,maxHeight:{type:[String,Number],default:200},position:{type:String,validator:e=>["is-top-right","is-top-left","is-bottom-left","is-bottom-right"].indexOf(e)>-1},triggers:{type:Array,default:()=>["click"]},mobileModal:{type:Boolean,default:()=>n},ariaRole:{type:String,validator:e=>["menu","list","dialog"].indexOf(e)>-1,default:null},animation:{type:String,default:"fade"},multiple:Boolean,trapFocus:{type:Boolean,default:()=>l},closeOnClick:{type:Boolean,default:!0},canClose:{type:[Array,Boolean],default:!0},expanded:Boolean,appendToBody:Boolean,appendToBodyCopyParent:Boolean,triggerTabindex:{type:Number,default:0}},emits:{"active-change":e=>!0,change:e=>!0,"update:modelValue":e=>!0},data(){return{selected:this.modelValue,style:{},isActive:!1,isHoverable:!1,maybeTap:!1,isTouchEnabled:!1,_bodyEl:void 0,timeOutID:void 0,timeOutID2:void 0}},computed:{rootClasses(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal,"is-expanded":this.expanded,"is-touch-enabled":this.isTouchEnabled}]},isMobileModal(){return this.mobileModal&&!this.inline},cancelOptions(){return"boolean"==typeof this.canClose?this.canClose?a:[]:this.canClose},contentStyle(){var e,t;return{maxHeight:this.scrollable&&null!=(t=this.maxHeight,e=void 0===t?null:isNaN(+t)?`${t}`:t+"px")?e:void 0,overflow:this.scrollable?"auto":void 0}},hoverable(){return this.triggers.indexOf("hover")>=0}},watch:{modelValue(e){this.selected=e},isActive(e){this.$emit("active-change",e),e||(this.timeOutID=setTimeout((()=>{this.isActive||(this.isTouchEnabled=!1)}),250)),this.handleScroll(),this.appendToBody&&this.$nextTick((()=>{this.updateAppendToBody()}))},isHoverable(e){this.hoverable&&this.$emit("active-change",e)}},methods:{handleScroll(){"undefined"!=typeof window&&this.isMobileModal&&(this.isActive?document.documentElement.classList.add("is-clipped-touch"):document.documentElement.classList.remove("is-clipped-touch"))},selectItem(e){if(this.multiple){if(this.selected){const t=this.selected;-1===t.indexOf(e)?this.selected=[...t,e]:this.selected=t.filter((t=>t!==e))}else this.selected=[e];this.$emit("change",this.selected)}else this.selected!==e&&(this.selected=e,this.$emit("change",this.selected));this.$emit("update:modelValue",this.selected),this.multiple||(this.isActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1))},isInWhiteList(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(null!=this.$refs.dropdownMenu){const t=this.$refs.dropdownMenu.querySelectorAll("*");for(const i of t)if(e===i)return!0}if(null!=this.$refs.trigger){const t=this.$refs.trigger.querySelectorAll("*");for(const i of t)if(e===i)return!0}return!1},clickedOutside(e){if(this.cancelOptions.indexOf("outside")<0)return;if(this.inline)return;const t=null!=(i=this).$root&&"shadowRoot"in i.$root.$options?e.composedPath()[0]:e.target;var i;this.isInWhiteList(t)||(this.isActive=!1)},keyPress({key:e}){if(this.isActive&&("Escape"===e||"Esc"===e)){if(this.cancelOptions.indexOf("escape")<0)return;this.isActive=!1}},onClick(){-1===this.triggers.indexOf("hover")&&(this.triggers.indexOf("click")<0||this.toggle())},onContextMenu(){this.triggers.indexOf("contextmenu")<0||this.toggle()},onHover(){this.triggers.indexOf("hover")<0||this.isTouchEnabled||(this.isHoverable=!0)},onTouchStart(){this.maybeTap=!0},onTouchMove(){this.maybeTap=!1},onTouchEnd(e){-1!==this.triggers.indexOf("hover")&&this.maybeTap&&(e.preventDefault(),this.maybeTap=!1,this.isTouchEnabled=!0,this.toggle())},onFocus(){this.triggers.indexOf("focus")<0||this.toggle()},toggle(){this.disabled||(this.isActive?this.isActive=!this.isActive:this.timeOutID2=setTimeout((()=>{const e=!this.isActive;this.isActive=e})))},updateAppendToBody(){const e=this.$refs.dropdown,t=this.$refs.dropdownMenu,i=this.$refs.trigger;if(t&&i){const o=this.$data._bodyEl.children[0];if(o.classList.forEach((e=>o.classList.remove(e))),o.classList.add("dropdown"),o.classList.add("dropdown-menu-animation"),this.rootClasses.forEach((e=>{if(e&&"object"==typeof e)for(const t in e)e[t]&&o.classList.add(t)})),this.appendToBodyCopyParent){const e=this.$refs.dropdown.parentNode,t=this.$data._bodyEl;t.classList.forEach((e=>t.classList.remove(e))),e.classList.forEach((e=>{t.classList.add(e)}))}const s=i.getBoundingClientRect();let n=s.top+window.scrollY,l=s.left+window.scrollX;!this.position||this.position.indexOf("bottom")>=0?n+=i.clientHeight:n-=t.clientHeight,this.position&&this.position.indexOf("left")>=0&&(l-=t.clientWidth-i.clientWidth),this.style={position:"absolute",top:`${n}px`,left:`${l}px`,zIndex:"99",width:this.expanded?`${e.offsetWidth}px`:void 0}}}},mounted(){this.appendToBody&&(this.$data._bodyEl=function(e){const t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";const i=document.createElement("div");return t.appendChild(i),i.appendChild(e),document.body.appendChild(t),t}(this.$refs.dropdownMenu),this.updateAppendToBody())},created(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeUnmount(){var e;"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress)),this.appendToBody&&(void 0!==(e=this.$data._bodyEl).remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)),clearTimeout(this.timeOutID),clearTimeout(this.timeOutID2)}}),c=(e,t)=>{const i=e.__vccOpts||e;for(const[e,o]of t)i[e]=o;return i};const h=["tabindex"],u=["aria-hidden"],p=["aria-hidden"],m=["role","aria-modal"];var f=c(r,[["render",function(e,i,o,s,n,l){const a=t.resolveDirective("trap-focus");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["dropdown dropdown-menu-animation",e.rootClasses]),ref:"dropdown",onMouseleave:i[7]||(i[7]=t=>e.isHoverable=!1)},[e.inline?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,tabindex:e.disabled?void 0:e.triggerTabindex,ref:"trigger",class:"dropdown-trigger",onClick:i[0]||(i[0]=(...t)=>e.onClick&&e.onClick(...t)),onContextmenu:i[1]||(i[1]=t.withModifiers(((...t)=>e.onContextMenu&&e.onContextMenu(...t)),["prevent"])),onMouseenter:i[2]||(i[2]=(...t)=>e.onHover&&e.onHover(...t)),onFocusCapture:i[3]||(i[3]=(...t)=>e.onFocus&&e.onFocus(...t)),onTouchstart:i[4]||(i[4]=(...t)=>e.onTouchStart&&e.onTouchStart(...t)),onTouchmove:i[5]||(i[5]=(...t)=>e.onTouchMove&&e.onTouchMove(...t)),onTouchend:i[6]||(i[6]=(...t)=>e.onTouchEnd&&e.onTouchEnd(...t)),"aria-haspopup":"true"},[t.renderSlot(e.$slots,"trigger",{active:e.isActive})],40,h)),t.createVNode(t.Transition,{name:e.animation},{default:t.withCtx((()=>[e.isMobileModal?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:"background","aria-hidden":!e.isActive},null,8,u)),[[t.vShow,e.isActive]]):t.createCommentVNode("v-if",!0)])),_:1},8,["name"]),t.createVNode(t.Transition,{name:e.animation,persisted:""},{default:t.withCtx((()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref:"dropdownMenu",class:"dropdown-menu",style:t.normalizeStyle(e.style),"aria-hidden":!e.isActive},[t.createElementVNode("div",{class:"dropdown-content",role:e.ariaRole,"aria-modal":!e.inline,style:t.normalizeStyle(e.contentStyle)},[t.renderSlot(e.$slots,"default")],12,m)],12,p)),[[t.vShow,!e.disabled&&(e.isActive||e.isHoverable)||e.inline],[a,e.trapFocus]])])),_:3},8,["name"])],34)}]]),v=t.defineComponent({name:"BDropdownItem",inject:{parent:{from:d,default:void 0}},props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},paddingless:Boolean,hasLink:Boolean,ariaRole:{type:String,default:""}},emits:{click:()=>!0},computed:{anchorClasses(){return{"is-disabled":this.parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive}},itemClasses(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive,"has-link":this.hasLink}},ariaRoleItem(){return"menuitem"===this.ariaRole||"listitem"===this.ariaRole?this.ariaRole:void 0},isClickable(){return!(this.parent.disabled||this.separator||this.disabled||this.custom)},isActive(){return null!==this.parent.selected&&(this.parent.multiple?this.parent.selected.indexOf(this.value)>=0:this.value===this.parent.selected)},isFocusable(){return!this.hasLink&&this.focusable}},methods:{selectItem(){this.isClickable&&(this.parent.selectItem(this.value),this.$emit("click"))}}});const b={key:0,class:"dropdown-divider"},y=["role","tabindex"],g=["role","tabindex"];var k=c(v,[["render",function(e,i,o,s,n,l){return e.separator?(t.openBlock(),t.createElementBlock("hr",b)):e.custom||e.hasLink?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.itemClasses),onClick:i[1]||(i[1]=(...t)=>e.selectItem&&e.selectItem(...t)),role:e.ariaRoleItem,tabindex:e.isFocusable?0:void 0},[t.renderSlot(e.$slots,"default")],10,g)):(t.openBlock(),t.createElementBlock("a",{key:1,class:t.normalizeClass(["dropdown-item",e.anchorClasses]),onClick:i[0]||(i[0]=(...t)=>e.selectItem&&e.selectItem(...t)),role:e.ariaRoleItem,tabindex:e.isFocusable?0:void 0},[t.renderSlot(e.$slots,"default")],10,y))}]]);const x=(e,t,i)=>{const o=t.name;if(null==o)throw new Error("Buefy.registerComponent: missing component name");e.component(o,t)},w={install(e){x(e,f),x(e,k)}};e.BDropdown=f,e.BDropdownItem=k,e.default=w,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Dropdown={},e.Vue)}(this,(function(e,t){"use strict";const i=(e,t=!1)=>e?t?e.querySelectorAll('*[tabindex="-1"]'):e.querySelectorAll('a[href]:not([tabindex="-1"]),\n area[href],\n input:not([disabled]),\n select:not([disabled]),\n textarea:not([disabled]),\n button:not([disabled]),\n iframe,\n object,\n embed,\n *[tabindex]:not([tabindex="-1"]),\n *[contenteditable]'):null;let o;const s={beforeMount:(e,{value:t=!0})=>{if(t){let t=i(e),s=i(e,!0);t&&t.length>0&&(o=o=>{t=i(e),s=i(e,!0);const n=t[0],l=t[t.length-1];o.target===n&&o.shiftKey&&"Tab"===o.key?(o.preventDefault(),l.focus()):(o.target===l||Array.from(s).indexOf(o.target)>=0)&&!o.shiftKey&&"Tab"===o.key&&(o.preventDefault(),n.focus())},e.addEventListener("keydown",o))}},unmounted:e=>{e.removeEventListener("keydown",o)}};let n=!0,l=!0;const a=["escape","outside"],d=Symbol("bdropdown");var r=t.defineComponent({name:"BDropdown",directives:{trapFocus:s},provide(){return{[d]:this}},props:{modelValue:{type:[String,Number,Boolean,Object,Array,Function],default:null},disabled:Boolean,inline:Boolean,scrollable:Boolean,maxHeight:{type:[String,Number],default:200},position:{type:String,validator:e=>["is-top-right","is-top-left","is-bottom-left","is-bottom-right"].indexOf(e)>-1},triggers:{type:Array,default:()=>["click"]},mobileModal:{type:Boolean,default:()=>n},ariaRole:{type:String,validator:e=>["menu","list","dialog"].indexOf(e)>-1,default:null},animation:{type:String,default:"fade"},multiple:Boolean,trapFocus:{type:Boolean,default:()=>l},closeOnClick:{type:Boolean,default:!0},canClose:{type:[Array,Boolean],default:!0},expanded:Boolean,appendToBody:Boolean,appendToBodyCopyParent:Boolean,triggerTabindex:{type:Number,default:0}},emits:{"active-change":e=>!0,change:e=>!0,"update:modelValue":e=>!0},data(){return{selected:this.modelValue,style:{},isActive:!1,isHoverable:!1,maybeTap:!1,isTouchEnabled:!1,_bodyEl:void 0,timeOutID:void 0,timeOutID2:void 0}},computed:{rootClasses(){return[this.position,{"is-disabled":this.disabled,"is-hoverable":this.hoverable,"is-inline":this.inline,"is-active":this.isActive||this.inline,"is-mobile-modal":this.isMobileModal,"is-expanded":this.expanded,"is-touch-enabled":this.isTouchEnabled}]},isMobileModal(){return this.mobileModal&&!this.inline},cancelOptions(){return"boolean"==typeof this.canClose?this.canClose?a:[]:this.canClose},contentStyle(){var e,t;return{maxHeight:this.scrollable&&null!=(t=this.maxHeight,e=void 0===t?null:isNaN(+t)?`${t}`:t+"px")?e:void 0,overflow:this.scrollable?"auto":void 0}},hoverable(){return this.triggers.indexOf("hover")>=0}},watch:{modelValue(e){this.selected=e},isActive(e){this.$emit("active-change",e),e||(this.timeOutID=setTimeout((()=>{this.isActive||(this.isTouchEnabled=!1)}),250)),this.handleScroll(),this.appendToBody&&this.$nextTick((()=>{this.updateAppendToBody()}))},isHoverable(e){this.hoverable&&this.$emit("active-change",e)}},methods:{handleScroll(){"undefined"!=typeof window&&this.isMobileModal&&(this.isActive?document.documentElement.classList.add("is-clipped-touch"):document.documentElement.classList.remove("is-clipped-touch"))},selectItem(e){if(this.multiple){if(this.selected){const t=this.selected;-1===t.indexOf(e)?this.selected=[...t,e]:this.selected=t.filter((t=>t!==e))}else this.selected=[e];this.$emit("change",this.selected)}else this.selected!==e&&(this.selected=e,this.$emit("change",this.selected));this.$emit("update:modelValue",this.selected),this.multiple||(this.isActive=!this.closeOnClick,this.hoverable&&this.closeOnClick&&(this.isHoverable=!1))},isInWhiteList(e){if(e===this.$refs.dropdownMenu)return!0;if(e===this.$refs.trigger)return!0;if(null!=this.$refs.dropdownMenu){const t=this.$refs.dropdownMenu.querySelectorAll("*");for(const i of t)if(e===i)return!0}if(null!=this.$refs.trigger){const t=this.$refs.trigger.querySelectorAll("*");for(const i of t)if(e===i)return!0}return!1},clickedOutside(e){if(this.cancelOptions.indexOf("outside")<0)return;if(this.inline)return;const t=null!=(i=this).$root&&"shadowRoot"in i.$root.$options?e.composedPath()[0]:e.target;var i;this.isInWhiteList(t)||(this.isActive=!1)},keyPress({key:e}){if(this.isActive&&("Escape"===e||"Esc"===e)){if(this.cancelOptions.indexOf("escape")<0)return;this.isActive=!1}},onClick(){-1===this.triggers.indexOf("hover")&&(this.triggers.indexOf("click")<0||this.toggle())},onContextMenu(){this.triggers.indexOf("contextmenu")<0||this.toggle()},onHover(){this.triggers.indexOf("hover")<0||this.isTouchEnabled||(this.isHoverable=!0)},onTouchStart(){this.maybeTap=!0},onTouchMove(){this.maybeTap=!1},onTouchEnd(e){-1!==this.triggers.indexOf("hover")&&this.maybeTap&&(e.preventDefault(),this.maybeTap=!1,this.isTouchEnabled=!0,this.toggle())},onFocus(){this.triggers.indexOf("focus")<0||this.toggle()},toggle(){this.disabled||(this.isActive?this.isActive=!this.isActive:this.timeOutID2=setTimeout((()=>{const e=!this.isActive;this.isActive=e})))},updateAppendToBody(){const e=this.$refs.dropdown,t=this.$refs.dropdownMenu,i=this.$refs.trigger;if(t&&i){const o=this.$data._bodyEl.children[0];if(o.classList.forEach((e=>o.classList.remove(e))),o.classList.add("dropdown"),o.classList.add("dropdown-menu-animation"),this.rootClasses.forEach((e=>{if(e&&"object"==typeof e)for(const t in e)e[t]&&o.classList.add(t)})),this.appendToBodyCopyParent){const e=this.$refs.dropdown.parentNode,t=this.$data._bodyEl;t.classList.forEach((e=>t.classList.remove(e))),e.classList.forEach((e=>{t.classList.add(e)}))}const s=i.getBoundingClientRect();let n=s.top+window.scrollY,l=s.left+window.scrollX;!this.position||this.position.indexOf("bottom")>=0?n+=i.clientHeight:n-=t.clientHeight,this.position&&this.position.indexOf("left")>=0&&(l-=t.clientWidth-i.clientWidth),this.style={position:"absolute",top:`${n}px`,left:`${l}px`,zIndex:"99",width:this.expanded?`${e.offsetWidth}px`:void 0}}}},mounted(){this.appendToBody&&(this.$data._bodyEl=function(e){const t=document.createElement("div");t.style.position="absolute",t.style.left="0px",t.style.top="0px",t.style.width="100%";const i=document.createElement("div");return t.appendChild(i),i.appendChild(e),document.body.appendChild(t),t}(this.$refs.dropdownMenu),this.updateAppendToBody())},created(){"undefined"!=typeof window&&(document.addEventListener("click",this.clickedOutside),document.addEventListener("keyup",this.keyPress))},beforeUnmount(){var e;"undefined"!=typeof window&&(document.removeEventListener("click",this.clickedOutside),document.removeEventListener("keyup",this.keyPress),document.documentElement.classList.remove("is-clipped-touch")),this.appendToBody&&(void 0!==(e=this.$data._bodyEl).remove?e.remove():void 0!==e.parentNode&&null!==e.parentNode&&e.parentNode.removeChild(e)),clearTimeout(this.timeOutID),clearTimeout(this.timeOutID2)}}),c=(e,t)=>{const i=e.__vccOpts||e;for(const[e,o]of t)i[e]=o;return i};const h=["tabindex"],u=["aria-hidden"],p=["aria-hidden"],m=["role","aria-modal"];var f=c(r,[["render",function(e,i,o,s,n,l){const a=t.resolveDirective("trap-focus");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["dropdown dropdown-menu-animation",e.rootClasses]),ref:"dropdown",onMouseleave:i[7]||(i[7]=t=>e.isHoverable=!1)},[e.inline?t.createCommentVNode("v-if",!0):(t.openBlock(),t.createElementBlock("div",{key:0,tabindex:e.disabled?void 0:e.triggerTabindex,ref:"trigger",class:"dropdown-trigger",onClick:i[0]||(i[0]=(...t)=>e.onClick&&e.onClick(...t)),onContextmenu:i[1]||(i[1]=t.withModifiers(((...t)=>e.onContextMenu&&e.onContextMenu(...t)),["prevent"])),onMouseenter:i[2]||(i[2]=(...t)=>e.onHover&&e.onHover(...t)),onFocusCapture:i[3]||(i[3]=(...t)=>e.onFocus&&e.onFocus(...t)),onTouchstart:i[4]||(i[4]=(...t)=>e.onTouchStart&&e.onTouchStart(...t)),onTouchmove:i[5]||(i[5]=(...t)=>e.onTouchMove&&e.onTouchMove(...t)),onTouchend:i[6]||(i[6]=(...t)=>e.onTouchEnd&&e.onTouchEnd(...t)),"aria-haspopup":"true"},[t.renderSlot(e.$slots,"trigger",{active:e.isActive})],40,h)),t.createVNode(t.Transition,{name:e.animation},{default:t.withCtx((()=>[e.isMobileModal?t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:0,class:"background","aria-hidden":!e.isActive},null,8,u)),[[t.vShow,e.isActive]]):t.createCommentVNode("v-if",!0)])),_:1},8,["name"]),t.createVNode(t.Transition,{name:e.animation,persisted:""},{default:t.withCtx((()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref:"dropdownMenu",class:"dropdown-menu",style:t.normalizeStyle(e.style),"aria-hidden":!e.isActive},[t.createElementVNode("div",{class:"dropdown-content",role:e.ariaRole,"aria-modal":!e.inline,style:t.normalizeStyle(e.contentStyle)},[t.renderSlot(e.$slots,"default")],12,m)],12,p)),[[t.vShow,!e.disabled&&(e.isActive||e.isHoverable)||e.inline],[a,e.trapFocus]])])),_:3},8,["name"])],34)}]]),v=t.defineComponent({name:"BDropdownItem",inject:{parent:{from:d,default:void 0}},props:{value:{type:[String,Number,Boolean,Object,Array,Function],default:null},separator:Boolean,disabled:Boolean,custom:Boolean,focusable:{type:Boolean,default:!0},paddingless:Boolean,hasLink:Boolean,ariaRole:{type:String,default:""}},emits:{click:()=>!0},computed:{anchorClasses(){return{"is-disabled":this.parent.disabled||this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive}},itemClasses(){return{"dropdown-item":!this.hasLink,"is-disabled":this.disabled,"is-paddingless":this.paddingless,"is-active":this.isActive,"has-link":this.hasLink}},ariaRoleItem(){return"menuitem"===this.ariaRole||"listitem"===this.ariaRole?this.ariaRole:void 0},isClickable(){return!(this.parent.disabled||this.separator||this.disabled||this.custom)},isActive(){return null!==this.parent.selected&&(this.parent.multiple?this.parent.selected.indexOf(this.value)>=0:this.value===this.parent.selected)},isFocusable(){return!this.hasLink&&this.focusable}},methods:{selectItem(){this.isClickable&&(this.parent.selectItem(this.value),this.$emit("click"))}}});const b={key:0,class:"dropdown-divider"},y=["role","tabindex"],g=["role","tabindex"];var k=c(v,[["render",function(e,i,o,s,n,l){return e.separator?(t.openBlock(),t.createElementBlock("hr",b)):e.custom||e.hasLink?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(e.itemClasses),onClick:i[1]||(i[1]=(...t)=>e.selectItem&&e.selectItem(...t)),role:e.ariaRoleItem,tabindex:e.isFocusable?0:void 0},[t.renderSlot(e.$slots,"default")],10,g)):(t.openBlock(),t.createElementBlock("a",{key:1,class:t.normalizeClass(["dropdown-item",e.anchorClasses]),onClick:i[0]||(i[0]=(...t)=>e.selectItem&&e.selectItem(...t)),role:e.ariaRoleItem,tabindex:e.isFocusable?0:void 0},[t.renderSlot(e.$slots,"default")],10,y))}]]);const x=(e,t,i)=>{const o=t.name;if(null==o)throw new Error("Buefy.registerComponent: missing component name");e.component(o,t)},w={install(e){x(e,f),x(e,k)}};e.BDropdown=f,e.BDropdownItem=k,e.default=w,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).Field={},e.Vue)}(this,(function(e,t){"use strict";let s=null;var n=t.defineComponent({name:"BFieldBody",inject:{parent:{from:"BField",default:null}},props:{message:{type:[String,Array]},type:{type:[String,Object]}},render(){let e=!0,s="function"==typeof this.$slots.default?this.$slots.default():this.$slots.default;return null!=s&&1===s.length&&s[0].type===t.Fragment&&(s=s[0].children),t.h("div",{class:"field-body"},{default:()=>null!=s&&s.map((s=>{if(s.type===t.Comment||s.type===t.Text)return s;let n;e&&(n=this.message,e=!1);const l=this.parent;return t.h(l?l.$.type:t.resolveComponent("b-field"),{type:this.type,message:n},(()=>s))}))})}});const l=t.defineComponent({name:"BField",components:{BFieldBody:n},provide(){return{BField:this}},inject:{parent:{from:"BField",default:!1}},props:{type:{type:[String,Object],default:void 0},label:String,labelFor:String,message:{type:[String,Array,Object],default:void 0},grouped:Boolean,groupMultiline:Boolean,position:String,expanded:Boolean,horizontal:Boolean,addons:{type:Boolean,default:!0},customClass:String,labelPosition:{type:String,default:()=>s}},data(){return{newType:this.type,newMessage:this.message,fieldLabelSize:null,numberInputClasses:[],_isField:!0}},computed:{rootClasses(){return[{"is-expanded":this.expanded,"is-horizontal":this.horizontal,"is-floating-in-label":this.hasLabel&&!this.horizontal&&"inside"===this.labelPosition,"is-floating-label":this.hasLabel&&!this.horizontal&&"on-border"===this.labelPosition},this.numberInputClasses]},innerFieldClasses(){return[this.fieldType(),this.newPosition,{"is-grouped-multiline":this.groupMultiline}]},hasInnerField(){return this.grouped||this.groupMultiline||this.hasAddons()},newPosition(){if(void 0===this.position)return;const e=this.position.split("-");if(e.length<1)return;const t=this.grouped?"is-grouped-":"has-addons-";return this.position?t+e[1]:void 0},formattedMessage(){const e=this.parent;if(e&&e.hasInnerField)return"";if("string"==typeof this.newMessage)return[this.newMessage];const t=[];if(Array.isArray(this.newMessage))this.newMessage.forEach((e=>{if("string"==typeof e)t.push(e);else for(const s in e)e[s]&&t.push(s)}));else for(const e in this.newMessage)this.newMessage[e]&&t.push(e);return t.filter((e=>!!e))},hasLabel(){return this.label||this.$slots.label},hasMessage(){const e=this.parent;return(!e||!e.hasInnerField)&&this.newMessage||this.$slots.message}},watch:{type(e){this.newType=e},message(e){JSON.stringify(e)!==JSON.stringify(this.newMessage)&&(this.newMessage=e)},newMessage(e){const t=this.parent;t&&t.hasInnerField&&(t.type||(t.newType=this.newType),t.message||(t.newMessage=e))}},methods:{fieldType(){return this.grouped?"is-grouped":this.hasAddons()?"has-addons":void 0},hasAddons(){let e=0;return this.$slots.default&&(e=this.$slots.default().reduce(((e,s)=>{return(n=s).type!==t.Comment&&n.type!==t.Text&&n.type!==t.Static?e+1:e;var n}),0)),e>1&&this.addons&&!this.horizontal},wrapNumberinput({controlsPosition:e,size:t}){const s=["has-numberinput"];e&&s.push(`has-numberinput-${e}`),t&&s.push(`has-numberinput-${t}`),this.numberInputClasses=s}},mounted(){if(this.horizontal){this.$el.querySelectorAll(".input, .select, .button, .textarea, .b-slider").length>0&&(this.fieldLabelSize="is-normal")}}});const o=["for"],i=["for"],a={key:3,class:"field-body"};var r=((e,t)=>{const s=e.__vccOpts||e;for(const[e,n]of t)s[e]=n;return s})(l,[["render",function(e,s,n,l,r,d){const p=t.resolveComponent("b-field-body"),h=t.resolveComponent("b-field");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["field",e.rootClasses])},[e.horizontal?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["field-label",[e.customClass,e.fieldLabelSize]])},[e.hasLabel?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.labelFor,class:t.normalizeClass([e.customClass,"label"])},[e.$slots.label?t.renderSlot(e.$slots,"label",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.label),1)],64))],10,o)):t.createCommentVNode("v-if",!0)],2)):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.hasLabel?(t.openBlock(),t.createElementBlock("label",{key:0,for:e.labelFor,class:t.normalizeClass([e.customClass,"label"])},[e.$slots.label?t.renderSlot(e.$slots,"label",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(e.label),1)],64))],10,i)):t.createCommentVNode("v-if",!0)],64)),e.horizontal?(t.openBlock(),t.createBlock(p,{key:2,message:e.newMessage?e.formattedMessage:"",type:e.newType},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},8,["message","type"])):e.hasInnerField?(t.openBlock(),t.createElementBlock("div",a,[t.createVNode(h,{addons:!1,type:e.type,class:t.normalizeClass(e.innerFieldClasses)},{default:t.withCtx((()=>[t.renderSlot(e.$slots,"default")])),_:3},8,["type","class"])])):t.renderSlot(e.$slots,"default",{key:4}),e.hasMessage&&!e.horizontal?(t.openBlock(),t.createElementBlock("p",{key:5,class:t.normalizeClass(["help",e.newType])},[e.$slots.message?t.renderSlot(e.$slots,"message",{key:0,messages:e.formattedMessage}):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.formattedMessage,((s,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createTextVNode(t.toDisplayString(s)+" ",1),n+1<e.formattedMessage.length?(t.openBlock(),t.createElementBlock("br",{key:n})):t.createCommentVNode("v-if",!0)],64)))),256))],2)):t.createCommentVNode("v-if",!0)],2)}]]);const d={install(e){((e,t)=>{const s=t.name;if(null==s)throw new Error("Buefy.registerComponent: missing component name");e.component(s,t)})(e,r)}};e.BField=r,e.default=d,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
|
|
@@ -61,6 +61,81 @@
|
|
|
61
61
|
return icons;
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
+
const defaultIconAliases = {
|
|
65
|
+
checkboxOn: {
|
|
66
|
+
type: "svg",
|
|
67
|
+
viewBox: "0 0 1 1",
|
|
68
|
+
path: "M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z"
|
|
69
|
+
},
|
|
70
|
+
checkboxIndeterminate: {
|
|
71
|
+
type: "svg",
|
|
72
|
+
viewBox: "0 0 1 1",
|
|
73
|
+
path: "M 0.15,0.4 L 0.85,0.4 L 0.85,0.6 L 0.15,0.6 Z"
|
|
74
|
+
},
|
|
75
|
+
chevronLeft: {
|
|
76
|
+
type: "svg",
|
|
77
|
+
path: "M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"
|
|
78
|
+
},
|
|
79
|
+
chevronRight: {
|
|
80
|
+
type: "svg",
|
|
81
|
+
path: "M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"
|
|
82
|
+
},
|
|
83
|
+
chevronDown: {
|
|
84
|
+
type: "svg",
|
|
85
|
+
path: "M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"
|
|
86
|
+
},
|
|
87
|
+
chevronUp: {
|
|
88
|
+
type: "svg",
|
|
89
|
+
path: "M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"
|
|
90
|
+
},
|
|
91
|
+
menuDown: {
|
|
92
|
+
type: "svg",
|
|
93
|
+
path: "M7,10L12,15L17,10H7Z"
|
|
94
|
+
},
|
|
95
|
+
menuUp: {
|
|
96
|
+
type: "svg",
|
|
97
|
+
path: "M7,14L12,9L17,14H7Z"
|
|
98
|
+
},
|
|
99
|
+
check: {
|
|
100
|
+
type: "svg",
|
|
101
|
+
path: "M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"
|
|
102
|
+
},
|
|
103
|
+
alertCircle: {
|
|
104
|
+
type: "svg",
|
|
105
|
+
path: "M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"
|
|
106
|
+
},
|
|
107
|
+
alert: {
|
|
108
|
+
type: "svg",
|
|
109
|
+
path: "M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"
|
|
110
|
+
},
|
|
111
|
+
information: {
|
|
112
|
+
type: "svg",
|
|
113
|
+
path: "M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"
|
|
114
|
+
},
|
|
115
|
+
close: {
|
|
116
|
+
type: "svg",
|
|
117
|
+
path: "M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"
|
|
118
|
+
},
|
|
119
|
+
closeCircle: {
|
|
120
|
+
type: "svg",
|
|
121
|
+
path: "M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"
|
|
122
|
+
},
|
|
123
|
+
eye: {
|
|
124
|
+
type: "svg",
|
|
125
|
+
path: "M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"
|
|
126
|
+
},
|
|
127
|
+
eyeOff: {
|
|
128
|
+
type: "svg",
|
|
129
|
+
path: "M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.18 16.38,18.6L16.81,19L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
function getIconAliases() {
|
|
133
|
+
return defaultIconAliases;
|
|
134
|
+
}
|
|
135
|
+
function resolveAlias(name) {
|
|
136
|
+
return getIconAliases()[name];
|
|
137
|
+
}
|
|
138
|
+
|
|
64
139
|
var _sfc_main = vue.defineComponent({
|
|
65
140
|
name: "BIcon",
|
|
66
141
|
props: {
|
|
@@ -69,8 +144,11 @@
|
|
|
69
144
|
pack: String,
|
|
70
145
|
icon: {
|
|
71
146
|
type: String,
|
|
72
|
-
required:
|
|
147
|
+
required: false,
|
|
148
|
+
default: void 0
|
|
73
149
|
},
|
|
150
|
+
/** Key into IconAliases (e.g. "chevronLeft"). Takes precedence over icon/pack. */
|
|
151
|
+
alias: String,
|
|
74
152
|
size: String,
|
|
75
153
|
customSize: String,
|
|
76
154
|
customClass: String,
|
|
@@ -78,6 +156,26 @@
|
|
|
78
156
|
// This is used internally to show both MDI and FA icon
|
|
79
157
|
},
|
|
80
158
|
computed: {
|
|
159
|
+
resolvedAlias() {
|
|
160
|
+
var _a;
|
|
161
|
+
if (!this.alias) return null;
|
|
162
|
+
return (_a = resolveAlias(this.alias)) != null ? _a : null;
|
|
163
|
+
},
|
|
164
|
+
isSvgAlias() {
|
|
165
|
+
var _a;
|
|
166
|
+
return ((_a = this.resolvedAlias) == null ? void 0 : _a.type) === "svg";
|
|
167
|
+
},
|
|
168
|
+
isComponentAlias() {
|
|
169
|
+
var _a;
|
|
170
|
+
return ((_a = this.resolvedAlias) == null ? void 0 : _a.type) === "component";
|
|
171
|
+
},
|
|
172
|
+
// Typed accessors used in the template
|
|
173
|
+
resolvedAliasSvg() {
|
|
174
|
+
return this.resolvedAlias;
|
|
175
|
+
},
|
|
176
|
+
resolvedAliasComponent() {
|
|
177
|
+
return this.resolvedAlias;
|
|
178
|
+
},
|
|
81
179
|
iconConfig() {
|
|
82
180
|
const allIcons = getIcons();
|
|
83
181
|
return allIcons[this.newPack];
|
|
@@ -94,7 +192,8 @@
|
|
|
94
192
|
* internal icons are always MDI.
|
|
95
193
|
*/
|
|
96
194
|
newIcon() {
|
|
97
|
-
|
|
195
|
+
var _a;
|
|
196
|
+
return `${this.iconPrefix}${this.getEquivalentIconOf((_a = this.icon) != null ? _a : "")}`;
|
|
98
197
|
},
|
|
99
198
|
newPack() {
|
|
100
199
|
return this.pack || config.defaultIconPack;
|
|
@@ -161,6 +260,8 @@
|
|
|
161
260
|
return target;
|
|
162
261
|
};
|
|
163
262
|
|
|
263
|
+
const _hoisted_1 = ["viewBox"];
|
|
264
|
+
const _hoisted_2 = ["d"];
|
|
164
265
|
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
165
266
|
return vue.openBlock(), vue.createElementBlock(
|
|
166
267
|
"span",
|
|
@@ -168,17 +269,32 @@
|
|
|
168
269
|
class: vue.normalizeClass(["icon", [_ctx.newType, _ctx.size]])
|
|
169
270
|
},
|
|
170
271
|
[
|
|
171
|
-
|
|
272
|
+
_ctx.isSvgAlias ? (vue.openBlock(), vue.createElementBlock("svg", {
|
|
273
|
+
key: 0,
|
|
274
|
+
viewBox: _ctx.resolvedAliasSvg.viewBox || "0 0 24 24",
|
|
275
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
276
|
+
class: vue.normalizeClass(_ctx.customClass),
|
|
277
|
+
"aria-hidden": "true"
|
|
278
|
+
}, [
|
|
279
|
+
vue.createElementVNode("path", {
|
|
280
|
+
fill: "currentColor",
|
|
281
|
+
d: _ctx.resolvedAliasSvg.path
|
|
282
|
+
}, null, 8, _hoisted_2)
|
|
283
|
+
], 10, _hoisted_1)) : _ctx.isComponentAlias ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.resolvedAliasComponent.component), {
|
|
284
|
+
key: 1,
|
|
285
|
+
icon: _ctx.resolvedAliasComponent.icon,
|
|
286
|
+
class: vue.normalizeClass(_ctx.customClass)
|
|
287
|
+
}, null, 8, ["icon", "class"])) : !_ctx.useIconComponent ? (vue.openBlock(), vue.createElementBlock(
|
|
172
288
|
"i",
|
|
173
289
|
{
|
|
174
|
-
key:
|
|
290
|
+
key: 2,
|
|
175
291
|
class: vue.normalizeClass([_ctx.newPack, _ctx.newIcon, _ctx.newCustomSize, _ctx.customClass])
|
|
176
292
|
},
|
|
177
293
|
null,
|
|
178
294
|
2
|
|
179
295
|
/* CLASS */
|
|
180
296
|
)) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(_ctx.useIconComponent), {
|
|
181
|
-
key:
|
|
297
|
+
key: 3,
|
|
182
298
|
icon: [_ctx.newPack, _ctx.newIcon],
|
|
183
299
|
size: _ctx.newCustomSize,
|
|
184
300
|
class: vue.normalizeClass([_ctx.customClass])
|
|
@@ -206,6 +322,8 @@
|
|
|
206
322
|
|
|
207
323
|
exports.BIcon = Icon;
|
|
208
324
|
exports.default = Plugin;
|
|
325
|
+
exports.getIconAliases = getIconAliases;
|
|
326
|
+
exports.resolveAlias = resolveAlias;
|
|
209
327
|
|
|
210
328
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
211
329
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
2
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Icon={},e.Vue)}(this,(function(e,n){"use strict";let
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("vue")):"function"==typeof define&&define.amd?define(["exports","vue"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).Icon={},e.Vue)}(this,(function(e,n){"use strict";let t="mdi",i=null;const o={sizes:{default:"mdi-24px","is-small":null,"is-medium":"mdi-36px","is-large":"mdi-48px"},iconPrefix:"mdi-"},s=()=>{const e="fa-";return{sizes:{default:null,"is-small":null,"is-medium":e+"lg","is-large":e+"2x"},iconPrefix:e,internalIcons:{information:"info-circle",alert:"exclamation-triangle","alert-circle":"exclamation-circle","chevron-right":"angle-right","chevron-left":"angle-left","chevron-down":"angle-down","eye-off":"eye-slash","menu-down":"caret-down","menu-up":"caret-up","close-circle":"times-circle"}}},l={checkboxOn:{type:"svg",viewBox:"0 0 1 1",path:"M 0.04038059,0.6267767 0.14644661,0.52071068 0.42928932,0.80355339 0.3232233,0.90961941 z M 0.21715729,0.80355339 0.85355339,0.16715729 0.95961941,0.2732233 0.3232233,0.90961941 z"},checkboxIndeterminate:{type:"svg",viewBox:"0 0 1 1",path:"M 0.15,0.4 L 0.85,0.4 L 0.85,0.6 L 0.15,0.6 Z"},chevronLeft:{type:"svg",path:"M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z"},chevronRight:{type:"svg",path:"M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z"},chevronDown:{type:"svg",path:"M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"},chevronUp:{type:"svg",path:"M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z"},menuDown:{type:"svg",path:"M7,10L12,15L17,10H7Z"},menuUp:{type:"svg",path:"M7,14L12,9L17,14H7Z"},check:{type:"svg",path:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},alertCircle:{type:"svg",path:"M13,13H11V7H13M13,17H11V15H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},alert:{type:"svg",path:"M13,14H11V10H13M13,18H11V16H13M1,21H23L12,2L1,21Z"},information:{type:"svg",path:"M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},close:{type:"svg",path:"M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"},closeCircle:{type:"svg",path:"M12,2C17.53,2 22,6.47 22,12C22,17.53 17.53,22 12,22C6.47,22 2,17.53 2,12C2,6.47 6.47,2 12,2M15.59,7L12,10.59L8.41,7L7,8.41L10.59,12L7,15.59L8.41,17L12,13.41L15.59,17L17,15.59L13.41,12L17,8.41L15.59,7Z"},eye:{type:"svg",path:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"},eyeOff:{type:"svg",path:"M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.18 16.38,18.6L16.81,19L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z"}};function r(){return l}function a(e){return r()[e]}var c=n.defineComponent({name:"BIcon",props:{type:[String,Object],component:String,pack:String,icon:{type:String,required:!1,default:void 0},alias:String,size:String,customSize:String,customClass:String,both:Boolean},computed:{resolvedAlias(){var e;return this.alias&&null!=(e=a(this.alias))?e:null},isSvgAlias(){var e;return"svg"===(null==(e=this.resolvedAlias)?void 0:e.type)},isComponentAlias(){var e;return"component"===(null==(e=this.resolvedAlias)?void 0:e.type)},resolvedAliasSvg(){return this.resolvedAlias},resolvedAliasComponent(){return this.resolvedAlias},iconConfig(){return{mdi:o,fa:s(),fas:s(),far:s(),fad:s(),fab:s(),fal:s(),"fa-solid":s(),"fa-regular":s(),"fa-light":s(),"fa-thin":s(),"fa-duotone":s(),"fa-brands":s()}[this.newPack]},iconPrefix(){return this.iconConfig&&this.iconConfig.iconPrefix?this.iconConfig.iconPrefix:""},newIcon(){var e;return`${this.iconPrefix}${this.getEquivalentIconOf(null!=(e=this.icon)?e:"")}`},newPack(){return this.pack||t},newType(){if(!this.type)return;let e=[];if("string"==typeof this.type)e=this.type.split("-");else for(const n in this.type)if(this.type[n]){e=n.split("-");break}if(e.length<=1)return;const[,...n]=e;return`has-text-${n.join("-")}`},newCustomSize(){return this.customSize||this.customSizeByPack},customSizeByPack(){if(this.iconConfig&&this.iconConfig.sizes){if(this.size&&void 0!==this.iconConfig.sizes[this.size])return this.iconConfig.sizes[this.size];if(this.iconConfig.sizes.default)return this.iconConfig.sizes.default}return null},useIconComponent(){return this.component||i}},methods:{getEquivalentIconOf(e){if(!this.both)return e;if(null==this.iconConfig)return e;const n=this.iconConfig;return n&&n.internalIcons&&n.internalIcons[e]?n.internalIcons[e]:e}}});const u=["viewBox"],p=["d"];var f=((e,n)=>{const t=e.__vccOpts||e;for(const[e,i]of n)t[e]=i;return t})(c,[["render",function(e,t,i,o,s,l){return n.openBlock(),n.createElementBlock("span",{class:n.normalizeClass(["icon",[e.newType,e.size]])},[e.isSvgAlias?(n.openBlock(),n.createElementBlock("svg",{key:0,viewBox:e.resolvedAliasSvg.viewBox||"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",class:n.normalizeClass(e.customClass),"aria-hidden":"true"},[n.createElementVNode("path",{fill:"currentColor",d:e.resolvedAliasSvg.path},null,8,p)],10,u)):e.isComponentAlias?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.resolvedAliasComponent.component),{key:1,icon:e.resolvedAliasComponent.icon,class:n.normalizeClass(e.customClass)},null,8,["icon","class"])):e.useIconComponent?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(e.useIconComponent),{key:3,icon:[e.newPack,e.newIcon],size:e.newCustomSize,class:n.normalizeClass([e.customClass])},null,8,["icon","size","class"])):(n.openBlock(),n.createElementBlock("i",{key:2,class:n.normalizeClass([e.newPack,e.newIcon,e.newCustomSize,e.customClass])},null,2))],2)}]]);const h={install(e){((e,n)=>{const t=n.name;if(null==t)throw new Error("Buefy.registerComponent: missing component name");e.component(t,n)})(e,f)}};e.BIcon=f,e.default=h,e.getIconAliases=r,e.resolveAlias=a,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! Buefy v3.0.
|
|
1
|
+
/*! Buefy v3.0.6 | MIT License | github.com/buefy/buefy */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue'], factory) :
|