@piserve-tech/drop-down 1.2.76 → 1.2.77
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.
|
@@ -126,11 +126,11 @@ export class DropdownComponent {
|
|
|
126
126
|
this.buttonClick.emit();
|
|
127
127
|
}
|
|
128
128
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
129
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownComponent, selector: "lib-dropdown", inputs: { multiple: "multiple", selectedItems: "selectedItems", placeholder: "placeholder", items: "items", showCreateNew: "showCreateNew", selectedValues: "selectedValues", customButtons: "customButtons", showBorder: "showBorder", showSubLabel: "showSubLabel" }, outputs: { buttonClick: "buttonClick", selectedItemsChange: "selectedItemsChange", onDropdownScroll: "onDropdownScroll", onCreateNew: "onCreateNew", onSearch: "onSearch" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "dropdownitems", first: true, predicate: ["dropdownItems"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected{margin:5px}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap}.dropdown .dropdown-field .selected .selected-item{background:#cdd0d1;display:inline;margin:5px;padding:2px;border-radius:5px;font-size:small}.dropdown .dropdown-field .selected .remaining-items{margin:5px;padding:2px;font-size:smaller;display:block}.dropdown .dropdown-field .input-field .dropdown_text{width:100%;border:none;padding:2px;margin-left:3px;margin-right:3px;outline:none;box-sizing:border-box;font-weight:500;font-family:Poppins;font-size:14px;font-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media only screen and (min-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:30px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:35px}}.dropdown .dropdown-field.closed{border:1px solid #d8d8d8}.dropdown .dropdown-field.opened{border-bottom:1px solid #d8d8d8}.dropdown .dropdown-items{overflow-y:auto;overflow-x:hidden;position:absolute;top:100%;left:0;width:100%;background:#fff;z-index:9999999;border:solid 1px #dbdbdb;box-shadow:0 4px 4px -5px #00000040;transition:transform .3s ease-out;scroll-behavior:smooth;cursor:pointer}@media only screen and (min-width: 276px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 576px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items{max-height:150px;padding:5px}}@media only screen and (min-width: 1441px){.dropdown .dropdown-items{max-height:200px;padding:7px}}.dropdown .dropdown-items .create_button{text-decoration:none;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .create_button{padding-left:8px}}.dropdown .dropdown-items .items{text-decoration:none;color:inherit;line-height:41px;position:relative;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .items{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}.dropdown .dropdown-items .items:hover{background:#ebedef;border-radius:6px}.dropdown .dropdown-items .items:hover button{visibility:visible}.dropdown .dropdown-items .items .dropdown_buttons{display:inline}.dropdown .dropdown-items .items button{border:0;background:transparent;visibility:hidden}.dropdown.opened{border:1px #d8d8d8 solid}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.icon-size{width:25px;height:20px;margin-right:7px}.smallSpace{width:3px}.selected-icon-size{width:25px;height:20px;margin-left:10px}@media (max-width: 576px){.selected-icon-size{width:21px;height:15px;margin-right:7px;margin-bottom:1px}}.multiSelected-icon-size{width:25px;height:20px;margin-left:1px;margin-bottom:1px;margin-right:3px}.flexSection{display:flex}.dataSection{width:calc(100% - 20px)}.iconSection{width:20px;padding:1px}.down-arrow,.up-arrow,.deselect{width:20px;height:20px;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer}.down-arrow{cursor:pointer;padding-top:.5em}.down-arrow.opened{display:none}.down-arrow.closed{display:block}.up-arrow{cursor:pointer}.up-arrow.closed{display:none}.iconSection{display:flex;flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
129
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownComponent, selector: "lib-dropdown", inputs: { multiple: "multiple", selectedItems: "selectedItems", placeholder: "placeholder", items: "items", showCreateNew: "showCreateNew", selectedValues: "selectedValues", customButtons: "customButtons", showBorder: "showBorder", showSubLabel: "showSubLabel" }, outputs: { buttonClick: "buttonClick", selectedItemsChange: "selectedItemsChange", onDropdownScroll: "onDropdownScroll", onCreateNew: "onCreateNew", onSearch: "onSearch" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "dropdownitems", first: true, predicate: ["dropdownItems"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected{margin:5px}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap}.dropdown .dropdown-field .selected .selected-item{background:#cdd0d1;display:inline;margin:5px;padding:2px;border-radius:5px;font-size:small}.dropdown .dropdown-field .selected .remaining-items{margin:5px;padding:2px;font-size:smaller;display:block}.dropdown .dropdown-field .input-field .dropdown_text{width:83%;border:none;padding:2px;margin-left:3px;margin-right:3px;outline:none;box-sizing:border-box;font-weight:500;font-family:Poppins;font-size:14px;font-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media only screen and (min-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:30px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:35px}}.dropdown .dropdown-field.closed{border:1px solid #d8d8d8}.dropdown .dropdown-field.opened{border-bottom:1px solid #d8d8d8}.dropdown .dropdown-items{overflow-y:auto;overflow-x:hidden;position:absolute;top:100%;left:0;width:100%;background:#fff;z-index:9999999;border:solid 1px #dbdbdb;box-shadow:0 4px 4px -5px #00000040;transition:transform .3s ease-out;scroll-behavior:smooth;cursor:pointer}@media only screen and (min-width: 276px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 576px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items{max-height:150px;padding:5px}}@media only screen and (min-width: 1441px){.dropdown .dropdown-items{max-height:200px;padding:7px}}.dropdown .dropdown-items .create_button{text-decoration:none;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .create_button{padding-left:8px}}.dropdown .dropdown-items .items{text-decoration:none;color:inherit;line-height:41px;position:relative;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .items{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}.dropdown .dropdown-items .items:hover{background:#ebedef;border-radius:6px}.dropdown .dropdown-items .items:hover button{visibility:visible}.dropdown .dropdown-items .items .dropdown_buttons{display:inline}.dropdown .dropdown-items .items button{border:0;background:transparent;visibility:hidden}.dropdown.opened{border:1px #d8d8d8 solid}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.icon-size{width:25px;height:20px;margin-right:7px}.smallSpace{width:3px}.selected-icon-size{width:25px;height:20px;margin-left:10px}@media (max-width: 576px){.selected-icon-size{width:21px;height:15px;margin-right:7px;margin-bottom:1px}}.multiSelected-icon-size{width:25px;height:20px;margin-left:1px;margin-bottom:1px;margin-right:3px}.flexSection{display:flex;height:40px}.dataSection{width:calc(100% - 20px)}.iconSection{width:20px;padding:1px}.down-arrow,.up-arrow,.deselect{width:20px;height:20px;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer}.down-arrow{cursor:pointer;padding-top:.5em}.down-arrow.opened{display:none}.down-arrow.closed{display:block}.up-arrow{cursor:pointer}.up-arrow.closed{display:none}.iconSection{display:flex;flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
130
130
|
}
|
|
131
131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
132
132
|
type: Component,
|
|
133
|
-
args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected{margin:5px}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap}.dropdown .dropdown-field .selected .selected-item{background:#cdd0d1;display:inline;margin:5px;padding:2px;border-radius:5px;font-size:small}.dropdown .dropdown-field .selected .remaining-items{margin:5px;padding:2px;font-size:smaller;display:block}.dropdown .dropdown-field .input-field .dropdown_text{width:100%;border:none;padding:2px;margin-left:3px;margin-right:3px;outline:none;box-sizing:border-box;font-weight:500;font-family:Poppins;font-size:14px;font-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media only screen and (min-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:30px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:35px}}.dropdown .dropdown-field.closed{border:1px solid #d8d8d8}.dropdown .dropdown-field.opened{border-bottom:1px solid #d8d8d8}.dropdown .dropdown-items{overflow-y:auto;overflow-x:hidden;position:absolute;top:100%;left:0;width:100%;background:#fff;z-index:9999999;border:solid 1px #dbdbdb;box-shadow:0 4px 4px -5px #00000040;transition:transform .3s ease-out;scroll-behavior:smooth;cursor:pointer}@media only screen and (min-width: 276px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 576px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items{max-height:150px;padding:5px}}@media only screen and (min-width: 1441px){.dropdown .dropdown-items{max-height:200px;padding:7px}}.dropdown .dropdown-items .create_button{text-decoration:none;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .create_button{padding-left:8px}}.dropdown .dropdown-items .items{text-decoration:none;color:inherit;line-height:41px;position:relative;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .items{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}.dropdown .dropdown-items .items:hover{background:#ebedef;border-radius:6px}.dropdown .dropdown-items .items:hover button{visibility:visible}.dropdown .dropdown-items .items .dropdown_buttons{display:inline}.dropdown .dropdown-items .items button{border:0;background:transparent;visibility:hidden}.dropdown.opened{border:1px #d8d8d8 solid}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.icon-size{width:25px;height:20px;margin-right:7px}.smallSpace{width:3px}.selected-icon-size{width:25px;height:20px;margin-left:10px}@media (max-width: 576px){.selected-icon-size{width:21px;height:15px;margin-right:7px;margin-bottom:1px}}.multiSelected-icon-size{width:25px;height:20px;margin-left:1px;margin-bottom:1px;margin-right:3px}.flexSection{display:flex}.dataSection{width:calc(100% - 20px)}.iconSection{width:20px;padding:1px}.down-arrow,.up-arrow,.deselect{width:20px;height:20px;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer}.down-arrow{cursor:pointer;padding-top:.5em}.down-arrow.opened{display:none}.down-arrow.closed{display:block}.up-arrow{cursor:pointer}.up-arrow.closed{display:none}.iconSection{display:flex;flex-direction:row-reverse}\n"] }]
|
|
133
|
+
args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected{margin:5px}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap}.dropdown .dropdown-field .selected .selected-item{background:#cdd0d1;display:inline;margin:5px;padding:2px;border-radius:5px;font-size:small}.dropdown .dropdown-field .selected .remaining-items{margin:5px;padding:2px;font-size:smaller;display:block}.dropdown .dropdown-field .input-field .dropdown_text{width:83%;border:none;padding:2px;margin-left:3px;margin-right:3px;outline:none;box-sizing:border-box;font-weight:500;font-family:Poppins;font-size:14px;font-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media only screen and (min-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:30px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:35px}}.dropdown .dropdown-field.closed{border:1px solid #d8d8d8}.dropdown .dropdown-field.opened{border-bottom:1px solid #d8d8d8}.dropdown .dropdown-items{overflow-y:auto;overflow-x:hidden;position:absolute;top:100%;left:0;width:100%;background:#fff;z-index:9999999;border:solid 1px #dbdbdb;box-shadow:0 4px 4px -5px #00000040;transition:transform .3s ease-out;scroll-behavior:smooth;cursor:pointer}@media only screen and (min-width: 276px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 576px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items{max-height:150px;padding:5px}}@media only screen and (min-width: 1441px){.dropdown .dropdown-items{max-height:200px;padding:7px}}.dropdown .dropdown-items .create_button{text-decoration:none;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .create_button{padding-left:8px}}.dropdown .dropdown-items .items{text-decoration:none;color:inherit;line-height:41px;position:relative;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .items{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}.dropdown .dropdown-items .items:hover{background:#ebedef;border-radius:6px}.dropdown .dropdown-items .items:hover button{visibility:visible}.dropdown .dropdown-items .items .dropdown_buttons{display:inline}.dropdown .dropdown-items .items button{border:0;background:transparent;visibility:hidden}.dropdown.opened{border:1px #d8d8d8 solid}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.icon-size{width:25px;height:20px;margin-right:7px}.smallSpace{width:3px}.selected-icon-size{width:25px;height:20px;margin-left:10px}@media (max-width: 576px){.selected-icon-size{width:21px;height:15px;margin-right:7px;margin-bottom:1px}}.multiSelected-icon-size{width:25px;height:20px;margin-left:1px;margin-bottom:1px;margin-right:3px}.flexSection{display:flex;height:40px}.dataSection{width:calc(100% - 20px)}.iconSection{width:20px;padding:1px}.down-arrow,.up-arrow,.deselect{width:20px;height:20px;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer}.down-arrow{cursor:pointer;padding-top:.5em}.down-arrow.opened{display:none}.down-arrow.closed{display:block}.up-arrow{cursor:pointer}.up-arrow.closed{display:none}.iconSection{display:flex;flex-direction:row-reverse}\n"] }]
|
|
134
134
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { multiple: [{
|
|
135
135
|
type: Input
|
|
136
136
|
}], selectedItems: [{
|
|
@@ -141,11 +141,11 @@ class DropdownComponent {
|
|
|
141
141
|
this.buttonClick.emit();
|
|
142
142
|
}
|
|
143
143
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
144
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownComponent, selector: "lib-dropdown", inputs: { multiple: "multiple", selectedItems: "selectedItems", placeholder: "placeholder", items: "items", showCreateNew: "showCreateNew", selectedValues: "selectedValues", customButtons: "customButtons", showBorder: "showBorder", showSubLabel: "showSubLabel" }, outputs: { buttonClick: "buttonClick", selectedItemsChange: "selectedItemsChange", onDropdownScroll: "onDropdownScroll", onCreateNew: "onCreateNew", onSearch: "onSearch" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "dropdownitems", first: true, predicate: ["dropdownItems"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected{margin:5px}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap}.dropdown .dropdown-field .selected .selected-item{background:#cdd0d1;display:inline;margin:5px;padding:2px;border-radius:5px;font-size:small}.dropdown .dropdown-field .selected .remaining-items{margin:5px;padding:2px;font-size:smaller;display:block}.dropdown .dropdown-field .input-field .dropdown_text{width:100%;border:none;padding:2px;margin-left:3px;margin-right:3px;outline:none;box-sizing:border-box;font-weight:500;font-family:Poppins;font-size:14px;font-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media only screen and (min-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:30px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:35px}}.dropdown .dropdown-field.closed{border:1px solid #d8d8d8}.dropdown .dropdown-field.opened{border-bottom:1px solid #d8d8d8}.dropdown .dropdown-items{overflow-y:auto;overflow-x:hidden;position:absolute;top:100%;left:0;width:100%;background:#fff;z-index:9999999;border:solid 1px #dbdbdb;box-shadow:0 4px 4px -5px #00000040;transition:transform .3s ease-out;scroll-behavior:smooth;cursor:pointer}@media only screen and (min-width: 276px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 576px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items{max-height:150px;padding:5px}}@media only screen and (min-width: 1441px){.dropdown .dropdown-items{max-height:200px;padding:7px}}.dropdown .dropdown-items .create_button{text-decoration:none;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .create_button{padding-left:8px}}.dropdown .dropdown-items .items{text-decoration:none;color:inherit;line-height:41px;position:relative;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .items{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}.dropdown .dropdown-items .items:hover{background:#ebedef;border-radius:6px}.dropdown .dropdown-items .items:hover button{visibility:visible}.dropdown .dropdown-items .items .dropdown_buttons{display:inline}.dropdown .dropdown-items .items button{border:0;background:transparent;visibility:hidden}.dropdown.opened{border:1px #d8d8d8 solid}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.icon-size{width:25px;height:20px;margin-right:7px}.smallSpace{width:3px}.selected-icon-size{width:25px;height:20px;margin-left:10px}@media (max-width: 576px){.selected-icon-size{width:21px;height:15px;margin-right:7px;margin-bottom:1px}}.multiSelected-icon-size{width:25px;height:20px;margin-left:1px;margin-bottom:1px;margin-right:3px}.flexSection{display:flex}.dataSection{width:calc(100% - 20px)}.iconSection{width:20px;padding:1px}.down-arrow,.up-arrow,.deselect{width:20px;height:20px;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer}.down-arrow{cursor:pointer;padding-top:.5em}.down-arrow.opened{display:none}.down-arrow.closed{display:block}.up-arrow{cursor:pointer}.up-arrow.closed{display:none}.iconSection{display:flex;flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
144
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownComponent, selector: "lib-dropdown", inputs: { multiple: "multiple", selectedItems: "selectedItems", placeholder: "placeholder", items: "items", showCreateNew: "showCreateNew", selectedValues: "selectedValues", customButtons: "customButtons", showBorder: "showBorder", showSubLabel: "showSubLabel" }, outputs: { buttonClick: "buttonClick", selectedItemsChange: "selectedItemsChange", onDropdownScroll: "onDropdownScroll", onCreateNew: "onCreateNew", onSearch: "onSearch" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "dropdownitems", first: true, predicate: ["dropdownItems"], descendants: true }, { propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected{margin:5px}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap}.dropdown .dropdown-field .selected .selected-item{background:#cdd0d1;display:inline;margin:5px;padding:2px;border-radius:5px;font-size:small}.dropdown .dropdown-field .selected .remaining-items{margin:5px;padding:2px;font-size:smaller;display:block}.dropdown .dropdown-field .input-field .dropdown_text{width:83%;border:none;padding:2px;margin-left:3px;margin-right:3px;outline:none;box-sizing:border-box;font-weight:500;font-family:Poppins;font-size:14px;font-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media only screen and (min-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:30px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:35px}}.dropdown .dropdown-field.closed{border:1px solid #d8d8d8}.dropdown .dropdown-field.opened{border-bottom:1px solid #d8d8d8}.dropdown .dropdown-items{overflow-y:auto;overflow-x:hidden;position:absolute;top:100%;left:0;width:100%;background:#fff;z-index:9999999;border:solid 1px #dbdbdb;box-shadow:0 4px 4px -5px #00000040;transition:transform .3s ease-out;scroll-behavior:smooth;cursor:pointer}@media only screen and (min-width: 276px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 576px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items{max-height:150px;padding:5px}}@media only screen and (min-width: 1441px){.dropdown .dropdown-items{max-height:200px;padding:7px}}.dropdown .dropdown-items .create_button{text-decoration:none;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .create_button{padding-left:8px}}.dropdown .dropdown-items .items{text-decoration:none;color:inherit;line-height:41px;position:relative;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .items{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}.dropdown .dropdown-items .items:hover{background:#ebedef;border-radius:6px}.dropdown .dropdown-items .items:hover button{visibility:visible}.dropdown .dropdown-items .items .dropdown_buttons{display:inline}.dropdown .dropdown-items .items button{border:0;background:transparent;visibility:hidden}.dropdown.opened{border:1px #d8d8d8 solid}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.icon-size{width:25px;height:20px;margin-right:7px}.smallSpace{width:3px}.selected-icon-size{width:25px;height:20px;margin-left:10px}@media (max-width: 576px){.selected-icon-size{width:21px;height:15px;margin-right:7px;margin-bottom:1px}}.multiSelected-icon-size{width:25px;height:20px;margin-left:1px;margin-bottom:1px;margin-right:3px}.flexSection{display:flex;height:40px}.dataSection{width:calc(100% - 20px)}.iconSection{width:20px;padding:1px}.down-arrow,.up-arrow,.deselect{width:20px;height:20px;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer}.down-arrow{cursor:pointer;padding-top:.5em}.down-arrow.opened{display:none}.down-arrow.closed{display:block}.up-arrow{cursor:pointer}.up-arrow.closed{display:none}.iconSection{display:flex;flex-direction:row-reverse}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
145
145
|
}
|
|
146
146
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
147
147
|
type: Component,
|
|
148
|
-
args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected{margin:5px}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap}.dropdown .dropdown-field .selected .selected-item{background:#cdd0d1;display:inline;margin:5px;padding:2px;border-radius:5px;font-size:small}.dropdown .dropdown-field .selected .remaining-items{margin:5px;padding:2px;font-size:smaller;display:block}.dropdown .dropdown-field .input-field .dropdown_text{width:100%;border:none;padding:2px;margin-left:3px;margin-right:3px;outline:none;box-sizing:border-box;font-weight:500;font-family:Poppins;font-size:14px;font-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media only screen and (min-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:30px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:35px}}.dropdown .dropdown-field.closed{border:1px solid #d8d8d8}.dropdown .dropdown-field.opened{border-bottom:1px solid #d8d8d8}.dropdown .dropdown-items{overflow-y:auto;overflow-x:hidden;position:absolute;top:100%;left:0;width:100%;background:#fff;z-index:9999999;border:solid 1px #dbdbdb;box-shadow:0 4px 4px -5px #00000040;transition:transform .3s ease-out;scroll-behavior:smooth;cursor:pointer}@media only screen and (min-width: 276px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 576px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items{max-height:150px;padding:5px}}@media only screen and (min-width: 1441px){.dropdown .dropdown-items{max-height:200px;padding:7px}}.dropdown .dropdown-items .create_button{text-decoration:none;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .create_button{padding-left:8px}}.dropdown .dropdown-items .items{text-decoration:none;color:inherit;line-height:41px;position:relative;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .items{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}.dropdown .dropdown-items .items:hover{background:#ebedef;border-radius:6px}.dropdown .dropdown-items .items:hover button{visibility:visible}.dropdown .dropdown-items .items .dropdown_buttons{display:inline}.dropdown .dropdown-items .items button{border:0;background:transparent;visibility:hidden}.dropdown.opened{border:1px #d8d8d8 solid}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.icon-size{width:25px;height:20px;margin-right:7px}.smallSpace{width:3px}.selected-icon-size{width:25px;height:20px;margin-left:10px}@media (max-width: 576px){.selected-icon-size{width:21px;height:15px;margin-right:7px;margin-bottom:1px}}.multiSelected-icon-size{width:25px;height:20px;margin-left:1px;margin-bottom:1px;margin-right:3px}.flexSection{display:flex}.dataSection{width:calc(100% - 20px)}.iconSection{width:20px;padding:1px}.down-arrow,.up-arrow,.deselect{width:20px;height:20px;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer}.down-arrow{cursor:pointer;padding-top:.5em}.down-arrow.opened{display:none}.down-arrow.closed{display:block}.up-arrow{cursor:pointer}.up-arrow.closed{display:none}.iconSection{display:flex;flex-direction:row-reverse}\n"] }]
|
|
148
|
+
args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected{margin:5px}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap}.dropdown .dropdown-field .selected .selected-item{background:#cdd0d1;display:inline;margin:5px;padding:2px;border-radius:5px;font-size:small}.dropdown .dropdown-field .selected .remaining-items{margin:5px;padding:2px;font-size:smaller;display:block}.dropdown .dropdown-field .input-field .dropdown_text{width:83%;border:none;padding:2px;margin-left:3px;margin-right:3px;outline:none;box-sizing:border-box;font-weight:500;font-family:Poppins;font-size:14px;font-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;font-size:12px;margin-left:3px;padding-left:2px}}@media only screen and (min-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:30px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:35px}}.dropdown .dropdown-field.closed{border:1px solid #d8d8d8}.dropdown .dropdown-field.opened{border-bottom:1px solid #d8d8d8}.dropdown .dropdown-items{overflow-y:auto;overflow-x:hidden;position:absolute;top:100%;left:0;width:100%;background:#fff;z-index:9999999;border:solid 1px #dbdbdb;box-shadow:0 4px 4px -5px #00000040;transition:transform .3s ease-out;scroll-behavior:smooth;cursor:pointer}@media only screen and (min-width: 276px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 576px){.dropdown .dropdown-items{max-height:150px;padding:3px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items{max-height:150px;padding:5px}}@media only screen and (min-width: 1441px){.dropdown .dropdown-items{max-height:200px;padding:7px}}.dropdown .dropdown-items .create_button{text-decoration:none;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .create_button{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .create_button{padding-left:8px}}.dropdown .dropdown-items .items{text-decoration:none;color:inherit;line-height:41px;position:relative;cursor:pointer}@media only screen and (min-width: 576px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}@media only screen and (min-width: 992px){.dropdown .dropdown-items .items{padding-left:8px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-items .items{padding-left:8px;font-size:small}}.dropdown .dropdown-items .items:hover{background:#ebedef;border-radius:6px}.dropdown .dropdown-items .items:hover button{visibility:visible}.dropdown .dropdown-items .items .dropdown_buttons{display:inline}.dropdown .dropdown-items .items button{border:0;background:transparent;visibility:hidden}.dropdown.opened{border:1px #d8d8d8 solid}::-webkit-scrollbar{width:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.icon-size{width:25px;height:20px;margin-right:7px}.smallSpace{width:3px}.selected-icon-size{width:25px;height:20px;margin-left:10px}@media (max-width: 576px){.selected-icon-size{width:21px;height:15px;margin-right:7px;margin-bottom:1px}}.multiSelected-icon-size{width:25px;height:20px;margin-left:1px;margin-bottom:1px;margin-right:3px}.flexSection{display:flex;height:40px}.dataSection{width:calc(100% - 20px)}.iconSection{width:20px;padding:1px}.down-arrow,.up-arrow,.deselect{width:20px;height:20px;font-size:18px;display:flex;align-items:center;justify-content:center;cursor:pointer}.down-arrow{cursor:pointer;padding-top:.5em}.down-arrow.opened{display:none}.down-arrow.closed{display:block}.up-arrow{cursor:pointer}.up-arrow.closed{display:none}.iconSection{display:flex;flex-direction:row-reverse}\n"] }]
|
|
149
149
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { multiple: [{
|
|
150
150
|
type: Input
|
|
151
151
|
}], selectedItems: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"piserve-tech-drop-down.mjs","sources":["../../../projects/dropdown/src/lib/dropdown.service.ts","../../../projects/dropdown/src/lib/dropdown.component.ts","../../../projects/dropdown/src/lib/dropdown.component.html","../../../projects/dropdown/src/lib/dropdown.module.ts","../../../projects/dropdown/src/public-api.ts","../../../projects/dropdown/src/piserve-tech-drop-down.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DropdownService {\r\n\r\n constructor() { }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from \"@angular/core\";\r\nimport { DropdownItem } from \"./dropdown.model\";\r\n\r\n@Component({\r\n selector: \"lib-dropdown\",\r\n templateUrl: \"./dropdown.component.html\",\r\n styleUrls: [\"./dropdown.component.scss\"],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class DropdownComponent implements OnInit {\r\n @Input() multiple!: boolean;\r\n @Input() selectedItems: any[] = [];\r\n @Input() placeholder: String = \"\";\r\n @Input() items: DropdownItem[] = [];\r\n @Input() showCreateNew!: boolean;\r\n @Input() selectedValues: string = \"\";\r\n @Input() customButtons: {\r\n label: string;\r\n icon: string;\r\n color: string;\r\n action: () => void;\r\n }[] = [];\r\n @Input() showBorder: boolean = true;\r\n @Output() buttonClick: EventEmitter<Event> = new EventEmitter<Event>();\r\n @Output() selectedItemsChange: EventEmitter<any[]> = new EventEmitter<\r\n any[]\r\n >();\r\n @Output() onDropdownScroll: EventEmitter<Event> = new EventEmitter<Event>();\r\n @Output() onCreateNew: EventEmitter<Event> = new EventEmitter<Event>();\r\n @Output() onSearch: EventEmitter<string> = new EventEmitter<string>();\r\n //subLabel\r\n @Input() showSubLabel: boolean = false;\r\n\r\n dropdownOpened: boolean = false;\r\n selectedItem: any;\r\n selectedItemName: string = \"\";\r\n selectedItemImage: string = \"\";\r\n originalItems: DropdownItem[] = [];\r\n searchTerm: string = \"\";\r\n initialized: boolean = false;\r\n searchText: string = \"\";\r\n\r\n constructor(private cdr: ChangeDetectorRef) {}\r\n\r\n ngOnInit(): void {\r\n this.initialize();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes[\"selectedItems\"]) {\r\n const item = changes[\"selectedItems\"][\"currentValue\"];\r\n this.selectedItems = item;\r\n this.selectedItemName = this.selectedItems[0]?.label;\r\n this.selectedItemImage = this.selectedItems[0]?.image;\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n if (changes[\"items\"]) {\r\n this.originalItems = this.items.slice();\r\n }\r\n if(changes[\"selectedValues\"]){\r\n this.selectedItemName=this.selectedValues;\r\n }\r\n }\r\n\r\n initialize() {\r\n setTimeout(() => {\r\n if (this.selectedItems && this.selectedItems.length > 0) {\r\n if (!this.multiple) this.selectItem(this.selectedItems[0]);\r\n }\r\n }, 1000);\r\n const uniqueItems = this.items.filter(\r\n (selected, index, self) =>\r\n index === self.findIndex((t) => t.value === selected.value)\r\n );\r\n\r\n this.items = uniqueItems;\r\n }\r\n\r\n openDropdown() {\r\n this.dropdownOpened = !this.dropdownOpened;\r\n }\r\n\r\n @ViewChild(\"dropdownItems\") dropdownitems!: ElementRef<any>;\r\n dropdownScroll(event: any): void {\r\n if (this.onDropdownScroll.observed) {\r\n this.onDropdownScroll.emit(event);\r\n this.cdr.markForCheck();\r\n }\r\n }\r\n\r\n selectItem(item: any) {\r\n if (this.multiple) {\r\n if (!this.selectedItems.includes(item)) {\r\n this.selectedItems.push(item);\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n } else {\r\n this.selectedItems = this.selectedItems.filter(\r\n (selected: any) => selected !== item\r\n );\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n } else {\r\n this.searchText = \"\";\r\n this.selectedItems[0] = item;\r\n this.selectedItemName = this.selectedItems[0]?.label;\r\n this.selectedItemImage = this.selectedItems[0]?.image;\r\n this.dropdownOpened = false;\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n }\r\n\r\n unselectItem(item: any): void {\r\n this.selectedItems = this.selectedItems.filter(\r\n (selected: any) => selected !== item\r\n );\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n\r\n unselectAll() {\r\n this.selectedItems = [];\r\n this.selectedItemName = \"\";\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n\r\n @ViewChild(\"dropdown\") dropdown!: ElementRef;\r\n @HostListener(\"document:click\", [\"$event\"])\r\n onDocumentClick(event: Event): void {\r\n const isClickInsideDropdown = this.dropdown.nativeElement.contains(\r\n event.target\r\n );\r\n if (!isClickInsideDropdown) {\r\n this.dropdownOpened = false;\r\n }\r\n }\r\n\r\n createNew() {\r\n this.onCreateNew.emit();\r\n this.dropdownOpened = false;\r\n }\r\n\r\n search(event: any): void {\r\n const keyCode = event.keyCode;\r\n this.dropdownOpened = true;\r\n this.searchTerm = event.target.value.toLowerCase();\r\n if (!this.onSearch.observed) {\r\n if (this.searchTerm.trim() === \"\") {\r\n this.items = this.originalItems.slice();\r\n } else {\r\n const lowerCaseSearchTerm = this.searchTerm.toLowerCase();\r\n this.items = this.originalItems.filter(\r\n (item) =>\r\n item.label.toLowerCase().includes(lowerCaseSearchTerm) ||\r\n (item.value &&\r\n item.value.toLowerCase().includes(lowerCaseSearchTerm))\r\n );\r\n }\r\n } else {\r\n this.onSearch.emit(this.searchTerm);\r\n }\r\n }\r\n\r\n handleButtonClick(action: () => void): void {\r\n action();\r\n this.buttonClick.emit();\r\n }\r\n}\r\n","<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { DropdownComponent } from './dropdown.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n DropdownComponent\r\n ],\r\n imports: [\r\n FormsModule,\r\n CommonModule,\r\n ],\r\n exports: [\r\n DropdownComponent\r\n ]\r\n})\r\nexport class DropdownModule { }\r\n","/*\r\n * Public API Surface of dropdown\r\n */\r\n\r\nexport * from './lib/dropdown.service';\r\nexport * from './lib/dropdown.component';\r\nexport * from './lib/dropdown.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,eAAe,CAAA;AAE1B,IAAA,WAAA,GAAA,GAAiB;+GAFN,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cAFd,MAAM,EAAA,CAAA,CAAA,EAAA;;4FAEP,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCmBY,iBAAiB,CAAA;AAiC5B,IAAA,WAAA,CAAoB,GAAsB,EAAA;QAAtB,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;QA/BjC,IAAa,CAAA,aAAA,GAAU,EAAE,CAAC;QAC1B,IAAW,CAAA,WAAA,GAAW,EAAE,CAAC;QACzB,IAAK,CAAA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service.ts","../../../projects/dropdown/src/lib/dropdown.component.ts","../../../projects/dropdown/src/lib/dropdown.component.html","../../../projects/dropdown/src/lib/dropdown.module.ts","../../../projects/dropdown/src/public-api.ts","../../../projects/dropdown/src/piserve-tech-drop-down.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DropdownService {\r\n\r\n constructor() { }\r\n}\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n HostListener,\r\n Input,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild,\r\n ViewEncapsulation,\r\n} from \"@angular/core\";\r\nimport { DropdownItem } from \"./dropdown.model\";\r\n\r\n@Component({\r\n selector: \"lib-dropdown\",\r\n templateUrl: \"./dropdown.component.html\",\r\n styleUrls: [\"./dropdown.component.scss\"],\r\n encapsulation: ViewEncapsulation.None,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class DropdownComponent implements OnInit {\r\n @Input() multiple!: boolean;\r\n @Input() selectedItems: any[] = [];\r\n @Input() placeholder: String = \"\";\r\n @Input() items: DropdownItem[] = [];\r\n @Input() showCreateNew!: boolean;\r\n @Input() selectedValues: string = \"\";\r\n @Input() customButtons: {\r\n label: string;\r\n icon: string;\r\n color: string;\r\n action: () => void;\r\n }[] = [];\r\n @Input() showBorder: boolean = true;\r\n @Output() buttonClick: EventEmitter<Event> = new EventEmitter<Event>();\r\n @Output() selectedItemsChange: EventEmitter<any[]> = new EventEmitter<\r\n any[]\r\n >();\r\n @Output() onDropdownScroll: EventEmitter<Event> = new EventEmitter<Event>();\r\n @Output() onCreateNew: EventEmitter<Event> = new EventEmitter<Event>();\r\n @Output() onSearch: EventEmitter<string> = new EventEmitter<string>();\r\n //subLabel\r\n @Input() showSubLabel: boolean = false;\r\n\r\n dropdownOpened: boolean = false;\r\n selectedItem: any;\r\n selectedItemName: string = \"\";\r\n selectedItemImage: string = \"\";\r\n originalItems: DropdownItem[] = [];\r\n searchTerm: string = \"\";\r\n initialized: boolean = false;\r\n searchText: string = \"\";\r\n\r\n constructor(private cdr: ChangeDetectorRef) {}\r\n\r\n ngOnInit(): void {\r\n this.initialize();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (changes[\"selectedItems\"]) {\r\n const item = changes[\"selectedItems\"][\"currentValue\"];\r\n this.selectedItems = item;\r\n this.selectedItemName = this.selectedItems[0]?.label;\r\n this.selectedItemImage = this.selectedItems[0]?.image;\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n if (changes[\"items\"]) {\r\n this.originalItems = this.items.slice();\r\n }\r\n if(changes[\"selectedValues\"]){\r\n this.selectedItemName=this.selectedValues;\r\n }\r\n }\r\n\r\n initialize() {\r\n setTimeout(() => {\r\n if (this.selectedItems && this.selectedItems.length > 0) {\r\n if (!this.multiple) this.selectItem(this.selectedItems[0]);\r\n }\r\n }, 1000);\r\n const uniqueItems = this.items.filter(\r\n (selected, index, self) =>\r\n index === self.findIndex((t) => t.value === selected.value)\r\n );\r\n\r\n this.items = uniqueItems;\r\n }\r\n\r\n openDropdown() {\r\n this.dropdownOpened = !this.dropdownOpened;\r\n }\r\n\r\n @ViewChild(\"dropdownItems\") dropdownitems!: ElementRef<any>;\r\n dropdownScroll(event: any): void {\r\n if (this.onDropdownScroll.observed) {\r\n this.onDropdownScroll.emit(event);\r\n this.cdr.markForCheck();\r\n }\r\n }\r\n\r\n selectItem(item: any) {\r\n if (this.multiple) {\r\n if (!this.selectedItems.includes(item)) {\r\n this.selectedItems.push(item);\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n } else {\r\n this.selectedItems = this.selectedItems.filter(\r\n (selected: any) => selected !== item\r\n );\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n } else {\r\n this.searchText = \"\";\r\n this.selectedItems[0] = item;\r\n this.selectedItemName = this.selectedItems[0]?.label;\r\n this.selectedItemImage = this.selectedItems[0]?.image;\r\n this.dropdownOpened = false;\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n }\r\n\r\n unselectItem(item: any): void {\r\n this.selectedItems = this.selectedItems.filter(\r\n (selected: any) => selected !== item\r\n );\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n\r\n unselectAll() {\r\n this.selectedItems = [];\r\n this.selectedItemName = \"\";\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n }\r\n\r\n @ViewChild(\"dropdown\") dropdown!: ElementRef;\r\n @HostListener(\"document:click\", [\"$event\"])\r\n onDocumentClick(event: Event): void {\r\n const isClickInsideDropdown = this.dropdown.nativeElement.contains(\r\n event.target\r\n );\r\n if (!isClickInsideDropdown) {\r\n this.dropdownOpened = false;\r\n }\r\n }\r\n\r\n createNew() {\r\n this.onCreateNew.emit();\r\n this.dropdownOpened = false;\r\n }\r\n\r\n search(event: any): void {\r\n const keyCode = event.keyCode;\r\n this.dropdownOpened = true;\r\n this.searchTerm = event.target.value.toLowerCase();\r\n if (!this.onSearch.observed) {\r\n if (this.searchTerm.trim() === \"\") {\r\n this.items = this.originalItems.slice();\r\n } else {\r\n const lowerCaseSearchTerm = this.searchTerm.toLowerCase();\r\n this.items = this.originalItems.filter(\r\n (item) =>\r\n item.label.toLowerCase().includes(lowerCaseSearchTerm) ||\r\n (item.value &&\r\n item.value.toLowerCase().includes(lowerCaseSearchTerm))\r\n );\r\n }\r\n } else {\r\n this.onSearch.emit(this.searchTerm);\r\n }\r\n }\r\n\r\n handleButtonClick(action: () => void): void {\r\n action();\r\n this.buttonClick.emit();\r\n }\r\n}\r\n","<div #dropdown class=\"dropdown\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\">\r\n <div class=\"dropdown-field\" id=\"division\" [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\" (click)=\"openDropdown()\">\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div *ngIf=\"!selectedItem && multiple\" class=\"selected selectedList\">\r\n <div *ngFor=\"let selectedItem of selectedItems.slice(0, 3)\" class=\"selected-item\">\r\n <img *ngIf=\"selectedItem?.image\" class=\"multiSelected-icon-size\" [src]=\"selectedItem?.image\" alt=\"image\" />\r\n <span>{{ selectedItem.label }}</span> \r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">×</span>\r\n </div>\r\n <div class=\"remaining-items\" *ngIf=\"selectedItems.length > 3\">\r\n +{{ selectedItems.length - 3 }} more\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div>\r\n <span (click)=\"unselectAll()\" *ngIf=\"selectedItems.length > 0 && multiple\r\n \" class=\"deselect\">×\r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\">\r\n <div class=\"input-field\">\r\n <div *ngIf=\"multiple\">\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" (keyup)=\"search($event)\" />\r\n </div>\r\n <div *ngIf=\"!multiple\">\r\n <img *ngIf=\"selectedItemImage\" class=\"selected-icon-size\" [src]=\"selectedItemImage\" alt=\"image\" />\r\n <input class=\"dropdown_text\" [(ngModel)]=\"searchText\" [placeholder]=\"placeholder\" [(ngModel)]=\"selectedItemName\"\r\n (keyup)=\"search($event)\" />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"down-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"down-arrow-img\">\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path id=\"Path\" d=\"M6 9.13741L12 15.229L18 9.13741\" stroke=\"#8E9AA0\" stroke-width=\"1.5\"\r\n stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div class=\"up-arrow\" [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\">\r\n <svg width=\"1em\" viewBox=\"0 0 24 25\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" class=\"up-arrow-img\">\r\n <path d=\"M18 15.229L12 9.1374L6 15.229\" stroke=\"#8E9AA0\" stroke-width=\"1.5\" stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\" />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div #dropdownItems class=\"dropdown-items\" *ngIf=\"dropdownOpened\" (scroll)=\"dropdownScroll($event)\">\r\n <div (click)=\"createNew()\" >\r\n <a class=\"create_button \"*ngIf=\"showCreateNew\">Create new</a>\r\n </div>\r\n <ng-container *ngIf=\"items.length > 0; else noDataAvailable\">\r\n <ng-container *ngIf=\"multiple; else singleSelection\">\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div>\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span> <br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n </div>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-container>\r\n\r\n <ng-template #singleSelection>\r\n <a class=\"items d-block\" *ngFor=\"let item of items\" (click)=\"selectItem(item)\">\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <img *ngIf=\"item?.image\" [src]=\"item?.image\" alt=\"Item Image\" class=\"item-image icon-size\" />\r\n <span class=\"item-label\">{{ item?.label }}</span><br />\r\n <small *ngIf=\"showSubLabel\">{{ item?.subLabel }}</small>\r\n <div class=\"space\" *ngIf=\"item?.label\"></div>\r\n <div class=\"dropdown_buttons\">\r\n <button *ngFor=\"let button of customButtons\" (click)=\"handleButtonClick(button.action)\">\r\n <i [class]=\"button.icon\" [style.color]=\"button.color\"></i>\r\n </button>\r\n </div>\r\n </div>\r\n </div>\r\n </a>\r\n </ng-template>\r\n </ng-container>\r\n\r\n <!-- \"No data available\" message if the drop down is empty -->\r\n <ng-template #noDataAvailable>\r\n <div class=\"items\">No data available</div>\r\n </ng-template>\r\n </div>\r\n</div>","import { NgModule } from '@angular/core';\r\nimport { DropdownComponent } from './dropdown.component';\r\nimport { FormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n DropdownComponent\r\n ],\r\n imports: [\r\n FormsModule,\r\n CommonModule,\r\n ],\r\n exports: [\r\n DropdownComponent\r\n ]\r\n})\r\nexport class DropdownModule { }\r\n","/*\r\n * Public API Surface of dropdown\r\n */\r\n\r\nexport * from './lib/dropdown.service';\r\nexport * from './lib/dropdown.component';\r\nexport * from './lib/dropdown.module';\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAKa,eAAe,CAAA;AAE1B,IAAA,WAAA,GAAA,GAAiB;+GAFN,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EA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