@ldmjs/ui 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/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 Symbol = _root.Symbol;
1070
+ var src_Symbol = _root.Symbol;
1038
1071
 
1039
- /* harmony default export */ const _Symbol = (Symbol);
1072
+ /* harmony default export */ const _Symbol = (src_Symbol);
1040
1073
 
1041
1074
  ;// CONCATENATED MODULE: ./node_modules/lodash-es/_getRawTag.js
1042
1075
 
@@ -1860,22 +1893,22 @@ function ld_breadcrumbs_reg(vue, options) {
1860
1893
  }
1861
1894
  /* harmony default export */ const src_ld_breadcrumbs = (ld_breadcrumbs_reg);
1862
1895
 
1863
- ;// 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-edit-text/ld-edit-text.vue?vue&type=template&id=3f17f967&scoped=true&ts=true
1896
+ ;// 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-edit-text/ld-edit-text.vue?vue&type=template&id=3a89856c&scoped=true&ts=true
1864
1897
 
1865
- const ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_withScopeId = n => ((0,external_vue_.pushScopeId)("data-v-3f17f967"), n = n(), (0,external_vue_.popScopeId)(), n);
1866
- const ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_1 = { class: "ld-edit-text" };
1867
- const ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_2 = { key: 0 };
1868
- const ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_3 = /*#__PURE__*/ ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_withScopeId(() => /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Показать пароль", -1));
1869
- const ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_4 = {
1898
+ const ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_withScopeId = n => ((0,external_vue_.pushScopeId)("data-v-3a89856c"), n = n(), (0,external_vue_.popScopeId)(), n);
1899
+ const ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_1 = { class: "ld-edit-text" };
1900
+ const ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_2 = { key: 0 };
1901
+ const ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_3 = /*#__PURE__*/ ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_withScopeId(() => /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Показать пароль", -1));
1902
+ const ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_4 = {
1870
1903
  key: 1,
1871
1904
  class: "d-flex w-100 flex-column",
1872
1905
  style: { "position": "relative", "flex-wrap": "wrap" }
1873
1906
  };
1874
- const ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_5 = {
1907
+ const ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_5 = {
1875
1908
  key: 0,
1876
1909
  class: "input-class__suffix"
1877
1910
  };
1878
- const ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_6 = {
1911
+ const ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_6 = {
1879
1912
  key: 1,
1880
1913
  class: "v-input__details"
1881
1914
  };
@@ -1887,7 +1920,7 @@ const _hoisted_8 = {
1887
1920
  key: 1,
1888
1921
  class: "grey--text"
1889
1922
  };
1890
- function ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
1923
+ function ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
1891
1924
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
1892
1925
  const _component_ld_icon = (0,external_vue_.resolveComponent)("ld-icon");
1893
1926
  const _component_square_button = (0,external_vue_.resolveComponent)("square-button");
@@ -1896,7 +1929,7 @@ function ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_render(_c
1896
1929
  const _component_imask_input = (0,external_vue_.resolveComponent)("imask-input");
1897
1930
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
1898
1931
  const _component_v_row = (0,external_vue_.resolveComponent)("v-row");
1899
- return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_1, [
1932
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_1, [
1900
1933
  (0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
1901
1934
  default: (0,external_vue_.withCtx)(() => [
1902
1935
  (_ctx.label)
@@ -1986,7 +2019,10 @@ function ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_render(_c
1986
2019
  (_ctx.type === 'password')
1987
2020
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_tooltip, { key: 1 }, {
1988
2021
  activator: (0,external_vue_.withCtx)(({ props }) => [
1989
- (0,external_vue_.createVNode)(_component_square_button, (0,external_vue_.mergeProps)({ tabindex: "1" }, props, {
2022
+ (0,external_vue_.createVNode)(_component_square_button, (0,external_vue_.mergeProps)({
2023
+ id: "pswd-toggle",
2024
+ tabindex: "1"
2025
+ }, props, {
1990
2026
  icon: "",
1991
2027
  color: "grey",
1992
2028
  onClick: _ctx.passwordVisibilityToggle
@@ -2012,10 +2048,10 @@ function ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_render(_c
2012
2048
  default: (0,external_vue_.withCtx)(() => [
2013
2049
  (0,external_vue_.createTextVNode)(),
2014
2050
  (_ctx.passwordVisible)
2015
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_2, "Скрыть пароль"))
2051
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("span", ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_2, "Скрыть пароль"))
2016
2052
  : (0,external_vue_.createCommentVNode)("", true),
2017
2053
  (0,external_vue_.createTextVNode)(),
2018
- ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_3
2054
+ ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_3
2019
2055
  ]),
2020
2056
  _: 1
2021
2057
  }))
@@ -2025,7 +2061,7 @@ function ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_render(_c
2025
2061
  }
2026
2062
  : undefined
2027
2063
  ]), 1032, ["model-value", "type", "class", "persistent-hint", "rules", "validation-value", "placeholder", "disabled", "readonly", "hint", "mask", "tabindex", "maxlength", "autofocus", "hide-details", "prefix", "suffix", "clearable", "error", "error-messages", "prepend-inner-icon", "autocomplete", "onChange", "onUpdate:modelValue", "onBlur", "onFocus", "onClick", "onKeydown", "onCopy"]))
2028
- : ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_4, [
2064
+ : ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_4, [
2029
2065
  (0,external_vue_.createVNode)(_component_imask_input, {
2030
2066
  ref: "maskInput",
2031
2067
  value: _ctx.value,
@@ -2048,11 +2084,11 @@ function ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_render(_c
2048
2084
  }, null, 8, ["value", "maxlength", "scale", "signed", "min", "max", "disabled", "tabindex", "class", "placeholder", "onBlur", "onClick", "onFocus"]),
2049
2085
  (0,external_vue_.createTextVNode)(),
2050
2086
  (_ctx.suffix)
2051
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_5, (0,external_vue_.toDisplayString)(_ctx.suffix), 1))
2087
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_5, (0,external_vue_.toDisplayString)(_ctx.suffix), 1))
2052
2088
  : (0,external_vue_.createCommentVNode)("", true),
2053
2089
  (0,external_vue_.createTextVNode)(),
2054
2090
  (!_ctx.hideDetails)
2055
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_hoisted_6, [
2091
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_hoisted_6, [
2056
2092
  (0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
2057
2093
  default: (0,external_vue_.withCtx)(() => [
2058
2094
  (_ctx.showError)
@@ -2075,7 +2111,7 @@ function ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_render(_c
2075
2111
  ]));
2076
2112
  }
2077
2113
 
2078
- ;// CONCATENATED MODULE: ./src/ld-edit-text/ld-edit-text.vue?vue&type=template&id=3f17f967&scoped=true&ts=true
2114
+ ;// CONCATENATED MODULE: ./src/ld-edit-text/ld-edit-text.vue?vue&type=template&id=3a89856c&scoped=true&ts=true
2079
2115
 
2080
2116
  ;// CONCATENATED MODULE: ./src/decorators/emit.decorator.ts
2081
2117
 
@@ -2647,7 +2683,11 @@ var ld_edit_textvue_type_script_lang_ts_external_a, ld_edit_textvue_type_script_
2647
2683
  let EditTextComponent = class EditTextComponent extends (0,external_vue_class_component_.mixins)(ValidatableMixin, GridMixin, InputMixin) {
2648
2684
  constructor() {
2649
2685
  super(...arguments);
2650
- this.value = '-1'; // используется для числового ввода (onlyNumbers = true), string из-за требований imask-input (он ждёт строку)
2686
+ /**
2687
+ * используется для числового ввода (onlyNumbers = true),
2688
+ * string из-за требований imask-input (он ждёт строку)
2689
+ */
2690
+ this.value = '-1';
2651
2691
  this.debouncedFunc = null;
2652
2692
  this.savedModelValue = '';
2653
2693
  this.passwordVisible = false;
@@ -2691,6 +2731,16 @@ let EditTextComponent = class EditTextComponent extends (0,external_vue_class_co
2691
2731
  this.validate();
2692
2732
  }
2693
2733
  }
2734
+ onValueChanged(newVal) {
2735
+ if (newVal === '') {
2736
+ return;
2737
+ }
2738
+ const emitData = this.$utils.isDefined(newVal) ? Number(newVal) : null;
2739
+ if (this.nonZero && emitData === 0) {
2740
+ this.value = null;
2741
+ }
2742
+ this.emitUpdateModelValue(emitData);
2743
+ }
2694
2744
  onlyNumbersChange(newVal) {
2695
2745
  if (newVal) {
2696
2746
  if (!this.modelValue) {
@@ -2705,16 +2755,6 @@ let EditTextComponent = class EditTextComponent extends (0,external_vue_class_co
2705
2755
  this.form?.unregister(this, null);
2706
2756
  }
2707
2757
  }
2708
- onValueChanged(newVal) {
2709
- if (newVal === '') {
2710
- return;
2711
- }
2712
- const emitData = this.$utils.isDefined(newVal) ? Number(newVal) : null;
2713
- if (this.nonZero && emitData === 0) {
2714
- this.value = null;
2715
- }
2716
- this.emitUpdateModelValue(emitData);
2717
- }
2718
2758
  onDebouncedChanged() {
2719
2759
  if (this.debounced && !this.debouncedFunc) {
2720
2760
  this.debouncedFunc = lodash_es_debounce((value) => this.emitUpdateModelValue(value), this.debounced);
@@ -2727,6 +2767,9 @@ let EditTextComponent = class EditTextComponent extends (0,external_vue_class_co
2727
2767
  if (this.debounced) {
2728
2768
  this.debouncedFunc = lodash_es_debounce((value) => this.emitUpdateModelValue(value), this.debounced);
2729
2769
  }
2770
+ if (this.modelValue) {
2771
+ this.onUpdateModelValue(String(this.modelValue));
2772
+ }
2730
2773
  }
2731
2774
  unmounted() {
2732
2775
  if (this.form) {
@@ -2735,7 +2778,7 @@ let EditTextComponent = class EditTextComponent extends (0,external_vue_class_co
2735
2778
  }
2736
2779
  onBlur(e) {
2737
2780
  this.emitBlur(e);
2738
- if (this.value === '') {
2781
+ if (this.onlyNumbers && this.value === '') {
2739
2782
  this.value = '0';
2740
2783
  }
2741
2784
  this.validate();
@@ -2769,6 +2812,9 @@ let EditTextComponent = class EditTextComponent extends (0,external_vue_class_co
2769
2812
  .map(i => '•')
2770
2813
  .join('');
2771
2814
  }
2815
+ else {
2816
+ this.savedModelValue = value;
2817
+ }
2772
2818
  if (this.debounced) {
2773
2819
  this.debouncedFunc(value);
2774
2820
  }
@@ -2950,18 +2996,18 @@ ld_edit_textvue_type_script_lang_ts_external_decorate([
2950
2996
  ld_edit_textvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
2951
2997
  ld_edit_textvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
2952
2998
  ], EditTextComponent.prototype, "onTextChanged", null);
2953
- ld_edit_textvue_type_script_lang_ts_external_decorate([
2954
- (0,external_vue_property_decorator_.Watch)('onlyNumbers', { immediate: true }),
2955
- ld_edit_textvue_type_script_lang_ts_external_metadata("design:type", Function),
2956
- ld_edit_textvue_type_script_lang_ts_external_metadata("design:paramtypes", [Boolean]),
2957
- ld_edit_textvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
2958
- ], EditTextComponent.prototype, "onlyNumbersChange", null);
2959
2999
  ld_edit_textvue_type_script_lang_ts_external_decorate([
2960
3000
  (0,external_vue_property_decorator_.Watch)('value'),
2961
3001
  ld_edit_textvue_type_script_lang_ts_external_metadata("design:type", Function),
2962
3002
  ld_edit_textvue_type_script_lang_ts_external_metadata("design:paramtypes", [String]),
2963
3003
  ld_edit_textvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
2964
3004
  ], EditTextComponent.prototype, "onValueChanged", null);
3005
+ ld_edit_textvue_type_script_lang_ts_external_decorate([
3006
+ (0,external_vue_property_decorator_.Watch)('onlyNumbers', { immediate: true }),
3007
+ ld_edit_textvue_type_script_lang_ts_external_metadata("design:type", Function),
3008
+ ld_edit_textvue_type_script_lang_ts_external_metadata("design:paramtypes", [Boolean]),
3009
+ ld_edit_textvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
3010
+ ], EditTextComponent.prototype, "onlyNumbersChange", null);
2965
3011
  ld_edit_textvue_type_script_lang_ts_external_decorate([
2966
3012
  (0,external_vue_property_decorator_.Watch)('debounced'),
2967
3013
  ld_edit_textvue_type_script_lang_ts_external_metadata("design:type", Function),
@@ -2988,7 +3034,7 @@ EditTextComponent = ld_edit_textvue_type_script_lang_ts_external_decorate([
2988
3034
  ;
2989
3035
 
2990
3036
 
2991
- const ld_edit_text_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_edit_textvue_type_script_lang_ts_external, [['render',ld_edit_textvue_type_template_id_3f17f967_scoped_true_ts_true_render],['__scopeId',"data-v-3f17f967"]])
3037
+ const ld_edit_text_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_edit_textvue_type_script_lang_ts_external, [['render',ld_edit_textvue_type_template_id_3a89856c_scoped_true_ts_true_render],['__scopeId',"data-v-3a89856c"]])
2992
3038
 
2993
3039
  /* harmony default export */ const ld_edit_text = (ld_edit_text_exports_);
2994
3040
  ;// CONCATENATED MODULE: ./src/ld-edit-text/index.ts
@@ -9173,9 +9219,9 @@ function getNative(object, key) {
9173
9219
 
9174
9220
 
9175
9221
  /* Built-in method references that are verified to be native. */
9176
- var Map = _getNative(_root, 'Map');
9222
+ var _Map_Map = _getNative(_root, 'Map');
9177
9223
 
9178
- /* harmony default export */ const _Map = (Map);
9224
+ /* harmony default export */ const _Map = (_Map_Map);
9179
9225
 
9180
9226
  ;// CONCATENATED MODULE: ./node_modules/lodash-es/_nativeCreate.js
9181
9227
 
@@ -11400,15 +11446,16 @@ function ld_select_list_box_reg(vue, options) {
11400
11446
  }
11401
11447
  /* harmony default export */ const src_ld_select_list_box = (ld_select_list_box_reg);
11402
11448
 
11403
- ;// 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-checkbox/ld-checkbox.vue?vue&type=template&id=4cf873fa&ts=true
11449
+ ;// 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-checkbox/ld-checkbox.vue?vue&type=template&id=26c765c2&ts=true
11404
11450
 
11405
- const ld_checkboxvue_type_template_id_4cf873fa_ts_true_hoisted_1 = { class: "ld-checkbox" };
11406
- const ld_checkboxvue_type_template_id_4cf873fa_ts_true_hoisted_2 = { class: "d-flex align-center" };
11407
- const ld_checkboxvue_type_template_id_4cf873fa_ts_true_hoisted_3 = ["checked", "data-testid", "tabindex", "disabled"];
11408
- function ld_checkboxvue_type_template_id_4cf873fa_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
11451
+ const ld_checkboxvue_type_template_id_26c765c2_ts_true_hoisted_1 = { class: "d-flex align-center" };
11452
+ const ld_checkboxvue_type_template_id_26c765c2_ts_true_hoisted_2 = ["checked", "data-testid", "tabindex", "disabled"];
11453
+ function ld_checkboxvue_type_template_id_26c765c2_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
11409
11454
  const _component_v_tooltip = (0,external_vue_.resolveComponent)("v-tooltip");
11410
11455
  const _component_v_icon = (0,external_vue_.resolveComponent)("v-icon");
11411
- return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_checkboxvue_type_template_id_4cf873fa_ts_true_hoisted_1, [
11456
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
11457
+ class: (0,external_vue_.normalizeClass)(["ld-checkbox", { 'ld-checkbox--focused': _ctx.isFocused }])
11458
+ }, [
11412
11459
  (_ctx.label && _ctx.labelOnLeft)
11413
11460
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
11414
11461
  key: 0,
@@ -11439,19 +11486,24 @@ function ld_checkboxvue_type_template_id_4cf873fa_ts_true_render(_ctx, _cache, $
11439
11486
  ]))
11440
11487
  : (0,external_vue_.createCommentVNode)("", true),
11441
11488
  (0,external_vue_.createTextVNode)(),
11442
- (0,external_vue_.createElementVNode)("label", ld_checkboxvue_type_template_id_4cf873fa_ts_true_hoisted_2, [
11489
+ (0,external_vue_.createElementVNode)("label", ld_checkboxvue_type_template_id_26c765c2_ts_true_hoisted_1, [
11443
11490
  (0,external_vue_.createElementVNode)("input", {
11444
11491
  ref: "checkbox",
11445
11492
  type: "checkbox",
11446
- class: "d-none",
11447
11493
  checked: _ctx.internalValue,
11448
11494
  "data-testid": _ctx.dataTestid,
11449
11495
  tabindex: _ctx.tabIndex,
11450
11496
  disabled: _ctx.disabled,
11451
- onInput: _cache[1] || (_cache[1] =
11497
+ onFocus: _cache[1] || (_cache[1] =
11498
+ //@ts-ignore
11499
+ (...args) => (_ctx.onFocus && _ctx.onFocus(...args))),
11500
+ onBlur: _cache[2] || (_cache[2] =
11501
+ //@ts-ignore
11502
+ (...args) => (_ctx.onBlur && _ctx.onBlur(...args))),
11503
+ onInput: _cache[3] || (_cache[3] =
11452
11504
  //@ts-ignore
11453
11505
  (...args) => (_ctx.onChange && _ctx.onChange(...args)))
11454
- }, null, 40, ld_checkboxvue_type_template_id_4cf873fa_ts_true_hoisted_3),
11506
+ }, null, 40, ld_checkboxvue_type_template_id_26c765c2_ts_true_hoisted_2),
11455
11507
  (0,external_vue_.createTextVNode)(),
11456
11508
  (0,external_vue_.createVNode)(_component_v_icon, { icon: "check" })
11457
11509
  ]),
@@ -11460,7 +11512,7 @@ function ld_checkboxvue_type_template_id_4cf873fa_ts_true_render(_ctx, _cache, $
11460
11512
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
11461
11513
  key: 1,
11462
11514
  class: "d-flex align-center",
11463
- onClick: _cache[2] || (_cache[2] =
11515
+ onClick: _cache[4] || (_cache[4] =
11464
11516
  //@ts-ignore
11465
11517
  (...args) => (_ctx.onLabelClick && _ctx.onLabelClick(...args)))
11466
11518
  }, [
@@ -11486,10 +11538,10 @@ function ld_checkboxvue_type_template_id_4cf873fa_ts_true_render(_ctx, _cache, $
11486
11538
  }, (0,external_vue_.toDisplayString)(_ctx.label), 3))
11487
11539
  ]))
11488
11540
  : (0,external_vue_.createCommentVNode)("", true)
11489
- ]));
11541
+ ], 2));
11490
11542
  }
11491
11543
 
11492
- ;// CONCATENATED MODULE: ./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=4cf873fa&ts=true
11544
+ ;// CONCATENATED MODULE: ./src/ld-checkbox/ld-checkbox.vue?vue&type=template&id=26c765c2&ts=true
11493
11545
 
11494
11546
  ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-checkbox/ld-checkbox.ts?vue&type=script&lang=ts&external
11495
11547
  var ld_checkboxvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -11513,6 +11565,7 @@ class CheckboxComponent extends (0,external_vue_property_decorator_.mixins)(Inpu
11513
11565
  constructor() {
11514
11566
  super(...arguments);
11515
11567
  this.internalValue = false;
11568
+ this.isFocused = false;
11516
11569
  }
11517
11570
  emitUpdateModelValue(value) {
11518
11571
  return value;
@@ -11559,6 +11612,12 @@ class CheckboxComponent extends (0,external_vue_property_decorator_.mixins)(Inpu
11559
11612
  this.fireinputEvent(checked);
11560
11613
  }
11561
11614
  }
11615
+ onFocus() {
11616
+ this.isFocused = true;
11617
+ }
11618
+ onBlur() {
11619
+ this.isFocused = false;
11620
+ }
11562
11621
  onLabelClick() {
11563
11622
  this.$refs.checkbox.click();
11564
11623
  }
@@ -11655,7 +11714,7 @@ ld_checkboxvue_type_script_lang_ts_external_decorate([
11655
11714
  ;
11656
11715
 
11657
11716
 
11658
- const ld_checkbox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(CheckboxComponent, [['render',ld_checkboxvue_type_template_id_4cf873fa_ts_true_render]])
11717
+ const ld_checkbox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(CheckboxComponent, [['render',ld_checkboxvue_type_template_id_26c765c2_ts_true_render]])
11659
11718
 
11660
11719
  /* harmony default export */ const ld_checkbox = (ld_checkbox_exports_);
11661
11720
  ;// CONCATENATED MODULE: ./src/ld-checkbox/index.ts
@@ -12791,34 +12850,34 @@ function ld_select_reg(vue, options) {
12791
12850
  }
12792
12851
  /* harmony default export */ const src_ld_select = (ld_select_reg);
12793
12852
 
12794
- ;// 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=70de7eb0&scoped=true&ts=true
12853
+ ;// 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
12795
12854
 
12796
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_withScopeId = n => (_pushScopeId("data-v-70de7eb0"), n = n(), _popScopeId(), n);
12797
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_1 = {
12855
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_withScopeId = n => (_pushScopeId("data-v-31853b17"), n = n(), _popScopeId(), n);
12856
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_1 = {
12798
12857
  class: "w-full overflow-hidden",
12799
12858
  style: { "border-radius": "var(--border-radius)" }
12800
12859
  };
12801
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_2 = { class: "w-full d-flex position-relative" };
12802
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
12803
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_4 = {
12860
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_2 = { class: "w-full d-flex position-relative" };
12861
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
12862
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_4 = {
12804
12863
  key: 0,
12805
12864
  class: "d-flex align-center"
12806
12865
  };
12807
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_5 = { class: "d-flex flex-column justify-center" };
12808
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_6 = {
12866
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_5 = { class: "d-flex flex-column justify-center" };
12867
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_6 = {
12809
12868
  key: 0,
12810
12869
  class: "grey--text",
12811
12870
  style: { "font-size": "var(--font-size--1)" }
12812
12871
  };
12813
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_7 = {
12872
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_7 = {
12814
12873
  key: 0,
12815
12874
  class: "combobox-loading"
12816
12875
  };
12817
- const ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_8 = {
12876
+ const ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_8 = {
12818
12877
  key: 0,
12819
12878
  class: "combobox-validate"
12820
12879
  };
12821
- function ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
12880
+ function ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
12822
12881
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
12823
12882
  const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
12824
12883
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
@@ -12843,8 +12902,8 @@ function ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render(_ct
12843
12902
  class: (0,external_vue_.normalizeClass)(_ctx.inputSizeClasses)
12844
12903
  }, {
12845
12904
  default: (0,external_vue_.withCtx)(() => [
12846
- (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_1, [
12847
- (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_2, [
12905
+ (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_1, [
12906
+ (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_2, [
12848
12907
  (0,external_vue_.createVNode)(_component_multiselect, {
12849
12908
  ref: "multiselect",
12850
12909
  modelValue: _ctx.selected,
@@ -12886,7 +12945,7 @@ function ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render(_ct
12886
12945
  "onClick:close": ($event) => (_ctx.onRemoveItem(option))
12887
12946
  }, {
12888
12947
  default: (0,external_vue_.withCtx)(() => [
12889
- (0,external_vue_.createElementVNode)("span", ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
12948
+ (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)
12890
12949
  ]),
12891
12950
  _: 2
12892
12951
  }, 1032, ["color", "closable", "onClick:close"]))
@@ -12899,7 +12958,7 @@ function ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render(_ct
12899
12958
  }, () => [
12900
12959
  (0,external_vue_.createVNode)(_component_small_chip, { closable: false }, {
12901
12960
  default: (0,external_vue_.withCtx)(() => [
12902
- (0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(`overflow => limit: ${limit}, count: ${count}`), 1)
12961
+ (0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(`+${count - limit} items`), 1)
12903
12962
  ]),
12904
12963
  _: 2
12905
12964
  }, 1024)
@@ -12914,7 +12973,7 @@ function ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render(_ct
12914
12973
  (0,external_vue_.createVNode)(_component_v_col, { class: "d-flex align-center py-1" }, {
12915
12974
  default: (0,external_vue_.withCtx)(() => [
12916
12975
  (_ctx.multiselect)
12917
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_4, [
12976
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_4, [
12918
12977
  ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-checkbox']), {
12919
12978
  key: JSON.stringify(option),
12920
12979
  "model-value": _ctx.checkedItems,
@@ -12929,13 +12988,13 @@ function ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render(_ct
12929
12988
  }, [
12930
12989
  (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),
12931
12990
  (0,external_vue_.createTextVNode)(),
12932
- (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_5, [
12991
+ (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_5, [
12933
12992
  (0,external_vue_.renderSlot)(_ctx.$slots, "option", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), () => [
12934
12993
  (0,external_vue_.createElementVNode)("div", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, _ctx.itemTitle)), 1)
12935
12994
  ], true),
12936
12995
  (0,external_vue_.createTextVNode)(),
12937
12996
  (_ctx.optionHint)
12938
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_6, [
12997
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_6, [
12939
12998
  (0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), undefined, true)
12940
12999
  ]))
12941
13000
  : (0,external_vue_.createCommentVNode)("", true)
@@ -12955,13 +13014,13 @@ function ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render(_ct
12955
13014
  }, 8, ["modelValue", "multiple", "placeholder", "options", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allowEmpty", "onClose", "onOpen", "onSearchChange", "onUpdate:modelValue"]),
12956
13015
  (0,external_vue_.createTextVNode)(),
12957
13016
  (_ctx.loading)
12958
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_7))
13017
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_7))
12959
13018
  : (0,external_vue_.createCommentVNode)("", true)
12960
13019
  ])
12961
13020
  ]),
12962
13021
  (0,external_vue_.createTextVNode)(),
12963
13022
  (!_ctx.hideDetails)
12964
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_hoisted_8, [
13023
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_comboboxvue_type_template_id_31853b17_scoped_true_ts_true_hoisted_8, [
12965
13024
  (0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
12966
13025
  default: (0,external_vue_.withCtx)(() => [
12967
13026
  (_ctx.showHint)
@@ -12984,7 +13043,7 @@ function ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render(_ct
12984
13043
  }));
12985
13044
  }
12986
13045
 
12987
- ;// CONCATENATED MODULE: ./src/ld-combobox/ld-combobox.vue?vue&type=template&id=70de7eb0&scoped=true&ts=true
13046
+ ;// CONCATENATED MODULE: ./src/ld-combobox/ld-combobox.vue?vue&type=template&id=31853b17&scoped=true&ts=true
12988
13047
 
12989
13048
  ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-combobox/ld-combobox.ts?vue&type=script&lang=ts&external
12990
13049
  var ld_comboboxvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -13442,7 +13501,7 @@ ld_comboboxvue_type_script_lang_ts_external_SelectListBoxComponent = ld_combobox
13442
13501
  ;
13443
13502
 
13444
13503
 
13445
- const ld_combobox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_comboboxvue_type_script_lang_ts_external, [['render',ld_comboboxvue_type_template_id_70de7eb0_scoped_true_ts_true_render],['__scopeId',"data-v-70de7eb0"]])
13504
+ 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"]])
13446
13505
 
13447
13506
  /* harmony default export */ const ld_combobox = (ld_combobox_exports_);
13448
13507
  ;// CONCATENATED MODULE: ./src/ld-combobox/index.ts
@@ -14806,12 +14865,273 @@ function ld_switch_reg(vue, options) {
14806
14865
  }
14807
14866
  /* harmony default export */ const src_ld_switch = (ld_switch_reg);
14808
14867
 
14809
- // EXTERNAL MODULE: external "vue-toastification"
14810
- var external_vue_toastification_ = __webpack_require__(7982);
14811
- var external_vue_toastification_default = /*#__PURE__*/__webpack_require__.n(external_vue_toastification_);
14812
- ;// CONCATENATED MODULE: ./src/utils/delay.ts
14813
- async function delay(timeout) {
14814
- return new Promise(resolve => setTimeout(() => resolve(), timeout));
14868
+ ;// 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
14869
+
14870
+ const ld_dialogvue_type_template_id_184339ee_ts_true_hoisted_1 = { class: "ld-dialog" };
14871
+ function ld_dialogvue_type_template_id_184339ee_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
14872
+ const _component_minimized = (0,external_vue_.resolveComponent)("minimized");
14873
+ const _component_v_spacer = (0,external_vue_.resolveComponent)("v-spacer");
14874
+ const _component_square_button = (0,external_vue_.resolveComponent)("square-button");
14875
+ const _component_v_card_title = (0,external_vue_.resolveComponent)("v-card-title");
14876
+ const _component_v_card_text = (0,external_vue_.resolveComponent)("v-card-text");
14877
+ const _component_small_button = (0,external_vue_.resolveComponent)("small-button");
14878
+ const _component_v_card_actions = (0,external_vue_.resolveComponent)("v-card-actions");
14879
+ const _component_v_card = (0,external_vue_.resolveComponent)("v-card");
14880
+ const _component_v_dialog = (0,external_vue_.resolveComponent)("v-dialog");
14881
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_dialogvue_type_template_id_184339ee_ts_true_hoisted_1, [
14882
+ (0,external_vue_.createVNode)(_component_minimized, {
14883
+ dialogs: _ctx.minimized,
14884
+ onMaximize: _cache[0] || (_cache[0] = ($event) => (_ctx.onMinimize($event))),
14885
+ onClose: _cache[1] || (_cache[1] = ($event) => (_ctx.handleCancel($event))),
14886
+ onCloseAll: _ctx.handleCancelAll
14887
+ }, null, 8, ["dialogs", "onCloseAll"]),
14888
+ (0,external_vue_.createTextVNode)(),
14889
+ ((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.modals, (modal) => {
14890
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", {
14891
+ key: modal.id,
14892
+ class: "h-100"
14893
+ }, [
14894
+ (0,external_vue_.createVNode)(_component_v_dialog, (0,external_vue_.mergeProps)({
14895
+ modelValue: modal.show,
14896
+ "onUpdate:modelValue": ($event) => ((modal.show) = $event),
14897
+ "content-class": ['ld-dialog-content'].concat(this.modalClass(modal)),
14898
+ persistent: ""
14899
+ }, _ctx.dialogBindings(modal), {
14900
+ "hide-header-close": !modal.closable,
14901
+ "hide-overlay": modal.noModal,
14902
+ "no-click-animation": modal.noModal,
14903
+ "retain-focus": modal.retainFocus,
14904
+ scrim: !modal.noModal,
14905
+ onHide: ($event) => (_ctx.handleHide(modal))
14906
+ }), {
14907
+ default: (0,external_vue_.withCtx)(() => [
14908
+ (0,external_vue_.createVNode)(_component_v_card, {
14909
+ class: (0,external_vue_.normalizeClass)(_ctx.cardClasses(modal))
14910
+ }, {
14911
+ default: (0,external_vue_.withCtx)(() => [
14912
+ (0,external_vue_.createVNode)(_component_v_card_title, {
14913
+ class: (0,external_vue_.normalizeClass)(["modal-title", { 'v-card-title--dark': _ctx.isTitleDark(modal) }])
14914
+ }, {
14915
+ default: (0,external_vue_.withCtx)(() => [
14916
+ (0,external_vue_.createElementVNode)("span", {
14917
+ class: (0,external_vue_.normalizeClass)({ 'font-weight-bold': _ctx.isMobileGlobal })
14918
+ }, (0,external_vue_.toDisplayString)(_ctx.modalTitle(modal)), 3),
14919
+ (0,external_vue_.createTextVNode)(),
14920
+ (0,external_vue_.createVNode)(_component_v_spacer),
14921
+ (0,external_vue_.createTextVNode)(),
14922
+ (modal.minimizable && !_ctx.isMobileGlobal)
14923
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
14924
+ key: 0,
14925
+ icon: "",
14926
+ onClick: ($event) => (_ctx.onMinimize(modal))
14927
+ }, {
14928
+ default: (0,external_vue_.withCtx)(() => [
14929
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
14930
+ color: modal.darkTitle ? 'white' : 'grey'
14931
+ }, {
14932
+ default: (0,external_vue_.withCtx)(() => [
14933
+ (0,external_vue_.createTextVNode)("\r\n minimize\r\n ")
14934
+ ]),
14935
+ _: 2
14936
+ }, 1032, ["color"]))
14937
+ ]),
14938
+ _: 2
14939
+ }, 1032, ["onClick"]))
14940
+ : (0,external_vue_.createCommentVNode)("", true),
14941
+ (0,external_vue_.createTextVNode)(),
14942
+ (_ctx.isExpanded(modal) && !_ctx.isMobileGlobal)
14943
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
14944
+ key: 1,
14945
+ icon: "",
14946
+ onClick: ($event) => (_ctx.onExpandCollapse(modal))
14947
+ }, {
14948
+ default: (0,external_vue_.withCtx)(() => [
14949
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
14950
+ color: modal.darkTitle ? 'white' : 'grey'
14951
+ }, {
14952
+ default: (0,external_vue_.withCtx)(() => [
14953
+ (0,external_vue_.createTextVNode)("\r\n close_fullscreen\r\n ")
14954
+ ]),
14955
+ _: 2
14956
+ }, 1032, ["color"]))
14957
+ ]),
14958
+ _: 2
14959
+ }, 1032, ["onClick"]))
14960
+ : (0,external_vue_.createCommentVNode)("", true),
14961
+ (0,external_vue_.createTextVNode)(),
14962
+ (_ctx.isCollapsed(modal) && !_ctx.isMobileGlobal)
14963
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
14964
+ key: 2,
14965
+ icon: "",
14966
+ onClick: ($event) => (_ctx.onExpandCollapse(modal))
14967
+ }, {
14968
+ default: (0,external_vue_.withCtx)(() => [
14969
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
14970
+ color: modal.darkTitle ? 'white' : 'grey'
14971
+ }, {
14972
+ default: (0,external_vue_.withCtx)(() => [
14973
+ (0,external_vue_.createTextVNode)("\r\n open_in_full\r\n ")
14974
+ ]),
14975
+ _: 2
14976
+ }, 1032, ["color"]))
14977
+ ]),
14978
+ _: 2
14979
+ }, 1032, ["onClick"]))
14980
+ : (0,external_vue_.createCommentVNode)("", true),
14981
+ (0,external_vue_.createTextVNode)(),
14982
+ (modal.closable || _ctx.isMobileGlobal)
14983
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
14984
+ key: 3,
14985
+ icon: "",
14986
+ class: "ml-1",
14987
+ onClick: ($event) => (_ctx.handleCancel(modal, true))
14988
+ }, {
14989
+ default: (0,external_vue_.withCtx)(() => [
14990
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), {
14991
+ color: _ctx.isTitleDark(modal) ? 'white' : 'grey'
14992
+ }, {
14993
+ default: (0,external_vue_.withCtx)(() => [
14994
+ (0,external_vue_.createTextVNode)("\r\n close\r\n ")
14995
+ ]),
14996
+ _: 2
14997
+ }, 1032, ["color"]))
14998
+ ]),
14999
+ _: 2
15000
+ }, 1032, ["onClick"]))
15001
+ : (0,external_vue_.createCommentVNode)("", true)
15002
+ ]),
15003
+ _: 2
15004
+ }, 1032, ["class"]),
15005
+ (0,external_vue_.createTextVNode)(),
15006
+ (_ctx.isAlertDialog(modal) || _ctx.isConfirmDialog(modal))
15007
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_card_text, {
15008
+ key: 0,
15009
+ class: "content text-center",
15010
+ innerHTML: modal.content
15011
+ }, null, 8, ["innerHTML"]))
15012
+ : (_ctx.isPromptDialog(modal))
15013
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_card_text, {
15014
+ key: 1,
15015
+ class: "content"
15016
+ }, {
15017
+ default: (0,external_vue_.withCtx)(() => [
15018
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-textarea']), {
15019
+ modelValue: modal.content,
15020
+ "onUpdate:modelValue": ($event) => ((modal.content) = $event),
15021
+ rows: "3"
15022
+ }, null, 8, ["modelValue", "onUpdate:modelValue"]))
15023
+ ]),
15024
+ _: 2
15025
+ }, 1024))
15026
+ : (modal.component)
15027
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_card_text, {
15028
+ key: 2,
15029
+ class: "content",
15030
+ style: (0,external_vue_.normalizeStyle)({
15031
+ visibility: _ctx.setVisibility(modal.id)
15032
+ })
15033
+ }, {
15034
+ default: (0,external_vue_.withCtx)(() => [
15035
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-loader']), {
15036
+ options: { transparent: true, global: false },
15037
+ visible: modal.loading
15038
+ }, null, 8, ["visible"])),
15039
+ (0,external_vue_.createTextVNode)(),
15040
+ (!modal.loading && (_ctx.isInfoDialog(modal) || _ctx.isSelectDialog(modal)))
15041
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(modal.component), (0,external_vue_.mergeProps)({ key: 0 }, modal.componentProps, {
15042
+ onSetResult: ($event) => (_ctx.onSetResult(modal, $event)),
15043
+ onSetResultAndClose: ($event) => (_ctx.onSetResultAndClose(modal, $event)),
15044
+ onCancel: ($event) => (_ctx.handleCancel(modal)),
15045
+ onExternalComponentCreated: ($event) => (_ctx.onComponentInstanceCreated(modal, $event))
15046
+ }), null, 16, ["onSetResult", "onSetResultAndClose", "onCancel", "onExternalComponentCreated"]))
15047
+ : (0,external_vue_.createCommentVNode)("", true),
15048
+ (0,external_vue_.createTextVNode)(),
15049
+ (!modal.loading && _ctx.isCreateEditDialog(modal))
15050
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(modal.component), (0,external_vue_.mergeProps)({ key: 1 }, modal.componentProps, {
15051
+ onCollapseModal: ($event) => (_ctx.onExpandCollapse(modal)),
15052
+ onCancel: ($event) => (_ctx.handleCancel(modal)),
15053
+ onSetResult: ($event) => (_ctx.onSetResult(modal, $event)),
15054
+ onSetReadonly: ($event) => (modal.okDisabled = true),
15055
+ "onDialog:activate": ($event) => (_ctx.onActivate(modal)),
15056
+ "onDialog:processing": ($event) => (_ctx.onProcessing(modal, $event)),
15057
+ onExternalComponentCreated: ($event) => (_ctx.onComponentInstanceCreated(modal, $event))
15058
+ }), null, 16, ["onCollapseModal", "onCancel", "onSetResult", "onSetReadonly", "onDialog:activate", "onDialog:processing", "onExternalComponentCreated"]))
15059
+ : (0,external_vue_.createCommentVNode)("", true)
15060
+ ]),
15061
+ _: 2
15062
+ }, 1032, ["style"]))
15063
+ : (0,external_vue_.createCommentVNode)("", true),
15064
+ (0,external_vue_.createTextVNode)(),
15065
+ (!modal.hideFooter)
15066
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_card_actions, {
15067
+ key: 3,
15068
+ class: (0,external_vue_.normalizeClass)(["footer", { 'footerBtnEnd': _ctx.isSelectDialog(modal) }]),
15069
+ style: { "justify-content": "center" }
15070
+ }, {
15071
+ default: (0,external_vue_.withCtx)(() => [
15072
+ (0,external_vue_.createVNode)(_component_small_button, {
15073
+ id: "modalOk",
15074
+ disabled: modal.okDisabled,
15075
+ loading: modal.okLoading,
15076
+ color: "primary",
15077
+ onClick: ($event) => (_ctx.handleOk(modal))
15078
+ }, {
15079
+ default: (0,external_vue_.withCtx)(() => [
15080
+ (0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.okButtonText(modal)), 1)
15081
+ ]),
15082
+ _: 2
15083
+ }, 1032, ["disabled", "loading", "onClick"]),
15084
+ (0,external_vue_.createTextVNode)(),
15085
+ (!_ctx.isAlertDialog(modal) && !_ctx.isInfoDialog(modal))
15086
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_button, {
15087
+ key: 0,
15088
+ id: "modalCancel",
15089
+ disabled: modal.okOnly || modal.okLoading,
15090
+ variant: "outlined",
15091
+ color: "primary",
15092
+ onClick: ($event) => (_ctx.handleCancel(modal))
15093
+ }, {
15094
+ default: (0,external_vue_.withCtx)(() => [
15095
+ (0,external_vue_.createTextVNode)((0,external_vue_.toDisplayString)(_ctx.cancelButtonText(modal)), 1)
15096
+ ]),
15097
+ _: 2
15098
+ }, 1032, ["disabled", "onClick"]))
15099
+ : (0,external_vue_.createCommentVNode)("", true)
15100
+ ]),
15101
+ _: 2
15102
+ }, 1032, ["class"]))
15103
+ : (0,external_vue_.createCommentVNode)("", true)
15104
+ ]),
15105
+ _: 2
15106
+ }, 1032, ["class"])
15107
+ ]),
15108
+ _: 2
15109
+ }, 1040, ["modelValue", "onUpdate:modelValue", "content-class", "hide-header-close", "hide-overlay", "no-click-animation", "retain-focus", "scrim", "onHide"])
15110
+ ]));
15111
+ }), 128))
15112
+ ]));
15113
+ }
15114
+
15115
+ ;// CONCATENATED MODULE: ./src/ld-dialog/ld-dialog.vue?vue&type=template&id=184339ee&ts=true
15116
+
15117
+ // EXTERNAL MODULE: ./node_modules/@ldmjs/core/dist/index.js
15118
+ var dist = __webpack_require__(634);
15119
+ ;// CONCATENATED MODULE: ./src/utils/awaiting.ts
15120
+ async function awaiting(callback) {
15121
+ let resolveFunc = null;
15122
+ const counter = 0;
15123
+ let timer = null;
15124
+ const promise = new Promise(resolve => {
15125
+ resolveFunc = resolve;
15126
+ });
15127
+ timer = setInterval(() => {
15128
+ const a = callback();
15129
+ if (counter > 100 || Boolean(a)) {
15130
+ clearInterval(timer);
15131
+ resolveFunc(a ?? true);
15132
+ }
15133
+ }, 100);
15134
+ await promise;
14815
15135
  }
14816
15136
 
14817
15137
  ;// CONCATENATED MODULE: ./src/utils/datetime.ts
@@ -14891,6 +15211,11 @@ function deepValueGetter(obj, path) {
14891
15211
  return current;
14892
15212
  }
14893
15213
 
15214
+ ;// CONCATENATED MODULE: ./src/utils/delay.ts
15215
+ async function delay(timeout) {
15216
+ return new Promise(resolve => setTimeout(() => resolve(), timeout));
15217
+ }
15218
+
14894
15219
  ;// CONCATENATED MODULE: ./src/utils/isObjectEmpty.ts
14895
15220
  function isObjectEmpty(obj) {
14896
15221
  for (const _i in obj) {
@@ -14914,88 +15239,1476 @@ const urlRegexp =
14914
15239
 
14915
15240
 
14916
15241
 
14917
- ;// CONCATENATED MODULE: ./src/mixins/validate.mixin.ts
14918
- var validate_mixin_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
14919
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14920
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
14921
- 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;
14922
- return c > 3 && r && Object.defineProperty(target, key, r), r;
14923
- };
14924
- var validate_mixin_metadata = (undefined && undefined.__metadata) || function (k, v) {
14925
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
14926
- };
15242
+ ;// CONCATENATED MODULE: ./src/ld-dialog/dialog.manager.ts
14927
15243
 
14928
15244
 
14929
- function validate() {
14930
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
14931
- const errors = this.inputs.filter((input) => input.validate && !input.validate(true)).length;
14932
- return !errors;
14933
- }
14934
- function register(input, section) {
14935
- if (section) {
14936
- this.section = section;
15245
+ var ModalButton;
15246
+ (function (ModalButton) {
15247
+ ModalButton[ModalButton["Ok"] = 0] = "Ok";
15248
+ ModalButton[ModalButton["Cancel"] = 1] = "Cancel";
15249
+ })(ModalButton || (ModalButton = {}));
15250
+ var ModalType;
15251
+ (function (ModalType) {
15252
+ ModalType[ModalType["Alert"] = 0] = "Alert";
15253
+ ModalType[ModalType["Prompt"] = 1] = "Prompt";
15254
+ ModalType[ModalType["Info"] = 2] = "Info";
15255
+ ModalType[ModalType["Confirm"] = 3] = "Confirm";
15256
+ ModalType[ModalType["Select"] = 4] = "Select";
15257
+ ModalType[ModalType["CreateEdit"] = 5] = "CreateEdit";
15258
+ })(ModalType || (ModalType = {}));
15259
+ const GAP = 17;
15260
+ const MARGIN_RIGHT = 25;
15261
+ const MARGIN_BOTTOM = 68;
15262
+ class DialogManager {
15263
+ static exec(modal, fetchData) {
15264
+ switch (modal.constructor.name) {
15265
+ case 'AlertDialog':
15266
+ return DialogManager.alert(modal);
15267
+ case 'PromptDialog':
15268
+ return DialogManager.prompt(modal);
15269
+ case 'ConfirmDialog':
15270
+ return DialogManager.confirm(modal);
15271
+ case 'InfoDialog':
15272
+ return DialogManager.info(modal, fetchData);
15273
+ case 'SelectDialog':
15274
+ return DialogManager.select(modal, fetchData);
15275
+ case 'CreateEditDialog':
15276
+ return DialogManager.createEdit(modal, fetchData);
15277
+ }
15278
+ return null;
14937
15279
  }
14938
- if (this.section && input.validate) {
14939
- // eslint-disable-next-line @typescript-eslint/naming-convention
14940
- input.__cardSection = this.section;
15280
+ constructor() {
15281
+ this._visibled = [];
15282
+ this._minimized = [];
15283
+ this._viewPortWidth = window.innerWidth;
15284
+ window.addEventListener('resize', this.onResizeHandler.bind(this));
14941
15285
  }
14942
- const unwatch = this.watchInput(input);
14943
- this.inputs.push(input);
14944
- this.watchers.push(unwatch);
14945
- }
14946
- function unregister(input) {
14947
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
14948
- const found = this.inputs.find((i) => i.uid === input.uid);
14949
- if (!found) {
14950
- return;
15286
+ setMinimized(minimized) {
15287
+ this._minimized = minimized;
14951
15288
  }
14952
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
14953
- const unwatch = this.watchers.find((i) => i.uid === found.uid);
14954
- if (unwatch.valid) {
14955
- unwatch.valid();
15289
+ modalIdentity(modal, host) {
15290
+ if (!modal.hostObject || !host) {
15291
+ return false;
15292
+ }
15293
+ return (modal.hostObject?.id === host?.id &&
15294
+ modal.hostObject?.contentType === host?.contentType &&
15295
+ modal.hostObject?.kind === host?.kind);
14956
15296
  }
14957
- if (unwatch.shouldValidate) {
14958
- unwatch.shouldValidate();
15297
+ tryToOpen(host) {
15298
+ const found = this._visibled.concat(this._minimized).find(m => this.modalIdentity(m, host));
15299
+ return !found;
14959
15300
  }
14960
- let index = 0;
14961
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
14962
- index = this.watchers.findIndex((i) => i.uid === found.uid);
14963
- this.watchers.splice(index, 1);
14964
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
14965
- index = this.inputs.findIndex((i) => i.uid === found.uid);
14966
- this.inputs.splice(index, 1);
14967
- delete this.errorBag[found.uid];
14968
- }
14969
- function validateSection(section) {
14970
- const errors = this.inputs.filter(
14971
- // eslint-disable-next-line eqeqeq, @typescript-eslint/no-explicit-any
14972
- (input) => input.__cardSection == section && input.validate && !input.validate(true)).length;
14973
- return !errors;
14974
- }
14975
- function watchInput(input) {
14976
- const watcher = (_input) => _input.$watch('hasError', val => {
14977
- this.errorBag[_input.uid] = val;
14978
- }, { immediate: true });
14979
- const watchers = {
14980
- uid: input.uid,
14981
- valid: null,
14982
- shouldValidate: null,
14983
- };
14984
- if (this.lazyValidation) {
14985
- // Only start watching inputs if we need to
14986
- watchers.shouldValidate = input.$watch('shouldValidate', val => {
14987
- if (!val) {
14988
- return;
15301
+ dialogCreated(info) {
15302
+ if (!info) {
15303
+ return;
15304
+ }
15305
+ info.el = document.querySelector(`.${this.uniqKey(info)}`);
15306
+ this.shiftLeft(info);
15307
+ this.refreshPositions();
15308
+ }
15309
+ dialogModalChanged(info, callback = null) {
15310
+ if (!info) {
15311
+ return;
15312
+ }
15313
+ if (info.noModal) {
15314
+ /**
15315
+ * диалог стал немодальным
15316
+ */
15317
+ let timeoutId;
15318
+ let refreshed = false;
15319
+ const resizeEnd = () => {
15320
+ clearTimeout(timeoutId);
15321
+ resizeObserver.unobserve(info.el);
15322
+ this.refreshPositions();
15323
+ refreshed = true;
15324
+ };
15325
+ const resizeObserver = new window.ResizeObserver((entries) => {
15326
+ window.requestAnimationFrame(() => {
15327
+ if (!Array.isArray(entries) || !entries.length) {
15328
+ return null;
15329
+ }
15330
+ if (entries.length && entries[0].contentRect) {
15331
+ clearTimeout(timeoutId);
15332
+ timeoutId = setTimeout(resizeEnd, 50);
15333
+ }
15334
+ });
15335
+ });
15336
+ resizeObserver.observe(info.el);
15337
+ setTimeout(() => {
15338
+ if (!refreshed) {
15339
+ this.refreshPositions();
15340
+ }
15341
+ }, 300);
15342
+ }
15343
+ else {
15344
+ /**
15345
+ * диалог стал модальным
15346
+ */
15347
+ this.setDialogModal(info, callback);
15348
+ }
15349
+ }
15350
+ dialogProcessing(info) {
15351
+ if (!info) {
15352
+ return;
15353
+ }
15354
+ info.minimized = true;
15355
+ this.dialogMinimizeChanged(info);
15356
+ }
15357
+ dialogMinimizeChanged(info) {
15358
+ if (!info) {
15359
+ return;
15360
+ }
15361
+ /**
15362
+ * диалог свернут - диалог развернут
15363
+ */
15364
+ if (info.minimized) {
15365
+ // диалог свернут
15366
+ if (!info.noModal) {
15367
+ /**
15368
+ * если диалог модальный, сначала сделаем его немодальным
15369
+ */
15370
+ info._wasModal = true;
15371
+ info.noModal = true;
15372
+ ;
14989
15373
  }
14990
- // Only watch if we're not already doing it
14991
- if (Object.prototype.hasOwnProperty.call(this.errorBag, input.uid)) {
14992
- return;
15374
+ const i = this._visibled.findIndex(m => this.modalIdentity(m, info.hostObject));
15375
+ if (i > -1) {
15376
+ this._visibled.splice(i, 1);
14993
15377
  }
14994
- watchers.valid = watcher(input);
14995
- });
15378
+ this.addToMinimized(info);
15379
+ this.refreshPositions();
15380
+ }
15381
+ else {
15382
+ // диалог развернут
15383
+ this.removeFromMinimized(info);
15384
+ this.toggleDialogShow(info);
15385
+ this.shiftLeft(info);
15386
+ if (info._wasModal) {
15387
+ info.noModal = false;
15388
+ delete info._wasModal;
15389
+ }
15390
+ if (!info.noModal) {
15391
+ // сделаем окно модальным, если до сворачивания оно было таковым
15392
+ this.setDialogModal(info);
15393
+ }
15394
+ else {
15395
+ this.refreshPositions();
15396
+ }
15397
+ }
14996
15398
  }
14997
- else {
14998
- watchers.valid = watcher(input);
15399
+ dialogClosed(info) {
15400
+ try {
15401
+ if (this.removeFromMinimized(info)) {
15402
+ return;
15403
+ }
15404
+ const i = this._visibled.findIndex(m => this.modalIdentity(m, info.hostObject));
15405
+ if (i > -1) {
15406
+ this._visibled.splice(i, 1);
15407
+ this.refreshPositions();
15408
+ }
15409
+ }
15410
+ finally {
15411
+ //
15412
+ }
15413
+ }
15414
+ activate(info) {
15415
+ let i = this._minimized.findIndex(d => d === info);
15416
+ let dlg = null;
15417
+ if (i > -1) {
15418
+ dlg = this._minimized[i];
15419
+ this._minimized.splice(i, 1);
15420
+ }
15421
+ if (dlg) {
15422
+ dlg.minimized = false;
15423
+ this.dialogMinimizeChanged(dlg);
15424
+ this.refreshPositions();
15425
+ }
15426
+ else {
15427
+ i = this._visibled.findIndex(m => this.modalIdentity(m, info.hostObject));
15428
+ if (i > -1) {
15429
+ this._visibled.splice(i, 1);
15430
+ }
15431
+ this.shiftLeft(info);
15432
+ this.refreshPositions();
15433
+ }
15434
+ }
15435
+ onResizeHandler() {
15436
+ this._viewPortWidth = window.innerWidth;
15437
+ this.refreshPositions();
15438
+ }
15439
+ shiftLeft(info) {
15440
+ this._visibled.push(info);
15441
+ }
15442
+ /**
15443
+ * --- Позиционирование относительно правого нижнего угла ---
15444
+ * Самый новое созданное или последнее развернутое окно
15445
+ * будет всегда в правом нижнем углу.
15446
+ * Предыдущие ему окна смещаются в сторону левого края,
15447
+ * пока для этого хватает рабочей области.
15448
+ * Окна, не уместившиеся в рабочую область, будут свернуты.
15449
+ */
15450
+ refreshPositions() {
15451
+ let right = 0;
15452
+ let index = -1;
15453
+ let unusedArea = this._viewPortWidth;
15454
+ for (let i = this._visibled.length - 1; i >= 0; i--) {
15455
+ const dlg = this._visibled[i];
15456
+ // пропускаем окна, раскрытые в стандарное представление с затемненным фоном
15457
+ if (!dlg.noModal) {
15458
+ continue;
15459
+ }
15460
+ const offset = dlg.el.clientWidth + GAP;
15461
+ // проверяем, хватит ли незанятой области для отображения еще одного окна
15462
+ if (unusedArea < offset) {
15463
+ const info = this._visibled.shift();
15464
+ info.el.style.bottom = 'unset';
15465
+ info.el.style.right = 'unset';
15466
+ setTimeout(() => {
15467
+ this.addToMinimized(info);
15468
+ }, 1);
15469
+ }
15470
+ else {
15471
+ right = MARGIN_RIGHT + offset * ++index;
15472
+ // на каждой итерации вычисляем ширину незанятой области
15473
+ unusedArea -= MARGIN_RIGHT + offset;
15474
+ dlg.el.style.margin = '0';
15475
+ dlg.el.style.position = 'absolute';
15476
+ dlg.el.style.bottom = `${MARGIN_BOTTOM}px`;
15477
+ dlg.el.style.right = `${right}px`;
15478
+ dlg.el.classList.remove('ld-dialog-content--hidden');
15479
+ }
15480
+ }
15481
+ }
15482
+ setDialogModal(info, callback = null) {
15483
+ if (!info) {
15484
+ return;
15485
+ }
15486
+ info.el.style.position = 'relative';
15487
+ info.el.style.top = 'unset';
15488
+ info.el.style.left = 'unset';
15489
+ info.el.style.bottom = 'unset';
15490
+ info.el.style.right = 'unset';
15491
+ info.el.parentElement.style.justifyContent = 'center';
15492
+ info.el.parentElement.style.alignItems = 'center';
15493
+ }
15494
+ addToMinimized(info) {
15495
+ this.toggleDialogShow(info);
15496
+ info.minimized = true;
15497
+ this._minimized.unshift(info);
15498
+ }
15499
+ removeFromMinimized(info) {
15500
+ const i = this._minimized.findIndex(m => this.modalIdentity(m, info.hostObject));
15501
+ if (i > -1) {
15502
+ this._minimized.splice(i, 1);
15503
+ return true;
15504
+ }
15505
+ return false;
15506
+ }
15507
+ toggleDialogShow(info) {
15508
+ if (info.el.parentElement.style.display !== 'none') {
15509
+ info._lastDisplayProp = info.el.parentElement.style.display;
15510
+ info.el.parentElement.style.display = 'none';
15511
+ }
15512
+ else {
15513
+ info.el.parentElement.style.display = info._lastDisplayProp;
15514
+ }
15515
+ }
15516
+ uniqKey(info) {
15517
+ return `dlg-${info.id}`;
15518
+ }
15519
+ static alert(modal) {
15520
+ const modalInfo = {
15521
+ title: modal.title,
15522
+ content: modal.content,
15523
+ type: ModalType.Alert,
15524
+ };
15525
+ return DialogManager.execAsync(modalInfo);
15526
+ }
15527
+ static prompt(modal) {
15528
+ const modalInfo = {
15529
+ ...modal,
15530
+ type: ModalType.Prompt
15531
+ };
15532
+ return DialogManager.execAsync(modalInfo);
15533
+ }
15534
+ static confirm(modal) {
15535
+ const modalInfo = {
15536
+ ...modal,
15537
+ content: modal.text,
15538
+ type: ModalType.Confirm,
15539
+ closable: true,
15540
+ };
15541
+ return DialogManager.execAsync(modalInfo);
15542
+ }
15543
+ static info(modal, fetchData) {
15544
+ const modalInfo = {
15545
+ ...modal,
15546
+ type: ModalType.Info,
15547
+ };
15548
+ if (!modalInfo.hostObject) {
15549
+ modalInfo.hostObject = {
15550
+ id: uidGen(6, '0-9'),
15551
+ contentType: 0,
15552
+ kind: 1
15553
+ };
15554
+ }
15555
+ return DialogManager.execAsync(modalInfo, fetchData);
15556
+ }
15557
+ static select(modal, fetchData) {
15558
+ const modalInfo = {
15559
+ ...modal,
15560
+ type: ModalType.Select,
15561
+ };
15562
+ if (!modalInfo.hostObject) {
15563
+ modalInfo.hostObject = {
15564
+ id: uidGen(6, '0-9'),
15565
+ contentType: 0,
15566
+ kind: 1
15567
+ };
15568
+ }
15569
+ return DialogManager.execAsync(modalInfo, fetchData);
15570
+ }
15571
+ static createEdit(modal, fetchData) {
15572
+ const modalInfo = {
15573
+ ...modal,
15574
+ type: ModalType.CreateEdit,
15575
+ };
15576
+ if (!modalInfo.hostObject) {
15577
+ modalInfo.hostObject = {
15578
+ id: uidGen(6, '0-9'),
15579
+ contentType: 0,
15580
+ kind: 1
15581
+ };
15582
+ }
15583
+ return DialogManager.execAsync(modalInfo, fetchData);
15584
+ }
15585
+ static execAsync(modalInfo, fetchData) {
15586
+ return new Promise(resolve => {
15587
+ modalInfo.resolveFunction = resolve;
15588
+ let fetchProps = null;
15589
+ if (fetchData instanceof Function) {
15590
+ fetchProps = async (host) => {
15591
+ if (host.id === modalInfo.hostObject.id) {
15592
+ if (fetchData instanceof Function) {
15593
+ const props = await fetchData();
15594
+ dist.eventBus.$off('dialog:created', fetchProps);
15595
+ dist.eventBus.$emit('dialog:props', props, modalInfo.hostObject);
15596
+ }
15597
+ }
15598
+ };
15599
+ dist.eventBus.$on('dialog:created', fetchProps);
15600
+ }
15601
+ dist.eventBus.$emit('dialog:open', modalInfo);
15602
+ });
15603
+ }
15604
+ }
15605
+
15606
+ ;// 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
15607
+
15608
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_1 = {
15609
+ key: 0,
15610
+ class: "minimized-dialogs"
15611
+ };
15612
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_2 = {
15613
+ key: 0,
15614
+ class: "d-flex flex-row-reverse"
15615
+ };
15616
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_3 = ["onClick"];
15617
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_4 = { class: "d-flex align-center justify-between px-2" };
15618
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_5 = { class: "white--text" };
15619
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_6 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Развернуть", -1);
15620
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_7 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Закрыть", -1);
15621
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_8 = { class: "d-flex justify-center" };
15622
+ const dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_9 = { class: "body-1 white--text" };
15623
+ const _hoisted_10 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Свёрнутые окна", -1);
15624
+ const _hoisted_11 = { class: "minimized-item__title" };
15625
+ const _hoisted_12 = { class: "minimized-item__subtitle" };
15626
+ const _hoisted_13 = { class: "pa-3" };
15627
+ const _hoisted_14 = /*#__PURE__*/ (0,external_vue_.createElementVNode)("span", null, "Закрыть все", -1);
15628
+ function dialog_minimizedvue_type_template_id_719819aa_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
15629
+ const _component_v_spacer = (0,external_vue_.resolveComponent)("v-spacer");
15630
+ const _component_square_button = (0,external_vue_.resolveComponent)("square-button");
15631
+ const _component_v_tooltip = (0,external_vue_.resolveComponent)("v-tooltip");
15632
+ const _component_v_list_item_title = (0,external_vue_.resolveComponent)("v-list-item-title");
15633
+ const _component_v_list_item = (0,external_vue_.resolveComponent)("v-list-item");
15634
+ const _component_v_list = (0,external_vue_.resolveComponent)("v-list");
15635
+ const _component_small_button = (0,external_vue_.resolveComponent)("small-button");
15636
+ const _component_v_card = (0,external_vue_.resolveComponent)("v-card");
15637
+ const _component_v_menu = (0,external_vue_.resolveComponent)("v-menu");
15638
+ return (_ctx.items.length)
15639
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_1, [
15640
+ (_ctx.isManyItems)
15641
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_2, [
15642
+ ((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.items, (item) => {
15643
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("button", {
15644
+ key: item.id,
15645
+ class: "ml-4 minimize-btn",
15646
+ onClick: ($event) => (_ctx.onMaximize(item))
15647
+ }, [
15648
+ (0,external_vue_.createElementVNode)("div", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_4, [
15649
+ (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),
15650
+ (0,external_vue_.createTextVNode)(),
15651
+ (0,external_vue_.createVNode)(_component_v_spacer),
15652
+ (0,external_vue_.createTextVNode)(),
15653
+ (0,external_vue_.createElementVNode)("div", null, [
15654
+ (0,external_vue_.createVNode)(_component_v_tooltip, { location: "top" }, {
15655
+ activator: (0,external_vue_.withCtx)(({ props }) => [
15656
+ (0,external_vue_.createVNode)(_component_square_button, (0,external_vue_.mergeProps)(props, {
15657
+ color: "white",
15658
+ onClick: ($event) => (_ctx.onMaximize(item))
15659
+ }), {
15660
+ default: (0,external_vue_.withCtx)(() => [
15661
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
15662
+ default: (0,external_vue_.withCtx)(() => [
15663
+ (0,external_vue_.createTextVNode)("\r\n open_in_full\r\n ")
15664
+ ]),
15665
+ _: 1
15666
+ }))
15667
+ ]),
15668
+ _: 2
15669
+ }, 1040, ["onClick"])
15670
+ ]),
15671
+ default: (0,external_vue_.withCtx)(() => [
15672
+ (0,external_vue_.createTextVNode)(),
15673
+ dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_6
15674
+ ]),
15675
+ _: 2
15676
+ }, 1024),
15677
+ (0,external_vue_.createTextVNode)(),
15678
+ (0,external_vue_.createVNode)(_component_v_tooltip, { location: "top" }, {
15679
+ activator: (0,external_vue_.withCtx)(({ props }) => [
15680
+ (0,external_vue_.createVNode)(_component_square_button, (0,external_vue_.mergeProps)(props, {
15681
+ color: "white",
15682
+ onClick: (0,external_vue_.withModifiers)(($event) => (_ctx.onClose(item)), ["stop"])
15683
+ }), {
15684
+ default: (0,external_vue_.withCtx)(() => [
15685
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
15686
+ default: (0,external_vue_.withCtx)(() => [
15687
+ (0,external_vue_.createTextVNode)("close")
15688
+ ]),
15689
+ _: 1
15690
+ }))
15691
+ ]),
15692
+ _: 2
15693
+ }, 1040, ["onClick"])
15694
+ ]),
15695
+ default: (0,external_vue_.withCtx)(() => [
15696
+ (0,external_vue_.createTextVNode)(),
15697
+ dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_7
15698
+ ]),
15699
+ _: 2
15700
+ }, 1024)
15701
+ ])
15702
+ ])
15703
+ ], 8, dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_3));
15704
+ }), 128))
15705
+ ]))
15706
+ : ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_menu, { key: 1 }, {
15707
+ activator: (0,external_vue_.withCtx)(({ props }) => [
15708
+ (0,external_vue_.createElementVNode)("button", (0,external_vue_.mergeProps)(props, { class: "minimize-btn" }), [
15709
+ (0,external_vue_.createElementVNode)("div", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_8, [
15710
+ (0,external_vue_.createElementVNode)("span", dialog_minimizedvue_type_template_id_719819aa_ts_true_hoisted_9, [
15711
+ _hoisted_10,
15712
+ (0,external_vue_.createTextVNode)(" (" + (0,external_vue_.toDisplayString)(_ctx.items.length) + ") ", 1)
15713
+ ])
15714
+ ])
15715
+ ], 16)
15716
+ ]),
15717
+ default: (0,external_vue_.withCtx)(() => [
15718
+ (0,external_vue_.createTextVNode)(),
15719
+ (0,external_vue_.createVNode)(_component_v_card, {
15720
+ class: "d-flex flex-column overflow-hidden",
15721
+ style: { "max-height": "65vh" }
15722
+ }, {
15723
+ default: (0,external_vue_.withCtx)(() => [
15724
+ (0,external_vue_.createVNode)(_component_v_list, null, {
15725
+ default: (0,external_vue_.withCtx)(() => [
15726
+ ((0,external_vue_.openBlock)(true), (0,external_vue_.createElementBlock)(external_vue_.Fragment, null, (0,external_vue_.renderList)(_ctx.items, (item) => {
15727
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_v_list_item, {
15728
+ key: item.id,
15729
+ onClick: ($event) => (_ctx.onMaximize(item))
15730
+ }, {
15731
+ append: (0,external_vue_.withCtx)(() => [
15732
+ (0,external_vue_.createVNode)(_component_square_button, {
15733
+ onClick: (0,external_vue_.withModifiers)(($event) => (_ctx.onMaximize(item)), ["stop"])
15734
+ }, {
15735
+ default: (0,external_vue_.withCtx)(() => [
15736
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
15737
+ default: (0,external_vue_.withCtx)(() => [
15738
+ (0,external_vue_.createTextVNode)("\r\n open_in_full\r\n ")
15739
+ ]),
15740
+ _: 1
15741
+ }))
15742
+ ]),
15743
+ _: 2
15744
+ }, 1032, ["onClick"]),
15745
+ (0,external_vue_.createTextVNode)(),
15746
+ (0,external_vue_.createVNode)(_component_square_button, {
15747
+ onClick: (0,external_vue_.withModifiers)(($event) => (_ctx.onClose(item)), ["stop"])
15748
+ }, {
15749
+ default: (0,external_vue_.withCtx)(() => [
15750
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), null, {
15751
+ default: (0,external_vue_.withCtx)(() => [
15752
+ (0,external_vue_.createTextVNode)("\r\n close\r\n ")
15753
+ ]),
15754
+ _: 1
15755
+ }))
15756
+ ]),
15757
+ _: 2
15758
+ }, 1032, ["onClick"])
15759
+ ]),
15760
+ default: (0,external_vue_.withCtx)(() => [
15761
+ (0,external_vue_.createVNode)(_component_v_list_item_title, {
15762
+ class: (0,external_vue_.normalizeClass)({ 'changed': _ctx.itemIsChanged(item) })
15763
+ }, {
15764
+ default: (0,external_vue_.withCtx)(() => [
15765
+ (0,external_vue_.createElementVNode)("div", _hoisted_11, (0,external_vue_.toDisplayString)(item.description), 1),
15766
+ (0,external_vue_.createTextVNode)(),
15767
+ (0,external_vue_.createElementVNode)("div", _hoisted_12, (0,external_vue_.toDisplayString)(item.title), 1)
15768
+ ]),
15769
+ _: 2
15770
+ }, 1032, ["class"]),
15771
+ (0,external_vue_.createTextVNode)()
15772
+ ]),
15773
+ _: 2
15774
+ }, 1032, ["onClick"]));
15775
+ }), 128))
15776
+ ]),
15777
+ _: 1
15778
+ }),
15779
+ (0,external_vue_.createTextVNode)(),
15780
+ (0,external_vue_.createElementVNode)("div", _hoisted_13, [
15781
+ (0,external_vue_.createVNode)(_component_small_button, {
15782
+ color: "grey",
15783
+ variant: "outlined",
15784
+ onClick: _ctx.onCloseAll
15785
+ }, {
15786
+ default: (0,external_vue_.withCtx)(() => [
15787
+ ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-icon']), { color: "error" }, {
15788
+ default: (0,external_vue_.withCtx)(() => [
15789
+ (0,external_vue_.createTextVNode)("\r\n close\r\n ")
15790
+ ]),
15791
+ _: 1
15792
+ })),
15793
+ (0,external_vue_.createTextVNode)(),
15794
+ _hoisted_14
15795
+ ]),
15796
+ _: 1
15797
+ }, 8, ["onClick"])
15798
+ ])
15799
+ ]),
15800
+ _: 1
15801
+ })
15802
+ ]),
15803
+ _: 1
15804
+ }))
15805
+ ]))
15806
+ : (0,external_vue_.createCommentVNode)("", true);
15807
+ }
15808
+
15809
+ ;// CONCATENATED MODULE: ./src/ld-dialog/dialog.minimized.vue?vue&type=template&id=719819aa&ts=true
15810
+
15811
+ ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-dialog/dialog.minimized.ts?vue&type=script&lang=ts&external
15812
+ var dialog_minimizedvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15813
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15814
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15815
+ 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;
15816
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
15817
+ };
15818
+ var dialog_minimizedvue_type_script_lang_ts_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
15819
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15820
+ };
15821
+ var dialog_minimizedvue_type_script_lang_ts_external_a;
15822
+
15823
+
15824
+ let DialogMinimizedComponent = class DialogMinimizedComponent extends external_vue_property_decorator_.Vue {
15825
+ created() {
15826
+ this.maximizeHandler = this.onMaximize.bind(this);
15827
+ dist.eventBus.$on('modal-maximize', this.maximizeHandler);
15828
+ }
15829
+ beforeUnmount() {
15830
+ dist.eventBus.$off('modal-maximize', this.maximizeHandler);
15831
+ }
15832
+ onMaximize(item) {
15833
+ const dlg = this.dialogs.find(d => d.id === item.id);
15834
+ if (dlg) {
15835
+ this.$emit('maximize', dlg);
15836
+ }
15837
+ }
15838
+ onClose(item) {
15839
+ const dlg = this.dialogs.find(d => d.id === item.id);
15840
+ if (dlg) {
15841
+ this.$emit('close', dlg);
15842
+ }
15843
+ }
15844
+ onCloseAll() {
15845
+ this.$emit('close-all');
15846
+ }
15847
+ itemIsChanged(item) {
15848
+ if (!item.isChanged || typeof item.isChanged !== 'function') {
15849
+ return false;
15850
+ }
15851
+ return item.isChanged();
15852
+ }
15853
+ get label() {
15854
+ return 'Свёрнутые окна';
15855
+ }
15856
+ get items() {
15857
+ return this.dialogs ?? [];
15858
+ }
15859
+ get isManyItems() {
15860
+ return this.items.length && this.items.length < 5;
15861
+ }
15862
+ };
15863
+ dialog_minimizedvue_type_script_lang_ts_external_decorate([
15864
+ (0,external_vue_property_decorator_.Prop)(),
15865
+ 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)
15866
+ ], DialogMinimizedComponent.prototype, "dialogs", void 0);
15867
+ DialogMinimizedComponent = dialog_minimizedvue_type_script_lang_ts_external_decorate([
15868
+ (0,external_vue_property_decorator_.Options)({
15869
+ emits: [
15870
+ 'maximize',
15871
+ 'close',
15872
+ 'close-all'
15873
+ ]
15874
+ })
15875
+ ], DialogMinimizedComponent);
15876
+ /* harmony default export */ const dialog_minimizedvue_type_script_lang_ts_external = (DialogMinimizedComponent);
15877
+
15878
+ ;// CONCATENATED MODULE: ./src/ld-dialog/dialog.minimized.ts?vue&type=script&lang=ts&external
15879
+
15880
+ ;// CONCATENATED MODULE: ./src/ld-dialog/dialog.minimized.vue
15881
+
15882
+
15883
+
15884
+
15885
+ ;
15886
+ 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]])
15887
+
15888
+ /* harmony default export */ const dialog_minimized = (dialog_minimized_exports_);
15889
+ ;// CONCATENATED MODULE: ./src/ld-dialog/dialogs.ts
15890
+ class Dialog {
15891
+ constructor(title, content = '') {
15892
+ this.title = title;
15893
+ this.content = content;
15894
+ }
15895
+ ;
15896
+ }
15897
+ class AlertDialog extends Dialog {
15898
+ constructor(data) {
15899
+ super(data.title, data.text);
15900
+ }
15901
+ }
15902
+ class PromptDialog extends Dialog {
15903
+ constructor(data) {
15904
+ super(data.title, data.content);
15905
+ this.title = data.title;
15906
+ this.width = data.width || '60%';
15907
+ }
15908
+ }
15909
+ class ConfirmDialog extends Dialog {
15910
+ constructor(data) {
15911
+ super(data.title);
15912
+ this.title = data.title;
15913
+ this.text = data.text;
15914
+ this.okTitle = data.okTitle;
15915
+ this.cancelTitle = data.cancelTitle;
15916
+ this.okResult = data.okResult;
15917
+ this.cancelResult = data.cancelResult;
15918
+ }
15919
+ ;
15920
+ }
15921
+ class InfoDialog extends Dialog {
15922
+ constructor(data) {
15923
+ super(data.title);
15924
+ this.title = data.title;
15925
+ this.component = data.component;
15926
+ this.componentProps = data.componentProps;
15927
+ this.width = data.width;
15928
+ this.height = data.height;
15929
+ this.loading = data.loading;
15930
+ this.fullHeight = data.fullHeight;
15931
+ this.closable = data.closable;
15932
+ this.hideFooter = data.hideFooter;
15933
+ this.minimizable = data.minimizable;
15934
+ this.description = data.description;
15935
+ this.hostObject = data.hostObject;
15936
+ }
15937
+ }
15938
+ class SelectDialog {
15939
+ constructor(data) {
15940
+ this.title = data.title;
15941
+ this.component = data.component;
15942
+ this.componentProps = data.componentProps;
15943
+ this.loading = data.loading;
15944
+ this.fullHeight = data.fullHeight;
15945
+ this.width = data.width;
15946
+ this.height = data.height;
15947
+ this.selectAsOk = data.selectAsOk;
15948
+ }
15949
+ }
15950
+ class CreateEditDialog {
15951
+ constructor(data) {
15952
+ this._isChanged = null;
15953
+ this.title = data.title;
15954
+ this.component = data.component;
15955
+ this.componentProps = {
15956
+ ...data.componentProps,
15957
+ setIsChangedCallback: this.setIsChangedCallback.bind(this),
15958
+ };
15959
+ this.hostObject = data.hostObject;
15960
+ this.loading = data.loading;
15961
+ this.fullHeight = data.fullHeight;
15962
+ this.width = data.width;
15963
+ this.height = data.height;
15964
+ this.hideFooter = data.hideFooter;
15965
+ this.darkTitle = data.darkTitle;
15966
+ this.closable = data.closable;
15967
+ this.expandable = data.expandable;
15968
+ this.minimizable = data.minimizable;
15969
+ this.collapsedSize = data.collapsedSize;
15970
+ this.expandedSize = data.expandedSize;
15971
+ this.expanded = data.expanded;
15972
+ this.description = data.description;
15973
+ this.noModal = data.noModal;
15974
+ this.okTitle = data.okTitle;
15975
+ this.cancelTitle = data.cancelTitle;
15976
+ this.isChanged = () => {
15977
+ if (this._isChanged instanceof Function) {
15978
+ return this._isChanged();
15979
+ }
15980
+ return false;
15981
+ };
15982
+ }
15983
+ setIsChangedCallback(callback) {
15984
+ this._isChanged = callback;
15985
+ }
15986
+ }
15987
+
15988
+ ;// CONCATENATED MODULE: ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-dialog/ld-dialog.ts?vue&type=script&lang=ts&external
15989
+ var ld_dialogvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
15990
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
15991
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15992
+ 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;
15993
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
15994
+ };
15995
+ var ld_dialogvue_type_script_lang_ts_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
15996
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
15997
+ };
15998
+
15999
+
16000
+
16001
+
16002
+
16003
+
16004
+
16005
+
16006
+ let DialogComponent = class DialogComponent extends (0,external_vue_class_component_.mixins)(ViewportMixin) {
16007
+ constructor() {
16008
+ super(...arguments);
16009
+ this.minimized = [];
16010
+ this.dialogManager = new DialogManager();
16011
+ this.modals = [];
16012
+ this.modalResult = null;
16013
+ this.listeners = new Map();
16014
+ this.resizingModalId = null;
16015
+ }
16016
+ emitFocus(value) {
16017
+ return value;
16018
+ }
16019
+ onModalsChanged() {
16020
+ const hasModals = this.modals.some(m => !m.minimized && !m.noModal);
16021
+ this.emitFocus(hasModals);
16022
+ }
16023
+ created() {
16024
+ this.dialogManager.setMinimized(this.minimized);
16025
+ }
16026
+ mounted() {
16027
+ this.$nextTick(() => {
16028
+ dist.eventBus.$on('dialog:open', this.open);
16029
+ dist.eventBus.$on('dialog:props', this.onSetProps);
16030
+ dist.eventBus.$on('dialog:close:all', this.closeAll);
16031
+ });
16032
+ }
16033
+ beforeUnmount() {
16034
+ dist.eventBus.$off('dialog:open', this.open);
16035
+ dist.eventBus.$off('dialog:props', this.onSetProps);
16036
+ dist.eventBus.$off('dialog:close:all', this.closeAll);
16037
+ }
16038
+ async open(modalInfo) {
16039
+ if (modalInfo.hostObject) {
16040
+ const found = this.findModal(modalInfo.hostObject);
16041
+ if (found) {
16042
+ this.dialogManager.activate(found);
16043
+ return;
16044
+ }
16045
+ }
16046
+ const modal = {
16047
+ id: Number(modalInfo.hostObject?.id) || this.$utils.uidGen(4, '0-9'),
16048
+ component: modalInfo.component,
16049
+ componentProps: modalInfo.componentProps,
16050
+ hostObject: modalInfo.hostObject,
16051
+ loading: modalInfo.loading,
16052
+ noModal: modalInfo.noModal,
16053
+ type: modalInfo.type,
16054
+ title: modalInfo.title,
16055
+ darkTitle: modalInfo.darkTitle,
16056
+ content: modalInfo.content,
16057
+ resolveFunction: modalInfo.resolveFunction,
16058
+ okTitle: modalInfo.okTitle,
16059
+ cancelTitle: modalInfo.cancelTitle,
16060
+ okResult: modalInfo.okResult,
16061
+ cancelResult: modalInfo.cancelResult,
16062
+ okOnly: modalInfo.type === ModalType.Alert ||
16063
+ modalInfo.type === ModalType.Info,
16064
+ show: true,
16065
+ okLoading: false,
16066
+ okDisabled: modalInfo.type === ModalType.Select,
16067
+ selectAsOk: modalInfo.selectAsOk,
16068
+ hideFooter: this.$utils.isDefined(modalInfo.hideFooter)
16069
+ ? modalInfo.hideFooter
16070
+ : this.$utils.isDefined(modalInfo.selectAsOk)
16071
+ ? modalInfo.selectAsOk
16072
+ : false,
16073
+ resolved: false,
16074
+ width: modalInfo.width,
16075
+ height: modalInfo.height,
16076
+ fullHeight: modalInfo.fullHeight,
16077
+ closable: this.$utils.isDefined(modalInfo.closable) ? modalInfo.closable : true,
16078
+ expandable: modalInfo.expandable,
16079
+ minimizable: modalInfo.minimizable,
16080
+ minimized: false,
16081
+ expandedSize: modalInfo.expandedSize,
16082
+ collapsedSize: modalInfo.collapsedSize,
16083
+ isChanged: modalInfo.isChanged,
16084
+ /**
16085
+ * не дает диалогу автоматом устанавливать фокус на первом focusable элементе (при срабатывании focusin)
16086
+ * т.к. это причина зависания страницы, если одновременно несколько диалогов на экране
16087
+ */
16088
+ retainFocus: false,
16089
+ };
16090
+ if (modal.expandable) {
16091
+ modal.expanded = modalInfo.expanded;
16092
+ if (!modal.expandedSize && !modal.collapsedSize) {
16093
+ const width = modal.width ?? '80%';
16094
+ const height = modal.height ?? width;
16095
+ modal.expandedSize = { width, height };
16096
+ modal.collapsedSize = { width, height };
16097
+ }
16098
+ else if (modal.expandedSize && !modal.collapsedSize) {
16099
+ const { height, width } = modal.expandedSize;
16100
+ modal.noModal = modal.expandedSize.noModal;
16101
+ modal.collapsedSize = { height, width };
16102
+ }
16103
+ else if (!modal.expandedSize && modal.collapsedSize) {
16104
+ const { height, width } = modal.collapsedSize;
16105
+ modal.noModal = modal.collapsedSize.noModal;
16106
+ modal.expandedSize = { height, width };
16107
+ }
16108
+ else {
16109
+ modal.noModal = !modal.expanded;
16110
+ }
16111
+ if (!modal.noModal) {
16112
+ modal.expanded = true;
16113
+ }
16114
+ if (modal.expanded) {
16115
+ modal.noModal = false;
16116
+ }
16117
+ }
16118
+ this.modals.push(modal);
16119
+ const checkDialogExist = setInterval(() => {
16120
+ const el = document.querySelector(`.${this.uniqKey(modal)}`);
16121
+ if (el) {
16122
+ clearInterval(checkDialogExist);
16123
+ this.listenerMap.set(modal, (e) => {
16124
+ if (!this.listenerMap.isLast(modal)) {
16125
+ return;
16126
+ }
16127
+ if (e.key === 'Enter' && this.isConfirmDialog(modal)) {
16128
+ this.handleOk(modal);
16129
+ }
16130
+ if (e.key === 'Escape' && this.isConfirmDialog(modal)) {
16131
+ this.handleCancel(modal);
16132
+ }
16133
+ });
16134
+ modal.el = el;
16135
+ if (this.isConfirmDialog(modal)) {
16136
+ const btnOk = modal.el.querySelector('#modalOk');
16137
+ if (btnOk) {
16138
+ btnOk.focus();
16139
+ }
16140
+ }
16141
+ this.dialogManager.dialogCreated(modal);
16142
+ dist.eventBus.$emit('dialog:created', modal.hostObject);
16143
+ }
16144
+ }, 100);
16145
+ }
16146
+ modalClass(modal) {
16147
+ const result = [
16148
+ `${this.uniqKey(modal)} ${ModalType[modal.type]}`
16149
+ ];
16150
+ if (this.isMobileGlobal) {
16151
+ return result;
16152
+ }
16153
+ if (!modal.width) {
16154
+ result.push('modal');
16155
+ }
16156
+ if (modal.fullHeight || modal.height === '100%') {
16157
+ result.push('h-100');
16158
+ }
16159
+ if (modal.noModal) {
16160
+ result.push('ld-dialog-content--hidden');
16161
+ }
16162
+ return result;
16163
+ }
16164
+ modalWidth(modal) {
16165
+ this.$nextTick(() => {
16166
+ if (modal.expandable || modal.height) {
16167
+ if (!modal.el) {
16168
+ modal.el = document.querySelector(`.${this.uniqKey(modal)}`);
16169
+ }
16170
+ if (modal.el) {
16171
+ modal.el.style.height = String(this.modalHeight(modal));
16172
+ modal.el.style.borderRadius = 'var(--toolbar-border-radius)';
16173
+ modal.el.style.overflow = 'hidden';
16174
+ }
16175
+ }
16176
+ });
16177
+ if (modal.expandable) {
16178
+ return modal.expanded ? modal.expandedSize?.width : modal.collapsedSize?.width;
16179
+ }
16180
+ return modal.width ? modal.width : 'auto';
16181
+ }
16182
+ modalHeight(modal) {
16183
+ if (modal.expandable) {
16184
+ return modal.expanded ? modal.expandedSize?.height : modal.collapsedSize?.height;
16185
+ }
16186
+ return modal.height || 'auto';
16187
+ }
16188
+ modalTitle(modal) {
16189
+ if (modal.description instanceof Function) {
16190
+ return modal.description();
16191
+ }
16192
+ return modal.description || modal.title;
16193
+ }
16194
+ handleHide(modal) {
16195
+ if (!modal.resolved) {
16196
+ this.handleOk(modal);
16197
+ }
16198
+ }
16199
+ async handleOk(modal, settedResult) {
16200
+ let removeModal = true;
16201
+ try {
16202
+ switch (modal.type) {
16203
+ case ModalType.Info:
16204
+ if (modal.componentInstance && modal.componentInstance.onClose) {
16205
+ const canCloseModal = await modal.componentInstance.onClose();
16206
+ if (canCloseModal === false) {
16207
+ removeModal = false;
16208
+ return;
16209
+ }
16210
+ }
16211
+ break;
16212
+ case ModalType.Prompt:
16213
+ return modal.resolveFunction(modal.content);
16214
+ case ModalType.CreateEdit:
16215
+ if (modal.componentInstance && modal.componentInstance.save && !settedResult) {
16216
+ removeModal = false;
16217
+ modal.okLoading = true;
16218
+ let resultSave = modal.componentInstance.save.call(modal.componentInstance);
16219
+ if (resultSave instanceof Promise) {
16220
+ try {
16221
+ resultSave = await resultSave;
16222
+ if (resultSave) {
16223
+ this.modalResult = resultSave;
16224
+ }
16225
+ }
16226
+ catch (e) {
16227
+ /* eslint-disable no-console */
16228
+ console.error(e);
16229
+ }
16230
+ finally {
16231
+ modal.okLoading = false;
16232
+ }
16233
+ }
16234
+ else {
16235
+ modal.okLoading = false;
16236
+ this.modalResult = resultSave;
16237
+ }
16238
+ }
16239
+ break;
16240
+ }
16241
+ modal.show = false;
16242
+ if (modal.type !== ModalType.Select && modal.type !== ModalType.CreateEdit) {
16243
+ const okResult = this.$utils.isDefined(modal.okResult) ? modal.okResult : true;
16244
+ return modal.resolveFunction(okResult);
16245
+ }
16246
+ modal.resolveFunction(this.modalResult);
16247
+ this.modalResult = null;
16248
+ }
16249
+ finally {
16250
+ if (removeModal) {
16251
+ this.remove(modal);
16252
+ this.listenerMap.remove(modal);
16253
+ }
16254
+ }
16255
+ }
16256
+ async handleCancel(modal, fromCloseButton = false) {
16257
+ try {
16258
+ if ([ModalType.CreateEdit, ModalType.Info].includes(modal.type)) {
16259
+ if (modal.componentInstance && modal.componentInstance.onClose) {
16260
+ const canCloseModal = await modal.componentInstance.onClose();
16261
+ if (canCloseModal === false || modal.type === ModalType.CreateEdit) {
16262
+ return;
16263
+ }
16264
+ }
16265
+ let canUnload = false;
16266
+ let dialogText = 'Вы уверены, что хотите закрыть окно?';
16267
+ if (modal.isChanged instanceof Function) {
16268
+ canUnload = !modal.isChanged();
16269
+ }
16270
+ else {
16271
+ const event = new Event('beforeunload');
16272
+ event.modal = true;
16273
+ window.dispatchEvent(event);
16274
+ canUnload = 'canUnload' in event ? event.canUnload : true;
16275
+ dialogText = event.dialogText ?? dialogText;
16276
+ }
16277
+ if (!canUnload) {
16278
+ const confirm = await DialogManager.exec(new ConfirmDialog({
16279
+ title: 'Подтверждение',
16280
+ text: dialogText
16281
+ }));
16282
+ if (!confirm) {
16283
+ return;
16284
+ }
16285
+ }
16286
+ }
16287
+ modal.show = false;
16288
+ if (modal.type !== ModalType.Select) {
16289
+ const cancelResult = !fromCloseButton && modal.cancelResult != null ? modal.cancelResult : false;
16290
+ return modal.resolveFunction(cancelResult);
16291
+ }
16292
+ modal.resolveFunction(this.modalResult);
16293
+ this.modalResult = null;
16294
+ }
16295
+ finally {
16296
+ if (!modal.show) {
16297
+ this.remove(modal);
16298
+ this.listenerMap.remove(modal);
16299
+ dist.eventBus.$emit('modal-cancel');
16300
+ }
16301
+ }
16302
+ }
16303
+ async handleCancelAll() {
16304
+ const confirm = await DialogManager.exec(new ConfirmDialog({
16305
+ title: 'Подтверждение',
16306
+ text: 'Возможно, вами были внесены изменения. Вы уверены, что хотите закрыть все окна?'
16307
+ }));
16308
+ if (!confirm) {
16309
+ return;
16310
+ }
16311
+ this.closeAll(true);
16312
+ }
16313
+ onSetProps(props, host) {
16314
+ const found = this.findModal(host);
16315
+ if (found) {
16316
+ found.componentProps = {
16317
+ ...found.componentProps,
16318
+ ...props
16319
+ };
16320
+ found.loading = false;
16321
+ }
16322
+ }
16323
+ onSetResult(modal, result) {
16324
+ modal.okLoading = false;
16325
+ this.modalResult = result;
16326
+ if (result) {
16327
+ if (modal.selectAsOk || this.isCreateEditDialog(modal)) {
16328
+ return this.handleOk(modal, result);
16329
+ }
16330
+ if (Array.isArray(result)) {
16331
+ modal.okDisabled = result.length === 0;
16332
+ }
16333
+ else {
16334
+ modal.okDisabled = false;
16335
+ }
16336
+ }
16337
+ else {
16338
+ modal.okDisabled = true;
16339
+ }
16340
+ }
16341
+ onSetResultAndClose(modal, result) {
16342
+ this.modalResult = result;
16343
+ if (result) {
16344
+ modal.show = false;
16345
+ return this.handleOk(modal, result);
16346
+ }
16347
+ modal.okDisabled = true;
16348
+ }
16349
+ onExpandCollapse(modal) {
16350
+ this.resizingModalId = modal.id;
16351
+ if (window.requestAnimationFrame) {
16352
+ window.requestAnimationFrame(() => {
16353
+ modal.expanded = !modal.expanded;
16354
+ const prevNoModal = modal.noModal;
16355
+ modal.noModal = !modal.expanded;
16356
+ window.requestAnimationFrame(() => {
16357
+ if (modal.noModal !== prevNoModal) {
16358
+ this.dialogManager.dialogModalChanged(modal);
16359
+ }
16360
+ setTimeout(() => {
16361
+ this.resizingModalId = null;
16362
+ }, 400);
16363
+ });
16364
+ });
16365
+ }
16366
+ }
16367
+ onMinimize(modal) {
16368
+ modal.minimized = !modal.minimized;
16369
+ this.dialogManager.dialogMinimizeChanged(modal);
16370
+ dist.eventBus.$emit('on-minimize', modal.minimized);
16371
+ }
16372
+ onActivate(modal) {
16373
+ modal.processingDescription = null;
16374
+ this.dialogManager.activate(modal);
16375
+ }
16376
+ onProcessing(modal, message) {
16377
+ if (message) {
16378
+ modal.processingDescription = message;
16379
+ }
16380
+ this.dialogManager.dialogProcessing(modal);
16381
+ }
16382
+ remove(modal) {
16383
+ modal.resolved = true;
16384
+ this.$nextTick(() => {
16385
+ const i = this.modals.indexOf(modal);
16386
+ if (i > -1) {
16387
+ this.modals.splice(i, 1);
16388
+ this.dialogManager.dialogClosed(modal);
16389
+ }
16390
+ });
16391
+ ;
16392
+ }
16393
+ isAlertDialog(modal) {
16394
+ return modal.type === ModalType.Alert;
16395
+ }
16396
+ isPromptDialog(modal) {
16397
+ return modal.type === ModalType.Prompt;
16398
+ }
16399
+ isConfirmDialog(modal) {
16400
+ return modal.type === ModalType.Confirm;
16401
+ }
16402
+ isInfoDialog(modal) {
16403
+ return modal.type === ModalType.Info;
16404
+ }
16405
+ isSelectDialog(modal) {
16406
+ return modal.type === ModalType.Select;
16407
+ }
16408
+ isCreateEditDialog(modal) {
16409
+ return modal.type === ModalType.CreateEdit;
16410
+ }
16411
+ isExpanded(modal) {
16412
+ if (!modal.expandable) {
16413
+ return false;
16414
+ }
16415
+ return modal.expanded;
16416
+ }
16417
+ isCollapsed(modal) {
16418
+ if (!modal.expandable) {
16419
+ return false;
16420
+ }
16421
+ return !modal.expanded;
16422
+ }
16423
+ setVisibility(id) {
16424
+ if (!this.resizingModalId) {
16425
+ return 'visible';
16426
+ }
16427
+ if (id === this.resizingModalId) {
16428
+ return 'hidden';
16429
+ }
16430
+ return 'visible';
16431
+ }
16432
+ okButtonText(modal) {
16433
+ if (modal.okTitle) {
16434
+ return modal.okTitle;
16435
+ }
16436
+ switch (modal.type) {
16437
+ case ModalType.Select:
16438
+ return 'Выбрать';
16439
+ case ModalType.Confirm:
16440
+ return 'Да';
16441
+ case ModalType.Info:
16442
+ return 'Закрыть';
16443
+ case ModalType.CreateEdit:
16444
+ return 'Сохранить';
16445
+ default:
16446
+ return 'Ок';
16447
+ }
16448
+ }
16449
+ cancelButtonText(modal) {
16450
+ if (modal.cancelTitle) {
16451
+ return modal.cancelTitle;
16452
+ }
16453
+ if (modal.type === ModalType.Confirm) {
16454
+ return 'Нет';
16455
+ }
16456
+ return 'Отменить';
16457
+ }
16458
+ onComponentInstanceCreated(modal, instance) {
16459
+ modal.componentInstance = instance;
16460
+ }
16461
+ dialogBindings(modal) {
16462
+ if (this.isMobileGlobal) {
16463
+ return {
16464
+ fullscreen: this.isSelectDialog(modal) || this.isCreateEditDialog(modal),
16465
+ fullWidth: true,
16466
+ transition: 'dialog-bottom-transition'
16467
+ };
16468
+ }
16469
+ return {
16470
+ width: this.modalWidth(modal),
16471
+ minWidth: '320',
16472
+ };
16473
+ }
16474
+ cardClasses(modal) {
16475
+ const result = ['card'];
16476
+ if (this.isMobileGlobal) {
16477
+ result.push('card--mobile');
16478
+ }
16479
+ if (!this.isSelectDialog(modal) && !this.isCreateEditDialog(modal)) {
16480
+ result.push(this.isMobileGlobal ? 'not-select-dialog' : 'card--simple');
16481
+ }
16482
+ return result;
16483
+ }
16484
+ isTitleDark(modal) {
16485
+ if (this.isMobileGlobal) {
16486
+ return this.isSelectDialog(modal) || this.isCreateEditDialog(modal);
16487
+ }
16488
+ return modal.darkTitle;
16489
+ }
16490
+ uniqKey(modal) {
16491
+ return `dlg-${modal.id}`;
16492
+ }
16493
+ findModal(host) {
16494
+ return this.modals.find(m => this.dialogManager.modalIdentity(m, host));
16495
+ }
16496
+ closeAll(all = false) {
16497
+ this.modals.forEach(modal => {
16498
+ if (all || !modal.noModal) {
16499
+ this.remove(modal);
16500
+ }
16501
+ });
16502
+ }
16503
+ get listenerMap() {
16504
+ let lastId = null;
16505
+ function set(modal, handler) {
16506
+ handler = handler.bind(this);
16507
+ lastId = modal.id;
16508
+ this.listeners.set(modal, handler);
16509
+ window.addEventListener('keydown', handler);
16510
+ }
16511
+ function remove(modal) {
16512
+ const m = this.modals.find(item => item.id === modal.id);
16513
+ const handler = this.listeners.get(m);
16514
+ window.removeEventListener('keydown', handler);
16515
+ this.listeners.delete(m);
16516
+ }
16517
+ function isLast(modal) {
16518
+ return modal.id === lastId;
16519
+ }
16520
+ return {
16521
+ set: set.bind(this),
16522
+ remove: remove.bind(this),
16523
+ isLast,
16524
+ };
16525
+ }
16526
+ };
16527
+ ld_dialogvue_type_script_lang_ts_external_decorate([
16528
+ Emit('modal-in-focus'),
16529
+ ld_dialogvue_type_script_lang_ts_external_metadata("design:type", Function),
16530
+ ld_dialogvue_type_script_lang_ts_external_metadata("design:paramtypes", [Boolean]),
16531
+ ld_dialogvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
16532
+ ], DialogComponent.prototype, "emitFocus", null);
16533
+ ld_dialogvue_type_script_lang_ts_external_decorate([
16534
+ (0,external_vue_property_decorator_.Watch)('modals', { deep: true }),
16535
+ ld_dialogvue_type_script_lang_ts_external_metadata("design:type", Function),
16536
+ ld_dialogvue_type_script_lang_ts_external_metadata("design:paramtypes", []),
16537
+ ld_dialogvue_type_script_lang_ts_external_metadata("design:returntype", void 0)
16538
+ ], DialogComponent.prototype, "onModalsChanged", null);
16539
+ DialogComponent = ld_dialogvue_type_script_lang_ts_external_decorate([
16540
+ (0,external_vue_class_component_.Options)({
16541
+ components: {
16542
+ minimized: dialog_minimized
16543
+ }
16544
+ })
16545
+ ], DialogComponent);
16546
+ /* harmony default export */ const ld_dialogvue_type_script_lang_ts_external = (DialogComponent);
16547
+
16548
+ ;// CONCATENATED MODULE: ./src/ld-dialog/ld-dialog.ts?vue&type=script&lang=ts&external
16549
+
16550
+ ;// CONCATENATED MODULE: ./src/ld-dialog/ld-dialog.vue
16551
+
16552
+
16553
+
16554
+
16555
+ ;
16556
+ 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]])
16557
+
16558
+ /* harmony default export */ const ld_dialog = (ld_dialog_exports_);
16559
+ ;// CONCATENATED MODULE: ./src/ld-dialog/index.ts
16560
+
16561
+ function ld_dialog_reg(vue, options) {
16562
+ vue.component(options.aliases['ld-dialog'], ld_dialog);
16563
+ }
16564
+ /* harmony default export */ const src_ld_dialog = (ld_dialog_reg);
16565
+
16566
+ // EXTERNAL MODULE: external "vue-toastification"
16567
+ var external_vue_toastification_ = __webpack_require__(7982);
16568
+ var external_vue_toastification_default = /*#__PURE__*/__webpack_require__.n(external_vue_toastification_);
16569
+ ;// CONCATENATED MODULE: ./src/vuetify.ts
16570
+ const aliases = {
16571
+ SmallButton: 'VBtn',
16572
+ SquareButton: 'VBtn',
16573
+ SmallChip: 'VChip',
16574
+ SmallBadge: 'VChip',
16575
+ };
16576
+ const defaults = {
16577
+ global: {
16578
+ ripple: false,
16579
+ density: 'compact',
16580
+ },
16581
+ SmallButton: {
16582
+ variant: 'flat',
16583
+ color: 'primary',
16584
+ class: 'small-button',
16585
+ },
16586
+ SquareButton: {
16587
+ variant: 'text',
16588
+ color: 'grey',
16589
+ class: 'square-sm-button',
16590
+ },
16591
+ SmallChip: {
16592
+ variant: 'outlined',
16593
+ color: 'primary',
16594
+ closable: true,
16595
+ closeIcon: 'close',
16596
+ class: 'small-chip',
16597
+ },
16598
+ SmallBadge: {
16599
+ class: 'v-chip--badge',
16600
+ variant: 'outlined',
16601
+ },
16602
+ VToolbar: {
16603
+ height: 60,
16604
+ density: 'default',
16605
+ },
16606
+ };
16607
+ function getAliases(components) {
16608
+ const result = {};
16609
+ for (const key in aliases) {
16610
+ result[key] = components[aliases[key]];
16611
+ }
16612
+ return result;
16613
+ }
16614
+
16615
+
16616
+ ;// CONCATENATED MODULE: ./src/directives/active.directive.ts
16617
+ const ActiveDirectiveOptions = {
16618
+ beforeMount(el, binding) {
16619
+ const className = '--active';
16620
+ const value = binding.value;
16621
+ el.classList[value ? 'add' : 'remove'](className);
16622
+ },
16623
+ updated(el, binding) {
16624
+ const className = '--active';
16625
+ const value = binding.value;
16626
+ el.classList[value ? 'add' : 'remove'](className);
16627
+ },
16628
+ };
16629
+
16630
+ ;// CONCATENATED MODULE: ./src/mixins/validate.mixin.ts
16631
+ var validate_mixin_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
16632
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16633
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
16634
+ 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;
16635
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
16636
+ };
16637
+ var validate_mixin_metadata = (undefined && undefined.__metadata) || function (k, v) {
16638
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
16639
+ };
16640
+
16641
+
16642
+ function validate() {
16643
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
16644
+ const errors = this.inputs.filter((input) => input.validate && !input.validate(true)).length;
16645
+ return !errors;
16646
+ }
16647
+ function register(input, section) {
16648
+ if (section) {
16649
+ this.section = section;
16650
+ }
16651
+ if (this.section && input.validate) {
16652
+ // eslint-disable-next-line @typescript-eslint/naming-convention
16653
+ input.__cardSection = this.section;
16654
+ }
16655
+ const unwatch = this.watchInput(input);
16656
+ this.inputs.push(input);
16657
+ this.watchers.push(unwatch);
16658
+ }
16659
+ function unregister(input) {
16660
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
16661
+ const found = this.inputs.find((i) => i.uid === input.uid);
16662
+ if (!found) {
16663
+ return;
16664
+ }
16665
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
16666
+ const unwatch = this.watchers.find((i) => i.uid === found.uid);
16667
+ if (unwatch.valid) {
16668
+ unwatch.valid();
16669
+ }
16670
+ if (unwatch.shouldValidate) {
16671
+ unwatch.shouldValidate();
16672
+ }
16673
+ let index = 0;
16674
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
16675
+ index = this.watchers.findIndex((i) => i.uid === found.uid);
16676
+ this.watchers.splice(index, 1);
16677
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
16678
+ index = this.inputs.findIndex((i) => i.uid === found.uid);
16679
+ this.inputs.splice(index, 1);
16680
+ delete this.errorBag[found.uid];
16681
+ }
16682
+ function validateSection(section) {
16683
+ const errors = this.inputs.filter(
16684
+ // eslint-disable-next-line eqeqeq, @typescript-eslint/no-explicit-any
16685
+ (input) => input.__cardSection == section && input.validate && !input.validate(true)).length;
16686
+ return !errors;
16687
+ }
16688
+ function watchInput(input) {
16689
+ const watcher = (_input) => _input.$watch('hasError', val => {
16690
+ this.errorBag[_input.uid] = val;
16691
+ }, { immediate: true });
16692
+ const watchers = {
16693
+ uid: input.uid,
16694
+ valid: null,
16695
+ shouldValidate: null,
16696
+ };
16697
+ if (this.lazyValidation) {
16698
+ // Only start watching inputs if we need to
16699
+ watchers.shouldValidate = input.$watch('shouldValidate', val => {
16700
+ if (!val) {
16701
+ return;
16702
+ }
16703
+ // Only watch if we're not already doing it
16704
+ if (Object.prototype.hasOwnProperty.call(this.errorBag, input.uid)) {
16705
+ return;
16706
+ }
16707
+ watchers.valid = watcher(input);
16708
+ });
16709
+ }
16710
+ else {
16711
+ watchers.valid = watcher(input);
14999
16712
  }
15000
16713
  return watchers;
15001
16714
  }
@@ -15148,67 +16861,6 @@ validate_mixin_decorate([
15148
16861
  ], ValidateMixin.prototype, "onErrorBagChanged", null);
15149
16862
  const ValidateMixinOptions = mixin;
15150
16863
 
15151
- ;// CONCATENATED MODULE: ./src/vuetify.ts
15152
- const aliases = {
15153
- SmallButton: 'VBtn',
15154
- SquareButton: 'VBtn',
15155
- SmallChip: 'VChip',
15156
- SmallBadge: 'VChip',
15157
- };
15158
- const defaults = {
15159
- global: {
15160
- ripple: false,
15161
- density: 'compact',
15162
- },
15163
- SmallButton: {
15164
- variant: 'flat',
15165
- color: 'primary',
15166
- class: 'small-button',
15167
- },
15168
- SquareButton: {
15169
- variant: 'text',
15170
- color: 'grey',
15171
- class: 'square-sm-button',
15172
- },
15173
- SmallChip: {
15174
- variant: 'outlined',
15175
- color: 'primary',
15176
- closable: true,
15177
- closeIcon: 'close',
15178
- class: 'small-chip',
15179
- },
15180
- SmallBadge: {
15181
- class: 'v-chip--badge',
15182
- variant: 'outlined',
15183
- },
15184
- VToolbar: {
15185
- height: 60,
15186
- density: 'default',
15187
- },
15188
- };
15189
- function getAliases(components) {
15190
- const result = {};
15191
- for (const key in aliases) {
15192
- result[key] = components[aliases[key]];
15193
- }
15194
- return result;
15195
- }
15196
-
15197
-
15198
- ;// CONCATENATED MODULE: ./src/directives/active.directive.ts
15199
- const ActiveDirectiveOptions = {
15200
- beforeMount(el, binding) {
15201
- const className = '--active';
15202
- const value = binding.value;
15203
- el.classList[value ? 'add' : 'remove'](className);
15204
- },
15205
- updated(el, binding) {
15206
- const className = '--active';
15207
- const value = binding.value;
15208
- el.classList[value ? 'add' : 'remove'](className);
15209
- },
15210
- };
15211
-
15212
16864
  ;// CONCATENATED MODULE: ./src/index.ts
15213
16865
 
15214
16866
 
@@ -15269,6 +16921,7 @@ const ldmuiPlugin = {
15269
16921
  'ld-edit-masked-text': options.aliases?.['ld-edit-masked-text'] ?? 'ld-edit-masked-text',
15270
16922
  'ld-text-markup': options.aliases?.['ld-text-markup'] ?? 'ld-text-markup',
15271
16923
  'ld-switch': options.aliases?.['ld-switch'] ?? 'ld-switch',
16924
+ 'ld-dialog': options.aliases?.['ld-dialog'] ?? 'ld-dialog',
15272
16925
  };
15273
16926
  vue.config.globalProperties.$utils = {
15274
16927
  ...src_utils_namespaceObject,
@@ -15318,11 +16971,17 @@ const ldmuiPlugin = {
15318
16971
  src_ld_edit_masked_text(vue, options);
15319
16972
  src_ld_text_markup(vue, options);
15320
16973
  src_ld_switch(vue, options);
16974
+ src_ld_dialog(vue, options);
15321
16975
  },
15322
16976
  };
15323
16977
  /* harmony default export */ const src = (ldmuiPlugin);
15324
16978
 
15325
16979
 
16980
+
16981
+
16982
+
16983
+
16984
+ })();
15326
16985
 
15327
16986
  /******/ return __webpack_exports__;
15328
16987
  /******/ })()