@vue-interface/select-field 0.9.17 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/select-field.es.js +780 -0
- package/dist/select-field.umd.js +15 -0
- package/dist/style.css +1 -0
- package/index.js +5 -2
- package/package.json +28 -34
- package/src/SelectField.vue +97 -53
- package/.eslintrc.js +0 -53
- package/babel.config.js +0 -11
- package/dist/SelectField.common.js +0 -5079
- package/dist/SelectField.common.js.map +0 -1
- package/dist/SelectField.css +0 -1
- package/dist/SelectField.umd.js +0 -5089
- package/dist/SelectField.umd.js.map +0 -1
- package/dist/SelectField.umd.min.js +0 -2
- package/dist/SelectField.umd.min.js.map +0 -1
- package/dist/demo.html +0 -19
- package/docs/.vuepress/config.js +0 -44
- package/docs/.vuepress/dist/404.html +0 -19
- package/docs/.vuepress/dist/assets/css/0.styles.275ee968.css +0 -1
- package/docs/.vuepress/dist/assets/img/search.83621669.svg +0 -1
- package/docs/.vuepress/dist/assets/js/10.5d93d289.js +0 -1
- package/docs/.vuepress/dist/assets/js/11.97ab3884.js +0 -1
- package/docs/.vuepress/dist/assets/js/2.f3d148c3.js +0 -1
- package/docs/.vuepress/dist/assets/js/3.81681fff.js +0 -1
- package/docs/.vuepress/dist/assets/js/4.82fa7382.js +0 -1
- package/docs/.vuepress/dist/assets/js/5.3dae6ad4.js +0 -1
- package/docs/.vuepress/dist/assets/js/6.6a04f815.js +0 -1
- package/docs/.vuepress/dist/assets/js/7.c033cb49.js +0 -1
- package/docs/.vuepress/dist/assets/js/8.6d6eb599.js +0 -1
- package/docs/.vuepress/dist/assets/js/9.eaefe866.js +0 -1
- package/docs/.vuepress/dist/assets/js/app.7ed065d3.js +0 -13
- package/docs/.vuepress/dist/examples/index.html +0 -21
- package/docs/.vuepress/dist/examples/test.html +0 -17
- package/docs/.vuepress/dist/index.html +0 -53
- package/docs/.vuepress/dist/options.html +0 -41
- package/docs/.vuepress/dist/tailwindcss.html +0 -85
- package/docs/README.md +0 -17
- package/docs/examples/README.md +0 -3
- package/docs/options.md +0 -46
- package/docs/tailwindcss.md +0 -76
- package/index.html +0 -188
- package/main.vue +0 -8
- package/postcss.config.js +0 -1
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
- package/src/css/SelectField.css +0 -1
- package/tailwind.config.js +0 -22
- package/vue.config.js +0 -11
|
@@ -0,0 +1,780 @@
|
|
|
1
|
+
function _typeof(obj) {
|
|
2
|
+
"@babel/helpers - typeof";
|
|
3
|
+
return _typeof = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(obj2) {
|
|
4
|
+
return typeof obj2;
|
|
5
|
+
} : function(obj2) {
|
|
6
|
+
return obj2 && typeof Symbol == "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
|
|
7
|
+
}, _typeof(obj);
|
|
8
|
+
}
|
|
9
|
+
function _classCallCheck(instance, Constructor) {
|
|
10
|
+
if (!(instance instanceof Constructor)) {
|
|
11
|
+
throw new TypeError("Cannot call a class as a function");
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
function _defineProperties(target, props) {
|
|
15
|
+
for (var i = 0; i < props.length; i++) {
|
|
16
|
+
var descriptor = props[i];
|
|
17
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
18
|
+
descriptor.configurable = true;
|
|
19
|
+
if ("value" in descriptor)
|
|
20
|
+
descriptor.writable = true;
|
|
21
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
25
|
+
if (protoProps)
|
|
26
|
+
_defineProperties(Constructor.prototype, protoProps);
|
|
27
|
+
if (staticProps)
|
|
28
|
+
_defineProperties(Constructor, staticProps);
|
|
29
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
30
|
+
writable: false
|
|
31
|
+
});
|
|
32
|
+
return Constructor;
|
|
33
|
+
}
|
|
34
|
+
function _setPrototypeOf(o, p) {
|
|
35
|
+
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
|
|
36
|
+
o2.__proto__ = p2;
|
|
37
|
+
return o2;
|
|
38
|
+
};
|
|
39
|
+
return _setPrototypeOf(o, p);
|
|
40
|
+
}
|
|
41
|
+
function _isNativeReflectConstruct() {
|
|
42
|
+
if (typeof Reflect === "undefined" || !Reflect.construct)
|
|
43
|
+
return false;
|
|
44
|
+
if (Reflect.construct.sham)
|
|
45
|
+
return false;
|
|
46
|
+
if (typeof Proxy === "function")
|
|
47
|
+
return true;
|
|
48
|
+
try {
|
|
49
|
+
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
|
|
50
|
+
}));
|
|
51
|
+
return true;
|
|
52
|
+
} catch (e) {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function _construct(Parent, args, Class) {
|
|
57
|
+
if (_isNativeReflectConstruct()) {
|
|
58
|
+
_construct = Reflect.construct;
|
|
59
|
+
} else {
|
|
60
|
+
_construct = function _construct2(Parent2, args2, Class2) {
|
|
61
|
+
var a = [null];
|
|
62
|
+
a.push.apply(a, args2);
|
|
63
|
+
var Constructor = Function.bind.apply(Parent2, a);
|
|
64
|
+
var instance = new Constructor();
|
|
65
|
+
if (Class2)
|
|
66
|
+
_setPrototypeOf(instance, Class2.prototype);
|
|
67
|
+
return instance;
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return _construct.apply(null, arguments);
|
|
71
|
+
}
|
|
72
|
+
function _slicedToArray(arr, i) {
|
|
73
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
74
|
+
}
|
|
75
|
+
function _arrayWithHoles(arr) {
|
|
76
|
+
if (Array.isArray(arr))
|
|
77
|
+
return arr;
|
|
78
|
+
}
|
|
79
|
+
function _iterableToArrayLimit(arr, i) {
|
|
80
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
81
|
+
if (_i == null)
|
|
82
|
+
return;
|
|
83
|
+
var _arr = [];
|
|
84
|
+
var _n = true;
|
|
85
|
+
var _d = false;
|
|
86
|
+
var _s, _e;
|
|
87
|
+
try {
|
|
88
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
89
|
+
_arr.push(_s.value);
|
|
90
|
+
if (i && _arr.length === i)
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
} catch (err) {
|
|
94
|
+
_d = true;
|
|
95
|
+
_e = err;
|
|
96
|
+
} finally {
|
|
97
|
+
try {
|
|
98
|
+
if (!_n && _i["return"] != null)
|
|
99
|
+
_i["return"]();
|
|
100
|
+
} finally {
|
|
101
|
+
if (_d)
|
|
102
|
+
throw _e;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return _arr;
|
|
106
|
+
}
|
|
107
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
108
|
+
if (!o)
|
|
109
|
+
return;
|
|
110
|
+
if (typeof o === "string")
|
|
111
|
+
return _arrayLikeToArray(o, minLen);
|
|
112
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
113
|
+
if (n === "Object" && o.constructor)
|
|
114
|
+
n = o.constructor.name;
|
|
115
|
+
if (n === "Map" || n === "Set")
|
|
116
|
+
return Array.from(o);
|
|
117
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
118
|
+
return _arrayLikeToArray(o, minLen);
|
|
119
|
+
}
|
|
120
|
+
function _arrayLikeToArray(arr, len) {
|
|
121
|
+
if (len == null || len > arr.length)
|
|
122
|
+
len = arr.length;
|
|
123
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
124
|
+
arr2[i] = arr[i];
|
|
125
|
+
return arr2;
|
|
126
|
+
}
|
|
127
|
+
function _nonIterableRest() {
|
|
128
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
129
|
+
}
|
|
130
|
+
var _assign = function __assign() {
|
|
131
|
+
_assign = Object.assign || function __assign22(t) {
|
|
132
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
133
|
+
s = arguments[i];
|
|
134
|
+
for (var p in s) {
|
|
135
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
136
|
+
t[p] = s[p];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return t;
|
|
140
|
+
};
|
|
141
|
+
return _assign.apply(this, arguments);
|
|
142
|
+
};
|
|
143
|
+
function lowerCase$1(str) {
|
|
144
|
+
return str.toLowerCase();
|
|
145
|
+
}
|
|
146
|
+
var DEFAULT_SPLIT_REGEXP$1 = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
|
147
|
+
var DEFAULT_STRIP_REGEXP$1 = /[^A-Z0-9]+/gi;
|
|
148
|
+
function noCase$1(input, options) {
|
|
149
|
+
if (options === void 0) {
|
|
150
|
+
options = {};
|
|
151
|
+
}
|
|
152
|
+
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP$1 : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP$1 : _b, _c = options.transform, transform = _c === void 0 ? lowerCase$1 : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
|
|
153
|
+
var result = replace$1(replace$1(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
|
154
|
+
var start = 0;
|
|
155
|
+
var end = result.length;
|
|
156
|
+
while (result.charAt(start) === "\0") {
|
|
157
|
+
start++;
|
|
158
|
+
}
|
|
159
|
+
while (result.charAt(end - 1) === "\0") {
|
|
160
|
+
end--;
|
|
161
|
+
}
|
|
162
|
+
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
163
|
+
}
|
|
164
|
+
function replace$1(input, re, value) {
|
|
165
|
+
if (re instanceof RegExp)
|
|
166
|
+
return input.replace(re, value);
|
|
167
|
+
return re.reduce(function(input2, re2) {
|
|
168
|
+
return input2.replace(re2, value);
|
|
169
|
+
}, input);
|
|
170
|
+
}
|
|
171
|
+
function dotCase$1(input, options) {
|
|
172
|
+
if (options === void 0) {
|
|
173
|
+
options = {};
|
|
174
|
+
}
|
|
175
|
+
return noCase$1(input, _assign({
|
|
176
|
+
delimiter: "."
|
|
177
|
+
}, options));
|
|
178
|
+
}
|
|
179
|
+
function paramCase$1(input, options) {
|
|
180
|
+
if (options === void 0) {
|
|
181
|
+
options = {};
|
|
182
|
+
}
|
|
183
|
+
return dotCase$1(input, _assign({
|
|
184
|
+
delimiter: "-"
|
|
185
|
+
}, options));
|
|
186
|
+
}
|
|
187
|
+
var ComponentRegistry = /* @__PURE__ */ function() {
|
|
188
|
+
function ComponentRegistry2() {
|
|
189
|
+
var _this = this;
|
|
190
|
+
var components = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
191
|
+
_classCallCheck(this, ComponentRegistry2);
|
|
192
|
+
this.components = {};
|
|
193
|
+
Object.entries(components).forEach(function(_ref) {
|
|
194
|
+
var _ref2 = _slicedToArray(_ref, 2), key = _ref2[0], value = _ref2[1];
|
|
195
|
+
_this.register(key, value);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
_createClass(ComponentRegistry2, [{
|
|
199
|
+
key: "validate",
|
|
200
|
+
value: function validate(value) {
|
|
201
|
+
if (_typeof(value) === "object" || typeof value === "function") {
|
|
202
|
+
return value;
|
|
203
|
+
}
|
|
204
|
+
throw new Error("Invalid data type `".concat(_typeof(value), "`. Should be type `object` or `function`."));
|
|
205
|
+
}
|
|
206
|
+
}, {
|
|
207
|
+
key: "get",
|
|
208
|
+
value: function get(name) {
|
|
209
|
+
var match = this.components[name = paramCase$1(name)];
|
|
210
|
+
if (match) {
|
|
211
|
+
return match;
|
|
212
|
+
}
|
|
213
|
+
throw new Error('"'.concat(name, '" has not been registered yet!'));
|
|
214
|
+
}
|
|
215
|
+
}, {
|
|
216
|
+
key: "register",
|
|
217
|
+
value: function register(name, value) {
|
|
218
|
+
var _this2 = this;
|
|
219
|
+
if (_typeof(name) === "object") {
|
|
220
|
+
Object.entries(name).forEach(function(_ref3) {
|
|
221
|
+
var _ref4 = _slicedToArray(_ref3, 2), name2 = _ref4[0], module = _ref4[1];
|
|
222
|
+
_this2.register(paramCase$1(name2), module);
|
|
223
|
+
});
|
|
224
|
+
return this;
|
|
225
|
+
}
|
|
226
|
+
this.components[paramCase$1(name)] = this.validate(value);
|
|
227
|
+
return this;
|
|
228
|
+
}
|
|
229
|
+
}, {
|
|
230
|
+
key: "remove",
|
|
231
|
+
value: function remove(name) {
|
|
232
|
+
delete this.components[paramCase$1(name)];
|
|
233
|
+
return this;
|
|
234
|
+
}
|
|
235
|
+
}, {
|
|
236
|
+
key: "reset",
|
|
237
|
+
value: function reset() {
|
|
238
|
+
this.components = {};
|
|
239
|
+
return this;
|
|
240
|
+
}
|
|
241
|
+
}]);
|
|
242
|
+
return ComponentRegistry2;
|
|
243
|
+
}();
|
|
244
|
+
function factory() {
|
|
245
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
246
|
+
args[_key] = arguments[_key];
|
|
247
|
+
}
|
|
248
|
+
return _construct(ComponentRegistry, args);
|
|
249
|
+
}
|
|
250
|
+
const registry = factory();
|
|
251
|
+
var render$1 = function() {
|
|
252
|
+
var _vm = this;
|
|
253
|
+
var _h = _vm.$createElement;
|
|
254
|
+
var _c = _vm._self._c || _h;
|
|
255
|
+
return _c("div", { staticClass: "activity-indicator", class: _vm.classes, style: _vm.style }, [_c("div", { staticClass: "activity-indicator-content" }, [_c(_vm.component, { tag: "component", staticClass: "mx-auto" }), _vm.label ? _c("div", { staticClass: "activity-indicator-label" }, [_vm._v(" " + _vm._s(_vm.label) + " ")]) : _vm._e()], 1)]);
|
|
256
|
+
};
|
|
257
|
+
var staticRenderFns$1 = [];
|
|
258
|
+
var ActivityIndicator_vue_vue_type_style_index_0_lang = "";
|
|
259
|
+
function normalizeComponent(scriptExports, render2, staticRenderFns2, functionalTemplate, injectStyles, scopeId, moduleIdentifier, shadowMode) {
|
|
260
|
+
var options = typeof scriptExports === "function" ? scriptExports.options : scriptExports;
|
|
261
|
+
if (render2) {
|
|
262
|
+
options.render = render2;
|
|
263
|
+
options.staticRenderFns = staticRenderFns2;
|
|
264
|
+
options._compiled = true;
|
|
265
|
+
}
|
|
266
|
+
if (functionalTemplate) {
|
|
267
|
+
options.functional = true;
|
|
268
|
+
}
|
|
269
|
+
if (scopeId) {
|
|
270
|
+
options._scopeId = "data-v-" + scopeId;
|
|
271
|
+
}
|
|
272
|
+
var hook;
|
|
273
|
+
if (moduleIdentifier) {
|
|
274
|
+
hook = function(context) {
|
|
275
|
+
context = context || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext;
|
|
276
|
+
if (!context && typeof __VUE_SSR_CONTEXT__ !== "undefined") {
|
|
277
|
+
context = __VUE_SSR_CONTEXT__;
|
|
278
|
+
}
|
|
279
|
+
if (injectStyles) {
|
|
280
|
+
injectStyles.call(this, context);
|
|
281
|
+
}
|
|
282
|
+
if (context && context._registeredComponents) {
|
|
283
|
+
context._registeredComponents.add(moduleIdentifier);
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
options._ssrRegister = hook;
|
|
287
|
+
} else if (injectStyles) {
|
|
288
|
+
hook = shadowMode ? function() {
|
|
289
|
+
injectStyles.call(this, (options.functional ? this.parent : this).$root.$options.shadowRoot);
|
|
290
|
+
} : injectStyles;
|
|
291
|
+
}
|
|
292
|
+
if (hook) {
|
|
293
|
+
if (options.functional) {
|
|
294
|
+
options._injectStyles = hook;
|
|
295
|
+
var originalRender = options.render;
|
|
296
|
+
options.render = function renderWithStyleInjection(h, context) {
|
|
297
|
+
hook.call(context);
|
|
298
|
+
return originalRender(h, context);
|
|
299
|
+
};
|
|
300
|
+
} else {
|
|
301
|
+
var existing = options.beforeCreate;
|
|
302
|
+
options.beforeCreate = existing ? [].concat(existing, hook) : [hook];
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
return {
|
|
306
|
+
exports: scriptExports,
|
|
307
|
+
options
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function unit(value, uom = "px") {
|
|
311
|
+
return value !== null && value !== void 0 && value !== false && isFinite(value) ? `${value}${uom}` : value;
|
|
312
|
+
}
|
|
313
|
+
const __vue2_script$1 = {
|
|
314
|
+
name: "ActivityIndicator",
|
|
315
|
+
props: {
|
|
316
|
+
absolute: Boolean,
|
|
317
|
+
center: Boolean,
|
|
318
|
+
label: String,
|
|
319
|
+
size: {
|
|
320
|
+
type: String,
|
|
321
|
+
default: "md"
|
|
322
|
+
},
|
|
323
|
+
registry: {
|
|
324
|
+
type: ComponentRegistry,
|
|
325
|
+
default() {
|
|
326
|
+
return registry;
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
type: {
|
|
330
|
+
type: String,
|
|
331
|
+
required: true
|
|
332
|
+
},
|
|
333
|
+
height: [String, Number],
|
|
334
|
+
maxHeight: [String, Number],
|
|
335
|
+
minHeight: [String, Number],
|
|
336
|
+
width: [String, Number],
|
|
337
|
+
maxWidth: [String, Number],
|
|
338
|
+
minWidth: [String, Number]
|
|
339
|
+
},
|
|
340
|
+
computed: {
|
|
341
|
+
classes() {
|
|
342
|
+
return {
|
|
343
|
+
"activity-indicator-center": this.center,
|
|
344
|
+
"activity-indicator-absolute": this.absolute,
|
|
345
|
+
[this.size && `activity-indicator-${this.size}`]: !!this.size
|
|
346
|
+
};
|
|
347
|
+
},
|
|
348
|
+
style() {
|
|
349
|
+
return {
|
|
350
|
+
width: unit(this.width),
|
|
351
|
+
maxWidth: unit(this.maxWidth),
|
|
352
|
+
minWidth: unit(this.minWidth),
|
|
353
|
+
height: unit(this.height),
|
|
354
|
+
maxHeight: unit(this.maxHeight),
|
|
355
|
+
minHeight: unit(this.minHeight)
|
|
356
|
+
};
|
|
357
|
+
},
|
|
358
|
+
component() {
|
|
359
|
+
return () => {
|
|
360
|
+
const component = registry.get(this.type);
|
|
361
|
+
if (component instanceof Promise) {
|
|
362
|
+
return component;
|
|
363
|
+
}
|
|
364
|
+
if (typeof component === "function") {
|
|
365
|
+
return component();
|
|
366
|
+
}
|
|
367
|
+
return Promise.resolve(component);
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
};
|
|
372
|
+
const __cssModules$1 = {};
|
|
373
|
+
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, null, null, null);
|
|
374
|
+
function __vue2_injectStyles$1(context) {
|
|
375
|
+
for (let o in __cssModules$1) {
|
|
376
|
+
this[o] = __cssModules$1[o];
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
var ActivityIndicator = /* @__PURE__ */ function() {
|
|
380
|
+
return __component__$1.exports;
|
|
381
|
+
}();
|
|
382
|
+
var Chase_vue_vue_type_style_index_0_lang = "";
|
|
383
|
+
var CircleFade_vue_vue_type_style_index_0_lang = "";
|
|
384
|
+
var CircleOrbit_vue_vue_type_style_index_0_lang = "";
|
|
385
|
+
var CircleTrail_vue_vue_type_style_index_0_lang = "";
|
|
386
|
+
var Dots_vue_vue_type_style_index_0_lang = "";
|
|
387
|
+
var DoublePulse_vue_vue_type_style_index_0_lang = "";
|
|
388
|
+
var Facebook_vue_vue_type_style_index_0_lang = "";
|
|
389
|
+
var Grid_vue_vue_type_style_index_0_lang = "";
|
|
390
|
+
var Pulse_vue_vue_type_style_index_0_lang = "";
|
|
391
|
+
var Spinner_vue_vue_type_style_index_0_lang = "";
|
|
392
|
+
var Spotify_vue_vue_type_style_index_0_lang = "";
|
|
393
|
+
var Square_vue_vue_type_style_index_0_lang = "";
|
|
394
|
+
var SquareFold_vue_vue_type_style_index_0_lang = "";
|
|
395
|
+
var SquareOrbit_vue_vue_type_style_index_0_lang = "";
|
|
396
|
+
var Shadowable = {
|
|
397
|
+
props: {
|
|
398
|
+
dropShadow: [Boolean, String],
|
|
399
|
+
dropShadowableClassPrefix: {
|
|
400
|
+
type: String,
|
|
401
|
+
default: "drop-shadow"
|
|
402
|
+
},
|
|
403
|
+
shadow: [Boolean, String],
|
|
404
|
+
shadowableClassPrefix: {
|
|
405
|
+
type: String,
|
|
406
|
+
default: "shadow"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
computed: {
|
|
410
|
+
shadowableClass() {
|
|
411
|
+
const dropShadowClassName = this.dropShadow === true ? "" : this.dropShadow && `-${this.dropShadow}`;
|
|
412
|
+
const shadowClassName = this.shadow === true ? "" : this.shadow && `-${this.shadow}`;
|
|
413
|
+
return {
|
|
414
|
+
[`${this.dropShadowableClassPrefix}${dropShadowClassName}`]: !!this.dropShadow,
|
|
415
|
+
[`${this.shadowableClassPrefix}${shadowClassName}`]: !!this.shadow
|
|
416
|
+
};
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
/*! *****************************************************************************
|
|
421
|
+
Copyright (c) Microsoft Corporation.
|
|
422
|
+
|
|
423
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
424
|
+
purpose with or without fee is hereby granted.
|
|
425
|
+
|
|
426
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
427
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
428
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
429
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
430
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
431
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
432
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
433
|
+
***************************************************************************** */
|
|
434
|
+
var __assign2 = function() {
|
|
435
|
+
__assign2 = Object.assign || function __assign3(t) {
|
|
436
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
437
|
+
s = arguments[i];
|
|
438
|
+
for (var p in s)
|
|
439
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
440
|
+
t[p] = s[p];
|
|
441
|
+
}
|
|
442
|
+
return t;
|
|
443
|
+
};
|
|
444
|
+
return __assign2.apply(this, arguments);
|
|
445
|
+
};
|
|
446
|
+
function lowerCase(str) {
|
|
447
|
+
return str.toLowerCase();
|
|
448
|
+
}
|
|
449
|
+
var DEFAULT_SPLIT_REGEXP = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g];
|
|
450
|
+
var DEFAULT_STRIP_REGEXP = /[^A-Z0-9]+/gi;
|
|
451
|
+
function noCase(input, options) {
|
|
452
|
+
if (options === void 0) {
|
|
453
|
+
options = {};
|
|
454
|
+
}
|
|
455
|
+
var _a = options.splitRegexp, splitRegexp = _a === void 0 ? DEFAULT_SPLIT_REGEXP : _a, _b = options.stripRegexp, stripRegexp = _b === void 0 ? DEFAULT_STRIP_REGEXP : _b, _c = options.transform, transform = _c === void 0 ? lowerCase : _c, _d = options.delimiter, delimiter = _d === void 0 ? " " : _d;
|
|
456
|
+
var result = replace(replace(input, splitRegexp, "$1\0$2"), stripRegexp, "\0");
|
|
457
|
+
var start = 0;
|
|
458
|
+
var end = result.length;
|
|
459
|
+
while (result.charAt(start) === "\0")
|
|
460
|
+
start++;
|
|
461
|
+
while (result.charAt(end - 1) === "\0")
|
|
462
|
+
end--;
|
|
463
|
+
return result.slice(start, end).split("\0").map(transform).join(delimiter);
|
|
464
|
+
}
|
|
465
|
+
function replace(input, re, value) {
|
|
466
|
+
if (re instanceof RegExp)
|
|
467
|
+
return input.replace(re, value);
|
|
468
|
+
return re.reduce(function(input2, re2) {
|
|
469
|
+
return input2.replace(re2, value);
|
|
470
|
+
}, input);
|
|
471
|
+
}
|
|
472
|
+
function dotCase(input, options) {
|
|
473
|
+
if (options === void 0) {
|
|
474
|
+
options = {};
|
|
475
|
+
}
|
|
476
|
+
return noCase(input, __assign2({
|
|
477
|
+
delimiter: "."
|
|
478
|
+
}, options));
|
|
479
|
+
}
|
|
480
|
+
function paramCase(input, options) {
|
|
481
|
+
if (options === void 0) {
|
|
482
|
+
options = {};
|
|
483
|
+
}
|
|
484
|
+
return dotCase(input, __assign2({
|
|
485
|
+
delimiter: "-"
|
|
486
|
+
}, options));
|
|
487
|
+
}
|
|
488
|
+
function prefix(key, value, delimeter = "-") {
|
|
489
|
+
const string = value.toString().replace(new RegExp(`^${key}${delimeter}?`), "");
|
|
490
|
+
return [paramCase(string), key].filter((value2) => !!value2).join(delimeter);
|
|
491
|
+
}
|
|
492
|
+
function isObject(subject) {
|
|
493
|
+
return !Array.isArray(subject) && typeof subject === "object";
|
|
494
|
+
}
|
|
495
|
+
var FormControl = {
|
|
496
|
+
directives: {
|
|
497
|
+
bindEvents: {
|
|
498
|
+
bind(el, binding, vnode) {
|
|
499
|
+
el.addEventListener("focus", () => {
|
|
500
|
+
vnode.context.hasFocus = true;
|
|
501
|
+
});
|
|
502
|
+
el.addEventListener("blur", () => {
|
|
503
|
+
vnode.context.hasFocus = false;
|
|
504
|
+
});
|
|
505
|
+
el.addEventListener(el.tagName === "SELECT" ? "change" : "input", (e) => {
|
|
506
|
+
vnode.context.isEmpty = !el.value;
|
|
507
|
+
vnode.context.currentValue = el.value;
|
|
508
|
+
});
|
|
509
|
+
vnode.context.hasChanged = !!el.value;
|
|
510
|
+
vnode.context.bindEvents.forEach((name) => {
|
|
511
|
+
el.addEventListener(name, (event) => {
|
|
512
|
+
vnode.context.$emit(name, event);
|
|
513
|
+
});
|
|
514
|
+
});
|
|
515
|
+
if (el.tagName === "SELECT") {
|
|
516
|
+
const opt = el.querySelector('[value=""]');
|
|
517
|
+
if (opt && opt.value === el.value) {
|
|
518
|
+
vnode.context.defaultEmpty = true;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
},
|
|
524
|
+
mixins: [Shadowable],
|
|
525
|
+
inheritAttrs: false,
|
|
526
|
+
props: {
|
|
527
|
+
activity: {
|
|
528
|
+
type: Boolean,
|
|
529
|
+
default: false
|
|
530
|
+
},
|
|
531
|
+
bindEvents: {
|
|
532
|
+
type: Array,
|
|
533
|
+
default() {
|
|
534
|
+
return ["focus", "blur", "change", "click", "keypress", "keyup", "keydown", "progress", "paste"];
|
|
535
|
+
}
|
|
536
|
+
},
|
|
537
|
+
componentName: {
|
|
538
|
+
type: String,
|
|
539
|
+
default() {
|
|
540
|
+
return this.$options.name;
|
|
541
|
+
}
|
|
542
|
+
},
|
|
543
|
+
defaultControlClass: {
|
|
544
|
+
type: String,
|
|
545
|
+
default: "form-control"
|
|
546
|
+
},
|
|
547
|
+
defaultValue: {
|
|
548
|
+
default: null
|
|
549
|
+
},
|
|
550
|
+
error: [String, Array, Boolean],
|
|
551
|
+
errors: {
|
|
552
|
+
type: [Array, Object, Boolean],
|
|
553
|
+
default() {
|
|
554
|
+
return {};
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
feedback: [String, Array],
|
|
558
|
+
group: {
|
|
559
|
+
type: Boolean,
|
|
560
|
+
default: true
|
|
561
|
+
},
|
|
562
|
+
helpText: [Number, String],
|
|
563
|
+
hideLabel: Boolean,
|
|
564
|
+
indicator: {
|
|
565
|
+
type: String,
|
|
566
|
+
default: "spinner"
|
|
567
|
+
},
|
|
568
|
+
indicatorSize: String,
|
|
569
|
+
inline: Boolean,
|
|
570
|
+
invalid: Boolean,
|
|
571
|
+
label: [Number, String],
|
|
572
|
+
labelClass: {
|
|
573
|
+
type: [Object, String],
|
|
574
|
+
default: "form-label"
|
|
575
|
+
},
|
|
576
|
+
pill: Boolean,
|
|
577
|
+
plaintext: Boolean,
|
|
578
|
+
size: String,
|
|
579
|
+
spacing: String,
|
|
580
|
+
valid: Boolean,
|
|
581
|
+
value: {
|
|
582
|
+
default: null
|
|
583
|
+
}
|
|
584
|
+
},
|
|
585
|
+
data() {
|
|
586
|
+
return {
|
|
587
|
+
currentValue: this.value || this.defaultValue,
|
|
588
|
+
defaultEmpty: false,
|
|
589
|
+
hasChanged: false,
|
|
590
|
+
hasFocus: false,
|
|
591
|
+
isEmpty: !(this.value || this.defaultValue)
|
|
592
|
+
};
|
|
593
|
+
},
|
|
594
|
+
computed: {
|
|
595
|
+
id() {
|
|
596
|
+
return this.$attrs.id || this.$attrs.name;
|
|
597
|
+
},
|
|
598
|
+
controlAttributes() {
|
|
599
|
+
return Object.keys(this.$attrs).concat([["id", this.id], ["class", this.controlClasses]]).reduce((carry, key) => {
|
|
600
|
+
if (Array.isArray(key)) {
|
|
601
|
+
carry[key[0]] = key[1];
|
|
602
|
+
} else {
|
|
603
|
+
carry[key] = this[key] || this.$attrs[key];
|
|
604
|
+
}
|
|
605
|
+
return carry;
|
|
606
|
+
}, {});
|
|
607
|
+
},
|
|
608
|
+
controlClass() {
|
|
609
|
+
return this.defaultControlClass;
|
|
610
|
+
},
|
|
611
|
+
controlSizeClass() {
|
|
612
|
+
return prefix(this.size, this.controlClass);
|
|
613
|
+
},
|
|
614
|
+
formGroupClasses() {
|
|
615
|
+
return {
|
|
616
|
+
[paramCase(this.componentName)]: !!this.componentName,
|
|
617
|
+
[this.size && prefix(this.size, this.componentName)]: !!this.size,
|
|
618
|
+
"default-empty": this.defaultEmpty,
|
|
619
|
+
"form-group": this.group,
|
|
620
|
+
[this.size && prefix(this.size, "form-group")]: !!this.size,
|
|
621
|
+
"has-activity": this.activity,
|
|
622
|
+
"has-changed": this.hasChanged,
|
|
623
|
+
"has-focus": this.hasFocus,
|
|
624
|
+
"has-icon": !!this.$slots.icon,
|
|
625
|
+
"is-empty": this.isEmpty,
|
|
626
|
+
"is-invalid": !!(this.invalid || this.invalidFeedback),
|
|
627
|
+
"is-valid": !!(this.valid || this.validFeedback)
|
|
628
|
+
};
|
|
629
|
+
},
|
|
630
|
+
controlClasses() {
|
|
631
|
+
return Object.assign({
|
|
632
|
+
[this.controlClass]: !!this.controlClass,
|
|
633
|
+
[this.controlSizeClass]: !!this.controlSizeClass,
|
|
634
|
+
"form-control-icon": !!this.$slots.icon,
|
|
635
|
+
"is-valid": !!(this.valid || this.validFeedback),
|
|
636
|
+
"is-invalid": !!(this.invalid || this.invalidFeedback),
|
|
637
|
+
[this.pillClasses]: this.pill,
|
|
638
|
+
[this.plaintextClass]: this.plaintext,
|
|
639
|
+
[this.spacing]: !!this.spacing
|
|
640
|
+
}, this.shadowableClass);
|
|
641
|
+
},
|
|
642
|
+
hasDefaultSlot() {
|
|
643
|
+
return !!this.$slots.default;
|
|
644
|
+
},
|
|
645
|
+
invalidFeedback() {
|
|
646
|
+
if (this.error === "") {
|
|
647
|
+
return null;
|
|
648
|
+
}
|
|
649
|
+
if (this.error) {
|
|
650
|
+
return this.error;
|
|
651
|
+
}
|
|
652
|
+
const errors = this.getFieldErrors();
|
|
653
|
+
return Array.isArray(errors) ? errors.filter((error) => {
|
|
654
|
+
return error && typeof error === "string";
|
|
655
|
+
}).join("<br>") : errors;
|
|
656
|
+
},
|
|
657
|
+
pillClasses() {
|
|
658
|
+
return "rounded rounded-pill";
|
|
659
|
+
},
|
|
660
|
+
plaintextClass() {
|
|
661
|
+
return "form-control-plaintext";
|
|
662
|
+
},
|
|
663
|
+
validFeedback() {
|
|
664
|
+
return Array.isArray(this.feedback) ? this.feedback.join("<br>") : this.feedback;
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
watch: {
|
|
668
|
+
hasFocus() {
|
|
669
|
+
if (this.shouldChangeOnFocus()) {
|
|
670
|
+
this.hasChanged = true;
|
|
671
|
+
}
|
|
672
|
+
},
|
|
673
|
+
value(value) {
|
|
674
|
+
this.currentValue = value;
|
|
675
|
+
},
|
|
676
|
+
currentValue() {
|
|
677
|
+
this.hasChanged = true;
|
|
678
|
+
},
|
|
679
|
+
defaultEmpty() {
|
|
680
|
+
this.hasChanged = true;
|
|
681
|
+
}
|
|
682
|
+
},
|
|
683
|
+
mounted() {
|
|
684
|
+
if (this.value === null && this.defaultValue !== null) {
|
|
685
|
+
this.$emit("input", this.defaultValue);
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
methods: {
|
|
689
|
+
blur() {
|
|
690
|
+
if (this.getInputField()) {
|
|
691
|
+
this.getInputField().blur();
|
|
692
|
+
}
|
|
693
|
+
},
|
|
694
|
+
focus() {
|
|
695
|
+
if (this.getInputField()) {
|
|
696
|
+
this.getInputField().focus();
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
getInputField() {
|
|
700
|
+
return this.$el.querySelector(".form-control, input, select, textarea");
|
|
701
|
+
},
|
|
702
|
+
getFieldErrors() {
|
|
703
|
+
let errors = this.error || this.errors;
|
|
704
|
+
if (isObject(this.errors)) {
|
|
705
|
+
errors = this.errors[this.$attrs.name || this.$attrs.id];
|
|
706
|
+
}
|
|
707
|
+
return !errors || Array.isArray(errors) || isObject(errors) ? errors : [errors];
|
|
708
|
+
},
|
|
709
|
+
shouldChangeOnFocus() {
|
|
710
|
+
return !this.getInputField().readOnly;
|
|
711
|
+
},
|
|
712
|
+
onInput(e) {
|
|
713
|
+
this.$emit("input", e.target.value);
|
|
714
|
+
this.$emit("update:value", e.target.value);
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
};
|
|
718
|
+
var render = function() {
|
|
719
|
+
var _vm = this;
|
|
720
|
+
var _h = _vm.$createElement;
|
|
721
|
+
var _c = _vm._self._c || _h;
|
|
722
|
+
return _c("div", { class: _vm.formGroupClasses }, [_vm._t("label", function() {
|
|
723
|
+
return [_vm.label ? _c("label", { ref: "label", class: _vm.labelClass, attrs: { "for": _vm.id }, domProps: { "innerHTML": _vm._s(_vm.label) }, on: { "click": _vm.focus } }) : _vm._e()];
|
|
724
|
+
}), _c("div", { staticClass: "form-group-inner" }, [_vm._t("control", function() {
|
|
725
|
+
var _obj;
|
|
726
|
+
return [_vm.$slots.icon ? _c("div", { staticClass: "form-group-inner-icon", on: { "click": _vm.focus } }, [_vm._t("icon")], 2) : _vm._e(), _c("select", _vm._b({ directives: [{ name: "bind-events", rawName: "v-bind-events" }], ref: "field", domProps: { "value": _vm.currentValue }, on: { "input": _vm.onInput } }, "select", Object.assign((_obj = {}, _obj["disabled"] = _vm.$attrs.readonly, _obj), _vm.controlAttributes), false), [_vm._t("default")], 2)];
|
|
727
|
+
}), _vm._t("activity", function() {
|
|
728
|
+
return [_c("transition", { attrs: { "name": "select-field-fade" } }, [_vm.activity ? _c("activity-indicator", { key: "activity", ref: "activity", attrs: { "type": _vm.indicator, "size": _vm.indicatorSize || _vm.size } }) : _vm._e()], 1)];
|
|
729
|
+
})], 2), _vm._t("feedback", function() {
|
|
730
|
+
return [_vm.invalidFeedback ? _c("div", { staticClass: "invalid-feedback", attrs: { "invalid": "" }, domProps: { "innerHTML": _vm._s(_vm.invalidFeedback) } }) : _vm.validFeedback ? _c("div", { staticClass: "valid-feedback", attrs: { "valid": "" }, domProps: { "innerHTML": _vm._s(_vm.validFeedback) } }) : _vm._e()];
|
|
731
|
+
}), _vm._t("help", function() {
|
|
732
|
+
return [_vm.helpText ? _c("small", { ref: "help" }, [_vm._v(" " + _vm._s(_vm.helpText) + " ")]) : _vm._e()];
|
|
733
|
+
})], 2);
|
|
734
|
+
};
|
|
735
|
+
var staticRenderFns = [];
|
|
736
|
+
var SelectField_vue_vue_type_style_index_0_lang = "";
|
|
737
|
+
const __vue2_script = {
|
|
738
|
+
name: "SelectField",
|
|
739
|
+
components: {
|
|
740
|
+
ActivityIndicator
|
|
741
|
+
},
|
|
742
|
+
mixins: [
|
|
743
|
+
FormControl
|
|
744
|
+
],
|
|
745
|
+
props: {
|
|
746
|
+
defaultControlClass: {
|
|
747
|
+
type: String,
|
|
748
|
+
default: "form-select"
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
computed: {
|
|
752
|
+
controlClass() {
|
|
753
|
+
return this.plaintext ? `${this.defaultControlClass}-plaintext` : this.defaultControlClass;
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
mounted() {
|
|
757
|
+
const selected = this.$el.querySelector("[selected]");
|
|
758
|
+
if (selected) {
|
|
759
|
+
this.currentValue = selected.value;
|
|
760
|
+
this.$emit("input", this.currentValue);
|
|
761
|
+
this.$emit("update:value", this.currentValue);
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
methods: {
|
|
765
|
+
shouldChangeOnFocus() {
|
|
766
|
+
return false;
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
};
|
|
770
|
+
const __cssModules = {};
|
|
771
|
+
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);
|
|
772
|
+
function __vue2_injectStyles(context) {
|
|
773
|
+
for (let o in __cssModules) {
|
|
774
|
+
this[o] = __cssModules[o];
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
var SelectField = /* @__PURE__ */ function() {
|
|
778
|
+
return __component__.exports;
|
|
779
|
+
}();
|
|
780
|
+
export { SelectField };
|