@ldmjs/ui 1.0.62 → 1.0.63
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/css/index.css +2 -2
- package/dist/index.js +42 -40
- package/dist/lib/multiselect.js +1 -1
- package/dist/lib/toastification.js +1 -1
- package/dist/scss/_toasted-old.scss +409 -0
- package/dist/scss/index-old.scss +3 -1
- package/package.json +8 -6
package/dist/css/index.css
CHANGED
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
.v-toolbar[data-v-523d6f23]{position:relative;background-color:var(--white);box-shadow:var(--shadow-1);z-index:1}.toolbar-wrapper[data-v-523d6f23]{display:grid;width:100%;height:100%;padding:0 12px}.toolbar-wrapper[data-v-523d6f23]:not(.--preview){grid-template-columns:100%;grid-template-rows:var(--input-height);row-gap:4px}.toolbar-wrapper.--preview[data-v-523d6f23]{grid-template-columns:1fr}.toolbar-inner[data-v-523d6f23]{display:grid;grid-template-rows:100%;grid-template-columns:1fr max-content;column-gap:8px}.toolbar-caption[data-v-523d6f23]{--left: calc(var(--input-height) + 8px);display:flex;align-items:center;position:absolute;height:100%;width:calc(100% - var(--left));top:0;left:var(--left)}
|
|
9
9
|
.ld-radiobutton[data-v-a594d8d2]{display:flex;align-items:center;font-size:var(--font-size)}
|
|
10
10
|
.ld-ragiogroup .validate[data-v-37c165a8]{overflow:hidden;height:20px}.ld-ragiogroup--row[data-v-37c165a8] .ld-radiobutton:not(:first-child){margin-left:8px}
|
|
11
|
-
.ld-select[data-v-
|
|
11
|
+
.ld-select[data-v-62e30c6c]{position:relative;min-width:100%}.ld-select[data-v-62e30c6c] .v-field__append-inner{display:none}.ld-select[data-v-62e30c6c] .v-select{position:relative}.ld-select[data-v-62e30c6c] .v-select:before{display:block;position:absolute;right:20px;top:calc(var(--input-height)/2);margin-top:-2px;color:var(--grey);border-style:solid;border-width:5px 5px 0;border-color:var(--grey) rgba(0,0,0,0) rgba(0,0,0,0);transition:transform .2s ease;content:"";z-index:1}.ld-select[data-v-62e30c6c] .v-input--readonly:before{opacity:.6}.ld-select[data-v-62e30c6c] .v-select--active-menu:before{transform:rotate(180deg)}input[type=checkbox]+.v-icon[data-v-62e30c6c]{display:block;width:12px !important;height:12px !important;font-size:10px !important;background-color:var(--white);color:rgba(0,0,0,0);border:1px solid var(--grey-l-5)}input[type=checkbox]:checked+.v-icon[data-v-62e30c6c]{background-color:var(--primary-l-2);color:var(--white);font-size:10px;font-weight:bold}.v-list-item--density-compact.v-list-item--one-line[data-v-62e30c6c]{min-height:var(--input-height)}.v-list-item--density-compact.v-list-item--one-line[data-v-62e30c6c] .v-list-item__content{display:flex;flex-wrap:nowrap}.v-list-item--density-compact.v-list-item--one-line[data-v-62e30c6c] .v-list-item__content .v-list-item-title{font-size:var(--font-size)}
|
|
12
12
|
.ld-select-list-box[data-v-b07abeb4]{display:flex;min-width:100%;max-width:100%;width:100%}.ld-select-list-box .select-list-box-validate[data-v-b07abeb4]{overflow:hidden;height:20px}.ld-select-list-box .select-list-box-loading[data-v-b07abeb4]{position:absolute;left:0;bottom:0;width:calc(100% - var(--input-height));height:3px;overflow:hidden;background-color:var(--grey-l-5)}.ld-select-list-box .select-list-box-loading[data-v-b07abeb4]:before{content:"";display:block;position:absolute;top:0;left:0;width:25%;height:100%;background-color:var(--primary);animation:loading-b07abeb4 1.4s linear;animation-iteration-count:infinite}@keyframes loading-b07abeb4{from{transform:translateX(-300%)}to{transform:translateX(500%)}}
|
|
13
13
|
.ld-splitter[data-v-57e95903]{height:inherit;display:flex}.ld-splitter .splitter-pane[data-v-57e95903]{height:inherit;overflow-y:auto;background:var(--white)}.ld-splitter .splitter[data-v-57e95903]{display:flex;background-color:var(--white) !important;border-color:var(--grey-l-5);border-style:solid}.ld-splitter .splitter--hor[data-v-57e95903]{justify-content:center;width:100%;height:7px;cursor:ns-resize;border-width:1px 0}.ld-splitter .splitter--hor.splitter--disabled[data-v-57e95903]{height:1px;border-top:none}.ld-splitter .splitter--ver[data-v-57e95903]{align-items:center;width:7px;height:100%;cursor:ew-resize;border-width:0 1px}.ld-splitter .splitter--ver.splitter--disabled[data-v-57e95903]{width:1px;border-left:none}.ld-splitter .splitter--disabled[data-v-57e95903]{cursor:default}.ld-splitter .splitter--disabled svg[data-v-57e95903]{display:none}.ld-splitter.splitter[data-v-57e95903]{width:100%;border-left:none;border-right:none}
|
|
14
14
|
.ld-switch[data-v-102cfd42] .v-switch{display:block}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control{min-height:var(--input-height) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control .v-selection-control__wrapper{width:40px}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control:not(.v-selection-control--dirty) .v-selection-control__input{transform:translateX(-12px)}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control:not(.v-selection-control--dirty) .v-switch__track{color:var(--grey-l-4) !important;background-color:var(--grey-l-4) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control .v-switch__track{opacity:1;width:40px}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control--dirty .v-selection-control__input{transform:translateX(12px)}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control--dirty .v-switch__thumb{color:var(--primary-l-3) !important;background-color:var(--primary-l-3) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control--dirty .v-switch__track{opacity:1;background-color:var(--primary-l-2) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control--dirty .v-label{color:var(--primary-l-2) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control .v-switch__thumb{color:var(--white) !important}.ld-switch[data-v-102cfd42] .v-switch .v-selection-control .v-label{padding-inline-start:4px}
|
|
15
15
|
.ld-tabs[data-v-0a53a285]{margin-left:0;display:flex;height:100%;width:100%;overflow-y:auto}.ld-tabs .header-text[data-v-0a53a285]{font-size:var(--font-size-2)}.ld-tabs-mobile[data-v-0a53a285]{height:100%}.ld-tabs .vertical-body[data-v-0a53a285]{--w: 44px;display:flex;flex-flow:column nowrap;width:calc(100% - var(--w)) !important;height:100%}.v-window[data-v-0a53a285]{background-color:var(--white);box-shadow:1px 0 var(--grey-l-5),-1px 0 0 var(--grey-l-5);overflow-y:auto;height:100%;width:100%}.vertical-window.v-window[data-v-0a53a285]{padding:10px 12px;border-bottom:1px solid var(--grey-l-5);border-right:1px solid var(--grey-l-5);border-top:1px solid var(--grey-l-5)}.vertical-window.v-window--no-padding[data-v-0a53a285]{padding:0 !important}[data-v-0a53a285] .ld-tabs .v-tabs--vertical{background:var(--grey-l-6)}[data-v-0a53a285] .ld-tabs .v-tabs--vertical .v-tab{justify-content:flex-start;border:1px solid var(--grey-l-5);border-bottom:none;border-radius:0 !important;text-transform:none !important;width:100%;min-width:auto !important}[data-v-0a53a285] .ld-tabs .v-tabs--vertical .v-tab--selected{background-color:var(--white);border-right-color:rgba(0,0,0,0)}[data-v-0a53a285] .ld-tabs .v-tabs--vertical .v-tab:last-child{border-bottom:1px solid var(--grey-l-5) !important}[data-v-0a53a285] .ld-tabs .v-tabs--vertical .v-slide-group__content{flex-flow:column nowrap;height:100% !important;width:100% !important}[data-v-0a53a285] .ld-tabs .v-tabs--vertical .v-slide-group__content .v-btn__content{text-overflow:ellipsis;display:inline-flex;justify-content:flex-start;gap:4px;white-space:nowrap;overflow:hidden}[data-v-0a53a285] .ld-tabs .v-tabs--horizontal .v-tab--selected{border-bottom:1px solid var(--primary)}[data-v-0a53a285] .ld-tabs .v-tabs .v-tab--selected .v-btn__content{font-weight:bold;color:var(--primary) !important}[data-v-0a53a285] .ld-tabs .v-tab{height:var(--ld-tab-height) !important;display:flex !important;text-transform:uppercase !important;padding:0 12px !important;font-size:var(--font-size);color:var(--text) !important;letter-spacing:0 !important}[data-v-0a53a285] .v-window.mobile .tg-field .v-row .v-col{flex:1 0 0 !important}[data-v-0a53a285] .v-window.mobile .tg-field .text-viewer-wrapper .v-col{flex:1 0 0 !important}[data-v-0a53a285] .v-slide-group--vertical{border-color:var(--grey-l-5);border:1px}[data-v-0a53a285] .v-slide-group--vertical .v-tab__slider{width:0px}[data-v-0a53a285] .v-slide-group__prev{display:none}[data-v-0a53a285] .v-slide-group__next{display:none}[data-v-0a53a285] .v-tabs-bar{flex:none;height:fit-content;height:-moz-max-content;max-height:fit-content;max-height:-moz-max-content;z-index:1}[data-v-0a53a285] .v-window-item{height:100%}[data-v-0a53a285] .ld-tabs-mobile.hide-tabs .v-tab{display:none !important}[data-v-0a53a285] .ld-tabs-mobile.hide-body .v-slide-group{width:100% !important}[data-v-0a53a285] .ld-tabs-mobile.hide-body .v-window{display:none !important}[data-v-0a53a285] .v-tabs-mobile .v-slide-group__content .v-btn__content{display:block !important}
|
|
16
|
-
.ld-text-markup[data-v-
|
|
16
|
+
.ld-text-markup[data-v-39d8de09]{display:flex;flex-direction:column;min-width:100%;max-width:100%;width:100%;min-height:180px;padding-bottom:18px}.ld-text-markup__content[data-v-39d8de09]{position:relative;z-index:0;flex-basis:100%;font-size:var(--font-size);color:var(--text)}.ld-text-markup__content .md-editor[data-v-39d8de09]{height:100%}.ld-text-markup__content.contentbox[data-v-39d8de09]{border:1px solid var(--grey-l-4);background-color:var(--white);border-radius:0 4px 4px 4px;padding:10px}.ld-text-markup-validate[data-v-39d8de09]{overflow:hidden;height:20px;flex-grow:0}.content-wrapper[data-v-39d8de09]{display:flex;flex-direction:column;position:relative;background-color:var(--grey-l-6);border-radius:4px}.tabs-wrapper[data-v-39d8de09]{position:relative;display:flex;width:50%;max-width:155px;margin-bottom:-1px;z-index:1;flex-shrink:0}.tabs-wrapper .v-btn[data-v-39d8de09]{border:1px solid var(--grey-l-5);height:30px !important;opacity:.6;border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.tabs-wrapper .v-btn[data-v-39d8de09]:before,.tabs-wrapper .v-btn[data-v-39d8de09]:after{display:none}.tabs-wrapper .v-btn.active[data-v-39d8de09]{background-color:var(--white);border:1px solid var(--grey-l-4);border-bottom:none;opacity:1}[data-v-39d8de09] .contentbox ul{padding:0 12px;list-style:disc;margin-bottom:8px}[data-v-39d8de09] .contentbox ol{list-style:decimal;padding:0 12px;margin-bottom:8px}[data-v-39d8de09] .contentbox p{margin-bottom:8px}[data-v-39d8de09] .contentbox pre{padding:4px}[data-v-39d8de09] .contentbox code{background:none;color:var(--text);padding:0;font-size:100%}[data-v-39d8de09] .md-editor{border:1px solid var(--grey-l-4)}
|
|
17
17
|
.ld-text-viewer[data-v-1c947720]{min-width:100%;display:flex;flex-direction:column;white-space:break-spaces;font-size:var(--font-size)}.ld-text-viewer .column[data-v-1c947720]{flex-flow:column}
|
|
18
18
|
.ld-textarea[data-v-5e5438c4]{display:flex;min-width:100%;max-width:100%;width:100%}[data-v-5e5438c4] .none-resizable textarea{resize:none}
|
|
19
19
|
.time-selector[data-v-9234c0ce]{display:flex;flex-wrap:wrap;max-width:186px;padding:3px}.time-selector>span[data-v-9234c0ce]{display:inline-block;width:100%;text-align:center;font-family:"Roboto";font-size:var(--font-size-2);font-weight:700}.time-selector .v-btn[data-v-9234c0ce]{width:30px !important;height:30px !important;max-width:30px !important;max-height:30px !important;min-width:30px !important;min-height:30px !important;margin:3px}.ld-timepicker-validate[data-v-9234c0ce]{overflow:hidden;height:20px}
|
package/dist/index.js
CHANGED
|
@@ -761,14 +761,10 @@ function ld_button_reg(vue, options) {
|
|
|
761
761
|
}
|
|
762
762
|
/* harmony default export */ const src_ld_button = (ld_button_reg);
|
|
763
763
|
|
|
764
|
-
;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=
|
|
764
|
+
;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=1a9ec920&ts=true
|
|
765
765
|
|
|
766
|
-
const
|
|
767
|
-
|
|
768
|
-
style: { "position": "relative" }
|
|
769
|
-
};
|
|
770
|
-
const ld_checkboxvue_type_template_id_679db818_ts_true_hoisted_2 = ["checked", "data-testid", "tabindex", "disabled"];
|
|
771
|
-
function ld_checkboxvue_type_template_id_679db818_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
766
|
+
const ld_checkboxvue_type_template_id_1a9ec920_ts_true_hoisted_1 = ["checked", "data-testid", "tabindex", "disabled"];
|
|
767
|
+
function ld_checkboxvue_type_template_id_1a9ec920_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
772
768
|
const _component_v_tooltip = (0,external_vue_.resolveComponent)("v-tooltip");
|
|
773
769
|
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
|
|
774
770
|
class: (0,external_vue_.normalizeClass)(["ld-checkbox", { 'ld-checkbox--focused': _ctx.isFocused }])
|
|
@@ -803,7 +799,11 @@ function ld_checkboxvue_type_template_id_679db818_ts_true_render(_ctx, _cache, $
|
|
|
803
799
|
]))
|
|
804
800
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
805
801
|
_cache[9] || (_cache[9] = (0,external_vue_.createTextVNode)()),
|
|
806
|
-
(0,external_vue_.createElementVNode)("label",
|
|
802
|
+
(0,external_vue_.createElementVNode)("label", {
|
|
803
|
+
class: "d-flex align-center",
|
|
804
|
+
style: { "position": "relative" },
|
|
805
|
+
onClick: (0,external_vue_.withModifiers)(() => null, ["stop"])
|
|
806
|
+
}, [
|
|
807
807
|
(0,external_vue_.createElementVNode)("input", {
|
|
808
808
|
ref: "checkbox",
|
|
809
809
|
type: "checkbox",
|
|
@@ -820,7 +820,7 @@ function ld_checkboxvue_type_template_id_679db818_ts_true_render(_ctx, _cache, $
|
|
|
820
820
|
onInput: _cache[3] || (_cache[3] =
|
|
821
821
|
//@ts-ignore
|
|
822
822
|
(...args) => (_ctx.onChange && _ctx.onChange(...args)))
|
|
823
|
-
}, null, 40,
|
|
823
|
+
}, null, 40, ld_checkboxvue_type_template_id_1a9ec920_ts_true_hoisted_1),
|
|
824
824
|
_cache[6] || (_cache[6] = (0,external_vue_.createTextVNode)()),
|
|
825
825
|
_cache[7] || (_cache[7] = (0,external_vue_.createElementVNode)("i", { class: "v-icon" }, [
|
|
826
826
|
(0,external_vue_.createElementVNode)("svg", {
|
|
@@ -874,7 +874,7 @@ function ld_checkboxvue_type_template_id_679db818_ts_true_render(_ctx, _cache, $
|
|
|
874
874
|
], 2));
|
|
875
875
|
}
|
|
876
876
|
|
|
877
|
-
;// ./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=
|
|
877
|
+
;// ./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=1a9ec920&ts=true
|
|
878
878
|
|
|
879
879
|
;// ./src/mixins/grid.mixin.ts
|
|
880
880
|
var grid_mixin_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -1236,7 +1236,7 @@ ld_checkboxvue_type_script_lang_ts_external_decorate([
|
|
|
1236
1236
|
;
|
|
1237
1237
|
|
|
1238
1238
|
|
|
1239
|
-
const ld_checkbox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(CheckboxComponent, [['render',
|
|
1239
|
+
const ld_checkbox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(CheckboxComponent, [['render',ld_checkboxvue_type_template_id_1a9ec920_ts_true_render]])
|
|
1240
1240
|
|
|
1241
1241
|
/* harmony default export */ const ld_checkbox = (ld_checkbox_exports_);
|
|
1242
1242
|
;// ./src/ld-checkbox/index.ts
|
|
@@ -4800,7 +4800,7 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
4800
4800
|
onCheckItem(checked, item) {
|
|
4801
4801
|
if (Array.isArray(this.selected)) {
|
|
4802
4802
|
const id = this.itemIdentity(item);
|
|
4803
|
-
if (
|
|
4803
|
+
if (this.checkedItems.includes(id)) {
|
|
4804
4804
|
this.selected = this.selected.filter(el => this.itemIdentity(el) !== id);
|
|
4805
4805
|
}
|
|
4806
4806
|
else {
|
|
@@ -7045,7 +7045,7 @@ function fileToBase64(file) {
|
|
|
7045
7045
|
const reader = new FileReader();
|
|
7046
7046
|
reader.readAsDataURL(file);
|
|
7047
7047
|
reader.onload = () => {
|
|
7048
|
-
let fileStr = reader.result
|
|
7048
|
+
let fileStr = String(reader.result);
|
|
7049
7049
|
if (fileStr.includes(',')) {
|
|
7050
7050
|
fileStr = fileStr.split(',')[1];
|
|
7051
7051
|
}
|
|
@@ -11291,16 +11291,16 @@ function ld_radiogroup_reg(vue, options) {
|
|
|
11291
11291
|
}
|
|
11292
11292
|
/* harmony default export */ const src_ld_radiogroup = (ld_radiogroup_reg);
|
|
11293
11293
|
|
|
11294
|
-
;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-select/ld-select.vue?vue&type=template&id=
|
|
11294
|
+
;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-select/ld-select.vue?vue&type=template&id=62e30c6c&scoped=true&ts=true
|
|
11295
11295
|
|
|
11296
|
-
const
|
|
11297
|
-
const
|
|
11296
|
+
const ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_hoisted_1 = { class: "ld-select" };
|
|
11297
|
+
const ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_hoisted_2 = {
|
|
11298
11298
|
key: 1,
|
|
11299
11299
|
class: "text-crop"
|
|
11300
11300
|
};
|
|
11301
|
-
const
|
|
11302
|
-
const
|
|
11303
|
-
function
|
|
11301
|
+
const ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_hoisted_3 = { class: "justify mr-2 flex items-center" };
|
|
11302
|
+
const ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_hoisted_4 = ["checked"];
|
|
11303
|
+
function ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
11304
11304
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
|
|
11305
11305
|
const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
|
|
11306
11306
|
const _component_v_icon = (0,external_vue_.resolveComponent)("v-icon");
|
|
@@ -11308,7 +11308,7 @@ function ld_selectvue_type_template_id_42f0b8ce_scoped_true_ts_true_render(_ctx,
|
|
|
11308
11308
|
const _component_v_select = (0,external_vue_.resolveComponent)("v-select");
|
|
11309
11309
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
|
|
11310
11310
|
const _component_v_row = (0,external_vue_.resolveComponent)("v-row");
|
|
11311
|
-
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
11311
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_hoisted_1, [
|
|
11312
11312
|
(0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
|
|
11313
11313
|
default: (0,external_vue_.withCtx)(() => [
|
|
11314
11314
|
(_ctx.label)
|
|
@@ -11342,9 +11342,11 @@ function ld_selectvue_type_template_id_42f0b8ce_scoped_true_ts_true_render(_ctx,
|
|
|
11342
11342
|
"error-messages": _ctx.validationMessage,
|
|
11343
11343
|
readonly: _ctx.readonly,
|
|
11344
11344
|
disabled: _ctx.disabled,
|
|
11345
|
-
"menu-props":
|
|
11346
|
-
|
|
11347
|
-
|
|
11345
|
+
"menu-props": _ctx.multiselect
|
|
11346
|
+
? {
|
|
11347
|
+
modelValue: _ctx.menu,
|
|
11348
|
+
}
|
|
11349
|
+
: undefined,
|
|
11348
11350
|
onBlur: _ctx.onBlur,
|
|
11349
11351
|
onFocus: _ctx.onFocus,
|
|
11350
11352
|
onClick: _ctx.onClick
|
|
@@ -11379,7 +11381,7 @@ function ld_selectvue_type_template_id_42f0b8ce_scoped_true_ts_true_render(_ctx,
|
|
|
11379
11381
|
: (0,external_vue_.createCommentVNode)("", true)
|
|
11380
11382
|
], 64))
|
|
11381
11383
|
], 64))
|
|
11382
|
-
: ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span",
|
|
11384
|
+
: ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_hoisted_2, (0,external_vue_.toDisplayString)(item.title), 1))
|
|
11383
11385
|
]),
|
|
11384
11386
|
item: (0,external_vue_.withCtx)(({ item, props }) => [
|
|
11385
11387
|
(0,external_vue_.createVNode)(_component_v_list_item, (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)(props)), (0,external_vue_.createSlots)({ _: 2 }, [
|
|
@@ -11387,13 +11389,13 @@ function ld_selectvue_type_template_id_42f0b8ce_scoped_true_ts_true_render(_ctx,
|
|
|
11387
11389
|
? {
|
|
11388
11390
|
name: "prepend",
|
|
11389
11391
|
fn: (0,external_vue_.withCtx)(() => [
|
|
11390
|
-
(0,external_vue_.createElementVNode)("label",
|
|
11392
|
+
(0,external_vue_.createElementVNode)("label", ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_hoisted_3, [
|
|
11391
11393
|
(0,external_vue_.createElementVNode)("input", {
|
|
11392
11394
|
ref: "checkbox",
|
|
11393
11395
|
type: "checkbox",
|
|
11394
11396
|
class: "d-none",
|
|
11395
11397
|
checked: _ctx.itemSelected(item.raw)
|
|
11396
|
-
}, null, 8,
|
|
11398
|
+
}, null, 8, ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_hoisted_4),
|
|
11397
11399
|
_cache[1] || (_cache[1] = (0,external_vue_.createTextVNode)()),
|
|
11398
11400
|
(0,external_vue_.createVNode)(_component_v_icon, {
|
|
11399
11401
|
icon: "check",
|
|
@@ -11422,7 +11424,7 @@ function ld_selectvue_type_template_id_42f0b8ce_scoped_true_ts_true_render(_ctx,
|
|
|
11422
11424
|
]));
|
|
11423
11425
|
}
|
|
11424
11426
|
|
|
11425
|
-
;// ./src/ld-select/ld-select.vue?vue&type=template&id=
|
|
11427
|
+
;// ./src/ld-select/ld-select.vue?vue&type=template&id=62e30c6c&scoped=true&ts=true
|
|
11426
11428
|
|
|
11427
11429
|
;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-select/ld-select.ts?vue&type=script&lang=ts&external
|
|
11428
11430
|
var ld_selectvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -11713,7 +11715,7 @@ SelectComponent = ld_selectvue_type_script_lang_ts_external_decorate([
|
|
|
11713
11715
|
;
|
|
11714
11716
|
|
|
11715
11717
|
|
|
11716
|
-
const ld_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_selectvue_type_script_lang_ts_external, [['render',
|
|
11718
|
+
const ld_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_selectvue_type_script_lang_ts_external, [['render',ld_selectvue_type_template_id_62e30c6c_scoped_true_ts_true_render],['__scopeId',"data-v-62e30c6c"]])
|
|
11717
11719
|
|
|
11718
11720
|
/* harmony default export */ const ld_select = (ld_select_exports_);
|
|
11719
11721
|
;// ./src/ld-select/index.ts
|
|
@@ -13279,19 +13281,19 @@ function ld_tabs_reg(vue, options) {
|
|
|
13279
13281
|
}
|
|
13280
13282
|
/* harmony default export */ const src_ld_tabs = (ld_tabs_reg);
|
|
13281
13283
|
|
|
13282
|
-
;// ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-text-markup/ld-text-markup.vue?vue&type=template&id=
|
|
13284
|
+
;// ./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-text-markup/ld-text-markup.vue?vue&type=template&id=39d8de09&scoped=true
|
|
13283
13285
|
|
|
13284
13286
|
|
|
13285
|
-
const
|
|
13286
|
-
const
|
|
13287
|
-
const
|
|
13287
|
+
const ld_text_markupvue_type_template_id_39d8de09_scoped_true_hoisted_1 = { class: "ld-text-markup" }
|
|
13288
|
+
const ld_text_markupvue_type_template_id_39d8de09_scoped_true_hoisted_2 = { class: "tabs-wrapper" }
|
|
13289
|
+
const ld_text_markupvue_type_template_id_39d8de09_scoped_true_hoisted_3 = {
|
|
13288
13290
|
key: "editor",
|
|
13289
|
-
class: "
|
|
13291
|
+
class: "ld-text-markup__content editorbox",
|
|
13290
13292
|
style: {"visibility":"hidden"},
|
|
13291
13293
|
id: "editorbox"
|
|
13292
13294
|
}
|
|
13293
13295
|
|
|
13294
|
-
function
|
|
13296
|
+
function ld_text_markupvue_type_template_id_39d8de09_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
13295
13297
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label")
|
|
13296
13298
|
const _component_v_btn = (0,external_vue_.resolveComponent)("v-btn")
|
|
13297
13299
|
const _component_v_runtime_template = (0,external_vue_.resolveComponent)("v-runtime-template")
|
|
@@ -13299,7 +13301,7 @@ function ld_text_markupvue_type_template_id_49e3d28e_scoped_true_render(_ctx, _c
|
|
|
13299
13301
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col")
|
|
13300
13302
|
const _component_v_row = (0,external_vue_.resolveComponent)("v-row")
|
|
13301
13303
|
|
|
13302
|
-
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
13304
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_text_markupvue_type_template_id_39d8de09_scoped_true_hoisted_1, [
|
|
13303
13305
|
(0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
|
|
13304
13306
|
default: (0,external_vue_.withCtx)(() => [
|
|
13305
13307
|
(_ctx.label)
|
|
@@ -13316,7 +13318,7 @@ function ld_text_markupvue_type_template_id_49e3d28e_scoped_true_render(_ctx, _c
|
|
|
13316
13318
|
class: (0,external_vue_.normalizeClass)([_ctx.inputSizeClasses, "pa-1 content-wrapper"])
|
|
13317
13319
|
}, {
|
|
13318
13320
|
default: (0,external_vue_.withCtx)(() => [
|
|
13319
|
-
(0,external_vue_.createElementVNode)("div",
|
|
13321
|
+
(0,external_vue_.createElementVNode)("div", ld_text_markupvue_type_template_id_39d8de09_scoped_true_hoisted_2, [
|
|
13320
13322
|
(0,external_vue_.createVNode)(_component_v_btn, {
|
|
13321
13323
|
class: (0,external_vue_.normalizeClass)(["small-button", { active: !_ctx.isPreviewActive }]),
|
|
13322
13324
|
variant: "outlined",
|
|
@@ -13353,7 +13355,7 @@ function ld_text_markupvue_type_template_id_49e3d28e_scoped_true_render(_ctx, _c
|
|
|
13353
13355
|
}, null, 8, ["template"]))
|
|
13354
13356
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
13355
13357
|
_cache[3] || (_cache[3] = (0,external_vue_.createTextVNode)()),
|
|
13356
|
-
(0,external_vue_.withDirectives)((0,external_vue_.createElementVNode)("div",
|
|
13358
|
+
(0,external_vue_.withDirectives)((0,external_vue_.createElementVNode)("div", ld_text_markupvue_type_template_id_39d8de09_scoped_true_hoisted_3, [
|
|
13357
13359
|
(0,external_vue_.createVNode)(_component_md_editor, {
|
|
13358
13360
|
modelValue: _ctx.value,
|
|
13359
13361
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => ((_ctx.value) = $event)),
|
|
@@ -13412,7 +13414,7 @@ function ld_text_markupvue_type_template_id_49e3d28e_scoped_true_render(_ctx, _c
|
|
|
13412
13414
|
: (0,external_vue_.createCommentVNode)("", true)
|
|
13413
13415
|
]))
|
|
13414
13416
|
}
|
|
13415
|
-
;// ./src/ld-text-markup/ld-text-markup.vue?vue&type=template&id=
|
|
13417
|
+
;// ./src/ld-text-markup/ld-text-markup.vue?vue&type=template&id=39d8de09&scoped=true
|
|
13416
13418
|
|
|
13417
13419
|
// EXTERNAL MODULE: external "md-editor-v3"
|
|
13418
13420
|
var external_md_editor_v3_ = __webpack_require__(6443);
|
|
@@ -13639,7 +13641,7 @@ let TextMarkupComponent = class TextMarkupComponent extends (0,external_vue_clas
|
|
|
13639
13641
|
try {
|
|
13640
13642
|
let html = this.md.render(plainText);
|
|
13641
13643
|
html = html.replace(/<br>/g, '<br>');
|
|
13642
|
-
this.template = '<div class="
|
|
13644
|
+
this.template = '<div class="ld-text-markup__content contentbox"><div>' + html + '</div></div>';
|
|
13643
13645
|
}
|
|
13644
13646
|
catch (e) {
|
|
13645
13647
|
/* eslint-disable no-console */
|
|
@@ -13732,7 +13734,7 @@ TextMarkupComponent = ld_text_markupvue_type_script_lang_js_external_decorate([
|
|
|
13732
13734
|
;
|
|
13733
13735
|
|
|
13734
13736
|
|
|
13735
|
-
const ld_text_markup_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_text_markupvue_type_script_lang_js_external, [['render',
|
|
13737
|
+
const ld_text_markup_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_text_markupvue_type_script_lang_js_external, [['render',ld_text_markupvue_type_template_id_39d8de09_scoped_true_render],['__scopeId',"data-v-39d8de09"]])
|
|
13736
13738
|
|
|
13737
13739
|
/* harmony default export */ const ld_text_markup = (ld_text_markup_exports_);
|
|
13738
13740
|
;// ./src/ld-text-markup/index.ts
|
package/dist/lib/multiselect.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):"object"===typeof exports?exports["ldmui"]=t(require("vue")):e["ldmui"]=t(e["vue"])})(self,(e=>(()=>{"use strict";var t={6262:(e,t)=>{t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[e,s]of t)i[e]=s;return i}},2380:t=>{t.exports=e}},i={};function __webpack_require__(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,__webpack_require__),l.exports}(()=>{__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var s={};__webpack_require__.r(s),__webpack_require__.d(s,{default:()=>N});var l=__webpack_require__(2380);const o=["tabindex","aria-owns"],n={ref:"tags",class:"multiselect__tags"},r={class:"multiselect__tags-wrap"},a=["textContent"],h=["onKeypress","onMousedown"],p={class:"multiselect__tag"},c=["textContent"],u={class:"multiselect__spinner"},d=["name","id","placeholder","value","disabled","tabindex","aria-controls"],m=["id"],g={key:0},f={class:"multiselect__option"},b=["id","role"],y=["onClick","onMouseenter","data-select","data-selected","data-deselect"],w=["data-select","data-deselect","onMouseenter","onMousedown"],V={class:"multiselect__option"},v={class:"multiselect__option"};function render(e,t,i,s,_,S){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{tabindex:e.searchable?-1:i.tabindex,class:(0,l.normalizeClass)([[e.uid?"multiselect"+e.uid:"",{"multiselect--active":e.isOpen,"multiselect--disabled":i.disabled,"multiselect--above":S.isAbove,"multiselect--has-options-group":S.hasOptionGroup,"multiselect--list-empty":e.isOpen&&!S.showNoResultsSlot&&!S.showNoOptionsSlot&&0===e.filteredOptions.length}],"multiselect"]),onFocus:t[12]||(t[12]=t=>e.activate()),onBlur:t[13]||(t[13]=t=>!e.searchable&&e.deactivate()),onKeydown:[t[14]||(t[14]=(0,l.withKeys)((0,l.withModifiers)((t=>e.pointerForward()),["self","prevent"]),["down"])),t[15]||(t[15]=(0,l.withKeys)((0,l.withModifiers)((t=>e.pointerBackward()),["self","prevent"]),["up"]))],onKeypress:t[16]||(t[16]=(0,l.withKeys)((0,l.withModifiers)((t=>e.addPointerElement(t)),["stop","self"]),["enter","tab"])),onKeyup:t[17]||(t[17]=(0,l.withKeys)((t=>e.deactivate()),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"caret",{toggle:e.toggle},(()=>[(0,l.createElementVNode)("div",{onMousedown:t[0]||(t[0]=(0,l.withModifiers)((t=>e.toggle()),["prevent","stop"])),class:"multiselect__select"},null,32)])),t[32]||(t[32]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"clear",{search:e.search}),t[33]||(t[33]=(0,l.createTextVNode)()),(0,l.createElementVNode)("div",n,[(0,l.renderSlot)(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:S.visibleValues,isOpen:e.isOpen},(()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",r,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(S.visibleValues,((i,s)=>(0,l.renderSlot)(e.$slots,"tag",{option:i,search:e.search,remove:e.removeElement},(()=>[((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:"multiselect__tag",key:s},[(0,l.createElementVNode)("span",{textContent:(0,l.toDisplayString)(e.getOptionLabel(i))},null,8,a),t[18]||(t[18]=(0,l.createTextVNode)()),(0,l.createElementVNode)("i",{tabindex:"1",onKeypress:(0,l.withKeys)((0,l.withModifiers)((t=>e.removeElement(i)),["prevent"]),["enter"]),onMousedown:(0,l.withModifiers)((t=>e.removeElement(i)),["prevent"]),class:"multiselect__tag-icon"},null,40,h)]))])))),256)),t[19]||(t[19]=(0,l.createTextVNode)()),e.internalValue&&e.internalValue.length>i.limit?(0,l.renderSlot)(e.$slots,"tag-overflow",{key:0,limit:i.limit,count:e.internalValue.length},(()=>[(0,l.createElementVNode)("span",p,[(0,l.createElementVNode)("strong",{class:"multiselect__strong",textContent:(0,l.toDisplayString)(i.limitText(e.internalValue.length-i.limit))},null,8,c)])])):(0,l.createCommentVNode)("",!0)],512),[[l.vShow,S.visibleValues.length>0]])])),t[20]||(t[20]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect__loading"},{default:(0,l.withCtx)((()=>[(0,l.renderSlot)(e.$slots,"loading",{},(()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",u,null,512),[[l.vShow,i.loading]])]))])),_:3}),t[21]||(t[21]=(0,l.createTextVNode)()),e.searchable?((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:0,ref:"search",name:i.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:(0,l.normalizeStyle)(S.inputStyle),value:e.search,disabled:i.disabled,tabindex:i.tabindex,class:"multiselect__input","aria-controls":"listbox-"+e.id,onInput:t[1]||(t[1]=t=>e.updateSearch(t.target.value)),onFocus:t[2]||(t[2]=(0,l.withModifiers)((t=>e.activate()),["prevent"])),onKeyup:t[3]||(t[3]=(0,l.withKeys)((t=>e.deactivate()),["esc"])),onKeydown:[t[4]||(t[4]=(0,l.withKeys)((0,l.withModifiers)((t=>e.pointerForward()),["prevent"]),["down"])),t[5]||(t[5]=(0,l.withKeys)((0,l.withModifiers)((t=>e.pointerBackward()),["prevent"]),["up"])),t[7]||(t[7]=(0,l.withKeys)((0,l.withModifiers)((t=>e.removeLastElement()),["stop"]),["delete"]))],onKeypress:t[6]||(t[6]=(0,l.withKeys)((0,l.withModifiers)((t=>e.addPointerElement(t)),["prevent","stop","self"]),["enter"]))},null,44,d)):(0,l.createCommentVNode)("",!0),t[22]||(t[22]=(0,l.createTextVNode)()),S.isSingleLabelVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,class:"multiselect__single",onMousedown:t[8]||(t[8]=(0,l.withModifiers)(((...t)=>e.toggle&&e.toggle(...t)),["prevent"]))},[(0,l.renderSlot)(e.$slots,"singleLabel",{option:S.singleValue},(()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.currentOptionLabel),1)]))],32)):(0,l.createCommentVNode)("",!0),t[23]||(t[23]=(0,l.createTextVNode)()),S.isPlaceholderVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:2,class:"multiselect__placeholder",onMousedown:t[9]||(t[9]=(0,l.withModifiers)(((...t)=>e.toggle&&e.toggle(...t)),["prevent"]))},[(0,l.renderSlot)(e.$slots,"placeholder",{},(()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.placeholder),1)]))],32)):(0,l.createCommentVNode)("",!0)],512),t[34]||(t[34]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect"},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",{class:"multiselect__content-wrapper",onFocus:t[10]||(t[10]=(...t)=>e.activate&&e.activate(...t)),tabindex:"-1",onMousedown:t[11]||(t[11]=(0,l.withModifiers)((()=>{}),["prevent"])),style:(0,l.normalizeStyle)({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[(0,l.createElementVNode)("ul",{class:"multiselect__content",style:(0,l.normalizeStyle)(S.contentStyle),role:"listbox",id:"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"beforeList"),t[27]||(t[27]=(0,l.createTextVNode)()),e.multiple&&e.max===e.internalValue.length?((0,l.openBlock)(),(0,l.createElementBlock)("li",g,[(0,l.createElementVNode)("span",f,[(0,l.renderSlot)(e.$slots,"maxElements",{},(()=>[(0,l.createTextVNode)("Maximum of "+(0,l.toDisplayString)(e.max)+" options selected. First remove a selected option to select another.",1)]))])])):(0,l.createCommentVNode)("",!0),t[28]||(t[28]=(0,l.createTextVNode)()),!e.max||e.internalValue.length<e.max?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:1},(0,l.renderList)(e.filteredOptions,((i,s)=>((0,l.openBlock)(),(0,l.createElementBlock)("li",{class:"multiselect__element",key:s,id:e.id+"-"+s,role:i&&(i.$isLabel||i.$isDisabled)?null:"option"},[i&&(i.$isLabel||i.$isDisabled)?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)([e.optionHighlight(s,i),"multiselect__option"]),onClick:(0,l.withModifiers)((t=>e.select(i)),["stop"]),onMouseenter:(0,l.withModifiers)((t=>e.pointerSet(s)),["self"]),"data-select":i&&i.isTag?e.tagPlaceholder:S.selectLabelText,"data-selected":S.selectedLabelText,"data-deselect":S.deselectLabelText},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},(()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)]))],42,y)),t[24]||(t[24]=(0,l.createTextVNode)()),i&&(i.$isLabel||i.$isDisabled)?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,"data-select":e.groupSelect&&S.selectGroupLabelText,"data-deselect":e.groupSelect&&S.deselectGroupLabelText,class:(0,l.normalizeClass)([e.groupHighlight(s,i),"multiselect__option"]),onMouseenter:(0,l.withModifiers)((t=>e.groupSelect&&e.pointerSet(s)),["self"]),onMousedown:(0,l.withModifiers)((t=>e.selectGroup(i)),["prevent"])},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},(()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)]))],42,w)):(0,l.createCommentVNode)("",!0)],8,b)))),128)):(0,l.createCommentVNode)("",!0),t[29]||(t[29]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",V,[(0,l.renderSlot)(e.$slots,"noResult",{search:e.search},(()=>[t[25]||(t[25]=(0,l.createTextVNode)("No elements found. Consider changing the search query."))]))])],512),[[l.vShow,S.showNoResultsSlot]]),t[30]||(t[30]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",v,[(0,l.renderSlot)(e.$slots,"noOptions",{},(()=>[t[26]||(t[26]=(0,l.createTextVNode)("List is empty."))]))])],512),[[l.vShow,S.showNoOptionsSlot]]),t[31]||(t[31]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"afterList")],12,m)],36),[[l.vShow,e.isOpen]])])),_:3})],42,o)}function isEmpty(e){return 0!==e&&(!(!Array.isArray(e)||0!==e.length)||!e)}function not(e){return(...t)=>!e(...t)}function includes(e,t){void 0===e&&(e="undefined"),null===e&&(e="null"),!1===e&&(e="false");const i=e.toString().toLowerCase();return-1!==i.indexOf(t.trim())}function filterOptions(e,t,i,s){return t?e.filter((e=>includes(s(e,i),t))).sort(((e,t)=>s(e,i).length-s(t,i).length)):e}function stripGroups(e){return e.filter((e=>!e.$isLabel))}function flattenOptions(e,t){return i=>i.reduce(((i,s)=>s[e]&&s[e].length?(i.push({$groupLabel:s[t],$isLabel:!0}),i.concat(s[e])):i),[])}function filterGroups(e,t,i,s,l){return o=>o.map((o=>{if(!o[i])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const n=filterOptions(o[i],e,t,l);return n.length?{[s]:o[s],[i]:n}:[]}))}const flow=(...e)=>t=>e.reduce(((e,t)=>t(e)),t),_={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{uid:{type:String,default:""},internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return isEmpty(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||0===this.modelValue?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let i=this.options.concat();return i=this.internalSearch?this.groupValues?this.filterAndFlat(i,t,this.label):filterOptions(i,t,this.label,this.customLabel):this.groupValues?flattenOptions(this.groupValues,this.groupLabel)(i):i,i=this.hideSelected?i.filter(not(this.isSelected)):i,this.taggable&&t.length&&!this.isExistingOption(t)&&("bottom"===this.tagPosition?i.push({isTag:!0,label:e}):i.unshift({isTag:!0,label:e})),i.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map((e=>e[this.trackBy])):this.internalValue},optionKeys(){const e=this.groupValues?this.flatAndStrip(this.options):this.options;return e.map((e=>this.customLabel(e,this.label).toString().toLowerCase()))},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:0===this.internalValue.length?null:this.internalValue[0]},filterAndFlat(e,t,i){return flow(filterGroups(t,i,this.groupValues,this.groupLabel,this.customLabel),flattenOptions(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return flow(flattenOptions(this.groupValues,this.groupLabel),stripGroups)(e)},updateSearch(e){this.search=e},isExistingOption(e){return!!this.options&&this.optionKeys.indexOf(e)>-1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(isEmpty(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return isEmpty(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect)this.selectGroup(e);else if(!(-1!==this.blockKeys.indexOf(t)||this.disabled||e.$isDisabled||e.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==t||this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{const i=this.isSelected(e);if(i)return void("Tab"!==t&&this.removeElement(e));this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find((t=>t[this.groupLabel]===e.$groupLabel));if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const e=this.internalValue.filter((e=>-1===t[this.groupValues].indexOf(e)));this.$emit("update:modelValue",e)}else{let e=t[this.groupValues].filter((e=>!(this.isOptionDisabled(e)||this.isSelected(e))));this.max&&e.splice(this.max-this.internalValue.length),this.$emit("select",e,this.id),this.$emit("update:modelValue",this.internalValue.concat(e))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every((e=>this.isSelected(e)||this.isOptionDisabled(e)))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled)return;if(e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();const i="object"===typeof e?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const e=this.internalValue.slice(0,i).concat(this.internalValue.slice(i+1));this.$emit("update:modelValue",e)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){if(this.isOpen||this.disabled)return;this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick((()=>this.$refs.search&&this.$refs.search.focus()))):this.preventAutofocus||"undefined"!==typeof this.$el&&this.$el.focus(),this.$emit("open",this.id);const onMouseDown=e=>{if(e?.target){const t=this.uid?"multiselect"+this.uid:"multiselect",i=e.target.closest("."+t);Boolean(i)||(this.deactivate(),document.removeEventListener("mousedown",onMouseDown))}};setTimeout((()=>{document.addEventListener("mousedown",onMouseDown)}),300)},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if("undefined"===typeof window)return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom,i=t>this.maxHeight;i||t>e||"below"===this.openDirection||"bottom"===this.openDirection?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},S={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const i=this.options.find((e=>e[this.groupLabel]===t.$groupLabel));return i&&!this.wholeGroupDisabled(i)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},x={name:"vue-multiselect",mixins:[_,S],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return!1},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.internalValue.slice(0,this.limit)},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.preferredOpenDirection},showSearchInput(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)},showNoResultsSlot(){return this.showNoResults&&0===this.filteredOptions.length&&this.search&&!this.loading},showNoOptionsSlot(){return this.showNoOptions&&(0===this.options.length||!0===this.hasOptionGroup&&0===this.filteredOptions.length)&&!this.search&&!this.loading}}};var O=__webpack_require__(6262);const L=(0,O.A)(x,[["render",render]]),$=L,N=$;return s})()));
|
|
1
|
+
(function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):"object"===typeof exports?exports["ldmui"]=t(require("vue")):e["ldmui"]=t(e["vue"])})(self,(e=>(()=>{"use strict";var t={6262:(e,t)=>{t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[e,s]of t)i[e]=s;return i}},2380:t=>{t.exports=e}},i={};function __webpack_require__(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,__webpack_require__),l.exports}(()=>{__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var s={};__webpack_require__.r(s),__webpack_require__.d(s,{default:()=>N});var l=__webpack_require__(2380);const o=["tabindex","aria-owns"],n={ref:"tags",class:"multiselect__tags"},r={class:"multiselect__tags-wrap"},a=["textContent"],h=["onKeypress","onMousedown"],p={class:"multiselect__tag"},c=["textContent"],u={class:"multiselect__spinner"},d=["name","id","placeholder","value","disabled","tabindex","aria-controls"],m=["id"],g={key:0},f={class:"multiselect__option"},b=["id","role"],y=["onClick","onMouseenter","data-select","data-selected","data-deselect"],w=["data-select","data-deselect","onMouseenter","onMousedown"],V={class:"multiselect__option"},_={class:"multiselect__option"};function render(e,t,i,s,v,S){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{tabindex:e.searchable?-1:i.tabindex,class:(0,l.normalizeClass)([[e.uid?"multiselect"+e.uid:"",{"multiselect--active":e.isOpen,"multiselect--disabled":i.disabled,"multiselect--above":S.isAbove,"multiselect--has-options-group":S.hasOptionGroup,"multiselect--list-empty":e.isOpen&&!S.showNoResultsSlot&&!S.showNoOptionsSlot&&0===e.filteredOptions.length}],"multiselect"]),onFocus:t[12]||(t[12]=t=>e.activate()),onBlur:t[13]||(t[13]=t=>!e.searchable&&e.deactivate()),onKeydown:[t[14]||(t[14]=(0,l.withKeys)((0,l.withModifiers)((t=>e.pointerForward()),["self","prevent"]),["down"])),t[15]||(t[15]=(0,l.withKeys)((0,l.withModifiers)((t=>e.pointerBackward()),["self","prevent"]),["up"]))],onKeypress:t[16]||(t[16]=(0,l.withKeys)((0,l.withModifiers)((t=>e.addPointerElement(t)),["stop","self"]),["enter","tab"])),onKeyup:t[17]||(t[17]=(0,l.withKeys)((t=>e.deactivate()),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"caret",{toggle:e.toggle},(()=>[(0,l.createElementVNode)("div",{onMousedown:t[0]||(t[0]=(0,l.withModifiers)((t=>e.toggle()),["prevent","stop"])),class:"multiselect__select"},null,32)])),t[32]||(t[32]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"clear",{search:e.search}),t[33]||(t[33]=(0,l.createTextVNode)()),(0,l.createElementVNode)("div",n,[(0,l.renderSlot)(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:S.visibleValues,isOpen:e.isOpen},(()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",r,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(S.visibleValues,((i,s)=>(0,l.renderSlot)(e.$slots,"tag",{option:i,search:e.search,remove:e.removeElement},(()=>[((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:"multiselect__tag",key:s},[(0,l.createElementVNode)("span",{textContent:(0,l.toDisplayString)(e.getOptionLabel(i))},null,8,a),t[18]||(t[18]=(0,l.createTextVNode)()),(0,l.createElementVNode)("i",{tabindex:"1",onKeypress:(0,l.withKeys)((0,l.withModifiers)((t=>e.removeElement(i)),["prevent"]),["enter"]),onMousedown:(0,l.withModifiers)((t=>e.removeElement(i)),["prevent"]),class:"multiselect__tag-icon"},null,40,h)]))])))),256)),t[19]||(t[19]=(0,l.createTextVNode)()),e.internalValue&&e.internalValue.length>i.limit?(0,l.renderSlot)(e.$slots,"tag-overflow",{key:0,limit:i.limit,count:e.internalValue.length},(()=>[(0,l.createElementVNode)("span",p,[(0,l.createElementVNode)("strong",{class:"multiselect__strong",textContent:(0,l.toDisplayString)(i.limitText(e.internalValue.length-i.limit))},null,8,c)])])):(0,l.createCommentVNode)("",!0)],512),[[l.vShow,S.visibleValues.length>0]])])),t[20]||(t[20]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect__loading"},{default:(0,l.withCtx)((()=>[(0,l.renderSlot)(e.$slots,"loading",{},(()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",u,null,512),[[l.vShow,i.loading]])]))])),_:3}),t[21]||(t[21]=(0,l.createTextVNode)()),e.searchable?((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:0,ref:"search",name:i.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:(0,l.normalizeStyle)(S.inputStyle),value:e.search,disabled:i.disabled,tabindex:i.tabindex,class:"multiselect__input","aria-controls":"listbox-"+e.id,onInput:t[1]||(t[1]=t=>e.updateSearch(t.target.value)),onFocus:t[2]||(t[2]=(0,l.withModifiers)((t=>e.activate()),["prevent"])),onKeyup:t[3]||(t[3]=(0,l.withKeys)((t=>e.deactivate()),["esc"])),onKeydown:[t[4]||(t[4]=(0,l.withKeys)((0,l.withModifiers)((t=>e.pointerForward()),["prevent"]),["down"])),t[5]||(t[5]=(0,l.withKeys)((0,l.withModifiers)((t=>e.pointerBackward()),["prevent"]),["up"])),t[7]||(t[7]=(0,l.withKeys)((0,l.withModifiers)((t=>e.removeLastElement()),["stop"]),["delete"]))],onKeypress:t[6]||(t[6]=(0,l.withKeys)((0,l.withModifiers)((t=>e.addPointerElement(t)),["prevent","stop","self"]),["enter"]))},null,44,d)):(0,l.createCommentVNode)("",!0),t[22]||(t[22]=(0,l.createTextVNode)()),S.isSingleLabelVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,class:"multiselect__single",onMousedown:t[8]||(t[8]=(0,l.withModifiers)(((...t)=>e.toggle&&e.toggle(...t)),["prevent"]))},[(0,l.renderSlot)(e.$slots,"singleLabel",{option:S.singleValue},(()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.currentOptionLabel),1)]))],32)):(0,l.createCommentVNode)("",!0),t[23]||(t[23]=(0,l.createTextVNode)()),S.isPlaceholderVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:2,class:"multiselect__placeholder",onMousedown:t[9]||(t[9]=(0,l.withModifiers)(((...t)=>e.toggle&&e.toggle(...t)),["prevent"]))},[(0,l.renderSlot)(e.$slots,"placeholder",{},(()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.placeholder),1)]))],32)):(0,l.createCommentVNode)("",!0)],512),t[34]||(t[34]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect"},{default:(0,l.withCtx)((()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",{class:"multiselect__content-wrapper",onFocus:t[10]||(t[10]=(...t)=>e.activate&&e.activate(...t)),tabindex:"-1",onMousedown:t[11]||(t[11]=(0,l.withModifiers)((()=>{}),["prevent"])),style:(0,l.normalizeStyle)({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[(0,l.createElementVNode)("ul",{class:"multiselect__content",style:(0,l.normalizeStyle)(S.contentStyle),role:"listbox",id:"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"beforeList"),t[27]||(t[27]=(0,l.createTextVNode)()),e.multiple&&e.max===e.internalValue.length?((0,l.openBlock)(),(0,l.createElementBlock)("li",g,[(0,l.createElementVNode)("span",f,[(0,l.renderSlot)(e.$slots,"maxElements",{},(()=>[(0,l.createTextVNode)("Maximum of "+(0,l.toDisplayString)(e.max)+" options selected. First remove a selected option to select another.",1)]))])])):(0,l.createCommentVNode)("",!0),t[28]||(t[28]=(0,l.createTextVNode)()),!e.max||e.internalValue.length<e.max?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:1},(0,l.renderList)(e.filteredOptions,((i,s)=>((0,l.openBlock)(),(0,l.createElementBlock)("li",{class:"multiselect__element",key:s,id:e.id+"-"+s,role:i&&(i.$isLabel||i.$isDisabled)?null:"option"},[i&&(i.$isLabel||i.$isDisabled)?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)([e.optionHighlight(s,i),"multiselect__option"]),onClick:(0,l.withModifiers)((t=>e.select(i)),["stop"]),onMouseenter:(0,l.withModifiers)((t=>e.pointerSet(s)),["self"]),"data-select":i&&i.isTag?e.tagPlaceholder:S.selectLabelText,"data-selected":S.selectedLabelText,"data-deselect":S.deselectLabelText},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},(()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)]))],42,y)),t[24]||(t[24]=(0,l.createTextVNode)()),i&&(i.$isLabel||i.$isDisabled)?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,"data-select":e.groupSelect&&S.selectGroupLabelText,"data-deselect":e.groupSelect&&S.deselectGroupLabelText,class:(0,l.normalizeClass)([e.groupHighlight(s,i),"multiselect__option"]),onMouseenter:(0,l.withModifiers)((t=>e.groupSelect&&e.pointerSet(s)),["self"]),onMousedown:(0,l.withModifiers)((t=>e.selectGroup(i)),["prevent"])},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},(()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)]))],42,w)):(0,l.createCommentVNode)("",!0)],8,b)))),128)):(0,l.createCommentVNode)("",!0),t[29]||(t[29]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",V,[(0,l.renderSlot)(e.$slots,"noResult",{search:e.search},(()=>[t[25]||(t[25]=(0,l.createTextVNode)("No elements found. Consider changing the search query."))]))])],512),[[l.vShow,S.showNoResultsSlot]]),t[30]||(t[30]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",_,[(0,l.renderSlot)(e.$slots,"noOptions",{},(()=>[t[26]||(t[26]=(0,l.createTextVNode)("List is empty."))]))])],512),[[l.vShow,S.showNoOptionsSlot]]),t[31]||(t[31]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"afterList")],12,m)],36),[[l.vShow,e.isOpen]])])),_:3})],42,o)}function isEmpty(e){return 0!==e&&(!(!Array.isArray(e)||0!==e.length)||!e)}function not(e){return(...t)=>!e(...t)}function includes(e,t){void 0===e&&(e="undefined"),null===e&&(e="null"),!1===e&&(e="false");const i=e.toString().toLowerCase();return-1!==i.indexOf(t.trim())}function filterOptions(e,t,i,s){return t?e.filter((e=>includes(s(e,i),t))).sort(((e,t)=>s(e,i).length-s(t,i).length)):e}function stripGroups(e){return e.filter((e=>!e.$isLabel))}function flattenOptions(e,t){return i=>i.reduce(((i,s)=>s[e]&&s[e].length?(i.push({$groupLabel:s[t],$isLabel:!0}),i.concat(s[e])):i),[])}function filterGroups(e,t,i,s,l){return o=>o.map((o=>{if(!o[i])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const n=filterOptions(o[i],e,t,l);return n.length?{[s]:o[s],[i]:n}:[]}))}const flow=(...e)=>t=>e.reduce(((e,t)=>t(e)),t),v={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{uid:{type:String,default:""},internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return isEmpty(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||0===this.modelValue?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let i=this.options.concat();return i=this.internalSearch?this.groupValues?this.filterAndFlat(i,t,this.label):filterOptions(i,t,this.label,this.customLabel):this.groupValues?flattenOptions(this.groupValues,this.groupLabel)(i):i,i=this.hideSelected?i.filter(not(this.isSelected)):i,this.taggable&&t.length&&!this.isExistingOption(t)&&("bottom"===this.tagPosition?i.push({isTag:!0,label:e}):i.unshift({isTag:!0,label:e})),i.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map((e=>e[this.trackBy])):this.internalValue},optionKeys(){const e=this.groupValues?this.flatAndStrip(this.options):this.options;return e.map((e=>this.customLabel(e,this.label).toString().toLowerCase()))},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:0===this.internalValue.length?null:this.internalValue[0]},filterAndFlat(e,t,i){return flow(filterGroups(t,i,this.groupValues,this.groupLabel,this.customLabel),flattenOptions(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return flow(flattenOptions(this.groupValues,this.groupLabel),stripGroups)(e)},updateSearch(e){this.search=e},isExistingOption(e){return!!this.options&&this.optionKeys.indexOf(e)>-1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(isEmpty(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return isEmpty(t)?"":t},select(e,t){e.$isLabel&&this.groupSelect?this.selectGroup(e):-1!==this.blockKeys.indexOf(t)||this.disabled||e.$isDisabled||e.$isLabel||this.max&&this.multiple&&this.internalValue.length===this.max||("Tab"!==t||this.pointerDirty)&&(e.isTag?(this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate()):(this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")),this.closeOnSelect&&this.deactivate())},selectGroup(e){const t=this.options.find((t=>t[this.groupLabel]===e.$groupLabel));if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const e=this.internalValue.filter((e=>-1===t[this.groupValues].indexOf(e)));this.$emit("update:modelValue",e)}else{let e=t[this.groupValues].filter((e=>!(this.isOptionDisabled(e)||this.isSelected(e))));this.max&&e.splice(this.max-this.internalValue.length),this.$emit("select",e,this.id),this.$emit("update:modelValue",this.internalValue.concat(e))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every((e=>this.isSelected(e)||this.isOptionDisabled(e)))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled)return;if(e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();const i="object"===typeof e?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const e=this.internalValue.slice(0,i).concat(this.internalValue.slice(i+1));this.$emit("update:modelValue",e)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){if(this.isOpen||this.disabled)return;this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick((()=>this.$refs.search&&this.$refs.search.focus()))):this.preventAutofocus||"undefined"!==typeof this.$el&&this.$el.focus(),this.$emit("open",this.id);const onMouseDown=e=>{if(e?.target){const t=this.uid?"multiselect"+this.uid:"multiselect",i=e.target.closest("."+t);Boolean(i)||(this.deactivate(),document.removeEventListener("mousedown",onMouseDown))}};setTimeout((()=>{document.addEventListener("mousedown",onMouseDown)}),300)},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if("undefined"===typeof window)return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom,i=t>this.maxHeight;i||t>e||"below"===this.openDirection||"bottom"===this.openDirection?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},S={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const i=this.options.find((e=>e[this.groupLabel]===t.$groupLabel));return i&&!this.wholeGroupDisabled(i)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},x={name:"vue-multiselect",mixins:[v,S],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return!1},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.internalValue.slice(0,this.limit)},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.preferredOpenDirection},showSearchInput(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)},showNoResultsSlot(){return this.showNoResults&&0===this.filteredOptions.length&&this.search&&!this.loading},showNoOptionsSlot(){return this.showNoOptions&&(0===this.options.length||!0===this.hasOptionGroup&&0===this.filteredOptions.length)&&!this.search&&!this.loading}}};var O=__webpack_require__(6262);const L=(0,O.A)(x,[["render",render]]),$=L,N=$;return s})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("@ldmjs/core"),require("vue")):"function"===typeof define&&define.amd?define(["@ldmjs/core","vue"],t):"object"===typeof exports?exports["ldmui"]=t(require("@ldmjs/core"),require("vue")):e["ldmui"]=t(e["@ldmjs/core"],e["vue"])})(self,((e,t)=>(()=>{"use strict";var s={6262:(e,t)=>{t.A=(e,t)=>{const s=e.__vccOpts||e;for(const[e,o]of t)s[e]=o;return s}},934:t=>{t.exports=e},2380:e=>{e.exports=t}},o={};function __webpack_require__(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return s[e](n,n.exports,__webpack_require__),n.exports}(()=>{__webpack_require__.d=(e,t)=>{for(var s in t)__webpack_require__.o(t,s)&&!__webpack_require__.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n,a,r,i={};__webpack_require__.r(i),__webpack_require__.d(i,{POSITION:()=>a,TYPE:()=>n,default:()=>ae}),function(e){e["SUCCESS"]="success",e["ERROR"]="error",e["WARNING"]="warning",e["INFO"]="info",e["DEFAULT"]="default"}(n||(n={})),function(e){e["TOP_LEFT"]="top-left",e["TOP_CENTER"]="top-center",e["TOP_RIGHT"]="top-right",e["BOTTOM_LEFT"]="bottom-left",e["BOTTOM_CENTER"]="bottom-center",e["BOTTOM_RIGHT"]="bottom-right"}(a||(a={})),function(e){e["ADD"]="add",e["DISMISS"]="dismiss",e["UPDATE"]="update",e["CLEAR"]="clear",e["UPDATE_DEFAULTS"]="update_defaults"}(r||(r={}));const c="Vue-Toastification";var l=__webpack_require__(2380),u=__webpack_require__(934);function render(e,t,s,o,n,a){const r=(0,l.resolveComponent)("Toast"),i=(0,l.resolveComponent)("VtTransition");return(0,l.openBlock)(),(0,l.createElementBlock)("div",null,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.positions,(t=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:t},[(0,l.createVNode)(i,{transition:e.defaults.transition,class:(0,l.normalizeClass)(e.getClasses(t))},{default:(0,l.withCtx)((()=>[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.getPositionToasts(t),(e=>((0,l.openBlock)(),(0,l.createBlock)(r,(0,l.mergeProps)({key:e.id,ref_for:!0},e),null,16)))),128))])),_:2},1032,["transition","class"])])))),128))])}const d={type:{type:String,default:n.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},p={type:d.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},m={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:d.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},h={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},_={transition:{type:[Object,String],default:`${c}__bounce`}},g={position:{type:String,default:a.TOP_RIGHT},draggable:d.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:d.trueBoolean,pauseOnHover:d.trueBoolean,closeOnClick:d.trueBoolean,timeout:h.timeout,hideProgressBar:h.hideProgressBar,toastClassName:d.classNames,bodyClassName:d.classNames,icon:p.customIcon,closeButton:m.component,closeButtonClassName:m.classNames,showCloseButtonOnHover:m.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1}},f={id:{type:[String,Number],required:!0,default:0},type:d.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}}},v={container:{type:[Object,Function],default:()=>document.body},newestOnTop:d.trueBoolean,maxToasts:{type:Number,default:20},transition:_.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:d.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},y={CORE_TOAST:g,TOAST:f,CONTAINER:v,PROGRESS_BAR:h,ICON:p,TRANSITION:_,CLOSE_BUTTON:m},isFunction=e=>"function"===typeof e,isString=e=>"string"===typeof e,isNonEmptyString=e=>isString(e)&&e.trim().length>0,isNumber=e=>"number"===typeof e,isUndefined=e=>"undefined"===typeof e,isObject=e=>"object"===typeof e&&null!==e,isJSX=e=>hasProp(e,"tag")&&isNonEmptyString(e.tag),isTouchEvent=e=>window.TouchEvent&&e instanceof TouchEvent,isToastComponent=e=>hasProp(e,"component")&&isToastContent(e.component),isVueComponent=e=>isFunction(e)||isObject(e),isToastContent=e=>!isUndefined(e)&&(isString(e)||isVueComponent(e)||isToastComponent(e)),isDOMRect=e=>isObject(e)&&["height","width","right","left","top","bottom"].every((t=>isNumber(e[t]))),hasProp=(e,t)=>(isObject(e)||isFunction(e))&&t in e,T=(e=>()=>e++)(0);function getX(e){return isTouchEvent(e)?e.targetTouches[0].clientX:e.clientX}function getY(e){return isTouchEvent(e)?e.targetTouches[0].clientY:e.clientY}const removeElement=e=>{isUndefined(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},getVueComponentFromObj=e=>isToastComponent(e)?getVueComponentFromObj(e.component):isJSX(e)?(0,l.defineComponent)({render(){return e}}):"string"===typeof e?e:(0,l.toRaw)((0,l.unref)(e)),normalizeToastComponent=e=>{if("string"===typeof e)return e;const t=hasProp(e,"props")&&isObject(e.props)?e.props:{},s=hasProp(e,"listeners")&&isObject(e.listeners)?e.listeners:{};return{component:getVueComponentFromObj(e),props:t,listeners:s}},b=["role"];function VtToastvue_type_template_id_38490303_ts_true_render(e,t,s,o,n,a){const r=(0,l.resolveComponent)("Icon"),i=(0,l.resolveComponent)("CloseButton"),c=(0,l.resolveComponent)("ProgressBar");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(e.classes),style:(0,l.normalizeStyle)(e.draggableStyle),onClick:t[0]||(t[0]=(...t)=>e.clickHandler&&e.clickHandler(...t)),onMouseenter:t[1]||(t[1]=(...t)=>e.hoverPause&&e.hoverPause(...t)),onMouseleave:t[2]||(t[2]=(...t)=>e.hoverPlay&&e.hoverPlay(...t))},[e.icon?((0,l.openBlock)(),(0,l.createBlock)(r,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):(0,l.createCommentVNode)("",!0),t[3]||(t[3]=(0,l.createTextVNode)()),(0,l.createElementVNode)("div",{role:e.accessibility.toastRole||"alert",class:(0,l.normalizeClass)(e.bodyClasses)},["string"===typeof e.content?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createTextVNode)((0,l.toDisplayString)(e.content),1)],64)):((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,l.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},(0,l.toHandlers)(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,b),t[4]||(t[4]=(0,l.createTextVNode)()),e.closeButton?((0,l.openBlock)(),(0,l.createBlock)(i,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,l.withModifiers)(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):(0,l.createCommentVNode)("",!0),t[5]||(t[5]=(0,l.createTextVNode)()),e.timeout?((0,l.openBlock)(),(0,l.createBlock)(c,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):(0,l.createCommentVNode)("",!0)],38)}function VtProgressBarvue_type_template_id_393e1d20_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{style:(0,l.normalizeStyle)(e.style),class:(0,l.normalizeClass)(e.cpClass)},null,6)}const C=(0,l.defineComponent)({name:"VtProgressBar",props:y.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${c}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick((()=>this.hasClass=!0))}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});var B=__webpack_require__(6262);const E=(0,B.A)(C,[["render",VtProgressBarvue_type_template_id_393e1d20_ts_true_render]]),O=E;function VtCloseButtonvue_type_template_id_987d8b2a_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.buttonComponent),(0,l.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,l.withCtx)((()=>t[0]||(t[0]=[(0,l.createTextVNode)("\r\n ×\r\n ")]))),_:1},16,["aria-label","class"])}const S=(0,l.defineComponent)({name:"VtCloseButton",props:y.CLOSE_BUTTON,computed:{buttonComponent(){return!1!==this.component?getVueComponentFromObj(this.component):"button"},classes(){const e=[`${c}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),k=(0,B.A)(S,[["render",VtCloseButtonvue_type_template_id_987d8b2a_ts_true_render]]),D=k;function VtIconvue_type_template_id_4efc2143_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component),{class:(0,l.normalizeClass)(e.iconClasses)},{default:(0,l.withCtx)((()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.customIconChildren),1)])),_:1},8,["class"])}const w={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function VtSuccessIconvue_type_template_id_4652b358_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("svg",w,t[0]||(t[0]=[(0,l.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1)]))}const I={},P=(0,B.A)(I,[["render",VtSuccessIconvue_type_template_id_4652b358_ts_true_render]]),x=P,N={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function VtInfoIconvue_type_template_id_e31c7278_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("svg",N,t[0]||(t[0]=[(0,l.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)]))}const R={},A=(0,B.A)(R,[["render",VtInfoIconvue_type_template_id_e31c7278_ts_true_render]]),L=A,V={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function VtWarningIconvue_type_template_id_1f8b4458_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("svg",V,t[0]||(t[0]=[(0,l.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)]))}const $={},j=(0,B.A)($,[["render",VtWarningIconvue_type_template_id_1f8b4458_ts_true_render]]),M=j,F={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"};function VtErrorIconvue_type_template_id_78c99fad_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("svg",F,t[0]||(t[0]=[(0,l.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)]))}const U={},H=(0,B.A)(U,[["render",VtErrorIconvue_type_template_id_78c99fad_ts_true_render]]),q=H,z=(0,l.defineComponent)({name:"VtIcon",props:y.ICON,computed:{customIconChildren(){return hasProp(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return isString(this.customIcon)?this.trimValue(this.customIcon):hasProp(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return hasProp(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:isToastContent(this.customIcon)?getVueComponentFromObj(this.customIcon):this.iconTypeComponent},iconTypeComponent(){const e={[n.DEFAULT]:L,[n.INFO]:L,[n.SUCCESS]:x,[n.ERROR]:q,[n.WARNING]:M};return e[this.type]},iconClasses(){const e=[`${c}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=""){return isNonEmptyString(e)?e.trim():t}}}),G=(0,B.A)(z,[["render",VtIconvue_type_template_id_4efc2143_ts_true_render]]),X=G,Y=(0,l.defineComponent)({name:"VtToast",components:{ProgressBar:O,CloseButton:D,Icon:X},inheritAttrs:!1,props:Object.assign({},y.CORE_TOAST,y.TOAST),data(){const e={isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}};return e},computed:{classes(){const e=[`${c}__toast`,`${c}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${c}__toast--rtl`),e},bodyClasses(){const e=[`${c}__toast-${isString(this.content)?"body":"component-body"}`].concat(this.bodyClassName);return e},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return isDOMRect(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp,getVueComponentFromObj,closeToast(){u.eventBus.$emit(r.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(this.beingDragged&&this.dragStart!==this.dragPos.x||this.closeToast())},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:getX(e),y:getY(e)},this.dragStart=getX(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:getX(e),y:getY(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick((()=>this.closeToast()))):setTimeout((()=>{this.beingDragged=!1,isDOMRect(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0})))}}}),W=(0,B.A)(Y,[["render",VtToastvue_type_template_id_38490303_ts_true_render]]),J=W;function VtTransitionvue_type_template_id_47d455c7_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createBlock)(l.TransitionGroup,{tag:"div","enter-active-class":e.myTransition["enter"]?e.myTransition.enter:`${e.transition}-enter-active`,"move-class":e.myTransition.move?e.myTransition.move:`${e.transition}-move`,"leave-active-class":e.myTransition.leave?e.myTransition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,l.withCtx)((()=>[(0,l.renderSlot)(e.$slots,"default")])),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}const K=(0,l.defineComponent)({name:"VtTransition",props:y.TRANSITION,emits:["leave"],computed:{myTransition(){return this.transition}},methods:{hasProp,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}}),Q=(0,B.A)(K,[["render",VtTransitionvue_type_template_id_47d455c7_ts_true_render]]),Z=Q,ee=(0,l.defineComponent)({name:"VueToastification",devtools:{hide:!0},components:{Toast:J,VtTransition:Z},props:Object.assign({},y.CORE_TOAST,y.CONTAINER,y.TRANSITION),data(){const e={count:0,positions:Object.values(a),toasts:{},defaults:{}};return e},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){u.eventBus.$on(r.ADD,this.addToast),u.eventBus.$on(r.CLEAR,this.clearToasts),u.eventBus.$on(r.DISMISS,this.dismissToast),u.eventBus.$on(r.UPDATE,this.updateToast),u.eventBus.$on(r.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},beforeUnmount(){u.eventBus.$off(r.ADD,this.addToast),u.eventBus.$off(r.CLEAR,this.clearToasts),u.eventBus.$off(r.DISMISS,this.dismissToast),u.eventBus.$off(r.UPDATE,this.updateToast),u.eventBus.$off(r.UPDATE_DEFAULTS,this.updateDefault)},mounted(){this.setup(this.container)},methods:{async setup(e){isFunction(e)&&(e=await e()),removeElement(this.$el),e.appendChild(this.$el)},setToast(e){isUndefined(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=normalizeToastComponent(e.content);const t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),s=this.defaults.filterBeforeCreate(t,this.toastArray);s&&this.setToast(s)},dismissToast(e){const t=this.toasts[e];isUndefined(t)||isUndefined(t.onClose)||t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach((e=>{this.dismissToast(e)}))},getPositionToasts(e){const t=this.filteredToasts.filter((t=>t.position===e)).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){isUndefined(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:s}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):s&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){const t=[`${c}__container`,e];return t.concat(this.defaults.containerClassName)}}}),te=(0,B.A)(ee,[["render",render]]),se=te,buildInterface=(e={},t=!0)=>{let s=null;t&&(0,l.nextTick)((()=>{s=(0,l.createApp)(se,{...e});const t=s.mount(document.createElement("div")),o=e.onMounted;if(isUndefined(o)||o(t,s),e.shareAppContext){const t=e.shareAppContext;!0===t?console.warn(`[${c}] App to share context with was not provided.`):(s._context.components=t._context.components,s._context.directives=t._context.directives,s._context.mixins=t._context.mixins,s._context.provides=t._context.provides,s.config.globalProperties=t.config.globalProperties)}}));const toast=(e,t)=>{const s=Object.assign({},{id:T(),type:n.DEFAULT},t,{content:e});return u.eventBus.$emit(r.ADD,s),s.id};function updateToast(e,{content:t,options:s},o=!1){const n=Object.assign({},s,{content:t});u.eventBus.$emit(r.UPDATE,{id:e,options:n,create:o})}return toast.clear=()=>u.eventBus.$emit(r.CLEAR,void 0),toast.updateDefaults=e=>{u.eventBus.$emit(r.UPDATE_DEFAULTS,e)},toast.dismiss=e=>{u.eventBus.$emit(r.DISMISS,e)},toast.destroy=()=>{s.unmount()},toast.update=updateToast,toast.success=(e,t)=>{toast(e,Object.assign({},t,{type:n.SUCCESS}))},toast.info=(e,t)=>toast(e,Object.assign({},t,{type:n.INFO})),toast.error=(e,t)=>toast(e,Object.assign({},t,{type:n.ERROR})),toast.warning=(e,t)=>toast(e,Object.assign({},t,{type:n.WARNING})),toast},oe={install(e,t){const s=buildInterface(t,!0);e.config.globalProperties.$toasted=s,e.onUnmount((()=>{s.destroy()}))}},ne=oe,ae=ne;return i})()));
|
|
1
|
+
(function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("@ldmjs/core"),require("vue")):"function"===typeof define&&define.amd?define(["@ldmjs/core","vue"],t):"object"===typeof exports?exports["ldmui"]=t(require("@ldmjs/core"),require("vue")):e["ldmui"]=t(e["@ldmjs/core"],e["vue"])})(self,((e,t)=>(()=>{"use strict";var s={6262:(e,t)=>{t.A=(e,t)=>{const s=e.__vccOpts||e;for(const[e,o]of t)s[e]=o;return s}},934:t=>{t.exports=e},2380:e=>{e.exports=t}},o={};function __webpack_require__(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return s[e](n,n.exports,__webpack_require__),n.exports}(()=>{__webpack_require__.d=(e,t)=>{for(var s in t)__webpack_require__.o(t,s)&&!__webpack_require__.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})}})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var n,a,r,i={};__webpack_require__.r(i),__webpack_require__.d(i,{POSITION:()=>a,TYPE:()=>n,default:()=>ae}),function(e){e["SUCCESS"]="success",e["ERROR"]="error",e["WARNING"]="warning",e["INFO"]="info",e["DEFAULT"]="default"}(n||(n={})),function(e){e["TOP_LEFT"]="top-left",e["TOP_CENTER"]="top-center",e["TOP_RIGHT"]="top-right",e["BOTTOM_LEFT"]="bottom-left",e["BOTTOM_CENTER"]="bottom-center",e["BOTTOM_RIGHT"]="bottom-right"}(a||(a={})),function(e){e["ADD"]="add",e["DISMISS"]="dismiss",e["UPDATE"]="update",e["CLEAR"]="clear",e["UPDATE_DEFAULTS"]="update_defaults"}(r||(r={}));const c="Vue-Toastification";var l=__webpack_require__(2380),u=__webpack_require__(934);function render(e,t,s,o,n,a){const r=(0,l.resolveComponent)("Toast"),i=(0,l.resolveComponent)("VtTransition");return(0,l.openBlock)(),(0,l.createElementBlock)("div",null,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.positions,(t=>((0,l.openBlock)(),(0,l.createElementBlock)("div",{key:t},[(0,l.createVNode)(i,{transition:e.defaults.transition,class:(0,l.normalizeClass)(e.getClasses(t))},{default:(0,l.withCtx)((()=>[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(e.getPositionToasts(t),(e=>((0,l.openBlock)(),(0,l.createBlock)(r,(0,l.mergeProps)({key:e.id,ref_for:!0},e),null,16)))),128))])),_:2},1032,["transition","class"])])))),128))])}const d={type:{type:String,default:n.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},p={type:d.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},m={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:d.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},h={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},_={transition:{type:[Object,String],default:`${c}__bounce`}},g={position:{type:String,default:a.TOP_RIGHT},draggable:d.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:d.trueBoolean,pauseOnHover:d.trueBoolean,closeOnClick:d.trueBoolean,timeout:h.timeout,hideProgressBar:h.hideProgressBar,toastClassName:d.classNames,bodyClassName:d.classNames,icon:p.customIcon,closeButton:m.component,closeButtonClassName:m.classNames,showCloseButtonOnHover:m.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1}},f={id:{type:[String,Number],required:!0,default:0},type:d.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}}},v={container:{type:[Object,Function],default:()=>document.body},newestOnTop:d.trueBoolean,maxToasts:{type:Number,default:20},transition:_.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:d.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},y={CORE_TOAST:g,TOAST:f,CONTAINER:v,PROGRESS_BAR:h,ICON:p,TRANSITION:_,CLOSE_BUTTON:m},isFunction=e=>"function"===typeof e,isString=e=>"string"===typeof e,isNonEmptyString=e=>isString(e)&&e.trim().length>0,isNumber=e=>"number"===typeof e,isUndefined=e=>"undefined"===typeof e,isObject=e=>"object"===typeof e&&null!==e,isJSX=e=>hasProp(e,"tag")&&isNonEmptyString(e.tag),isTouchEvent=e=>window.TouchEvent&&e instanceof TouchEvent,isToastComponent=e=>hasProp(e,"component")&&isToastContent(e.component),isVueComponent=e=>isFunction(e)||isObject(e),isToastContent=e=>!isUndefined(e)&&(isString(e)||isVueComponent(e)||isToastComponent(e)),isDOMRect=e=>isObject(e)&&["height","width","right","left","top","bottom"].every((t=>isNumber(e[t]))),hasProp=(e,t)=>(isObject(e)||isFunction(e))&&t in e,T=(e=>()=>e++)(0);function getX(e){return isTouchEvent(e)?e.targetTouches[0].clientX:e.clientX}function getY(e){return isTouchEvent(e)?e.targetTouches[0].clientY:e.clientY}const removeElement=e=>{isUndefined(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},getVueComponentFromObj=e=>isToastComponent(e)?getVueComponentFromObj(e.component):isJSX(e)?(0,l.defineComponent)({render(){return e}}):"string"===typeof e?e:(0,l.toRaw)((0,l.unref)(e)),normalizeToastComponent=e=>{if("string"===typeof e)return e;const t=hasProp(e,"props")&&isObject(e.props)?e.props:{},s=hasProp(e,"listeners")&&isObject(e.listeners)?e.listeners:{};return{component:getVueComponentFromObj(e),props:t,listeners:s}},b=["role"];function VtToastvue_type_template_id_38490303_ts_true_render(e,t,s,o,n,a){const r=(0,l.resolveComponent)("Icon"),i=(0,l.resolveComponent)("CloseButton"),c=(0,l.resolveComponent)("ProgressBar");return(0,l.openBlock)(),(0,l.createElementBlock)("div",{class:(0,l.normalizeClass)(e.classes),style:(0,l.normalizeStyle)(e.draggableStyle),onClick:t[0]||(t[0]=(...t)=>e.clickHandler&&e.clickHandler(...t)),onMouseenter:t[1]||(t[1]=(...t)=>e.hoverPause&&e.hoverPause(...t)),onMouseleave:t[2]||(t[2]=(...t)=>e.hoverPlay&&e.hoverPlay(...t))},[e.icon?((0,l.openBlock)(),(0,l.createBlock)(r,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):(0,l.createCommentVNode)("",!0),t[3]||(t[3]=(0,l.createTextVNode)()),(0,l.createElementVNode)("div",{role:e.accessibility.toastRole||"alert",class:(0,l.normalizeClass)(e.bodyClasses)},["string"===typeof e.content?((0,l.openBlock)(),(0,l.createElementBlock)(l.Fragment,{key:0},[(0,l.createTextVNode)((0,l.toDisplayString)(e.content),1)],64)):((0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.getVueComponentFromObj(e.content)),(0,l.mergeProps)({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},(0,l.toHandlers)(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,b),t[4]||(t[4]=(0,l.createTextVNode)()),e.closeButton?((0,l.openBlock)(),(0,l.createBlock)(i,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:(0,l.withModifiers)(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):(0,l.createCommentVNode)("",!0),t[5]||(t[5]=(0,l.createTextVNode)()),e.timeout?((0,l.openBlock)(),(0,l.createBlock)(c,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):(0,l.createCommentVNode)("",!0)],38)}function VtProgressBarvue_type_template_id_393e1d20_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{style:(0,l.normalizeStyle)(e.style),class:(0,l.normalizeClass)(e.cpClass)},null,6)}const C=(0,l.defineComponent)({name:"VtProgressBar",props:y.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${c}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick((()=>this.hasClass=!0))}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});var B=__webpack_require__(6262);const E=(0,B.A)(C,[["render",VtProgressBarvue_type_template_id_393e1d20_ts_true_render]]),O=E;function VtCloseButtonvue_type_template_id_987d8b2a_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.buttonComponent),(0,l.mergeProps)({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:(0,l.withCtx)((()=>t[0]||(t[0]=[(0,l.createTextVNode)("\r\n ×\r\n ")]))),_:1},16,["aria-label","class"])}const S=(0,l.defineComponent)({name:"VtCloseButton",props:y.CLOSE_BUTTON,computed:{buttonComponent(){return!1!==this.component?getVueComponentFromObj(this.component):"button"},classes(){const e=[`${c}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),k=(0,B.A)(S,[["render",VtCloseButtonvue_type_template_id_987d8b2a_ts_true_render]]),D=k;function VtIconvue_type_template_id_4efc2143_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createBlock)((0,l.resolveDynamicComponent)(e.component),{class:(0,l.normalizeClass)(e.iconClasses)},{default:(0,l.withCtx)((()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.customIconChildren),1)])),_:1},8,["class"])}const w={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function VtSuccessIconvue_type_template_id_4652b358_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("svg",w,t[0]||(t[0]=[(0,l.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1)]))}const I={},P=(0,B.A)(I,[["render",VtSuccessIconvue_type_template_id_4652b358_ts_true_render]]),x=P,N={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function VtInfoIconvue_type_template_id_e31c7278_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("svg",N,t[0]||(t[0]=[(0,l.createElementVNode)("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1)]))}const R={},A=(0,B.A)(R,[["render",VtInfoIconvue_type_template_id_e31c7278_ts_true_render]]),L=A,V={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"};function VtWarningIconvue_type_template_id_1f8b4458_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("svg",V,t[0]||(t[0]=[(0,l.createElementVNode)("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)]))}const $={},j=(0,B.A)($,[["render",VtWarningIconvue_type_template_id_1f8b4458_ts_true_render]]),M=j,F={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"};function VtErrorIconvue_type_template_id_78c99fad_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createElementBlock)("svg",F,t[0]||(t[0]=[(0,l.createElementVNode)("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1)]))}const U={},H=(0,B.A)(U,[["render",VtErrorIconvue_type_template_id_78c99fad_ts_true_render]]),q=H,z=(0,l.defineComponent)({name:"VtIcon",props:y.ICON,computed:{customIconChildren(){return hasProp(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return isString(this.customIcon)?this.trimValue(this.customIcon):hasProp(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return hasProp(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:isToastContent(this.customIcon)?getVueComponentFromObj(this.customIcon):this.iconTypeComponent},iconTypeComponent(){const e={[n.DEFAULT]:L,[n.INFO]:L,[n.SUCCESS]:x,[n.ERROR]:q,[n.WARNING]:M};return e[this.type]},iconClasses(){const e=[`${c}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=""){return isNonEmptyString(e)?e.trim():t}}}),G=(0,B.A)(z,[["render",VtIconvue_type_template_id_4efc2143_ts_true_render]]),X=G,Y=(0,l.defineComponent)({name:"VtToast",components:{ProgressBar:O,CloseButton:D,Icon:X},inheritAttrs:!1,props:Object.assign({},y.CORE_TOAST,y.TOAST),data(){const e={isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}};return e},computed:{classes(){const e=[`${c}__toast`,`${c}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${c}__toast--rtl`),e},bodyClasses(){const e=[`${c}__toast-${isString(this.content)?"body":"component-body"}`].concat(this.bodyClassName);return e},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return isDOMRect(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp,getVueComponentFromObj,closeToast(){u.eventBus.$emit(r.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(this.beingDragged&&this.dragStart!==this.dragPos.x||this.closeToast())},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:getX(e),y:getY(e)},this.dragStart=getX(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:getX(e),y:getY(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick((()=>this.closeToast()))):setTimeout((()=>{this.beingDragged=!1,isDOMRect(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0})))}}}),W=(0,B.A)(Y,[["render",VtToastvue_type_template_id_38490303_ts_true_render]]),J=W;function VtTransitionvue_type_template_id_47d455c7_ts_true_render(e,t,s,o,n,a){return(0,l.openBlock)(),(0,l.createBlock)(l.TransitionGroup,{tag:"div","enter-active-class":e.myTransition["enter"]?e.myTransition.enter:`${e.transition}-enter-active`,"move-class":e.myTransition.move?e.myTransition.move:`${e.transition}-move`,"leave-active-class":e.myTransition.leave?e.myTransition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:(0,l.withCtx)((()=>[(0,l.renderSlot)(e.$slots,"default")])),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}const K=(0,l.defineComponent)({name:"VtTransition",props:y.TRANSITION,emits:["leave"],computed:{myTransition(){return this.transition}},methods:{hasProp,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}}),Q=(0,B.A)(K,[["render",VtTransitionvue_type_template_id_47d455c7_ts_true_render]]),Z=Q,ee=(0,l.defineComponent)({name:"VueToastification",devtools:{hide:!0},components:{Toast:J,VtTransition:Z},props:Object.assign({},y.CORE_TOAST,y.CONTAINER,y.TRANSITION),data(){const e={count:0,positions:Object.values(a),toasts:{},defaults:{}};return e},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){u.eventBus.$on(r.ADD,this.addToast),u.eventBus.$on(r.CLEAR,this.clearToasts),u.eventBus.$on(r.DISMISS,this.dismissToast),u.eventBus.$on(r.UPDATE,this.updateToast),u.eventBus.$on(r.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},beforeUnmount(){u.eventBus.$off(r.ADD,this.addToast),u.eventBus.$off(r.CLEAR,this.clearToasts),u.eventBus.$off(r.DISMISS,this.dismissToast),u.eventBus.$off(r.UPDATE,this.updateToast),u.eventBus.$off(r.UPDATE_DEFAULTS,this.updateDefault)},mounted(){this.setup(this.container)},methods:{async setup(e){isFunction(e)&&(e=await e()),removeElement(this.$el),e.appendChild(this.$el)},setToast(e){isUndefined(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=normalizeToastComponent(e.content);const t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),s=this.defaults.filterBeforeCreate(t,this.toastArray);s&&this.setToast(s)},dismissToast(e){const t=this.toasts[e];isUndefined(t)||isUndefined(t.onClose)||t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach((e=>{this.dismissToast(e)}))},getPositionToasts(e){const t=this.filteredToasts.filter((t=>t.position===e)).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){isUndefined(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:s}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):s&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){const t=[`${c}__container`,e];return t.concat(this.defaults.containerClassName)}}}),te=(0,B.A)(ee,[["render",render]]),se=te,buildInterface=(e={},t=!0)=>{let s=null;t&&(0,l.nextTick)((()=>{s=(0,l.createApp)(se,{...e});const t=s.mount(document.createElement("div")),o=e.onMounted;if(isUndefined(o)||o(t,s),e.shareAppContext){const t=e.shareAppContext;!0===t?console.warn(`[${c}] App to share context with was not provided.`):(s._context.components=t._context.components,s._context.directives=t._context.directives,s._context.mixins=t._context.mixins,s._context.provides=t._context.provides,s.config.globalProperties=t.config.globalProperties)}}));const toast=(e,t)=>{const s=Object.assign({},{id:T(),type:n.DEFAULT},t,{content:e});return u.eventBus.$emit(r.ADD,s),s.id};function updateToast(e,{content:t,options:s},o=!1){const n=Object.assign({},s,{content:t});u.eventBus.$emit(r.UPDATE,{id:e,options:n,create:o})}return toast.clear=()=>u.eventBus.$emit(r.CLEAR,void 0),toast.updateDefaults=e=>{u.eventBus.$emit(r.UPDATE_DEFAULTS,e)},toast.dismiss=e=>{u.eventBus.$emit(r.DISMISS,e)},toast.destroy=()=>{s.unmount()},toast.update=updateToast,toast.success=(e,t)=>{toast(e,Object.assign({},t,{type:n.SUCCESS}))},toast.info=(e,t)=>toast(e,Object.assign({},t,{type:n.INFO})),toast.error=(e,t)=>toast(e,Object.assign({},t,{type:n.ERROR})),toast.warning=(e,t)=>toast(e,Object.assign({},t,{type:n.WARNING})),toast},oe={install(e,t){const s=buildInterface(t,!0);e.config.globalProperties.$toasted=s;const o=Number(e.version.replace(/\D/g,""));o>3500&&e.onUnmount((()=>{s.destroy()}))}},ne=oe,ae=ne;return i})()));
|
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
@charset "UTF-8";
|
|
2
|
+
|
|
3
|
+
$vt-namespace: "Vue-Toastification" !default;
|
|
4
|
+
$vt-toast-min-width: 326px !default;
|
|
5
|
+
$vt-toast-max-width: 600px !default;
|
|
6
|
+
$vt-toast-background: #ffffff !default;
|
|
7
|
+
|
|
8
|
+
$vt-toast-min-height: 64px !default;
|
|
9
|
+
$vt-toast-max-height: 800px !default;
|
|
10
|
+
|
|
11
|
+
$vt-color-default: #1976d2 !default;
|
|
12
|
+
$vt-text-color-default: #fff !default;
|
|
13
|
+
// $vt-color-info: #2196f3 !default;
|
|
14
|
+
$vt-color-info: var(--primary-l-4);
|
|
15
|
+
$vt-text-color-info: #fff !default;
|
|
16
|
+
// $vt-color-success: #4caf50 !default;
|
|
17
|
+
$vt-color-success: var(--success);
|
|
18
|
+
$vt-text-color-success: #fff !default;
|
|
19
|
+
// $vt-color-warning: #ffc107 !default;
|
|
20
|
+
$vt-color-warning: var(--warning-l-2);
|
|
21
|
+
$vt-text-color-warning: #fff !default;
|
|
22
|
+
// $vt-color-error: #ff5252 !default;
|
|
23
|
+
$vt-color-error: var(--error-l-2);
|
|
24
|
+
$vt-text-color-error: #fff !default;
|
|
25
|
+
|
|
26
|
+
$vt-color-progress-default: linear-gradient(
|
|
27
|
+
to right,
|
|
28
|
+
#4cd964,
|
|
29
|
+
#5ac8fa,
|
|
30
|
+
#007aff,
|
|
31
|
+
#34aadc,
|
|
32
|
+
#5856d6,
|
|
33
|
+
#ff2d55
|
|
34
|
+
) !default;
|
|
35
|
+
|
|
36
|
+
$vt-mobile: "only screen and (max-width : 600px)" !default;
|
|
37
|
+
$vt-not-mobile: "only screen and (min-width : 600px)" !default;
|
|
38
|
+
$vt-font-family: "Lato", Helvetica, "Roboto", Arial, sans-serif !default;
|
|
39
|
+
$vt-z-index: 9999 !default;
|
|
40
|
+
|
|
41
|
+
.#{$vt-namespace}__container {
|
|
42
|
+
z-index: $vt-z-index;
|
|
43
|
+
position: fixed;
|
|
44
|
+
padding: 4px;
|
|
45
|
+
width: $vt-toast-max-width;
|
|
46
|
+
box-sizing: border-box;
|
|
47
|
+
display: flex;
|
|
48
|
+
min-height: 100%;
|
|
49
|
+
color: #fff;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
|
|
53
|
+
@media #{$vt-not-mobile} {
|
|
54
|
+
&.top-left,
|
|
55
|
+
&.top-right,
|
|
56
|
+
&.top-center {
|
|
57
|
+
top: 1em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&.bottom-left,
|
|
61
|
+
&.bottom-right,
|
|
62
|
+
&.bottom-center {
|
|
63
|
+
bottom: 1em;
|
|
64
|
+
flex-direction: column-reverse;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.top-left,
|
|
68
|
+
&.bottom-left {
|
|
69
|
+
left: 1em;
|
|
70
|
+
.#{$vt-namespace}__toast {
|
|
71
|
+
margin-right: auto;
|
|
72
|
+
}
|
|
73
|
+
// Firefox does not apply rtl rules to containers and margins, it appears.
|
|
74
|
+
// See https://github.com/Maronato/vue-toastification/issues/179
|
|
75
|
+
@supports not (-moz-appearance:none) {
|
|
76
|
+
.#{$vt-namespace}__toast--rtl {
|
|
77
|
+
margin-right: unset;
|
|
78
|
+
margin-left: auto;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&.top-right,
|
|
84
|
+
&.bottom-right {
|
|
85
|
+
right: 1em;
|
|
86
|
+
.#{$vt-namespace}__toast {
|
|
87
|
+
margin-left: auto;
|
|
88
|
+
}
|
|
89
|
+
// Firefox does not apply rtl rules to containers and margins, it appears.
|
|
90
|
+
// See https://github.com/Maronato/vue-toastification/issues/179
|
|
91
|
+
@supports not (-moz-appearance:none) {
|
|
92
|
+
.#{$vt-namespace}__toast--rtl {
|
|
93
|
+
margin-left: unset;
|
|
94
|
+
margin-right: auto;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&.top-center,
|
|
100
|
+
&.bottom-center {
|
|
101
|
+
left: 50%;
|
|
102
|
+
margin-left: calc(calc($vt-toast-max-width / 2 * (-1)));
|
|
103
|
+
.#{$vt-namespace}__toast {
|
|
104
|
+
margin-left: auto;
|
|
105
|
+
margin-right: auto;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@media #{$vt-mobile} {
|
|
111
|
+
width: 100vw;
|
|
112
|
+
padding: 0;
|
|
113
|
+
left: 0;
|
|
114
|
+
margin: 0;
|
|
115
|
+
.#{$vt-namespace}__toast {
|
|
116
|
+
width: 100%;
|
|
117
|
+
}
|
|
118
|
+
&.top-left,
|
|
119
|
+
&.top-right,
|
|
120
|
+
&.top-center {
|
|
121
|
+
top: 0;
|
|
122
|
+
}
|
|
123
|
+
&.bottom-left,
|
|
124
|
+
&.bottom-right,
|
|
125
|
+
&.bottom-center {
|
|
126
|
+
bottom: 0;
|
|
127
|
+
flex-direction: column-reverse;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.#{$vt-namespace}__toast {
|
|
133
|
+
display: inline-flex;
|
|
134
|
+
position: relative;
|
|
135
|
+
max-height: $vt-toast-max-height;
|
|
136
|
+
min-height: $vt-toast-min-height;
|
|
137
|
+
box-sizing: border-box;
|
|
138
|
+
margin-bottom: 1rem;
|
|
139
|
+
padding: 22px 24px;
|
|
140
|
+
border-radius: 8px;
|
|
141
|
+
box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 15px 0 rgba(0, 0, 0, 0.05);
|
|
142
|
+
justify-content: space-between;
|
|
143
|
+
font-family: $vt-font-family;
|
|
144
|
+
max-width: $vt-toast-max-width;
|
|
145
|
+
min-width: $vt-toast-min-width;
|
|
146
|
+
pointer-events: auto;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
// overflow: hidden + border-radius does not work properly on Safari
|
|
149
|
+
// The following magic line fixes it
|
|
150
|
+
// https://stackoverflow.com/a/58283449
|
|
151
|
+
transform: translateZ(0);
|
|
152
|
+
direction: ltr;
|
|
153
|
+
&--rtl {
|
|
154
|
+
direction: rtl;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&--default {
|
|
158
|
+
background-color: $vt-color-default;
|
|
159
|
+
color: $vt-text-color-default;
|
|
160
|
+
}
|
|
161
|
+
&--info {
|
|
162
|
+
background-color: $vt-color-info;
|
|
163
|
+
color: $vt-text-color-info;
|
|
164
|
+
}
|
|
165
|
+
&--success {
|
|
166
|
+
background-color: $vt-color-success;
|
|
167
|
+
color: $vt-text-color-success;
|
|
168
|
+
}
|
|
169
|
+
&--error {
|
|
170
|
+
background-color: $vt-color-error;
|
|
171
|
+
color: $vt-text-color-error;
|
|
172
|
+
}
|
|
173
|
+
&--warning {
|
|
174
|
+
background-color: $vt-color-warning;
|
|
175
|
+
color: $vt-text-color-warning;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@media #{$vt-mobile} {
|
|
179
|
+
border-radius: 0px;
|
|
180
|
+
margin-bottom: 0.5rem;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&-body {
|
|
184
|
+
flex: 1;
|
|
185
|
+
line-height: 24px;
|
|
186
|
+
font-size: 16px;
|
|
187
|
+
word-break: break-word;
|
|
188
|
+
white-space: pre-wrap;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&-component-body {
|
|
192
|
+
flex: 1;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&.disable-transition {
|
|
196
|
+
animation: none !important;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.#{$vt-namespace}__close-button {
|
|
201
|
+
font-weight: bold;
|
|
202
|
+
font-size: 24px;
|
|
203
|
+
line-height: 24px;
|
|
204
|
+
background: transparent;
|
|
205
|
+
outline: none;
|
|
206
|
+
border: none;
|
|
207
|
+
padding: 0;
|
|
208
|
+
padding-left: 10px;
|
|
209
|
+
cursor: pointer;
|
|
210
|
+
transition: 0.3s ease;
|
|
211
|
+
align-items: center;
|
|
212
|
+
color: #fff;
|
|
213
|
+
opacity: 0.3;
|
|
214
|
+
transition: visibility 0s, opacity 0.2s linear;
|
|
215
|
+
&:hover,
|
|
216
|
+
&:focus {
|
|
217
|
+
opacity: 1;
|
|
218
|
+
}
|
|
219
|
+
.#{$vt-namespace}__toast:not(:hover) &.show-on-hover {
|
|
220
|
+
opacity: 0;
|
|
221
|
+
}
|
|
222
|
+
.#{$vt-namespace}__toast--rtl & {
|
|
223
|
+
padding-left: unset;
|
|
224
|
+
padding-right: 10px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@keyframes scale-x-frames {
|
|
229
|
+
0% {
|
|
230
|
+
transform: scaleX(1);
|
|
231
|
+
}
|
|
232
|
+
100% {
|
|
233
|
+
transform: scaleX(0);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.#{$vt-namespace}__progress-bar {
|
|
238
|
+
position: absolute;
|
|
239
|
+
bottom: 0;
|
|
240
|
+
left: 0;
|
|
241
|
+
width: 100%;
|
|
242
|
+
height: 5px;
|
|
243
|
+
z-index: ($vt-z-index + 1);
|
|
244
|
+
background-color: rgba(255, 255, 255, 0.7);
|
|
245
|
+
transform-origin: left;
|
|
246
|
+
animation: scale-x-frames linear 1 forwards;
|
|
247
|
+
.#{$vt-namespace}__toast--rtl & {
|
|
248
|
+
right: 0;
|
|
249
|
+
left: unset;
|
|
250
|
+
transform-origin: right;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.#{$vt-namespace}__icon {
|
|
255
|
+
margin: auto 18px auto 0px;
|
|
256
|
+
background: transparent;
|
|
257
|
+
outline: none;
|
|
258
|
+
border: none;
|
|
259
|
+
padding: 0;
|
|
260
|
+
transition: 0.3s ease;
|
|
261
|
+
align-items: center;
|
|
262
|
+
width: 20px;
|
|
263
|
+
height: 100%;
|
|
264
|
+
.#{$vt-namespace}__toast--rtl & {
|
|
265
|
+
margin: auto 0px auto 18px;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/* ----------------------------------------------
|
|
270
|
+
/* Animations
|
|
271
|
+
/* ---------------------------------------------- */
|
|
272
|
+
|
|
273
|
+
.#{$vt-namespace}__bounce-enter-active {
|
|
274
|
+
&.top-left,
|
|
275
|
+
&.bottom-left {
|
|
276
|
+
animation-name: bounceInLeft;
|
|
277
|
+
}
|
|
278
|
+
&.top-right,
|
|
279
|
+
&.bottom-right {
|
|
280
|
+
animation-name: bounceInRight;
|
|
281
|
+
}
|
|
282
|
+
&.top-center {
|
|
283
|
+
animation-name: bounceInDown;
|
|
284
|
+
}
|
|
285
|
+
&.bottom-center {
|
|
286
|
+
animation-name: bounceInUp;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.#{$vt-namespace}__bounce-leave-active:not(.disable-transition) {
|
|
291
|
+
&.top-left,
|
|
292
|
+
&.bottom-left {
|
|
293
|
+
animation-name: bounceOutLeft;
|
|
294
|
+
}
|
|
295
|
+
&.top-right,
|
|
296
|
+
&.bottom-right {
|
|
297
|
+
animation-name: bounceOutRight;
|
|
298
|
+
}
|
|
299
|
+
&.top-center {
|
|
300
|
+
animation-name: bounceOutUp;
|
|
301
|
+
}
|
|
302
|
+
&.bottom-center {
|
|
303
|
+
animation-name: bounceOutDown;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.#{$vt-namespace}__bounce-leave-active,
|
|
308
|
+
.#{$vt-namespace}__bounce-enter-active {
|
|
309
|
+
animation-duration: 750ms;
|
|
310
|
+
animation-fill-mode: both;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.#{$vt-namespace}__bounce-move {
|
|
314
|
+
transition-timing-function: ease-in-out;
|
|
315
|
+
transition-property: all;
|
|
316
|
+
transition-duration: 400ms;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.#{$vt-namespace}__fade-enter-active {
|
|
320
|
+
&.top-left,
|
|
321
|
+
&.bottom-left {
|
|
322
|
+
animation-name: fadeInLeft;
|
|
323
|
+
}
|
|
324
|
+
&.top-right,
|
|
325
|
+
&.bottom-right {
|
|
326
|
+
animation-name: fadeInRight;
|
|
327
|
+
}
|
|
328
|
+
&.top-center {
|
|
329
|
+
animation-name: fadeInTop;
|
|
330
|
+
}
|
|
331
|
+
&.bottom-center {
|
|
332
|
+
animation-name: fadeInBottom;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.#{$vt-namespace}__fade-leave-active:not(.disable-transition) {
|
|
337
|
+
&.top-left,
|
|
338
|
+
&.bottom-left {
|
|
339
|
+
animation-name: fadeOutLeft;
|
|
340
|
+
}
|
|
341
|
+
&.top-right,
|
|
342
|
+
&.bottom-right {
|
|
343
|
+
animation-name: fadeOutRight;
|
|
344
|
+
}
|
|
345
|
+
&.top-center {
|
|
346
|
+
animation-name: fadeOutTop;
|
|
347
|
+
}
|
|
348
|
+
&.bottom-center {
|
|
349
|
+
animation-name: fadeOutBottom;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
.#{$vt-namespace}__fade-leave-active,
|
|
354
|
+
.#{$vt-namespace}__fade-enter-active {
|
|
355
|
+
animation-duration: 750ms;
|
|
356
|
+
animation-fill-mode: both;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.#{$vt-namespace}__fade-move {
|
|
360
|
+
transition-timing-function: ease-in-out;
|
|
361
|
+
transition-property: all;
|
|
362
|
+
transition-duration: 400ms;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
.#{$vt-namespace}__slideBlurred-enter-active {
|
|
366
|
+
&.top-left,
|
|
367
|
+
&.bottom-left {
|
|
368
|
+
animation-name: slideInBlurredLeft;
|
|
369
|
+
}
|
|
370
|
+
&.top-right,
|
|
371
|
+
&.bottom-right {
|
|
372
|
+
animation-name: slideInBlurredRight;
|
|
373
|
+
}
|
|
374
|
+
&.top-center {
|
|
375
|
+
animation-name: slideInBlurredTop;
|
|
376
|
+
}
|
|
377
|
+
&.bottom-center {
|
|
378
|
+
animation-name: slideInBlurredBottom;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.#{$vt-namespace}__slideBlurred-leave-active:not(.disable-transition) {
|
|
383
|
+
&.top-left,
|
|
384
|
+
&.bottom-left {
|
|
385
|
+
animation-name: slideOutBlurredLeft;
|
|
386
|
+
}
|
|
387
|
+
&.top-right,
|
|
388
|
+
&.bottom-right {
|
|
389
|
+
animation-name: slideOutBlurredRight;
|
|
390
|
+
}
|
|
391
|
+
&.top-center {
|
|
392
|
+
animation-name: slideOutBlurredTop;
|
|
393
|
+
}
|
|
394
|
+
&.bottom-center {
|
|
395
|
+
animation-name: slideOutBlurredBottom;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.#{$vt-namespace}__slideBlurred-leave-active,
|
|
400
|
+
.#{$vt-namespace}__slideBlurred-enter-active {
|
|
401
|
+
animation-duration: 750ms;
|
|
402
|
+
animation-fill-mode: both;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.#{$vt-namespace}__slideBlurred-move {
|
|
406
|
+
transition-timing-function: ease-in-out;
|
|
407
|
+
transition-property: all;
|
|
408
|
+
transition-duration: 400ms;
|
|
409
|
+
}
|
package/dist/scss/index-old.scss
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ldmjs/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.63",
|
|
4
4
|
"description": "ldm ui",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"engines": {
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"build:demo": "cross-env NODE_ENV=production webpack --config config/webpack.config.build.demo.js --stats-error-details",
|
|
14
14
|
"demo": "cross-env NODE_ENV=development webpack serve --config config/webpack.config.demo.js --progress --profile",
|
|
15
15
|
"test": "jest --runInBand --no-cache",
|
|
16
|
+
"version": "node config/version.js",
|
|
16
17
|
"pub": "node config/publish.js && npm publish --access=public"
|
|
17
18
|
},
|
|
18
19
|
"repository": {
|
|
@@ -51,8 +52,8 @@
|
|
|
51
52
|
"@types/jest": "29.5.12",
|
|
52
53
|
"@types/lodash-es": "4",
|
|
53
54
|
"@types/markdown-it": "14",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "
|
|
55
|
-
"@typescript-eslint/parser": "
|
|
55
|
+
"@typescript-eslint/eslint-plugin": "6.7.2",
|
|
56
|
+
"@typescript-eslint/parser": "6.7.2",
|
|
56
57
|
"@vue/test-utils": "2.4.6",
|
|
57
58
|
"@vue/vue3-jest": "29.2.6",
|
|
58
59
|
"@vuelidate/core": "2.0.2",
|
|
@@ -108,7 +109,8 @@
|
|
|
108
109
|
"@ldmjs/core": "1.0.0"
|
|
109
110
|
},
|
|
110
111
|
"volta": {
|
|
111
|
-
"node": "
|
|
112
|
-
"yarn": "4.
|
|
113
|
-
}
|
|
112
|
+
"node": "22.15.0",
|
|
113
|
+
"yarn": "4.7.0"
|
|
114
|
+
},
|
|
115
|
+
"packageManager": "yarn@4.5.0+sha512.837566d24eec14ec0f5f1411adb544e892b3454255e61fdef8fd05f3429480102806bac7446bc9daff3896b01ae4b62d00096c7e989f1596f2af10b927532f39"
|
|
114
116
|
}
|