ngx-vector-components 4.96.0 → 4.96.1
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 +1233 -1227
- 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 +982 -982
- 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 +66 -66
- 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 +32 -32
- package/esm2020/lib/components/crud-footer/crud-footer.module.mjs +20 -20
- 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 +98 -98
- package/esm2020/lib/components/fields/currency-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/data-table/data-table.component.mjs +386 -386
- package/esm2020/lib/components/fields/data-table/index.mjs +2 -2
- package/esm2020/lib/components/fields/dropdown-field/dropdown-field.component.mjs +204 -204
- 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 +213 -213
- package/esm2020/lib/components/fields/filters/filters.component.mjs +203 -203
- 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 +85 -85
- package/esm2020/lib/components/fields/multiselect-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/multiselect-field/multiselect-field.component.mjs +50 -50
- 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 +48 -48
- 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 +232 -232
- package/esm2020/lib/components/fields/textarea-field/index.mjs +2 -2
- package/esm2020/lib/components/fields/textarea-field/textarea-field.component.mjs +81 -81
- package/esm2020/lib/components/generic-error-modal/generic-error-modal.component.mjs +36 -36
- 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 +14 -14
- package/esm2020/lib/components/menu/index.mjs +4 -4
- package/esm2020/lib/components/menu/menu.component.mjs +305 -305
- 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/score/index.mjs +3 -3
- package/esm2020/lib/components/score/score.component.mjs +17 -17
- package/esm2020/lib/components/score/score.module.mjs +16 -16
- package/esm2020/lib/components/top-bar/index.mjs +3 -3
- package/esm2020/lib/components/top-bar/top-bar.component.mjs +142 -142
- package/esm2020/lib/components/top-bar/top-bar.module.mjs +20 -20
- 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 +185 -185
- package/esm2020/lib/interceptors/index.mjs +2 -2
- package/esm2020/lib/models/app-name.enum.mjs +10 -10
- 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/currency.enum.mjs +7 -7
- package/esm2020/lib/models/data-table.model.mjs +23 -23
- 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 +18 -18
- package/esm2020/lib/models/ip-info.enum.mjs +2 -2
- package/esm2020/lib/models/list-item.model.mjs +2 -2
- package/esm2020/lib/models/locale.enum.mjs +7 -7
- 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 +271 -271
- package/esm2020/lib/models/role.enum.mjs +5 -5
- package/esm2020/lib/models/status.enum.mjs +8 -8
- package/esm2020/lib/models/topbar.model.mjs +2 -2
- package/esm2020/lib/models/vector-app.model.mjs +2 -2
- package/esm2020/lib/models/vector-notification.model.mjs +2 -2
- 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 +9 -9
- 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 +50 -50
- package/esm2020/lib/pipes/remove-last-child.pipe.mjs +18 -18
- package/esm2020/lib/pipes/unread-notifications.pipe.mjs +15 -15
- 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 +13 -13
- package/esm2020/lib/services/loading.service.mjs +15 -15
- package/esm2020/lib/services/menu.service.mjs +152 -152
- package/esm2020/lib/services/modal.service.mjs +15 -15
- package/esm2020/lib/services/notifications.service.mjs +64 -64
- package/esm2020/lib/services/profile.service.mjs +103 -103
- package/esm2020/lib/services/storage.service.mjs +108 -108
- package/esm2020/lib/shared/shared.module.mjs +19 -19
- 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 +76 -76
- 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 +4562 -4562
- package/fesm2015/ngx-vector-components.mjs.map +1 -1
- package/fesm2020/ngx-vector-components.mjs +4540 -4540
- 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 +10 -10
- 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 +32 -32
- package/lib/components/fields/currency-field/index.d.ts +1 -1
- package/lib/components/fields/data-table/data-table.component.d.ts +82 -82
- package/lib/components/fields/data-table/index.d.ts +1 -1
- package/lib/components/fields/dropdown-field/dropdown-field.component.d.ts +52 -52
- 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 +48 -48
- package/lib/components/fields/filters/filters.component.d.ts +63 -63
- 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 +28 -28
- package/lib/components/fields/multiselect-field/index.d.ts +1 -1
- package/lib/components/fields/multiselect-field/multiselect-field.component.d.ts +16 -16
- 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 +25 -25
- 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 +55 -55
- package/lib/components/fields/textarea-field/index.d.ts +1 -1
- package/lib/components/fields/textarea-field/textarea-field.component.d.ts +22 -22
- package/lib/components/generic-error-modal/generic-error-modal.component.d.ts +15 -15
- 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 +13 -13
- package/lib/components/menu/index.d.ts +3 -3
- package/lib/components/menu/menu.component.d.ts +53 -53
- 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/score/index.d.ts +2 -2
- package/lib/components/score/score.component.d.ts +9 -9
- package/lib/components/score/score.module.d.ts +7 -7
- package/lib/components/top-bar/index.d.ts +2 -2
- package/lib/components/top-bar/top-bar.component.d.ts +48 -48
- package/lib/components/top-bar/top-bar.module.d.ts +10 -10
- 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 +8 -8
- 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/currency.enum.d.ts +5 -5
- package/lib/models/data-table.model.d.ts +65 -65
- 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 +12 -13
- package/lib/models/http-response.model.d.ts +48 -48
- package/lib/models/index.d.ts +17 -17
- package/lib/models/ip-info.enum.d.ts +6 -6
- package/lib/models/list-item.model.d.ts +7 -7
- package/lib/models/locale.enum.d.ts +5 -5
- 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 +292 -292
- package/lib/models/role.enum.d.ts +3 -3
- package/lib/models/status.enum.d.ts +6 -6
- package/lib/models/topbar.model.d.ts +5 -5
- package/lib/models/vector-app.model.d.ts +9 -9
- package/lib/models/vector-notification.model.d.ts +8 -8
- 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 +8 -8
- 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 +13 -13
- package/lib/pipes/remove-last-child.pipe.d.ts +7 -7
- package/lib/pipes/unread-notifications.pipe.d.ts +9 -9
- 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 +12 -12
- package/lib/services/loading.service.d.ts +7 -7
- package/lib/services/menu.service.d.ts +35 -35
- package/lib/services/modal.service.d.ts +7 -7
- package/lib/services/notifications.service.d.ts +13 -13
- 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 +10 -10
- 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 +21 -21
- 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,85 +1,85 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "primeng/inputnumber";
|
|
4
|
-
import * as i2 from "@angular/forms";
|
|
5
|
-
export class InputNumberFieldComponent {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.showButtons = false;
|
|
8
|
-
this.type = 'decimal';
|
|
9
|
-
this.minFractionDigits = 0;
|
|
10
|
-
this.maxFractionDigits = 4;
|
|
11
|
-
this.buttonLayout = 'horizontal';
|
|
12
|
-
this.incrementButtonIcon = 'pi pi-plus-circle';
|
|
13
|
-
this.decrementButtonIcon = 'pi pi-minus-circle';
|
|
14
|
-
this.min = 0;
|
|
15
|
-
this.step = 1;
|
|
16
|
-
this.disabled = false;
|
|
17
|
-
this.onFocus = new EventEmitter();
|
|
18
|
-
this.onBlur = new EventEmitter();
|
|
19
|
-
this.onInput = new EventEmitter();
|
|
20
|
-
this.onClear = new EventEmitter();
|
|
21
|
-
this._maxFractionDigits = null;
|
|
22
|
-
this._max = null;
|
|
23
|
-
this._suffix = null;
|
|
24
|
-
}
|
|
25
|
-
set max(_max) {
|
|
26
|
-
this._max = _max;
|
|
27
|
-
}
|
|
28
|
-
set suffix(_suffix) {
|
|
29
|
-
this._suffix = _suffix;
|
|
30
|
-
}
|
|
31
|
-
get max() {
|
|
32
|
-
if (this.type === 'percent') {
|
|
33
|
-
return this._max || 100;
|
|
34
|
-
}
|
|
35
|
-
return this._max || 999999999;
|
|
36
|
-
}
|
|
37
|
-
get suffix() {
|
|
38
|
-
switch (this.type) {
|
|
39
|
-
case 'percent':
|
|
40
|
-
return this._suffix || '%';
|
|
41
|
-
}
|
|
42
|
-
return '';
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
InputNumberFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputNumberFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
-
InputNumberFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: InputNumberFieldComponent, selector: "vector-input-number", inputs: { control: "control", showButtons: "showButtons", type: "type", minFractionDigits: "minFractionDigits", maxFractionDigits: "maxFractionDigits", buttonLayout: "buttonLayout", incrementButtonIcon: "incrementButtonIcon", decrementButtonIcon: "decrementButtonIcon", min: "min", step: "step", disabled: "disabled", max: "max", suffix: "suffix" }, outputs: { onFocus: "onFocus", onBlur: "onBlur", onInput: "onInput", onClear: "onClear" }, ngImport: i0, template: "<div class=\"input-container\">\n <p-inputNumber\n [formControl]=\"control\"\n [min]=\"min\"\n [max]=\"max\"\n [suffix]=\"suffix\"\n [step]=\"step\"\n [minFractionDigits]=\"minFractionDigits\"\n [maxFractionDigits]=\"maxFractionDigits\"\n [showButtons]=\"showButtons\"\n [disabled]=\"disabled\"\n [buttonLayout]=\"buttonLayout\"\n [incrementButtonIcon]=\"incrementButtonIcon\"\n [decrementButtonIcon]=\"decrementButtonIcon\"\n ></p-inputNumber>\n</div>\n", styles: [".input-container{width:100%}\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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
47
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputNumberFieldComponent, decorators: [{
|
|
48
|
-
type: Component,
|
|
49
|
-
args: [{ selector: 'vector-input-number', template: "<div class=\"input-container\">\n <p-inputNumber\n [formControl]=\"control\"\n [min]=\"min\"\n [max]=\"max\"\n [suffix]=\"suffix\"\n [step]=\"step\"\n [minFractionDigits]=\"minFractionDigits\"\n [maxFractionDigits]=\"maxFractionDigits\"\n [showButtons]=\"showButtons\"\n [disabled]=\"disabled\"\n [buttonLayout]=\"buttonLayout\"\n [incrementButtonIcon]=\"incrementButtonIcon\"\n [decrementButtonIcon]=\"decrementButtonIcon\"\n ></p-inputNumber>\n</div>\n", styles: [".input-container{width:100%}\n"] }]
|
|
50
|
-
}], propDecorators: { control: [{
|
|
51
|
-
type: Input
|
|
52
|
-
}], showButtons: [{
|
|
53
|
-
type: Input
|
|
54
|
-
}], type: [{
|
|
55
|
-
type: Input
|
|
56
|
-
}], minFractionDigits: [{
|
|
57
|
-
type: Input
|
|
58
|
-
}], maxFractionDigits: [{
|
|
59
|
-
type: Input
|
|
60
|
-
}], buttonLayout: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}], incrementButtonIcon: [{
|
|
63
|
-
type: Input
|
|
64
|
-
}], decrementButtonIcon: [{
|
|
65
|
-
type: Input
|
|
66
|
-
}], min: [{
|
|
67
|
-
type: Input
|
|
68
|
-
}], step: [{
|
|
69
|
-
type: Input
|
|
70
|
-
}], disabled: [{
|
|
71
|
-
type: Input
|
|
72
|
-
}], max: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}], suffix: [{
|
|
75
|
-
type: Input
|
|
76
|
-
}], onFocus: [{
|
|
77
|
-
type: Output
|
|
78
|
-
}], onBlur: [{
|
|
79
|
-
type: Output
|
|
80
|
-
}], onInput: [{
|
|
81
|
-
type: Output
|
|
82
|
-
}], onClear: [{
|
|
83
|
-
type: Output
|
|
84
|
-
}] } });
|
|
85
|
-
//# 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/inputnumber";
|
|
4
|
+
import * as i2 from "@angular/forms";
|
|
5
|
+
export class InputNumberFieldComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.showButtons = false;
|
|
8
|
+
this.type = 'decimal';
|
|
9
|
+
this.minFractionDigits = 0;
|
|
10
|
+
this.maxFractionDigits = 4;
|
|
11
|
+
this.buttonLayout = 'horizontal';
|
|
12
|
+
this.incrementButtonIcon = 'pi pi-plus-circle';
|
|
13
|
+
this.decrementButtonIcon = 'pi pi-minus-circle';
|
|
14
|
+
this.min = 0;
|
|
15
|
+
this.step = 1;
|
|
16
|
+
this.disabled = false;
|
|
17
|
+
this.onFocus = new EventEmitter();
|
|
18
|
+
this.onBlur = new EventEmitter();
|
|
19
|
+
this.onInput = new EventEmitter();
|
|
20
|
+
this.onClear = new EventEmitter();
|
|
21
|
+
this._maxFractionDigits = null;
|
|
22
|
+
this._max = null;
|
|
23
|
+
this._suffix = null;
|
|
24
|
+
}
|
|
25
|
+
set max(_max) {
|
|
26
|
+
this._max = _max;
|
|
27
|
+
}
|
|
28
|
+
set suffix(_suffix) {
|
|
29
|
+
this._suffix = _suffix;
|
|
30
|
+
}
|
|
31
|
+
get max() {
|
|
32
|
+
if (this.type === 'percent') {
|
|
33
|
+
return this._max || 100;
|
|
34
|
+
}
|
|
35
|
+
return this._max || 999999999;
|
|
36
|
+
}
|
|
37
|
+
get suffix() {
|
|
38
|
+
switch (this.type) {
|
|
39
|
+
case 'percent':
|
|
40
|
+
return this._suffix || '%';
|
|
41
|
+
}
|
|
42
|
+
return '';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
InputNumberFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputNumberFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
46
|
+
InputNumberFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: InputNumberFieldComponent, selector: "vector-input-number", inputs: { control: "control", showButtons: "showButtons", type: "type", minFractionDigits: "minFractionDigits", maxFractionDigits: "maxFractionDigits", buttonLayout: "buttonLayout", incrementButtonIcon: "incrementButtonIcon", decrementButtonIcon: "decrementButtonIcon", min: "min", step: "step", disabled: "disabled", max: "max", suffix: "suffix" }, outputs: { onFocus: "onFocus", onBlur: "onBlur", onInput: "onInput", onClear: "onClear" }, ngImport: i0, template: "<div class=\"input-container\">\r\n <p-inputNumber\r\n [formControl]=\"control\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [suffix]=\"suffix\"\r\n [step]=\"step\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [showButtons]=\"showButtons\"\r\n [disabled]=\"disabled\"\r\n [buttonLayout]=\"buttonLayout\"\r\n [incrementButtonIcon]=\"incrementButtonIcon\"\r\n [decrementButtonIcon]=\"decrementButtonIcon\"\r\n ></p-inputNumber>\r\n</div>\r\n", styles: [".input-container{width:100%}\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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
47
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputNumberFieldComponent, decorators: [{
|
|
48
|
+
type: Component,
|
|
49
|
+
args: [{ selector: 'vector-input-number', template: "<div class=\"input-container\">\r\n <p-inputNumber\r\n [formControl]=\"control\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [suffix]=\"suffix\"\r\n [step]=\"step\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [showButtons]=\"showButtons\"\r\n [disabled]=\"disabled\"\r\n [buttonLayout]=\"buttonLayout\"\r\n [incrementButtonIcon]=\"incrementButtonIcon\"\r\n [decrementButtonIcon]=\"decrementButtonIcon\"\r\n ></p-inputNumber>\r\n</div>\r\n", styles: [".input-container{width:100%}\n"] }]
|
|
50
|
+
}], propDecorators: { control: [{
|
|
51
|
+
type: Input
|
|
52
|
+
}], showButtons: [{
|
|
53
|
+
type: Input
|
|
54
|
+
}], type: [{
|
|
55
|
+
type: Input
|
|
56
|
+
}], minFractionDigits: [{
|
|
57
|
+
type: Input
|
|
58
|
+
}], maxFractionDigits: [{
|
|
59
|
+
type: Input
|
|
60
|
+
}], buttonLayout: [{
|
|
61
|
+
type: Input
|
|
62
|
+
}], incrementButtonIcon: [{
|
|
63
|
+
type: Input
|
|
64
|
+
}], decrementButtonIcon: [{
|
|
65
|
+
type: Input
|
|
66
|
+
}], min: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], step: [{
|
|
69
|
+
type: Input
|
|
70
|
+
}], disabled: [{
|
|
71
|
+
type: Input
|
|
72
|
+
}], max: [{
|
|
73
|
+
type: Input
|
|
74
|
+
}], suffix: [{
|
|
75
|
+
type: Input
|
|
76
|
+
}], onFocus: [{
|
|
77
|
+
type: Output
|
|
78
|
+
}], onBlur: [{
|
|
79
|
+
type: Output
|
|
80
|
+
}], onInput: [{
|
|
81
|
+
type: Output
|
|
82
|
+
}], onClear: [{
|
|
83
|
+
type: Output
|
|
84
|
+
}] } });
|
|
85
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtbnVtYmVyLWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4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J1dHRvbkljb25dPVwiZGVjcmVtZW50QnV0dG9uSWNvblwiXHJcbiAgPjwvcC1pbnB1dE51bWJlcj5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './multiselect-field.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './multiselect-field.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9tdWx0aXNlbGVjdC1maWVsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLCtCQUErQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9tdWx0aXNlbGVjdC1maWVsZC5jb21wb25lbnQnO1xyXG4iXX0=
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "primeng/multiselect";
|
|
4
|
-
import * as i2 from "@angular/forms";
|
|
5
|
-
export class MultiselectFieldComponent {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.isRequired = false;
|
|
8
|
-
this.label = '';
|
|
9
|
-
this.options = [];
|
|
10
|
-
this.filter = false;
|
|
11
|
-
this.showSelectAllOption = true;
|
|
12
|
-
this.onChange = new EventEmitter();
|
|
13
|
-
}
|
|
14
|
-
get placeholder() {
|
|
15
|
-
if (!this.label) {
|
|
16
|
-
return '';
|
|
17
|
-
}
|
|
18
|
-
return `${this.label}${this.isRequired ? '*' : ''}`;
|
|
19
|
-
}
|
|
20
|
-
fieldErrorLabel() {
|
|
21
|
-
if (this.control && this.control.invalid && this.control.touched) {
|
|
22
|
-
if (this.control.hasError('required')) {
|
|
23
|
-
return 'Campo obrigatório';
|
|
24
|
-
}
|
|
25
|
-
return typeof this.control.errors['invalid'] === 'string' ? this.control.errors['invalid'] : 'Campo inválido';
|
|
26
|
-
}
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
MultiselectFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MultiselectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
-
MultiselectFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MultiselectFieldComponent, selector: "vector-multiselect-field", inputs: { isRequired: "isRequired", control: "control", label: "label", options: "options", filter: "filter", showSelectAllOption: "showSelectAllOption" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div class=\"input-container\">\n <p-multiSelect\n #multiselect\n appendTo=\"body\"\n optionLabel=\"name\"\n optionValue=\"code\"\n dropdownIcon=\"fas fa-sort-down\"\n selectedItemsLabel=\"Selecionar todos\"\n [panelStyleClass]=\"filter ? 'has-filter' : ''\"\n [options]=\"options\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [filter]=\"filter\"\n [maxSelectedLabels]=\"options.length - 1\"\n [showHeader]=\"true\"\n [showToggleAll]=\"showSelectAllOption\"\n [dropdownIcon]=\"'pi pi-chevron-down'\"\n (onChange)=\"onChange.emit($event)\"\n >\n </p-multiSelect>\n <span class=\"input-error\">{{ fieldErrorLabel() }}</span>\n</div>\n", styles: [".input-container{height:62px}.input-container .input-error{font-size:.7em;color:var(--error-color)}\n"], components: [{ type: i1.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "autoZIndex", "baseZIndex", "filterBy", "virtualScroll", "itemSize", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "scrollHeight", "defaultLabel", "placeholder", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onPanelShow", "onPanelHide"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
32
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MultiselectFieldComponent, decorators: [{
|
|
33
|
-
type: Component,
|
|
34
|
-
args: [{ selector: 'vector-multiselect-field', template: "<div class=\"input-container\">\n <p-multiSelect\n #multiselect\n appendTo=\"body\"\n optionLabel=\"name\"\n optionValue=\"code\"\n dropdownIcon=\"fas fa-sort-down\"\n selectedItemsLabel=\"Selecionar todos\"\n [panelStyleClass]=\"filter ? 'has-filter' : ''\"\n [options]=\"options\"\n [formControl]=\"control\"\n [placeholder]=\"placeholder\"\n [filter]=\"filter\"\n [maxSelectedLabels]=\"options.length - 1\"\n [showHeader]=\"true\"\n [showToggleAll]=\"showSelectAllOption\"\n [dropdownIcon]=\"'pi pi-chevron-down'\"\n (onChange)=\"onChange.emit($event)\"\n >\n </p-multiSelect>\n <span class=\"input-error\">{{ fieldErrorLabel() }}</span>\n</div>\n", styles: [".input-container{height:62px}.input-container .input-error{font-size:.7em;color:var(--error-color)}\n"] }]
|
|
35
|
-
}], propDecorators: { isRequired: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], control: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}], label: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}], options: [{
|
|
42
|
-
type: Input
|
|
43
|
-
}], filter: [{
|
|
44
|
-
type: Input
|
|
45
|
-
}], showSelectAllOption: [{
|
|
46
|
-
type: Input
|
|
47
|
-
}], onChange: [{
|
|
48
|
-
type: Output
|
|
49
|
-
}] } });
|
|
50
|
-
//# 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/multiselect";
|
|
4
|
+
import * as i2 from "@angular/forms";
|
|
5
|
+
export class MultiselectFieldComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.isRequired = false;
|
|
8
|
+
this.label = '';
|
|
9
|
+
this.options = [];
|
|
10
|
+
this.filter = false;
|
|
11
|
+
this.showSelectAllOption = true;
|
|
12
|
+
this.onChange = new EventEmitter();
|
|
13
|
+
}
|
|
14
|
+
get placeholder() {
|
|
15
|
+
if (!this.label) {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
return `${this.label}${this.isRequired ? '*' : ''}`;
|
|
19
|
+
}
|
|
20
|
+
fieldErrorLabel() {
|
|
21
|
+
if (this.control && this.control.invalid && this.control.touched) {
|
|
22
|
+
if (this.control.hasError('required')) {
|
|
23
|
+
return 'Campo obrigatório';
|
|
24
|
+
}
|
|
25
|
+
return typeof this.control.errors['invalid'] === 'string' ? this.control.errors['invalid'] : 'Campo inválido';
|
|
26
|
+
}
|
|
27
|
+
return '';
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
MultiselectFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MultiselectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
31
|
+
MultiselectFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: MultiselectFieldComponent, selector: "vector-multiselect-field", inputs: { isRequired: "isRequired", control: "control", label: "label", options: "options", filter: "filter", showSelectAllOption: "showSelectAllOption" }, outputs: { onChange: "onChange" }, ngImport: i0, template: "<div class=\"input-container\">\r\n <p-multiSelect\r\n #multiselect\r\n appendTo=\"body\"\r\n optionLabel=\"name\"\r\n optionValue=\"code\"\r\n dropdownIcon=\"fas fa-sort-down\"\r\n selectedItemsLabel=\"Selecionar todos\"\r\n [panelStyleClass]=\"filter ? 'has-filter' : ''\"\r\n [options]=\"options\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [filter]=\"filter\"\r\n [maxSelectedLabels]=\"options.length - 1\"\r\n [showHeader]=\"true\"\r\n [showToggleAll]=\"showSelectAllOption\"\r\n [dropdownIcon]=\"'pi pi-chevron-down'\"\r\n (onChange)=\"onChange.emit($event)\"\r\n >\r\n </p-multiSelect>\r\n <span class=\"input-error\">{{ fieldErrorLabel() }}</span>\r\n</div>\r\n", styles: [".input-container{height:62px}.input-container .input-error{font-size:.7em;color:var(--error-color)}\n"], components: [{ type: i1.MultiSelect, selector: "p-multiSelect", inputs: ["style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "autoZIndex", "baseZIndex", "filterBy", "virtualScroll", "itemSize", "showTransitionOptions", "hideTransitionOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "scrollHeight", "defaultLabel", "placeholder", "options", "filterValue"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onPanelShow", "onPanelHide"] }], directives: [{ type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
32
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MultiselectFieldComponent, decorators: [{
|
|
33
|
+
type: Component,
|
|
34
|
+
args: [{ selector: 'vector-multiselect-field', template: "<div class=\"input-container\">\r\n <p-multiSelect\r\n #multiselect\r\n appendTo=\"body\"\r\n optionLabel=\"name\"\r\n optionValue=\"code\"\r\n dropdownIcon=\"fas fa-sort-down\"\r\n selectedItemsLabel=\"Selecionar todos\"\r\n [panelStyleClass]=\"filter ? 'has-filter' : ''\"\r\n [options]=\"options\"\r\n [formControl]=\"control\"\r\n [placeholder]=\"placeholder\"\r\n [filter]=\"filter\"\r\n [maxSelectedLabels]=\"options.length - 1\"\r\n [showHeader]=\"true\"\r\n [showToggleAll]=\"showSelectAllOption\"\r\n [dropdownIcon]=\"'pi pi-chevron-down'\"\r\n (onChange)=\"onChange.emit($event)\"\r\n >\r\n </p-multiSelect>\r\n <span class=\"input-error\">{{ fieldErrorLabel() }}</span>\r\n</div>\r\n", styles: [".input-container{height:62px}.input-container .input-error{font-size:.7em;color:var(--error-color)}\n"] }]
|
|
35
|
+
}], propDecorators: { isRequired: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], control: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], label: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], options: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], filter: [{
|
|
44
|
+
type: Input
|
|
45
|
+
}], showSelectAllOption: [{
|
|
46
|
+
type: Input
|
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MVwiXHJcbiAgICBbc2hvd0hlYWRlcl09XCJ0cnVlXCJcclxuICAgIFtzaG93VG9nZ2xlQWxsXT1cInNob3dTZWxlY3RBbGxPcHRpb25cIlxyXG4gICAgW2Ryb3Bkb3duSWNvbl09XCIncGkgcGktY2hldnJvbi1kb3duJ1wiXHJcbiAgICAob25DaGFuZ2UpPVwib25DaGFuZ2UuZW1pdCgkZXZlbnQpXCJcclxuICA+XHJcbiAgPC9wLW11bHRpU2VsZWN0PlxyXG4gIDxzcGFuIGNsYXNzPVwiaW5wdXQtZXJyb3JcIj57eyBmaWVsZEVycm9yTGFiZWwoKSB9fTwvc3Bhbj5cclxuPC9kaXY+XHJcbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './percentage-field.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './percentage-field.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9wZXJjZW50YWdlLWZpZWxkL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsOEJBQThCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL3BlcmNlbnRhZ2UtZmllbGQuY29tcG9uZW50JztcclxuIl19
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "primeng/inputnumber";
|
|
4
|
-
import * as i2 from "@angular/forms";
|
|
5
|
-
export class PercentageFieldComponent {
|
|
6
|
-
constructor() {
|
|
7
|
-
this.min = 0;
|
|
8
|
-
this.max = 100;
|
|
9
|
-
this.minFractionDigits = 0;
|
|
10
|
-
this.maxFractionDigits = 0;
|
|
11
|
-
this.step = 0;
|
|
12
|
-
this.blurEvent = new EventEmitter();
|
|
13
|
-
this.enterKeyPress = new EventEmitter();
|
|
14
|
-
this.focusEvent = new EventEmitter();
|
|
15
|
-
this.percentageRegex = `^(100(\\.0{1,2})?|[1-9]?\\d(\\.\\d{1,2})?)$`;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
PercentageFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: PercentageFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
-
PercentageFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: PercentageFieldComponent, selector: "vector-percentage-field", inputs: { control: "control", min: "min", max: "max", minFractionDigits: "minFractionDigits", maxFractionDigits: "maxFractionDigits", step: "step" }, outputs: { blurEvent: "blurEvent", enterKeyPress: "enterKeyPress", focusEvent: "focusEvent" }, ngImport: i0, template: "<form class=\"input-container\">\n <p-inputNumber\n [formControl]=\"control\"\n suffix=\"%\"\n [min]=\"min\"\n [max]=\"max\"\n [minFractionDigits]=\"minFractionDigits\"\n [maxFractionDigits]=\"maxFractionDigits\"\n [step]=\"step\"\n [showButtons]=\"step > 1\"\n buttonLayout=\"horizontal\"\n decrementButtonIcon=\"pi pi-minus-circle\"\n incrementButtonIcon=\"pi pi-plus-circle\"\n ></p-inputNumber>\n</form>\n", styles: [".input-container{width:100%}\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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: PercentageFieldComponent, decorators: [{
|
|
21
|
-
type: Component,
|
|
22
|
-
args: [{ selector: 'vector-percentage-field', template: "<form class=\"input-container\">\n <p-inputNumber\n [formControl]=\"control\"\n suffix=\"%\"\n [min]=\"min\"\n [max]=\"max\"\n [minFractionDigits]=\"minFractionDigits\"\n [maxFractionDigits]=\"maxFractionDigits\"\n [step]=\"step\"\n [showButtons]=\"step > 1\"\n buttonLayout=\"horizontal\"\n decrementButtonIcon=\"pi pi-minus-circle\"\n incrementButtonIcon=\"pi pi-plus-circle\"\n ></p-inputNumber>\n</form>\n", styles: [".input-container{width:100%}\n"] }]
|
|
23
|
-
}], propDecorators: { control: [{
|
|
24
|
-
type: Input
|
|
25
|
-
}], min: [{
|
|
26
|
-
type: Input
|
|
27
|
-
}], max: [{
|
|
28
|
-
type: Input
|
|
29
|
-
}], minFractionDigits: [{
|
|
30
|
-
type: Input
|
|
31
|
-
}], maxFractionDigits: [{
|
|
32
|
-
type: Input
|
|
33
|
-
}], step: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], blurEvent: [{
|
|
36
|
-
type: Output
|
|
37
|
-
}], enterKeyPress: [{
|
|
38
|
-
type: Output
|
|
39
|
-
}], focusEvent: [{
|
|
40
|
-
type: Output
|
|
41
|
-
}] } });
|
|
42
|
-
//# 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/inputnumber";
|
|
4
|
+
import * as i2 from "@angular/forms";
|
|
5
|
+
export class PercentageFieldComponent {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.min = 0;
|
|
8
|
+
this.max = 100;
|
|
9
|
+
this.minFractionDigits = 0;
|
|
10
|
+
this.maxFractionDigits = 0;
|
|
11
|
+
this.step = 0;
|
|
12
|
+
this.blurEvent = new EventEmitter();
|
|
13
|
+
this.enterKeyPress = new EventEmitter();
|
|
14
|
+
this.focusEvent = new EventEmitter();
|
|
15
|
+
this.percentageRegex = `^(100(\\.0{1,2})?|[1-9]?\\d(\\.\\d{1,2})?)$`;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
PercentageFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: PercentageFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
PercentageFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: PercentageFieldComponent, selector: "vector-percentage-field", inputs: { control: "control", min: "min", max: "max", minFractionDigits: "minFractionDigits", maxFractionDigits: "maxFractionDigits", step: "step" }, outputs: { blurEvent: "blurEvent", enterKeyPress: "enterKeyPress", focusEvent: "focusEvent" }, ngImport: i0, template: "<form class=\"input-container\">\r\n <p-inputNumber\r\n [formControl]=\"control\"\r\n suffix=\"%\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [step]=\"step\"\r\n [showButtons]=\"step > 1\"\r\n buttonLayout=\"horizontal\"\r\n decrementButtonIcon=\"pi pi-minus-circle\"\r\n incrementButtonIcon=\"pi pi-plus-circle\"\r\n ></p-inputNumber>\r\n</form>\r\n", styles: [".input-container{width:100%}\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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: PercentageFieldComponent, decorators: [{
|
|
21
|
+
type: Component,
|
|
22
|
+
args: [{ selector: 'vector-percentage-field', template: "<form class=\"input-container\">\r\n <p-inputNumber\r\n [formControl]=\"control\"\r\n suffix=\"%\"\r\n [min]=\"min\"\r\n [max]=\"max\"\r\n [minFractionDigits]=\"minFractionDigits\"\r\n [maxFractionDigits]=\"maxFractionDigits\"\r\n [step]=\"step\"\r\n [showButtons]=\"step > 1\"\r\n buttonLayout=\"horizontal\"\r\n decrementButtonIcon=\"pi pi-minus-circle\"\r\n incrementButtonIcon=\"pi pi-plus-circle\"\r\n ></p-inputNumber>\r\n</form>\r\n", styles: [".input-container{width:100%}\n"] }]
|
|
23
|
+
}], propDecorators: { control: [{
|
|
24
|
+
type: Input
|
|
25
|
+
}], min: [{
|
|
26
|
+
type: Input
|
|
27
|
+
}], max: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], minFractionDigits: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], maxFractionDigits: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], step: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], blurEvent: [{
|
|
36
|
+
type: Output
|
|
37
|
+
}], enterKeyPress: [{
|
|
38
|
+
type: Output
|
|
39
|
+
}], focusEvent: [{
|
|
40
|
+
type: Output
|
|
41
|
+
}] } });
|
|
42
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyY2VudGFnZS1maWVsZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9wZXJjZW50YWdlLWZpZWxkL3BlcmNlbnRhZ2UtZmllbGQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvcGVyY2VudGFnZS1maWVsZC9wZXJjZW50YWdlLWZpZWxkLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFw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tmb3JtQ29udHJvbF09XCJjb250cm9sXCJcclxuICAgIHN1ZmZpeD1cIiVcIlxyXG4gICAgW21pbl09XCJtaW5cIlxyXG4gICAgW21heF09XCJtYXhcIlxyXG4gICAgW21pbkZyYWN0aW9uRGlnaXRzXT1cIm1pbkZyYWN0aW9uRGlnaXRzXCJcclxuICAgIFttYXhGcmFjdGlvbkRpZ2l0c109XCJtYXhGcmFjdGlvbkRpZ2l0c1wiXHJcbiAgICBbc3RlcF09XCJzdGVwXCJcclxuICAgIFtzaG93QnV0dG9uc109XCJzdGVwID4gMVwiXHJcbiAgICBidXR0b25MYXlvdXQ9XCJob3Jpem9udGFsXCJcclxuICAgIGRlY3JlbWVudEJ1dHRvbkljb249XCJwaSBwaS1taW51cy1jaXJjbGVcIlxyXG4gICAgaW5jcmVtZW50QnV0dG9uSWNvbj1cInBpIHBpLXBsdXMtY2lyY2xlXCJcclxuICA+PC9wLWlucHV0TnVtYmVyPlxyXG48L2Zvcm0+XHJcbiJdfQ==
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './radio-button-field.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './radio-button-field.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9yYWRpby1idXR0b24tZmllbGQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxnQ0FBZ0MsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vcmFkaW8tYnV0dG9uLWZpZWxkLmNvbXBvbmVudCc7XHJcbiJdfQ==
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { BooleanType } from '../../../models';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@ngx-translate/core";
|
|
5
|
-
import * as i2 from "primeng/radiobutton";
|
|
6
|
-
import * as i3 from "@angular/common";
|
|
7
|
-
import * as i4 from "@angular/forms";
|
|
8
|
-
export class RadioButtonFieldComponent {
|
|
9
|
-
constructor(translateService) {
|
|
10
|
-
this.translateService = translateService;
|
|
11
|
-
this.groupName = '';
|
|
12
|
-
this.options = [
|
|
13
|
-
{ label: this.getYesLabel(), value: BooleanType.YES },
|
|
14
|
-
{ label: this.getNoLabel(), value: BooleanType.NO },
|
|
15
|
-
];
|
|
16
|
-
this.layout = 'vertical';
|
|
17
|
-
this.justifySpaceBetween = false;
|
|
18
|
-
}
|
|
19
|
-
ngOnInit() { }
|
|
20
|
-
get layoutClass() {
|
|
21
|
-
return { horizontal: this.layout === 'horizontal', vertical: this.layout === 'vertical' };
|
|
22
|
-
}
|
|
23
|
-
getYesLabel() {
|
|
24
|
-
const label = this.translateService.instant('app.label.yes');
|
|
25
|
-
return label !== 'app.label.yes' ? label : 'Sim';
|
|
26
|
-
}
|
|
27
|
-
getNoLabel() {
|
|
28
|
-
const label = this.translateService.instant('app.label.no');
|
|
29
|
-
return label !== 'app.label.no' ? label : 'Não';
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
RadioButtonFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioButtonFieldComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
-
RadioButtonFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: RadioButtonFieldComponent, selector: "vector-radio-button-field", inputs: { groupName: "groupName", options: "options", control: "control", layout: "layout", justifySpaceBetween: "justifySpaceBetween" }, ngImport: i0, template: "<div\n class=\"radio-buttons-container\"\n [ngClass]=\"layoutClass\"\n [ngStyle]=\"{ 'justify-content': justifySpaceBetween ? 'space-between' : 'flex-start' }\"\n>\n <div *ngFor=\"let option of options\" class=\"radio-button-item\">\n <p-radioButton\n [name]=\"groupName\"\n [value]=\"option.value\"\n [label]=\"option.label\"\n [formControl]=\"control\"\n ></p-radioButton>\n </div>\n</div>\n", styles: [".radio-buttons-container{display:flex;flex-wrap:wrap;height:100%;width:100%;padding-top:5px}.radio-buttons-container .radio-button-item{margin:5px;flex:1 100px}.vertical{flex-direction:column;align-items:flex-start}.vertical .radio-button-item{margin-bottom:.5rem}.horizontal{flex-direction:row;padding-top:5px}.horizontal .radio-buttons-container .radio-button-item{margin:0 5px}\n"], components: [{ type: i2.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioButtonFieldComponent, decorators: [{
|
|
35
|
-
type: Component,
|
|
36
|
-
args: [{ selector: 'vector-radio-button-field', template: "<div\n class=\"radio-buttons-container\"\n [ngClass]=\"layoutClass\"\n [ngStyle]=\"{ 'justify-content': justifySpaceBetween ? 'space-between' : 'flex-start' }\"\n>\n <div *ngFor=\"let option of options\" class=\"radio-button-item\">\n <p-radioButton\n [name]=\"groupName\"\n [value]=\"option.value\"\n [label]=\"option.label\"\n [formControl]=\"control\"\n ></p-radioButton>\n </div>\n</div>\n", styles: [".radio-buttons-container{display:flex;flex-wrap:wrap;height:100%;width:100%;padding-top:5px}.radio-buttons-container .radio-button-item{margin:5px;flex:1 100px}.vertical{flex-direction:column;align-items:flex-start}.vertical .radio-button-item{margin-bottom:.5rem}.horizontal{flex-direction:row;padding-top:5px}.horizontal .radio-buttons-container .radio-button-item{margin:0 5px}\n"] }]
|
|
37
|
-
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { groupName: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}], options: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}], control: [{
|
|
42
|
-
type: Input
|
|
43
|
-
}], layout: [{
|
|
44
|
-
type: Input
|
|
45
|
-
}], justifySpaceBetween: [{
|
|
46
|
-
type: Input
|
|
47
|
-
}] } });
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { BooleanType } from '../../../models';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@ngx-translate/core";
|
|
5
|
+
import * as i2 from "primeng/radiobutton";
|
|
6
|
+
import * as i3 from "@angular/common";
|
|
7
|
+
import * as i4 from "@angular/forms";
|
|
8
|
+
export class RadioButtonFieldComponent {
|
|
9
|
+
constructor(translateService) {
|
|
10
|
+
this.translateService = translateService;
|
|
11
|
+
this.groupName = '';
|
|
12
|
+
this.options = [
|
|
13
|
+
{ label: this.getYesLabel(), value: BooleanType.YES },
|
|
14
|
+
{ label: this.getNoLabel(), value: BooleanType.NO },
|
|
15
|
+
];
|
|
16
|
+
this.layout = 'vertical';
|
|
17
|
+
this.justifySpaceBetween = false;
|
|
18
|
+
}
|
|
19
|
+
ngOnInit() { }
|
|
20
|
+
get layoutClass() {
|
|
21
|
+
return { horizontal: this.layout === 'horizontal', vertical: this.layout === 'vertical' };
|
|
22
|
+
}
|
|
23
|
+
getYesLabel() {
|
|
24
|
+
const label = this.translateService.instant('app.label.yes');
|
|
25
|
+
return label !== 'app.label.yes' ? label : 'Sim';
|
|
26
|
+
}
|
|
27
|
+
getNoLabel() {
|
|
28
|
+
const label = this.translateService.instant('app.label.no');
|
|
29
|
+
return label !== 'app.label.no' ? label : 'Não';
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
RadioButtonFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioButtonFieldComponent, deps: [{ token: i1.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
RadioButtonFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: RadioButtonFieldComponent, selector: "vector-radio-button-field", inputs: { groupName: "groupName", options: "options", control: "control", layout: "layout", justifySpaceBetween: "justifySpaceBetween" }, ngImport: i0, template: "<div\r\n class=\"radio-buttons-container\"\r\n [ngClass]=\"layoutClass\"\r\n [ngStyle]=\"{ 'justify-content': justifySpaceBetween ? 'space-between' : 'flex-start' }\"\r\n>\r\n <div *ngFor=\"let option of options\" class=\"radio-button-item\">\r\n <p-radioButton\r\n [name]=\"groupName\"\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [formControl]=\"control\"\r\n ></p-radioButton>\r\n </div>\r\n</div>\r\n", styles: [".radio-buttons-container{display:flex;flex-wrap:wrap;height:100%;width:100%;padding-top:5px}.radio-buttons-container .radio-button-item{margin:5px;flex:1 100px}.vertical{flex-direction:column;align-items:flex-start}.vertical .radio-button-item{margin-bottom:.5rem}.horizontal{flex-direction:row;padding-top:5px}.horizontal .radio-buttons-container .radio-button-item{margin:0 5px}\n"], components: [{ type: i2.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }] });
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioButtonFieldComponent, decorators: [{
|
|
35
|
+
type: Component,
|
|
36
|
+
args: [{ selector: 'vector-radio-button-field', template: "<div\r\n class=\"radio-buttons-container\"\r\n [ngClass]=\"layoutClass\"\r\n [ngStyle]=\"{ 'justify-content': justifySpaceBetween ? 'space-between' : 'flex-start' }\"\r\n>\r\n <div *ngFor=\"let option of options\" class=\"radio-button-item\">\r\n <p-radioButton\r\n [name]=\"groupName\"\r\n [value]=\"option.value\"\r\n [label]=\"option.label\"\r\n [formControl]=\"control\"\r\n ></p-radioButton>\r\n </div>\r\n</div>\r\n", styles: [".radio-buttons-container{display:flex;flex-wrap:wrap;height:100%;width:100%;padding-top:5px}.radio-buttons-container .radio-button-item{margin:5px;flex:1 100px}.vertical{flex-direction:column;align-items:flex-start}.vertical .radio-button-item{margin-bottom:.5rem}.horizontal{flex-direction:row;padding-top:5px}.horizontal .radio-buttons-container .radio-button-item{margin:0 5px}\n"] }]
|
|
37
|
+
}], ctorParameters: function () { return [{ type: i1.TranslateService }]; }, propDecorators: { groupName: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], options: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], control: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], layout: [{
|
|
44
|
+
type: Input
|
|
45
|
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