@ldmjs/ui 1.0.83 → 1.0.84

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.
@@ -1,6 +1,6 @@
1
1
  .ld-checkbox{display:flex;flex-direction:column;position:relative;min-height:var(--input-height);font-size:var(--font-size);cursor:pointer}.ld-checkbox input[type=checkbox]{position:absolute;top:0;left:0;width:100%;height:100%;opacity:0}.ld-checkbox input[type=checkbox]+.v-icon{display:flex;align-items:center;width:14px !important;height:15px !important;font-size:11px !important;background-color:var(--white);color:rgba(0,0,0,0);border:1px solid var(--grey-l-5)}.ld-checkbox input[type=checkbox]:focus+.v-icon{background-color:var(--grey-l-6)}.ld-checkbox input[type=checkbox]:focus+.v-icon svg{opacity:0}.ld-checkbox input[type=checkbox]:checked+.v-icon{background-color:var(--primary-l-2);border:1px solid var(--primary);color:var(--white);font-size:10px;font-weight:bold}.ld-checkbox input[type=checkbox]:checked+.v-icon svg{opacity:1}.ld-checkbox input[type=checkbox]:checked:focus+.v-icon{background-color:var(--primary-l-3)}.ld-checkbox input[type=checkbox]:checked:focus+.v-icon svg{opacity:1}.ld-checkbox input[type=checkbox]:checked:disabled+.v-icon{background-color:var(--grey-l-3);border:1px solid var(--grey-l-3)}.checkbox-label{word-wrap:break-word;max-width:100%}.checkbox-label--disabled{color:var(--grey-l-3) !important}
2
2
  .label[data-v-2b5031ea]{word-wrap:break-word;max-width:100%;padding-bottom:2px;color:var(--label) !important;font-size:var(--font-size)}.label-wrapper[data-v-2b5031ea]{display:flex;align-items:center;min-height:var(--input-height)}.require[data-v-2b5031ea]::after{content:"*";display:inline-block;color:var(--error)}
3
- .ld-combobox[data-v-37aed791]{display:flex;min-width:100%;max-width:100%;width:100%}.ld-combobox .combobox-validate[data-v-37aed791]{overflow:hidden;height:20px}.ld-combobox .combobox-loading[data-v-37aed791]{position:absolute;left:0;bottom:0;width:calc(100% - var(--input-height));height:3px;overflow:hidden;background-color:var(--grey-l-5)}.ld-combobox .combobox-loading[data-v-37aed791]:before{content:"";display:block;position:absolute;top:0;left:0;width:25%;height:100%;background-color:var(--primary);animation:loading-37aed791 1.4s linear;animation-iteration-count:infinite}@keyframes loading-37aed791{from{transform:translateX(-300%)}to{transform:translateX(500%)}}
3
+ .ld-combobox[data-v-219a56fa]{display:flex;min-width:100%;max-width:100%;width:100%}.ld-combobox .combobox-validate[data-v-219a56fa]{overflow:hidden;height:20px}.ld-combobox .combobox-loading[data-v-219a56fa]{position:absolute;left:0;bottom:0;width:calc(100% - var(--input-height));height:3px;overflow:hidden;background-color:var(--grey-l-5)}.ld-combobox .combobox-loading[data-v-219a56fa]:before{content:"";display:block;position:absolute;top:0;left:0;width:25%;height:100%;background-color:var(--primary);animation:loading-219a56fa 1.4s linear;animation-iteration-count:infinite}@keyframes loading-219a56fa{from{transform:translateX(-300%)}to{transform:translateX(500%)}}
4
4
  .ld-edit-list-box-validate[data-v-76c22520]{display:flex;align-items:center;overflow:hidden;height:20px}.ld-edit-list-box-validate>span[data-v-76c22520]{font-size:var(--font-size--1)}.edit-text-validate[data-v-76c22520]{overflow:hidden;height:20px;font-size:var(--font-size--1)}
5
5
  .ld-edit-masked-text[data-v-75b47890]{min-width:100%;font-size:inherit !important;display:flex}.ld-edit-masked-text .column[data-v-75b47890]{flex-flow:column}input[data-v-75b47890]{border:1px solid var(--grey-l-5);border-radius:var(--border-radius);width:100%;padding:0 8px;font-size:var(--font-size);height:var(--input-height)}input[data-v-75b47890]:focus,input[data-v-75b47890]:active{outline:none;border:1px solid var(--grey-l-4)}input[disabled][data-v-75b47890]{background-color:var(--grey-l-6);color:var(--grey)}.ld-edit-masked-text-validate[data-v-75b47890]{display:flex;align-items:center;overflow:hidden;height:20px;line-height:12px;font-size:var(--font-size--1)}
6
6
  .ld-edit-text[data-v-5f734745]{min-width:100%}.input-class[data-v-5f734745]{height:var(--input-height);font-size:var(--font-size);max-width:100%;border-radius:var(--border-radius);border:1px solid var(--grey-l-5);padding:0 6px}.input-class[data-v-5f734745]:not(.disabled){background-color:var(--white)}.input-class[data-v-5f734745]:focus{border:1px solid var(--grey-l-4);outline:none}.input-class__suffix[data-v-5f734745]{position:absolute;top:3px;right:6px;color:var(--label)}
@@ -8,8 +8,8 @@
8
8
  .v-toolbar[data-v-523d6f23]{position:relative;background-color:var(--white);box-shadow:var(--shadow-1);z-index:1}.toolbar-wrapper[data-v-523d6f23]{display:grid;width:100%;height:100%;padding:0 12px}.toolbar-wrapper[data-v-523d6f23]:not(.--preview){grid-template-columns:100%;grid-template-rows:var(--input-height);row-gap:4px}.toolbar-wrapper.--preview[data-v-523d6f23]{grid-template-columns:1fr}.toolbar-inner[data-v-523d6f23]{display:grid;grid-template-rows:100%;grid-template-columns:1fr max-content;column-gap:8px}.toolbar-caption[data-v-523d6f23]{--left: calc(var(--input-height) + 8px);display:flex;align-items:center;position:absolute;height:100%;width:calc(100% - var(--left));top:0;left:var(--left)}
9
9
  .ld-radiobutton[data-v-42a61559]{display:flex;align-items:center;font-size:var(--font-size)}
10
10
  .ld-ragiogroup .validate[data-v-572c2151]{overflow:hidden;height:20px}.ld-ragiogroup--row[data-v-572c2151] .ld-radiobutton:not(:first-child){margin-left:8px}
11
- .ld-select[data-v-b5dcc92c]{position:relative;min-width:100%}.ld-select[data-v-b5dcc92c] .v-field__append-inner{display:none}.ld-select[data-v-b5dcc92c] .v-select{position:relative}.ld-select[data-v-b5dcc92c] .v-select .v-input__control{position:relative}.ld-select[data-v-b5dcc92c] .v-select .v-input__control:before{display:block;position:absolute;right:20px;top:calc(var(--input-height)/2);margin-top:-2px;color:var(--grey);border-style:solid;border-width:5px 5px 0;border-color:var(--grey) rgba(0,0,0,0) rgba(0,0,0,0);transition:transform .2s ease;content:"";z-index:1}.ld-select[data-v-b5dcc92c] .v-input--readonly:before{opacity:.6}.ld-select[data-v-b5dcc92c] .v-select--active-menu .v-input__control:before{transform:rotate(180deg)}input[type=checkbox]+.v-icon[data-v-b5dcc92c]{display:block;width:12px !important;height:12px !important;font-size:10px !important;background-color:var(--white);color:rgba(0,0,0,0);border:1px solid var(--grey-l-5)}input[type=checkbox]:checked+.v-icon[data-v-b5dcc92c]{background-color:var(--primary-l-2);color:var(--white);font-size:10px;font-weight:bold}.v-list-item--density-compact.v-list-item--one-line[data-v-b5dcc92c]{min-height:var(--input-height)}.v-list-item--density-compact.v-list-item--one-line[data-v-b5dcc92c] .v-list-item__content{display:flex;flex-wrap:nowrap}.v-list-item--density-compact.v-list-item--one-line[data-v-b5dcc92c] .v-list-item__content .v-list-item-title{font-size:var(--font-size)}
12
- .ld-select-list-box[data-v-0c366c23]{display:flex;min-width:100%;max-width:100%;width:100%}.ld-select-list-box .select-list-box-validate[data-v-0c366c23]{overflow:hidden;height:20px}.ld-select-list-box .select-list-box-loading[data-v-0c366c23]{position:absolute;left:0;bottom:0;width:calc(100% - var(--input-height));height:3px;overflow:hidden;background-color:var(--grey-l-5)}.ld-select-list-box .select-list-box-loading[data-v-0c366c23]:before{content:"";display:block;position:absolute;top:0;left:0;width:25%;height:100%;background-color:var(--primary);animation:loading-0c366c23 1.4s linear;animation-iteration-count:infinite}@keyframes loading-0c366c23{from{transform:translateX(-300%)}to{transform:translateX(500%)}}
11
+ .ld-select[data-v-40d979ed]{position:relative;min-width:100%}.ld-select[data-v-40d979ed] .v-field__append-inner{display:none}.ld-select[data-v-40d979ed] .v-select{position:relative}.ld-select[data-v-40d979ed] .v-select .v-input__control{position:relative}.ld-select[data-v-40d979ed] .v-select .v-input__control:before{display:block;position:absolute;right:20px;top:calc(var(--input-height)/2);margin-top:-2px;color:var(--grey);border-style:solid;border-width:5px 5px 0;border-color:var(--grey) rgba(0,0,0,0) rgba(0,0,0,0);transition:transform .2s ease;content:"";z-index:1}.ld-select[data-v-40d979ed] .v-input--readonly:before{opacity:.6}.ld-select[data-v-40d979ed] .v-select--active-menu .v-input__control:before{transform:rotate(180deg)}input[type=checkbox]+.v-icon[data-v-40d979ed]{display:block;width:12px !important;height:12px !important;font-size:10px !important;background-color:var(--white);color:rgba(0,0,0,0);border:1px solid var(--grey-l-5)}input[type=checkbox]:checked+.v-icon[data-v-40d979ed]{background-color:var(--primary-l-2);color:var(--white);font-size:10px;font-weight:bold}.v-list-item--density-compact.v-list-item--one-line[data-v-40d979ed]{min-height:var(--input-height)}.v-list-item--density-compact.v-list-item--one-line[data-v-40d979ed] .v-list-item__content{display:flex;flex-wrap:nowrap}.v-list-item--density-compact.v-list-item--one-line[data-v-40d979ed] .v-list-item__content .v-list-item-title{font-size:var(--font-size)}
12
+ .ld-select-list-box[data-v-6f40f6fe]{display:flex;min-width:100%;max-width:100%;width:100%}.ld-select-list-box .select-list-box-validate[data-v-6f40f6fe]{overflow:hidden;height:20px}.ld-select-list-box .select-list-box-loading[data-v-6f40f6fe]{position:absolute;left:0;bottom:0;width:calc(100% - var(--input-height));height:3px;overflow:hidden;background-color:var(--grey-l-5)}.ld-select-list-box .select-list-box-loading[data-v-6f40f6fe]:before{content:"";display:block;position:absolute;top:0;left:0;width:25%;height:100%;background-color:var(--primary);animation:loading-6f40f6fe 1.4s linear;animation-iteration-count:infinite}@keyframes loading-6f40f6fe{from{transform:translateX(-300%)}to{transform:translateX(500%)}}
13
13
  .ld-splitter[data-v-57e95903]{height:inherit;display:flex}.ld-splitter .splitter-pane[data-v-57e95903]{height:inherit;overflow-y:auto;background:var(--white)}.ld-splitter .splitter[data-v-57e95903]{display:flex;background-color:var(--white) !important;border-color:var(--grey-l-5);border-style:solid}.ld-splitter .splitter--hor[data-v-57e95903]{justify-content:center;width:100%;height:7px;cursor:ns-resize;border-width:1px 0}.ld-splitter .splitter--hor.splitter--disabled[data-v-57e95903]{height:1px;border-top:none}.ld-splitter .splitter--ver[data-v-57e95903]{align-items:center;width:7px;height:100%;cursor:ew-resize;border-width:0 1px}.ld-splitter .splitter--ver.splitter--disabled[data-v-57e95903]{width:1px;border-left:none}.ld-splitter .splitter--disabled[data-v-57e95903]{cursor:default}.ld-splitter .splitter--disabled svg[data-v-57e95903]{display:none}.ld-splitter.splitter[data-v-57e95903]{width:100%;border-left:none;border-right:none}
14
14
  .ld-switch[data-v-649de2c4] .v-switch{display:block}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control{min-height:var(--input-height) !important}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control .v-selection-control__wrapper{width:40px}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control:not(.v-selection-control--dirty) .v-selection-control__input{transform:translateX(-12px)}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control:not(.v-selection-control--dirty) .v-switch__track{color:var(--grey-l-4) !important;background-color:var(--grey-l-4) !important}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control .v-switch__track{opacity:1;width:40px}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control--dirty .v-selection-control__input{transform:translateX(12px)}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control--dirty .v-switch__thumb{color:var(--primary-l-3) !important;background-color:var(--primary-l-3) !important}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control--dirty .v-switch__track{opacity:1;background-color:var(--primary-l-2) !important}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control--dirty .v-label{color:var(--primary-l-2) !important}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control .v-switch__thumb{color:var(--white) !important}.ld-switch[data-v-649de2c4] .v-switch .v-selection-control .v-label{padding-inline-start:4px}
15
15
  .ld-tabs[data-v-d5bf82f0]{margin-left:0;display:flex;height:100%;width:100%;overflow-y:auto}.ld-tabs .header-text[data-v-d5bf82f0]{font-size:var(--font-size-2)}.ld-tabs-mobile[data-v-d5bf82f0]{height:100%}.ld-tabs .vertical-body[data-v-d5bf82f0]{--w: 44px;display:flex;flex-flow:column nowrap;width:calc(100% - var(--w)) !important;height:100%}.v-window[data-v-d5bf82f0]{background-color:var(--white);box-shadow:1px 0 var(--grey-l-5),-1px 0 0 var(--grey-l-5);overflow-y:auto;height:100%;width:100%}.vertical-window.v-window[data-v-d5bf82f0]{padding:10px 12px;border-bottom:1px solid var(--grey-l-5);border-right:1px solid var(--grey-l-5);border-top:1px solid var(--grey-l-5)}.vertical-window.v-window--no-padding[data-v-d5bf82f0]{padding:0 !important}[data-v-d5bf82f0] .ld-tabs .v-tabs--vertical{background:var(--grey-l-6)}[data-v-d5bf82f0] .ld-tabs .v-tabs--vertical .v-tab{justify-content:flex-start;border:1px solid var(--grey-l-5);border-bottom:none;border-radius:0 !important;text-transform:none !important;width:100%;min-width:auto !important}[data-v-d5bf82f0] .ld-tabs .v-tabs--vertical .v-tab--selected{background-color:var(--white);border-right-color:rgba(0,0,0,0)}[data-v-d5bf82f0] .ld-tabs .v-tabs--vertical .v-tab:last-child{border-bottom:1px solid var(--grey-l-5) !important}[data-v-d5bf82f0] .ld-tabs .v-tabs--vertical .v-slide-group__content{flex-flow:column nowrap;height:100% !important;width:100% !important}[data-v-d5bf82f0] .ld-tabs .v-tabs--vertical .v-slide-group__content .v-btn__content{text-overflow:ellipsis;display:inline-flex;justify-content:flex-start;gap:4px;white-space:nowrap;overflow:hidden}[data-v-d5bf82f0] .ld-tabs .v-tabs--horizontal .v-tab--selected{border-bottom:1px solid var(--primary)}[data-v-d5bf82f0] .ld-tabs .v-tabs .v-tab--selected .v-btn__content{font-weight:bold;color:var(--primary) !important}[data-v-d5bf82f0] .ld-tabs .v-tabs.v-tabs--vertical.no-header .v-tab:first-child{border-top:none}[data-v-d5bf82f0] .ld-tabs .v-tab{height:var(--ld-tab-height) !important;display:flex !important;text-transform:uppercase !important;padding:0 12px !important;font-size:var(--font-size);color:var(--text) !important;letter-spacing:0 !important}[data-v-d5bf82f0] .v-window.mobile .tg-field .v-row .v-col{flex:1 0 0 !important}[data-v-d5bf82f0] .v-window.mobile .tg-field .text-viewer-wrapper .v-col{flex:1 0 0 !important}[data-v-d5bf82f0] .v-slide-group--vertical{border-color:var(--grey-l-5);border:1px}[data-v-d5bf82f0] .v-slide-group--vertical .v-tab__slider{width:0px}[data-v-d5bf82f0] .v-slide-group__prev{display:none}[data-v-d5bf82f0] .v-slide-group__next{display:none}[data-v-d5bf82f0] .v-tabs-bar{flex:none;height:fit-content;height:-moz-max-content;max-height:fit-content;max-height:-moz-max-content;z-index:1}[data-v-d5bf82f0] .v-window-item{height:100%}[data-v-d5bf82f0] .ld-tabs-mobile.hide-tabs .v-tab{display:none !important}[data-v-d5bf82f0] .ld-tabs-mobile.hide-body .v-slide-group{width:100% !important}[data-v-d5bf82f0] .ld-tabs-mobile.hide-body .v-window{display:none !important}[data-v-d5bf82f0] .v-tabs-mobile .v-slide-group__content .v-btn__content{display:block !important}
package/dist/index.js CHANGED
@@ -1114,6 +1114,19 @@ class InputMixin extends external_vue_property_decorator_.Vue {
1114
1114
  this.validate();
1115
1115
  }
1116
1116
  }
1117
+ mounted() {
1118
+ if (this.$utils.isDefined(this.autofocus) && this.$el instanceof HTMLElement) {
1119
+ const input = this.$el.querySelector('input[type="text"]');
1120
+ if (input) {
1121
+ input.setAttribute('autofocus', `${Boolean(this.autofocus)}`);
1122
+ return;
1123
+ }
1124
+ const textarea = this.$el.querySelector('textarea');
1125
+ if (textarea) {
1126
+ textarea.setAttribute('autofocus', `${Boolean(this.autofocus)}`);
1127
+ }
1128
+ }
1129
+ }
1117
1130
  get noDataPlaceholder() {
1118
1131
  return 'Нет данных';
1119
1132
  }
@@ -1147,7 +1160,7 @@ input_mixin_decorate([
1147
1160
  input_mixin_metadata("design:type", Object)
1148
1161
  ], InputMixin.prototype, "tabIndex", void 0);
1149
1162
  input_mixin_decorate([
1150
- (0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
1163
+ (0,external_vue_property_decorator_.Prop)({ type: Boolean, default: undefined }),
1151
1164
  input_mixin_metadata("design:type", Boolean)
1152
1165
  ], InputMixin.prototype, "autofocus", void 0);
1153
1166
  input_mixin_decorate([
@@ -1167,7 +1180,7 @@ input_mixin_decorate([
1167
1180
  input_mixin_metadata("design:type", String)
1168
1181
  ], InputMixin.prototype, "prependInnerIcon", void 0);
1169
1182
  input_mixin_decorate([
1170
- (0,external_vue_property_decorator_.Prop)({ type: String, default: '' }),
1183
+ (0,external_vue_property_decorator_.Prop)({ type: String, default: 'off' }),
1171
1184
  input_mixin_metadata("design:type", String)
1172
1185
  ], InputMixin.prototype, "autocomplete", void 0);
1173
1186
  input_mixin_decorate([
@@ -1506,17 +1519,17 @@ function ld_chip_reg(vue, options) {
1506
1519
  }
1507
1520
  /* harmony default export */ const src_ld_chip = (ld_chip_reg);
1508
1521
 
1509
- ;// ./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=37aed791&scoped=true&ts=true
1522
+ ;// ./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=219a56fa&scoped=true&ts=true
1510
1523
 
1511
- const ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_1 = {
1524
+ const ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_1 = {
1512
1525
  class: "w-full d-flex align-start overflow-hidden",
1513
1526
  style: { "border-radius": "var(--border-radius)" }
1514
1527
  };
1515
- const ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_2 = {
1528
+ const ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_2 = {
1516
1529
  class: "w-full d-flex position-relative",
1517
1530
  style: { "flex-basis": "100%" }
1518
1531
  };
1519
- const ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
1532
+ const ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
1520
1533
  const _hoisted_4 = {
1521
1534
  key: 0,
1522
1535
  class: "d-flex align-center"
@@ -1539,7 +1552,7 @@ const _hoisted_9 = {
1539
1552
  key: 0,
1540
1553
  class: "combobox-validate"
1541
1554
  };
1542
- function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
1555
+ function ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
1543
1556
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
1544
1557
  const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
1545
1558
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
@@ -1565,8 +1578,8 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1565
1578
  class: (0,external_vue_.normalizeClass)(_ctx.inputSizeClasses)
1566
1579
  }, {
1567
1580
  default: (0,external_vue_.withCtx)(() => [
1568
- (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_1, [
1569
- (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_2, [
1581
+ (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_1, [
1582
+ (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_2, [
1570
1583
  (0,external_vue_.createVNode)(_component_multiselect, {
1571
1584
  ref: "multiselect",
1572
1585
  modelValue: _ctx.selected,
@@ -1592,6 +1605,7 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1592
1605
  limit: _ctx.limit,
1593
1606
  tabindex: _ctx.tabIndex,
1594
1607
  allowEmpty: _ctx.allowEmpty,
1608
+ autofocus: _ctx.autofocus,
1595
1609
  onClose: _ctx.dropdownClose,
1596
1610
  onOpen: _ctx.goSearch,
1597
1611
  onSearchChange: _ctx.getItems
@@ -1609,7 +1623,7 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1609
1623
  "onClick:close": ($event) => (_ctx.onRemoveItem(option))
1610
1624
  }, {
1611
1625
  default: (0,external_vue_.withCtx)(() => [
1612
- (0,external_vue_.createElementVNode)("span", ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
1626
+ (0,external_vue_.createElementVNode)("span", ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
1613
1627
  ]),
1614
1628
  _: 2
1615
1629
  }, 1032, ["color", "closable", "onClick:close"]))
@@ -1675,7 +1689,7 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1675
1689
  (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.message), 1)
1676
1690
  ]),
1677
1691
  _: 3
1678
- }, 8, ["modelValue", "uid", "multiple", "placeholder", "options", "searchable", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allowEmpty", "onClose", "onOpen", "onSearchChange", "onUpdate:modelValue"]),
1692
+ }, 8, ["modelValue", "uid", "multiple", "placeholder", "options", "searchable", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allowEmpty", "autofocus", "onClose", "onOpen", "onSearchChange", "onUpdate:modelValue"]),
1679
1693
  _cache[7] || (_cache[7] = (0,external_vue_.createTextVNode)()),
1680
1694
  (_ctx.loading)
1681
1695
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", _hoisted_7))
@@ -1717,7 +1731,7 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1717
1731
  }));
1718
1732
  }
1719
1733
 
1720
- ;// ./src/ld-combobox/ld-combobox.vue?vue&type=template&id=37aed791&scoped=true&ts=true
1734
+ ;// ./src/ld-combobox/ld-combobox.vue?vue&type=template&id=219a56fa&scoped=true&ts=true
1721
1735
 
1722
1736
  ;// ./node_modules/lodash-es/isObject.js
1723
1737
  /**
@@ -5244,7 +5258,7 @@ SelectListBoxComponent = ld_comboboxvue_type_script_lang_ts_external_decorate([
5244
5258
  ;
5245
5259
 
5246
5260
 
5247
- const ld_combobox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_comboboxvue_type_script_lang_ts_external, [['render',ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render],['__scopeId',"data-v-37aed791"]])
5261
+ const ld_combobox_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_comboboxvue_type_script_lang_ts_external, [['render',ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_render],['__scopeId',"data-v-219a56fa"]])
5248
5262
 
5249
5263
  /* harmony default export */ const ld_combobox = (ld_combobox_exports_);
5250
5264
  ;// ./src/ld-combobox/index.ts
@@ -11695,19 +11709,19 @@ function ld_radiogroup_reg(vue, options) {
11695
11709
  }
11696
11710
  /* harmony default export */ const src_ld_radiogroup = (ld_radiogroup_reg);
11697
11711
 
11698
- ;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-select/ld-select.vue?vue&type=template&id=b5dcc92c&scoped=true&ts=true
11712
+ ;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-select/ld-select.vue?vue&type=template&id=40d979ed&scoped=true&ts=true
11699
11713
 
11700
- const ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_1 = { class: "ld-select" };
11701
- const ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_2 = { class: "d-flex align-start" };
11702
- const ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
11703
- const ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_4 = { class: "justify mr-2 flex items-center" };
11704
- const ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_5 = ["checked"];
11705
- const ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_6 = {
11714
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_1 = { class: "ld-select" };
11715
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_2 = { class: "d-flex align-start" };
11716
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
11717
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_4 = { class: "justify mr-2 flex items-center" };
11718
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_5 = ["checked"];
11719
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_6 = {
11706
11720
  key: 0,
11707
11721
  class: "d-flex align-center",
11708
11722
  style: { "height": "var(--input-height)" }
11709
11723
  };
11710
- function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
11724
+ function ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
11711
11725
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
11712
11726
  const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
11713
11727
  const _component_v_icon = (0,external_vue_.resolveComponent)("v-icon");
@@ -11716,7 +11730,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11716
11730
  const _component_ld_help = (0,external_vue_.resolveComponent)("ld-help");
11717
11731
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
11718
11732
  const _component_v_row = (0,external_vue_.resolveComponent)("v-row");
11719
- return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_1, [
11733
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_1, [
11720
11734
  (0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
11721
11735
  default: (0,external_vue_.withCtx)(() => [
11722
11736
  (_ctx.label)
@@ -11733,7 +11747,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11733
11747
  class: (0,external_vue_.normalizeClass)([_ctx.inputSizeClasses])
11734
11748
  }, {
11735
11749
  default: (0,external_vue_.withCtx)(() => [
11736
- (0,external_vue_.createElementVNode)("div", ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_2, [
11750
+ (0,external_vue_.createElementVNode)("div", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_2, [
11737
11751
  (0,external_vue_.createVNode)(_component_v_select, {
11738
11752
  ref: "select",
11739
11753
  modelValue: _ctx.selected,
@@ -11751,6 +11765,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11751
11765
  "error-messages": _ctx.validationMessage,
11752
11766
  readonly: _ctx.readonly,
11753
11767
  disabled: _ctx.disabled,
11768
+ autofocus: _ctx.autofocus,
11754
11769
  "menu-props": _ctx.multiselect
11755
11770
  ? {
11756
11771
  modelValue: _ctx.menu,
@@ -11800,7 +11815,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11800
11815
  item: item,
11801
11816
  index: index
11802
11817
  }, () => [
11803
- (0,external_vue_.createElementVNode)("span", ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(item.title), 1)
11818
+ (0,external_vue_.createElementVNode)("span", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_3, (0,external_vue_.toDisplayString)(item.title), 1)
11804
11819
  ], true)
11805
11820
  ]),
11806
11821
  item: (0,external_vue_.withCtx)(({ item, props }) => [
@@ -11809,13 +11824,13 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11809
11824
  ? {
11810
11825
  name: "prepend",
11811
11826
  fn: (0,external_vue_.withCtx)(() => [
11812
- (0,external_vue_.createElementVNode)("label", ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_4, [
11827
+ (0,external_vue_.createElementVNode)("label", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_4, [
11813
11828
  (0,external_vue_.createElementVNode)("input", {
11814
11829
  ref: "checkbox",
11815
11830
  type: "checkbox",
11816
11831
  class: "d-none",
11817
11832
  checked: _ctx.itemSelected(item.raw)
11818
- }, null, 8, ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_5),
11833
+ }, null, 8, ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_5),
11819
11834
  _cache[1] || (_cache[1] = (0,external_vue_.createTextVNode)()),
11820
11835
  (0,external_vue_.createVNode)(_component_v_icon, {
11821
11836
  icon: "check",
@@ -11834,10 +11849,10 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11834
11849
  }, (0,external_vue_.toDisplayString)(message), 3)
11835
11850
  ]),
11836
11851
  _: 3
11837
- }, 8, ["modelValue", "item-value", "item-title", "items", "rules", "placeholder", "hide-details", "multiple", "return-object", "error", "error-messages", "readonly", "disabled", "menu-props", "onBlur", "onFocus", "onClick"]),
11852
+ }, 8, ["modelValue", "item-value", "item-title", "items", "rules", "placeholder", "hide-details", "multiple", "return-object", "error", "error-messages", "readonly", "disabled", "autofocus", "menu-props", "onBlur", "onFocus", "onClick"]),
11838
11853
  _cache[4] || (_cache[4] = (0,external_vue_.createTextVNode)()),
11839
11854
  (_ctx.$utils.isDefined(_ctx.help))
11840
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_6, [
11855
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_6, [
11841
11856
  (0,external_vue_.createVNode)(_component_ld_help, {
11842
11857
  tooltip: _ctx.help.tooltip,
11843
11858
  link: _ctx.help.link
@@ -11854,7 +11869,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11854
11869
  ]));
11855
11870
  }
11856
11871
 
11857
- ;// ./src/ld-select/ld-select.vue?vue&type=template&id=b5dcc92c&scoped=true&ts=true
11872
+ ;// ./src/ld-select/ld-select.vue?vue&type=template&id=40d979ed&scoped=true&ts=true
11858
11873
 
11859
11874
  ;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-select/ld-select.ts?vue&type=script&lang=ts&external
11860
11875
  var ld_selectvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -12151,7 +12166,7 @@ SelectComponent = ld_selectvue_type_script_lang_ts_external_decorate([
12151
12166
  ;
12152
12167
 
12153
12168
 
12154
- const ld_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_selectvue_type_script_lang_ts_external, [['render',ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render],['__scopeId',"data-v-b5dcc92c"]])
12169
+ const ld_select_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(ld_selectvue_type_script_lang_ts_external, [['render',ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_render],['__scopeId',"data-v-40d979ed"]])
12155
12170
 
12156
12171
  /* harmony default export */ const ld_select = (ld_select_exports_);
12157
12172
  ;// ./src/ld-select/index.ts
@@ -12161,42 +12176,42 @@ function ld_select_reg(vue, options) {
12161
12176
  }
12162
12177
  /* harmony default export */ const src_ld_select = (ld_select_reg);
12163
12178
 
12164
- ;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=0c366c23&scoped=true&ts=true
12179
+ ;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use!./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=6f40f6fe&scoped=true&ts=true
12165
12180
 
12166
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_1 = {
12181
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_1 = {
12167
12182
  key: 0,
12168
12183
  class: "w-full d-flex align-start overflow-hidden",
12169
12184
  style: { "border-radius": "var(--border-radius)", "max-width": "100%" }
12170
12185
  };
12171
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_2 = { style: { "display": "block", "overflow": "hidden", "text-overflow": "ellipsis" } };
12172
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_3 = {
12186
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_2 = { style: { "display": "block", "overflow": "hidden", "text-overflow": "ellipsis" } };
12187
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_3 = {
12173
12188
  key: 0,
12174
12189
  class: "d-flex align-center"
12175
12190
  };
12176
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_4 = { class: "d-flex flex-column justify-center" };
12177
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_5 = {
12191
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_4 = { class: "d-flex flex-column justify-center" };
12192
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_5 = {
12178
12193
  key: 0,
12179
12194
  class: "grey--text",
12180
12195
  style: { "font-size": "var(--font-size--1)" }
12181
12196
  };
12182
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_6 = {
12197
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_6 = {
12183
12198
  key: 1,
12184
12199
  class: "select-list-box-loading"
12185
12200
  };
12186
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_7 = {
12201
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_7 = {
12187
12202
  class: "d-flex align-center",
12188
12203
  style: { "height": "var(--input-height)" }
12189
12204
  };
12190
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_8 = {
12205
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_8 = {
12191
12206
  key: 1,
12192
12207
  class: "w-full",
12193
12208
  style: { "min-height": "var(--input-height)" }
12194
12209
  };
12195
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_9 = {
12210
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_9 = {
12196
12211
  key: 2,
12197
12212
  class: "select-list-box-validate"
12198
12213
  };
12199
- function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
12214
+ function ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
12200
12215
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
12201
12216
  const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
12202
12217
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
@@ -12224,7 +12239,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12224
12239
  }, {
12225
12240
  default: (0,external_vue_.withCtx)(() => [
12226
12241
  (_ctx.multiselect || _ctx.selectedToArray.length === 0)
12227
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_1, [
12242
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_1, [
12228
12243
  (0,external_vue_.createElementVNode)("div", {
12229
12244
  class: "w-full d-flex position-relative",
12230
12245
  style: (0,external_vue_.normalizeStyle)({
@@ -12257,6 +12272,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12257
12272
  limit: _ctx.limit,
12258
12273
  tabindex: _ctx.tabIndex,
12259
12274
  "allow-empty": _ctx.allowEmpty,
12275
+ autofocus: _ctx.autofocus,
12260
12276
  onClose: _ctx.dropdownClose,
12261
12277
  onSearchChange: _ctx.getItems
12262
12278
  }, {
@@ -12273,7 +12289,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12273
12289
  "onClick:close": ($event) => (_ctx.onRemoveItem(option))
12274
12290
  }, {
12275
12291
  default: (0,external_vue_.withCtx)(() => [
12276
- (0,external_vue_.createElementVNode)("span", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_2, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
12292
+ (0,external_vue_.createElementVNode)("span", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_2, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, this.itemTitle)), 1)
12277
12293
  ]),
12278
12294
  _: 2
12279
12295
  }, 1032, ["color", "closable", "onClick:close"]))
@@ -12301,7 +12317,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12301
12317
  (0,external_vue_.createVNode)(_component_v_col, { class: "d-flex align-center" }, {
12302
12318
  default: (0,external_vue_.withCtx)(() => [
12303
12319
  (_ctx.multiselect)
12304
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_3, [
12320
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_3, [
12305
12321
  ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-checkbox']), {
12306
12322
  key: JSON.stringify(option),
12307
12323
  "model-value": _ctx.checkedItems,
@@ -12316,13 +12332,13 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12316
12332
  }, [
12317
12333
  (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),
12318
12334
  _cache[4] || (_cache[4] = (0,external_vue_.createTextVNode)()),
12319
- (0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_4, [
12335
+ (0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_4, [
12320
12336
  (0,external_vue_.renderSlot)(_ctx.$slots, "option", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option, isSelected: _ctx.checkedItems.includes(_ctx.itemIdentity(option)) })), () => [
12321
12337
  (0,external_vue_.createElementVNode)("div", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, _ctx.itemTitle)), 1)
12322
12338
  ], true),
12323
12339
  _cache[3] || (_cache[3] = (0,external_vue_.createTextVNode)()),
12324
12340
  (_ctx.optionHint)
12325
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_5, [
12341
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_5, [
12326
12342
  (0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), () => [
12327
12343
  _cache[2] || (_cache[2] = (0,external_vue_.createTextVNode)(" no slot \"option-hint\" found ", -1))
12328
12344
  ], true)
@@ -12341,7 +12357,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12341
12357
  (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.message), 1)
12342
12358
  ]),
12343
12359
  _: 3
12344
- }, 8, ["modelValue", "class", "style", "multiple", "placeholder", "options", "searchable", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allow-empty", "onClose", "onSearchChange", "onUpdate:modelValue"]),
12360
+ }, 8, ["modelValue", "class", "style", "multiple", "placeholder", "options", "searchable", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allow-empty", "autofocus", "onClose", "onSearchChange", "onUpdate:modelValue"]),
12345
12361
  _cache[9] || (_cache[9] = (0,external_vue_.createTextVNode)()),
12346
12362
  (!_ctx.isDialogDisabled)
12347
12363
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
@@ -12369,11 +12385,11 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12369
12385
  : (0,external_vue_.createCommentVNode)("", true),
12370
12386
  _cache[10] || (_cache[10] = (0,external_vue_.createTextVNode)()),
12371
12387
  (_ctx.loading)
12372
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_6))
12388
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_6))
12373
12389
  : (0,external_vue_.createCommentVNode)("", true)
12374
12390
  ], 4),
12375
12391
  _cache[11] || (_cache[11] = (0,external_vue_.createTextVNode)()),
12376
- (0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_7, [
12392
+ (0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_7, [
12377
12393
  (_ctx.$utils.isDefined(_ctx.help))
12378
12394
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_ld_help, {
12379
12395
  key: 0,
@@ -12386,7 +12402,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12386
12402
  : (0,external_vue_.createCommentVNode)("", true),
12387
12403
  _cache[12] || (_cache[12] = (0,external_vue_.createTextVNode)()),
12388
12404
  (!_ctx.multiselect && _ctx.$utils.isDefined(_ctx.singleItem))
12389
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_8, [
12405
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_8, [
12390
12406
  (0,external_vue_.renderSlot)(_ctx.$slots, "tag", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: _ctx.singleItem, canRemove: _ctx.canRemove, onRemove: _ctx.onRemoveItem })), () => [
12391
12407
  ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
12392
12408
  key: JSON.stringify(_ctx.selected),
@@ -12404,7 +12420,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12404
12420
  : (0,external_vue_.createCommentVNode)("", true),
12405
12421
  _cache[13] || (_cache[13] = (0,external_vue_.createTextVNode)()),
12406
12422
  (!_ctx.hideDetails)
12407
- ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_9, [
12423
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_9, [
12408
12424
  (0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
12409
12425
  default: (0,external_vue_.withCtx)(() => [
12410
12426
  (_ctx.showHint)
@@ -12427,7 +12443,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12427
12443
  }));
12428
12444
  }
12429
12445
 
12430
- ;// ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=0c366c23&scoped=true&ts=true
12446
+ ;// ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=6f40f6fe&scoped=true&ts=true
12431
12447
 
12432
12448
  ;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-select-list-box/ld-select-list-box.ts?vue&type=script&lang=ts&external
12433
12449
  var ld_select_list_boxvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -12929,7 +12945,7 @@ ld_select_list_boxvue_type_script_lang_ts_external_SelectListBoxComponent = ld_s
12929
12945
  ;
12930
12946
 
12931
12947
 
12932
- 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_0c366c23_scoped_true_ts_true_render],['__scopeId',"data-v-0c366c23"]])
12948
+ 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_6f40f6fe_scoped_true_ts_true_render],['__scopeId',"data-v-6f40f6fe"]])
12933
12949
 
12934
12950
  /* harmony default export */ const ld_select_list_box = (ld_select_list_box_exports_);
12935
12951
  ;// ./src/ld-select-list-box/index.ts
@@ -1 +1 @@
1
- (function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):"object"===typeof exports?exports["ldmui"]=t(require("vue")):e["ldmui"]=t(e["vue"])})(self,e=>(()=>{"use strict";var t={6262:(e,t)=>{t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[e,s]of t)i[e]=s;return i}},2380:t=>{t.exports=e}},i={};function __webpack_require__(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,__webpack_require__),l.exports}(()=>{__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var s={};__webpack_require__.r(s),__webpack_require__.d(s,{default:()=>N});var l=__webpack_require__(2380);const o=["tabindex","aria-owns"],n={ref:"tags",class:"multiselect__tags"},r={class:"multiselect__tags-wrap"},a=["textContent"],h=["onKeypress","onMousedown"],p={class:"multiselect__tag"},c=["textContent"],u={class:"multiselect__spinner"},d=["name","id","placeholder","value","disabled","tabindex","aria-controls"],m=["id"],g={key:0},f={class:"multiselect__option"},b=["id","role"],y=["onClick","onMouseenter","data-select","data-selected","data-deselect"],w=["data-select","data-deselect","onMouseenter","onMousedown"],V={class:"multiselect__option"},v={class:"multiselect__option"};function render(e,t,i,s,_,S){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{tabindex:e.searchable?-1:i.tabindex,class:(0,l.normalizeClass)([[e.uid?"multiselect"+e.uid:"",{"multiselect--active":e.isOpen,"multiselect--disabled":i.disabled,"multiselect--above":S.isAbove,"multiselect--has-options-group":S.hasOptionGroup,"multiselect--list-empty":e.isOpen&&!S.showNoResultsSlot&&!S.showNoOptionsSlot&&0===e.filteredOptions.length}],"multiselect"]),onFocus:t[12]||(t[12]=t=>e.activate()),onBlur:t[13]||(t[13]=t=>!e.searchable&&e.deactivate()),onKeydown:[t[14]||(t[14]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerForward(),["self","prevent"]),["down"])),t[15]||(t[15]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[16]||(t[16]=(0,l.withKeys)((0,l.withModifiers)(t=>e.addPointerElement(t),["stop","self"]),["enter","tab"])),onKeyup:t[17]||(t[17]=(0,l.withKeys)(t=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"caret",{toggle:e.toggle},()=>[(0,l.createElementVNode)("div",{onMousedown:t[0]||(t[0]=(0,l.withModifiers)(t=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),t[32]||(t[32]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"clear",{search:e.search}),t[33]||(t[33]=(0,l.createTextVNode)()),(0,l.createElementVNode)("div",n,[(0,l.renderSlot)(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:S.visibleValues,isOpen:e.isOpen},()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",r,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(S.visibleValues,(i,s)=>(0,l.renderSlot)(e.$slots,"tag",{option:i,search:e.search,remove:e.removeElement},()=>[((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:"multiselect__tag",key:s},[(0,l.createElementVNode)("span",{textContent:(0,l.toDisplayString)(e.getOptionLabel(i))},null,8,a),t[18]||(t[18]=(0,l.createTextVNode)()),(0,l.createElementVNode)("i",{tabindex:"1",onKeypress:(0,l.withKeys)((0,l.withModifiers)(t=>e.removeElement(i),["prevent"]),["enter"]),onMousedown:(0,l.withModifiers)(t=>e.removeElement(i),["prevent"]),class:"multiselect__tag-icon"},null,40,h)]))])),256)),t[19]||(t[19]=(0,l.createTextVNode)()),e.internalValue&&e.internalValue.length>i.limit?(0,l.renderSlot)(e.$slots,"tag-overflow",{key:0,limit:i.limit,count:e.internalValue.length},()=>[(0,l.createElementVNode)("span",p,[(0,l.createElementVNode)("strong",{class:"multiselect__strong",textContent:(0,l.toDisplayString)(i.limitText(e.internalValue.length-i.limit))},null,8,c)])]):(0,l.createCommentVNode)("",!0)],512),[[l.vShow,S.visibleValues.length>0]])]),t[20]||(t[20]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect__loading"},{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,"loading",{},()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",u,null,512),[[l.vShow,i.loading]])])]),_:3}),t[21]||(t[21]=(0,l.createTextVNode)()),e.searchable?((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:0,ref:"search",name:i.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:(0,l.normalizeStyle)(S.inputStyle),value:e.search,disabled:i.disabled,tabindex:i.tabindex,class:"multiselect__input","aria-controls":"listbox-"+e.id,onInput:t[1]||(t[1]=t=>e.updateSearch(t.target.value)),onFocus:t[2]||(t[2]=(0,l.withModifiers)(t=>e.activate(),["prevent"])),onKeyup:t[3]||(t[3]=(0,l.withKeys)(t=>e.deactivate(),["esc"])),onKeydown:[t[4]||(t[4]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerForward(),["prevent"]),["down"])),t[5]||(t[5]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerBackward(),["prevent"]),["up"])),t[7]||(t[7]=(0,l.withKeys)((0,l.withModifiers)(t=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[6]||(t[6]=(0,l.withKeys)((0,l.withModifiers)(t=>e.addPointerElement(t),["prevent","stop","self"]),["enter"]))},null,44,d)):(0,l.createCommentVNode)("",!0),t[22]||(t[22]=(0,l.createTextVNode)()),S.isSingleLabelVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,class:"multiselect__single",onMousedown:t[8]||(t[8]=(0,l.withModifiers)((...t)=>e.toggle&&e.toggle(...t),["prevent"]))},[(0,l.renderSlot)(e.$slots,"singleLabel",{option:S.singleValue},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.currentOptionLabel),1)])],32)):(0,l.createCommentVNode)("",!0),t[23]||(t[23]=(0,l.createTextVNode)()),S.isPlaceholderVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:2,class:"multiselect__placeholder",onMousedown:t[9]||(t[9]=(0,l.withModifiers)((...t)=>e.toggle&&e.toggle(...t),["prevent"]))},[(0,l.renderSlot)(e.$slots,"placeholder",{},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.placeholder),1)])],32)):(0,l.createCommentVNode)("",!0)],512),t[34]||(t[34]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect"},{default:(0,l.withCtx)(()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",{class:"multiselect__content-wrapper",onFocus:t[10]||(t[10]=(...t)=>e.activate&&e.activate(...t)),tabindex:"-1",onMousedown:t[11]||(t[11]=(0,l.withModifiers)(()=>{},["prevent"])),style:(0,l.normalizeStyle)({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[(0,l.createElementVNode)("ul",{class:"multiselect__content",style:(0,l.normalizeStyle)(S.contentStyle),role:"listbox",id:"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"beforeList"),t[27]||(t[27]=(0,l.createTextVNode)()),e.multiple&&e.max===e.internalValue.length?((0,l.openBlock)(),(0,l.createElementBlock)("li",g,[(0,l.createElementVNode)("span",f,[(0,l.renderSlot)(e.$slots,"maxElements",{},()=>[(0,l.createTextVNode)("Maximum of "+(0,l.toDisplayString)(e.max)+" options selected. First remove a selected option to select another.",1)])])])):(0,l.createCommentVNode)("",!0),t[28]||(t[28]=(0,l.createTextVNode)()),!e.max||e.internalValue.length<e.max?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:1},(0,l.renderList)(e.filteredOptions,(i,s)=>((0,l.openBlock)(),(0,l.createElementBlock)("li",{class:"multiselect__element",key:s,id:e.id+"-"+s,role:i&&(i.$isLabel||i.$isDisabled)?null:"option"},[i&&(i.$isLabel||i.$isDisabled)?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)([e.optionHighlight(s,i),"multiselect__option"]),onClick:(0,l.withModifiers)(t=>e.select(i),["stop"]),onMouseenter:(0,l.withModifiers)(t=>e.pointerSet(s),["self"]),"data-select":i&&i.isTag?e.tagPlaceholder:S.selectLabelText,"data-selected":S.selectedLabelText,"data-deselect":S.deselectLabelText},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)])],42,y)),t[24]||(t[24]=(0,l.createTextVNode)()),i&&(i.$isLabel||i.$isDisabled)?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,"data-select":e.groupSelect&&S.selectGroupLabelText,"data-deselect":e.groupSelect&&S.deselectGroupLabelText,class:(0,l.normalizeClass)([e.groupHighlight(s,i),"multiselect__option"]),onMouseenter:(0,l.withModifiers)(t=>e.groupSelect&&e.pointerSet(s),["self"]),onMousedown:(0,l.withModifiers)(t=>e.selectGroup(i),["prevent"])},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)])],42,w)):(0,l.createCommentVNode)("",!0)],8,b))),128)):(0,l.createCommentVNode)("",!0),t[29]||(t[29]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",V,[(0,l.renderSlot)(e.$slots,"noResult",{search:e.search},()=>[t[25]||(t[25]=(0,l.createTextVNode)("No elements found. Consider changing the search query.",-1))])])],512),[[l.vShow,S.showNoResultsSlot]]),t[30]||(t[30]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",v,[(0,l.renderSlot)(e.$slots,"noOptions",{},()=>[t[26]||(t[26]=(0,l.createTextVNode)("List is empty.",-1))])])],512),[[l.vShow,S.showNoOptionsSlot]]),t[31]||(t[31]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"afterList")],12,m)],36),[[l.vShow,e.isOpen]])]),_:3})],42,o)}function isEmpty(e){return 0!==e&&(!(!Array.isArray(e)||0!==e.length)||!e)}function not(e){return(...t)=>!e(...t)}function includes(e,t){void 0===e&&(e="undefined"),null===e&&(e="null"),!1===e&&(e="false");const i=e.toString().toLowerCase();return-1!==i.indexOf(t.trim())}function filterOptions(e,t,i,s){return t?e.filter(e=>includes(s(e,i),t)).sort((e,t)=>s(e,i).length-s(t,i).length):e}function stripGroups(e){return e.filter(e=>!e.$isLabel)}function flattenOptions(e,t){return i=>i.reduce((i,s)=>s[e]&&s[e].length?(i.push({$groupLabel:s[t],$isLabel:!0}),i.concat(s[e])):i,[])}function filterGroups(e,t,i,s,l){return o=>o.map(o=>{if(!o[i])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const n=filterOptions(o[i],e,t,l);return n.length?{[s]:o[s],[i]:n}:[]})}const flow=(...e)=>t=>e.reduce((e,t)=>t(e),t),_={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{uid:{type:String,default:""},internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return isEmpty(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||0===this.modelValue?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let i=this.options.concat();return i=this.internalSearch?this.groupValues?this.filterAndFlat(i,t,this.label):filterOptions(i,t,this.label,this.customLabel):this.groupValues?flattenOptions(this.groupValues,this.groupLabel)(i):i,i=this.hideSelected?i.filter(not(this.isSelected)):i,this.taggable&&t.length&&!this.isExistingOption(t)&&("bottom"===this.tagPosition?i.push({isTag:!0,label:e}):i.unshift({isTag:!0,label:e})),i.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){const e=this.groupValues?this.flatAndStrip(this.options):this.options;return e.map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:0===this.internalValue.length?null:this.internalValue[0]},filterAndFlat(e,t,i){return flow(filterGroups(t,i,this.groupValues,this.groupLabel,this.customLabel),flattenOptions(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return flow(flattenOptions(this.groupValues,this.groupLabel),stripGroups)(e)},updateSearch(e){this.search=e},isExistingOption(e){return!!this.options&&this.optionKeys.indexOf(e)>-1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(isEmpty(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return isEmpty(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect)this.selectGroup(e);else if(!(-1!==this.blockKeys.indexOf(t)||this.disabled||e.$isDisabled||e.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==t||this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{const i=this.isSelected(e);if(i)return void("Tab"!==t&&this.removeElement(e));this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(t=>t[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const e=this.internalValue.filter(e=>-1===t[this.groupValues].indexOf(e));this.$emit("update:modelValue",e)}else{let e=t[this.groupValues].filter(e=>!(this.isOptionDisabled(e)||this.isSelected(e)));this.max&&e.splice(this.max-this.internalValue.length),this.$emit("select",e,this.id),this.$emit("update:modelValue",this.internalValue.concat(e))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled)return;if(e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();const i="object"===typeof e?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const e=this.internalValue.slice(0,i).concat(this.internalValue.slice(i+1));this.$emit("update:modelValue",e)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){if(this.isOpen||this.disabled)return;this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||"undefined"!==typeof this.$el&&this.$el.focus(),this.$emit("open",this.id);const onMouseDown=e=>{if(e?.target){const t=this.uid?"multiselect"+this.uid:"multiselect",i=e.target.closest("."+t);Boolean(i)||(this.deactivate(),document.removeEventListener("mousedown",onMouseDown))}};setTimeout(()=>{document.addEventListener("mousedown",onMouseDown)},300)},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if("undefined"===typeof window)return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom,i=t>this.maxHeight;i||t>e||"below"===this.openDirection||"bottom"===this.openDirection?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},S={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const i=this.options.find(e=>e[this.groupLabel]===t.$groupLabel);return i&&!this.wholeGroupDisabled(i)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},x={name:"vue-multiselect",mixins:[_,S],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return!1},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.internalValue.slice(0,this.limit)},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.preferredOpenDirection},showSearchInput(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)},showNoResultsSlot(){return this.showNoResults&&0===this.filteredOptions.length&&this.search&&!this.loading},showNoOptionsSlot(){return this.showNoOptions&&(0===this.options.length||!0===this.hasOptionGroup&&0===this.filteredOptions.length)&&!this.search&&!this.loading}}};var O=__webpack_require__(6262);const L=(0,O.A)(x,[["render",render]]),$=L,N=$;return s})());
1
+ (function webpackUniversalModuleDefinition(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("vue")):"function"===typeof define&&define.amd?define(["vue"],t):"object"===typeof exports?exports["ldmui"]=t(require("vue")):e["ldmui"]=t(e["vue"])})(self,e=>(()=>{"use strict";var t={6262:(e,t)=>{t.A=(e,t)=>{const i=e.__vccOpts||e;for(const[e,s]of t)i[e]=s;return i}},2380:t=>{t.exports=e}},i={};function __webpack_require__(e){var s=i[e];if(void 0!==s)return s.exports;var l=i[e]={exports:{}};return t[e](l,l.exports,__webpack_require__),l.exports}(()=>{__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}})(),(()=>{__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})(),(()=>{__webpack_require__.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}})();var s={};__webpack_require__.r(s),__webpack_require__.d(s,{default:()=>N});var l=__webpack_require__(2380);const o=["tabindex","aria-owns"],n={ref:"tags",class:"multiselect__tags"},r={class:"multiselect__tags-wrap"},a=["textContent"],h=["onKeypress","onMousedown"],p={class:"multiselect__tag"},c=["textContent"],u={class:"multiselect__spinner"},d=["name","id","placeholder","value","disabled","tabindex","aria-controls"],m=["id"],g={key:0},f={class:"multiselect__option"},b=["id","role"],y=["onClick","onMouseenter","data-select","data-selected","data-deselect"],w=["data-select","data-deselect","onMouseenter","onMousedown"],V={class:"multiselect__option"},v={class:"multiselect__option"};function render(e,t,i,s,_,S){return(0,l.openBlock)(),(0,l.createElementBlock)("div",{tabindex:e.searchable?-1:i.tabindex,class:(0,l.normalizeClass)([[e.uid?"multiselect"+e.uid:"",{"multiselect--active":e.isOpen,"multiselect--disabled":i.disabled,"multiselect--above":S.isAbove,"multiselect--has-options-group":S.hasOptionGroup,"multiselect--list-empty":e.isOpen&&!S.showNoResultsSlot&&!S.showNoOptionsSlot&&0===e.filteredOptions.length}],"multiselect"]),onFocus:t[12]||(t[12]=t=>e.activate()),onBlur:t[13]||(t[13]=t=>!e.searchable&&e.deactivate()),onKeydown:[t[14]||(t[14]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerForward(),["self","prevent"]),["down"])),t[15]||(t[15]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:t[16]||(t[16]=(0,l.withKeys)((0,l.withModifiers)(t=>e.addPointerElement(t),["stop","self"]),["enter","tab"])),onKeyup:t[17]||(t[17]=(0,l.withKeys)(t=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"caret",{toggle:e.toggle},()=>[(0,l.createElementVNode)("div",{onMousedown:t[0]||(t[0]=(0,l.withModifiers)(t=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),t[32]||(t[32]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"clear",{search:e.search}),t[33]||(t[33]=(0,l.createTextVNode)()),(0,l.createElementVNode)("div",n,[(0,l.renderSlot)(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:S.visibleValues,isOpen:e.isOpen},()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",r,[((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,null,(0,l.renderList)(S.visibleValues,(i,s)=>(0,l.renderSlot)(e.$slots,"tag",{option:i,search:e.search,remove:e.removeElement},()=>[((0,l.openBlock)(),(0,l.createElementBlock)("span",{class:"multiselect__tag",key:s},[(0,l.createElementVNode)("span",{textContent:(0,l.toDisplayString)(e.getOptionLabel(i))},null,8,a),t[18]||(t[18]=(0,l.createTextVNode)()),(0,l.createElementVNode)("i",{tabindex:"1",onKeypress:(0,l.withKeys)((0,l.withModifiers)(t=>e.removeElement(i),["prevent"]),["enter"]),onMousedown:(0,l.withModifiers)(t=>e.removeElement(i),["prevent"]),class:"multiselect__tag-icon"},null,40,h)]))])),256)),t[19]||(t[19]=(0,l.createTextVNode)()),e.internalValue&&e.internalValue.length>i.limit?(0,l.renderSlot)(e.$slots,"tag-overflow",{key:0,limit:i.limit,count:e.internalValue.length},()=>[(0,l.createElementVNode)("span",p,[(0,l.createElementVNode)("strong",{class:"multiselect__strong",textContent:(0,l.toDisplayString)(i.limitText(e.internalValue.length-i.limit))},null,8,c)])]):(0,l.createCommentVNode)("",!0)],512),[[l.vShow,S.visibleValues.length>0]])]),t[20]||(t[20]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect__loading"},{default:(0,l.withCtx)(()=>[(0,l.renderSlot)(e.$slots,"loading",{},()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",u,null,512),[[l.vShow,i.loading]])])]),_:3}),t[21]||(t[21]=(0,l.createTextVNode)()),e.searchable?((0,l.openBlock)(),(0,l.createElementBlock)("input",{key:0,ref:"search",name:i.name,id:e.id||e.uid,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:(0,l.normalizeStyle)(S.inputStyle),value:e.search,disabled:i.disabled,tabindex:i.tabindex,class:"multiselect__input","aria-controls":"listbox-"+e.id,onInput:t[1]||(t[1]=t=>e.updateSearch(t.target.value)),onFocus:t[2]||(t[2]=(0,l.withModifiers)(t=>e.activate(),["prevent"])),onKeyup:t[3]||(t[3]=(0,l.withKeys)(t=>e.deactivate(),["esc"])),onKeydown:[t[4]||(t[4]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerForward(),["prevent"]),["down"])),t[5]||(t[5]=(0,l.withKeys)((0,l.withModifiers)(t=>e.pointerBackward(),["prevent"]),["up"])),t[7]||(t[7]=(0,l.withKeys)((0,l.withModifiers)(t=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:t[6]||(t[6]=(0,l.withKeys)((0,l.withModifiers)(t=>e.addPointerElement(t),["prevent","stop","self"]),["enter"]))},null,44,d)):(0,l.createCommentVNode)("",!0),t[22]||(t[22]=(0,l.createTextVNode)()),S.isSingleLabelVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,class:"multiselect__single",onMousedown:t[8]||(t[8]=(0,l.withModifiers)((...t)=>e.toggle&&e.toggle(...t),["prevent"]))},[(0,l.renderSlot)(e.$slots,"singleLabel",{option:S.singleValue},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.currentOptionLabel),1)])],32)):(0,l.createCommentVNode)("",!0),t[23]||(t[23]=(0,l.createTextVNode)()),S.isPlaceholderVisible?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:2,class:"multiselect__placeholder",onMousedown:t[9]||(t[9]=(0,l.withModifiers)((...t)=>e.toggle&&e.toggle(...t),["prevent"]))},[(0,l.renderSlot)(e.$slots,"placeholder",{},()=>[(0,l.createTextVNode)((0,l.toDisplayString)(e.placeholder),1)])],32)):(0,l.createCommentVNode)("",!0)],512),t[34]||(t[34]=(0,l.createTextVNode)()),(0,l.createVNode)(l.Transition,{name:"multiselect"},{default:(0,l.withCtx)(()=>[(0,l.withDirectives)((0,l.createElementVNode)("div",{class:"multiselect__content-wrapper",onFocus:t[10]||(t[10]=(...t)=>e.activate&&e.activate(...t)),tabindex:"-1",onMousedown:t[11]||(t[11]=(0,l.withModifiers)(()=>{},["prevent"])),style:(0,l.normalizeStyle)({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[(0,l.createElementVNode)("ul",{class:"multiselect__content",style:(0,l.normalizeStyle)(S.contentStyle),role:"listbox",id:"listbox-"+e.id},[(0,l.renderSlot)(e.$slots,"beforeList"),t[27]||(t[27]=(0,l.createTextVNode)()),e.multiple&&e.max===e.internalValue.length?((0,l.openBlock)(),(0,l.createElementBlock)("li",g,[(0,l.createElementVNode)("span",f,[(0,l.renderSlot)(e.$slots,"maxElements",{},()=>[(0,l.createTextVNode)("Maximum of "+(0,l.toDisplayString)(e.max)+" options selected. First remove a selected option to select another.",1)])])])):(0,l.createCommentVNode)("",!0),t[28]||(t[28]=(0,l.createTextVNode)()),!e.max||e.internalValue.length<e.max?((0,l.openBlock)(!0),(0,l.createElementBlock)(l.Fragment,{key:1},(0,l.renderList)(e.filteredOptions,(i,s)=>((0,l.openBlock)(),(0,l.createElementBlock)("li",{class:"multiselect__element",key:s,id:e.id+"-"+s,role:i&&(i.$isLabel||i.$isDisabled)?null:"option"},[i&&(i.$isLabel||i.$isDisabled)?(0,l.createCommentVNode)("",!0):((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:0,class:(0,l.normalizeClass)([e.optionHighlight(s,i),"multiselect__option"]),onClick:(0,l.withModifiers)(t=>e.select(i),["stop"]),onMouseenter:(0,l.withModifiers)(t=>e.pointerSet(s),["self"]),"data-select":i&&i.isTag?e.tagPlaceholder:S.selectLabelText,"data-selected":S.selectedLabelText,"data-deselect":S.deselectLabelText},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)])],42,y)),t[24]||(t[24]=(0,l.createTextVNode)()),i&&(i.$isLabel||i.$isDisabled)?((0,l.openBlock)(),(0,l.createElementBlock)("span",{key:1,"data-select":e.groupSelect&&S.selectGroupLabelText,"data-deselect":e.groupSelect&&S.deselectGroupLabelText,class:(0,l.normalizeClass)([e.groupHighlight(s,i),"multiselect__option"]),onMouseenter:(0,l.withModifiers)(t=>e.groupSelect&&e.pointerSet(s),["self"]),onMousedown:(0,l.withModifiers)(t=>e.selectGroup(i),["prevent"])},[(0,l.renderSlot)(e.$slots,"option",{option:i,search:e.search,index:s},()=>[(0,l.createElementVNode)("span",null,(0,l.toDisplayString)(e.getOptionLabel(i)),1)])],42,w)):(0,l.createCommentVNode)("",!0)],8,b))),128)):(0,l.createCommentVNode)("",!0),t[29]||(t[29]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",V,[(0,l.renderSlot)(e.$slots,"noResult",{search:e.search},()=>[t[25]||(t[25]=(0,l.createTextVNode)("No elements found. Consider changing the search query.",-1))])])],512),[[l.vShow,S.showNoResultsSlot]]),t[30]||(t[30]=(0,l.createTextVNode)()),(0,l.withDirectives)((0,l.createElementVNode)("li",null,[(0,l.createElementVNode)("span",v,[(0,l.renderSlot)(e.$slots,"noOptions",{},()=>[t[26]||(t[26]=(0,l.createTextVNode)("List is empty.",-1))])])],512),[[l.vShow,S.showNoOptionsSlot]]),t[31]||(t[31]=(0,l.createTextVNode)()),(0,l.renderSlot)(e.$slots,"afterList")],12,m)],36),[[l.vShow,e.isOpen]])]),_:3})],42,o)}function isEmpty(e){return 0!==e&&(!(!Array.isArray(e)||0!==e.length)||!e)}function not(e){return(...t)=>!e(...t)}function includes(e,t){void 0===e&&(e="undefined"),null===e&&(e="null"),!1===e&&(e="false");const i=e.toString().toLowerCase();return-1!==i.indexOf(t.trim())}function filterOptions(e,t,i,s){return t?e.filter(e=>includes(s(e,i),t)).sort((e,t)=>s(e,i).length-s(t,i).length):e}function stripGroups(e){return e.filter(e=>!e.$isLabel)}function flattenOptions(e,t){return i=>i.reduce((i,s)=>s[e]&&s[e].length?(i.push({$groupLabel:s[t],$isLabel:!0}),i.concat(s[e])):i,[])}function filterGroups(e,t,i,s,l){return o=>o.map(o=>{if(!o[i])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const n=filterOptions(o[i],e,t,l);return n.length?{[s]:o[s],[i]:n}:[]})}const flow=(...e)=>t=>e.reduce((e,t)=>t(e),t),_={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{uid:{type:String,default:""},internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,t){return isEmpty(e)?"":t?e[t]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||0===this.modelValue?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",t=e.toLowerCase().trim();let i=this.options.concat();return i=this.internalSearch?this.groupValues?this.filterAndFlat(i,t,this.label):filterOptions(i,t,this.label,this.customLabel):this.groupValues?flattenOptions(this.groupValues,this.groupLabel)(i):i,i=this.hideSelected?i.filter(not(this.isSelected)):i,this.taggable&&t.length&&!this.isExistingOption(t)&&("bottom"===this.tagPosition?i.push({isTag:!0,label:e}):i.unshift({isTag:!0,label:e})),i.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){const e=this.groupValues?this.flatAndStrip(this.options):this.options;return e.map(e=>this.customLabel(e,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:0===this.internalValue.length?null:this.internalValue[0]},filterAndFlat(e,t,i){return flow(filterGroups(t,i,this.groupValues,this.groupLabel,this.customLabel),flattenOptions(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return flow(flattenOptions(this.groupValues,this.groupLabel),stripGroups)(e)},updateSearch(e){this.search=e},isExistingOption(e){return!!this.options&&this.optionKeys.indexOf(e)>-1},isSelected(e){const t=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(t)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(isEmpty(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const t=this.customLabel(e,this.label);return isEmpty(t)?"":t},select(e,t){if(e.$isLabel&&this.groupSelect)this.selectGroup(e);else if(!(-1!==this.blockKeys.indexOf(t)||this.disabled||e.$isDisabled||e.$isLabel)&&(!this.max||!this.multiple||this.internalValue.length!==this.max)&&("Tab"!==t||this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{const i=this.isSelected(e);if(i)return void("Tab"!==t&&this.removeElement(e));this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const t=this.options.find(t=>t[this.groupLabel]===e.$groupLabel);if(t){if(this.wholeGroupSelected(t)){this.$emit("remove",t[this.groupValues],this.id);const e=this.internalValue.filter(e=>-1===t[this.groupValues].indexOf(e));this.$emit("update:modelValue",e)}else{let e=t[this.groupValues].filter(e=>!(this.isOptionDisabled(e)||this.isSelected(e)));this.max&&e.splice(this.max-this.internalValue.length),this.$emit("select",e,this.id),this.$emit("update:modelValue",this.internalValue.concat(e))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(e=>this.isSelected(e)||this.isOptionDisabled(e))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,t=!0){if(this.disabled)return;if(e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1)return void this.deactivate();const i="object"===typeof e?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const e=this.internalValue.slice(0,i).concat(this.internalValue.slice(i+1));this.$emit("update:modelValue",e)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&t&&this.deactivate()},removeLastElement(){-1===this.blockKeys.indexOf("Delete")&&0===this.search.length&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){if(this.isOpen||this.disabled)return;this.adjustPosition(),this.groupValues&&0===this.pointer&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||"undefined"!==typeof this.$el&&this.$el.focus(),this.$emit("open",this.id);const onMouseDown=e=>{if(e?.target){const t=this.uid?"multiselect"+this.uid:"multiselect",i=e.target.closest("."+t);Boolean(i)||(this.deactivate(),document.removeEventListener("mousedown",onMouseDown))}};setTimeout(()=>{document.addEventListener("mousedown",onMouseDown)},300)},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?this.$refs.search&&this.$refs.search.blur():this.$el&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if("undefined"===typeof window)return;const e=this.$el.getBoundingClientRect().top,t=window.innerHeight-this.$el.getBoundingClientRect().bottom,i=t>this.maxHeight;i||t>e||"below"===this.openDirection||"bottom"===this.openDirection?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(t-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},S={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,t){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(t)}},groupHighlight(e,t){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":t.$isLabel}];const i=this.options.find(e=>e[this.groupLabel]===t.$groupLabel);return i&&!this.wholeGroupDisabled(i)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}},x={name:"vue-multiselect",mixins:[_,S],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return!1},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.internalValue.slice(0,this.limit)},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return"above"===this.openDirection||"top"===this.openDirection||"below"!==this.openDirection&&"bottom"!==this.openDirection&&"above"===this.preferredOpenDirection},showSearchInput(){return this.searchable&&(!this.hasSingleSelectedSlot||!this.visibleSingleValue&&0!==this.visibleSingleValue||this.isOpen)},showNoResultsSlot(){return this.showNoResults&&0===this.filteredOptions.length&&this.search&&!this.loading},showNoOptionsSlot(){return this.showNoOptions&&(0===this.options.length||!0===this.hasOptionGroup&&0===this.filteredOptions.length)&&!this.search&&!this.loading}}};var O=__webpack_require__(6262);const L=(0,O.A)(x,[["render",render]]),$=L,N=$;return s})());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldmjs/ui",
3
- "version": "1.0.83",
3
+ "version": "1.0.84",
4
4
  "description": "ldm ui",
5
5
  "main": "dist/index.js",
6
6
  "engines": {
@@ -15,7 +15,7 @@
15
15
  "demo": "cross-env NODE_ENV=development webpack serve --config config/webpack.config.demo.js --progress --profile",
16
16
  "test": "jest --runInBand --no-cache",
17
17
  "lint": "npx eslint --cache --ext .ts src",
18
- "version": "node config/version.js",
18
+ "version": "node -v",
19
19
  "pub": "node config/publish.js && npm publish --access=public"
20
20
  },
21
21
  "repository": {