@ldmjs/ui 1.0.12 → 1.0.14
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/README.md +3 -1
- package/dist/css/index.css +2 -2
- package/dist/index.d.ts +41 -14
- package/dist/index.js +2111 -501
- package/dist/scss/_dialogs.scss +207 -0
- package/dist/scss/_variables.scss +4 -0
- package/dist/scss/index.scss +1 -0
- package/dist/types/dialogs.d.ts +259 -0
- package/dist/types/options.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -9,12 +9,19 @@
|
|
|
9
9
|
root["ldmui"] = factory(root["./calendar.js"], root["./floating.js"], root["./imask.js"], root["./multiselect.js"], root["./runtime-template.js"], root["@vuelidate/validators"], root["markdown-it"], root["md-editor-v3"], root["vue"], root["vue-class-component"], root["vue-property-decorator"], root["vue-toastification"]);
|
|
10
10
|
})(self, (__WEBPACK_EXTERNAL_MODULE__4634__, __WEBPACK_EXTERNAL_MODULE__3654__, __WEBPACK_EXTERNAL_MODULE__6135__, __WEBPACK_EXTERNAL_MODULE__9225__, __WEBPACK_EXTERNAL_MODULE__119__, __WEBPACK_EXTERNAL_MODULE__887__, __WEBPACK_EXTERNAL_MODULE__8461__, __WEBPACK_EXTERNAL_MODULE__6443__, __WEBPACK_EXTERNAL_MODULE__2380__, __WEBPACK_EXTERNAL_MODULE__9299__, __WEBPACK_EXTERNAL_MODULE__5070__, __WEBPACK_EXTERNAL_MODULE__7982__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
|
-
/******/ "use strict";
|
|
13
12
|
/******/ var __webpack_modules__ = ({
|
|
14
13
|
|
|
14
|
+
/***/ 634:
|
|
15
|
+
/***/ ((module) => {
|
|
16
|
+
|
|
17
|
+
(function webpackUniversalModuleDefinition(e,t){ true?module.exports=t():0})(self,(()=>(()=>{"use strict";var e={};(()=>{e.d=(t,s)=>{for(var i in s)e.o(s,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:s[i]})}})(),(()=>{e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{e.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var t={};e.r(t),e.d(t,{eventBus:()=>s});class EventBus{constructor(){this.listeners={},this.once=[]}$on(e,t){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push(t)}$once(e,t){this.$on(e,t),this.once.push(e)}$off(e,t){const s=new Map;if(e in this.listeners){this.listeners[e].forEach(((e,t)=>{s.set(e,t)}));const i=s.get(t);void 0!==i&&(this.listeners[e].splice(i,1),0===this.listeners[e]?.length&&delete this.listeners[e])}}$flush(){for(const e in this.listeners)this.listeners[e]=[];this.listeners={}}$emit(e,...t){e in this.listeners&&this.listeners[e].forEach((s=>{Function.prototype.apply.call(s,this,t),this.once.includes(e)&&(this.$off(e,s),this.once=this.once.filter((t=>t!==e)))}))}$has(e){return Boolean(e in this.listeners&&this.listeners[e])}}const s=new EventBus;return t})()));
|
|
18
|
+
|
|
19
|
+
/***/ }),
|
|
20
|
+
|
|
15
21
|
/***/ 6262:
|
|
16
22
|
/***/ ((__unused_webpack_module, exports) => {
|
|
17
23
|
|
|
24
|
+
"use strict";
|
|
18
25
|
var __webpack_unused_export__;
|
|
19
26
|
|
|
20
27
|
__webpack_unused_export__ = ({ value: true });
|
|
@@ -34,6 +41,7 @@ exports.A = (sfc, props) => {
|
|
|
34
41
|
/***/ 4634:
|
|
35
42
|
/***/ ((module) => {
|
|
36
43
|
|
|
44
|
+
"use strict";
|
|
37
45
|
module.exports = __WEBPACK_EXTERNAL_MODULE__4634__;
|
|
38
46
|
|
|
39
47
|
/***/ }),
|
|
@@ -41,6 +49,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__4634__;
|
|
|
41
49
|
/***/ 3654:
|
|
42
50
|
/***/ ((module) => {
|
|
43
51
|
|
|
52
|
+
"use strict";
|
|
44
53
|
module.exports = __WEBPACK_EXTERNAL_MODULE__3654__;
|
|
45
54
|
|
|
46
55
|
/***/ }),
|
|
@@ -48,6 +57,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__3654__;
|
|
|
48
57
|
/***/ 6135:
|
|
49
58
|
/***/ ((module) => {
|
|
50
59
|
|
|
60
|
+
"use strict";
|
|
51
61
|
module.exports = __WEBPACK_EXTERNAL_MODULE__6135__;
|
|
52
62
|
|
|
53
63
|
/***/ }),
|
|
@@ -55,6 +65,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__6135__;
|
|
|
55
65
|
/***/ 9225:
|
|
56
66
|
/***/ ((module) => {
|
|
57
67
|
|
|
68
|
+
"use strict";
|
|
58
69
|
module.exports = __WEBPACK_EXTERNAL_MODULE__9225__;
|
|
59
70
|
|
|
60
71
|
/***/ }),
|
|
@@ -62,6 +73,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9225__;
|
|
|
62
73
|
/***/ 119:
|
|
63
74
|
/***/ ((module) => {
|
|
64
75
|
|
|
76
|
+
"use strict";
|
|
65
77
|
module.exports = __WEBPACK_EXTERNAL_MODULE__119__;
|
|
66
78
|
|
|
67
79
|
/***/ }),
|
|
@@ -69,6 +81,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__119__;
|
|
|
69
81
|
/***/ 887:
|
|
70
82
|
/***/ ((module) => {
|
|
71
83
|
|
|
84
|
+
"use strict";
|
|
72
85
|
module.exports = __WEBPACK_EXTERNAL_MODULE__887__;
|
|
73
86
|
|
|
74
87
|
/***/ }),
|
|
@@ -76,6 +89,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__887__;
|
|
|
76
89
|
/***/ 8461:
|
|
77
90
|
/***/ ((module) => {
|
|
78
91
|
|
|
92
|
+
"use strict";
|
|
79
93
|
module.exports = __WEBPACK_EXTERNAL_MODULE__8461__;
|
|
80
94
|
|
|
81
95
|
/***/ }),
|
|
@@ -83,6 +97,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__8461__;
|
|
|
83
97
|
/***/ 6443:
|
|
84
98
|
/***/ ((module) => {
|
|
85
99
|
|
|
100
|
+
"use strict";
|
|
86
101
|
module.exports = __WEBPACK_EXTERNAL_MODULE__6443__;
|
|
87
102
|
|
|
88
103
|
/***/ }),
|
|
@@ -90,6 +105,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__6443__;
|
|
|
90
105
|
/***/ 2380:
|
|
91
106
|
/***/ ((module) => {
|
|
92
107
|
|
|
108
|
+
"use strict";
|
|
93
109
|
module.exports = __WEBPACK_EXTERNAL_MODULE__2380__;
|
|
94
110
|
|
|
95
111
|
/***/ }),
|
|
@@ -97,6 +113,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__2380__;
|
|
|
97
113
|
/***/ 9299:
|
|
98
114
|
/***/ ((module) => {
|
|
99
115
|
|
|
116
|
+
"use strict";
|
|
100
117
|
module.exports = __WEBPACK_EXTERNAL_MODULE__9299__;
|
|
101
118
|
|
|
102
119
|
/***/ }),
|
|
@@ -104,6 +121,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9299__;
|
|
|
104
121
|
/***/ 5070:
|
|
105
122
|
/***/ ((module) => {
|
|
106
123
|
|
|
124
|
+
"use strict";
|
|
107
125
|
module.exports = __WEBPACK_EXTERNAL_MODULE__5070__;
|
|
108
126
|
|
|
109
127
|
/***/ }),
|
|
@@ -111,6 +129,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__5070__;
|
|
|
111
129
|
/***/ 7982:
|
|
112
130
|
/***/ ((module) => {
|
|
113
131
|
|
|
132
|
+
"use strict";
|
|
114
133
|
module.exports = __WEBPACK_EXTERNAL_MODULE__7982__;
|
|
115
134
|
|
|
116
135
|
/***/ })
|
|
@@ -214,13 +233,26 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__7982__;
|
|
|
214
233
|
/******/
|
|
215
234
|
/************************************************************************/
|
|
216
235
|
var __webpack_exports__ = {};
|
|
236
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
237
|
+
(() => {
|
|
238
|
+
"use strict";
|
|
217
239
|
// ESM COMPAT FLAG
|
|
218
240
|
__webpack_require__.r(__webpack_exports__);
|
|
219
241
|
|
|
220
242
|
// EXPORTS
|
|
221
243
|
__webpack_require__.d(__webpack_exports__, {
|
|
244
|
+
AlertDialog: () => (/* reexport */ AlertDialog),
|
|
245
|
+
ConfirmDialog: () => (/* reexport */ ConfirmDialog),
|
|
246
|
+
CreateEditDialog: () => (/* reexport */ CreateEditDialog),
|
|
247
|
+
DialogManager: () => (/* reexport */ DialogManager),
|
|
248
|
+
InfoDialog: () => (/* reexport */ InfoDialog),
|
|
249
|
+
ModalButton: () => (/* reexport */ ModalButton),
|
|
250
|
+
ModalType: () => (/* reexport */ ModalType),
|
|
251
|
+
PromptDialog: () => (/* reexport */ PromptDialog),
|
|
252
|
+
SelectDialog: () => (/* reexport */ SelectDialog),
|
|
222
253
|
ValidateMixin: () => (/* reexport */ ValidateMixin),
|
|
223
254
|
ValidateMixinOptions: () => (/* reexport */ ValidateMixinOptions),
|
|
255
|
+
awaiting: () => (/* reexport */ awaiting),
|
|
224
256
|
datetime: () => (/* reexport */ datetime),
|
|
225
257
|
deepValueGetter: () => (/* reexport */ deepValueGetter),
|
|
226
258
|
"default": () => (/* binding */ src),
|
|
@@ -237,6 +269,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
237
269
|
var src_utils_namespaceObject = {};
|
|
238
270
|
__webpack_require__.r(src_utils_namespaceObject);
|
|
239
271
|
__webpack_require__.d(src_utils_namespaceObject, {
|
|
272
|
+
awaiting: () => (awaiting),
|
|
240
273
|
datetime: () => (datetime),
|
|
241
274
|
deepValueGetter: () => (deepValueGetter),
|
|
242
275
|
delay: () => (delay),
|
|
@@ -1034,9 +1067,9 @@ function baseTrim(string) {
|
|
|
1034
1067
|
|
|
1035
1068
|
|
|
1036
1069
|
/** Built-in value references. */
|
|
1037
|
-
var
|
|
1070
|
+
var src_Symbol = _root.Symbol;
|
|
1038
1071
|
|
|
1039
|
-
/* harmony default export */ const _Symbol = (
|
|
1072
|
+
/* harmony default export */ const _Symbol = (src_Symbol);
|
|
1040
1073
|
|
|
1041
1074
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_getRawTag.js
|
|
1042
1075
|
|
|
@@ -8412,33 +8445,40 @@ function ld_page_toolbar_reg(vue, options) {
|
|
|
8412
8445
|
}
|
|
8413
8446
|
/* harmony default export */ const src_ld_page_toolbar = (ld_page_toolbar_reg);
|
|
8414
8447
|
|
|
8415
|
-
;// CONCATENATED MODULE: ./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-list-box/ld-select-list-box.vue?vue&type=template&id=
|
|
8448
|
+
;// CONCATENATED MODULE: ./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-list-box/ld-select-list-box.vue?vue&type=template&id=4ccf12f8&scoped=true&ts=true
|
|
8416
8449
|
|
|
8417
|
-
const
|
|
8418
|
-
const
|
|
8419
|
-
|
|
8450
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_withScopeId = n => (_pushScopeId("data-v-4ccf12f8"), n = n(), _popScopeId(), n);
|
|
8451
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_1 = {
|
|
8452
|
+
key: 0,
|
|
8453
|
+
class: "w-full overflow-hidden",
|
|
8454
|
+
style: { "border-radius": "var(--border-radius)" }
|
|
8455
|
+
};
|
|
8456
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_2 = { class: "w-full d-flex position-relative" };
|
|
8457
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
|
|
8458
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_4 = {
|
|
8420
8459
|
key: 0,
|
|
8421
8460
|
class: "d-flex align-center"
|
|
8422
8461
|
};
|
|
8423
|
-
const
|
|
8424
|
-
const
|
|
8462
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_5 = { class: "d-flex flex-column justify-center" };
|
|
8463
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_6 = {
|
|
8425
8464
|
key: 0,
|
|
8426
8465
|
class: "grey--text",
|
|
8427
8466
|
style: { "font-size": "var(--font-size--1)" }
|
|
8428
8467
|
};
|
|
8429
|
-
const
|
|
8468
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_7 = {
|
|
8430
8469
|
key: 1,
|
|
8431
8470
|
class: "select-list-box-loading"
|
|
8432
8471
|
};
|
|
8433
|
-
const
|
|
8434
|
-
key:
|
|
8435
|
-
class: "
|
|
8472
|
+
const ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_8 = {
|
|
8473
|
+
key: 1,
|
|
8474
|
+
class: "w-full",
|
|
8475
|
+
style: { "min-height": "var(--input-height)" }
|
|
8436
8476
|
};
|
|
8437
|
-
const
|
|
8438
|
-
key:
|
|
8439
|
-
class: "select-list-
|
|
8477
|
+
const _hoisted_9 = {
|
|
8478
|
+
key: 2,
|
|
8479
|
+
class: "select-list-box-validate"
|
|
8440
8480
|
};
|
|
8441
|
-
function
|
|
8481
|
+
function ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
8442
8482
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
|
|
8443
8483
|
const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
|
|
8444
8484
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
|
|
@@ -8460,220 +8500,197 @@ function ld_select_list_boxvue_type_template_id_6b0ce187_scoped_true_ts_true_ren
|
|
|
8460
8500
|
}, null, 8, ["class", "label", "required", "align-label-to-right"]))
|
|
8461
8501
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
8462
8502
|
(0,external_vue_.createTextVNode)(),
|
|
8463
|
-
(
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8503
|
+
(0,external_vue_.createVNode)(_component_v_col, {
|
|
8504
|
+
class: (0,external_vue_.normalizeClass)(_ctx.inputSizeClasses)
|
|
8505
|
+
}, {
|
|
8506
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
8507
|
+
(_ctx.multiselect || _ctx.selectedToArray.length === 0)
|
|
8508
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_1, [
|
|
8509
|
+
(0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_2, [
|
|
8510
|
+
(0,external_vue_.createVNode)(_component_multiselect, {
|
|
8511
|
+
ref: "multiselect",
|
|
8512
|
+
modelValue: _ctx.selected,
|
|
8513
|
+
"onUpdate:modelValue": [
|
|
8514
|
+
_cache[0] || (_cache[0] = ($event) => ((_ctx.selected) = $event)),
|
|
8515
|
+
_ctx.onInput
|
|
8516
|
+
],
|
|
8517
|
+
"track-by": "id",
|
|
8518
|
+
class: "multiselect--with-right-button",
|
|
8519
|
+
multiple: _ctx.multiselect,
|
|
8520
|
+
placeholder: _ctx.placeholder,
|
|
8521
|
+
"select-label": '',
|
|
8522
|
+
options: _ctx.optionsList,
|
|
8523
|
+
searchable: true,
|
|
8524
|
+
"internal-search": _ctx.internalSearch,
|
|
8525
|
+
"clear-on-select": true,
|
|
8526
|
+
"close-on-select": !_ctx.multiselect,
|
|
8527
|
+
"options-limit": 300,
|
|
8528
|
+
"show-no-results": true,
|
|
8529
|
+
"show-no-options": false,
|
|
8530
|
+
disabled: _ctx.readonly || _ctx.disabled,
|
|
8531
|
+
limit: _ctx.limit,
|
|
8532
|
+
tabindex: _ctx.tabIndex,
|
|
8533
|
+
allowEmpty: _ctx.allowEmpty,
|
|
8534
|
+
onClose: _ctx.dropdownClose,
|
|
8535
|
+
onSearchChange: _ctx.getItems
|
|
8477
8536
|
}, {
|
|
8478
|
-
|
|
8479
|
-
(0,external_vue_.
|
|
8480
|
-
|
|
8481
|
-
|
|
8482
|
-
|
|
8483
|
-
|
|
8484
|
-
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8494
|
-
"
|
|
8495
|
-
|
|
8496
|
-
|
|
8497
|
-
|
|
8498
|
-
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
|
|
8504
|
-
|
|
8537
|
+
tag: (0,external_vue_.withCtx)(({ option }) => [
|
|
8538
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "tag", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({
|
|
8539
|
+
item: option,
|
|
8540
|
+
onRemove: _ctx.onRemoveItem,
|
|
8541
|
+
canRemove: _ctx.canRemove,
|
|
8542
|
+
})), () => [
|
|
8543
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
8544
|
+
key: JSON.stringify(option),
|
|
8545
|
+
color: _ctx.disabled ? 'grey' : 'primary',
|
|
8546
|
+
closable: _ctx.canRemove,
|
|
8547
|
+
"onClick:close": ($event) => (_ctx.onRemoveItem(option))
|
|
8548
|
+
}, {
|
|
8549
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
8550
|
+
(0,external_vue_.createElementVNode)("span", ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
|
|
8551
|
+
]),
|
|
8552
|
+
_: 2
|
|
8553
|
+
}, 1032, ["color", "closable", "onClick:close"]))
|
|
8554
|
+
], true)
|
|
8555
|
+
]),
|
|
8556
|
+
"tag-overflow": (0,external_vue_.withCtx)(({ limit, count }) => [
|
|
8557
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "tag-overflow", {
|
|
8558
|
+
limit: limit,
|
|
8559
|
+
count: count
|
|
8560
|
+
}, () => [
|
|
8561
|
+
(0,external_vue_.createVNode)(_component_small_chip, { closable: false }, {
|
|
8562
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
8563
|
+
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(`overflow => limit: ${limit}, count: ${count}`), 1)
|
|
8564
|
+
]),
|
|
8565
|
+
_: 2
|
|
8566
|
+
}, 1024)
|
|
8567
|
+
], true)
|
|
8568
|
+
]),
|
|
8569
|
+
option: (0,external_vue_.withCtx)(({ option }) => [
|
|
8570
|
+
(0,external_vue_.createVNode)(_component_v_row, {
|
|
8571
|
+
"no-gutters": "",
|
|
8572
|
+
class: "d-flex mb-1 align-center"
|
|
8505
8573
|
}, {
|
|
8506
|
-
|
|
8507
|
-
(0,external_vue_.
|
|
8508
|
-
item: option,
|
|
8509
|
-
onRemove: _ctx.onRemoveItem,
|
|
8510
|
-
canRemove: _ctx.canRemove,
|
|
8511
|
-
})), () => [
|
|
8512
|
-
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
8513
|
-
key: JSON.stringify(option),
|
|
8514
|
-
color: _ctx.disabled ? 'grey' : 'primary',
|
|
8515
|
-
closable: _ctx.canRemove,
|
|
8516
|
-
"onClick:close": ($event) => (_ctx.onRemoveItem(option))
|
|
8517
|
-
}, {
|
|
8518
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
8519
|
-
(0,external_vue_.createElementVNode)("span", ld_select_list_boxvue_type_template_id_6b0ce187_scoped_true_ts_true_hoisted_1, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
|
|
8520
|
-
]),
|
|
8521
|
-
_: 2
|
|
8522
|
-
}, 1032, ["color", "closable", "onClick:close"]))
|
|
8523
|
-
], true)
|
|
8524
|
-
]),
|
|
8525
|
-
"tag-overflow": (0,external_vue_.withCtx)(({ limit, count }) => [
|
|
8526
|
-
(0,external_vue_.renderSlot)(_ctx.$slots, "tag-overflow", {
|
|
8527
|
-
limit: limit,
|
|
8528
|
-
count: count
|
|
8529
|
-
}, () => [
|
|
8530
|
-
(0,external_vue_.createVNode)(_component_small_chip, { closable: false }, {
|
|
8531
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
8532
|
-
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(`overflow => limit: ${limit}, count: ${count}`), 1)
|
|
8533
|
-
]),
|
|
8534
|
-
_: 2
|
|
8535
|
-
}, 1024)
|
|
8536
|
-
], true)
|
|
8537
|
-
]),
|
|
8538
|
-
option: (0,external_vue_.withCtx)(({ option }) => [
|
|
8539
|
-
(0,external_vue_.createVNode)(_component_v_row, {
|
|
8540
|
-
"no-gutters": "",
|
|
8541
|
-
class: "d-flex mb-1 align-center"
|
|
8542
|
-
}, {
|
|
8574
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
8575
|
+
(0,external_vue_.createVNode)(_component_v_col, { class: "d-flex align-center" }, {
|
|
8543
8576
|
default: (0,external_vue_.withCtx)(() => [
|
|
8544
|
-
(
|
|
8545
|
-
|
|
8546
|
-
(_ctx.
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
|
|
8552
|
-
|
|
8553
|
-
|
|
8554
|
-
|
|
8555
|
-
|
|
8577
|
+
(_ctx.multiselect)
|
|
8578
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_4, [
|
|
8579
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-checkbox']), {
|
|
8580
|
+
key: JSON.stringify(option),
|
|
8581
|
+
"model-value": _ctx.checkedItems,
|
|
8582
|
+
"initial-value": _ctx.$utils.deepValueGetter(option, _ctx.itemValue),
|
|
8583
|
+
"onUpdate:modelValue": ($event) => (_ctx.onCheckItem($event, option))
|
|
8584
|
+
}, null, 8, ["model-value", "initial-value", "onUpdate:modelValue"]))
|
|
8585
|
+
]))
|
|
8586
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
8587
|
+
(0,external_vue_.createTextVNode)(),
|
|
8588
|
+
(0,external_vue_.createElementVNode)("div", {
|
|
8589
|
+
class: (0,external_vue_.normalizeClass)(["d-flex align-center", { 'ml-1': _ctx.multiselect }])
|
|
8590
|
+
}, [
|
|
8591
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "option-icon", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), undefined, true),
|
|
8592
|
+
(0,external_vue_.createTextVNode)(),
|
|
8593
|
+
(0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_5, [
|
|
8594
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "option", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), () => [
|
|
8595
|
+
(0,external_vue_.createElementVNode)("div", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, _ctx.itemTitle)), 1)
|
|
8596
|
+
], true),
|
|
8556
8597
|
(0,external_vue_.createTextVNode)(),
|
|
8557
|
-
(
|
|
8558
|
-
|
|
8559
|
-
|
|
8560
|
-
|
|
8561
|
-
|
|
8562
|
-
|
|
8563
|
-
|
|
8564
|
-
|
|
8565
|
-
|
|
8566
|
-
(0,external_vue_.createTextVNode)(),
|
|
8567
|
-
(_ctx.optionHint)
|
|
8568
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6b0ce187_scoped_true_ts_true_hoisted_4, [
|
|
8569
|
-
(0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), () => [
|
|
8570
|
-
(0,external_vue_.createTextVNode)("\r\n no slot \"option-hint\" found\r\n ")
|
|
8571
|
-
], true)
|
|
8572
|
-
]))
|
|
8573
|
-
: (0,external_vue_.createCommentVNode)("", true)
|
|
8574
|
-
])
|
|
8575
|
-
], 2)
|
|
8576
|
-
]),
|
|
8577
|
-
_: 2
|
|
8578
|
-
}, 1024)
|
|
8598
|
+
(_ctx.optionHint)
|
|
8599
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_6, [
|
|
8600
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), () => [
|
|
8601
|
+
(0,external_vue_.createTextVNode)("\r\n no slot \"option-hint\" found\r\n ")
|
|
8602
|
+
], true)
|
|
8603
|
+
]))
|
|
8604
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
8605
|
+
])
|
|
8606
|
+
], 2)
|
|
8579
8607
|
]),
|
|
8580
8608
|
_: 2
|
|
8581
8609
|
}, 1024)
|
|
8582
8610
|
]),
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
|
|
8611
|
+
_: 2
|
|
8612
|
+
}, 1024)
|
|
8613
|
+
]),
|
|
8614
|
+
noResult: (0,external_vue_.withCtx)(() => [
|
|
8615
|
+
(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.message), 1)
|
|
8616
|
+
]),
|
|
8617
|
+
_: 3
|
|
8618
|
+
}, 8, ["modelValue", "multiple", "placeholder", "options", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allowEmpty", "onClose", "onSearchChange", "onUpdate:modelValue"]),
|
|
8619
|
+
(0,external_vue_.createTextVNode)(),
|
|
8620
|
+
(!_ctx.disableDialog)
|
|
8621
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
8622
|
+
key: 0,
|
|
8623
|
+
variant: "outlined",
|
|
8624
|
+
id: "selectButton",
|
|
8625
|
+
color: "grey",
|
|
8626
|
+
disabled: _ctx.readonly || _ctx.disabled,
|
|
8627
|
+
loading: _ctx.loading,
|
|
8628
|
+
onClick: _ctx.onSelect
|
|
8629
|
+
}, {
|
|
8630
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
8631
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
|
|
8632
|
+
color: _ctx.validationMessage && !_ctx.readonly && !_ctx.disabled ? 'error' : 'grey'
|
|
8598
8633
|
}, {
|
|
8599
8634
|
default: (0,external_vue_.withCtx)(() => [
|
|
8600
|
-
(
|
|
8601
|
-
color: _ctx.validationMessage && !_ctx.readonly && !_ctx.disabled ? 'error' : 'grey'
|
|
8602
|
-
}, {
|
|
8603
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
8604
|
-
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.icon), 1)
|
|
8605
|
-
]),
|
|
8606
|
-
_: 1
|
|
8607
|
-
}, 8, ["color"]))
|
|
8635
|
+
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.icon), 1)
|
|
8608
8636
|
]),
|
|
8609
8637
|
_: 1
|
|
8610
|
-
}, 8, ["
|
|
8611
|
-
|
|
8612
|
-
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
])
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
|
|
8638
|
+
}, 8, ["color"]))
|
|
8639
|
+
]),
|
|
8640
|
+
_: 1
|
|
8641
|
+
}, 8, ["disabled", "loading", "onClick"]))
|
|
8642
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
8643
|
+
(0,external_vue_.createTextVNode)(),
|
|
8644
|
+
(_ctx.loading)
|
|
8645
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_7))
|
|
8646
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
8647
|
+
])
|
|
8648
|
+
]))
|
|
8649
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
8650
|
+
(0,external_vue_.createTextVNode)(),
|
|
8651
|
+
(!_ctx.multiselect && _ctx.$utils.isDefined(_ctx.singleItem))
|
|
8652
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_hoisted_8, [
|
|
8653
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "tag", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: _ctx.singleItem, onRemove: _ctx.onRemoveItem })), () => [
|
|
8654
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
8655
|
+
key: JSON.stringify(_ctx.selected),
|
|
8656
|
+
closable: _ctx.canRemove,
|
|
8657
|
+
color: _ctx.disabled ? 'grey' : 'primary',
|
|
8658
|
+
"onClick:close": _cache[1] || (_cache[1] = ($event) => (_ctx.onRemoveItem(_ctx.singleItem)))
|
|
8659
|
+
}, {
|
|
8626
8660
|
default: (0,external_vue_.withCtx)(() => [
|
|
8627
|
-
(_ctx.
|
|
8628
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", {
|
|
8629
|
-
key: 0,
|
|
8630
|
-
style: { "font-size": "var(--font-size--1)" },
|
|
8631
|
-
class: (0,external_vue_.normalizeClass)({ 'error--text': _ctx.warningHint, 'grey--text': !_ctx.validationMessage })
|
|
8632
|
-
}, (0,external_vue_.toDisplayString)(_ctx.displayingInputHint), 3))
|
|
8633
|
-
: (0,external_vue_.createCommentVNode)("", true)
|
|
8661
|
+
(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(_ctx.singleItem, this.itemTitle)), 1)
|
|
8634
8662
|
]),
|
|
8635
8663
|
_: 1
|
|
8636
|
-
})
|
|
8637
|
-
])
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
(!_ctx.multiselect && _ctx.$utils.isDefined(_ctx.singeItem))
|
|
8645
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_col, {
|
|
8646
|
-
key: 2,
|
|
8647
|
-
class: (0,external_vue_.normalizeClass)(_ctx.inputSizeClasses)
|
|
8648
|
-
}, {
|
|
8649
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
8650
|
-
(0,external_vue_.renderSlot)(_ctx.$slots, "tag", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: _ctx.singeItem, onRemove: _ctx.onRemoveItem })), () => [
|
|
8651
|
-
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
8652
|
-
key: JSON.stringify(_ctx.selected),
|
|
8653
|
-
closable: _ctx.canRemove,
|
|
8654
|
-
color: _ctx.disabled ? 'grey' : 'primary',
|
|
8655
|
-
"onClick:close": _cache[1] || (_cache[1] = ($event) => (_ctx.onRemoveItem(_ctx.singeItem)))
|
|
8656
|
-
}, {
|
|
8664
|
+
}, 8, ["closable", "color"]))
|
|
8665
|
+
], true)
|
|
8666
|
+
]))
|
|
8667
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
8668
|
+
(0,external_vue_.createTextVNode)(),
|
|
8669
|
+
(!_ctx.hideDetails)
|
|
8670
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", _hoisted_9, [
|
|
8671
|
+
(0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
|
|
8657
8672
|
default: (0,external_vue_.withCtx)(() => [
|
|
8658
|
-
(
|
|
8673
|
+
(_ctx.showHint)
|
|
8674
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", {
|
|
8675
|
+
key: 0,
|
|
8676
|
+
style: { "font-size": "var(--font-size--1)" },
|
|
8677
|
+
class: (0,external_vue_.normalizeClass)({ 'error--text': _ctx.warningHint, 'grey--text': !_ctx.validationMessage })
|
|
8678
|
+
}, (0,external_vue_.toDisplayString)(_ctx.displayingInputHint), 3))
|
|
8679
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
8659
8680
|
]),
|
|
8660
8681
|
_: 1
|
|
8661
|
-
}
|
|
8662
|
-
]
|
|
8663
|
-
(0,external_vue_.
|
|
8664
|
-
|
|
8665
|
-
|
|
8666
|
-
|
|
8667
|
-
]),
|
|
8668
|
-
_: 3
|
|
8669
|
-
}, 8, ["class"]))
|
|
8670
|
-
: (0,external_vue_.createCommentVNode)("", true)
|
|
8682
|
+
})
|
|
8683
|
+
]))
|
|
8684
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
8685
|
+
]),
|
|
8686
|
+
_: 3
|
|
8687
|
+
}, 8, ["class"])
|
|
8671
8688
|
]),
|
|
8672
8689
|
_: 3
|
|
8673
8690
|
}));
|
|
8674
8691
|
}
|
|
8675
8692
|
|
|
8676
|
-
;// CONCATENATED MODULE: ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=
|
|
8693
|
+
;// CONCATENATED MODULE: ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=4ccf12f8&scoped=true&ts=true
|
|
8677
8694
|
|
|
8678
8695
|
// EXTERNAL MODULE: external "./multiselect.js"
|
|
8679
8696
|
var external_multiselect_js_ = __webpack_require__(9225);
|
|
@@ -9189,9 +9206,9 @@ function getNative(object, key) {
|
|
|
9189
9206
|
|
|
9190
9207
|
|
|
9191
9208
|
/* Built-in method references that are verified to be native. */
|
|
9192
|
-
var
|
|
9209
|
+
var _Map_Map = _getNative(_root, 'Map');
|
|
9193
9210
|
|
|
9194
|
-
/* harmony default export */ const _Map = (
|
|
9211
|
+
/* harmony default export */ const _Map = (_Map_Map);
|
|
9195
9212
|
|
|
9196
9213
|
;// CONCATENATED MODULE: ./node_modules/lodash-es/_nativeCreate.js
|
|
9197
9214
|
|
|
@@ -11232,7 +11249,7 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
11232
11249
|
get hasError() {
|
|
11233
11250
|
return Boolean(this.validationMessage);
|
|
11234
11251
|
}
|
|
11235
|
-
get
|
|
11252
|
+
get singleItem() {
|
|
11236
11253
|
return this.toSingleItem(this.selected);
|
|
11237
11254
|
}
|
|
11238
11255
|
get selectedToArray() {
|
|
@@ -11406,7 +11423,7 @@ SelectListBoxComponent = ld_select_list_boxvue_type_script_lang_ts_external_deco
|
|
|
11406
11423
|
;
|
|
11407
11424
|
|
|
11408
11425
|
|
|
11409
|
-
const ld_select_list_box_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_select_list_boxvue_type_script_lang_ts_external, [['render',
|
|
11426
|
+
const ld_select_list_box_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_select_list_boxvue_type_script_lang_ts_external, [['render',ld_select_list_boxvue_type_template_id_4ccf12f8_scoped_true_ts_true_render],['__scopeId',"data-v-4ccf12f8"]])
|
|
11410
11427
|
|
|
11411
11428
|
/* harmony default export */ const ld_select_list_box = (ld_select_list_box_exports_);
|
|
11412
11429
|
;// CONCATENATED MODULE: ./src/ld-select-list-box/index.ts
|
|
@@ -12807,29 +12824,34 @@ function ld_select_reg(vue, options) {
|
|
|
12807
12824
|
}
|
|
12808
12825
|
/* harmony default export */ const src_ld_select = (ld_select_reg);
|
|
12809
12826
|
|
|
12810
|
-
;// CONCATENATED MODULE: ./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-combobox/ld-combobox.vue?vue&type=template&id=
|
|
12827
|
+
;// CONCATENATED MODULE: ./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-combobox/ld-combobox.vue?vue&type=template&id=31853b17&scoped=true&ts=true
|
|
12811
12828
|
|
|
12812
|
-
const
|
|
12813
|
-
const
|
|
12814
|
-
|
|
12829
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_withScopeId = n => (_pushScopeId("data-v-31853b17"), n = n(), _popScopeId(), n);
|
|
12830
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_1 = {
|
|
12831
|
+
class: "w-full overflow-hidden",
|
|
12832
|
+
style: { "border-radius": "var(--border-radius)" }
|
|
12833
|
+
};
|
|
12834
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_2 = { class: "w-full d-flex position-relative" };
|
|
12835
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
|
|
12836
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_4 = {
|
|
12815
12837
|
key: 0,
|
|
12816
12838
|
class: "d-flex align-center"
|
|
12817
12839
|
};
|
|
12818
|
-
const
|
|
12819
|
-
const
|
|
12840
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_5 = { class: "d-flex flex-column justify-center" };
|
|
12841
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_6 = {
|
|
12820
12842
|
key: 0,
|
|
12821
12843
|
class: "grey--text",
|
|
12822
12844
|
style: { "font-size": "var(--font-size--1)" }
|
|
12823
12845
|
};
|
|
12824
|
-
const
|
|
12846
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_7 = {
|
|
12825
12847
|
key: 0,
|
|
12826
12848
|
class: "combobox-loading"
|
|
12827
12849
|
};
|
|
12828
|
-
const
|
|
12850
|
+
const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_8 = {
|
|
12829
12851
|
key: 0,
|
|
12830
12852
|
class: "combobox-validate"
|
|
12831
12853
|
};
|
|
12832
|
-
function
|
|
12854
|
+
function ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
12833
12855
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
|
|
12834
12856
|
const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
|
|
12835
12857
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
|
|
@@ -12854,137 +12876,125 @@ function ld_comboboxvue_type_template_id_54095ac6_scoped_true_ts_true_render(_ct
|
|
|
12854
12876
|
class: (0,external_vue_.normalizeClass)(_ctx.inputSizeClasses)
|
|
12855
12877
|
}, {
|
|
12856
12878
|
default: (0,external_vue_.withCtx)(() => [
|
|
12857
|
-
(0,external_vue_.
|
|
12858
|
-
"
|
|
12859
|
-
|
|
12860
|
-
|
|
12861
|
-
|
|
12862
|
-
|
|
12863
|
-
|
|
12864
|
-
|
|
12879
|
+
(0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_1, [
|
|
12880
|
+
(0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_2, [
|
|
12881
|
+
(0,external_vue_.createVNode)(_component_multiselect, {
|
|
12882
|
+
ref: "multiselect",
|
|
12883
|
+
modelValue: _ctx.selected,
|
|
12884
|
+
"onUpdate:modelValue": [
|
|
12885
|
+
_cache[0] || (_cache[0] = ($event) => ((_ctx.selected) = $event)),
|
|
12886
|
+
_ctx.onInput
|
|
12887
|
+
],
|
|
12888
|
+
"track-by": "id",
|
|
12889
|
+
class: "multiselect--arrow",
|
|
12890
|
+
multiple: _ctx.multiselect,
|
|
12891
|
+
placeholder: _ctx.placeholder,
|
|
12892
|
+
"select-label": '',
|
|
12893
|
+
options: _ctx.optionsList,
|
|
12894
|
+
searchable: true,
|
|
12895
|
+
"internal-search": _ctx.internalSearch,
|
|
12896
|
+
"clear-on-select": true,
|
|
12897
|
+
"close-on-select": !_ctx.multiselect,
|
|
12898
|
+
"options-limit": 300,
|
|
12899
|
+
"show-no-results": true,
|
|
12900
|
+
"show-no-options": false,
|
|
12901
|
+
disabled: _ctx.readonly || _ctx.disabled,
|
|
12902
|
+
limit: _ctx.limit,
|
|
12903
|
+
tabindex: _ctx.tabIndex,
|
|
12904
|
+
allowEmpty: _ctx.allowEmpty,
|
|
12905
|
+
onClose: _ctx.dropdownClose,
|
|
12906
|
+
onOpen: _ctx.goSearch,
|
|
12907
|
+
onSearchChange: _ctx.getItems
|
|
12865
12908
|
}, {
|
|
12866
|
-
|
|
12867
|
-
(0,external_vue_.
|
|
12868
|
-
|
|
12869
|
-
|
|
12870
|
-
|
|
12871
|
-
|
|
12872
|
-
|
|
12873
|
-
|
|
12874
|
-
|
|
12875
|
-
|
|
12876
|
-
|
|
12877
|
-
|
|
12878
|
-
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
"
|
|
12883
|
-
|
|
12884
|
-
|
|
12885
|
-
|
|
12886
|
-
|
|
12887
|
-
|
|
12888
|
-
|
|
12889
|
-
|
|
12890
|
-
|
|
12891
|
-
|
|
12892
|
-
|
|
12893
|
-
|
|
12909
|
+
tag: (0,external_vue_.withCtx)(({ option }) => [
|
|
12910
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "tag", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({
|
|
12911
|
+
item: option,
|
|
12912
|
+
onRemove: _ctx.onRemoveItem,
|
|
12913
|
+
canRemove: _ctx.canRemove,
|
|
12914
|
+
})), () => [
|
|
12915
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
12916
|
+
key: JSON.stringify(option),
|
|
12917
|
+
color: _ctx.disabled ? 'grey' : 'primary',
|
|
12918
|
+
closable: _ctx.canRemove,
|
|
12919
|
+
"onClick:close": ($event) => (_ctx.onRemoveItem(option))
|
|
12920
|
+
}, {
|
|
12921
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
12922
|
+
(0,external_vue_.createElementVNode)("span", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
|
|
12923
|
+
]),
|
|
12924
|
+
_: 2
|
|
12925
|
+
}, 1032, ["color", "closable", "onClick:close"]))
|
|
12926
|
+
], true)
|
|
12927
|
+
]),
|
|
12928
|
+
"tag-overflow": (0,external_vue_.withCtx)(({ limit, count }) => [
|
|
12929
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "tag-overflow", {
|
|
12930
|
+
limit: limit,
|
|
12931
|
+
count: count
|
|
12932
|
+
}, () => [
|
|
12933
|
+
(0,external_vue_.createVNode)(_component_small_chip, { closable: false }, {
|
|
12934
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
12935
|
+
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(`+${count - limit} items`), 1)
|
|
12936
|
+
]),
|
|
12937
|
+
_: 2
|
|
12938
|
+
}, 1024)
|
|
12939
|
+
], true)
|
|
12940
|
+
]),
|
|
12941
|
+
option: (0,external_vue_.withCtx)(({ option }) => [
|
|
12942
|
+
(0,external_vue_.createVNode)(_component_v_row, {
|
|
12943
|
+
"no-gutters": "",
|
|
12944
|
+
class: "mb-1"
|
|
12894
12945
|
}, {
|
|
12895
|
-
|
|
12896
|
-
(0,external_vue_.
|
|
12897
|
-
item: option,
|
|
12898
|
-
onRemove: _ctx.onRemoveItem,
|
|
12899
|
-
canRemove: _ctx.canRemove,
|
|
12900
|
-
})), () => [
|
|
12901
|
-
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
12902
|
-
key: JSON.stringify(option),
|
|
12903
|
-
color: _ctx.disabled ? 'grey' : 'primary',
|
|
12904
|
-
closable: _ctx.canRemove,
|
|
12905
|
-
"onClick:close": ($event) => (_ctx.onRemoveItem(option))
|
|
12906
|
-
}, {
|
|
12907
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
12908
|
-
(0,external_vue_.createElementVNode)("span", ld_comboboxvue_type_template_id_54095ac6_scoped_true_ts_true_hoisted_1, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
|
|
12909
|
-
]),
|
|
12910
|
-
_: 2
|
|
12911
|
-
}, 1032, ["color", "closable", "onClick:close"]))
|
|
12912
|
-
], true)
|
|
12913
|
-
]),
|
|
12914
|
-
"tag-overflow": (0,external_vue_.withCtx)(({ limit, count }) => [
|
|
12915
|
-
(0,external_vue_.renderSlot)(_ctx.$slots, "tag-overflow", {
|
|
12916
|
-
limit: limit,
|
|
12917
|
-
count: count
|
|
12918
|
-
}, () => [
|
|
12919
|
-
(0,external_vue_.createVNode)(_component_small_chip, { closable: false }, {
|
|
12920
|
-
default: (0,external_vue_.withCtx)(() => [
|
|
12921
|
-
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(`overflow => limit: ${limit}, count: ${count}`), 1)
|
|
12922
|
-
]),
|
|
12923
|
-
_: 2
|
|
12924
|
-
}, 1024)
|
|
12925
|
-
], true)
|
|
12926
|
-
]),
|
|
12927
|
-
option: (0,external_vue_.withCtx)(({ option }) => [
|
|
12928
|
-
(0,external_vue_.createVNode)(_component_v_row, {
|
|
12929
|
-
"no-gutters": "",
|
|
12930
|
-
class: "mb-1"
|
|
12931
|
-
}, {
|
|
12946
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
12947
|
+
(0,external_vue_.createVNode)(_component_v_col, { class: "d-flex align-center py-1" }, {
|
|
12932
12948
|
default: (0,external_vue_.withCtx)(() => [
|
|
12933
|
-
(
|
|
12934
|
-
|
|
12935
|
-
(_ctx.
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
12940
|
-
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12949
|
+
(_ctx.multiselect)
|
|
12950
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_4, [
|
|
12951
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-checkbox']), {
|
|
12952
|
+
key: JSON.stringify(option),
|
|
12953
|
+
"model-value": _ctx.checkedItems,
|
|
12954
|
+
"initial-value": _ctx.$utils.deepValueGetter(option, _ctx.itemValue),
|
|
12955
|
+
"onUpdate:modelValue": ($event) => (_ctx.onCheckItem($event, option))
|
|
12956
|
+
}, null, 8, ["model-value", "initial-value", "onUpdate:modelValue"]))
|
|
12957
|
+
]))
|
|
12958
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
12959
|
+
(0,external_vue_.createTextVNode)(),
|
|
12960
|
+
(0,external_vue_.createElementVNode)("div", {
|
|
12961
|
+
class: (0,external_vue_.normalizeClass)(["d-flex align-center", { 'ml-1': _ctx.multiselect }])
|
|
12962
|
+
}, [
|
|
12963
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "option-icon", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), undefined, true),
|
|
12964
|
+
(0,external_vue_.createTextVNode)(),
|
|
12965
|
+
(0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_5, [
|
|
12966
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "option", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), () => [
|
|
12967
|
+
(0,external_vue_.createElementVNode)("div", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, _ctx.itemTitle)), 1)
|
|
12968
|
+
], true),
|
|
12945
12969
|
(0,external_vue_.createTextVNode)(),
|
|
12946
|
-
(
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
(0,external_vue_.
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
(0,external_vue_.createElementVNode)("div", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, _ctx.itemTitle)), 1)
|
|
12954
|
-
], true),
|
|
12955
|
-
(0,external_vue_.createTextVNode)(),
|
|
12956
|
-
(_ctx.optionHint)
|
|
12957
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_54095ac6_scoped_true_ts_true_hoisted_4, [
|
|
12958
|
-
(0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), undefined, true)
|
|
12959
|
-
]))
|
|
12960
|
-
: (0,external_vue_.createCommentVNode)("", true)
|
|
12961
|
-
])
|
|
12962
|
-
], 2)
|
|
12963
|
-
]),
|
|
12964
|
-
_: 2
|
|
12965
|
-
}, 1024)
|
|
12970
|
+
(_ctx.optionHint)
|
|
12971
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_6, [
|
|
12972
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), undefined, true)
|
|
12973
|
+
]))
|
|
12974
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
12975
|
+
])
|
|
12976
|
+
], 2)
|
|
12966
12977
|
]),
|
|
12967
12978
|
_: 2
|
|
12968
12979
|
}, 1024)
|
|
12969
12980
|
]),
|
|
12970
|
-
|
|
12971
|
-
|
|
12972
|
-
|
|
12973
|
-
|
|
12974
|
-
|
|
12975
|
-
(0,external_vue_.createTextVNode)(),
|
|
12976
|
-
(_ctx.loading)
|
|
12977
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_54095ac6_scoped_true_ts_true_hoisted_5))
|
|
12978
|
-
: (0,external_vue_.createCommentVNode)("", true)
|
|
12981
|
+
_: 2
|
|
12982
|
+
}, 1024)
|
|
12983
|
+
]),
|
|
12984
|
+
noResult: (0,external_vue_.withCtx)(() => [
|
|
12985
|
+
(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.message), 1)
|
|
12979
12986
|
]),
|
|
12980
12987
|
_: 3
|
|
12981
|
-
})
|
|
12982
|
-
|
|
12983
|
-
|
|
12984
|
-
|
|
12988
|
+
}, 8, ["modelValue", "multiple", "placeholder", "options", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allowEmpty", "onClose", "onOpen", "onSearchChange", "onUpdate:modelValue"]),
|
|
12989
|
+
(0,external_vue_.createTextVNode)(),
|
|
12990
|
+
(_ctx.loading)
|
|
12991
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_7))
|
|
12992
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
12993
|
+
])
|
|
12994
|
+
]),
|
|
12985
12995
|
(0,external_vue_.createTextVNode)(),
|
|
12986
12996
|
(!_ctx.hideDetails)
|
|
12987
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
12997
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_8, [
|
|
12988
12998
|
(0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
|
|
12989
12999
|
default: (0,external_vue_.withCtx)(() => [
|
|
12990
13000
|
(_ctx.showHint)
|
|
@@ -13007,7 +13017,7 @@ function ld_comboboxvue_type_template_id_54095ac6_scoped_true_ts_true_render(_ct
|
|
|
13007
13017
|
}));
|
|
13008
13018
|
}
|
|
13009
13019
|
|
|
13010
|
-
;// CONCATENATED MODULE: ./src/ld-combobox/ld-combobox.vue?vue&type=template&id=
|
|
13020
|
+
;// CONCATENATED MODULE: ./src/ld-combobox/ld-combobox.vue?vue&type=template&id=31853b17&scoped=true&ts=true
|
|
13011
13021
|
|
|
13012
13022
|
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-combobox/ld-combobox.ts?vue&type=script&lang=ts&external
|
|
13013
13023
|
var ld_comboboxvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
@@ -13465,7 +13475,7 @@ ld_comboboxvue_type_script_lang_ts_external_SelectListBoxComponent = ld_combobox
|
|
|
13465
13475
|
;
|
|
13466
13476
|
|
|
13467
13477
|
|
|
13468
|
-
const ld_combobox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_comboboxvue_type_script_lang_ts_external, [['render',
|
|
13478
|
+
const ld_combobox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_comboboxvue_type_script_lang_ts_external, [['render',ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_render],['__scopeId',"data-v-31853b17"]])
|
|
13469
13479
|
|
|
13470
13480
|
/* harmony default export */ const ld_combobox = (ld_combobox_exports_);
|
|
13471
13481
|
;// CONCATENATED MODULE: ./src/ld-combobox/index.ts
|
|
@@ -14829,114 +14839,1768 @@ function ld_switch_reg(vue, options) {
|
|
|
14829
14839
|
}
|
|
14830
14840
|
/* harmony default export */ const src_ld_switch = (ld_switch_reg);
|
|
14831
14841
|
|
|
14832
|
-
|
|
14833
|
-
var external_vue_toastification_ = __webpack_require__(7982);
|
|
14834
|
-
var external_vue_toastification_default = /*#__PURE__*/__webpack_require__.n(external_vue_toastification_);
|
|
14835
|
-
;// CONCATENATED MODULE: ./src/utils/delay.ts
|
|
14836
|
-
async function delay(timeout) {
|
|
14837
|
-
return new Promise(resolve => setTimeout(() => resolve(), timeout));
|
|
14838
|
-
}
|
|
14839
|
-
|
|
14840
|
-
;// CONCATENATED MODULE: ./src/utils/datetime.ts
|
|
14841
|
-
function dateLocalToISO(value) {
|
|
14842
|
-
const parsed = /^(\d\d?).(\d\d?).(\d\d\d?\d?)$/.exec(value);
|
|
14843
|
-
let year = '';
|
|
14844
|
-
let month = '';
|
|
14845
|
-
let day = '';
|
|
14846
|
-
if (parsed[1]) {
|
|
14847
|
-
day = parsed[1].length === 1 ? '0' + parsed[1] : parsed[1];
|
|
14848
|
-
}
|
|
14849
|
-
if (parsed[2]) {
|
|
14850
|
-
month = parsed[2].length === 1 ? '0' + parsed[2] : parsed[2];
|
|
14851
|
-
}
|
|
14852
|
-
if (parsed[3]) {
|
|
14853
|
-
year = parsed[3];
|
|
14854
|
-
}
|
|
14855
|
-
if (day && month && year) {
|
|
14856
|
-
return `${year}-${month}-${day}`;
|
|
14857
|
-
}
|
|
14858
|
-
return '';
|
|
14859
|
-
}
|
|
14860
|
-
/**
|
|
14861
|
-
* Преобразует дату к формату yyyy-MM-ddThh:mm:ss+hh:mm (например, 2020-11-24T12:47:45+03:00)
|
|
14862
|
-
* @param dt Date
|
|
14863
|
-
*/
|
|
14864
|
-
function toServerString(dt) {
|
|
14865
|
-
if (!dt) {
|
|
14866
|
-
return null;
|
|
14867
|
-
}
|
|
14868
|
-
const tzo = -dt.getTimezoneOffset();
|
|
14869
|
-
const dif = tzo >= 0 ? '+' : '-';
|
|
14870
|
-
const pad = function (num) {
|
|
14871
|
-
const norm = Math.abs(Math.floor(num));
|
|
14872
|
-
return (norm < 10 ? '0' : '') + norm;
|
|
14873
|
-
};
|
|
14874
|
-
return `${dt.getFullYear()}-${pad(dt.getMonth() + 1)}-${pad(dt.getDate())}T${pad(dt.getHours())}:${pad(dt.getMinutes())}:${pad(dt.getSeconds())}${dif}${pad(tzo / 60)}:${pad(tzo % 60)}`;
|
|
14875
|
-
}
|
|
14876
|
-
const datetime = {
|
|
14877
|
-
dateLocalToISO,
|
|
14878
|
-
toServerString
|
|
14879
|
-
};
|
|
14842
|
+
;// CONCATENATED MODULE: ./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-dialog/ld-dialog.vue?vue&type=template&id=184339ee&ts=true
|
|
14880
14843
|
|
|
14881
|
-
|
|
14882
|
-
|
|
14883
|
-
|
|
14884
|
-
|
|
14885
|
-
|
|
14886
|
-
|
|
14887
|
-
|
|
14888
|
-
|
|
14889
|
-
|
|
14890
|
-
|
|
14891
|
-
|
|
14892
|
-
|
|
14893
|
-
|
|
14894
|
-
|
|
14895
|
-
|
|
14896
|
-
|
|
14897
|
-
|
|
14898
|
-
|
|
14899
|
-
|
|
14900
|
-
|
|
14901
|
-
|
|
14902
|
-
|
|
14903
|
-
|
|
14904
|
-
|
|
14905
|
-
|
|
14906
|
-
|
|
14907
|
-
|
|
14908
|
-
|
|
14909
|
-
|
|
14910
|
-
|
|
14911
|
-
|
|
14912
|
-
|
|
14913
|
-
|
|
14914
|
-
|
|
14915
|
-
|
|
14916
|
-
|
|
14917
|
-
|
|
14844
|
+
const ld_dialogvue_type_template_id_184339ee_ts_true_hoisted_1 = { class: "ld-dialog" };
|
|
14845
|
+
function ld_dialogvue_type_template_id_184339ee_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
14846
|
+
const _component_minimized = (0,external_vue_.resolveComponent)("minimized");
|
|
14847
|
+
const _component_v_spacer = (0,external_vue_.resolveComponent)("v-spacer");
|
|
14848
|
+
const _component_square_button = (0,external_vue_.resolveComponent)("square-button");
|
|
14849
|
+
const _component_v_card_title = (0,external_vue_.resolveComponent)("v-card-title");
|
|
14850
|
+
const _component_v_card_text = (0,external_vue_.resolveComponent)("v-card-text");
|
|
14851
|
+
const _component_small_button = (0,external_vue_.resolveComponent)("small-button");
|
|
14852
|
+
const _component_v_card_actions = (0,external_vue_.resolveComponent)("v-card-actions");
|
|
14853
|
+
const _component_v_card = (0,external_vue_.resolveComponent)("v-card");
|
|
14854
|
+
const _component_v_dialog = (0,external_vue_.resolveComponent)("v-dialog");
|
|
14855
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_dialogvue_type_template_id_184339ee_ts_true_hoisted_1, [
|
|
14856
|
+
(0,external_vue_.createVNode)(_component_minimized, {
|
|
14857
|
+
dialogs: _ctx.minimized,
|
|
14858
|
+
onMaximize: _cache[0] || (_cache[0] = ($event) => (_ctx.onMinimize($event))),
|
|
14859
|
+
onClose: _cache[1] || (_cache[1] = ($event) => (_ctx.handleCancel($event))),
|
|
14860
|
+
onCloseAll: _ctx.handleCancelAll
|
|
14861
|
+
}, null, 8, ["dialogs", "onCloseAll"]),
|
|
14862
|
+
(0,external_vue_.createTextVNode)(),
|
|
14863
|
+
((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.modals, (modal) => {
|
|
14864
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
|
|
14865
|
+
key: modal.id,
|
|
14866
|
+
class: "h-100"
|
|
14867
|
+
}, [
|
|
14868
|
+
(0,external_vue_.createVNode)(_component_v_dialog, (0,external_vue_.mergeProps)({
|
|
14869
|
+
modelValue: modal.show,
|
|
14870
|
+
"onUpdate:modelValue": ($event) => ((modal.show) = $event),
|
|
14871
|
+
"content-class": ['ld-dialog-content'].concat(this.modalClass(modal)),
|
|
14872
|
+
persistent: ""
|
|
14873
|
+
}, _ctx.dialogBindings(modal), {
|
|
14874
|
+
"hide-header-close": !modal.closable,
|
|
14875
|
+
"hide-overlay": modal.noModal,
|
|
14876
|
+
"no-click-animation": modal.noModal,
|
|
14877
|
+
"retain-focus": modal.retainFocus,
|
|
14878
|
+
scrim: !modal.noModal,
|
|
14879
|
+
onHide: ($event) => (_ctx.handleHide(modal))
|
|
14880
|
+
}), {
|
|
14881
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14882
|
+
(0,external_vue_.createVNode)(_component_v_card, {
|
|
14883
|
+
class: (0,external_vue_.normalizeClass)(_ctx.cardClasses(modal))
|
|
14884
|
+
}, {
|
|
14885
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14886
|
+
(0,external_vue_.createVNode)(_component_v_card_title, {
|
|
14887
|
+
class: (0,external_vue_.normalizeClass)(["modal-title", { 'v-card-title--dark': _ctx.isTitleDark(modal) }])
|
|
14888
|
+
}, {
|
|
14889
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14890
|
+
(0,external_vue_.createElementVNode)("span", {
|
|
14891
|
+
class: (0,external_vue_.normalizeClass)({ 'font-weight-bold': _ctx.isMobileGlobal })
|
|
14892
|
+
}, (0,external_vue_.toDisplayString)(_ctx.modalTitle(modal)), 3),
|
|
14893
|
+
(0,external_vue_.createTextVNode)(),
|
|
14894
|
+
(0,external_vue_.createVNode)(_component_v_spacer),
|
|
14895
|
+
(0,external_vue_.createTextVNode)(),
|
|
14896
|
+
(modal.minimizable && !_ctx.isMobileGlobal)
|
|
14897
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
14898
|
+
key: 0,
|
|
14899
|
+
icon: "",
|
|
14900
|
+
onClick: ($event) => (_ctx.onMinimize(modal))
|
|
14901
|
+
}, {
|
|
14902
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14903
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
|
|
14904
|
+
color: modal.darkTitle ? 'white' : 'grey'
|
|
14905
|
+
}, {
|
|
14906
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14907
|
+
(0,external_vue_.createTextVNode)("\r\n minimize\r\n ")
|
|
14908
|
+
]),
|
|
14909
|
+
_: 2
|
|
14910
|
+
}, 1032, ["color"]))
|
|
14911
|
+
]),
|
|
14912
|
+
_: 2
|
|
14913
|
+
}, 1032, ["onClick"]))
|
|
14914
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
14915
|
+
(0,external_vue_.createTextVNode)(),
|
|
14916
|
+
(_ctx.isExpanded(modal) && !_ctx.isMobileGlobal)
|
|
14917
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
14918
|
+
key: 1,
|
|
14919
|
+
icon: "",
|
|
14920
|
+
onClick: ($event) => (_ctx.onExpandCollapse(modal))
|
|
14921
|
+
}, {
|
|
14922
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14923
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
|
|
14924
|
+
color: modal.darkTitle ? 'white' : 'grey'
|
|
14925
|
+
}, {
|
|
14926
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14927
|
+
(0,external_vue_.createTextVNode)("\r\n close_fullscreen\r\n ")
|
|
14928
|
+
]),
|
|
14929
|
+
_: 2
|
|
14930
|
+
}, 1032, ["color"]))
|
|
14931
|
+
]),
|
|
14932
|
+
_: 2
|
|
14933
|
+
}, 1032, ["onClick"]))
|
|
14934
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
14935
|
+
(0,external_vue_.createTextVNode)(),
|
|
14936
|
+
(_ctx.isCollapsed(modal) && !_ctx.isMobileGlobal)
|
|
14937
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
14938
|
+
key: 2,
|
|
14939
|
+
icon: "",
|
|
14940
|
+
onClick: ($event) => (_ctx.onExpandCollapse(modal))
|
|
14941
|
+
}, {
|
|
14942
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14943
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
|
|
14944
|
+
color: modal.darkTitle ? 'white' : 'grey'
|
|
14945
|
+
}, {
|
|
14946
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14947
|
+
(0,external_vue_.createTextVNode)("\r\n open_in_full\r\n ")
|
|
14948
|
+
]),
|
|
14949
|
+
_: 2
|
|
14950
|
+
}, 1032, ["color"]))
|
|
14951
|
+
]),
|
|
14952
|
+
_: 2
|
|
14953
|
+
}, 1032, ["onClick"]))
|
|
14954
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
14955
|
+
(0,external_vue_.createTextVNode)(),
|
|
14956
|
+
(modal.closable || _ctx.isMobileGlobal)
|
|
14957
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
|
|
14958
|
+
key: 3,
|
|
14959
|
+
icon: "",
|
|
14960
|
+
class: "ml-1",
|
|
14961
|
+
onClick: ($event) => (_ctx.handleCancel(modal, true))
|
|
14962
|
+
}, {
|
|
14963
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14964
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
|
|
14965
|
+
color: _ctx.isTitleDark(modal) ? 'white' : 'grey'
|
|
14966
|
+
}, {
|
|
14967
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14968
|
+
(0,external_vue_.createTextVNode)("\r\n close\r\n ")
|
|
14969
|
+
]),
|
|
14970
|
+
_: 2
|
|
14971
|
+
}, 1032, ["color"]))
|
|
14972
|
+
]),
|
|
14973
|
+
_: 2
|
|
14974
|
+
}, 1032, ["onClick"]))
|
|
14975
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
14976
|
+
]),
|
|
14977
|
+
_: 2
|
|
14978
|
+
}, 1032, ["class"]),
|
|
14979
|
+
(0,external_vue_.createTextVNode)(),
|
|
14980
|
+
(_ctx.isAlertDialog(modal) || _ctx.isConfirmDialog(modal))
|
|
14981
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_card_text, {
|
|
14982
|
+
key: 0,
|
|
14983
|
+
class: "content text-center",
|
|
14984
|
+
innerHTML: modal.content
|
|
14985
|
+
}, null, 8, ["innerHTML"]))
|
|
14986
|
+
: (_ctx.isPromptDialog(modal))
|
|
14987
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_card_text, {
|
|
14988
|
+
key: 1,
|
|
14989
|
+
class: "content"
|
|
14990
|
+
}, {
|
|
14991
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
14992
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-textarea']), {
|
|
14993
|
+
modelValue: modal.content,
|
|
14994
|
+
"onUpdate:modelValue": ($event) => ((modal.content) = $event),
|
|
14995
|
+
rows: "3"
|
|
14996
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"]))
|
|
14997
|
+
]),
|
|
14998
|
+
_: 2
|
|
14999
|
+
}, 1024))
|
|
15000
|
+
: (modal.component)
|
|
15001
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_card_text, {
|
|
15002
|
+
key: 2,
|
|
15003
|
+
class: "content",
|
|
15004
|
+
style: (0,external_vue_.normalizeStyle)({
|
|
15005
|
+
visibility: _ctx.setVisibility(modal.id)
|
|
15006
|
+
})
|
|
15007
|
+
}, {
|
|
15008
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15009
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-loader']), {
|
|
15010
|
+
options: { transparent: true, global: false },
|
|
15011
|
+
visible: modal.loading
|
|
15012
|
+
}, null, 8, ["visible"])),
|
|
15013
|
+
(0,external_vue_.createTextVNode)(),
|
|
15014
|
+
(!modal.loading && (_ctx.isInfoDialog(modal) || _ctx.isSelectDialog(modal)))
|
|
15015
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(modal.component), (0,external_vue_.mergeProps)({ key: 0 }, modal.componentProps, {
|
|
15016
|
+
onSetResult: ($event) => (_ctx.onSetResult(modal, $event)),
|
|
15017
|
+
onSetResultAndClose: ($event) => (_ctx.onSetResultAndClose(modal, $event)),
|
|
15018
|
+
onCancel: ($event) => (_ctx.handleCancel(modal)),
|
|
15019
|
+
onExternalComponentCreated: ($event) => (_ctx.onComponentInstanceCreated(modal, $event))
|
|
15020
|
+
}), null, 16, ["onSetResult", "onSetResultAndClose", "onCancel", "onExternalComponentCreated"]))
|
|
15021
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
15022
|
+
(0,external_vue_.createTextVNode)(),
|
|
15023
|
+
(!modal.loading && _ctx.isCreateEditDialog(modal))
|
|
15024
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(modal.component), (0,external_vue_.mergeProps)({ key: 1 }, modal.componentProps, {
|
|
15025
|
+
onCollapseModal: ($event) => (_ctx.onExpandCollapse(modal)),
|
|
15026
|
+
onCancel: ($event) => (_ctx.handleCancel(modal)),
|
|
15027
|
+
onSetResult: ($event) => (_ctx.onSetResult(modal, $event)),
|
|
15028
|
+
onSetReadonly: ($event) => (modal.okDisabled = true),
|
|
15029
|
+
"onDialog:activate": ($event) => (_ctx.onActivate(modal)),
|
|
15030
|
+
"onDialog:processing": ($event) => (_ctx.onProcessing(modal, $event)),
|
|
15031
|
+
onExternalComponentCreated: ($event) => (_ctx.onComponentInstanceCreated(modal, $event))
|
|
15032
|
+
}), null, 16, ["onCollapseModal", "onCancel", "onSetResult", "onSetReadonly", "onDialog:activate", "onDialog:processing", "onExternalComponentCreated"]))
|
|
15033
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
15034
|
+
]),
|
|
15035
|
+
_: 2
|
|
15036
|
+
}, 1032, ["style"]))
|
|
15037
|
+
: (0,external_vue_.createCommentVNode)("", true),
|
|
15038
|
+
(0,external_vue_.createTextVNode)(),
|
|
15039
|
+
(!modal.hideFooter)
|
|
15040
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_card_actions, {
|
|
15041
|
+
key: 3,
|
|
15042
|
+
class: (0,external_vue_.normalizeClass)(["footer", { 'footerBtnEnd': _ctx.isSelectDialog(modal) }]),
|
|
15043
|
+
style: { "justify-content": "center" }
|
|
15044
|
+
}, {
|
|
15045
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15046
|
+
(0,external_vue_.createVNode)(_component_small_button, {
|
|
15047
|
+
id: "modalOk",
|
|
15048
|
+
disabled: modal.okDisabled,
|
|
15049
|
+
loading: modal.okLoading,
|
|
15050
|
+
color: "primary",
|
|
15051
|
+
onClick: ($event) => (_ctx.handleOk(modal))
|
|
15052
|
+
}, {
|
|
15053
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15054
|
+
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.okButtonText(modal)), 1)
|
|
15055
|
+
]),
|
|
15056
|
+
_: 2
|
|
15057
|
+
}, 1032, ["disabled", "loading", "onClick"]),
|
|
15058
|
+
(0,external_vue_.createTextVNode)(),
|
|
15059
|
+
(!_ctx.isAlertDialog(modal) && !_ctx.isInfoDialog(modal))
|
|
15060
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_button, {
|
|
15061
|
+
key: 0,
|
|
15062
|
+
id: "modalCancel",
|
|
15063
|
+
disabled: modal.okOnly || modal.okLoading,
|
|
15064
|
+
variant: "outlined",
|
|
15065
|
+
color: "primary",
|
|
15066
|
+
onClick: ($event) => (_ctx.handleCancel(modal))
|
|
15067
|
+
}, {
|
|
15068
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15069
|
+
(0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.cancelButtonText(modal)), 1)
|
|
15070
|
+
]),
|
|
15071
|
+
_: 2
|
|
15072
|
+
}, 1032, ["disabled", "onClick"]))
|
|
15073
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
15074
|
+
]),
|
|
15075
|
+
_: 2
|
|
15076
|
+
}, 1032, ["class"]))
|
|
15077
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
15078
|
+
]),
|
|
15079
|
+
_: 2
|
|
15080
|
+
}, 1032, ["class"])
|
|
15081
|
+
]),
|
|
15082
|
+
_: 2
|
|
15083
|
+
}, 1040, ["modelValue", "onUpdate:modelValue", "content-class", "hide-header-close", "hide-overlay", "no-click-animation", "retain-focus", "scrim", "onHide"])
|
|
15084
|
+
]));
|
|
15085
|
+
}), 128))
|
|
15086
|
+
]));
|
|
15087
|
+
}
|
|
15088
|
+
|
|
15089
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/ld-dialog.vue?vue&type=template&id=184339ee&ts=true
|
|
15090
|
+
|
|
15091
|
+
// EXTERNAL MODULE: ./node_modules/@ldmjs/core/dist/index.js
|
|
15092
|
+
var dist = __webpack_require__(634);
|
|
15093
|
+
;// CONCATENATED MODULE: ./src/utils/awaiting.ts
|
|
15094
|
+
async function awaiting(callback) {
|
|
15095
|
+
let resolveFunc = null;
|
|
15096
|
+
const counter = 0;
|
|
15097
|
+
let timer = null;
|
|
15098
|
+
const promise = new Promise(resolve => {
|
|
15099
|
+
resolveFunc = resolve;
|
|
15100
|
+
});
|
|
15101
|
+
timer = setInterval(() => {
|
|
15102
|
+
const a = callback();
|
|
15103
|
+
if (counter > 100 || Boolean(a)) {
|
|
15104
|
+
clearInterval(timer);
|
|
15105
|
+
resolveFunc(a ?? true);
|
|
15106
|
+
}
|
|
15107
|
+
}, 100);
|
|
15108
|
+
await promise;
|
|
15109
|
+
}
|
|
15110
|
+
|
|
15111
|
+
;// CONCATENATED MODULE: ./src/utils/datetime.ts
|
|
15112
|
+
function dateLocalToISO(value) {
|
|
15113
|
+
const parsed = /^(\d\d?).(\d\d?).(\d\d\d?\d?)$/.exec(value);
|
|
15114
|
+
let year = '';
|
|
15115
|
+
let month = '';
|
|
15116
|
+
let day = '';
|
|
15117
|
+
if (parsed[1]) {
|
|
15118
|
+
day = parsed[1].length === 1 ? '0' + parsed[1] : parsed[1];
|
|
15119
|
+
}
|
|
15120
|
+
if (parsed[2]) {
|
|
15121
|
+
month = parsed[2].length === 1 ? '0' + parsed[2] : parsed[2];
|
|
15122
|
+
}
|
|
15123
|
+
if (parsed[3]) {
|
|
15124
|
+
year = parsed[3];
|
|
15125
|
+
}
|
|
15126
|
+
if (day && month && year) {
|
|
15127
|
+
return `${year}-${month}-${day}`;
|
|
15128
|
+
}
|
|
15129
|
+
return '';
|
|
15130
|
+
}
|
|
15131
|
+
/**
|
|
15132
|
+
* Преобразует дату к формату yyyy-MM-ddThh:mm:ss+hh:mm (например, 2020-11-24T12:47:45+03:00)
|
|
15133
|
+
* @param dt Date
|
|
15134
|
+
*/
|
|
15135
|
+
function toServerString(dt) {
|
|
15136
|
+
if (!dt) {
|
|
15137
|
+
return null;
|
|
15138
|
+
}
|
|
15139
|
+
const tzo = -dt.getTimezoneOffset();
|
|
15140
|
+
const dif = tzo >= 0 ? '+' : '-';
|
|
15141
|
+
const pad = function (num) {
|
|
15142
|
+
const norm = Math.abs(Math.floor(num));
|
|
15143
|
+
return (norm < 10 ? '0' : '') + norm;
|
|
15144
|
+
};
|
|
15145
|
+
return `${dt.getFullYear()}-${pad(dt.getMonth() + 1)}-${pad(dt.getDate())}T${pad(dt.getHours())}:${pad(dt.getMinutes())}:${pad(dt.getSeconds())}${dif}${pad(tzo / 60)}:${pad(tzo % 60)}`;
|
|
15146
|
+
}
|
|
15147
|
+
const datetime = {
|
|
15148
|
+
dateLocalToISO,
|
|
15149
|
+
toServerString
|
|
15150
|
+
};
|
|
15151
|
+
|
|
15152
|
+
|
|
15153
|
+
;// CONCATENATED MODULE: ./src/utils/deepValueGetter.ts
|
|
15154
|
+
/**
|
|
15155
|
+
* Returns a deep object given a string. zoo['animal.type']
|
|
15156
|
+
* @param {object} obj
|
|
15157
|
+
* @param {string} path
|
|
15158
|
+
*/
|
|
15159
|
+
function deepValueGetter(obj, path) {
|
|
15160
|
+
if (obj === null) {
|
|
15161
|
+
return '';
|
|
15162
|
+
}
|
|
15163
|
+
if (!obj || !path) {
|
|
15164
|
+
return obj;
|
|
15165
|
+
}
|
|
15166
|
+
// check if path matches a root-level field
|
|
15167
|
+
// { "a.b.c": 123 }
|
|
15168
|
+
const value = obj[path];
|
|
15169
|
+
// eslint-disable-next-line no-undefined
|
|
15170
|
+
if (value !== undefined) {
|
|
15171
|
+
return value;
|
|
15172
|
+
}
|
|
15173
|
+
let current = obj;
|
|
15174
|
+
const split = path.split('.');
|
|
15175
|
+
if (split.length) {
|
|
15176
|
+
for (const key of split) {
|
|
15177
|
+
current = current[key];
|
|
15178
|
+
// if found undefined, return empty string
|
|
15179
|
+
// eslint-disable-next-line no-undefined
|
|
15180
|
+
if (current === undefined || current === null) {
|
|
15181
|
+
return '';
|
|
15182
|
+
}
|
|
15183
|
+
}
|
|
15184
|
+
}
|
|
15185
|
+
return current;
|
|
15186
|
+
}
|
|
15187
|
+
|
|
15188
|
+
;// CONCATENATED MODULE: ./src/utils/delay.ts
|
|
15189
|
+
async function delay(timeout) {
|
|
15190
|
+
return new Promise(resolve => setTimeout(() => resolve(), timeout));
|
|
15191
|
+
}
|
|
15192
|
+
|
|
15193
|
+
;// CONCATENATED MODULE: ./src/utils/isObjectEmpty.ts
|
|
14918
15194
|
function isObjectEmpty(obj) {
|
|
14919
15195
|
for (const _i in obj) {
|
|
14920
15196
|
return false;
|
|
14921
15197
|
}
|
|
14922
|
-
return true;
|
|
14923
|
-
}
|
|
15198
|
+
return true;
|
|
15199
|
+
}
|
|
15200
|
+
|
|
15201
|
+
;// CONCATENATED MODULE: ./src/utils/urlRegexp.ts
|
|
15202
|
+
const urlRegexp =
|
|
15203
|
+
// eslint-disable-next-line optimize-regex/optimize-regex
|
|
15204
|
+
/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
15205
|
+
|
|
15206
|
+
;// CONCATENATED MODULE: ./src/utils/index.ts
|
|
15207
|
+
|
|
15208
|
+
|
|
15209
|
+
|
|
15210
|
+
|
|
15211
|
+
|
|
15212
|
+
|
|
15213
|
+
|
|
15214
|
+
|
|
15215
|
+
|
|
15216
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/dialog.manager.ts
|
|
15217
|
+
|
|
15218
|
+
|
|
15219
|
+
var ModalButton;
|
|
15220
|
+
(function (ModalButton) {
|
|
15221
|
+
ModalButton[ModalButton["Ok"] = 0] = "Ok";
|
|
15222
|
+
ModalButton[ModalButton["Cancel"] = 1] = "Cancel";
|
|
15223
|
+
})(ModalButton || (ModalButton = {}));
|
|
15224
|
+
var ModalType;
|
|
15225
|
+
(function (ModalType) {
|
|
15226
|
+
ModalType[ModalType["Alert"] = 0] = "Alert";
|
|
15227
|
+
ModalType[ModalType["Prompt"] = 1] = "Prompt";
|
|
15228
|
+
ModalType[ModalType["Info"] = 2] = "Info";
|
|
15229
|
+
ModalType[ModalType["Confirm"] = 3] = "Confirm";
|
|
15230
|
+
ModalType[ModalType["Select"] = 4] = "Select";
|
|
15231
|
+
ModalType[ModalType["CreateEdit"] = 5] = "CreateEdit";
|
|
15232
|
+
})(ModalType || (ModalType = {}));
|
|
15233
|
+
const GAP = 17;
|
|
15234
|
+
const MARGIN_RIGHT = 25;
|
|
15235
|
+
const MARGIN_BOTTOM = 68;
|
|
15236
|
+
class DialogManager {
|
|
15237
|
+
static exec(modal, fetchData) {
|
|
15238
|
+
switch (modal.constructor.name) {
|
|
15239
|
+
case 'AlertDialog':
|
|
15240
|
+
return DialogManager.alert(modal);
|
|
15241
|
+
case 'PromptDialog':
|
|
15242
|
+
return DialogManager.prompt(modal);
|
|
15243
|
+
case 'ConfirmDialog':
|
|
15244
|
+
return DialogManager.confirm(modal);
|
|
15245
|
+
case 'InfoDialog':
|
|
15246
|
+
return DialogManager.info(modal, fetchData);
|
|
15247
|
+
case 'SelectDialog':
|
|
15248
|
+
return DialogManager.select(modal, fetchData);
|
|
15249
|
+
case 'CreateEditDialog':
|
|
15250
|
+
return DialogManager.createEdit(modal, fetchData);
|
|
15251
|
+
}
|
|
15252
|
+
return null;
|
|
15253
|
+
}
|
|
15254
|
+
constructor() {
|
|
15255
|
+
this._visibled = [];
|
|
15256
|
+
this._minimized = [];
|
|
15257
|
+
this._viewPortWidth = window.innerWidth;
|
|
15258
|
+
window.addEventListener('resize', this.onResizeHandler.bind(this));
|
|
15259
|
+
}
|
|
15260
|
+
setMinimized(minimized) {
|
|
15261
|
+
this._minimized = minimized;
|
|
15262
|
+
}
|
|
15263
|
+
modalIdentity(modal, host) {
|
|
15264
|
+
if (!modal.hostObject || !host) {
|
|
15265
|
+
return false;
|
|
15266
|
+
}
|
|
15267
|
+
return (modal.hostObject?.id === host?.id &&
|
|
15268
|
+
modal.hostObject?.contentType === host?.contentType &&
|
|
15269
|
+
modal.hostObject?.kind === host?.kind);
|
|
15270
|
+
}
|
|
15271
|
+
tryToOpen(host) {
|
|
15272
|
+
const found = this._visibled.concat(this._minimized).find(m => this.modalIdentity(m, host));
|
|
15273
|
+
return !found;
|
|
15274
|
+
}
|
|
15275
|
+
dialogCreated(info) {
|
|
15276
|
+
if (!info) {
|
|
15277
|
+
return;
|
|
15278
|
+
}
|
|
15279
|
+
info.el = document.querySelector(`.${this.uniqKey(info)}`);
|
|
15280
|
+
this.shiftLeft(info);
|
|
15281
|
+
this.refreshPositions();
|
|
15282
|
+
}
|
|
15283
|
+
dialogModalChanged(info, callback = null) {
|
|
15284
|
+
if (!info) {
|
|
15285
|
+
return;
|
|
15286
|
+
}
|
|
15287
|
+
if (info.noModal) {
|
|
15288
|
+
/**
|
|
15289
|
+
* диалог стал немодальным
|
|
15290
|
+
*/
|
|
15291
|
+
let timeoutId;
|
|
15292
|
+
let refreshed = false;
|
|
15293
|
+
const resizeEnd = () => {
|
|
15294
|
+
clearTimeout(timeoutId);
|
|
15295
|
+
resizeObserver.unobserve(info.el);
|
|
15296
|
+
this.refreshPositions();
|
|
15297
|
+
refreshed = true;
|
|
15298
|
+
};
|
|
15299
|
+
const resizeObserver = new window.ResizeObserver((entries) => {
|
|
15300
|
+
window.requestAnimationFrame(() => {
|
|
15301
|
+
if (!Array.isArray(entries) || !entries.length) {
|
|
15302
|
+
return null;
|
|
15303
|
+
}
|
|
15304
|
+
if (entries.length && entries[0].contentRect) {
|
|
15305
|
+
clearTimeout(timeoutId);
|
|
15306
|
+
timeoutId = setTimeout(resizeEnd, 50);
|
|
15307
|
+
}
|
|
15308
|
+
});
|
|
15309
|
+
});
|
|
15310
|
+
resizeObserver.observe(info.el);
|
|
15311
|
+
setTimeout(() => {
|
|
15312
|
+
if (!refreshed) {
|
|
15313
|
+
this.refreshPositions();
|
|
15314
|
+
}
|
|
15315
|
+
}, 300);
|
|
15316
|
+
}
|
|
15317
|
+
else {
|
|
15318
|
+
/**
|
|
15319
|
+
* диалог стал модальным
|
|
15320
|
+
*/
|
|
15321
|
+
this.setDialogModal(info, callback);
|
|
15322
|
+
}
|
|
15323
|
+
}
|
|
15324
|
+
dialogProcessing(info) {
|
|
15325
|
+
if (!info) {
|
|
15326
|
+
return;
|
|
15327
|
+
}
|
|
15328
|
+
info.minimized = true;
|
|
15329
|
+
this.dialogMinimizeChanged(info);
|
|
15330
|
+
}
|
|
15331
|
+
dialogMinimizeChanged(info) {
|
|
15332
|
+
if (!info) {
|
|
15333
|
+
return;
|
|
15334
|
+
}
|
|
15335
|
+
/**
|
|
15336
|
+
* диалог свернут - диалог развернут
|
|
15337
|
+
*/
|
|
15338
|
+
if (info.minimized) {
|
|
15339
|
+
// диалог свернут
|
|
15340
|
+
if (!info.noModal) {
|
|
15341
|
+
/**
|
|
15342
|
+
* если диалог модальный, сначала сделаем его немодальным
|
|
15343
|
+
*/
|
|
15344
|
+
info._wasModal = true;
|
|
15345
|
+
info.noModal = true;
|
|
15346
|
+
;
|
|
15347
|
+
}
|
|
15348
|
+
const i = this._visibled.findIndex(m => this.modalIdentity(m, info.hostObject));
|
|
15349
|
+
if (i > -1) {
|
|
15350
|
+
this._visibled.splice(i, 1);
|
|
15351
|
+
}
|
|
15352
|
+
this.addToMinimized(info);
|
|
15353
|
+
this.refreshPositions();
|
|
15354
|
+
}
|
|
15355
|
+
else {
|
|
15356
|
+
// диалог развернут
|
|
15357
|
+
this.removeFromMinimized(info);
|
|
15358
|
+
this.toggleDialogShow(info);
|
|
15359
|
+
this.shiftLeft(info);
|
|
15360
|
+
if (info._wasModal) {
|
|
15361
|
+
info.noModal = false;
|
|
15362
|
+
delete info._wasModal;
|
|
15363
|
+
}
|
|
15364
|
+
if (!info.noModal) {
|
|
15365
|
+
// сделаем окно модальным, если до сворачивания оно было таковым
|
|
15366
|
+
this.setDialogModal(info);
|
|
15367
|
+
}
|
|
15368
|
+
else {
|
|
15369
|
+
this.refreshPositions();
|
|
15370
|
+
}
|
|
15371
|
+
}
|
|
15372
|
+
}
|
|
15373
|
+
dialogClosed(info) {
|
|
15374
|
+
try {
|
|
15375
|
+
if (this.removeFromMinimized(info)) {
|
|
15376
|
+
return;
|
|
15377
|
+
}
|
|
15378
|
+
const i = this._visibled.findIndex(m => this.modalIdentity(m, info.hostObject));
|
|
15379
|
+
if (i > -1) {
|
|
15380
|
+
this._visibled.splice(i, 1);
|
|
15381
|
+
this.refreshPositions();
|
|
15382
|
+
}
|
|
15383
|
+
}
|
|
15384
|
+
finally {
|
|
15385
|
+
//
|
|
15386
|
+
}
|
|
15387
|
+
}
|
|
15388
|
+
activate(info) {
|
|
15389
|
+
let i = this._minimized.findIndex(d => d === info);
|
|
15390
|
+
let dlg = null;
|
|
15391
|
+
if (i > -1) {
|
|
15392
|
+
dlg = this._minimized[i];
|
|
15393
|
+
this._minimized.splice(i, 1);
|
|
15394
|
+
}
|
|
15395
|
+
if (dlg) {
|
|
15396
|
+
dlg.minimized = false;
|
|
15397
|
+
this.dialogMinimizeChanged(dlg);
|
|
15398
|
+
this.refreshPositions();
|
|
15399
|
+
}
|
|
15400
|
+
else {
|
|
15401
|
+
i = this._visibled.findIndex(m => this.modalIdentity(m, info.hostObject));
|
|
15402
|
+
if (i > -1) {
|
|
15403
|
+
this._visibled.splice(i, 1);
|
|
15404
|
+
}
|
|
15405
|
+
this.shiftLeft(info);
|
|
15406
|
+
this.refreshPositions();
|
|
15407
|
+
}
|
|
15408
|
+
}
|
|
15409
|
+
onResizeHandler() {
|
|
15410
|
+
this._viewPortWidth = window.innerWidth;
|
|
15411
|
+
this.refreshPositions();
|
|
15412
|
+
}
|
|
15413
|
+
shiftLeft(info) {
|
|
15414
|
+
this._visibled.push(info);
|
|
15415
|
+
}
|
|
15416
|
+
/**
|
|
15417
|
+
* --- Позиционирование относительно правого нижнего угла ---
|
|
15418
|
+
* Самый новое созданное или последнее развернутое окно
|
|
15419
|
+
* будет всегда в правом нижнем углу.
|
|
15420
|
+
* Предыдущие ему окна смещаются в сторону левого края,
|
|
15421
|
+
* пока для этого хватает рабочей области.
|
|
15422
|
+
* Окна, не уместившиеся в рабочую область, будут свернуты.
|
|
15423
|
+
*/
|
|
15424
|
+
refreshPositions() {
|
|
15425
|
+
let right = 0;
|
|
15426
|
+
let index = -1;
|
|
15427
|
+
let unusedArea = this._viewPortWidth;
|
|
15428
|
+
for (let i = this._visibled.length - 1; i >= 0; i--) {
|
|
15429
|
+
const dlg = this._visibled[i];
|
|
15430
|
+
// пропускаем окна, раскрытые в стандарное представление с затемненным фоном
|
|
15431
|
+
if (!dlg.noModal) {
|
|
15432
|
+
continue;
|
|
15433
|
+
}
|
|
15434
|
+
const offset = dlg.el.clientWidth + GAP;
|
|
15435
|
+
// проверяем, хватит ли незанятой области для отображения еще одного окна
|
|
15436
|
+
if (unusedArea < offset) {
|
|
15437
|
+
const info = this._visibled.shift();
|
|
15438
|
+
info.el.style.bottom = 'unset';
|
|
15439
|
+
info.el.style.right = 'unset';
|
|
15440
|
+
setTimeout(() => {
|
|
15441
|
+
this.addToMinimized(info);
|
|
15442
|
+
}, 1);
|
|
15443
|
+
}
|
|
15444
|
+
else {
|
|
15445
|
+
right = MARGIN_RIGHT + offset * ++index;
|
|
15446
|
+
// на каждой итерации вычисляем ширину незанятой области
|
|
15447
|
+
unusedArea -= MARGIN_RIGHT + offset;
|
|
15448
|
+
dlg.el.style.margin = '0';
|
|
15449
|
+
dlg.el.style.position = 'absolute';
|
|
15450
|
+
dlg.el.style.bottom = `${MARGIN_BOTTOM}px`;
|
|
15451
|
+
dlg.el.style.right = `${right}px`;
|
|
15452
|
+
dlg.el.classList.remove('ld-dialog-content--hidden');
|
|
15453
|
+
}
|
|
15454
|
+
}
|
|
15455
|
+
}
|
|
15456
|
+
setDialogModal(info, callback = null) {
|
|
15457
|
+
if (!info) {
|
|
15458
|
+
return;
|
|
15459
|
+
}
|
|
15460
|
+
info.el.style.position = 'relative';
|
|
15461
|
+
info.el.style.top = 'unset';
|
|
15462
|
+
info.el.style.left = 'unset';
|
|
15463
|
+
info.el.style.bottom = 'unset';
|
|
15464
|
+
info.el.style.right = 'unset';
|
|
15465
|
+
info.el.parentElement.style.justifyContent = 'center';
|
|
15466
|
+
info.el.parentElement.style.alignItems = 'center';
|
|
15467
|
+
}
|
|
15468
|
+
addToMinimized(info) {
|
|
15469
|
+
this.toggleDialogShow(info);
|
|
15470
|
+
info.minimized = true;
|
|
15471
|
+
this._minimized.unshift(info);
|
|
15472
|
+
}
|
|
15473
|
+
removeFromMinimized(info) {
|
|
15474
|
+
const i = this._minimized.findIndex(m => this.modalIdentity(m, info.hostObject));
|
|
15475
|
+
if (i > -1) {
|
|
15476
|
+
this._minimized.splice(i, 1);
|
|
15477
|
+
return true;
|
|
15478
|
+
}
|
|
15479
|
+
return false;
|
|
15480
|
+
}
|
|
15481
|
+
toggleDialogShow(info) {
|
|
15482
|
+
if (info.el.parentElement.style.display !== 'none') {
|
|
15483
|
+
info._lastDisplayProp = info.el.parentElement.style.display;
|
|
15484
|
+
info.el.parentElement.style.display = 'none';
|
|
15485
|
+
}
|
|
15486
|
+
else {
|
|
15487
|
+
info.el.parentElement.style.display = info._lastDisplayProp;
|
|
15488
|
+
}
|
|
15489
|
+
}
|
|
15490
|
+
uniqKey(info) {
|
|
15491
|
+
return `dlg-${info.id}`;
|
|
15492
|
+
}
|
|
15493
|
+
static alert(modal) {
|
|
15494
|
+
const modalInfo = {
|
|
15495
|
+
title: modal.title,
|
|
15496
|
+
content: modal.content,
|
|
15497
|
+
type: ModalType.Alert,
|
|
15498
|
+
};
|
|
15499
|
+
return DialogManager.execAsync(modalInfo);
|
|
15500
|
+
}
|
|
15501
|
+
static prompt(modal) {
|
|
15502
|
+
const modalInfo = {
|
|
15503
|
+
...modal,
|
|
15504
|
+
type: ModalType.Prompt
|
|
15505
|
+
};
|
|
15506
|
+
return DialogManager.execAsync(modalInfo);
|
|
15507
|
+
}
|
|
15508
|
+
static confirm(modal) {
|
|
15509
|
+
const modalInfo = {
|
|
15510
|
+
...modal,
|
|
15511
|
+
content: modal.text,
|
|
15512
|
+
type: ModalType.Confirm,
|
|
15513
|
+
closable: true,
|
|
15514
|
+
};
|
|
15515
|
+
return DialogManager.execAsync(modalInfo);
|
|
15516
|
+
}
|
|
15517
|
+
static info(modal, fetchData) {
|
|
15518
|
+
const modalInfo = {
|
|
15519
|
+
...modal,
|
|
15520
|
+
type: ModalType.Info,
|
|
15521
|
+
};
|
|
15522
|
+
if (!modalInfo.hostObject) {
|
|
15523
|
+
modalInfo.hostObject = {
|
|
15524
|
+
id: uidGen(6, '0-9'),
|
|
15525
|
+
contentType: 0,
|
|
15526
|
+
kind: 1
|
|
15527
|
+
};
|
|
15528
|
+
}
|
|
15529
|
+
return DialogManager.execAsync(modalInfo, fetchData);
|
|
15530
|
+
}
|
|
15531
|
+
static select(modal, fetchData) {
|
|
15532
|
+
const modalInfo = {
|
|
15533
|
+
...modal,
|
|
15534
|
+
type: ModalType.Select,
|
|
15535
|
+
};
|
|
15536
|
+
if (!modalInfo.hostObject) {
|
|
15537
|
+
modalInfo.hostObject = {
|
|
15538
|
+
id: uidGen(6, '0-9'),
|
|
15539
|
+
contentType: 0,
|
|
15540
|
+
kind: 1
|
|
15541
|
+
};
|
|
15542
|
+
}
|
|
15543
|
+
return DialogManager.execAsync(modalInfo, fetchData);
|
|
15544
|
+
}
|
|
15545
|
+
static createEdit(modal, fetchData) {
|
|
15546
|
+
const modalInfo = {
|
|
15547
|
+
...modal,
|
|
15548
|
+
type: ModalType.CreateEdit,
|
|
15549
|
+
};
|
|
15550
|
+
if (!modalInfo.hostObject) {
|
|
15551
|
+
modalInfo.hostObject = {
|
|
15552
|
+
id: uidGen(6, '0-9'),
|
|
15553
|
+
contentType: 0,
|
|
15554
|
+
kind: 1
|
|
15555
|
+
};
|
|
15556
|
+
}
|
|
15557
|
+
return DialogManager.execAsync(modalInfo, fetchData);
|
|
15558
|
+
}
|
|
15559
|
+
static execAsync(modalInfo, fetchData) {
|
|
15560
|
+
return new Promise(resolve => {
|
|
15561
|
+
modalInfo.resolveFunction = resolve;
|
|
15562
|
+
let fetchProps = null;
|
|
15563
|
+
if (fetchData instanceof Function) {
|
|
15564
|
+
fetchProps = async (host) => {
|
|
15565
|
+
if (host.id === modalInfo.hostObject.id) {
|
|
15566
|
+
if (fetchData instanceof Function) {
|
|
15567
|
+
const props = await fetchData();
|
|
15568
|
+
dist.eventBus.$off('dialog:created', fetchProps);
|
|
15569
|
+
dist.eventBus.$emit('dialog:props', props, modalInfo.hostObject);
|
|
15570
|
+
}
|
|
15571
|
+
}
|
|
15572
|
+
};
|
|
15573
|
+
dist.eventBus.$on('dialog:created', fetchProps);
|
|
15574
|
+
}
|
|
15575
|
+
dist.eventBus.$emit('dialog:open', modalInfo);
|
|
15576
|
+
});
|
|
15577
|
+
}
|
|
15578
|
+
}
|
|
15579
|
+
|
|
15580
|
+
;// CONCATENATED MODULE: ./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-dialog/dialog.minimized.vue?vue&type=template&id=719819aa&ts=true
|
|
15581
|
+
|
|
15582
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_1 = {
|
|
15583
|
+
key: 0,
|
|
15584
|
+
class: "minimized-dialogs"
|
|
15585
|
+
};
|
|
15586
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_2 = {
|
|
15587
|
+
key: 0,
|
|
15588
|
+
class: "d-flex flex-row-reverse"
|
|
15589
|
+
};
|
|
15590
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_3 = ["onClick"];
|
|
15591
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_4 = { class: "d-flex align-center justify-between px-2" };
|
|
15592
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_5 = { class: "white--text" };
|
|
15593
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_6 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Развернуть", -1);
|
|
15594
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_7 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Закрыть", -1);
|
|
15595
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_8 = { class: "d-flex justify-center" };
|
|
15596
|
+
const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_9 = { class: "body-1 white--text" };
|
|
15597
|
+
const _hoisted_10 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Свёрнутые окна", -1);
|
|
15598
|
+
const _hoisted_11 = { class: "minimized-item__title" };
|
|
15599
|
+
const _hoisted_12 = { class: "minimized-item__subtitle" };
|
|
15600
|
+
const _hoisted_13 = { class: "pa-3" };
|
|
15601
|
+
const _hoisted_14 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Закрыть все", -1);
|
|
15602
|
+
function dialog_minimizedvue_type_template_id_719819aa_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
15603
|
+
const _component_v_spacer = (0,external_vue_.resolveComponent)("v-spacer");
|
|
15604
|
+
const _component_square_button = (0,external_vue_.resolveComponent)("square-button");
|
|
15605
|
+
const _component_v_tooltip = (0,external_vue_.resolveComponent)("v-tooltip");
|
|
15606
|
+
const _component_v_list_item_title = (0,external_vue_.resolveComponent)("v-list-item-title");
|
|
15607
|
+
const _component_v_list_item = (0,external_vue_.resolveComponent)("v-list-item");
|
|
15608
|
+
const _component_v_list = (0,external_vue_.resolveComponent)("v-list");
|
|
15609
|
+
const _component_small_button = (0,external_vue_.resolveComponent)("small-button");
|
|
15610
|
+
const _component_v_card = (0,external_vue_.resolveComponent)("v-card");
|
|
15611
|
+
const _component_v_menu = (0,external_vue_.resolveComponent)("v-menu");
|
|
15612
|
+
return (_ctx.items.length)
|
|
15613
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_1, [
|
|
15614
|
+
(_ctx.isManyItems)
|
|
15615
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_2, [
|
|
15616
|
+
((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.items, (item) => {
|
|
15617
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("button", {
|
|
15618
|
+
key: item.id,
|
|
15619
|
+
class: "ml-4 minimize-btn",
|
|
15620
|
+
onClick: ($event) => (_ctx.onMaximize(item))
|
|
15621
|
+
}, [
|
|
15622
|
+
(0,external_vue_.createElementVNode)("div", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_4, [
|
|
15623
|
+
(0,external_vue_.createElementVNode)("span", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_5, (0,external_vue_.toDisplayString)(item.processingDescription || item.description || item.title), 1),
|
|
15624
|
+
(0,external_vue_.createTextVNode)(),
|
|
15625
|
+
(0,external_vue_.createVNode)(_component_v_spacer),
|
|
15626
|
+
(0,external_vue_.createTextVNode)(),
|
|
15627
|
+
(0,external_vue_.createElementVNode)("div", null, [
|
|
15628
|
+
(0,external_vue_.createVNode)(_component_v_tooltip, { location: "top" }, {
|
|
15629
|
+
activator: (0,external_vue_.withCtx)(({ props }) => [
|
|
15630
|
+
(0,external_vue_.createVNode)(_component_square_button, (0,external_vue_.mergeProps)(props, {
|
|
15631
|
+
color: "white",
|
|
15632
|
+
onClick: ($event) => (_ctx.onMaximize(item))
|
|
15633
|
+
}), {
|
|
15634
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15635
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
|
|
15636
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15637
|
+
(0,external_vue_.createTextVNode)("\r\n open_in_full\r\n ")
|
|
15638
|
+
]),
|
|
15639
|
+
_: 1
|
|
15640
|
+
}))
|
|
15641
|
+
]),
|
|
15642
|
+
_: 2
|
|
15643
|
+
}, 1040, ["onClick"])
|
|
15644
|
+
]),
|
|
15645
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15646
|
+
(0,external_vue_.createTextVNode)(),
|
|
15647
|
+
dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_6
|
|
15648
|
+
]),
|
|
15649
|
+
_: 2
|
|
15650
|
+
}, 1024),
|
|
15651
|
+
(0,external_vue_.createTextVNode)(),
|
|
15652
|
+
(0,external_vue_.createVNode)(_component_v_tooltip, { location: "top" }, {
|
|
15653
|
+
activator: (0,external_vue_.withCtx)(({ props }) => [
|
|
15654
|
+
(0,external_vue_.createVNode)(_component_square_button, (0,external_vue_.mergeProps)(props, {
|
|
15655
|
+
color: "white",
|
|
15656
|
+
onClick: (0,external_vue_.withModifiers)(($event) => (_ctx.onClose(item)), ["stop"])
|
|
15657
|
+
}), {
|
|
15658
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15659
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
|
|
15660
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15661
|
+
(0,external_vue_.createTextVNode)("close")
|
|
15662
|
+
]),
|
|
15663
|
+
_: 1
|
|
15664
|
+
}))
|
|
15665
|
+
]),
|
|
15666
|
+
_: 2
|
|
15667
|
+
}, 1040, ["onClick"])
|
|
15668
|
+
]),
|
|
15669
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15670
|
+
(0,external_vue_.createTextVNode)(),
|
|
15671
|
+
dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_7
|
|
15672
|
+
]),
|
|
15673
|
+
_: 2
|
|
15674
|
+
}, 1024)
|
|
15675
|
+
])
|
|
15676
|
+
])
|
|
15677
|
+
], 8, dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_3));
|
|
15678
|
+
}), 128))
|
|
15679
|
+
]))
|
|
15680
|
+
: ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_menu, { key: 1 }, {
|
|
15681
|
+
activator: (0,external_vue_.withCtx)(({ props }) => [
|
|
15682
|
+
(0,external_vue_.createElementVNode)("button", (0,external_vue_.mergeProps)(props, { class: "minimize-btn" }), [
|
|
15683
|
+
(0,external_vue_.createElementVNode)("div", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_8, [
|
|
15684
|
+
(0,external_vue_.createElementVNode)("span", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_9, [
|
|
15685
|
+
_hoisted_10,
|
|
15686
|
+
(0,external_vue_.createTextVNode)(" (" + (0,external_vue_.toDisplayString)(_ctx.items.length) + ") ", 1)
|
|
15687
|
+
])
|
|
15688
|
+
])
|
|
15689
|
+
], 16)
|
|
15690
|
+
]),
|
|
15691
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15692
|
+
(0,external_vue_.createTextVNode)(),
|
|
15693
|
+
(0,external_vue_.createVNode)(_component_v_card, {
|
|
15694
|
+
class: "d-flex flex-column overflow-hidden",
|
|
15695
|
+
style: { "max-height": "65vh" }
|
|
15696
|
+
}, {
|
|
15697
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15698
|
+
(0,external_vue_.createVNode)(_component_v_list, null, {
|
|
15699
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15700
|
+
((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.items, (item) => {
|
|
15701
|
+
return ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_list_item, {
|
|
15702
|
+
key: item.id,
|
|
15703
|
+
onClick: ($event) => (_ctx.onMaximize(item))
|
|
15704
|
+
}, {
|
|
15705
|
+
append: (0,external_vue_.withCtx)(() => [
|
|
15706
|
+
(0,external_vue_.createVNode)(_component_square_button, {
|
|
15707
|
+
onClick: (0,external_vue_.withModifiers)(($event) => (_ctx.onMaximize(item)), ["stop"])
|
|
15708
|
+
}, {
|
|
15709
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15710
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
|
|
15711
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15712
|
+
(0,external_vue_.createTextVNode)("\r\n open_in_full\r\n ")
|
|
15713
|
+
]),
|
|
15714
|
+
_: 1
|
|
15715
|
+
}))
|
|
15716
|
+
]),
|
|
15717
|
+
_: 2
|
|
15718
|
+
}, 1032, ["onClick"]),
|
|
15719
|
+
(0,external_vue_.createTextVNode)(),
|
|
15720
|
+
(0,external_vue_.createVNode)(_component_square_button, {
|
|
15721
|
+
onClick: (0,external_vue_.withModifiers)(($event) => (_ctx.onClose(item)), ["stop"])
|
|
15722
|
+
}, {
|
|
15723
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15724
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
|
|
15725
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15726
|
+
(0,external_vue_.createTextVNode)("\r\n close\r\n ")
|
|
15727
|
+
]),
|
|
15728
|
+
_: 1
|
|
15729
|
+
}))
|
|
15730
|
+
]),
|
|
15731
|
+
_: 2
|
|
15732
|
+
}, 1032, ["onClick"])
|
|
15733
|
+
]),
|
|
15734
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15735
|
+
(0,external_vue_.createVNode)(_component_v_list_item_title, {
|
|
15736
|
+
class: (0,external_vue_.normalizeClass)({ 'changed': _ctx.itemIsChanged(item) })
|
|
15737
|
+
}, {
|
|
15738
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15739
|
+
(0,external_vue_.createElementVNode)("div", _hoisted_11, (0,external_vue_.toDisplayString)(item.description), 1),
|
|
15740
|
+
(0,external_vue_.createTextVNode)(),
|
|
15741
|
+
(0,external_vue_.createElementVNode)("div", _hoisted_12, (0,external_vue_.toDisplayString)(item.title), 1)
|
|
15742
|
+
]),
|
|
15743
|
+
_: 2
|
|
15744
|
+
}, 1032, ["class"]),
|
|
15745
|
+
(0,external_vue_.createTextVNode)()
|
|
15746
|
+
]),
|
|
15747
|
+
_: 2
|
|
15748
|
+
}, 1032, ["onClick"]));
|
|
15749
|
+
}), 128))
|
|
15750
|
+
]),
|
|
15751
|
+
_: 1
|
|
15752
|
+
}),
|
|
15753
|
+
(0,external_vue_.createTextVNode)(),
|
|
15754
|
+
(0,external_vue_.createElementVNode)("div", _hoisted_13, [
|
|
15755
|
+
(0,external_vue_.createVNode)(_component_small_button, {
|
|
15756
|
+
color: "grey",
|
|
15757
|
+
variant: "outlined",
|
|
15758
|
+
onClick: _ctx.onCloseAll
|
|
15759
|
+
}, {
|
|
15760
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15761
|
+
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), { color: "error" }, {
|
|
15762
|
+
default: (0,external_vue_.withCtx)(() => [
|
|
15763
|
+
(0,external_vue_.createTextVNode)("\r\n close\r\n ")
|
|
15764
|
+
]),
|
|
15765
|
+
_: 1
|
|
15766
|
+
})),
|
|
15767
|
+
(0,external_vue_.createTextVNode)(),
|
|
15768
|
+
_hoisted_14
|
|
15769
|
+
]),
|
|
15770
|
+
_: 1
|
|
15771
|
+
}, 8, ["onClick"])
|
|
15772
|
+
])
|
|
15773
|
+
]),
|
|
15774
|
+
_: 1
|
|
15775
|
+
})
|
|
15776
|
+
]),
|
|
15777
|
+
_: 1
|
|
15778
|
+
}))
|
|
15779
|
+
]))
|
|
15780
|
+
: (0,external_vue_.createCommentVNode)("", true);
|
|
15781
|
+
}
|
|
15782
|
+
|
|
15783
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/dialog.minimized.vue?vue&type=template&id=719819aa&ts=true
|
|
15784
|
+
|
|
15785
|
+
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-dialog/dialog.minimized.ts?vue&type=script&lang=ts&external
|
|
15786
|
+
var dialog_minimizedvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15787
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15788
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15789
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15790
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15791
|
+
};
|
|
15792
|
+
var dialog_minimizedvue_type_script_lang_ts_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
15793
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15794
|
+
};
|
|
15795
|
+
var dialog_minimizedvue_type_script_lang_ts_external_a;
|
|
15796
|
+
|
|
15797
|
+
|
|
15798
|
+
let DialogMinimizedComponent = class DialogMinimizedComponent extends external_vue_property_decorator_.Vue {
|
|
15799
|
+
created() {
|
|
15800
|
+
this.maximizeHandler = this.onMaximize.bind(this);
|
|
15801
|
+
dist.eventBus.$on('modal-maximize', this.maximizeHandler);
|
|
15802
|
+
}
|
|
15803
|
+
beforeUnmount() {
|
|
15804
|
+
dist.eventBus.$off('modal-maximize', this.maximizeHandler);
|
|
15805
|
+
}
|
|
15806
|
+
onMaximize(item) {
|
|
15807
|
+
const dlg = this.dialogs.find(d => d.id === item.id);
|
|
15808
|
+
if (dlg) {
|
|
15809
|
+
this.$emit('maximize', dlg);
|
|
15810
|
+
}
|
|
15811
|
+
}
|
|
15812
|
+
onClose(item) {
|
|
15813
|
+
const dlg = this.dialogs.find(d => d.id === item.id);
|
|
15814
|
+
if (dlg) {
|
|
15815
|
+
this.$emit('close', dlg);
|
|
15816
|
+
}
|
|
15817
|
+
}
|
|
15818
|
+
onCloseAll() {
|
|
15819
|
+
this.$emit('close-all');
|
|
15820
|
+
}
|
|
15821
|
+
itemIsChanged(item) {
|
|
15822
|
+
if (!item.isChanged || typeof item.isChanged !== 'function') {
|
|
15823
|
+
return false;
|
|
15824
|
+
}
|
|
15825
|
+
return item.isChanged();
|
|
15826
|
+
}
|
|
15827
|
+
get label() {
|
|
15828
|
+
return 'Свёрнутые окна';
|
|
15829
|
+
}
|
|
15830
|
+
get items() {
|
|
15831
|
+
return this.dialogs ?? [];
|
|
15832
|
+
}
|
|
15833
|
+
get isManyItems() {
|
|
15834
|
+
return this.items.length && this.items.length < 5;
|
|
15835
|
+
}
|
|
15836
|
+
};
|
|
15837
|
+
dialog_minimizedvue_type_script_lang_ts_external_decorate([
|
|
15838
|
+
(0,external_vue_property_decorator_.Prop)(),
|
|
15839
|
+
dialog_minimizedvue_type_script_lang_ts_external_metadata("design:type", typeof (dialog_minimizedvue_type_script_lang_ts_external_a = typeof Array !== "undefined" && Array) === "function" ? dialog_minimizedvue_type_script_lang_ts_external_a : Object)
|
|
15840
|
+
], DialogMinimizedComponent.prototype, "dialogs", void 0);
|
|
15841
|
+
DialogMinimizedComponent = dialog_minimizedvue_type_script_lang_ts_external_decorate([
|
|
15842
|
+
(0,external_vue_property_decorator_.Options)({
|
|
15843
|
+
emits: [
|
|
15844
|
+
'maximize',
|
|
15845
|
+
'close',
|
|
15846
|
+
'close-all'
|
|
15847
|
+
]
|
|
15848
|
+
})
|
|
15849
|
+
], DialogMinimizedComponent);
|
|
15850
|
+
/* harmony default export */ const dialog_minimizedvue_type_script_lang_ts_external = (DialogMinimizedComponent);
|
|
15851
|
+
|
|
15852
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/dialog.minimized.ts?vue&type=script&lang=ts&external
|
|
15853
|
+
|
|
15854
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/dialog.minimized.vue
|
|
15855
|
+
|
|
15856
|
+
|
|
15857
|
+
|
|
15858
|
+
|
|
15859
|
+
;
|
|
15860
|
+
const dialog_minimized_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(dialog_minimizedvue_type_script_lang_ts_external, [['render',dialog_minimizedvue_type_template_id_719819aa_ts_true_render]])
|
|
15861
|
+
|
|
15862
|
+
/* harmony default export */ const dialog_minimized = (dialog_minimized_exports_);
|
|
15863
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/dialogs.ts
|
|
15864
|
+
class Dialog {
|
|
15865
|
+
constructor(title, content = '') {
|
|
15866
|
+
this.title = title;
|
|
15867
|
+
this.content = content;
|
|
15868
|
+
}
|
|
15869
|
+
;
|
|
15870
|
+
}
|
|
15871
|
+
class AlertDialog extends Dialog {
|
|
15872
|
+
constructor(data) {
|
|
15873
|
+
super(data.title, data.text);
|
|
15874
|
+
}
|
|
15875
|
+
}
|
|
15876
|
+
class PromptDialog extends Dialog {
|
|
15877
|
+
constructor(data) {
|
|
15878
|
+
super(data.title, data.content);
|
|
15879
|
+
this.title = data.title;
|
|
15880
|
+
this.width = data.width || '60%';
|
|
15881
|
+
}
|
|
15882
|
+
}
|
|
15883
|
+
class ConfirmDialog extends Dialog {
|
|
15884
|
+
constructor(data) {
|
|
15885
|
+
super(data.title);
|
|
15886
|
+
this.title = data.title;
|
|
15887
|
+
this.text = data.text;
|
|
15888
|
+
this.okTitle = data.okTitle;
|
|
15889
|
+
this.cancelTitle = data.cancelTitle;
|
|
15890
|
+
this.okResult = data.okResult;
|
|
15891
|
+
this.cancelResult = data.cancelResult;
|
|
15892
|
+
}
|
|
15893
|
+
;
|
|
15894
|
+
}
|
|
15895
|
+
class InfoDialog extends Dialog {
|
|
15896
|
+
constructor(data) {
|
|
15897
|
+
super(data.title);
|
|
15898
|
+
this.title = data.title;
|
|
15899
|
+
this.component = data.component;
|
|
15900
|
+
this.componentProps = data.componentProps;
|
|
15901
|
+
this.width = data.width;
|
|
15902
|
+
this.height = data.height;
|
|
15903
|
+
this.loading = data.loading;
|
|
15904
|
+
this.fullHeight = data.fullHeight;
|
|
15905
|
+
this.closable = data.closable;
|
|
15906
|
+
this.hideFooter = data.hideFooter;
|
|
15907
|
+
this.minimizable = data.minimizable;
|
|
15908
|
+
this.description = data.description;
|
|
15909
|
+
this.hostObject = data.hostObject;
|
|
15910
|
+
}
|
|
15911
|
+
}
|
|
15912
|
+
class SelectDialog {
|
|
15913
|
+
constructor(data) {
|
|
15914
|
+
this.title = data.title;
|
|
15915
|
+
this.component = data.component;
|
|
15916
|
+
this.componentProps = data.componentProps;
|
|
15917
|
+
this.loading = data.loading;
|
|
15918
|
+
this.fullHeight = data.fullHeight;
|
|
15919
|
+
this.width = data.width;
|
|
15920
|
+
this.height = data.height;
|
|
15921
|
+
this.selectAsOk = data.selectAsOk;
|
|
15922
|
+
}
|
|
15923
|
+
}
|
|
15924
|
+
class CreateEditDialog {
|
|
15925
|
+
constructor(data) {
|
|
15926
|
+
this._isChanged = null;
|
|
15927
|
+
this.title = data.title;
|
|
15928
|
+
this.component = data.component;
|
|
15929
|
+
this.componentProps = {
|
|
15930
|
+
...data.componentProps,
|
|
15931
|
+
setIsChangedCallback: this.setIsChangedCallback.bind(this),
|
|
15932
|
+
};
|
|
15933
|
+
this.hostObject = data.hostObject;
|
|
15934
|
+
this.loading = data.loading;
|
|
15935
|
+
this.fullHeight = data.fullHeight;
|
|
15936
|
+
this.width = data.width;
|
|
15937
|
+
this.height = data.height;
|
|
15938
|
+
this.hideFooter = data.hideFooter;
|
|
15939
|
+
this.darkTitle = data.darkTitle;
|
|
15940
|
+
this.closable = data.closable;
|
|
15941
|
+
this.expandable = data.expandable;
|
|
15942
|
+
this.minimizable = data.minimizable;
|
|
15943
|
+
this.collapsedSize = data.collapsedSize;
|
|
15944
|
+
this.expandedSize = data.expandedSize;
|
|
15945
|
+
this.expanded = data.expanded;
|
|
15946
|
+
this.description = data.description;
|
|
15947
|
+
this.noModal = data.noModal;
|
|
15948
|
+
this.okTitle = data.okTitle;
|
|
15949
|
+
this.cancelTitle = data.cancelTitle;
|
|
15950
|
+
this.isChanged = () => {
|
|
15951
|
+
if (this._isChanged instanceof Function) {
|
|
15952
|
+
return this._isChanged();
|
|
15953
|
+
}
|
|
15954
|
+
return false;
|
|
15955
|
+
};
|
|
15956
|
+
}
|
|
15957
|
+
setIsChangedCallback(callback) {
|
|
15958
|
+
this._isChanged = callback;
|
|
15959
|
+
}
|
|
15960
|
+
}
|
|
15961
|
+
|
|
15962
|
+
;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-dialog/ld-dialog.ts?vue&type=script&lang=ts&external
|
|
15963
|
+
var ld_dialogvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
15964
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
15965
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
15966
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
15967
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
15968
|
+
};
|
|
15969
|
+
var ld_dialogvue_type_script_lang_ts_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
15970
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
15971
|
+
};
|
|
15972
|
+
|
|
15973
|
+
|
|
15974
|
+
|
|
15975
|
+
|
|
15976
|
+
|
|
15977
|
+
|
|
15978
|
+
|
|
15979
|
+
|
|
15980
|
+
let DialogComponent = class DialogComponent extends (0,external_vue_class_component_.mixins)(ViewportMixin) {
|
|
15981
|
+
constructor() {
|
|
15982
|
+
super(...arguments);
|
|
15983
|
+
this.minimized = [];
|
|
15984
|
+
this.dialogManager = new DialogManager();
|
|
15985
|
+
this.modals = [];
|
|
15986
|
+
this.modalResult = null;
|
|
15987
|
+
this.listeners = new Map();
|
|
15988
|
+
this.resizingModalId = null;
|
|
15989
|
+
}
|
|
15990
|
+
emitFocus(value) {
|
|
15991
|
+
return value;
|
|
15992
|
+
}
|
|
15993
|
+
onModalsChanged() {
|
|
15994
|
+
const hasModals = this.modals.some(m => !m.minimized && !m.noModal);
|
|
15995
|
+
this.emitFocus(hasModals);
|
|
15996
|
+
}
|
|
15997
|
+
created() {
|
|
15998
|
+
this.dialogManager.setMinimized(this.minimized);
|
|
15999
|
+
}
|
|
16000
|
+
mounted() {
|
|
16001
|
+
this.$nextTick(() => {
|
|
16002
|
+
dist.eventBus.$on('dialog:open', this.open);
|
|
16003
|
+
dist.eventBus.$on('dialog:props', this.onSetProps);
|
|
16004
|
+
dist.eventBus.$on('dialog:close:all', this.closeAll);
|
|
16005
|
+
});
|
|
16006
|
+
}
|
|
16007
|
+
beforeUnmount() {
|
|
16008
|
+
dist.eventBus.$off('dialog:open', this.open);
|
|
16009
|
+
dist.eventBus.$off('dialog:props', this.onSetProps);
|
|
16010
|
+
dist.eventBus.$off('dialog:close:all', this.closeAll);
|
|
16011
|
+
}
|
|
16012
|
+
async open(modalInfo) {
|
|
16013
|
+
if (modalInfo.hostObject) {
|
|
16014
|
+
const found = this.findModal(modalInfo.hostObject);
|
|
16015
|
+
if (found) {
|
|
16016
|
+
this.dialogManager.activate(found);
|
|
16017
|
+
return;
|
|
16018
|
+
}
|
|
16019
|
+
}
|
|
16020
|
+
const modal = {
|
|
16021
|
+
id: Number(modalInfo.hostObject?.id) || this.$utils.uidGen(4, '0-9'),
|
|
16022
|
+
component: modalInfo.component,
|
|
16023
|
+
componentProps: modalInfo.componentProps,
|
|
16024
|
+
hostObject: modalInfo.hostObject,
|
|
16025
|
+
loading: modalInfo.loading,
|
|
16026
|
+
noModal: modalInfo.noModal,
|
|
16027
|
+
type: modalInfo.type,
|
|
16028
|
+
title: modalInfo.title,
|
|
16029
|
+
darkTitle: modalInfo.darkTitle,
|
|
16030
|
+
content: modalInfo.content,
|
|
16031
|
+
resolveFunction: modalInfo.resolveFunction,
|
|
16032
|
+
okTitle: modalInfo.okTitle,
|
|
16033
|
+
cancelTitle: modalInfo.cancelTitle,
|
|
16034
|
+
okResult: modalInfo.okResult,
|
|
16035
|
+
cancelResult: modalInfo.cancelResult,
|
|
16036
|
+
okOnly: modalInfo.type === ModalType.Alert ||
|
|
16037
|
+
modalInfo.type === ModalType.Info,
|
|
16038
|
+
show: true,
|
|
16039
|
+
okLoading: false,
|
|
16040
|
+
okDisabled: modalInfo.type === ModalType.Select,
|
|
16041
|
+
selectAsOk: modalInfo.selectAsOk,
|
|
16042
|
+
hideFooter: this.$utils.isDefined(modalInfo.hideFooter)
|
|
16043
|
+
? modalInfo.hideFooter
|
|
16044
|
+
: this.$utils.isDefined(modalInfo.selectAsOk)
|
|
16045
|
+
? modalInfo.selectAsOk
|
|
16046
|
+
: false,
|
|
16047
|
+
resolved: false,
|
|
16048
|
+
width: modalInfo.width,
|
|
16049
|
+
height: modalInfo.height,
|
|
16050
|
+
fullHeight: modalInfo.fullHeight,
|
|
16051
|
+
closable: this.$utils.isDefined(modalInfo.closable) ? modalInfo.closable : true,
|
|
16052
|
+
expandable: modalInfo.expandable,
|
|
16053
|
+
minimizable: modalInfo.minimizable,
|
|
16054
|
+
minimized: false,
|
|
16055
|
+
expandedSize: modalInfo.expandedSize,
|
|
16056
|
+
collapsedSize: modalInfo.collapsedSize,
|
|
16057
|
+
isChanged: modalInfo.isChanged,
|
|
16058
|
+
/**
|
|
16059
|
+
* не дает диалогу автоматом устанавливать фокус на первом focusable элементе (при срабатывании focusin)
|
|
16060
|
+
* т.к. это причина зависания страницы, если одновременно несколько диалогов на экране
|
|
16061
|
+
*/
|
|
16062
|
+
retainFocus: false,
|
|
16063
|
+
};
|
|
16064
|
+
if (modal.expandable) {
|
|
16065
|
+
modal.expanded = modalInfo.expanded;
|
|
16066
|
+
if (!modal.expandedSize && !modal.collapsedSize) {
|
|
16067
|
+
const width = modal.width ?? '80%';
|
|
16068
|
+
const height = modal.height ?? width;
|
|
16069
|
+
modal.expandedSize = { width, height };
|
|
16070
|
+
modal.collapsedSize = { width, height };
|
|
16071
|
+
}
|
|
16072
|
+
else if (modal.expandedSize && !modal.collapsedSize) {
|
|
16073
|
+
const { height, width } = modal.expandedSize;
|
|
16074
|
+
modal.noModal = modal.expandedSize.noModal;
|
|
16075
|
+
modal.collapsedSize = { height, width };
|
|
16076
|
+
}
|
|
16077
|
+
else if (!modal.expandedSize && modal.collapsedSize) {
|
|
16078
|
+
const { height, width } = modal.collapsedSize;
|
|
16079
|
+
modal.noModal = modal.collapsedSize.noModal;
|
|
16080
|
+
modal.expandedSize = { height, width };
|
|
16081
|
+
}
|
|
16082
|
+
else {
|
|
16083
|
+
modal.noModal = !modal.expanded;
|
|
16084
|
+
}
|
|
16085
|
+
if (!modal.noModal) {
|
|
16086
|
+
modal.expanded = true;
|
|
16087
|
+
}
|
|
16088
|
+
if (modal.expanded) {
|
|
16089
|
+
modal.noModal = false;
|
|
16090
|
+
}
|
|
16091
|
+
}
|
|
16092
|
+
this.modals.push(modal);
|
|
16093
|
+
const checkDialogExist = setInterval(() => {
|
|
16094
|
+
const el = document.querySelector(`.${this.uniqKey(modal)}`);
|
|
16095
|
+
if (el) {
|
|
16096
|
+
clearInterval(checkDialogExist);
|
|
16097
|
+
this.listenerMap.set(modal, (e) => {
|
|
16098
|
+
if (!this.listenerMap.isLast(modal)) {
|
|
16099
|
+
return;
|
|
16100
|
+
}
|
|
16101
|
+
if (e.key === 'Enter' && this.isConfirmDialog(modal)) {
|
|
16102
|
+
this.handleOk(modal);
|
|
16103
|
+
}
|
|
16104
|
+
if (e.key === 'Escape' && this.isConfirmDialog(modal)) {
|
|
16105
|
+
this.handleCancel(modal);
|
|
16106
|
+
}
|
|
16107
|
+
});
|
|
16108
|
+
modal.el = el;
|
|
16109
|
+
if (this.isConfirmDialog(modal)) {
|
|
16110
|
+
const btnOk = modal.el.querySelector('#modalOk');
|
|
16111
|
+
if (btnOk) {
|
|
16112
|
+
btnOk.focus();
|
|
16113
|
+
}
|
|
16114
|
+
}
|
|
16115
|
+
this.dialogManager.dialogCreated(modal);
|
|
16116
|
+
dist.eventBus.$emit('dialog:created', modal.hostObject);
|
|
16117
|
+
}
|
|
16118
|
+
}, 100);
|
|
16119
|
+
}
|
|
16120
|
+
modalClass(modal) {
|
|
16121
|
+
const result = [
|
|
16122
|
+
`${this.uniqKey(modal)} ${ModalType[modal.type]}`
|
|
16123
|
+
];
|
|
16124
|
+
if (this.isMobileGlobal) {
|
|
16125
|
+
return result;
|
|
16126
|
+
}
|
|
16127
|
+
if (!modal.width) {
|
|
16128
|
+
result.push('modal');
|
|
16129
|
+
}
|
|
16130
|
+
if (modal.fullHeight || modal.height === '100%') {
|
|
16131
|
+
result.push('h-100');
|
|
16132
|
+
}
|
|
16133
|
+
if (modal.noModal) {
|
|
16134
|
+
result.push('ld-dialog-content--hidden');
|
|
16135
|
+
}
|
|
16136
|
+
return result;
|
|
16137
|
+
}
|
|
16138
|
+
modalWidth(modal) {
|
|
16139
|
+
this.$nextTick(() => {
|
|
16140
|
+
if (modal.expandable || modal.height) {
|
|
16141
|
+
if (!modal.el) {
|
|
16142
|
+
modal.el = document.querySelector(`.${this.uniqKey(modal)}`);
|
|
16143
|
+
}
|
|
16144
|
+
if (modal.el) {
|
|
16145
|
+
modal.el.style.height = String(this.modalHeight(modal));
|
|
16146
|
+
modal.el.style.borderRadius = 'var(--toolbar-border-radius)';
|
|
16147
|
+
modal.el.style.overflow = 'hidden';
|
|
16148
|
+
}
|
|
16149
|
+
}
|
|
16150
|
+
});
|
|
16151
|
+
if (modal.expandable) {
|
|
16152
|
+
return modal.expanded ? modal.expandedSize?.width : modal.collapsedSize?.width;
|
|
16153
|
+
}
|
|
16154
|
+
return modal.width ? modal.width : 'auto';
|
|
16155
|
+
}
|
|
16156
|
+
modalHeight(modal) {
|
|
16157
|
+
if (modal.expandable) {
|
|
16158
|
+
return modal.expanded ? modal.expandedSize?.height : modal.collapsedSize?.height;
|
|
16159
|
+
}
|
|
16160
|
+
return modal.height || 'auto';
|
|
16161
|
+
}
|
|
16162
|
+
modalTitle(modal) {
|
|
16163
|
+
if (modal.description instanceof Function) {
|
|
16164
|
+
return modal.description();
|
|
16165
|
+
}
|
|
16166
|
+
return modal.description || modal.title;
|
|
16167
|
+
}
|
|
16168
|
+
handleHide(modal) {
|
|
16169
|
+
if (!modal.resolved) {
|
|
16170
|
+
this.handleOk(modal);
|
|
16171
|
+
}
|
|
16172
|
+
}
|
|
16173
|
+
async handleOk(modal, settedResult) {
|
|
16174
|
+
let removeModal = true;
|
|
16175
|
+
try {
|
|
16176
|
+
switch (modal.type) {
|
|
16177
|
+
case ModalType.Info:
|
|
16178
|
+
if (modal.componentInstance && modal.componentInstance.onClose) {
|
|
16179
|
+
const canCloseModal = await modal.componentInstance.onClose();
|
|
16180
|
+
if (canCloseModal === false) {
|
|
16181
|
+
removeModal = false;
|
|
16182
|
+
return;
|
|
16183
|
+
}
|
|
16184
|
+
}
|
|
16185
|
+
break;
|
|
16186
|
+
case ModalType.Prompt:
|
|
16187
|
+
return modal.resolveFunction(modal.content);
|
|
16188
|
+
case ModalType.CreateEdit:
|
|
16189
|
+
if (modal.componentInstance && modal.componentInstance.save && !settedResult) {
|
|
16190
|
+
removeModal = false;
|
|
16191
|
+
modal.okLoading = true;
|
|
16192
|
+
let resultSave = modal.componentInstance.save.call(modal.componentInstance);
|
|
16193
|
+
if (resultSave instanceof Promise) {
|
|
16194
|
+
try {
|
|
16195
|
+
resultSave = await resultSave;
|
|
16196
|
+
if (resultSave) {
|
|
16197
|
+
this.modalResult = resultSave;
|
|
16198
|
+
}
|
|
16199
|
+
}
|
|
16200
|
+
catch (e) {
|
|
16201
|
+
/* eslint-disable no-console */
|
|
16202
|
+
console.error(e);
|
|
16203
|
+
}
|
|
16204
|
+
finally {
|
|
16205
|
+
modal.okLoading = false;
|
|
16206
|
+
}
|
|
16207
|
+
}
|
|
16208
|
+
else {
|
|
16209
|
+
modal.okLoading = false;
|
|
16210
|
+
this.modalResult = resultSave;
|
|
16211
|
+
}
|
|
16212
|
+
}
|
|
16213
|
+
break;
|
|
16214
|
+
}
|
|
16215
|
+
modal.show = false;
|
|
16216
|
+
if (modal.type !== ModalType.Select && modal.type !== ModalType.CreateEdit) {
|
|
16217
|
+
const okResult = this.$utils.isDefined(modal.okResult) ? modal.okResult : true;
|
|
16218
|
+
return modal.resolveFunction(okResult);
|
|
16219
|
+
}
|
|
16220
|
+
modal.resolveFunction(this.modalResult);
|
|
16221
|
+
this.modalResult = null;
|
|
16222
|
+
}
|
|
16223
|
+
finally {
|
|
16224
|
+
if (removeModal) {
|
|
16225
|
+
this.remove(modal);
|
|
16226
|
+
this.listenerMap.remove(modal);
|
|
16227
|
+
}
|
|
16228
|
+
}
|
|
16229
|
+
}
|
|
16230
|
+
async handleCancel(modal, fromCloseButton = false) {
|
|
16231
|
+
try {
|
|
16232
|
+
if ([ModalType.CreateEdit, ModalType.Info].includes(modal.type)) {
|
|
16233
|
+
if (modal.componentInstance && modal.componentInstance.onClose) {
|
|
16234
|
+
const canCloseModal = await modal.componentInstance.onClose();
|
|
16235
|
+
if (canCloseModal === false || modal.type === ModalType.CreateEdit) {
|
|
16236
|
+
return;
|
|
16237
|
+
}
|
|
16238
|
+
}
|
|
16239
|
+
let canUnload = false;
|
|
16240
|
+
let dialogText = 'Вы уверены, что хотите закрыть окно?';
|
|
16241
|
+
if (modal.isChanged instanceof Function) {
|
|
16242
|
+
canUnload = !modal.isChanged();
|
|
16243
|
+
}
|
|
16244
|
+
else {
|
|
16245
|
+
const event = new Event('beforeunload');
|
|
16246
|
+
event.modal = true;
|
|
16247
|
+
window.dispatchEvent(event);
|
|
16248
|
+
canUnload = 'canUnload' in event ? event.canUnload : true;
|
|
16249
|
+
dialogText = event.dialogText ?? dialogText;
|
|
16250
|
+
}
|
|
16251
|
+
if (!canUnload) {
|
|
16252
|
+
const confirm = await DialogManager.exec(new ConfirmDialog({
|
|
16253
|
+
title: 'Подтверждение',
|
|
16254
|
+
text: dialogText
|
|
16255
|
+
}));
|
|
16256
|
+
if (!confirm) {
|
|
16257
|
+
return;
|
|
16258
|
+
}
|
|
16259
|
+
}
|
|
16260
|
+
}
|
|
16261
|
+
modal.show = false;
|
|
16262
|
+
if (modal.type !== ModalType.Select) {
|
|
16263
|
+
const cancelResult = !fromCloseButton && modal.cancelResult != null ? modal.cancelResult : false;
|
|
16264
|
+
return modal.resolveFunction(cancelResult);
|
|
16265
|
+
}
|
|
16266
|
+
modal.resolveFunction(this.modalResult);
|
|
16267
|
+
this.modalResult = null;
|
|
16268
|
+
}
|
|
16269
|
+
finally {
|
|
16270
|
+
if (!modal.show) {
|
|
16271
|
+
this.remove(modal);
|
|
16272
|
+
this.listenerMap.remove(modal);
|
|
16273
|
+
dist.eventBus.$emit('modal-cancel');
|
|
16274
|
+
}
|
|
16275
|
+
}
|
|
16276
|
+
}
|
|
16277
|
+
async handleCancelAll() {
|
|
16278
|
+
const confirm = await DialogManager.exec(new ConfirmDialog({
|
|
16279
|
+
title: 'Подтверждение',
|
|
16280
|
+
text: 'Возможно, вами были внесены изменения. Вы уверены, что хотите закрыть все окна?'
|
|
16281
|
+
}));
|
|
16282
|
+
if (!confirm) {
|
|
16283
|
+
return;
|
|
16284
|
+
}
|
|
16285
|
+
this.closeAll(true);
|
|
16286
|
+
}
|
|
16287
|
+
onSetProps(props, host) {
|
|
16288
|
+
const found = this.findModal(host);
|
|
16289
|
+
if (found) {
|
|
16290
|
+
found.componentProps = {
|
|
16291
|
+
...found.componentProps,
|
|
16292
|
+
...props
|
|
16293
|
+
};
|
|
16294
|
+
found.loading = false;
|
|
16295
|
+
}
|
|
16296
|
+
}
|
|
16297
|
+
onSetResult(modal, result) {
|
|
16298
|
+
modal.okLoading = false;
|
|
16299
|
+
this.modalResult = result;
|
|
16300
|
+
if (result) {
|
|
16301
|
+
if (modal.selectAsOk || this.isCreateEditDialog(modal)) {
|
|
16302
|
+
return this.handleOk(modal, result);
|
|
16303
|
+
}
|
|
16304
|
+
if (Array.isArray(result)) {
|
|
16305
|
+
modal.okDisabled = result.length === 0;
|
|
16306
|
+
}
|
|
16307
|
+
else {
|
|
16308
|
+
modal.okDisabled = false;
|
|
16309
|
+
}
|
|
16310
|
+
}
|
|
16311
|
+
else {
|
|
16312
|
+
modal.okDisabled = true;
|
|
16313
|
+
}
|
|
16314
|
+
}
|
|
16315
|
+
onSetResultAndClose(modal, result) {
|
|
16316
|
+
this.modalResult = result;
|
|
16317
|
+
if (result) {
|
|
16318
|
+
modal.show = false;
|
|
16319
|
+
return this.handleOk(modal, result);
|
|
16320
|
+
}
|
|
16321
|
+
modal.okDisabled = true;
|
|
16322
|
+
}
|
|
16323
|
+
onExpandCollapse(modal) {
|
|
16324
|
+
this.resizingModalId = modal.id;
|
|
16325
|
+
if (window.requestAnimationFrame) {
|
|
16326
|
+
window.requestAnimationFrame(() => {
|
|
16327
|
+
modal.expanded = !modal.expanded;
|
|
16328
|
+
const prevNoModal = modal.noModal;
|
|
16329
|
+
modal.noModal = !modal.expanded;
|
|
16330
|
+
window.requestAnimationFrame(() => {
|
|
16331
|
+
if (modal.noModal !== prevNoModal) {
|
|
16332
|
+
this.dialogManager.dialogModalChanged(modal);
|
|
16333
|
+
}
|
|
16334
|
+
setTimeout(() => {
|
|
16335
|
+
this.resizingModalId = null;
|
|
16336
|
+
}, 400);
|
|
16337
|
+
});
|
|
16338
|
+
});
|
|
16339
|
+
}
|
|
16340
|
+
}
|
|
16341
|
+
onMinimize(modal) {
|
|
16342
|
+
modal.minimized = !modal.minimized;
|
|
16343
|
+
this.dialogManager.dialogMinimizeChanged(modal);
|
|
16344
|
+
dist.eventBus.$emit('on-minimize', modal.minimized);
|
|
16345
|
+
}
|
|
16346
|
+
onActivate(modal) {
|
|
16347
|
+
modal.processingDescription = null;
|
|
16348
|
+
this.dialogManager.activate(modal);
|
|
16349
|
+
}
|
|
16350
|
+
onProcessing(modal, message) {
|
|
16351
|
+
if (message) {
|
|
16352
|
+
modal.processingDescription = message;
|
|
16353
|
+
}
|
|
16354
|
+
this.dialogManager.dialogProcessing(modal);
|
|
16355
|
+
}
|
|
16356
|
+
remove(modal) {
|
|
16357
|
+
modal.resolved = true;
|
|
16358
|
+
this.$nextTick(() => {
|
|
16359
|
+
const i = this.modals.indexOf(modal);
|
|
16360
|
+
if (i > -1) {
|
|
16361
|
+
this.modals.splice(i, 1);
|
|
16362
|
+
this.dialogManager.dialogClosed(modal);
|
|
16363
|
+
}
|
|
16364
|
+
});
|
|
16365
|
+
;
|
|
16366
|
+
}
|
|
16367
|
+
isAlertDialog(modal) {
|
|
16368
|
+
return modal.type === ModalType.Alert;
|
|
16369
|
+
}
|
|
16370
|
+
isPromptDialog(modal) {
|
|
16371
|
+
return modal.type === ModalType.Prompt;
|
|
16372
|
+
}
|
|
16373
|
+
isConfirmDialog(modal) {
|
|
16374
|
+
return modal.type === ModalType.Confirm;
|
|
16375
|
+
}
|
|
16376
|
+
isInfoDialog(modal) {
|
|
16377
|
+
return modal.type === ModalType.Info;
|
|
16378
|
+
}
|
|
16379
|
+
isSelectDialog(modal) {
|
|
16380
|
+
return modal.type === ModalType.Select;
|
|
16381
|
+
}
|
|
16382
|
+
isCreateEditDialog(modal) {
|
|
16383
|
+
return modal.type === ModalType.CreateEdit;
|
|
16384
|
+
}
|
|
16385
|
+
isExpanded(modal) {
|
|
16386
|
+
if (!modal.expandable) {
|
|
16387
|
+
return false;
|
|
16388
|
+
}
|
|
16389
|
+
return modal.expanded;
|
|
16390
|
+
}
|
|
16391
|
+
isCollapsed(modal) {
|
|
16392
|
+
if (!modal.expandable) {
|
|
16393
|
+
return false;
|
|
16394
|
+
}
|
|
16395
|
+
return !modal.expanded;
|
|
16396
|
+
}
|
|
16397
|
+
setVisibility(id) {
|
|
16398
|
+
if (!this.resizingModalId) {
|
|
16399
|
+
return 'visible';
|
|
16400
|
+
}
|
|
16401
|
+
if (id === this.resizingModalId) {
|
|
16402
|
+
return 'hidden';
|
|
16403
|
+
}
|
|
16404
|
+
return 'visible';
|
|
16405
|
+
}
|
|
16406
|
+
okButtonText(modal) {
|
|
16407
|
+
if (modal.okTitle) {
|
|
16408
|
+
return modal.okTitle;
|
|
16409
|
+
}
|
|
16410
|
+
switch (modal.type) {
|
|
16411
|
+
case ModalType.Select:
|
|
16412
|
+
return 'Выбрать';
|
|
16413
|
+
case ModalType.Confirm:
|
|
16414
|
+
return 'Да';
|
|
16415
|
+
case ModalType.Info:
|
|
16416
|
+
return 'Закрыть';
|
|
16417
|
+
case ModalType.CreateEdit:
|
|
16418
|
+
return 'Сохранить';
|
|
16419
|
+
default:
|
|
16420
|
+
return 'Ок';
|
|
16421
|
+
}
|
|
16422
|
+
}
|
|
16423
|
+
cancelButtonText(modal) {
|
|
16424
|
+
if (modal.cancelTitle) {
|
|
16425
|
+
return modal.cancelTitle;
|
|
16426
|
+
}
|
|
16427
|
+
if (modal.type === ModalType.Confirm) {
|
|
16428
|
+
return 'Нет';
|
|
16429
|
+
}
|
|
16430
|
+
return 'Отменить';
|
|
16431
|
+
}
|
|
16432
|
+
onComponentInstanceCreated(modal, instance) {
|
|
16433
|
+
modal.componentInstance = instance;
|
|
16434
|
+
}
|
|
16435
|
+
dialogBindings(modal) {
|
|
16436
|
+
if (this.isMobileGlobal) {
|
|
16437
|
+
return {
|
|
16438
|
+
fullscreen: this.isSelectDialog(modal) || this.isCreateEditDialog(modal),
|
|
16439
|
+
fullWidth: true,
|
|
16440
|
+
transition: 'dialog-bottom-transition'
|
|
16441
|
+
};
|
|
16442
|
+
}
|
|
16443
|
+
return {
|
|
16444
|
+
width: this.modalWidth(modal),
|
|
16445
|
+
minWidth: '320',
|
|
16446
|
+
};
|
|
16447
|
+
}
|
|
16448
|
+
cardClasses(modal) {
|
|
16449
|
+
const result = ['card'];
|
|
16450
|
+
if (this.isMobileGlobal) {
|
|
16451
|
+
result.push('card--mobile');
|
|
16452
|
+
}
|
|
16453
|
+
if (!this.isSelectDialog(modal) && !this.isCreateEditDialog(modal)) {
|
|
16454
|
+
result.push(this.isMobileGlobal ? 'not-select-dialog' : 'card--simple');
|
|
16455
|
+
}
|
|
16456
|
+
return result;
|
|
16457
|
+
}
|
|
16458
|
+
isTitleDark(modal) {
|
|
16459
|
+
if (this.isMobileGlobal) {
|
|
16460
|
+
return this.isSelectDialog(modal) || this.isCreateEditDialog(modal);
|
|
16461
|
+
}
|
|
16462
|
+
return modal.darkTitle;
|
|
16463
|
+
}
|
|
16464
|
+
uniqKey(modal) {
|
|
16465
|
+
return `dlg-${modal.id}`;
|
|
16466
|
+
}
|
|
16467
|
+
findModal(host) {
|
|
16468
|
+
return this.modals.find(m => this.dialogManager.modalIdentity(m, host));
|
|
16469
|
+
}
|
|
16470
|
+
closeAll(all = false) {
|
|
16471
|
+
this.modals.forEach(modal => {
|
|
16472
|
+
if (all || !modal.noModal) {
|
|
16473
|
+
this.remove(modal);
|
|
16474
|
+
}
|
|
16475
|
+
});
|
|
16476
|
+
}
|
|
16477
|
+
get listenerMap() {
|
|
16478
|
+
let lastId = null;
|
|
16479
|
+
function set(modal, handler) {
|
|
16480
|
+
handler = handler.bind(this);
|
|
16481
|
+
lastId = modal.id;
|
|
16482
|
+
this.listeners.set(modal, handler);
|
|
16483
|
+
window.addEventListener('keydown', handler);
|
|
16484
|
+
}
|
|
16485
|
+
function remove(modal) {
|
|
16486
|
+
const m = this.modals.find(item => item.id === modal.id);
|
|
16487
|
+
const handler = this.listeners.get(m);
|
|
16488
|
+
window.removeEventListener('keydown', handler);
|
|
16489
|
+
this.listeners.delete(m);
|
|
16490
|
+
}
|
|
16491
|
+
function isLast(modal) {
|
|
16492
|
+
return modal.id === lastId;
|
|
16493
|
+
}
|
|
16494
|
+
return {
|
|
16495
|
+
set: set.bind(this),
|
|
16496
|
+
remove: remove.bind(this),
|
|
16497
|
+
isLast,
|
|
16498
|
+
};
|
|
16499
|
+
}
|
|
16500
|
+
};
|
|
16501
|
+
ld_dialogvue_type_script_lang_ts_external_decorate([
|
|
16502
|
+
Emit('modal-in-focus'),
|
|
16503
|
+
ld_dialogvue_type_script_lang_ts_external_metadata("design:type", Function),
|
|
16504
|
+
ld_dialogvue_type_script_lang_ts_external_metadata("design:paramtypes", [Boolean]),
|
|
16505
|
+
ld_dialogvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
16506
|
+
], DialogComponent.prototype, "emitFocus", null);
|
|
16507
|
+
ld_dialogvue_type_script_lang_ts_external_decorate([
|
|
16508
|
+
(0,external_vue_property_decorator_.Watch)('modals', { deep: true }),
|
|
16509
|
+
ld_dialogvue_type_script_lang_ts_external_metadata("design:type", Function),
|
|
16510
|
+
ld_dialogvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
|
|
16511
|
+
ld_dialogvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
|
|
16512
|
+
], DialogComponent.prototype, "onModalsChanged", null);
|
|
16513
|
+
DialogComponent = ld_dialogvue_type_script_lang_ts_external_decorate([
|
|
16514
|
+
(0,external_vue_class_component_.Options)({
|
|
16515
|
+
components: {
|
|
16516
|
+
minimized: dialog_minimized
|
|
16517
|
+
}
|
|
16518
|
+
})
|
|
16519
|
+
], DialogComponent);
|
|
16520
|
+
/* harmony default export */ const ld_dialogvue_type_script_lang_ts_external = (DialogComponent);
|
|
14924
16521
|
|
|
14925
|
-
;// CONCATENATED MODULE: ./src/
|
|
14926
|
-
|
|
14927
|
-
|
|
14928
|
-
/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\\[\]{};:'".,<>?«»“”‘’]))/i;
|
|
16522
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/ld-dialog.ts?vue&type=script&lang=ts&external
|
|
16523
|
+
|
|
16524
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/ld-dialog.vue
|
|
14929
16525
|
|
|
14930
|
-
|
|
14931
|
-
|
|
14932
|
-
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
16526
|
+
|
|
16527
|
+
|
|
16528
|
+
|
|
16529
|
+
;
|
|
16530
|
+
const ld_dialog_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_dialogvue_type_script_lang_ts_external, [['render',ld_dialogvue_type_template_id_184339ee_ts_true_render]])
|
|
16531
|
+
|
|
16532
|
+
/* harmony default export */ const ld_dialog = (ld_dialog_exports_);
|
|
16533
|
+
;// CONCATENATED MODULE: ./src/ld-dialog/index.ts
|
|
14937
16534
|
|
|
16535
|
+
function ld_dialog_reg(vue, options) {
|
|
16536
|
+
vue.component(options.aliases['ld-dialog'], ld_dialog);
|
|
16537
|
+
}
|
|
16538
|
+
/* harmony default export */ const src_ld_dialog = (ld_dialog_reg);
|
|
16539
|
+
|
|
16540
|
+
// EXTERNAL MODULE: external "vue-toastification"
|
|
16541
|
+
var external_vue_toastification_ = __webpack_require__(7982);
|
|
16542
|
+
var external_vue_toastification_default = /*#__PURE__*/__webpack_require__.n(external_vue_toastification_);
|
|
16543
|
+
;// CONCATENATED MODULE: ./src/vuetify.ts
|
|
16544
|
+
const aliases = {
|
|
16545
|
+
SmallButton: 'VBtn',
|
|
16546
|
+
SquareButton: 'VBtn',
|
|
16547
|
+
SmallChip: 'VChip',
|
|
16548
|
+
SmallBadge: 'VChip',
|
|
16549
|
+
};
|
|
16550
|
+
const defaults = {
|
|
16551
|
+
global: {
|
|
16552
|
+
ripple: false,
|
|
16553
|
+
density: 'compact',
|
|
16554
|
+
},
|
|
16555
|
+
SmallButton: {
|
|
16556
|
+
variant: 'flat',
|
|
16557
|
+
color: 'primary',
|
|
16558
|
+
class: 'small-button',
|
|
16559
|
+
},
|
|
16560
|
+
SquareButton: {
|
|
16561
|
+
variant: 'text',
|
|
16562
|
+
color: 'grey',
|
|
16563
|
+
class: 'square-sm-button',
|
|
16564
|
+
},
|
|
16565
|
+
SmallChip: {
|
|
16566
|
+
variant: 'outlined',
|
|
16567
|
+
color: 'primary',
|
|
16568
|
+
closable: true,
|
|
16569
|
+
closeIcon: 'close',
|
|
16570
|
+
class: 'small-chip',
|
|
16571
|
+
},
|
|
16572
|
+
SmallBadge: {
|
|
16573
|
+
class: 'v-chip--badge',
|
|
16574
|
+
variant: 'outlined',
|
|
16575
|
+
},
|
|
16576
|
+
VToolbar: {
|
|
16577
|
+
height: 60,
|
|
16578
|
+
density: 'default',
|
|
16579
|
+
},
|
|
16580
|
+
};
|
|
16581
|
+
function getAliases(components) {
|
|
16582
|
+
const result = {};
|
|
16583
|
+
for (const key in aliases) {
|
|
16584
|
+
result[key] = components[aliases[key]];
|
|
16585
|
+
}
|
|
16586
|
+
return result;
|
|
16587
|
+
}
|
|
14938
16588
|
|
|
14939
16589
|
|
|
16590
|
+
;// CONCATENATED MODULE: ./src/directives/active.directive.ts
|
|
16591
|
+
const ActiveDirectiveOptions = {
|
|
16592
|
+
beforeMount(el, binding) {
|
|
16593
|
+
const className = '--active';
|
|
16594
|
+
const value = binding.value;
|
|
16595
|
+
el.classList[value ? 'add' : 'remove'](className);
|
|
16596
|
+
},
|
|
16597
|
+
updated(el, binding) {
|
|
16598
|
+
const className = '--active';
|
|
16599
|
+
const value = binding.value;
|
|
16600
|
+
el.classList[value ? 'add' : 'remove'](className);
|
|
16601
|
+
},
|
|
16602
|
+
};
|
|
16603
|
+
|
|
14940
16604
|
;// CONCATENATED MODULE: ./src/mixins/validate.mixin.ts
|
|
14941
16605
|
var validate_mixin_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
|
|
14942
16606
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
@@ -15171,67 +16835,6 @@ validate_mixin_decorate([
|
|
|
15171
16835
|
], ValidateMixin.prototype, "onErrorBagChanged", null);
|
|
15172
16836
|
const ValidateMixinOptions = mixin;
|
|
15173
16837
|
|
|
15174
|
-
;// CONCATENATED MODULE: ./src/vuetify.ts
|
|
15175
|
-
const aliases = {
|
|
15176
|
-
SmallButton: 'VBtn',
|
|
15177
|
-
SquareButton: 'VBtn',
|
|
15178
|
-
SmallChip: 'VChip',
|
|
15179
|
-
SmallBadge: 'VChip',
|
|
15180
|
-
};
|
|
15181
|
-
const defaults = {
|
|
15182
|
-
global: {
|
|
15183
|
-
ripple: false,
|
|
15184
|
-
density: 'compact',
|
|
15185
|
-
},
|
|
15186
|
-
SmallButton: {
|
|
15187
|
-
variant: 'flat',
|
|
15188
|
-
color: 'primary',
|
|
15189
|
-
class: 'small-button',
|
|
15190
|
-
},
|
|
15191
|
-
SquareButton: {
|
|
15192
|
-
variant: 'text',
|
|
15193
|
-
color: 'grey',
|
|
15194
|
-
class: 'square-sm-button',
|
|
15195
|
-
},
|
|
15196
|
-
SmallChip: {
|
|
15197
|
-
variant: 'outlined',
|
|
15198
|
-
color: 'primary',
|
|
15199
|
-
closable: true,
|
|
15200
|
-
closeIcon: 'close',
|
|
15201
|
-
class: 'small-chip',
|
|
15202
|
-
},
|
|
15203
|
-
SmallBadge: {
|
|
15204
|
-
class: 'v-chip--badge',
|
|
15205
|
-
variant: 'outlined',
|
|
15206
|
-
},
|
|
15207
|
-
VToolbar: {
|
|
15208
|
-
height: 60,
|
|
15209
|
-
density: 'default',
|
|
15210
|
-
},
|
|
15211
|
-
};
|
|
15212
|
-
function getAliases(components) {
|
|
15213
|
-
const result = {};
|
|
15214
|
-
for (const key in aliases) {
|
|
15215
|
-
result[key] = components[aliases[key]];
|
|
15216
|
-
}
|
|
15217
|
-
return result;
|
|
15218
|
-
}
|
|
15219
|
-
|
|
15220
|
-
|
|
15221
|
-
;// CONCATENATED MODULE: ./src/directives/active.directive.ts
|
|
15222
|
-
const ActiveDirectiveOptions = {
|
|
15223
|
-
beforeMount(el, binding) {
|
|
15224
|
-
const className = '--active';
|
|
15225
|
-
const value = binding.value;
|
|
15226
|
-
el.classList[value ? 'add' : 'remove'](className);
|
|
15227
|
-
},
|
|
15228
|
-
updated(el, binding) {
|
|
15229
|
-
const className = '--active';
|
|
15230
|
-
const value = binding.value;
|
|
15231
|
-
el.classList[value ? 'add' : 'remove'](className);
|
|
15232
|
-
},
|
|
15233
|
-
};
|
|
15234
|
-
|
|
15235
16838
|
;// CONCATENATED MODULE: ./src/index.ts
|
|
15236
16839
|
|
|
15237
16840
|
|
|
@@ -15292,6 +16895,7 @@ const ldmuiPlugin = {
|
|
|
15292
16895
|
'ld-edit-masked-text': options.aliases?.['ld-edit-masked-text'] ?? 'ld-edit-masked-text',
|
|
15293
16896
|
'ld-text-markup': options.aliases?.['ld-text-markup'] ?? 'ld-text-markup',
|
|
15294
16897
|
'ld-switch': options.aliases?.['ld-switch'] ?? 'ld-switch',
|
|
16898
|
+
'ld-dialog': options.aliases?.['ld-dialog'] ?? 'ld-dialog',
|
|
15295
16899
|
};
|
|
15296
16900
|
vue.config.globalProperties.$utils = {
|
|
15297
16901
|
...src_utils_namespaceObject,
|
|
@@ -15341,11 +16945,17 @@ const ldmuiPlugin = {
|
|
|
15341
16945
|
src_ld_edit_masked_text(vue, options);
|
|
15342
16946
|
src_ld_text_markup(vue, options);
|
|
15343
16947
|
src_ld_switch(vue, options);
|
|
16948
|
+
src_ld_dialog(vue, options);
|
|
15344
16949
|
},
|
|
15345
16950
|
};
|
|
15346
16951
|
/* harmony default export */ const src = (ldmuiPlugin);
|
|
15347
16952
|
|
|
15348
16953
|
|
|
16954
|
+
|
|
16955
|
+
|
|
16956
|
+
|
|
16957
|
+
|
|
16958
|
+
})();
|
|
15349
16959
|
|
|
15350
16960
|
/******/ return __webpack_exports__;
|
|
15351
16961
|
/******/ })()
|