mapa-library-ui 1.5.4 → 1.6.0
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/fesm2022/mapa-library-ui-src-lib-components-dropdown-v2.mjs +159 -0
- package/fesm2022/mapa-library-ui-src-lib-components-dropdown-v2.mjs.map +1 -0
- package/fesm2022/mapa-library-ui.mjs +100 -2
- package/fesm2022/mapa-library-ui.mjs.map +1 -1
- package/index.d.ts +25 -1
- package/mapa-library-ui-1.6.0.tgz +0 -0
- package/package.json +9 -1
- package/src/lib/components/dropdown-v2/index.d.ts +150 -0
- package/mapa-library-ui-1.5.4.tgz +0 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, signal, HostListener, ViewChild, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
|
|
6
|
+
class ElementBase {
|
|
7
|
+
constructor(options = {}) {
|
|
8
|
+
this.value = options.value || "";
|
|
9
|
+
this.key = options.key || "";
|
|
10
|
+
this.label = options.label || "";
|
|
11
|
+
this.required = !!options.required;
|
|
12
|
+
this.order = options.order === undefined ? 1 : options.order;
|
|
13
|
+
this.controlType = options.controlType || "";
|
|
14
|
+
this.type = options.type || "";
|
|
15
|
+
this.placeholder = options.placeholder || "";
|
|
16
|
+
this.readonly = options.readonly || false;
|
|
17
|
+
this.hint = options.hint || "";
|
|
18
|
+
this.prefix = options.prefix || "";
|
|
19
|
+
this.suffix = options.suffix || "";
|
|
20
|
+
this.autosize = options.autosize || false;
|
|
21
|
+
this.autosizeMinWidth = options.autosizeMinWidth || "212px";
|
|
22
|
+
this.autosizeMaxWidth = options.autosizeMaxWidth || "400px";
|
|
23
|
+
this.autosizeMinRow = options.autosizeMinRow || 2;
|
|
24
|
+
this.autosizeMaxRow = options.autosizeMaxRow || 5;
|
|
25
|
+
this.options = options.options || [];
|
|
26
|
+
this.tree = options.tree || [];
|
|
27
|
+
this.multiple = options.multiple || false;
|
|
28
|
+
this.search = options.search || undefined;
|
|
29
|
+
this.maxLength = options.maxLength || null;
|
|
30
|
+
this.errors = options.errors || undefined;
|
|
31
|
+
this.actionButton = options.actionButton || undefined;
|
|
32
|
+
this.mask = options.mask || undefined;
|
|
33
|
+
this.autocomplete = options.autocomplete || "";
|
|
34
|
+
this.clearValue =
|
|
35
|
+
options.clearValue !== undefined ? options.clearValue : true;
|
|
36
|
+
this.minDate = options.minDate || undefined;
|
|
37
|
+
this.maxDate = options.maxDate || undefined;
|
|
38
|
+
this.status = options.status || undefined;
|
|
39
|
+
this.checkParent = options.checkParent || false;
|
|
40
|
+
this.checkChildren = options.checkChildren || false;
|
|
41
|
+
this.openedChange = options.openedChange || undefined;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
class Dropdown extends ElementBase {
|
|
46
|
+
constructor() {
|
|
47
|
+
super(...arguments);
|
|
48
|
+
this.controlType = 'dropdown';
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
class MapaDropdownV2Component {
|
|
53
|
+
constructor() {
|
|
54
|
+
this.hostElement = inject((ElementRef));
|
|
55
|
+
this.isOpenState = signal(false, ...(ngDevMode ? [{ debugName: "isOpenState" }] : []));
|
|
56
|
+
}
|
|
57
|
+
isOpen() {
|
|
58
|
+
return this.isOpenState();
|
|
59
|
+
}
|
|
60
|
+
selectedLabel() {
|
|
61
|
+
return this.formControl.value?.value || this.element.placeholder || "";
|
|
62
|
+
}
|
|
63
|
+
options() {
|
|
64
|
+
return this.element.options ?? [];
|
|
65
|
+
}
|
|
66
|
+
filteredOptions() {
|
|
67
|
+
const options = this.options();
|
|
68
|
+
const searchTerm = this.searchControl?.value?.trim().toLocaleLowerCase() ?? "";
|
|
69
|
+
if (!searchTerm) {
|
|
70
|
+
return options;
|
|
71
|
+
}
|
|
72
|
+
return options.filter((option) => option.value?.toLocaleLowerCase().includes(searchTerm));
|
|
73
|
+
}
|
|
74
|
+
hasSearch() {
|
|
75
|
+
return !!this.searchControl;
|
|
76
|
+
}
|
|
77
|
+
searchPlaceholder() {
|
|
78
|
+
return this.element.search?.placeholder ?? "";
|
|
79
|
+
}
|
|
80
|
+
shouldShowRequiredError() {
|
|
81
|
+
return (this.formControl.invalid &&
|
|
82
|
+
(this.formControl.dirty || this.formControl.touched));
|
|
83
|
+
}
|
|
84
|
+
toggleDropdown() {
|
|
85
|
+
const isOpening = !this.isOpenState();
|
|
86
|
+
this.isOpenState.set(isOpening);
|
|
87
|
+
if (isOpening) {
|
|
88
|
+
this.searchControl?.setValue("", { emitEvent: true });
|
|
89
|
+
setTimeout(() => {
|
|
90
|
+
this.triggerButton?.nativeElement.blur();
|
|
91
|
+
this.searchInput?.nativeElement.focus();
|
|
92
|
+
this.searchInput?.nativeElement.select();
|
|
93
|
+
});
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
this.markAsTouchedIfEmpty();
|
|
97
|
+
}
|
|
98
|
+
selectOption(option) {
|
|
99
|
+
this.formControl.setValue(option);
|
|
100
|
+
this.formControl.markAsDirty();
|
|
101
|
+
this.formControl.markAsTouched();
|
|
102
|
+
this.closeDropdown();
|
|
103
|
+
}
|
|
104
|
+
closeDropdown() {
|
|
105
|
+
this.isOpenState.set(false);
|
|
106
|
+
this.searchControl?.setValue("", { emitEvent: true });
|
|
107
|
+
this.markAsTouchedIfEmpty();
|
|
108
|
+
}
|
|
109
|
+
handleDocumentClick(event) {
|
|
110
|
+
if (this.isOpenState() &&
|
|
111
|
+
!this.hostElement.nativeElement.contains(event.target)) {
|
|
112
|
+
this.closeDropdown();
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
get searchControl() {
|
|
116
|
+
return this.element.search?.formControl;
|
|
117
|
+
}
|
|
118
|
+
markAsTouchedIfEmpty() {
|
|
119
|
+
if (!this.formControl.value) {
|
|
120
|
+
this.formControl.markAsTouched();
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownV2Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
124
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaDropdownV2Component, isStandalone: true, selector: "mapa-dropdown-v2", inputs: { element: "element", formControl: "formControl" }, host: { listeners: { "document:click": "handleDocumentClick($event)" } }, viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"mapa-dropdown-v2\"\n [class.mapa-dropdown-v2--open]=\"isOpen()\"\n [class.mapa-dropdown-v2--invalid]=\"shouldShowRequiredError()\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown-v2__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <button\n #triggerButton\n class=\"mapa-dropdown-v2__trigger\"\n [id]=\"element.key || null\"\n type=\"button\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"true\"\n >\n <span\n class=\"mapa-dropdown-v2__trigger-text\"\n [class.mapa-dropdown-v2__trigger-text--placeholder]=\"!formControl.value\"\n >\n {{ selectedLabel() }}\n </span>\n </button>\n\n @if (isOpen()) {\n <div class=\"mapa-dropdown-v2__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown-v2__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown-v2__options\" role=\"listbox\">\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown-v2__option\"\n [class.mapa-dropdown-v2__option--selected]=\"\n formControl.value?.key === option.key\n \"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n {{ option.value }}\n </button>\n }\n\n @if (!filteredOptions().length) {\n <p class=\"mapa-dropdown-v2__empty-state\">\n {{ element.search?.noEntriesFoundLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @if (shouldShowRequiredError() && element.errors?.['required']) {\n <p class=\"mapa-dropdown-v2__error\">\n {{ element.errors?.['required'] }}\n </p>\n }\n</div>\n", styles: [".mapa-dropdown-v2{position:relative;display:inline-block;max-width:min-content;min-width:235px}.mapa-dropdown-v2__label{display:inline-block;margin-bottom:8px;color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-heading, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.mapa-dropdown-v2__trigger,.mapa-dropdown-v2__search-input,.mapa-dropdown-v2__option{width:100%;min-height:48px;padding:12px 16px;border:0;background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:16px;line-height:24px}.mapa-dropdown-v2__trigger:focus,.mapa-dropdown-v2__search-input:focus,.mapa-dropdown-v2__option:focus{outline:none}.mapa-dropdown-v2__trigger::placeholder,.mapa-dropdown-v2__search-input::placeholder,.mapa-dropdown-v2__option::placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown-v2__trigger{position:relative;display:flex;align-items:center;text-align:left;cursor:pointer;padding-right:46px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.mapa-dropdown-v2__trigger:after{content:\"\";position:absolute;top:50%;right:18px;width:9px;height:9px;border-right:2px solid var(--mapa-color-ink, #1a1a1a);border-bottom:2px solid var(--mapa-color-ink, #1a1a1a);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease;pointer-events:none}.mapa-dropdown-v2--open .mapa-dropdown-v2__trigger,.mapa-dropdown-v2__trigger:focus{border-color:var(--mapa-color-accent, #ff560b);box-shadow:0 0 0 3px #ff560b1f}.mapa-dropdown-v2--open .mapa-dropdown-v2__trigger:after{transform:translateY(-20%) rotate(-135deg)}.mapa-dropdown-v2__trigger-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown-v2__trigger-text--placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown-v2__panel{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:20;background:var(--mapa-color-surface, #ffffff);border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08));overflow:hidden}.mapa-dropdown-v2__search-input{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}.mapa-dropdown-v2__options{background:var(--mapa-color-surface, #ffffff);max-height:240px;overflow-y:auto}.mapa-dropdown-v2__option{display:flex;align-items:center;text-align:left;cursor:pointer;min-height:44px;transition:background-color .2s ease,color .2s ease}.mapa-dropdown-v2__option:hover{background:#ff560b14}.mapa-dropdown-v2__option--selected{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown-v2__empty-state{margin:0;padding:14px 16px;color:var(--mapa-color-muted, #555555);font-size:14px;line-height:20px}.mapa-dropdown-v2--invalid .mapa-dropdown-v2__trigger{border-color:#b54242;box-shadow:0 0 0 3px #b542421f}.mapa-dropdown-v2__error{display:block;margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
125
|
+
}
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownV2Component, decorators: [{
|
|
127
|
+
type: Component,
|
|
128
|
+
args: [{ selector: "mapa-dropdown-v2", standalone: true, imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"mapa-dropdown-v2\"\n [class.mapa-dropdown-v2--open]=\"isOpen()\"\n [class.mapa-dropdown-v2--invalid]=\"shouldShowRequiredError()\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown-v2__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <button\n #triggerButton\n class=\"mapa-dropdown-v2__trigger\"\n [id]=\"element.key || null\"\n type=\"button\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"true\"\n >\n <span\n class=\"mapa-dropdown-v2__trigger-text\"\n [class.mapa-dropdown-v2__trigger-text--placeholder]=\"!formControl.value\"\n >\n {{ selectedLabel() }}\n </span>\n </button>\n\n @if (isOpen()) {\n <div class=\"mapa-dropdown-v2__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown-v2__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown-v2__options\" role=\"listbox\">\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown-v2__option\"\n [class.mapa-dropdown-v2__option--selected]=\"\n formControl.value?.key === option.key\n \"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n {{ option.value }}\n </button>\n }\n\n @if (!filteredOptions().length) {\n <p class=\"mapa-dropdown-v2__empty-state\">\n {{ element.search?.noEntriesFoundLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @if (shouldShowRequiredError() && element.errors?.['required']) {\n <p class=\"mapa-dropdown-v2__error\">\n {{ element.errors?.['required'] }}\n </p>\n }\n</div>\n", styles: [".mapa-dropdown-v2{position:relative;display:inline-block;max-width:min-content;min-width:235px}.mapa-dropdown-v2__label{display:inline-block;margin-bottom:8px;color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-heading, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.mapa-dropdown-v2__trigger,.mapa-dropdown-v2__search-input,.mapa-dropdown-v2__option{width:100%;min-height:48px;padding:12px 16px;border:0;background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:16px;line-height:24px}.mapa-dropdown-v2__trigger:focus,.mapa-dropdown-v2__search-input:focus,.mapa-dropdown-v2__option:focus{outline:none}.mapa-dropdown-v2__trigger::placeholder,.mapa-dropdown-v2__search-input::placeholder,.mapa-dropdown-v2__option::placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown-v2__trigger{position:relative;display:flex;align-items:center;text-align:left;cursor:pointer;padding-right:46px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.mapa-dropdown-v2__trigger:after{content:\"\";position:absolute;top:50%;right:18px;width:9px;height:9px;border-right:2px solid var(--mapa-color-ink, #1a1a1a);border-bottom:2px solid var(--mapa-color-ink, #1a1a1a);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease;pointer-events:none}.mapa-dropdown-v2--open .mapa-dropdown-v2__trigger,.mapa-dropdown-v2__trigger:focus{border-color:var(--mapa-color-accent, #ff560b);box-shadow:0 0 0 3px #ff560b1f}.mapa-dropdown-v2--open .mapa-dropdown-v2__trigger:after{transform:translateY(-20%) rotate(-135deg)}.mapa-dropdown-v2__trigger-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown-v2__trigger-text--placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown-v2__panel{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:20;background:var(--mapa-color-surface, #ffffff);border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08));overflow:hidden}.mapa-dropdown-v2__search-input{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}.mapa-dropdown-v2__options{background:var(--mapa-color-surface, #ffffff);max-height:240px;overflow-y:auto}.mapa-dropdown-v2__option{display:flex;align-items:center;text-align:left;cursor:pointer;min-height:44px;transition:background-color .2s ease,color .2s ease}.mapa-dropdown-v2__option:hover{background:#ff560b14}.mapa-dropdown-v2__option--selected{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown-v2__empty-state{margin:0;padding:14px 16px;color:var(--mapa-color-muted, #555555);font-size:14px;line-height:20px}.mapa-dropdown-v2--invalid .mapa-dropdown-v2__trigger{border-color:#b54242;box-shadow:0 0 0 3px #b542421f}.mapa-dropdown-v2__error{display:block;margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}\n"] }]
|
|
129
|
+
}], propDecorators: { element: [{
|
|
130
|
+
type: Input,
|
|
131
|
+
args: [{ required: true }]
|
|
132
|
+
}], formControl: [{
|
|
133
|
+
type: Input,
|
|
134
|
+
args: [{ required: true }]
|
|
135
|
+
}], triggerButton: [{
|
|
136
|
+
type: ViewChild,
|
|
137
|
+
args: ["triggerButton"]
|
|
138
|
+
}], searchInput: [{
|
|
139
|
+
type: ViewChild,
|
|
140
|
+
args: ["searchInput"]
|
|
141
|
+
}], handleDocumentClick: [{
|
|
142
|
+
type: HostListener,
|
|
143
|
+
args: ["document:click", ["$event"]]
|
|
144
|
+
}] } });
|
|
145
|
+
|
|
146
|
+
/*
|
|
147
|
+
* Public API Surface of mapa-library-ui dropdown-v2
|
|
148
|
+
*/
|
|
149
|
+
|
|
150
|
+
/*
|
|
151
|
+
* Public API Surface of mapa-library-ui dropdown-v2
|
|
152
|
+
*/
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Generated bundle index. Do not edit.
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
export { Dropdown, ElementBase, MapaDropdownV2Component };
|
|
159
|
+
//# sourceMappingURL=mapa-library-ui-src-lib-components-dropdown-v2.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mapa-library-ui-src-lib-components-dropdown-v2.mjs","sources":["../../../projects/mapa-library-ui/src/lib/core/elements/element-base.ts","../../../projects/mapa-library-ui/src/lib/core/elements/dropdown.ts","../../../projects/mapa-library-ui/src/lib/components/dropdown-v2/src/dropdown-v2.component.ts","../../../projects/mapa-library-ui/src/lib/components/dropdown-v2/src/dropdown-v2.component.html","../../../projects/mapa-library-ui/src/lib/components/dropdown-v2/public-api.ts","../../../projects/mapa-library-ui/src/dropdown-v2.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-dropdown-v2.ts"],"sourcesContent":["import { EventEmitter } from \"@angular/core\";\nimport { ElementGroup } from \"../interfaces/element-group.interface\";\nimport { ElementOption, ElementTreeNode } from \"../interfaces/element-option.interface\";\nimport { ActionButton } from \"./action-button\";\nimport { ElementSearch } from \"./element-search\";\nimport { Errors } from \"./errors\";\nexport interface Status {\n label: string;\n}\n\nexport class ElementBase {\n value: string;\n key: string;\n label: string;\n required: boolean;\n order: number;\n controlType: string;\n type: string;\n placeholder?: string;\n readonly: boolean;\n hint?: string;\n prefix?: string;\n suffix?: string;\n autosize?: boolean;\n autosizeMinWidth?: string;\n autosizeMaxWidth?: string;\n autosizeMinRow?: number;\n autosizeMaxRow?: number;\n options: ElementOption[] | ElementGroup[];\n tree: ElementTreeNode[];\n multiple?: boolean;\n search?: ElementSearch;\n maxLength!: string | number | null;\n errors?: Errors;\n actionButton?: ActionButton;\n mask?: string;\n autocomplete?: string;\n clearValue?: boolean;\n minDate?: string | Date | null;\n maxDate?: string | Date | null;\n status?: Status[];\n checkParent?: boolean;\n checkChildren?: boolean;\n openedChange?: EventEmitter<boolean>;\n\n constructor(\n options: {\n value?: string;\n key?: string;\n label?: string;\n required?: boolean;\n order?: number;\n controlType?: string;\n type?: string;\n placeholder?: string;\n readonly?: boolean;\n hint?: string;\n prefix?: string;\n suffix?: string;\n autosize?: boolean;\n autosizeMinWidth?: string;\n autosizeMaxWidth?: string;\n autosizeMinRow?: number;\n autosizeMaxRow?: number;\n options?: ElementOption[] | ElementGroup[];\n tree?: ElementTreeNode[];\n multiple?: boolean;\n search?: ElementSearch;\n maxLength?: string | number | null;\n errors?: Errors;\n actionButton?: ActionButton;\n mask?: string;\n autocomplete?: string;\n clearValue?: boolean;\n minDate?: string | Date | null;\n maxDate?: string | Date | null;\n status?: Status[];\n checkParent?: boolean;\n checkChildren?: boolean;\n openedChange?: EventEmitter<boolean>;\n } = {}\n ) {\n this.value = options.value || \"\";\n this.key = options.key || \"\";\n this.label = options.label || \"\";\n this.required = !!options.required;\n this.order = options.order === undefined ? 1 : options.order;\n this.controlType = options.controlType || \"\";\n this.type = options.type || \"\";\n this.placeholder = options.placeholder || \"\";\n this.readonly = options.readonly || false;\n this.hint = options.hint || \"\";\n this.prefix = options.prefix || \"\";\n this.suffix = options.suffix || \"\";\n this.autosize = options.autosize || false;\n this.autosizeMinWidth = options.autosizeMinWidth || \"212px\";\n this.autosizeMaxWidth = options.autosizeMaxWidth || \"400px\";\n this.autosizeMinRow = options.autosizeMinRow || 2;\n this.autosizeMaxRow = options.autosizeMaxRow || 5;\n this.options = options.options || [];\n this.tree = options.tree || [];\n this.multiple = options.multiple || false;\n this.search = options.search || undefined;\n this.maxLength = options.maxLength || null;\n this.errors = options.errors || undefined;\n this.actionButton = options.actionButton || undefined;\n this.mask = options.mask || undefined;\n this.autocomplete = options.autocomplete || \"\";\n this.clearValue =\n options.clearValue !== undefined ? options.clearValue : true;\n this.minDate = options.minDate || undefined;\n this.maxDate = options.maxDate || undefined;\n this.status = options.status || undefined;\n this.checkParent = options.checkParent || false;\n this.checkChildren = options.checkChildren || false;\n this.openedChange = options.openedChange || undefined;\n }\n}\n","import { ElementBase } from './element-base';\n\nexport class Dropdown extends ElementBase {\n override controlType = 'dropdown';\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostListener,\n Input,\n ViewChild,\n inject,\n signal,\n} from \"@angular/core\";\nimport { FormControl, ReactiveFormsModule } from \"@angular/forms\";\nimport { Dropdown } from \"../../../core/elements/dropdown\";\nimport { ElementOption } from \"../../../core/interfaces/element-option.interface\";\n\n@Component({\n selector: \"mapa-dropdown-v2\",\n standalone: true,\n imports: [ReactiveFormsModule],\n templateUrl: \"./dropdown-v2.component.html\",\n styleUrl: \"./dropdown-v2.component.scss\",\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MapaDropdownV2Component {\n private readonly hostElement = inject(ElementRef<HTMLElement>);\n private readonly isOpenState = signal(false);\n\n @Input({ required: true }) element!: Dropdown;\n @Input({ required: true }) formControl!: FormControl<ElementOption | null>;\n\n @ViewChild(\"triggerButton\")\n private triggerButton?: ElementRef<HTMLButtonElement>;\n @ViewChild(\"searchInput\")\n private searchInput?: ElementRef<HTMLInputElement>;\n\n isOpen(): boolean {\n return this.isOpenState();\n }\n\n selectedLabel(): string {\n return this.formControl.value?.value || this.element.placeholder || \"\";\n }\n\n options(): ElementOption[] {\n return (this.element.options as ElementOption[]) ?? [];\n }\n\n filteredOptions(): ElementOption[] {\n const options = this.options();\n const searchTerm =\n this.searchControl?.value?.trim().toLocaleLowerCase() ?? \"\";\n\n if (!searchTerm) {\n return options;\n }\n\n return options.filter((option) =>\n option.value?.toLocaleLowerCase().includes(searchTerm),\n );\n }\n\n hasSearch(): boolean {\n return !!this.searchControl;\n }\n\n searchPlaceholder(): string {\n return this.element.search?.placeholder ?? \"\";\n }\n\n shouldShowRequiredError(): boolean {\n return (\n this.formControl.invalid &&\n (this.formControl.dirty || this.formControl.touched)\n );\n }\n\n toggleDropdown(): void {\n const isOpening = !this.isOpenState();\n this.isOpenState.set(isOpening);\n\n if (isOpening) {\n this.searchControl?.setValue(\"\", { emitEvent: true });\n setTimeout(() => {\n this.triggerButton?.nativeElement.blur();\n this.searchInput?.nativeElement.focus();\n this.searchInput?.nativeElement.select();\n });\n return;\n }\n\n this.markAsTouchedIfEmpty();\n }\n\n selectOption(option: ElementOption): void {\n this.formControl.setValue(option);\n this.formControl.markAsDirty();\n this.formControl.markAsTouched();\n this.closeDropdown();\n }\n\n closeDropdown(): void {\n this.isOpenState.set(false);\n this.searchControl?.setValue(\"\", { emitEvent: true });\n this.markAsTouchedIfEmpty();\n }\n\n @HostListener(\"document:click\", [\"$event\"])\n handleDocumentClick(event: MouseEvent): void {\n if (\n this.isOpenState() &&\n !this.hostElement.nativeElement.contains(event.target as Node)\n ) {\n this.closeDropdown();\n }\n }\n\n get searchControl(): FormControl<string | null> | undefined {\n return this.element.search?.formControl as\n | FormControl<string | null>\n | undefined;\n }\n\n private markAsTouchedIfEmpty(): void {\n if (!this.formControl.value) {\n this.formControl.markAsTouched();\n }\n }\n}\n","<div\n class=\"mapa-dropdown-v2\"\n [class.mapa-dropdown-v2--open]=\"isOpen()\"\n [class.mapa-dropdown-v2--invalid]=\"shouldShowRequiredError()\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown-v2__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <button\n #triggerButton\n class=\"mapa-dropdown-v2__trigger\"\n [id]=\"element.key || null\"\n type=\"button\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"true\"\n >\n <span\n class=\"mapa-dropdown-v2__trigger-text\"\n [class.mapa-dropdown-v2__trigger-text--placeholder]=\"!formControl.value\"\n >\n {{ selectedLabel() }}\n </span>\n </button>\n\n @if (isOpen()) {\n <div class=\"mapa-dropdown-v2__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown-v2__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown-v2__options\" role=\"listbox\">\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown-v2__option\"\n [class.mapa-dropdown-v2__option--selected]=\"\n formControl.value?.key === option.key\n \"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n {{ option.value }}\n </button>\n }\n\n @if (!filteredOptions().length) {\n <p class=\"mapa-dropdown-v2__empty-state\">\n {{ element.search?.noEntriesFoundLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @if (shouldShowRequiredError() && element.errors?.['required']) {\n <p class=\"mapa-dropdown-v2__error\">\n {{ element.errors?.['required'] }}\n </p>\n }\n</div>\n","/*\n * Public API Surface of mapa-library-ui dropdown-v2\n */\n\nexport * from './src/dropdown-v2.component';\n","/*\n * Public API Surface of mapa-library-ui dropdown-v2\n */\n\nexport * from './lib/core/elements/element-search';\nexport * from './lib/core/elements/element-base';\nexport * from './lib/core/elements/dropdown';\nexport * from './lib/core/interfaces/element-option.interface';\n\nexport * from './lib/components/dropdown-v2/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './dropdown-v2';\n"],"names":[],"mappings":";;;;;MAUa,WAAW,CAAA;AAmCtB,IAAA,WAAA,CACE,UAkCI,EAAE,EAAA;QAEN,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE;QAChC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,EAAE;QAC5B,IAAI,CAAC,KAAK,GAAG,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A,CAAA,krGAAA,CAAA,EAAA;;sBAM9C,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBACxB,KAAK;uBAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;sBAExB,SAAS;uBAAC,eAAe;;sBAEzB,SAAS;uBAAC,aAAa;;sBA0EvB,YAAY;uBAAC,gBAAgB,EAAE,CAAC,QAAQ,CAAC;;;AEzG5C;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, DestroyRef, Input, Self, Optional, Directive, EventEmitter, Output, InjectionToken, Injector, signal, Inject, Injectable, Component, SecurityContext, Pipe, ChangeDetectionStrategy, EnvironmentInjector, createComponent, HostListener, ViewChild, forwardRef, effect } from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, Input, Self, Optional, Directive, EventEmitter, Output, InjectionToken, Injector, signal, Inject, Injectable, Component, SecurityContext, Pipe, ChangeDetectionStrategy, EnvironmentInjector, createComponent, HostListener, ViewChild, forwardRef, ElementRef, effect } from '@angular/core';
|
|
3
3
|
import { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop';
|
|
4
4
|
import { fromEvent, ReplaySubject } from 'rxjs';
|
|
5
5
|
import * as i1 from '@angular/material/input';
|
|
@@ -6373,6 +6373,104 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
6373
6373
|
* Public API Surface of mapa-library-ui dropdown-tree
|
|
6374
6374
|
*/
|
|
6375
6375
|
|
|
6376
|
+
class MapaDropdownV2Component {
|
|
6377
|
+
constructor() {
|
|
6378
|
+
this.hostElement = inject((ElementRef));
|
|
6379
|
+
this.isOpenState = signal(false, ...(ngDevMode ? [{ debugName: "isOpenState" }] : []));
|
|
6380
|
+
}
|
|
6381
|
+
isOpen() {
|
|
6382
|
+
return this.isOpenState();
|
|
6383
|
+
}
|
|
6384
|
+
selectedLabel() {
|
|
6385
|
+
return this.formControl.value?.value || this.element.placeholder || "";
|
|
6386
|
+
}
|
|
6387
|
+
options() {
|
|
6388
|
+
return this.element.options ?? [];
|
|
6389
|
+
}
|
|
6390
|
+
filteredOptions() {
|
|
6391
|
+
const options = this.options();
|
|
6392
|
+
const searchTerm = this.searchControl?.value?.trim().toLocaleLowerCase() ?? "";
|
|
6393
|
+
if (!searchTerm) {
|
|
6394
|
+
return options;
|
|
6395
|
+
}
|
|
6396
|
+
return options.filter((option) => option.value?.toLocaleLowerCase().includes(searchTerm));
|
|
6397
|
+
}
|
|
6398
|
+
hasSearch() {
|
|
6399
|
+
return !!this.searchControl;
|
|
6400
|
+
}
|
|
6401
|
+
searchPlaceholder() {
|
|
6402
|
+
return this.element.search?.placeholder ?? "";
|
|
6403
|
+
}
|
|
6404
|
+
shouldShowRequiredError() {
|
|
6405
|
+
return (this.formControl.invalid &&
|
|
6406
|
+
(this.formControl.dirty || this.formControl.touched));
|
|
6407
|
+
}
|
|
6408
|
+
toggleDropdown() {
|
|
6409
|
+
const isOpening = !this.isOpenState();
|
|
6410
|
+
this.isOpenState.set(isOpening);
|
|
6411
|
+
if (isOpening) {
|
|
6412
|
+
this.searchControl?.setValue("", { emitEvent: true });
|
|
6413
|
+
setTimeout(() => {
|
|
6414
|
+
this.triggerButton?.nativeElement.blur();
|
|
6415
|
+
this.searchInput?.nativeElement.focus();
|
|
6416
|
+
this.searchInput?.nativeElement.select();
|
|
6417
|
+
});
|
|
6418
|
+
return;
|
|
6419
|
+
}
|
|
6420
|
+
this.markAsTouchedIfEmpty();
|
|
6421
|
+
}
|
|
6422
|
+
selectOption(option) {
|
|
6423
|
+
this.formControl.setValue(option);
|
|
6424
|
+
this.formControl.markAsDirty();
|
|
6425
|
+
this.formControl.markAsTouched();
|
|
6426
|
+
this.closeDropdown();
|
|
6427
|
+
}
|
|
6428
|
+
closeDropdown() {
|
|
6429
|
+
this.isOpenState.set(false);
|
|
6430
|
+
this.searchControl?.setValue("", { emitEvent: true });
|
|
6431
|
+
this.markAsTouchedIfEmpty();
|
|
6432
|
+
}
|
|
6433
|
+
handleDocumentClick(event) {
|
|
6434
|
+
if (this.isOpenState() &&
|
|
6435
|
+
!this.hostElement.nativeElement.contains(event.target)) {
|
|
6436
|
+
this.closeDropdown();
|
|
6437
|
+
}
|
|
6438
|
+
}
|
|
6439
|
+
get searchControl() {
|
|
6440
|
+
return this.element.search?.formControl;
|
|
6441
|
+
}
|
|
6442
|
+
markAsTouchedIfEmpty() {
|
|
6443
|
+
if (!this.formControl.value) {
|
|
6444
|
+
this.formControl.markAsTouched();
|
|
6445
|
+
}
|
|
6446
|
+
}
|
|
6447
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownV2Component, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6448
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.21", type: MapaDropdownV2Component, isStandalone: true, selector: "mapa-dropdown-v2", inputs: { element: "element", formControl: "formControl" }, host: { listeners: { "document:click": "handleDocumentClick($event)" } }, viewQueries: [{ propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true }, { propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], ngImport: i0, template: "<div\n class=\"mapa-dropdown-v2\"\n [class.mapa-dropdown-v2--open]=\"isOpen()\"\n [class.mapa-dropdown-v2--invalid]=\"shouldShowRequiredError()\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown-v2__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <button\n #triggerButton\n class=\"mapa-dropdown-v2__trigger\"\n [id]=\"element.key || null\"\n type=\"button\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"true\"\n >\n <span\n class=\"mapa-dropdown-v2__trigger-text\"\n [class.mapa-dropdown-v2__trigger-text--placeholder]=\"!formControl.value\"\n >\n {{ selectedLabel() }}\n </span>\n </button>\n\n @if (isOpen()) {\n <div class=\"mapa-dropdown-v2__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown-v2__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown-v2__options\" role=\"listbox\">\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown-v2__option\"\n [class.mapa-dropdown-v2__option--selected]=\"\n formControl.value?.key === option.key\n \"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n {{ option.value }}\n </button>\n }\n\n @if (!filteredOptions().length) {\n <p class=\"mapa-dropdown-v2__empty-state\">\n {{ element.search?.noEntriesFoundLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @if (shouldShowRequiredError() && element.errors?.['required']) {\n <p class=\"mapa-dropdown-v2__error\">\n {{ element.errors?.['required'] }}\n </p>\n }\n</div>\n", styles: [".mapa-dropdown-v2{position:relative;display:inline-block;max-width:min-content;min-width:235px}.mapa-dropdown-v2__label{display:inline-block;margin-bottom:8px;color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-heading, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.mapa-dropdown-v2__trigger,.mapa-dropdown-v2__search-input,.mapa-dropdown-v2__option{width:100%;min-height:48px;padding:12px 16px;border:0;background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:16px;line-height:24px}.mapa-dropdown-v2__trigger:focus,.mapa-dropdown-v2__search-input:focus,.mapa-dropdown-v2__option:focus{outline:none}.mapa-dropdown-v2__trigger::placeholder,.mapa-dropdown-v2__search-input::placeholder,.mapa-dropdown-v2__option::placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown-v2__trigger{position:relative;display:flex;align-items:center;text-align:left;cursor:pointer;padding-right:46px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.mapa-dropdown-v2__trigger:after{content:\"\";position:absolute;top:50%;right:18px;width:9px;height:9px;border-right:2px solid var(--mapa-color-ink, #1a1a1a);border-bottom:2px solid var(--mapa-color-ink, #1a1a1a);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease;pointer-events:none}.mapa-dropdown-v2--open .mapa-dropdown-v2__trigger,.mapa-dropdown-v2__trigger:focus{border-color:var(--mapa-color-accent, #ff560b);box-shadow:0 0 0 3px #ff560b1f}.mapa-dropdown-v2--open .mapa-dropdown-v2__trigger:after{transform:translateY(-20%) rotate(-135deg)}.mapa-dropdown-v2__trigger-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown-v2__trigger-text--placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown-v2__panel{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:20;background:var(--mapa-color-surface, #ffffff);border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08));overflow:hidden}.mapa-dropdown-v2__search-input{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}.mapa-dropdown-v2__options{background:var(--mapa-color-surface, #ffffff);max-height:240px;overflow-y:auto}.mapa-dropdown-v2__option{display:flex;align-items:center;text-align:left;cursor:pointer;min-height:44px;transition:background-color .2s ease,color .2s ease}.mapa-dropdown-v2__option:hover{background:#ff560b14}.mapa-dropdown-v2__option--selected{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown-v2__empty-state{margin:0;padding:14px 16px;color:var(--mapa-color-muted, #555555);font-size:14px;line-height:20px}.mapa-dropdown-v2--invalid .mapa-dropdown-v2__trigger{border-color:#b54242;box-shadow:0 0 0 3px #b542421f}.mapa-dropdown-v2__error{display:block;margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
6449
|
+
}
|
|
6450
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImport: i0, type: MapaDropdownV2Component, decorators: [{
|
|
6451
|
+
type: Component,
|
|
6452
|
+
args: [{ selector: "mapa-dropdown-v2", standalone: true, imports: [ReactiveFormsModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"mapa-dropdown-v2\"\n [class.mapa-dropdown-v2--open]=\"isOpen()\"\n [class.mapa-dropdown-v2--invalid]=\"shouldShowRequiredError()\"\n>\n @if (element.label) {\n <label class=\"mapa-dropdown-v2__label\" [attr.for]=\"element.key || null\">\n {{ element.label }}\n </label>\n }\n\n <button\n #triggerButton\n class=\"mapa-dropdown-v2__trigger\"\n [id]=\"element.key || null\"\n type=\"button\"\n (click)=\"toggleDropdown()\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-haspopup]=\"true\"\n >\n <span\n class=\"mapa-dropdown-v2__trigger-text\"\n [class.mapa-dropdown-v2__trigger-text--placeholder]=\"!formControl.value\"\n >\n {{ selectedLabel() }}\n </span>\n </button>\n\n @if (isOpen()) {\n <div class=\"mapa-dropdown-v2__panel\">\n @if (hasSearch()) {\n <input\n #searchInput\n class=\"mapa-dropdown-v2__search-input\"\n type=\"text\"\n [formControl]=\"searchControl!\"\n [placeholder]=\"searchPlaceholder()\"\n />\n }\n\n <div class=\"mapa-dropdown-v2__options\" role=\"listbox\">\n @for (option of filteredOptions(); track option.key) {\n <button\n class=\"mapa-dropdown-v2__option\"\n [class.mapa-dropdown-v2__option--selected]=\"\n formControl.value?.key === option.key\n \"\n type=\"button\"\n (click)=\"selectOption(option)\"\n >\n {{ option.value }}\n </button>\n }\n\n @if (!filteredOptions().length) {\n <p class=\"mapa-dropdown-v2__empty-state\">\n {{ element.search?.noEntriesFoundLabel }}\n </p>\n }\n </div>\n </div>\n }\n\n @if (shouldShowRequiredError() && element.errors?.['required']) {\n <p class=\"mapa-dropdown-v2__error\">\n {{ element.errors?.['required'] }}\n </p>\n }\n</div>\n", styles: [".mapa-dropdown-v2{position:relative;display:inline-block;max-width:min-content;min-width:235px}.mapa-dropdown-v2__label{display:inline-block;margin-bottom:8px;color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-heading, \"Asap\", sans-serif);font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.mapa-dropdown-v2__trigger,.mapa-dropdown-v2__search-input,.mapa-dropdown-v2__option{width:100%;min-height:48px;padding:12px 16px;border:0;background:var(--mapa-color-surface, #ffffff);color:var(--mapa-color-ink, #1a1a1a);font-family:var(--mapa-font-body, \"Asap\", sans-serif);font-size:16px;line-height:24px}.mapa-dropdown-v2__trigger:focus,.mapa-dropdown-v2__search-input:focus,.mapa-dropdown-v2__option:focus{outline:none}.mapa-dropdown-v2__trigger::placeholder,.mapa-dropdown-v2__search-input::placeholder,.mapa-dropdown-v2__option::placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown-v2__trigger{position:relative;display:flex;align-items:center;text-align:left;cursor:pointer;padding-right:46px;border:1px solid var(--mapa-color-border, rgba(26, 26, 26, .18));border-radius:var(--mapa-radius-sm, 12px);transition:border-color .2s ease,box-shadow .2s ease,background-color .2s ease}.mapa-dropdown-v2__trigger:after{content:\"\";position:absolute;top:50%;right:18px;width:9px;height:9px;border-right:2px solid var(--mapa-color-ink, #1a1a1a);border-bottom:2px solid var(--mapa-color-ink, #1a1a1a);transform:translateY(-70%) rotate(45deg);transition:transform .2s ease;pointer-events:none}.mapa-dropdown-v2--open .mapa-dropdown-v2__trigger,.mapa-dropdown-v2__trigger:focus{border-color:var(--mapa-color-accent, #ff560b);box-shadow:0 0 0 3px #ff560b1f}.mapa-dropdown-v2--open .mapa-dropdown-v2__trigger:after{transform:translateY(-20%) rotate(-135deg)}.mapa-dropdown-v2__trigger-text{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--mapa-color-ink, #1a1a1a)}.mapa-dropdown-v2__trigger-text--placeholder{color:var(--mapa-color-muted, #555555)}.mapa-dropdown-v2__panel{position:absolute;top:calc(100% + 8px);left:0;right:0;z-index:20;background:var(--mapa-color-surface, #ffffff);border:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08));border-radius:var(--mapa-radius-md, 16px);box-shadow:var(--mapa-shadow-panel, 0 18px 40px rgba(26, 26, 26, .08));overflow:hidden}.mapa-dropdown-v2__search-input{border-bottom:1px solid var(--mapa-color-border-soft, rgba(26, 26, 26, .08))}.mapa-dropdown-v2__options{background:var(--mapa-color-surface, #ffffff);max-height:240px;overflow-y:auto}.mapa-dropdown-v2__option{display:flex;align-items:center;text-align:left;cursor:pointer;min-height:44px;transition:background-color .2s ease,color .2s ease}.mapa-dropdown-v2__option:hover{background:#ff560b14}.mapa-dropdown-v2__option--selected{background:#ff560b1f;color:var(--mapa-color-accent, #ff560b)}.mapa-dropdown-v2__empty-state{margin:0;padding:14px 16px;color:var(--mapa-color-muted, #555555);font-size:14px;line-height:20px}.mapa-dropdown-v2--invalid .mapa-dropdown-v2__trigger{border-color:#b54242;box-shadow:0 0 0 3px #b542421f}.mapa-dropdown-v2__error{display:block;margin:8px 0 0;padding-left:4px;color:#b54242;font-size:13px;line-height:18px}\n"] }]
|
|
6453
|
+
}], propDecorators: { element: [{
|
|
6454
|
+
type: Input,
|
|
6455
|
+
args: [{ required: true }]
|
|
6456
|
+
}], formControl: [{
|
|
6457
|
+
type: Input,
|
|
6458
|
+
args: [{ required: true }]
|
|
6459
|
+
}], triggerButton: [{
|
|
6460
|
+
type: ViewChild,
|
|
6461
|
+
args: ["triggerButton"]
|
|
6462
|
+
}], searchInput: [{
|
|
6463
|
+
type: ViewChild,
|
|
6464
|
+
args: ["searchInput"]
|
|
6465
|
+
}], handleDocumentClick: [{
|
|
6466
|
+
type: HostListener,
|
|
6467
|
+
args: ["document:click", ["$event"]]
|
|
6468
|
+
}] } });
|
|
6469
|
+
|
|
6470
|
+
/*
|
|
6471
|
+
* Public API Surface of mapa-library-ui dropdown-v2
|
|
6472
|
+
*/
|
|
6473
|
+
|
|
6376
6474
|
class MapaEmptyStateComponent {
|
|
6377
6475
|
constructor() {
|
|
6378
6476
|
this.title = null;
|
|
@@ -7872,5 +7970,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.21", ngImpo
|
|
|
7872
7970
|
* Generated bundle index. Do not edit.
|
|
7873
7971
|
*/
|
|
7874
7972
|
|
|
7875
|
-
export { AIH_ESTADOS, AIH_TIPOS, BubblePaginationDirective, ButtonComponent, ButtonIconComponent, CEPRange, CID_NAME, CID_REGEX, CORES, CPFPipe, CapabilityClassificationService, CheckboxComponent, Datepicker, DatepickerRange, Dropdown, DropdownTree, ESTADOS, ESTADOS_SIGLA, ElementBase, FiltersComponent, HtmlSanitizerService, IPTUCREATE, IPTUMASKS, IPTUVALIDATE, IconComponent, InputText, LOCALIZACAO_BAIRROS, LOCALIZACAO_CIDADES, LOCALIZACAO_COMPLEMENTOS, LOCALIZACAO_ESTADOS, LOCALIZACAO_LOGRADOUROS, LOCALIZACAO_RUAS, LocaleDatePipe, LocaleDateTimePipe, MAPA_DATEPICKER_FORMATS, MAPA_UI_TEXTS, MASKSIE, MapaBenchmarkChartComponent, MapaBenchmarkIndicatorComponent, MapaBreadcrumbComponent, MapaCapabilityComparativeChartComponent, MapaCapabilityComparativeComponent, MapaCapabilityComparativeHeaderComponent, MapaCapabilityDetailComponent, MapaCapabilityDotComponent, MapaCapabilityExpandComponent, MapaCapabilityIndicatorChartComponent, MapaCapabilityIndicatorComponent, MapaCapabilityIndicatorListComponent, MapaCapabilityIntervalBarComponent, MapaCapabilityIntervalComponent, MapaChartComponent, MapaDatepicker, MapaDatepickerRange, MapaDetailsComponent, MapaDialogComponent, MapaDropdownComponent, MapaDropdownTreeComponent, MapaEmptyStateComponent, MapaFormComponent, MapaFormErrorsComponent, MapaGroupReportComponent, MapaI18nService, MapaInputComponent, MapaMenuComponent, MapaNavListComponent, MapaProgressbarComponent, MapaScaleComponent, MapaScaleParameterizationComponent, MapaSvgIconComponent, MapaTableComponent, MapaTextareaComponent, MapaTooltipComponent, MapaTooltipDirective, MapaWarningComponent, MatInputAutosizeDirective, PLACAS_INVALID, PLACAS_RANGE, RadioButton, RadioButtonComponent, ReportItemComponent, SafeHtmlPipe, SlideToggle, SlideToggleComponent, TagComponent, Textarea, ValidationMessageResolverService, addDays, addMonthsToDateValue, allNumbersAreSame, buildDetailedIndicatorSections, buildIndicatorCollections, cep_ranges, create_aih, create_cartaocredito, create_certidao, create_cnh, create_cnhespelho, create_cnpj, create_cns, create_cpf, create_ect, create_iptu, create_iptu_ctba, create_iptu_sp, create_pispasep, create_processo, create_renachestadual, create_renachseguranca, create_renavam, create_titulo, create_titulo_atual, creditCardValidator, currencyToNumber, customPaginatorFactory, faker_iptu, fillString, formatBrazilianDate, formatDateAsDayMonthYear, formatDateAsMonthDayYear, formatDateByLanguage, formatDateForLocale, formatDateTimeByLanguage, formatDateValue, formatLocaleDate, formatLocaleDateTime, generateInscricaoEstadual, getActiveDateFormat, getActiveDateLocale, getActiveMaterialDateFormat, getAllDigits, getAllWords, getDateFormatByLanguage, getDateInputMask, getDateTimeFormatByLanguage, getDayOfMonthFromDateValue, getDefaultDateRange, getMapaDatepickerRangeFormats, getRelativeDateRange, getSpecialProperty, getYearFromDateValue, isAfterDateValue, isArray, isDateValue, isMonthFirstDateLocale, isNil, isNumber, isPresent, isString, isValidDateByLanguage, isValidDateValue, makeGenericFaker, maskBr, mask_iptu, mergeMapaUiTexts, modulo11, modulo11Custom, modulo11a, normalizeDateInput, normalizeDateLocale, normalizeLookup, normalizeText, numberToCurrency, openDialog, parseBrazilianDate, parseDateByLanguage, parseDateValue, parseDateValueFns, parseLocaleDateValue, processCaretTraps, provideMapaUiTexts, rand, randArray, randomEstadoSigla, randomLetter, randomLetterOrNumber, randomNumber, reformatDateStringForLanguage, rg_rj, rg_sp, sanitizeHtmlContent, setTimeOnDateValue, slugify, toDatepickerLocale, toIsoDateByLanguage, toIsoDateByLanguageWithUtcTime, toIsoDateValue, toIsoDateValueWithTime, toIsoDateValueWithUtcTime, toUtcDayExclusiveEndIso, toUtcRangeEndIso, toUtcRangeStartIso, utilsBr, validateBr, validate_aih, validate_cartaocredito, validate_celular, validate_cep, validate_certidao, validate_chassi, validate_cnh, validate_cnhespelho, validate_cnpj, validate_cns, validate_cpf, validate_currency, validate_datahora, validate_datetime, validate_ect, validate_inscricaoestadual, validate_iptu, validate_iptu_contagem, validate_iptu_ctba, validate_iptu_sp, validate_number, validate_pispasep, validate_placa, validate_porcentagem, validate_processo, validate_renachestadual, validate_renachseguranca, validate_renavam, validate_rg, validate_sped, validate_telefone, validate_time, validate_titulo };
|
|
7973
|
+
export { AIH_ESTADOS, AIH_TIPOS, BubblePaginationDirective, ButtonComponent, ButtonIconComponent, CEPRange, CID_NAME, CID_REGEX, CORES, CPFPipe, CapabilityClassificationService, CheckboxComponent, Datepicker, DatepickerRange, Dropdown, DropdownTree, ESTADOS, ESTADOS_SIGLA, ElementBase, FiltersComponent, HtmlSanitizerService, IPTUCREATE, IPTUMASKS, IPTUVALIDATE, IconComponent, InputText, LOCALIZACAO_BAIRROS, LOCALIZACAO_CIDADES, LOCALIZACAO_COMPLEMENTOS, LOCALIZACAO_ESTADOS, LOCALIZACAO_LOGRADOUROS, LOCALIZACAO_RUAS, LocaleDatePipe, LocaleDateTimePipe, MAPA_DATEPICKER_FORMATS, MAPA_UI_TEXTS, MASKSIE, MapaBenchmarkChartComponent, MapaBenchmarkIndicatorComponent, MapaBreadcrumbComponent, MapaCapabilityComparativeChartComponent, MapaCapabilityComparativeComponent, MapaCapabilityComparativeHeaderComponent, MapaCapabilityDetailComponent, MapaCapabilityDotComponent, MapaCapabilityExpandComponent, MapaCapabilityIndicatorChartComponent, MapaCapabilityIndicatorComponent, MapaCapabilityIndicatorListComponent, MapaCapabilityIntervalBarComponent, MapaCapabilityIntervalComponent, MapaChartComponent, MapaDatepicker, MapaDatepickerRange, MapaDetailsComponent, MapaDialogComponent, MapaDropdownComponent, MapaDropdownTreeComponent, MapaDropdownV2Component, MapaEmptyStateComponent, MapaFormComponent, MapaFormErrorsComponent, MapaGroupReportComponent, MapaI18nService, MapaInputComponent, MapaMenuComponent, MapaNavListComponent, MapaProgressbarComponent, MapaScaleComponent, MapaScaleParameterizationComponent, MapaSvgIconComponent, MapaTableComponent, MapaTextareaComponent, MapaTooltipComponent, MapaTooltipDirective, MapaWarningComponent, MatInputAutosizeDirective, PLACAS_INVALID, PLACAS_RANGE, RadioButton, RadioButtonComponent, ReportItemComponent, SafeHtmlPipe, SlideToggle, SlideToggleComponent, TagComponent, Textarea, ValidationMessageResolverService, addDays, addMonthsToDateValue, allNumbersAreSame, buildDetailedIndicatorSections, buildIndicatorCollections, cep_ranges, create_aih, create_cartaocredito, create_certidao, create_cnh, create_cnhespelho, create_cnpj, create_cns, create_cpf, create_ect, create_iptu, create_iptu_ctba, create_iptu_sp, create_pispasep, create_processo, create_renachestadual, create_renachseguranca, create_renavam, create_titulo, create_titulo_atual, creditCardValidator, currencyToNumber, customPaginatorFactory, faker_iptu, fillString, formatBrazilianDate, formatDateAsDayMonthYear, formatDateAsMonthDayYear, formatDateByLanguage, formatDateForLocale, formatDateTimeByLanguage, formatDateValue, formatLocaleDate, formatLocaleDateTime, generateInscricaoEstadual, getActiveDateFormat, getActiveDateLocale, getActiveMaterialDateFormat, getAllDigits, getAllWords, getDateFormatByLanguage, getDateInputMask, getDateTimeFormatByLanguage, getDayOfMonthFromDateValue, getDefaultDateRange, getMapaDatepickerRangeFormats, getRelativeDateRange, getSpecialProperty, getYearFromDateValue, isAfterDateValue, isArray, isDateValue, isMonthFirstDateLocale, isNil, isNumber, isPresent, isString, isValidDateByLanguage, isValidDateValue, makeGenericFaker, maskBr, mask_iptu, mergeMapaUiTexts, modulo11, modulo11Custom, modulo11a, normalizeDateInput, normalizeDateLocale, normalizeLookup, normalizeText, numberToCurrency, openDialog, parseBrazilianDate, parseDateByLanguage, parseDateValue, parseDateValueFns, parseLocaleDateValue, processCaretTraps, provideMapaUiTexts, rand, randArray, randomEstadoSigla, randomLetter, randomLetterOrNumber, randomNumber, reformatDateStringForLanguage, rg_rj, rg_sp, sanitizeHtmlContent, setTimeOnDateValue, slugify, toDatepickerLocale, toIsoDateByLanguage, toIsoDateByLanguageWithUtcTime, toIsoDateValue, toIsoDateValueWithTime, toIsoDateValueWithUtcTime, toUtcDayExclusiveEndIso, toUtcRangeEndIso, toUtcRangeStartIso, utilsBr, validateBr, validate_aih, validate_cartaocredito, validate_celular, validate_cep, validate_certidao, validate_chassi, validate_cnh, validate_cnhespelho, validate_cnpj, validate_cns, validate_cpf, validate_currency, validate_datahora, validate_datetime, validate_ect, validate_inscricaoestadual, validate_iptu, validate_iptu_contagem, validate_iptu_ctba, validate_iptu_sp, validate_number, validate_pispasep, validate_placa, validate_porcentagem, validate_processo, validate_renachestadual, validate_renachseguranca, validate_renavam, validate_rg, validate_sped, validate_telefone, validate_time, validate_titulo };
|
|
7876
7974
|
//# sourceMappingURL=mapa-library-ui.mjs.map
|