ngx-vector-components 4.52.0 → 4.54.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/CHANGELOG.md +900 -888
- package/README.md +35 -35
- package/assets/icons/chevron_down_icon.svg +3 -3
- package/assets/icons/home_menu_icon.svg +3 -3
- package/assets/icons/logout_icon.svg +9 -9
- package/assets/icons/menu_footer_icon.svg +3 -3
- package/assets/icons/menu_hamburguer_icon.svg +3 -3
- package/assets/icons/terms_of_use_icon.svg +9 -9
- package/assets/icons/vector_admin_icon.svg +4 -4
- package/assets/icons/vector_fintech_icon.svg +3 -3
- package/assets/icons/vector_logtech_icon.svg +6 -6
- package/assets/icons/vector_marketplace_icon.svg +3 -3
- package/assets/images/bunge_logo.svg +23 -23
- package/assets/images/cofco_logo.svg +117 -117
- package/assets/images/emote_bad.svg +6 -6
- package/assets/images/emote_cool.svg +5 -5
- package/assets/images/emote_nice.svg +5 -5
- package/assets/images/success_sign.svg +4 -4
- package/assets/images/vector-logo-horizontal-inverse-color.svg +13 -13
- package/assets/images/vector_logo_horizontal.svg +13 -13
- package/assets/images/warn_sign.svg +4 -4
- package/assets/styles/_fonts.scss +114 -114
- package/assets/styles/_mixins.scss +7 -7
- package/assets/styles/_primeng-custom-theme.scss +978 -978
- package/assets/styles/_spinner.scss +35 -35
- package/assets/styles/_styles.scss +115 -115
- package/assets/styles/_variables.scss +27 -27
- package/esm2020/lib/components/badge/badge.component.mjs +39 -39
- package/esm2020/lib/components/badge/badge.module.mjs +19 -19
- package/esm2020/lib/components/badge/index.mjs +3 -3
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +65 -65
- package/esm2020/lib/components/breadcrumb/breadcrumb.module.mjs +18 -18
- package/esm2020/lib/components/breadcrumb/index.mjs +3 -3
- package/esm2020/lib/components/crud-base/crud-base.component.mjs +47 -47
- package/esm2020/lib/components/crud-base/index.mjs +2 -2
- package/esm2020/lib/components/crud-footer/crud-footer.component.mjs +31 -31
- package/esm2020/lib/components/crud-footer/crud-footer.module.mjs +19 -19
- package/esm2020/lib/components/crud-footer/index.mjs +3 -3
- package/esm2020/lib/components/crud-header/crud-header.component.mjs +30 -30
- package/esm2020/lib/components/crud-header/crud-header.module.mjs +19 -19
- package/esm2020/lib/components/crud-header/index.mjs +3 -3
- package/esm2020/lib/components/crud-history/crud-history.component.mjs +82 -82
- package/esm2020/lib/components/crud-history/crud-history.module.mjs +20 -20
- package/esm2020/lib/components/crud-history/index.mjs +3 -3
- package/esm2020/lib/components/fields/button/button.component.mjs +41 -41
- package/esm2020/lib/components/fields/button/index.mjs +2 -2
- package/esm2020/lib/components/fields/calendar-field/calendar-field.component.mjs +74 -74
- package/esm2020/lib/components/fields/calendar-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/checkbox-field/checkbox-field.component.mjs +46 -46
- package/esm2020/lib/components/fields/checkbox-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/currency-field/currency-field.component.mjs +87 -87
- package/esm2020/lib/components/fields/currency-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/data-table/data-table.component.mjs +365 -365
- package/esm2020/lib/components/fields/data-table/index.mjs +2 -2
- package/esm2020/lib/components/fields/dropdown-field/dropdown-field.component.mjs +196 -196
- package/esm2020/lib/components/fields/dropdown-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/field-error-message/field-error-message.component.mjs +30 -30
- package/esm2020/lib/components/fields/field-error-message/index.mjs +2 -2
- package/esm2020/lib/components/fields/fields.module.mjs +205 -205
- package/esm2020/lib/components/fields/filters/filters.component.mjs +195 -195
- package/esm2020/lib/components/fields/filters/index.mjs +2 -2
- package/esm2020/lib/components/fields/index.mjs +19 -19
- package/esm2020/lib/components/fields/input-number-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/input-number-field/input-number-field.component.mjs +82 -82
- package/esm2020/lib/components/fields/multiselect-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/multiselect-field/multiselect-field.component.mjs +47 -47
- package/esm2020/lib/components/fields/percentage-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/percentage-field/percentage-field.component.mjs +42 -42
- package/esm2020/lib/components/fields/radio-button-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/radio-button-field/radio-button-field.component.mjs +38 -38
- package/esm2020/lib/components/fields/range-value/index.mjs +2 -2
- package/esm2020/lib/components/fields/range-value/range-value.component.mjs +72 -72
- package/esm2020/lib/components/fields/search-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/search-field/search-field.component.mjs +33 -33
- package/esm2020/lib/components/fields/select-button-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/select-button-field/select-button-field.component.mjs +20 -20
- package/esm2020/lib/components/fields/text-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/text-field/text-field.component.mjs +209 -209
- package/esm2020/lib/components/fields/textarea-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/textarea-field/textarea-field.component.mjs +75 -75
- package/esm2020/lib/components/generic-error-modal/generic-error-modal.component.mjs +30 -30
- package/esm2020/lib/components/generic-error-modal/generic-error-modal.module.mjs +20 -20
- package/esm2020/lib/components/generic-error-modal/index.mjs +3 -3
- package/esm2020/lib/components/generic-modal/generic-modal.component.mjs +66 -66
- package/esm2020/lib/components/generic-modal/generic-modal.module.mjs +20 -20
- package/esm2020/lib/components/generic-modal/index.mjs +3 -3
- package/esm2020/lib/components/index.mjs +13 -13
- package/esm2020/lib/components/menu/index.mjs +4 -4
- package/esm2020/lib/components/menu/menu.component.mjs +302 -302
- package/esm2020/lib/components/menu/menu.module.mjs +20 -20
- package/esm2020/lib/components/menu/sub-menus-list/sub-menus-list.component.mjs +42 -42
- package/esm2020/lib/components/panel/index.mjs +3 -3
- package/esm2020/lib/components/panel/panel.component.mjs +15 -15
- package/esm2020/lib/components/panel/panel.module.mjs +19 -19
- package/esm2020/lib/components/top-bar/index.mjs +3 -3
- package/esm2020/lib/components/top-bar/top-bar.component.mjs +102 -102
- package/esm2020/lib/components/top-bar/top-bar.module.mjs +19 -19
- package/esm2020/lib/guards/crud-list-has-items.guard.mjs +22 -22
- package/esm2020/lib/guards/get-token-by-guid.guard.mjs +54 -54
- package/esm2020/lib/guards/has-permission.guard.mjs +27 -27
- package/esm2020/lib/guards/index.mjs +6 -6
- package/esm2020/lib/guards/role.guard.mjs +24 -24
- package/esm2020/lib/guards/token-is-present.guard.mjs +26 -26
- package/esm2020/lib/interceptors/http-interceptor.mjs +183 -183
- package/esm2020/lib/interceptors/index.mjs +2 -2
- package/esm2020/lib/models/app-name.enum.mjs +9 -9
- package/esm2020/lib/models/boolean-type.enum.mjs +6 -6
- package/esm2020/lib/models/crud-history.model.mjs +3 -3
- package/esm2020/lib/models/crud-mode.enum.mjs +7 -7
- package/esm2020/lib/models/data-table.model.mjs +22 -22
- package/esm2020/lib/models/document-type.enum.mjs +6 -6
- package/esm2020/lib/models/filters.model.mjs +2 -2
- package/esm2020/lib/models/generic-modal.model.mjs +2 -2
- package/esm2020/lib/models/http-response.model.mjs +2 -2
- package/esm2020/lib/models/index.mjs +16 -16
- package/esm2020/lib/models/ip-info.enum.mjs +2 -2
- package/esm2020/lib/models/list-item.model.mjs +2 -2
- package/esm2020/lib/models/menu-item.model.mjs +2 -2
- package/esm2020/lib/models/message-status.enum.mjs +8 -8
- package/esm2020/lib/models/profile.model.mjs +217 -212
- package/esm2020/lib/models/role.enum.mjs +5 -5
- package/esm2020/lib/models/status.enum.mjs +8 -8
- package/esm2020/lib/models/view.enum.mjs +7 -7
- package/esm2020/lib/pipes/currency-brl.pipe.mjs +18 -18
- package/esm2020/lib/pipes/format-document.pipe.mjs +17 -17
- package/esm2020/lib/pipes/index.mjs +8 -8
- package/esm2020/lib/pipes/mask.pipe.mjs +21 -21
- package/esm2020/lib/pipes/not-hidden.pipe.mjs +16 -16
- package/esm2020/lib/pipes/only-active.pipe.mjs +16 -16
- package/esm2020/lib/pipes/pipes.module.mjs +21 -21
- package/esm2020/lib/pipes/remove-last-child.pipe.mjs +18 -18
- package/esm2020/lib/resolvers/get-selected-crud-item.resolver.mjs +28 -28
- package/esm2020/lib/resolvers/index.mjs +2 -2
- package/esm2020/lib/services/auth.service.mjs +77 -77
- package/esm2020/lib/services/base-dropdown.mjs +2 -2
- package/esm2020/lib/services/crud-base.service.mjs +14 -14
- package/esm2020/lib/services/enum.service.mjs +43 -43
- package/esm2020/lib/services/error-message.service.mjs +16 -16
- package/esm2020/lib/services/geolocation.service.mjs +23 -23
- package/esm2020/lib/services/index.mjs +12 -12
- package/esm2020/lib/services/loading.service.mjs +15 -15
- package/esm2020/lib/services/menu.service.mjs +147 -147
- package/esm2020/lib/services/modal.service.mjs +15 -15
- package/esm2020/lib/services/profile.service.mjs +100 -100
- package/esm2020/lib/services/storage.service.mjs +108 -108
- package/esm2020/lib/shared/shared.module.mjs +17 -17
- package/esm2020/lib/utils/cpf-cnpj-validator.util.mjs +116 -116
- package/esm2020/lib/utils/file.util.mjs +15 -15
- package/esm2020/lib/utils/index.mjs +8 -8
- package/esm2020/lib/utils/mask.util.mjs +66 -66
- package/esm2020/lib/utils/object.util.mjs +27 -27
- package/esm2020/lib/utils/string.util.mjs +16 -16
- package/esm2020/lib/utils/validation.util.mjs +234 -234
- package/esm2020/lib/utils/window.util.mjs +9 -9
- package/esm2020/ngx-vector-components.mjs +4 -4
- package/esm2020/public-api.mjs +9 -9
- package/fesm2015/ngx-vector-components.mjs +4217 -4212
- package/fesm2015/ngx-vector-components.mjs.map +1 -1
- package/fesm2020/ngx-vector-components.mjs +4194 -4189
- package/fesm2020/ngx-vector-components.mjs.map +1 -1
- package/lib/components/badge/badge.component.d.ts +15 -15
- package/lib/components/badge/badge.module.d.ts +9 -9
- package/lib/components/badge/index.d.ts +2 -2
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +19 -19
- package/lib/components/breadcrumb/breadcrumb.module.d.ts +8 -8
- package/lib/components/breadcrumb/index.d.ts +2 -2
- package/lib/components/crud-base/crud-base.component.d.ts +20 -20
- package/lib/components/crud-base/index.d.ts +1 -1
- package/lib/components/crud-footer/crud-footer.component.d.ts +13 -13
- package/lib/components/crud-footer/crud-footer.module.d.ts +9 -9
- package/lib/components/crud-footer/index.d.ts +2 -2
- package/lib/components/crud-header/crud-header.component.d.ts +11 -11
- package/lib/components/crud-header/crud-header.module.d.ts +9 -9
- package/lib/components/crud-header/index.d.ts +2 -2
- package/lib/components/crud-history/crud-history.component.d.ts +12 -12
- package/lib/components/crud-history/crud-history.module.d.ts +10 -10
- package/lib/components/crud-history/index.d.ts +2 -2
- package/lib/components/fields/button/button.component.d.ts +17 -17
- package/lib/components/fields/button/index.d.ts +1 -1
- package/lib/components/fields/calendar-field/calendar-field.component.d.ts +23 -23
- package/lib/components/fields/calendar-field/index.d.ts +1 -1
- package/lib/components/fields/checkbox-field/checkbox-field.component.d.ts +19 -19
- package/lib/components/fields/checkbox-field/index.d.ts +1 -1
- package/lib/components/fields/currency-field/currency-field.component.d.ts +27 -27
- package/lib/components/fields/currency-field/index.d.ts +1 -1
- package/lib/components/fields/data-table/data-table.component.d.ts +78 -78
- package/lib/components/fields/data-table/index.d.ts +1 -1
- package/lib/components/fields/dropdown-field/dropdown-field.component.d.ts +50 -50
- package/lib/components/fields/dropdown-field/index.d.ts +1 -1
- package/lib/components/fields/field-error-message/field-error-message.component.d.ts +10 -10
- package/lib/components/fields/field-error-message/index.d.ts +1 -1
- package/lib/components/fields/fields.module.d.ts +46 -46
- package/lib/components/fields/filters/filters.component.d.ts +61 -61
- package/lib/components/fields/filters/index.d.ts +1 -1
- package/lib/components/fields/index.d.ts +18 -18
- package/lib/components/fields/input-number-field/index.d.ts +1 -1
- package/lib/components/fields/input-number-field/input-number-field.component.d.ts +27 -27
- package/lib/components/fields/multiselect-field/index.d.ts +1 -1
- package/lib/components/fields/multiselect-field/multiselect-field.component.d.ts +15 -15
- package/lib/components/fields/percentage-field/index.d.ts +1 -1
- package/lib/components/fields/percentage-field/percentage-field.component.d.ts +16 -16
- package/lib/components/fields/radio-button-field/index.d.ts +1 -1
- package/lib/components/fields/radio-button-field/radio-button-field.component.d.ts +21 -21
- package/lib/components/fields/range-value/index.d.ts +1 -1
- package/lib/components/fields/range-value/range-value.component.d.ts +18 -18
- package/lib/components/fields/search-field/index.d.ts +1 -1
- package/lib/components/fields/search-field/search-field.component.d.ts +14 -14
- package/lib/components/fields/select-button-field/index.d.ts +1 -1
- package/lib/components/fields/select-button-field/select-button-field.component.d.ts +9 -9
- package/lib/components/fields/text-field/index.d.ts +1 -1
- package/lib/components/fields/text-field/text-field.component.d.ts +48 -48
- package/lib/components/fields/textarea-field/index.d.ts +1 -1
- package/lib/components/fields/textarea-field/textarea-field.component.d.ts +20 -20
- package/lib/components/generic-error-modal/generic-error-modal.component.d.ts +14 -14
- package/lib/components/generic-error-modal/generic-error-modal.module.d.ts +10 -10
- package/lib/components/generic-error-modal/index.d.ts +2 -2
- package/lib/components/generic-modal/generic-modal.component.d.ts +24 -24
- package/lib/components/generic-modal/generic-modal.module.d.ts +10 -10
- package/lib/components/generic-modal/index.d.ts +2 -2
- package/lib/components/index.d.ts +12 -12
- package/lib/components/menu/index.d.ts +3 -3
- package/lib/components/menu/menu.component.d.ts +54 -54
- package/lib/components/menu/menu.module.d.ts +10 -10
- package/lib/components/menu/sub-menus-list/sub-menus-list.component.d.ts +14 -14
- package/lib/components/panel/index.d.ts +2 -2
- package/lib/components/panel/panel.component.d.ts +8 -8
- package/lib/components/panel/panel.module.d.ts +9 -9
- package/lib/components/top-bar/index.d.ts +2 -2
- package/lib/components/top-bar/top-bar.component.d.ts +38 -38
- package/lib/components/top-bar/top-bar.module.d.ts +9 -9
- package/lib/guards/crud-list-has-items.guard.d.ts +10 -10
- package/lib/guards/get-token-by-guid.guard.d.ts +15 -15
- package/lib/guards/has-permission.guard.d.ts +13 -13
- package/lib/guards/index.d.ts +5 -5
- package/lib/guards/role.guard.d.ts +11 -11
- package/lib/guards/token-is-present.guard.d.ts +11 -11
- package/lib/interceptors/http-interceptor.d.ts +31 -31
- package/lib/interceptors/index.d.ts +1 -1
- package/lib/models/app-name.enum.d.ts +7 -7
- package/lib/models/boolean-type.enum.d.ts +4 -4
- package/lib/models/crud-history.model.d.ts +13 -13
- package/lib/models/crud-mode.enum.d.ts +5 -5
- package/lib/models/data-table.model.d.ts +62 -62
- package/lib/models/document-type.enum.d.ts +4 -4
- package/lib/models/filters.model.d.ts +4 -4
- package/lib/models/generic-modal.model.d.ts +13 -13
- package/lib/models/http-response.model.d.ts +40 -40
- package/lib/models/index.d.ts +15 -15
- package/lib/models/ip-info.enum.d.ts +6 -6
- package/lib/models/list-item.model.d.ts +6 -6
- package/lib/models/menu-item.model.d.ts +16 -16
- package/lib/models/message-status.enum.d.ts +6 -6
- package/lib/models/profile.model.d.ts +238 -233
- package/lib/models/role.enum.d.ts +3 -3
- package/lib/models/status.enum.d.ts +6 -6
- package/lib/models/view.enum.d.ts +5 -5
- package/lib/pipes/currency-brl.pipe.d.ts +7 -7
- package/lib/pipes/format-document.pipe.d.ts +7 -7
- package/lib/pipes/index.d.ts +7 -7
- package/lib/pipes/mask.pipe.d.ts +7 -7
- package/lib/pipes/not-hidden.pipe.d.ts +7 -7
- package/lib/pipes/only-active.pipe.d.ts +7 -7
- package/lib/pipes/pipes.module.d.ts +12 -12
- package/lib/pipes/remove-last-child.pipe.d.ts +7 -7
- package/lib/resolvers/get-selected-crud-item.resolver.d.ts +10 -10
- package/lib/resolvers/index.d.ts +1 -1
- package/lib/services/auth.service.d.ts +24 -24
- package/lib/services/base-dropdown.d.ts +7 -7
- package/lib/services/crud-base.service.d.ts +7 -7
- package/lib/services/enum.service.d.ts +13 -13
- package/lib/services/error-message.service.d.ts +8 -8
- package/lib/services/geolocation.service.d.ts +13 -13
- package/lib/services/index.d.ts +11 -11
- package/lib/services/loading.service.d.ts +7 -7
- package/lib/services/menu.service.d.ts +37 -37
- package/lib/services/modal.service.d.ts +7 -7
- package/lib/services/profile.service.d.ts +26 -26
- package/lib/services/storage.service.d.ts +43 -43
- package/lib/shared/shared.module.d.ts +9 -9
- package/lib/utils/cpf-cnpj-validator.util.d.ts +5 -5
- package/lib/utils/file.util.d.ts +4 -4
- package/lib/utils/index.d.ts +7 -7
- package/lib/utils/mask.util.d.ts +17 -17
- package/lib/utils/object.util.d.ts +5 -5
- package/lib/utils/string.util.d.ts +4 -4
- package/lib/utils/validation.util.d.ts +17 -17
- package/lib/utils/window.util.d.ts +4 -4
- package/ngx-vector-components.d.ts +5 -5
- package/package.json +1 -1
- package/public-api.d.ts +8 -8
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { DateTime } from 'luxon';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "../../../services";
|
|
5
|
-
import * as i2 from "primeng/calendar";
|
|
6
|
-
import * as i3 from "../field-error-message/field-error-message.component";
|
|
7
|
-
import * as i4 from "@angular/forms";
|
|
8
|
-
import * as i5 from "@angular/common";
|
|
9
|
-
export class CalendarComponent {
|
|
10
|
-
constructor(modalService) {
|
|
11
|
-
this.modalService = modalService;
|
|
12
|
-
this.isRequired = false;
|
|
13
|
-
this.label = '';
|
|
14
|
-
this.showCalendarOnFocus = true;
|
|
15
|
-
this.min = DateTime.fromFormat('01/01/1900', 'dd/MM/yyyy').toJSDate();
|
|
16
|
-
this.max = DateTime.now().startOf('day').plus({ years: 1 }).toJSDate();
|
|
17
|
-
this.disabledDates = [];
|
|
18
|
-
this.disabled = false;
|
|
19
|
-
this.defaultDate = DateTime.now().toJSDate();
|
|
20
|
-
this.hiddenErrorMessage = false;
|
|
21
|
-
this.keyFilter = '';
|
|
22
|
-
}
|
|
23
|
-
get placeholder() {
|
|
24
|
-
if (!this.label) {
|
|
25
|
-
return '';
|
|
26
|
-
}
|
|
27
|
-
return `${this.label}${this.isRequired ? '*' : ''}`;
|
|
28
|
-
}
|
|
29
|
-
fieldErrorLabel() {
|
|
30
|
-
if (this.control && this.control.invalid && this.control.touched) {
|
|
31
|
-
if (this.control.hasError('required')) {
|
|
32
|
-
return 'Campo obrigatório';
|
|
33
|
-
}
|
|
34
|
-
if (this.control.hasError('maxlength')) {
|
|
35
|
-
return `Tamanho máximo permitido: ${this.control.errors['maxlength'].requiredLength}`;
|
|
36
|
-
}
|
|
37
|
-
return 'Campo inválido';
|
|
38
|
-
}
|
|
39
|
-
return '';
|
|
40
|
-
}
|
|
41
|
-
onShowCalendar() {
|
|
42
|
-
this.modalService.showModalBackground$.next(true);
|
|
43
|
-
}
|
|
44
|
-
onHideCalendar() {
|
|
45
|
-
this.modalService.showModalBackground$.next(false);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarComponent, deps: [{ token: i1.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
-
CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CalendarComponent, selector: "vector-calendar-field", inputs: { isRequired: "isRequired", control: "control", label: "label", showCalendarOnFocus: "showCalendarOnFocus", min: "min", max: "max", disabledDates: "disabledDates", disabled: "disabled", defaultDate: "defaultDate", hiddenErrorMessage: "hiddenErrorMessage" }, ngImport: i0, template: "<div class=\"relative\">\
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
51
|
-
type: Component,
|
|
52
|
-
args: [{ selector: 'vector-calendar-field', template: "<div class=\"relative\">\
|
|
53
|
-
}], ctorParameters: function () { return [{ type: i1.ModalService }]; }, propDecorators: { isRequired: [{
|
|
54
|
-
type: Input
|
|
55
|
-
}], control: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], label: [{
|
|
58
|
-
type: Input
|
|
59
|
-
}], showCalendarOnFocus: [{
|
|
60
|
-
type: Input
|
|
61
|
-
}], min: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], max: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], disabledDates: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], disabled: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], defaultDate: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], hiddenErrorMessage: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}] } });
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { DateTime } from 'luxon';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../../services";
|
|
5
|
+
import * as i2 from "primeng/calendar";
|
|
6
|
+
import * as i3 from "../field-error-message/field-error-message.component";
|
|
7
|
+
import * as i4 from "@angular/forms";
|
|
8
|
+
import * as i5 from "@angular/common";
|
|
9
|
+
export class CalendarComponent {
|
|
10
|
+
constructor(modalService) {
|
|
11
|
+
this.modalService = modalService;
|
|
12
|
+
this.isRequired = false;
|
|
13
|
+
this.label = '';
|
|
14
|
+
this.showCalendarOnFocus = true;
|
|
15
|
+
this.min = DateTime.fromFormat('01/01/1900', 'dd/MM/yyyy').toJSDate();
|
|
16
|
+
this.max = DateTime.now().startOf('day').plus({ years: 1 }).toJSDate();
|
|
17
|
+
this.disabledDates = [];
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
this.defaultDate = DateTime.now().toJSDate();
|
|
20
|
+
this.hiddenErrorMessage = false;
|
|
21
|
+
this.keyFilter = '';
|
|
22
|
+
}
|
|
23
|
+
get placeholder() {
|
|
24
|
+
if (!this.label) {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
return `${this.label}${this.isRequired ? '*' : ''}`;
|
|
28
|
+
}
|
|
29
|
+
fieldErrorLabel() {
|
|
30
|
+
if (this.control && this.control.invalid && this.control.touched) {
|
|
31
|
+
if (this.control.hasError('required')) {
|
|
32
|
+
return 'Campo obrigatório';
|
|
33
|
+
}
|
|
34
|
+
if (this.control.hasError('maxlength')) {
|
|
35
|
+
return `Tamanho máximo permitido: ${this.control.errors['maxlength'].requiredLength}`;
|
|
36
|
+
}
|
|
37
|
+
return 'Campo inválido';
|
|
38
|
+
}
|
|
39
|
+
return '';
|
|
40
|
+
}
|
|
41
|
+
onShowCalendar() {
|
|
42
|
+
this.modalService.showModalBackground$.next(true);
|
|
43
|
+
}
|
|
44
|
+
onHideCalendar() {
|
|
45
|
+
this.modalService.showModalBackground$.next(false);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarComponent, deps: [{ token: i1.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CalendarComponent, selector: "vector-calendar-field", inputs: { isRequired: "isRequired", control: "control", label: "label", showCalendarOnFocus: "showCalendarOnFocus", min: "min", max: "max", disabledDates: "disabledDates", disabled: "disabled", defaultDate: "defaultDate", hiddenErrorMessage: "hiddenErrorMessage" }, ngImport: i0, template: "<div class=\"relative\">\n <div class=\"input-container\">\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"control\"\n [showOnFocus]=\"showCalendarOnFocus\"\n [minDate]=\"min\"\n [maxDate]=\"max\"\n icon=\"fas fa-calendar-day\"\n [showIcon]=\"true\"\n [disabledDates]=\"disabledDates\"\n [readonlyInput]=\"false\"\n (onShow)=\"onShowCalendar()\"\n (onClose)=\"onHideCalendar()\"\n [disabled]=\"disabled\"\n [defaultDate]=\"defaultDate\"\n ></p-calendar>\n </div>\n <vector-field-error-message *ngIf=\"!hiddenErrorMessage\" [control]=\"control\"></vector-field-error-message>\n</div>\n", styles: [".input-container input{transition:border-width ease-in-out .08s;border:1px solid rgba(0,0,0,.6);width:100%;padding:6px 30px 6px 12px;font-size:14px;line-height:1.5em;border-radius:var(--border-radius);height:40px}.input-container input:disabled{cursor:not-allowed;background-color:var(--disabled-background);opacity:1}.input-container input:focus{outline:0;box-shadow:none;border-width:2px}.input-container input::placeholder{color:var(--placeholder-color);font-size:12px}.input-container input.ng-touched.ng-invalid{border-color:var(--error-color)!important}.input-container .input-error{font-size:.7em;color:var(--error-color)}\n"], components: [{ type: i2.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i3.FieldErrorMessageComponent, selector: "vector-field-error-message", inputs: ["control"] }], directives: [{ type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
51
|
+
type: Component,
|
|
52
|
+
args: [{ selector: 'vector-calendar-field', template: "<div class=\"relative\">\n <div class=\"input-container\">\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"control\"\n [showOnFocus]=\"showCalendarOnFocus\"\n [minDate]=\"min\"\n [maxDate]=\"max\"\n icon=\"fas fa-calendar-day\"\n [showIcon]=\"true\"\n [disabledDates]=\"disabledDates\"\n [readonlyInput]=\"false\"\n (onShow)=\"onShowCalendar()\"\n (onClose)=\"onHideCalendar()\"\n [disabled]=\"disabled\"\n [defaultDate]=\"defaultDate\"\n ></p-calendar>\n </div>\n <vector-field-error-message *ngIf=\"!hiddenErrorMessage\" [control]=\"control\"></vector-field-error-message>\n</div>\n", styles: [".input-container input{transition:border-width ease-in-out .08s;border:1px solid rgba(0,0,0,.6);width:100%;padding:6px 30px 6px 12px;font-size:14px;line-height:1.5em;border-radius:var(--border-radius);height:40px}.input-container input:disabled{cursor:not-allowed;background-color:var(--disabled-background);opacity:1}.input-container input:focus{outline:0;box-shadow:none;border-width:2px}.input-container input::placeholder{color:var(--placeholder-color);font-size:12px}.input-container input.ng-touched.ng-invalid{border-color:var(--error-color)!important}.input-container .input-error{font-size:.7em;color:var(--error-color)}\n"] }]
|
|
53
|
+
}], ctorParameters: function () { return [{ type: i1.ModalService }]; }, propDecorators: { isRequired: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], control: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], label: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], showCalendarOnFocus: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], min: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], max: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], disabledDates: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], disabled: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], defaultDate: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}], hiddenErrorMessage: [{
|
|
72
|
+
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gIFttaW5EYXRlXT1cIm1pblwiXG4gICAgICBbbWF4RGF0ZV09XCJtYXhcIlxuICAgICAgaWNvbj1cImZhcyBmYS1jYWxlbmRhci1kYXlcIlxuICAgICAgW3Nob3dJY29uXT1cInRydWVcIlxuICAgICAgW2Rpc2FibGVkRGF0ZXNdPVwiZGlzYWJsZWREYXRlc1wiXG4gICAgICBbcmVhZG9ubHlJbnB1dF09XCJmYWxzZVwiXG4gICAgICAob25TaG93KT1cIm9uU2hvd0NhbGVuZGFyKClcIlxuICAgICAgKG9uQ2xvc2UpPVwib25IaWRlQ2FsZW5kYXIoKVwiXG4gICAgICBbZGlzYWJsZWRdPVwiZGlzYWJsZWRcIlxuICAgICAgW2RlZmF1bHREYXRlXT1cImRlZmF1bHREYXRlXCJcbiAgICA+PC9wLWNhbGVuZGFyPlxuICA8L2Rpdj5cbiAgPHZlY3Rvci1maWVsZC1lcnJvci1tZXNzYWdlICpuZ0lmPVwiIWhpZGRlbkVycm9yTWVzc2FnZVwiIFtjb250cm9sXT1cImNvbnRyb2xcIj48L3ZlY3Rvci1maWVsZC1lcnJvci1tZXNzYWdlPlxuPC9kaXY+XG4iXX0=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './calendar-field.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './calendar-field.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9jYWxlbmRhci1maWVsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDRCQUE0QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jYWxlbmRhci1maWVsZC5jb21wb25lbnQnO1xuIl19
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "primeng/checkbox";
|
|
4
|
-
import * as i2 from "@angular/common";
|
|
5
|
-
import * as i3 from "@angular/forms";
|
|
6
|
-
export class CheckboxFieldComponent {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.isRequired = false;
|
|
9
|
-
this.label = '';
|
|
10
|
-
this.rounded = false;
|
|
11
|
-
this.labelSize = 'default';
|
|
12
|
-
this.value = false;
|
|
13
|
-
this.groupName = '';
|
|
14
|
-
this.options = null;
|
|
15
|
-
this.disabled = false;
|
|
16
|
-
this.valueChange = new EventEmitter();
|
|
17
|
-
}
|
|
18
|
-
ngOnInit() { }
|
|
19
|
-
}
|
|
20
|
-
CheckboxFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
-
CheckboxFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CheckboxFieldComponent, selector: "vector-checkbox-field", inputs: { isRequired: "isRequired", control: "control", label: "label", rounded: "rounded", labelSize: "labelSize", value: "value", groupName: "groupName", options: "options", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"checkbox-container flex-wrap\">\
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxFieldComponent, decorators: [{
|
|
23
|
-
type: Component,
|
|
24
|
-
args: [{ selector: 'vector-checkbox-field', template: "<div class=\"checkbox-container flex-wrap\">\
|
|
25
|
-
}], ctorParameters: function () { return []; }, propDecorators: { isRequired: [{
|
|
26
|
-
type: Input
|
|
27
|
-
}], control: [{
|
|
28
|
-
type: Input
|
|
29
|
-
}], label: [{
|
|
30
|
-
type: Input
|
|
31
|
-
}], rounded: [{
|
|
32
|
-
type: Input
|
|
33
|
-
}], labelSize: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], value: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], groupName: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}], options: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}], disabled: [{
|
|
42
|
-
type: Input
|
|
43
|
-
}], valueChange: [{
|
|
44
|
-
type: Output
|
|
45
|
-
}] } });
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "primeng/checkbox";
|
|
4
|
+
import * as i2 from "@angular/common";
|
|
5
|
+
import * as i3 from "@angular/forms";
|
|
6
|
+
export class CheckboxFieldComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.isRequired = false;
|
|
9
|
+
this.label = '';
|
|
10
|
+
this.rounded = false;
|
|
11
|
+
this.labelSize = 'default';
|
|
12
|
+
this.value = false;
|
|
13
|
+
this.groupName = '';
|
|
14
|
+
this.options = null;
|
|
15
|
+
this.disabled = false;
|
|
16
|
+
this.valueChange = new EventEmitter();
|
|
17
|
+
}
|
|
18
|
+
ngOnInit() { }
|
|
19
|
+
}
|
|
20
|
+
CheckboxFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
CheckboxFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CheckboxFieldComponent, selector: "vector-checkbox-field", inputs: { isRequired: "isRequired", control: "control", label: "label", rounded: "rounded", labelSize: "labelSize", value: "value", groupName: "groupName", options: "options", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"checkbox-container flex-wrap\">\n <ng-container *ngIf=\"control && groupName; else elseBlock\">\n <div class=\"checkbox-item mb-3 mr-3\" *ngFor=\"let option of options\">\n <p-checkbox\n [name]=\"groupName\"\n [formControl]=\"control\"\n [value]=\"option\"\n checkboxIcon=\"fas fa-check\"\n [class.rounded-checkbox]=\"rounded\"\n [inputId]=\"option.code\"\n ></p-checkbox>\n <label [for]=\"option.code\"> {{ option.name }}</label>\n </div>\n </ng-container>\n\n <ng-template #elseBlock>\n <p-checkbox\n *ngIf=\"control && !groupName\"\n [formControl]=\"control\"\n checkboxIcon=\"fas fa-check\"\n [binary]=\"true\"\n [class.rounded-checkbox]=\"rounded\"\n ></p-checkbox>\n <p-checkbox\n *ngIf=\"!control && !groupName\"\n [ngModel]=\"value\"\n (ngModelChange)=\"value = $event; valueChange.emit($event)\"\n checkboxIcon=\"fas fa-check\"\n [binary]=\"true\"\n [class.rounded-checkbox]=\"rounded\"\n [disabled]=\"disabled\"\n ></p-checkbox>\n <label *ngIf=\"label\" [class.large-label]=\"labelSize === 'large'\" (click)=\"control.setValue(!control.value)\"\n >{{ label }}\n <span class=\"red-label\" *ngIf=\"isRequired\"> (*)</span>\n </label>\n </ng-template>\n</div>\n", styles: [".checkbox-container{display:flex;align-items:center}.checkbox-container label{margin-left:10px}.checkbox-container .large-label{font-size:1em}.checkbox-container .checkbox-item{min-width:80px}\n"], components: [{ type: i1.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxFieldComponent, decorators: [{
|
|
23
|
+
type: Component,
|
|
24
|
+
args: [{ selector: 'vector-checkbox-field', template: "<div class=\"checkbox-container flex-wrap\">\n <ng-container *ngIf=\"control && groupName; else elseBlock\">\n <div class=\"checkbox-item mb-3 mr-3\" *ngFor=\"let option of options\">\n <p-checkbox\n [name]=\"groupName\"\n [formControl]=\"control\"\n [value]=\"option\"\n checkboxIcon=\"fas fa-check\"\n [class.rounded-checkbox]=\"rounded\"\n [inputId]=\"option.code\"\n ></p-checkbox>\n <label [for]=\"option.code\"> {{ option.name }}</label>\n </div>\n </ng-container>\n\n <ng-template #elseBlock>\n <p-checkbox\n *ngIf=\"control && !groupName\"\n [formControl]=\"control\"\n checkboxIcon=\"fas fa-check\"\n [binary]=\"true\"\n [class.rounded-checkbox]=\"rounded\"\n ></p-checkbox>\n <p-checkbox\n *ngIf=\"!control && !groupName\"\n [ngModel]=\"value\"\n (ngModelChange)=\"value = $event; valueChange.emit($event)\"\n checkboxIcon=\"fas fa-check\"\n [binary]=\"true\"\n [class.rounded-checkbox]=\"rounded\"\n [disabled]=\"disabled\"\n ></p-checkbox>\n <label *ngIf=\"label\" [class.large-label]=\"labelSize === 'large'\" (click)=\"control.setValue(!control.value)\"\n >{{ label }}\n <span class=\"red-label\" *ngIf=\"isRequired\"> (*)</span>\n </label>\n </ng-template>\n</div>\n", styles: [".checkbox-container{display:flex;align-items:center}.checkbox-container label{margin-left:10px}.checkbox-container .large-label{font-size:1em}.checkbox-container .checkbox-item{min-width:80px}\n"] }]
|
|
25
|
+
}], ctorParameters: function () { return []; }, propDecorators: { isRequired: [{
|
|
26
|
+
type: Input
|
|
27
|
+
}], control: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], label: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], rounded: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], labelSize: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], value: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], groupName: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], options: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], disabled: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], valueChange: [{
|
|
44
|
+
type: Output
|
|
45
|
+
}] } });
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3gtZmllbGQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvY2hlY2tib3gtZmllbGQvY2hlY2tib3gtZmllbGQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvY2hlY2tib3gtZmllbGQvY2hlY2tib3gtZmllbGQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQzs7Ozs7QUFRL0UsTUFBTSxPQUFPLHNCQUFzQjtJQXFCakM7UUFuQk8sZUF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gZmEtY2hlY2tcIlxuICAgICAgW2JpbmFyeV09XCJ0cnVlXCJcbiAgICAgIFtjbGFzcy5yb3VuZGVkLWNoZWNrYm94XT1cInJvdW5kZWRcIlxuICAgICAgW2Rpc2FibGVkXT1cImRpc2FibGVkXCJcbiAgICA+PC9wLWNoZWNrYm94PlxuICAgIDxsYWJlbCAqbmdJZj1cImxhYmVsXCIgW2NsYXNzLmxhcmdlLWxhYmVsXT1cImxhYmVsU2l6ZSA9PT0gJ2xhcmdlJ1wiIChjbGljayk9XCJjb250cm9sLnNldFZhbHVlKCFjb250cm9sLnZhbHVlKVwiXG4gICAgICA+e3sgbGFiZWwgfX1cbiAgICAgIDxzcGFuIGNsYXNzPVwicmVkLWxhYmVsXCIgKm5nSWY9XCJpc1JlcXVpcmVkXCI+ICgqKTwvc3Bhbj5cbiAgICA8L2xhYmVsPlxuICA8L25nLXRlbXBsYXRlPlxuPC9kaXY+XG4iXX0=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './checkbox-field.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './checkbox-field.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9jaGVja2JveC1maWVsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDRCQUE0QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jaGVja2JveC1maWVsZC5jb21wb25lbnQnO1xuIl19
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { Component, Input, ViewChild } from '@angular/core';
|
|
2
|
-
import { InputNumber } from 'primeng/inputnumber';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "primeng/inputnumber";
|
|
5
|
-
import * as i2 from "@angular/common";
|
|
6
|
-
import * as i3 from "@angular/forms";
|
|
7
|
-
export class CurrencyFieldComponent {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.minValue = 0;
|
|
10
|
-
this.maxValue = 999999999;
|
|
11
|
-
this.placeholder = '';
|
|
12
|
-
this.numberOfDecimals = 2;
|
|
13
|
-
this.outlined = false;
|
|
14
|
-
this.rounded = false;
|
|
15
|
-
this.isBankingField = false;
|
|
16
|
-
this.inputClassName = '';
|
|
17
|
-
this.disabled = false;
|
|
18
|
-
}
|
|
19
|
-
ngAfterViewInit() {
|
|
20
|
-
const inputElement = this.inputElement?.el.nativeElement.querySelector('input');
|
|
21
|
-
inputElement.addEventListener('select', () => {
|
|
22
|
-
inputElement.selectionStart = inputElement.selectionEnd;
|
|
23
|
-
}, false);
|
|
24
|
-
}
|
|
25
|
-
getInputNgClass() {
|
|
26
|
-
return { outlined: this.outlined, rounded: this.rounded, [this.inputClassName]: !!this.inputClassName };
|
|
27
|
-
}
|
|
28
|
-
focusLastIndex($event) {
|
|
29
|
-
const target = $event.target;
|
|
30
|
-
const selectionIndex = target?.value.length || 0;
|
|
31
|
-
target?.setSelectionRange(selectionIndex, selectionIndex);
|
|
32
|
-
}
|
|
33
|
-
inputNextChar($event) {
|
|
34
|
-
const target = $event.target;
|
|
35
|
-
const valueTyped = $event.key;
|
|
36
|
-
let newValue = target.value.replace('R$ ', '').replace(/[\.,]/g, '');
|
|
37
|
-
const isDeleteOrBackspace = ['Delete', 'Backspace'].includes($event.key);
|
|
38
|
-
if (isDeleteOrBackspace) {
|
|
39
|
-
newValue = newValue.substring(0, newValue.length - 1).padStart(3, '0');
|
|
40
|
-
}
|
|
41
|
-
else if (!isNaN(+valueTyped)) {
|
|
42
|
-
newValue += valueTyped;
|
|
43
|
-
newValue = `${+newValue}`.padStart(3, '0');
|
|
44
|
-
}
|
|
45
|
-
target.value = `${this.outlined ? 'R$ ' : ''}${Number(`${newValue.substring(0, newValue.length - 2)}.${newValue.substring(newValue.length - 2, newValue.length)}`).toLocaleString('pt-BR', {
|
|
46
|
-
currency: 'BRL',
|
|
47
|
-
minimumFractionDigits: 2,
|
|
48
|
-
maximumFractionDigits: this.numberOfDecimals,
|
|
49
|
-
})}`;
|
|
50
|
-
this.focusLastIndex($event);
|
|
51
|
-
}
|
|
52
|
-
clearValue() {
|
|
53
|
-
this.control.setValue(0);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
CurrencyFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CurrencyFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
-
CurrencyFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CurrencyFieldComponent, selector: "vector-currency-field", inputs: { minValue: "minValue", maxValue: "maxValue", placeholder: "placeholder", numberOfDecimals: "numberOfDecimals", control: "control", outlined: "outlined", rounded: "rounded", label: "label", isBankingField: "isBankingField", inputClassName: "inputClassName", disabled: "disabled" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: InputNumber, descendants: true }], ngImport: i0, template: "<div [ngClass]=\"{ 'input-container': outlined, 'value-input-container': !outlined, rounded: rounded }\">\
|
|
58
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CurrencyFieldComponent, decorators: [{
|
|
59
|
-
type: Component,
|
|
60
|
-
args: [{ selector: 'vector-currency-field', template: "<div [ngClass]=\"{ 'input-container': outlined, 'value-input-container': !outlined, rounded: rounded }\">\
|
|
61
|
-
}], propDecorators: { minValue: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], maxValue: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], placeholder: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], numberOfDecimals: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], control: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], outlined: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}], rounded: [{
|
|
74
|
-
type: Input
|
|
75
|
-
}], label: [{
|
|
76
|
-
type: Input
|
|
77
|
-
}], isBankingField: [{
|
|
78
|
-
type: Input
|
|
79
|
-
}], inputClassName: [{
|
|
80
|
-
type: Input
|
|
81
|
-
}], disabled: [{
|
|
82
|
-
type: Input
|
|
83
|
-
}], inputElement: [{
|
|
84
|
-
type: ViewChild,
|
|
85
|
-
args: [InputNumber]
|
|
86
|
-
}] } });
|
|
87
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { InputNumber } from 'primeng/inputnumber';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "primeng/inputnumber";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
import * as i3 from "@angular/forms";
|
|
7
|
+
export class CurrencyFieldComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.minValue = 0;
|
|
10
|
+
this.maxValue = 999999999;
|
|
11
|
+
this.placeholder = '';
|
|
12
|
+
this.numberOfDecimals = 2;
|
|
13
|
+
this.outlined = false;
|
|
14
|
+
this.rounded = false;
|
|
15
|
+
this.isBankingField = false;
|
|
16
|
+
this.inputClassName = '';
|
|
17
|
+
this.disabled = false;
|
|
18
|
+
}
|
|
19
|
+
ngAfterViewInit() {
|
|
20
|
+
const inputElement = this.inputElement?.el.nativeElement.querySelector('input');
|
|
21
|
+
inputElement.addEventListener('select', () => {
|
|
22
|
+
inputElement.selectionStart = inputElement.selectionEnd;
|
|
23
|
+
}, false);
|
|
24
|
+
}
|
|
25
|
+
getInputNgClass() {
|
|
26
|
+
return { outlined: this.outlined, rounded: this.rounded, [this.inputClassName]: !!this.inputClassName };
|
|
27
|
+
}
|
|
28
|
+
focusLastIndex($event) {
|
|
29
|
+
const target = $event.target;
|
|
30
|
+
const selectionIndex = target?.value.length || 0;
|
|
31
|
+
target?.setSelectionRange(selectionIndex, selectionIndex);
|
|
32
|
+
}
|
|
33
|
+
inputNextChar($event) {
|
|
34
|
+
const target = $event.target;
|
|
35
|
+
const valueTyped = $event.key;
|
|
36
|
+
let newValue = target.value.replace('R$ ', '').replace(/[\.,]/g, '');
|
|
37
|
+
const isDeleteOrBackspace = ['Delete', 'Backspace'].includes($event.key);
|
|
38
|
+
if (isDeleteOrBackspace) {
|
|
39
|
+
newValue = newValue.substring(0, newValue.length - 1).padStart(3, '0');
|
|
40
|
+
}
|
|
41
|
+
else if (!isNaN(+valueTyped)) {
|
|
42
|
+
newValue += valueTyped;
|
|
43
|
+
newValue = `${+newValue}`.padStart(3, '0');
|
|
44
|
+
}
|
|
45
|
+
target.value = `${this.outlined ? 'R$ ' : ''}${Number(`${newValue.substring(0, newValue.length - 2)}.${newValue.substring(newValue.length - 2, newValue.length)}`).toLocaleString('pt-BR', {
|
|
46
|
+
currency: 'BRL',
|
|
47
|
+
minimumFractionDigits: 2,
|
|
48
|
+
maximumFractionDigits: this.numberOfDecimals,
|
|
49
|
+
})}`;
|
|
50
|
+
this.focusLastIndex($event);
|
|
51
|
+
}
|
|
52
|
+
clearValue() {
|
|
53
|
+
this.control.setValue(0);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
CurrencyFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CurrencyFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
57
|
+
CurrencyFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CurrencyFieldComponent, selector: "vector-currency-field", inputs: { minValue: "minValue", maxValue: "maxValue", placeholder: "placeholder", numberOfDecimals: "numberOfDecimals", control: "control", outlined: "outlined", rounded: "rounded", label: "label", isBankingField: "isBankingField", inputClassName: "inputClassName", disabled: "disabled" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: InputNumber, descendants: true }], ngImport: i0, template: "<div [ngClass]=\"{ 'input-container': outlined, 'value-input-container': !outlined, rounded: rounded }\">\n <div class=\"inner-container\">\n <label *ngIf=\"label\">{{ label }}</label>\n <div class=\"input\">\n <span *ngIf=\"!outlined\">R$ </span>\n <div class=\"value-input\">\n <p-inputNumber\n class=\"currency-input\"\n [ngClass]=\"getInputNgClass()\"\n [formControl]=\"control\"\n mode=\"decimal\"\n [minFractionDigits]=\"2\"\n [maxFractionDigits]=\"numberOfDecimals\"\n [min]=\"minValue\"\n [max]=\"maxValue\"\n [prefix]=\"outlined ? 'R$ ' : ''\"\n [disabled]=\"disabled\"\n locale=\"pt-BR\"\n (click)=\"isBankingField ? focusLastIndex($event) : null\"\n (onKeyDown)=\"isBankingField ? inputNextChar($event) : null\"\n ></p-inputNumber>\n </div>\n </div>\n </div>\n <span *ngIf=\"rounded\" class=\"clear-value\" (click)=\"clearValue()\"><i class=\"pi pi-times\"></i></span>\n</div>\n", styles: [".value-input-container{padding:5px 20px;display:flex;align-items:center;justify-content:space-between}.value-input-container:focus-within{border:2px solid var(--theme-dark)}.value-input-container:not(.rounded) span{font-size:2em}.value-input-container label{color:var(--gray-dark);font-size:13px}.value-input-container span{font-weight:700;color:var(--theme-dark)}.value-input-container .input{display:flex;align-items:center}.value-input-container .input .value-input{margin:0 4px;flex:1}.rounded:not(.currency-input){padding:0 25px;background-color:#fff;border-radius:16px}.rounded span{font-size:1em}.rounded input{font-size:1rem}.rounded .clear-value{padding:5px 5px 0;border-radius:20px}.rounded .clear-value:hover{background-color:var(--gray-medium)}\n"], components: [{ type: i1.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
58
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CurrencyFieldComponent, decorators: [{
|
|
59
|
+
type: Component,
|
|
60
|
+
args: [{ selector: 'vector-currency-field', template: "<div [ngClass]=\"{ 'input-container': outlined, 'value-input-container': !outlined, rounded: rounded }\">\n <div class=\"inner-container\">\n <label *ngIf=\"label\">{{ label }}</label>\n <div class=\"input\">\n <span *ngIf=\"!outlined\">R$ </span>\n <div class=\"value-input\">\n <p-inputNumber\n class=\"currency-input\"\n [ngClass]=\"getInputNgClass()\"\n [formControl]=\"control\"\n mode=\"decimal\"\n [minFractionDigits]=\"2\"\n [maxFractionDigits]=\"numberOfDecimals\"\n [min]=\"minValue\"\n [max]=\"maxValue\"\n [prefix]=\"outlined ? 'R$ ' : ''\"\n [disabled]=\"disabled\"\n locale=\"pt-BR\"\n (click)=\"isBankingField ? focusLastIndex($event) : null\"\n (onKeyDown)=\"isBankingField ? inputNextChar($event) : null\"\n ></p-inputNumber>\n </div>\n </div>\n </div>\n <span *ngIf=\"rounded\" class=\"clear-value\" (click)=\"clearValue()\"><i class=\"pi pi-times\"></i></span>\n</div>\n", styles: [".value-input-container{padding:5px 20px;display:flex;align-items:center;justify-content:space-between}.value-input-container:focus-within{border:2px solid var(--theme-dark)}.value-input-container:not(.rounded) span{font-size:2em}.value-input-container label{color:var(--gray-dark);font-size:13px}.value-input-container span{font-weight:700;color:var(--theme-dark)}.value-input-container .input{display:flex;align-items:center}.value-input-container .input .value-input{margin:0 4px;flex:1}.rounded:not(.currency-input){padding:0 25px;background-color:#fff;border-radius:16px}.rounded span{font-size:1em}.rounded input{font-size:1rem}.rounded .clear-value{padding:5px 5px 0;border-radius:20px}.rounded .clear-value:hover{background-color:var(--gray-medium)}\n"] }]
|
|
61
|
+
}], propDecorators: { minValue: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], maxValue: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], placeholder: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], numberOfDecimals: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], control: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}], outlined: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], rounded: [{
|
|
74
|
+
type: Input
|
|
75
|
+
}], label: [{
|
|
76
|
+
type: Input
|
|
77
|
+
}], isBankingField: [{
|
|
78
|
+
type: Input
|
|
79
|
+
}], inputClassName: [{
|
|
80
|
+
type: Input
|
|
81
|
+
}], disabled: [{
|
|
82
|
+
type: Input
|
|
83
|
+
}], inputElement: [{
|
|
84
|
+
type: ViewChild,
|
|
85
|
+
args: [InputNumber]
|
|
86
|
+
}] } });
|
|
87
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VycmVuY3ktZmllbGQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvY3VycmVuY3ktZmllbGQvY3VycmVuY3ktZmllbGQuY29tcG9uZW50LnRzI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ltYWxcIlxuICAgICAgICAgIFttaW5GcmFjdGlvbkRpZ2l0c109XCIyXCJcbiAgICAgICAgICBbbWF4RnJhY3Rpb25EaWdpdHNdPVwibnVtYmVyT2ZEZWNpbWFsc1wiXG4gICAgICAgICAgW21pbl09XCJtaW5WYWx1ZVwiXG4gICAgICAgICAgW21heF09XCJtYXhWYWx1ZVwiXG4gICAgICAgICAgW3ByZWZpeF09XCJvdXRsaW5lZCA/ICdSJCAnIDogJydcIlxuICAgICAgICAgIFtkaXNhYmxlZF09XCJkaXNhYmxlZFwiXG4gICAgICAgICAgbG9jYWxlPVwicHQtQlJcIlxuICAgICAgICAgIChjbGljayk9XCJpc0JhbmtpbmdGaWVsZCA/IGZvY3VzTGFzdEluZGV4KCRldmVudCkgOiBudWxsXCJcbiAgICAgICAgICAob25LZXlEb3duKT1cImlzQmFua2luZ0ZpZWxkID8gaW5wdXROZXh0Q2hhcigkZXZlbnQpIDogbnVsbFwiXG4gICAgICAgID48L3AtaW5wdXROdW1iZXI+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgPC9kaXY+XG4gIDxzcGFuICpuZ0lmPVwicm91bmRlZFwiIGNsYXNzPVwiY2xlYXItdmFsdWVcIiAoY2xpY2spPVwiY2xlYXJWYWx1ZSgpXCI+PGkgY2xhc3M9XCJwaSBwaS10aW1lc1wiPjwvaT48L3NwYW4+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './currency-field.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './currency-field.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9jdXJyZW5jeS1maWVsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDRCQUE0QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jdXJyZW5jeS1maWVsZC5jb21wb25lbnQnO1xuIl19
|