@datarailsshared/datarailsshared 1.6.151 → 1.6.155
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/datarailsshared-datarailsshared-1.6.155.tgz +0 -0
- package/esm2022/lib/dr-inputs/dr-select/dr-select.component.mjs +21 -6
- package/esm2022/lib/truncate-text/truncate-text.directive.mjs +125 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/datarailsshared-datarailsshared.mjs +142 -6
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/lib/dr-inputs/dr-select/dr-select.component.d.ts +10 -1
- package/lib/truncate-text/truncate-text.directive.d.ts +21 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/datarailsshared-datarailsshared-1.6.151.tgz +0 -0
|
@@ -1537,6 +1537,9 @@ class DrSelectComponent {
|
|
|
1537
1537
|
this.closeOnSelect = true;
|
|
1538
1538
|
this.noValuePadding = false;
|
|
1539
1539
|
this.selectOnTabKeyPress = false;
|
|
1540
|
+
this.virtualScroll = false;
|
|
1541
|
+
this.search = new EventEmitter();
|
|
1542
|
+
this.scrollToEnd = new EventEmitter();
|
|
1540
1543
|
this.change = new EventEmitter();
|
|
1541
1544
|
this.open = new EventEmitter();
|
|
1542
1545
|
this.closeUp = new EventEmitter();
|
|
@@ -1569,6 +1572,9 @@ class DrSelectComponent {
|
|
|
1569
1572
|
setDisabledState(isDisabled) {
|
|
1570
1573
|
this.disabled = isDisabled;
|
|
1571
1574
|
}
|
|
1575
|
+
openDropdown() {
|
|
1576
|
+
this.ngSelect.open();
|
|
1577
|
+
}
|
|
1572
1578
|
close() {
|
|
1573
1579
|
this.ngSelect.close();
|
|
1574
1580
|
}
|
|
@@ -1661,15 +1667,15 @@ class DrSelectComponent {
|
|
|
1661
1667
|
i0.ɵɵattribute("id", ctx.hostId);
|
|
1662
1668
|
i0.ɵɵclassMap(ctx.type);
|
|
1663
1669
|
i0.ɵɵclassProp("textView", ctx.asTextView);
|
|
1664
|
-
} }, inputs: { type: "type", clearInputTextAfterSelection: "clearInputTextAfterSelection", className: "className", items: "items", addTag: "addTag", appendTo: "appendTo", bindLabel: "bindLabel", bindValue: "bindValue", clearable: "clearable", searchable: "searchable", isDisplayingSearchInHeader: "isDisplayingSearchInHeader", minItemsToDisplaySearchInHeader: "minItemsToDisplaySearchInHeader", searchFn: "searchFn", multiple: "multiple", multipleHeightIncreased: "multipleHeightIncreased", hideSelected: "hideSelected", maxSelectedItems: "maxSelectedItems", placeholder: "placeholder", loading: "loading", loadingText: "loadingText", readonly: "readonly", disabled: "disabled", groupBy: "groupBy", optionWithDescription: "optionWithDescription", id: "id", keyDownFn: "keyDownFn", selectedItem: "selectedItem", dropdownClass: "dropdownClass", closeOnSelect: "closeOnSelect", textView: "textView", autofocus: "autofocus", isOpen: "isOpen", noValuePadding: "noValuePadding", selectOnTabKeyPress: "selectOnTabKeyPress" }, outputs: { change: "change", open: "open", closeUp: "closeUp" }, features: [i0.ɵɵProvidersFeature([
|
|
1670
|
+
} }, inputs: { type: "type", clearInputTextAfterSelection: "clearInputTextAfterSelection", className: "className", items: "items", addTag: "addTag", appendTo: "appendTo", bindLabel: "bindLabel", bindValue: "bindValue", clearable: "clearable", searchable: "searchable", isDisplayingSearchInHeader: "isDisplayingSearchInHeader", minItemsToDisplaySearchInHeader: "minItemsToDisplaySearchInHeader", searchFn: "searchFn", multiple: "multiple", multipleHeightIncreased: "multipleHeightIncreased", hideSelected: "hideSelected", maxSelectedItems: "maxSelectedItems", placeholder: "placeholder", loading: "loading", loadingText: "loadingText", readonly: "readonly", disabled: "disabled", groupBy: "groupBy", optionWithDescription: "optionWithDescription", id: "id", keyDownFn: "keyDownFn", selectedItem: "selectedItem", dropdownClass: "dropdownClass", closeOnSelect: "closeOnSelect", textView: "textView", autofocus: "autofocus", isOpen: "isOpen", noValuePadding: "noValuePadding", selectOnTabKeyPress: "selectOnTabKeyPress", virtualScroll: "virtualScroll", typeahead: "typeahead" }, outputs: { search: "search", scrollToEnd: "scrollToEnd", change: "change", open: "open", closeUp: "closeUp" }, features: [i0.ɵɵProvidersFeature([
|
|
1665
1671
|
{
|
|
1666
1672
|
provide: NG_VALUE_ACCESSOR,
|
|
1667
1673
|
useExisting: DrSelectComponent,
|
|
1668
1674
|
multi: true,
|
|
1669
1675
|
},
|
|
1670
|
-
])], decls: 12, vars:
|
|
1676
|
+
])], decls: 12, vars: 39, consts: [[1, "dr-select", 3, "ngModel", "items", "bindLabel", "bindValue", "multiple", "addTag", "appendTo", "clearable", "searchable", "hideSelected", "placeholder", "loading", "loadingText", "readonly", "closeOnSelect", "disabled", "labelForId", "maxSelectedItems", "keyDownFn", "searchFn", "isOpen", "groupBy", "selectOnTab", "virtualScroll", "typeahead", "ngModelChange", "search", "scrollToEnd", "keydown.tab", "change", "open", "close"], ["selectComponent", ""], [4, "ngIf"], ["ng-loadingspinner-tmp", ""], ["class", "search-icon dr-icon-search", 4, "ngIf"], ["ng-header-tmp", ""], [3, "ngTemplateOutlet", "ngTemplateOutletContext"], ["type", "search", 1, "dr-select__search", 3, "ngModel", "ngModelChange"], ["ng-label-tmp", ""], ["ng-multi-label-tmp", ""], ["ng-option-tmp", ""], [1, "dr-select__option-with-desc__wrapper"], [1, "dr-select__option-with-desc__description"], ["ng-footer-tmp", ""], ["ng-optgroup-tmp", ""], ["class", "dr-select__loading", 3, "drSpinner", "drSpinnerType", "drSpinnerSize", "drSpinnerNoOverlay", 4, "ngIf"], [1, "dr-select__loading", 3, "drSpinner", "drSpinnerType", "drSpinnerSize", "drSpinnerNoOverlay"], [1, "search-icon", "dr-icon-search"]], template: function DrSelectComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1671
1677
|
i0.ɵɵelementStart(0, "ng-select", 0, 1);
|
|
1672
|
-
i0.ɵɵlistener("ngModelChange", function DrSelectComponent_Template_ng_select_ngModelChange_0_listener($event) { return ctx.selectedItem = $event; })("keydown.tab", function DrSelectComponent_Template_ng_select_keydown_tab_0_listener($event) { return ctx.onTabKeypress($event); })("change", function DrSelectComponent_Template_ng_select_change_0_listener() { return ctx.onValueSelected(ctx.selectedItem); })("open", function DrSelectComponent_Template_ng_select_open_0_listener($event) { ctx.open.emit($event); return ctx.onDropdownOpen(); })("close", function DrSelectComponent_Template_ng_select_close_0_listener($event) { return ctx.onClose($event); });
|
|
1678
|
+
i0.ɵɵlistener("ngModelChange", function DrSelectComponent_Template_ng_select_ngModelChange_0_listener($event) { return ctx.selectedItem = $event; })("search", function DrSelectComponent_Template_ng_select_search_0_listener($event) { return ctx.search.emit($event); })("scrollToEnd", function DrSelectComponent_Template_ng_select_scrollToEnd_0_listener($event) { return ctx.scrollToEnd.emit($event); })("keydown.tab", function DrSelectComponent_Template_ng_select_keydown_tab_0_listener($event) { return ctx.onTabKeypress($event); })("change", function DrSelectComponent_Template_ng_select_change_0_listener() { return ctx.onValueSelected(ctx.selectedItem); })("open", function DrSelectComponent_Template_ng_select_open_0_listener($event) { ctx.open.emit($event); return ctx.onDropdownOpen(); })("close", function DrSelectComponent_Template_ng_select_close_0_listener($event) { return ctx.onClose($event); });
|
|
1673
1679
|
i0.ɵɵtemplate(2, DrSelectComponent_2_Template, 1, 0, null, 2);
|
|
1674
1680
|
i0.ɵɵtemplate(3, DrSelectComponent_3_Template, 1, 0, null, 2);
|
|
1675
1681
|
i0.ɵɵtemplate(4, DrSelectComponent_4_Template, 1, 0, null, 2);
|
|
@@ -1684,7 +1690,7 @@ class DrSelectComponent {
|
|
|
1684
1690
|
} if (rf & 2) {
|
|
1685
1691
|
const _r0 = i0.ɵɵreference(1);
|
|
1686
1692
|
i0.ɵɵclassProp("ng-select--no-value-padding", ctx.noValuePadding)("ng-select--multiple-height-increased", ctx.multipleHeightIncreased);
|
|
1687
|
-
i0.ɵɵproperty("ngModel", ctx.selectedItem)("items", ctx.items)("bindLabel", ctx.bindLabel)("bindValue", ctx.bindValue)("multiple", ctx.multiple)("addTag", ctx.addTag)("appendTo", ctx.appendTo)("clearable", ctx.clearable)("searchable", ctx.searchable)("hideSelected", ctx.hideSelected)("placeholder", ctx.placeholder)("loading", ctx.loading)("loadingText", ctx.loadingText)("readonly", ctx.readonly)("closeOnSelect", ctx.closeOnSelect)("disabled", ctx.disabled)("labelForId", ctx.id)("maxSelectedItems", ctx.maxSelectedItems)("keyDownFn", ctx.keyDownFn)("searchFn", ctx.searchFn)("isOpen", (ctx.type !== "search-input" || !!(_r0.searchTerm == null ? null : _r0.searchTerm.length)) && ctx.isOpen)("groupBy", ctx.groupBy)("selectOnTab", ctx.selectOnTabKeyPress);
|
|
1693
|
+
i0.ɵɵproperty("ngModel", ctx.selectedItem)("items", ctx.items)("bindLabel", ctx.bindLabel)("bindValue", ctx.bindValue)("multiple", ctx.multiple)("addTag", ctx.addTag)("appendTo", ctx.appendTo)("clearable", ctx.clearable)("searchable", ctx.searchable)("hideSelected", ctx.hideSelected)("placeholder", ctx.placeholder)("loading", ctx.loading)("loadingText", ctx.loadingText)("readonly", ctx.readonly)("closeOnSelect", ctx.closeOnSelect)("disabled", ctx.disabled)("labelForId", ctx.id)("maxSelectedItems", ctx.maxSelectedItems)("keyDownFn", ctx.keyDownFn)("searchFn", ctx.searchFn)("isOpen", (ctx.type !== "search-input" || !!(_r0.searchTerm == null ? null : _r0.searchTerm.length)) && ctx.isOpen)("groupBy", ctx.groupBy)("selectOnTab", ctx.selectOnTabKeyPress)("virtualScroll", ctx.virtualScroll)("typeahead", ctx.typeahead);
|
|
1688
1694
|
i0.ɵɵattribute("autofocus", ctx.autofocus);
|
|
1689
1695
|
i0.ɵɵadvance(2);
|
|
1690
1696
|
i0.ɵɵproperty("ngIf", ctx.optionHeaderTemplate);
|
|
@@ -1714,7 +1720,7 @@ class DrSelectComponent {
|
|
|
1714
1720
|
useExisting: DrSelectComponent,
|
|
1715
1721
|
multi: true,
|
|
1716
1722
|
},
|
|
1717
|
-
], template: "<ng-select\n [(ngModel)]=\"selectedItem\"\n [items]=\"items\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [multiple]=\"multiple\"\n [addTag]=\"addTag\"\n [appendTo]=\"appendTo\"\n [clearable]=\"clearable\"\n [searchable]=\"searchable\"\n [hideSelected]=\"hideSelected\"\n [placeholder]=\"placeholder\"\n [loading]=\"loading\"\n [loadingText]=\"loadingText\"\n [readonly]=\"readonly\"\n [closeOnSelect]=\"closeOnSelect\"\n [disabled]=\"disabled\"\n [labelForId]=\"id\"\n [maxSelectedItems]=\"maxSelectedItems\"\n [keyDownFn]=\"keyDownFn\"\n [searchFn]=\"searchFn\"\n [isOpen]=\"(type !== 'search-input' || !!selectComponent.searchTerm?.length) && isOpen\"\n [groupBy]=\"groupBy\"\n [attr.autofocus]=\"autofocus\"\n [selectOnTab]=\"selectOnTabKeyPress\"\n (keydown.tab)=\"onTabKeypress($event)\"\n (change)=\"onValueSelected(selectedItem)\"\n (open)=\"open.emit($event); onDropdownOpen()\"\n (close)=\"onClose($event)\"\n class=\"dr-select\"\n [class.ng-select--no-value-padding]=\"noValuePadding\"\n [class.ng-select--multiple-height-increased]=\"multipleHeightIncreased\"\n #selectComponent>\n <ng-template *ngIf=\"optionHeaderTemplate\" ng-header-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionHeaderTemplate\" [ngTemplateOutletContext]=\"{ item: item }\"></ng-container>\n </ng-template>\n <ng-template\n ng-header-tmp\n *ngIf=\"!optionHeaderTemplate && isDisplayingSearchInHeader && items?.length >= minItemsToDisplaySearchInHeader\"\n let-item=\"item\">\n <dr-input\n class=\"dr-select__search\"\n [ngModel]=\"selectComponent.searchTerm\"\n (ngModelChange)=\"selectComponent.itemsList.filter($event + '')\"\n type=\"search\">\n </dr-input>\n </ng-template>\n <ng-template *ngIf=\"labelTemplate\" ng-label-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"{ item: item }\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"multiLabelTemplate\" ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\n <ng-container [ngTemplateOutlet]=\"multiLabelTemplate\" [ngTemplateOutletContext]=\"{ items: items, clear: clear }\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionTemplate\" ng-option-tmp let-item=\"item\" let-item$=\"item$\">\n <ng-container [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{ item: item, item$: item$ }\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionWithDescription\" ng-option-tmp let-item=\"item\">\n <div class=\"dr-select__option-with-desc__wrapper\">\n <div>{{ item.name }}</div>\n <div class=\"dr-select__option-with-desc__description\">{{ item?.description }}</div>\n </div>\n </ng-template>\n <ng-template *ngIf=\"optionFooterTemplate\" ng-footer-tmp let-item=\"item\">\n <ng-container\n [ngTemplateOutlet]=\"optionFooterTemplate\"\n [ngTemplateOutletContext]=\"{ item: item, close: selectComponent.close.bind(selectComponent) }\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"groupBy\" ng-optgroup-tmp let-item=\"item\">\n {{ item[groupBy] }}\n </ng-template>\n <ng-template ng-loadingspinner-tmp>\n <div\n *ngIf=\"loading\"\n class=\"dr-select__loading\"\n [drSpinner]=\"loading\"\n [drSpinnerType]=\"'circle'\"\n [drSpinnerSize]=\"'small'\"\n [drSpinnerNoOverlay]=\"true\"></div>\n </ng-template>\n</ng-select>\n<i *ngIf=\"type === 'search-input'\" class=\"search-icon dr-icon-search\"></i>\n", styles: [":host{width:100%;height:32px;font-family:Poppins,sans-serif}:host.textView::ng-deep{width:auto}:host.textView::ng-deep ng-select.ng-select .ng-select-container{border:none!important;cursor:pointer}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0;color:#4646ce}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-value-container:hover{text-decoration-line:underline}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper{display:none}:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#fff!important;border:none!important;cursor:default}:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#aeabac!important}:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-input input::placeholder{color:#aeabac}:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-value-container:hover{text-decoration-line:none}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px;border:1px solid #9ea1aa;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#4646ce}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#4646ce}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{font-size:14px;line-height:24px;font-weight:400;top:0!important;padding:0 50px 0 8px!important;color:#333}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input input::placeholder{font-size:14px;line-height:24px;font-weight:400;color:#6d6e6f}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{font-size:14px;line-height:24px;font-weight:400;padding:0 0 0 8px;height:100%;overflow:auto}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper{margin-right:7px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper .ng-arrow{border:none;width:auto;height:auto;display:flex;text-decoration-line:none;top:0}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper .ng-arrow:before{font-family:DataRails!important;content:\"\\ea17\";font-size:24px;color:#6d6e6f}:host ::ng-deep ng-select.ng-select.ng-select-opened .ng-select-container{border-radius:6px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{font-size:14px;line-height:24px;font-weight:400;max-height:58px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{font-size:12px;line-height:16px;font-weight:400;color:#333;height:24px;padding:2px 16px;margin:2px 4px 2px 0;background:#f0f1f4;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0!important;width:20px;display:flex;align-items:center;color:transparent;margin-left:4px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:before{font-family:DataRails!important;content:\"\\ea73\";font-size:20px;color:#333}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#f0f1f4!important;border:1px solid #aeabac!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#aeabac!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-arrow{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-arrow:before{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-input input::placeholder{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#bf1d30}:host ::ng-deep ng-select.ng-select--multiple-height-increased.ng-select-multiple .ng-select-container{max-height:88px}:host ::ng-deep ng-select.ng-select--multiple-height-increased.ng-select-multiple .ng-select-container .ng-value-container{max-height:88px}:host ::ng-deep ng-select.ng-select--no-value-padding .ng-select-container .ng-value-container .ng-value,:host ::ng-deep ng-select.ng-select--no-value-padding.ng-select-multiple .ng-select-container .ng-value-container .ng-value{padding:0}:host ::ng-deep ng-select.ng-select--no-value-padding .ng-select-container .ng-value-container .ng-value .ng-select-user-label,:host ::ng-deep ng-select.ng-select--no-value-padding.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-select-user-label{height:100%}:host.ng-invalid.ng-touched::ng-deep ng-select.ng-select .ng-select-container{border-color:#bf1d30}:host .dr-select__loading{position:relative;height:32px;width:24px}:host.search-input{position:relative}:host.search-input .search-icon{position:absolute;top:4px;right:16px;color:#6d6e6f;z-index:1001}:host.search-input::ng-deep ng-select.ng-select .ng-select-container{border-radius:16px}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper{display:none!important}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-clear-wrapper{display:flex;justify-content:center;align-items:center;right:40px;top:1px;width:24px;height:24px}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-clear-wrapper .ng-clear{font-size:24px;font-weight:300;color:#6d6e6f}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-input,:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 16px!important;width:calc(100% - 63px)}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-input input,:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-value-container input{height:100%}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{font-family:Poppins,sans-serif;border:1px solid #dfe0e3;border-radius:4px!important;margin:8px 0;box-shadow:0 4px 8px 1px #00000040;background-color:#fff;overflow:hidden;padding:8px 0}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.textView{width:auto!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:8px 12px;font-size:14px;line-height:22px;background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#f5f5f5}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#eaeaff;color:#333}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:400!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled{cursor:default}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled>div{color:#aeabac}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled>div.dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{color:#aeabac}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled[role=group]{font-size:14px;line-height:22px;color:#aeabac;cursor:default}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled[role=group]:not(:first-of-type){border-top:1px solid #dfe0e3}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled[role=group]:hover{background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .dr-select__option-with-desc__wrapper{color:#333}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{max-width:-moz-fit-content;max-width:fit-content;word-break:break-word;white-space:normal;color:#6d6e6f;font-weight:400;font-size:12px;line-height:20px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected.ng-option-marked .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{color:#6d6e6f}::ng-deep .ng-dropdown-panel--with-search .ng-dropdown-header{border-bottom:none}.custom-backdrop{position:fixed;inset:0;overflow:hidden;pointer-events:none}\n"] }]
|
|
1723
|
+
], template: "<ng-select\n [(ngModel)]=\"selectedItem\"\n [items]=\"items\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [multiple]=\"multiple\"\n [addTag]=\"addTag\"\n [appendTo]=\"appendTo\"\n [clearable]=\"clearable\"\n [searchable]=\"searchable\"\n [hideSelected]=\"hideSelected\"\n [placeholder]=\"placeholder\"\n [loading]=\"loading\"\n [loadingText]=\"loadingText\"\n [readonly]=\"readonly\"\n [closeOnSelect]=\"closeOnSelect\"\n [disabled]=\"disabled\"\n [labelForId]=\"id\"\n [maxSelectedItems]=\"maxSelectedItems\"\n [keyDownFn]=\"keyDownFn\"\n [searchFn]=\"searchFn\"\n [isOpen]=\"(type !== 'search-input' || !!selectComponent.searchTerm?.length) && isOpen\"\n [groupBy]=\"groupBy\"\n [attr.autofocus]=\"autofocus\"\n [selectOnTab]=\"selectOnTabKeyPress\"\n [virtualScroll]=\"virtualScroll\"\n [typeahead]=\"typeahead\"\n (search)=\"search.emit($event)\"\n (scrollToEnd)=\"scrollToEnd.emit($event)\"\n (keydown.tab)=\"onTabKeypress($event)\"\n (change)=\"onValueSelected(selectedItem)\"\n (open)=\"open.emit($event); onDropdownOpen()\"\n (close)=\"onClose($event)\"\n class=\"dr-select\"\n [class.ng-select--no-value-padding]=\"noValuePadding\"\n [class.ng-select--multiple-height-increased]=\"multipleHeightIncreased\"\n #selectComponent>\n <ng-template *ngIf=\"optionHeaderTemplate\" ng-header-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionHeaderTemplate\" [ngTemplateOutletContext]=\"{ item: item }\"></ng-container>\n </ng-template>\n <ng-template\n ng-header-tmp\n *ngIf=\"!optionHeaderTemplate && isDisplayingSearchInHeader && items?.length >= minItemsToDisplaySearchInHeader\"\n let-item=\"item\">\n <dr-input\n class=\"dr-select__search\"\n [ngModel]=\"selectComponent.searchTerm\"\n (ngModelChange)=\"selectComponent.itemsList.filter($event + '')\"\n type=\"search\">\n </dr-input>\n </ng-template>\n <ng-template *ngIf=\"labelTemplate\" ng-label-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"{ item: item }\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"multiLabelTemplate\" ng-multi-label-tmp let-items=\"items\" let-clear=\"clear\">\n <ng-container [ngTemplateOutlet]=\"multiLabelTemplate\" [ngTemplateOutletContext]=\"{ items: items, clear: clear }\">\n </ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionTemplate\" ng-option-tmp let-item=\"item\" let-item$=\"item$\">\n <ng-container [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{ item: item, item$: item$ }\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionWithDescription\" ng-option-tmp let-item=\"item\">\n <div class=\"dr-select__option-with-desc__wrapper\">\n <div>{{ item.name }}</div>\n <div class=\"dr-select__option-with-desc__description\">{{ item?.description }}</div>\n </div>\n </ng-template>\n <ng-template *ngIf=\"optionFooterTemplate\" ng-footer-tmp let-item=\"item\">\n <ng-container\n [ngTemplateOutlet]=\"optionFooterTemplate\"\n [ngTemplateOutletContext]=\"{ item: item, close: selectComponent.close.bind(selectComponent) }\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"groupBy\" ng-optgroup-tmp let-item=\"item\">\n {{ item[groupBy] }}\n </ng-template>\n <ng-template ng-loadingspinner-tmp>\n <div\n *ngIf=\"loading\"\n class=\"dr-select__loading\"\n [drSpinner]=\"loading\"\n [drSpinnerType]=\"'circle'\"\n [drSpinnerSize]=\"'small'\"\n [drSpinnerNoOverlay]=\"true\"></div>\n </ng-template>\n</ng-select>\n<i *ngIf=\"type === 'search-input'\" class=\"search-icon dr-icon-search\"></i>\n", styles: [":host{width:100%;height:32px;font-family:Poppins,sans-serif}:host.textView::ng-deep{width:auto}:host.textView::ng-deep ng-select.ng-select .ng-select-container{border:none!important;cursor:pointer}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0;color:#4646ce}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-value-container:hover{text-decoration-line:underline}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper{display:none}:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#fff!important;border:none!important;cursor:default}:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#aeabac!important}:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-input input::placeholder{color:#aeabac}:host.textView::ng-deep ng-select.ng-select.ng-select-disabled .ng-value-container:hover{text-decoration-line:none}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px;border:1px solid #9ea1aa;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#4646ce}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#4646ce}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{font-size:14px;line-height:24px;font-weight:400;top:0!important;padding:0 50px 0 8px!important;color:#333}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input input::placeholder{font-size:14px;line-height:24px;font-weight:400;color:#6d6e6f}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{font-size:14px;line-height:24px;font-weight:400;padding:0 0 0 8px;height:100%;overflow:auto}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper{margin-right:7px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper .ng-arrow{border:none;width:auto;height:auto;display:flex;text-decoration-line:none;top:0}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper .ng-arrow:before{font-family:DataRails!important;content:\"\\ea17\";font-size:24px;color:#6d6e6f}:host ::ng-deep ng-select.ng-select.ng-select-opened .ng-select-container{border-radius:6px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{font-size:14px;line-height:24px;font-weight:400;max-height:58px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{font-size:12px;line-height:16px;font-weight:400;color:#333;height:24px;padding:2px 16px;margin:2px 4px 2px 0;background:#f0f1f4;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0!important;width:20px;display:flex;align-items:center;color:transparent;margin-left:4px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:before{font-family:DataRails!important;content:\"\\ea73\";font-size:20px;color:#333}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#f0f1f4!important;border:1px solid #aeabac!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#aeabac!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-arrow{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-arrow:before{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-input input::placeholder{color:#aeabac}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#bf1d30}:host ::ng-deep ng-select.ng-select--multiple-height-increased.ng-select-multiple .ng-select-container{max-height:88px}:host ::ng-deep ng-select.ng-select--multiple-height-increased.ng-select-multiple .ng-select-container .ng-value-container{max-height:88px}:host ::ng-deep ng-select.ng-select--no-value-padding .ng-select-container .ng-value-container .ng-value,:host ::ng-deep ng-select.ng-select--no-value-padding.ng-select-multiple .ng-select-container .ng-value-container .ng-value{padding:0}:host ::ng-deep ng-select.ng-select--no-value-padding .ng-select-container .ng-value-container .ng-value .ng-select-user-label,:host ::ng-deep ng-select.ng-select--no-value-padding.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-select-user-label{height:100%}:host.ng-invalid.ng-touched::ng-deep ng-select.ng-select .ng-select-container{border-color:#bf1d30}:host .dr-select__loading{position:relative;height:32px;width:24px}:host.search-input{position:relative}:host.search-input .search-icon{position:absolute;top:4px;right:16px;color:#6d6e6f;z-index:1001}:host.search-input::ng-deep ng-select.ng-select .ng-select-container{border-radius:16px}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-arrow-wrapper{display:none!important}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-clear-wrapper{display:flex;justify-content:center;align-items:center;right:40px;top:1px;width:24px;height:24px}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-clear-wrapper .ng-clear{font-size:24px;font-weight:300;color:#6d6e6f}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-input,:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 16px!important;width:calc(100% - 63px)}:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-input input,:host.search-input::ng-deep ng-select.ng-select .ng-select-container .ng-value-container input{height:100%}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{font-family:Poppins,sans-serif;border:1px solid #dfe0e3;border-radius:4px!important;margin:8px 0;box-shadow:0 4px 8px 1px #00000040;background-color:#fff;overflow:hidden;padding:8px 0}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.textView{width:auto!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:8px 12px;font-size:14px;line-height:22px;background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#f5f5f5}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#eaeaff;color:#333}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:400!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled{cursor:default}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled>div{color:#aeabac}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled>div.dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{color:#aeabac}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled[role=group]{font-size:14px;line-height:22px;color:#aeabac;cursor:default}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled[role=group]:not(:first-of-type){border-top:1px solid #dfe0e3}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-disabled[role=group]:hover{background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .dr-select__option-with-desc__wrapper{color:#333}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{max-width:-moz-fit-content;max-width:fit-content;word-break:break-word;white-space:normal;color:#6d6e6f;font-weight:400;font-size:12px;line-height:20px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected.ng-option-marked .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{color:#6d6e6f}::ng-deep .ng-dropdown-panel--with-search .ng-dropdown-header{border-bottom:none}.custom-backdrop{position:fixed;inset:0;overflow:hidden;pointer-events:none}\n"] }]
|
|
1718
1724
|
}], function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, { type: [{
|
|
1719
1725
|
type: Input
|
|
1720
1726
|
}, {
|
|
@@ -1789,6 +1795,14 @@ class DrSelectComponent {
|
|
|
1789
1795
|
type: Input
|
|
1790
1796
|
}], selectOnTabKeyPress: [{
|
|
1791
1797
|
type: Input
|
|
1798
|
+
}], virtualScroll: [{
|
|
1799
|
+
type: Input
|
|
1800
|
+
}], typeahead: [{
|
|
1801
|
+
type: Input
|
|
1802
|
+
}], search: [{
|
|
1803
|
+
type: Output
|
|
1804
|
+
}], scrollToEnd: [{
|
|
1805
|
+
type: Output
|
|
1792
1806
|
}], change: [{
|
|
1793
1807
|
type: Output
|
|
1794
1808
|
}], open: [{
|
|
@@ -15345,6 +15359,128 @@ class TextOverflowComponent {
|
|
|
15345
15359
|
type: Input
|
|
15346
15360
|
}] }); })();
|
|
15347
15361
|
|
|
15362
|
+
class TruncateTextDirective {
|
|
15363
|
+
constructor(el, renderer) {
|
|
15364
|
+
this.el = el;
|
|
15365
|
+
this.renderer = renderer;
|
|
15366
|
+
this.items = [];
|
|
15367
|
+
this.itemSeparator = ', ';
|
|
15368
|
+
this.maxWidth = 200;
|
|
15369
|
+
this.container = this.el.nativeElement;
|
|
15370
|
+
}
|
|
15371
|
+
ngOnChanges(changes) {
|
|
15372
|
+
if (!changes.items.isFirstChange()) {
|
|
15373
|
+
this.render();
|
|
15374
|
+
}
|
|
15375
|
+
}
|
|
15376
|
+
ngOnInit() {
|
|
15377
|
+
this.renderer.setStyle(this.container, 'white-space', 'nowrap');
|
|
15378
|
+
this.renderer.setStyle(this.container, 'overflow', 'hidden');
|
|
15379
|
+
this.renderer.setStyle(this.container, 'max-width', this.maxWidth);
|
|
15380
|
+
}
|
|
15381
|
+
ngAfterViewInit() {
|
|
15382
|
+
this.render();
|
|
15383
|
+
}
|
|
15384
|
+
render() {
|
|
15385
|
+
if (!this.items || this.items.length === 0) {
|
|
15386
|
+
this.container.innerText = '';
|
|
15387
|
+
return;
|
|
15388
|
+
}
|
|
15389
|
+
this.container.innerHTML = '';
|
|
15390
|
+
const tempContainer = this.createTempContainer();
|
|
15391
|
+
this.renderer.appendChild(this.container, tempContainer);
|
|
15392
|
+
this.container.innerText = this.getContainerTruncatedText(tempContainer);
|
|
15393
|
+
this.renderer.removeChild(this.container, tempContainer);
|
|
15394
|
+
}
|
|
15395
|
+
createTempContainer() {
|
|
15396
|
+
const tempContainer = this.renderer.createElement('div');
|
|
15397
|
+
this.renderer.setStyle(tempContainer, 'position', 'absolute');
|
|
15398
|
+
this.renderer.setStyle(tempContainer, 'visibility', 'hidden');
|
|
15399
|
+
this.renderer.setStyle(tempContainer, 'white-space', 'nowrap');
|
|
15400
|
+
this.renderer.setStyle(tempContainer, 'pointer-events', 'none');
|
|
15401
|
+
return tempContainer;
|
|
15402
|
+
}
|
|
15403
|
+
getContainerTruncatedText(container) {
|
|
15404
|
+
const visibleCount = this.calculateVisibleItems(container);
|
|
15405
|
+
const hiddenCount = this.items.length - visibleCount;
|
|
15406
|
+
if (visibleCount > 0) {
|
|
15407
|
+
const visibleItems = this.items.slice(0, visibleCount);
|
|
15408
|
+
return hiddenCount > 0
|
|
15409
|
+
? [...visibleItems, `+${hiddenCount}`].join(this.itemSeparator)
|
|
15410
|
+
: visibleItems.join(this.itemSeparator);
|
|
15411
|
+
}
|
|
15412
|
+
else if (hiddenCount) {
|
|
15413
|
+
const FIRST_SIX_SYMBOLS = 6;
|
|
15414
|
+
const FIRST_DISPLAYED_ITEM = 1;
|
|
15415
|
+
const ELLIPSIS = '...';
|
|
15416
|
+
const hiddenItemsCount = this.items.length - FIRST_DISPLAYED_ITEM;
|
|
15417
|
+
if (hiddenItemsCount) {
|
|
15418
|
+
const suffix = `+${this.items.length - FIRST_DISPLAYED_ITEM}`;
|
|
15419
|
+
const firstItem = this.items[0].slice(0, FIRST_SIX_SYMBOLS);
|
|
15420
|
+
return firstItem + ELLIPSIS + this.itemSeparator + suffix;
|
|
15421
|
+
}
|
|
15422
|
+
else {
|
|
15423
|
+
return this.items?.[0];
|
|
15424
|
+
}
|
|
15425
|
+
}
|
|
15426
|
+
return this.items?.[0];
|
|
15427
|
+
}
|
|
15428
|
+
calculateVisibleItems(container) {
|
|
15429
|
+
const lastIdx = this.items.length - 1;
|
|
15430
|
+
const separatorWidth = this.measureTextWidth(this.itemSeparator);
|
|
15431
|
+
const { visibleCount } = reduce(this.items, (acc, curr, idx) => {
|
|
15432
|
+
if (acc.accumulatedWidth >= this.maxWidth) {
|
|
15433
|
+
return acc;
|
|
15434
|
+
}
|
|
15435
|
+
const span = this.renderer.createElement('span');
|
|
15436
|
+
span.innerText = curr;
|
|
15437
|
+
this.renderer.appendChild(container, span);
|
|
15438
|
+
const itemSeparatorWidth = idx && idx !== lastIdx ? separatorWidth : 0;
|
|
15439
|
+
acc.accumulatedWidth += span.offsetWidth + itemSeparatorWidth;
|
|
15440
|
+
const remainingCount = this.items.length - (idx + 1);
|
|
15441
|
+
const suffix = remainingCount > 0 ? `+${remainingCount}` : '';
|
|
15442
|
+
const suffixWidth = suffix ? this.measureTextWidth(this.itemSeparator + suffix) : 0;
|
|
15443
|
+
if (acc.accumulatedWidth + suffixWidth <= this.maxWidth) {
|
|
15444
|
+
acc.visibleCount = idx + 1;
|
|
15445
|
+
}
|
|
15446
|
+
else {
|
|
15447
|
+
return acc;
|
|
15448
|
+
}
|
|
15449
|
+
return acc;
|
|
15450
|
+
}, { accumulatedWidth: 0, visibleCount: 0 });
|
|
15451
|
+
return visibleCount;
|
|
15452
|
+
}
|
|
15453
|
+
measureTextWidth(text) {
|
|
15454
|
+
const span = this.renderer.createElement('span');
|
|
15455
|
+
span.innerText = text;
|
|
15456
|
+
this.renderer.setStyle(span, 'visibility', 'hidden');
|
|
15457
|
+
this.renderer.setStyle(span, 'position', 'absolute');
|
|
15458
|
+
this.renderer.setStyle(span, 'white-space', 'nowrap');
|
|
15459
|
+
this.renderer.appendChild(this.container, span);
|
|
15460
|
+
const width = span.offsetWidth;
|
|
15461
|
+
this.renderer.removeChild(this.container, span);
|
|
15462
|
+
return width;
|
|
15463
|
+
}
|
|
15464
|
+
/** @nocollapse */ static { this.ɵfac = function TruncateTextDirective_Factory(t) { return new (t || TruncateTextDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.Renderer2)); }; }
|
|
15465
|
+
/** @nocollapse */ static { this.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: TruncateTextDirective, selectors: [["", "drTruncateText", ""]], inputs: { items: ["drTruncateText", "items"], itemSeparator: ["drTruncateTextSeparator", "itemSeparator"], maxWidth: ["drTruncateTextMaxWidth", "maxWidth"] }, standalone: true, features: [i0.ɵɵNgOnChangesFeature] }); }
|
|
15466
|
+
}
|
|
15467
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TruncateTextDirective, [{
|
|
15468
|
+
type: Directive,
|
|
15469
|
+
args: [{
|
|
15470
|
+
selector: '[drTruncateText]',
|
|
15471
|
+
standalone: true,
|
|
15472
|
+
}]
|
|
15473
|
+
}], function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, { items: [{
|
|
15474
|
+
type: Input,
|
|
15475
|
+
args: ['drTruncateText']
|
|
15476
|
+
}], itemSeparator: [{
|
|
15477
|
+
type: Input,
|
|
15478
|
+
args: ['drTruncateTextSeparator']
|
|
15479
|
+
}], maxWidth: [{
|
|
15480
|
+
type: Input,
|
|
15481
|
+
args: ['drTruncateTextMaxWidth']
|
|
15482
|
+
}] }); })();
|
|
15483
|
+
|
|
15348
15484
|
class AutofocusDirective {
|
|
15349
15485
|
constructor() {
|
|
15350
15486
|
this.ref = inject(ElementRef);
|
|
@@ -15829,5 +15965,5 @@ class FilterDropdownComponent {
|
|
|
15829
15965
|
* Generated bundle index. Do not edit.
|
|
15830
15966
|
*/
|
|
15831
15967
|
|
|
15832
|
-
export { AnyTagComponent, AutofocusDirective, BadgeStatus, CHAT_MESSAGE_TYPE, CROP_IMAGE_MODES, CalendarView, ChatMessage, ChatRole, CheckboxComponent, ClickOutsideDirective, ClickOutsideModule, CodeEditorHintWrapperComponent, CustomDateAdapter, CustomDateFormat, DEFAULT_LINK_FONT_SIZE, DEFAULT_LINK_FONT_WEIGHT, DIALOG_BUTTON_LABEL, DIALOG_FIELD_TYPE, DIALOG_SIZE, DR_DRAWER_DATA, DR_DRAWER_DEFAULT_OPTIONS, DR_SHINE_ANIMATION_CLASS, DataAnalyticsService, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DateTags, DateTimePickerComponent, DayTagComponent, DefaultToastrComponent, DefaultTreeviewEventParser, DefaultTreeviewI18n, DialogModalWrapperComponent, DialogService, DialogWrapperComponent, DownlineTreeviewEventParser, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAlertComponent, DrAlertModule, DrAlertTheme, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrAvatarService, DrBadgeStatusComponent, DrBadgeStatusModule, DrButtonComponent, DrChatAlertComponent, DrChatComponent, DrChatCustomMessageDirective, DrChatDroppedFilesComponent, DrChatFormComponent, DrChatFormDropdownComponent, DrChatMessageComponent, DrChatMessageFileComponent, DrChatMessageTextComponent, DrChatModule, DrChatSuggestionsComponent, DrChipComponent, DrCodeEditorComponent, DrCodeEditorModule, DrCodemirrorComponent, DrDatePickerComponent, DrDatePickerCustomHeaderComponent, DrDatePickerFormatDirective, DrDatePickerRangeComponent, DrDatePickerWithTimeframeComponent, DrDetailsListComponent, DrDetailsListModule, DrDialogModule, DrDotFlashingComponent, DrDropdownChildDirective, DrDropdownComponent, DrDropdownDirective, DrDropdownItemComponent, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownService, DrErrorComponent, DrErrorModule, DrFiscalMonthCalendarHeaderComponent, DrFiscalMonthCalendarPickerComponent, DrGalleryComponent, DrImageCropperComponent, DrInputComponent, DrInputsModule, DrLayoutBodyComponent, DrLayoutComponent, DrLayoutHeaderComponent, DrLayoutModule, DrLinkComponent, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrProgressBarComponent, DrScenarioConfigurationComponent, DrScenarioModule, DrScenarioTagConfigurationComponent, DrSelectAddItemComponent, DrSelectComponent, DrSharedUtils, DrShineAnimationDirective, DrShowTimeframePipe, DrSliderComponent, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrStepperModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrTagsConstructorComponent, DrTagsConstructorModule, DrToastrModule, DrToastrService, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, Drawer, DrawerConfig, DrawerContainer, DrawerModule, DrawerRef, DropdownInstanceService, ElementOverflowDirective, FeedbackSentiment, FilterDropdownComponent, FilterPipe, FiscalMonthAdapter, ForecastTagComponent, ForecastTagService, GMT_OFFSETS, ICodeEditorHintIcon, IMAGE_TYPES, ImgPipe, LOCAL_TIME_ZONE_OFFSET, LetContext, LetDirective, LinkTheme, ListTagComponent, ListTagModule, MonthTagComponent, OrderDownlineTreeviewEventParser, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, Scenario, ScenarioService, SearchPipe, SeparateTableColumnDirective, SeparateTableComponent, StepWizardDirective, StepperComponent, StepperWizardComponent, TagTypes, TagsConfigSubType, TagsConstructorService, TextOverflowComponent, TimePickerComponent, TimeframeOption, ToastrStatus, ToastrStatusIcon, ToggleButtonMode, TooltipComponent, TooltipDefaultComponent, TooltipInfoComponent, TooltipInfoIconTheme, TooltipInfoWidth, TooltipPosition, TooltipTheme, TrackByPropertyDirective, TreeviewComponent, TreeviewConfig, TreeviewEventParser, TreeviewHelper, TreeviewI18n, TreeviewItem, TreeviewModule, TreeviewPipe, WeekTagComponent, YearTagComponent, getGMTLabel };
|
|
15968
|
+
export { AnyTagComponent, AutofocusDirective, BadgeStatus, CHAT_MESSAGE_TYPE, CROP_IMAGE_MODES, CalendarView, ChatMessage, ChatRole, CheckboxComponent, ClickOutsideDirective, ClickOutsideModule, CodeEditorHintWrapperComponent, CustomDateAdapter, CustomDateFormat, DEFAULT_LINK_FONT_SIZE, DEFAULT_LINK_FONT_WEIGHT, DIALOG_BUTTON_LABEL, DIALOG_FIELD_TYPE, DIALOG_SIZE, DR_DRAWER_DATA, DR_DRAWER_DEFAULT_OPTIONS, DR_SHINE_ANIMATION_CLASS, DataAnalyticsService, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DateTags, DateTimePickerComponent, DayTagComponent, DefaultToastrComponent, DefaultTreeviewEventParser, DefaultTreeviewI18n, DialogModalWrapperComponent, DialogService, DialogWrapperComponent, DownlineTreeviewEventParser, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAlertComponent, DrAlertModule, DrAlertTheme, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrAvatarService, DrBadgeStatusComponent, DrBadgeStatusModule, DrButtonComponent, DrChatAlertComponent, DrChatComponent, DrChatCustomMessageDirective, DrChatDroppedFilesComponent, DrChatFormComponent, DrChatFormDropdownComponent, DrChatMessageComponent, DrChatMessageFileComponent, DrChatMessageTextComponent, DrChatModule, DrChatSuggestionsComponent, DrChipComponent, DrCodeEditorComponent, DrCodeEditorModule, DrCodemirrorComponent, DrDatePickerComponent, DrDatePickerCustomHeaderComponent, DrDatePickerFormatDirective, DrDatePickerRangeComponent, DrDatePickerWithTimeframeComponent, DrDetailsListComponent, DrDetailsListModule, DrDialogModule, DrDotFlashingComponent, DrDropdownChildDirective, DrDropdownComponent, DrDropdownDirective, DrDropdownItemComponent, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownService, DrErrorComponent, DrErrorModule, DrFiscalMonthCalendarHeaderComponent, DrFiscalMonthCalendarPickerComponent, DrGalleryComponent, DrImageCropperComponent, DrInputComponent, DrInputsModule, DrLayoutBodyComponent, DrLayoutComponent, DrLayoutHeaderComponent, DrLayoutModule, DrLinkComponent, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrProgressBarComponent, DrScenarioConfigurationComponent, DrScenarioModule, DrScenarioTagConfigurationComponent, DrSelectAddItemComponent, DrSelectComponent, DrSharedUtils, DrShineAnimationDirective, DrShowTimeframePipe, DrSliderComponent, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrStepperModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrTagsConstructorComponent, DrTagsConstructorModule, DrToastrModule, DrToastrService, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, Drawer, DrawerConfig, DrawerContainer, DrawerModule, DrawerRef, DropdownInstanceService, ElementOverflowDirective, FeedbackSentiment, FilterDropdownComponent, FilterPipe, FiscalMonthAdapter, ForecastTagComponent, ForecastTagService, GMT_OFFSETS, ICodeEditorHintIcon, IMAGE_TYPES, ImgPipe, LOCAL_TIME_ZONE_OFFSET, LetContext, LetDirective, LinkTheme, ListTagComponent, ListTagModule, MonthTagComponent, OrderDownlineTreeviewEventParser, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, Scenario, ScenarioService, SearchPipe, SeparateTableColumnDirective, SeparateTableComponent, StepWizardDirective, StepperComponent, StepperWizardComponent, TagTypes, TagsConfigSubType, TagsConstructorService, TextOverflowComponent, TimePickerComponent, TimeframeOption, ToastrStatus, ToastrStatusIcon, ToggleButtonMode, TooltipComponent, TooltipDefaultComponent, TooltipInfoComponent, TooltipInfoIconTheme, TooltipInfoWidth, TooltipPosition, TooltipTheme, TrackByPropertyDirective, TreeviewComponent, TreeviewConfig, TreeviewEventParser, TreeviewHelper, TreeviewI18n, TreeviewItem, TreeviewModule, TreeviewPipe, TruncateTextDirective, WeekTagComponent, YearTagComponent, getGMTLabel };
|
|
15833
15969
|
//# sourceMappingURL=datarailsshared-datarailsshared.mjs.map
|