mapa-library-ui 0.16.6 → 0.17.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.
Files changed (45) hide show
  1. package/esm2020/lib/core/elements/element-base.mjs +2 -1
  2. package/esm2020/src/lib/components/capability/lib/core/elements/element-base.mjs +2 -1
  3. package/esm2020/src/lib/components/chart/lib/core/elements/element-base.mjs +2 -1
  4. package/esm2020/src/lib/components/dropdown/lib/core/elements/element-base.mjs +2 -1
  5. package/esm2020/src/lib/components/form/lib/components/form/src/form.component.mjs +13 -5
  6. package/esm2020/src/lib/components/form/lib/components/input/src/input.component.mjs +9 -8
  7. package/esm2020/src/lib/components/form/lib/components/input/src/input.module.mjs +12 -2
  8. package/esm2020/src/lib/components/form/lib/core/elements/element-base.mjs +2 -1
  9. package/esm2020/src/lib/components/input/src/input.component.mjs +9 -8
  10. package/esm2020/src/lib/components/input/src/input.module.mjs +12 -2
  11. package/esm2020/src/lib/components/radio-button/lib/core/elements/element-base.mjs +2 -1
  12. package/esm2020/src/lib/components/textarea/lib/core/elements/element-base.mjs +2 -1
  13. package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs +1 -0
  14. package/fesm2015/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  15. package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs +1 -0
  16. package/fesm2015/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
  17. package/fesm2015/mapa-library-ui-src-lib-components-form.mjs +31 -12
  18. package/fesm2015/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
  19. package/fesm2015/mapa-library-ui-src-lib-components-input.mjs +19 -8
  20. package/fesm2015/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
  21. package/fesm2015/mapa-library-ui.mjs +1 -0
  22. package/fesm2015/mapa-library-ui.mjs.map +1 -1
  23. package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs +1 -0
  24. package/fesm2020/mapa-library-ui-src-lib-components-capability.mjs.map +1 -1
  25. package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs +1 -0
  26. package/fesm2020/mapa-library-ui-src-lib-components-dropdown.mjs.map +1 -1
  27. package/fesm2020/mapa-library-ui-src-lib-components-form.mjs +31 -12
  28. package/fesm2020/mapa-library-ui-src-lib-components-form.mjs.map +1 -1
  29. package/fesm2020/mapa-library-ui-src-lib-components-input.mjs +19 -8
  30. package/fesm2020/mapa-library-ui-src-lib-components-input.mjs.map +1 -1
  31. package/fesm2020/mapa-library-ui.mjs +1 -0
  32. package/fesm2020/mapa-library-ui.mjs.map +1 -1
  33. package/lib/core/elements/element-base.d.ts +2 -0
  34. package/mapa-library-ui-0.17.0.tgz +0 -0
  35. package/package.json +1 -1
  36. package/src/lib/components/capability/lib/core/elements/element-base.d.ts +2 -0
  37. package/src/lib/components/chart/lib/core/elements/element-base.d.ts +2 -0
  38. package/src/lib/components/dropdown/lib/core/elements/element-base.d.ts +2 -0
  39. package/src/lib/components/form/lib/components/form/src/form.component.d.ts +6 -3
  40. package/src/lib/components/form/lib/components/input/src/input.module.d.ts +8 -7
  41. package/src/lib/components/form/lib/core/elements/element-base.d.ts +2 -0
  42. package/src/lib/components/input/src/input.module.d.ts +8 -7
  43. package/src/lib/components/radio-button/lib/core/elements/element-base.d.ts +2 -0
  44. package/src/lib/components/textarea/lib/core/elements/element-base.d.ts +2 -0
  45. package/mapa-library-ui-0.16.6.tgz +0 -0
@@ -4,15 +4,17 @@ import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i2 from '@angular/forms';
6
6
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
7
- import * as i3 from '@angular/material/form-field';
7
+ import * as i3 from 'ngx-mask';
8
+ import { NgxMaskDirective, NgxMaskPipe, provideNgxMask } from 'ngx-mask';
9
+ import * as i4 from '@angular/material/form-field';
8
10
  import { MatFormFieldModule } from '@angular/material/form-field';
9
- import * as i4 from 'mapa-library-ui/src/lib/components/button';
11
+ import * as i5 from 'mapa-library-ui/src/lib/components/button';
10
12
  import { MapaButtonModule } from 'mapa-library-ui/src/lib/components/button';
11
- import * as i5 from '@angular/material/input';
13
+ import * as i6 from '@angular/material/input';
12
14
  import { MatInputModule } from '@angular/material/input';
13
- import * as i6 from '@angular/material/icon';
15
+ import * as i7 from '@angular/material/icon';
14
16
  import { MatIconModule } from '@angular/material/icon';
15
- import * as i7 from 'mapa-library-ui';
17
+ import * as i8 from 'mapa-library-ui';
16
18
  import { MatInputAutosizeDirective } from 'mapa-library-ui';
17
19
  import { MatButtonModule } from '@angular/material/button';
18
20
 
@@ -31,10 +33,10 @@ class MapaInputComponent {
31
33
  }
32
34
  }
33
35
  MapaInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
34
- MapaInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaInputComponent, selector: "mapa-input", inputs: { formControl: "formControl", element: "element", type: "type" }, outputs: { suffix: "suffix" }, ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n />\n <mat-icon\n *ngIf=\"hasValue()\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n matSuffix\n >close</mat-icon\n >\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button color=\"basic\" (clicked)=\"element.actionButton.action.emit(true)\">\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [".mapa-input__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-input .mat-input-element{font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;margin-top:unset!important}.mapa-input .mat-form-field-flex{display:flex;align-items:center;height:48px;padding:0 1em!important}.mapa-input .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-input .mat-form-field-infix{padding:unset!important;border-top:unset!important}.mapa-input .mat-form-field-suffix{display:flex;top:.1em!important}.mapa-input .mat-form-field-label-wrapper{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { 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: "directive", type: i3.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i4.ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7.MatInputAutosizeDirective, selector: "[matInputAutosize]", inputs: ["matInputAutosizeMaxWidth", "matInputAutosizeMinWidth", "matInputAutosizeFontStyle"] }], encapsulation: i0.ViewEncapsulation.None });
36
+ MapaInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: MapaInputComponent, selector: "mapa-input", inputs: { formControl: "formControl", element: "element", type: "type" }, outputs: { suffix: "suffix" }, ngImport: i0, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n />\n <mat-icon\n *ngIf=\"hasValue()\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n matSuffix\n >close</mat-icon\n >\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button color=\"basic\" (clicked)=\"element.actionButton.action.emit(true)\">\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [".mapa-input__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-input .mat-input-element{font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;margin-top:unset!important}.mapa-input .mat-form-field-flex{display:flex;align-items:center;height:48px;padding:0 1em!important}.mapa-input .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-input .mat-form-field-infix{padding:unset!important;border-top:unset!important}.mapa-input .mat-form-field-suffix{display:flex;top:.1em!important}.mapa-input .mat-form-field-label-wrapper{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.NgxMaskDirective, selector: "input[mask], textarea[mask]", inputs: ["mask", "specialCharacters", "patterns", "prefix", "suffix", "thousandSeparator", "decimalMarker", "dropSpecialCharacters", "hiddenInput", "showMaskTyped", "placeHolderCharacter", "shownMaskExpression", "showTemplate", "clearIfNotMatch", "validation", "separatorLimit", "allowNegativeNumbers", "leadZeroDateTime", "leadZero", "triggerOnMaskChange", "apm", "inputTransformFn", "outputTransformFn", "keepCharacterPositions"], outputs: ["maskFilled"], exportAs: ["mask", "ngxMask"] }, { kind: "directive", type: i4.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.MatPrefix, selector: "[matPrefix]" }, { kind: "directive", type: i4.MatSuffix, selector: "[matSuffix]" }, { kind: "component", type: i5.ButtonComponent, selector: "mapa-button", inputs: ["color", "disabled"], outputs: ["clicked"] }, { kind: "directive", type: i6.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i8.MatInputAutosizeDirective, selector: "[matInputAutosize]", inputs: ["matInputAutosizeMaxWidth", "matInputAutosizeMinWidth", "matInputAutosizeFontStyle"] }], encapsulation: i0.ViewEncapsulation.None });
35
37
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaInputComponent, decorators: [{
36
38
  type: Component,
37
- args: [{ selector: 'mapa-input', encapsulation: ViewEncapsulation.None, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n />\n <mat-icon\n *ngIf=\"hasValue()\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n matSuffix\n >close</mat-icon\n >\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button color=\"basic\" (clicked)=\"element.actionButton.action.emit(true)\">\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [".mapa-input__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-input .mat-input-element{font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;margin-top:unset!important}.mapa-input .mat-form-field-flex{display:flex;align-items:center;height:48px;padding:0 1em!important}.mapa-input .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-input .mat-form-field-infix{padding:unset!important;border-top:unset!important}.mapa-input .mat-form-field-suffix{display:flex;top:.1em!important}.mapa-input .mat-form-field-label-wrapper{display:none}\n"] }]
39
+ args: [{ selector: 'mapa-input', encapsulation: ViewEncapsulation.None, template: "<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n />\n <mat-icon\n *ngIf=\"hasValue()\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n matSuffix\n >close</mat-icon\n >\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button color=\"basic\" (clicked)=\"element.actionButton.action.emit(true)\">\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n", styles: [".mapa-input__label{display:block;font-size:12px;font-style:normal;font-weight:600;line-height:16px;text-transform:uppercase;margin-bottom:16px}.mapa-input .mat-input-element{font-family:SF-Pro;font-size:16px;font-style:normal;font-weight:400;margin-top:unset!important}.mapa-input .mat-form-field-flex{display:flex;align-items:center;height:48px;padding:0 1em!important}.mapa-input .mat-form-field-outline{background-color:#fff;border-radius:8px}.mapa-input .mat-form-field-infix{padding:unset!important;border-top:unset!important}.mapa-input .mat-form-field-suffix{display:flex;top:.1em!important}.mapa-input .mat-form-field-label-wrapper{display:none}\n"] }]
38
40
  }], propDecorators: { formControl: [{
39
41
  type: Input
40
42
  }], element: [{
@@ -51,13 +53,17 @@ MapaInputModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version:
51
53
  MapaInputModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: MapaInputModule, declarations: [MapaInputComponent], imports: [CommonModule,
52
54
  FormsModule,
53
55
  ReactiveFormsModule,
56
+ NgxMaskDirective,
57
+ NgxMaskPipe,
54
58
  MatFormFieldModule,
55
59
  MatButtonModule,
56
60
  MapaButtonModule,
57
61
  MatInputModule,
58
62
  MatIconModule,
59
63
  MatInputAutosizeDirective], exports: [MapaInputComponent] });
60
- MapaInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaInputModule, imports: [CommonModule,
64
+ MapaInputModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: MapaInputModule, providers: [
65
+ provideNgxMask(),
66
+ ], imports: [CommonModule,
61
67
  FormsModule,
62
68
  ReactiveFormsModule,
63
69
  MatFormFieldModule,
@@ -74,6 +80,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
74
80
  CommonModule,
75
81
  FormsModule,
76
82
  ReactiveFormsModule,
83
+ NgxMaskDirective,
84
+ NgxMaskPipe,
77
85
  MatFormFieldModule,
78
86
  MatButtonModule,
79
87
  MapaButtonModule,
@@ -81,6 +89,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
81
89
  MatIconModule,
82
90
  MatInputAutosizeDirective,
83
91
  ],
92
+ providers: [
93
+ provideNgxMask(),
94
+ ]
84
95
  }]
85
96
  }] });
86
97
 
@@ -1 +1 @@
1
- {"version":3,"file":"mapa-library-ui-src-lib-components-input.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/input/src/input.component.ts","../../../projects/mapa-library-ui/src/lib/components/input/src/input.component.html","../../../projects/mapa-library-ui/src/lib/components/input/src/input.module.ts","../../../projects/mapa-library-ui/src/lib/components/input/public-api.ts","../../../projects/mapa-library-ui/src/lib/components/input/mapa-library-ui-src-lib-components-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { InputText } from 'mapa-library-ui';\n\n@Component({\n selector: 'mapa-input',\n templateUrl: './input.component.html',\n styleUrls: ['./input-legacy.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class MapaInputComponent {\n @Input() formControl!: FormControl;\n @Input() element!: InputText;\n @Input() type!: string;\n @Output() suffix: EventEmitter<any> = new EventEmitter();\n \n hasValue(): boolean {\n return !!this.formControl.value;\n }\n\n clearValue(): void {\n this.formControl.setValue(null);\n }\n\n suffixEmit() {\n this.suffix.emit();\n }\n}\n","<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n />\n <mat-icon\n *ngIf=\"hasValue()\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n matSuffix\n >close</mat-icon\n >\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button color=\"basic\" (clicked)=\"element.actionButton.action.emit(true)\">\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatInputModule } from \"@angular/material/input\";\n\nimport { MapaInputComponent } from \"./input.component\";\nimport { MatInputAutosizeDirective } from \"mapa-library-ui\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MapaButtonModule } from \"mapa-library-ui/src/lib/components/button\";\n\n@NgModule({\n declarations: [MapaInputComponent],\n exports: [MapaInputComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatButtonModule,\n MapaButtonModule,\n MatInputModule,\n MatIconModule,\n MatInputAutosizeDirective,\n ],\n})\nexport class MapaInputModule {}\n","/*\n * Public API Surface of mapa-library-ui input\n */\n\nexport * from './src/input.component';\nexport * from './src/input.module';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;MAWa,kBAAkB,CAAA;AAN/B,IAAA,WAAA,GAAA;AAUY,QAAA,IAAA,CAAA,MAAM,GAAsB,IAAI,YAAY,EAAE,CAAC;AA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EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAXxB,YAAY;QACZ,WAAW;QACX,mBAAmB;QACnB,kBAAkB;QAClB,eAAe;QACf,gBAAgB;QAChB,cAAc;QACd,aAAa,CAAA,EAAA,CAAA,CAAA;4FAIJ,eAAe,EAAA,UAAA,EAAA,CAAA;kBAf3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAClC,OAAO,EAAE,CAAC,kBAAkB,CAAC;AAC7B,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,kBAAkB;wBAClB,eAAe;wBACf,gBAAgB;wBAChB,cAAc;wBACd,aAAa;wBACb,yBAAyB;AAC1B,qBAAA;AACF,iBAAA,CAAA;;;AC3BD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"mapa-library-ui-src-lib-components-input.mjs","sources":["../../../projects/mapa-library-ui/src/lib/components/input/src/input.component.ts","../../../projects/mapa-library-ui/src/lib/components/input/src/input.component.html","../../../projects/mapa-library-ui/src/lib/components/input/src/input.module.ts","../../../projects/mapa-library-ui/src/lib/components/input/public-api.ts","../../../projects/mapa-library-ui/src/lib/components/input/mapa-library-ui-src-lib-components-input.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { FormControl } from '@angular/forms';\n\nimport { InputText } from 'mapa-library-ui';\n\n@Component({\n selector: 'mapa-input',\n templateUrl: './input.component.html',\n styleUrls: ['./input-legacy.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class MapaInputComponent {\n @Input() formControl!: FormControl;\n @Input() element!: InputText;\n @Input() type!: string;\n @Output() suffix: EventEmitter<any> = new EventEmitter();\n \n hasValue(): boolean {\n return !!this.formControl.value;\n }\n\n clearValue(): void {\n this.formControl.setValue(null);\n }\n\n suffixEmit() {\n this.suffix.emit();\n }\n}\n","<label *ngIf=\"element.label\" class=\"mapa-input__label\">\n {{ element.label }}\n</label>\n<div class=\"mapa-form--inline\">\n <mat-form-field\n class=\"mapa-input\"\n appearance=\"outline\"\n subscriptSizing=\"dynamic\"\n >\n <mat-icon *ngIf=\"element.prefix\" class=\"mapa-input--prefix\" matPrefix>\n {{ element.prefix }}\n </mat-icon>\n <input\n *ngIf=\"element.autosize\"\n matInput\n matInputAutosize\n [matInputAutosizeMinWidth]=\"element.autosizeMinWidth!\"\n [matInputAutosizeMaxWidth]=\"element.autosizeMaxWidth!\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n />\n <input\n matInput\n *ngIf=\"!element.autosize\"\n [formControl]=\"formControl\"\n [placeholder]=\"element.placeholder || element.label\"\n [maxlength]=\"element.maxLength\"\n (keydown.enter)=\"suffixEmit()\"\n [type]=\"type\"\n [mask]=\"element.mask\"\n />\n <mat-icon\n *ngIf=\"hasValue()\"\n (click)=\"clearValue()\"\n class=\"mapa-input--close\"\n matSuffix\n >close</mat-icon\n >\n <mat-icon\n *ngIf=\"element.suffix\"\n class=\"mapa-input--suffix\"\n matSuffix\n (click)=\"suffix.emit()\"\n >\n {{ element.suffix }}\n </mat-icon>\n <mat-hint *ngIf=\"element.hint\">{{ element.hint }}</mat-hint>\n <mat-error *ngIf=\"formControl?.hasError('required')\">\n {{ element.errors?.required }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minlength')\">\n {{ element.errors?.minlength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cpf')\">\n {{ element.errors?.cpf }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('cnpj')\">\n {{ element.errors?.cnpj }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('email')\">\n {{ element.errors?.email }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('pattern')\">\n {{ element.errors?.pattern }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('min')\">\n {{ element.errors?.min }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('max')\">\n {{ element.errors?.max }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('minLength')\">\n {{ element.errors?.minLength }}\n </mat-error>\n <mat-error *ngIf=\"formControl?.hasError('maxLength')\">\n {{ element.errors?.maxLength }}\n </mat-error>\n </mat-form-field>\n\n <div *ngIf=\"element.actionButton\" class=\"mapa-form--action\">\n <mapa-button color=\"basic\" (clicked)=\"element.actionButton.action.emit(true)\">\n {{ element.actionButton.label }}\n </mapa-button>\n </div>\n</div>\n","import { NgModule } from \"@angular/core\";\nimport { CommonModule } from \"@angular/common\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatInputModule } from \"@angular/material/input\";\n\nimport { MapaInputComponent } from \"./input.component\";\nimport { MatInputAutosizeDirective } from \"mapa-library-ui\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MapaButtonModule } from \"mapa-library-ui/src/lib/components/button\";\nimport { NgxMaskDirective, NgxMaskPipe, provideNgxMask } from \"ngx-mask\";\n\n@NgModule({\n declarations: [MapaInputComponent],\n exports: [MapaInputComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n NgxMaskDirective,\n NgxMaskPipe,\n MatFormFieldModule,\n MatButtonModule,\n MapaButtonModule,\n MatInputModule,\n MatIconModule,\n MatInputAutosizeDirective,\n ],\n providers: [\n provideNgxMask(),\n ]\n})\nexport class MapaInputModule {}\n","/*\n * Public API Surface of mapa-library-ui input\n */\n\nexport * from './src/input.component';\nexport * from './src/input.module';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;MAWa,kBAAkB,CAAA;AAN/B,IAA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,EAAE;AACT,wBAAA,cAAc,EAAE;AACjB,qBAAA;AACF,iBAAA,CAAA;;;ACjCD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -28,6 +28,7 @@ class ElementBase {
28
28
  this.maxLength = options.maxLength || null;
29
29
  this.errors = options.errors || undefined;
30
30
  this.actionButton = options.actionButton || undefined;
31
+ this.mask = options.mask || undefined;
31
32
  }
32
33
  }
33
34
 
@@ -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 { ElementGroup } from \"../interfaces/element-group.interface\";\nimport { ElementOption } from \"../interfaces/element-option.interface\";\nimport { ActionButton } from \"./action-button\";\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 actionButton?: ActionButton;\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 actionButton?: ActionButton;\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 this.actionButton = options.actionButton || 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 */\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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 { ActionButton } from \"./action-button\";\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 actionButton?: ActionButton;\n mask?: string;\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 actionButton?: ActionButton;\n mask?: string;\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 this.actionButton = options.actionButton || undefined;\n this.mask = options.mask || 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":";;;;;;MAMa,WAAW,CAAA;AAyBtB,IAAA,WAAA,CACE,UAwBI,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,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a,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;;;;"}
@@ -26,6 +26,7 @@ export declare class ElementBase {
26
26
  maxLength: string | number | null;
27
27
  errors?: Errors;
28
28
  actionButton?: ActionButton;
29
+ mask?: string;
29
30
  constructor(options?: {
30
31
  value?: string;
31
32
  key?: string;
@@ -49,5 +50,6 @@ export declare class ElementBase {
49
50
  maxLength?: string | number | null;
50
51
  errors?: Errors;
51
52
  actionButton?: ActionButton;
53
+ mask?: string;
52
54
  });
53
55
  }
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mapa-library-ui",
3
- "version": "0.16.6",
3
+ "version": "0.17.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^15.2.0",
6
6
  "@angular/core": "^15.2.0"
@@ -26,6 +26,7 @@ export declare class ElementBase {
26
26
  maxLength: string | number | null;
27
27
  errors?: Errors;
28
28
  actionButton?: ActionButton;
29
+ mask?: string;
29
30
  constructor(options?: {
30
31
  value?: string;
31
32
  key?: string;
@@ -49,5 +50,6 @@ export declare class ElementBase {
49
50
  maxLength?: string | number | null;
50
51
  errors?: Errors;
51
52
  actionButton?: ActionButton;
53
+ mask?: string;
52
54
  });
53
55
  }
@@ -26,6 +26,7 @@ export declare class ElementBase {
26
26
  maxLength: string | number | null;
27
27
  errors?: Errors;
28
28
  actionButton?: ActionButton;
29
+ mask?: string;
29
30
  constructor(options?: {
30
31
  value?: string;
31
32
  key?: string;
@@ -49,5 +50,6 @@ export declare class ElementBase {
49
50
  maxLength?: string | number | null;
50
51
  errors?: Errors;
51
52
  actionButton?: ActionButton;
53
+ mask?: string;
52
54
  });
53
55
  }
@@ -26,6 +26,7 @@ export declare class ElementBase {
26
26
  maxLength: string | number | null;
27
27
  errors?: Errors;
28
28
  actionButton?: ActionButton;
29
+ mask?: string;
29
30
  constructor(options?: {
30
31
  value?: string;
31
32
  key?: string;
@@ -49,5 +50,6 @@ export declare class ElementBase {
49
50
  maxLength?: string | number | null;
50
51
  errors?: Errors;
51
52
  actionButton?: ActionButton;
53
+ mask?: string;
52
54
  });
53
55
  }
@@ -1,11 +1,14 @@
1
- import { FormControl, FormGroup } from '@angular/forms';
2
- import { ElementBase, ElementOption } from 'mapa-library-ui';
1
+ import { EventEmitter } from "@angular/core";
2
+ import { FormControl, FormGroup } from "@angular/forms";
3
+ import { ElementBase, ElementOption } from "mapa-library-ui";
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class MapaFormComponent {
5
6
  formGroup: FormGroup;
6
7
  elements: ElementBase[];
8
+ emitter: EventEmitter<any>;
7
9
  getFormControl(element: ElementBase): FormControl<any>;
8
10
  onOptionSelected(optionValue: ElementOption): void;
11
+ emitSuffix(element: ElementBase): void;
9
12
  static ɵfac: i0.ɵɵFactoryDeclaration<MapaFormComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<MapaFormComponent, "mapa-form", never, { "formGroup": "formGroup"; "elements": "elements"; }, {}, never, never, false, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<MapaFormComponent, "mapa-form", never, { "formGroup": "formGroup"; "elements": "elements"; }, { "emitter": "emitter"; }, never, never, false, never>;
11
14
  }
@@ -2,14 +2,15 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./input.component";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "@angular/forms";
5
- import * as i4 from "@angular/material/form-field";
6
- import * as i5 from "@angular/material/button";
7
- import * as i6 from "mapa-library-ui/src/lib/components/button";
8
- import * as i7 from "@angular/material/input";
9
- import * as i8 from "@angular/material/icon";
10
- import * as i9 from "mapa-library-ui";
5
+ import * as i4 from "ngx-mask";
6
+ import * as i5 from "@angular/material/form-field";
7
+ import * as i6 from "@angular/material/button";
8
+ import * as i7 from "mapa-library-ui/src/lib/components/button";
9
+ import * as i8 from "@angular/material/input";
10
+ import * as i9 from "@angular/material/icon";
11
+ import * as i10 from "mapa-library-ui";
11
12
  export declare class MapaInputModule {
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<MapaInputModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<MapaInputModule, [typeof i1.MapaInputComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.MatFormFieldModule, typeof i5.MatButtonModule, typeof i6.MapaButtonModule, typeof i7.MatInputModule, typeof i8.MatIconModule, typeof i9.MatInputAutosizeDirective], [typeof i1.MapaInputComponent]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MapaInputModule, [typeof i1.MapaInputComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.NgxMaskDirective, typeof i4.NgxMaskPipe, typeof i5.MatFormFieldModule, typeof i6.MatButtonModule, typeof i7.MapaButtonModule, typeof i8.MatInputModule, typeof i9.MatIconModule, typeof i10.MatInputAutosizeDirective], [typeof i1.MapaInputComponent]>;
14
15
  static ɵinj: i0.ɵɵInjectorDeclaration<MapaInputModule>;
15
16
  }
@@ -26,6 +26,7 @@ export declare class ElementBase {
26
26
  maxLength: string | number | null;
27
27
  errors?: Errors;
28
28
  actionButton?: ActionButton;
29
+ mask?: string;
29
30
  constructor(options?: {
30
31
  value?: string;
31
32
  key?: string;
@@ -49,5 +50,6 @@ export declare class ElementBase {
49
50
  maxLength?: string | number | null;
50
51
  errors?: Errors;
51
52
  actionButton?: ActionButton;
53
+ mask?: string;
52
54
  });
53
55
  }
@@ -2,14 +2,15 @@ import * as i0 from "@angular/core";
2
2
  import * as i1 from "./input.component";
3
3
  import * as i2 from "@angular/common";
4
4
  import * as i3 from "@angular/forms";
5
- import * as i4 from "@angular/material/form-field";
6
- import * as i5 from "@angular/material/button";
7
- import * as i6 from "mapa-library-ui/src/lib/components/button";
8
- import * as i7 from "@angular/material/input";
9
- import * as i8 from "@angular/material/icon";
10
- import * as i9 from "mapa-library-ui";
5
+ import * as i4 from "ngx-mask";
6
+ import * as i5 from "@angular/material/form-field";
7
+ import * as i6 from "@angular/material/button";
8
+ import * as i7 from "mapa-library-ui/src/lib/components/button";
9
+ import * as i8 from "@angular/material/input";
10
+ import * as i9 from "@angular/material/icon";
11
+ import * as i10 from "mapa-library-ui";
11
12
  export declare class MapaInputModule {
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<MapaInputModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<MapaInputModule, [typeof i1.MapaInputComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.MatFormFieldModule, typeof i5.MatButtonModule, typeof i6.MapaButtonModule, typeof i7.MatInputModule, typeof i8.MatIconModule, typeof i9.MatInputAutosizeDirective], [typeof i1.MapaInputComponent]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MapaInputModule, [typeof i1.MapaInputComponent], [typeof i2.CommonModule, typeof i3.FormsModule, typeof i3.ReactiveFormsModule, typeof i4.NgxMaskDirective, typeof i4.NgxMaskPipe, typeof i5.MatFormFieldModule, typeof i6.MatButtonModule, typeof i7.MapaButtonModule, typeof i8.MatInputModule, typeof i9.MatIconModule, typeof i10.MatInputAutosizeDirective], [typeof i1.MapaInputComponent]>;
14
15
  static ɵinj: i0.ɵɵInjectorDeclaration<MapaInputModule>;
15
16
  }
@@ -26,6 +26,7 @@ export declare class ElementBase {
26
26
  maxLength: string | number | null;
27
27
  errors?: Errors;
28
28
  actionButton?: ActionButton;
29
+ mask?: string;
29
30
  constructor(options?: {
30
31
  value?: string;
31
32
  key?: string;
@@ -49,5 +50,6 @@ export declare class ElementBase {
49
50
  maxLength?: string | number | null;
50
51
  errors?: Errors;
51
52
  actionButton?: ActionButton;
53
+ mask?: string;
52
54
  });
53
55
  }
@@ -26,6 +26,7 @@ export declare class ElementBase {
26
26
  maxLength: string | number | null;
27
27
  errors?: Errors;
28
28
  actionButton?: ActionButton;
29
+ mask?: string;
29
30
  constructor(options?: {
30
31
  value?: string;
31
32
  key?: string;
@@ -49,5 +50,6 @@ export declare class ElementBase {
49
50
  maxLength?: string | number | null;
50
51
  errors?: Errors;
51
52
  actionButton?: ActionButton;
53
+ mask?: string;
52
54
  });
53
55
  }
Binary file