@ldmjs/ui 1.0.83 → 1.0.85

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
@@ -428,11 +428,13 @@ class BreadcrumbsComponent extends external_vue_property_decorator_.Vue {
428
428
  if (item.disabled) {
429
429
  return;
430
430
  }
431
- if (!this.$router) {
432
- /* eslint-disable no-console */
433
- console.error('Router is undefined');
431
+ if (this.$attrs.onOpen instanceof Function) {
432
+ this.$attrs.onOpen(item);
434
433
  return;
435
434
  }
435
+ if (!this.$router) {
436
+ throw new Error('Router is undefined');
437
+ }
436
438
  if (item.route) {
437
439
  this.$router.push(item.route);
438
440
  }
@@ -1114,6 +1116,19 @@ class InputMixin extends external_vue_property_decorator_.Vue {
1114
1116
  this.validate();
1115
1117
  }
1116
1118
  }
1119
+ mounted() {
1120
+ if (this.$utils.isDefined(this.autofocus) && this.$el instanceof HTMLElement) {
1121
+ const input = this.$el.querySelector('input[type="text"]');
1122
+ if (input) {
1123
+ input.setAttribute('autofocus', `${Boolean(this.autofocus)}`);
1124
+ return;
1125
+ }
1126
+ const textarea = this.$el.querySelector('textarea');
1127
+ if (textarea) {
1128
+ textarea.setAttribute('autofocus', `${Boolean(this.autofocus)}`);
1129
+ }
1130
+ }
1131
+ }
1117
1132
  get noDataPlaceholder() {
1118
1133
  return 'Нет данных';
1119
1134
  }
@@ -1147,7 +1162,7 @@ input_mixin_decorate([
1147
1162
  input_mixin_metadata("design:type", Object)
1148
1163
  ], InputMixin.prototype, "tabIndex", void 0);
1149
1164
  input_mixin_decorate([
1150
- (0,external_vue_property_decorator_.Prop)({ type: Boolean, default: false }),
1165
+ (0,external_vue_property_decorator_.Prop)({ type: Boolean, default: undefined }),
1151
1166
  input_mixin_metadata("design:type", Boolean)
1152
1167
  ], InputMixin.prototype, "autofocus", void 0);
1153
1168
  input_mixin_decorate([
@@ -1167,7 +1182,7 @@ input_mixin_decorate([
1167
1182
  input_mixin_metadata("design:type", String)
1168
1183
  ], InputMixin.prototype, "prependInnerIcon", void 0);
1169
1184
  input_mixin_decorate([
1170
- (0,external_vue_property_decorator_.Prop)({ type: String, default: '' }),
1185
+ (0,external_vue_property_decorator_.Prop)({ type: String, default: 'off' }),
1171
1186
  input_mixin_metadata("design:type", String)
1172
1187
  ], InputMixin.prototype, "autocomplete", void 0);
1173
1188
  input_mixin_decorate([
@@ -1506,17 +1521,17 @@ function ld_chip_reg(vue, options) {
1506
1521
  }
1507
1522
  /* harmony default export */ const src_ld_chip = (ld_chip_reg);
1508
1523
 
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
1524
+ ;// ./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
1525
 
1511
- const ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_1 = {
1526
+ const ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_1 = {
1512
1527
  class: "w-full d-flex align-start overflow-hidden",
1513
1528
  style: { "border-radius": "var(--border-radius)" }
1514
1529
  };
1515
- const ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_2 = {
1530
+ const ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_2 = {
1516
1531
  class: "w-full d-flex position-relative",
1517
1532
  style: { "flex-basis": "100%" }
1518
1533
  };
1519
- const ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
1534
+ const ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
1520
1535
  const _hoisted_4 = {
1521
1536
  key: 0,
1522
1537
  class: "d-flex align-center"
@@ -1539,7 +1554,7 @@ const _hoisted_9 = {
1539
1554
  key: 0,
1540
1555
  class: "combobox-validate"
1541
1556
  };
1542
- function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
1557
+ function ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
1543
1558
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
1544
1559
  const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
1545
1560
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
@@ -1565,8 +1580,8 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1565
1580
  class: (0,external_vue_.normalizeClass)(_ctx.inputSizeClasses)
1566
1581
  }, {
1567
1582
  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, [
1583
+ (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_1, [
1584
+ (0,external_vue_.createElementVNode)("div", ld_comboboxvue_type_template_id_219a56fa_scoped_true_ts_true_hoisted_2, [
1570
1585
  (0,external_vue_.createVNode)(_component_multiselect, {
1571
1586
  ref: "multiselect",
1572
1587
  modelValue: _ctx.selected,
@@ -1592,6 +1607,7 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1592
1607
  limit: _ctx.limit,
1593
1608
  tabindex: _ctx.tabIndex,
1594
1609
  allowEmpty: _ctx.allowEmpty,
1610
+ autofocus: _ctx.autofocus,
1595
1611
  onClose: _ctx.dropdownClose,
1596
1612
  onOpen: _ctx.goSearch,
1597
1613
  onSearchChange: _ctx.getItems
@@ -1609,7 +1625,7 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1609
1625
  "onClick:close": ($event) => (_ctx.onRemoveItem(option))
1610
1626
  }, {
1611
1627
  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)
1628
+ (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
1629
  ]),
1614
1630
  _: 2
1615
1631
  }, 1032, ["color", "closable", "onClick:close"]))
@@ -1675,7 +1691,7 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1675
1691
  (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.message), 1)
1676
1692
  ]),
1677
1693
  _: 3
1678
- }, 8, ["modelValue", "uid", "multiple", "placeholder", "options", "searchable", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allowEmpty", "onClose", "onOpen", "onSearchChange", "onUpdate:modelValue"]),
1694
+ }, 8, ["modelValue", "uid", "multiple", "placeholder", "options", "searchable", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allowEmpty", "autofocus", "onClose", "onOpen", "onSearchChange", "onUpdate:modelValue"]),
1679
1695
  _cache[7] || (_cache[7] = (0,external_vue_.createTextVNode)()),
1680
1696
  (_ctx.loading)
1681
1697
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", _hoisted_7))
@@ -1717,7 +1733,7 @@ function ld_comboboxvue_type_template_id_37aed791_scoped_true_ts_true_render(_ct
1717
1733
  }));
1718
1734
  }
1719
1735
 
1720
- ;// ./src/ld-combobox/ld-combobox.vue?vue&type=template&id=37aed791&scoped=true&ts=true
1736
+ ;// ./src/ld-combobox/ld-combobox.vue?vue&type=template&id=219a56fa&scoped=true&ts=true
1721
1737
 
1722
1738
  ;// ./node_modules/lodash-es/isObject.js
1723
1739
  /**
@@ -5244,7 +5260,7 @@ SelectListBoxComponent = ld_comboboxvue_type_script_lang_ts_external_decorate([
5244
5260
  ;
5245
5261
 
5246
5262
 
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"]])
5263
+ 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
5264
 
5249
5265
  /* harmony default export */ const ld_combobox = (ld_combobox_exports_);
5250
5266
  ;// ./src/ld-combobox/index.ts
@@ -11695,19 +11711,19 @@ function ld_radiogroup_reg(vue, options) {
11695
11711
  }
11696
11712
  /* harmony default export */ const src_ld_radiogroup = (ld_radiogroup_reg);
11697
11713
 
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
11714
+ ;// ./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
11715
 
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 = {
11716
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_1 = { class: "ld-select" };
11717
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_2 = { class: "d-flex align-start" };
11718
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_3 = { class: "text-crop" };
11719
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_4 = { class: "justify mr-2 flex items-center" };
11720
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_5 = ["checked"];
11721
+ const ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_6 = {
11706
11722
  key: 0,
11707
11723
  class: "d-flex align-center",
11708
11724
  style: { "height": "var(--input-height)" }
11709
11725
  };
11710
- function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
11726
+ function ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
11711
11727
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
11712
11728
  const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
11713
11729
  const _component_v_icon = (0,external_vue_.resolveComponent)("v-icon");
@@ -11716,7 +11732,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11716
11732
  const _component_ld_help = (0,external_vue_.resolveComponent)("ld-help");
11717
11733
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
11718
11734
  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, [
11735
+ return ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_1, [
11720
11736
  (0,external_vue_.createVNode)(_component_v_row, { "no-gutters": "" }, {
11721
11737
  default: (0,external_vue_.withCtx)(() => [
11722
11738
  (_ctx.label)
@@ -11733,7 +11749,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11733
11749
  class: (0,external_vue_.normalizeClass)([_ctx.inputSizeClasses])
11734
11750
  }, {
11735
11751
  default: (0,external_vue_.withCtx)(() => [
11736
- (0,external_vue_.createElementVNode)("div", ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_2, [
11752
+ (0,external_vue_.createElementVNode)("div", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_2, [
11737
11753
  (0,external_vue_.createVNode)(_component_v_select, {
11738
11754
  ref: "select",
11739
11755
  modelValue: _ctx.selected,
@@ -11751,6 +11767,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11751
11767
  "error-messages": _ctx.validationMessage,
11752
11768
  readonly: _ctx.readonly,
11753
11769
  disabled: _ctx.disabled,
11770
+ autofocus: _ctx.autofocus,
11754
11771
  "menu-props": _ctx.multiselect
11755
11772
  ? {
11756
11773
  modelValue: _ctx.menu,
@@ -11800,7 +11817,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11800
11817
  item: item,
11801
11818
  index: index
11802
11819
  }, () => [
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)
11820
+ (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
11821
  ], true)
11805
11822
  ]),
11806
11823
  item: (0,external_vue_.withCtx)(({ item, props }) => [
@@ -11809,13 +11826,13 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11809
11826
  ? {
11810
11827
  name: "prepend",
11811
11828
  fn: (0,external_vue_.withCtx)(() => [
11812
- (0,external_vue_.createElementVNode)("label", ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_4, [
11829
+ (0,external_vue_.createElementVNode)("label", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_4, [
11813
11830
  (0,external_vue_.createElementVNode)("input", {
11814
11831
  ref: "checkbox",
11815
11832
  type: "checkbox",
11816
11833
  class: "d-none",
11817
11834
  checked: _ctx.itemSelected(item.raw)
11818
- }, null, 8, ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_hoisted_5),
11835
+ }, null, 8, ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_5),
11819
11836
  _cache[1] || (_cache[1] = (0,external_vue_.createTextVNode)()),
11820
11837
  (0,external_vue_.createVNode)(_component_v_icon, {
11821
11838
  icon: "check",
@@ -11834,10 +11851,10 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11834
11851
  }, (0,external_vue_.toDisplayString)(message), 3)
11835
11852
  ]),
11836
11853
  _: 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"]),
11854
+ }, 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
11855
  _cache[4] || (_cache[4] = (0,external_vue_.createTextVNode)()),
11839
11856
  (_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, [
11857
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_selectvue_type_template_id_40d979ed_scoped_true_ts_true_hoisted_6, [
11841
11858
  (0,external_vue_.createVNode)(_component_ld_help, {
11842
11859
  tooltip: _ctx.help.tooltip,
11843
11860
  link: _ctx.help.link
@@ -11854,7 +11871,7 @@ function ld_selectvue_type_template_id_b5dcc92c_scoped_true_ts_true_render(_ctx,
11854
11871
  ]));
11855
11872
  }
11856
11873
 
11857
- ;// ./src/ld-select/ld-select.vue?vue&type=template&id=b5dcc92c&scoped=true&ts=true
11874
+ ;// ./src/ld-select/ld-select.vue?vue&type=template&id=40d979ed&scoped=true&ts=true
11858
11875
 
11859
11876
  ;// ./node_modules/ts-loader/index.js??clonedRuleSet-1.use!./src/ld-select/ld-select.ts?vue&type=script&lang=ts&external
11860
11877
  var ld_selectvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -12151,7 +12168,7 @@ SelectComponent = ld_selectvue_type_script_lang_ts_external_decorate([
12151
12168
  ;
12152
12169
 
12153
12170
 
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"]])
12171
+ 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
12172
 
12156
12173
  /* harmony default export */ const ld_select = (ld_select_exports_);
12157
12174
  ;// ./src/ld-select/index.ts
@@ -12161,42 +12178,42 @@ function ld_select_reg(vue, options) {
12161
12178
  }
12162
12179
  /* harmony default export */ const src_ld_select = (ld_select_reg);
12163
12180
 
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
12181
+ ;// ./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
12182
 
12166
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_1 = {
12183
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_1 = {
12167
12184
  key: 0,
12168
12185
  class: "w-full d-flex align-start overflow-hidden",
12169
12186
  style: { "border-radius": "var(--border-radius)", "max-width": "100%" }
12170
12187
  };
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 = {
12188
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_2 = { style: { "display": "block", "overflow": "hidden", "text-overflow": "ellipsis" } };
12189
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_3 = {
12173
12190
  key: 0,
12174
12191
  class: "d-flex align-center"
12175
12192
  };
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 = {
12193
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_4 = { class: "d-flex flex-column justify-center" };
12194
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_5 = {
12178
12195
  key: 0,
12179
12196
  class: "grey--text",
12180
12197
  style: { "font-size": "var(--font-size--1)" }
12181
12198
  };
12182
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_6 = {
12199
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_6 = {
12183
12200
  key: 1,
12184
12201
  class: "select-list-box-loading"
12185
12202
  };
12186
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_7 = {
12203
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_7 = {
12187
12204
  class: "d-flex align-center",
12188
12205
  style: { "height": "var(--input-height)" }
12189
12206
  };
12190
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_8 = {
12207
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_8 = {
12191
12208
  key: 1,
12192
12209
  class: "w-full",
12193
12210
  style: { "min-height": "var(--input-height)" }
12194
12211
  };
12195
- const ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_hoisted_9 = {
12212
+ const ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_9 = {
12196
12213
  key: 2,
12197
12214
  class: "select-list-box-validate"
12198
12215
  };
12199
- function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
12216
+ function ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_render(_ctx, _cache, $props, $setup, $data, $options) {
12200
12217
  const _component_ld_label = (0,external_vue_.resolveComponent)("ld-label");
12201
12218
  const _component_small_chip = (0,external_vue_.resolveComponent)("small-chip");
12202
12219
  const _component_v_col = (0,external_vue_.resolveComponent)("v-col");
@@ -12224,7 +12241,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12224
12241
  }, {
12225
12242
  default: (0,external_vue_.withCtx)(() => [
12226
12243
  (_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, [
12244
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_1, [
12228
12245
  (0,external_vue_.createElementVNode)("div", {
12229
12246
  class: "w-full d-flex position-relative",
12230
12247
  style: (0,external_vue_.normalizeStyle)({
@@ -12257,6 +12274,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12257
12274
  limit: _ctx.limit,
12258
12275
  tabindex: _ctx.tabIndex,
12259
12276
  "allow-empty": _ctx.allowEmpty,
12277
+ autofocus: _ctx.autofocus,
12260
12278
  onClose: _ctx.dropdownClose,
12261
12279
  onSearchChange: _ctx.getItems
12262
12280
  }, {
@@ -12273,7 +12291,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12273
12291
  "onClick:close": ($event) => (_ctx.onRemoveItem(option))
12274
12292
  }, {
12275
12293
  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)
12294
+ (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
12295
  ]),
12278
12296
  _: 2
12279
12297
  }, 1032, ["color", "closable", "onClick:close"]))
@@ -12301,7 +12319,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12301
12319
  (0,external_vue_.createVNode)(_component_v_col, { class: "d-flex align-center" }, {
12302
12320
  default: (0,external_vue_.withCtx)(() => [
12303
12321
  (_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, [
12322
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_3, [
12305
12323
  ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)((0,external_vue_.resolveDynamicComponent)(_ctx.$ldmui.options.aliases['ld-checkbox']), {
12306
12324
  key: JSON.stringify(option),
12307
12325
  "model-value": _ctx.checkedItems,
@@ -12316,13 +12334,13 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12316
12334
  }, [
12317
12335
  (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
12336
  _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, [
12337
+ (0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_4, [
12320
12338
  (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
12339
  (0,external_vue_.createElementVNode)("div", null, (0,external_vue_.toDisplayString)(_ctx.$utils.deepValueGetter(option, _ctx.itemTitle)), 1)
12322
12340
  ], true),
12323
12341
  _cache[3] || (_cache[3] = (0,external_vue_.createTextVNode)()),
12324
12342
  (_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, [
12343
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_5, [
12326
12344
  (0,external_vue_.renderSlot)(_ctx.$slots, "option-hint", (0,external_vue_.normalizeProps)((0,external_vue_.guardReactiveProps)({ item: option })), () => [
12327
12345
  _cache[2] || (_cache[2] = (0,external_vue_.createTextVNode)(" no slot \"option-hint\" found ", -1))
12328
12346
  ], true)
@@ -12341,7 +12359,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12341
12359
  (0,external_vue_.createElementVNode)("span", null, (0,external_vue_.toDisplayString)(_ctx.message), 1)
12342
12360
  ]),
12343
12361
  _: 3
12344
- }, 8, ["modelValue", "class", "style", "multiple", "placeholder", "options", "searchable", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allow-empty", "onClose", "onSearchChange", "onUpdate:modelValue"]),
12362
+ }, 8, ["modelValue", "class", "style", "multiple", "placeholder", "options", "searchable", "internal-search", "close-on-select", "disabled", "limit", "tabindex", "allow-empty", "autofocus", "onClose", "onSearchChange", "onUpdate:modelValue"]),
12345
12363
  _cache[9] || (_cache[9] = (0,external_vue_.createTextVNode)()),
12346
12364
  (!_ctx.isDialogDisabled)
12347
12365
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_square_button, {
@@ -12369,11 +12387,11 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12369
12387
  : (0,external_vue_.createCommentVNode)("", true),
12370
12388
  _cache[10] || (_cache[10] = (0,external_vue_.createTextVNode)()),
12371
12389
  (_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))
12390
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_6))
12373
12391
  : (0,external_vue_.createCommentVNode)("", true)
12374
12392
  ], 4),
12375
12393
  _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, [
12394
+ (0,external_vue_.createElementVNode)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_7, [
12377
12395
  (_ctx.$utils.isDefined(_ctx.help))
12378
12396
  ? ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_ld_help, {
12379
12397
  key: 0,
@@ -12386,7 +12404,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12386
12404
  : (0,external_vue_.createCommentVNode)("", true),
12387
12405
  _cache[12] || (_cache[12] = (0,external_vue_.createTextVNode)()),
12388
12406
  (!_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, [
12407
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_8, [
12390
12408
  (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
12409
  ((0,external_vue_.openBlock)(), (0,external_vue_.createBlock)(_component_small_chip, {
12392
12410
  key: JSON.stringify(_ctx.selected),
@@ -12404,7 +12422,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12404
12422
  : (0,external_vue_.createCommentVNode)("", true),
12405
12423
  _cache[13] || (_cache[13] = (0,external_vue_.createTextVNode)()),
12406
12424
  (!_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, [
12425
+ ? ((0,external_vue_.openBlock)(), (0,external_vue_.createElementBlock)("div", ld_select_list_boxvue_type_template_id_6f40f6fe_scoped_true_ts_true_hoisted_9, [
12408
12426
  (0,external_vue_.createVNode)(external_vue_.Transition, { name: "squash" }, {
12409
12427
  default: (0,external_vue_.withCtx)(() => [
12410
12428
  (_ctx.showHint)
@@ -12427,7 +12445,7 @@ function ld_select_list_boxvue_type_template_id_0c366c23_scoped_true_ts_true_ren
12427
12445
  }));
12428
12446
  }
12429
12447
 
12430
- ;// ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=0c366c23&scoped=true&ts=true
12448
+ ;// ./src/ld-select-list-box/ld-select-list-box.vue?vue&type=template&id=6f40f6fe&scoped=true&ts=true
12431
12449
 
12432
12450
  ;// ./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
12451
  var ld_select_list_boxvue_type_script_lang_ts_external_decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -12929,7 +12947,7 @@ ld_select_list_boxvue_type_script_lang_ts_external_SelectListBoxComponent = ld_s
12929
12947
  ;
12930
12948
 
12931
12949
 
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"]])
12950
+ 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
12951
 
12934
12952
  /* harmony default export */ const ld_select_list_box = (ld_select_list_box_exports_);
12935
12953
  ;// ./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.85",
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": {