@piserve-tech/drop-down 1.2.110 → 1.2.111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/dropdown.component.mjs +211 -0
- package/esm2022/lib/dropdown.model.mjs +2 -0
- package/esm2022/lib/dropdown.module.mjs +28 -0
- package/esm2022/lib/dropdown.service.mjs +14 -0
- package/esm2022/piserve-tech-drop-down.mjs +5 -0
- package/esm2022/public-api.mjs +7 -0
- package/fesm2022/piserve-tech-drop-down.mjs +259 -0
- package/fesm2022/piserve-tech-drop-down.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/dropdown.component.d.ts +56 -0
- package/{src/lib/dropdown.model.ts → lib/dropdown.model.d.ts} +6 -7
- package/lib/dropdown.module.d.ts +9 -0
- package/lib/dropdown.service.d.ts +6 -0
- package/package.json +29 -16
- package/{src/public-api.ts → public-api.d.ts} +3 -7
- package/assets/images/down_arrow.svg +0 -7
- package/assets/images/edit.svg +0 -8
- package/assets/images/view.svg +0 -8
- package/ng-package.json +0 -7
- package/src/lib/dropdown.component.html +0 -236
- package/src/lib/dropdown.component.scss +0 -374
- package/src/lib/dropdown.component.spec.ts +0 -21
- package/src/lib/dropdown.component.ts +0 -226
- package/src/lib/dropdown.module.ts +0 -20
- package/src/lib/dropdown.service.spec.ts +0 -16
- package/src/lib/dropdown.service.ts +0 -9
- package/tsconfig.lib.json +0 -14
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Injectable, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, ViewChild, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import { v4 } from 'uuid';
|
|
4
|
+
import * as i1 from '@angular/forms';
|
|
5
|
+
import { FormsModule } from '@angular/forms';
|
|
6
|
+
import * as i2 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
|
|
9
|
+
class DropdownService {
|
|
10
|
+
constructor() { }
|
|
11
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
12
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownService, providedIn: 'root' }); }
|
|
13
|
+
}
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownService, decorators: [{
|
|
15
|
+
type: Injectable,
|
|
16
|
+
args: [{
|
|
17
|
+
providedIn: 'root'
|
|
18
|
+
}]
|
|
19
|
+
}], ctorParameters: function () { return []; } });
|
|
20
|
+
|
|
21
|
+
class DropdownComponent {
|
|
22
|
+
set items(value) {
|
|
23
|
+
this._items = value || [];
|
|
24
|
+
this.originalItems = this._items.slice();
|
|
25
|
+
this._filteredItems = this._items.slice(); // use a separate variable for rendering
|
|
26
|
+
this.cdr.markForCheck();
|
|
27
|
+
}
|
|
28
|
+
get items() {
|
|
29
|
+
return this._items;
|
|
30
|
+
}
|
|
31
|
+
constructor(cdr) {
|
|
32
|
+
this.cdr = cdr;
|
|
33
|
+
this.selectedItems = [];
|
|
34
|
+
this.placeholder = "";
|
|
35
|
+
this.selectedValues = "";
|
|
36
|
+
this.customButtons = [];
|
|
37
|
+
this.showBorder = true;
|
|
38
|
+
this.disable = false;
|
|
39
|
+
this.buttonClick = new EventEmitter();
|
|
40
|
+
this.selectedItemsChange = new EventEmitter();
|
|
41
|
+
this.onDropdownScroll = new EventEmitter();
|
|
42
|
+
this.onCreateNew = new EventEmitter();
|
|
43
|
+
this.onSearch = new EventEmitter();
|
|
44
|
+
//subLabel
|
|
45
|
+
this.showSubLabel = false;
|
|
46
|
+
this.dropdownId = v4();
|
|
47
|
+
this.dropdownOpened = false;
|
|
48
|
+
this.selectedItemName = "";
|
|
49
|
+
this.selectedItemImage = "";
|
|
50
|
+
this.originalItems = [];
|
|
51
|
+
this.searchTerm = "";
|
|
52
|
+
this.initialized = false;
|
|
53
|
+
this.searchText = "";
|
|
54
|
+
this._filteredItems = [];
|
|
55
|
+
this._items = [];
|
|
56
|
+
}
|
|
57
|
+
ngOnInit() { }
|
|
58
|
+
ngOnChanges(changes) {
|
|
59
|
+
if (changes["selectedItems"]) {
|
|
60
|
+
const item = changes["selectedItems"]["currentValue"];
|
|
61
|
+
this.selectedItems = item;
|
|
62
|
+
this.selectedItemName = this.selectedItems[0]?.label;
|
|
63
|
+
this.selectedItemImage = this.selectedItems[0]?.image;
|
|
64
|
+
}
|
|
65
|
+
if (changes["items"]) {
|
|
66
|
+
this.initialize();
|
|
67
|
+
this.originalItems = this.items.slice();
|
|
68
|
+
this.cdr.markForCheck();
|
|
69
|
+
}
|
|
70
|
+
if (changes["selectedValues"]) {
|
|
71
|
+
this.selectedItemName = this.selectedValues;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
initialize() {
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
if (this.selectedItems && this.selectedItems.length > 0) {
|
|
77
|
+
if (!this.multiple) {
|
|
78
|
+
this.searchText = "";
|
|
79
|
+
this.selectedItemName = this.selectedItems[0]?.label;
|
|
80
|
+
this.selectedItemImage = this.selectedItems[0]?.image;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}, 1000);
|
|
84
|
+
const uniqueItems = this.items.filter((selected, index, self) => index === self.findIndex((t) => t.value === selected.value));
|
|
85
|
+
this.items = uniqueItems;
|
|
86
|
+
}
|
|
87
|
+
openDropdown() {
|
|
88
|
+
this.dropdownOpened = !this.dropdownOpened;
|
|
89
|
+
const inputId = `searchInput-${this.dropdownId}`;
|
|
90
|
+
const inputEl = document.getElementById(inputId);
|
|
91
|
+
setTimeout(() => {
|
|
92
|
+
inputEl?.focus();
|
|
93
|
+
}, 0);
|
|
94
|
+
}
|
|
95
|
+
dropdownScroll(event) {
|
|
96
|
+
if (this.onDropdownScroll.observed) {
|
|
97
|
+
this.onDropdownScroll.emit(event);
|
|
98
|
+
this.cdr.markForCheck();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
selectItem(item) {
|
|
102
|
+
if (this.multiple) {
|
|
103
|
+
if (!this.selectedItems.includes(item)) {
|
|
104
|
+
this.selectedItems.push(item);
|
|
105
|
+
this.selectedItemsChange.emit(this.selectedItems);
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
this.selectedItems = this.selectedItems.filter((selected) => selected !== item);
|
|
109
|
+
this.selectedItemsChange.emit(this.selectedItems);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
this.searchText = "";
|
|
114
|
+
this.selectedItems[0] = item;
|
|
115
|
+
this.selectedItemName = this.selectedItems[0]?.label;
|
|
116
|
+
this.selectedItemImage = this.selectedItems[0]?.image;
|
|
117
|
+
this.dropdownOpened = false;
|
|
118
|
+
this.selectedItemsChange.emit(this.selectedItems);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
unselectItem(item) {
|
|
122
|
+
this.selectedItems = this.selectedItems.filter((selected) => selected !== item);
|
|
123
|
+
this.selectedItemsChange.emit(this.selectedItems);
|
|
124
|
+
}
|
|
125
|
+
unselectAll() {
|
|
126
|
+
this.selectedItems = [];
|
|
127
|
+
this.selectedItemName = "";
|
|
128
|
+
this.selectedItemImage = "";
|
|
129
|
+
this.selectedItemsChange.emit(this.selectedItems);
|
|
130
|
+
this.cdr.markForCheck();
|
|
131
|
+
}
|
|
132
|
+
onDocumentClick(event) {
|
|
133
|
+
const isClickInsideDropdown = this.dropdown.nativeElement.contains(event.target);
|
|
134
|
+
if (!isClickInsideDropdown) {
|
|
135
|
+
this.dropdownOpened = false;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
createNew() {
|
|
139
|
+
this.onCreateNew.emit();
|
|
140
|
+
this.dropdownOpened = false;
|
|
141
|
+
}
|
|
142
|
+
search(event) {
|
|
143
|
+
const keyCode = event.keyCode;
|
|
144
|
+
this.dropdownOpened = true;
|
|
145
|
+
this.searchTerm = event.target.value.toLowerCase();
|
|
146
|
+
if (!this.onSearch.observed) {
|
|
147
|
+
if (this.searchTerm.trim() === "") {
|
|
148
|
+
if (!this.multiple) {
|
|
149
|
+
this.unselectAll();
|
|
150
|
+
}
|
|
151
|
+
this._filteredItems = this.originalItems.slice();
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
const lowerCaseSearchTerm = this.searchTerm.toLowerCase();
|
|
155
|
+
this._filteredItems = this.originalItems.filter((item) => item.label.toLowerCase().includes(lowerCaseSearchTerm) ||
|
|
156
|
+
(item.value &&
|
|
157
|
+
item.value.toLowerCase().includes(lowerCaseSearchTerm)));
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
else {
|
|
161
|
+
this.onSearch.emit(this.searchTerm);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
handleButtonClick(action) {
|
|
165
|
+
action();
|
|
166
|
+
this.buttonClick.emit();
|
|
167
|
+
}
|
|
168
|
+
highlightMatch(text) {
|
|
169
|
+
const search = this.searchText?.trim() || this.searchTerm?.trim();
|
|
170
|
+
if (!search || !text)
|
|
171
|
+
return text;
|
|
172
|
+
const index = text.toLowerCase().indexOf(search.toLowerCase());
|
|
173
|
+
if (index === -1)
|
|
174
|
+
return text;
|
|
175
|
+
const before = text.substring(0, index);
|
|
176
|
+
const match = text.substring(index, index + search.length);
|
|
177
|
+
const after = text.substring(index + search.length);
|
|
178
|
+
return `${before}<span class="highlight-text">${match}</span>${after}`;
|
|
179
|
+
}
|
|
180
|
+
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 }); }
|
|
181
|
+
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", showCreateNew: "showCreateNew", selectedValues: "selectedValues", customButtons: "customButtons", showBorder: "showBorder", disable: "disable", showSubLabel: "showSubLabel", items: "items" }, 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\r\n #dropdown\r\n class=\"dropdown\"\r\n [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n 'dropdown-disabled': disable\r\n }\"\r\n>\r\n <div\r\n class=\"dropdown-field\"\r\n id=\"division\"\r\n [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\"\r\n (click)=\"openDropdown()\"\r\n >\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\" *ngIf=\"!selectedItem && multiple\">\r\n <div class=\"selected selectedList\">\r\n <ng-container *ngFor=\"let selectedItem of selectedItems\">\r\n <div class=\"selected-item\">\r\n <img\r\n *ngIf=\"selectedItem?.image\"\r\n class=\"multiSelected-icon-size\"\r\n [src]=\"selectedItem?.image\"\r\n alt=\"image\"\r\n />\r\n <span>{{ selectedItem.label }}</span>\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\"\r\n >×</span\r\n >\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"input-field\">\r\n <input\r\n [id]=\"'searchInput-' + dropdownId\"\r\n class=\"dropdown_text inline-input\"\r\n [(ngModel)]=\"searchText\"\r\n [placeholder]=\"placeholder\"\r\n (input)=\"search($event)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"dataSection single-input\" *ngIf=\"!multiple\">\r\n <div class=\"input-field\">\r\n <div class=\"input-with-icon\">\r\n <img\r\n *ngIf=\"selectedItemImage\"\r\n class=\"selected-icon-size\"\r\n [src]=\"selectedItemImage\"\r\n alt=\"image\"\r\n />\r\n <input\r\n [id]=\"'searchInput-' + dropdownId\"\r\n class=\"dropdown_text inline-input\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"selectedItemName\"\r\n (input)=\"search($event)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"dropdown-icons-container\">\r\n <div>\r\n <span\r\n (click)=\"unselectAll()\"\r\n *ngIf=\"selectedItems.length > 0 && multiple\"\r\n class=\"deselect\"\r\n >×\r\n </span>\r\n </div>\r\n <div\r\n class=\"dropdown-down-arrow\"\r\n [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\"\r\n >\r\n <svg\r\n width=\"1em\"\r\n viewBox=\"0 0 24 25\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"down-arrow-img\"\r\n >\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path\r\n id=\"Path\"\r\n d=\"M6 9.13741L12 15.229L18 9.13741\"\r\n stroke=\"#8E9AA0\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div\r\n class=\"dropdown-up-arrow\"\r\n [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\"\r\n >\r\n <svg\r\n width=\"1em\"\r\n viewBox=\"0 0 24 25\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"up-arrow-img\"\r\n >\r\n <path\r\n d=\"M18 15.229L12 9.1374L6 15.229\"\r\n stroke=\"#8E9AA0\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n #dropdownItems\r\n class=\"dropdown-items\"\r\n *ngIf=\"dropdownOpened\"\r\n (scroll)=\"dropdownScroll($event)\"\r\n >\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\r\n [ngClass]=\"{\r\n compact: !item?.image && !item?.subLabel,\r\n expanded: item?.image || item?.subLabel\r\n }\"\r\n class=\"items d-block\"\r\n *ngFor=\"let item of _filteredItems\"\r\n (click)=\"selectItem(item)\"\r\n >\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div class=\"content-wrapper\">\r\n <img\r\n *ngIf=\"item?.image\"\r\n [src]=\"item?.image\"\r\n alt=\"Item Image\"\r\n class=\"item-image icon-size\"\r\n />\r\n <div class=\"text-content\">\r\n <div\r\n class=\"item-label\"\r\n [innerHTML]=\"highlightMatch(item.label)\"\r\n ></div>\r\n <div *ngIf=\"showSubLabel\" class=\"item-sublabel\">\r\n {{ item?.subLabel }}\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown_buttons\"\r\n [class.empty]=\"customButtons.length === 0\"\r\n >\r\n <button\r\n *ngFor=\"let button of customButtons\"\r\n (click)=\"handleButtonClick(button.action)\"\r\n >\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\r\n class=\"items d-block\"\r\n [ngClass]=\"{\r\n compact: !item?.image && !item?.subLabel,\r\n expanded: item?.image || item?.subLabel\r\n }\"\r\n *ngFor=\"let item of _filteredItems\"\r\n (click)=\"selectItem(item)\"\r\n >\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div class=\"content-wrapper\">\r\n <img\r\n *ngIf=\"item?.image\"\r\n [src]=\"item?.image\"\r\n alt=\"Item Image\"\r\n class=\"item-image icon-size\"\r\n />\r\n <div class=\"text-content\">\r\n <div\r\n class=\"item-label\"\r\n [innerHTML]=\"highlightMatch(item.label)\"\r\n ></div>\r\n <div *ngIf=\"showSubLabel\" class=\"item-sublabel\">\r\n {{ item?.subLabel }}\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown_buttons\"\r\n [class.empty]=\"customButtons.length === 0\"\r\n >\r\n <button\r\n *ngFor=\"let button of customButtons\"\r\n (click)=\"handleButtonClick(button.action)\"\r\n >\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>\r\n", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap;max-height:80px;overflow-y:auto;overflow-x:hidden}.dropdown .dropdown-field .selected .selected-item{background:#e3e3da;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-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;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:auto;position:absolute!important;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;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;height:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.icon-size{width:30px;height:30px;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;justify-content:space-between}.dropdown-down-arrow,.dropdown-up-arrow,.deselect{width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer}.dropdown-down-arrow{cursor:pointer}.dropdown-down-arrow.opened{display:none}.dropdown-down-arrow.closed{display:block}.dropdown-up-arrow{cursor:pointer}.dropdown-up-arrow.closed{display:none}.close-icon{margin-left:8px;margin-right:5px}.iconSection{display:flex;flex-direction:row-reverse;padding:1px;position:relative;justify-content:center;align-items:center}.dropdown-icons-container{display:flex;gap:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.content-wrapper{display:flex;align-items:center;gap:8px;flex:1}.text-content{display:flex;flex-direction:column}.item-label{font-size:14px;font-weight:400;line-height:1.3}.item-sublabel{font-size:11px;color:#666;line-height:1.2}.dropdown_buttons{display:flex;gap:4px}.dropdown_buttons.empty:after{content:\"\";display:inline-block;width:4px;height:1px}.compact{line-height:32px}.expanded{line-height:41px}.input-field{width:100%}.input-with-icon{display:flex;align-items:center;gap:8px;width:100%}.selected-icon-size{width:20px;height:20px;flex-shrink:0}.dropdown_text.inline-input{flex:1;border:none;outline:none;padding:0;background:transparent;font-family:inherit;font-size:inherit;color:inherit}.single-input{width:80%;white-space:nowrap}.item-label{font-size:14px;line-height:1.4;color:#333}.highlight-text{font-weight:600;background-repeat:no-repeat;background-size:100% .3em;background-position:0 88%;padding:.1em .05em;border-radius:2px;color:#1a1a1a;transition:all .2s ease-in-out}.dropdown .dropdown-field .input-field .dropdown_text{background:#fff!important}.dropdown.dropdown-disabled .dropdown-field .input-field .dropdown_text,.dropdown.dropdown-disabled .dropdown-field{background:#e9ecef!important;pointer-events:none}\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 }); }
|
|
182
|
+
}
|
|
183
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
184
|
+
type: Component,
|
|
185
|
+
args: [{ selector: "lib-dropdown", encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\r\n #dropdown\r\n class=\"dropdown\"\r\n [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n 'dropdown-disabled': disable\r\n }\"\r\n>\r\n <div\r\n class=\"dropdown-field\"\r\n id=\"division\"\r\n [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\"\r\n (click)=\"openDropdown()\"\r\n >\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\" *ngIf=\"!selectedItem && multiple\">\r\n <div class=\"selected selectedList\">\r\n <ng-container *ngFor=\"let selectedItem of selectedItems\">\r\n <div class=\"selected-item\">\r\n <img\r\n *ngIf=\"selectedItem?.image\"\r\n class=\"multiSelected-icon-size\"\r\n [src]=\"selectedItem?.image\"\r\n alt=\"image\"\r\n />\r\n <span>{{ selectedItem.label }}</span>\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\"\r\n >×</span\r\n >\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"input-field\">\r\n <input\r\n [id]=\"'searchInput-' + dropdownId\"\r\n class=\"dropdown_text inline-input\"\r\n [(ngModel)]=\"searchText\"\r\n [placeholder]=\"placeholder\"\r\n (input)=\"search($event)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"dataSection single-input\" *ngIf=\"!multiple\">\r\n <div class=\"input-field\">\r\n <div class=\"input-with-icon\">\r\n <img\r\n *ngIf=\"selectedItemImage\"\r\n class=\"selected-icon-size\"\r\n [src]=\"selectedItemImage\"\r\n alt=\"image\"\r\n />\r\n <input\r\n [id]=\"'searchInput-' + dropdownId\"\r\n class=\"dropdown_text inline-input\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"selectedItemName\"\r\n (input)=\"search($event)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"dropdown-icons-container\">\r\n <div>\r\n <span\r\n (click)=\"unselectAll()\"\r\n *ngIf=\"selectedItems.length > 0 && multiple\"\r\n class=\"deselect\"\r\n >×\r\n </span>\r\n </div>\r\n <div\r\n class=\"dropdown-down-arrow\"\r\n [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\"\r\n >\r\n <svg\r\n width=\"1em\"\r\n viewBox=\"0 0 24 25\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"down-arrow-img\"\r\n >\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path\r\n id=\"Path\"\r\n d=\"M6 9.13741L12 15.229L18 9.13741\"\r\n stroke=\"#8E9AA0\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div\r\n class=\"dropdown-up-arrow\"\r\n [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\"\r\n >\r\n <svg\r\n width=\"1em\"\r\n viewBox=\"0 0 24 25\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"up-arrow-img\"\r\n >\r\n <path\r\n d=\"M18 15.229L12 9.1374L6 15.229\"\r\n stroke=\"#8E9AA0\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n #dropdownItems\r\n class=\"dropdown-items\"\r\n *ngIf=\"dropdownOpened\"\r\n (scroll)=\"dropdownScroll($event)\"\r\n >\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\r\n [ngClass]=\"{\r\n compact: !item?.image && !item?.subLabel,\r\n expanded: item?.image || item?.subLabel\r\n }\"\r\n class=\"items d-block\"\r\n *ngFor=\"let item of _filteredItems\"\r\n (click)=\"selectItem(item)\"\r\n >\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div class=\"content-wrapper\">\r\n <img\r\n *ngIf=\"item?.image\"\r\n [src]=\"item?.image\"\r\n alt=\"Item Image\"\r\n class=\"item-image icon-size\"\r\n />\r\n <div class=\"text-content\">\r\n <div\r\n class=\"item-label\"\r\n [innerHTML]=\"highlightMatch(item.label)\"\r\n ></div>\r\n <div *ngIf=\"showSubLabel\" class=\"item-sublabel\">\r\n {{ item?.subLabel }}\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown_buttons\"\r\n [class.empty]=\"customButtons.length === 0\"\r\n >\r\n <button\r\n *ngFor=\"let button of customButtons\"\r\n (click)=\"handleButtonClick(button.action)\"\r\n >\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\r\n class=\"items d-block\"\r\n [ngClass]=\"{\r\n compact: !item?.image && !item?.subLabel,\r\n expanded: item?.image || item?.subLabel\r\n }\"\r\n *ngFor=\"let item of _filteredItems\"\r\n (click)=\"selectItem(item)\"\r\n >\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div class=\"content-wrapper\">\r\n <img\r\n *ngIf=\"item?.image\"\r\n [src]=\"item?.image\"\r\n alt=\"Item Image\"\r\n class=\"item-image icon-size\"\r\n />\r\n <div class=\"text-content\">\r\n <div\r\n class=\"item-label\"\r\n [innerHTML]=\"highlightMatch(item.label)\"\r\n ></div>\r\n <div *ngIf=\"showSubLabel\" class=\"item-sublabel\">\r\n {{ item?.subLabel }}\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown_buttons\"\r\n [class.empty]=\"customButtons.length === 0\"\r\n >\r\n <button\r\n *ngFor=\"let button of customButtons\"\r\n (click)=\"handleButtonClick(button.action)\"\r\n >\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>\r\n", styles: [".dropdown{background:#fff;border-radius:6px}.dropdown .dropdown-field{background:#fff;border-radius:6px;position:relative;cursor:pointer}.dropdown .dropdown-field .selected.selectedList{display:flex;flex-wrap:wrap;max-height:80px;overflow-y:auto;overflow-x:hidden}.dropdown .dropdown-field .selected .selected-item{background:#e3e3da;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-style:normal}@media (max-width: 576px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;margin-left:3px;padding-left:2px}}@media (max-width: 420px){.dropdown .dropdown-field .input-field .dropdown_text{width:53%;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:auto;position:absolute!important;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;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;height:6px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{background-color:#b2b2b2;border-radius:6px}.space{width:10px}.icon-size{width:30px;height:30px;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;justify-content:space-between}.dropdown-down-arrow,.dropdown-up-arrow,.deselect{width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer}.dropdown-down-arrow{cursor:pointer}.dropdown-down-arrow.opened{display:none}.dropdown-down-arrow.closed{display:block}.dropdown-up-arrow{cursor:pointer}.dropdown-up-arrow.closed{display:none}.close-icon{margin-left:8px;margin-right:5px}.iconSection{display:flex;flex-direction:row-reverse;padding:1px;position:relative;justify-content:center;align-items:center}.dropdown-icons-container{display:flex;gap:10px}.item-details{display:flex;align-items:center;justify-content:space-between}.content-wrapper{display:flex;align-items:center;gap:8px;flex:1}.text-content{display:flex;flex-direction:column}.item-label{font-size:14px;font-weight:400;line-height:1.3}.item-sublabel{font-size:11px;color:#666;line-height:1.2}.dropdown_buttons{display:flex;gap:4px}.dropdown_buttons.empty:after{content:\"\";display:inline-block;width:4px;height:1px}.compact{line-height:32px}.expanded{line-height:41px}.input-field{width:100%}.input-with-icon{display:flex;align-items:center;gap:8px;width:100%}.selected-icon-size{width:20px;height:20px;flex-shrink:0}.dropdown_text.inline-input{flex:1;border:none;outline:none;padding:0;background:transparent;font-family:inherit;font-size:inherit;color:inherit}.single-input{width:80%;white-space:nowrap}.item-label{font-size:14px;line-height:1.4;color:#333}.highlight-text{font-weight:600;background-repeat:no-repeat;background-size:100% .3em;background-position:0 88%;padding:.1em .05em;border-radius:2px;color:#1a1a1a;transition:all .2s ease-in-out}.dropdown .dropdown-field .input-field .dropdown_text{background:#fff!important}.dropdown.dropdown-disabled .dropdown-field .input-field .dropdown_text,.dropdown.dropdown-disabled .dropdown-field{background:#e9ecef!important;pointer-events:none}\n"] }]
|
|
186
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { multiple: [{
|
|
187
|
+
type: Input
|
|
188
|
+
}], selectedItems: [{
|
|
189
|
+
type: Input
|
|
190
|
+
}], placeholder: [{
|
|
191
|
+
type: Input
|
|
192
|
+
}], showCreateNew: [{
|
|
193
|
+
type: Input
|
|
194
|
+
}], selectedValues: [{
|
|
195
|
+
type: Input
|
|
196
|
+
}], customButtons: [{
|
|
197
|
+
type: Input
|
|
198
|
+
}], showBorder: [{
|
|
199
|
+
type: Input
|
|
200
|
+
}], disable: [{
|
|
201
|
+
type: Input
|
|
202
|
+
}], buttonClick: [{
|
|
203
|
+
type: Output
|
|
204
|
+
}], selectedItemsChange: [{
|
|
205
|
+
type: Output
|
|
206
|
+
}], onDropdownScroll: [{
|
|
207
|
+
type: Output
|
|
208
|
+
}], onCreateNew: [{
|
|
209
|
+
type: Output
|
|
210
|
+
}], onSearch: [{
|
|
211
|
+
type: Output
|
|
212
|
+
}], showSubLabel: [{
|
|
213
|
+
type: Input
|
|
214
|
+
}], items: [{
|
|
215
|
+
type: Input
|
|
216
|
+
}], dropdownitems: [{
|
|
217
|
+
type: ViewChild,
|
|
218
|
+
args: ["dropdownItems"]
|
|
219
|
+
}], dropdown: [{
|
|
220
|
+
type: ViewChild,
|
|
221
|
+
args: ["dropdown"]
|
|
222
|
+
}], onDocumentClick: [{
|
|
223
|
+
type: HostListener,
|
|
224
|
+
args: ["document:click", ["$event"]]
|
|
225
|
+
}] } });
|
|
226
|
+
|
|
227
|
+
class DropdownModule {
|
|
228
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
229
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: DropdownModule, declarations: [DropdownComponent], imports: [FormsModule,
|
|
230
|
+
CommonModule], exports: [DropdownComponent] }); }
|
|
231
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownModule, imports: [FormsModule,
|
|
232
|
+
CommonModule] }); }
|
|
233
|
+
}
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropdownModule, decorators: [{
|
|
235
|
+
type: NgModule,
|
|
236
|
+
args: [{
|
|
237
|
+
declarations: [
|
|
238
|
+
DropdownComponent
|
|
239
|
+
],
|
|
240
|
+
imports: [
|
|
241
|
+
FormsModule,
|
|
242
|
+
CommonModule,
|
|
243
|
+
],
|
|
244
|
+
exports: [
|
|
245
|
+
DropdownComponent
|
|
246
|
+
]
|
|
247
|
+
}]
|
|
248
|
+
}] });
|
|
249
|
+
|
|
250
|
+
/*
|
|
251
|
+
* Public API Surface of dropdown
|
|
252
|
+
*/
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Generated bundle index. Do not edit.
|
|
256
|
+
*/
|
|
257
|
+
|
|
258
|
+
export { DropdownComponent, DropdownModule, DropdownService };
|
|
259
|
+
//# sourceMappingURL=piserve-tech-drop-down.mjs.map
|
|
@@ -0,0 +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\nimport { v4 as uuidv4 } from 'uuid';\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() 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 @Input() disable: boolean = false;\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 dropdownId = uuidv4();\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 _filteredItems: DropdownItem[] = [];\r\n\r\n private _items: DropdownItem[] = [];\r\n\r\n @Input()\r\n set items(value: DropdownItem[]) {\r\n this._items = value || [];\r\n this.originalItems = this._items.slice();\r\n this._filteredItems = this._items.slice(); // use a separate variable for rendering\r\n this.cdr.markForCheck();\r\n }\r\n get items(): DropdownItem[] {\r\n return this._items;\r\n }\r\n\r\n constructor(private cdr: ChangeDetectorRef) {}\r\n\r\n ngOnInit(): void {}\r\n\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 }\r\n if (changes[\"items\"]) {\r\n this.initialize();\r\n this.originalItems = this.items.slice();\r\n this.cdr.markForCheck();\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) {\r\n this.searchText = \"\";\r\n this.selectedItemName = this.selectedItems[0]?.label;\r\n this.selectedItemImage = this.selectedItems[0]?.image;\r\n }\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 const inputId = `searchInput-${this.dropdownId}`;\r\n const inputEl = document.getElementById(inputId);\r\n setTimeout(() => {\r\n inputEl?.focus();\r\n }, 0);\r\n \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.selectedItemImage = \"\";\r\n this.selectedItemsChange.emit(this.selectedItems);\r\n this.cdr.markForCheck();\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\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 if (!this.multiple) {\r\n this.unselectAll();\r\n }\r\n this._filteredItems = this.originalItems.slice();\r\n } else {\r\n const lowerCaseSearchTerm = this.searchTerm.toLowerCase();\r\n this._filteredItems = 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 highlightMatch(text: string): string {\r\n const search = this.searchText?.trim() || this.searchTerm?.trim();\r\n if (!search || !text) return text;\r\n\r\n const index = text.toLowerCase().indexOf(search.toLowerCase());\r\n if (index === -1) return text;\r\n\r\n const before = text.substring(0, index);\r\n const match = text.substring(index, index + search.length);\r\n const after = text.substring(index + search.length);\r\n\r\n return `${before}<span class=\"highlight-text\">${match}</span>${after}`;\r\n }\r\n}\r\n","<div\r\n #dropdown\r\n class=\"dropdown\"\r\n [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n 'dropdown-disabled': disable\r\n }\"\r\n>\r\n <div\r\n class=\"dropdown-field\"\r\n id=\"division\"\r\n [ngClass]=\"{\r\n opened: showBorder && dropdownOpened,\r\n closed: showBorder && !dropdownOpened,\r\n }\"\r\n (click)=\"openDropdown()\"\r\n >\r\n <!-- <div *ngIf=\"selectedValues !== '' && !selectedItemName\" class=\"selected\">\r\n {{ selectedValues }}\r\n </div> -->\r\n <div class=\"flexSection\">\r\n <div class=\"dataSection\" *ngIf=\"!selectedItem && multiple\">\r\n <div class=\"selected selectedList\">\r\n <ng-container *ngFor=\"let selectedItem of selectedItems\">\r\n <div class=\"selected-item\">\r\n <img\r\n *ngIf=\"selectedItem?.image\"\r\n class=\"multiSelected-icon-size\"\r\n [src]=\"selectedItem?.image\"\r\n alt=\"image\"\r\n />\r\n <span>{{ selectedItem.label }}</span>\r\n <span (click)=\"unselectItem(selectedItem)\" class=\"close-icon\"\r\n >×</span\r\n >\r\n </div>\r\n </ng-container>\r\n\r\n <div class=\"input-field\">\r\n <input\r\n [id]=\"'searchInput-' + dropdownId\"\r\n class=\"dropdown_text inline-input\"\r\n [(ngModel)]=\"searchText\"\r\n [placeholder]=\"placeholder\"\r\n (input)=\"search($event)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"dataSection single-input\" *ngIf=\"!multiple\">\r\n <div class=\"input-field\">\r\n <div class=\"input-with-icon\">\r\n <img\r\n *ngIf=\"selectedItemImage\"\r\n class=\"selected-icon-size\"\r\n [src]=\"selectedItemImage\"\r\n alt=\"image\"\r\n />\r\n <input\r\n [id]=\"'searchInput-' + dropdownId\"\r\n class=\"dropdown_text inline-input\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"selectedItemName\"\r\n (input)=\"search($event)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"iconSection\">\r\n <div class=\"dropdown-icons-container\">\r\n <div>\r\n <span\r\n (click)=\"unselectAll()\"\r\n *ngIf=\"selectedItems.length > 0 && multiple\"\r\n class=\"deselect\"\r\n >×\r\n </span>\r\n </div>\r\n <div\r\n class=\"dropdown-down-arrow\"\r\n [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\"\r\n >\r\n <svg\r\n width=\"1em\"\r\n viewBox=\"0 0 24 25\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"down-arrow-img\"\r\n >\r\n <g id=\"Down Arrow\">\r\n <g id=\"Group\">\r\n <path\r\n id=\"Path\"\r\n d=\"M6 9.13741L12 15.229L18 9.13741\"\r\n stroke=\"#8E9AA0\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </g>\r\n </g>\r\n </svg>\r\n </div>\r\n <div\r\n class=\"dropdown-up-arrow\"\r\n [ngClass]=\"{ opened: dropdownOpened, closed: !dropdownOpened }\"\r\n >\r\n <svg\r\n width=\"1em\"\r\n viewBox=\"0 0 24 25\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n class=\"up-arrow-img\"\r\n >\r\n <path\r\n d=\"M18 15.229L12 9.1374L6 15.229\"\r\n stroke=\"#8E9AA0\"\r\n stroke-width=\"1.5\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div\r\n #dropdownItems\r\n class=\"dropdown-items\"\r\n *ngIf=\"dropdownOpened\"\r\n (scroll)=\"dropdownScroll($event)\"\r\n >\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\r\n [ngClass]=\"{\r\n compact: !item?.image && !item?.subLabel,\r\n expanded: item?.image || item?.subLabel\r\n }\"\r\n class=\"items d-block\"\r\n *ngFor=\"let item of _filteredItems\"\r\n (click)=\"selectItem(item)\"\r\n >\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div class=\"content-wrapper\">\r\n <img\r\n *ngIf=\"item?.image\"\r\n [src]=\"item?.image\"\r\n alt=\"Item Image\"\r\n class=\"item-image icon-size\"\r\n />\r\n <div class=\"text-content\">\r\n <div\r\n class=\"item-label\"\r\n [innerHTML]=\"highlightMatch(item.label)\"\r\n ></div>\r\n <div *ngIf=\"showSubLabel\" class=\"item-sublabel\">\r\n {{ item?.subLabel }}\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown_buttons\"\r\n [class.empty]=\"customButtons.length === 0\"\r\n >\r\n <button\r\n *ngFor=\"let button of customButtons\"\r\n (click)=\"handleButtonClick(button.action)\"\r\n >\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\r\n class=\"items d-block\"\r\n [ngClass]=\"{\r\n compact: !item?.image && !item?.subLabel,\r\n expanded: item?.image || item?.subLabel\r\n }\"\r\n *ngFor=\"let item of _filteredItems\"\r\n (click)=\"selectItem(item)\"\r\n >\r\n <div class=\"dropdown-item\">\r\n <div class=\"item-details\">\r\n <div class=\"content-wrapper\">\r\n <img\r\n *ngIf=\"item?.image\"\r\n [src]=\"item?.image\"\r\n alt=\"Item Image\"\r\n class=\"item-image icon-size\"\r\n />\r\n <div class=\"text-content\">\r\n <div\r\n class=\"item-label\"\r\n [innerHTML]=\"highlightMatch(item.label)\"\r\n ></div>\r\n <div *ngIf=\"showSubLabel\" class=\"item-sublabel\">\r\n {{ item?.subLabel }}\r\n </div>\r\n </div>\r\n </div>\r\n <div\r\n class=\"dropdown_buttons\"\r\n [class.empty]=\"customButtons.length === 0\"\r\n >\r\n <button\r\n *ngFor=\"let button of customButtons\"\r\n (click)=\"handleButtonClick(button.action)\"\r\n >\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>\r\n","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":["uuidv4"],"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;;;MCoBY,iBAAiB,CAAA;IAoC5B,IACI,KAAK,CAAC,KAAqB,EAAA;AAC7B,QAAA,IAAI,CAAC,MAAM,GAAG,KAAK,IAAI,EAAE,CAAC;QAC1B,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACzC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;AAC1C,QAAA,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;KACzB;AACD,IAAA,IAAI,KAAK,GAAA;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;KACpB;AAED,IAAA,WAAA,CAAoB,GAAsB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AA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAPvB,WAAW;YACX,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAMH,cAAc,EAAA,UAAA,EAAA,CAAA;kBAZ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,WAAW;wBACX,YAAY;AACb,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,iBAAiB;AAClB,qBAAA;AACF,iBAAA,CAAA;;;AClBD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { ChangeDetectorRef, ElementRef, EventEmitter, OnInit, SimpleChanges } from "@angular/core";
|
|
2
|
+
import { DropdownItem } from "./dropdown.model";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DropdownComponent implements OnInit {
|
|
5
|
+
private cdr;
|
|
6
|
+
multiple: boolean;
|
|
7
|
+
selectedItems: any[];
|
|
8
|
+
placeholder: String;
|
|
9
|
+
showCreateNew: boolean;
|
|
10
|
+
selectedValues: string;
|
|
11
|
+
customButtons: {
|
|
12
|
+
label: string;
|
|
13
|
+
icon: string;
|
|
14
|
+
color: string;
|
|
15
|
+
action: () => void;
|
|
16
|
+
}[];
|
|
17
|
+
showBorder: boolean;
|
|
18
|
+
disable: boolean;
|
|
19
|
+
buttonClick: EventEmitter<Event>;
|
|
20
|
+
selectedItemsChange: EventEmitter<any[]>;
|
|
21
|
+
onDropdownScroll: EventEmitter<Event>;
|
|
22
|
+
onCreateNew: EventEmitter<Event>;
|
|
23
|
+
onSearch: EventEmitter<string>;
|
|
24
|
+
showSubLabel: boolean;
|
|
25
|
+
dropdownId: string;
|
|
26
|
+
dropdownOpened: boolean;
|
|
27
|
+
selectedItem: any;
|
|
28
|
+
selectedItemName: string;
|
|
29
|
+
selectedItemImage: string;
|
|
30
|
+
originalItems: DropdownItem[];
|
|
31
|
+
searchTerm: string;
|
|
32
|
+
initialized: boolean;
|
|
33
|
+
searchText: string;
|
|
34
|
+
_filteredItems: DropdownItem[];
|
|
35
|
+
private _items;
|
|
36
|
+
set items(value: DropdownItem[]);
|
|
37
|
+
get items(): DropdownItem[];
|
|
38
|
+
constructor(cdr: ChangeDetectorRef);
|
|
39
|
+
ngOnInit(): void;
|
|
40
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
41
|
+
initialize(): void;
|
|
42
|
+
openDropdown(): void;
|
|
43
|
+
dropdownitems: ElementRef<any>;
|
|
44
|
+
dropdownScroll(event: any): void;
|
|
45
|
+
selectItem(item: any): void;
|
|
46
|
+
unselectItem(item: any): void;
|
|
47
|
+
unselectAll(): void;
|
|
48
|
+
dropdown: ElementRef;
|
|
49
|
+
onDocumentClick(event: Event): void;
|
|
50
|
+
createNew(): void;
|
|
51
|
+
search(event: any): void;
|
|
52
|
+
handleButtonClick(action: () => void): void;
|
|
53
|
+
highlightMatch(text: string): string;
|
|
54
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent, never>;
|
|
55
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent, "lib-dropdown", never, { "multiple": { "alias": "multiple"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "showCreateNew": { "alias": "showCreateNew"; "required": false; }; "selectedValues": { "alias": "selectedValues"; "required": false; }; "customButtons": { "alias": "customButtons"; "required": false; }; "showBorder": { "alias": "showBorder"; "required": false; }; "disable": { "alias": "disable"; "required": false; }; "showSubLabel": { "alias": "showSubLabel"; "required": false; }; "items": { "alias": "items"; "required": false; }; }, { "buttonClick": "buttonClick"; "selectedItemsChange": "selectedItemsChange"; "onDropdownScroll": "onDropdownScroll"; "onCreateNew": "onCreateNew"; "onSearch": "onSearch"; }, never, never, false, never>;
|
|
56
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export interface DropdownItem {
|
|
2
|
-
value: string;
|
|
3
|
-
label: string;
|
|
4
|
-
image: string;
|
|
5
|
-
subLabel?: string
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export interface DropdownItem {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
image: string;
|
|
5
|
+
subLabel?: string;
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./dropdown.component";
|
|
3
|
+
import * as i2 from "@angular/forms";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
export declare class DropdownModule {
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DropdownModule, never>;
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DropdownModule, [typeof i1.DropdownComponent], [typeof i2.FormsModule, typeof i3.CommonModule], [typeof i1.DropdownComponent]>;
|
|
8
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DropdownModule>;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@piserve-tech/drop-down",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^16.2.0",
|
|
6
|
-
"@angular/core": "^16.2.0"
|
|
7
|
-
},
|
|
8
|
-
"dependencies": {
|
|
9
|
-
"tslib": "^2.3.0"
|
|
10
|
-
},
|
|
11
|
-
"sideEffects": false,
|
|
12
|
-
"repository": {
|
|
13
|
-
"type": "git",
|
|
14
|
-
"url": "https://penta.internal.piserve.com/form-builder/library-dropdown"
|
|
15
|
-
}
|
|
16
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@piserve-tech/drop-down",
|
|
3
|
+
"version": "1.2.111",
|
|
4
|
+
"peerDependencies": {
|
|
5
|
+
"@angular/common": "^16.2.0",
|
|
6
|
+
"@angular/core": "^16.2.0"
|
|
7
|
+
},
|
|
8
|
+
"dependencies": {
|
|
9
|
+
"tslib": "^2.3.0"
|
|
10
|
+
},
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://penta.internal.piserve.com/form-builder/library-dropdown"
|
|
15
|
+
},
|
|
16
|
+
"module": "fesm2022/piserve-tech-drop-down.mjs",
|
|
17
|
+
"typings": "index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
"./package.json": {
|
|
20
|
+
"default": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./index.d.ts",
|
|
24
|
+
"esm2022": "./esm2022/piserve-tech-drop-down.mjs",
|
|
25
|
+
"esm": "./esm2022/piserve-tech-drop-down.mjs",
|
|
26
|
+
"default": "./fesm2022/piserve-tech-drop-down.mjs"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export * from './lib/dropdown.service';
|
|
6
|
-
export * from './lib/dropdown.component';
|
|
7
|
-
export * from './lib/dropdown.module';
|
|
1
|
+
export * from './lib/dropdown.service';
|
|
2
|
+
export * from './lib/dropdown.component';
|
|
3
|
+
export * from './lib/dropdown.module';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="Down Arrow">
|
|
3
|
-
<g id="Group">
|
|
4
|
-
<path id="Path" d="M6 9.13741L12 15.229L18 9.13741" stroke="#8E9AA0" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
</g>
|
|
6
|
-
</g>
|
|
7
|
-
</svg>
|
package/assets/images/edit.svg
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="Group">
|
|
3
|
-
<g id="Group 78">
|
|
4
|
-
<path id="Path" fill-rule="evenodd" clip-rule="evenodd" d="M3.90685 12.0417H0.958008V9.09284C0.958008 8.79057 1.07803 8.50068 1.29181 8.28701L8.2861 1.29272C8.49977 1.07864 8.7898 0.958344 9.09226 0.958344C9.39471 0.958344 9.68475 1.07864 9.89841 1.29272L11.707 3.10127C11.921 3.31493 12.0413 3.60497 12.0413 3.90743C12.0413 4.20988 11.921 4.49992 11.707 4.71358L4.71268 11.7079C4.49884 11.9214 4.20905 12.0415 3.90685 12.0417Z" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
<path id="Path_2" d="M7.19482 3.03896L9.96566 5.80979" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
-
</g>
|
|
7
|
-
</g>
|
|
8
|
-
</svg>
|
package/assets/images/view.svg
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<svg width="15" height="13" viewBox="0 0 15 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<g id="Group">
|
|
3
|
-
<g id="Group_2">
|
|
4
|
-
<path id="Path" d="M9.15028 4.91C10.0611 5.78825 10.0611 7.214 9.15028 8.09375C8.2395 8.972 6.76094 8.972 5.84861 8.09375C4.93783 7.2155 4.93783 5.78975 5.84861 4.91C6.76094 4.03025 8.23872 4.03025 9.15028 4.91" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
-
<path id="Path_2" fill-rule="evenodd" clip-rule="evenodd" d="M0.5 6.5C0.5 6.00575 0.618222 5.51675 0.846889 5.066V5.066C2.02522 2.74325 4.62922 1.25 7.5 1.25C10.3708 1.25 12.9748 2.74325 14.1531 5.066V5.066C14.3818 5.51675 14.5 6.00575 14.5 6.5C14.5 6.99425 14.3818 7.48325 14.1531 7.934V7.934C12.9748 10.2567 10.3708 11.75 7.5 11.75C4.62922 11.75 2.02522 10.2567 0.846889 7.934V7.934C0.618222 7.48325 0.5 6.99425 0.5 6.5Z" stroke="#084FFF" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
-
</g>
|
|
7
|
-
</g>
|
|
8
|
-
</svg>
|