@ldmjs/ui 1.0.0-dev-16 → 1.0.0-dev-18
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/LICENSE +1 -1
- package/README.md +4 -1
- package/dist/css/index.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +113 -47
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -266,9 +266,12 @@ const items = [
|
|
|
266
266
|
<template #tag="{ item, onRemove }">
|
|
267
267
|
tag template
|
|
268
268
|
</template>
|
|
269
|
-
<template #option="{ item }">
|
|
269
|
+
<template #option="{ item, isSelected }">
|
|
270
270
|
option template
|
|
271
271
|
</template>
|
|
272
|
+
<template #option-icon="{ item, isSelected }">
|
|
273
|
+
option icon
|
|
274
|
+
</template>
|
|
272
275
|
<template #option-hint="{ item }">
|
|
273
276
|
option hint
|
|
274
277
|
</template>
|
package/dist/css/index.css
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
.v-toolbar[data-v-79e04ede]{position:relative;background-color:var(--white);box-shadow:var(--shadow-1);z-index:1}.toolbar-wrapper[data-v-79e04ede]{display:grid;width:100%;height:100%;padding:0 12px}.toolbar-wrapper[data-v-79e04ede]:not(.--preview){grid-template-columns:100%;grid-template-rows:var(--input-height);row-gap:4px}.toolbar-wrapper.--preview[data-v-79e04ede]{grid-template-columns:1fr}.toolbar-inner[data-v-79e04ede]{display:grid;grid-template-rows:100%;grid-template-columns:1fr max-content;column-gap:8px}.toolbar-caption[data-v-79e04ede]{--left: calc(var(--input-height) + 8px);display:flex;align-items:center;position:absolute;height:100%;width:calc(100% - var(--left));top:0;left:var(--left)}
|
|
14
14
|
|
|
15
|
-
.ld-select-list-box[data-v-
|
|
15
|
+
.ld-select-list-box[data-v-1cac121a]{display:flex;min-width:100%;max-width:100%;width:100%}.ld-select-list-box .select-list-textbox-validate[data-v-1cac121a]{overflow:hidden;height:20px}.ld-select-list-box .select-list-textbox-single[data-v-1cac121a]{max-width:400px;border-radius:var(--border-radius)}.ld-select-list-box .select-list-textbox-loading[data-v-1cac121a]{position:absolute;left:0;bottom:0;width:calc(100% - var(--input-height));height:3px;overflow:hidden;background-color:var(--grey-l-5)}.ld-select-list-box .select-list-textbox-loading[data-v-1cac121a]:before{content:'';display:block;position:absolute;top:0;left:0;width:25%;height:100%;background-color:var(--primary);animation:loading-1cac121a 1.4s linear;animation-iteration-count:infinite}@keyframes loading-1cac121a{from{transform:translateX(-300%)}to{transform:translateX(500%)}}[data-v-1cac121a] .ld-select-list-box.column{flex-flow:column}[data-v-1cac121a] .ld-select-list-box.column .multiselect__tags-wrap{flex-flow:wrap;align-items:normal}
|
|
16
16
|
|
|
17
17
|
.ld-checkbox{display:flex;align-items:center;height:var(--input-height);font-size:var(--font-size);cursor:pointer}.ld-checkbox input[type='checkbox']+.v-icon{display:block;width:12px !important;height:12px !important;font-size:10px !important;background-color:var(--white);color:transparent;border:1px solid var(--grey-l-5)}.ld-checkbox input[type='checkbox']:checked+.v-icon{background-color:var(--primary-l-2);color:var(--white);font-size:10px;font-weight:bold}.ld-checkbox input[type='checkbox']:disabled+.v-icon{background-color:var(--grey-l-3)}.checkbox-label{word-wrap:break-word;max-width:100%;color:var(--label) !important}.checkbox-label--disabled{color:var(--grey-l-3) !important}
|
|
18
18
|
|
package/dist/index.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ declare function deepValueGetter(obj: Record<string, unknown>, path: string): un
|
|
|
11
11
|
declare function isObjectEmpty(obj: Record<string, unknown>): boolean;
|
|
12
12
|
declare const datetime: {
|
|
13
13
|
dateLocalToISO: (value: string) => string;
|
|
14
|
+
toServerString: (value: Date) => string;
|
|
14
15
|
}
|
|
15
16
|
declare class ValidateMixin extends Vue {
|
|
16
17
|
inputs: Array<IInput>;
|
package/dist/index.js
CHANGED
|
@@ -3790,7 +3790,12 @@ let DatepickerComponent = class DatepickerComponent extends (0,external_vue_clas
|
|
|
3790
3790
|
this.emitUpdateModelValue(value instanceof Date ? value : new Date(value));
|
|
3791
3791
|
}
|
|
3792
3792
|
if (typeof this.modelValue === 'string') {
|
|
3793
|
-
|
|
3793
|
+
if (typeof value === 'string') {
|
|
3794
|
+
this.emitUpdateModelValue(value);
|
|
3795
|
+
}
|
|
3796
|
+
else {
|
|
3797
|
+
this.emitUpdateModelValue(this.$utils.datetime.toServerString(value));
|
|
3798
|
+
}
|
|
3794
3799
|
}
|
|
3795
3800
|
}
|
|
3796
3801
|
}
|
|
@@ -4512,25 +4517,25 @@ function ld_page_toolbar_reg(vue, options) {
|
|
|
4512
4517
|
}
|
|
4513
4518
|
/* harmony default export */ const src_ld_page_toolbar = (ld_page_toolbar_reg);
|
|
4514
4519
|
|
|
4515
|
-
;// 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[0]!./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=
|
|
4520
|
+
;// 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[0]!./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=1cac121a&scoped=true&ts=true
|
|
4516
4521
|
|
|
4517
|
-
const
|
|
4518
|
-
const
|
|
4519
|
-
const
|
|
4522
|
+
const ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_withScopeId = n => (_pushScopeId("data-v-1cac121a"), n = n(), _popScopeId(), n);
|
|
4523
|
+
const ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_1 = { class: "text-crop" };
|
|
4524
|
+
const ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_2 = {
|
|
4520
4525
|
key: 0,
|
|
4521
4526
|
class: "d-flex align-center"
|
|
4522
4527
|
};
|
|
4523
|
-
const
|
|
4524
|
-
const
|
|
4528
|
+
const ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_3 = { class: "d-flex flex-column justify-center" };
|
|
4529
|
+
const ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_4 = {
|
|
4525
4530
|
key: 0,
|
|
4526
4531
|
class: "grey--text",
|
|
4527
4532
|
style: { "font-size": "var(--font-size--1)" }
|
|
4528
4533
|
};
|
|
4529
|
-
const
|
|
4534
|
+
const ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_5 = {
|
|
4530
4535
|
key: 0,
|
|
4531
4536
|
class: "select-list-textbox-loading"
|
|
4532
4537
|
};
|
|
4533
|
-
const
|
|
4538
|
+
const ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_6 = {
|
|
4534
4539
|
key: 0,
|
|
4535
4540
|
class: "select-list-textbox-validate"
|
|
4536
4541
|
};
|
|
@@ -4538,7 +4543,7 @@ const _hoisted_7 = {
|
|
|
4538
4543
|
key: 0,
|
|
4539
4544
|
class: "select-list-textbox-validate"
|
|
4540
4545
|
};
|
|
4541
|
-
function
|
|
4546
|
+
function ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
4542
4547
|
const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
|
|
4543
4548
|
const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
|
|
4544
4549
|
const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
|
|
@@ -4590,7 +4595,7 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4590
4595
|
"select-label": '',
|
|
4591
4596
|
options: _ctx.optionsList,
|
|
4592
4597
|
searchable: true,
|
|
4593
|
-
"internal-search":
|
|
4598
|
+
"internal-search": _ctx.internalSearch,
|
|
4594
4599
|
"clear-on-select": true,
|
|
4595
4600
|
"close-on-select": !_ctx.multiselect,
|
|
4596
4601
|
"options-limit": 300,
|
|
@@ -4600,6 +4605,7 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4600
4605
|
disabled: _ctx.readonly || _ctx.disabled,
|
|
4601
4606
|
limit: _ctx.limit,
|
|
4602
4607
|
tabindex: _ctx.tabIndex,
|
|
4608
|
+
allowEmpty: _ctx.allowEmpty,
|
|
4603
4609
|
onClose: _ctx.dropdownClose,
|
|
4604
4610
|
onSearchChange: _ctx.getItems
|
|
4605
4611
|
}, {
|
|
@@ -4608,11 +4614,11 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4608
4614
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
4609
4615
|
key: JSON.stringify(option),
|
|
4610
4616
|
color: _ctx.disabled ? 'grey' : 'primary',
|
|
4611
|
-
closable: _ctx.
|
|
4617
|
+
closable: _ctx.canRemove,
|
|
4612
4618
|
"onClick:close": ($event) => (_ctx.onRemoveItem(option))
|
|
4613
4619
|
}, {
|
|
4614
4620
|
default: (0,external_vue_.withCtx)(() => [
|
|
4615
|
-
(0,external_vue_.createElementVNode)("span",
|
|
4621
|
+
(0,external_vue_.createElementVNode)("span", ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_1, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
|
|
4616
4622
|
]),
|
|
4617
4623
|
_: 2
|
|
4618
4624
|
}, 1032, ["color", "closable", "onClick:close"]))
|
|
@@ -4627,7 +4633,7 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4627
4633
|
(0,external_vue_.createVNode)(_component_v_col, { class: "d-flex align-center" }, {
|
|
4628
4634
|
default: (0,external_vue_.withCtx)(() => [
|
|
4629
4635
|
(_ctx.multiselect)
|
|
4630
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
4636
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_2, [
|
|
4631
4637
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-checkbox']), {
|
|
4632
4638
|
key: JSON.stringify(option),
|
|
4633
4639
|
"model-value": _ctx.checkedItems,
|
|
@@ -4637,19 +4643,25 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4637
4643
|
]))
|
|
4638
4644
|
: (0,external_vue_.createCommentVNode)("", true),
|
|
4639
4645
|
(0,external_vue_.createTextVNode)(),
|
|
4640
|
-
(0,external_vue_.createElementVNode)("div",
|
|
4641
|
-
(0,external_vue_.
|
|
4642
|
-
|
|
4643
|
-
|
|
4646
|
+
(0,external_vue_.createElementVNode)("div", {
|
|
4647
|
+
class: (0,external_vue_.normalizeClass)(["d-flex align-center", { 'ml-1': _ctx.multiselect }])
|
|
4648
|
+
}, [
|
|
4649
|
+
(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),
|
|
4644
4650
|
(0,external_vue_.createTextVNode)(),
|
|
4645
|
-
(
|
|
4646
|
-
|
|
4647
|
-
(0,external_vue_.
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4651
|
+
(0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_3, [
|
|
4652
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "option", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), () => [
|
|
4653
|
+
(0,external_vue_.createElementVNode)("div", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, _ctx.itemTitle)), 1)
|
|
4654
|
+
], true),
|
|
4655
|
+
(0,external_vue_.createTextVNode)(),
|
|
4656
|
+
(_ctx.optionHint)
|
|
4657
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_4, [
|
|
4658
|
+
(0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), () => [
|
|
4659
|
+
(0,external_vue_.createTextVNode)("\r\n no slot \"option-hint\" found\r\n ")
|
|
4660
|
+
], true)
|
|
4661
|
+
]))
|
|
4662
|
+
: (0,external_vue_.createCommentVNode)("", true)
|
|
4663
|
+
])
|
|
4664
|
+
], 2)
|
|
4653
4665
|
]),
|
|
4654
4666
|
_: 2
|
|
4655
4667
|
}, 1024)
|
|
@@ -4658,15 +4670,16 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4658
4670
|
}, 1024)
|
|
4659
4671
|
]),
|
|
4660
4672
|
noResult: (0,external_vue_.withCtx)(() => [
|
|
4661
|
-
(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.
|
|
4673
|
+
(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.message), 1)
|
|
4662
4674
|
]),
|
|
4663
4675
|
_: 3
|
|
4664
|
-
}, 8, ["modelValue", "multiple", "placeholder", "options", "close-on-select", "disabled", "limit", "tabindex", "onClose", "onSearchChange", "onUpdate:modelValue"]),
|
|
4676
|
+
}, 8, ["modelValue", "multiple", "placeholder", "options", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allowEmpty", "onClose", "onSearchChange", "onUpdate:modelValue"]),
|
|
4665
4677
|
(0,external_vue_.createTextVNode)(),
|
|
4666
4678
|
(0,external_vue_.createVNode)(_component_square_button, {
|
|
4667
4679
|
variant: "outlined",
|
|
4680
|
+
id: "selectButton",
|
|
4668
4681
|
color: "grey",
|
|
4669
|
-
disabled: _ctx.readonly || _ctx.disabled ||
|
|
4682
|
+
disabled: _ctx.readonly || _ctx.disabled || _ctx.disableDialog,
|
|
4670
4683
|
loading: _ctx.loading,
|
|
4671
4684
|
onClick: _ctx.onSelect
|
|
4672
4685
|
}, {
|
|
@@ -4684,7 +4697,7 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4684
4697
|
}, 8, ["disabled", "loading", "onClick"]),
|
|
4685
4698
|
(0,external_vue_.createTextVNode)(),
|
|
4686
4699
|
(_ctx.loading)
|
|
4687
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
4700
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_5))
|
|
4688
4701
|
: (0,external_vue_.createCommentVNode)("", true)
|
|
4689
4702
|
]),
|
|
4690
4703
|
_: 3
|
|
@@ -4694,7 +4707,7 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4694
4707
|
}),
|
|
4695
4708
|
(0,external_vue_.createTextVNode)(),
|
|
4696
4709
|
(!_ctx.hideDetails)
|
|
4697
|
-
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div",
|
|
4710
|
+
? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_hoisted_6, [
|
|
4698
4711
|
(0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
|
|
4699
4712
|
default: (0,external_vue_.withCtx)(() => [
|
|
4700
4713
|
(_ctx.showHint)
|
|
@@ -4723,12 +4736,12 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4723
4736
|
(0,external_vue_.renderSlot)(_ctx.$slots, "tag", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: _ctx.singeItem, onRemove: _ctx.onRemoveItem })), () => [
|
|
4724
4737
|
((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
|
|
4725
4738
|
key: JSON.stringify(_ctx.selected),
|
|
4726
|
-
closable:
|
|
4739
|
+
closable: _ctx.canRemove,
|
|
4727
4740
|
color: _ctx.disabled ? 'grey' : 'primary',
|
|
4728
4741
|
"onClick:close": _cache[1] || (_cache[1] = ($event) => (_ctx.onRemoveItem(_ctx.singeItem)))
|
|
4729
4742
|
}, {
|
|
4730
4743
|
default: (0,external_vue_.withCtx)(() => [
|
|
4731
|
-
(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(_ctx.singeItem, this.
|
|
4744
|
+
(0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(_ctx.singeItem, this.itemTitle)), 1)
|
|
4732
4745
|
]),
|
|
4733
4746
|
_: 1
|
|
4734
4747
|
}, 8, ["closable", "color"]))
|
|
@@ -4746,7 +4759,7 @@ function ld_select_list_boxvue_type_template_id_9fce65ba_scoped_true_ts_true_ren
|
|
|
4746
4759
|
}));
|
|
4747
4760
|
}
|
|
4748
4761
|
|
|
4749
|
-
;// CONCATENATED MODULE: ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=
|
|
4762
|
+
;// CONCATENATED MODULE: ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=1cac121a&scoped=true&ts=true
|
|
4750
4763
|
|
|
4751
4764
|
// EXTERNAL MODULE: external "./multiselect.js"
|
|
4752
4765
|
var external_multiselect_js_ = __webpack_require__(9225);
|
|
@@ -7092,7 +7105,8 @@ var ld_select_list_boxvue_type_script_lang_ts_external_decorate = (undefined &&
|
|
|
7092
7105
|
var ld_select_list_boxvue_type_script_lang_ts_external_metadata = (undefined && undefined.__metadata) || function (k, v) {
|
|
7093
7106
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
7094
7107
|
};
|
|
7095
|
-
var ld_select_list_boxvue_type_script_lang_ts_external_a
|
|
7108
|
+
var ld_select_list_boxvue_type_script_lang_ts_external_a;
|
|
7109
|
+
|
|
7096
7110
|
|
|
7097
7111
|
|
|
7098
7112
|
|
|
@@ -7117,7 +7131,12 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
7117
7131
|
this.getItems = null;
|
|
7118
7132
|
this.myRules = [];
|
|
7119
7133
|
this.errors = [];
|
|
7120
|
-
this.
|
|
7134
|
+
this.messagesBucket = {
|
|
7135
|
+
search: 'Идет поиск...',
|
|
7136
|
+
empty: 'Поиск не дал результатов',
|
|
7137
|
+
validation: ''
|
|
7138
|
+
};
|
|
7139
|
+
this.message = '';
|
|
7121
7140
|
this.loading = false;
|
|
7122
7141
|
}
|
|
7123
7142
|
emitUpdateValue() {
|
|
@@ -7175,7 +7194,11 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
7175
7194
|
}
|
|
7176
7195
|
}
|
|
7177
7196
|
created() {
|
|
7178
|
-
this.
|
|
7197
|
+
this.messagesBucket = {
|
|
7198
|
+
...this.messagesBucket,
|
|
7199
|
+
...this.messages,
|
|
7200
|
+
};
|
|
7201
|
+
this.message = this.messagesBucket.search;
|
|
7179
7202
|
this.getItems = lodash_es_debounce(this.goSearch.bind(this), 600);
|
|
7180
7203
|
if (this.form) {
|
|
7181
7204
|
this.form.register(this, null);
|
|
@@ -7199,11 +7222,11 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
7199
7222
|
if (!searchTerm) {
|
|
7200
7223
|
return;
|
|
7201
7224
|
}
|
|
7202
|
-
if (this.handlers.serverSearch instanceof Function) {
|
|
7225
|
+
if (this.handlers.serverSearch instanceof Function && !this.internalSearch) {
|
|
7203
7226
|
try {
|
|
7204
7227
|
const options = await this.handlers.serverSearch(searchTerm);
|
|
7205
7228
|
if (!options || !options.length) {
|
|
7206
|
-
this.
|
|
7229
|
+
this.message = this.messagesBucket.empty;
|
|
7207
7230
|
}
|
|
7208
7231
|
this.optionsList = options;
|
|
7209
7232
|
}
|
|
@@ -7233,13 +7256,17 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
7233
7256
|
}
|
|
7234
7257
|
validate() {
|
|
7235
7258
|
this.errorBucket = [];
|
|
7236
|
-
let funcResult =
|
|
7237
|
-
|
|
7259
|
+
let funcResult = requiredRule()(this.selectedToArray);
|
|
7260
|
+
if (funcResult !== true) {
|
|
7261
|
+
this.validationMessage = this.messagesBucket.validation || funcResult;
|
|
7262
|
+
return false;
|
|
7263
|
+
}
|
|
7238
7264
|
this.validRules.forEach(func => {
|
|
7239
7265
|
funcResult = func(this.selectedToArray);
|
|
7240
7266
|
if (funcResult !== true) {
|
|
7241
7267
|
this.validationMessage = funcResult;
|
|
7242
|
-
this.
|
|
7268
|
+
if (!this.selected)
|
|
7269
|
+
this.errorBucket.push(funcResult);
|
|
7243
7270
|
}
|
|
7244
7271
|
});
|
|
7245
7272
|
return !this.validationMessage;
|
|
@@ -7320,6 +7347,16 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
|
|
|
7320
7347
|
get showInput() {
|
|
7321
7348
|
return this.multiselect || !this.selectedIds.length;
|
|
7322
7349
|
}
|
|
7350
|
+
get canRemove() {
|
|
7351
|
+
const result = !this.readonly && !this.disabled;
|
|
7352
|
+
if (!result) {
|
|
7353
|
+
return false;
|
|
7354
|
+
}
|
|
7355
|
+
if (!this.allowEmpty && this.multiselect && Array.isArray(this.selected)) {
|
|
7356
|
+
return this.selected.length > 1;
|
|
7357
|
+
}
|
|
7358
|
+
return result;
|
|
7359
|
+
}
|
|
7323
7360
|
emitUpdate() {
|
|
7324
7361
|
this.emitUpdateValue();
|
|
7325
7362
|
this.emitUpdateItems();
|
|
@@ -7373,9 +7410,9 @@ ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
|
7373
7410
|
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", String)
|
|
7374
7411
|
], SelectListBoxComponent.prototype, "itemValue", void 0);
|
|
7375
7412
|
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
7376
|
-
(0,external_vue_property_decorator_.Prop)(),
|
|
7377
|
-
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type",
|
|
7378
|
-
], SelectListBoxComponent.prototype, "
|
|
7413
|
+
(0,external_vue_property_decorator_.Prop)({ type: Object, default: () => ({}) }),
|
|
7414
|
+
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", Object)
|
|
7415
|
+
], SelectListBoxComponent.prototype, "messages", void 0);
|
|
7379
7416
|
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
7380
7417
|
(0,external_vue_property_decorator_.Prop)(),
|
|
7381
7418
|
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", String)
|
|
@@ -7400,6 +7437,18 @@ ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
|
7400
7437
|
(0,external_vue_property_decorator_.Prop)({ default: 'more_horiz' }),
|
|
7401
7438
|
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", String)
|
|
7402
7439
|
], SelectListBoxComponent.prototype, "icon", void 0);
|
|
7440
|
+
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
7441
|
+
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
|
|
7442
|
+
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", Boolean)
|
|
7443
|
+
], SelectListBoxComponent.prototype, "internalSearch", void 0);
|
|
7444
|
+
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
7445
|
+
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: true }),
|
|
7446
|
+
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", Boolean)
|
|
7447
|
+
], SelectListBoxComponent.prototype, "allowEmpty", void 0);
|
|
7448
|
+
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
7449
|
+
(0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
|
|
7450
|
+
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", Boolean)
|
|
7451
|
+
], SelectListBoxComponent.prototype, "setFocus", void 0);
|
|
7403
7452
|
ld_select_list_boxvue_type_script_lang_ts_external_decorate([
|
|
7404
7453
|
(0,external_vue_property_decorator_.Prop)({ default: () => ({}) }),
|
|
7405
7454
|
ld_select_list_boxvue_type_script_lang_ts_external_metadata("design:type", Object)
|
|
@@ -7470,7 +7519,7 @@ SelectListBoxComponent = ld_select_list_boxvue_type_script_lang_ts_external_deco
|
|
|
7470
7519
|
;
|
|
7471
7520
|
|
|
7472
7521
|
|
|
7473
|
-
const ld_select_list_box_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_select_list_boxvue_type_script_lang_ts_external, [['render',
|
|
7522
|
+
const ld_select_list_box_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_select_list_boxvue_type_script_lang_ts_external, [['render',ld_select_list_boxvue_type_template_id_1cac121a_scoped_true_ts_true_render],['__scopeId',"data-v-1cac121a"]])
|
|
7474
7523
|
|
|
7475
7524
|
/* harmony default export */ const ld_select_list_box = (ld_select_list_box_exports_);
|
|
7476
7525
|
;// CONCATENATED MODULE: ./src/ld-select-list-box/index.ts
|
|
@@ -8831,8 +8880,25 @@ function dateLocalToISO(value) {
|
|
|
8831
8880
|
}
|
|
8832
8881
|
return '';
|
|
8833
8882
|
}
|
|
8883
|
+
/**
|
|
8884
|
+
* Преобразует дату к формату yyyy-MM-ddThh:mm:ss+hh:mm (например, 2020-11-24T12:47:45+03:00)
|
|
8885
|
+
* @param dt Date
|
|
8886
|
+
*/
|
|
8887
|
+
function toServerString(dt) {
|
|
8888
|
+
if (!dt) {
|
|
8889
|
+
return null;
|
|
8890
|
+
}
|
|
8891
|
+
const tzo = -dt.getTimezoneOffset();
|
|
8892
|
+
const dif = tzo >= 0 ? '+' : '-';
|
|
8893
|
+
const pad = function (num) {
|
|
8894
|
+
const norm = Math.abs(Math.floor(num));
|
|
8895
|
+
return (norm < 10 ? '0' : '') + norm;
|
|
8896
|
+
};
|
|
8897
|
+
return `${dt.getFullYear()}-${pad(dt.getMonth() + 1)}-${pad(dt.getDate())}T${pad(dt.getHours())}:${pad(dt.getMinutes())}:${pad(dt.getSeconds())}${dif}${pad(tzo / 60)}:${pad(tzo % 60)}`;
|
|
8898
|
+
}
|
|
8834
8899
|
const datetime = {
|
|
8835
|
-
dateLocalToISO
|
|
8900
|
+
dateLocalToISO,
|
|
8901
|
+
toServerString
|
|
8836
8902
|
};
|
|
8837
8903
|
|
|
8838
8904
|
|