ngx-vector-components 4.96.1 → 4.97.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 +1239 -1233
- 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 +275 -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 +4566 -4562
- package/fesm2015/ngx-vector-components.mjs.map +1 -1
- package/fesm2020/ngx-vector-components.mjs +4544 -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 -12
- 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 +296 -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,74 +1,74 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { DateTime } from 'luxon';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "../../../services";
|
|
5
|
-
import * as i2 from "primeng/calendar";
|
|
6
|
-
import * as i3 from "../field-error-message/field-error-message.component";
|
|
7
|
-
import * as i4 from "@angular/forms";
|
|
8
|
-
import * as i5 from "@angular/common";
|
|
9
|
-
export class CalendarComponent {
|
|
10
|
-
constructor(modalService) {
|
|
11
|
-
this.modalService = modalService;
|
|
12
|
-
this.isRequired = false;
|
|
13
|
-
this.label = '';
|
|
14
|
-
this.showCalendarOnFocus = true;
|
|
15
|
-
this.min = DateTime.fromFormat('01/01/1900', 'dd/MM/yyyy').toJSDate();
|
|
16
|
-
this.max = DateTime.now().startOf('day').plus({ years: 1 }).toJSDate();
|
|
17
|
-
this.disabledDates = [];
|
|
18
|
-
this.disabled = false;
|
|
19
|
-
this.defaultDate = DateTime.now().toJSDate();
|
|
20
|
-
this.hiddenErrorMessage = false;
|
|
21
|
-
this.keyFilter = '';
|
|
22
|
-
}
|
|
23
|
-
get placeholder() {
|
|
24
|
-
if (!this.label) {
|
|
25
|
-
return '';
|
|
26
|
-
}
|
|
27
|
-
return `${this.label}${this.isRequired ? '*' : ''}`;
|
|
28
|
-
}
|
|
29
|
-
fieldErrorLabel() {
|
|
30
|
-
if (this.control && this.control.invalid && this.control.touched) {
|
|
31
|
-
if (this.control.hasError('required')) {
|
|
32
|
-
return 'Campo obrigatório';
|
|
33
|
-
}
|
|
34
|
-
if (this.control.hasError('maxlength')) {
|
|
35
|
-
return `Tamanho máximo permitido: ${this.control.errors['maxlength'].requiredLength}`;
|
|
36
|
-
}
|
|
37
|
-
return 'Campo inválido';
|
|
38
|
-
}
|
|
39
|
-
return '';
|
|
40
|
-
}
|
|
41
|
-
onShowCalendar() {
|
|
42
|
-
this.modalService.showModalBackground$.next(true);
|
|
43
|
-
}
|
|
44
|
-
onHideCalendar() {
|
|
45
|
-
this.modalService.showModalBackground$.next(false);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarComponent, deps: [{ token: i1.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
-
CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CalendarComponent, selector: "vector-calendar-field", inputs: { isRequired: "isRequired", control: "control", label: "label", showCalendarOnFocus: "showCalendarOnFocus", min: "min", max: "max", disabledDates: "disabledDates", disabled: "disabled", defaultDate: "defaultDate", hiddenErrorMessage: "hiddenErrorMessage" }, ngImport: i0, template: "<div class=\"relative\">\
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
51
|
-
type: Component,
|
|
52
|
-
args: [{ selector: 'vector-calendar-field', template: "<div class=\"relative\">\
|
|
53
|
-
}], ctorParameters: function () { return [{ type: i1.ModalService }]; }, propDecorators: { isRequired: [{
|
|
54
|
-
type: Input
|
|
55
|
-
}], control: [{
|
|
56
|
-
type: Input
|
|
57
|
-
}], label: [{
|
|
58
|
-
type: Input
|
|
59
|
-
}], showCalendarOnFocus: [{
|
|
60
|
-
type: Input
|
|
61
|
-
}], min: [{
|
|
62
|
-
type: Input
|
|
63
|
-
}], max: [{
|
|
64
|
-
type: Input
|
|
65
|
-
}], disabledDates: [{
|
|
66
|
-
type: Input
|
|
67
|
-
}], disabled: [{
|
|
68
|
-
type: Input
|
|
69
|
-
}], defaultDate: [{
|
|
70
|
-
type: Input
|
|
71
|
-
}], hiddenErrorMessage: [{
|
|
72
|
-
type: Input
|
|
73
|
-
}] } });
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { DateTime } from 'luxon';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "../../../services";
|
|
5
|
+
import * as i2 from "primeng/calendar";
|
|
6
|
+
import * as i3 from "../field-error-message/field-error-message.component";
|
|
7
|
+
import * as i4 from "@angular/forms";
|
|
8
|
+
import * as i5 from "@angular/common";
|
|
9
|
+
export class CalendarComponent {
|
|
10
|
+
constructor(modalService) {
|
|
11
|
+
this.modalService = modalService;
|
|
12
|
+
this.isRequired = false;
|
|
13
|
+
this.label = '';
|
|
14
|
+
this.showCalendarOnFocus = true;
|
|
15
|
+
this.min = DateTime.fromFormat('01/01/1900', 'dd/MM/yyyy').toJSDate();
|
|
16
|
+
this.max = DateTime.now().startOf('day').plus({ years: 1 }).toJSDate();
|
|
17
|
+
this.disabledDates = [];
|
|
18
|
+
this.disabled = false;
|
|
19
|
+
this.defaultDate = DateTime.now().toJSDate();
|
|
20
|
+
this.hiddenErrorMessage = false;
|
|
21
|
+
this.keyFilter = '';
|
|
22
|
+
}
|
|
23
|
+
get placeholder() {
|
|
24
|
+
if (!this.label) {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
return `${this.label}${this.isRequired ? '*' : ''}`;
|
|
28
|
+
}
|
|
29
|
+
fieldErrorLabel() {
|
|
30
|
+
if (this.control && this.control.invalid && this.control.touched) {
|
|
31
|
+
if (this.control.hasError('required')) {
|
|
32
|
+
return 'Campo obrigatório';
|
|
33
|
+
}
|
|
34
|
+
if (this.control.hasError('maxlength')) {
|
|
35
|
+
return `Tamanho máximo permitido: ${this.control.errors['maxlength'].requiredLength}`;
|
|
36
|
+
}
|
|
37
|
+
return 'Campo inválido';
|
|
38
|
+
}
|
|
39
|
+
return '';
|
|
40
|
+
}
|
|
41
|
+
onShowCalendar() {
|
|
42
|
+
this.modalService.showModalBackground$.next(true);
|
|
43
|
+
}
|
|
44
|
+
onHideCalendar() {
|
|
45
|
+
this.modalService.showModalBackground$.next(false);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarComponent, deps: [{ token: i1.ModalService }], target: i0.ɵɵFactoryTarget.Component });
|
|
49
|
+
CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CalendarComponent, selector: "vector-calendar-field", inputs: { isRequired: "isRequired", control: "control", label: "label", showCalendarOnFocus: "showCalendarOnFocus", min: "min", max: "max", disabledDates: "disabledDates", disabled: "disabled", defaultDate: "defaultDate", hiddenErrorMessage: "hiddenErrorMessage" }, ngImport: i0, template: "<div class=\"relative\">\n <div class=\"input-container\">\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"control\"\n [showOnFocus]=\"showCalendarOnFocus\"\n [minDate]=\"min\"\n [maxDate]=\"max\"\n icon=\"fas fa-calendar-day\"\n [showIcon]=\"true\"\n [disabledDates]=\"disabledDates\"\n [readonlyInput]=\"false\"\n (onShow)=\"onShowCalendar()\"\n (onClose)=\"onHideCalendar()\"\n [disabled]=\"disabled\"\n [defaultDate]=\"defaultDate\"\n ></p-calendar>\n </div>\n <vector-field-error-message *ngIf=\"!hiddenErrorMessage\" [control]=\"control\"></vector-field-error-message>\n</div>\n", styles: [".input-container input{transition:border-width ease-in-out .08s;border:1px solid rgba(0,0,0,.6);width:100%;padding:6px 30px 6px 12px;font-size:14px;line-height:1.5em;border-radius:var(--border-radius);height:40px}.input-container input:disabled{cursor:not-allowed;background-color:var(--disabled-background);opacity:1}.input-container input:focus{outline:0;box-shadow:none;border-width:2px}.input-container input::placeholder{color:var(--placeholder-color);font-size:12px}.input-container input.ng-touched.ng-invalid{border-color:var(--error-color)!important}.input-container .input-error{font-size:.7em;color:var(--error-color)}\n"], components: [{ type: i2.Calendar, selector: "p-calendar", inputs: ["style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "view", "defaultDate", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { type: i3.FieldErrorMessageComponent, selector: "vector-field-error-message", inputs: ["control"] }], directives: [{ type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
51
|
+
type: Component,
|
|
52
|
+
args: [{ selector: 'vector-calendar-field', template: "<div class=\"relative\">\n <div class=\"input-container\">\n <p-calendar\n appendTo=\"body\"\n [formControl]=\"control\"\n [showOnFocus]=\"showCalendarOnFocus\"\n [minDate]=\"min\"\n [maxDate]=\"max\"\n icon=\"fas fa-calendar-day\"\n [showIcon]=\"true\"\n [disabledDates]=\"disabledDates\"\n [readonlyInput]=\"false\"\n (onShow)=\"onShowCalendar()\"\n (onClose)=\"onHideCalendar()\"\n [disabled]=\"disabled\"\n [defaultDate]=\"defaultDate\"\n ></p-calendar>\n </div>\n <vector-field-error-message *ngIf=\"!hiddenErrorMessage\" [control]=\"control\"></vector-field-error-message>\n</div>\n", styles: [".input-container input{transition:border-width ease-in-out .08s;border:1px solid rgba(0,0,0,.6);width:100%;padding:6px 30px 6px 12px;font-size:14px;line-height:1.5em;border-radius:var(--border-radius);height:40px}.input-container input:disabled{cursor:not-allowed;background-color:var(--disabled-background);opacity:1}.input-container input:focus{outline:0;box-shadow:none;border-width:2px}.input-container input::placeholder{color:var(--placeholder-color);font-size:12px}.input-container input.ng-touched.ng-invalid{border-color:var(--error-color)!important}.input-container .input-error{font-size:.7em;color:var(--error-color)}\n"] }]
|
|
53
|
+
}], ctorParameters: function () { return [{ type: i1.ModalService }]; }, propDecorators: { isRequired: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], control: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}], label: [{
|
|
58
|
+
type: Input
|
|
59
|
+
}], showCalendarOnFocus: [{
|
|
60
|
+
type: Input
|
|
61
|
+
}], min: [{
|
|
62
|
+
type: Input
|
|
63
|
+
}], max: [{
|
|
64
|
+
type: Input
|
|
65
|
+
}], disabledDates: [{
|
|
66
|
+
type: Input
|
|
67
|
+
}], disabled: [{
|
|
68
|
+
type: Input
|
|
69
|
+
}], defaultDate: [{
|
|
70
|
+
type: Input
|
|
71
|
+
}], hiddenErrorMessage: [{
|
|
72
|
+
type: Input
|
|
73
|
+
}] } });
|
|
74
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXItZmllbGQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvY2FsZW5kYXItZmllbGQvY2FsZW5kYXItZmllbGQuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXZlY3Rvci1jb21wb25lbnRzL3NyYy9saWIvY29tcG9uZW50cy9maWVsZHMvY2FsZW5kYXItZmllbGQvY2FsZW5kYXItZmllbGQuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQU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VwiIWhpZGRlbkVycm9yTWVzc2FnZVwiIFtjb250cm9sXT1cImNvbnRyb2xcIj48L3ZlY3Rvci1maWVsZC1lcnJvci1tZXNzYWdlPlxuPC9kaXY+XG4iXX0=
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './calendar-field.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './calendar-field.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9jYWxlbmRhci1maWVsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDRCQUE0QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jYWxlbmRhci1maWVsZC5jb21wb25lbnQnO1xuIl19
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "primeng/checkbox";
|
|
4
|
-
import * as i2 from "@angular/common";
|
|
5
|
-
import * as i3 from "@angular/forms";
|
|
6
|
-
export class CheckboxFieldComponent {
|
|
7
|
-
constructor() {
|
|
8
|
-
this.isRequired = false;
|
|
9
|
-
this.label = '';
|
|
10
|
-
this.rounded = false;
|
|
11
|
-
this.labelSize = 'default';
|
|
12
|
-
this.value = false;
|
|
13
|
-
this.groupName = '';
|
|
14
|
-
this.options = null;
|
|
15
|
-
this.disabled = false;
|
|
16
|
-
this.valueChange = new EventEmitter();
|
|
17
|
-
}
|
|
18
|
-
ngOnInit() { }
|
|
19
|
-
}
|
|
20
|
-
CheckboxFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
-
CheckboxFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CheckboxFieldComponent, selector: "vector-checkbox-field", inputs: { isRequired: "isRequired", control: "control", label: "label", rounded: "rounded", labelSize: "labelSize", value: "value", groupName: "groupName", options: "options", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"checkbox-container flex-wrap\">\
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxFieldComponent, decorators: [{
|
|
23
|
-
type: Component,
|
|
24
|
-
args: [{ selector: 'vector-checkbox-field', template: "<div class=\"checkbox-container flex-wrap\">\
|
|
25
|
-
}], ctorParameters: function () { return []; }, propDecorators: { isRequired: [{
|
|
26
|
-
type: Input
|
|
27
|
-
}], control: [{
|
|
28
|
-
type: Input
|
|
29
|
-
}], label: [{
|
|
30
|
-
type: Input
|
|
31
|
-
}], rounded: [{
|
|
32
|
-
type: Input
|
|
33
|
-
}], labelSize: [{
|
|
34
|
-
type: Input
|
|
35
|
-
}], value: [{
|
|
36
|
-
type: Input
|
|
37
|
-
}], groupName: [{
|
|
38
|
-
type: Input
|
|
39
|
-
}], options: [{
|
|
40
|
-
type: Input
|
|
41
|
-
}], disabled: [{
|
|
42
|
-
type: Input
|
|
43
|
-
}], valueChange: [{
|
|
44
|
-
type: Output
|
|
45
|
-
}] } });
|
|
46
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import * as i1 from "primeng/checkbox";
|
|
4
|
+
import * as i2 from "@angular/common";
|
|
5
|
+
import * as i3 from "@angular/forms";
|
|
6
|
+
export class CheckboxFieldComponent {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.isRequired = false;
|
|
9
|
+
this.label = '';
|
|
10
|
+
this.rounded = false;
|
|
11
|
+
this.labelSize = 'default';
|
|
12
|
+
this.value = false;
|
|
13
|
+
this.groupName = '';
|
|
14
|
+
this.options = null;
|
|
15
|
+
this.disabled = false;
|
|
16
|
+
this.valueChange = new EventEmitter();
|
|
17
|
+
}
|
|
18
|
+
ngOnInit() { }
|
|
19
|
+
}
|
|
20
|
+
CheckboxFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
CheckboxFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.1.3", type: CheckboxFieldComponent, selector: "vector-checkbox-field", inputs: { isRequired: "isRequired", control: "control", label: "label", rounded: "rounded", labelSize: "labelSize", value: "value", groupName: "groupName", options: "options", disabled: "disabled" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"checkbox-container flex-wrap\">\n <ng-container *ngIf=\"control && groupName; else elseBlock\">\n <div class=\"checkbox-item mb-3 mr-3\" *ngFor=\"let option of options\">\n <p-checkbox\n [name]=\"groupName\"\n [formControl]=\"control\"\n [value]=\"option\"\n checkboxIcon=\"fas fa-check\"\n [class.rounded-checkbox]=\"rounded\"\n [inputId]=\"option.code\"\n ></p-checkbox>\n <label [for]=\"option.code\"> {{ option.name }}</label>\n </div>\n </ng-container>\n\n <ng-template #elseBlock>\n <p-checkbox\n *ngIf=\"control && !groupName\"\n [formControl]=\"control\"\n checkboxIcon=\"fas fa-check\"\n [binary]=\"true\"\n [class.rounded-checkbox]=\"rounded\"\n ></p-checkbox>\n <p-checkbox\n *ngIf=\"!control && !groupName\"\n [ngModel]=\"value\"\n (ngModelChange)=\"value = $event; valueChange.emit($event)\"\n checkboxIcon=\"fas fa-check\"\n [binary]=\"true\"\n [class.rounded-checkbox]=\"rounded\"\n [disabled]=\"disabled\"\n ></p-checkbox>\n <label *ngIf=\"label\" [class.large-label]=\"labelSize === 'large'\" (click)=\"control.setValue(!control.value)\"\n >{{ label }}\n <span class=\"red-label\" *ngIf=\"isRequired\"> (*)</span>\n </label>\n </ng-template>\n</div>\n", styles: [".checkbox-container{display:flex;align-items:center}.checkbox-container label{margin-left:10px}.checkbox-container .large-label{font-size:1em}.checkbox-container .checkbox-item{min-width:80px}\n"], components: [{ type: i1.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange"] }], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.3", ngImport: i0, type: CheckboxFieldComponent, decorators: [{
|
|
23
|
+
type: Component,
|
|
24
|
+
args: [{ selector: 'vector-checkbox-field', template: "<div class=\"checkbox-container flex-wrap\">\n <ng-container *ngIf=\"control && groupName; else elseBlock\">\n <div class=\"checkbox-item mb-3 mr-3\" *ngFor=\"let option of options\">\n <p-checkbox\n [name]=\"groupName\"\n [formControl]=\"control\"\n [value]=\"option\"\n checkboxIcon=\"fas fa-check\"\n [class.rounded-checkbox]=\"rounded\"\n [inputId]=\"option.code\"\n ></p-checkbox>\n <label [for]=\"option.code\"> {{ option.name }}</label>\n </div>\n </ng-container>\n\n <ng-template #elseBlock>\n <p-checkbox\n *ngIf=\"control && !groupName\"\n [formControl]=\"control\"\n checkboxIcon=\"fas fa-check\"\n [binary]=\"true\"\n [class.rounded-checkbox]=\"rounded\"\n ></p-checkbox>\n <p-checkbox\n *ngIf=\"!control && !groupName\"\n [ngModel]=\"value\"\n (ngModelChange)=\"value = $event; valueChange.emit($event)\"\n checkboxIcon=\"fas fa-check\"\n [binary]=\"true\"\n [class.rounded-checkbox]=\"rounded\"\n [disabled]=\"disabled\"\n ></p-checkbox>\n <label *ngIf=\"label\" [class.large-label]=\"labelSize === 'large'\" (click)=\"control.setValue(!control.value)\"\n >{{ label }}\n <span class=\"red-label\" *ngIf=\"isRequired\"> (*)</span>\n </label>\n </ng-template>\n</div>\n", styles: [".checkbox-container{display:flex;align-items:center}.checkbox-container label{margin-left:10px}.checkbox-container .large-label{font-size:1em}.checkbox-container .checkbox-item{min-width:80px}\n"] }]
|
|
25
|
+
}], ctorParameters: function () { return []; }, propDecorators: { isRequired: [{
|
|
26
|
+
type: Input
|
|
27
|
+
}], control: [{
|
|
28
|
+
type: Input
|
|
29
|
+
}], label: [{
|
|
30
|
+
type: Input
|
|
31
|
+
}], rounded: [{
|
|
32
|
+
type: Input
|
|
33
|
+
}], labelSize: [{
|
|
34
|
+
type: Input
|
|
35
|
+
}], value: [{
|
|
36
|
+
type: Input
|
|
37
|
+
}], groupName: [{
|
|
38
|
+
type: Input
|
|
39
|
+
}], options: [{
|
|
40
|
+
type: Input
|
|
41
|
+
}], disabled: [{
|
|
42
|
+
type: Input
|
|
43
|
+
}], valueChange: [{
|
|
44
|
+
type: Output
|
|
45
|
+
}] } });
|
|
46
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2hlY2tib3gtZmllb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
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './checkbox-field.component';
|
|
2
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './checkbox-field.component';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtdmVjdG9yLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2ZpZWxkcy9jaGVja2JveC1maWVsZC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDRCQUE0QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jaGVja2JveC1maWVsZC5jb21wb25lbnQnO1xuIl19
|