ablok-components 0.0.18 → 0.0.21
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/ablok-components.es.js +181 -656
- package/dist/ablok-components.umd.js +4 -9
- package/dist/components/base-input.vue.d.ts +2 -2
- package/dist/components/check-group.vue.d.ts +3 -3
- package/dist/components/input-dropdown.vue.d.ts +141 -0
- package/dist/components/radio-group.vue.d.ts +3 -3
- package/dist/components/{base-icon.vue.d.ts → svg-icon.vue.d.ts} +21 -3
- package/dist/index.d.ts +2 -2
- package/dist/main.d.ts +2 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/store/index.d.ts +0 -26
|
@@ -1,9 +1,22 @@
|
|
|
1
|
-
import { defineComponent,
|
|
2
|
-
var
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, computed, resolveComponent, createBlock, createCommentVNode, unref, toDisplayString, withDirectives, isRef, vModelDynamic, createTextVNode, ref, watch, onBeforeMount, Fragment, renderList, withModifiers } from "vue";
|
|
2
|
+
var svgIcon_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}\n")();
|
|
3
|
+
const _hoisted_1$6 = {
|
|
4
|
+
class: "icon",
|
|
5
|
+
preserveAspectRatio: "xMaxYMin"
|
|
6
|
+
};
|
|
7
|
+
const _hoisted_2$5 = ["xlink:href"];
|
|
3
8
|
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
4
|
-
__name: "
|
|
9
|
+
__name: "svg-icon",
|
|
5
10
|
props: {
|
|
6
|
-
|
|
11
|
+
basePath: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "/static/symbol-defs.svg"
|
|
14
|
+
},
|
|
15
|
+
prefix: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: "icon-"
|
|
18
|
+
},
|
|
19
|
+
symbol: {
|
|
7
20
|
type: String,
|
|
8
21
|
default: ""
|
|
9
22
|
},
|
|
@@ -14,16 +27,19 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
14
27
|
},
|
|
15
28
|
setup(__props) {
|
|
16
29
|
return (_ctx, _cache) => {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[`base-icon--${__props.size}`]: __props.size
|
|
30
|
+
return openBlock(), createElementBlock("i", {
|
|
31
|
+
class: normalizeClass(["svg-icon", {
|
|
32
|
+
[`svg-icon--${__props.size}`]: __props.size
|
|
21
33
|
}])
|
|
22
34
|
}, [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
(openBlock(), createElementBlock("svg", _hoisted_1$6, [
|
|
36
|
+
createElementVNode("use", {
|
|
37
|
+
"xlink:href": `${__props.basePath}#${__props.prefix}${__props.symbol}`,
|
|
38
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
39
|
+
x: "0",
|
|
40
|
+
y: "0"
|
|
41
|
+
}, null, 8, _hoisted_2$5)
|
|
42
|
+
]))
|
|
27
43
|
], 2);
|
|
28
44
|
};
|
|
29
45
|
}
|
|
@@ -31,7 +47,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
31
47
|
var loadingSpinner_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".loading-spinner{min-width:2rem}\n")();
|
|
32
48
|
const _hoisted_1$5 = { class: "loading-spinner d-block" };
|
|
33
49
|
const _hoisted_2$4 = { class: "loading-spinner__animation" };
|
|
34
|
-
const _hoisted_3$
|
|
50
|
+
const _hoisted_3$2 = {
|
|
35
51
|
class: "d-block",
|
|
36
52
|
version: "1.1",
|
|
37
53
|
id: "L9",
|
|
@@ -43,8 +59,8 @@ const _hoisted_3$1 = {
|
|
|
43
59
|
"enable-background": "new 0 0 0 0",
|
|
44
60
|
"xml:space": "preserve"
|
|
45
61
|
};
|
|
46
|
-
const _hoisted_4 = ["fill"];
|
|
47
|
-
const _hoisted_5 = /* @__PURE__ */ createElementVNode("animateTransform", {
|
|
62
|
+
const _hoisted_4$2 = ["fill"];
|
|
63
|
+
const _hoisted_5$1 = /* @__PURE__ */ createElementVNode("animateTransform", {
|
|
48
64
|
attributeName: "transform",
|
|
49
65
|
attributeType: "XML",
|
|
50
66
|
type: "rotate",
|
|
@@ -53,8 +69,8 @@ const _hoisted_5 = /* @__PURE__ */ createElementVNode("animateTransform", {
|
|
|
53
69
|
to: "360 50 50",
|
|
54
70
|
repeatCount: "indefinite"
|
|
55
71
|
}, null, -1);
|
|
56
|
-
const _hoisted_6 = [
|
|
57
|
-
_hoisted_5
|
|
72
|
+
const _hoisted_6$1 = [
|
|
73
|
+
_hoisted_5$1
|
|
58
74
|
];
|
|
59
75
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
60
76
|
__name: "loading-spinner",
|
|
@@ -68,11 +84,11 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
68
84
|
return (_ctx, _cache) => {
|
|
69
85
|
return openBlock(), createElementBlock("span", _hoisted_1$5, [
|
|
70
86
|
createElementVNode("span", _hoisted_2$4, [
|
|
71
|
-
(openBlock(), createElementBlock("svg", _hoisted_3$
|
|
87
|
+
(openBlock(), createElementBlock("svg", _hoisted_3$2, [
|
|
72
88
|
createElementVNode("path", {
|
|
73
89
|
fill: __props.color,
|
|
74
90
|
d: "M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"
|
|
75
|
-
}, _hoisted_6, 8, _hoisted_4)
|
|
91
|
+
}, _hoisted_6$1, 8, _hoisted_4$2)
|
|
76
92
|
]))
|
|
77
93
|
]),
|
|
78
94
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -104,13 +120,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
104
120
|
return props.caption && !props.fab;
|
|
105
121
|
});
|
|
106
122
|
return (_ctx, _cache) => {
|
|
107
|
-
const
|
|
123
|
+
const _component_svg_icon = resolveComponent("svg-icon");
|
|
108
124
|
return openBlock(), createElementBlock("button", {
|
|
109
125
|
type: __props.type,
|
|
110
126
|
disabled: __props.disabled,
|
|
111
127
|
href: __props.href,
|
|
112
128
|
to: __props.to,
|
|
113
|
-
class: normalizeClass(["base-button", {
|
|
129
|
+
class: normalizeClass(["base-button btn btn-primary", {
|
|
114
130
|
disabled: __props.disabled,
|
|
115
131
|
pending: __props.pending,
|
|
116
132
|
rounded: __props.rounded,
|
|
@@ -123,7 +139,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
123
139
|
}])
|
|
124
140
|
}, [
|
|
125
141
|
renderSlot(_ctx.$slots, "default", {}, () => [
|
|
126
|
-
__props.icon ? (openBlock(), createBlock(
|
|
142
|
+
__props.icon ? (openBlock(), createBlock(_component_svg_icon, {
|
|
127
143
|
key: 0,
|
|
128
144
|
id: __props.icon,
|
|
129
145
|
class: "base-button__caption"
|
|
@@ -141,8 +157,9 @@ function uniqueId() {
|
|
|
141
157
|
return (new Date().valueOf() + Math.random()).toString(36);
|
|
142
158
|
}
|
|
143
159
|
const _hoisted_1$3 = { class: "base-input" };
|
|
144
|
-
const _hoisted_2$3 =
|
|
145
|
-
const _hoisted_3 = ["
|
|
160
|
+
const _hoisted_2$3 = { class: "input-group" };
|
|
161
|
+
const _hoisted_3$1 = ["type", "name", "id", "label", "placeholder", "pattern", "disabled", "read-only", "required", "maxlength", "checked", "aria-label"];
|
|
162
|
+
const _hoisted_4$1 = ["for"];
|
|
146
163
|
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
147
164
|
__name: "base-input",
|
|
148
165
|
props: {
|
|
@@ -211,27 +228,33 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
211
228
|
});
|
|
212
229
|
return (_ctx, _cache) => {
|
|
213
230
|
return openBlock(), createElementBlock("div", _hoisted_1$3, [
|
|
214
|
-
|
|
215
|
-
"
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
231
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
232
|
+
renderSlot(_ctx.$slots, "input-prepend"),
|
|
233
|
+
withDirectives(createElementVNode("input", {
|
|
234
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(model) ? model.value = $event : null),
|
|
235
|
+
type: __props.type,
|
|
236
|
+
name: __props.name,
|
|
237
|
+
id: __props.id,
|
|
238
|
+
label: `${__props.label}${__props.required ? " *" : ""}`,
|
|
239
|
+
placeholder: __props.placeholder,
|
|
240
|
+
pattern: __props.pattern,
|
|
241
|
+
disabled: __props.disabled,
|
|
242
|
+
"read-only": __props.readOnly,
|
|
243
|
+
required: __props.required,
|
|
244
|
+
maxlength: __props.maxlength,
|
|
245
|
+
checked: __props.checked,
|
|
246
|
+
class: "form-control",
|
|
247
|
+
"aria-label": __props.label
|
|
248
|
+
}, null, 8, _hoisted_3$1), [
|
|
249
|
+
[vModelDynamic, unref(model)]
|
|
250
|
+
]),
|
|
251
|
+
renderSlot(_ctx.$slots, "input-append")
|
|
229
252
|
]),
|
|
230
253
|
createElementVNode("label", { for: __props.id }, [
|
|
231
254
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
232
255
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
233
256
|
])
|
|
234
|
-
], 8,
|
|
257
|
+
], 8, _hoisted_4$1)
|
|
235
258
|
]);
|
|
236
259
|
};
|
|
237
260
|
}
|
|
@@ -396,631 +419,133 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
396
419
|
};
|
|
397
420
|
}
|
|
398
421
|
});
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
let activePinia;
|
|
405
|
-
const setActivePinia = (pinia) => activePinia = pinia;
|
|
406
|
-
const piniaSymbol = Symbol();
|
|
407
|
-
function isPlainObject(o) {
|
|
408
|
-
return o && typeof o === "object" && Object.prototype.toString.call(o) === "[object Object]" && typeof o.toJSON !== "function";
|
|
409
|
-
}
|
|
410
|
-
var MutationType;
|
|
411
|
-
(function(MutationType2) {
|
|
412
|
-
MutationType2["direct"] = "direct";
|
|
413
|
-
MutationType2["patchObject"] = "patch object";
|
|
414
|
-
MutationType2["patchFunction"] = "patch function";
|
|
415
|
-
})(MutationType || (MutationType = {}));
|
|
416
|
-
const noop$1 = () => {
|
|
422
|
+
const _hoisted_1 = { class: "input input-dropdown" };
|
|
423
|
+
const _hoisted_2 = { class: "dropdown" };
|
|
424
|
+
const _hoisted_3 = {
|
|
425
|
+
class: "btn-group",
|
|
426
|
+
role: "group"
|
|
417
427
|
};
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
onUnmounted(removeSubscription);
|
|
429
|
-
}
|
|
430
|
-
return removeSubscription;
|
|
431
|
-
}
|
|
432
|
-
function triggerSubscriptions(subscriptions, ...args) {
|
|
433
|
-
subscriptions.slice().forEach((callback) => {
|
|
434
|
-
callback(...args);
|
|
435
|
-
});
|
|
436
|
-
}
|
|
437
|
-
function mergeReactiveObjects(target, patchToApply) {
|
|
438
|
-
for (const key in patchToApply) {
|
|
439
|
-
if (!patchToApply.hasOwnProperty(key))
|
|
440
|
-
continue;
|
|
441
|
-
const subPatch = patchToApply[key];
|
|
442
|
-
const targetValue = target[key];
|
|
443
|
-
if (isPlainObject(targetValue) && isPlainObject(subPatch) && target.hasOwnProperty(key) && !isRef(subPatch) && !isReactive(subPatch)) {
|
|
444
|
-
target[key] = mergeReactiveObjects(targetValue, subPatch);
|
|
445
|
-
} else {
|
|
446
|
-
target[key] = subPatch;
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
return target;
|
|
450
|
-
}
|
|
451
|
-
const skipHydrateSymbol = Symbol();
|
|
452
|
-
function shouldHydrate(obj) {
|
|
453
|
-
return !isPlainObject(obj) || !obj.hasOwnProperty(skipHydrateSymbol);
|
|
454
|
-
}
|
|
455
|
-
const { assign } = Object;
|
|
456
|
-
function isComputed(o) {
|
|
457
|
-
return !!(isRef(o) && o.effect);
|
|
458
|
-
}
|
|
459
|
-
function createOptionsStore(id, options, pinia, hot) {
|
|
460
|
-
const { state, actions, getters } = options;
|
|
461
|
-
const initialState = pinia.state.value[id];
|
|
462
|
-
let store;
|
|
463
|
-
function setup() {
|
|
464
|
-
if (!initialState && true) {
|
|
465
|
-
{
|
|
466
|
-
pinia.state.value[id] = state ? state() : {};
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
const localState = toRefs(pinia.state.value[id]);
|
|
470
|
-
return assign(localState, actions, Object.keys(getters || {}).reduce((computedGetters, name) => {
|
|
471
|
-
computedGetters[name] = markRaw(computed(() => {
|
|
472
|
-
setActivePinia(pinia);
|
|
473
|
-
const store2 = pinia._s.get(id);
|
|
474
|
-
return getters[name].call(store2, store2);
|
|
475
|
-
}));
|
|
476
|
-
return computedGetters;
|
|
477
|
-
}, {}));
|
|
478
|
-
}
|
|
479
|
-
store = createSetupStore(id, setup, options, pinia, hot, true);
|
|
480
|
-
store.$reset = function $reset() {
|
|
481
|
-
const newState = state ? state() : {};
|
|
482
|
-
this.$patch(($state) => {
|
|
483
|
-
assign($state, newState);
|
|
484
|
-
});
|
|
485
|
-
};
|
|
486
|
-
return store;
|
|
487
|
-
}
|
|
488
|
-
function createSetupStore($id, setup, options = {}, pinia, hot, isOptionsStore) {
|
|
489
|
-
let scope;
|
|
490
|
-
const optionsForPlugin = assign({ actions: {} }, options);
|
|
491
|
-
const $subscribeOptions = {
|
|
492
|
-
deep: true
|
|
493
|
-
};
|
|
494
|
-
let isListening;
|
|
495
|
-
let isSyncListening;
|
|
496
|
-
let subscriptions = markRaw([]);
|
|
497
|
-
let actionSubscriptions = markRaw([]);
|
|
498
|
-
let debuggerEvents;
|
|
499
|
-
const initialState = pinia.state.value[$id];
|
|
500
|
-
if (!isOptionsStore && !initialState && true) {
|
|
501
|
-
{
|
|
502
|
-
pinia.state.value[$id] = {};
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
ref({});
|
|
506
|
-
let activeListener;
|
|
507
|
-
function $patch(partialStateOrMutator) {
|
|
508
|
-
let subscriptionMutation;
|
|
509
|
-
isListening = isSyncListening = false;
|
|
510
|
-
if (typeof partialStateOrMutator === "function") {
|
|
511
|
-
partialStateOrMutator(pinia.state.value[$id]);
|
|
512
|
-
subscriptionMutation = {
|
|
513
|
-
type: MutationType.patchFunction,
|
|
514
|
-
storeId: $id,
|
|
515
|
-
events: debuggerEvents
|
|
516
|
-
};
|
|
517
|
-
} else {
|
|
518
|
-
mergeReactiveObjects(pinia.state.value[$id], partialStateOrMutator);
|
|
519
|
-
subscriptionMutation = {
|
|
520
|
-
type: MutationType.patchObject,
|
|
521
|
-
payload: partialStateOrMutator,
|
|
522
|
-
storeId: $id,
|
|
523
|
-
events: debuggerEvents
|
|
524
|
-
};
|
|
525
|
-
}
|
|
526
|
-
const myListenerId = activeListener = Symbol();
|
|
527
|
-
nextTick().then(() => {
|
|
528
|
-
if (activeListener === myListenerId) {
|
|
529
|
-
isListening = true;
|
|
530
|
-
}
|
|
531
|
-
});
|
|
532
|
-
isSyncListening = true;
|
|
533
|
-
triggerSubscriptions(subscriptions, subscriptionMutation, pinia.state.value[$id]);
|
|
534
|
-
}
|
|
535
|
-
const $reset = noop$1;
|
|
536
|
-
function $dispose() {
|
|
537
|
-
scope.stop();
|
|
538
|
-
subscriptions = [];
|
|
539
|
-
actionSubscriptions = [];
|
|
540
|
-
pinia._s.delete($id);
|
|
541
|
-
}
|
|
542
|
-
function wrapAction(name, action) {
|
|
543
|
-
return function() {
|
|
544
|
-
setActivePinia(pinia);
|
|
545
|
-
const args = Array.from(arguments);
|
|
546
|
-
const afterCallbackList = [];
|
|
547
|
-
const onErrorCallbackList = [];
|
|
548
|
-
function after(callback) {
|
|
549
|
-
afterCallbackList.push(callback);
|
|
550
|
-
}
|
|
551
|
-
function onError(callback) {
|
|
552
|
-
onErrorCallbackList.push(callback);
|
|
553
|
-
}
|
|
554
|
-
triggerSubscriptions(actionSubscriptions, {
|
|
555
|
-
args,
|
|
556
|
-
name,
|
|
557
|
-
store,
|
|
558
|
-
after,
|
|
559
|
-
onError
|
|
560
|
-
});
|
|
561
|
-
let ret;
|
|
562
|
-
try {
|
|
563
|
-
ret = action.apply(this && this.$id === $id ? this : store, args);
|
|
564
|
-
} catch (error) {
|
|
565
|
-
triggerSubscriptions(onErrorCallbackList, error);
|
|
566
|
-
throw error;
|
|
567
|
-
}
|
|
568
|
-
if (ret instanceof Promise) {
|
|
569
|
-
return ret.then((value) => {
|
|
570
|
-
triggerSubscriptions(afterCallbackList, value);
|
|
571
|
-
return value;
|
|
572
|
-
}).catch((error) => {
|
|
573
|
-
triggerSubscriptions(onErrorCallbackList, error);
|
|
574
|
-
return Promise.reject(error);
|
|
575
|
-
});
|
|
576
|
-
}
|
|
577
|
-
triggerSubscriptions(afterCallbackList, ret);
|
|
578
|
-
return ret;
|
|
579
|
-
};
|
|
580
|
-
}
|
|
581
|
-
const partialStore = {
|
|
582
|
-
_p: pinia,
|
|
583
|
-
$id,
|
|
584
|
-
$onAction: addSubscription.bind(null, actionSubscriptions),
|
|
585
|
-
$patch,
|
|
586
|
-
$reset,
|
|
587
|
-
$subscribe(callback, options2 = {}) {
|
|
588
|
-
const removeSubscription = addSubscription(subscriptions, callback, options2.detached, () => stopWatcher());
|
|
589
|
-
const stopWatcher = scope.run(() => watch(() => pinia.state.value[$id], (state) => {
|
|
590
|
-
if (options2.flush === "sync" ? isSyncListening : isListening) {
|
|
591
|
-
callback({
|
|
592
|
-
storeId: $id,
|
|
593
|
-
type: MutationType.direct,
|
|
594
|
-
events: debuggerEvents
|
|
595
|
-
}, state);
|
|
596
|
-
}
|
|
597
|
-
}, assign({}, $subscribeOptions, options2)));
|
|
598
|
-
return removeSubscription;
|
|
428
|
+
const _hoisted_4 = ["id", "disabled"];
|
|
429
|
+
const _hoisted_5 = ["aria-labelledby"];
|
|
430
|
+
const _hoisted_6 = ["onClick"];
|
|
431
|
+
const _hoisted_7 = ["for"];
|
|
432
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
433
|
+
__name: "input-dropdown",
|
|
434
|
+
props: {
|
|
435
|
+
modelValue: {
|
|
436
|
+
type: [String, Number, Boolean, Object],
|
|
437
|
+
default: ""
|
|
599
438
|
},
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
});
|
|
608
|
-
for (const key in setupStore) {
|
|
609
|
-
const prop = setupStore[key];
|
|
610
|
-
if (isRef(prop) && !isComputed(prop) || isReactive(prop)) {
|
|
611
|
-
if (!isOptionsStore) {
|
|
612
|
-
if (initialState && shouldHydrate(prop)) {
|
|
613
|
-
if (isRef(prop)) {
|
|
614
|
-
prop.value = initialState[key];
|
|
615
|
-
} else {
|
|
616
|
-
mergeReactiveObjects(prop, initialState[key]);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
{
|
|
620
|
-
pinia.state.value[$id][key] = prop;
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
} else if (typeof prop === "function") {
|
|
624
|
-
const actionValue = wrapAction(key, prop);
|
|
625
|
-
{
|
|
626
|
-
setupStore[key] = actionValue;
|
|
627
|
-
}
|
|
628
|
-
optionsForPlugin.actions[key] = prop;
|
|
629
|
-
} else
|
|
630
|
-
;
|
|
631
|
-
}
|
|
632
|
-
{
|
|
633
|
-
assign(store, setupStore);
|
|
634
|
-
assign(toRaw(store), setupStore);
|
|
635
|
-
}
|
|
636
|
-
Object.defineProperty(store, "$state", {
|
|
637
|
-
get: () => pinia.state.value[$id],
|
|
638
|
-
set: (state) => {
|
|
639
|
-
$patch(($state) => {
|
|
640
|
-
assign($state, state);
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
});
|
|
644
|
-
pinia._p.forEach((extender) => {
|
|
645
|
-
{
|
|
646
|
-
assign(store, scope.run(() => extender({
|
|
647
|
-
store,
|
|
648
|
-
app: pinia._a,
|
|
649
|
-
pinia,
|
|
650
|
-
options: optionsForPlugin
|
|
651
|
-
})));
|
|
652
|
-
}
|
|
653
|
-
});
|
|
654
|
-
if (initialState && isOptionsStore && options.hydrate) {
|
|
655
|
-
options.hydrate(store.$state, initialState);
|
|
656
|
-
}
|
|
657
|
-
isListening = true;
|
|
658
|
-
isSyncListening = true;
|
|
659
|
-
return store;
|
|
660
|
-
}
|
|
661
|
-
function defineStore(idOrOptions, setup, setupOptions) {
|
|
662
|
-
let id;
|
|
663
|
-
let options;
|
|
664
|
-
const isSetupStore = typeof setup === "function";
|
|
665
|
-
if (typeof idOrOptions === "string") {
|
|
666
|
-
id = idOrOptions;
|
|
667
|
-
options = isSetupStore ? setupOptions : setup;
|
|
668
|
-
} else {
|
|
669
|
-
options = idOrOptions;
|
|
670
|
-
id = idOrOptions.id;
|
|
671
|
-
}
|
|
672
|
-
function useStore(pinia, hot) {
|
|
673
|
-
const currentInstance = getCurrentInstance();
|
|
674
|
-
pinia = pinia || currentInstance && inject(piniaSymbol);
|
|
675
|
-
if (pinia)
|
|
676
|
-
setActivePinia(pinia);
|
|
677
|
-
pinia = activePinia;
|
|
678
|
-
if (!pinia._s.has(id)) {
|
|
679
|
-
if (isSetupStore) {
|
|
680
|
-
createSetupStore(id, setup, options, pinia);
|
|
681
|
-
} else {
|
|
682
|
-
createOptionsStore(id, options, pinia);
|
|
683
|
-
}
|
|
684
|
-
}
|
|
685
|
-
const store = pinia._s.get(id);
|
|
686
|
-
return store;
|
|
687
|
-
}
|
|
688
|
-
useStore.$id = id;
|
|
689
|
-
return useStore;
|
|
690
|
-
}
|
|
691
|
-
function tryOnScopeDispose(fn) {
|
|
692
|
-
if (getCurrentScope()) {
|
|
693
|
-
onScopeDispose(fn);
|
|
694
|
-
return true;
|
|
695
|
-
}
|
|
696
|
-
return false;
|
|
697
|
-
}
|
|
698
|
-
var _a;
|
|
699
|
-
const isClient = typeof window !== "undefined";
|
|
700
|
-
const isString = (val) => typeof val === "string";
|
|
701
|
-
const noop = () => {
|
|
702
|
-
};
|
|
703
|
-
isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
704
|
-
function createFilterWrapper(filter, fn) {
|
|
705
|
-
function wrapper(...args) {
|
|
706
|
-
filter(() => fn.apply(this, args), { fn, thisArg: this, args });
|
|
707
|
-
}
|
|
708
|
-
return wrapper;
|
|
709
|
-
}
|
|
710
|
-
const bypassFilter = (invoke) => {
|
|
711
|
-
return invoke();
|
|
712
|
-
};
|
|
713
|
-
function pausableFilter(extendFilter = bypassFilter) {
|
|
714
|
-
const isActive = ref(true);
|
|
715
|
-
function pause() {
|
|
716
|
-
isActive.value = false;
|
|
717
|
-
}
|
|
718
|
-
function resume() {
|
|
719
|
-
isActive.value = true;
|
|
720
|
-
}
|
|
721
|
-
const eventFilter = (...args) => {
|
|
722
|
-
if (isActive.value)
|
|
723
|
-
extendFilter(...args);
|
|
724
|
-
};
|
|
725
|
-
return { isActive, pause, resume, eventFilter };
|
|
726
|
-
}
|
|
727
|
-
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
728
|
-
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
729
|
-
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
730
|
-
var __objRest$5 = (source, exclude) => {
|
|
731
|
-
var target = {};
|
|
732
|
-
for (var prop in source)
|
|
733
|
-
if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
734
|
-
target[prop] = source[prop];
|
|
735
|
-
if (source != null && __getOwnPropSymbols$5)
|
|
736
|
-
for (var prop of __getOwnPropSymbols$5(source)) {
|
|
737
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
|
|
738
|
-
target[prop] = source[prop];
|
|
739
|
-
}
|
|
740
|
-
return target;
|
|
741
|
-
};
|
|
742
|
-
function watchWithFilter(source, cb, options = {}) {
|
|
743
|
-
const _a2 = options, {
|
|
744
|
-
eventFilter = bypassFilter
|
|
745
|
-
} = _a2, watchOptions = __objRest$5(_a2, [
|
|
746
|
-
"eventFilter"
|
|
747
|
-
]);
|
|
748
|
-
return watch(source, createFilterWrapper(eventFilter, cb), watchOptions);
|
|
749
|
-
}
|
|
750
|
-
var __defProp$1 = Object.defineProperty;
|
|
751
|
-
var __defProps$1 = Object.defineProperties;
|
|
752
|
-
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
753
|
-
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
754
|
-
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
755
|
-
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
756
|
-
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
757
|
-
var __spreadValues$1 = (a, b) => {
|
|
758
|
-
for (var prop in b || (b = {}))
|
|
759
|
-
if (__hasOwnProp$1.call(b, prop))
|
|
760
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
761
|
-
if (__getOwnPropSymbols$1)
|
|
762
|
-
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
763
|
-
if (__propIsEnum$1.call(b, prop))
|
|
764
|
-
__defNormalProp$1(a, prop, b[prop]);
|
|
765
|
-
}
|
|
766
|
-
return a;
|
|
767
|
-
};
|
|
768
|
-
var __spreadProps$1 = (a, b) => __defProps$1(a, __getOwnPropDescs$1(b));
|
|
769
|
-
var __objRest$1 = (source, exclude) => {
|
|
770
|
-
var target = {};
|
|
771
|
-
for (var prop in source)
|
|
772
|
-
if (__hasOwnProp$1.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
773
|
-
target[prop] = source[prop];
|
|
774
|
-
if (source != null && __getOwnPropSymbols$1)
|
|
775
|
-
for (var prop of __getOwnPropSymbols$1(source)) {
|
|
776
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$1.call(source, prop))
|
|
777
|
-
target[prop] = source[prop];
|
|
778
|
-
}
|
|
779
|
-
return target;
|
|
780
|
-
};
|
|
781
|
-
function watchPausable(source, cb, options = {}) {
|
|
782
|
-
const _a2 = options, {
|
|
783
|
-
eventFilter: filter
|
|
784
|
-
} = _a2, watchOptions = __objRest$1(_a2, [
|
|
785
|
-
"eventFilter"
|
|
786
|
-
]);
|
|
787
|
-
const { eventFilter, pause, resume, isActive } = pausableFilter(filter);
|
|
788
|
-
const stop = watchWithFilter(source, cb, __spreadProps$1(__spreadValues$1({}, watchOptions), {
|
|
789
|
-
eventFilter
|
|
790
|
-
}));
|
|
791
|
-
return { stop, pause, resume, isActive };
|
|
792
|
-
}
|
|
793
|
-
function unrefElement(elRef) {
|
|
794
|
-
var _a2;
|
|
795
|
-
const plain = unref(elRef);
|
|
796
|
-
return (_a2 = plain == null ? void 0 : plain.$el) != null ? _a2 : plain;
|
|
797
|
-
}
|
|
798
|
-
const defaultWindow = isClient ? window : void 0;
|
|
799
|
-
isClient ? window.document : void 0;
|
|
800
|
-
isClient ? window.navigator : void 0;
|
|
801
|
-
isClient ? window.location : void 0;
|
|
802
|
-
function useEventListener(...args) {
|
|
803
|
-
let target;
|
|
804
|
-
let event;
|
|
805
|
-
let listener;
|
|
806
|
-
let options;
|
|
807
|
-
if (isString(args[0])) {
|
|
808
|
-
[event, listener, options] = args;
|
|
809
|
-
target = defaultWindow;
|
|
810
|
-
} else {
|
|
811
|
-
[target, event, listener, options] = args;
|
|
812
|
-
}
|
|
813
|
-
if (!target)
|
|
814
|
-
return noop;
|
|
815
|
-
let cleanup = noop;
|
|
816
|
-
const stopWatch = watch(() => unrefElement(target), (el) => {
|
|
817
|
-
cleanup();
|
|
818
|
-
if (!el)
|
|
819
|
-
return;
|
|
820
|
-
el.addEventListener(event, listener, options);
|
|
821
|
-
cleanup = () => {
|
|
822
|
-
el.removeEventListener(event, listener, options);
|
|
823
|
-
cleanup = noop;
|
|
824
|
-
};
|
|
825
|
-
}, { immediate: true, flush: "post" });
|
|
826
|
-
const stop = () => {
|
|
827
|
-
stopWatch();
|
|
828
|
-
cleanup();
|
|
829
|
-
};
|
|
830
|
-
tryOnScopeDispose(stop);
|
|
831
|
-
return stop;
|
|
832
|
-
}
|
|
833
|
-
const _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
834
|
-
const globalKey = "__vueuse_ssr_handlers__";
|
|
835
|
-
_global[globalKey] = _global[globalKey] || {};
|
|
836
|
-
const handlers = _global[globalKey];
|
|
837
|
-
function getSSRHandler(key, fallback) {
|
|
838
|
-
return handlers[key] || fallback;
|
|
839
|
-
}
|
|
840
|
-
function guessSerializerType(rawInit) {
|
|
841
|
-
return rawInit == null ? "any" : rawInit instanceof Set ? "set" : rawInit instanceof Map ? "map" : rawInit instanceof Date ? "date" : typeof rawInit === "boolean" ? "boolean" : typeof rawInit === "string" ? "string" : typeof rawInit === "object" ? "object" : Array.isArray(rawInit) ? "object" : !Number.isNaN(rawInit) ? "number" : "any";
|
|
842
|
-
}
|
|
843
|
-
const StorageSerializers = {
|
|
844
|
-
boolean: {
|
|
845
|
-
read: (v) => v === "true",
|
|
846
|
-
write: (v) => String(v)
|
|
847
|
-
},
|
|
848
|
-
object: {
|
|
849
|
-
read: (v) => JSON.parse(v),
|
|
850
|
-
write: (v) => JSON.stringify(v)
|
|
851
|
-
},
|
|
852
|
-
number: {
|
|
853
|
-
read: (v) => Number.parseFloat(v),
|
|
854
|
-
write: (v) => String(v)
|
|
855
|
-
},
|
|
856
|
-
any: {
|
|
857
|
-
read: (v) => v,
|
|
858
|
-
write: (v) => String(v)
|
|
859
|
-
},
|
|
860
|
-
string: {
|
|
861
|
-
read: (v) => v,
|
|
862
|
-
write: (v) => String(v)
|
|
863
|
-
},
|
|
864
|
-
map: {
|
|
865
|
-
read: (v) => new Map(JSON.parse(v)),
|
|
866
|
-
write: (v) => JSON.stringify(Array.from(v.entries()))
|
|
867
|
-
},
|
|
868
|
-
set: {
|
|
869
|
-
read: (v) => new Set(JSON.parse(v)),
|
|
870
|
-
write: (v) => JSON.stringify(Array.from(v))
|
|
871
|
-
},
|
|
872
|
-
date: {
|
|
873
|
-
read: (v) => new Date(v),
|
|
874
|
-
write: (v) => v.toISOString()
|
|
875
|
-
}
|
|
876
|
-
};
|
|
877
|
-
function useStorage(key, initialValue, storage, options = {}) {
|
|
878
|
-
var _a2;
|
|
879
|
-
const {
|
|
880
|
-
flush = "pre",
|
|
881
|
-
deep = true,
|
|
882
|
-
listenToStorageChanges = true,
|
|
883
|
-
writeDefaults = true,
|
|
884
|
-
shallow,
|
|
885
|
-
window: window2 = defaultWindow,
|
|
886
|
-
eventFilter,
|
|
887
|
-
onError = (e) => {
|
|
888
|
-
console.error(e);
|
|
889
|
-
}
|
|
890
|
-
} = options;
|
|
891
|
-
const data = (shallow ? shallowRef : ref)(initialValue);
|
|
892
|
-
if (!storage) {
|
|
893
|
-
try {
|
|
894
|
-
storage = getSSRHandler("getDefaultStorage", () => {
|
|
895
|
-
var _a22;
|
|
896
|
-
return (_a22 = defaultWindow) == null ? void 0 : _a22.localStorage;
|
|
897
|
-
})();
|
|
898
|
-
} catch (e) {
|
|
899
|
-
onError(e);
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
if (!storage)
|
|
903
|
-
return data;
|
|
904
|
-
const rawInit = unref(initialValue);
|
|
905
|
-
const type = guessSerializerType(rawInit);
|
|
906
|
-
const serializer = (_a2 = options.serializer) != null ? _a2 : StorageSerializers[type];
|
|
907
|
-
const { pause: pauseWatch, resume: resumeWatch } = watchPausable(data, () => write(data.value), { flush, deep, eventFilter });
|
|
908
|
-
if (window2 && listenToStorageChanges)
|
|
909
|
-
useEventListener(window2, "storage", update);
|
|
910
|
-
update();
|
|
911
|
-
return data;
|
|
912
|
-
function write(v) {
|
|
913
|
-
try {
|
|
914
|
-
if (v == null)
|
|
915
|
-
storage.removeItem(key);
|
|
916
|
-
else
|
|
917
|
-
storage.setItem(key, serializer.write(v));
|
|
918
|
-
} catch (e) {
|
|
919
|
-
onError(e);
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
function read(event) {
|
|
923
|
-
if (event && event.key !== key)
|
|
924
|
-
return;
|
|
925
|
-
pauseWatch();
|
|
926
|
-
try {
|
|
927
|
-
const rawValue = event ? event.newValue : storage.getItem(key);
|
|
928
|
-
if (rawValue == null) {
|
|
929
|
-
if (writeDefaults && rawInit !== null)
|
|
930
|
-
storage.setItem(key, serializer.write(rawInit));
|
|
931
|
-
return rawInit;
|
|
932
|
-
} else if (typeof rawValue !== "string") {
|
|
933
|
-
return rawValue;
|
|
934
|
-
} else {
|
|
935
|
-
return serializer.read(rawValue);
|
|
936
|
-
}
|
|
937
|
-
} catch (e) {
|
|
938
|
-
onError(e);
|
|
939
|
-
} finally {
|
|
940
|
-
resumeWatch();
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
function update(event) {
|
|
944
|
-
if (event && event.key !== key)
|
|
945
|
-
return;
|
|
946
|
-
data.value = read(event);
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
var SwipeDirection;
|
|
950
|
-
(function(SwipeDirection2) {
|
|
951
|
-
SwipeDirection2["UP"] = "UP";
|
|
952
|
-
SwipeDirection2["RIGHT"] = "RIGHT";
|
|
953
|
-
SwipeDirection2["DOWN"] = "DOWN";
|
|
954
|
-
SwipeDirection2["LEFT"] = "LEFT";
|
|
955
|
-
SwipeDirection2["NONE"] = "NONE";
|
|
956
|
-
})(SwipeDirection || (SwipeDirection = {}));
|
|
957
|
-
const useAuthUserStore = defineStore("auth/user", {
|
|
958
|
-
state: () => ({
|
|
959
|
-
firstName: useStorage("firstName", ""),
|
|
960
|
-
lastName: "",
|
|
961
|
-
userId: null
|
|
962
|
-
}),
|
|
963
|
-
getters: {
|
|
964
|
-
fullName: (state) => `${state.firstName} ${state.lastName}`,
|
|
965
|
-
loggedIn: (state) => state.userId !== null,
|
|
966
|
-
fullUserDetails(state) {
|
|
967
|
-
return {
|
|
968
|
-
...state,
|
|
969
|
-
fullName: this.fullName
|
|
970
|
-
};
|
|
971
|
-
}
|
|
972
|
-
},
|
|
973
|
-
actions: {
|
|
974
|
-
updateUser(payload) {
|
|
975
|
-
this.firstName = payload.firstName;
|
|
976
|
-
this.lastName = payload.lastName;
|
|
977
|
-
this.userId = payload.userId;
|
|
439
|
+
name: {
|
|
440
|
+
type: String,
|
|
441
|
+
default: () => uniqueId()
|
|
442
|
+
},
|
|
443
|
+
id: {
|
|
444
|
+
type: String,
|
|
445
|
+
default: () => uniqueId()
|
|
978
446
|
},
|
|
979
|
-
|
|
980
|
-
|
|
447
|
+
label: {
|
|
448
|
+
type: String,
|
|
449
|
+
default: ""
|
|
450
|
+
},
|
|
451
|
+
placeholder: {
|
|
452
|
+
type: String,
|
|
453
|
+
default: "Please select"
|
|
454
|
+
},
|
|
455
|
+
options: {
|
|
456
|
+
type: Array,
|
|
457
|
+
default: []
|
|
458
|
+
},
|
|
459
|
+
variant: {
|
|
460
|
+
type: String,
|
|
461
|
+
default: ""
|
|
462
|
+
},
|
|
463
|
+
color: {
|
|
464
|
+
type: String,
|
|
465
|
+
default: ""
|
|
466
|
+
},
|
|
467
|
+
disabled: {
|
|
468
|
+
type: Boolean,
|
|
469
|
+
default: false
|
|
470
|
+
},
|
|
471
|
+
multiple: {
|
|
472
|
+
type: Boolean,
|
|
473
|
+
default: false
|
|
474
|
+
},
|
|
475
|
+
required: {
|
|
476
|
+
type: Boolean,
|
|
477
|
+
default: false
|
|
478
|
+
},
|
|
479
|
+
resetOption: {
|
|
480
|
+
type: Boolean,
|
|
481
|
+
default: true
|
|
981
482
|
}
|
|
982
|
-
}
|
|
983
|
-
});
|
|
984
|
-
var baseForm_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => ".base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}\n")();
|
|
985
|
-
const _hoisted_1 = { class: "base-form" };
|
|
986
|
-
const _hoisted_2 = ["onSubmit"];
|
|
987
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
988
|
-
__name: "base-form",
|
|
989
|
-
props: {
|
|
990
|
-
id: null,
|
|
991
|
-
name: null,
|
|
992
|
-
variant: null,
|
|
993
|
-
disabled: { type: Boolean },
|
|
994
|
-
pending: { type: Boolean }
|
|
995
483
|
},
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
computed(
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
function submit(event) {
|
|
1010
|
-
console.log("submit", event);
|
|
484
|
+
emits: ["update:modelValue"],
|
|
485
|
+
setup(__props, { emit }) {
|
|
486
|
+
const props = __props;
|
|
487
|
+
computed({
|
|
488
|
+
get() {
|
|
489
|
+
return props.modelValue;
|
|
490
|
+
},
|
|
491
|
+
set(update) {
|
|
492
|
+
emit("update:modelValue", update);
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
function select(update) {
|
|
496
|
+
emit("update:modelValue", update);
|
|
1011
497
|
}
|
|
498
|
+
const extendedOptions = computed(() => {
|
|
499
|
+
return [
|
|
500
|
+
{
|
|
501
|
+
text: "Please select"
|
|
502
|
+
},
|
|
503
|
+
...props.options.map((option) => typeof option === "string" ? { value: option, text: option } : option)
|
|
504
|
+
];
|
|
505
|
+
});
|
|
506
|
+
const selectedOption = computed(() => {
|
|
507
|
+
return [...props.options].find((option) => JSON.stringify(option.value) === JSON.stringify(props.modelValue));
|
|
508
|
+
});
|
|
1012
509
|
return (_ctx, _cache) => {
|
|
1013
510
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1014
|
-
createElementVNode("
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
511
|
+
createElementVNode("div", _hoisted_2, [
|
|
512
|
+
createElementVNode("div", _hoisted_3, [
|
|
513
|
+
createElementVNode("button", {
|
|
514
|
+
class: normalizeClass(["btn dropdown-toggle", {
|
|
515
|
+
[`button-${__props.variant}`]: __props.variant,
|
|
516
|
+
[`button-${__props.color}`]: __props.color,
|
|
517
|
+
[`button-${__props.disabled}`]: __props.disabled
|
|
518
|
+
}]),
|
|
519
|
+
type: "button",
|
|
520
|
+
id: __props.id,
|
|
521
|
+
"data-bs-toggle": "dropdown",
|
|
522
|
+
"aria-expanded": "false",
|
|
523
|
+
disabled: __props.disabled
|
|
524
|
+
}, toDisplayString(unref(selectedOption) ? unref(selectedOption).text : __props.placeholder), 11, _hoisted_4),
|
|
525
|
+
createElementVNode("ul", {
|
|
526
|
+
class: "dropdown-menu",
|
|
527
|
+
"aria-labelledby": __props.id
|
|
528
|
+
}, [
|
|
529
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(extendedOptions), (option, index) => {
|
|
530
|
+
return openBlock(), createElementBlock("li", { key: index }, [
|
|
531
|
+
renderSlot(_ctx.$slots, "option", {}, () => [
|
|
532
|
+
createElementVNode("a", {
|
|
533
|
+
class: "dropdown-item",
|
|
534
|
+
onClick: withModifiers(($event) => select(option.value), ["prevent"])
|
|
535
|
+
}, toDisplayString(option.text), 9, _hoisted_6)
|
|
536
|
+
])
|
|
537
|
+
]);
|
|
538
|
+
}), 128))
|
|
539
|
+
], 8, _hoisted_5)
|
|
540
|
+
])
|
|
541
|
+
]),
|
|
542
|
+
createElementVNode("label", { for: __props.id }, [
|
|
543
|
+
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
544
|
+
createTextVNode(toDisplayString(__props.label), 1)
|
|
545
|
+
])
|
|
546
|
+
], 8, _hoisted_7)
|
|
1022
547
|
]);
|
|
1023
548
|
};
|
|
1024
549
|
}
|
|
1025
550
|
});
|
|
1026
|
-
export { _sfc_main$4 as BaseButton, _sfc_main as
|
|
551
|
+
export { _sfc_main$4 as BaseButton, _sfc_main$3 as BaseInput, _sfc_main$2 as CheckGroup, _sfc_main as InputDropdown, _sfc_main$5 as LoadingSpinner, _sfc_main$1 as RadioGroup, _sfc_main$6 as SvgIcon };
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`)();const
|
|
3
|
-
`)();const
|
|
4
|
-
`)();const
|
|
5
|
-
* pinia v2.0.14
|
|
6
|
-
* (c) 2022 Eduardo San Martin Morote
|
|
7
|
-
* @license MIT
|
|
8
|
-
*/let W;const F=e=>W=e,_e=Symbol();function I(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var x;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(x||(x={}));const J=()=>{};function H(e,a,o,n=J){e.push(a);const r=()=>{const l=e.indexOf(a);l>-1&&(e.splice(l,1),n())};return!o&&t.getCurrentInstance()&&t.onUnmounted(r),r}function N(e,...a){e.slice().forEach(o=>{o(...a)})}function R(e,a){for(const o in a){if(!a.hasOwnProperty(o))continue;const n=a[o],r=e[o];I(r)&&I(n)&&e.hasOwnProperty(o)&&!t.isRef(n)&&!t.isReactive(n)?e[o]=R(r,n):e[o]=n}return e}const ke=Symbol();function Be(e){return!I(e)||!e.hasOwnProperty(ke)}const{assign:k}=Object;function $e(e){return!!(t.isRef(e)&&e.effect)}function Ne(e,a,o,n){const{state:r,actions:l,getters:s}=a,i=o.state.value[e];let d;function m(){i||(o.state.value[e]=r?r():{});const p=t.toRefs(o.state.value[e]);return k(p,l,Object.keys(s||{}).reduce((_,g)=>(_[g]=t.markRaw(t.computed(()=>{F(o);const h=o._s.get(e);return s[g].call(h,h)})),_),{}))}return d=G(e,m,a,o,n,!0),d.$reset=function(){const _=r?r():{};this.$patch(g=>{k(g,_)})},d}function G(e,a,o={},n,r,l){let s;const i=k({actions:{}},o),d={deep:!0};let m,p,_=t.markRaw([]),g=t.markRaw([]),h;const S=n.state.value[e];!l&&!S&&(n.state.value[e]={}),t.ref({});let v;function O(c){let f;m=p=!1,typeof c=="function"?(c(n.state.value[e]),f={type:x.patchFunction,storeId:e,events:h}):(R(n.state.value[e],c),f={type:x.patchObject,payload:c,storeId:e,events:h});const B=v=Symbol();t.nextTick().then(()=>{v===B&&(m=!0)}),p=!0,N(_,f,n.state.value[e])}const D=J;function T(){s.stop(),_=[],g=[],n._s.delete(e)}function U(c,f){return function(){F(n);const B=Array.from(arguments),E=[],C=[];function Ze(w){E.push(w)}function et(w){C.push(w)}N(g,{args:B,name:c,store:y,after:Ze,onError:et});let P;try{P=f.apply(this&&this.$id===e?this:y,B)}catch(w){throw N(C,w),w}return P instanceof Promise?P.then(w=>(N(E,w),w)).catch(w=>(N(C,w),Promise.reject(w))):(N(E,P),P)}}const M={_p:n,$id:e,$onAction:H.bind(null,g),$patch:O,$reset:D,$subscribe(c,f={}){const B=H(_,c,f.detached,()=>E()),E=s.run(()=>t.watch(()=>n.state.value[e],C=>{(f.flush==="sync"?p:m)&&c({storeId:e,type:x.direct,events:h},C)},k({},d,f)));return B},$dispose:T},y=t.reactive(k({},M));n._s.set(e,y);const u=n._e.run(()=>(s=t.effectScope(),s.run(()=>a())));for(const c in u){const f=u[c];if(t.isRef(f)&&!$e(f)||t.isReactive(f))l||(S&&Be(f)&&(t.isRef(f)?f.value=S[c]:R(f,S[c])),n.state.value[e][c]=f);else if(typeof f=="function"){const B=U(c,f);u[c]=B,i.actions[c]=f}}return k(y,u),k(t.toRaw(y),u),Object.defineProperty(y,"$state",{get:()=>n.state.value[e],set:c=>{O(f=>{k(f,c)})}}),n._p.forEach(c=>{k(y,s.run(()=>c({store:y,app:n._a,pinia:n,options:i})))}),S&&l&&o.hydrate&&o.hydrate(y.$state,S),m=!0,p=!0,y}function Oe(e,a,o){let n,r;const l=typeof a=="function";typeof e=="string"?(n=e,r=l?o:a):(r=e,n=e.id);function s(i,d){const m=t.getCurrentInstance();return i=i||m&&t.inject(_e),i&&F(i),i=W,i._s.has(n)||(l?G(n,a,r,i):Ne(n,r,i)),i._s.get(n)}return s.$id=n,s}function xe(e){return t.getCurrentScope()?(t.onScopeDispose(e),!0):!1}var K;const V=typeof window!="undefined",Ve=e=>typeof e=="string",z=()=>{};V&&((K=window==null?void 0:window.navigator)==null?void 0:K.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Ee(e,a){function o(...n){e(()=>a.apply(this,n),{fn:a,thisArg:this,args:n})}return o}const X=e=>e();function Ce(e=X){const a=t.ref(!0);function o(){a.value=!1}function n(){a.value=!0}return{isActive:a,pause:o,resume:n,eventFilter:(...l)=>{a.value&&e(...l)}}}var Q=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,ve=(e,a)=>{var o={};for(var n in e)Pe.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&Q)for(var n of Q(e))a.indexOf(n)<0&&je.call(e,n)&&(o[n]=e[n]);return o};function Fe(e,a,o={}){const n=o,{eventFilter:r=X}=n,l=ve(n,["eventFilter"]);return t.watch(e,Ee(r,a),l)}var Ie=Object.defineProperty,Re=Object.defineProperties,ze=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,Y=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,ee=(e,a,o)=>a in e?Ie(e,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[a]=o,qe=(e,a)=>{for(var o in a||(a={}))Y.call(a,o)&&ee(e,o,a[o]);if(j)for(var o of j(a))Z.call(a,o)&&ee(e,o,a[o]);return e},Le=(e,a)=>Re(e,ze(a)),Ae=(e,a)=>{var o={};for(var n in e)Y.call(e,n)&&a.indexOf(n)<0&&(o[n]=e[n]);if(e!=null&&j)for(var n of j(e))a.indexOf(n)<0&&Z.call(e,n)&&(o[n]=e[n]);return o};function De(e,a,o={}){const n=o,{eventFilter:r}=n,l=Ae(n,["eventFilter"]),{eventFilter:s,pause:i,resume:d,isActive:m}=Ce(r);return{stop:Fe(e,a,Le(qe({},l),{eventFilter:s})),pause:i,resume:d,isActive:m}}function Te(e){var a;const o=t.unref(e);return(a=o==null?void 0:o.$el)!=null?a:o}const q=V?window:void 0;V&&window.document,V&&window.navigator,V&&window.location;function Ue(...e){let a,o,n,r;if(Ve(e[0])?([o,n,r]=e,a=q):[a,o,n,r]=e,!a)return z;let l=z;const s=t.watch(()=>Te(a),d=>{l(),d&&(d.addEventListener(o,n,r),l=()=>{d.removeEventListener(o,n,r),l=z})},{immediate:!0,flush:"post"}),i=()=>{s(),l()};return xe(i),i}const L=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},A="__vueuse_ssr_handlers__";L[A]=L[A]||{};const Me=L[A];function We(e,a){return Me[e]||a}function Je(e){return e==null?"any":e instanceof Set?"set":e instanceof Map?"map":e instanceof Date?"date":typeof e=="boolean"?"boolean":typeof e=="string"?"string":typeof e=="object"||Array.isArray(e)?"object":Number.isNaN(e)?"any":"number"}const He={boolean:{read:e=>e==="true",write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}};function Ge(e,a,o,n={}){var r;const{flush:l="pre",deep:s=!0,listenToStorageChanges:i=!0,writeDefaults:d=!0,shallow:m,window:p=q,eventFilter:_,onError:g=u=>{console.error(u)}}=n,h=(m?t.shallowRef:t.ref)(a);if(!o)try{o=We("getDefaultStorage",()=>{var u;return(u=q)==null?void 0:u.localStorage})()}catch(u){g(u)}if(!o)return h;const S=t.unref(a),v=Je(S),O=(r=n.serializer)!=null?r:He[v],{pause:D,resume:T}=De(h,()=>U(h.value),{flush:l,deep:s,eventFilter:_});return p&&i&&Ue(p,"storage",y),y(),h;function U(u){try{u==null?o.removeItem(e):o.setItem(e,O.write(u))}catch(c){g(c)}}function M(u){if(!(u&&u.key!==e)){D();try{const c=u?u.newValue:o.getItem(e);return c==null?(d&&S!==null&&o.setItem(e,O.write(S)),S):typeof c!="string"?c:O.read(c)}catch(c){g(c)}finally{T()}}}function y(u){u&&u.key!==e||(h.value=M(u))}}var te;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(te||(te={}));const Ke=Oe("auth/user",{state:()=>({firstName:Ge("firstName",""),lastName:"",userId:null}),getters:{fullName:e=>`${e.firstName} ${e.lastName}`,loggedIn:e=>e.userId!==null,fullUserDetails(e){return{...e,fullName:this.fullName}}},actions:{updateUser(e){this.firstName=e.firstName,this.lastName=e.lastName,this.userId=e.userId},clearUser(){this.$reset()}}});var rt=(()=>`.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
|
|
9
|
-
`)();const Xe={class:"base-form"},Qe=["onSubmit"],Ye=t.defineComponent({__name:"base-form",props:{id:null,name:null,variant:null,disabled:{type:Boolean},pending:{type:Boolean}},setup(e){const a=Ke();t.computed(()=>a.firstName),t.computed(()=>a.fullName);function o(l){a.updateUser({firstName:l.target.value}),console.log("input",l)}function n(l){console.log("reset",l)}function r(l){console.log("submit",l)}return(l,s)=>(t.openBlock(),t.createElementBlock("div",Xe,[t.createElementVNode("form",{ref:"form",onInput:o,onReset:n,onSubmit:t.withModifiers(r,["prevent"])},[t.renderSlot(l.$slots,"default")],40,Qe)]))}});b.BaseButton=de,b.BaseForm=Ye,b.BaseIcon=ne,b.BaseInput=pe,b.CheckGroup=ge,b.LoadingSpinner=se,b.RadioGroup=Se,Object.defineProperties(b,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(r,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(r=typeof globalThis!="undefined"?globalThis:r||self,e(r.AblokComponents={},r.Vue))})(this,function(r,e){"use strict";var J=(()=>`.svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}
|
|
2
|
+
`)();const b={class:"icon",preserveAspectRatio:"xMaxYMin"},p=["xlink:href"],g=e.defineComponent({__name:"svg-icon",props:{basePath:{type:String,default:"/static/symbol-defs.svg"},prefix:{type:String,default:"icon-"},symbol:{type:String,default:""},size:{type:String,default:"default"}},setup(t){return(d,l)=>(e.openBlock(),e.createElementBlock("i",{class:e.normalizeClass(["svg-icon",{[`svg-icon--${t.size}`]:t.size}])},[(e.openBlock(),e.createElementBlock("svg",b,[e.createElementVNode("use",{"xlink:href":`${t.basePath}#${t.prefix}${t.symbol}`,"xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0",y:"0"},null,8,p)]))],2))}});var X=(()=>`.loading-spinner{min-width:2rem}
|
|
3
|
+
`)();const y={class:"loading-spinner d-block"},h={class:"loading-spinner__animation"},k={class:"d-block",version:"1.1",id:"L9",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink",x:"0px",y:"0px",viewBox:"0 0 100 100","enable-background":"new 0 0 0 0","xml:space":"preserve"},B=["fill"],S=[e.createElementVNode("animateTransform",{attributeName:"transform",attributeType:"XML",type:"rotate",dur:"1s",from:"0 50 50",to:"360 50 50",repeatCount:"indefinite"},null,-1)],$=e.defineComponent({__name:"loading-spinner",props:{color:{type:String,default:"#fff"}},setup(t){return(d,l)=>(e.openBlock(),e.createElementBlock("span",y,[e.createElementVNode("span",h,[(e.openBlock(),e.createElementBlock("svg",k,[e.createElementVNode("path",{fill:t.color,d:"M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"},S,8,B)]))]),e.renderSlot(d.$slots,"default")]))}});var H=(()=>`.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
|
|
4
|
+
`)();const V=["type","disabled","href","to"],x=e.defineComponent({__name:"base-button",props:{type:null,caption:null,variant:null,size:null,icon:null,href:null,to:null,disabled:{type:Boolean},pending:{type:Boolean},outlined:{type:Boolean},rounded:{type:Boolean},fab:{type:Boolean}},setup(t){const d=t,l=e.computed(()=>d.caption&&!d.fab);return(i,a)=>{const c=e.resolveComponent("svg-icon");return e.openBlock(),e.createElementBlock("button",{type:t.type,disabled:t.disabled,href:t.href,to:t.to,class:e.normalizeClass(["base-button btn btn-primary",{disabled:t.disabled,pending:t.pending,rounded:t.rounded,outlined:t.outlined,fab:t.fab,"x-large":t.size==="x-large",large:t.size==="large",small:t.size==="small","x-small":t.size==="x-small"}])},[e.renderSlot(i.$slots,"default",{},()=>[t.icon?(e.openBlock(),e.createBlock(c,{key:0,id:t.icon,class:"base-button__caption"},null,8,["id"])):e.createCommentVNode("",!0),e.unref(l)?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["base-button__caption",{"icon-padding":t.icon}])},e.toDisplayString(t.caption),3)):e.createCommentVNode("",!0)])],10,V)}}});function m(){return(new Date().valueOf()+Math.random()).toString(36)}const w={class:"base-input"},E={class:"input-group"},N=["type","name","id","label","placeholder","pattern","disabled","read-only","required","maxlength","checked","aria-label"],C=["for"],q=e.defineComponent({__name:"base-input",props:{modelValue:{type:[String,Number,Boolean],default:""},type:{type:String,default:"text"},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},label:{type:String,default:""},placeholder:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},maxlength:{type:Number},pattern:{type:String,default:null},checked:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t,i=e.computed({get(){return l.modelValue},set(a){d("update:modelValue",a)}});return(a,c)=>(e.openBlock(),e.createElementBlock("div",w,[e.createElementVNode("div",E,[e.renderSlot(a.$slots,"input-prepend"),e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":c[0]||(c[0]=n=>e.isRef(i)?i.value=n:null),type:t.type,name:t.name,id:t.id,label:`${t.label}${t.required?" *":""}`,placeholder:t.placeholder,pattern:t.pattern,disabled:t.disabled,"read-only":t.readOnly,required:t.required,maxlength:t.maxlength,checked:t.checked,class:"form-control","aria-label":t.label},null,8,N),[[e.vModelDynamic,e.unref(i)]]),e.renderSlot(a.$slots,"input-append")]),e.createElementVNode("label",{for:t.id},[e.renderSlot(a.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,C)]))}}),z={class:"radio-group"},O=["for"],M=e.defineComponent({__name:"check-group",props:{modelValue:{default:[]},options:{type:Array,default:[]},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:d}){const l=t,i=e.ref([]);return e.watch(()=>l.modelValue,(a,c)=>{i.value=l.options.map(n=>n.value?l.modelValue.some(o=>o["value "]===n.value):l.modelValue.some(o=>o===n))},{immediate:!0}),e.watch(i,(a,c)=>{const n=a.reduce((o,s,u)=>{const f=s&&l.options[u]?[l.options[u]||l.options[u]]:[];return[...o,...f]},[]);d("update:modelValue",n)},{deep:!0}),e.onBeforeMount(()=>{}),(a,c)=>{const n=e.resolveComponent("base-input");return e.openBlock(),e.createElementBlock("div",z,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(o,s)=>(e.openBlock(),e.createBlock(n,{key:s,modelValue:e.unref(i)[s],"onUpdate:modelValue":u=>e.unref(i)[s]=u,type:"checkbox",name:t.name,id:`${t.id}-${s}`,label:`${o.text||o}${t.required?" *":""}`,disabled:t.disabled,"read-only":t.readOnly,required:t.required},null,8,["modelValue","onUpdate:modelValue","name","id","label","disabled","read-only","required"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(a.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,O)])}}}),D={class:"radio-group"},T=["for"],L=e.defineComponent({__name:"radio-group",props:{modelValue:{default:!1},options:{type:Array,default:[]},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},label:{type:String,default:""},variant:{type:String,default:""},disabled:{type:Boolean,default:!1},readOnly:{type:Boolean,default:!1},required:{type:Boolean,default:!1}},emits:["change","update:modelValue"],setup(t,{emit:d}){const l=t;e.ref(l.options.map(a=>a.value===l.modelValue));function i(a){d("update:modelValue",a)}return e.onBeforeMount(()=>{}),(a,c)=>{const n=e.resolveComponent("base-input");return e.openBlock(),e.createElementBlock("div",D,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.options,(o,s)=>(e.openBlock(),e.createBlock(n,{key:s,type:"radio",name:t.name,id:`${t.id}-${s}`,value:o.value||o,label:`${o.text||o}${t.required?" *":""}`,checked:o.value?o.value===t.modelValue:o===t.modelValue,disabled:t.disabled,"read-only":t.readOnly,required:t.required,onChange:u=>i(o)},null,8,["name","id","value","label","checked","disabled","read-only","required","onChange"]))),128)),e.createElementVNode("label",{for:t.id},[e.renderSlot(a.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,T)])}}}),A={class:"input input-dropdown"},I={class:"dropdown"},P={class:"btn-group",role:"group"},j=["id","disabled"],F=["aria-labelledby"],R=["onClick"],U=["for"],G=e.defineComponent({__name:"input-dropdown",props:{modelValue:{type:[String,Number,Boolean,Object],default:""},name:{type:String,default:()=>m()},id:{type:String,default:()=>m()},label:{type:String,default:""},placeholder:{type:String,default:"Please select"},options:{type:Array,default:[]},variant:{type:String,default:""},color:{type:String,default:""},disabled:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},required:{type:Boolean,default:!1},resetOption:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:d}){const l=t;e.computed({get(){return l.modelValue},set(n){d("update:modelValue",n)}});function i(n){d("update:modelValue",n)}const a=e.computed(()=>[{text:"Please select"},...l.options.map(n=>typeof n=="string"?{value:n,text:n}:n)]),c=e.computed(()=>[...l.options].find(n=>JSON.stringify(n.value)===JSON.stringify(l.modelValue)));return(n,o)=>(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("div",I,[e.createElementVNode("div",P,[e.createElementVNode("button",{class:e.normalizeClass(["btn dropdown-toggle",{[`button-${t.variant}`]:t.variant,[`button-${t.color}`]:t.color,[`button-${t.disabled}`]:t.disabled}]),type:"button",id:t.id,"data-bs-toggle":"dropdown","aria-expanded":"false",disabled:t.disabled},e.toDisplayString(e.unref(c)?e.unref(c).text:t.placeholder),11,j),e.createElementVNode("ul",{class:"dropdown-menu","aria-labelledby":t.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),(s,u)=>(e.openBlock(),e.createElementBlock("li",{key:u},[e.renderSlot(n.$slots,"option",{},()=>[e.createElementVNode("a",{class:"dropdown-item",onClick:e.withModifiers(f=>i(s.value),["prevent"])},e.toDisplayString(s.text),9,R)])]))),128))],8,F)])]),e.createElementVNode("label",{for:t.id},[e.renderSlot(n.$slots,"label",{},()=>[e.createTextVNode(e.toDisplayString(t.label),1)])],8,U)]))}});r.BaseButton=x,r.BaseInput=q,r.CheckGroup=M,r.InputDropdown=G,r.LoadingSpinner=$,r.RadioGroup=L,r.SvgIcon=g,Object.defineProperties(r,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -105,15 +105,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
105
105
|
}>> & {
|
|
106
106
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
107
107
|
}, {
|
|
108
|
-
id: string;
|
|
109
108
|
checked: boolean;
|
|
110
109
|
required: boolean;
|
|
111
110
|
type: string;
|
|
112
111
|
label: string;
|
|
113
112
|
pattern: string;
|
|
114
113
|
modelValue: string | number | boolean;
|
|
115
|
-
|
|
114
|
+
id: string;
|
|
116
115
|
variant: string;
|
|
116
|
+
name: string;
|
|
117
117
|
disabled: boolean;
|
|
118
118
|
placeholder: string;
|
|
119
119
|
readOnly: boolean;
|
|
@@ -75,13 +75,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
75
75
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
76
76
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
77
77
|
}, {
|
|
78
|
-
|
|
78
|
+
options: any[];
|
|
79
79
|
required: boolean;
|
|
80
80
|
label: string;
|
|
81
81
|
modelValue: never[];
|
|
82
|
-
|
|
83
|
-
options: any[];
|
|
82
|
+
id: string;
|
|
84
83
|
variant: string;
|
|
84
|
+
name: string;
|
|
85
85
|
disabled: boolean;
|
|
86
86
|
readOnly: boolean;
|
|
87
87
|
}>;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
|
2
|
+
modelValue: {
|
|
3
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
name: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: () => string;
|
|
9
|
+
};
|
|
10
|
+
id: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: () => string;
|
|
13
|
+
};
|
|
14
|
+
label: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
placeholder: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
options: {
|
|
23
|
+
type: {
|
|
24
|
+
(arrayLength: number): any[];
|
|
25
|
+
(...items: any[]): any[];
|
|
26
|
+
new (arrayLength: number): any[];
|
|
27
|
+
new (...items: any[]): any[];
|
|
28
|
+
isArray(arg: any): arg is any[];
|
|
29
|
+
readonly prototype: any[];
|
|
30
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
31
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
32
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
33
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
34
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
35
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
36
|
+
};
|
|
37
|
+
default: never[];
|
|
38
|
+
};
|
|
39
|
+
variant: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
color: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
disabled: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
multiple: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
required: {
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
default: boolean;
|
|
58
|
+
};
|
|
59
|
+
resetOption: {
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
default: boolean;
|
|
62
|
+
};
|
|
63
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
64
|
+
modelValue: {
|
|
65
|
+
type: (BooleanConstructor | ObjectConstructor | StringConstructor | NumberConstructor)[];
|
|
66
|
+
default: string;
|
|
67
|
+
};
|
|
68
|
+
name: {
|
|
69
|
+
type: StringConstructor;
|
|
70
|
+
default: () => string;
|
|
71
|
+
};
|
|
72
|
+
id: {
|
|
73
|
+
type: StringConstructor;
|
|
74
|
+
default: () => string;
|
|
75
|
+
};
|
|
76
|
+
label: {
|
|
77
|
+
type: StringConstructor;
|
|
78
|
+
default: string;
|
|
79
|
+
};
|
|
80
|
+
placeholder: {
|
|
81
|
+
type: StringConstructor;
|
|
82
|
+
default: string;
|
|
83
|
+
};
|
|
84
|
+
options: {
|
|
85
|
+
type: {
|
|
86
|
+
(arrayLength: number): any[];
|
|
87
|
+
(...items: any[]): any[];
|
|
88
|
+
new (arrayLength: number): any[];
|
|
89
|
+
new (...items: any[]): any[];
|
|
90
|
+
isArray(arg: any): arg is any[];
|
|
91
|
+
readonly prototype: any[];
|
|
92
|
+
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
93
|
+
from<T_1, U>(arrayLike: ArrayLike<T_1>, mapfn: (v: T_1, k: number) => U, thisArg?: any): U[];
|
|
94
|
+
from<T_2>(iterable: Iterable<T_2> | ArrayLike<T_2>): T_2[];
|
|
95
|
+
from<T_3, U_1>(iterable: Iterable<T_3> | ArrayLike<T_3>, mapfn: (v: T_3, k: number) => U_1, thisArg?: any): U_1[];
|
|
96
|
+
of<T_4>(...items: T_4[]): T_4[];
|
|
97
|
+
readonly [Symbol.species]: ArrayConstructor;
|
|
98
|
+
};
|
|
99
|
+
default: never[];
|
|
100
|
+
};
|
|
101
|
+
variant: {
|
|
102
|
+
type: StringConstructor;
|
|
103
|
+
default: string;
|
|
104
|
+
};
|
|
105
|
+
color: {
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
default: string;
|
|
108
|
+
};
|
|
109
|
+
disabled: {
|
|
110
|
+
type: BooleanConstructor;
|
|
111
|
+
default: boolean;
|
|
112
|
+
};
|
|
113
|
+
multiple: {
|
|
114
|
+
type: BooleanConstructor;
|
|
115
|
+
default: boolean;
|
|
116
|
+
};
|
|
117
|
+
required: {
|
|
118
|
+
type: BooleanConstructor;
|
|
119
|
+
default: boolean;
|
|
120
|
+
};
|
|
121
|
+
resetOption: {
|
|
122
|
+
type: BooleanConstructor;
|
|
123
|
+
default: boolean;
|
|
124
|
+
};
|
|
125
|
+
}>> & {
|
|
126
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
127
|
+
}, {
|
|
128
|
+
options: any[];
|
|
129
|
+
required: boolean;
|
|
130
|
+
label: string;
|
|
131
|
+
modelValue: string | number | boolean | Record<string, any>;
|
|
132
|
+
id: string;
|
|
133
|
+
variant: string;
|
|
134
|
+
color: string;
|
|
135
|
+
name: string;
|
|
136
|
+
disabled: boolean;
|
|
137
|
+
placeholder: string;
|
|
138
|
+
multiple: boolean;
|
|
139
|
+
resetOption: boolean;
|
|
140
|
+
}>;
|
|
141
|
+
export default _default;
|
|
@@ -75,13 +75,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
75
75
|
onChange?: ((...args: any[]) => any) | undefined;
|
|
76
76
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
77
77
|
}, {
|
|
78
|
-
|
|
78
|
+
options: any[];
|
|
79
79
|
required: boolean;
|
|
80
80
|
label: string;
|
|
81
81
|
modelValue: boolean;
|
|
82
|
-
|
|
83
|
-
options: any[];
|
|
82
|
+
id: string;
|
|
84
83
|
variant: string;
|
|
84
|
+
name: string;
|
|
85
85
|
disabled: boolean;
|
|
86
86
|
readOnly: boolean;
|
|
87
87
|
}>;
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{
|
|
2
|
-
|
|
2
|
+
basePath: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
default: string;
|
|
5
|
+
};
|
|
6
|
+
prefix: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
symbol: {
|
|
3
11
|
type: StringConstructor;
|
|
4
12
|
default: string;
|
|
5
13
|
};
|
|
@@ -8,7 +16,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8
16
|
default: string;
|
|
9
17
|
};
|
|
10
18
|
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
11
|
-
|
|
19
|
+
basePath: {
|
|
20
|
+
type: StringConstructor;
|
|
21
|
+
default: string;
|
|
22
|
+
};
|
|
23
|
+
prefix: {
|
|
24
|
+
type: StringConstructor;
|
|
25
|
+
default: string;
|
|
26
|
+
};
|
|
27
|
+
symbol: {
|
|
12
28
|
type: StringConstructor;
|
|
13
29
|
default: string;
|
|
14
30
|
};
|
|
@@ -17,7 +33,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
17
33
|
default: string;
|
|
18
34
|
};
|
|
19
35
|
}>>, {
|
|
20
|
-
|
|
36
|
+
symbol: string;
|
|
21
37
|
size: string;
|
|
38
|
+
prefix: string;
|
|
39
|
+
basePath: string;
|
|
22
40
|
}>;
|
|
23
41
|
export default _default;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as
|
|
1
|
+
export { default as SvgIcon } from "./components/svg-icon.vue";
|
|
2
2
|
export { default as LoadingSpinner } from "./components/loading-spinner.vue";
|
|
3
3
|
export { default as BaseButton } from "./components/base-button.vue";
|
|
4
4
|
export { default as BaseInput } from "./components/base-input.vue";
|
|
5
5
|
export { default as CheckGroup } from "./components/check-group.vue";
|
|
6
6
|
export { default as RadioGroup } from "./components/radio-group.vue";
|
|
7
|
-
export { default as
|
|
7
|
+
export { default as InputDropdown } from "./components/input-dropdown.vue";
|
package/dist/main.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import "bootstrap/dist/css/bootstrap.min.css";
|
|
2
|
+
import "bootstrap";
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
.svg-icon{display:inline-block}.svg-icon svg{display:block;stroke-width:0;stroke:currentColor;fill:currentColor;width:1.5em;height:1.5em}.svg-icon--xxl svg{width:12rem;height:12rem}.svg-icon--xl svg{width:8rem;height:8rem}.svg-icon--large svg{width:4rem;height:4rem}.loading-spinner{min-width:2rem}.base-button{display:flex;justify-content:center;align-items:center;box-sizing:border-box;transition:all .2s ease;text-decoration:none;width:100%;margin:0;padding:1.036em 1.625em;appearance:none;outline:none;border:none;border-radius:.4375em;font-size:.875em;line-height:1.125em;text-transform:uppercase;font-weight:700}@media screen and (min-width: 600px){.base-button{width:auto}}.base-button .icon{width:16px;height:16px;margin-top:-1px}.base-button.s-collapsed>.caption{display:none}.base-button.s-pending{background-repeat:no-repeat;background-position:center center}.base-button.s-pending .caption{margin-left:25px;visibility:hidden}@media screen and (min-width: 600px){.base-button.s-pending{background-position:1.625em center}.base-button.s-pending .caption{visibility:visible}}.base-button[readonly],.base-button[disabled]{cursor:not-allowed}
|
package/package.json
CHANGED
package/dist/store/index.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
interface State {
|
|
2
|
-
firstName: string;
|
|
3
|
-
lastName: string;
|
|
4
|
-
userId: number | null;
|
|
5
|
-
}
|
|
6
|
-
export declare const useAuthUserStore: import("pinia").StoreDefinition<"auth/user", State, {
|
|
7
|
-
fullName: (state: {
|
|
8
|
-
firstName: string;
|
|
9
|
-
lastName: string;
|
|
10
|
-
userId: number | null;
|
|
11
|
-
} & import("pinia").PiniaCustomStateProperties<State>) => string;
|
|
12
|
-
loggedIn: (state: {
|
|
13
|
-
firstName: string;
|
|
14
|
-
lastName: string;
|
|
15
|
-
userId: number | null;
|
|
16
|
-
} & import("pinia").PiniaCustomStateProperties<State>) => boolean;
|
|
17
|
-
fullUserDetails(state: {
|
|
18
|
-
firstName: string;
|
|
19
|
-
lastName: string;
|
|
20
|
-
userId: number | null;
|
|
21
|
-
} & import("pinia").PiniaCustomStateProperties<State>): any;
|
|
22
|
-
}, {
|
|
23
|
-
updateUser(payload: any): void;
|
|
24
|
-
clearUser(): void;
|
|
25
|
-
}>;
|
|
26
|
-
export {};
|