mapa-library-ui 0.4.1 → 0.5.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/esm2020/lib/core/elements/element-base.mjs +1 -1
- package/esm2020/lib/core/interfaces/dialog-data.interface.mjs +1 -1
- package/esm2020/lib/core/interfaces/element-group.interface.mjs +2 -0
- package/esm2020/src/lib/components/capability/lib/components/dropdown/src/dropdown.component.mjs +61 -17
- package/esm2020/src/lib/components/capability/lib/core/elements/element-base.mjs +1 -1
- package/esm2020/src/lib/components/capability/lib/core/interfaces/dialog-data.interface.mjs +1 -1
- package/esm2020/src/lib/components/capability/lib/core/interfaces/element-group.interface.mjs +2 -0
- package/esm2020/src/lib/components/chart/lib/components/dropdown/src/dropdown.component.mjs +61 -17
- package/esm2020/src/lib/components/chart/lib/core/elements/element-base.mjs +1 -1
- package/esm2020/src/lib/components/chart/lib/core/interfaces/element-group.interface.mjs +2 -0
- package/esm2020/src/lib/components/dialog/lib/components/dialog/src/dialog.component.mjs +2 -2
- package/esm2020/src/lib/components/dialog/lib/core/interfaces/dialog-data.interface.mjs +1 -1
- package/esm2020/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.component.mjs +61 -17
- package/esm2020/src/lib/components/dropdown/lib/core/elements/element-base.mjs +1 -1
- package/esm2020/src/lib/components/dropdown/lib/core/interfaces/element-group.interface.mjs +2 -0
- package/esm2020/src/lib/components/radio-button/lib/components/radio-button/src/radio-button.component.mjs +7 -3
- package/esm2020/src/lib/components/radio-button/lib/core/elements/element-base.mjs +1 -1
- package/esm2020/src/lib/components/radio-button/lib/core/interfaces/element-group.interface.mjs +2 -0
- package/esm2020/src/lib/components/textarea/lib/core/elements/element-base.mjs +1 -1
- package/esm2020/src/lib/components/textarea/lib/core/interfaces/element-group.interface.mjs +2 -0
- package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs +61 -16
- package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-chart.mjs +61 -16
- package/fesm2015/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-dialog.mjs +2 -2
- package/fesm2015/mapa-library-ui-src-lib-components-dialog.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs +61 -16
- package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2015/mapa-library-ui-src-lib-components-radio-button.mjs +6 -2
- package/fesm2015/mapa-library-ui-src-lib-components-radio-button.mjs.map +1 -1
- package/fesm2015/mapa-library-ui.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs +60 -16
- package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-chart.mjs +60 -16
- package/fesm2020/mapa-library-ui-src-lib-components-chart.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-dialog.mjs +2 -2
- package/fesm2020/mapa-library-ui-src-lib-components-dialog.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs +60 -16
- package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
- package/fesm2020/mapa-library-ui-src-lib-components-radio-button.mjs +6 -2
- package/fesm2020/mapa-library-ui-src-lib-components-radio-button.mjs.map +1 -1
- package/fesm2020/mapa-library-ui.mjs.map +1 -1
- package/lib/core/elements/element-base.d.ts +3 -2
- package/lib/core/interfaces/dialog-data.interface.d.ts +2 -2
- package/lib/core/interfaces/element-group.interface.d.ts +5 -0
- package/mapa-library-ui-0.5.0.tgz +0 -0
- package/package.json +1 -1
- package/src/lib/components/capability/lib/components/dropdown/src/dropdown.component.d.ts +6 -0
- package/src/lib/components/capability/lib/core/elements/element-base.d.ts +3 -2
- package/src/lib/components/capability/lib/core/interfaces/dialog-data.interface.d.ts +2 -2
- package/src/lib/components/capability/lib/core/interfaces/element-group.interface.d.ts +5 -0
- package/src/lib/components/chart/lib/components/dropdown/src/dropdown.component.d.ts +6 -0
- package/src/lib/components/chart/lib/core/elements/element-base.d.ts +3 -2
- package/src/lib/components/chart/lib/core/interfaces/element-group.interface.d.ts +5 -0
- package/src/lib/components/dialog/lib/core/interfaces/dialog-data.interface.d.ts +2 -2
- package/src/lib/components/dropdown/lib/components/dropdown/src/dropdown.component.d.ts +6 -0
- package/src/lib/components/dropdown/lib/core/elements/element-base.d.ts +3 -2
- package/src/lib/components/dropdown/lib/core/interfaces/element-group.interface.d.ts +5 -0
- package/src/lib/components/radio-button/lib/components/radio-button/src/radio-button.component.d.ts +4 -2
- package/src/lib/components/radio-button/lib/core/elements/element-base.d.ts +3 -2
- package/src/lib/components/radio-button/lib/core/interfaces/element-group.interface.d.ts +5 -0
- package/src/lib/components/textarea/lib/core/elements/element-base.d.ts +3 -2
- package/src/lib/components/textarea/lib/core/interfaces/element-group.interface.d.ts +5 -0
- package/mapa-library-ui-0.4.1.tgz +0 -0
|
@@ -52,14 +52,26 @@ class Dropdown extends ElementBase {
|
|
|
52
52
|
class MapaDropdownComponent {
|
|
53
53
|
constructor() {
|
|
54
54
|
this.filteredOptions = new ReplaySubject(1);
|
|
55
|
+
this.filteredGroups = new ReplaySubject(1);
|
|
55
56
|
this.filteredOptionsCache = [];
|
|
57
|
+
this.filteredGroupCache = [];
|
|
56
58
|
this._onDestroy = new Subject();
|
|
57
59
|
this.isIndeterminate = false;
|
|
58
60
|
this.isChecked = false;
|
|
61
|
+
this.isOptionsGroup = false;
|
|
59
62
|
}
|
|
60
63
|
ngOnInit() {
|
|
61
|
-
this.
|
|
62
|
-
|
|
64
|
+
this.isOptionsGroup = this.isElementGroup(this.element.options[0]);
|
|
65
|
+
if (this.isOptionsGroup) {
|
|
66
|
+
this.filteredGroupCache = this.element
|
|
67
|
+
.options.slice();
|
|
68
|
+
this.filteredGroups.next(this.filteredGroupCache);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
this.filteredOptionsCache = this.element
|
|
72
|
+
.options.slice();
|
|
73
|
+
this.filteredOptions.next(this.filteredOptionsCache);
|
|
74
|
+
}
|
|
63
75
|
if (this.element.search) {
|
|
64
76
|
this.element.search.formControl?.valueChanges
|
|
65
77
|
//.pipe(takeUntil(this._onDestroy))
|
|
@@ -76,20 +88,39 @@ class MapaDropdownComponent {
|
|
|
76
88
|
this._onDestroy.next();
|
|
77
89
|
this._onDestroy.complete();
|
|
78
90
|
}
|
|
91
|
+
filterOptionsFromGroup(group, value) {
|
|
92
|
+
const filterValue = value.toLocaleLowerCase();
|
|
93
|
+
return group.label.toLocaleLowerCase().includes(filterValue)
|
|
94
|
+
? group.options
|
|
95
|
+
: group.options.filter((item) => item.value.toLocaleLowerCase().includes(filterValue));
|
|
96
|
+
}
|
|
79
97
|
filterOptions() {
|
|
80
98
|
if (!this.element.options) {
|
|
81
99
|
return;
|
|
82
100
|
}
|
|
83
101
|
// get the search keyword
|
|
84
102
|
let search = this.element.search?.formControl?.value;
|
|
85
|
-
if (
|
|
86
|
-
|
|
103
|
+
if (this.isOptionsGroup) {
|
|
104
|
+
const groups = this.element.options;
|
|
105
|
+
this.filteredGroupCache = groups
|
|
106
|
+
.map((group) => ({
|
|
107
|
+
label: group.label,
|
|
108
|
+
options: this.filterOptionsFromGroup(group, search),
|
|
109
|
+
}))
|
|
110
|
+
.filter((group) => group.options.length > 0);
|
|
111
|
+
this.filteredGroups.next(this.filteredGroupCache);
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
const options = this.element.options;
|
|
115
|
+
if (!search) {
|
|
116
|
+
this.filteredOptionsCache = options.slice();
|
|
117
|
+
this.filteredOptions.next(this.filteredOptionsCache);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
// filter the options
|
|
121
|
+
this.filteredOptionsCache = options.filter((option) => option.value.toLowerCase().indexOf(search) > -1);
|
|
87
122
|
this.filteredOptions.next(this.filteredOptionsCache);
|
|
88
|
-
return;
|
|
89
123
|
}
|
|
90
|
-
// filter the options
|
|
91
|
-
this.filteredOptionsCache = this.element.options.filter((option) => option.value.toLowerCase().indexOf(search) > -1);
|
|
92
|
-
this.filteredOptions.next(this.filteredOptionsCache);
|
|
93
124
|
}
|
|
94
125
|
setInitialValue() {
|
|
95
126
|
this.filteredOptions
|
|
@@ -102,19 +133,20 @@ class MapaDropdownComponent {
|
|
|
102
133
|
let filteredLength = 0;
|
|
103
134
|
let search = this.element.search?.formControl?.value;
|
|
104
135
|
if (search && search.value) {
|
|
105
|
-
this.filteredOptionsCache.forEach(el => {
|
|
136
|
+
this.filteredOptionsCache.forEach((el) => {
|
|
106
137
|
if (search.value.toLowerCase().indexOf(el) > -1) {
|
|
107
138
|
filteredLength++;
|
|
108
139
|
}
|
|
109
140
|
});
|
|
110
|
-
this.isIndeterminate =
|
|
111
|
-
|
|
141
|
+
this.isIndeterminate =
|
|
142
|
+
filteredLength > 0 && filteredLength < this.filteredOptionsCache.length;
|
|
143
|
+
this.isChecked =
|
|
144
|
+
filteredLength > 0 &&
|
|
145
|
+
filteredLength === this.filteredOptionsCache.length;
|
|
112
146
|
}
|
|
113
147
|
}
|
|
114
148
|
toggleSelectAll(selectAllValue) {
|
|
115
|
-
this.filteredOptions
|
|
116
|
-
//.pipe(take(1), takeUntil(this._onDestroy))
|
|
117
|
-
.subscribe((options) => {
|
|
149
|
+
this.filteredOptions.subscribe((options) => {
|
|
118
150
|
if (selectAllValue) {
|
|
119
151
|
this.formControl?.patchValue(options);
|
|
120
152
|
}
|
|
@@ -122,13 +154,25 @@ class MapaDropdownComponent {
|
|
|
122
154
|
this.formControl?.patchValue([]);
|
|
123
155
|
}
|
|
124
156
|
});
|
|
157
|
+
this.filteredGroups.subscribe((groups) => {
|
|
158
|
+
if (selectAllValue) {
|
|
159
|
+
this.formControl?.patchValue(groups.map((group) => group.options));
|
|
160
|
+
}
|
|
161
|
+
else {
|
|
162
|
+
this.formControl?.patchValue([]);
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
isElementGroup(object) {
|
|
167
|
+
return (object.label !== undefined &&
|
|
168
|
+
object.options !== undefined);
|
|
125
169
|
}
|
|
126
170
|
}
|
|
127
171
|
MapaDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
128
|
-
MapaDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: { formControl: "formControl", formControlSearch: "formControlSearch", element: "element", border: "border" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n</label>\n<mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\">\n <mat-select\n #dropdown\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"true\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\n
|
|
172
|
+
MapaDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaDropdownComponent, selector: "mapa-dropdown", inputs: { formControl: "formControl", formControlSearch: "formControlSearch", element: "element", border: "border" }, viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true, static: true }], ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n</label>\n<mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\">\n <mat-select\n #dropdown\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"true\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup *ngFor=\"let group of filteredGroups | async\" [label]=\"group.label\">\n <mat-option *ngFor=\"let option of group.options\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </ng-template>\n </mat-select>\n <mat-error\n *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n</mat-form-field>\n", styles: [".mapa-dropdown{max-width:min-content;min-width:235px}.mapa-dropdown .mat-select{font-family:SF-Pro!important}.mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center}.mapa-dropdown__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown .mat-form-field-infix{border-top:unset!important;padding:unset!important}.mapa-dropdown .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown .mat-select-value-text{display:block;width:90%}.mapa-dropdown .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown .mat-select-arrow{border:unset}.mapa-dropdown .mat-select-arrow:before,.mapa-dropdown .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown{transform:translate(-16px) translateY(36px)!important}.mapa-overlay-dropdown .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown .mat-select-panel .mat-option,.mapa-overlay-dropdown .mat-select-panel .mat-option-text{font-family:SF-Pro!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown .mat-checkbox-frame{border-color:#c3c4c7!important}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i4.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i5.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "component", type: i6.MatSelectSearchComponent, selector: "ngx-mat-select-search", inputs: ["placeholderLabel", "type", "closeIcon", "closeSvgIcon", "noEntriesFoundLabel", "clearSearchInput", "searching", "disableInitialFocus", "enableClearOnEscapePressed", "preventHomeEndKeyPropagation", "disableScrollToActiveOnOptionsChanged", "ariaLabel", "showToggleAllCheckbox", "toggleAllCheckboxChecked", "toggleAllCheckboxIndeterminate", "toggleAllCheckboxTooltipMessage", "toggleAllCheckboxTooltipPosition", "hideClearSearchButton", "alwaysRestoreSelectedOptionsMulti"], outputs: ["toggleAll"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
|
|
129
173
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaDropdownComponent, decorators: [{
|
|
130
174
|
type: Component,
|
|
131
|
-
args: [{ selector: "mapa-dropdown", encapsulation: ViewEncapsulation.None, template: "<label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n</label>\n<mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\">\n <mat-select\n #dropdown\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"true\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\n
|
|
175
|
+
args: [{ selector: "mapa-dropdown", encapsulation: ViewEncapsulation.None, template: "<label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n</label>\n<mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\">\n <mat-select\n #dropdown\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"true\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup *ngFor=\"let group of filteredGroups | async\" [label]=\"group.label\">\n <mat-option *ngFor=\"let option of group.options\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </ng-template>\n </mat-select>\n <mat-error\n *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n</mat-form-field>\n", styles: [".mapa-dropdown{max-width:min-content;min-width:235px}.mapa-dropdown .mat-select{font-family:SF-Pro!important}.mapa-dropdown .mat-icon{display:flex;justify-content:center;align-items:center}.mapa-dropdown__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-dropdown--highlight .mat-form-field-outline{border-radius:16px!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-width:2px!important;border-color:#eedb2a}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--highlight .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--soft-border .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important}.mapa-dropdown--tag .mat-form-field-outline{border-radius:16px!important;height:42px!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-width:1px!important;border-color:#cdcdcd}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-start{display:none!important}.mapa-dropdown--tag .mat-form-field-outline .mat-form-field-outline-end{border-radius:16px!important;border-left-style:solid!important}.mapa-dropdown .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-start,.mapa-dropdown .mat-form-field-outline .mat-form-field-outline-end{border-width:2px}.mapa-dropdown .mat-form-field-flex{display:flex;align-items:center;height:48px}.mapa-dropdown .mat-form-field-infix{border-top:unset!important;padding:unset!important}.mapa-dropdown .mat-select-trigger{min-width:50px;padding-top:.3em;height:unset!important}.mapa-dropdown .mat-select-value-text{display:block;width:90%}.mapa-dropdown .mat-select-arrow-wrapper{transform:none!important}.mapa-dropdown .mat-select-arrow{border:unset}.mapa-dropdown .mat-select-arrow:before,.mapa-dropdown .mat-select-arrow:after{content:\"\";display:block;margin-top:-4px;position:absolute;right:10px;top:50%;width:0;border:solid black;border-width:0 2px 2px 0;padding:3px;transform:rotate(45deg);-webkit-transform:rotate(45deg)}.mapa-dropdown [aria-expanded=true] .mat-select-arrow{margin:6px 0 0}.mapa-dropdown [aria-expanded=true] .mat-select-arrow:before,.mapa-dropdown [aria-expanded=true] .mat-select-arrow:after{transform:rotate(-135deg)!important;-webkit-transform:rotate(-135deg)!important}.mapa-overlay-dropdown{transform:translate(-16px) translateY(36px)!important}.mapa-overlay-dropdown .mat-select-panel{border-radius:8px;min-width:calc(100% + 24px)!important}.mapa-overlay-dropdown .mat-select-panel .mat-option,.mapa-overlay-dropdown .mat-select-panel .mat-option-text{font-family:SF-Pro!important;font-size:16px;font-style:normal;font-weight:400;line-height:2em;height:2em;color:#50575e}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option{display:flex;padding:16px 8px!important;flex-direction:column;justify-content:center;align-items:center;gap:10px;align-self:stretch;background:#f6f7f7;height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-inside-mat-option{height:unset!important;line-height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-clear{top:-3px!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-inner{top:8px;border:2px solid #a7aaad;border-radius:8px!important;width:100%!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-toggle-all-checkbox{padding-left:8px!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-input{padding:8px 8px 8px 6px!important;height:unset!important;line-height:unset!important}.mapa-overlay-dropdown .mapa-dropdown__search.mat-option .mat-select-search-input::placeholder{color:#c3c4c7!important}.mapa-overlay-dropdown .mapa-dropdown__search .mat-option-text{width:100%}.mapa-overlay-dropdown .mat-pseudo-checkbox{color:#c3c4c7!important}.mapa-overlay-dropdown .mat-checkbox-frame{border-color:#c3c4c7!important}\n"] }]
|
|
132
176
|
}], ctorParameters: function () { return []; }, propDecorators: { formControl: [{
|
|
133
177
|
type: Input
|
|
134
178
|
}], formControlSearch: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapa-library-ui-src-lib-components-dropdown.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/src/dropdown.component.ts","../../../projects/mapa-library-ui/src/lib/components/dropdown/src/dropdown.component.html","../../../projects/mapa-library-ui/src/lib/components/dropdown/src/dropdown.module.ts","../../../projects/mapa-library-ui/src/lib/components/dropdown/public-api.ts","../../../projects/mapa-library-ui/src/dropdown.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-dropdown.ts"],"sourcesContent":["import { ElementOption } from \"../interfaces/element-option.interface\";\nimport { ElementSearch } from \"./element-search\";\nimport { Errors } from \"./errors\";\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 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[];\n multiple?: boolean;\n search?: ElementSearch;\n maxLength!: string | number | null;\n errors?: Errors;\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 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[];\n multiple?: boolean;\n search?: ElementSearch;\n maxLength?: string | number | null;\n errors?: Errors;\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.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.multiple = options.multiple || false;\n this.search = options.search || undefined;\n this.maxLength = options.maxLength || null;\n this.errors = options.errors || undefined;\n }\n}\n","import { ElementBase } from './element-base';\n\nexport class Dropdown extends ElementBase {\n override controlType = 'dropdown';\n}\n","import {\n AfterViewInit,\n Component,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { FormControl } from \"@angular/forms\";\n\nimport { MatSelect } from \"@angular/material/select\";\n\nimport { ReplaySubject } from \"rxjs/internal/ReplaySubject\";\nimport { Subject } from \"rxjs/internal/Subject\";\n//import { take, takeUntil } from \"rxjs/operators\";\n\nimport { ElementOption } from \"../../../core/interfaces/element-option.interface\";\nimport { Dropdown } from \"../../../core/elements/dropdown\";\n\n@Component({\n selector: \"mapa-dropdown\",\n templateUrl: \"./dropdown.component.html\",\n styleUrls: [\"./dropdown.component.scss\"],\n encapsulation: ViewEncapsulation.None,\n})\nexport class MapaDropdownComponent implements OnInit, AfterViewInit, OnDestroy {\n @Input() formControl!: FormControl;\n @Input() formControlSearch!: FormControl;\n @Input() element!: Dropdown;\n @Input() border: \"soft\" | \"tag\" | \"highlight\" | null | undefined;\n\n @ViewChild(\"dropdown\", { static: true }) dropdown!: MatSelect;\n\n public filteredOptions: ReplaySubject<ElementOption[]> = new ReplaySubject<\n ElementOption[]\n >(1);\n protected filteredOptionsCache: ElementOption[] = [];\n protected _onDestroy = new Subject<void>();\n \n isIndeterminate = false;\n isChecked = false;\n\n constructor() {}\n\n ngOnInit() {\n this.filteredOptionsCache = this.element.options.slice();\n this.filteredOptions.next(this.filteredOptionsCache);\n\n if (this.element.search) {\n this.element.search.formControl?.valueChanges\n //.pipe(takeUntil(this._onDestroy))\n .subscribe(() => {\n this.filterOptions();\n this.setToggleAllCheckboxState();\n });\n }\n }\n\n ngAfterViewInit() {\n this.setInitialValue();\n }\n\n ngOnDestroy() {\n this._onDestroy.next();\n this._onDestroy.complete();\n }\n\n protected filterOptions() {\n if (!this.element.options) {\n return;\n }\n // get the search keyword\n let search = this.element.search?.formControl?.value;\n if (!search) {\n this.filteredOptionsCache = this.element.options.slice();\n this.filteredOptions.next(this.filteredOptionsCache);\n return;\n }\n // filter the options\n this.filteredOptionsCache = this.element.options.filter(\n (option: ElementOption) =>\n option.value.toLowerCase().indexOf(search) > -1\n );\n this.filteredOptions.next(this.filteredOptionsCache);\n }\n\n protected setInitialValue() {\n this.filteredOptions\n //.pipe(take(1), takeUntil(this._onDestroy))\n .subscribe(() => {\n this.dropdown.compareWith = (a: Element, b: Element) => a && b && a.id === b.id;\n });\n }\n\n protected setToggleAllCheckboxState() {\n let filteredLength = 0;\n let search = this.element.search?.formControl?.value;\n\n if (search && search.value) {\n this.filteredOptionsCache.forEach(el => {\n if (search.value.toLowerCase().indexOf(el) > -1) {\n filteredLength++;\n }\n });\n this.isIndeterminate = filteredLength > 0 && filteredLength < this.filteredOptionsCache.length;\n this.isChecked = filteredLength > 0 && filteredLength === this.filteredOptionsCache.length;\n }\n }\n\n toggleSelectAll(selectAllValue: boolean) {\n this.filteredOptions\n //.pipe(take(1), takeUntil(this._onDestroy))\n .subscribe((options: ElementOption[]) => {\n if (selectAllValue) {\n this.formControl?.patchValue(options);\n } else {\n this.formControl?.patchValue([]);\n }\n });\n }\n}\n","<label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n</label>\n<mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\">\n <mat-select\n #dropdown\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"true\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </mat-select>\n <mat-error\n *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n</mat-form-field>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { MatListModule } from \"@angular/material/list\";\nimport { MatIconModule } from \"@angular/material/icon\";\n\nimport { MapaDropdownComponent } from \"./dropdown.component\";\nimport { MAT_SELECT_CONFIG, MatSelectModule } from \"@angular/material/select\";\nimport { NgxMatSelectSearchModule } from \"ngx-mat-select-search\";\nimport { MAT_FORM_FIELD_DEFAULT_OPTIONS } from \"@angular/material/form-field\";\n\n@NgModule({\n declarations: [MapaDropdownComponent],\n exports: [MapaDropdownComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatListModule,\n MatIconModule,\n MatSelectModule,\n NgxMatSelectSearchModule,\n ],\n providers: [\n {\n provide: MAT_SELECT_CONFIG,\n useValue: { overlayPanelClass: \"mapa-overlay-dropdown\" },\n },\n {\n provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\n useValue: { appearance: \"outline\" },\n },\n ],\n})\nexport class MapaDropdownModule {}\n","/*\n * Public API Surface of mapa-library-ui dropdown\n */\n\nexport * from './src/dropdown.component';\nexport * from './src/dropdown.module';\n","/*\n * Public API Surface of mapa-library-ui dropdown\n */\n\nexport * from './lib/core/elements/element-search';\nexport * from './lib/core/elements/element-base';\nexport * from './lib/core/elements/dropdown';\n\nexport * from './lib/components/dropdown/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './dropdown';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAIa,WAAW,CAAA;AAuBtB,IAAA,WAAA,CACE,UAsBI,EAAE,EAAA;QAEN,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACnC,QAAA,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,KAAK,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,I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SAAA;AACF,KAAA,EAAA,OAAA,EAAA,CAjBC,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,aAAa;QACb,aAAa;QACb,eAAe;QACf,wBAAwB,CAAA,EAAA,CAAA,CAAA;4FAaf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAvB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,aAAa;wBACb,aAAa;wBACb,eAAe;wBACf,wBAAwB;AACzB,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,EAAE,iBAAiB,EAAE,uBAAuB,EAAE;AACzD,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,8BAA8B;AACvC,4BAAA,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;AACpC,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;ACnCD;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mapa-library-ui-src-lib-components-dropdown.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/src/dropdown.component.ts","../../../projects/mapa-library-ui/src/lib/components/dropdown/src/dropdown.component.html","../../../projects/mapa-library-ui/src/lib/components/dropdown/src/dropdown.module.ts","../../../projects/mapa-library-ui/src/lib/components/dropdown/public-api.ts","../../../projects/mapa-library-ui/src/dropdown.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-dropdown.ts"],"sourcesContent":["import { ElementGroup } from \"../interfaces/element-group.interface\";\nimport { ElementOption } from \"../interfaces/element-option.interface\";\nimport { ElementSearch } from \"./element-search\";\nimport { Errors } from \"./errors\";\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 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 multiple?: boolean;\n search?: ElementSearch;\n maxLength!: string | number | null;\n errors?: Errors;\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 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 multiple?: boolean;\n search?: ElementSearch;\n maxLength?: string | number | null;\n errors?: Errors;\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.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.multiple = options.multiple || false;\n this.search = options.search || undefined;\n this.maxLength = options.maxLength || null;\n this.errors = options.errors || undefined;\n }\n}\n","import { ElementBase } from './element-base';\n\nexport class Dropdown extends ElementBase {\n override controlType = 'dropdown';\n}\n","import {\n AfterViewInit,\n Component,\n Input,\n OnDestroy,\n OnInit,\n ViewChild,\n ViewEncapsulation,\n} from \"@angular/core\";\nimport { FormControl } from \"@angular/forms\";\n\nimport { MatSelect } from \"@angular/material/select\";\n\nimport { ReplaySubject } from \"rxjs/internal/ReplaySubject\";\nimport { Subject } from \"rxjs/internal/Subject\";\n//import { take, takeUntil } from \"rxjs/operators\";\n\nimport { ElementOption } from \"../../../core/interfaces/element-option.interface\";\nimport { Dropdown } from \"../../../core/elements/dropdown\";\nimport { ElementGroup } from \"../../../core/interfaces/element-group.interface\";\n\n@Component({\n selector: \"mapa-dropdown\",\n templateUrl: \"./dropdown.component.html\",\n styleUrls: [\"./dropdown.component.scss\"],\n encapsulation: ViewEncapsulation.None,\n})\nexport class MapaDropdownComponent implements OnInit, AfterViewInit, OnDestroy {\n @Input() formControl!: FormControl;\n @Input() formControlSearch!: FormControl;\n @Input() element!: Dropdown;\n @Input() border: \"soft\" | \"tag\" | \"highlight\" | null | undefined;\n\n @ViewChild(\"dropdown\", { static: true }) dropdown!: MatSelect;\n\n public filteredOptions: ReplaySubject<ElementOption[]> = new ReplaySubject<\n ElementOption[]\n >(1);\n public filteredGroups: ReplaySubject<ElementGroup[]> = new ReplaySubject<\n ElementGroup[]\n >(1);\n protected filteredOptionsCache: ElementOption[] = [];\n protected filteredGroupCache: ElementGroup[] = [];\n protected _onDestroy = new Subject<void>();\n\n isIndeterminate = false;\n isChecked = false;\n isOptionsGroup = false;\n\n constructor() {}\n\n ngOnInit() {\n this.isOptionsGroup = this.isElementGroup(this.element.options[0]);\n\n if (this.isOptionsGroup) {\n this.filteredGroupCache = (this.element\n .options as ElementGroup[]).slice();\n this.filteredGroups.next(this.filteredGroupCache);\n } else {\n this.filteredOptionsCache = (this.element\n .options as ElementOption[]).slice();\n this.filteredOptions.next(this.filteredOptionsCache);\n }\n\n if (this.element.search) {\n this.element.search.formControl?.valueChanges\n //.pipe(takeUntil(this._onDestroy))\n .subscribe(() => {\n this.filterOptions();\n this.setToggleAllCheckboxState();\n });\n }\n }\n\n ngAfterViewInit() {\n this.setInitialValue();\n }\n\n ngOnDestroy() {\n this._onDestroy.next();\n this._onDestroy.complete();\n }\n\n protected filterOptionsFromGroup(\n group: ElementGroup,\n value: string\n ): ElementOption[] {\n const filterValue = value.toLocaleLowerCase();\n\n return group.label.toLocaleLowerCase().includes(filterValue)\n ? group.options\n : group.options.filter((item) =>\n item.value.toLocaleLowerCase().includes(filterValue)\n );\n }\n\n protected filterOptions() {\n if (!this.element.options) {\n return;\n }\n // get the search keyword\n let search = this.element.search?.formControl?.value;\n\n if (this.isOptionsGroup) {\n const groups = this.element.options as ElementGroup[];\n this.filteredGroupCache = groups\n .map((group: ElementGroup) => ({\n label: group.label,\n options: this.filterOptionsFromGroup(group, search),\n }))\n .filter((group) => group.options.length > 0);\n this.filteredGroups.next(this.filteredGroupCache);\n } else {\n const options = this.element.options as ElementOption[];\n if (!search) {\n this.filteredOptionsCache = options.slice();\n this.filteredOptions.next(this.filteredOptionsCache);\n return;\n }\n // filter the options\n this.filteredOptionsCache = options.filter(\n (option: ElementOption) =>\n option.value.toLowerCase().indexOf(search) > -1\n );\n this.filteredOptions.next(this.filteredOptionsCache);\n }\n }\n\n protected setInitialValue() {\n this.filteredOptions\n //.pipe(take(1), takeUntil(this._onDestroy))\n .subscribe(() => {\n this.dropdown.compareWith = (a: Element, b: Element) =>\n a && b && a.id === b.id;\n });\n }\n\n protected setToggleAllCheckboxState() {\n let filteredLength = 0;\n let search = this.element.search?.formControl?.value;\n\n if (search && search.value) {\n this.filteredOptionsCache.forEach((el) => {\n if (search.value.toLowerCase().indexOf(el) > -1) {\n filteredLength++;\n }\n });\n this.isIndeterminate =\n filteredLength > 0 && filteredLength < this.filteredOptionsCache.length;\n this.isChecked =\n filteredLength > 0 &&\n filteredLength === this.filteredOptionsCache.length;\n }\n }\n\n toggleSelectAll(selectAllValue: boolean) {\n this.filteredOptions.subscribe((options: ElementOption[]) => {\n if (selectAllValue) {\n this.formControl?.patchValue(options);\n } else {\n this.formControl?.patchValue([]);\n }\n });\n this.filteredGroups.subscribe((groups: ElementGroup[]) => {\n if (selectAllValue) {\n this.formControl?.patchValue(\n groups.map((group: ElementGroup) => group.options)\n );\n } else {\n this.formControl?.patchValue([]);\n }\n });\n }\n\n isElementGroup(object: ElementGroup | ElementOption): object is ElementGroup {\n return (\n (object as ElementGroup).label !== undefined &&\n (object as ElementGroup).options !== undefined\n );\n }\n}\n","<label *ngIf=\"element.label\" class=\"mapa-dropdown__label\">\n {{ element.label }}\n</label>\n<mat-form-field\n appearance=\"outline\"\n class=\"mapa-dropdown\"\n [class.mapa-dropdown--highlight]=\"border === 'highlight'\"\n [class.mapa-dropdown--soft-border]=\"border === 'soft'\"\n [class.mapa-dropdown--tag]=\"border === 'tag'\"\n [class.mapa-dropdown--labeled]=\"!!element.label\">\n <mat-select\n #dropdown\n [formControl]=\"formControl\"\n [multiple]=\"element.multiple\"\n [placeholder]=\"element.placeholder || ''\"\n >\n <mat-option *ngIf=\"element.search\" class=\"mapa-dropdown__search\">\n <ngx-mat-select-search\n *ngIf=\"element.search.formControl\"\n [showToggleAllCheckbox]=\"true\"\n [formControl]=\"element.search.formControl\"\n [placeholderLabel]=\"element.search.placeholder || ''\"\n i18n-placeholderLabel\n [noEntriesFoundLabel]=\"element.search.noEntriesFoundLabel || ''\"\n [toggleAllCheckboxIndeterminate]=\"isIndeterminate\"\n [toggleAllCheckboxChecked]=\"isChecked\"\n (toggleAll)=\"toggleSelectAll($event)\"\n ></ngx-mat-select-search>\n </mat-option>\n\n <ng-container *ngIf=\"isOptionsGroup; else isElementOptions\">\n <mat-optgroup *ngFor=\"let group of filteredGroups | async\" [label]=\"group.label\">\n <mat-option *ngFor=\"let option of group.options\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </mat-optgroup>\n </ng-container>\n <ng-template #isElementOptions>\n <mat-option *ngFor=\"let option of filteredOptions | async\" [value]=\"option\">\n {{ option.value }}\n </mat-option>\n </ng-template>\n </mat-select>\n <mat-error\n *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error\n *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n</mat-form-field>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\n\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { MatListModule } from \"@angular/material/list\";\nimport { MatIconModule } from \"@angular/material/icon\";\n\nimport { MapaDropdownComponent } from \"./dropdown.component\";\nimport { MAT_SELECT_CONFIG, MatSelectModule } from \"@angular/material/select\";\nimport { NgxMatSelectSearchModule } from \"ngx-mat-select-search\";\nimport { MAT_FORM_FIELD_DEFAULT_OPTIONS } from \"@angular/material/form-field\";\n\n@NgModule({\n declarations: [MapaDropdownComponent],\n exports: [MapaDropdownComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatListModule,\n MatIconModule,\n MatSelectModule,\n NgxMatSelectSearchModule,\n ],\n providers: [\n {\n provide: MAT_SELECT_CONFIG,\n useValue: { overlayPanelClass: \"mapa-overlay-dropdown\" },\n },\n {\n provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,\n useValue: { appearance: \"outline\" },\n },\n ],\n})\nexport class MapaDropdownModule {}\n","/*\n * Public API Surface of mapa-library-ui dropdown\n */\n\nexport * from './src/dropdown.component';\nexport * from './src/dropdown.module';\n","/*\n * Public API Surface of mapa-library-ui dropdown\n */\n\nexport * from './lib/core/elements/element-search';\nexport * from './lib/core/elements/element-base';\nexport * from './lib/core/elements/dropdown';\n\nexport * from './lib/components/dropdown/public-api';\n","/**\n * Generated bundle index. Do not edit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EAAA,kBAAkB,EAXlB,SAAA,EAAA;AACT,QAAA;AACE,YAAA,OAAO,EAAE,iBAAiB;AAC1B,YAAA,QAAQ,EAAE,EAAE,iBAAiB,EAAE,uBAAuB,EAAE;AACzD,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,8BAA8B;AACvC,YAAA,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;AACpC,SAAA;AACF,KAAA,EAAA,OAAA,EAAA,CAjBC,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,aAAa;QACb,aAAa;QACb,eAAe;QACf,wBAAwB,CAAA,EAAA,CAAA,CAAA;4FAaf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAvB9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,aAAa;wBACb,aAAa;wBACb,eAAe;wBACf,wBAAwB;AACzB,qBAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,QAAQ,EAAE,EAAE,iBAAiB,EAAE,uBAAuB,EAAE;AACzD,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,8BAA8B;AACvC,4BAAA,QAAQ,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE;AACpC,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;ACnCD;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -11,6 +11,10 @@ import { MatFormFieldModule } from '@angular/material/form-field';
|
|
|
11
11
|
class RadioButtonComponent {
|
|
12
12
|
constructor() {
|
|
13
13
|
this.optionSelected = new EventEmitter();
|
|
14
|
+
this.options = [];
|
|
15
|
+
}
|
|
16
|
+
ngOnInit() {
|
|
17
|
+
this.options = this.element.options;
|
|
14
18
|
}
|
|
15
19
|
onChange(optionValue) {
|
|
16
20
|
this.selectedOption = optionValue;
|
|
@@ -18,10 +22,10 @@ class RadioButtonComponent {
|
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
RadioButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RadioButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
-
RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RadioButtonComponent, selector: "mapa-radio-button", inputs: { formControl: "formControl", element: "element" }, outputs: { optionSelected: "optionSelected" }, ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-radio-button__label\">\n {{ element.label }}\n</label>\n<section class=\"mapa-radio-button\">\n <mat-radio-group [formControl]=\"formControl\" [value]=\"selectedOption\" (change)=\"onChange($event.value)\">\n <mat-radio-button\n *ngFor=\"let option of
|
|
25
|
+
RadioButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RadioButtonComponent, selector: "mapa-radio-button", inputs: { formControl: "formControl", element: "element" }, outputs: { optionSelected: "optionSelected" }, ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-radio-button__label\">\n {{ element.label }}\n</label>\n<section class=\"mapa-radio-button\">\n <mat-radio-group [formControl]=\"formControl\" [value]=\"selectedOption\" (change)=\"onChange($event.value)\">\n <mat-radio-button\n *ngFor=\"let option of options\"\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-radio-button>\n </mat-radio-group>\n</section>\n", styles: [".mapa-radio-button{color:#000;font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;line-height:20px}.mapa-radio-button__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-radio-button .mat-radio-button{margin-right:24px}.mapa-radio-button .mat-radio-container,.mapa-radio-button .mat-radio-outer-circle,.mapa-radio-button .mat-radio-inner-circle{height:12px;width:12px}.mapa-radio-button .mat-radio-button .mat-radio-ripple{border-radius:50%;left:-6px;top:-6px;height:24px;width:24px}.mapa-radio-button .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ea561d}.mapa-radio-button .mat-radio-button.mat-accent .mat-radio-inner-circle,.mapa-radio-button .mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),.mapa-radio-button .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-persistent-ripple,.mapa-radio-button .mat-radio-button.mat-accent:active .mat-radio-persistent-ripple{background-color:#ea561d}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i3.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
22
26
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RadioButtonComponent, decorators: [{
|
|
23
27
|
type: Component,
|
|
24
|
-
args: [{ selector: 'mapa-radio-button', encapsulation: ViewEncapsulation.None, template: "<label *ngIf=\"element.label\" class=\"mapa-radio-button__label\">\n {{ element.label }}\n</label>\n<section class=\"mapa-radio-button\">\n <mat-radio-group [formControl]=\"formControl\" [value]=\"selectedOption\" (change)=\"onChange($event.value)\">\n <mat-radio-button\n *ngFor=\"let option of
|
|
28
|
+
args: [{ selector: 'mapa-radio-button', encapsulation: ViewEncapsulation.None, template: "<label *ngIf=\"element.label\" class=\"mapa-radio-button__label\">\n {{ element.label }}\n</label>\n<section class=\"mapa-radio-button\">\n <mat-radio-group [formControl]=\"formControl\" [value]=\"selectedOption\" (change)=\"onChange($event.value)\">\n <mat-radio-button\n *ngFor=\"let option of options\"\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-radio-button>\n </mat-radio-group>\n</section>\n", styles: [".mapa-radio-button{color:#000;font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;line-height:20px}.mapa-radio-button__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-radio-button .mat-radio-button{margin-right:24px}.mapa-radio-button .mat-radio-container,.mapa-radio-button .mat-radio-outer-circle,.mapa-radio-button .mat-radio-inner-circle{height:12px;width:12px}.mapa-radio-button .mat-radio-button .mat-radio-ripple{border-radius:50%;left:-6px;top:-6px;height:24px;width:24px}.mapa-radio-button .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-outer-circle{border-color:#ea561d}.mapa-radio-button .mat-radio-button.mat-accent .mat-radio-inner-circle,.mapa-radio-button .mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element:not(.mat-radio-persistent-ripple),.mapa-radio-button .mat-radio-button.mat-accent.mat-radio-checked .mat-radio-persistent-ripple,.mapa-radio-button .mat-radio-button.mat-accent:active .mat-radio-persistent-ripple{background-color:#ea561d}\n"] }]
|
|
25
29
|
}], ctorParameters: function () { return []; }, propDecorators: { formControl: [{
|
|
26
30
|
type: Input
|
|
27
31
|
}], element: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapa-library-ui-src-lib-components-radio-button.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/radio-button/src/radio-button.component.ts","../../../projects/mapa-library-ui/src/lib/components/radio-button/src/radio-button.component.html","../../../projects/mapa-library-ui/src/lib/components/radio-button/src/radio-button.module.ts","../../../projects/mapa-library-ui/src/lib/components/radio-button/public-api.ts","../../../projects/mapa-library-ui/src/radio-button.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-radio-button.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { ElementOption } from '../../../core/interfaces/element-option.interface';\nimport { ElementBase } from '../../../core/elements/element-base';\n\n@Component({\n selector: 'mapa-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrls: ['./radio-button.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class RadioButtonComponent {\n @Input() formControl!: FormControl;\n @Input() element!: ElementBase;\n \n @Output() optionSelected: EventEmitter<ElementOption> = new EventEmitter<ElementOption>();\n\n selectedOption!: ElementOption;\n\n constructor() { }\n\n onChange(optionValue: ElementOption) {\n this.selectedOption = optionValue;\n this.optionSelected.emit(this.selectedOption);\n }\n}\n","<label *ngIf=\"element.label\" class=\"mapa-radio-button__label\">\n {{ element.label }}\n</label>\n<section class=\"mapa-radio-button\">\n <mat-radio-group [formControl]=\"formControl\" [value]=\"selectedOption\" (change)=\"onChange($event.value)\">\n <mat-radio-button\n *ngFor=\"let option of
|
|
1
|
+
{"version":3,"file":"mapa-library-ui-src-lib-components-radio-button.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/radio-button/src/radio-button.component.ts","../../../projects/mapa-library-ui/src/lib/components/radio-button/src/radio-button.component.html","../../../projects/mapa-library-ui/src/lib/components/radio-button/src/radio-button.module.ts","../../../projects/mapa-library-ui/src/lib/components/radio-button/public-api.ts","../../../projects/mapa-library-ui/src/radio-button.ts","../../../projects/mapa-library-ui/src/mapa-library-ui-src-lib-components-radio-button.ts"],"sourcesContent":["import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';\nimport { FormControl } from '@angular/forms';\nimport { ElementOption } from '../../../core/interfaces/element-option.interface';\nimport { ElementBase } from '../../../core/elements/element-base';\n\n@Component({\n selector: 'mapa-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrls: ['./radio-button.component.scss'],\n encapsulation: ViewEncapsulation.None\n})\nexport class RadioButtonComponent implements OnInit {\n @Input() formControl!: FormControl;\n @Input() element!: ElementBase;\n \n @Output() optionSelected: EventEmitter<ElementOption> = new EventEmitter<ElementOption>();\n\n selectedOption!: ElementOption;\n options: ElementOption[] = [];\n\n constructor() { }\n\n ngOnInit(): void {\n this.options = this.element.options as ElementOption[];\n }\n\n onChange(optionValue: ElementOption) {\n this.selectedOption = optionValue;\n this.optionSelected.emit(this.selectedOption);\n }\n}\n","<label *ngIf=\"element.label\" class=\"mapa-radio-button__label\">\n {{ element.label }}\n</label>\n<section class=\"mapa-radio-button\">\n <mat-radio-group [formControl]=\"formControl\" [value]=\"selectedOption\" (change)=\"onChange($event.value)\">\n <mat-radio-button\n *ngFor=\"let option of options\"\n [value]=\"option\"\n >\n {{ option.value }}\n </mat-radio-button>\n </mat-radio-group>\n</section>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { MatRadioModule } from \"@angular/material/radio\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\n\nimport { RadioButtonComponent } from \"./radio-button.component\";\n\n@NgModule({\n declarations: [RadioButtonComponent],\n exports: [RadioButtonComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatRadioModule,\n MatFormFieldModule,\n ],\n})\nexport class MapaRadioButtonModule {}\n","/*\n * Public API Surface of mapa-library-ui icon\n */\n\nexport * from './src/radio-button.component';\nexport * from './src/radio-button.module';","/*\n * Public API Surface of mapa-library-ui radio-button\n */\n\nexport * from './lib/components/radio-button/public-api';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './radio-button';\n"],"names":[],"mappings":";;;;;;;;;;MAWa,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A,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAP9B,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,cAAc;QACd,kBAAkB,CAAA,EAAA,CAAA,CAAA;4FAGT,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAXjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;oBACpC,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAC/B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;wBACd,kBAAkB;AACnB,qBAAA;AACF,iBAAA,CAAA;;;ACnBD;;AAEG;;ACFH;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mapa-library-ui.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/core/elements/input-text.ts","../../../projects/mapa-library-ui/src/lib/core/elements/radio-button.ts","../../../projects/mapa-library-ui/src/lib/core/elements/textarea.ts","../../../projects/mapa-library-ui/src/lib/core/directives/mat-input-autosize.directive.ts","../../../projects/mapa-library-ui/src/lib/core/directives/custom-paginator-legacy.directive.ts","../../../projects/mapa-library-ui/src/public-api.ts","../../../projects/mapa-library-ui/src/mapa-library-ui.ts"],"sourcesContent":["import { ElementOption } from \"../interfaces/element-option.interface\";\nimport { ElementSearch } from \"./element-search\";\nimport { Errors } from \"./errors\";\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 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[];\n multiple?: boolean;\n search?: ElementSearch;\n maxLength!: string | number | null;\n errors?: Errors;\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 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[];\n multiple?: boolean;\n search?: ElementSearch;\n maxLength?: string | number | null;\n errors?: Errors;\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.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.multiple = options.multiple || false;\n this.search = options.search || undefined;\n this.maxLength = options.maxLength || null;\n this.errors = options.errors || undefined;\n }\n}\n","import { ElementBase } from './element-base';\n\nexport class Dropdown extends ElementBase {\n override controlType = 'dropdown';\n}\n","import { ElementBase } from './element-base';\n\nexport class InputText extends ElementBase {\n override controlType = 'input';\n}\n","import { ElementBase } from './element-base';\n\nexport class RadioButton extends ElementBase {\n override controlType = 'radio-button';\n}\n","import { ElementBase } from './element-base';\n\nexport class Textarea extends ElementBase {\n override controlType = 'textarea';\n}\n","/*\n* Originally from: https://github.com/anotherkitten/mat-input-autosize\n* @author: Ellie Larson (anotherkitten)\n*/\n\nimport {\n AfterViewInit,\n Directive,\n ElementRef,\n Input,\n OnDestroy,\n Optional,\n Self,\n} from '@angular/core';\nimport { NgModel } from '@angular/forms';\nimport { MatInput } from '@angular/material/input';\nimport { Subscription } from 'rxjs';\n\n@Directive({\n selector: '[matInputAutosize]',\n standalone: true,\n})\nexport class MatInputAutosizeDirective implements AfterViewInit, OnDestroy {\n inputElement: HTMLInputElement;\n hiddenText!: Text;\n changeDetectSub!: Subscription;\n\n @Input() matInputAutosizeMaxWidth: any;\n @Input() matInputAutosizeMinWidth = '120px';\n @Input() matInputAutosizeFontStyle: any;\n\n constructor(\n el: ElementRef<HTMLInputElement>,\n @Self() private childMatInput: MatInput,\n @Optional() @Self() private childNgModel: NgModel\n ) {\n this.inputElement = el.nativeElement;\n }\n\n ngAfterViewInit(): void {\n this.checkErrors();\n this.overwriteParentWidth();\n this.createHiddenTextContainer();\n this.setOwnStyles();\n this.subscribeToChanges();\n }\n\n ngOnDestroy(): void {\n if (this.changeDetectSub) {\n this.changeDetectSub.unsubscribe();\n }\n }\n\n checkErrors(): void {\n if (!(this.inputElement instanceof HTMLInputElement)) {\n throw new Error('matInputAutosize directive must be on an input element');\n }\n\n if (!this.childMatInput) {\n throw new Error(\n 'Element with matInputAutosize directive must also have the matInput directive'\n );\n }\n }\n\n overwriteParentWidth(): void {\n Object.assign((this.inputElement.parentNode as HTMLElement).style, {\n width: '100%',\n });\n }\n\n createHiddenTextContainer(): void {\n const textContainer = document.createElement('div');\n Object.assign(textContainer.style, {\n display: 'inline-block',\n 'max-width': this.matInputAutosizeMaxWidth || null,\n 'min-width': this.matInputAutosizeMinWidth,\n font: this.matInputAutosizeFontStyle || null,\n visibility: 'hidden',\n 'white-space': 'pre',\n });\n this.inputElement.parentNode?.appendChild(textContainer);\n\n this.hiddenText = document.createTextNode(' ');\n textContainer.appendChild(this.hiddenText);\n }\n\n setOwnStyles(): void {\n Object.assign(this.inputElement.style, {\n position: 'absolute',\n left: '0',\n });\n }\n\n subscribeToChanges(): void {\n if (this.childNgModel) {\n this.changeDetectSub = this.childNgModel.control.valueChanges.subscribe(\n this.changeHiddenText\n );\n } else {\n this.inputElement.addEventListener('input', () =>\n this.changeHiddenText(this.inputElement.value)\n );\n }\n }\n\n changeHiddenText = (newValue: string): void => {\n if (this.hiddenText) {\n this.hiddenText.data = newValue + ' ';\n }\n };\n}\n","import {\n AfterViewInit,\n Directive,\n DoCheck,\n Host,\n Optional,\n Renderer2,\n Self,\n ViewContainerRef,\n} from '@angular/core';\nimport { MatPaginator, PageEvent } from '@angular/material/paginator';\nimport { MatButton } from '@angular/material/button';\n\n@Directive({\n selector: '[appStylePaginatorMv]',\n standalone: true\n})\nexport class PaginatorLegacyDirective implements DoCheck, AfterViewInit {\n private currentPage: number;\n private pageGapTxt: string[];\n private rangeStart!: number;\n private rangeEnd!: number;\n private buttons: MatButton[] = [];\n private showTotalPages: number;\n private checkPage: number[];\n\n constructor(\n @Host() @Self() @Optional() private readonly matPag: MatPaginator,\n private readonly ViewContainer: ViewContainerRef,\n private readonly renderer: Renderer2\n ) {\n this.currentPage = 1;\n this.pageGapTxt = ['•••', '---'];\n this.showTotalPages = 2;\n this.checkPage = [0, 0, 0];\n // Display custom range label text\n this.matPag._intl.getRangeLabel = (\n page: number,\n pageSize: number,\n length: number\n ): string => {\n const startIndex = page * pageSize;\n const endIndex =\n startIndex < length\n ? Math.min(startIndex + pageSize, length)\n : startIndex + pageSize;\n if (length === 0) {\n return 'Mostrando 0 – 0 de 0 item';\n }\n if (length === 1) {\n return (\n 'Mostrando ' +\n (startIndex + 1) +\n ' – ' +\n endIndex +\n ' de ' +\n length +\n ' item'\n );\n } else {\n return (\n 'Mostrando ' +\n (startIndex + 1) +\n ' – ' +\n endIndex +\n ' de ' +\n length +\n ' itens'\n );\n }\n };\n // Subscribe to rerender buttons when next page and last page button is used\n this.matPag.page.subscribe((paginator: PageEvent) => {\n this.currentPage = paginator.pageIndex;\n this.matPag.pageIndex = paginator.pageIndex;\n this.initPageRange();\n });\n this.matPag._intl.itemsPerPageLabel = 'Itens por página';\n const paginatorIntl = this.matPag._intl;\n paginatorIntl.nextPageLabel = '';\n paginatorIntl.previousPageLabel = '';\n }\n\n ngDoCheck(): void {\n // Reset paginator if the pageSize, pageIndex, length changes\n if (\n this.matPag?.length !== this.checkPage[0] ||\n this.matPag?.pageSize !== this.checkPage[1] ||\n this.matPag?.pageIndex !== this.checkPage[2]\n ) {\n const pageCount = this.matPag.getNumberOfPages();\n if (this.currentPage > pageCount && pageCount !== 0) {\n this.currentPage = 1;\n this.matPag.pageIndex = 0;\n }\n this.currentPage = this.matPag.pageIndex;\n this.initPageRange();\n this.checkPage = [\n this.matPag.length,\n this.matPag.pageSize,\n this.matPag.pageIndex,\n ];\n }\n }\n\n private buildPageNumbers = () => {\n let dots: boolean[];\n let page: number;\n let pageDifference: number;\n let startIndex: number;\n let totalPages: number;\n totalPages = this.matPag.getNumberOfPages();\n // Container div with paginator elements\n const actionContainer =\n this.ViewContainer.element.nativeElement.querySelector(\n 'div.mat-paginator-range-actions'\n );\n // Button that triggers the next page action\n const nextPageNode = this.ViewContainer.element.nativeElement.querySelector(\n 'button.mat-paginator-navigation-next'\n );\n // Label showing the page range\n const pageRange = this.ViewContainer.element.nativeElement.querySelector(\n 'div.mat-paginator-range-label'\n );\n\n let prevButtonCount = this.buttons.length;\n\n // Remove buttons before creating new ones\n if (prevButtonCount > 0) {\n this.buttons.forEach((button) => {\n this.renderer.removeChild(actionContainer, button);\n });\n // Empty state array\n prevButtonCount = 0;\n }\n\n this.renderer.addClass(pageRange, 'custom-paginator-counter');\n this.renderer.addClass(actionContainer, 'custom-paginator-container');\n\n // Initialize next page and last page buttons\n if (prevButtonCount === 0) {\n const nodeArray = actionContainer.childNodes;\n setTimeout(() => {\n for (const node of nodeArray) {\n if (node.nodeName === 'BUTTON') {\n // Next Button styles\n if (node.innerHTML.length > 100 && node.disabled) {\n this.renderer.addClass(node, 'custom-paginator-arrow-disabled');\n this.renderer.removeClass(node, 'custom-paginator-arrow-enabled');\n } else if (node.innerHTML.length > 100 && !node.disabled) {\n this.renderer.addClass(node, 'custom-paginator-arrow-enabled');\n this.renderer.removeClass(\n node,\n 'custom-paginator-arrow-disabled'\n );\n }\n }\n }\n });\n }\n\n dots = [false, false];\n\n if (totalPages > 0) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton('0', this.matPag.pageIndex),\n nextPageNode\n );\n }\n\n page = this.showTotalPages + 2;\n pageDifference = totalPages - page;\n startIndex = Math.max(this.currentPage - this.showTotalPages - 2, 1);\n\n for (let index = startIndex; index < totalPages - 1; index = index + 1) {\n if (\n (index < page && this.currentPage <= this.showTotalPages) ||\n (index >= this.rangeStart && index <= this.rangeEnd) ||\n (this.currentPage > pageDifference && index >= pageDifference) ||\n totalPages < this.showTotalPages + page\n ) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton(`${index}`, this.matPag.pageIndex),\n nextPageNode\n );\n } else {\n if (index > this.rangeEnd && !dots[0]) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton(this.pageGapTxt[0], this.matPag.pageIndex),\n nextPageNode\n );\n dots[0] = true;\n break;\n }\n if (index < this.rangeEnd && !dots[1]) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton(this.pageGapTxt[1], this.matPag.pageIndex),\n nextPageNode\n );\n dots[1] = true;\n }\n }\n }\n\n if (totalPages > 1) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton(`${totalPages - 1}`, this.matPag.pageIndex),\n nextPageNode\n );\n }\n };\n\n private createButton(index: string, pageIndex: number): MatButton {\n const linkBtn: MatButton = this.renderer.createElement('button');\n this.renderer.setAttribute(linkBtn, 'class', 'custom-paginator-page');\n this.renderer.addClass(linkBtn, 'custom-paginator-page-enabled');\n if (index === this.pageGapTxt[0] || index === this.pageGapTxt[1]) {\n this.renderer.addClass(linkBtn, 'custom-paginator-arrow-enabled');\n }\n const pagingTxt = isNaN(+index) ? this.pageGapTxt[0] : +index + 1;\n const text = this.renderer.createText(pagingTxt + '');\n this.renderer.addClass(linkBtn, 'mat-custom-page');\n switch (index) {\n case `${pageIndex}`:\n this.renderer.setAttribute(linkBtn, 'disabled', 'disabled');\n this.renderer.removeClass(linkBtn, 'custom-paginator-page-enabled');\n this.renderer.addClass(linkBtn, 'custom-paginator-page-disabled');\n break;\n case this.pageGapTxt[0]:\n this.renderer.listen(linkBtn, 'click', () => {\n this.switchPage(\n this.currentPage < this.showTotalPages + 1\n ? this.showTotalPages + 2\n : this.currentPage + this.showTotalPages - 1\n );\n });\n break;\n case this.pageGapTxt[1]:\n this.renderer.listen(linkBtn, 'click', () => {\n this.switchPage(\n this.currentPage >\n this.matPag.getNumberOfPages() - this.showTotalPages - 2\n ? this.matPag.getNumberOfPages() - this.showTotalPages - 3\n : this.currentPage - this.showTotalPages + 1\n );\n });\n break;\n default:\n this.renderer.listen(linkBtn, 'click', () => {\n this.switchPage(+index);\n });\n break;\n }\n this.renderer.appendChild(linkBtn, text);\n // Add button to private array for state\n this.buttons.push(linkBtn);\n return linkBtn;\n }\n\n /**\n * @description calculates the button range based on class input parameters and based on current page index value.\n */\n private initPageRange(): void {\n this.rangeStart = this.currentPage - this.showTotalPages / 2;\n this.rangeEnd = this.currentPage + this.showTotalPages / 2;\n this.buildPageNumbers();\n }\n\n private switchPage(index: number): void {\n this.matPag.pageIndex = index;\n this.matPag.page.emit({\n previousPageIndex: this.currentPage,\n pageIndex: index,\n pageSize: this.matPag.pageSize,\n length: this.matPag.length,\n });\n this.currentPage = index;\n this.initPageRange();\n }\n\n public ngAfterViewInit(): void {\n this.rangeStart = 0;\n this.rangeEnd = this.showTotalPages - 1;\n this.initPageRange();\n }\n}\n","/*\n * Public API Surface of mapa-library-ui\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/elements/input-text';\nexport * from './lib/core/elements/radio-button';\nexport * from './lib/core/elements/textarea';\n\nexport * from './lib/core/interfaces/button-icon.interface';\nexport * from './lib/core/interfaces/chart-options.interface';\nexport * from './lib/core/interfaces/dialog-data.interface';\nexport * from './lib/core/interfaces/element-option.interface';\n\nexport * from './lib/core/directives/mat-input-autosize.directive';\nexport * from './lib/core/directives/custom-paginator-legacy.directive';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;MAIa,WAAW,CAAA;AAuBtB,IAAA,WAAA,CACE,UAsBI,EAAE,EAAA;QAEN,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACnC,QAAA,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,KAAK,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QAC7D,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,IAAI,EAAE,CAAC;QAC7C,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,IAAI,KAAK,CAAC;QAC1C,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC;QAC5D,IAAI,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC;QAC5D,IAAI,CAAC,cAAc,GAAG,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AAChB,YAAA,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ;AAC9B,YAAA,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM;AAC3B,SAAA,CAAC,CAAC;AACH,QAAA,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB;IAEM,eAAe,GAAA;AACpB,QAAA,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC;QACpB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;QACxC,IAAI,CAAC,aAAa,EAAE,CAAC;KACtB;;sHAjRU,wBAAwB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAA,IAAA,CAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,IAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;0GAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;0BAWI,IAAI;;0BAAI,IAAI;;0BAAI,QAAQ;;;AC3B7B;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mapa-library-ui.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/core/elements/input-text.ts","../../../projects/mapa-library-ui/src/lib/core/elements/radio-button.ts","../../../projects/mapa-library-ui/src/lib/core/elements/textarea.ts","../../../projects/mapa-library-ui/src/lib/core/directives/mat-input-autosize.directive.ts","../../../projects/mapa-library-ui/src/lib/core/directives/custom-paginator-legacy.directive.ts","../../../projects/mapa-library-ui/src/public-api.ts","../../../projects/mapa-library-ui/src/mapa-library-ui.ts"],"sourcesContent":["import { ElementGroup } from \"../interfaces/element-group.interface\";\nimport { ElementOption } from \"../interfaces/element-option.interface\";\nimport { ElementSearch } from \"./element-search\";\nimport { Errors } from \"./errors\";\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 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 multiple?: boolean;\n search?: ElementSearch;\n maxLength!: string | number | null;\n errors?: Errors;\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 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 multiple?: boolean;\n search?: ElementSearch;\n maxLength?: string | number | null;\n errors?: Errors;\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.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.multiple = options.multiple || false;\n this.search = options.search || undefined;\n this.maxLength = options.maxLength || null;\n this.errors = options.errors || undefined;\n }\n}\n","import { ElementBase } from './element-base';\n\nexport class Dropdown extends ElementBase {\n override controlType = 'dropdown';\n}\n","import { ElementBase } from './element-base';\n\nexport class InputText extends ElementBase {\n override controlType = 'input';\n}\n","import { ElementBase } from './element-base';\n\nexport class RadioButton extends ElementBase {\n override controlType = 'radio-button';\n}\n","import { ElementBase } from './element-base';\n\nexport class Textarea extends ElementBase {\n override controlType = 'textarea';\n}\n","/*\n* Originally from: https://github.com/anotherkitten/mat-input-autosize\n* @author: Ellie Larson (anotherkitten)\n*/\n\nimport {\n AfterViewInit,\n Directive,\n ElementRef,\n Input,\n OnDestroy,\n Optional,\n Self,\n} from '@angular/core';\nimport { NgModel } from '@angular/forms';\nimport { MatInput } from '@angular/material/input';\nimport { Subscription } from 'rxjs';\n\n@Directive({\n selector: '[matInputAutosize]',\n standalone: true,\n})\nexport class MatInputAutosizeDirective implements AfterViewInit, OnDestroy {\n inputElement: HTMLInputElement;\n hiddenText!: Text;\n changeDetectSub!: Subscription;\n\n @Input() matInputAutosizeMaxWidth: any;\n @Input() matInputAutosizeMinWidth = '120px';\n @Input() matInputAutosizeFontStyle: any;\n\n constructor(\n el: ElementRef<HTMLInputElement>,\n @Self() private childMatInput: MatInput,\n @Optional() @Self() private childNgModel: NgModel\n ) {\n this.inputElement = el.nativeElement;\n }\n\n ngAfterViewInit(): void {\n this.checkErrors();\n this.overwriteParentWidth();\n this.createHiddenTextContainer();\n this.setOwnStyles();\n this.subscribeToChanges();\n }\n\n ngOnDestroy(): void {\n if (this.changeDetectSub) {\n this.changeDetectSub.unsubscribe();\n }\n }\n\n checkErrors(): void {\n if (!(this.inputElement instanceof HTMLInputElement)) {\n throw new Error('matInputAutosize directive must be on an input element');\n }\n\n if (!this.childMatInput) {\n throw new Error(\n 'Element with matInputAutosize directive must also have the matInput directive'\n );\n }\n }\n\n overwriteParentWidth(): void {\n Object.assign((this.inputElement.parentNode as HTMLElement).style, {\n width: '100%',\n });\n }\n\n createHiddenTextContainer(): void {\n const textContainer = document.createElement('div');\n Object.assign(textContainer.style, {\n display: 'inline-block',\n 'max-width': this.matInputAutosizeMaxWidth || null,\n 'min-width': this.matInputAutosizeMinWidth,\n font: this.matInputAutosizeFontStyle || null,\n visibility: 'hidden',\n 'white-space': 'pre',\n });\n this.inputElement.parentNode?.appendChild(textContainer);\n\n this.hiddenText = document.createTextNode(' ');\n textContainer.appendChild(this.hiddenText);\n }\n\n setOwnStyles(): void {\n Object.assign(this.inputElement.style, {\n position: 'absolute',\n left: '0',\n });\n }\n\n subscribeToChanges(): void {\n if (this.childNgModel) {\n this.changeDetectSub = this.childNgModel.control.valueChanges.subscribe(\n this.changeHiddenText\n );\n } else {\n this.inputElement.addEventListener('input', () =>\n this.changeHiddenText(this.inputElement.value)\n );\n }\n }\n\n changeHiddenText = (newValue: string): void => {\n if (this.hiddenText) {\n this.hiddenText.data = newValue + ' ';\n }\n };\n}\n","import {\n AfterViewInit,\n Directive,\n DoCheck,\n Host,\n Optional,\n Renderer2,\n Self,\n ViewContainerRef,\n} from '@angular/core';\nimport { MatPaginator, PageEvent } from '@angular/material/paginator';\nimport { MatButton } from '@angular/material/button';\n\n@Directive({\n selector: '[appStylePaginatorMv]',\n standalone: true\n})\nexport class PaginatorLegacyDirective implements DoCheck, AfterViewInit {\n private currentPage: number;\n private pageGapTxt: string[];\n private rangeStart!: number;\n private rangeEnd!: number;\n private buttons: MatButton[] = [];\n private showTotalPages: number;\n private checkPage: number[];\n\n constructor(\n @Host() @Self() @Optional() private readonly matPag: MatPaginator,\n private readonly ViewContainer: ViewContainerRef,\n private readonly renderer: Renderer2\n ) {\n this.currentPage = 1;\n this.pageGapTxt = ['•••', '---'];\n this.showTotalPages = 2;\n this.checkPage = [0, 0, 0];\n // Display custom range label text\n this.matPag._intl.getRangeLabel = (\n page: number,\n pageSize: number,\n length: number\n ): string => {\n const startIndex = page * pageSize;\n const endIndex =\n startIndex < length\n ? Math.min(startIndex + pageSize, length)\n : startIndex + pageSize;\n if (length === 0) {\n return 'Mostrando 0 – 0 de 0 item';\n }\n if (length === 1) {\n return (\n 'Mostrando ' +\n (startIndex + 1) +\n ' – ' +\n endIndex +\n ' de ' +\n length +\n ' item'\n );\n } else {\n return (\n 'Mostrando ' +\n (startIndex + 1) +\n ' – ' +\n endIndex +\n ' de ' +\n length +\n ' itens'\n );\n }\n };\n // Subscribe to rerender buttons when next page and last page button is used\n this.matPag.page.subscribe((paginator: PageEvent) => {\n this.currentPage = paginator.pageIndex;\n this.matPag.pageIndex = paginator.pageIndex;\n this.initPageRange();\n });\n this.matPag._intl.itemsPerPageLabel = 'Itens por página';\n const paginatorIntl = this.matPag._intl;\n paginatorIntl.nextPageLabel = '';\n paginatorIntl.previousPageLabel = '';\n }\n\n ngDoCheck(): void {\n // Reset paginator if the pageSize, pageIndex, length changes\n if (\n this.matPag?.length !== this.checkPage[0] ||\n this.matPag?.pageSize !== this.checkPage[1] ||\n this.matPag?.pageIndex !== this.checkPage[2]\n ) {\n const pageCount = this.matPag.getNumberOfPages();\n if (this.currentPage > pageCount && pageCount !== 0) {\n this.currentPage = 1;\n this.matPag.pageIndex = 0;\n }\n this.currentPage = this.matPag.pageIndex;\n this.initPageRange();\n this.checkPage = [\n this.matPag.length,\n this.matPag.pageSize,\n this.matPag.pageIndex,\n ];\n }\n }\n\n private buildPageNumbers = () => {\n let dots: boolean[];\n let page: number;\n let pageDifference: number;\n let startIndex: number;\n let totalPages: number;\n totalPages = this.matPag.getNumberOfPages();\n // Container div with paginator elements\n const actionContainer =\n this.ViewContainer.element.nativeElement.querySelector(\n 'div.mat-paginator-range-actions'\n );\n // Button that triggers the next page action\n const nextPageNode = this.ViewContainer.element.nativeElement.querySelector(\n 'button.mat-paginator-navigation-next'\n );\n // Label showing the page range\n const pageRange = this.ViewContainer.element.nativeElement.querySelector(\n 'div.mat-paginator-range-label'\n );\n\n let prevButtonCount = this.buttons.length;\n\n // Remove buttons before creating new ones\n if (prevButtonCount > 0) {\n this.buttons.forEach((button) => {\n this.renderer.removeChild(actionContainer, button);\n });\n // Empty state array\n prevButtonCount = 0;\n }\n\n this.renderer.addClass(pageRange, 'custom-paginator-counter');\n this.renderer.addClass(actionContainer, 'custom-paginator-container');\n\n // Initialize next page and last page buttons\n if (prevButtonCount === 0) {\n const nodeArray = actionContainer.childNodes;\n setTimeout(() => {\n for (const node of nodeArray) {\n if (node.nodeName === 'BUTTON') {\n // Next Button styles\n if (node.innerHTML.length > 100 && node.disabled) {\n this.renderer.addClass(node, 'custom-paginator-arrow-disabled');\n this.renderer.removeClass(node, 'custom-paginator-arrow-enabled');\n } else if (node.innerHTML.length > 100 && !node.disabled) {\n this.renderer.addClass(node, 'custom-paginator-arrow-enabled');\n this.renderer.removeClass(\n node,\n 'custom-paginator-arrow-disabled'\n );\n }\n }\n }\n });\n }\n\n dots = [false, false];\n\n if (totalPages > 0) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton('0', this.matPag.pageIndex),\n nextPageNode\n );\n }\n\n page = this.showTotalPages + 2;\n pageDifference = totalPages - page;\n startIndex = Math.max(this.currentPage - this.showTotalPages - 2, 1);\n\n for (let index = startIndex; index < totalPages - 1; index = index + 1) {\n if (\n (index < page && this.currentPage <= this.showTotalPages) ||\n (index >= this.rangeStart && index <= this.rangeEnd) ||\n (this.currentPage > pageDifference && index >= pageDifference) ||\n totalPages < this.showTotalPages + page\n ) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton(`${index}`, this.matPag.pageIndex),\n nextPageNode\n );\n } else {\n if (index > this.rangeEnd && !dots[0]) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton(this.pageGapTxt[0], this.matPag.pageIndex),\n nextPageNode\n );\n dots[0] = true;\n break;\n }\n if (index < this.rangeEnd && !dots[1]) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton(this.pageGapTxt[1], this.matPag.pageIndex),\n nextPageNode\n );\n dots[1] = true;\n }\n }\n }\n\n if (totalPages > 1) {\n this.renderer.insertBefore(\n actionContainer,\n this.createButton(`${totalPages - 1}`, this.matPag.pageIndex),\n nextPageNode\n );\n }\n };\n\n private createButton(index: string, pageIndex: number): MatButton {\n const linkBtn: MatButton = this.renderer.createElement('button');\n this.renderer.setAttribute(linkBtn, 'class', 'custom-paginator-page');\n this.renderer.addClass(linkBtn, 'custom-paginator-page-enabled');\n if (index === this.pageGapTxt[0] || index === this.pageGapTxt[1]) {\n this.renderer.addClass(linkBtn, 'custom-paginator-arrow-enabled');\n }\n const pagingTxt = isNaN(+index) ? this.pageGapTxt[0] : +index + 1;\n const text = this.renderer.createText(pagingTxt + '');\n this.renderer.addClass(linkBtn, 'mat-custom-page');\n switch (index) {\n case `${pageIndex}`:\n this.renderer.setAttribute(linkBtn, 'disabled', 'disabled');\n this.renderer.removeClass(linkBtn, 'custom-paginator-page-enabled');\n this.renderer.addClass(linkBtn, 'custom-paginator-page-disabled');\n break;\n case this.pageGapTxt[0]:\n this.renderer.listen(linkBtn, 'click', () => {\n this.switchPage(\n this.currentPage < this.showTotalPages + 1\n ? this.showTotalPages + 2\n : this.currentPage + this.showTotalPages - 1\n );\n });\n break;\n case this.pageGapTxt[1]:\n this.renderer.listen(linkBtn, 'click', () => {\n this.switchPage(\n this.currentPage >\n this.matPag.getNumberOfPages() - this.showTotalPages - 2\n ? this.matPag.getNumberOfPages() - this.showTotalPages - 3\n : this.currentPage - this.showTotalPages + 1\n );\n });\n break;\n default:\n this.renderer.listen(linkBtn, 'click', () => {\n this.switchPage(+index);\n });\n break;\n }\n this.renderer.appendChild(linkBtn, text);\n // Add button to private array for state\n this.buttons.push(linkBtn);\n return linkBtn;\n }\n\n /**\n * @description calculates the button range based on class input parameters and based on current page index value.\n */\n private initPageRange(): void {\n this.rangeStart = this.currentPage - this.showTotalPages / 2;\n this.rangeEnd = this.currentPage + this.showTotalPages / 2;\n this.buildPageNumbers();\n }\n\n private switchPage(index: number): void {\n this.matPag.pageIndex = index;\n this.matPag.page.emit({\n previousPageIndex: this.currentPage,\n pageIndex: index,\n pageSize: this.matPag.pageSize,\n length: this.matPag.length,\n });\n this.currentPage = index;\n this.initPageRange();\n }\n\n public ngAfterViewInit(): void {\n this.rangeStart = 0;\n this.rangeEnd = this.showTotalPages - 1;\n this.initPageRange();\n }\n}\n","/*\n * Public API Surface of mapa-library-ui\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/elements/input-text';\nexport * from './lib/core/elements/radio-button';\nexport * from './lib/core/elements/textarea';\n\nexport * from './lib/core/interfaces/button-icon.interface';\nexport * from './lib/core/interfaces/chart-options.interface';\nexport * from './lib/core/interfaces/dialog-data.interface';\nexport * from './lib/core/interfaces/element-option.interface';\n\nexport * from './lib/core/directives/mat-input-autosize.directive';\nexport * from './lib/core/directives/custom-paginator-legacy.directive';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;MAKa,WAAW,CAAA;AAuBtB,IAAA,WAAA,CACE,UAsBI,EAAE,EAAA;QAEN,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,EAAE,CAAC;QAC7B,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;AACnC,QAAA,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,KAAK,SAAS,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC;QAC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,CAAA,gBAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,SAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;0GAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAJpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA,CAAA;;0BAWI,IAAI;;0BAAI,IAAI;;0BAAI,QAAQ;;;AC3B7B;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ElementGroup } from "../interfaces/element-group.interface";
|
|
1
2
|
import { ElementOption } from "../interfaces/element-option.interface";
|
|
2
3
|
import { ElementSearch } from "./element-search";
|
|
3
4
|
import { Errors } from "./errors";
|
|
@@ -18,7 +19,7 @@ export declare class ElementBase {
|
|
|
18
19
|
autosizeMaxWidth?: string;
|
|
19
20
|
autosizeMinRow?: number;
|
|
20
21
|
autosizeMaxRow?: number;
|
|
21
|
-
options: ElementOption[];
|
|
22
|
+
options: ElementOption[] | ElementGroup[];
|
|
22
23
|
multiple?: boolean;
|
|
23
24
|
search?: ElementSearch;
|
|
24
25
|
maxLength: string | number | null;
|
|
@@ -40,7 +41,7 @@ export declare class ElementBase {
|
|
|
40
41
|
autosizeMaxWidth?: string;
|
|
41
42
|
autosizeMinRow?: number;
|
|
42
43
|
autosizeMaxRow?: number;
|
|
43
|
-
options?: ElementOption[];
|
|
44
|
+
options?: ElementOption[] | ElementGroup[];
|
|
44
45
|
multiple?: boolean;
|
|
45
46
|
search?: ElementSearch;
|
|
46
47
|
maxLength?: string | number | null;
|
|
Binary file
|