@koalarx/ui 12.7.19 → 13.0.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/alert/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/alert/{esm2015/koalarx-ui-alert.js → esm2020/koalarx-ui-alert.mjs} +0 -0
- package/alert/esm2020/lib/dialog-alert.component.mjs +48 -0
- package/alert/{esm2015/lib/koala.alert-config.interface.js → esm2020/lib/koala.alert-config.interface.mjs} +0 -0
- package/alert/{esm2015/lib/koala.alert.enum.js → esm2020/lib/koala.alert.enum.mjs} +0 -0
- package/alert/esm2020/lib/koala.alert.module.mjs +48 -0
- package/alert/esm2020/lib/koala.alert.service.mjs +19 -0
- package/alert/{esm2015/lib/koala.request-code-to-alert-enum.translate.js → esm2020/lib/koala.request-code-to-alert-enum.translate.mjs} +0 -0
- package/alert/fesm2015/koalarx-ui-alert.mjs +141 -0
- package/alert/fesm2015/koalarx-ui-alert.mjs.map +1 -0
- package/alert/fesm2020/koalarx-ui-alert.mjs +139 -0
- package/alert/fesm2020/koalarx-ui-alert.mjs.map +1 -0
- package/alert/koalarx-ui-alert.d.ts +1 -0
- package/alert/lib/dialog-alert.component.d.ts +3 -0
- package/alert/lib/koala.alert.module.d.ts +10 -0
- package/alert/lib/koala.alert.service.d.ts +3 -0
- package/alert/package.json +18 -6
- package/button/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/button/{esm2015/koalarx-ui-button.js → esm2020/koalarx-ui-button.mjs} +0 -0
- package/button/esm2020/lib/button.component.mjs +44 -0
- package/button/esm2020/lib/koala.button.module.mjs +42 -0
- package/button/fesm2015/koalarx-ui-button.mjs +90 -0
- package/button/fesm2015/koalarx-ui-button.mjs.map +1 -0
- package/button/fesm2020/koalarx-ui-button.mjs +90 -0
- package/button/fesm2020/koalarx-ui-button.mjs.map +1 -0
- package/button/koalarx-ui-button.d.ts +1 -0
- package/button/lib/button.component.d.ts +6 -1
- package/button/lib/koala.button.module.d.ts +10 -0
- package/button/package.json +18 -6
- package/common/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/common/{esm2015/koalarx-ui-common.js → esm2020/koalarx-ui-common.mjs} +0 -0
- package/common/{esm2015/lib/mask-options.js → esm2020/lib/mask-options.mjs} +0 -0
- package/common/esm2020/lib/services/csv/koala.csv.service.mjs +36 -0
- package/common/{esm2015/lib/services/xlsx/koala.xlsx-config.interface.js → esm2020/lib/services/xlsx/koala.xlsx-config.interface.mjs} +0 -0
- package/common/esm2020/lib/services/xlsx/koala.xlsx.service.mjs +73 -0
- package/common/fesm2015/{koalarx-ui-common.js → koalarx-ui-common.mjs} +14 -14
- package/common/fesm2015/koalarx-ui-common.mjs.map +1 -0
- package/common/fesm2020/koalarx-ui-common.mjs +118 -0
- package/common/fesm2020/koalarx-ui-common.mjs.map +1 -0
- package/common/koalarx-ui-common.d.ts +1 -0
- package/common/lib/services/csv/koala.csv.service.d.ts +3 -0
- package/common/lib/services/xlsx/koala.xlsx.service.d.ts +3 -0
- package/common/package.json +18 -6
- package/core/esm2020/index.mjs +35 -0
- package/core/esm2020/koalarx-ui-core.mjs +5 -0
- package/core/{esm2015/lib/environments/koalaEnvironment.js → esm2020/lib/environments/koalaEnvironment.mjs} +0 -0
- package/core/esm2020/lib/loader/loader-bar-page.component.mjs +24 -0
- package/core/{esm2015/lib/loader/loader-bar-page.interface.js → esm2020/lib/loader/loader-bar-page.interface.mjs} +0 -0
- package/core/{esm2015/lib/loader/loader-config.interface.js → esm2020/lib/loader/loader-config.interface.mjs} +0 -0
- package/core/esm2020/lib/ngx-koala.module.mjs +49 -0
- package/core/{esm2015/lib/page/koala-language.helper.js → esm2020/lib/page/koala-language.helper.mjs} +0 -0
- package/core/{esm2015/lib/page/koala-page-pallet-colors.interface.js → esm2020/lib/page/koala-page-pallet-colors.interface.mjs} +0 -0
- package/core/esm2020/lib/page/koala.page.module.mjs +78 -0
- package/core/{esm2015/lib/page/koala.user-menu-options.interface.js → esm2020/lib/page/koala.user-menu-options.interface.mjs} +0 -0
- package/core/{esm2015/lib/page/notifications/koala.notification.interface.js → esm2020/lib/page/notifications/koala.notification.interface.mjs} +0 -0
- package/core/esm2020/lib/page/notifications/notification.component.mjs +47 -0
- package/core/esm2020/lib/page/page.component.mjs +404 -0
- package/core/esm2020/lib/router/koala.parameter-hash-location-stategy.mjs +18 -0
- package/core/esm2020/lib/services/api-requester/factory/koala.response.factory.mjs +44 -0
- package/core/{esm2015/lib/services/api-requester/helpers/error/koala.client.error.js → esm2020/lib/services/api-requester/helpers/error/koala.client.error.mjs} +0 -0
- package/core/{esm2015/lib/services/api-requester/helpers/error/koala.errors.helper.js → esm2020/lib/services/api-requester/helpers/error/koala.errors.helper.mjs} +0 -0
- package/core/{esm2015/lib/services/api-requester/helpers/error/koala.not-found.error.js → esm2020/lib/services/api-requester/helpers/error/koala.not-found.error.mjs} +0 -0
- package/core/{esm2015/lib/services/api-requester/helpers/error/koala.success.error.js → esm2020/lib/services/api-requester/helpers/error/koala.success.error.mjs} +0 -0
- package/core/{esm2015/lib/services/api-requester/helpers/error/koala.unhautorized.error.js → esm2020/lib/services/api-requester/helpers/error/koala.unhautorized.error.mjs} +0 -0
- package/core/{esm2015/lib/services/api-requester/helpers/service/koala.request-header.helper.js → esm2020/lib/services/api-requester/helpers/service/koala.request-header.helper.mjs} +0 -0
- package/core/esm2020/lib/services/api-requester/koala.api-requester.base.mjs +63 -0
- package/core/esm2020/lib/services/api-requester/koala.api-requester.service.mjs +131 -0
- package/core/esm2020/lib/services/loader/koala.loader.service.mjs +34 -0
- package/core/{esm2015/lib/services/openid/koala-oauth2-config.interface.js → esm2020/lib/services/openid/koala-oauth2-config.interface.mjs} +0 -0
- package/core/esm2020/lib/services/openid/koala.oauth.config.mjs +30 -0
- package/core/esm2020/lib/services/openid/koala.oauth2.service.mjs +194 -0
- package/core/esm2020/lib/services/request/koala.request.service.mjs +52 -0
- package/core/{esm2015/lib/services/token/koala.token.service.js → esm2020/lib/services/token/koala.token.service.mjs} +7 -6
- package/core/esm2020/lib/services/token/token.factory.mjs +27 -0
- package/core/fesm2015/{koalarx-ui-core.js → koalarx-ui-core.mjs} +249 -191
- package/core/fesm2015/koalarx-ui-core.mjs.map +1 -0
- package/core/fesm2020/koalarx-ui-core.mjs +1367 -0
- package/core/fesm2020/koalarx-ui-core.mjs.map +1 -0
- package/core/index.d.ts +1 -0
- package/core/koalarx-ui-core.d.ts +1 -2
- package/core/lib/loader/loader-bar-page.component.d.ts +5 -1
- package/core/lib/ngx-koala.module.d.ts +7 -0
- package/core/lib/page/koala.page.module.d.ts +19 -0
- package/core/lib/page/notifications/notification.component.d.ts +3 -0
- package/core/lib/page/page.component.d.ts +3 -0
- package/core/lib/router/koala.parameter-hash-location-stategy.d.ts +3 -0
- package/core/lib/services/api-requester/koala.api-requester.service.d.ts +3 -0
- package/core/lib/services/loader/koala.loader.service.d.ts +3 -0
- package/core/lib/services/openid/koala.oauth2.service.d.ts +3 -0
- package/core/lib/services/request/koala.request.service.d.ts +3 -0
- package/core/lib/services/token/koala.token.service.d.ts +3 -0
- package/core/package.json +18 -6
- package/dialog/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/dialog/{esm2015/koalarx-ui-dialog.js → esm2020/koalarx-ui-dialog.mjs} +0 -0
- package/dialog/esm2020/lib/dialog.component.mjs +25 -0
- package/dialog/{esm2015/lib/koala.dialog-template.interface.js → esm2020/lib/koala.dialog-template.interface.mjs} +0 -0
- package/dialog/esm2020/lib/koala.dialog.module.mjs +38 -0
- package/dialog/esm2020/lib/koala.dialog.service.mjs +57 -0
- package/dialog/fesm2015/koalarx-ui-dialog.mjs +121 -0
- package/dialog/fesm2015/koalarx-ui-dialog.mjs.map +1 -0
- package/dialog/fesm2020/koalarx-ui-dialog.mjs +121 -0
- package/dialog/fesm2020/koalarx-ui-dialog.mjs.map +1 -0
- package/dialog/koalarx-ui-dialog.d.ts +1 -0
- package/dialog/lib/dialog.component.d.ts +3 -0
- package/dialog/lib/koala.dialog.module.d.ts +9 -0
- package/dialog/lib/koala.dialog.service.d.ts +3 -0
- package/dialog/package.json +18 -6
- package/dynamic-component/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/dynamic-component/{esm2015/koalarx-ui-dynamic-component.js → esm2020/koalarx-ui-dynamic-component.mjs} +0 -0
- package/dynamic-component/{esm2015/lib/koala-dynamic-component.component.js → esm2020/lib/koala-dynamic-component.component.mjs} +0 -0
- package/dynamic-component/esm2020/lib/koala-dynamic-component.directive.mjs +16 -0
- package/dynamic-component/esm2020/lib/koala-dynamic-component.factory.mjs +41 -0
- package/dynamic-component/{esm2015/lib/koala-dynamic-component.js → esm2020/lib/koala-dynamic-component.mjs} +0 -0
- package/dynamic-component/esm2020/lib/koala-dynamic-component.module.mjs +23 -0
- package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.mjs +87 -0
- package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.mjs.map +1 -0
- package/dynamic-component/fesm2020/koalarx-ui-dynamic-component.mjs +86 -0
- package/dynamic-component/fesm2020/koalarx-ui-dynamic-component.mjs.map +1 -0
- package/dynamic-component/koalarx-ui-dynamic-component.d.ts +1 -0
- package/dynamic-component/lib/koala-dynamic-component.directive.d.ts +3 -0
- package/dynamic-component/lib/koala-dynamic-component.factory.d.ts +3 -0
- package/dynamic-component/lib/koala-dynamic-component.module.d.ts +6 -0
- package/dynamic-component/package.json +18 -6
- package/file-button/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/file-button/{esm2015/koalarx-ui-file-button.js → esm2020/koalarx-ui-file-button.mjs} +0 -0
- package/file-button/esm2020/lib/file-button.component.mjs +125 -0
- package/file-button/esm2020/lib/koala.btn-file.service.mjs +25 -0
- package/file-button/esm2020/lib/koala.file-button.module.mjs +38 -0
- package/file-button/{esm2015/lib/koala.file.interface.js → esm2020/lib/koala.file.interface.mjs} +0 -0
- package/file-button/fesm2015/koalarx-ui-file-button.mjs +199 -0
- package/file-button/fesm2015/koalarx-ui-file-button.mjs.map +1 -0
- package/file-button/fesm2020/koalarx-ui-file-button.mjs +189 -0
- package/file-button/fesm2020/koalarx-ui-file-button.mjs.map +1 -0
- package/file-button/koalarx-ui-file-button.d.ts +1 -0
- package/file-button/lib/file-button.component.d.ts +4 -1
- package/file-button/lib/koala.btn-file.service.d.ts +3 -0
- package/file-button/lib/koala.file-button.module.d.ts +9 -0
- package/file-button/package.json +18 -6
- package/folder-page/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/folder-page/{esm2015/koalarx-ui-folder-page.js → esm2020/koalarx-ui-folder-page.mjs} +0 -0
- package/folder-page/esm2020/lib/folder.component.mjs +70 -0
- package/folder-page/{esm2015/lib/koala-navigate-history.interface.js → esm2020/lib/koala-navigate-history.interface.mjs} +0 -0
- package/folder-page/esm2020/lib/koala.folder-page.module.mjs +42 -0
- package/folder-page/fesm2015/koalarx-ui-folder-page.mjs +117 -0
- package/folder-page/fesm2015/koalarx-ui-folder-page.mjs.map +1 -0
- package/folder-page/fesm2020/koalarx-ui-folder-page.mjs +116 -0
- package/folder-page/fesm2020/koalarx-ui-folder-page.mjs.map +1 -0
- package/folder-page/koalarx-ui-folder-page.d.ts +1 -0
- package/folder-page/lib/folder.component.d.ts +6 -2
- package/folder-page/lib/koala.folder-page.module.d.ts +10 -0
- package/folder-page/package.json +18 -6
- package/form/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/form/{esm2015/koalarx-ui-form.js → esm2020/koalarx-ui-form.mjs} +0 -0
- package/form/esm2020/lib/btn-submit/btn-submit.component.mjs +49 -0
- package/form/esm2020/lib/directives/koala-autofocus.directive.mjs +25 -0
- package/form/esm2020/lib/dynamic-form/builder/dynamic-form.builder.mjs +138 -0
- package/form/{esm2015/lib/dynamic-form/builder/fields/autocomplete.builder.js → esm2020/lib/dynamic-form/builder/fields/autocomplete.builder.mjs} +0 -0
- package/form/esm2020/lib/dynamic-form/builder/fields/field.base.mjs +148 -0
- package/form/{esm2015/lib/dynamic-form/builder/fields/field.builder.js → esm2020/lib/dynamic-form/builder/fields/field.builder.mjs} +0 -0
- package/form/esm2020/lib/dynamic-form/builder/fields/more-items.builder.mjs +57 -0
- package/form/esm2020/lib/dynamic-form/dynamic-form.component.mjs +581 -0
- package/form/{esm2015/lib/dynamic-form/enums/dynamic-form-type-field.enum.js → esm2020/lib/dynamic-form/enums/dynamic-form-type-field.enum.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/interfaces/koala-custom-validator-fn.interface.js → esm2020/lib/dynamic-form/interfaces/koala-custom-validator-fn.interface.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/interfaces/koala.dynamic-autocomplete-options.interface.js → esm2020/lib/dynamic-form/interfaces/koala.dynamic-autocomplete-options.interface.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/interfaces/koala.dynamic-form-autocomplete-multiple-config.interface.js → esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-autocomplete-multiple-config.interface.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/interfaces/koala.dynamic-form-config.interface.js → esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-config.interface.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/interfaces/koala.dynamic-form-field.interface.js → esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-field.interface.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/interfaces/koala.dynamic-form-more-itens-show-field-config.interface.js → esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-more-itens-show-field-config.interface.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/interfaces/koala.dynamic-form-show-field.interface.js → esm2020/lib/dynamic-form/interfaces/koala.dynamic-form-show-field.interface.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/interfaces/koala.dynamic-set-value.interface.js → esm2020/lib/dynamic-form/interfaces/koala.dynamic-set-value.interface.mjs} +0 -0
- package/form/esm2020/lib/dynamic-form/koala.dynamic-form.service.mjs +199 -0
- package/form/{esm2015/lib/dynamic-form/validators/autocomplete-selected.validator.js → esm2020/lib/dynamic-form/validators/autocomplete-selected.validator.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/validators/cnpj.validator.js → esm2020/lib/dynamic-form/validators/cnpj.validator.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/validators/cpf.validator.js → esm2020/lib/dynamic-form/validators/cpf.validator.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/validators/date-max.validator.js → esm2020/lib/dynamic-form/validators/date-max.validator.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/validators/date-min.validator.js → esm2020/lib/dynamic-form/validators/date-min.validator.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/validators/koala-dynamic-form-validator-result.helper.js → esm2020/lib/dynamic-form/validators/koala-dynamic-form-validator-result.helper.mjs} +0 -0
- package/form/{esm2015/lib/dynamic-form/validators/validation.helper.js → esm2020/lib/dynamic-form/validators/validation.helper.mjs} +0 -0
- package/form/{esm2015/lib/form.abstract.js → esm2020/lib/form.abstract.mjs} +0 -0
- package/form/esm2020/lib/koala.form.module.mjs +134 -0
- package/form/{esm2015/lib/show-invalid-fields/show-invalid-fields.js → esm2020/lib/show-invalid-fields/show-invalid-fields.mjs} +0 -0
- package/form/fesm2015/koalarx-ui-form.mjs +1575 -0
- package/form/fesm2015/koalarx-ui-form.mjs.map +1 -0
- package/form/fesm2020/koalarx-ui-form.mjs +1557 -0
- package/form/fesm2020/koalarx-ui-form.mjs.map +1 -0
- package/form/koalarx-ui-form.d.ts +1 -0
- package/form/lib/btn-submit/btn-submit.component.d.ts +3 -0
- package/form/lib/directives/koala-autofocus.directive.d.ts +3 -0
- package/form/lib/dynamic-form/dynamic-form.component.d.ts +7 -1
- package/form/lib/dynamic-form/koala.dynamic-form.service.d.ts +3 -0
- package/form/lib/koala.form.module.d.ts +23 -0
- package/form/package.json +18 -6
- package/icon/{esm2015/index.js → esm2020/index.mjs} +2 -1
- package/icon/{esm2015/koalarx-ui-icon.js → esm2020/koalarx-ui-icon.mjs} +0 -0
- package/icon/esm2020/lib/icon.component.mjs +46 -0
- package/icon/esm2020/lib/koala.icon.module.mjs +26 -0
- package/icon/esm2020/lib/koala.icon.type.mjs +2 -0
- package/icon/fesm2015/koalarx-ui-icon.mjs +77 -0
- package/icon/{esm2015/lib/icon.component.js → fesm2015/koalarx-ui-icon.mjs.map} +1 -45
- package/icon/fesm2020/koalarx-ui-icon.mjs +76 -0
- package/icon/{fesm2015/koalarx-ui-icon.js → fesm2020/koalarx-ui-icon.mjs.map} +1 -69
- package/icon/index.d.ts +1 -0
- package/icon/koalarx-ui-icon.d.ts +1 -0
- package/icon/lib/icon.component.d.ts +4 -1
- package/icon/lib/koala.icon.module.d.ts +6 -0
- package/icon/lib/koala.icon.type.d.ts +1 -0
- package/icon/package.json +18 -6
- package/icons-animated/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/icons-animated/esm2020/koalarx-ui-icons-animated.mjs +5 -0
- package/icons-animated/esm2020/lib/icons/downloading/downloading-icon-animated.component.mjs +23 -0
- package/icons-animated/esm2020/lib/icons/loading/loading-icon-animated.component.mjs +23 -0
- package/icons-animated/esm2020/lib/icons-animated.component.mjs +20 -0
- package/icons-animated/esm2020/lib/icons-animated.service.mjs +32 -0
- package/icons-animated/esm2020/lib/koala-icons-animated.module.mjs +32 -0
- package/icons-animated/fesm2015/koalarx-ui-icons-animated.mjs +122 -0
- package/icons-animated/fesm2015/koalarx-ui-icons-animated.mjs.map +1 -0
- package/icons-animated/fesm2020/koalarx-ui-icons-animated.mjs +120 -0
- package/icons-animated/fesm2020/koalarx-ui-icons-animated.mjs.map +1 -0
- package/icons-animated/koalarx-ui-icons-animated.d.ts +1 -1
- package/icons-animated/lib/icons/downloading/downloading-icon-animated.component.d.ts +5 -2
- package/icons-animated/lib/icons/loading/loading-icon-animated.component.d.ts +5 -2
- package/icons-animated/lib/icons-animated.component.d.ts +3 -0
- package/icons-animated/lib/icons-animated.service.d.ts +3 -0
- package/icons-animated/lib/koala-icons-animated.module.d.ts +8 -0
- package/icons-animated/package.json +18 -6
- package/list/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/list/{esm2015/koalarx-ui-list.js → esm2020/koalarx-ui-list.mjs} +0 -0
- package/list/{esm2015/lib/koala-list-btn-collapse-sub-list-config.interface.js → esm2020/lib/koala-list-btn-collapse-sub-list-config.interface.mjs} +0 -0
- package/list/{esm2015/lib/koala-list-filter.interface.js → esm2020/lib/koala-list-filter.interface.mjs} +0 -0
- package/list/{esm2015/lib/koala-list-form-filter.interface.js → esm2020/lib/koala-list-form-filter.interface.mjs} +0 -0
- package/list/{esm2015/lib/koala-list-item-menu-option.interface.js → esm2020/lib/koala-list-item-menu-option.interface.mjs} +0 -0
- package/list/{esm2015/lib/koala-list-item.interface.js → esm2020/lib/koala-list-item.interface.mjs} +0 -0
- package/list/{esm2015/lib/koala.list-config.interface.js → esm2020/lib/koala.list-config.interface.mjs} +0 -0
- package/list/esm2020/lib/koala.list.module.mjs +70 -0
- package/list/esm2020/lib/koala.list.service.mjs +15 -0
- package/list/esm2020/lib/list-builder/list.builder.mjs +97 -0
- package/list/esm2020/lib/list.abstract.mjs +157 -0
- package/list/esm2020/lib/list.component.mjs +171 -0
- package/list/esm2020/lib/providers/pagination/pagination.provider.mjs +32 -0
- package/list/fesm2015/koalarx-ui-list.mjs +559 -0
- package/list/fesm2015/koalarx-ui-list.mjs.map +1 -0
- package/list/fesm2020/koalarx-ui-list.mjs +529 -0
- package/list/fesm2020/koalarx-ui-list.mjs.map +1 -0
- package/list/koalarx-ui-list.d.ts +1 -0
- package/list/lib/koala.list.module.d.ts +15 -0
- package/list/lib/koala.list.service.d.ts +3 -0
- package/list/lib/list.component.d.ts +3 -0
- package/list/lib/providers/pagination/pagination.provider.d.ts +3 -0
- package/list/package.json +18 -6
- package/menu/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/menu/{esm2015/koalarx-ui-menu.js → esm2020/koalarx-ui-menu.mjs} +0 -0
- package/menu/{esm2015/lib/koala.menu-module.interface.js → esm2020/lib/koala.menu-module.interface.mjs} +0 -0
- package/menu/{esm2015/lib/koala.menu-tool.interface.js → esm2020/lib/koala.menu-tool.interface.mjs} +0 -0
- package/menu/esm2020/lib/koala.menu.module.mjs +38 -0
- package/menu/esm2020/lib/koala.menu.service.mjs +24 -0
- package/menu/esm2020/lib/menu.component.mjs +100 -0
- package/menu/fesm2015/koalarx-ui-menu.mjs +167 -0
- package/menu/fesm2015/koalarx-ui-menu.mjs.map +1 -0
- package/menu/fesm2020/koalarx-ui-menu.mjs +162 -0
- package/menu/fesm2020/koalarx-ui-menu.mjs.map +1 -0
- package/menu/koalarx-ui-menu.d.ts +1 -0
- package/menu/lib/koala.menu.module.d.ts +9 -0
- package/menu/lib/koala.menu.service.d.ts +3 -0
- package/menu/lib/menu.component.d.ts +6 -0
- package/menu/package.json +18 -6
- package/package.json +1 -1
- package/question/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/question/{esm2015/koalarx-ui-question.js → esm2020/koalarx-ui-question.mjs} +0 -0
- package/question/esm2020/lib/dialog-question.component.mjs +25 -0
- package/question/{esm2015/lib/koala-question-config.interface.js → esm2020/lib/koala-question-config.interface.mjs} +0 -0
- package/question/esm2020/lib/koala.question.module.mjs +42 -0
- package/question/esm2020/lib/koala.question.service.mjs +26 -0
- package/question/fesm2015/koalarx-ui-question.mjs +95 -0
- package/question/fesm2015/koalarx-ui-question.mjs.map +1 -0
- package/question/fesm2020/koalarx-ui-question.mjs +93 -0
- package/question/fesm2020/koalarx-ui-question.mjs.map +1 -0
- package/question/koalarx-ui-question.d.ts +1 -0
- package/question/lib/dialog-question.component.d.ts +3 -0
- package/question/lib/koala.question.module.d.ts +10 -0
- package/question/lib/koala.question.service.d.ts +3 -0
- package/question/package.json +18 -6
- package/snackbar/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/snackbar/{esm2015/koalarx-ui-snackbar.js → esm2020/koalarx-ui-snackbar.mjs} +0 -0
- package/snackbar/esm2020/lib/koala.snackbar.component.mjs +22 -0
- package/snackbar/{esm2015/lib/koala.snackbar.interface.js → esm2020/lib/koala.snackbar.interface.mjs} +0 -0
- package/snackbar/esm2020/lib/koala.snackbar.module.mjs +38 -0
- package/snackbar/esm2020/lib/koala.snackbar.service.mjs +35 -0
- package/snackbar/fesm2015/koalarx-ui-snackbar.mjs +95 -0
- package/snackbar/fesm2015/koalarx-ui-snackbar.mjs.map +1 -0
- package/snackbar/fesm2020/koalarx-ui-snackbar.mjs +93 -0
- package/snackbar/fesm2020/koalarx-ui-snackbar.mjs.map +1 -0
- package/snackbar/koalarx-ui-snackbar.d.ts +1 -0
- package/snackbar/lib/koala.snackbar.component.d.ts +3 -0
- package/snackbar/lib/koala.snackbar.module.d.ts +8 -0
- package/snackbar/lib/koala.snackbar.service.d.ts +3 -0
- package/snackbar/package.json +18 -6
- package/alert/bundles/koalarx-ui-alert.umd.js +0 -153
- package/alert/bundles/koalarx-ui-alert.umd.js.map +0 -1
- package/alert/esm2015/lib/dialog-alert.component.js +0 -43
- package/alert/esm2015/lib/koala.alert.module.js +0 -31
- package/alert/esm2015/lib/koala.alert.service.js +0 -21
- package/alert/fesm2015/koalarx-ui-alert.js +0 -121
- package/alert/fesm2015/koalarx-ui-alert.js.map +0 -1
- package/alert/koalarx-ui-alert.metadata.json +0 -1
- package/button/bundles/koalarx-ui-button.umd.js +0 -71
- package/button/bundles/koalarx-ui-button.umd.js.map +0 -1
- package/button/esm2015/lib/button.component.js +0 -31
- package/button/esm2015/lib/koala.button.module.js +0 -27
- package/button/fesm2015/koalarx-ui-button.js +0 -63
- package/button/fesm2015/koalarx-ui-button.js.map +0 -1
- package/button/koalarx-ui-button.metadata.json +0 -1
- package/common/bundles/koalarx-ui-common.umd.js +0 -481
- package/common/bundles/koalarx-ui-common.umd.js.map +0 -1
- package/common/esm2015/lib/services/csv/koala.csv.service.js +0 -38
- package/common/esm2015/lib/services/xlsx/koala.xlsx.service.js +0 -74
- package/common/fesm2015/koalarx-ui-common.js.map +0 -1
- package/common/koalarx-ui-common.metadata.json +0 -1
- package/core/bundles/koalarx-ui-core.umd.js +0 -1716
- package/core/bundles/koalarx-ui-core.umd.js.map +0 -1
- package/core/esm2015/index.js +0 -34
- package/core/esm2015/koalarx-ui-core.js +0 -7
- package/core/esm2015/lib/loader/loader-bar-page.component.js +0 -22
- package/core/esm2015/lib/ngx-koala.module.js +0 -35
- package/core/esm2015/lib/page/koala.page.module.js +0 -46
- package/core/esm2015/lib/page/notifications/notification.component.js +0 -43
- package/core/esm2015/lib/page/page.component.js +0 -396
- package/core/esm2015/lib/router/koala.parameter-hash-location-stategy.js +0 -16
- package/core/esm2015/lib/services/api-requester/factory/koala.response.factory.js +0 -48
- package/core/esm2015/lib/services/api-requester/koala.api-requester.base.js +0 -70
- package/core/esm2015/lib/services/api-requester/koala.api-requester.service.js +0 -134
- package/core/esm2015/lib/services/loader/koala.loader.service.js +0 -32
- package/core/esm2015/lib/services/openid/koala.oauth.config.js +0 -33
- package/core/esm2015/lib/services/openid/koala.oauth2.service.js +0 -201
- package/core/esm2015/lib/services/request/koala.request.service.js +0 -53
- package/core/esm2015/lib/services/token/token.factory.js +0 -31
- package/core/fesm2015/koalarx-ui-core.js.map +0 -1
- package/core/koalarx-ui-core.metadata.json +0 -1
- package/dialog/bundles/koalarx-ui-dialog.umd.js +0 -139
- package/dialog/bundles/koalarx-ui-dialog.umd.js.map +0 -1
- package/dialog/esm2015/lib/dialog.component.js +0 -18
- package/dialog/esm2015/lib/koala.dialog.module.js +0 -25
- package/dialog/esm2015/lib/koala.dialog.service.js +0 -61
- package/dialog/fesm2015/koalarx-ui-dialog.js +0 -107
- package/dialog/fesm2015/koalarx-ui-dialog.js.map +0 -1
- package/dialog/koalarx-ui-dialog.metadata.json +0 -1
- package/dynamic-component/bundles/koalarx-ui-dynamic-component.umd.js +0 -95
- package/dynamic-component/bundles/koalarx-ui-dynamic-component.umd.js.map +0 -1
- package/dynamic-component/esm2015/lib/koala-dynamic-component.directive.js +0 -15
- package/dynamic-component/esm2015/lib/koala-dynamic-component.factory.js +0 -38
- package/dynamic-component/esm2015/lib/koala-dynamic-component.module.js +0 -17
- package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.js +0 -79
- package/dynamic-component/fesm2015/koalarx-ui-dynamic-component.js.map +0 -1
- package/dynamic-component/koalarx-ui-dynamic-component.metadata.json +0 -1
- package/file-button/bundles/koalarx-ui-file-button.umd.js +0 -553
- package/file-button/bundles/koalarx-ui-file-button.umd.js.map +0 -1
- package/file-button/esm2015/lib/file-button.component.js +0 -118
- package/file-button/esm2015/lib/koala.btn-file.service.js +0 -26
- package/file-button/esm2015/lib/koala.file-button.module.js +0 -25
- package/file-button/fesm2015/koalarx-ui-file-button.js +0 -171
- package/file-button/fesm2015/koalarx-ui-file-button.js.map +0 -1
- package/file-button/koalarx-ui-file-button.metadata.json +0 -1
- package/folder-page/bundles/koalarx-ui-folder-page.umd.js +0 -97
- package/folder-page/bundles/koalarx-ui-folder-page.umd.js.map +0 -1
- package/folder-page/esm2015/lib/folder.component.js +0 -56
- package/folder-page/esm2015/lib/koala.folder-page.module.js +0 -27
- package/folder-page/fesm2015/koalarx-ui-folder-page.js +0 -88
- package/folder-page/fesm2015/koalarx-ui-folder-page.js.map +0 -1
- package/folder-page/koalarx-ui-folder-page.metadata.json +0 -1
- package/form/bundles/koalarx-ui-form.umd.js +0 -1969
- package/form/bundles/koalarx-ui-form.umd.js.map +0 -1
- package/form/esm2015/lib/btn-submit/btn-submit.component.js +0 -39
- package/form/esm2015/lib/directives/koala-autofocus.directive.js +0 -25
- package/form/esm2015/lib/dynamic-form/builder/dynamic-form.builder.js +0 -141
- package/form/esm2015/lib/dynamic-form/builder/fields/field.base.js +0 -151
- package/form/esm2015/lib/dynamic-form/builder/fields/more-items.builder.js +0 -57
- package/form/esm2015/lib/dynamic-form/dynamic-form.component.js +0 -564
- package/form/esm2015/lib/dynamic-form/koala.dynamic-form.service.js +0 -204
- package/form/esm2015/lib/koala.form.module.js +0 -69
- package/form/fesm2015/koalarx-ui-form.js +0 -1487
- package/form/fesm2015/koalarx-ui-form.js.map +0 -1
- package/form/koalarx-ui-form.metadata.json +0 -1
- package/icon/bundles/koalarx-ui-icon.umd.js +0 -76
- package/icon/bundles/koalarx-ui-icon.umd.js.map +0 -1
- package/icon/esm2015/lib/koala.icon.module.js +0 -19
- package/icon/fesm2015/koalarx-ui-icon.js.map +0 -1
- package/icon/koalarx-ui-icon.metadata.json +0 -1
- package/icons-animated/bundles/koalarx-ui-icons-animated.umd.js +0 -138
- package/icons-animated/bundles/koalarx-ui-icons-animated.umd.js.map +0 -1
- package/icons-animated/esm2015/koalarx-ui-icons-animated.js +0 -6
- package/icons-animated/esm2015/lib/icons/downloading/downloading-icon-animated.component.js +0 -28
- package/icons-animated/esm2015/lib/icons/loading/loading-icon-animated.component.js +0 -28
- package/icons-animated/esm2015/lib/icons-animated.component.js +0 -15
- package/icons-animated/esm2015/lib/icons-animated.service.js +0 -29
- package/icons-animated/esm2015/lib/koala-icons-animated.module.js +0 -23
- package/icons-animated/fesm2015/koalarx-ui-icons-animated.js +0 -121
- package/icons-animated/fesm2015/koalarx-ui-icons-animated.js.map +0 -1
- package/icons-animated/koalarx-ui-icons-animated.metadata.json +0 -1
- package/list/bundles/koalarx-ui-list.umd.js +0 -914
- package/list/bundles/koalarx-ui-list.umd.js.map +0 -1
- package/list/esm2015/lib/koala.list.module.js +0 -42
- package/list/esm2015/lib/koala.list.service.js +0 -13
- package/list/esm2015/lib/list-builder/list.builder.js +0 -101
- package/list/esm2015/lib/list.abstract.js +0 -174
- package/list/esm2015/lib/list.component.js +0 -166
- package/list/esm2015/lib/providers/pagination/pagination.provider.js +0 -30
- package/list/fesm2015/koalarx-ui-list.js +0 -514
- package/list/fesm2015/koalarx-ui-list.js.map +0 -1
- package/list/koalarx-ui-list.metadata.json +0 -1
- package/menu/bundles/koalarx-ui-menu.umd.js +0 -511
- package/menu/bundles/koalarx-ui-menu.umd.js.map +0 -1
- package/menu/esm2015/lib/koala.menu.module.js +0 -25
- package/menu/esm2015/lib/koala.menu.service.js +0 -22
- package/menu/esm2015/lib/menu.component.js +0 -104
- package/menu/fesm2015/koalarx-ui-menu.js +0 -153
- package/menu/fesm2015/koalarx-ui-menu.js.map +0 -1
- package/menu/koalarx-ui-menu.metadata.json +0 -1
- package/question/bundles/koalarx-ui-question.umd.js +0 -104
- package/question/bundles/koalarx-ui-question.umd.js.map +0 -1
- package/question/esm2015/lib/dialog-question.component.js +0 -20
- package/question/esm2015/lib/koala.question.module.js +0 -27
- package/question/esm2015/lib/koala.question.service.js +0 -28
- package/question/fesm2015/koalarx-ui-question.js +0 -77
- package/question/fesm2015/koalarx-ui-question.js.map +0 -1
- package/question/koalarx-ui-question.metadata.json +0 -1
- package/snackbar/bundles/koalarx-ui-snackbar.umd.js +0 -93
- package/snackbar/bundles/koalarx-ui-snackbar.umd.js.map +0 -1
- package/snackbar/esm2015/lib/koala.snackbar.component.js +0 -20
- package/snackbar/esm2015/lib/koala.snackbar.module.js +0 -26
- package/snackbar/esm2015/lib/koala.snackbar.service.js +0 -35
- package/snackbar/fesm2015/koalarx-ui-snackbar.js +0 -81
- package/snackbar/fesm2015/koalarx-ui-snackbar.js.map +0 -1
- package/snackbar/koalarx-ui-snackbar.metadata.json +0 -1
|
@@ -1,1969 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@koalarx/ui/core'), require('@angular/forms'), require('@koalarx/utils'), require('ngx-device-detector'), require('@koalarx/utils/operators/string'), require('rxjs/operators'), require('@koalarx/utils/operators/delay'), require('@angular/common'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/radio'), require('@angular/material/checkbox'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/icon'), require('@angular/material/progress-spinner'), require('ngx-mask'), require('@koalarx/ui/common'), require('ng2-currency-mask'), require('@koalarx/ui/button'), require('@angular/material/expansion'), require('@koalarx/ui/file-button'), require('@angular/material/chips')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@koalarx/ui/form', ['exports', '@angular/core', 'rxjs', '@koalarx/ui/core', '@angular/forms', '@koalarx/utils', 'ngx-device-detector', '@koalarx/utils/operators/string', 'rxjs/operators', '@koalarx/utils/operators/delay', '@angular/common', '@angular/material/input', '@angular/material/select', '@angular/material/radio', '@angular/material/checkbox', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/icon', '@angular/material/progress-spinner', 'ngx-mask', '@koalarx/ui/common', 'ng2-currency-mask', '@koalarx/ui/button', '@angular/material/expansion', '@koalarx/ui/file-button', '@angular/material/chips'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.koalarx = global.koalarx || {}, global.koalarx.ui = global.koalarx.ui || {}, global.koalarx.ui.form = {}), global.ng.core, global.rxjs, global.core, global.ng.forms, global.utils, global.i2, global.string, global.rxjs.operators, global.delay, global.ng.common, global.ng.material.input, global.ng.material.select, global.ng.material.radio, global.ng.material.checkbox, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.icon, global.ng.material.progressSpinner, global["ngx-mask"], global.common$1, global.ng2CurrencyMask, global.button, global.ng.material.expansion, global.fileButton, global.ng.material.chips));
|
|
5
|
-
})(this, (function (exports, i0, rxjs, core, i1, utils, i2, string, operators, delay, common, input, select, radio, checkbox, autocomplete, button, icon, progressSpinner, ngxMask, common$1, ng2CurrencyMask, button$1, expansion, fileButton, chips) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () { return e[k]; }
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
n["default"] = e;
|
|
22
|
-
return Object.freeze(n);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
28
|
-
|
|
29
|
-
var BtnSubmitComponent = /** @class */ (function () {
|
|
30
|
-
function BtnSubmitComponent() {
|
|
31
|
-
this.color = 'primary';
|
|
32
|
-
this.btnLabel = core.KoalaLanguageHelper.getBtnLabel();
|
|
33
|
-
this.btnSubmitDisabled = false;
|
|
34
|
-
this.disabled = new rxjs.BehaviorSubject(false);
|
|
35
|
-
}
|
|
36
|
-
BtnSubmitComponent.prototype.ngOnInit = function () {
|
|
37
|
-
if (!this.btnLabel) {
|
|
38
|
-
this.btnLabel = core.KoalaLanguageHelper.getBtnLabel();
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
BtnSubmitComponent.prototype.ngOnChanges = function (changes) {
|
|
42
|
-
if (changes.btnSubmitDisabled) {
|
|
43
|
-
this.disabled.next(changes.btnSubmitDisabled.currentValue);
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
return BtnSubmitComponent;
|
|
47
|
-
}());
|
|
48
|
-
BtnSubmitComponent.decorators = [
|
|
49
|
-
{ type: i0.Component, args: [{
|
|
50
|
-
selector: 'koala-submit',
|
|
51
|
-
template: "<button\n\t*ngIf=\"!iconButton else btnIcon\"\n\t[color]=\"color\"\n\t[disabled]=\"(disabled | async) || fg.invalid || fg.pending\"\n\tmat-raised-button\n\ttype=\"submit\">\n <span>{{btnLabel}}</span>\n <mat-spinner *ngIf=\"loader | async\" diameter=\"20\"></mat-spinner>\n</button>\n<ng-template #btnIcon>\n <button\n\t [color]=\"color\"\n\t [disabled]=\"(disabled | async) || fg.invalid || fg.pending\"\n\t class=\"koala-icon-button\"\n\t mat-icon-button\n\t type=\"submit\">\n <mat-spinner *ngIf=\"loader | async\" [color]=\"color\" diameter=\"20\"></mat-spinner>\n <mat-icon *ngIf=\"!(loader | async)\">{{icon}}</mat-icon>\n </button>\n</ng-template>\n",
|
|
52
|
-
styles: [".mat-spinner{display:inline-block;margin-left:8px}.koala-button{padding:2px 8px}.koala-icon-button mat-spinner{position:relative;display:inline-flex;margin:0}\n"]
|
|
53
|
-
},] }
|
|
54
|
-
];
|
|
55
|
-
BtnSubmitComponent.propDecorators = {
|
|
56
|
-
fg: [{ type: i0.Input }],
|
|
57
|
-
color: [{ type: i0.Input }],
|
|
58
|
-
btnLabel: [{ type: i0.Input }],
|
|
59
|
-
btnSubmitDisabled: [{ type: i0.Input }],
|
|
60
|
-
loader: [{ type: i0.Input }],
|
|
61
|
-
iconButton: [{ type: i0.Input }],
|
|
62
|
-
icon: [{ type: i0.Input }],
|
|
63
|
-
iconColor: [{ type: i0.Input }]
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
exports.DynamicFormTypeFieldEnum = void 0;
|
|
67
|
-
(function (DynamicFormTypeFieldEnum) {
|
|
68
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["text"] = 1] = "text";
|
|
69
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["password"] = 2] = "password";
|
|
70
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["cpf"] = 3] = "cpf";
|
|
71
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["cnpj"] = 4] = "cnpj";
|
|
72
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["datetime"] = 5] = "datetime";
|
|
73
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["email"] = 6] = "email";
|
|
74
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["phone"] = 7] = "phone";
|
|
75
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["number"] = 8] = "number";
|
|
76
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["valueList"] = 9] = "valueList";
|
|
77
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["textarea"] = 10] = "textarea";
|
|
78
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["time"] = 11] = "time";
|
|
79
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["hoursAndMinutes"] = 12] = "hoursAndMinutes";
|
|
80
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["checkbox"] = 13] = "checkbox";
|
|
81
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["select"] = 14] = "select";
|
|
82
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["coin"] = 15] = "coin";
|
|
83
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["percent"] = 16] = "percent";
|
|
84
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["moreItems"] = 17] = "moreItems";
|
|
85
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["id"] = 18] = "id";
|
|
86
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["textLogs"] = 19] = "textLogs";
|
|
87
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["file"] = 20] = "file";
|
|
88
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["autocomplete"] = 21] = "autocomplete";
|
|
89
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["color"] = 22] = "color";
|
|
90
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["dynamicForm"] = 23] = "dynamicForm";
|
|
91
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["date"] = 24] = "date";
|
|
92
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["radio"] = 25] = "radio";
|
|
93
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["float"] = 26] = "float";
|
|
94
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["stringNumber"] = 27] = "stringNumber";
|
|
95
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["selectMultipleNative"] = 28] = "selectMultipleNative";
|
|
96
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["month"] = 29] = "month";
|
|
97
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["competenceDate"] = 30] = "competenceDate";
|
|
98
|
-
DynamicFormTypeFieldEnum[DynamicFormTypeFieldEnum["stringWithCustomMasc"] = 31] = "stringWithCustomMasc";
|
|
99
|
-
})(exports.DynamicFormTypeFieldEnum || (exports.DynamicFormTypeFieldEnum = {}));
|
|
100
|
-
|
|
101
|
-
/*! *****************************************************************************
|
|
102
|
-
Copyright (c) Microsoft Corporation.
|
|
103
|
-
|
|
104
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
105
|
-
purpose with or without fee is hereby granted.
|
|
106
|
-
|
|
107
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
108
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
109
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
110
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
111
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
112
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
113
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
114
|
-
***************************************************************************** */
|
|
115
|
-
/* global Reflect, Promise */
|
|
116
|
-
var extendStatics = function (d, b) {
|
|
117
|
-
extendStatics = Object.setPrototypeOf ||
|
|
118
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
119
|
-
function (d, b) { for (var p in b)
|
|
120
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
121
|
-
d[p] = b[p]; };
|
|
122
|
-
return extendStatics(d, b);
|
|
123
|
-
};
|
|
124
|
-
function __extends(d, b) {
|
|
125
|
-
if (typeof b !== "function" && b !== null)
|
|
126
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
127
|
-
extendStatics(d, b);
|
|
128
|
-
function __() { this.constructor = d; }
|
|
129
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
130
|
-
}
|
|
131
|
-
var __assign = function () {
|
|
132
|
-
__assign = Object.assign || function __assign(t) {
|
|
133
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
134
|
-
s = arguments[i];
|
|
135
|
-
for (var p in s)
|
|
136
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
137
|
-
t[p] = s[p];
|
|
138
|
-
}
|
|
139
|
-
return t;
|
|
140
|
-
};
|
|
141
|
-
return __assign.apply(this, arguments);
|
|
142
|
-
};
|
|
143
|
-
function __rest(s, e) {
|
|
144
|
-
var t = {};
|
|
145
|
-
for (var p in s)
|
|
146
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
147
|
-
t[p] = s[p];
|
|
148
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
149
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
150
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
151
|
-
t[p[i]] = s[p[i]];
|
|
152
|
-
}
|
|
153
|
-
return t;
|
|
154
|
-
}
|
|
155
|
-
function __decorate(decorators, target, key, desc) {
|
|
156
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
157
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
158
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
159
|
-
else
|
|
160
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
161
|
-
if (d = decorators[i])
|
|
162
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
163
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
164
|
-
}
|
|
165
|
-
function __param(paramIndex, decorator) {
|
|
166
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
167
|
-
}
|
|
168
|
-
function __metadata(metadataKey, metadataValue) {
|
|
169
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
170
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
171
|
-
}
|
|
172
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
173
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
174
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
175
|
-
function fulfilled(value) { try {
|
|
176
|
-
step(generator.next(value));
|
|
177
|
-
}
|
|
178
|
-
catch (e) {
|
|
179
|
-
reject(e);
|
|
180
|
-
} }
|
|
181
|
-
function rejected(value) { try {
|
|
182
|
-
step(generator["throw"](value));
|
|
183
|
-
}
|
|
184
|
-
catch (e) {
|
|
185
|
-
reject(e);
|
|
186
|
-
} }
|
|
187
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
188
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
function __generator(thisArg, body) {
|
|
192
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
193
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
194
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
195
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
196
|
-
function step(op) {
|
|
197
|
-
if (f)
|
|
198
|
-
throw new TypeError("Generator is already executing.");
|
|
199
|
-
while (_)
|
|
200
|
-
try {
|
|
201
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
202
|
-
return t;
|
|
203
|
-
if (y = 0, t)
|
|
204
|
-
op = [op[0] & 2, t.value];
|
|
205
|
-
switch (op[0]) {
|
|
206
|
-
case 0:
|
|
207
|
-
case 1:
|
|
208
|
-
t = op;
|
|
209
|
-
break;
|
|
210
|
-
case 4:
|
|
211
|
-
_.label++;
|
|
212
|
-
return { value: op[1], done: false };
|
|
213
|
-
case 5:
|
|
214
|
-
_.label++;
|
|
215
|
-
y = op[1];
|
|
216
|
-
op = [0];
|
|
217
|
-
continue;
|
|
218
|
-
case 7:
|
|
219
|
-
op = _.ops.pop();
|
|
220
|
-
_.trys.pop();
|
|
221
|
-
continue;
|
|
222
|
-
default:
|
|
223
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
224
|
-
_ = 0;
|
|
225
|
-
continue;
|
|
226
|
-
}
|
|
227
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
228
|
-
_.label = op[1];
|
|
229
|
-
break;
|
|
230
|
-
}
|
|
231
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
232
|
-
_.label = t[1];
|
|
233
|
-
t = op;
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
if (t && _.label < t[2]) {
|
|
237
|
-
_.label = t[2];
|
|
238
|
-
_.ops.push(op);
|
|
239
|
-
break;
|
|
240
|
-
}
|
|
241
|
-
if (t[2])
|
|
242
|
-
_.ops.pop();
|
|
243
|
-
_.trys.pop();
|
|
244
|
-
continue;
|
|
245
|
-
}
|
|
246
|
-
op = body.call(thisArg, _);
|
|
247
|
-
}
|
|
248
|
-
catch (e) {
|
|
249
|
-
op = [6, e];
|
|
250
|
-
y = 0;
|
|
251
|
-
}
|
|
252
|
-
finally {
|
|
253
|
-
f = t = 0;
|
|
254
|
-
}
|
|
255
|
-
if (op[0] & 5)
|
|
256
|
-
throw op[1];
|
|
257
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
261
|
-
if (k2 === undefined)
|
|
262
|
-
k2 = k;
|
|
263
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
264
|
-
}) : (function (o, m, k, k2) {
|
|
265
|
-
if (k2 === undefined)
|
|
266
|
-
k2 = k;
|
|
267
|
-
o[k2] = m[k];
|
|
268
|
-
});
|
|
269
|
-
function __exportStar(m, o) {
|
|
270
|
-
for (var p in m)
|
|
271
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
272
|
-
__createBinding(o, m, p);
|
|
273
|
-
}
|
|
274
|
-
function __values(o) {
|
|
275
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
276
|
-
if (m)
|
|
277
|
-
return m.call(o);
|
|
278
|
-
if (o && typeof o.length === "number")
|
|
279
|
-
return {
|
|
280
|
-
next: function () {
|
|
281
|
-
if (o && i >= o.length)
|
|
282
|
-
o = void 0;
|
|
283
|
-
return { value: o && o[i++], done: !o };
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
287
|
-
}
|
|
288
|
-
function __read(o, n) {
|
|
289
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
290
|
-
if (!m)
|
|
291
|
-
return o;
|
|
292
|
-
var i = m.call(o), r, ar = [], e;
|
|
293
|
-
try {
|
|
294
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
295
|
-
ar.push(r.value);
|
|
296
|
-
}
|
|
297
|
-
catch (error) {
|
|
298
|
-
e = { error: error };
|
|
299
|
-
}
|
|
300
|
-
finally {
|
|
301
|
-
try {
|
|
302
|
-
if (r && !r.done && (m = i["return"]))
|
|
303
|
-
m.call(i);
|
|
304
|
-
}
|
|
305
|
-
finally {
|
|
306
|
-
if (e)
|
|
307
|
-
throw e.error;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
return ar;
|
|
311
|
-
}
|
|
312
|
-
/** @deprecated */
|
|
313
|
-
function __spread() {
|
|
314
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
315
|
-
ar = ar.concat(__read(arguments[i]));
|
|
316
|
-
return ar;
|
|
317
|
-
}
|
|
318
|
-
/** @deprecated */
|
|
319
|
-
function __spreadArrays() {
|
|
320
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
321
|
-
s += arguments[i].length;
|
|
322
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
323
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
324
|
-
r[k] = a[j];
|
|
325
|
-
return r;
|
|
326
|
-
}
|
|
327
|
-
function __spreadArray(to, from, pack) {
|
|
328
|
-
if (pack || arguments.length === 2)
|
|
329
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
330
|
-
if (ar || !(i in from)) {
|
|
331
|
-
if (!ar)
|
|
332
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
333
|
-
ar[i] = from[i];
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
337
|
-
}
|
|
338
|
-
function __await(v) {
|
|
339
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
340
|
-
}
|
|
341
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
342
|
-
if (!Symbol.asyncIterator)
|
|
343
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
344
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
345
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
346
|
-
function verb(n) { if (g[n])
|
|
347
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
348
|
-
function resume(n, v) { try {
|
|
349
|
-
step(g[n](v));
|
|
350
|
-
}
|
|
351
|
-
catch (e) {
|
|
352
|
-
settle(q[0][3], e);
|
|
353
|
-
} }
|
|
354
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
355
|
-
function fulfill(value) { resume("next", value); }
|
|
356
|
-
function reject(value) { resume("throw", value); }
|
|
357
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
358
|
-
resume(q[0][0], q[0][1]); }
|
|
359
|
-
}
|
|
360
|
-
function __asyncDelegator(o) {
|
|
361
|
-
var i, p;
|
|
362
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
363
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
364
|
-
}
|
|
365
|
-
function __asyncValues(o) {
|
|
366
|
-
if (!Symbol.asyncIterator)
|
|
367
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
368
|
-
var m = o[Symbol.asyncIterator], i;
|
|
369
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
370
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
371
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
372
|
-
}
|
|
373
|
-
function __makeTemplateObject(cooked, raw) {
|
|
374
|
-
if (Object.defineProperty) {
|
|
375
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
376
|
-
}
|
|
377
|
-
else {
|
|
378
|
-
cooked.raw = raw;
|
|
379
|
-
}
|
|
380
|
-
return cooked;
|
|
381
|
-
}
|
|
382
|
-
;
|
|
383
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
384
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
385
|
-
}) : function (o, v) {
|
|
386
|
-
o["default"] = v;
|
|
387
|
-
};
|
|
388
|
-
function __importStar(mod) {
|
|
389
|
-
if (mod && mod.__esModule)
|
|
390
|
-
return mod;
|
|
391
|
-
var result = {};
|
|
392
|
-
if (mod != null)
|
|
393
|
-
for (var k in mod)
|
|
394
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
395
|
-
__createBinding(result, mod, k);
|
|
396
|
-
__setModuleDefault(result, mod);
|
|
397
|
-
return result;
|
|
398
|
-
}
|
|
399
|
-
function __importDefault(mod) {
|
|
400
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
401
|
-
}
|
|
402
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
403
|
-
if (kind === "a" && !f)
|
|
404
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
405
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
406
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
407
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
408
|
-
}
|
|
409
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
410
|
-
if (kind === "m")
|
|
411
|
-
throw new TypeError("Private method is not writable");
|
|
412
|
-
if (kind === "a" && !f)
|
|
413
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
414
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
415
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
416
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
var FieldBase = /** @class */ (function () {
|
|
420
|
-
function FieldBase(label, name, type, formConfig, fb, deviceService) {
|
|
421
|
-
this.formConfig = formConfig;
|
|
422
|
-
this.fb = fb;
|
|
423
|
-
this.deviceService = deviceService;
|
|
424
|
-
this.fieldConfig = {
|
|
425
|
-
label: label,
|
|
426
|
-
name: name,
|
|
427
|
-
type: type
|
|
428
|
-
};
|
|
429
|
-
this.appearance().grid();
|
|
430
|
-
}
|
|
431
|
-
FieldBase.prototype.hide = function (hide) {
|
|
432
|
-
if (hide === void 0) { hide = true; }
|
|
433
|
-
this.fieldConfig.show = !hide;
|
|
434
|
-
return this;
|
|
435
|
-
};
|
|
436
|
-
FieldBase.prototype.focus = function () {
|
|
437
|
-
this.fieldConfig.focus = true;
|
|
438
|
-
return this;
|
|
439
|
-
};
|
|
440
|
-
FieldBase.prototype.syncValidator = function (validators) {
|
|
441
|
-
this.fieldConfig.syncValidators = validators;
|
|
442
|
-
return this;
|
|
443
|
-
};
|
|
444
|
-
FieldBase.prototype.asyncValidator = function (validators) {
|
|
445
|
-
this.fieldConfig.asyncValidators = validators;
|
|
446
|
-
return this;
|
|
447
|
-
};
|
|
448
|
-
FieldBase.prototype.disabled = function (disabled) {
|
|
449
|
-
if (disabled === void 0) { disabled = true; }
|
|
450
|
-
this.fieldConfig.disabled = disabled;
|
|
451
|
-
return this;
|
|
452
|
-
};
|
|
453
|
-
FieldBase.prototype.required = function (required) {
|
|
454
|
-
if (required === void 0) { required = true; }
|
|
455
|
-
this.fieldConfig.required = required;
|
|
456
|
-
return this;
|
|
457
|
-
};
|
|
458
|
-
FieldBase.prototype.textHint = function (hint) {
|
|
459
|
-
this.fieldConfig.textHint = hint;
|
|
460
|
-
return this;
|
|
461
|
-
};
|
|
462
|
-
FieldBase.prototype.min = function (min) {
|
|
463
|
-
this.fieldConfig.min = min;
|
|
464
|
-
return this;
|
|
465
|
-
};
|
|
466
|
-
FieldBase.prototype.max = function (max) {
|
|
467
|
-
this.fieldConfig.max = max;
|
|
468
|
-
return this;
|
|
469
|
-
};
|
|
470
|
-
FieldBase.prototype.minLength = function (min) {
|
|
471
|
-
this.fieldConfig.minLength = min;
|
|
472
|
-
return this;
|
|
473
|
-
};
|
|
474
|
-
FieldBase.prototype.maxLength = function (max) {
|
|
475
|
-
this.fieldConfig.maxLength = max;
|
|
476
|
-
return this;
|
|
477
|
-
};
|
|
478
|
-
FieldBase.prototype.multiple = function (multiple) {
|
|
479
|
-
if (multiple === void 0) { multiple = true; }
|
|
480
|
-
this.fieldConfig.multiple = multiple;
|
|
481
|
-
return this;
|
|
482
|
-
};
|
|
483
|
-
FieldBase.prototype.valueChanges = function (fn) {
|
|
484
|
-
this.fieldConfig.valueChanges = fn;
|
|
485
|
-
return this;
|
|
486
|
-
};
|
|
487
|
-
FieldBase.prototype.setValue = function (value) {
|
|
488
|
-
this.fieldConfig.value = value;
|
|
489
|
-
return this;
|
|
490
|
-
};
|
|
491
|
-
FieldBase.prototype.appearance = function (type, floatLabel) {
|
|
492
|
-
if (type === void 0) { type = "outline"; }
|
|
493
|
-
if (floatLabel === void 0) { floatLabel = "always"; }
|
|
494
|
-
this.fieldConfig.appearance = type;
|
|
495
|
-
this.fieldConfig.floatLabel = floatLabel;
|
|
496
|
-
return this;
|
|
497
|
-
};
|
|
498
|
-
FieldBase.prototype.grid = function (size, width) {
|
|
499
|
-
if (size === void 0) { size = 12; }
|
|
500
|
-
if (width === void 0) { width = 100; }
|
|
501
|
-
var _a;
|
|
502
|
-
if (this.deviceService.isMobile()) {
|
|
503
|
-
size = 12;
|
|
504
|
-
}
|
|
505
|
-
for (var colSize = 12; colSize >= 1; colSize--) {
|
|
506
|
-
this.fieldConfig.class = (_a = this.fieldConfig.class) === null || _a === void 0 ? void 0 : _a.replace('col-' + colSize, '');
|
|
507
|
-
}
|
|
508
|
-
this.addClass('col-' + size);
|
|
509
|
-
this.addFieldClass('w-' + width);
|
|
510
|
-
return this;
|
|
511
|
-
};
|
|
512
|
-
FieldBase.prototype.setOptions = function (options) {
|
|
513
|
-
this.fieldConfig.opcoesSelect = options;
|
|
514
|
-
return this;
|
|
515
|
-
};
|
|
516
|
-
FieldBase.prototype.addClass = function (className) {
|
|
517
|
-
var _a, _b;
|
|
518
|
-
if (this.deviceService.isMobile() &&
|
|
519
|
-
className.indexOf('col-') >= 0 &&
|
|
520
|
-
className.indexOf('col-12') === 0) {
|
|
521
|
-
className = className.replace('col-1', 'col-12')
|
|
522
|
-
.replace('col-2', 'col-12')
|
|
523
|
-
.replace('col-3', 'col-12')
|
|
524
|
-
.replace('col-4', 'col-12')
|
|
525
|
-
.replace('col-5', 'col-12')
|
|
526
|
-
.replace('col-6', 'col-12')
|
|
527
|
-
.replace('col-7', 'col-12')
|
|
528
|
-
.replace('col-8', 'col-12')
|
|
529
|
-
.replace('col-9', 'col-12')
|
|
530
|
-
.replace('col-10', 'col-12')
|
|
531
|
-
.replace('col-11', 'col-12');
|
|
532
|
-
}
|
|
533
|
-
this.fieldConfig.class = utils.koala(((_b = (_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.class) !== null && _b !== void 0 ? _b : '') + " " + className)
|
|
534
|
-
.string()
|
|
535
|
-
.split(' ')
|
|
536
|
-
.clearEmptyValues()
|
|
537
|
-
.toString(' ')
|
|
538
|
-
.getValue();
|
|
539
|
-
return this;
|
|
540
|
-
};
|
|
541
|
-
FieldBase.prototype.addFieldClass = function (className) {
|
|
542
|
-
var _a, _b;
|
|
543
|
-
this.fieldConfig.fieldClass = utils.koala(((_b = (_a = this.fieldConfig) === null || _a === void 0 ? void 0 : _a.fieldClass) !== null && _b !== void 0 ? _b : '') + " " + className)
|
|
544
|
-
.string()
|
|
545
|
-
.split(' ')
|
|
546
|
-
.clearEmptyValues()
|
|
547
|
-
.toString(' ')
|
|
548
|
-
.getValue();
|
|
549
|
-
return this;
|
|
550
|
-
};
|
|
551
|
-
FieldBase.prototype.setCustomMasc = function (mask, config) {
|
|
552
|
-
this.fieldConfig.customMasc = mask;
|
|
553
|
-
this.fieldConfig.customMascThousandSeparator = config === null || config === void 0 ? void 0 : config.thousandSeparator;
|
|
554
|
-
this.fieldConfig.customMascSuffix = config === null || config === void 0 ? void 0 : config.suffix;
|
|
555
|
-
this.fieldConfig.customMascPrefix = config === null || config === void 0 ? void 0 : config.prefix;
|
|
556
|
-
return this;
|
|
557
|
-
};
|
|
558
|
-
FieldBase.prototype.generate = function () {
|
|
559
|
-
var getLastConfig = (this.formConfig.formConfig.length > 0) ?
|
|
560
|
-
this.formConfig.formConfig[this.formConfig.formConfig.length - 1] :
|
|
561
|
-
null;
|
|
562
|
-
if ((getLastConfig === null || getLastConfig === void 0 ? void 0 : getLastConfig.type) === exports.DynamicFormTypeFieldEnum.moreItems && (getLastConfig === null || getLastConfig === void 0 ? void 0 : getLastConfig.name) !== 'endMoreItems') {
|
|
563
|
-
this.formConfig.formConfig[this.formConfig.formConfig.length - 1].moreItemsConfig.formConfig.push(this.fieldConfig);
|
|
564
|
-
}
|
|
565
|
-
else {
|
|
566
|
-
if ((getLastConfig === null || getLastConfig === void 0 ? void 0 : getLastConfig.name) === 'endMoreItems') {
|
|
567
|
-
this.formConfig.formConfig.splice(this.formConfig.formConfig.length - 1, 1);
|
|
568
|
-
}
|
|
569
|
-
this.formConfig.formConfig.push(this.fieldConfig);
|
|
570
|
-
}
|
|
571
|
-
return new DynamicFormBuilder(this.fb, this.deviceService, this.formConfig.formConfig);
|
|
572
|
-
};
|
|
573
|
-
return FieldBase;
|
|
574
|
-
}());
|
|
575
|
-
|
|
576
|
-
var AutocompleteBuilder = /** @class */ (function (_super) {
|
|
577
|
-
__extends(AutocompleteBuilder, _super);
|
|
578
|
-
function AutocompleteBuilder(label, name, formConfig, fb, deviceService) {
|
|
579
|
-
return _super.call(this, label, name, exports.DynamicFormTypeFieldEnum.autocomplete, formConfig, fb, deviceService) || this;
|
|
580
|
-
}
|
|
581
|
-
AutocompleteBuilder.prototype.service = function (service) {
|
|
582
|
-
this.service$ = service;
|
|
583
|
-
return this;
|
|
584
|
-
};
|
|
585
|
-
AutocompleteBuilder.prototype.defaultValueOnClean = function (value) {
|
|
586
|
-
this.fieldConfig.autocompleteDefaultValueOnClear = value;
|
|
587
|
-
return this;
|
|
588
|
-
};
|
|
589
|
-
AutocompleteBuilder.prototype.loadOptions = function (type, onDemandFilter) {
|
|
590
|
-
this.fieldConfig.autocompleteType = type;
|
|
591
|
-
if (type === "all") {
|
|
592
|
-
var options$_1 = new rxjs.BehaviorSubject([]);
|
|
593
|
-
this.service$.subscribe(function (options) { return options$_1.next(options); });
|
|
594
|
-
this.fieldConfig.autocompleteOptions = options$_1;
|
|
595
|
-
}
|
|
596
|
-
else {
|
|
597
|
-
this.fieldConfig.autocompleteFilter = onDemandFilter;
|
|
598
|
-
}
|
|
599
|
-
return this;
|
|
600
|
-
};
|
|
601
|
-
AutocompleteBuilder.prototype.colorChipConfig = function (fn) {
|
|
602
|
-
this.fieldConfig.autocompleteMultipleConfig = new rxjs.BehaviorSubject(null);
|
|
603
|
-
fn(this.fieldConfig.autocompleteMultipleConfig);
|
|
604
|
-
return this;
|
|
605
|
-
};
|
|
606
|
-
return AutocompleteBuilder;
|
|
607
|
-
}(FieldBase));
|
|
608
|
-
|
|
609
|
-
var FieldBuilder = /** @class */ (function (_super) {
|
|
610
|
-
__extends(FieldBuilder, _super);
|
|
611
|
-
function FieldBuilder(label, name, type, formConfig, fb, deviceService) {
|
|
612
|
-
return _super.call(this, label, name, type, formConfig, fb, deviceService) || this;
|
|
613
|
-
}
|
|
614
|
-
return FieldBuilder;
|
|
615
|
-
}(FieldBase));
|
|
616
|
-
|
|
617
|
-
var MoreItemsBuilder = /** @class */ (function () {
|
|
618
|
-
function MoreItemsBuilder(label, name, btnAddLabel, min, max, formConfig, fb, deviceService) {
|
|
619
|
-
this.label = label;
|
|
620
|
-
this.name = name;
|
|
621
|
-
this.btnAddLabel = btnAddLabel;
|
|
622
|
-
this.min = min;
|
|
623
|
-
this.max = max;
|
|
624
|
-
this.formConfig = formConfig;
|
|
625
|
-
this.fb = fb;
|
|
626
|
-
this.deviceService = deviceService;
|
|
627
|
-
}
|
|
628
|
-
MoreItemsBuilder.prototype.build = function () {
|
|
629
|
-
var getLastConfig = (this.formConfig.formConfig.length > 0) ?
|
|
630
|
-
this.formConfig.formConfig[this.formConfig.formConfig.length - 1] :
|
|
631
|
-
null;
|
|
632
|
-
this.fieldConfig = {
|
|
633
|
-
label: this.label,
|
|
634
|
-
name: this.name,
|
|
635
|
-
type: exports.DynamicFormTypeFieldEnum.moreItems,
|
|
636
|
-
moreItemsIconBackgroundColor: '#fff',
|
|
637
|
-
moreItemsIconFontColor: '#212121',
|
|
638
|
-
moreItemsMinItems: this.min,
|
|
639
|
-
moreItemsMaxItems: this.max,
|
|
640
|
-
moreItemsButtonIconAddlabel: this.btnAddLabel,
|
|
641
|
-
moreItemsConfig: {
|
|
642
|
-
form: this.fb.group({}),
|
|
643
|
-
formConfig: [],
|
|
644
|
-
setValues: new rxjs.BehaviorSubject([])
|
|
645
|
-
}
|
|
646
|
-
};
|
|
647
|
-
if ((getLastConfig === null || getLastConfig === void 0 ? void 0 : getLastConfig.type) === exports.DynamicFormTypeFieldEnum.moreItems && (getLastConfig === null || getLastConfig === void 0 ? void 0 : getLastConfig.name) !== 'endMoreItems') {
|
|
648
|
-
var formConfigMoreItems = getLastConfig.moreItemsConfig.formConfig;
|
|
649
|
-
if (formConfigMoreItems.length > 0) {
|
|
650
|
-
var lastIndexMoreItems_1 = 0;
|
|
651
|
-
formConfigMoreItems.forEach(function (item, index) {
|
|
652
|
-
if (item.type === exports.DynamicFormTypeFieldEnum.moreItems)
|
|
653
|
-
lastIndexMoreItems_1 = index;
|
|
654
|
-
});
|
|
655
|
-
formConfigMoreItems[lastIndexMoreItems_1].moreItemsConfig.formConfig.push(this.fieldConfig);
|
|
656
|
-
}
|
|
657
|
-
else {
|
|
658
|
-
this.formConfig.formConfig[this.formConfig.formConfig.length - 1].moreItemsConfig.formConfig.push(this.fieldConfig);
|
|
659
|
-
}
|
|
660
|
-
}
|
|
661
|
-
else {
|
|
662
|
-
if ((getLastConfig === null || getLastConfig === void 0 ? void 0 : getLastConfig.name) === 'endMoreItems') {
|
|
663
|
-
this.formConfig.formConfig.splice(this.formConfig.formConfig.length - 1, 1);
|
|
664
|
-
}
|
|
665
|
-
this.formConfig.formConfig.push(this.fieldConfig);
|
|
666
|
-
}
|
|
667
|
-
return new DynamicFormBuilder(this.fb, this.deviceService, this.formConfig.formConfig);
|
|
668
|
-
};
|
|
669
|
-
return MoreItemsBuilder;
|
|
670
|
-
}());
|
|
671
|
-
|
|
672
|
-
var DynamicFormBuilder = /** @class */ (function () {
|
|
673
|
-
function DynamicFormBuilder(fb, deviceService, configInMemory) {
|
|
674
|
-
this.fb = fb;
|
|
675
|
-
this.deviceService = deviceService;
|
|
676
|
-
this.config = {
|
|
677
|
-
form: fb.group({}),
|
|
678
|
-
formConfig: configInMemory !== null && configInMemory !== void 0 ? configInMemory : [],
|
|
679
|
-
setValues: new rxjs.BehaviorSubject(null),
|
|
680
|
-
showFields: new rxjs.BehaviorSubject(null)
|
|
681
|
-
};
|
|
682
|
-
}
|
|
683
|
-
DynamicFormBuilder.prototype.field = function (label, name, type) {
|
|
684
|
-
switch (type) {
|
|
685
|
-
case "id":
|
|
686
|
-
case "text":
|
|
687
|
-
case "textarea":
|
|
688
|
-
case "number":
|
|
689
|
-
case "stringNumber":
|
|
690
|
-
case "cnpj":
|
|
691
|
-
case "cpf":
|
|
692
|
-
case "coin":
|
|
693
|
-
case "color":
|
|
694
|
-
case "date":
|
|
695
|
-
case "datetime":
|
|
696
|
-
case "email":
|
|
697
|
-
case "float":
|
|
698
|
-
case "password":
|
|
699
|
-
case "percent":
|
|
700
|
-
case "phone":
|
|
701
|
-
case "time":
|
|
702
|
-
case "hoursAndMinutes":
|
|
703
|
-
case "textLogs":
|
|
704
|
-
case "valueList":
|
|
705
|
-
case "checkbox":
|
|
706
|
-
case "radio":
|
|
707
|
-
case "select":
|
|
708
|
-
case "selectMultipleNative":
|
|
709
|
-
case "month":
|
|
710
|
-
case "competenceDate":
|
|
711
|
-
case "stringWithCustomMasc":
|
|
712
|
-
return new FieldBuilder(label, name, exports.DynamicFormTypeFieldEnum[type], this.config, this.fb, this.deviceService);
|
|
713
|
-
}
|
|
714
|
-
};
|
|
715
|
-
DynamicFormBuilder.prototype.autocomplete = function (label, name) {
|
|
716
|
-
return new AutocompleteBuilder(label, name, this.config, this.fb, this.deviceService);
|
|
717
|
-
};
|
|
718
|
-
DynamicFormBuilder.prototype.simpleMoreItems = function (label, name, btnAddLabel, min, max) {
|
|
719
|
-
return new MoreItemsBuilder(label, name, btnAddLabel, min, max, this.config, this.fb, this.deviceService);
|
|
720
|
-
};
|
|
721
|
-
DynamicFormBuilder.prototype.autofill = function (object) {
|
|
722
|
-
var _this = this;
|
|
723
|
-
var _a, _b;
|
|
724
|
-
if (object) {
|
|
725
|
-
var setValues_1 = [];
|
|
726
|
-
Object.keys(object).forEach(function (indexName) {
|
|
727
|
-
var _a, _b, _c, _d, _e;
|
|
728
|
-
var arrField = utils.koala(_this.config.formConfig).array().filter(indexName, 'name', { comparator: "=" }).getValue();
|
|
729
|
-
if (arrField.length === 1) {
|
|
730
|
-
var field_1 = (_a = arrField[0]) !== null && _a !== void 0 ? _a : null;
|
|
731
|
-
if (typeof object[indexName] !== "object" ||
|
|
732
|
-
field_1.type === exports.DynamicFormTypeFieldEnum.autocomplete ||
|
|
733
|
-
field_1.type === exports.DynamicFormTypeFieldEnum.selectMultipleNative) {
|
|
734
|
-
if (field_1.type === exports.DynamicFormTypeFieldEnum.textLogs) {
|
|
735
|
-
field_1.textObs = object[indexName];
|
|
736
|
-
}
|
|
737
|
-
else {
|
|
738
|
-
setValues_1.push({
|
|
739
|
-
name: indexName,
|
|
740
|
-
value: object[indexName]
|
|
741
|
-
});
|
|
742
|
-
}
|
|
743
|
-
}
|
|
744
|
-
else {
|
|
745
|
-
if (field_1.type === exports.DynamicFormTypeFieldEnum.moreItems) {
|
|
746
|
-
var setValuesMoreItems_1 = [];
|
|
747
|
-
var objectMoreItems = object[indexName];
|
|
748
|
-
objectMoreItems.forEach(function (objectItem) {
|
|
749
|
-
var moreItemValues = [];
|
|
750
|
-
Object.keys(objectItem).forEach(function (objectIndexName) {
|
|
751
|
-
moreItemValues.push({
|
|
752
|
-
name: objectIndexName,
|
|
753
|
-
value: objectItem[objectIndexName]
|
|
754
|
-
});
|
|
755
|
-
});
|
|
756
|
-
setValuesMoreItems_1.push(new rxjs.BehaviorSubject(moreItemValues));
|
|
757
|
-
});
|
|
758
|
-
(_c = (_b = field_1.moreItemsConfig) === null || _b === void 0 ? void 0 : _b.setValues) === null || _c === void 0 ? void 0 : _c.next(setValuesMoreItems_1);
|
|
759
|
-
}
|
|
760
|
-
else if (field_1.type === exports.DynamicFormTypeFieldEnum.dynamicForm) {
|
|
761
|
-
var dynamicFormObject_1 = object[indexName];
|
|
762
|
-
var dynamicFormSetValues_1 = [];
|
|
763
|
-
Object.keys(dynamicFormObject_1).forEach(function (dynamicFormIndexName) {
|
|
764
|
-
var _a;
|
|
765
|
-
var arrDynamicField = utils.koala(field_1.dynamicFormConfig.formConfig).array().filter(indexName, 'name').getValue();
|
|
766
|
-
var dynamicField = (_a = arrDynamicField[0]) !== null && _a !== void 0 ? _a : null;
|
|
767
|
-
if ((dynamicField === null || dynamicField === void 0 ? void 0 : dynamicField.type) === exports.DynamicFormTypeFieldEnum.textLogs) {
|
|
768
|
-
dynamicField.textObs = object[indexName];
|
|
769
|
-
}
|
|
770
|
-
else {
|
|
771
|
-
dynamicFormSetValues_1.push({
|
|
772
|
-
name: dynamicFormIndexName,
|
|
773
|
-
value: dynamicFormObject_1[dynamicFormIndexName]
|
|
774
|
-
});
|
|
775
|
-
}
|
|
776
|
-
});
|
|
777
|
-
(_e = (_d = field_1.dynamicFormConfig) === null || _d === void 0 ? void 0 : _d.setValues) === null || _e === void 0 ? void 0 : _e.next(dynamicFormSetValues_1);
|
|
778
|
-
}
|
|
779
|
-
else {
|
|
780
|
-
_this.autofill(object[indexName]);
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
}
|
|
784
|
-
});
|
|
785
|
-
(_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.setValues) === null || _b === void 0 ? void 0 : _b.next(setValues_1);
|
|
786
|
-
}
|
|
787
|
-
return this;
|
|
788
|
-
};
|
|
789
|
-
DynamicFormBuilder.prototype.literalConfig = function (config) {
|
|
790
|
-
this.config.formConfig.push(config);
|
|
791
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.moreItems)
|
|
792
|
-
this.generateMoreItems();
|
|
793
|
-
return this;
|
|
794
|
-
};
|
|
795
|
-
DynamicFormBuilder.prototype.generate = function () {
|
|
796
|
-
this.config.formConfig = this.config.formConfig.filter(function (config) { return config.name !== 'endMoreItems'; });
|
|
797
|
-
return this.config;
|
|
798
|
-
};
|
|
799
|
-
DynamicFormBuilder.prototype.generateMoreItems = function () {
|
|
800
|
-
this.config.formConfig.push({
|
|
801
|
-
name: 'endMoreItems',
|
|
802
|
-
type: exports.DynamicFormTypeFieldEnum.moreItems
|
|
803
|
-
});
|
|
804
|
-
return new DynamicFormBuilder(this.fb, this.deviceService, this.config.formConfig);
|
|
805
|
-
};
|
|
806
|
-
return DynamicFormBuilder;
|
|
807
|
-
}());
|
|
808
|
-
|
|
809
|
-
function DateMinValidator(min) {
|
|
810
|
-
return function (control) {
|
|
811
|
-
if (control.value && typeof min === 'string') {
|
|
812
|
-
if (new Date(control.value) < new Date(min)) {
|
|
813
|
-
return { dateMin: true };
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
return null;
|
|
817
|
-
};
|
|
818
|
-
}
|
|
819
|
-
|
|
820
|
-
function DateMaxValidator(max) {
|
|
821
|
-
return function (control) {
|
|
822
|
-
if (control.value && typeof max === 'string') {
|
|
823
|
-
if (new Date(control.value) > new Date(max)) {
|
|
824
|
-
return { dateMax: true };
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
return null;
|
|
828
|
-
};
|
|
829
|
-
}
|
|
830
|
-
|
|
831
|
-
var KoalaDynamicFormService = /** @class */ (function () {
|
|
832
|
-
function KoalaDynamicFormService(fb, deviceService) {
|
|
833
|
-
this.fb = fb;
|
|
834
|
-
this.deviceService = deviceService;
|
|
835
|
-
}
|
|
836
|
-
KoalaDynamicFormService.prototype.build = function () {
|
|
837
|
-
return new DynamicFormBuilder(this.fb, this.deviceService);
|
|
838
|
-
};
|
|
839
|
-
KoalaDynamicFormService.prototype.updateValidator = function (formGroup, name, type, value) {
|
|
840
|
-
if (type === 'required' && typeof value !== 'boolean') {
|
|
841
|
-
throw new Error("Type required cannot be a " + typeof value);
|
|
842
|
-
}
|
|
843
|
-
else if ((type === 'min' || type === 'max') && typeof value === "boolean") {
|
|
844
|
-
throw new Error("Type " + type + " cannot be a boolean");
|
|
845
|
-
}
|
|
846
|
-
var formArray = formGroup.get('formData');
|
|
847
|
-
var control = formArray.controls.find(function (control) { return control.get('name').value === name; });
|
|
848
|
-
if (control) {
|
|
849
|
-
var currentRequired = control.get('required').value;
|
|
850
|
-
var currentMin = control.get('min').value;
|
|
851
|
-
var currentMax = control.get('max').value;
|
|
852
|
-
var validators = [];
|
|
853
|
-
control.get('value').clearValidators();
|
|
854
|
-
control.get('value').setErrors(null);
|
|
855
|
-
if ((type === "required" && value) || currentRequired) {
|
|
856
|
-
validators.push(i1.Validators.required);
|
|
857
|
-
control.get('value').setErrors({ required: true });
|
|
858
|
-
}
|
|
859
|
-
if ((type === "min" || currentMin)) {
|
|
860
|
-
if (typeof value === "number") {
|
|
861
|
-
validators.push(i1.Validators.min((type === "min" ? value : currentMin)));
|
|
862
|
-
control.get('value').setErrors({ min: true });
|
|
863
|
-
}
|
|
864
|
-
else if (typeof value === "string") {
|
|
865
|
-
validators.push(DateMinValidator((type === "min" ? value : currentMin)));
|
|
866
|
-
control.get('value').setErrors({ dateMin: true });
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
if ((type === "max" || currentMax)) {
|
|
870
|
-
if (typeof value === "number") {
|
|
871
|
-
validators.push(i1.Validators.max((type === "max" ? value : currentMax)));
|
|
872
|
-
control.get('value').setErrors({ max: true });
|
|
873
|
-
}
|
|
874
|
-
else if (typeof value === "string") {
|
|
875
|
-
validators.push(DateMaxValidator((type === "max" ? value : currentMax)));
|
|
876
|
-
control.get('value').setErrors({ dateMax: true });
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
if (type === "required") {
|
|
880
|
-
control.get('required').setValue(value);
|
|
881
|
-
}
|
|
882
|
-
else if (type === "min") {
|
|
883
|
-
control.get('min').setValue(value);
|
|
884
|
-
}
|
|
885
|
-
else if (type === "max") {
|
|
886
|
-
control.get('max').setValue(value);
|
|
887
|
-
}
|
|
888
|
-
control.get('value').setValidators(validators);
|
|
889
|
-
control.get('value').updateValueAndValidity();
|
|
890
|
-
}
|
|
891
|
-
};
|
|
892
|
-
KoalaDynamicFormService.prototype.emitData = function (form) {
|
|
893
|
-
var _this = this;
|
|
894
|
-
var data = {};
|
|
895
|
-
var formArray = form.get('formData');
|
|
896
|
-
formArray === null || formArray === void 0 ? void 0 : formArray.controls.forEach(function (control) {
|
|
897
|
-
var _a;
|
|
898
|
-
if (control.get('show').value.getValue() !== false) {
|
|
899
|
-
var value_1 = control.get('value').value;
|
|
900
|
-
if (control.get('type').value === exports.DynamicFormTypeFieldEnum.valueList) {
|
|
901
|
-
if (value_1 === null || value_1 === undefined) {
|
|
902
|
-
value_1 = '';
|
|
903
|
-
}
|
|
904
|
-
value_1 = utils.koala(value_1).string().split().getValue();
|
|
905
|
-
}
|
|
906
|
-
else if (control.get('type').value === exports.DynamicFormTypeFieldEnum.moreItems) {
|
|
907
|
-
var moreItems = control.get('moreItemsConfig').value;
|
|
908
|
-
value_1 = [];
|
|
909
|
-
moreItems.forEach(function (item) {
|
|
910
|
-
value_1.push(_this.emitData(item.form));
|
|
911
|
-
});
|
|
912
|
-
}
|
|
913
|
-
else if (control.get('type').value === exports.DynamicFormTypeFieldEnum.autocomplete) {
|
|
914
|
-
if (control.get('multiple').value) {
|
|
915
|
-
var options = control.get('autocompleteSelectedValue').value;
|
|
916
|
-
value_1 = options === null || options === void 0 ? void 0 : options.map(function (item) { return item === null || item === void 0 ? void 0 : item.value; });
|
|
917
|
-
}
|
|
918
|
-
else {
|
|
919
|
-
value_1 = (((_a = control.get('autocompleteSelectedValue').value) === null || _a === void 0 ? void 0 : _a.value) ?
|
|
920
|
-
control.get('autocompleteSelectedValue').value.value :
|
|
921
|
-
control.get('autocompleteSelectedValue').value);
|
|
922
|
-
}
|
|
923
|
-
}
|
|
924
|
-
else if (control.get('type').value === exports.DynamicFormTypeFieldEnum.dynamicForm) {
|
|
925
|
-
var dynamicFormConfig = control.get('dynamicFormConfig').value;
|
|
926
|
-
value_1 = _this.emitData(dynamicFormConfig.getValue().form);
|
|
927
|
-
}
|
|
928
|
-
else if (control.get('type').value === exports.DynamicFormTypeFieldEnum.number) {
|
|
929
|
-
value_1 = parseInt(value_1);
|
|
930
|
-
}
|
|
931
|
-
else if ((control.get('type').value === exports.DynamicFormTypeFieldEnum.float ||
|
|
932
|
-
control.get('type').value === exports.DynamicFormTypeFieldEnum.percent) && typeof value_1 === "string") {
|
|
933
|
-
value_1 = parseFloat(value_1.replace(/,/g, '.'));
|
|
934
|
-
}
|
|
935
|
-
else if (control.get('type').value === exports.DynamicFormTypeFieldEnum.coin &&
|
|
936
|
-
typeof value_1 === "string") {
|
|
937
|
-
value_1 = string.unmaskCoin(value_1);
|
|
938
|
-
}
|
|
939
|
-
data[control.get('name').value] = value_1;
|
|
940
|
-
}
|
|
941
|
-
});
|
|
942
|
-
return data;
|
|
943
|
-
};
|
|
944
|
-
KoalaDynamicFormService.prototype.resetForm = function (form) {
|
|
945
|
-
var formArray = form.get('formData');
|
|
946
|
-
formArray.controls.forEach(function (control) {
|
|
947
|
-
if (control.get('type').value === exports.DynamicFormTypeFieldEnum.moreItems) {
|
|
948
|
-
control.get('moreItemsConfig').setValue([]);
|
|
949
|
-
}
|
|
950
|
-
else {
|
|
951
|
-
control.get('value').reset();
|
|
952
|
-
}
|
|
953
|
-
});
|
|
954
|
-
};
|
|
955
|
-
KoalaDynamicFormService.prototype.setValuesInMoreItemsForm = function (subject, values) {
|
|
956
|
-
var valuesMoreItems = [];
|
|
957
|
-
values.forEach(function (itemValue) {
|
|
958
|
-
valuesMoreItems.push(new rxjs.BehaviorSubject(itemValue));
|
|
959
|
-
});
|
|
960
|
-
subject.next(valuesMoreItems);
|
|
961
|
-
};
|
|
962
|
-
KoalaDynamicFormService.prototype.autocompleteFilterOnServer = function (request, nameConfig, indexNameByValue) {
|
|
963
|
-
var _this = this;
|
|
964
|
-
return new rxjs.Observable(function (observe) {
|
|
965
|
-
request().then(function (response) {
|
|
966
|
-
var options = [];
|
|
967
|
-
response.forEach(function (item) {
|
|
968
|
-
var _a;
|
|
969
|
-
var value = '';
|
|
970
|
-
if ((indexNameByValue === null || indexNameByValue === void 0 ? void 0 : indexNameByValue.indexOf(' > ')) >= 0) {
|
|
971
|
-
value = _this.getValueByStringPath(indexNameByValue, item);
|
|
972
|
-
}
|
|
973
|
-
else if (indexNameByValue) {
|
|
974
|
-
value = item[indexNameByValue];
|
|
975
|
-
}
|
|
976
|
-
else {
|
|
977
|
-
value = item;
|
|
978
|
-
}
|
|
979
|
-
options.push({
|
|
980
|
-
name: utils.koala(item).object().toString(nameConfig.propsByName, ((_a = nameConfig.delimiter) !== null && _a !== void 0 ? _a : ' ')).getValue(),
|
|
981
|
-
value: value
|
|
982
|
-
});
|
|
983
|
-
});
|
|
984
|
-
observe.next(options);
|
|
985
|
-
});
|
|
986
|
-
});
|
|
987
|
-
};
|
|
988
|
-
KoalaDynamicFormService.prototype.showFields = function (subject, names, show, clearCurrentValue) {
|
|
989
|
-
if (clearCurrentValue === void 0) { clearCurrentValue = false; }
|
|
990
|
-
var fields = [];
|
|
991
|
-
names.forEach(function (name) {
|
|
992
|
-
fields.push({
|
|
993
|
-
name: name,
|
|
994
|
-
show: show,
|
|
995
|
-
clearCurrentValue: clearCurrentValue
|
|
996
|
-
});
|
|
997
|
-
});
|
|
998
|
-
subject.next(fields);
|
|
999
|
-
};
|
|
1000
|
-
KoalaDynamicFormService.prototype.getValueByStringPath = function (indexNameByValue, item) {
|
|
1001
|
-
var value;
|
|
1002
|
-
var partsIndex = indexNameByValue.split(' > ');
|
|
1003
|
-
var partIndex = 0;
|
|
1004
|
-
do {
|
|
1005
|
-
if (!value) {
|
|
1006
|
-
value = item[partsIndex[partIndex]];
|
|
1007
|
-
}
|
|
1008
|
-
else {
|
|
1009
|
-
value = value[partsIndex[partIndex]];
|
|
1010
|
-
}
|
|
1011
|
-
partIndex++;
|
|
1012
|
-
} while (partIndex < partsIndex.length);
|
|
1013
|
-
return value;
|
|
1014
|
-
};
|
|
1015
|
-
return KoalaDynamicFormService;
|
|
1016
|
-
}());
|
|
1017
|
-
KoalaDynamicFormService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function KoalaDynamicFormService_Factory() { return new KoalaDynamicFormService(i0__namespace.ɵɵinject(i1__namespace.FormBuilder), i0__namespace.ɵɵinject(i2__namespace.DeviceDetectorService)); }, token: KoalaDynamicFormService, providedIn: "any" });
|
|
1018
|
-
KoalaDynamicFormService.decorators = [
|
|
1019
|
-
{ type: i0.Injectable, args: [{ providedIn: "any" },] }
|
|
1020
|
-
];
|
|
1021
|
-
KoalaDynamicFormService.ctorParameters = function () { return [
|
|
1022
|
-
{ type: i1.FormBuilder },
|
|
1023
|
-
{ type: i2.DeviceDetectorService }
|
|
1024
|
-
]; };
|
|
1025
|
-
|
|
1026
|
-
var ValidationHelper = /** @class */ (function () {
|
|
1027
|
-
function ValidationHelper() {
|
|
1028
|
-
}
|
|
1029
|
-
ValidationHelper.validateCpf = function (value) {
|
|
1030
|
-
function calcChecker1(digits) {
|
|
1031
|
-
var sum = null;
|
|
1032
|
-
for (var j = 0; j < 9; ++j) {
|
|
1033
|
-
sum += digits.toString().charAt(j) * (10 - j);
|
|
1034
|
-
}
|
|
1035
|
-
var lastSumChecker1 = sum % 11;
|
|
1036
|
-
return lastSumChecker1 < 2 ? 0 : 11 - lastSumChecker1;
|
|
1037
|
-
}
|
|
1038
|
-
function calcChecker2(cpfWithChecker1) {
|
|
1039
|
-
var sum = null;
|
|
1040
|
-
for (var k = 0; k < 10; ++k) {
|
|
1041
|
-
sum += cpfWithChecker1.toString().charAt(k) * (11 - k);
|
|
1042
|
-
}
|
|
1043
|
-
var lastSumChecker2 = sum % 11;
|
|
1044
|
-
return lastSumChecker2 < 2 ? 0 : 11 - lastSumChecker2;
|
|
1045
|
-
}
|
|
1046
|
-
var cleanCPF = value.replace(/\.|\-|\s/g, '');
|
|
1047
|
-
var firstNineDigits = cleanCPF.substring(0, 9);
|
|
1048
|
-
var checker = cleanCPF.substring(9, 11);
|
|
1049
|
-
if (cleanCPF.length !== 11) {
|
|
1050
|
-
return false;
|
|
1051
|
-
}
|
|
1052
|
-
// Checking if all digits are equal
|
|
1053
|
-
for (var i = 0; i < 10; i++) {
|
|
1054
|
-
if ('' + firstNineDigits + checker === Array(12).join("" + i)) {
|
|
1055
|
-
return false;
|
|
1056
|
-
}
|
|
1057
|
-
}
|
|
1058
|
-
var checker1 = calcChecker1(firstNineDigits);
|
|
1059
|
-
var checker2 = calcChecker2(firstNineDigits + '' + checker1);
|
|
1060
|
-
return checker.toString() === checker1.toString() + checker2.toString();
|
|
1061
|
-
};
|
|
1062
|
-
ValidationHelper.validateCnpj = function (value) {
|
|
1063
|
-
value = value.replace(/[^\d]+/g, '');
|
|
1064
|
-
if (value === '') {
|
|
1065
|
-
return false;
|
|
1066
|
-
}
|
|
1067
|
-
if (value.length !== 14) {
|
|
1068
|
-
return false;
|
|
1069
|
-
}
|
|
1070
|
-
// Elimina CNPJs invalidos conhecidos
|
|
1071
|
-
if (value === '00000000000000' ||
|
|
1072
|
-
value === '11111111111111' ||
|
|
1073
|
-
value === '22222222222222' ||
|
|
1074
|
-
value === '33333333333333' ||
|
|
1075
|
-
value === '44444444444444' ||
|
|
1076
|
-
value === '55555555555555' ||
|
|
1077
|
-
value === '66666666666666' ||
|
|
1078
|
-
value === '77777777777777' ||
|
|
1079
|
-
value === '88888888888888' ||
|
|
1080
|
-
value === '99999999999999') {
|
|
1081
|
-
return false;
|
|
1082
|
-
}
|
|
1083
|
-
// Valida DVs
|
|
1084
|
-
var tamanho = value.length - 2;
|
|
1085
|
-
var numeros = value.substring(0, tamanho);
|
|
1086
|
-
var digitos = value.substring(tamanho);
|
|
1087
|
-
var soma = 0;
|
|
1088
|
-
var pos = tamanho - 7;
|
|
1089
|
-
for (var i = tamanho; i >= 1; i--) {
|
|
1090
|
-
soma += parseInt(numeros.charAt(tamanho - i), 10) * pos--;
|
|
1091
|
-
if (pos < 2) {
|
|
1092
|
-
pos = 9;
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
var resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
|
|
1096
|
-
if (resultado !== parseInt(digitos.charAt(0), 10)) {
|
|
1097
|
-
return false;
|
|
1098
|
-
}
|
|
1099
|
-
tamanho = tamanho + 1;
|
|
1100
|
-
numeros = value.substring(0, tamanho);
|
|
1101
|
-
soma = 0;
|
|
1102
|
-
pos = tamanho - 7;
|
|
1103
|
-
for (var i = tamanho; i >= 1; i--) {
|
|
1104
|
-
soma += parseInt(numeros.charAt(tamanho - i), 10) * pos--;
|
|
1105
|
-
if (pos < 2) {
|
|
1106
|
-
pos = 9;
|
|
1107
|
-
}
|
|
1108
|
-
}
|
|
1109
|
-
resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
|
|
1110
|
-
return !(resultado !== parseInt(digitos.charAt(1), 10));
|
|
1111
|
-
};
|
|
1112
|
-
return ValidationHelper;
|
|
1113
|
-
}());
|
|
1114
|
-
|
|
1115
|
-
function CpfValidator(control) {
|
|
1116
|
-
if (control.value) {
|
|
1117
|
-
if (control.value.length <= 14 && !ValidationHelper.validateCpf(control.value)) {
|
|
1118
|
-
return { cpfInvalid: true };
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
return null;
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
|
-
function CnpjValidator(control) {
|
|
1125
|
-
if (control.value) {
|
|
1126
|
-
if (control.value.length > 14 && !ValidationHelper.validateCnpj(control.value)) {
|
|
1127
|
-
return { cnpjInvalid: true };
|
|
1128
|
-
}
|
|
1129
|
-
}
|
|
1130
|
-
return null;
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
function AutocompleteSelectedValidator(control) {
|
|
1134
|
-
if (control.value &&
|
|
1135
|
-
control.value.hasOwnProperty('value') &&
|
|
1136
|
-
control.value.hasOwnProperty('name') &&
|
|
1137
|
-
Object.keys(control.value).length === 2) {
|
|
1138
|
-
return null;
|
|
1139
|
-
}
|
|
1140
|
-
return { autocompleteSelected: true };
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
var KoalaDynamicFormValidatorResultHelper = /** @class */ (function () {
|
|
1144
|
-
function KoalaDynamicFormValidatorResultHelper() {
|
|
1145
|
-
}
|
|
1146
|
-
KoalaDynamicFormValidatorResultHelper.generate = function (errorMessage) {
|
|
1147
|
-
return {
|
|
1148
|
-
customError: {
|
|
1149
|
-
message: errorMessage
|
|
1150
|
-
}
|
|
1151
|
-
};
|
|
1152
|
-
};
|
|
1153
|
-
return KoalaDynamicFormValidatorResultHelper;
|
|
1154
|
-
}());
|
|
1155
|
-
|
|
1156
|
-
var ShowInvalidFields = /** @class */ (function () {
|
|
1157
|
-
function ShowInvalidFields() {
|
|
1158
|
-
}
|
|
1159
|
-
ShowInvalidFields.prototype.isErrorState = function (control, form) {
|
|
1160
|
-
var isSubmitted = form && form.submitted;
|
|
1161
|
-
return !!(control && control.invalid && (control.errors || control.dirty || control.touched || isSubmitted));
|
|
1162
|
-
};
|
|
1163
|
-
return ShowInvalidFields;
|
|
1164
|
-
}());
|
|
1165
|
-
|
|
1166
|
-
var FormAbstract = /** @class */ (function () {
|
|
1167
|
-
function FormAbstract(formAbstract) {
|
|
1168
|
-
this.formAbstract = formAbstract;
|
|
1169
|
-
this.loader = new rxjs.BehaviorSubject(false);
|
|
1170
|
-
this.btnSubmitDisabled = false;
|
|
1171
|
-
this.getData = new rxjs.BehaviorSubject(false);
|
|
1172
|
-
}
|
|
1173
|
-
FormAbstract.prototype.selecionarAutocomplete = function (controlName, obj, indexName) {
|
|
1174
|
-
if (obj) {
|
|
1175
|
-
var value_1 = indexName ? obj[indexName] : obj;
|
|
1176
|
-
if (Array.isArray(obj)) {
|
|
1177
|
-
value_1 = [];
|
|
1178
|
-
obj.forEach(function (item) {
|
|
1179
|
-
value_1.push(indexName ? item[indexName] : item);
|
|
1180
|
-
});
|
|
1181
|
-
}
|
|
1182
|
-
this.formAbstract().get(controlName).setValue(value_1);
|
|
1183
|
-
}
|
|
1184
|
-
else {
|
|
1185
|
-
this.formAbstract().get(controlName).setValue('');
|
|
1186
|
-
}
|
|
1187
|
-
};
|
|
1188
|
-
FormAbstract.prototype.btnClickGetData = function () {
|
|
1189
|
-
this.getData.next(true);
|
|
1190
|
-
};
|
|
1191
|
-
FormAbstract.prototype.enableShowInvalidFields = function () {
|
|
1192
|
-
this.showInvalidFields = new ShowInvalidFields();
|
|
1193
|
-
};
|
|
1194
|
-
FormAbstract.prototype.loading = function (show, btnLabel) {
|
|
1195
|
-
if (show === void 0) { show = true; }
|
|
1196
|
-
this.btnSubmitDisabled = show;
|
|
1197
|
-
this.loader.next(show);
|
|
1198
|
-
if (show) {
|
|
1199
|
-
this.btnLabel = btnLabel ? btnLabel : 'Enviando Dados...';
|
|
1200
|
-
}
|
|
1201
|
-
else {
|
|
1202
|
-
this.btnLabel = btnLabel ? btnLabel : 'Enviar';
|
|
1203
|
-
}
|
|
1204
|
-
};
|
|
1205
|
-
return FormAbstract;
|
|
1206
|
-
}());
|
|
1207
|
-
|
|
1208
|
-
var DynamicFormComponent = /** @class */ (function (_super) {
|
|
1209
|
-
__extends(DynamicFormComponent, _super);
|
|
1210
|
-
function DynamicFormComponent(fb, dynamicFormService) {
|
|
1211
|
-
var _this = _super.call(this, function () { return _this.form; }) || this;
|
|
1212
|
-
_this.fb = fb;
|
|
1213
|
-
_this.dynamicFormService = dynamicFormService;
|
|
1214
|
-
_this.tabIndexStart = 1;
|
|
1215
|
-
_this.typeField = exports.DynamicFormTypeFieldEnum;
|
|
1216
|
-
_this.hoursAndMinutesMask = '00:000';
|
|
1217
|
-
_this.errorMessage = core.KoalaLanguageHelper;
|
|
1218
|
-
return _this;
|
|
1219
|
-
}
|
|
1220
|
-
DynamicFormComponent.prototype.ngOnInit = function () {
|
|
1221
|
-
var _this = this;
|
|
1222
|
-
var _a;
|
|
1223
|
-
if (!this.form.get('formData')) {
|
|
1224
|
-
this.form.addControl('formData', this.fb.array([]));
|
|
1225
|
-
}
|
|
1226
|
-
this.controls = this.form.get('formData');
|
|
1227
|
-
(_a = this.formConfig) === null || _a === void 0 ? void 0 : _a.forEach(function (config, indexConfig) {
|
|
1228
|
-
var newFormGroup = _this.newControl(config);
|
|
1229
|
-
if (config.asyncValidators) {
|
|
1230
|
-
newFormGroup.get('value').setAsyncValidators(config.asyncValidators);
|
|
1231
|
-
}
|
|
1232
|
-
newFormGroup.get('value').updateValueAndValidity();
|
|
1233
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.dynamicForm) {
|
|
1234
|
-
var formGroupDynamicFormsSubject = newFormGroup.get('dynamicFormConfig').value;
|
|
1235
|
-
formGroupDynamicFormsSubject.subscribe(function (formGroupConfig) {
|
|
1236
|
-
if (formGroupConfig) {
|
|
1237
|
-
formGroupConfig.form.valueChanges.subscribe(function () {
|
|
1238
|
-
if (formGroupConfig.form.valid && (config.valueChanges || _this.showFieldsMoreItensConfig)) {
|
|
1239
|
-
var value = _this.dynamicFormService.emitData(formGroupConfig.form);
|
|
1240
|
-
newFormGroup.get('value').setValue(value);
|
|
1241
|
-
}
|
|
1242
|
-
});
|
|
1243
|
-
}
|
|
1244
|
-
});
|
|
1245
|
-
}
|
|
1246
|
-
if (config.valueChanges ||
|
|
1247
|
-
config.type === exports.DynamicFormTypeFieldEnum.autocomplete ||
|
|
1248
|
-
config.type === exports.DynamicFormTypeFieldEnum.dynamicForm ||
|
|
1249
|
-
_this.showFieldsMoreItensConfig) {
|
|
1250
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.autocomplete) {
|
|
1251
|
-
var autocompleteOptionsSubject = newFormGroup.get('autocompleteOptions').value;
|
|
1252
|
-
if (autocompleteOptionsSubject) {
|
|
1253
|
-
autocompleteOptionsSubject.subscribe(function (options) { return newFormGroup.get('autocompleteOptionsFiltered').value.next(options); });
|
|
1254
|
-
}
|
|
1255
|
-
}
|
|
1256
|
-
newFormGroup.get('value')
|
|
1257
|
-
.valueChanges
|
|
1258
|
-
.pipe(operators.debounceTime(300))
|
|
1259
|
-
.subscribe(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
1260
|
-
var _a, _b, _c, _d, autocompleteOptionsSubject, loader_1;
|
|
1261
|
-
return __generator(this, function (_5) {
|
|
1262
|
-
switch (_5.label) {
|
|
1263
|
-
case 0: return [4 /*yield*/, this.setConfigDynamicForm(newFormGroup)];
|
|
1264
|
-
case 1:
|
|
1265
|
-
_5.sent();
|
|
1266
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.autocomplete) {
|
|
1267
|
-
if (value && (value.hasOwnProperty('value') &&
|
|
1268
|
-
value.hasOwnProperty('name') &&
|
|
1269
|
-
Object.keys(value).length === 2) || (Array.isArray(value) &&
|
|
1270
|
-
newFormGroup.get('multiple').value)) {
|
|
1271
|
-
if (newFormGroup.get('multiple').value) {
|
|
1272
|
-
if (Array.isArray(value)) {
|
|
1273
|
-
newFormGroup.get('autocompleteSelectedValue').setValue(value);
|
|
1274
|
-
newFormGroup.get('value').setValue(value[value.length - 1], { emitEvent: false });
|
|
1275
|
-
}
|
|
1276
|
-
else {
|
|
1277
|
-
if (this.validateAutocompleteSelect(newFormGroup.get('autocompleteSelectedValue').value, value)) {
|
|
1278
|
-
newFormGroup.get('autocompleteSelectedValue').value.push(value);
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
if ((_a = this.autocompleteInput) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
1282
|
-
this.autocompleteInput.nativeElement.value = '';
|
|
1283
|
-
}
|
|
1284
|
-
}
|
|
1285
|
-
else {
|
|
1286
|
-
newFormGroup.get('autocompleteSelectedValue').setValue(value);
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
else if (!newFormGroup.get('multiple').value) {
|
|
1290
|
-
newFormGroup.get('autocompleteSelectedValue').setValue((_c = (_b = utils.koala(this.formConfig)
|
|
1291
|
-
.array()
|
|
1292
|
-
.filter(newFormGroup.get('name').value, 'name')
|
|
1293
|
-
.getValue()[0]) === null || _b === void 0 ? void 0 : _b.autocompleteDefaultValueOnClear) !== null && _c !== void 0 ? _c : null);
|
|
1294
|
-
}
|
|
1295
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.autocomplete) {
|
|
1296
|
-
if (config.autocompleteType === 'all') {
|
|
1297
|
-
autocompleteOptionsSubject = newFormGroup.get('autocompleteOptions').value;
|
|
1298
|
-
newFormGroup.get('autocompleteOptionsFiltered').value.next(this.autocompleteFilter(autocompleteOptionsSubject.value, value));
|
|
1299
|
-
}
|
|
1300
|
-
else if (config.autocompleteType === 'onDemand' && typeof value !== "object") {
|
|
1301
|
-
loader_1 = newFormGroup.get('autocompleteLoading').value;
|
|
1302
|
-
loader_1.next(true);
|
|
1303
|
-
config.autocompleteFilter(value).subscribe(function (options) {
|
|
1304
|
-
newFormGroup.get('autocompleteOptionsFiltered').value.next(options);
|
|
1305
|
-
loader_1.next(false);
|
|
1306
|
-
});
|
|
1307
|
-
}
|
|
1308
|
-
}
|
|
1309
|
-
}
|
|
1310
|
-
if (config.valueChanges) {
|
|
1311
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.autocomplete) {
|
|
1312
|
-
config.valueChanges((newFormGroup.get('multiple').value ?
|
|
1313
|
-
newFormGroup.get('autocompleteSelectedValue').value.map(function (item) { return item.value; }) :
|
|
1314
|
-
(_d = newFormGroup.get('autocompleteSelectedValue').value) === null || _d === void 0 ? void 0 : _d.value));
|
|
1315
|
-
}
|
|
1316
|
-
else {
|
|
1317
|
-
config.valueChanges(value);
|
|
1318
|
-
}
|
|
1319
|
-
}
|
|
1320
|
-
return [2 /*return*/];
|
|
1321
|
-
}
|
|
1322
|
-
});
|
|
1323
|
-
}); });
|
|
1324
|
-
}
|
|
1325
|
-
_this.controls.push(newFormGroup);
|
|
1326
|
-
if (config.moreItemsConfig) {
|
|
1327
|
-
if (config.moreItemsMinItems > 0) {
|
|
1328
|
-
for (var min = 0; min < config.moreItemsMinItems; min++) {
|
|
1329
|
-
if (min <= config.moreItemsMaxItems) {
|
|
1330
|
-
_this.addMoreItem(indexConfig);
|
|
1331
|
-
}
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
if (config.moreItemsConfig.setValues) {
|
|
1335
|
-
config.moreItemsConfig
|
|
1336
|
-
.setValues
|
|
1337
|
-
.subscribe(function (values) { return __awaiter(_this, void 0, void 0, function () {
|
|
1338
|
-
var _this = this;
|
|
1339
|
-
return __generator(this, function (_5) {
|
|
1340
|
-
if (values.length > 0) {
|
|
1341
|
-
values.forEach(function (itemValue, indexValue) {
|
|
1342
|
-
if (!_this.controls.controls[indexConfig].get('moreItemsConfig').value[indexValue]) {
|
|
1343
|
-
_this.addMoreItem(indexConfig);
|
|
1344
|
-
}
|
|
1345
|
-
setTimeout(function () {
|
|
1346
|
-
_this.setValuesOnFields(itemValue, _this.controls.controls[indexConfig].get('moreItemsConfig').value[indexValue].form);
|
|
1347
|
-
}, 300);
|
|
1348
|
-
});
|
|
1349
|
-
}
|
|
1350
|
-
return [2 /*return*/];
|
|
1351
|
-
});
|
|
1352
|
-
}); });
|
|
1353
|
-
}
|
|
1354
|
-
}
|
|
1355
|
-
});
|
|
1356
|
-
if (this.showFields) {
|
|
1357
|
-
this.changeVisibilityFields(this.showFields, this.form);
|
|
1358
|
-
}
|
|
1359
|
-
if (this.setValues) {
|
|
1360
|
-
this.setValuesOnFields(this.setValues, this.form);
|
|
1361
|
-
}
|
|
1362
|
-
};
|
|
1363
|
-
DynamicFormComponent.prototype.hoursAndMinutesApplyMask = function (index, event) {
|
|
1364
|
-
var _a;
|
|
1365
|
-
var control = (_a = this.controls) === null || _a === void 0 ? void 0 : _a.controls[index];
|
|
1366
|
-
var type = control === null || control === void 0 ? void 0 : control.get('type').value;
|
|
1367
|
-
if (type === exports.DynamicFormTypeFieldEnum.hoursAndMinutes) {
|
|
1368
|
-
var value = control === null || control === void 0 ? void 0 : control.get('value').value;
|
|
1369
|
-
if (event.key == 'Backspace' && value.length < 6) {
|
|
1370
|
-
this.hoursAndMinutesMask = '00:000';
|
|
1371
|
-
}
|
|
1372
|
-
else if (event.key != 'Backspace' && value.length >= 6) {
|
|
1373
|
-
this.hoursAndMinutesMask = '000:00';
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
};
|
|
1377
|
-
DynamicFormComponent.prototype.passwordView = function (index) {
|
|
1378
|
-
var _a;
|
|
1379
|
-
var control = (_a = this.controls) === null || _a === void 0 ? void 0 : _a.controls[index];
|
|
1380
|
-
var hidePassword = !(control === null || control === void 0 ? void 0 : control.get('hidePassword').value);
|
|
1381
|
-
control === null || control === void 0 ? void 0 : control.get('hidePassword').setValue(hidePassword);
|
|
1382
|
-
control === null || control === void 0 ? void 0 : control.get('type').setValue(hidePassword ?
|
|
1383
|
-
exports.DynamicFormTypeFieldEnum.password :
|
|
1384
|
-
exports.DynamicFormTypeFieldEnum.text);
|
|
1385
|
-
};
|
|
1386
|
-
DynamicFormComponent.prototype.addMoreItem = function (propIndex) {
|
|
1387
|
-
if (this.controls.controls[propIndex].get('moreItemsConfig').value.length < this.controls.controls[propIndex].get('moreItemsMaxItems').value) {
|
|
1388
|
-
var formGroup = this.fb.group({});
|
|
1389
|
-
this.controls.controls[propIndex].get('moreItemsConfig').value.push({
|
|
1390
|
-
form: formGroup,
|
|
1391
|
-
formConfig: this.formConfig[propIndex].moreItemsConfig.formConfig,
|
|
1392
|
-
showFields: new rxjs.BehaviorSubject([]),
|
|
1393
|
-
showFieldsMoreItensConfig: this.formConfig[propIndex].moreItemsConfig.showFieldsConfig
|
|
1394
|
-
});
|
|
1395
|
-
this.controls.controls[propIndex].get('moreItemsExpanded').setValue(this.controls.controls[propIndex].get('moreItemsConfig').value.length - 1);
|
|
1396
|
-
var formArrayMoreItems = this.controls.controls[propIndex].get('moreItemsFormGroup');
|
|
1397
|
-
formArrayMoreItems.push(formGroup);
|
|
1398
|
-
}
|
|
1399
|
-
};
|
|
1400
|
-
DynamicFormComponent.prototype.removeMoreItem = function (propIndex, removeIndex) {
|
|
1401
|
-
var _this = this;
|
|
1402
|
-
var expandedItemIndex = removeIndex - 1;
|
|
1403
|
-
this.controls.controls[propIndex].get('moreItemsConfig').value.splice(removeIndex, 1);
|
|
1404
|
-
setTimeout(function () {
|
|
1405
|
-
_this.controls.controls[propIndex].get('moreItemsExpanded').setValue((expandedItemIndex < 0) ? 0 : expandedItemIndex);
|
|
1406
|
-
}, 50);
|
|
1407
|
-
};
|
|
1408
|
-
DynamicFormComponent.prototype.clearAutocomplete = function (propIndex) {
|
|
1409
|
-
var _a, _b;
|
|
1410
|
-
if (this.controls.controls[propIndex].get('multiple').value) {
|
|
1411
|
-
this.controls.controls[propIndex].get('autocompleteSelectedValue').setValue([]);
|
|
1412
|
-
this.controls.controls[propIndex].get('value').setValue(null);
|
|
1413
|
-
}
|
|
1414
|
-
else {
|
|
1415
|
-
this.controls.controls[propIndex].get('autocompleteSelectedValue').setValue((_a = this.formConfig[propIndex].autocompleteDefaultValueOnClear) !== null && _a !== void 0 ? _a : null);
|
|
1416
|
-
this.controls.controls[propIndex].get('value').setValue((_b = this.formConfig[propIndex].autocompleteDefaultValueOnClear) !== null && _b !== void 0 ? _b : null);
|
|
1417
|
-
}
|
|
1418
|
-
};
|
|
1419
|
-
DynamicFormComponent.prototype.display = function (option) {
|
|
1420
|
-
return option ? option.name : undefined;
|
|
1421
|
-
};
|
|
1422
|
-
DynamicFormComponent.prototype.removeOptionOnAutocomplete = function (propIndex, option) {
|
|
1423
|
-
var value = this.controls.controls[propIndex].get('autocompleteSelectedValue').value.filter(function (item) { return item !== option; });
|
|
1424
|
-
this.controls.controls[propIndex].get('autocompleteSelectedValue').setValue(value);
|
|
1425
|
-
if (value.length === 0) {
|
|
1426
|
-
this.controls.controls[propIndex].get('autocompleteSelectedValue').setValue([]);
|
|
1427
|
-
this.controls.controls[propIndex].get('value').setValue(null);
|
|
1428
|
-
}
|
|
1429
|
-
else if (this.formConfig[propIndex].valueChanges) {
|
|
1430
|
-
this.formConfig[propIndex].valueChanges(value.map(function (item) { return item.value; }));
|
|
1431
|
-
}
|
|
1432
|
-
};
|
|
1433
|
-
DynamicFormComponent.prototype.getColorChip = function (config) {
|
|
1434
|
-
return config.color;
|
|
1435
|
-
};
|
|
1436
|
-
DynamicFormComponent.prototype.newControl = function (config) {
|
|
1437
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
1438
|
-
var validators = (_a = config.syncValidators) !== null && _a !== void 0 ? _a : [];
|
|
1439
|
-
var value = (_b = config.value) !== null && _b !== void 0 ? _b : '';
|
|
1440
|
-
var valueSelectedAutocomplete = (config.multiple ? [] : ((_c = config.autocompleteDefaultValueOnClear) !== null && _c !== void 0 ? _c : null));
|
|
1441
|
-
if (config.required === true)
|
|
1442
|
-
validators.push(i1.Validators.required);
|
|
1443
|
-
if (config.min && typeof config.min === "number")
|
|
1444
|
-
validators.push(i1.Validators.min(config.min));
|
|
1445
|
-
if (config.max && typeof config.max === "number")
|
|
1446
|
-
validators.push(i1.Validators.max(config.max));
|
|
1447
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.date ||
|
|
1448
|
-
config.type === exports.DynamicFormTypeFieldEnum.datetime ||
|
|
1449
|
-
config.type === exports.DynamicFormTypeFieldEnum.time) {
|
|
1450
|
-
if (config.min && typeof config.min === "string") {
|
|
1451
|
-
validators.push(DateMinValidator(config.min));
|
|
1452
|
-
}
|
|
1453
|
-
if (config.max && typeof config.max === "string") {
|
|
1454
|
-
validators.push(DateMaxValidator(config.max));
|
|
1455
|
-
}
|
|
1456
|
-
}
|
|
1457
|
-
if (config.minLength)
|
|
1458
|
-
validators.push(i1.Validators.minLength(config.minLength));
|
|
1459
|
-
if (config.maxLength)
|
|
1460
|
-
validators.push(i1.Validators.maxLength(config.maxLength));
|
|
1461
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.cpf) {
|
|
1462
|
-
validators.push(CpfValidator);
|
|
1463
|
-
}
|
|
1464
|
-
else if (config.type === exports.DynamicFormTypeFieldEnum.cnpj) {
|
|
1465
|
-
validators.push(CnpjValidator);
|
|
1466
|
-
}
|
|
1467
|
-
else if (config.type === exports.DynamicFormTypeFieldEnum.email) {
|
|
1468
|
-
validators.push(i1.Validators.email);
|
|
1469
|
-
}
|
|
1470
|
-
else if (config.type === exports.DynamicFormTypeFieldEnum.autocomplete) {
|
|
1471
|
-
if (value) {
|
|
1472
|
-
valueSelectedAutocomplete = value;
|
|
1473
|
-
value = (config.multiple ? valueSelectedAutocomplete[0] : value);
|
|
1474
|
-
}
|
|
1475
|
-
if (config.required === true) {
|
|
1476
|
-
validators.push(AutocompleteSelectedValidator);
|
|
1477
|
-
}
|
|
1478
|
-
}
|
|
1479
|
-
else if (config.type === exports.DynamicFormTypeFieldEnum.checkbox) {
|
|
1480
|
-
value = (_d = config.value) !== null && _d !== void 0 ? _d : false;
|
|
1481
|
-
}
|
|
1482
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.hoursAndMinutes &&
|
|
1483
|
-
value.length >= 6) {
|
|
1484
|
-
this.hoursAndMinutesMask = '000:00';
|
|
1485
|
-
}
|
|
1486
|
-
if (config.dynamicFormConfig) {
|
|
1487
|
-
var cloneDynamicFormConfig = {};
|
|
1488
|
-
Object.assign(cloneDynamicFormConfig, config.dynamicFormConfig);
|
|
1489
|
-
cloneDynamicFormConfig.form = config.dynamicFormConfig.form;
|
|
1490
|
-
config.dynamicFormConfig = cloneDynamicFormConfig;
|
|
1491
|
-
}
|
|
1492
|
-
if (config.show === false) {
|
|
1493
|
-
validators = [];
|
|
1494
|
-
}
|
|
1495
|
-
var field = this.fb.group({
|
|
1496
|
-
show: [new rxjs.BehaviorSubject((_e = config.show) !== null && _e !== void 0 ? _e : true)],
|
|
1497
|
-
label: [config.label],
|
|
1498
|
-
name: [config.name],
|
|
1499
|
-
type: [config.type],
|
|
1500
|
-
fileButtonConfig: [{
|
|
1501
|
-
icon: (_g = (_f = config === null || config === void 0 ? void 0 : config.fileButtonConfig) === null || _f === void 0 ? void 0 : _f.icon) !== null && _g !== void 0 ? _g : 'attach_file',
|
|
1502
|
-
text: (_j = (_h = config === null || config === void 0 ? void 0 : config.fileButtonConfig) === null || _h === void 0 ? void 0 : _h.text) !== null && _j !== void 0 ? _j : 'Clique para anexar arquivos',
|
|
1503
|
-
backgroundColor: (_l = (_k = config === null || config === void 0 ? void 0 : config.fileButtonConfig) === null || _k === void 0 ? void 0 : _k.backgroundColor) !== null && _l !== void 0 ? _l : 'white',
|
|
1504
|
-
color: (_o = (_m = config === null || config === void 0 ? void 0 : config.fileButtonConfig) === null || _m === void 0 ? void 0 : _m.color) !== null && _o !== void 0 ? _o : 'blue',
|
|
1505
|
-
accept: (_q = (_p = config === null || config === void 0 ? void 0 : config.fileButtonConfig) === null || _p === void 0 ? void 0 : _p.accept) !== null && _q !== void 0 ? _q : '*'
|
|
1506
|
-
}],
|
|
1507
|
-
dynamicFormConfig: [new rxjs.BehaviorSubject(config.dynamicFormConfig)],
|
|
1508
|
-
dynamicFormGroup: this.fb.array([]),
|
|
1509
|
-
appearance: [config.appearance],
|
|
1510
|
-
floatLabel: [config.floatLabel],
|
|
1511
|
-
placeholder: [config.placeholder],
|
|
1512
|
-
class: [config.class],
|
|
1513
|
-
fieldClass: [config.fieldClass],
|
|
1514
|
-
textHint: [config.textHint],
|
|
1515
|
-
required: [(_r = config.required) !== null && _r !== void 0 ? _r : false],
|
|
1516
|
-
min: [(_s = config.min) !== null && _s !== void 0 ? _s : 0],
|
|
1517
|
-
max: [(_t = config.max) !== null && _t !== void 0 ? _t : 99999999999],
|
|
1518
|
-
minLength: [(_u = config.minLength) !== null && _u !== void 0 ? _u : 0],
|
|
1519
|
-
maxLength: [(_v = config.maxLength) !== null && _v !== void 0 ? _v : 255],
|
|
1520
|
-
disabled: [(_w = config.disabled) !== null && _w !== void 0 ? _w : false],
|
|
1521
|
-
focus: [(_x = config.focus) !== null && _x !== void 0 ? _x : false],
|
|
1522
|
-
multiple: [(_y = config.multiple) !== null && _y !== void 0 ? _y : false],
|
|
1523
|
-
opcoesSelect: [(_z = config.opcoesSelect) !== null && _z !== void 0 ? _z : []],
|
|
1524
|
-
hidePassword: config.type === exports.DynamicFormTypeFieldEnum.password ? true : null,
|
|
1525
|
-
moreItemsButtonIconAddlabel: [config.moreItemsButtonIconAddlabel],
|
|
1526
|
-
moreItemsMinItems: [(_0 = config.moreItemsMinItems) !== null && _0 !== void 0 ? _0 : 0],
|
|
1527
|
-
moreItemsMaxItems: [(_1 = config.moreItemsMaxItems) !== null && _1 !== void 0 ? _1 : 100],
|
|
1528
|
-
moreItemsIcon: [config.moreItemsIcon],
|
|
1529
|
-
moreItemsIconFontColor: [config.moreItemsIconFontColor],
|
|
1530
|
-
moreItemsIconBackgroundColor: [config.moreItemsIconBackgroundColor],
|
|
1531
|
-
moreItemsExpanded: [''],
|
|
1532
|
-
moreItemsConfig: [[]],
|
|
1533
|
-
moreItemsFormGroup: this.fb.array([]),
|
|
1534
|
-
autocompleteLoading: [new rxjs.BehaviorSubject(false)],
|
|
1535
|
-
autocompleteOptions: [config.autocompleteOptions],
|
|
1536
|
-
autocompleteMultipleConfig: [config.autocompleteMultipleConfig],
|
|
1537
|
-
autocompleteOptionsFiltered: [new rxjs.BehaviorSubject([])],
|
|
1538
|
-
autocompleteSelectedValue: [valueSelectedAutocomplete],
|
|
1539
|
-
textLogs: [config === null || config === void 0 ? void 0 : config.textObs],
|
|
1540
|
-
customMasc: [config === null || config === void 0 ? void 0 : config.customMasc],
|
|
1541
|
-
customMascThousandSeparator: [(_2 = config === null || config === void 0 ? void 0 : config.customMascThousandSeparator) !== null && _2 !== void 0 ? _2 : ''],
|
|
1542
|
-
customMascSuffix: [(_3 = config === null || config === void 0 ? void 0 : config.customMascSuffix) !== null && _3 !== void 0 ? _3 : ''],
|
|
1543
|
-
customMascPrefix: [(_4 = config === null || config === void 0 ? void 0 : config.customMascPrefix) !== null && _4 !== void 0 ? _4 : ''],
|
|
1544
|
-
value: [{ value: value, disabled: config.disabled }, validators, config.asyncValidators]
|
|
1545
|
-
});
|
|
1546
|
-
if (config.autocompleteType === "onDemand") {
|
|
1547
|
-
var loader_2 = field.get('autocompleteLoading').value;
|
|
1548
|
-
loader_2.next(true);
|
|
1549
|
-
config.autocompleteFilter('').subscribe(function (options) {
|
|
1550
|
-
field.get('autocompleteOptionsFiltered').value.next(options);
|
|
1551
|
-
loader_2.next(false);
|
|
1552
|
-
});
|
|
1553
|
-
}
|
|
1554
|
-
return field;
|
|
1555
|
-
};
|
|
1556
|
-
DynamicFormComponent.prototype.setValuesOnFields = function (subject, form) {
|
|
1557
|
-
var _this = this;
|
|
1558
|
-
subject.subscribe(function (item) {
|
|
1559
|
-
var e_1, _5;
|
|
1560
|
-
if (item) {
|
|
1561
|
-
var formArray = form.get('formData');
|
|
1562
|
-
try {
|
|
1563
|
-
for (var _6 = __values(item.values()), _7 = _6.next(); !_7.done; _7 = _6.next()) {
|
|
1564
|
-
var prop = _7.value;
|
|
1565
|
-
_this.setValueByProp(formArray, prop);
|
|
1566
|
-
}
|
|
1567
|
-
}
|
|
1568
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1569
|
-
finally {
|
|
1570
|
-
try {
|
|
1571
|
-
if (_7 && !_7.done && (_5 = _6.return)) _5.call(_6);
|
|
1572
|
-
}
|
|
1573
|
-
finally { if (e_1) throw e_1.error; }
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
});
|
|
1577
|
-
};
|
|
1578
|
-
DynamicFormComponent.prototype.changeVisibilityFields = function (subject, form) {
|
|
1579
|
-
var _this = this;
|
|
1580
|
-
subject.pipe(operators.debounceTime(5)).subscribe(function (item) {
|
|
1581
|
-
var e_2, _5, e_3, _6;
|
|
1582
|
-
var _a, _b, _c;
|
|
1583
|
-
if (item) {
|
|
1584
|
-
var formArray = form.get('formData');
|
|
1585
|
-
try {
|
|
1586
|
-
for (var _7 = __values(item.values()), _8 = _7.next(); !_8.done; _8 = _7.next()) {
|
|
1587
|
-
var prop = _8.value;
|
|
1588
|
-
try {
|
|
1589
|
-
for (var _9 = (e_3 = void 0, __values(formArray.controls.entries())), _10 = _9.next(); !_10.done; _10 = _9.next()) {
|
|
1590
|
-
var _11 = __read(_10.value, 2), indexControl = _11[0], control = _11[1];
|
|
1591
|
-
if (control.get('name').value === prop.name) {
|
|
1592
|
-
control.get('show').value.next(prop.show);
|
|
1593
|
-
var config = (_a = _this.formConfig[indexControl]) !== null && _a !== void 0 ? _a : null;
|
|
1594
|
-
if (prop.show) {
|
|
1595
|
-
var validators = [];
|
|
1596
|
-
if (config) {
|
|
1597
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.dynamicForm) {
|
|
1598
|
-
var formArrayMoreItems = control.get('dynamicFormGroup');
|
|
1599
|
-
formArrayMoreItems.push((_b = config === null || config === void 0 ? void 0 : config.dynamicFormConfig) === null || _b === void 0 ? void 0 : _b.form);
|
|
1600
|
-
}
|
|
1601
|
-
else {
|
|
1602
|
-
validators = (_c = config.syncValidators) !== null && _c !== void 0 ? _c : [];
|
|
1603
|
-
if (config.required === true) {
|
|
1604
|
-
validators.push(i1.Validators.required);
|
|
1605
|
-
}
|
|
1606
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.cpf) {
|
|
1607
|
-
validators.push(CpfValidator);
|
|
1608
|
-
}
|
|
1609
|
-
else if (config.type === exports.DynamicFormTypeFieldEnum.cnpj) {
|
|
1610
|
-
validators.push(CnpjValidator);
|
|
1611
|
-
}
|
|
1612
|
-
else if (config.type === exports.DynamicFormTypeFieldEnum.email) {
|
|
1613
|
-
validators.push(i1.Validators.email);
|
|
1614
|
-
}
|
|
1615
|
-
else if (config.required === true &&
|
|
1616
|
-
config.type === exports.DynamicFormTypeFieldEnum.autocomplete) {
|
|
1617
|
-
validators.push(AutocompleteSelectedValidator);
|
|
1618
|
-
}
|
|
1619
|
-
if (config.min && typeof config.min === "number")
|
|
1620
|
-
validators.push(i1.Validators.min(config.min));
|
|
1621
|
-
if (config.max && typeof config.max === "number")
|
|
1622
|
-
validators.push(i1.Validators.max(config.max));
|
|
1623
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.date ||
|
|
1624
|
-
config.type === exports.DynamicFormTypeFieldEnum.datetime ||
|
|
1625
|
-
config.type === exports.DynamicFormTypeFieldEnum.time) {
|
|
1626
|
-
if (config.min && typeof config.min === "string") {
|
|
1627
|
-
validators.push(DateMinValidator(config.min));
|
|
1628
|
-
}
|
|
1629
|
-
if (config.max && typeof config.max === "string") {
|
|
1630
|
-
validators.push(DateMaxValidator(config.max));
|
|
1631
|
-
}
|
|
1632
|
-
}
|
|
1633
|
-
if (config.minLength)
|
|
1634
|
-
validators.push(i1.Validators.minLength(config.minLength));
|
|
1635
|
-
if (config.maxLength)
|
|
1636
|
-
validators.push(i1.Validators.maxLength(config.maxLength));
|
|
1637
|
-
control.get('value').setValidators(validators);
|
|
1638
|
-
if (config.asyncValidators) {
|
|
1639
|
-
control.get('value').setAsyncValidators(config.asyncValidators);
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
control.get('value').updateValueAndValidity();
|
|
1643
|
-
if (prop.clearCurrentValue) {
|
|
1644
|
-
control.get('value').setValue(null);
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
else {
|
|
1649
|
-
control.get('value').clearValidators();
|
|
1650
|
-
control.get('value').clearAsyncValidators();
|
|
1651
|
-
control.setErrors(null);
|
|
1652
|
-
control.get('value').setValue(null);
|
|
1653
|
-
control.get('value').updateValueAndValidity();
|
|
1654
|
-
if (config.type === exports.DynamicFormTypeFieldEnum.dynamicForm) {
|
|
1655
|
-
var formGroup = control;
|
|
1656
|
-
formGroup.removeControl('dynamicFormGroup');
|
|
1657
|
-
formGroup.addControl('dynamicFormGroup', _this.fb.array([]));
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
break;
|
|
1661
|
-
}
|
|
1662
|
-
}
|
|
1663
|
-
}
|
|
1664
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
1665
|
-
finally {
|
|
1666
|
-
try {
|
|
1667
|
-
if (_10 && !_10.done && (_6 = _9.return)) _6.call(_9);
|
|
1668
|
-
}
|
|
1669
|
-
finally { if (e_3) throw e_3.error; }
|
|
1670
|
-
}
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1673
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1674
|
-
finally {
|
|
1675
|
-
try {
|
|
1676
|
-
if (_8 && !_8.done && (_5 = _7.return)) _5.call(_7);
|
|
1677
|
-
}
|
|
1678
|
-
finally { if (e_2) throw e_2.error; }
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
});
|
|
1682
|
-
};
|
|
1683
|
-
DynamicFormComponent.prototype.autocompleteFilter = function (arr, value) {
|
|
1684
|
-
return arr.filter(function (filter) {
|
|
1685
|
-
if (typeof value === 'string') {
|
|
1686
|
-
if (filter) {
|
|
1687
|
-
var find_1 = true;
|
|
1688
|
-
value.toLowerCase()
|
|
1689
|
-
.split(' ')
|
|
1690
|
-
.forEach(function (part) {
|
|
1691
|
-
if (filter.name.toLowerCase().indexOf(part) < 0) {
|
|
1692
|
-
find_1 = false;
|
|
1693
|
-
return false;
|
|
1694
|
-
}
|
|
1695
|
-
});
|
|
1696
|
-
return find_1;
|
|
1697
|
-
}
|
|
1698
|
-
}
|
|
1699
|
-
else {
|
|
1700
|
-
return true;
|
|
1701
|
-
}
|
|
1702
|
-
});
|
|
1703
|
-
};
|
|
1704
|
-
DynamicFormComponent.prototype.setValueByProp = function (formArray, prop) {
|
|
1705
|
-
var e_4, _5;
|
|
1706
|
-
if (formArray) {
|
|
1707
|
-
if (prop.name.indexOf(' > ') >= 0) {
|
|
1708
|
-
var dynamicFormSubject = void 0;
|
|
1709
|
-
var arrPropName_1 = prop.name.split(' > ');
|
|
1710
|
-
var indexPropName_1 = 0;
|
|
1711
|
-
do {
|
|
1712
|
-
var control = formArray.controls.find(function (control) { return control.get('name').value === arrPropName_1[indexPropName_1]; });
|
|
1713
|
-
if (indexPropName_1 === arrPropName_1.length - 2) {
|
|
1714
|
-
dynamicFormSubject = control.get('dynamicFormConfig').value;
|
|
1715
|
-
var dynamicForm = dynamicFormSubject.getValue();
|
|
1716
|
-
if (dynamicForm.formConfig.find(function (fc) { return fc.name === arrPropName_1[arrPropName_1.length - 1]; })) {
|
|
1717
|
-
if (dynamicForm.setValues) {
|
|
1718
|
-
dynamicForm.setValues.next(utils.koala(dynamicForm.setValues.getValue()).array().merge([{
|
|
1719
|
-
name: arrPropName_1[arrPropName_1.length - 1],
|
|
1720
|
-
value: prop.value
|
|
1721
|
-
}]).getValue());
|
|
1722
|
-
}
|
|
1723
|
-
else {
|
|
1724
|
-
dynamicForm.setValues = new rxjs.BehaviorSubject([{
|
|
1725
|
-
name: arrPropName_1[arrPropName_1.length - 1],
|
|
1726
|
-
value: prop.value
|
|
1727
|
-
}]);
|
|
1728
|
-
}
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
indexPropName_1++;
|
|
1732
|
-
} while (indexPropName_1 < arrPropName_1.length - 1);
|
|
1733
|
-
}
|
|
1734
|
-
else {
|
|
1735
|
-
try {
|
|
1736
|
-
for (var _6 = __values(formArray.controls.values()), _7 = _6.next(); !_7.done; _7 = _6.next()) {
|
|
1737
|
-
var control = _7.value;
|
|
1738
|
-
if (control.get('name').value === prop.name) {
|
|
1739
|
-
control.get('value').setValue(prop.value);
|
|
1740
|
-
break;
|
|
1741
|
-
}
|
|
1742
|
-
}
|
|
1743
|
-
}
|
|
1744
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
1745
|
-
finally {
|
|
1746
|
-
try {
|
|
1747
|
-
if (_7 && !_7.done && (_5 = _6.return)) _5.call(_6);
|
|
1748
|
-
}
|
|
1749
|
-
finally { if (e_4) throw e_4.error; }
|
|
1750
|
-
}
|
|
1751
|
-
}
|
|
1752
|
-
}
|
|
1753
|
-
};
|
|
1754
|
-
DynamicFormComponent.prototype.setConfigDynamicForm = function (newFormGroup) {
|
|
1755
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
1756
|
-
var value_1, configs, _loop_1, this_1, configs_1, configs_1_1, config, e_5_1;
|
|
1757
|
-
var e_5, _5;
|
|
1758
|
-
return __generator(this, function (_6) {
|
|
1759
|
-
switch (_6.label) {
|
|
1760
|
-
case 0:
|
|
1761
|
-
if (!this.showFieldsMoreItensConfig) return [3 /*break*/, 8];
|
|
1762
|
-
value_1 = newFormGroup.get('value').value;
|
|
1763
|
-
configs = this.showFieldsMoreItensConfig
|
|
1764
|
-
.filter(function (config) { return config.nameField === newFormGroup.get('name').value; })
|
|
1765
|
-
.sort(function (config) {
|
|
1766
|
-
if (config.fnShow(value_1)) {
|
|
1767
|
-
return 1;
|
|
1768
|
-
}
|
|
1769
|
-
return -1;
|
|
1770
|
-
});
|
|
1771
|
-
_loop_1 = function (config) {
|
|
1772
|
-
var controlDynamicFormConfig, dynamicFormConfigSubject;
|
|
1773
|
-
return __generator(this, function (_7) {
|
|
1774
|
-
switch (_7.label) {
|
|
1775
|
-
case 0:
|
|
1776
|
-
if (!config) return [3 /*break*/, 3];
|
|
1777
|
-
if (!(config.dynamicFormConfig && config.fnShow(value_1))) return [3 /*break*/, 2];
|
|
1778
|
-
controlDynamicFormConfig = this_1.controls
|
|
1779
|
-
.controls
|
|
1780
|
-
.find(function (control) { return config.fieldsToShow.indexOf(control.get('name').value) >= 0; });
|
|
1781
|
-
dynamicFormConfigSubject = controlDynamicFormConfig.get('dynamicFormConfig').value;
|
|
1782
|
-
dynamicFormConfigSubject.next(null);
|
|
1783
|
-
return [4 /*yield*/, delay.delay(1)];
|
|
1784
|
-
case 1:
|
|
1785
|
-
_7.sent();
|
|
1786
|
-
dynamicFormConfigSubject.next(config.dynamicFormConfig(value_1));
|
|
1787
|
-
_7.label = 2;
|
|
1788
|
-
case 2:
|
|
1789
|
-
this_1.dynamicFormService.showFields(this_1.showFields, config.fieldsToShow, config.fnShow(value_1), config.clearCurrentValue);
|
|
1790
|
-
_7.label = 3;
|
|
1791
|
-
case 3: return [2 /*return*/];
|
|
1792
|
-
}
|
|
1793
|
-
});
|
|
1794
|
-
};
|
|
1795
|
-
this_1 = this;
|
|
1796
|
-
_6.label = 1;
|
|
1797
|
-
case 1:
|
|
1798
|
-
_6.trys.push([1, 6, 7, 8]);
|
|
1799
|
-
configs_1 = __values(configs), configs_1_1 = configs_1.next();
|
|
1800
|
-
_6.label = 2;
|
|
1801
|
-
case 2:
|
|
1802
|
-
if (!!configs_1_1.done) return [3 /*break*/, 5];
|
|
1803
|
-
config = configs_1_1.value;
|
|
1804
|
-
return [5 /*yield**/, _loop_1(config)];
|
|
1805
|
-
case 3:
|
|
1806
|
-
_6.sent();
|
|
1807
|
-
_6.label = 4;
|
|
1808
|
-
case 4:
|
|
1809
|
-
configs_1_1 = configs_1.next();
|
|
1810
|
-
return [3 /*break*/, 2];
|
|
1811
|
-
case 5: return [3 /*break*/, 8];
|
|
1812
|
-
case 6:
|
|
1813
|
-
e_5_1 = _6.sent();
|
|
1814
|
-
e_5 = { error: e_5_1 };
|
|
1815
|
-
return [3 /*break*/, 8];
|
|
1816
|
-
case 7:
|
|
1817
|
-
try {
|
|
1818
|
-
if (configs_1_1 && !configs_1_1.done && (_5 = configs_1.return)) _5.call(configs_1);
|
|
1819
|
-
}
|
|
1820
|
-
finally { if (e_5) throw e_5.error; }
|
|
1821
|
-
return [7 /*endfinally*/];
|
|
1822
|
-
case 8: return [2 /*return*/];
|
|
1823
|
-
}
|
|
1824
|
-
});
|
|
1825
|
-
});
|
|
1826
|
-
};
|
|
1827
|
-
DynamicFormComponent.prototype.validateAutocompleteSelect = function (selectedValues, value) {
|
|
1828
|
-
var e_6, _5;
|
|
1829
|
-
var isValid = true;
|
|
1830
|
-
try {
|
|
1831
|
-
for (var _6 = __values(selectedValues.values()), _7 = _6.next(); !_7.done; _7 = _6.next()) {
|
|
1832
|
-
var selectedItem = _7.value;
|
|
1833
|
-
if (selectedItem.name === value.name) {
|
|
1834
|
-
isValid = false;
|
|
1835
|
-
break;
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
}
|
|
1839
|
-
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
1840
|
-
finally {
|
|
1841
|
-
try {
|
|
1842
|
-
if (_7 && !_7.done && (_5 = _6.return)) _5.call(_6);
|
|
1843
|
-
}
|
|
1844
|
-
finally { if (e_6) throw e_6.error; }
|
|
1845
|
-
}
|
|
1846
|
-
return isValid;
|
|
1847
|
-
};
|
|
1848
|
-
return DynamicFormComponent;
|
|
1849
|
-
}(FormAbstract));
|
|
1850
|
-
DynamicFormComponent.decorators = [
|
|
1851
|
-
{ type: i0.Component, args: [{
|
|
1852
|
-
selector: 'koala-dynamic-form',
|
|
1853
|
-
template: "<div [formGroup]=\"form\" class=\"p-relative w-100\">\n <div *ngFor=\"let propriedade of controls?.controls; let i = index;\"\n [ngClass]=\"(propriedade.get('show').value | async) ? propriedade.get('class').value : 'd-none'\"\n formArrayName=\"formData\">\n\t <div *ngIf=\"propriedade.get('show').value | async\">\n\t <mat-form-field\n\t\t *ngIf=\"propriedade.get('type').value == typeField.text ||\n\t propriedade.get('type').value == typeField.password ||\n\t propriedade.get('type').value == typeField.cpf ||\n\t propriedade.get('type').value == typeField.cnpj ||\n\t propriedade.get('type').value == typeField.datetime ||\n\t propriedade.get('type').value == typeField.email ||\n\t propriedade.get('type').value == typeField.number ||\n\t propriedade.get('type').value == typeField.stringNumber ||\n\t propriedade.get('type').value == typeField.time ||\n\t propriedade.get('type').value == typeField.date ||\n\t propriedade.get('type').value == typeField.hoursAndMinutes ||\n\t propriedade.get('type').value == typeField.phone ||\n\t propriedade.get('type').value == typeField.percent ||\n\t propriedade.get('type').value == typeField.color ||\n\t propriedade.get('type').value == typeField.month ||\n\t propriedade.get('type').value == typeField.competenceDate ||\n propriedade.get('type').value == typeField.stringWithCustomMasc\"\n\t\t [appearance]=\"propriedade.get('appearance').value\"\n\t\t [floatLabel]=\"propriedade.get('floatLabel').value\"\n\t\t [formGroupName]=\"i\"\n\t\t [ngClass]=\"propriedade.get('fieldClass').value\">\n\t <mat-label>{{propriedade.get('label').value}}</mat-label>\n\t <input\n\t\t [dropSpecialCharacters]=\"false\"\n\t\t [koalaAutoFocus]=\"propriedade.get('focus').value\"\n\t\t (keyup)=\"hoursAndMinutesApplyMask(i, $event)\"\n\t\t [required]=\"propriedade.get('required').value\"\n\t\t [tabIndex]=\"tabIndexStart + i\"\n\t\t [mask]=\"((propriedade.get('type').value == typeField.competenceDate) ? '00/0000' : null) ||\n\t\t ((propriedade.get('type').value == typeField.phone) ? '(00)0000-0000?0' : null) ||\n\t\t ((propriedade.get('type').value == typeField.stringNumber) ? '0{'+propriedade.get('maxLength').value+'}' : null) ||\n ((propriedade.get('type').value == typeField.cpf) ? '000.000.000-00' : null) ||\n ((propriedade.get('type').value == typeField.cnpj) ? '00.000.000/0000-00' : null) ||\n ((propriedade.get('type').value == typeField.percent) ? 'percent' : null) ||\n\t\t\t\t\t\t\t\t\t((propriedade.get('type').value == typeField.hoursAndMinutes) ? hoursAndMinutesMask : null) ||\n\t\t\t\t\t\t\t\t\t((propriedade.get('type').value == typeField.stringWithCustomMasc) ? propriedade.get('customMasc').value : null)\"\n\t\t [validation]=\"\n\t (propriedade.get('type').value == typeField.cpf && propriedade.get('value').errors?.cpfInvalid) ||\n\t (propriedade.get('type').value == typeField.cnpj && propriedade.get('value').errors?.cnpjInvalid)\"\n\t\t [type]=\"((propriedade.get('type').value == typeField.cpf ||\n propriedade.get('type').value == typeField.cnpj ||\n propriedade.get('type').value == typeField.phone ||\n propriedade.get('type').value == typeField.percent\n )) ? 'tel' : (\n propriedade.get('type').value == typeField.month ?\n 'month' : (\n propriedade.get('type').value == typeField.date ?\n 'date' : (\n propriedade.get('type').value == typeField.datetime ?\n 'datetime-local' : (\n propriedade.get('type').value == typeField.email ?\n 'email' : (\n propriedade.get('type').value == typeField.number ?\n 'number' : (\n propriedade.get('type').value == typeField.time ?\n 'time' : (\n propriedade.get('type').value == typeField.password ?\n 'password' : (\n propriedade.get('type').value == typeField.color ?\n 'color' : 'text'))))))))\"\n [min]=\"propriedade.get('min').value\"\n [max]=\"propriedade.get('max').value\"\n [minLength]=\"propriedade.get('minLength').value\"\n [maxLength]=\"propriedade.get('maxLength').value\"\n [thousandSeparator]=\"propriedade.get('customMascThousandSeparator').value\"\n [suffix]=\"propriedade.get('customMascSuffix').value\"\n [prefix]=\"propriedade.get('customMascPrefix').value\"\n separatorLimit=\"0\"\n autocomplete=\"off\"\n\t\t formControlName=\"value\"\n\t\t matInput/>\n\t <button\n\t\t (click)=\"passwordView(i)\"\n\t\t *ngIf=\"propriedade.get('hidePassword').value !== null\"\n\t\t [attr.aria-label]=\"'Hide password'\"\n\t\t [attr.aria-pressed]=\"propriedade.get('hidePassword').value\"\n\t\t mat-icon-button matSuffix tabindex=\"-1\" type=\"button\">\n\t <mat-icon>{{propriedade.get('hidePassword').value ? 'visibility_off' : 'visibility'}}</mat-icon>\n\t </button>\n\t <mat-hint *ngIf=\"propriedade.get('textHint').value\">\n\t <mat-icon>info</mat-icon>\n\t\t {{propriedade.get('textHint').value}}\n\t </mat-hint>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.required\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getRequiredMessage(propriedade.get('label').value)}}\n\t </mat-error>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.cpfInvalid\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getInvalidMessage(propriedade.get('label').value)}}\n\t </mat-error>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.cnpjInvalid\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getInvalidMessage(propriedade.get('label').value)}}\n\t </mat-error>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.email\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getInvalidMessage(propriedade.get('label').value)}}\n\t </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.min\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMinMessage(propriedade.get('min').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.max\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMaxMessage(propriedade.get('max').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.minLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMinLengthMessage(propriedade.get('minLength').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.maxLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMaxLengthMessage(propriedade.get('maxLength').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.dateMin\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getDateMinMessage()}}\n {{propriedade.get('min').value | date:\"shortDate\"}}.\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.dateMax\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getDateMaxMessage()}}\n {{propriedade.get('max').value | date:\"shortDate\"}}.\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.customError\">\n <mat-icon>error</mat-icon>\n {{propriedade.get('value').errors?.customError.message}}.\n </mat-error>\n\t </mat-form-field>\n\t <mat-form-field\n\t\t *ngIf=\"propriedade.get('type').value == typeField.coin\"\n\t\t [appearance]=\"propriedade.get('appearance').value\"\n\t\t [floatLabel]=\"propriedade.get('floatLabel').value\"\n\t\t [formGroupName]=\"i\"\n\t\t [ngClass]=\"propriedade.get('fieldClass').value\">\n\t <mat-label>{{propriedade.get('label').value}}</mat-label>\n\t <input\n\t\t [koalaAutoFocus]=\"propriedade.get('focus').value\"\n\t\t [required]=\"propriedade.get('required').value\"\n [tabIndex]=\"tabIndexStart + i\"\n [min]=\"propriedade.get('min').value\"\n [max]=\"propriedade.get('max').value\"\n [minLength]=\"propriedade.get('minLength').value\"\n [maxLength]=\"propriedade.get('maxLength').value\"\n autocomplete=\"off\"\n\t\t currencyMask\n\t\t formControlName=\"value\"\n\t\t matInput\n\t\t type=\"tel\"/>\n\t <mat-hint *ngIf=\"propriedade.get('textHint').value\">\n\t <mat-icon>info</mat-icon>\n\t\t {{propriedade.get('textHint').value}}\n\t </mat-hint>\n <mat-error *ngIf=\"propriedade.get('value').errors?.min\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMinMessage(propriedade.get('min').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.max\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMaxMessage(propriedade.get('max').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.minLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMinLengthMessage(propriedade.get('minLength').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.maxLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMaxLengthMessage(propriedade.get('maxLength').value)}}\n </mat-error>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.required\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getRequiredMessage(propriedade.get('label').value)}}\n\t </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.customError\">\n <mat-icon>error</mat-icon>\n {{propriedade.get('value').errors?.customError.message}}.\n </mat-error>\n\t </mat-form-field>\n <mat-form-field\n *ngIf=\"propriedade.get('type').value == typeField.float\"\n [appearance]=\"propriedade.get('appearance').value\"\n [floatLabel]=\"propriedade.get('floatLabel').value\"\n [formGroupName]=\"i\"\n [ngClass]=\"propriedade.get('fieldClass').value\">\n <mat-label>{{propriedade.get('label').value}}</mat-label>\n <input\n [koalaAutoFocus]=\"propriedade.get('focus').value\"\n [required]=\"propriedade.get('required').value\"\n [tabIndex]=\"tabIndexStart + i\"\n [min]=\"propriedade.get('min').value\"\n [max]=\"propriedade.get('max').value\"\n [minLength]=\"propriedade.get('minLength').value\"\n [maxLength]=\"propriedade.get('maxLength').value\"\n autocomplete=\"off\"\n currencyMask\n [options]=\"{prefix: ''}\"\n formControlName=\"value\"\n matInput\n type=\"tel\"/>\n <mat-hint *ngIf=\"propriedade.get('textHint').value\">\n <mat-icon>info</mat-icon>\n {{propriedade.get('textHint').value}}\n </mat-hint>\n <mat-error *ngIf=\"propriedade.get('value').errors?.min\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMinMessage(propriedade.get('min').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.max\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMaxMessage(propriedade.get('max').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.minLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMinLengthMessage(propriedade.get('minLength').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.maxLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMaxLengthMessage(propriedade.get('maxLength').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.required\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getRequiredMessage(propriedade.get('label').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.customError\">\n <mat-icon>error</mat-icon>\n {{propriedade.get('value').errors?.customError.message}}.\n </mat-error>\n </mat-form-field>\n\t <mat-form-field\n\t\t *ngIf=\"propriedade.get('type').value == typeField.valueList ||\n\t propriedade.get('type').value == typeField.textarea\"\n\t\t [appearance]=\"propriedade.get('appearance').value\"\n\t\t [floatLabel]=\"propriedade.get('floatLabel').value\"\n\t\t [formGroupName]=\"i\"\n\t\t [ngClass]=\"propriedade.get('fieldClass').value\">\n\t <mat-label>{{propriedade.get('label').value}}</mat-label>\n\t <textarea\n #textarea\n\t\t [koalaAutoFocus]=\"propriedade.get('focus').value\"\n\t\t [mat-autosize]=\"true\"\n\t\t [matAutosizeMaxRows]=\"8\"\n\t\t [matAutosizeMinRows]=\"3\"\n\t\t [required]=\"propriedade.get('required').value\"\n [tabIndex]=\"tabIndexStart + i\"\n [minLength]=\"propriedade.get('minLength').value\"\n [maxLength]=\"propriedade.get('maxLength').value\"\n\t\t formControlName=\"value\"\n\t\t matInput>\n </textarea>\n\t <mat-hint *ngIf=\"propriedade.get('textHint').value\">\n\t <mat-icon>info</mat-icon>\n\t\t {{propriedade.get('textHint').value}}\n\t </mat-hint>\n <mat-hint align=\"end\" *ngIf=\"propriedade.get('maxLength').value\">\n {{textarea.value.length}}/{{propriedade.get('maxLength').value}}\n </mat-hint>\n <mat-error *ngIf=\"propriedade.get('value').errors?.minLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMinLengthMessage(propriedade.get('minLength').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.maxLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMaxLengthMessage(propriedade.get('maxLength').value)}}\n </mat-error>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.required\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getRequiredMessage(propriedade.get('label').value)}}\n\t </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.customError\">\n <mat-icon>error</mat-icon>\n {{propriedade.get('value').errors?.customError.message}}.\n </mat-error>\n\t </mat-form-field>\n\t\t <mat-form-field\n\t\t\t *ngIf=\"propriedade.get('type').value == typeField.textLogs\"\n\t\t\t [appearance]=\"propriedade.get('appearance').value\"\n\t\t\t [floatLabel]=\"propriedade.get('floatLabel').value\"\n\t\t\t [formGroupName]=\"i\"\n\t\t\t [ngClass]=\"propriedade.get('fieldClass').value\">\n\t <mat-label>{{propriedade.get('label').value}}</mat-label>\n\t <div [innerHTML]=\"propriedade.get('textLogs').value\" class=\"text-obs\"></div>\n\t <textarea\n #textarea\n\t\t [koalaAutoFocus]=\"propriedade.get('focus').value\"\n\t\t [mat-autosize]=\"true\"\n\t\t [matAutosizeMaxRows]=\"8\"\n\t\t [matAutosizeMinRows]=\"3\"\n\t\t [required]=\"propriedade.get('required').value\"\n [tabIndex]=\"tabIndexStart + i\"\n [minLength]=\"propriedade.get('minLength').value\"\n [maxLength]=\"propriedade.get('maxLength').value\"\n\t\t formControlName=\"value\"\n\t\t matInput>\n\t </textarea>\n\t <mat-hint *ngIf=\"propriedade.get('textHint').value\">\n\t <mat-icon>info</mat-icon>\n\t\t {{propriedade.get('textHint').value}}\n\t </mat-hint>\n <mat-hint align=\"end\" *ngIf=\"propriedade.get('maxLength').value\">\n {{textarea.value.length}}/{{propriedade.get('maxLength').value}}\n </mat-hint>\n <mat-error *ngIf=\"propriedade.get('value').errors?.minLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMinLengthMessage(propriedade.get('minLength').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.maxLength\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getMaxLengthMessage(propriedade.get('maxLength').value)}}\n </mat-error>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.required\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getRequiredMessage(propriedade.get('label').value)}}\n\t </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.customError\">\n <mat-icon>error</mat-icon>\n {{propriedade.get('value').errors?.customError.message}}.\n </mat-error>\n\t </mat-form-field>\n\t <mat-form-field\n\t\t *ngIf=\"propriedade.get('type').value == typeField.select\"\n\t\t [appearance]=\"propriedade.get('appearance').value\"\n\t\t [floatLabel]=\"propriedade.get('floatLabel').value\"\n\t\t [formGroupName]=\"i\"\n\t\t [ngClass]=\"propriedade.get('fieldClass').value\">\n\t <mat-label>{{propriedade.get('label').value}}</mat-label>\n\t <mat-select [multiple]=\"propriedade.get('multiple').value\" [required]=\"propriedade.get('required').value\"\n [tabIndex]=\"tabIndexStart + i\" formControlName=\"value\">\n\t <mat-option *ngFor=\"let options of propriedade.get('opcoesSelect').value\" [value]=\"options.value\">\n\t {{options.name}}\n\t </mat-option>\n\t </mat-select>\n\t <mat-hint *ngIf=\"propriedade.get('textHint').value\">\n\t <mat-icon>info</mat-icon>\n\t\t {{propriedade.get('textHint').value}}\n\t </mat-hint>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.required\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getRequiredMessage(propriedade.get('label').value)}}\n\t </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.customError\">\n <mat-icon>error</mat-icon>\n {{propriedade.get('value').errors?.customError.message}}.\n </mat-error>\n\t </mat-form-field>\n <mat-form-field\n class=\"select-multiple-native\"\n *ngIf=\"propriedade.get('type').value == typeField.selectMultipleNative\"\n [appearance]=\"propriedade.get('appearance').value\"\n [floatLabel]=\"propriedade.get('floatLabel').value\"\n [formGroupName]=\"i\"\n [ngClass]=\"propriedade.get('fieldClass').value\">\n <mat-label>{{propriedade.get('label').value}}</mat-label>\n <select\n matNativeControl\n formControlName=\"value\"\n multiple\n [tabIndex]=\"tabIndexStart + i\"\n [required]=\"propriedade.get('required').value\">\n <option *ngFor=\"let options of propriedade.get('opcoesSelect').value\" [value]=\"options.value\">\n {{options.name}}\n </option>\n </select>\n <mat-hint *ngIf=\"propriedade.get('textHint').value\">\n <mat-icon>info</mat-icon>\n {{propriedade.get('textHint').value}}\n </mat-hint>\n <mat-error *ngIf=\"propriedade.get('value').errors?.required\">\n <mat-icon>error</mat-icon>\n {{errorMessage.getRequiredMessage(propriedade.get('label').value)}}\n </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.customError\">\n <mat-icon>error</mat-icon>\n {{propriedade.get('value').errors?.customError.message}}.\n </mat-error>\n </mat-form-field>\n\t <div\n\t\t *ngIf=\"propriedade.get('type').value == typeField.checkbox\"\n\t\t [formGroupName]=\"i\"\n\t\t [ngClass]=\"propriedade.get('fieldClass').value\">\n\t <mat-checkbox\n [tabIndex]=\"tabIndexStart + i\"\n\t\t formControlName=\"value\"\n\t\t value=\"true\">\n\t {{propriedade.get('label').value}}\n\t </mat-checkbox>\n\t </div>\n\t\t <div\n\t\t\t *ngIf=\"propriedade.get('type').value == typeField.moreItems\"\n\t\t\t [formGroupName]=\"i\"\n\t\t\t [ngClass]=\"propriedade.get('fieldClass').value\"\n\t\t\t class=\"more-items-content\">\n\t\t\t <fieldset>\n\t\t\t\t <legend>\n\t\t\t\t\t <koala-button\n\t\t\t\t\t\t (click)=\"addMoreItem(i)\"\n\t\t\t\t\t\t [disabled]=\"propriedade.get('moreItemsConfig').value.length === propriedade.get('moreItemsMaxItems').value\"\n\t\t\t\t\t\t [tooltip]=\"propriedade.get('moreItemsButtonIconAddlabel').value\"\n\t\t\t\t\t\t [backgroundColor]=\"propriedade.get('moreItemsIconBackgroundColor').value\"\n [color]=\"propriedade.get('moreItemsIconFontColor').value\"\n\t\t\t\t\t\t class=\"btn-add-more-items\"\n\t\t\t\t\t\t icon=\"add\">\n\t\t\t\t\t </koala-button>\n\t\t\t\t\t {{propriedade.get('label').value}} (Min.: {{propriedade.get('moreItemsMinItems').value}}\n\t\t\t\t\t | M\u00E1x.: {{propriedade.get('moreItemsMaxItems').value}})\n\t\t\t\t </legend>\n\t\t\t\t <mat-accordion class=\"items\" multi>\n\t\t\t\t\t <mat-expansion-panel\n\t\t\t\t\t\t *ngFor=\"let item of propriedade.get('moreItemsConfig').value.slice().reverse(); index as indexMoreItems\"\n\t\t\t\t\t\t expanded>\n\t\t\t\t\t\t <mat-expansion-panel-header>\n\t\t\t\t\t\t\t\t<mat-panel-title class=\"titleForm\">#\n\t\t\t\t\t\t\t\t\t{{propriedade.get('moreItemsConfig').value.length - 1 - indexMoreItems + 1}}</mat-panel-title>\n\t\t\t\t\t\t\t\t<mat-panel-description class=\"titleForm\">\n\t\t\t\t\t\t\t\t\t{{propriedade.get('label').value}}\n\t\t\t\t\t\t\t\t\t<mat-icon>{{propriedade.get('moreItemsIcon').value}}</mat-icon>\n\t\t\t\t\t\t\t\t</mat-panel-description>\n\t\t\t\t\t\t\t</mat-expansion-panel-header>\n\t\t\t\t\t\t <koala-dynamic-form\n\t\t\t\t\t\t\t [showFieldsMoreItensConfig]=\"item.showFieldsMoreItensConfig\"\n\t\t\t\t\t\t\t [showFields]=\"item.showFields\"\n\t\t\t\t\t\t\t [formConfig]=\"item.formConfig\"\n\t\t\t\t\t\t\t [form]=\"item.form\"\n [tabIndexStart]=\"tabIndexStart + i\">\n\t\t\t\t\t\t </koala-dynamic-form>\n\t\t\t\t\t <mat-action-row\n\t\t\t\t\t\t *ngIf=\"propriedade.get('moreItemsConfig').value.length > propriedade.get('moreItemsMinItems').value\">\n\t\t\t\t\t <button\n\t\t\t\t\t\t (click)=\"removeMoreItem(i, propriedade.get('moreItemsConfig').value.length - 1 - indexMoreItems)\"\n\t\t\t\t\t\t mat-icon-button>\n\t\t\t\t\t\t <mat-icon>delete</mat-icon>\n\t\t\t\t\t </button>\n\t\t\t\t\t </mat-action-row>\n\t\t\t\t\t </mat-expansion-panel>\n\t\t\t\t </mat-accordion>\n\t\t\t </fieldset>\n\t\t </div>\n\t\t <mat-form-field\n\t\t\t *ngIf=\"propriedade.get('type').value == typeField.autocomplete\"\n\t\t\t [appearance]=\"propriedade.get('appearance').value\"\n\t\t\t [floatLabel]=\"propriedade.get('floatLabel').value\"\n\t\t\t [formGroupName]=\"i\"\n\t\t\t [ngClass]=\"propriedade.get('fieldClass').value\">\n\t <mat-label>{{propriedade.get('label').value}} {{propriedade.get('multiple').value &&\n\t propriedade.get('required').value ? '*' : ''}}</mat-label>\n\t\t\t <div *ngIf=\"propriedade.get('multiple').value else single\">\n\t <mat-chip-list #chipList>\n\t <mat-chip\n\t\t (removed)=\"removeOptionOnAutocomplete(i, option)\"\n\t\t *ngFor=\"let option of propriedade.get('autocompleteSelectedValue').value\"\n\t\t [color]=\"getColorChip(propriedade.get('autocompleteMultipleConfig').value | async)\"\n\t\t [removable]=\"true\"\n\t\t [selectable]=\"true\">\n\t {{display(option)}}\n\t\t <mat-icon matChipRemove>cancel</mat-icon>\n\t </mat-chip>\n\t <input\n\t\t #autocompleteInput\n [koalaAutoFocus]=\"propriedade.get('focus').value\"\n\t\t [required]=\"propriedade.get('required').value\"\n\t\t [matAutocomplete]=\"auto\"\n\t\t [matChipInputFor]=\"chipList\"\n [tabIndex]=\"tabIndexStart + i\"\n autocomplete=\"off\"\n\t\t formControlName=\"value\"\n\t\t matInput\n\t\t type=\"text\"\n\t\t placeholder=\"Selecione um ou mais op\u00E7\u00F5es...\">\n\t </mat-chip-list>\n\t </div>\n\t <ng-template #single>\n\t\t <input\n\t\t\t [matAutocomplete]=\"auto\"\n [koalaAutoFocus]=\"propriedade.get('focus').value\"\n\t\t\t [required]=\"propriedade.get('required').value\"\n [tabIndex]=\"tabIndexStart + i\"\n autocomplete=\"off\"\n\t\t\t formControlName=\"value\"\n\t\t\t matInput\n\t\t\t placeholder=\"Selecione uma op\u00E7\u00E3o...\"\n\t\t\t type=\"text\">\n\t </ng-template>\n\t <mat-spinner *ngIf=\"propriedade.get('autocompleteLoading').value | async\" color=\"primary\"\n\t matSuffix></mat-spinner>\n\t <button\n\t\t (click)=\"clearAutocomplete(i)\"\n\t\t *ngIf=\"\n\t !(propriedade.get('autocompleteLoading').value | async) &&\n\t !propriedade.get('disabled').value\"\n\t\t color=\"warn\"\n\t\t mat-icon-button\n\t\t matSuffix\n\t\t type=\"button\">\n\t <mat-icon>close</mat-icon>\n\t </button>\n\t <mat-hint *ngIf=\"propriedade.get('textHint').value\">\n\t <mat-icon>info</mat-icon>\n\t\t {{propriedade.get('textHint').value}}\n\t </mat-hint>\n\t <mat-error *ngIf=\"propriedade.get('value').errors?.required || propriedade.get('value').errors?.autocompleteSelected\">\n\t <mat-icon>error</mat-icon>\n {{errorMessage.getAutocompleteMessage(propriedade.get('label').value)}}\n\t </mat-error>\n <mat-error *ngIf=\"propriedade.get('value').errors?.customError\">\n <mat-icon>error</mat-icon>\n {{propriedade.get('value').errors?.customError.message}}.\n </mat-error>\n\t <mat-autocomplete\n\t\t #auto=\"matAutocomplete\"\n\t\t [displayWith]=\"display\" autoActiveFirstOption>\n\t\t <div *ngIf=\"(propriedade.get('autocompleteOptionsFiltered').value | async) as options\">\n\t\t <mat-option *ngFor=\"let option of options\" [value]=\"option\">\n\t\t {{option.name}}\n\t\t </mat-option>\n\t\t </div>\n\t </mat-autocomplete>\n\t </mat-form-field>\n\t\t <div *ngIf=\"propriedade.get('type').value == typeField.file\">\n\t\t\t <koala-file-button\n\t\t\t\t (getFiles)=\"propriedade.get('value').setValue($event)\"\n\t\t\t\t [accept]=\"propriedade.get('fileButtonConfig').value.accept\"\n\t\t\t\t [backgroundColor]=\"propriedade.get('fileButtonConfig').value.backgroundColor\"\n\t\t\t\t [color]=\"propriedade.get('fileButtonConfig').value.color\"\n\t\t\t\t [disabled]=\"propriedade.get('disabled').value\"\n\t\t\t\t [icon]=\"propriedade.get('fileButtonConfig').value.icon\"\n\t\t\t\t [multiple]=\"propriedade.get('multiple').value\"\n\t\t\t\t [text]=\"propriedade.get('fileButtonConfig').value.text\">\n\t\t\t </koala-file-button>\n\t\t </div>\n\t\t <div *ngIf=\"\n\t\t propriedade.get('type').value == typeField.dynamicForm &&\n\t\t\t\t(propriedade.get('dynamicFormConfig').value | async) as dynamicFormConfig\">\n\t\t\t <fieldset *ngIf=\"propriedade.get('label').value else dynamicFormWithoutLabel\">\n\t\t\t\t <legend>{{propriedade.get('label').value}}</legend>\n\t\t\t\t <koala-dynamic-form\n\t\t\t\t\t [formConfig]=\"dynamicFormConfig.formConfig\"\n\t\t\t\t\t [form]=\"dynamicFormConfig.form\"\n\t\t\t\t\t [setValues]=\"dynamicFormConfig.setValues\"\n\t\t\t\t\t [showFields]=\"dynamicFormConfig.showFields\"\n [tabIndexStart]=\"tabIndexStart + i\">\n\t\t\t\t </koala-dynamic-form>\n\t\t\t </fieldset>\n\t\t\t <ng-template #dynamicFormWithoutLabel>\n\t\t\t\t <koala-dynamic-form\n\t\t\t\t\t [formConfig]=\"dynamicFormConfig.formConfig\"\n\t\t\t\t\t [form]=\"dynamicFormConfig.form\"\n\t\t\t\t\t [setValues]=\"dynamicFormConfig.setValues\"\n\t\t\t\t\t [showFields]=\"dynamicFormConfig.showFields\"\n [tabIndexStart]=\"tabIndexStart + i\">\n\t\t\t\t </koala-dynamic-form>\n\t\t\t </ng-template>\n\t\t </div>\n <div\n class=\"radio-btn-group\"\n *ngIf=\"propriedade.get('type').value == typeField.radio\"\n [formGroupName]=\"i\"\n [ngClass]=\"propriedade.get('fieldClass').value\">\n <mat-radio-group formControlName=\"value\">\n <label *ngIf=\"propriedade.get('label').value\">{{propriedade.get('label').value}}</label>\n <mat-radio-button\n [tabIndex]=\"tabIndexStart + i\"\n *ngFor=\"let options of propriedade.get('opcoesSelect').value\"\n [value]=\"options.value\">\n {{options.name}}\n </mat-radio-button>\n </mat-radio-group>\n </div>\n\t </div>\n </div>\n <ng-content select=\"[btn-submit]\"></ng-content>\n</div>\n",
|
|
1854
|
-
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
1855
|
-
styles: [".more-items-content fieldset{border:1px solid #cccccc;padding:16px}.more-items-content fieldset legend{font-family:\"Josefin Sans\",sans-serif;font-size:11px;font-weight:bold;padding:0 8px}.more-items-content .items .titleForm{color:#616161}.more-items-content .items .mat-expansion-panel-header-title,.more-items-content .items .mat-expansion-panel-header-description{flex-basis:0}.more-items-content .items .mat-expansion-panel-header-description{align-items:center;justify-content:space-between}.more-items-content .items .mat-form-field+.mat-form-field{margin-left:8px}.radio-btn-group label{position:relative;display:block;padding:10px 0}.text-obs{background:#eeeeee;border-radius:5px;color:#212121;font-family:OpenSansLight,sans-serif;height:150px;margin:0 auto 10px;overflow-y:auto;padding:10px;position:relative;width:calc(100% - 27px)}.select-multiple-native{margin-bottom:15px}.select-multiple-native select{width:100%;height:150px;background:transparent;border:none}.select-multiple-native select:focus,.select-multiple-native select:active{outline:none}.select-multiple-native select option{padding:5px 10px;font-family:JosefinSans,sans-serif}.select-multiple-native select option:checked{background:#f1f1f1!important}\n"]
|
|
1856
|
-
},] }
|
|
1857
|
-
];
|
|
1858
|
-
DynamicFormComponent.ctorParameters = function () { return [
|
|
1859
|
-
{ type: i1.FormBuilder },
|
|
1860
|
-
{ type: KoalaDynamicFormService }
|
|
1861
|
-
]; };
|
|
1862
|
-
DynamicFormComponent.propDecorators = {
|
|
1863
|
-
form: [{ type: i0.Input }],
|
|
1864
|
-
formConfig: [{ type: i0.Input }],
|
|
1865
|
-
showFields: [{ type: i0.Input }],
|
|
1866
|
-
showFieldsMoreItensConfig: [{ type: i0.Input }],
|
|
1867
|
-
setValues: [{ type: i0.Input }],
|
|
1868
|
-
tabIndexStart: [{ type: i0.Input }],
|
|
1869
|
-
autocompleteInput: [{ type: i0.ViewChild, args: ['autocompleteInput',] }]
|
|
1870
|
-
};
|
|
1871
|
-
|
|
1872
|
-
var KoalaAutofocusDirective = /** @class */ (function () {
|
|
1873
|
-
function KoalaAutofocusDirective(el) {
|
|
1874
|
-
this.el = el;
|
|
1875
|
-
}
|
|
1876
|
-
KoalaAutofocusDirective.prototype.ngAfterContentInit = function () {
|
|
1877
|
-
var _this = this;
|
|
1878
|
-
if (this.koalaAutoFocus) {
|
|
1879
|
-
setTimeout(function () {
|
|
1880
|
-
_this.el.nativeElement.focus();
|
|
1881
|
-
}, 500);
|
|
1882
|
-
}
|
|
1883
|
-
};
|
|
1884
|
-
return KoalaAutofocusDirective;
|
|
1885
|
-
}());
|
|
1886
|
-
KoalaAutofocusDirective.decorators = [
|
|
1887
|
-
{ type: i0.Directive, args: [{
|
|
1888
|
-
selector: '[koalaAutoFocus]'
|
|
1889
|
-
},] }
|
|
1890
|
-
];
|
|
1891
|
-
KoalaAutofocusDirective.ctorParameters = function () { return [
|
|
1892
|
-
{ type: i0.ElementRef }
|
|
1893
|
-
]; };
|
|
1894
|
-
KoalaAutofocusDirective.propDecorators = {
|
|
1895
|
-
koalaAutoFocus: [{ type: i0.Input }]
|
|
1896
|
-
};
|
|
1897
|
-
|
|
1898
|
-
var KoalaFormModule = /** @class */ (function () {
|
|
1899
|
-
function KoalaFormModule() {
|
|
1900
|
-
}
|
|
1901
|
-
return KoalaFormModule;
|
|
1902
|
-
}());
|
|
1903
|
-
KoalaFormModule.decorators = [
|
|
1904
|
-
{ type: i0.NgModule, args: [{
|
|
1905
|
-
declarations: [
|
|
1906
|
-
BtnSubmitComponent,
|
|
1907
|
-
DynamicFormComponent,
|
|
1908
|
-
KoalaAutofocusDirective
|
|
1909
|
-
],
|
|
1910
|
-
imports: [
|
|
1911
|
-
common.CommonModule,
|
|
1912
|
-
i1.ReactiveFormsModule,
|
|
1913
|
-
i1.FormsModule,
|
|
1914
|
-
ng2CurrencyMask.CurrencyMaskModule,
|
|
1915
|
-
ngxMask.NgxMaskModule.forRoot(common$1.maskOptions),
|
|
1916
|
-
fileButton.KoalaFileButtonModule,
|
|
1917
|
-
input.MatInputModule,
|
|
1918
|
-
select.MatSelectModule,
|
|
1919
|
-
radio.MatRadioModule,
|
|
1920
|
-
checkbox.MatCheckboxModule,
|
|
1921
|
-
autocomplete.MatAutocompleteModule,
|
|
1922
|
-
button.MatButtonModule,
|
|
1923
|
-
icon.MatIconModule,
|
|
1924
|
-
expansion.MatExpansionModule,
|
|
1925
|
-
chips.MatChipsModule,
|
|
1926
|
-
button$1.KoalaButtonModule,
|
|
1927
|
-
progressSpinner.MatProgressSpinnerModule
|
|
1928
|
-
],
|
|
1929
|
-
exports: [
|
|
1930
|
-
i1.ReactiveFormsModule,
|
|
1931
|
-
i1.FormsModule,
|
|
1932
|
-
KoalaAutofocusDirective,
|
|
1933
|
-
ngxMask.NgxMaskModule,
|
|
1934
|
-
fileButton.KoalaFileButtonModule,
|
|
1935
|
-
input.MatInputModule,
|
|
1936
|
-
select.MatSelectModule,
|
|
1937
|
-
radio.MatRadioModule,
|
|
1938
|
-
checkbox.MatCheckboxModule,
|
|
1939
|
-
autocomplete.MatAutocompleteModule,
|
|
1940
|
-
button.MatButtonModule,
|
|
1941
|
-
icon.MatIconModule,
|
|
1942
|
-
progressSpinner.MatProgressSpinnerModule,
|
|
1943
|
-
BtnSubmitComponent,
|
|
1944
|
-
DynamicFormComponent
|
|
1945
|
-
]
|
|
1946
|
-
},] }
|
|
1947
|
-
];
|
|
1948
|
-
|
|
1949
|
-
/**
|
|
1950
|
-
* Generated bundle index. Do not edit.
|
|
1951
|
-
*/
|
|
1952
|
-
|
|
1953
|
-
exports.AutocompleteSelectedValidator = AutocompleteSelectedValidator;
|
|
1954
|
-
exports.BtnSubmitComponent = BtnSubmitComponent;
|
|
1955
|
-
exports.CnpjValidator = CnpjValidator;
|
|
1956
|
-
exports.CpfValidator = CpfValidator;
|
|
1957
|
-
exports.DynamicFormComponent = DynamicFormComponent;
|
|
1958
|
-
exports.FormAbstract = FormAbstract;
|
|
1959
|
-
exports.KoalaAutofocusDirective = KoalaAutofocusDirective;
|
|
1960
|
-
exports.KoalaDynamicFormService = KoalaDynamicFormService;
|
|
1961
|
-
exports.KoalaDynamicFormValidatorResultHelper = KoalaDynamicFormValidatorResultHelper;
|
|
1962
|
-
exports.KoalaFormModule = KoalaFormModule;
|
|
1963
|
-
exports.ShowInvalidFields = ShowInvalidFields;
|
|
1964
|
-
exports.ValidationHelper = ValidationHelper;
|
|
1965
|
-
|
|
1966
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1967
|
-
|
|
1968
|
-
}));
|
|
1969
|
-
//# sourceMappingURL=koalarx-ui-form.umd.js.map
|