maz-ui 2.3.13 → 2.4.2
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/components/MazArrowIcon.d.ts +43 -0
- package/components/MazArrowIcon.js +1 -0
- package/components/MazAvatar.d.ts +149 -0
- package/components/MazAvatar.js +3 -0
- package/components/MazBackdrop.d.ts +89 -0
- package/components/MazBackdrop.js +3 -0
- package/components/MazBadge.d.ts +68 -0
- package/components/MazBadge.js +1 -0
- package/components/MazBottomSheet.d.ts +29 -0
- package/components/MazBottomSheet.js +3 -0
- package/components/MazBtn.d.ts +171 -0
- package/components/MazBtn.js +3 -0
- package/components/MazCard.d.ts +183 -0
- package/components/MazCard.js +3 -0
- package/components/MazCarousel.d.ts +16 -0
- package/components/MazCarousel.js +3 -0
- package/components/MazChart/includes.d.ts +11 -0
- package/components/MazChart.d.ts +114 -0
- package/components/MazChart.js +1 -0
- package/components/MazCheckbox.d.ts +49 -0
- package/components/MazCheckbox.js +1 -0
- package/components/MazDialog.d.ts +29 -0
- package/components/MazDialog.js +3 -0
- package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +30 -0
- package/components/MazDialogPromise.d.ts +28 -0
- package/components/MazDialogPromise.js +3 -0
- package/components/MazDrawer.d.ts +59 -0
- package/components/MazDrawer.js +3 -0
- package/components/MazDropzone.d.ts +128 -0
- package/components/MazDropzone.js +3 -0
- package/components/MazGallery.d.ts +144 -0
- package/components/MazGallery.js +3 -0
- package/components/MazIcon.d.ts +66 -0
- package/components/MazIcon.js +3 -0
- package/components/MazInput.d.ts +276 -0
- package/components/MazInput.js +3 -0
- package/components/MazInputNumber.d.ts +67 -0
- package/components/MazInputNumber.js +3 -0
- package/components/MazInputPrice.d.ts +64 -0
- package/components/MazInputPrice.js +3 -0
- package/components/MazInputTags.d.ts +96 -0
- package/components/MazInputTags.js +3 -0
- package/components/MazLazyImg.d.ts +80 -0
- package/components/MazLazyImg.js +3 -0
- package/components/MazPhoneNumberInput/constantes/locales.d.ts +12 -0
- package/components/MazPhoneNumberInput/types.d.ts +21 -0
- package/components/MazPhoneNumberInput/utils/countries-name-list-by-iso-code.d.ts +2 -0
- package/components/MazPhoneNumberInput/utils/index.d.ts +12 -0
- package/components/MazPhoneNumberInput.d.ts +255 -0
- package/components/MazPhoneNumberInput.js +3 -0
- package/components/MazPicker/MazPickerCalendar.vue.d.ts +137 -0
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarDays.vue.d.ts +22 -0
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +114 -0
- package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +124 -0
- package/components/MazPicker/MazPickerCalendarSwitcher.vue.d.ts +38 -0
- package/components/MazPicker/MazPickerContainer.vue.d.ts +212 -0
- package/components/MazPicker/MazPickerHeader.vue.d.ts +84 -0
- package/components/MazPicker/MazPickerMonthSwitcher.vue.d.ts +43 -0
- package/components/MazPicker/MazPickerShortcuts.vue.d.ts +62 -0
- package/components/MazPicker/MazPickerTime.vue.d.ts +129 -0
- package/components/MazPicker/MazPickerYearSwitcher.vue.d.ts +35 -0
- package/components/MazPicker/types.d.ts +15 -0
- package/components/MazPicker/utils.d.ts +54 -0
- package/components/MazPicker.d.ts +313 -0
- package/components/MazPicker.js +3 -0
- package/components/MazRadioButtons.d.ts +69 -0
- package/components/MazRadioButtons.js +1 -0
- package/components/MazSelect.d.ts +176 -0
- package/components/MazSelect.js +3 -0
- package/components/MazSlider/utils.d.ts +15 -0
- package/components/MazSlider.d.ts +96 -0
- package/components/MazSlider.js +3 -0
- package/components/MazSpinner.d.ts +30 -0
- package/components/MazSpinner.js +1 -0
- package/components/MazStepper.d.ts +73 -0
- package/components/MazStepper.js +1 -0
- package/components/MazSwitch.d.ts +56 -0
- package/components/MazSwitch.js +1 -0
- package/components/MazTabsBar.d.ts +49 -0
- package/components/MazTabsBar.js +3 -0
- package/components/MazTabsContent.d.ts +16 -0
- package/components/MazTabsContent.js +1 -0
- package/components/MazTabsContentItem.d.ts +14 -0
- package/components/MazTabsContentItem.js +3 -0
- package/components/MazTextarea/textarea-autogrow.d.ts +9 -0
- package/components/MazTextarea.d.ts +125 -0
- package/components/MazTextarea.js +1 -0
- package/components/MazTransitionExpand.d.ts +4 -0
- package/components/MazTransitionExpand.js +1 -0
- package/components/index.d.ts +34 -0
- package/components/index.js +36 -0
- package/components/no_photo-a72545e4.js +1 -0
- package/components/types.d.ts +17 -0
- package/css/aos.css +1 -0
- package/css/main.css +1 -0
- package/maz-ui.d.ts +307 -0
- package/modules/index.js +3 -0
- package/modules/no_photo-a72545e4.js +1 -0
- package/package.json +145 -81
- package/tailwindcss/tailwind.config.js +65 -0
- package/tailwindcss/utils/colors.js +28 -0
- package/tailwindcss/variables/breakpoints.js +15 -0
- package/tailwindcss/variables/colors.js +44 -0
- package/tailwindcss/variables/utilities.js +20 -0
- package/tailwindcss/variables/z-indexes.js +15 -0
- package/LICENSE +0 -21
- package/README.md +0 -66
- package/bin/index.js +0 -63
- package/bin/lib/_constantes/default-colors.js +0 -69
- package/bin/lib/index.d.ts +0 -2
- package/bin/lib/index.js +0 -145
- package/bin/lib/methods/generate-root-css.js +0 -49
- package/bin/lib/methods/get-theme-settings.js +0 -58
- package/bin/lib/methods/set-css-vars.js +0 -11
- package/lib/css/base.css +0 -1
- package/lib/css/index.css +0 -1
- package/lib/css/maz-avatar.css +0 -1
- package/lib/css/maz-bottom-sheet.css +0 -1
- package/lib/css/maz-btn-group.css +0 -1
- package/lib/css/maz-btn.css +0 -0
- package/lib/css/maz-card.css +0 -1
- package/lib/css/maz-carousel.css +0 -1
- package/lib/css/maz-checkbox.css +0 -1
- package/lib/css/maz-collapse.css +0 -1
- package/lib/css/maz-dialog.css +0 -1
- package/lib/css/maz-draggable-list.css +0 -1
- package/lib/css/maz-dropdown.css +0 -1
- package/lib/css/maz-dropzone.css +0 -1
- package/lib/css/maz-flex.css +0 -0
- package/lib/css/maz-gallery.css +0 -0
- package/lib/css/maz-img.css +0 -1
- package/lib/css/maz-input-tags.css +0 -1
- package/lib/css/maz-input.css +0 -0
- package/lib/css/maz-list-item.css +0 -1
- package/lib/css/maz-list.css +0 -1
- package/lib/css/maz-loader.css +0 -0
- package/lib/css/maz-pagination.css +0 -1
- package/lib/css/maz-phone-number-input.css +0 -1
- package/lib/css/maz-picker.css +0 -1
- package/lib/css/maz-plotly.css +0 -0
- package/lib/css/maz-progress-bar.css +0 -1
- package/lib/css/maz-radio.css +0 -1
- package/lib/css/maz-read-more.css +0 -1
- package/lib/css/maz-responsive-menu.css +0 -1
- package/lib/css/maz-search.css +0 -1
- package/lib/css/maz-select.css +0 -0
- package/lib/css/maz-sidebar.css +0 -1
- package/lib/css/maz-slider.css +0 -1
- package/lib/css/maz-spinner.css +0 -0
- package/lib/css/maz-stepper.css +0 -1
- package/lib/css/maz-switch.css +0 -1
- package/lib/css/maz-tabs-bar.css +0 -1
- package/lib/css/maz-tabs-content-item.css +0 -1
- package/lib/css/maz-tabs-content.css +0 -1
- package/lib/css/maz-transition-expand.css +0 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/maz-avatar.d.ts +0 -3
- package/lib/maz-avatar.js +0 -430
- package/lib/maz-bottom-sheet.d.ts +0 -3
- package/lib/maz-bottom-sheet.js +0 -1045
- package/lib/maz-btn-group.d.ts +0 -3
- package/lib/maz-btn-group.js +0 -907
- package/lib/maz-btn.d.ts +0 -3
- package/lib/maz-btn.js +0 -764
- package/lib/maz-card.d.ts +0 -3
- package/lib/maz-card.js +0 -572
- package/lib/maz-carousel.d.ts +0 -3
- package/lib/maz-carousel.js +0 -569
- package/lib/maz-checkbox.d.ts +0 -3
- package/lib/maz-checkbox.js +0 -359
- package/lib/maz-collapse.d.ts +0 -3
- package/lib/maz-collapse.js +0 -1238
- package/lib/maz-dialog.d.ts +0 -3
- package/lib/maz-dialog.js +0 -1315
- package/lib/maz-draggable-list.d.ts +0 -3
- package/lib/maz-draggable-list.js +0 -439
- package/lib/maz-dropdown.d.ts +0 -3
- package/lib/maz-dropdown.js +0 -438
- package/lib/maz-dropzone.d.ts +0 -3
- package/lib/maz-dropzone.js +0 -664
- package/lib/maz-flex.d.ts +0 -3
- package/lib/maz-flex.js +0 -427
- package/lib/maz-gallery.d.ts +0 -3
- package/lib/maz-gallery.js +0 -672
- package/lib/maz-img.d.ts +0 -3
- package/lib/maz-img.js +0 -612
- package/lib/maz-input-tags.d.ts +0 -3
- package/lib/maz-input-tags.js +0 -1207
- package/lib/maz-input.d.ts +0 -3
- package/lib/maz-input.js +0 -1076
- package/lib/maz-list-item.d.ts +0 -3
- package/lib/maz-list-item.js +0 -304
- package/lib/maz-list.d.ts +0 -3
- package/lib/maz-list.js +0 -331
- package/lib/maz-loader.d.ts +0 -3
- package/lib/maz-loader.js +0 -304
- package/lib/maz-pagination.d.ts +0 -3
- package/lib/maz-pagination.js +0 -1414
- package/lib/maz-phone-number-input.d.ts +0 -3
- package/lib/maz-phone-number-input.js +0 -3776
- package/lib/maz-picker.d.ts +0 -3
- package/lib/maz-picker.js +0 -6474
- package/lib/maz-plotly.d.ts +0 -3
- package/lib/maz-plotly.js +0 -500
- package/lib/maz-progress-bar.d.ts +0 -3
- package/lib/maz-progress-bar.js +0 -398
- package/lib/maz-radio.d.ts +0 -3
- package/lib/maz-radio.js +0 -358
- package/lib/maz-read-more.d.ts +0 -3
- package/lib/maz-read-more.js +0 -344
- package/lib/maz-responsive-menu.d.ts +0 -3
- package/lib/maz-responsive-menu.js +0 -438
- package/lib/maz-search.d.ts +0 -3
- package/lib/maz-search.js +0 -1590
- package/lib/maz-select.d.ts +0 -3
- package/lib/maz-select.js +0 -2740
- package/lib/maz-sidebar.d.ts +0 -3
- package/lib/maz-sidebar.js +0 -815
- package/lib/maz-slider.d.ts +0 -3
- package/lib/maz-slider.js +0 -1014
- package/lib/maz-spinner.d.ts +0 -3
- package/lib/maz-spinner.js +0 -328
- package/lib/maz-stepper.d.ts +0 -3
- package/lib/maz-stepper.js +0 -1011
- package/lib/maz-switch.d.ts +0 -3
- package/lib/maz-switch.js +0 -375
- package/lib/maz-tabs-bar.d.ts +0 -3
- package/lib/maz-tabs-bar.js +0 -428
- package/lib/maz-tabs-content-item.d.ts +0 -3
- package/lib/maz-tabs-content-item.js +0 -376
- package/lib/maz-tabs-content.d.ts +0 -3
- package/lib/maz-tabs-content.js +0 -367
- package/lib/maz-transition-expand.d.ts +0 -3
- package/lib/maz-transition-expand.js +0 -328
- package/lib/maz-ui.common.d.ts +0 -1
- package/lib/maz-ui.common.js +0 -17202
package/lib/maz-select.js
DELETED
|
@@ -1,2740 +0,0 @@
|
|
|
1
|
-
module.exports =
|
|
2
|
-
/******/ (function(modules) { // webpackBootstrap
|
|
3
|
-
/******/ // The module cache
|
|
4
|
-
/******/ var installedModules = {};
|
|
5
|
-
/******/
|
|
6
|
-
/******/ // The require function
|
|
7
|
-
/******/ function __webpack_require__(moduleId) {
|
|
8
|
-
/******/
|
|
9
|
-
/******/ // Check if module is in cache
|
|
10
|
-
/******/ if(installedModules[moduleId]) {
|
|
11
|
-
/******/ return installedModules[moduleId].exports;
|
|
12
|
-
/******/ }
|
|
13
|
-
/******/ // Create a new module (and put it into the cache)
|
|
14
|
-
/******/ var module = installedModules[moduleId] = {
|
|
15
|
-
/******/ i: moduleId,
|
|
16
|
-
/******/ l: false,
|
|
17
|
-
/******/ exports: {}
|
|
18
|
-
/******/ };
|
|
19
|
-
/******/
|
|
20
|
-
/******/ // Execute the module function
|
|
21
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
22
|
-
/******/
|
|
23
|
-
/******/ // Flag the module as loaded
|
|
24
|
-
/******/ module.l = true;
|
|
25
|
-
/******/
|
|
26
|
-
/******/ // Return the exports of the module
|
|
27
|
-
/******/ return module.exports;
|
|
28
|
-
/******/ }
|
|
29
|
-
/******/
|
|
30
|
-
/******/
|
|
31
|
-
/******/ // expose the modules object (__webpack_modules__)
|
|
32
|
-
/******/ __webpack_require__.m = modules;
|
|
33
|
-
/******/
|
|
34
|
-
/******/ // expose the module cache
|
|
35
|
-
/******/ __webpack_require__.c = installedModules;
|
|
36
|
-
/******/
|
|
37
|
-
/******/ // define getter function for harmony exports
|
|
38
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
|
39
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
|
40
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
|
41
|
-
/******/ }
|
|
42
|
-
/******/ };
|
|
43
|
-
/******/
|
|
44
|
-
/******/ // define __esModule on exports
|
|
45
|
-
/******/ __webpack_require__.r = function(exports) {
|
|
46
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
47
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
48
|
-
/******/ }
|
|
49
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
-
/******/ };
|
|
51
|
-
/******/
|
|
52
|
-
/******/ // create a fake namespace object
|
|
53
|
-
/******/ // mode & 1: value is a module id, require it
|
|
54
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
|
55
|
-
/******/ // mode & 4: return value when already ns object
|
|
56
|
-
/******/ // mode & 8|1: behave like require
|
|
57
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
|
58
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
|
59
|
-
/******/ if(mode & 8) return value;
|
|
60
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
|
61
|
-
/******/ var ns = Object.create(null);
|
|
62
|
-
/******/ __webpack_require__.r(ns);
|
|
63
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
|
64
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
|
65
|
-
/******/ return ns;
|
|
66
|
-
/******/ };
|
|
67
|
-
/******/
|
|
68
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
69
|
-
/******/ __webpack_require__.n = function(module) {
|
|
70
|
-
/******/ var getter = module && module.__esModule ?
|
|
71
|
-
/******/ function getDefault() { return module['default']; } :
|
|
72
|
-
/******/ function getModuleExports() { return module; };
|
|
73
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
|
74
|
-
/******/ return getter;
|
|
75
|
-
/******/ };
|
|
76
|
-
/******/
|
|
77
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
|
78
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
|
79
|
-
/******/
|
|
80
|
-
/******/ // __webpack_public_path__
|
|
81
|
-
/******/ __webpack_require__.p = "/dist/";
|
|
82
|
-
/******/
|
|
83
|
-
/******/
|
|
84
|
-
/******/ // Load entry module and return exports
|
|
85
|
-
/******/ return __webpack_require__(__webpack_require__.s = 16);
|
|
86
|
-
/******/ })
|
|
87
|
-
/************************************************************************/
|
|
88
|
-
/******/ ([
|
|
89
|
-
/* 0 */
|
|
90
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
91
|
-
|
|
92
|
-
"use strict";
|
|
93
|
-
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
|
|
94
|
-
/* globals __VUE_SSR_CONTEXT__ */
|
|
95
|
-
|
|
96
|
-
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules).
|
|
97
|
-
// This module is a runtime utility for cleaner component module output and will
|
|
98
|
-
// be included in the final webpack user bundle.
|
|
99
|
-
|
|
100
|
-
function normalizeComponent (
|
|
101
|
-
scriptExports,
|
|
102
|
-
render,
|
|
103
|
-
staticRenderFns,
|
|
104
|
-
functionalTemplate,
|
|
105
|
-
injectStyles,
|
|
106
|
-
scopeId,
|
|
107
|
-
moduleIdentifier, /* server only */
|
|
108
|
-
shadowMode /* vue-cli only */
|
|
109
|
-
) {
|
|
110
|
-
// Vue.extend constructor export interop
|
|
111
|
-
var options = typeof scriptExports === 'function'
|
|
112
|
-
? scriptExports.options
|
|
113
|
-
: scriptExports
|
|
114
|
-
|
|
115
|
-
// render functions
|
|
116
|
-
if (render) {
|
|
117
|
-
options.render = render
|
|
118
|
-
options.staticRenderFns = staticRenderFns
|
|
119
|
-
options._compiled = true
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// functional template
|
|
123
|
-
if (functionalTemplate) {
|
|
124
|
-
options.functional = true
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// scopedId
|
|
128
|
-
if (scopeId) {
|
|
129
|
-
options._scopeId = 'data-v-' + scopeId
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
var hook
|
|
133
|
-
if (moduleIdentifier) { // server build
|
|
134
|
-
hook = function (context) {
|
|
135
|
-
// 2.3 injection
|
|
136
|
-
context =
|
|
137
|
-
context || // cached call
|
|
138
|
-
(this.$vnode && this.$vnode.ssrContext) || // stateful
|
|
139
|
-
(this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
|
|
140
|
-
// 2.2 with runInNewContext: true
|
|
141
|
-
if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
|
|
142
|
-
context = __VUE_SSR_CONTEXT__
|
|
143
|
-
}
|
|
144
|
-
// inject component styles
|
|
145
|
-
if (injectStyles) {
|
|
146
|
-
injectStyles.call(this, context)
|
|
147
|
-
}
|
|
148
|
-
// register component module identifier for async chunk inferrence
|
|
149
|
-
if (context && context._registeredComponents) {
|
|
150
|
-
context._registeredComponents.add(moduleIdentifier)
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
// used by ssr in case component is cached and beforeCreate
|
|
154
|
-
// never gets called
|
|
155
|
-
options._ssrRegister = hook
|
|
156
|
-
} else if (injectStyles) {
|
|
157
|
-
hook = shadowMode
|
|
158
|
-
? function () {
|
|
159
|
-
injectStyles.call(
|
|
160
|
-
this,
|
|
161
|
-
(options.functional ? this.parent : this).$root.$options.shadowRoot
|
|
162
|
-
)
|
|
163
|
-
}
|
|
164
|
-
: injectStyles
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
if (hook) {
|
|
168
|
-
if (options.functional) {
|
|
169
|
-
// for template-only hot-reload because in that case the render fn doesn't
|
|
170
|
-
// go through the normalizer
|
|
171
|
-
options._injectStyles = hook
|
|
172
|
-
// register for functional component in vue file
|
|
173
|
-
var originalRender = options.render
|
|
174
|
-
options.render = function renderWithStyleInjection (h, context) {
|
|
175
|
-
hook.call(context)
|
|
176
|
-
return originalRender(h, context)
|
|
177
|
-
}
|
|
178
|
-
} else {
|
|
179
|
-
// inject component registration as beforeCreate hook
|
|
180
|
-
var existing = options.beforeCreate
|
|
181
|
-
options.beforeCreate = existing
|
|
182
|
-
? [].concat(existing, hook)
|
|
183
|
-
: [hook]
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return {
|
|
188
|
-
exports: scriptExports,
|
|
189
|
-
options: options
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
/***/ }),
|
|
195
|
-
/* 1 */
|
|
196
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
197
|
-
|
|
198
|
-
module.exports = __webpack_require__(9);
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
/***/ }),
|
|
202
|
-
/* 2 */
|
|
203
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
204
|
-
|
|
205
|
-
"use strict";
|
|
206
|
-
/* harmony default export */ __webpack_exports__["a"] = ({
|
|
207
|
-
data: function data() {
|
|
208
|
-
return {
|
|
209
|
-
uniqueId: null
|
|
210
|
-
};
|
|
211
|
-
},
|
|
212
|
-
mounted: function mounted() {
|
|
213
|
-
var id = this.id || this.$attrs.id;
|
|
214
|
-
this.uniqueId = id ? "".concat(id) : "".concat(this.$options.name, "-").concat(this._uid);
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
|
|
218
|
-
/***/ }),
|
|
219
|
-
/* 3 */,
|
|
220
|
-
/* 4 */
|
|
221
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
222
|
-
|
|
223
|
-
"use strict";
|
|
224
|
-
// ESM COMPAT FLAG
|
|
225
|
-
__webpack_require__.r(__webpack_exports__);
|
|
226
|
-
|
|
227
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazBtn/_main.vue?vue&type=template&id=247f3a44&
|
|
228
|
-
var render = function () {
|
|
229
|
-
var _vm = this
|
|
230
|
-
var _h = _vm.$createElement
|
|
231
|
-
var _c = _vm._self._c || _h
|
|
232
|
-
return _c(
|
|
233
|
-
_vm.componentType,
|
|
234
|
-
_vm._b(
|
|
235
|
-
{
|
|
236
|
-
tag: "component",
|
|
237
|
-
staticClass: "maz-base-component maz-btn maz-inline-flex",
|
|
238
|
-
class: [
|
|
239
|
-
_vm.classes,
|
|
240
|
-
{
|
|
241
|
-
"maz-text-hidden": _vm.loading,
|
|
242
|
-
},
|
|
243
|
-
],
|
|
244
|
-
attrs: {
|
|
245
|
-
id: _vm.uniqueId,
|
|
246
|
-
type: _vm.isLink ? null : _vm.type,
|
|
247
|
-
disabled: _vm.isLink ? null : _vm.isDisabled,
|
|
248
|
-
},
|
|
249
|
-
on: {
|
|
250
|
-
click: function ($event) {
|
|
251
|
-
return _vm.handleClick($event)
|
|
252
|
-
},
|
|
253
|
-
mouseenter: function ($event) {
|
|
254
|
-
return _vm.emitMouseEnter($event)
|
|
255
|
-
},
|
|
256
|
-
mouseleave: function ($event) {
|
|
257
|
-
return _vm.emitMouseLeave($event)
|
|
258
|
-
},
|
|
259
|
-
focus: function ($event) {
|
|
260
|
-
return _vm.emitFocus($event)
|
|
261
|
-
},
|
|
262
|
-
blur: function ($event) {
|
|
263
|
-
return _vm.emitBlur($event)
|
|
264
|
-
},
|
|
265
|
-
},
|
|
266
|
-
},
|
|
267
|
-
"component",
|
|
268
|
-
_vm.$attrs,
|
|
269
|
-
false
|
|
270
|
-
),
|
|
271
|
-
[
|
|
272
|
-
_vm.hasLeftIcon() || _vm.hasMainIcon()
|
|
273
|
-
? _c(
|
|
274
|
-
"div",
|
|
275
|
-
{
|
|
276
|
-
staticClass: "maz-flex maz-flex-center maz-btn__icon-left",
|
|
277
|
-
class: {
|
|
278
|
-
"maz-mr-2": !_vm.fab && _vm.hasSlotDefault(),
|
|
279
|
-
},
|
|
280
|
-
},
|
|
281
|
-
[
|
|
282
|
-
_vm._t("icon-left" || false, function () {
|
|
283
|
-
return [
|
|
284
|
-
_c("i", { staticClass: "material-icons" }, [
|
|
285
|
-
_vm._v(_vm._s(_vm.leftIconName || _vm.iconName)),
|
|
286
|
-
]),
|
|
287
|
-
]
|
|
288
|
-
}),
|
|
289
|
-
],
|
|
290
|
-
2
|
|
291
|
-
)
|
|
292
|
-
: _vm._e(),
|
|
293
|
-
_c(
|
|
294
|
-
"span",
|
|
295
|
-
{
|
|
296
|
-
staticClass:
|
|
297
|
-
"maz-flex maz-align-center maz-h-100 maz-overflow-hidden",
|
|
298
|
-
class: [_vm.textClasses, { "maz-flex-1": _vm.hasSlotDefault() }],
|
|
299
|
-
},
|
|
300
|
-
[_vm._t("default")],
|
|
301
|
-
2
|
|
302
|
-
),
|
|
303
|
-
_vm.hasRightIcon()
|
|
304
|
-
? _c(
|
|
305
|
-
"div",
|
|
306
|
-
{
|
|
307
|
-
staticClass: "maz-flex maz-flex-center maz-btn__icon-right",
|
|
308
|
-
class: {
|
|
309
|
-
"maz-ml-2": !_vm.fab && _vm.hasSlotDefault(),
|
|
310
|
-
},
|
|
311
|
-
},
|
|
312
|
-
[
|
|
313
|
-
_vm._t("icon-right", function () {
|
|
314
|
-
return [
|
|
315
|
-
_c("i", { staticClass: "material-icons" }, [
|
|
316
|
-
_vm._v(_vm._s(_vm.rightIconName)),
|
|
317
|
-
]),
|
|
318
|
-
]
|
|
319
|
-
}),
|
|
320
|
-
],
|
|
321
|
-
2
|
|
322
|
-
)
|
|
323
|
-
: _vm._e(),
|
|
324
|
-
_vm.loading
|
|
325
|
-
? _c(
|
|
326
|
-
"div",
|
|
327
|
-
{ staticClass: "maz-btn__spinner maz-flex maz-flex-center" },
|
|
328
|
-
[_c("MazSpinner", { attrs: { size: 25, color: _vm.color } })],
|
|
329
|
-
1
|
|
330
|
-
)
|
|
331
|
-
: _vm._e(),
|
|
332
|
-
]
|
|
333
|
-
)
|
|
334
|
-
}
|
|
335
|
-
var staticRenderFns = []
|
|
336
|
-
render._withStripped = true
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
// CONCATENATED MODULE: ./packages/components/MazBtn/_main.vue?vue&type=template&id=247f3a44&
|
|
340
|
-
|
|
341
|
-
// EXTERNAL MODULE: ./packages/components/MazSpinner/index.js + 5 modules
|
|
342
|
-
var MazSpinner = __webpack_require__(5);
|
|
343
|
-
|
|
344
|
-
// EXTERNAL MODULE: ./packages/mixins/uniqueId.js
|
|
345
|
-
var uniqueId = __webpack_require__(2);
|
|
346
|
-
|
|
347
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazBtn/_main.vue?vue&type=script&lang=js&
|
|
348
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
349
|
-
|
|
350
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
351
|
-
|
|
352
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
353
|
-
|
|
354
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
355
|
-
|
|
356
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
357
|
-
|
|
358
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
359
|
-
|
|
360
|
-
//
|
|
361
|
-
//
|
|
362
|
-
//
|
|
363
|
-
//
|
|
364
|
-
//
|
|
365
|
-
//
|
|
366
|
-
//
|
|
367
|
-
//
|
|
368
|
-
//
|
|
369
|
-
//
|
|
370
|
-
//
|
|
371
|
-
//
|
|
372
|
-
//
|
|
373
|
-
//
|
|
374
|
-
//
|
|
375
|
-
//
|
|
376
|
-
//
|
|
377
|
-
//
|
|
378
|
-
//
|
|
379
|
-
//
|
|
380
|
-
//
|
|
381
|
-
//
|
|
382
|
-
//
|
|
383
|
-
//
|
|
384
|
-
//
|
|
385
|
-
//
|
|
386
|
-
//
|
|
387
|
-
//
|
|
388
|
-
//
|
|
389
|
-
//
|
|
390
|
-
//
|
|
391
|
-
//
|
|
392
|
-
//
|
|
393
|
-
//
|
|
394
|
-
//
|
|
395
|
-
//
|
|
396
|
-
//
|
|
397
|
-
//
|
|
398
|
-
//
|
|
399
|
-
//
|
|
400
|
-
//
|
|
401
|
-
//
|
|
402
|
-
//
|
|
403
|
-
//
|
|
404
|
-
//
|
|
405
|
-
//
|
|
406
|
-
//
|
|
407
|
-
//
|
|
408
|
-
//
|
|
409
|
-
//
|
|
410
|
-
//
|
|
411
|
-
//
|
|
412
|
-
//
|
|
413
|
-
//
|
|
414
|
-
//
|
|
415
|
-
//
|
|
416
|
-
//
|
|
417
|
-
//
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
//
|
|
421
|
-
//
|
|
422
|
-
//
|
|
423
|
-
//
|
|
424
|
-
//
|
|
425
|
-
//
|
|
426
|
-
//
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
/**
|
|
430
|
-
* > Simple button component
|
|
431
|
-
*/
|
|
432
|
-
|
|
433
|
-
/* harmony default export */ var _mainvue_type_script_lang_js_ = ({
|
|
434
|
-
name: 'MazBtn',
|
|
435
|
-
components: {
|
|
436
|
-
MazSpinner: MazSpinner["default"]
|
|
437
|
-
},
|
|
438
|
-
mixins: [uniqueId["a" /* default */]],
|
|
439
|
-
inheritAttrs: false,
|
|
440
|
-
props: {
|
|
441
|
-
// is the id of the button
|
|
442
|
-
id: {
|
|
443
|
-
type: String,
|
|
444
|
-
default: null
|
|
445
|
-
},
|
|
446
|
-
// is color type (`primary` / `secondary` / `third` / `success` / `danger` / `grey` / `info` / `warning` / `light` / `dark` / `default` / `white` / `black`)
|
|
447
|
-
color: {
|
|
448
|
-
type: String,
|
|
449
|
-
default: 'primary'
|
|
450
|
-
},
|
|
451
|
-
// is the button type (button, submit or something else)
|
|
452
|
-
type: {
|
|
453
|
-
type: String,
|
|
454
|
-
default: 'button'
|
|
455
|
-
},
|
|
456
|
-
// button size (`xl`, `lg` / `md` / `sm` / `mini`)
|
|
457
|
-
size: {
|
|
458
|
-
type: String,
|
|
459
|
-
default: 'md'
|
|
460
|
-
},
|
|
461
|
-
// is a `boolean` to show the loader & disable it
|
|
462
|
-
loading: {
|
|
463
|
-
type: Boolean,
|
|
464
|
-
default: false
|
|
465
|
-
},
|
|
466
|
-
// is a `boolean` to disable the button
|
|
467
|
-
disabled: {
|
|
468
|
-
type: Boolean,
|
|
469
|
-
default: false
|
|
470
|
-
},
|
|
471
|
-
// apply the outline style
|
|
472
|
-
outline: {
|
|
473
|
-
type: Boolean,
|
|
474
|
-
default: false
|
|
475
|
-
},
|
|
476
|
-
// apply the rounded style
|
|
477
|
-
rounded: {
|
|
478
|
-
type: Boolean,
|
|
479
|
-
default: false
|
|
480
|
-
},
|
|
481
|
-
// apply the fab style
|
|
482
|
-
fab: {
|
|
483
|
-
type: Boolean,
|
|
484
|
-
default: false
|
|
485
|
-
},
|
|
486
|
-
// apply the focus style
|
|
487
|
-
active: {
|
|
488
|
-
type: Boolean,
|
|
489
|
-
default: false
|
|
490
|
-
},
|
|
491
|
-
// take 100% of the width
|
|
492
|
-
block: {
|
|
493
|
-
type: Boolean,
|
|
494
|
-
default: false
|
|
495
|
-
},
|
|
496
|
-
// remove shadow/elevation
|
|
497
|
-
noShadow: {
|
|
498
|
-
type: Boolean,
|
|
499
|
-
default: false
|
|
500
|
-
},
|
|
501
|
-
// should be a [material icon](https://material.io/resources/icons/) name (usefull with fab buttons)
|
|
502
|
-
iconName: {
|
|
503
|
-
type: String,
|
|
504
|
-
default: null
|
|
505
|
-
},
|
|
506
|
-
// should be a [material icon](https://material.io/resources/icons/) name
|
|
507
|
-
leftIconName: {
|
|
508
|
-
type: String,
|
|
509
|
-
default: null
|
|
510
|
-
},
|
|
511
|
-
// should be a [material icon](https://material.io/resources/icons/) name
|
|
512
|
-
rightIconName: {
|
|
513
|
-
type: String,
|
|
514
|
-
default: null
|
|
515
|
-
},
|
|
516
|
-
// align text to left (for block button)
|
|
517
|
-
justifyStart: {
|
|
518
|
-
type: Boolean,
|
|
519
|
-
default: false
|
|
520
|
-
},
|
|
521
|
-
// align text to right (for block button)
|
|
522
|
-
justifyEnd: {
|
|
523
|
-
type: Boolean,
|
|
524
|
-
default: false
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
computed: {
|
|
528
|
-
componentType: function componentType() {
|
|
529
|
-
var _this$$attrs = this.$attrs,
|
|
530
|
-
href = _this$$attrs.href,
|
|
531
|
-
to = _this$$attrs.to;
|
|
532
|
-
if (href) return 'a';else if (to) return 'router-link';
|
|
533
|
-
return 'button';
|
|
534
|
-
},
|
|
535
|
-
isLink: function isLink() {
|
|
536
|
-
return this.componentType === 'a';
|
|
537
|
-
},
|
|
538
|
-
isDisabled: function isDisabled() {
|
|
539
|
-
var disabled = this.disabled,
|
|
540
|
-
loading = this.loading;
|
|
541
|
-
return loading || disabled;
|
|
542
|
-
},
|
|
543
|
-
classes: function classes() {
|
|
544
|
-
var color = this.color,
|
|
545
|
-
size = this.size,
|
|
546
|
-
outline = this.outline,
|
|
547
|
-
rounded = this.rounded,
|
|
548
|
-
fab = this.fab,
|
|
549
|
-
active = this.active,
|
|
550
|
-
block = this.block,
|
|
551
|
-
noShadow = this.noShadow,
|
|
552
|
-
hasRightIcon = this.hasRightIcon,
|
|
553
|
-
hasLeftIcon = this.hasLeftIcon,
|
|
554
|
-
hasIcon = this.hasIcon,
|
|
555
|
-
hasSlotDefault = this.hasSlotDefault;
|
|
556
|
-
return [].concat(_toConsumableArray(color ? ["maz-btn--".concat(color)] : [null]), _toConsumableArray(size ? ["maz-btn--".concat(size)] : [null]), _toConsumableArray(outline ? ['maz-btn--outline'] : [null]), _toConsumableArray(rounded ? ['maz-btn--rounded'] : [null]), _toConsumableArray(block ? ['maz-btn--block'] : [null]), _toConsumableArray(fab ? ['maz-btn--fab'] : [null]), _toConsumableArray(active ? ['maz-active'] : [null]), _toConsumableArray(noShadow ? ['maz-no-shadow'] : [null]), _toConsumableArray(hasLeftIcon() ? ['maz-btn--icon--left'] : [null]), _toConsumableArray(hasRightIcon() ? ['maz-btn--icon--right'] : [null]), _toConsumableArray(hasIcon() ? ['maz-btn--icon'] : [null]), _toConsumableArray(!hasSlotDefault() ? ['maz-btn--no-text'] : [null]));
|
|
557
|
-
},
|
|
558
|
-
textClasses: function textClasses() {
|
|
559
|
-
var justifyStart = this.justifyStart,
|
|
560
|
-
justifyEnd = this.justifyEnd;
|
|
561
|
-
return [].concat(_toConsumableArray(justifyStart ? ['maz-justify-start'] : [null]), _toConsumableArray(justifyEnd ? ['maz-justify-end'] : [null]), _toConsumableArray(!justifyStart && !justifyEnd ? ['maz-justify-center'] : [null]));
|
|
562
|
-
}
|
|
563
|
-
},
|
|
564
|
-
methods: {
|
|
565
|
-
hasSlotDefault: function hasSlotDefault() {
|
|
566
|
-
return this.$slots['default'];
|
|
567
|
-
},
|
|
568
|
-
hasIcon: function hasIcon() {
|
|
569
|
-
return this.hasLeftIcon() || this.hasRightIcon() || this.hasMainIcon();
|
|
570
|
-
},
|
|
571
|
-
hasMainIcon: function hasMainIcon() {
|
|
572
|
-
return this.iconName || this.$slots['icon'];
|
|
573
|
-
},
|
|
574
|
-
hasLeftIcon: function hasLeftIcon() {
|
|
575
|
-
return this.leftIconName || this.$slots['icon-left'];
|
|
576
|
-
},
|
|
577
|
-
hasRightIcon: function hasRightIcon() {
|
|
578
|
-
return this.rightIconName || this.$slots['icon-right'];
|
|
579
|
-
},
|
|
580
|
-
handleClick: function handleClick(e) {
|
|
581
|
-
// return click event
|
|
582
|
-
this.$emit('click', e);
|
|
583
|
-
},
|
|
584
|
-
emitMouseEnter: function emitMouseEnter(e) {
|
|
585
|
-
// return mouseenter event
|
|
586
|
-
this.$emit('mouseenter', e);
|
|
587
|
-
},
|
|
588
|
-
emitMouseLeave: function emitMouseLeave(e) {
|
|
589
|
-
// return mouseleave event
|
|
590
|
-
this.$emit('mouseleave', e);
|
|
591
|
-
},
|
|
592
|
-
emitFocus: function emitFocus(e) {
|
|
593
|
-
// return focus event
|
|
594
|
-
this.$emit('focus', e);
|
|
595
|
-
},
|
|
596
|
-
emitBlur: function emitBlur(e) {
|
|
597
|
-
// return blur event
|
|
598
|
-
this.$emit('blur', e);
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
});
|
|
602
|
-
// CONCATENATED MODULE: ./packages/components/MazBtn/_main.vue?vue&type=script&lang=js&
|
|
603
|
-
/* harmony default export */ var MazBtn_mainvue_type_script_lang_js_ = (_mainvue_type_script_lang_js_);
|
|
604
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
605
|
-
var componentNormalizer = __webpack_require__(0);
|
|
606
|
-
|
|
607
|
-
// CONCATENATED MODULE: ./packages/components/MazBtn/_main.vue
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
/* normalize component */
|
|
614
|
-
|
|
615
|
-
var component = Object(componentNormalizer["a" /* default */])(
|
|
616
|
-
MazBtn_mainvue_type_script_lang_js_,
|
|
617
|
-
render,
|
|
618
|
-
staticRenderFns,
|
|
619
|
-
false,
|
|
620
|
-
null,
|
|
621
|
-
null,
|
|
622
|
-
null
|
|
623
|
-
|
|
624
|
-
)
|
|
625
|
-
|
|
626
|
-
/* hot reload */
|
|
627
|
-
if (false) { var api; }
|
|
628
|
-
component.options.__file = "packages/components/MazBtn/_main.vue"
|
|
629
|
-
/* harmony default export */ var _main = (component.exports);
|
|
630
|
-
// CONCATENATED MODULE: ./packages/components/MazBtn/index.js
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
_main.install = function (Vue) {
|
|
634
|
-
Vue.component(_main.name, _main);
|
|
635
|
-
};
|
|
636
|
-
|
|
637
|
-
/* harmony default export */ var MazBtn = __webpack_exports__["default"] = (_main);
|
|
638
|
-
|
|
639
|
-
/***/ }),
|
|
640
|
-
/* 5 */
|
|
641
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
642
|
-
|
|
643
|
-
"use strict";
|
|
644
|
-
// ESM COMPAT FLAG
|
|
645
|
-
__webpack_require__.r(__webpack_exports__);
|
|
646
|
-
|
|
647
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazSpinner/_main.vue?vue&type=template&id=67a8ca41&
|
|
648
|
-
var render = function () {
|
|
649
|
-
var _vm = this
|
|
650
|
-
var _h = _vm.$createElement
|
|
651
|
-
var _c = _vm._self._c || _h
|
|
652
|
-
return _c(
|
|
653
|
-
"svg",
|
|
654
|
-
{
|
|
655
|
-
staticClass: "maz-base-component maz-spinner maz-spinner-anim",
|
|
656
|
-
class: [
|
|
657
|
-
{
|
|
658
|
-
"spinner-anim__white": _vm.dark,
|
|
659
|
-
},
|
|
660
|
-
_vm.fillColorClass,
|
|
661
|
-
],
|
|
662
|
-
staticStyle: { "enable-background": "new 0 0 50 50" },
|
|
663
|
-
attrs: {
|
|
664
|
-
width: _vm.size + "px",
|
|
665
|
-
height: _vm.size + "px",
|
|
666
|
-
version: "1.1",
|
|
667
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
668
|
-
x: "0px",
|
|
669
|
-
y: "0px",
|
|
670
|
-
viewBox: "0 0 50 50",
|
|
671
|
-
"xml:space": "preserve",
|
|
672
|
-
},
|
|
673
|
-
},
|
|
674
|
-
[
|
|
675
|
-
_c("path", {
|
|
676
|
-
attrs: {
|
|
677
|
-
d: "M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z",
|
|
678
|
-
},
|
|
679
|
-
}),
|
|
680
|
-
]
|
|
681
|
-
)
|
|
682
|
-
}
|
|
683
|
-
var staticRenderFns = []
|
|
684
|
-
render._withStripped = true
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
// CONCATENATED MODULE: ./packages/components/MazSpinner/_main.vue?vue&type=template&id=67a8ca41&
|
|
688
|
-
|
|
689
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazSpinner/_main.vue?vue&type=script&lang=js&
|
|
690
|
-
//
|
|
691
|
-
//
|
|
692
|
-
//
|
|
693
|
-
//
|
|
694
|
-
//
|
|
695
|
-
//
|
|
696
|
-
//
|
|
697
|
-
//
|
|
698
|
-
//
|
|
699
|
-
//
|
|
700
|
-
//
|
|
701
|
-
//
|
|
702
|
-
//
|
|
703
|
-
//
|
|
704
|
-
//
|
|
705
|
-
//
|
|
706
|
-
//
|
|
707
|
-
//
|
|
708
|
-
//
|
|
709
|
-
//
|
|
710
|
-
/* harmony default export */ var _mainvue_type_script_lang_js_ = ({
|
|
711
|
-
name: 'MazSpinner',
|
|
712
|
-
props: {
|
|
713
|
-
size: {
|
|
714
|
-
type: Number,
|
|
715
|
-
default: 40
|
|
716
|
-
},
|
|
717
|
-
dark: {
|
|
718
|
-
type: Boolean,
|
|
719
|
-
default: false
|
|
720
|
-
},
|
|
721
|
-
color: {
|
|
722
|
-
type: String,
|
|
723
|
-
default: 'primary'
|
|
724
|
-
}
|
|
725
|
-
},
|
|
726
|
-
computed: {
|
|
727
|
-
fillColorClass: function fillColorClass() {
|
|
728
|
-
return "maz-fill-".concat(this.color);
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
});
|
|
732
|
-
// CONCATENATED MODULE: ./packages/components/MazSpinner/_main.vue?vue&type=script&lang=js&
|
|
733
|
-
/* harmony default export */ var MazSpinner_mainvue_type_script_lang_js_ = (_mainvue_type_script_lang_js_);
|
|
734
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
735
|
-
var componentNormalizer = __webpack_require__(0);
|
|
736
|
-
|
|
737
|
-
// CONCATENATED MODULE: ./packages/components/MazSpinner/_main.vue
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
/* normalize component */
|
|
744
|
-
|
|
745
|
-
var component = Object(componentNormalizer["a" /* default */])(
|
|
746
|
-
MazSpinner_mainvue_type_script_lang_js_,
|
|
747
|
-
render,
|
|
748
|
-
staticRenderFns,
|
|
749
|
-
false,
|
|
750
|
-
null,
|
|
751
|
-
null,
|
|
752
|
-
null
|
|
753
|
-
|
|
754
|
-
)
|
|
755
|
-
|
|
756
|
-
/* hot reload */
|
|
757
|
-
if (false) { var api; }
|
|
758
|
-
component.options.__file = "packages/components/MazSpinner/_main.vue"
|
|
759
|
-
/* harmony default export */ var _main = (component.exports);
|
|
760
|
-
// CONCATENATED MODULE: ./packages/components/MazSpinner/index.js
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
_main.install = function (Vue) {
|
|
764
|
-
Vue.component(_main.name, _main);
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
/* harmony default export */ var MazSpinner = __webpack_exports__["default"] = (_main);
|
|
768
|
-
|
|
769
|
-
/***/ }),
|
|
770
|
-
/* 6 */
|
|
771
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
772
|
-
|
|
773
|
-
"use strict";
|
|
774
|
-
|
|
775
|
-
// EXPORTS
|
|
776
|
-
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ debounce; });
|
|
777
|
-
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ pascalCaseToKebabCase; });
|
|
778
|
-
|
|
779
|
-
// CONCATENATED MODULE: ./packages/utils/debounce.js
|
|
780
|
-
/* harmony default export */ var debounce = (function (func, delay) {
|
|
781
|
-
var debounceTimer;
|
|
782
|
-
return function () {
|
|
783
|
-
var context = this;
|
|
784
|
-
var args = arguments;
|
|
785
|
-
clearTimeout(debounceTimer);
|
|
786
|
-
debounceTimer = setTimeout(function () {
|
|
787
|
-
return func.apply(context, args);
|
|
788
|
-
}, delay);
|
|
789
|
-
};
|
|
790
|
-
});
|
|
791
|
-
// CONCATENATED MODULE: ./packages/utils/pascalCaseToKebabCase.js
|
|
792
|
-
/* harmony default export */ var pascalCaseToKebabCase = (function (string) {
|
|
793
|
-
return string.replace(/([a-z0-9])([A-Z])/g, '$1-$2').replace(/([A-Z])([A-Z])(?=[a-z])/g, '$1-$2').toLowerCase();
|
|
794
|
-
});
|
|
795
|
-
// CONCATENATED MODULE: ./packages/utils/index.js
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
/***/ }),
|
|
800
|
-
/* 7 */,
|
|
801
|
-
/* 8 */
|
|
802
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
803
|
-
|
|
804
|
-
"use strict";
|
|
805
|
-
// ESM COMPAT FLAG
|
|
806
|
-
__webpack_require__.r(__webpack_exports__);
|
|
807
|
-
|
|
808
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazInput/_main.vue?vue&type=template&id=5b617c72&
|
|
809
|
-
var render = function () {
|
|
810
|
-
var _vm = this
|
|
811
|
-
var _h = _vm.$createElement
|
|
812
|
-
var _c = _vm._self._c || _h
|
|
813
|
-
return _c(
|
|
814
|
-
"div",
|
|
815
|
-
{
|
|
816
|
-
ref: "parent",
|
|
817
|
-
staticClass:
|
|
818
|
-
"maz-base-component maz-input maz-border maz-border-color maz-border-color-hover maz-border-solid maz-border-radius",
|
|
819
|
-
class: [
|
|
820
|
-
{
|
|
821
|
-
"is-focused": _vm.isFocus || _vm.focus,
|
|
822
|
-
"is-valid": _vm.success,
|
|
823
|
-
"has-value": _vm.value,
|
|
824
|
-
"is-textarea": _vm.textarea,
|
|
825
|
-
"has-error": _vm.error,
|
|
826
|
-
"has-warning": _vm.warning,
|
|
827
|
-
"is-disabled": _vm.disabled,
|
|
828
|
-
"maz-is-dark": _vm.dark,
|
|
829
|
-
"has-hint": _vm.hint,
|
|
830
|
-
"has-no-label": !_vm.hasLabel && !_vm.hint,
|
|
831
|
-
"has-left-icon": _vm.hasLeftIcon(),
|
|
832
|
-
},
|
|
833
|
-
"maz-input--" + _vm.size,
|
|
834
|
-
"has-" + _vm.leftNumberIcon + "-right-icon",
|
|
835
|
-
"maz-input--" + _vm.color,
|
|
836
|
-
],
|
|
837
|
-
on: { click: _vm.focusInput },
|
|
838
|
-
},
|
|
839
|
-
[
|
|
840
|
-
_vm.hasLeftIcon()
|
|
841
|
-
? _c(
|
|
842
|
-
"div",
|
|
843
|
-
{
|
|
844
|
-
staticClass: "maz-input__icon maz-flex left",
|
|
845
|
-
class: [
|
|
846
|
-
_vm.textarea ? "maz-align-start maz-pt-2" : "maz-align-center",
|
|
847
|
-
],
|
|
848
|
-
},
|
|
849
|
-
[
|
|
850
|
-
_vm._t("icon-left", function () {
|
|
851
|
-
return [
|
|
852
|
-
_c("i", { staticClass: "material-icons" }, [
|
|
853
|
-
_vm._v(_vm._s(_vm.leftIconName)),
|
|
854
|
-
]),
|
|
855
|
-
]
|
|
856
|
-
}),
|
|
857
|
-
],
|
|
858
|
-
2
|
|
859
|
-
)
|
|
860
|
-
: _vm._e(),
|
|
861
|
-
_vm.hasRightIcon()
|
|
862
|
-
? _c(
|
|
863
|
-
"div",
|
|
864
|
-
{
|
|
865
|
-
staticClass: "maz-input__icon maz-flex right",
|
|
866
|
-
class: [
|
|
867
|
-
_vm.textarea ? "maz-align-start maz-pt-2" : "maz-align-center",
|
|
868
|
-
],
|
|
869
|
-
},
|
|
870
|
-
[
|
|
871
|
-
_vm._t("icon-right", function () {
|
|
872
|
-
return [
|
|
873
|
-
_c("i", { staticClass: "material-icons" }, [
|
|
874
|
-
_vm._v(_vm._s(_vm.rightIconName)),
|
|
875
|
-
]),
|
|
876
|
-
]
|
|
877
|
-
}),
|
|
878
|
-
],
|
|
879
|
-
2
|
|
880
|
-
)
|
|
881
|
-
: _vm._e(),
|
|
882
|
-
_vm.getType === "checkbox" && !_vm.textarea
|
|
883
|
-
? _c(
|
|
884
|
-
"input",
|
|
885
|
-
_vm._b(
|
|
886
|
-
{
|
|
887
|
-
directives: [
|
|
888
|
-
{
|
|
889
|
-
name: "model",
|
|
890
|
-
rawName: "v-model",
|
|
891
|
-
value: _vm.inputValue,
|
|
892
|
-
expression: "inputValue",
|
|
893
|
-
},
|
|
894
|
-
],
|
|
895
|
-
ref: "MazInput",
|
|
896
|
-
staticClass: "maz-input__input maz-border-radius",
|
|
897
|
-
class: {
|
|
898
|
-
"has-right-icon":
|
|
899
|
-
_vm.hasClearBtn || _vm.hasPasswordBtn || _vm.hasRightIcon(),
|
|
900
|
-
},
|
|
901
|
-
attrs: {
|
|
902
|
-
id: _vm.uniqueId,
|
|
903
|
-
placeholder: _vm.placeholderValue,
|
|
904
|
-
"aria-label": _vm.placeholder,
|
|
905
|
-
disabled: _vm.disabled,
|
|
906
|
-
required: _vm.required,
|
|
907
|
-
readonly: _vm.readonly,
|
|
908
|
-
type: "checkbox",
|
|
909
|
-
},
|
|
910
|
-
domProps: {
|
|
911
|
-
checked: Array.isArray(_vm.inputValue)
|
|
912
|
-
? _vm._i(_vm.inputValue, null) > -1
|
|
913
|
-
: _vm.inputValue,
|
|
914
|
-
},
|
|
915
|
-
on: {
|
|
916
|
-
keydown: _vm.keyDown,
|
|
917
|
-
keyup: _vm.keyUp,
|
|
918
|
-
focus: _vm.onFocus,
|
|
919
|
-
blur: _vm.onBlur,
|
|
920
|
-
paste: _vm.onPaste,
|
|
921
|
-
change: [
|
|
922
|
-
function ($event) {
|
|
923
|
-
var $$a = _vm.inputValue,
|
|
924
|
-
$$el = $event.target,
|
|
925
|
-
$$c = $$el.checked ? true : false
|
|
926
|
-
if (Array.isArray($$a)) {
|
|
927
|
-
var $$v = null,
|
|
928
|
-
$$i = _vm._i($$a, $$v)
|
|
929
|
-
if ($$el.checked) {
|
|
930
|
-
$$i < 0 && (_vm.inputValue = $$a.concat([$$v]))
|
|
931
|
-
} else {
|
|
932
|
-
$$i > -1 &&
|
|
933
|
-
(_vm.inputValue = $$a
|
|
934
|
-
.slice(0, $$i)
|
|
935
|
-
.concat($$a.slice($$i + 1)))
|
|
936
|
-
}
|
|
937
|
-
} else {
|
|
938
|
-
_vm.inputValue = $$c
|
|
939
|
-
}
|
|
940
|
-
},
|
|
941
|
-
_vm.onChange,
|
|
942
|
-
],
|
|
943
|
-
click: function ($event) {
|
|
944
|
-
return _vm.$emit("click", $event)
|
|
945
|
-
},
|
|
946
|
-
},
|
|
947
|
-
},
|
|
948
|
-
"input",
|
|
949
|
-
_vm.$attrs,
|
|
950
|
-
false
|
|
951
|
-
)
|
|
952
|
-
)
|
|
953
|
-
: _vm.getType === "radio" && !_vm.textarea
|
|
954
|
-
? _c(
|
|
955
|
-
"input",
|
|
956
|
-
_vm._b(
|
|
957
|
-
{
|
|
958
|
-
directives: [
|
|
959
|
-
{
|
|
960
|
-
name: "model",
|
|
961
|
-
rawName: "v-model",
|
|
962
|
-
value: _vm.inputValue,
|
|
963
|
-
expression: "inputValue",
|
|
964
|
-
},
|
|
965
|
-
],
|
|
966
|
-
ref: "MazInput",
|
|
967
|
-
staticClass: "maz-input__input maz-border-radius",
|
|
968
|
-
class: {
|
|
969
|
-
"has-right-icon":
|
|
970
|
-
_vm.hasClearBtn || _vm.hasPasswordBtn || _vm.hasRightIcon(),
|
|
971
|
-
},
|
|
972
|
-
attrs: {
|
|
973
|
-
id: _vm.uniqueId,
|
|
974
|
-
placeholder: _vm.placeholderValue,
|
|
975
|
-
"aria-label": _vm.placeholder,
|
|
976
|
-
disabled: _vm.disabled,
|
|
977
|
-
required: _vm.required,
|
|
978
|
-
readonly: _vm.readonly,
|
|
979
|
-
type: "radio",
|
|
980
|
-
},
|
|
981
|
-
domProps: { checked: _vm._q(_vm.inputValue, null) },
|
|
982
|
-
on: {
|
|
983
|
-
keydown: _vm.keyDown,
|
|
984
|
-
keyup: _vm.keyUp,
|
|
985
|
-
focus: _vm.onFocus,
|
|
986
|
-
blur: _vm.onBlur,
|
|
987
|
-
paste: _vm.onPaste,
|
|
988
|
-
change: [
|
|
989
|
-
function ($event) {
|
|
990
|
-
_vm.inputValue = null
|
|
991
|
-
},
|
|
992
|
-
_vm.onChange,
|
|
993
|
-
],
|
|
994
|
-
click: function ($event) {
|
|
995
|
-
return _vm.$emit("click", $event)
|
|
996
|
-
},
|
|
997
|
-
},
|
|
998
|
-
},
|
|
999
|
-
"input",
|
|
1000
|
-
_vm.$attrs,
|
|
1001
|
-
false
|
|
1002
|
-
)
|
|
1003
|
-
)
|
|
1004
|
-
: !_vm.textarea
|
|
1005
|
-
? _c(
|
|
1006
|
-
"input",
|
|
1007
|
-
_vm._b(
|
|
1008
|
-
{
|
|
1009
|
-
directives: [
|
|
1010
|
-
{
|
|
1011
|
-
name: "model",
|
|
1012
|
-
rawName: "v-model",
|
|
1013
|
-
value: _vm.inputValue,
|
|
1014
|
-
expression: "inputValue",
|
|
1015
|
-
},
|
|
1016
|
-
],
|
|
1017
|
-
ref: "MazInput",
|
|
1018
|
-
staticClass: "maz-input__input maz-border-radius",
|
|
1019
|
-
class: {
|
|
1020
|
-
"has-right-icon":
|
|
1021
|
-
_vm.hasClearBtn || _vm.hasPasswordBtn || _vm.hasRightIcon(),
|
|
1022
|
-
},
|
|
1023
|
-
attrs: {
|
|
1024
|
-
id: _vm.uniqueId,
|
|
1025
|
-
placeholder: _vm.placeholderValue,
|
|
1026
|
-
"aria-label": _vm.placeholder,
|
|
1027
|
-
disabled: _vm.disabled,
|
|
1028
|
-
required: _vm.required,
|
|
1029
|
-
readonly: _vm.readonly,
|
|
1030
|
-
type: _vm.getType,
|
|
1031
|
-
},
|
|
1032
|
-
domProps: { value: _vm.inputValue },
|
|
1033
|
-
on: {
|
|
1034
|
-
keydown: _vm.keyDown,
|
|
1035
|
-
keyup: _vm.keyUp,
|
|
1036
|
-
focus: _vm.onFocus,
|
|
1037
|
-
blur: _vm.onBlur,
|
|
1038
|
-
paste: _vm.onPaste,
|
|
1039
|
-
change: _vm.onChange,
|
|
1040
|
-
click: function ($event) {
|
|
1041
|
-
return _vm.$emit("click", $event)
|
|
1042
|
-
},
|
|
1043
|
-
input: function ($event) {
|
|
1044
|
-
if ($event.target.composing) {
|
|
1045
|
-
return
|
|
1046
|
-
}
|
|
1047
|
-
_vm.inputValue = $event.target.value
|
|
1048
|
-
},
|
|
1049
|
-
},
|
|
1050
|
-
},
|
|
1051
|
-
"input",
|
|
1052
|
-
_vm.$attrs,
|
|
1053
|
-
false
|
|
1054
|
-
)
|
|
1055
|
-
)
|
|
1056
|
-
: _c(
|
|
1057
|
-
"textarea",
|
|
1058
|
-
_vm._b(
|
|
1059
|
-
{
|
|
1060
|
-
directives: [
|
|
1061
|
-
{
|
|
1062
|
-
name: "model",
|
|
1063
|
-
rawName: "v-model",
|
|
1064
|
-
value: _vm.inputValue,
|
|
1065
|
-
expression: "inputValue",
|
|
1066
|
-
},
|
|
1067
|
-
],
|
|
1068
|
-
ref: "MazInput",
|
|
1069
|
-
staticClass: "maz-input__input maz-textarea",
|
|
1070
|
-
attrs: {
|
|
1071
|
-
id: _vm.uniqueId,
|
|
1072
|
-
placeholder: _vm.placeholderValue,
|
|
1073
|
-
type: _vm.type,
|
|
1074
|
-
required: _vm.required,
|
|
1075
|
-
readonly: _vm.readonly,
|
|
1076
|
-
},
|
|
1077
|
-
domProps: { value: _vm.inputValue },
|
|
1078
|
-
on: {
|
|
1079
|
-
keydown: _vm.keyDown,
|
|
1080
|
-
keyup: _vm.keyUp,
|
|
1081
|
-
focus: _vm.onFocus,
|
|
1082
|
-
blur: _vm.onBlur,
|
|
1083
|
-
paste: _vm.onPaste,
|
|
1084
|
-
change: _vm.onChange,
|
|
1085
|
-
click: function ($event) {
|
|
1086
|
-
return _vm.$emit("click", $event)
|
|
1087
|
-
},
|
|
1088
|
-
input: function ($event) {
|
|
1089
|
-
if ($event.target.composing) {
|
|
1090
|
-
return
|
|
1091
|
-
}
|
|
1092
|
-
_vm.inputValue = $event.target.value
|
|
1093
|
-
},
|
|
1094
|
-
},
|
|
1095
|
-
},
|
|
1096
|
-
"textarea",
|
|
1097
|
-
_vm.$attrs,
|
|
1098
|
-
false
|
|
1099
|
-
)
|
|
1100
|
-
),
|
|
1101
|
-
_vm.hasLabel || _vm.hint
|
|
1102
|
-
? _c(
|
|
1103
|
-
"label",
|
|
1104
|
-
{
|
|
1105
|
-
ref: "label",
|
|
1106
|
-
staticClass: "maz-input__label",
|
|
1107
|
-
class: _vm.error ? "maz-text-danger" : null,
|
|
1108
|
-
attrs: { for: _vm.uniqueId, tabindex: "-1" },
|
|
1109
|
-
on: { click: _vm.focusInput },
|
|
1110
|
-
},
|
|
1111
|
-
[
|
|
1112
|
-
_vm._v(
|
|
1113
|
-
"\n " +
|
|
1114
|
-
_vm._s(_vm.hintValue || _vm.placeholderValue) +
|
|
1115
|
-
"\n "
|
|
1116
|
-
),
|
|
1117
|
-
]
|
|
1118
|
-
)
|
|
1119
|
-
: _vm._e(),
|
|
1120
|
-
_c("transition-group", { attrs: { name: "maz-scale" } }, [
|
|
1121
|
-
_vm.hasClearBtn
|
|
1122
|
-
? _c(
|
|
1123
|
-
"button",
|
|
1124
|
-
{
|
|
1125
|
-
key: "clear-button",
|
|
1126
|
-
staticClass:
|
|
1127
|
-
"maz-input__toggle-btn --clear maz-flex maz-flex-center",
|
|
1128
|
-
class: { "has-right-icon": _vm.hasRightIcon() },
|
|
1129
|
-
attrs: { title: "clear", type: "button", tabindex: "-1" },
|
|
1130
|
-
on: {
|
|
1131
|
-
click: function ($event) {
|
|
1132
|
-
$event.stopPropagation()
|
|
1133
|
-
return _vm.clear.apply(null, arguments)
|
|
1134
|
-
},
|
|
1135
|
-
},
|
|
1136
|
-
},
|
|
1137
|
-
[
|
|
1138
|
-
_c(
|
|
1139
|
-
"i",
|
|
1140
|
-
{ staticClass: "maz-input__toggle-btn__icon material-icons" },
|
|
1141
|
-
[_vm._v("\n close\n ")]
|
|
1142
|
-
),
|
|
1143
|
-
]
|
|
1144
|
-
)
|
|
1145
|
-
: _vm._e(),
|
|
1146
|
-
_vm.hasPasswordBtn
|
|
1147
|
-
? _c(
|
|
1148
|
-
"button",
|
|
1149
|
-
{
|
|
1150
|
-
key: "password-button",
|
|
1151
|
-
staticClass:
|
|
1152
|
-
"maz-input__toggle-btn password maz-flex maz-flex-center",
|
|
1153
|
-
class: {
|
|
1154
|
-
"has-clear-btn": _vm.hasClearBtn,
|
|
1155
|
-
"has-right-icon": _vm.hasRightIcon(),
|
|
1156
|
-
},
|
|
1157
|
-
attrs: { title: "clear", type: "button", tabindex: "-1" },
|
|
1158
|
-
on: {
|
|
1159
|
-
click: function ($event) {
|
|
1160
|
-
_vm.showPassword = !_vm.showPassword
|
|
1161
|
-
},
|
|
1162
|
-
},
|
|
1163
|
-
},
|
|
1164
|
-
[
|
|
1165
|
-
_c(
|
|
1166
|
-
"i",
|
|
1167
|
-
{ staticClass: "maz-input__toggle-btn__icon material-icons" },
|
|
1168
|
-
[
|
|
1169
|
-
_vm._v(
|
|
1170
|
-
"\n " +
|
|
1171
|
-
_vm._s(
|
|
1172
|
-
_vm.showPassword ? "visibility_off" : "visibility"
|
|
1173
|
-
) +
|
|
1174
|
-
"\n "
|
|
1175
|
-
),
|
|
1176
|
-
]
|
|
1177
|
-
),
|
|
1178
|
-
]
|
|
1179
|
-
)
|
|
1180
|
-
: _vm._e(),
|
|
1181
|
-
]),
|
|
1182
|
-
_vm.loading
|
|
1183
|
-
? _c(
|
|
1184
|
-
"div",
|
|
1185
|
-
{
|
|
1186
|
-
staticClass: "maz-input__loader",
|
|
1187
|
-
class: { textarea: _vm.textarea },
|
|
1188
|
-
},
|
|
1189
|
-
[_c("div", { staticClass: "maz-input__loader__progress-bar" })]
|
|
1190
|
-
)
|
|
1191
|
-
: _vm._e(),
|
|
1192
|
-
],
|
|
1193
|
-
1
|
|
1194
|
-
)
|
|
1195
|
-
}
|
|
1196
|
-
var staticRenderFns = []
|
|
1197
|
-
render._withStripped = true
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
// CONCATENATED MODULE: ./packages/components/MazInput/_main.vue?vue&type=template&id=5b617c72&
|
|
1201
|
-
|
|
1202
|
-
// EXTERNAL MODULE: ./packages/mixins/uniqueId.js
|
|
1203
|
-
var uniqueId = __webpack_require__(2);
|
|
1204
|
-
|
|
1205
|
-
// EXTERNAL MODULE: ./packages/utils/index.js + 2 modules
|
|
1206
|
-
var utils = __webpack_require__(6);
|
|
1207
|
-
|
|
1208
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazInput/_main.vue?vue&type=script&lang=js&
|
|
1209
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
1210
|
-
|
|
1211
|
-
//
|
|
1212
|
-
//
|
|
1213
|
-
//
|
|
1214
|
-
//
|
|
1215
|
-
//
|
|
1216
|
-
//
|
|
1217
|
-
//
|
|
1218
|
-
//
|
|
1219
|
-
//
|
|
1220
|
-
//
|
|
1221
|
-
//
|
|
1222
|
-
//
|
|
1223
|
-
//
|
|
1224
|
-
//
|
|
1225
|
-
//
|
|
1226
|
-
//
|
|
1227
|
-
//
|
|
1228
|
-
//
|
|
1229
|
-
//
|
|
1230
|
-
//
|
|
1231
|
-
//
|
|
1232
|
-
//
|
|
1233
|
-
//
|
|
1234
|
-
//
|
|
1235
|
-
//
|
|
1236
|
-
//
|
|
1237
|
-
//
|
|
1238
|
-
//
|
|
1239
|
-
//
|
|
1240
|
-
//
|
|
1241
|
-
//
|
|
1242
|
-
//
|
|
1243
|
-
//
|
|
1244
|
-
//
|
|
1245
|
-
//
|
|
1246
|
-
//
|
|
1247
|
-
//
|
|
1248
|
-
//
|
|
1249
|
-
//
|
|
1250
|
-
//
|
|
1251
|
-
//
|
|
1252
|
-
//
|
|
1253
|
-
//
|
|
1254
|
-
//
|
|
1255
|
-
//
|
|
1256
|
-
//
|
|
1257
|
-
//
|
|
1258
|
-
//
|
|
1259
|
-
//
|
|
1260
|
-
//
|
|
1261
|
-
//
|
|
1262
|
-
//
|
|
1263
|
-
//
|
|
1264
|
-
//
|
|
1265
|
-
//
|
|
1266
|
-
//
|
|
1267
|
-
//
|
|
1268
|
-
//
|
|
1269
|
-
//
|
|
1270
|
-
//
|
|
1271
|
-
//
|
|
1272
|
-
//
|
|
1273
|
-
//
|
|
1274
|
-
//
|
|
1275
|
-
//
|
|
1276
|
-
//
|
|
1277
|
-
//
|
|
1278
|
-
//
|
|
1279
|
-
//
|
|
1280
|
-
//
|
|
1281
|
-
//
|
|
1282
|
-
//
|
|
1283
|
-
//
|
|
1284
|
-
//
|
|
1285
|
-
//
|
|
1286
|
-
//
|
|
1287
|
-
//
|
|
1288
|
-
//
|
|
1289
|
-
//
|
|
1290
|
-
//
|
|
1291
|
-
//
|
|
1292
|
-
//
|
|
1293
|
-
//
|
|
1294
|
-
//
|
|
1295
|
-
//
|
|
1296
|
-
//
|
|
1297
|
-
//
|
|
1298
|
-
//
|
|
1299
|
-
//
|
|
1300
|
-
//
|
|
1301
|
-
//
|
|
1302
|
-
//
|
|
1303
|
-
//
|
|
1304
|
-
//
|
|
1305
|
-
//
|
|
1306
|
-
//
|
|
1307
|
-
//
|
|
1308
|
-
//
|
|
1309
|
-
//
|
|
1310
|
-
//
|
|
1311
|
-
//
|
|
1312
|
-
//
|
|
1313
|
-
//
|
|
1314
|
-
//
|
|
1315
|
-
//
|
|
1316
|
-
//
|
|
1317
|
-
//
|
|
1318
|
-
//
|
|
1319
|
-
//
|
|
1320
|
-
//
|
|
1321
|
-
//
|
|
1322
|
-
//
|
|
1323
|
-
//
|
|
1324
|
-
//
|
|
1325
|
-
//
|
|
1326
|
-
//
|
|
1327
|
-
//
|
|
1328
|
-
//
|
|
1329
|
-
//
|
|
1330
|
-
//
|
|
1331
|
-
//
|
|
1332
|
-
//
|
|
1333
|
-
//
|
|
1334
|
-
//
|
|
1335
|
-
//
|
|
1336
|
-
//
|
|
1337
|
-
//
|
|
1338
|
-
//
|
|
1339
|
-
//
|
|
1340
|
-
//
|
|
1341
|
-
//
|
|
1342
|
-
//
|
|
1343
|
-
//
|
|
1344
|
-
//
|
|
1345
|
-
//
|
|
1346
|
-
//
|
|
1347
|
-
//
|
|
1348
|
-
//
|
|
1349
|
-
//
|
|
1350
|
-
//
|
|
1351
|
-
//
|
|
1352
|
-
//
|
|
1353
|
-
//
|
|
1354
|
-
//
|
|
1355
|
-
//
|
|
1356
|
-
//
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
var DEBOUNCE = 500;
|
|
1360
|
-
/**
|
|
1361
|
-
* > Beautiful input UI with loading & error manager
|
|
1362
|
-
*/
|
|
1363
|
-
|
|
1364
|
-
/* harmony default export */ var _mainvue_type_script_lang_js_ = ({
|
|
1365
|
-
name: 'MazInput',
|
|
1366
|
-
mixins: [uniqueId["a" /* default */]],
|
|
1367
|
-
props: {
|
|
1368
|
-
// value of the input
|
|
1369
|
-
value: {
|
|
1370
|
-
validator: function validator(prop) {
|
|
1371
|
-
return ['string', 'number'].includes(_typeof(prop)) || prop === null;
|
|
1372
|
-
},
|
|
1373
|
-
default: null
|
|
1374
|
-
},
|
|
1375
|
-
// input id
|
|
1376
|
-
id: {
|
|
1377
|
-
type: String,
|
|
1378
|
-
default: null
|
|
1379
|
-
},
|
|
1380
|
-
// value of the input
|
|
1381
|
-
placeholder: {
|
|
1382
|
-
type: String,
|
|
1383
|
-
default: 'Enter text'
|
|
1384
|
-
},
|
|
1385
|
-
// replace the label if is present
|
|
1386
|
-
hint: {
|
|
1387
|
-
type: String,
|
|
1388
|
-
default: null
|
|
1389
|
-
},
|
|
1390
|
-
// input size (`'lg'` / `'sm'`)
|
|
1391
|
-
size: {
|
|
1392
|
-
type: String,
|
|
1393
|
-
default: null
|
|
1394
|
-
},
|
|
1395
|
-
// is the input size (`text` or `number`)
|
|
1396
|
-
type: {
|
|
1397
|
-
type: String,
|
|
1398
|
-
default: 'text'
|
|
1399
|
-
},
|
|
1400
|
-
// should be a [material icon](https://material.io/resources/icons/) name
|
|
1401
|
-
leftIconName: {
|
|
1402
|
-
type: String,
|
|
1403
|
-
default: null
|
|
1404
|
-
},
|
|
1405
|
-
// should be a [material icon](https://material.io/resources/icons/) name
|
|
1406
|
-
rightIconName: {
|
|
1407
|
-
type: String,
|
|
1408
|
-
default: null
|
|
1409
|
-
},
|
|
1410
|
-
// When is `true` the input has the error style
|
|
1411
|
-
error: {
|
|
1412
|
-
type: Boolean,
|
|
1413
|
-
default: false
|
|
1414
|
-
},
|
|
1415
|
-
// When is `true` the input has the warning style
|
|
1416
|
-
warning: {
|
|
1417
|
-
type: Boolean,
|
|
1418
|
-
default: false
|
|
1419
|
-
},
|
|
1420
|
-
// When is `true` the input is disable
|
|
1421
|
-
disabled: {
|
|
1422
|
-
type: Boolean,
|
|
1423
|
-
default: false
|
|
1424
|
-
},
|
|
1425
|
-
// When is `true` the input has the dark theme
|
|
1426
|
-
dark: {
|
|
1427
|
-
type: Boolean,
|
|
1428
|
-
default: false
|
|
1429
|
-
},
|
|
1430
|
-
// When is `true` the input is on readonly mode
|
|
1431
|
-
readonly: {
|
|
1432
|
-
type: Boolean,
|
|
1433
|
-
default: false
|
|
1434
|
-
},
|
|
1435
|
-
// When is `true` the input has the valid style
|
|
1436
|
-
success: {
|
|
1437
|
-
type: Boolean,
|
|
1438
|
-
default: false
|
|
1439
|
-
},
|
|
1440
|
-
// When is `true` the input become required & has the `*` symbol
|
|
1441
|
-
required: {
|
|
1442
|
-
type: Boolean,
|
|
1443
|
-
default: false
|
|
1444
|
-
},
|
|
1445
|
-
// When is `true` the input is a textarea
|
|
1446
|
-
textarea: {
|
|
1447
|
-
type: Boolean,
|
|
1448
|
-
default: false
|
|
1449
|
-
},
|
|
1450
|
-
// When is `true` the input has a progress bar animated
|
|
1451
|
-
loading: {
|
|
1452
|
-
type: Boolean,
|
|
1453
|
-
default: false
|
|
1454
|
-
},
|
|
1455
|
-
// When is `true` the input can be clear with a button on the right
|
|
1456
|
-
clearable: {
|
|
1457
|
-
type: Boolean,
|
|
1458
|
-
default: false
|
|
1459
|
-
},
|
|
1460
|
-
// When is `true` the input has not label (top placeholder when value is not empty)
|
|
1461
|
-
noLabel: {
|
|
1462
|
-
type: Boolean,
|
|
1463
|
-
default: false
|
|
1464
|
-
},
|
|
1465
|
-
// When is `true` and is `required`, the `*` symbol is not showing
|
|
1466
|
-
noRequiredSymbol: {
|
|
1467
|
-
type: Boolean,
|
|
1468
|
-
default: false
|
|
1469
|
-
},
|
|
1470
|
-
// force focus style input
|
|
1471
|
-
focus: {
|
|
1472
|
-
type: Boolean,
|
|
1473
|
-
default: false
|
|
1474
|
-
},
|
|
1475
|
-
// color name in basic colors
|
|
1476
|
-
color: {
|
|
1477
|
-
type: String,
|
|
1478
|
-
default: 'primary'
|
|
1479
|
-
},
|
|
1480
|
-
// Add a debounce of 500ms to emit the value
|
|
1481
|
-
debounce: {
|
|
1482
|
-
type: Boolean,
|
|
1483
|
-
default: false
|
|
1484
|
-
}
|
|
1485
|
-
},
|
|
1486
|
-
data: function data() {
|
|
1487
|
-
return {
|
|
1488
|
-
isFocus: false,
|
|
1489
|
-
showPassword: false
|
|
1490
|
-
};
|
|
1491
|
-
},
|
|
1492
|
-
computed: {
|
|
1493
|
-
inputValue: {
|
|
1494
|
-
get: function get() {
|
|
1495
|
-
return this.value;
|
|
1496
|
-
},
|
|
1497
|
-
set: function set(value) {
|
|
1498
|
-
var valueToEmit = this.hasNumberType ? !value ? 0 : parseInt(value) : value;
|
|
1499
|
-
this.emitValue(valueToEmit);
|
|
1500
|
-
}
|
|
1501
|
-
},
|
|
1502
|
-
placeholderValue: function placeholderValue() {
|
|
1503
|
-
var placeholder = this.placeholder;
|
|
1504
|
-
if (this.required && placeholder && !this.noRequiredSymbol) placeholder += ' *';
|
|
1505
|
-
return placeholder;
|
|
1506
|
-
},
|
|
1507
|
-
hintValue: function hintValue() {
|
|
1508
|
-
var hint = this.hint;
|
|
1509
|
-
if (this.required && hint) hint += ' *';
|
|
1510
|
-
return hint;
|
|
1511
|
-
},
|
|
1512
|
-
hasNumberType: function hasNumberType() {
|
|
1513
|
-
return this.type === 'number';
|
|
1514
|
-
},
|
|
1515
|
-
hasLabel: function hasLabel() {
|
|
1516
|
-
return !this.noLabel;
|
|
1517
|
-
},
|
|
1518
|
-
getType: function getType() {
|
|
1519
|
-
return this.showPassword ? 'text' : this.type;
|
|
1520
|
-
},
|
|
1521
|
-
hasPasswordBtn: function hasPasswordBtn() {
|
|
1522
|
-
return this.type === 'password' && this.inputValue;
|
|
1523
|
-
},
|
|
1524
|
-
hasClearBtn: function hasClearBtn() {
|
|
1525
|
-
return this.clearable && this.inputValue && !this.textarea;
|
|
1526
|
-
},
|
|
1527
|
-
leftNumberIcon: function leftNumberIcon() {
|
|
1528
|
-
var array = [!!this.hasRightIcon(), !!this.hasClearBtn, !!this.hasPasswordBtn];
|
|
1529
|
-
return array.filter(function (a) {
|
|
1530
|
-
return a;
|
|
1531
|
-
}).length;
|
|
1532
|
-
}
|
|
1533
|
-
},
|
|
1534
|
-
methods: {
|
|
1535
|
-
debounceValue: Object(utils["a" /* debounce */])(function (value) {
|
|
1536
|
-
// return the input value (in `@input` or `v-model`)
|
|
1537
|
-
// @arg input
|
|
1538
|
-
this.$emit('input', value);
|
|
1539
|
-
}, DEBOUNCE),
|
|
1540
|
-
emitValue: function emitValue(value) {
|
|
1541
|
-
if (this.debounce) return this.debounceValue(value);
|
|
1542
|
-
this.$emit('input', value);
|
|
1543
|
-
},
|
|
1544
|
-
hasLeftIcon: function hasLeftIcon() {
|
|
1545
|
-
return this.leftIconName || this.$slots['icon-left'];
|
|
1546
|
-
},
|
|
1547
|
-
hasRightIcon: function hasRightIcon() {
|
|
1548
|
-
return this.rightIconName || this.$slots['icon-right'];
|
|
1549
|
-
},
|
|
1550
|
-
focusInput: function focusInput() {
|
|
1551
|
-
this.$refs.MazInput.focus();
|
|
1552
|
-
},
|
|
1553
|
-
onFocus: function onFocus(e) {
|
|
1554
|
-
// sent the focus event
|
|
1555
|
-
// @arg event
|
|
1556
|
-
this.$emit('focus', e);
|
|
1557
|
-
this.isFocus = true;
|
|
1558
|
-
},
|
|
1559
|
-
onBlur: function onBlur(e) {
|
|
1560
|
-
// sent the blur event
|
|
1561
|
-
// @arg event
|
|
1562
|
-
this.$emit('blur', e);
|
|
1563
|
-
this.isFocus = false;
|
|
1564
|
-
},
|
|
1565
|
-
onPaste: function onPaste(e) {
|
|
1566
|
-
// sent when text is past in the textfield
|
|
1567
|
-
// @arg event
|
|
1568
|
-
this.$emit('paste', e);
|
|
1569
|
-
},
|
|
1570
|
-
onChange: function onChange(e) {
|
|
1571
|
-
// sent on input change
|
|
1572
|
-
// @arg event
|
|
1573
|
-
this.$emit('change', e);
|
|
1574
|
-
},
|
|
1575
|
-
clear: function clear() {
|
|
1576
|
-
this.$emit('input', this.hasNumberType ? 0 : ''); // sent when the input is clear
|
|
1577
|
-
|
|
1578
|
-
this.$emit('clear');
|
|
1579
|
-
},
|
|
1580
|
-
keyUp: function keyUp(e) {
|
|
1581
|
-
// sent the keyup event
|
|
1582
|
-
// @arg event
|
|
1583
|
-
this.$emit('keyup', e);
|
|
1584
|
-
},
|
|
1585
|
-
keyDown: function keyDown(e) {
|
|
1586
|
-
// sent the keydown event
|
|
1587
|
-
// @arg event
|
|
1588
|
-
this.$emit('keydown', e);
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
});
|
|
1592
|
-
// CONCATENATED MODULE: ./packages/components/MazInput/_main.vue?vue&type=script&lang=js&
|
|
1593
|
-
/* harmony default export */ var MazInput_mainvue_type_script_lang_js_ = (_mainvue_type_script_lang_js_);
|
|
1594
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
1595
|
-
var componentNormalizer = __webpack_require__(0);
|
|
1596
|
-
|
|
1597
|
-
// CONCATENATED MODULE: ./packages/components/MazInput/_main.vue
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
/* normalize component */
|
|
1604
|
-
|
|
1605
|
-
var component = Object(componentNormalizer["a" /* default */])(
|
|
1606
|
-
MazInput_mainvue_type_script_lang_js_,
|
|
1607
|
-
render,
|
|
1608
|
-
staticRenderFns,
|
|
1609
|
-
false,
|
|
1610
|
-
null,
|
|
1611
|
-
null,
|
|
1612
|
-
null
|
|
1613
|
-
|
|
1614
|
-
)
|
|
1615
|
-
|
|
1616
|
-
/* hot reload */
|
|
1617
|
-
if (false) { var api; }
|
|
1618
|
-
component.options.__file = "packages/components/MazInput/_main.vue"
|
|
1619
|
-
/* harmony default export */ var _main = (component.exports);
|
|
1620
|
-
// CONCATENATED MODULE: ./packages/components/MazInput/index.js
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
_main.install = function (Vue) {
|
|
1624
|
-
Vue.component(_main.name, _main);
|
|
1625
|
-
};
|
|
1626
|
-
|
|
1627
|
-
/* harmony default export */ var MazInput = __webpack_exports__["default"] = (_main);
|
|
1628
|
-
|
|
1629
|
-
/***/ }),
|
|
1630
|
-
/* 9 */
|
|
1631
|
-
/***/ (function(module, exports) {
|
|
1632
|
-
|
|
1633
|
-
module.exports = require("regenerator-runtime");
|
|
1634
|
-
|
|
1635
|
-
/***/ }),
|
|
1636
|
-
/* 10 */,
|
|
1637
|
-
/* 11 */,
|
|
1638
|
-
/* 12 */,
|
|
1639
|
-
/* 13 */,
|
|
1640
|
-
/* 14 */,
|
|
1641
|
-
/* 15 */,
|
|
1642
|
-
/* 16 */
|
|
1643
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1644
|
-
|
|
1645
|
-
"use strict";
|
|
1646
|
-
// ESM COMPAT FLAG
|
|
1647
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1648
|
-
|
|
1649
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazSelect/_main.vue?vue&type=template&id=2fb08d76&
|
|
1650
|
-
var render = function () {
|
|
1651
|
-
var _vm = this
|
|
1652
|
-
var _h = _vm.$createElement
|
|
1653
|
-
var _c = _vm._self._c || _h
|
|
1654
|
-
return _c(
|
|
1655
|
-
"div",
|
|
1656
|
-
{
|
|
1657
|
-
staticClass: "maz-base-component maz-select",
|
|
1658
|
-
class: [
|
|
1659
|
-
{
|
|
1660
|
-
"has-list-open": _vm.hasOpenList,
|
|
1661
|
-
"maz-is-dark": _vm.dark,
|
|
1662
|
-
},
|
|
1663
|
-
"maz-select--" + _vm.color,
|
|
1664
|
-
"maz-select--" + _vm.size,
|
|
1665
|
-
],
|
|
1666
|
-
on: {
|
|
1667
|
-
"!blur": function ($event) {
|
|
1668
|
-
return _vm.closeList($event)
|
|
1669
|
-
},
|
|
1670
|
-
},
|
|
1671
|
-
},
|
|
1672
|
-
[
|
|
1673
|
-
_vm.multiple
|
|
1674
|
-
? _c(
|
|
1675
|
-
"div",
|
|
1676
|
-
{
|
|
1677
|
-
ref: "SelectedTags",
|
|
1678
|
-
staticClass: "maz-select__tags maz-flex maz-align-center",
|
|
1679
|
-
class: {
|
|
1680
|
-
"maz-left-offset": _vm.hasLeftIcon,
|
|
1681
|
-
},
|
|
1682
|
-
},
|
|
1683
|
-
[
|
|
1684
|
-
_c(
|
|
1685
|
-
"transition-group",
|
|
1686
|
-
{
|
|
1687
|
-
ref: "SelectedTagsContainer",
|
|
1688
|
-
staticClass: "maz-flex maz-align-center maz-h-100",
|
|
1689
|
-
attrs: { tag: "div", name: "maz-tags" },
|
|
1690
|
-
},
|
|
1691
|
-
_vm._l(_vm.selectedOptions, function (option, i) {
|
|
1692
|
-
return _c(
|
|
1693
|
-
"MazBtn",
|
|
1694
|
-
{
|
|
1695
|
-
key: "tags-" + i,
|
|
1696
|
-
staticClass: "maz-select__tag maz-flex maz-align-center",
|
|
1697
|
-
attrs: {
|
|
1698
|
-
disabled: _vm.disabled,
|
|
1699
|
-
color: _vm.color,
|
|
1700
|
-
size: _vm.size,
|
|
1701
|
-
},
|
|
1702
|
-
on: {
|
|
1703
|
-
click: function ($event) {
|
|
1704
|
-
$event.preventDefault()
|
|
1705
|
-
$event.stopPropagation()
|
|
1706
|
-
return _vm.removeOption(option[_vm.config.valueKey])
|
|
1707
|
-
},
|
|
1708
|
-
},
|
|
1709
|
-
},
|
|
1710
|
-
[
|
|
1711
|
-
_c("span", { staticClass: "maz-select__tag__text" }, [
|
|
1712
|
-
_vm._v(
|
|
1713
|
-
"\n " +
|
|
1714
|
-
_vm._s(option[_vm.config.labelKey]) +
|
|
1715
|
-
"\n "
|
|
1716
|
-
),
|
|
1717
|
-
]),
|
|
1718
|
-
_c(
|
|
1719
|
-
"i",
|
|
1720
|
-
{
|
|
1721
|
-
staticClass: "maz-select__tag__clear material-icons",
|
|
1722
|
-
},
|
|
1723
|
-
[_vm._v("\n close\n ")]
|
|
1724
|
-
),
|
|
1725
|
-
]
|
|
1726
|
-
)
|
|
1727
|
-
}),
|
|
1728
|
-
1
|
|
1729
|
-
),
|
|
1730
|
-
],
|
|
1731
|
-
1
|
|
1732
|
-
)
|
|
1733
|
-
: _vm._e(),
|
|
1734
|
-
_c(
|
|
1735
|
-
"MazInput",
|
|
1736
|
-
_vm._b(
|
|
1737
|
-
{
|
|
1738
|
-
ref: "textField",
|
|
1739
|
-
attrs: {
|
|
1740
|
-
value: _vm.valueShown,
|
|
1741
|
-
readonly: "",
|
|
1742
|
-
"no-label": _vm.hasNoLabel,
|
|
1743
|
-
color: _vm.color,
|
|
1744
|
-
size: _vm.size,
|
|
1745
|
-
placeholder: _vm.placeholderShown,
|
|
1746
|
-
disabled: _vm.disabled,
|
|
1747
|
-
focus: _vm.hasOpenList,
|
|
1748
|
-
},
|
|
1749
|
-
on: {
|
|
1750
|
-
clear: function ($event) {
|
|
1751
|
-
return _vm.emitValues(null)
|
|
1752
|
-
},
|
|
1753
|
-
keydown: function ($event) {
|
|
1754
|
-
_vm.search ? null : _vm.keyboardNav($event)
|
|
1755
|
-
},
|
|
1756
|
-
keyup: function ($event) {
|
|
1757
|
-
return _vm.$emit("keyup", $event)
|
|
1758
|
-
},
|
|
1759
|
-
blur: function ($event) {
|
|
1760
|
-
return _vm.$emit("blur", $event)
|
|
1761
|
-
},
|
|
1762
|
-
change: function ($event) {
|
|
1763
|
-
return _vm.$emit("change", $event)
|
|
1764
|
-
},
|
|
1765
|
-
paste: function ($event) {
|
|
1766
|
-
return _vm.$emit("paste", $event)
|
|
1767
|
-
},
|
|
1768
|
-
click: function ($event) {
|
|
1769
|
-
return _vm.$emit("click", $event)
|
|
1770
|
-
},
|
|
1771
|
-
focus: _vm.openList,
|
|
1772
|
-
},
|
|
1773
|
-
},
|
|
1774
|
-
"MazInput",
|
|
1775
|
-
_vm.$attrs,
|
|
1776
|
-
false
|
|
1777
|
-
),
|
|
1778
|
-
[
|
|
1779
|
-
_vm._t("icon-left", null, { slot: "icon-left" }),
|
|
1780
|
-
_c(
|
|
1781
|
-
"div",
|
|
1782
|
-
{
|
|
1783
|
-
staticClass: "maz-select__toggle maz-flex maz-flex-center",
|
|
1784
|
-
attrs: { slot: "icon-right", tabindex: "-1" },
|
|
1785
|
-
slot: "icon-right",
|
|
1786
|
-
},
|
|
1787
|
-
[
|
|
1788
|
-
_vm._t("arrow", function () {
|
|
1789
|
-
return [
|
|
1790
|
-
_c(
|
|
1791
|
-
"svg",
|
|
1792
|
-
{
|
|
1793
|
-
staticClass: "maz-select__toggle__arrow",
|
|
1794
|
-
attrs: {
|
|
1795
|
-
mlns: "http://www.w3.org/2000/svg",
|
|
1796
|
-
width: "24",
|
|
1797
|
-
height: "24",
|
|
1798
|
-
viewBox: "0 0 24 24",
|
|
1799
|
-
},
|
|
1800
|
-
},
|
|
1801
|
-
[
|
|
1802
|
-
_c("path", {
|
|
1803
|
-
staticClass: "arrow",
|
|
1804
|
-
attrs: {
|
|
1805
|
-
d: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",
|
|
1806
|
-
},
|
|
1807
|
-
}),
|
|
1808
|
-
_c("path", {
|
|
1809
|
-
attrs: { fill: "none", d: "M0 0h24v24H0V0z" },
|
|
1810
|
-
}),
|
|
1811
|
-
]
|
|
1812
|
-
),
|
|
1813
|
-
]
|
|
1814
|
-
}),
|
|
1815
|
-
],
|
|
1816
|
-
2
|
|
1817
|
-
),
|
|
1818
|
-
],
|
|
1819
|
-
2
|
|
1820
|
-
),
|
|
1821
|
-
_c("transition", { attrs: { name: _vm.listTransition } }, [
|
|
1822
|
-
_c(
|
|
1823
|
-
"div",
|
|
1824
|
-
{
|
|
1825
|
-
directives: [
|
|
1826
|
-
{
|
|
1827
|
-
name: "show",
|
|
1828
|
-
rawName: "v-show",
|
|
1829
|
-
value: _vm.hasOpenList,
|
|
1830
|
-
expression: "hasOpenList",
|
|
1831
|
-
},
|
|
1832
|
-
],
|
|
1833
|
-
staticClass: "maz-select__options-list maz-flex maz-elevation",
|
|
1834
|
-
class: [
|
|
1835
|
-
_vm.hasPositionTop
|
|
1836
|
-
? "maz-select__options-list--top maz-direction-column-reverse"
|
|
1837
|
-
: "maz-direction-column",
|
|
1838
|
-
{ "maz-select__options-list--right": _vm.hasPositionRight },
|
|
1839
|
-
],
|
|
1840
|
-
style: [_vm.itemListSize],
|
|
1841
|
-
},
|
|
1842
|
-
[
|
|
1843
|
-
_vm.search
|
|
1844
|
-
? _c("MazInput", {
|
|
1845
|
-
ref: "SearchInput",
|
|
1846
|
-
staticClass: "maz-m-1",
|
|
1847
|
-
attrs: {
|
|
1848
|
-
color: _vm.color,
|
|
1849
|
-
value: _vm.searchQuery,
|
|
1850
|
-
placeholder: _vm.searchPlaceholder,
|
|
1851
|
-
size: "sm",
|
|
1852
|
-
"no-label": "",
|
|
1853
|
-
name: "new_search_in_options",
|
|
1854
|
-
autocomplete: "off",
|
|
1855
|
-
},
|
|
1856
|
-
on: {
|
|
1857
|
-
input: _vm.searchInOptions,
|
|
1858
|
-
keydown: [
|
|
1859
|
-
_vm.keyboardNav,
|
|
1860
|
-
function ($event) {
|
|
1861
|
-
if (
|
|
1862
|
-
!$event.type.indexOf("key") &&
|
|
1863
|
-
_vm._k($event.keyCode, "esc", 27, $event.key, [
|
|
1864
|
-
"Esc",
|
|
1865
|
-
"Escape",
|
|
1866
|
-
])
|
|
1867
|
-
) {
|
|
1868
|
-
return null
|
|
1869
|
-
}
|
|
1870
|
-
return _vm.closeList.apply(null, arguments)
|
|
1871
|
-
},
|
|
1872
|
-
],
|
|
1873
|
-
},
|
|
1874
|
-
})
|
|
1875
|
-
: _vm._e(),
|
|
1876
|
-
_c(
|
|
1877
|
-
"div",
|
|
1878
|
-
{
|
|
1879
|
-
ref: "optionsList",
|
|
1880
|
-
staticClass:
|
|
1881
|
-
"maz-select__options-list__items maz-flex maz-direction-column",
|
|
1882
|
-
},
|
|
1883
|
-
[
|
|
1884
|
-
_vm._l(_vm.optionsShown, function (option, i) {
|
|
1885
|
-
return _c(
|
|
1886
|
-
"button",
|
|
1887
|
-
{
|
|
1888
|
-
key: i,
|
|
1889
|
-
staticClass:
|
|
1890
|
-
"maz-select__options-list__item flex maz-align-center maz-text-left",
|
|
1891
|
-
class: [
|
|
1892
|
-
{
|
|
1893
|
-
selected:
|
|
1894
|
-
_vm.values.length &&
|
|
1895
|
-
_vm.values.includes(option[_vm.config.valueKey]),
|
|
1896
|
-
},
|
|
1897
|
-
{
|
|
1898
|
-
"keyboard-selected":
|
|
1899
|
-
_vm.tmpValue === option[_vm.config.valueKey],
|
|
1900
|
-
},
|
|
1901
|
-
],
|
|
1902
|
-
style: [_vm.optionHeight],
|
|
1903
|
-
attrs: { tabindex: "-1", type: "button" },
|
|
1904
|
-
on: {
|
|
1905
|
-
click: function ($event) {
|
|
1906
|
-
$event.preventDefault()
|
|
1907
|
-
$event.stopPropagation()
|
|
1908
|
-
return _vm.updateValue(option[_vm.config.valueKey])
|
|
1909
|
-
},
|
|
1910
|
-
},
|
|
1911
|
-
},
|
|
1912
|
-
[
|
|
1913
|
-
_vm._t(
|
|
1914
|
-
"default",
|
|
1915
|
-
function () {
|
|
1916
|
-
return [
|
|
1917
|
-
_c(
|
|
1918
|
-
"span",
|
|
1919
|
-
{
|
|
1920
|
-
staticClass: "maz-dots-text",
|
|
1921
|
-
class: [
|
|
1922
|
-
{
|
|
1923
|
-
"maz-text-muted":
|
|
1924
|
-
!option[_vm.config.valueKey],
|
|
1925
|
-
},
|
|
1926
|
-
_vm.values.includes(
|
|
1927
|
-
option[_vm.config.valueKey]
|
|
1928
|
-
)
|
|
1929
|
-
? "maz-text-white"
|
|
1930
|
-
: "maz-text-color",
|
|
1931
|
-
],
|
|
1932
|
-
},
|
|
1933
|
-
[
|
|
1934
|
-
_vm._v(
|
|
1935
|
-
"\n " +
|
|
1936
|
-
_vm._s(option[_vm.config.labelKey]) +
|
|
1937
|
-
"\n "
|
|
1938
|
-
),
|
|
1939
|
-
]
|
|
1940
|
-
),
|
|
1941
|
-
]
|
|
1942
|
-
},
|
|
1943
|
-
{
|
|
1944
|
-
option: Object.assign({}, option, {
|
|
1945
|
-
isSelected: _vm.values.includes(
|
|
1946
|
-
option[_vm.config.valueKey]
|
|
1947
|
-
),
|
|
1948
|
-
}),
|
|
1949
|
-
tag: "div",
|
|
1950
|
-
}
|
|
1951
|
-
),
|
|
1952
|
-
],
|
|
1953
|
-
2
|
|
1954
|
-
)
|
|
1955
|
-
}),
|
|
1956
|
-
!_vm.optionsShown.length
|
|
1957
|
-
? _vm._t(
|
|
1958
|
-
"no-results",
|
|
1959
|
-
function () {
|
|
1960
|
-
return [
|
|
1961
|
-
_c(
|
|
1962
|
-
"div",
|
|
1963
|
-
{
|
|
1964
|
-
staticClass:
|
|
1965
|
-
"maz-select__options-list__no-results maz-p-1 maz-flex maz-flex-center",
|
|
1966
|
-
},
|
|
1967
|
-
[
|
|
1968
|
-
_c(
|
|
1969
|
-
"i",
|
|
1970
|
-
{
|
|
1971
|
-
staticClass: "material-icons maz-text-danger",
|
|
1972
|
-
},
|
|
1973
|
-
[
|
|
1974
|
-
_vm._v(
|
|
1975
|
-
"\n search_off\n "
|
|
1976
|
-
),
|
|
1977
|
-
]
|
|
1978
|
-
),
|
|
1979
|
-
]
|
|
1980
|
-
),
|
|
1981
|
-
]
|
|
1982
|
-
},
|
|
1983
|
-
{ tag: "div" }
|
|
1984
|
-
)
|
|
1985
|
-
: _vm._e(),
|
|
1986
|
-
],
|
|
1987
|
-
2
|
|
1988
|
-
),
|
|
1989
|
-
],
|
|
1990
|
-
1
|
|
1991
|
-
),
|
|
1992
|
-
]),
|
|
1993
|
-
],
|
|
1994
|
-
1
|
|
1995
|
-
)
|
|
1996
|
-
}
|
|
1997
|
-
var staticRenderFns = []
|
|
1998
|
-
render._withStripped = true
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
// CONCATENATED MODULE: ./packages/components/MazSelect/_main.vue?vue&type=template&id=2fb08d76&
|
|
2002
|
-
|
|
2003
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
|
|
2004
|
-
var regenerator = __webpack_require__(1);
|
|
2005
|
-
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
|
|
2006
|
-
|
|
2007
|
-
// EXTERNAL MODULE: ./packages/components/MazInput/index.js + 5 modules
|
|
2008
|
-
var MazInput = __webpack_require__(8);
|
|
2009
|
-
|
|
2010
|
-
// EXTERNAL MODULE: ./packages/components/MazBtn/index.js + 5 modules
|
|
2011
|
-
var MazBtn = __webpack_require__(4);
|
|
2012
|
-
|
|
2013
|
-
// EXTERNAL MODULE: ./packages/mixins/uniqueId.js
|
|
2014
|
-
var uniqueId = __webpack_require__(2);
|
|
2015
|
-
|
|
2016
|
-
// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/components/MazSelect/_main.vue?vue&type=script&lang=js&
|
|
2017
|
-
|
|
2018
|
-
|
|
2019
|
-
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
2020
|
-
|
|
2021
|
-
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
2022
|
-
|
|
2023
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
2024
|
-
|
|
2025
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
2026
|
-
|
|
2027
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
2028
|
-
|
|
2029
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
2030
|
-
|
|
2031
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
2032
|
-
|
|
2033
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
2034
|
-
|
|
2035
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2036
|
-
|
|
2037
|
-
//
|
|
2038
|
-
//
|
|
2039
|
-
//
|
|
2040
|
-
//
|
|
2041
|
-
//
|
|
2042
|
-
//
|
|
2043
|
-
//
|
|
2044
|
-
//
|
|
2045
|
-
//
|
|
2046
|
-
//
|
|
2047
|
-
//
|
|
2048
|
-
//
|
|
2049
|
-
//
|
|
2050
|
-
//
|
|
2051
|
-
//
|
|
2052
|
-
//
|
|
2053
|
-
//
|
|
2054
|
-
//
|
|
2055
|
-
//
|
|
2056
|
-
//
|
|
2057
|
-
//
|
|
2058
|
-
//
|
|
2059
|
-
//
|
|
2060
|
-
//
|
|
2061
|
-
//
|
|
2062
|
-
//
|
|
2063
|
-
//
|
|
2064
|
-
//
|
|
2065
|
-
//
|
|
2066
|
-
//
|
|
2067
|
-
//
|
|
2068
|
-
//
|
|
2069
|
-
//
|
|
2070
|
-
//
|
|
2071
|
-
//
|
|
2072
|
-
//
|
|
2073
|
-
//
|
|
2074
|
-
//
|
|
2075
|
-
//
|
|
2076
|
-
//
|
|
2077
|
-
//
|
|
2078
|
-
//
|
|
2079
|
-
//
|
|
2080
|
-
//
|
|
2081
|
-
//
|
|
2082
|
-
//
|
|
2083
|
-
//
|
|
2084
|
-
//
|
|
2085
|
-
//
|
|
2086
|
-
//
|
|
2087
|
-
//
|
|
2088
|
-
//
|
|
2089
|
-
//
|
|
2090
|
-
//
|
|
2091
|
-
//
|
|
2092
|
-
//
|
|
2093
|
-
//
|
|
2094
|
-
//
|
|
2095
|
-
//
|
|
2096
|
-
//
|
|
2097
|
-
//
|
|
2098
|
-
//
|
|
2099
|
-
//
|
|
2100
|
-
//
|
|
2101
|
-
//
|
|
2102
|
-
//
|
|
2103
|
-
//
|
|
2104
|
-
//
|
|
2105
|
-
//
|
|
2106
|
-
//
|
|
2107
|
-
//
|
|
2108
|
-
//
|
|
2109
|
-
//
|
|
2110
|
-
//
|
|
2111
|
-
//
|
|
2112
|
-
//
|
|
2113
|
-
//
|
|
2114
|
-
//
|
|
2115
|
-
//
|
|
2116
|
-
//
|
|
2117
|
-
//
|
|
2118
|
-
//
|
|
2119
|
-
//
|
|
2120
|
-
//
|
|
2121
|
-
//
|
|
2122
|
-
//
|
|
2123
|
-
//
|
|
2124
|
-
//
|
|
2125
|
-
//
|
|
2126
|
-
//
|
|
2127
|
-
//
|
|
2128
|
-
//
|
|
2129
|
-
//
|
|
2130
|
-
//
|
|
2131
|
-
//
|
|
2132
|
-
//
|
|
2133
|
-
//
|
|
2134
|
-
//
|
|
2135
|
-
//
|
|
2136
|
-
//
|
|
2137
|
-
//
|
|
2138
|
-
//
|
|
2139
|
-
//
|
|
2140
|
-
//
|
|
2141
|
-
//
|
|
2142
|
-
//
|
|
2143
|
-
//
|
|
2144
|
-
//
|
|
2145
|
-
//
|
|
2146
|
-
//
|
|
2147
|
-
//
|
|
2148
|
-
//
|
|
2149
|
-
//
|
|
2150
|
-
//
|
|
2151
|
-
//
|
|
2152
|
-
//
|
|
2153
|
-
//
|
|
2154
|
-
//
|
|
2155
|
-
//
|
|
2156
|
-
//
|
|
2157
|
-
//
|
|
2158
|
-
//
|
|
2159
|
-
//
|
|
2160
|
-
//
|
|
2161
|
-
//
|
|
2162
|
-
//
|
|
2163
|
-
//
|
|
2164
|
-
//
|
|
2165
|
-
//
|
|
2166
|
-
//
|
|
2167
|
-
//
|
|
2168
|
-
//
|
|
2169
|
-
//
|
|
2170
|
-
//
|
|
2171
|
-
//
|
|
2172
|
-
//
|
|
2173
|
-
//
|
|
2174
|
-
//
|
|
2175
|
-
//
|
|
2176
|
-
//
|
|
2177
|
-
//
|
|
2178
|
-
//
|
|
2179
|
-
//
|
|
2180
|
-
//
|
|
2181
|
-
//
|
|
2182
|
-
//
|
|
2183
|
-
//
|
|
2184
|
-
//
|
|
2185
|
-
//
|
|
2186
|
-
//
|
|
2187
|
-
//
|
|
2188
|
-
//
|
|
2189
|
-
//
|
|
2190
|
-
//
|
|
2191
|
-
//
|
|
2192
|
-
//
|
|
2193
|
-
//
|
|
2194
|
-
//
|
|
2195
|
-
//
|
|
2196
|
-
//
|
|
2197
|
-
//
|
|
2198
|
-
//
|
|
2199
|
-
//
|
|
2200
|
-
//
|
|
2201
|
-
//
|
|
2202
|
-
//
|
|
2203
|
-
//
|
|
2204
|
-
//
|
|
2205
|
-
//
|
|
2206
|
-
//
|
|
2207
|
-
//
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
/**
|
|
2212
|
-
* > Beautiful select input
|
|
2213
|
-
*/
|
|
2214
|
-
|
|
2215
|
-
/* harmony default export */ var _mainvue_type_script_lang_js_ = ({
|
|
2216
|
-
name: 'MazSelect',
|
|
2217
|
-
components: {
|
|
2218
|
-
MazInput: MazInput["default"],
|
|
2219
|
-
MazBtn: MazBtn["default"]
|
|
2220
|
-
},
|
|
2221
|
-
mixins: [uniqueId["a" /* default */]],
|
|
2222
|
-
props: {
|
|
2223
|
-
// is the value of the input
|
|
2224
|
-
value: {
|
|
2225
|
-
required: true,
|
|
2226
|
-
validator: function validator(prop) {
|
|
2227
|
-
return ['number', 'string', 'boolean'].includes(_typeof(prop)) || Array.isArray(prop) || prop === null;
|
|
2228
|
-
}
|
|
2229
|
-
},
|
|
2230
|
-
// list of the options
|
|
2231
|
-
options: {
|
|
2232
|
-
type: Array,
|
|
2233
|
-
required: true
|
|
2234
|
-
},
|
|
2235
|
-
// When is `true` the select is disabled
|
|
2236
|
-
disabled: {
|
|
2237
|
-
type: Boolean,
|
|
2238
|
-
default: false
|
|
2239
|
-
},
|
|
2240
|
-
// When is `true` the select has the dark style
|
|
2241
|
-
dark: {
|
|
2242
|
-
type: Boolean,
|
|
2243
|
-
default: false
|
|
2244
|
-
},
|
|
2245
|
-
// Item in list height in pixel
|
|
2246
|
-
itemHeight: {
|
|
2247
|
-
type: Number,
|
|
2248
|
-
default: 35
|
|
2249
|
-
},
|
|
2250
|
-
// List height in pixel
|
|
2251
|
-
listHeight: {
|
|
2252
|
-
type: Number,
|
|
2253
|
-
default: 260
|
|
2254
|
-
},
|
|
2255
|
-
// List width in pixel or percent (:list-width="100", list-width="100%")
|
|
2256
|
-
listWidth: {
|
|
2257
|
-
type: [Number, String],
|
|
2258
|
-
default: null
|
|
2259
|
-
},
|
|
2260
|
-
// The select has no label in the input
|
|
2261
|
-
placeholder: {
|
|
2262
|
-
type: String,
|
|
2263
|
-
default: 'Select option'
|
|
2264
|
-
},
|
|
2265
|
-
// When is `true` the select you select multiple values
|
|
2266
|
-
noLabel: {
|
|
2267
|
-
type: Boolean,
|
|
2268
|
-
default: false
|
|
2269
|
-
},
|
|
2270
|
-
// When is `true` the select you select multiple values
|
|
2271
|
-
multiple: {
|
|
2272
|
-
type: Boolean,
|
|
2273
|
-
default: false
|
|
2274
|
-
},
|
|
2275
|
-
// When is `true` the select has an input to search in options
|
|
2276
|
-
search: {
|
|
2277
|
-
type: Boolean,
|
|
2278
|
-
default: false
|
|
2279
|
-
},
|
|
2280
|
-
// the search input placeholder
|
|
2281
|
-
searchPlaceholder: {
|
|
2282
|
-
type: String,
|
|
2283
|
-
default: 'Search in options'
|
|
2284
|
-
},
|
|
2285
|
-
// the search input placeholder
|
|
2286
|
-
color: {
|
|
2287
|
-
type: String,
|
|
2288
|
-
default: 'primary'
|
|
2289
|
-
},
|
|
2290
|
-
// input size
|
|
2291
|
-
size: {
|
|
2292
|
-
type: String,
|
|
2293
|
-
default: 'md'
|
|
2294
|
-
},
|
|
2295
|
-
// When is `true` the option list is open
|
|
2296
|
-
open: {
|
|
2297
|
-
type: Boolean,
|
|
2298
|
-
default: false
|
|
2299
|
-
},
|
|
2300
|
-
// set the position of option list (`top`, `top right`, `bottom right`)
|
|
2301
|
-
position: {
|
|
2302
|
-
type: String,
|
|
2303
|
-
default: 'left bottom'
|
|
2304
|
-
},
|
|
2305
|
-
// set label key and value key - Ex: `{ labelKey: '<your_object_key>', valueKey: '<your_object_key>', searchKey: '<your_object_key>' }`
|
|
2306
|
-
config: {
|
|
2307
|
-
type: Object,
|
|
2308
|
-
default: function _default() {
|
|
2309
|
-
return {
|
|
2310
|
-
labelKey: 'label',
|
|
2311
|
-
valueKey: 'value',
|
|
2312
|
-
searchKey: 'label'
|
|
2313
|
-
};
|
|
2314
|
-
}
|
|
2315
|
-
},
|
|
2316
|
-
// force value shown on input
|
|
2317
|
-
inputValue: {
|
|
2318
|
-
type: String,
|
|
2319
|
-
default: null
|
|
2320
|
-
}
|
|
2321
|
-
},
|
|
2322
|
-
data: function data() {
|
|
2323
|
-
return {
|
|
2324
|
-
listIsOpen: false,
|
|
2325
|
-
query: '',
|
|
2326
|
-
tmpValue: null,
|
|
2327
|
-
searchQuery: null,
|
|
2328
|
-
filteredOptions: null
|
|
2329
|
-
};
|
|
2330
|
-
},
|
|
2331
|
-
computed: {
|
|
2332
|
-
hasPositionTop: function hasPositionTop() {
|
|
2333
|
-
return this.position.includes('top');
|
|
2334
|
-
},
|
|
2335
|
-
hasPositionRight: function hasPositionRight() {
|
|
2336
|
-
return this.position.includes('right');
|
|
2337
|
-
},
|
|
2338
|
-
listTransition: function listTransition() {
|
|
2339
|
-
return this.position.includes('bottom') ? 'maz-slide' : 'maz-slideinvert';
|
|
2340
|
-
},
|
|
2341
|
-
hasOpenList: function hasOpenList() {
|
|
2342
|
-
return this.open || this.listIsOpen;
|
|
2343
|
-
},
|
|
2344
|
-
values: function values() {
|
|
2345
|
-
var multiple = this.multiple,
|
|
2346
|
-
value = this.value,
|
|
2347
|
-
options = this.options;
|
|
2348
|
-
if (!options) throw new Error('[MazSelect] options should be provide');
|
|
2349
|
-
if (multiple && !Array.isArray(value) && value !== null) throw new Error('[MazSelect] value should be an array or null');
|
|
2350
|
-
if (!multiple && Array.isArray(value)) throw new Error('[MazSelect] value should be a string, a number or null');
|
|
2351
|
-
return value ? multiple ? _toConsumableArray(value) : [value] : [];
|
|
2352
|
-
},
|
|
2353
|
-
hasLeftIcon: function hasLeftIcon() {
|
|
2354
|
-
return this.$attrs.leftIconName || this.$slots['icon-left'];
|
|
2355
|
-
},
|
|
2356
|
-
placeholderShown: function placeholderShown() {
|
|
2357
|
-
var placeholder = this.placeholder,
|
|
2358
|
-
multiple = this.multiple,
|
|
2359
|
-
values = this.values;
|
|
2360
|
-
return multiple && values.length ? null : placeholder;
|
|
2361
|
-
},
|
|
2362
|
-
hasNoLabel: function hasNoLabel() {
|
|
2363
|
-
return this.multiple || this.noLabel;
|
|
2364
|
-
},
|
|
2365
|
-
optionHeight: function optionHeight() {
|
|
2366
|
-
return {
|
|
2367
|
-
height: "".concat(this.itemHeight, "px"),
|
|
2368
|
-
flex: "0 0 ".concat(this.itemHeight, "px")
|
|
2369
|
-
};
|
|
2370
|
-
},
|
|
2371
|
-
itemListSize: function itemListSize() {
|
|
2372
|
-
var listHeight = this.listHeight,
|
|
2373
|
-
listWidth = this.listWidth;
|
|
2374
|
-
var width = !Number.isInteger(listWidth) ? listWidth : "".concat(listWidth, "px");
|
|
2375
|
-
return {
|
|
2376
|
-
maxHeight: "".concat(listHeight, "px"),
|
|
2377
|
-
width: width,
|
|
2378
|
-
maxWidth: width
|
|
2379
|
-
};
|
|
2380
|
-
},
|
|
2381
|
-
tmpValueIndex: function tmpValueIndex() {
|
|
2382
|
-
var config = this.config,
|
|
2383
|
-
tmpValue = this.tmpValue,
|
|
2384
|
-
optionsShown = this.optionsShown;
|
|
2385
|
-
return optionsShown.findIndex(function (c) {
|
|
2386
|
-
return c[config.valueKey] === tmpValue;
|
|
2387
|
-
});
|
|
2388
|
-
},
|
|
2389
|
-
selectedValueIndex: function selectedValueIndex() {
|
|
2390
|
-
var values = this.values,
|
|
2391
|
-
options = this.options,
|
|
2392
|
-
config = this.config;
|
|
2393
|
-
return values.length ? options.findIndex(function (c) {
|
|
2394
|
-
return c[config.valueKey] === values[values.length - 1];
|
|
2395
|
-
}) : null;
|
|
2396
|
-
},
|
|
2397
|
-
valueShown: function valueShown() {
|
|
2398
|
-
if (this.inputValue) return this.inputValue;
|
|
2399
|
-
var multiple = this.multiple,
|
|
2400
|
-
options = this.options,
|
|
2401
|
-
values = this.values,
|
|
2402
|
-
value = this.value,
|
|
2403
|
-
config = this.config;
|
|
2404
|
-
var valueSelected = options.find(function (o) {
|
|
2405
|
-
return o[config.valueKey] === value;
|
|
2406
|
-
});
|
|
2407
|
-
var result = valueSelected && valueSelected[config.valueKey] && !multiple ? valueSelected[config.labelKey] : values[0] ? ' ' : null;
|
|
2408
|
-
return result;
|
|
2409
|
-
},
|
|
2410
|
-
optionsShown: function optionsShown() {
|
|
2411
|
-
return this.filteredOptions || this.options;
|
|
2412
|
-
},
|
|
2413
|
-
selectedOptions: function selectedOptions() {
|
|
2414
|
-
var values = this.values,
|
|
2415
|
-
options = this.options,
|
|
2416
|
-
config = this.config;
|
|
2417
|
-
var optionsSelected = [];
|
|
2418
|
-
values.forEach(function (v) {
|
|
2419
|
-
return optionsSelected.push(options.find(function (o) {
|
|
2420
|
-
return v === o[config.valueKey];
|
|
2421
|
-
}));
|
|
2422
|
-
});
|
|
2423
|
-
return optionsSelected;
|
|
2424
|
-
}
|
|
2425
|
-
},
|
|
2426
|
-
watch: {
|
|
2427
|
-
value: {
|
|
2428
|
-
handler: function handler() {
|
|
2429
|
-
var multiple = this.multiple;
|
|
2430
|
-
if (multiple) this.scrollTags();
|
|
2431
|
-
},
|
|
2432
|
-
immediate: true
|
|
2433
|
-
}
|
|
2434
|
-
},
|
|
2435
|
-
methods: {
|
|
2436
|
-
scrollTags: function scrollTags() {
|
|
2437
|
-
var _this = this;
|
|
2438
|
-
|
|
2439
|
-
return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee() {
|
|
2440
|
-
var _SelectedTagsContaine, _SelectedTagsContaine2;
|
|
2441
|
-
|
|
2442
|
-
var _this$$refs, SelectedTags, SelectedTagsContainer;
|
|
2443
|
-
|
|
2444
|
-
return regenerator_default.a.wrap(function _callee$(_context) {
|
|
2445
|
-
while (1) {
|
|
2446
|
-
switch (_context.prev = _context.next) {
|
|
2447
|
-
case 0:
|
|
2448
|
-
_context.next = 2;
|
|
2449
|
-
return _this.$nextTick();
|
|
2450
|
-
|
|
2451
|
-
case 2:
|
|
2452
|
-
_this$$refs = _this.$refs, SelectedTags = _this$$refs.SelectedTags, SelectedTagsContainer = _this$$refs.SelectedTagsContainer;
|
|
2453
|
-
if (SelectedTags) SelectedTags.scrollLeft = (_SelectedTagsContaine = SelectedTagsContainer === null || SelectedTagsContainer === void 0 ? void 0 : (_SelectedTagsContaine2 = SelectedTagsContainer.$el) === null || _SelectedTagsContaine2 === void 0 ? void 0 : _SelectedTagsContaine2.clientWidth) !== null && _SelectedTagsContaine !== void 0 ? _SelectedTagsContaine : null;
|
|
2454
|
-
|
|
2455
|
-
case 4:
|
|
2456
|
-
case "end":
|
|
2457
|
-
return _context.stop();
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
}, _callee);
|
|
2461
|
-
}))();
|
|
2462
|
-
},
|
|
2463
|
-
removeOption: function removeOption(value) {
|
|
2464
|
-
var values = this.values,
|
|
2465
|
-
multiple = this.multiple;
|
|
2466
|
-
var leftValues = values.filter(function (v) {
|
|
2467
|
-
return v !== value;
|
|
2468
|
-
});
|
|
2469
|
-
var valueToReturn = leftValues.length ? multiple ? leftValues : leftValues[0] : null;
|
|
2470
|
-
this.emitValues(valueToReturn);
|
|
2471
|
-
},
|
|
2472
|
-
closeList: function closeList() {
|
|
2473
|
-
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2474
|
-
if (this.$el.contains(e.relatedTarget)) return e.preventDefault();
|
|
2475
|
-
this.$emit('close');
|
|
2476
|
-
this.listIsOpen = false;
|
|
2477
|
-
this.isFocus = false;
|
|
2478
|
-
},
|
|
2479
|
-
openList: function openList(e) {
|
|
2480
|
-
this.$emit('focus', e);
|
|
2481
|
-
var disabled = this.disabled,
|
|
2482
|
-
search = this.search,
|
|
2483
|
-
values = this.values;
|
|
2484
|
-
|
|
2485
|
-
if (!disabled) {
|
|
2486
|
-
if (disabled) return; // sent when the list is open
|
|
2487
|
-
|
|
2488
|
-
this.$emit('open');
|
|
2489
|
-
this.isFocus = true;
|
|
2490
|
-
this.listIsOpen = true;
|
|
2491
|
-
this.selectFirstValue();
|
|
2492
|
-
if (search) this.focusSearchInput();
|
|
2493
|
-
if (values.length) this.scrollToSelectedOnFocus(this.selectedValueIndex);
|
|
2494
|
-
}
|
|
2495
|
-
},
|
|
2496
|
-
clearSearch: function clearSearch() {
|
|
2497
|
-
this.searchQuery = null;
|
|
2498
|
-
this.filteredOptions = null;
|
|
2499
|
-
},
|
|
2500
|
-
reset: function reset() {
|
|
2501
|
-
var _this2 = this;
|
|
2502
|
-
|
|
2503
|
-
return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee2() {
|
|
2504
|
-
return regenerator_default.a.wrap(function _callee2$(_context2) {
|
|
2505
|
-
while (1) {
|
|
2506
|
-
switch (_context2.prev = _context2.next) {
|
|
2507
|
-
case 0:
|
|
2508
|
-
_this2.clearSearch();
|
|
2509
|
-
|
|
2510
|
-
if (!_this2.multiple) {
|
|
2511
|
-
_context2.next = 3;
|
|
2512
|
-
break;
|
|
2513
|
-
}
|
|
2514
|
-
|
|
2515
|
-
return _context2.abrupt("return");
|
|
2516
|
-
|
|
2517
|
-
case 3:
|
|
2518
|
-
_this2.closeList();
|
|
2519
|
-
|
|
2520
|
-
case 4:
|
|
2521
|
-
case "end":
|
|
2522
|
-
return _context2.stop();
|
|
2523
|
-
}
|
|
2524
|
-
}
|
|
2525
|
-
}, _callee2);
|
|
2526
|
-
}))();
|
|
2527
|
-
},
|
|
2528
|
-
selectFirstValue: function selectFirstValue() {
|
|
2529
|
-
var multiple = this.multiple,
|
|
2530
|
-
value = this.value,
|
|
2531
|
-
options = this.options,
|
|
2532
|
-
config = this.config;
|
|
2533
|
-
if (value || multiple) return;
|
|
2534
|
-
var valueToReturn = options[0][config.valueKey] || null;
|
|
2535
|
-
this.tmpValue = valueToReturn;
|
|
2536
|
-
this.emitValues(valueToReturn, true);
|
|
2537
|
-
},
|
|
2538
|
-
updateValue: function updateValue(value) {
|
|
2539
|
-
var multiple = this.multiple,
|
|
2540
|
-
values = this.values,
|
|
2541
|
-
removeOption = this.removeOption;
|
|
2542
|
-
if (values.includes(value) && multiple) return removeOption(value);
|
|
2543
|
-
this.tmpValue = value;
|
|
2544
|
-
if (value) values.push(value);
|
|
2545
|
-
var valueToReturn = multiple && value ? values : value;
|
|
2546
|
-
this.emitValues(valueToReturn);
|
|
2547
|
-
},
|
|
2548
|
-
focusSearchInput: function focusSearchInput() {
|
|
2549
|
-
var _this3 = this;
|
|
2550
|
-
|
|
2551
|
-
return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee3() {
|
|
2552
|
-
var SearchInput;
|
|
2553
|
-
return regenerator_default.a.wrap(function _callee3$(_context3) {
|
|
2554
|
-
while (1) {
|
|
2555
|
-
switch (_context3.prev = _context3.next) {
|
|
2556
|
-
case 0:
|
|
2557
|
-
_context3.next = 2;
|
|
2558
|
-
return _this3.$nextTick();
|
|
2559
|
-
|
|
2560
|
-
case 2:
|
|
2561
|
-
SearchInput = _this3.$refs.SearchInput;
|
|
2562
|
-
SearchInput.$el.querySelector('input').focus();
|
|
2563
|
-
|
|
2564
|
-
case 4:
|
|
2565
|
-
case "end":
|
|
2566
|
-
return _context3.stop();
|
|
2567
|
-
}
|
|
2568
|
-
}
|
|
2569
|
-
}, _callee3);
|
|
2570
|
-
}))();
|
|
2571
|
-
},
|
|
2572
|
-
emitValues: function emitValues(values, noReset) {
|
|
2573
|
-
var _this4 = this;
|
|
2574
|
-
|
|
2575
|
-
return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee4() {
|
|
2576
|
-
return regenerator_default.a.wrap(function _callee4$(_context4) {
|
|
2577
|
-
while (1) {
|
|
2578
|
-
switch (_context4.prev = _context4.next) {
|
|
2579
|
-
case 0:
|
|
2580
|
-
// return the select input
|
|
2581
|
-
// @arg the option value selected
|
|
2582
|
-
_this4.$emit('input', values);
|
|
2583
|
-
|
|
2584
|
-
if (!noReset) {
|
|
2585
|
-
_context4.next = 3;
|
|
2586
|
-
break;
|
|
2587
|
-
}
|
|
2588
|
-
|
|
2589
|
-
return _context4.abrupt("return");
|
|
2590
|
-
|
|
2591
|
-
case 3:
|
|
2592
|
-
_context4.next = 5;
|
|
2593
|
-
return _this4.$nextTick();
|
|
2594
|
-
|
|
2595
|
-
case 5:
|
|
2596
|
-
_this4.reset();
|
|
2597
|
-
|
|
2598
|
-
case 6:
|
|
2599
|
-
case "end":
|
|
2600
|
-
return _context4.stop();
|
|
2601
|
-
}
|
|
2602
|
-
}
|
|
2603
|
-
}, _callee4);
|
|
2604
|
-
}))();
|
|
2605
|
-
},
|
|
2606
|
-
scrollToSelectedOnFocus: function scrollToSelectedOnFocus(arrayIndex) {
|
|
2607
|
-
var _this5 = this;
|
|
2608
|
-
|
|
2609
|
-
return _asyncToGenerator( /*#__PURE__*/regenerator_default.a.mark(function _callee5() {
|
|
2610
|
-
return regenerator_default.a.wrap(function _callee5$(_context5) {
|
|
2611
|
-
while (1) {
|
|
2612
|
-
switch (_context5.prev = _context5.next) {
|
|
2613
|
-
case 0:
|
|
2614
|
-
_context5.next = 2;
|
|
2615
|
-
return _this5.$nextTick();
|
|
2616
|
-
|
|
2617
|
-
case 2:
|
|
2618
|
-
_this5.$refs.optionsList.scrollTop = arrayIndex * _this5.itemHeight - _this5.itemHeight * 3;
|
|
2619
|
-
|
|
2620
|
-
case 3:
|
|
2621
|
-
case "end":
|
|
2622
|
-
return _context5.stop();
|
|
2623
|
-
}
|
|
2624
|
-
}
|
|
2625
|
-
}, _callee5);
|
|
2626
|
-
}))();
|
|
2627
|
-
},
|
|
2628
|
-
keyboardNav: function keyboardNav(e) {
|
|
2629
|
-
var code = e.keyCode;
|
|
2630
|
-
var hasOpenList = this.hasOpenList,
|
|
2631
|
-
tmpValueIndex = this.tmpValueIndex,
|
|
2632
|
-
optionsShown = this.optionsShown,
|
|
2633
|
-
openList = this.openList,
|
|
2634
|
-
tmpValue = this.tmpValue,
|
|
2635
|
-
search = this.search,
|
|
2636
|
-
config = this.config;
|
|
2637
|
-
|
|
2638
|
-
if (code === 40 || code === 38) {
|
|
2639
|
-
e.preventDefault();
|
|
2640
|
-
if (!hasOpenList) openList();
|
|
2641
|
-
var index = code === 40 ? tmpValueIndex + 1 : tmpValueIndex - 1;
|
|
2642
|
-
|
|
2643
|
-
if (index === -1 || index >= optionsShown.length) {
|
|
2644
|
-
index = index === -1 ? optionsShown.length - 1 : 0;
|
|
2645
|
-
}
|
|
2646
|
-
|
|
2647
|
-
this.tmpValue = optionsShown[index][config.valueKey];
|
|
2648
|
-
this.scrollToSelectedOnFocus(index);
|
|
2649
|
-
} else if (code === 13) {
|
|
2650
|
-
// enter key
|
|
2651
|
-
e.preventDefault();
|
|
2652
|
-
hasOpenList ? this.updateValue(tmpValue) : this.openList();
|
|
2653
|
-
} else if (code === 27) {
|
|
2654
|
-
// escape key
|
|
2655
|
-
this.closeList();
|
|
2656
|
-
} else if (!search) {
|
|
2657
|
-
// typing an option's name
|
|
2658
|
-
this.searching(e);
|
|
2659
|
-
}
|
|
2660
|
-
},
|
|
2661
|
-
searching: function searching(e) {
|
|
2662
|
-
var _this6 = this;
|
|
2663
|
-
|
|
2664
|
-
var config = this.config,
|
|
2665
|
-
options = this.options;
|
|
2666
|
-
var code = e.keyCode;
|
|
2667
|
-
clearTimeout(queryTimer);
|
|
2668
|
-
var queryTimer = setTimeout(function () {
|
|
2669
|
-
_this6.query = '';
|
|
2670
|
-
}, 2000);
|
|
2671
|
-
var q = String.fromCharCode(code);
|
|
2672
|
-
|
|
2673
|
-
if (code === 8 && this.query !== '') {
|
|
2674
|
-
this.query = this.query.substring(0, this.query.length - 1);
|
|
2675
|
-
} else if (/[a-zA-Z-e ]/.test(q)) {
|
|
2676
|
-
if (!this.hasOpenList) this.openList();
|
|
2677
|
-
this.query += q.toLowerCase();
|
|
2678
|
-
var resultIndex = options.findIndex(function (o) {
|
|
2679
|
-
_this6.tmpValue = o[config.valueKey];
|
|
2680
|
-
return o[config.searchKey].toLowerCase().includes(_this6.query);
|
|
2681
|
-
});
|
|
2682
|
-
|
|
2683
|
-
if (resultIndex !== -1) {
|
|
2684
|
-
this.scrollToSelectedOnFocus(resultIndex);
|
|
2685
|
-
}
|
|
2686
|
-
}
|
|
2687
|
-
},
|
|
2688
|
-
searchInOptions: function searchInOptions(query) {
|
|
2689
|
-
var config = this.config,
|
|
2690
|
-
options = this.options;
|
|
2691
|
-
this.searchQuery = query === '' ? null : query;
|
|
2692
|
-
if (!this.searchQuery) return this.filteredOptions = options;
|
|
2693
|
-
var searchQuery = query.toLowerCase();
|
|
2694
|
-
var filteredOptions = options.filter(function (o) {
|
|
2695
|
-
return o[config.valueKey] && o[config.searchKey].toLowerCase().includes(searchQuery) || o[config.labelKey] && o[config.labelKey].includes(searchQuery);
|
|
2696
|
-
});
|
|
2697
|
-
this.tmpValue = filteredOptions.length ? filteredOptions[0][config.valueKey] : null;
|
|
2698
|
-
this.filteredOptions = filteredOptions;
|
|
2699
|
-
}
|
|
2700
|
-
}
|
|
2701
|
-
});
|
|
2702
|
-
// CONCATENATED MODULE: ./packages/components/MazSelect/_main.vue?vue&type=script&lang=js&
|
|
2703
|
-
/* harmony default export */ var MazSelect_mainvue_type_script_lang_js_ = (_mainvue_type_script_lang_js_);
|
|
2704
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
2705
|
-
var componentNormalizer = __webpack_require__(0);
|
|
2706
|
-
|
|
2707
|
-
// CONCATENATED MODULE: ./packages/components/MazSelect/_main.vue
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
/* normalize component */
|
|
2714
|
-
|
|
2715
|
-
var component = Object(componentNormalizer["a" /* default */])(
|
|
2716
|
-
MazSelect_mainvue_type_script_lang_js_,
|
|
2717
|
-
render,
|
|
2718
|
-
staticRenderFns,
|
|
2719
|
-
false,
|
|
2720
|
-
null,
|
|
2721
|
-
null,
|
|
2722
|
-
null
|
|
2723
|
-
|
|
2724
|
-
)
|
|
2725
|
-
|
|
2726
|
-
/* hot reload */
|
|
2727
|
-
if (false) { var api; }
|
|
2728
|
-
component.options.__file = "packages/components/MazSelect/_main.vue"
|
|
2729
|
-
/* harmony default export */ var _main = (component.exports);
|
|
2730
|
-
// CONCATENATED MODULE: ./packages/components/MazSelect/index.js
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
_main.install = function (Vue) {
|
|
2734
|
-
Vue.component(_main.name, _main);
|
|
2735
|
-
};
|
|
2736
|
-
|
|
2737
|
-
/* harmony default export */ var MazSelect = __webpack_exports__["default"] = (_main);
|
|
2738
|
-
|
|
2739
|
-
/***/ })
|
|
2740
|
-
/******/ ]);
|