ngx-vector-components 4.54.0 → 4.55.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 +907 -900
- 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 +211 -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 -217
- 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 +4219 -4217
- package/fesm2015/ngx-vector-components.mjs.map +1 -1
- package/fesm2020/ngx-vector-components.mjs +4196 -4194
- 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 +49 -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 -238
- 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,82 +1,82 @@
|
|
|
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.onFocus = new EventEmitter();
|
|
17
|
-
this.onBlur = new EventEmitter();
|
|
18
|
-
this.onInput = new EventEmitter();
|
|
19
|
-
this.onClear = new EventEmitter();
|
|
20
|
-
this._maxFractionDigits = null;
|
|
21
|
-
this._max = null;
|
|
22
|
-
this._suffix = null;
|
|
23
|
-
}
|
|
24
|
-
set max(_max) {
|
|
25
|
-
this._max = _max;
|
|
26
|
-
}
|
|
27
|
-
set suffix(_suffix) {
|
|
28
|
-
this._suffix = _suffix;
|
|
29
|
-
}
|
|
30
|
-
get max() {
|
|
31
|
-
if (this.type === 'percent') {
|
|
32
|
-
return this._max || 100;
|
|
33
|
-
}
|
|
34
|
-
return this._max || 999999999;
|
|
35
|
-
}
|
|
36
|
-
get suffix() {
|
|
37
|
-
switch (this.type) {
|
|
38
|
-
case 'percent':
|
|
39
|
-
return this._suffix || '%';
|
|
40
|
-
}
|
|
41
|
-
return '';
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
InputNumberFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputNumberFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
-
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", 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 [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"] }] });
|
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputNumberFieldComponent, decorators: [{
|
|
47
|
-
type: Component,
|
|
48
|
-
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 [buttonLayout]=\"buttonLayout\"\n [incrementButtonIcon]=\"incrementButtonIcon\"\n [decrementButtonIcon]=\"decrementButtonIcon\"\n ></p-inputNumber>\n</div>\n", styles: [".input-container{width:100%}\n"] }]
|
|
49
|
-
}], propDecorators: { control: [{
|
|
50
|
-
type: Input
|
|
51
|
-
}], showButtons: [{
|
|
52
|
-
type: Input
|
|
53
|
-
}], type: [{
|
|
54
|
-
type: Input
|
|
55
|
-
}], minFractionDigits: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], maxFractionDigits: [{
|
|
58
|
-
type: Input
|
|
59
|
-
}], buttonLayout: [{
|
|
60
|
-
type: Input
|
|
61
|
-
}], incrementButtonIcon: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], decrementButtonIcon: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], min: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], step: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], max: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], suffix: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}], onFocus: [{
|
|
74
|
-
type: Output
|
|
75
|
-
}], onBlur: [{
|
|
76
|
-
type: Output
|
|
77
|
-
}], onInput: [{
|
|
78
|
-
type: Output
|
|
79
|
-
}], onClear: [{
|
|
80
|
-
type: Output
|
|
81
|
-
}] } });
|
|
82
|
-
//# 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.onFocus = new EventEmitter();
|
|
17
|
+
this.onBlur = new EventEmitter();
|
|
18
|
+
this.onInput = new EventEmitter();
|
|
19
|
+
this.onClear = new EventEmitter();
|
|
20
|
+
this._maxFractionDigits = null;
|
|
21
|
+
this._max = null;
|
|
22
|
+
this._suffix = null;
|
|
23
|
+
}
|
|
24
|
+
set max(_max) {
|
|
25
|
+
this._max = _max;
|
|
26
|
+
}
|
|
27
|
+
set suffix(_suffix) {
|
|
28
|
+
this._suffix = _suffix;
|
|
29
|
+
}
|
|
30
|
+
get max() {
|
|
31
|
+
if (this.type === 'percent') {
|
|
32
|
+
return this._max || 100;
|
|
33
|
+
}
|
|
34
|
+
return this._max || 999999999;
|
|
35
|
+
}
|
|
36
|
+
get suffix() {
|
|
37
|
+
switch (this.type) {
|
|
38
|
+
case 'percent':
|
|
39
|
+
return this._suffix || '%';
|
|
40
|
+
}
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
InputNumberFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputNumberFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
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", 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 [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"] }] });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: InputNumberFieldComponent, decorators: [{
|
|
47
|
+
type: Component,
|
|
48
|
+
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 [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"] }]
|
|
49
|
+
}], propDecorators: { control: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], showButtons: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], type: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], minFractionDigits: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], maxFractionDigits: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], buttonLayout: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], incrementButtonIcon: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], decrementButtonIcon: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], min: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], step: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], max: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}], suffix: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}], onFocus: [{
|
|
74
|
+
type: Output
|
|
75
|
+
}], onBlur: [{
|
|
76
|
+
type: Output
|
|
77
|
+
}], onInput: [{
|
|
78
|
+
type: Output
|
|
79
|
+
}], onClear: [{
|
|
80
|
+
type: Output
|
|
81
|
+
}] } });
|
|
82
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5wdXQtbnVtYmVyLWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC12ZWN0b3ItY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMvZmllbGRzL2lucHV0LW51bWJlci1maWVsZC9pbnB1dC1udW1iZXItZmllbGQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvaW5wdXQtbnVtYmVyLWZpZWxkL2lucHV0LW51bWJlci1maWVsZC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLFlBQVksRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUFBZSxDQUFDOzs7O0FBTXZFLE1BQU0sT0FBTyx5QkFBeUI7SUFMdEM7UUFTUyxnQkFBVyxHQUFZLEtBQUssQ0FBQztRQUU3QixTQUFJLEdBQTBCLFNBQVMsQ0FBQztRQUV4QyxzQkFBaUIsR0FBVyxDQUFDLENBQUM7UUFFOUIsc0JBQWlCLEdBQVcsQ0FBQyxDQUFDO1FBRTlCLGlCQUFZLEdBQTBDLFlBQVksQ0FBQztRQUVuRSx3QkFBbUIsR0FBVyxtQkFBbUIsQ0FBQztRQUVsRCx3QkFBbUIsR0FBVyxvQkFBb0IsQ0FBQztR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3V0XT1cImJ1dHRvbkxheW91dFwiXHJcbiAgICBbaW5jcmVtZW50QnV0dG9uSWNvbl09XCJpbmNyZW1lbnRCdXR0b25JY29uXCJcclxuICAgIFtkZWNyZW1lbnRCdXR0b25JY29uXT1cImRlY3JlbWVudEJ1dHRvbkljb25cIlxyXG4gID48L3AtaW5wdXROdW1iZXI+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -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,47 +1,47 @@
|
|
|
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.onChange = new EventEmitter();
|
|
12
|
-
}
|
|
13
|
-
get placeholder() {
|
|
14
|
-
if (!this.label) {
|
|
15
|
-
return '';
|
|
16
|
-
}
|
|
17
|
-
return `${this.label}${this.isRequired ? '*' : ''}`;
|
|
18
|
-
}
|
|
19
|
-
fieldErrorLabel() {
|
|
20
|
-
if (this.control && this.control.invalid && this.control.touched) {
|
|
21
|
-
if (this.control.hasError('required')) {
|
|
22
|
-
return 'Campo obrigatório';
|
|
23
|
-
}
|
|
24
|
-
return typeof this.control.errors['invalid'] === 'string' ? this.control.errors['invalid'] : 'Campo inválido';
|
|
25
|
-
}
|
|
26
|
-
return '';
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
MultiselectFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MultiselectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
-
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" }, 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=\"Mostrar 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]=\"true\"\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"] }] });
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MultiselectFieldComponent, decorators: [{
|
|
32
|
-
type: Component,
|
|
33
|
-
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=\"Mostrar 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]=\"true\"\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"] }]
|
|
34
|
-
}], propDecorators: { isRequired: [{
|
|
35
|
-
type: Input
|
|
36
|
-
}], control: [{
|
|
37
|
-
type: Input
|
|
38
|
-
}], label: [{
|
|
39
|
-
type: Input
|
|
40
|
-
}], options: [{
|
|
41
|
-
type: Input
|
|
42
|
-
}], filter: [{
|
|
43
|
-
type: Input
|
|
44
|
-
}], onChange: [{
|
|
45
|
-
type: Output
|
|
46
|
-
}] } });
|
|
47
|
-
//# 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.onChange = new EventEmitter();
|
|
12
|
+
}
|
|
13
|
+
get placeholder() {
|
|
14
|
+
if (!this.label) {
|
|
15
|
+
return '';
|
|
16
|
+
}
|
|
17
|
+
return `${this.label}${this.isRequired ? '*' : ''}`;
|
|
18
|
+
}
|
|
19
|
+
fieldErrorLabel() {
|
|
20
|
+
if (this.control && this.control.invalid && this.control.touched) {
|
|
21
|
+
if (this.control.hasError('required')) {
|
|
22
|
+
return 'Campo obrigatório';
|
|
23
|
+
}
|
|
24
|
+
return typeof this.control.errors['invalid'] === 'string' ? this.control.errors['invalid'] : 'Campo inválido';
|
|
25
|
+
}
|
|
26
|
+
return '';
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
MultiselectFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MultiselectFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
30
|
+
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" }, 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=\"Mostrar 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]=\"true\"\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"] }] });
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: MultiselectFieldComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
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=\"Mostrar 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]=\"true\"\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"] }]
|
|
34
|
+
}], propDecorators: { isRequired: [{
|
|
35
|
+
type: Input
|
|
36
|
+
}], control: [{
|
|
37
|
+
type: Input
|
|
38
|
+
}], label: [{
|
|
39
|
+
type: Input
|
|
40
|
+
}], options: [{
|
|
41
|
+
type: Input
|
|
42
|
+
}], filter: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}], onChange: [{
|
|
45
|
+
type: Output
|
|
46
|
+
}] } });
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2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dD5cclxuICA8c3BhbiBjbGFzcz1cImlucHV0LWVycm9yXCI+e3sgZmllbGRFcnJvckxhYmVsKCkgfX08L3NwYW4+XHJcbjwvZGl2PlxyXG4iXX0=
|
|
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVyY2VudGFnZS1maWVsZC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9wZXJjZW50YWdlLWZpZWxkL3BlcmNlbnRhZ2UtZmllbGQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvcGVyY2VudGFnZS1maWVsZC9wZXJjZW50YWdlLWZpZWxkLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7Ozs7QUFPdkUsTUFBTSxPQUFPLHdCQUF3QjtJQUxyQztRQVNTLFFBQUcsR0FBVyxDQUFDLENBQUM7UUFFaEIsUUFBRyxHQUFXLEdBQUcsQ0FBQztRQUVsQixzQkFBaUIsR0FBVyxDQUFDLENBQUM7UUFFOUI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wXCJcclxuICAgIFtzaG93QnV0dG9uc109XCJzdGVwID4gMVwiXHJcbiAgICBidXR0b25MYXlvdXQ9XCJob3Jpem9udGFsXCJcclxuICAgIGRlY3JlbWVudEJ1dHRvbkljb249XCJwaSBwaS1taW51cy1jaXJjbGVcIlxyXG4gICAgaW5jcmVtZW50QnV0dG9uSWNvbj1cInBpIHBpLXBsdXMtY2lyY2xlXCJcclxuICA+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,38 +1,38 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { BooleanType } from '../../../models';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "primeng/radiobutton";
|
|
5
|
-
import * as i2 from "@angular/common";
|
|
6
|
-
import * as i3 from "@angular/forms";
|
|
7
|
-
export class RadioButtonFieldComponent {
|
|
8
|
-
constructor() {
|
|
9
|
-
this.groupName = '';
|
|
10
|
-
this.options = [
|
|
11
|
-
{ label: 'Sim', value: BooleanType.YES },
|
|
12
|
-
{ label: 'Não', value: BooleanType.NO },
|
|
13
|
-
];
|
|
14
|
-
this.layout = 'vertical';
|
|
15
|
-
this.justifySpaceBetween = false;
|
|
16
|
-
}
|
|
17
|
-
ngOnInit() { }
|
|
18
|
-
get layoutClass() {
|
|
19
|
-
return { horizontal: this.layout === 'horizontal', vertical: this.layout === 'vertical' };
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
RadioButtonFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
-
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: i1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }] });
|
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioButtonFieldComponent, decorators: [{
|
|
25
|
-
type: Component,
|
|
26
|
-
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"] }]
|
|
27
|
-
}], ctorParameters: function () { return []; }, propDecorators: { groupName: [{
|
|
28
|
-
type: Input
|
|
29
|
-
}], options: [{
|
|
30
|
-
type: Input
|
|
31
|
-
}], control: [{
|
|
32
|
-
type: Input
|
|
33
|
-
}], layout: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], justifySpaceBetween: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}] } });
|
|
38
|
-
//# 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 "primeng/radiobutton";
|
|
5
|
+
import * as i2 from "@angular/common";
|
|
6
|
+
import * as i3 from "@angular/forms";
|
|
7
|
+
export class RadioButtonFieldComponent {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.groupName = '';
|
|
10
|
+
this.options = [
|
|
11
|
+
{ label: 'Sim', value: BooleanType.YES },
|
|
12
|
+
{ label: 'Não', value: BooleanType.NO },
|
|
13
|
+
];
|
|
14
|
+
this.layout = 'vertical';
|
|
15
|
+
this.justifySpaceBetween = false;
|
|
16
|
+
}
|
|
17
|
+
ngOnInit() { }
|
|
18
|
+
get layoutClass() {
|
|
19
|
+
return { horizontal: this.layout === 'horizontal', vertical: this.layout === 'vertical' };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
RadioButtonFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioButtonFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
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: i1.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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"] }] });
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: RadioButtonFieldComponent, decorators: [{
|
|
25
|
+
type: Component,
|
|
26
|
+
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"] }]
|
|
27
|
+
}], ctorParameters: function () { return []; }, propDecorators: { groupName: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], options: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], control: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], layout: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], justifySpaceBetween: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}] } });
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8tYnV0dG9uLWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC12ZWN0b3ItY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMvZmllbGRzL3JhZGlvLWJ1dHRvbi1maWVsZC9yYWRpby1idXR0b24tZmllbGQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvcmFkaW8tYnV0dG9uLWZpZWxkL3JhZGlvLWJ1dHRvbi1maWVsZC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBVSxNQUFNLGVBQWUsQ0FBQztBQUN6RCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0saUJBQWlCLENBQUM7Ozs7O0FBWTlDLE1BQU0sT0FBTyx5QkFBeUI7SUFlcEM7UUFiTyxjQUFTLEdBQVcsRUFBRSxDQUFDO1FBRXZCLFlBQU8sR0FBd0I7WUFDcEMsRUFBRSxLQUFLLEVBQUUsS0FBSyxFQUFFLEt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bGVdPVwieyAnanVzdGlmeS1jb250ZW50JzoganVzdGlmeVNwYWNlQmV0d2VlbiA/ICdzcGFjZS1iZXR3ZWVuJyA6ICdmbGV4LXN0YXJ0JyB9XCJcclxuPlxyXG4gIDxkaXYgKm5nRm9yPVwibGV0IG9wdGlvbiBvZiBvcHRpb25zXCIgY2xhc3M9XCJyYWRpby1idXR0b24taXRlbVwiPlxyXG4gICAgPHAtcmFkaW9CdXR0b25cclxuICAgICAgW25hbWVdPVwiZ3JvdXBOYW1lXCJcclxuICAgICAgW3ZhbHVlXT1cIm9wdGlvbi52YWx1ZVwiXHJcbiAgICAgIFtsYWJlbF09XCJvcHRpb24ubGFiZWxcIlxyXG4gICAgICBbZm9ybUNvbnRyb2xdPVwiY29udHJvbFwiXHJcbiAgICA+PC9wLXJhZGlvQnV0dG9uPlxyXG4gIDwvZGl2PlxyXG48L2Rpdj5cclxuIl19
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './range-value.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './range-value.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9yYW5nZS12YWx1ZS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9yYW5nZS12YWx1ZS5jb21wb25lbnQnO1xyXG4iXX0=
|