@piserve-tech/drop-down 1.2.61 → 1.2.62

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.
@@ -117,11 +117,11 @@ export class DropdownComponent {
117
117
  this.buttonClick.emit();
118
118
  }
119
119
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
120
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownComponent, selector: "lib-dropdown", inputs: { multiple: "multiple", scrollable: "scrollable", 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 }], 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 !== ''\" 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>&nbsp;\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">&times;</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=\"\r\n (selectedItems.length > 0 || selectedItemName != '') && multiple\r\n \" class=\"deselect\">&times;\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=\"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 </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:15px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:20px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}.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}@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}.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"] }], encapsulation: i0.ViewEncapsulation.None }); }
120
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownComponent, selector: "lib-dropdown", inputs: { multiple: "multiple", scrollable: "scrollable", 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 }], 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 !== ''\" 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>&nbsp;\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">&times;</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=\"\r\n (selectedItems.length > 0 || selectedItemName != '') && multiple\r\n \" class=\"deselect\">&times;\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=\"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 </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}@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}.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"] }], encapsulation: i0.ViewEncapsulation.None }); }
121
121
  }
122
122
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, decorators: [{
123
123
  type: Component,
124
- args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, 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 !== ''\" 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>&nbsp;\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">&times;</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=\"\r\n (selectedItems.length > 0 || selectedItemName != '') && multiple\r\n \" class=\"deselect\">&times;\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=\"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 </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:15px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:20px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}.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}@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}.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"] }]
124
+ args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, 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 !== ''\" 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>&nbsp;\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">&times;</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=\"\r\n (selectedItems.length > 0 || selectedItemName != '') && multiple\r\n \" class=\"deselect\">&times;\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=\"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 </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}@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}.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"] }]
125
125
  }], ctorParameters: function () { return []; }, propDecorators: { multiple: [{
126
126
  type: Input
127
127
  }], scrollable: [{
@@ -132,11 +132,11 @@ class DropdownComponent {
132
132
  this.buttonClick.emit();
133
133
  }
134
134
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
135
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownComponent, selector: "lib-dropdown", inputs: { multiple: "multiple", scrollable: "scrollable", 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 }], 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 !== ''\" 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>&nbsp;\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">&times;</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=\"\r\n (selectedItems.length > 0 || selectedItemName != '') && multiple\r\n \" class=\"deselect\">&times;\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=\"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 </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:15px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:20px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}.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}@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}.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"] }], encapsulation: i0.ViewEncapsulation.None }); }
135
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DropdownComponent, selector: "lib-dropdown", inputs: { multiple: "multiple", scrollable: "scrollable", 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 }], 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 !== ''\" 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>&nbsp;\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">&times;</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=\"\r\n (selectedItems.length > 0 || selectedItemName != '') && multiple\r\n \" class=\"deselect\">&times;\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=\"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 </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}@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}.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"] }], encapsulation: i0.ViewEncapsulation.None }); }
136
136
  }
137
137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, decorators: [{
138
138
  type: Component,
139
- args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, 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 !== ''\" 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>&nbsp;\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">&times;</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=\"\r\n (selectedItems.length > 0 || selectedItemName != '') && multiple\r\n \" class=\"deselect\">&times;\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=\"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 </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:15px}}@media only screen and (min-width: 992px){.dropdown .dropdown-field .input-field .dropdown_text{height:20px}}@media only screen and (min-width: 1200px){.dropdown .dropdown-field .input-field .dropdown_text{height:25px}}.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}@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}.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"] }]
139
+ args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, 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 !== ''\" 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>&nbsp;\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\">&times;</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=\"\r\n (selectedItems.length > 0 || selectedItemName != '') && multiple\r\n \" class=\"deselect\">&times;\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=\"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 </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}@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}.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"] }]
140
140
  }], ctorParameters: function () { return []; }, propDecorators: { multiple: [{
141
141
  type: Input
142
142
  }], scrollable: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piserve-tech/drop-down",
3
- "version": "1.2.61",
3
+ "version": "1.2.62",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.0",
6
6
  "@angular/core": "^16.2.0"