@updevs/components 1.0.0-alpha.6 → 1.0.0-alpha.60
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/README.md +1 -11
- package/assets/styles/_bootstrap-components.scss +18 -1
- package/assets/styles/_core.scss +9 -0
- package/assets/styles/_debug.scss +49 -0
- package/assets/styles/_props.scss +91 -0
- package/assets/styles/_seven-columns.scss +73 -0
- package/assets/styles/_updevs.scss +16 -0
- package/assets/styles/_utilities-marketing.scss +209 -0
- package/assets/styles/_utilities.scss +127 -92
- package/assets/styles/_variables-dark.scss +8 -6
- package/assets/styles/_variables.scss +325 -256
- package/assets/styles/helpers/_index.scss +143 -0
- package/assets/styles/layout/_core.scss +3 -2
- package/assets/styles/layout/_dark.scss +40 -35
- package/assets/styles/layout/_footer.scss +1 -1
- package/assets/styles/layout/_navbar.scss +31 -19
- package/assets/styles/layout/_page.scss +6 -5
- package/assets/styles/layout/_root.scss +26 -34
- package/assets/styles/marketing/_browser.scss +67 -0
- package/assets/styles/marketing/_core.scss +8 -0
- package/assets/styles/marketing/_filters.scss +0 -0
- package/assets/styles/marketing/_hero.scss +70 -0
- package/assets/styles/marketing/_pricing.scss +111 -0
- package/assets/styles/marketing/_sections.scss +124 -0
- package/assets/styles/marketing/_shape.scss +31 -0
- package/assets/styles/mixins/_functions.scss +53 -0
- package/assets/styles/mixins/_mixins.scss +9 -9
- package/assets/styles/ui/_accordion.scss +165 -11
- package/assets/styles/ui/_alerts.scss +80 -38
- package/assets/styles/ui/_avatars.scss +36 -9
- package/assets/styles/ui/_badges.scss +47 -13
- package/assets/styles/ui/_button-group.scss +1 -1
- package/assets/styles/ui/_buttons.scss +33 -37
- package/assets/styles/ui/_calendars.scss +2 -2
- package/assets/styles/ui/_cards.scss +9 -0
- package/assets/styles/ui/_carousel.scss +1 -1
- package/assets/styles/ui/_charts.scss +1 -1
- package/assets/styles/ui/_chat.scss +38 -0
- package/assets/styles/ui/_close.scss +54 -1
- package/assets/styles/ui/_datagrid.scss +1 -1
- package/assets/styles/ui/_dropdowns.scss +3 -0
- package/assets/styles/ui/_empty.scss +0 -5
- package/assets/styles/ui/_flags.scss +2 -2
- package/assets/styles/ui/_forms.scss +33 -7
- package/assets/styles/ui/_grid.scss +1 -1
- package/assets/styles/ui/_icons.scss +1 -1
- package/assets/styles/ui/_images.scss +4 -0
- package/assets/styles/ui/_lists.scss +12 -16
- package/assets/styles/ui/_loaders.scss +1 -1
- package/assets/styles/ui/_markdown.scss +15 -4
- package/assets/styles/ui/_modals.scss +2 -2
- package/assets/styles/ui/_nav.scss +17 -3
- package/assets/styles/ui/_offcanvas.scss +2 -2
- package/assets/styles/ui/_pagination.scss +2 -0
- package/assets/styles/ui/_payments.scss +1 -1
- package/assets/styles/ui/_placeholder.scss +1 -1
- package/assets/styles/ui/_progress.scss +1 -1
- package/assets/styles/ui/_ribbons.scss +1 -0
- package/assets/styles/ui/_segmented.scss +101 -0
- package/assets/styles/ui/_signature.scss +15 -0
- package/assets/styles/ui/_social.scss +52 -0
- package/assets/styles/ui/_status.scss +1 -1
- package/assets/styles/ui/_steps.scss +5 -1
- package/assets/styles/ui/_switch-icon.scss +1 -1
- package/assets/styles/ui/_tables.scss +27 -1
- package/assets/styles/ui/_tags.scss +1 -1
- package/assets/styles/ui/_timeline.scss +1 -1
- package/assets/styles/ui/_toasts.scss +0 -1
- package/assets/styles/ui/_tracking.scss +1 -1
- package/assets/styles/ui/_type.scss +169 -8
- package/assets/styles/ui/forms/_form-check.scss +1 -1
- package/assets/styles/ui/forms/_form-colorinput.scss +1 -1
- package/assets/styles/ui/forms/_form-custom.scss +1 -1
- package/assets/styles/ui/forms/_form-imagecheck.scss +6 -5
- package/assets/styles/ui/forms/_form-selectgroup.scss +2 -2
- package/assets/styles/ui/typo/_hr.scss +4 -2
- package/assets/styles/utils/_colors.scss +72 -11
- package/assets/styles/utils/_opacity.scss +1 -1
- package/assets/styles/utils/_scroll.scss +0 -2
- package/assets/styles/utils/_sizing.scss +1 -1
- package/assets/styles/utils/_text.scss +1 -2
- package/assets/styles/vendor/_apexcharts.scss +52 -0
- package/assets/styles/vendor/_coloris.scss +72 -0
- package/assets/styles/vendor/_dropzone.scss +27 -0
- package/assets/styles/vendor/_fslightbox.scss +13 -0
- package/assets/styles/vendor/_jsvectormap.scss +47 -0
- package/assets/styles/vendor/_litepicker.scss +69 -0
- package/assets/styles/vendor/_nouislider.scss +49 -0
- package/assets/styles/vendor/_plyr.scss +3 -0
- package/assets/styles/vendor/_stars-rating.scss +22 -0
- package/assets/styles/vendor/_tom-select.scss +81 -0
- package/assets/styles/vendor/_turbo.scss +3 -0
- package/assets/styles/vendor/_typed.scss +4 -0
- package/assets/styles/vendor/_wysiwyg.scss +46 -0
- package/badge/badge-config.model.d.ts +14 -0
- package/badge/badge.component.d.ts +23 -0
- package/badge/badge.config.d.ts +12 -0
- package/badge/index.d.ts +1 -0
- package/badge/public-api.d.ts +3 -0
- package/badge/upd-badge.module.d.ts +8 -0
- package/button/button.component.d.ts +51 -33
- package/button/upd-button.module.d.ts +3 -1
- package/calendar/calendar.component.d.ts +63 -0
- package/calendar/index.d.ts +1 -0
- package/calendar/models/calendar-date.model.d.ts +10 -0
- package/calendar/models/calendar-month.model.d.ts +7 -0
- package/calendar/models/calendar-selected.model.d.ts +5 -0
- package/calendar/models/calendar-user-event.model.d.ts +4 -0
- package/calendar/models/calendar-year.model.d.ts +6 -0
- package/calendar/models/date-range.model.d.ts +22 -0
- package/calendar/models/enums/calendar-view.enum.d.ts +5 -0
- package/calendar/models/public-api.d.ts +7 -0
- package/calendar/public-api.d.ts +5 -0
- package/calendar/services/calendar-range-strategy.service.d.ts +35 -0
- package/calendar/services/calendar-signals.service.d.ts +24 -0
- package/calendar/services/public-api.d.ts +1 -0
- package/calendar/types/calendar-view.type.d.ts +1 -0
- package/calendar/types/public-api.d.ts +1 -0
- package/calendar/upd-calendar.module.d.ts +13 -0
- package/card/card.component.d.ts +2 -2
- package/card/directives/card-actions.directive.d.ts +1 -2
- package/card/directives/card-footer.directive.d.ts +1 -2
- package/card/directives/card-header.directive.d.ts +1 -2
- package/card/directives/card-image.directive.d.ts +1 -2
- package/card/public-api.d.ts +1 -0
- package/card/types/public-api.d.ts +5 -0
- package/drag-and-drop/drag-and-drop.component.d.ts +26 -0
- package/drag-and-drop/index.d.ts +1 -0
- package/drag-and-drop/models/drag-and-drop-column.config.d.ts +8 -0
- package/drag-and-drop/models/drag-and-drop-column.model.d.ts +10 -0
- package/drag-and-drop/models/drag-and-drop-item.d.ts +7 -0
- package/drag-and-drop/models/drag-and-drop-item.model.d.ts +13 -0
- package/drag-and-drop/models/drag-and-drop.config.d.ts +6 -0
- package/drag-and-drop/models/public-api.d.ts +4 -0
- package/drag-and-drop/public-api.d.ts +3 -0
- package/drag-and-drop/upd-drag-and-drop.module.d.ts +9 -0
- package/dropdown/dropdown.component.d.ts +23 -6
- package/dropdown/models/dropdown-action-clicked.model.d.ts +6 -0
- package/dropdown/models/dropdown-item.d.ts +7 -2
- package/dropdown/models/dropdown-item.type.d.ts +1 -1
- package/dropdown/models/public-api.d.ts +2 -0
- package/dropdown/models/toolbar.type.d.ts +1 -0
- package/esm2022/badge/badge-config.model.mjs +14 -0
- package/esm2022/badge/badge.component.mjs +48 -0
- package/esm2022/badge/badge.config.mjs +2 -0
- package/esm2022/badge/index.mjs +2 -0
- package/esm2022/badge/public-api.mjs +4 -0
- package/esm2022/badge/upd-badge.module.mjs +24 -0
- package/esm2022/badge/updevs-components-badge.mjs +5 -0
- package/esm2022/button/button.component.mjs +126 -132
- package/esm2022/button/index.mjs +1 -1
- package/esm2022/button/public-api.mjs +1 -1
- package/esm2022/button/upd-button.module.mjs +14 -6
- package/esm2022/button/updevs-components-button.mjs +1 -1
- package/esm2022/calendar/assets/i18n/en.json +16 -0
- package/esm2022/calendar/assets/i18n/pt.json +16 -0
- package/esm2022/calendar/calendar.component.mjs +318 -0
- package/esm2022/calendar/index.mjs +2 -0
- package/esm2022/calendar/models/calendar-date.model.mjs +2 -0
- package/esm2022/calendar/models/calendar-month.model.mjs +2 -0
- package/esm2022/calendar/models/calendar-selected.model.mjs +2 -0
- package/esm2022/calendar/models/calendar-user-event.model.mjs +2 -0
- package/esm2022/calendar/models/calendar-year.model.mjs +2 -0
- package/esm2022/calendar/models/date-range.model.mjs +18 -0
- package/esm2022/calendar/models/enums/calendar-view.enum.mjs +7 -0
- package/esm2022/calendar/models/public-api.mjs +8 -0
- package/esm2022/calendar/public-api.mjs +6 -0
- package/esm2022/calendar/services/calendar-range-strategy.service.mjs +99 -0
- package/esm2022/calendar/services/calendar-signals.service.mjs +47 -0
- package/esm2022/calendar/services/public-api.mjs +2 -0
- package/esm2022/calendar/types/calendar-view.type.mjs +2 -0
- package/esm2022/calendar/types/public-api.mjs +2 -0
- package/esm2022/calendar/upd-calendar.module.mjs +52 -0
- package/esm2022/calendar/updevs-components-calendar.mjs +5 -0
- package/esm2022/card/card.component.mjs +4 -4
- package/esm2022/card/directives/card-actions.directive.mjs +8 -8
- package/esm2022/card/directives/card-footer.directive.mjs +8 -8
- package/esm2022/card/directives/card-header.directive.mjs +8 -8
- package/esm2022/card/directives/card-image.directive.mjs +8 -8
- package/esm2022/card/directives/public-api.mjs +1 -1
- package/esm2022/card/index.mjs +1 -1
- package/esm2022/card/public-api.mjs +2 -1
- package/esm2022/card/types/card-state.type.mjs +1 -1
- package/esm2022/card/types/card-style.type.mjs +1 -1
- package/esm2022/card/types/hover-effect.type.mjs +1 -1
- package/esm2022/card/types/public-api.mjs +6 -0
- package/esm2022/card/types/ribbon-style.type.mjs +1 -1
- package/esm2022/card/types/status-position.type.mjs +1 -1
- package/esm2022/card/upd-card.module.mjs +5 -5
- package/esm2022/card/updevs-components-card.mjs +1 -1
- package/esm2022/drag-and-drop/drag-and-drop.component.mjs +134 -0
- package/esm2022/drag-and-drop/index.mjs +2 -0
- package/esm2022/drag-and-drop/models/drag-and-drop-column.config.mjs +2 -0
- package/esm2022/drag-and-drop/models/drag-and-drop-column.model.mjs +9 -0
- package/esm2022/drag-and-drop/models/drag-and-drop-item.mjs +2 -0
- package/esm2022/drag-and-drop/models/drag-and-drop-item.model.mjs +14 -0
- package/esm2022/drag-and-drop/models/drag-and-drop.config.mjs +2 -0
- package/esm2022/drag-and-drop/models/public-api.mjs +5 -0
- package/esm2022/drag-and-drop/public-api.mjs +4 -0
- package/esm2022/drag-and-drop/upd-drag-and-drop.module.mjs +28 -0
- package/esm2022/drag-and-drop/updevs-components-drag-and-drop.mjs +5 -0
- package/esm2022/dropdown/dropdown.component.mjs +75 -18
- package/esm2022/dropdown/index.mjs +1 -1
- package/esm2022/dropdown/models/dropdown-action-clicked.model.mjs +2 -0
- package/esm2022/dropdown/models/dropdown-item.mjs +1 -1
- package/esm2022/dropdown/models/dropdown-item.type.mjs +1 -1
- package/esm2022/dropdown/models/public-api.mjs +3 -1
- package/esm2022/dropdown/models/toolbar.type.mjs +2 -0
- package/esm2022/dropdown/public-api.mjs +1 -1
- package/esm2022/dropdown/upd-dropdown.module.mjs +5 -5
- package/esm2022/dropdown/updevs-components-dropdown.mjs +1 -1
- package/esm2022/form/assets/i18n/en.json +17 -0
- package/esm2022/form/assets/i18n/pt.json +17 -0
- package/esm2022/form/components/dynamic-field/dynamic-field.component.mjs +174 -0
- package/esm2022/form/form.component.mjs +180 -0
- package/esm2022/form/index.mjs +1 -1
- package/esm2022/form/models/attachment-rule.model.mjs +2 -0
- package/esm2022/form/models/button-field.model.mjs +2 -0
- package/esm2022/form/models/button-group-field.model.mjs +2 -0
- package/esm2022/form/models/checkbox-field.model.mjs +2 -0
- package/esm2022/form/models/checkbox-group-field.model.mjs +2 -0
- package/esm2022/form/models/dynamic-field.model.mjs +2 -0
- package/esm2022/form/models/enums/attachment-type.enum.mjs +15 -0
- package/esm2022/form/models/enums/dynamic-field.type.mjs +17 -0
- package/esm2022/form/models/enums/public-api.mjs +3 -0
- package/esm2022/form/models/file-upload-field.model.mjs +2 -0
- package/esm2022/form/models/form-config.mjs +2 -0
- package/esm2022/form/models/form-row.model.mjs +2 -0
- package/esm2022/form/models/form-update-on.type.mjs +2 -0
- package/esm2022/form/models/input-field.model.mjs +2 -0
- package/esm2022/form/models/masked-input-field.model.mjs +2 -0
- package/esm2022/form/models/public-api.mjs +19 -0
- package/esm2022/form/models/radio-field.model.mjs +2 -0
- package/esm2022/form/models/radio-group-field.model.mjs +2 -0
- package/esm2022/form/models/select-field.model.mjs +2 -0
- package/esm2022/form/models/single-select-field.model.mjs +2 -0
- package/esm2022/form/models/textarea-field.model.mjs +2 -0
- package/esm2022/form/models/validator-config.mjs +2 -0
- package/esm2022/form/public-api.mjs +4 -2
- package/esm2022/form/tools/errors-helper.mjs +54 -0
- package/esm2022/form/upd-form.module.mjs +84 -0
- package/esm2022/form/updevs-components-form.mjs +1 -1
- package/esm2022/form-controls/abstractions/base-control.mjs +46 -0
- package/esm2022/form-controls/abstractions/index.mjs +2 -0
- package/esm2022/form-controls/abstractions/public-api.mjs +2 -0
- package/esm2022/form-controls/abstractions/updevs-components-form-controls-abstractions.mjs +5 -0
- package/esm2022/form-controls/checkbox/checkbox.component.mjs +37 -51
- package/esm2022/form-controls/checkbox/index.mjs +1 -1
- package/esm2022/form-controls/checkbox/public-api.mjs +1 -1
- package/esm2022/form-controls/checkbox/upd-checkbox.module.mjs +12 -8
- package/esm2022/form-controls/checkbox/updevs-components-form-controls-checkbox.mjs +1 -1
- package/esm2022/form-controls/date-picker/date-picker.component.mjs +132 -0
- package/esm2022/form-controls/date-picker/index.mjs +2 -0
- package/esm2022/form-controls/date-picker/public-api.mjs +3 -0
- package/esm2022/form-controls/date-picker/upd-date-picker.module.mjs +40 -0
- package/esm2022/form-controls/date-picker/updevs-components-form-controls-date-picker.mjs +5 -0
- package/esm2022/form-controls/file-upload/assets/i18n/en.json +15 -0
- package/esm2022/form-controls/file-upload/assets/i18n/pt.json +15 -0
- package/esm2022/form-controls/file-upload/file-upload-changed.event.mjs +2 -0
- package/esm2022/form-controls/file-upload/file-upload.component.mjs +169 -0
- package/esm2022/form-controls/file-upload/index.mjs +2 -0
- package/esm2022/form-controls/file-upload/public-api.mjs +4 -0
- package/esm2022/form-controls/file-upload/upd-file-upload.module.mjs +48 -0
- package/esm2022/form-controls/file-upload/updevs-components-form-controls-file-upload.mjs +5 -0
- package/esm2022/form-controls/input/directives/input-append.directive.mjs +8 -8
- package/esm2022/form-controls/input/directives/input-prepend.directive.mjs +8 -8
- package/esm2022/form-controls/input/directives/public-api.mjs +1 -1
- package/esm2022/form-controls/input/index.mjs +1 -1
- package/esm2022/form-controls/input/input.component.mjs +64 -34
- package/esm2022/form-controls/input/public-api.mjs +1 -1
- package/esm2022/form-controls/input/types/input.type.mjs +1 -1
- package/esm2022/form-controls/input/types/loader-position.type.mjs +1 -1
- package/esm2022/form-controls/input/types/public-api.mjs +1 -1
- package/esm2022/form-controls/input/upd-input.module.mjs +5 -5
- package/esm2022/form-controls/input/updevs-components-form-controls-input.mjs +1 -1
- package/esm2022/form-controls/radio/index.mjs +1 -1
- package/esm2022/form-controls/radio/public-api.mjs +1 -1
- package/esm2022/form-controls/radio/radio.component.mjs +12 -25
- package/esm2022/form-controls/radio/upd-radio.module.mjs +14 -6
- package/esm2022/form-controls/radio/updevs-components-form-controls-radio.mjs +1 -1
- package/esm2022/form-controls/select/components/multiple/select-multiple.component.mjs +33 -10
- package/esm2022/form-controls/select/components/single/select.component.mjs +31 -8
- package/esm2022/form-controls/select/index.mjs +1 -1
- package/esm2022/form-controls/select/models/abstractions/base-select.component.mjs +109 -88
- package/esm2022/form-controls/select/models/defaults.mjs +8 -0
- package/esm2022/form-controls/select/models/public-api.mjs +2 -1
- package/esm2022/form-controls/select/models/select-item.mjs +1 -1
- package/esm2022/form-controls/select/public-api.mjs +1 -1
- package/esm2022/form-controls/select/upd-select.module.mjs +10 -6
- package/esm2022/form-controls/select/updevs-components-form-controls-select.mjs +1 -1
- package/esm2022/form-controls/textarea/index.mjs +1 -1
- package/esm2022/form-controls/textarea/public-api.mjs +1 -1
- package/esm2022/form-controls/textarea/textarea.component.mjs +18 -36
- package/esm2022/form-controls/textarea/upd-textarea.module.mjs +5 -5
- package/esm2022/form-controls/textarea/updevs-components-form-controls-textarea.mjs +1 -1
- package/esm2022/form-controls/time-picker/index.mjs +1 -1
- package/esm2022/form-controls/time-picker/public-api.mjs +1 -1
- package/esm2022/form-controls/time-picker/time-picker.component.mjs +4 -4
- package/esm2022/form-controls/time-picker/time-selector/time-selector.component.mjs +7 -8
- package/esm2022/form-controls/time-picker/upd-time-picker.module.mjs +9 -8
- package/esm2022/form-controls/time-picker/updevs-components-form-controls-time-picker.mjs +1 -1
- package/esm2022/index.mjs +2 -0
- package/esm2022/layout/abstractions/base-page.component.mjs +8 -9
- package/esm2022/layout/abstractions/base.layout.mjs +31 -0
- package/esm2022/layout/abstractions/public-api.mjs +1 -1
- package/esm2022/layout/assets/i18n/en.json +24 -2
- package/esm2022/layout/assets/i18n/pt.json +24 -2
- package/esm2022/layout/index.mjs +1 -1
- package/esm2022/layout/layouts/blank-layout/blank-layout.component.mjs +18 -7
- package/esm2022/layout/layouts/blank-layout/blank-layout.module.mjs +32 -6
- package/esm2022/layout/layouts/public-api.mjs +1 -1
- package/esm2022/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.mjs +13 -29
- package/esm2022/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.mjs +25 -28
- package/esm2022/layout/models/login-page-config.model.mjs +20 -0
- package/esm2022/layout/models/login-page.config.mjs +2 -0
- package/esm2022/layout/models/public-api.mjs +2 -1
- package/esm2022/layout/models/security-layout-config.model.mjs +10 -0
- package/esm2022/layout/models/security-layout.config.mjs +2 -0
- package/esm2022/layout/models/upd-layout-config.model.mjs +11 -17
- package/esm2022/layout/models/upd-layout.config.mjs +1 -1
- package/esm2022/layout/pages/auth-flow/auth-flow-routing.module.mjs +5 -5
- package/esm2022/layout/pages/auth-flow/auth-flow.module.mjs +36 -9
- package/esm2022/layout/pages/auth-flow/logged-out/logged-out.component.mjs +4 -4
- package/esm2022/layout/pages/auth-flow/login/login.component.mjs +95 -12
- package/esm2022/layout/pages/auth-flow/oauth-callback/oauth-callback.component.mjs +4 -4
- package/esm2022/layout/pages/auth-flow/public-api.mjs +1 -1
- package/esm2022/layout/pages/public-api.mjs +1 -1
- package/esm2022/layout/partials/footer/footer.component.mjs +13 -27
- package/esm2022/layout/partials/footer/footer.module.mjs +28 -0
- package/esm2022/layout/partials/footer/public-api.mjs +2 -2
- package/esm2022/layout/partials/header/header-style.type.mjs +1 -1
- package/esm2022/layout/partials/header/header.component.mjs +121 -60
- package/esm2022/layout/partials/header/header.module.mjs +40 -0
- package/esm2022/layout/partials/header/public-api.mjs +2 -1
- package/esm2022/layout/partials/page-header/page-header.component.mjs +11 -11
- package/esm2022/layout/partials/page-header/public-api.mjs +1 -1
- package/esm2022/layout/partials/public-api.mjs +1 -1
- package/esm2022/layout/partials/sidebar/public-api.mjs +1 -1
- package/esm2022/layout/partials/sidebar/sidebar.component.mjs +185 -95
- package/esm2022/layout/public-api.mjs +1 -1
- package/esm2022/layout/services/public-api.mjs +1 -1
- package/esm2022/layout/services/upd-layout-config.service.mjs +6 -6
- package/esm2022/layout/tools/layout.constants.mjs +1 -1
- package/esm2022/layout/upd-layout.module.mjs +12 -8
- package/esm2022/layout/updevs-components-layout.mjs +1 -1
- package/esm2022/lib/index.mjs +1 -1
- package/esm2022/lib/models/public-api.mjs +2 -0
- package/esm2022/lib/models/row-column-size.mjs +2 -0
- package/esm2022/lib/public-api.mjs +3 -1
- package/esm2022/lib/tools/column-size.helper.mjs +12 -0
- package/esm2022/lib/tools/public-api.mjs +2 -0
- package/esm2022/lib/types/component-size.type.mjs +1 -1
- package/esm2022/lib/types/horizontal-vertical.type.mjs +2 -0
- package/esm2022/lib/types/public-api.mjs +2 -1
- package/esm2022/lib/types/validation-status.type.mjs +1 -1
- package/esm2022/lib/upd-components.module.mjs +5 -5
- package/esm2022/link/index.mjs +1 -1
- package/esm2022/link/link.component.mjs +4 -4
- package/esm2022/link/public-api.mjs +1 -1
- package/esm2022/link/target.type.mjs +1 -1
- package/esm2022/link/upd-link.module.mjs +5 -5
- package/esm2022/link/updevs-components-link.mjs +1 -1
- package/esm2022/list/assets/i18n/en.json +7 -3
- package/esm2022/list/assets/i18n/pt.json +7 -3
- package/esm2022/list/index.mjs +1 -1
- package/esm2022/list/list.component.mjs +14 -34
- package/esm2022/list/models/badge-position.type.mjs +1 -1
- package/esm2022/list/models/list-item.mjs +1 -1
- package/esm2022/list/models/list-item.model.mjs +7 -2
- package/esm2022/list/models/public-api.mjs +1 -1
- package/esm2022/list/public-api.mjs +1 -1
- package/esm2022/list/upd-list.module.mjs +9 -8
- package/esm2022/list/updevs-components-list.mjs +1 -1
- package/esm2022/modal/assets/i18n/en.json +17 -0
- package/esm2022/modal/assets/i18n/pt.json +17 -0
- package/esm2022/modal/components/modal-container/modal-container.component.mjs +216 -0
- package/esm2022/modal/index.mjs +2 -0
- package/esm2022/modal/models/base.modal.mjs +14 -0
- package/esm2022/modal/models/modal-config.model.mjs +20 -0
- package/esm2022/modal/models/modal-ref.mjs +2 -0
- package/esm2022/modal/models/modal.config.mjs +2 -0
- package/esm2022/modal/models/public-api.mjs +4 -0
- package/esm2022/modal/public-api.mjs +4 -0
- package/esm2022/modal/services/modal-alert.service.mjs +99 -0
- package/esm2022/modal/services/modal.service.mjs +30 -0
- package/esm2022/modal/services/public-api.mjs +3 -0
- package/esm2022/modal/types/modal-footer-style.type.mjs +2 -0
- package/esm2022/modal/types/modal-size.type.mjs +2 -0
- package/esm2022/modal/upd-modal.module.mjs +90 -0
- package/esm2022/modal/updevs-components-modal.mjs +5 -0
- package/esm2022/paginator/assets/i18n/en.json +15 -0
- package/esm2022/paginator/assets/i18n/pt.json +15 -0
- package/esm2022/paginator/index.mjs +2 -0
- package/esm2022/paginator/paginator.component.mjs +66 -0
- package/esm2022/paginator/public-api.mjs +3 -0
- package/esm2022/paginator/upd-paginator.module.mjs +47 -0
- package/esm2022/paginator/updevs-components-paginator.mjs +5 -0
- package/esm2022/popover/index.mjs +1 -1
- package/esm2022/popover/popover.component.mjs +7 -7
- package/esm2022/popover/popover.directive.mjs +33 -42
- package/esm2022/popover/public-api.mjs +1 -1
- package/esm2022/popover/upd-popover.module.mjs +5 -5
- package/esm2022/popover/updevs-components-popover.mjs +1 -1
- package/esm2022/pricing-cards/index.mjs +2 -0
- package/esm2022/pricing-cards/models/price-item-feature.model.mjs +2 -0
- package/esm2022/pricing-cards/models/price-item-features-group.model.mjs +2 -0
- package/esm2022/pricing-cards/models/price-item-tag.model.mjs +2 -0
- package/esm2022/pricing-cards/models/price-item.model.mjs +2 -0
- package/esm2022/pricing-cards/models/public-api.mjs +5 -0
- package/esm2022/pricing-cards/pricing-cards.component.mjs +25 -0
- package/esm2022/pricing-cards/public-api.mjs +4 -0
- package/esm2022/pricing-cards/upd-pricing-cards.module.mjs +40 -0
- package/esm2022/pricing-cards/updevs-components-pricing-cards.mjs +5 -0
- package/esm2022/public-api.mjs +1 -1
- package/esm2022/table/abstractions/base-column.model.mjs +52 -0
- package/esm2022/table/abstractions/base.column.mjs +84 -0
- package/esm2022/table/abstractions/filters-operands.service.mjs +3 -0
- package/esm2022/table/abstractions/public-api.mjs +3 -0
- package/esm2022/table/assets/i18n/en.json +74 -0
- package/esm2022/table/assets/i18n/pt.json +74 -0
- package/esm2022/table/components/columns/boolean-column/boolean-column.component.mjs +26 -0
- package/esm2022/table/components/columns/date-time-column/date-time-column.component.mjs +13 -0
- package/esm2022/table/components/columns/number-column/number-column.component.mjs +13 -0
- package/esm2022/table/components/columns/text-column/text-column.component.mjs +31 -0
- package/esm2022/table/components/columns-manager/columns-manager.component.mjs +36 -0
- package/esm2022/table/components/filter-row/filter-row.component.mjs +114 -0
- package/esm2022/table/components/save-search/save-search.component.mjs +72 -0
- package/esm2022/table/components/search-section/search-section.component.mjs +93 -0
- package/esm2022/table/directives/public-api.mjs +2 -0
- package/esm2022/table/directives/table-column.directive.mjs +52 -0
- package/esm2022/table/index.mjs +2 -0
- package/esm2022/table/models/columns/boolean-column.model.mjs +22 -0
- package/esm2022/table/models/columns/date-time-column.model.mjs +16 -0
- package/esm2022/table/models/columns/guid-column.model.mjs +13 -0
- package/esm2022/table/models/columns/image-column.model.mjs +11 -0
- package/esm2022/table/models/columns/number-column.model.mjs +17 -0
- package/esm2022/table/models/columns/public-api.mjs +7 -0
- package/esm2022/table/models/columns/text-column.model.mjs +11 -0
- package/esm2022/table/models/enums/column-type.enum.mjs +15 -0
- package/esm2022/table/models/enums/public-api.mjs +2 -0
- package/esm2022/table/models/filter-item.model.mjs +2 -0
- package/esm2022/table/models/filter-operand.config.mjs +2 -0
- package/esm2022/table/models/operands-lists/boolean-filter-operands-list.model.mjs +25 -0
- package/esm2022/table/models/operands-lists/date-filter-operands-list.model.mjs +25 -0
- package/esm2022/table/models/operands-lists/date-or-number-operands-list.config.mjs +31 -0
- package/esm2022/table/models/operands-lists/filter-operands-list.config.mjs +31 -0
- package/esm2022/table/models/operands-lists/guid-filter-operands-list.model.mjs +16 -0
- package/esm2022/table/models/operands-lists/number-filter-operands-list.model.mjs +25 -0
- package/esm2022/table/models/operands-lists/string-filter-operands-list.model.mjs +45 -0
- package/esm2022/table/models/public-api.mjs +5 -0
- package/esm2022/table/models/saved-view.model.mjs +2 -0
- package/esm2022/table/models/table-config.model.mjs +29 -0
- package/esm2022/table/models/table.config.mjs +2 -0
- package/esm2022/table/models/upd-table-config.model.mjs +9 -0
- package/esm2022/table/models/upd-table.config.mjs +2 -0
- package/esm2022/table/public-api.mjs +6 -0
- package/esm2022/table/services/default-filters-operands.service.mjs +60 -0
- package/esm2022/table/services/storages/saved-views.storage.mjs +56 -0
- package/esm2022/table/services/stores/filters-operands.store.mjs +19 -0
- package/esm2022/table/services/upd-table-config.service.mjs +18 -0
- package/esm2022/table/table.component.mjs +439 -0
- package/esm2022/table/tools/filters.tools.mjs +48 -0
- package/esm2022/table/tools/table.constants.mjs +15 -0
- package/esm2022/table/upd-table.module.mjs +150 -0
- package/esm2022/table/updevs-components-table.mjs +5 -0
- package/esm2022/updevs-components.mjs +2 -2
- package/fesm2022/updevs-components-badge.mjs +89 -0
- package/fesm2022/updevs-components-badge.mjs.map +1 -0
- package/fesm2022/updevs-components-button.mjs +138 -136
- package/fesm2022/updevs-components-button.mjs.map +1 -1
- package/fesm2022/updevs-components-calendar.mjs +582 -0
- package/fesm2022/updevs-components-calendar.mjs.map +1 -0
- package/fesm2022/updevs-components-card.mjs +32 -32
- package/fesm2022/updevs-components-card.mjs.map +1 -1
- package/fesm2022/updevs-components-drag-and-drop.mjs +185 -0
- package/fesm2022/updevs-components-drag-and-drop.mjs.map +1 -0
- package/fesm2022/updevs-components-dropdown.mjs +78 -21
- package/fesm2022/updevs-components-dropdown.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-abstractions.mjs +53 -0
- package/fesm2022/updevs-components-form-controls-abstractions.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-checkbox.mjs +47 -57
- package/fesm2022/updevs-components-form-controls-checkbox.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-date-picker.mjs +175 -0
- package/fesm2022/updevs-components-form-controls-date-picker.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-file-upload.mjs +264 -0
- package/fesm2022/updevs-components-form-controls-file-upload.mjs.map +1 -0
- package/fesm2022/updevs-components-form-controls-input.mjs +80 -50
- package/fesm2022/updevs-components-form-controls-input.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-radio.mjs +25 -30
- package/fesm2022/updevs-components-form-controls-radio.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-select.mjs +185 -108
- package/fesm2022/updevs-components-form-controls-select.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-textarea.mjs +21 -39
- package/fesm2022/updevs-components-form-controls-textarea.mjs.map +1 -1
- package/fesm2022/updevs-components-form-controls-time-picker.mjs +18 -18
- package/fesm2022/updevs-components-form-controls-time-picker.mjs.map +1 -1
- package/fesm2022/updevs-components-form.mjs +541 -10
- package/fesm2022/updevs-components-form.mjs.map +1 -1
- package/fesm2022/updevs-components-layout.mjs +774 -395
- package/fesm2022/updevs-components-layout.mjs.map +1 -1
- package/fesm2022/updevs-components-link.mjs +8 -8
- package/fesm2022/updevs-components-link.mjs.map +1 -1
- package/fesm2022/updevs-components-list.mjs +44 -58
- package/fesm2022/updevs-components-list.mjs.map +1 -1
- package/fesm2022/updevs-components-modal.mjs +504 -0
- package/fesm2022/updevs-components-modal.mjs.map +1 -0
- package/fesm2022/updevs-components-paginator.mjs +160 -0
- package/fesm2022/updevs-components-paginator.mjs.map +1 -0
- package/fesm2022/updevs-components-popover.mjs +41 -50
- package/fesm2022/updevs-components-popover.mjs.map +1 -1
- package/fesm2022/updevs-components-pricing-cards.mjs +69 -0
- package/fesm2022/updevs-components-pricing-cards.mjs.map +1 -0
- package/fesm2022/updevs-components-table.mjs +1754 -0
- package/fesm2022/updevs-components-table.mjs.map +1 -0
- package/fesm2022/updevs-components.mjs +17 -5
- package/fesm2022/updevs-components.mjs.map +1 -1
- package/form/components/dynamic-field/dynamic-field.component.d.ts +63 -0
- package/form/form.component.d.ts +64 -0
- package/form/models/attachment-rule.model.d.ts +35 -0
- package/form/models/button-field.model.d.ts +5 -0
- package/form/models/button-group-field.model.d.ts +5 -0
- package/form/models/checkbox-field.model.d.ts +4 -0
- package/form/models/checkbox-group-field.model.d.ts +6 -0
- package/form/models/dynamic-field.model.d.ts +50 -0
- package/form/models/enums/attachment-type.enum.d.ts +13 -0
- package/form/models/enums/dynamic-field.type.d.ts +15 -0
- package/form/models/enums/public-api.d.ts +2 -0
- package/form/models/file-upload-field.model.d.ts +16 -0
- package/form/models/form-config.d.ts +2 -0
- package/form/models/form-row.model.d.ts +10 -0
- package/form/models/form-update-on.type.d.ts +1 -0
- package/form/models/input-field.model.d.ts +9 -0
- package/form/models/masked-input-field.model.d.ts +6 -0
- package/form/models/public-api.d.ts +18 -0
- package/form/models/radio-field.model.d.ts +4 -0
- package/form/models/radio-group-field.model.d.ts +6 -0
- package/form/models/select-field.model.d.ts +29 -0
- package/form/models/single-select-field.model.d.ts +4 -0
- package/form/models/textarea-field.model.d.ts +10 -0
- package/form/models/validator-config.d.ts +5 -0
- package/form/public-api.d.ts +3 -1
- package/form/tools/errors-helper.d.ts +11 -0
- package/form/upd-form.module.d.ts +22 -0
- package/form-controls/abstractions/base-control.d.ts +29 -0
- package/form-controls/abstractions/index.d.ts +2 -0
- package/form-controls/abstractions/public-api.d.ts +2 -0
- package/form-controls/checkbox/checkbox.component.d.ts +14 -20
- package/form-controls/checkbox/upd-checkbox.module.d.ts +2 -1
- package/form-controls/date-picker/date-picker.component.d.ts +66 -0
- package/form-controls/date-picker/index.d.ts +1 -0
- package/form-controls/date-picker/public-api.d.ts +2 -0
- package/form-controls/date-picker/upd-date-picker.module.d.ts +12 -0
- package/form-controls/file-upload/file-upload-changed.event.d.ts +4 -0
- package/form-controls/file-upload/file-upload.component.d.ts +46 -0
- package/form-controls/file-upload/index.d.ts +1 -0
- package/form-controls/file-upload/public-api.d.ts +3 -0
- package/form-controls/file-upload/upd-file-upload.module.d.ts +14 -0
- package/form-controls/input/directives/input-append.directive.d.ts +1 -2
- package/form-controls/input/directives/input-prepend.directive.d.ts +1 -2
- package/form-controls/input/input.component.d.ts +24 -14
- package/form-controls/radio/radio.component.d.ts +5 -12
- package/form-controls/radio/upd-radio.module.d.ts +3 -1
- package/form-controls/select/components/multiple/select-multiple.component.d.ts +13 -2
- package/form-controls/select/components/single/select.component.d.ts +10 -2
- package/form-controls/select/models/abstractions/base-select.component.d.ts +35 -31
- package/form-controls/select/models/defaults.d.ts +8 -0
- package/form-controls/select/models/public-api.d.ts +1 -0
- package/form-controls/select/upd-select.module.d.ts +3 -2
- package/form-controls/textarea/textarea.component.d.ts +11 -15
- package/form-controls/time-picker/upd-time-picker.module.d.ts +2 -2
- package/index.d.ts +1 -4
- package/layout/abstractions/base-page.component.d.ts +1 -2
- package/layout/abstractions/base.layout.d.ts +15 -0
- package/layout/layouts/blank-layout/blank-layout.component.d.ts +5 -1
- package/layout/layouts/blank-layout/blank-layout.module.d.ts +8 -1
- package/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.component.d.ts +2 -9
- package/layout/layouts/vertical-sidebar-layout/vertical-sidebar-layout.module.d.ts +14 -13
- package/layout/models/login-page-config.model.d.ts +46 -0
- package/layout/models/login-page.config.d.ts +44 -0
- package/layout/models/public-api.d.ts +1 -0
- package/layout/models/security-layout-config.model.d.ts +12 -0
- package/layout/models/security-layout.config.d.ts +10 -0
- package/layout/models/upd-layout-config.model.d.ts +9 -0
- package/layout/models/upd-layout.config.d.ts +9 -0
- package/layout/pages/auth-flow/auth-flow.module.d.ts +9 -2
- package/layout/pages/auth-flow/login/login.component.d.ts +20 -6
- package/layout/partials/footer/footer.component.d.ts +4 -15
- package/layout/partials/footer/footer.module.d.ts +9 -0
- package/layout/partials/footer/public-api.d.ts +1 -1
- package/layout/partials/header/header.component.d.ts +44 -26
- package/layout/partials/header/header.module.d.ts +12 -0
- package/layout/partials/header/public-api.d.ts +1 -0
- package/layout/partials/page-header/page-header.component.d.ts +2 -2
- package/layout/partials/sidebar/sidebar.component.d.ts +29 -4
- package/layout/upd-layout.module.d.ts +2 -1
- package/lib/index.d.ts +1 -0
- package/lib/models/public-api.d.ts +2 -0
- package/lib/models/row-column-size.d.ts +23 -0
- package/lib/public-api.d.ts +3 -0
- package/lib/tools/column-size.helper.d.ts +6 -0
- package/lib/tools/public-api.d.ts +2 -0
- package/lib/types/component-size.type.d.ts +1 -0
- package/lib/types/horizontal-vertical.type.d.ts +2 -0
- package/lib/types/public-api.d.ts +2 -0
- package/lib/types/validation-status.type.d.ts +1 -0
- package/lib/upd-components.module.d.ts +1 -0
- package/list/list.component.d.ts +4 -20
- package/list/models/list-item.d.ts +4 -2
- package/list/models/list-item.model.d.ts +4 -2
- package/list/upd-list.module.d.ts +2 -2
- package/modal/components/modal-container/modal-container.component.d.ts +74 -0
- package/modal/index.d.ts +1 -0
- package/modal/models/base.modal.d.ts +8 -0
- package/modal/models/modal-config.model.d.ts +32 -0
- package/modal/models/modal-ref.d.ts +6 -0
- package/modal/models/modal.config.d.ts +30 -0
- package/modal/models/public-api.d.ts +3 -0
- package/modal/public-api.d.ts +3 -0
- package/modal/services/modal-alert.service.d.ts +22 -0
- package/modal/services/modal.service.d.ts +12 -0
- package/modal/services/public-api.d.ts +2 -0
- package/modal/types/modal-footer-style.type.d.ts +1 -0
- package/modal/types/modal-size.type.d.ts +1 -0
- package/modal/upd-modal.module.d.ts +18 -0
- package/package.json +78 -17
- package/paginator/index.d.ts +1 -0
- package/paginator/paginator.component.d.ts +42 -0
- package/paginator/public-api.d.ts +2 -0
- package/paginator/upd-paginator.module.d.ts +14 -0
- package/popover/popover.component.d.ts +2 -2
- package/popover/popover.directive.d.ts +8 -10
- package/pricing-cards/index.d.ts +1 -0
- package/pricing-cards/models/price-item-feature.model.d.ts +5 -0
- package/pricing-cards/models/price-item-features-group.model.d.ts +5 -0
- package/pricing-cards/models/price-item-tag.model.d.ts +6 -0
- package/pricing-cards/models/price-item.model.d.ts +20 -0
- package/pricing-cards/models/public-api.d.ts +4 -0
- package/pricing-cards/pricing-cards.component.d.ts +11 -0
- package/pricing-cards/public-api.d.ts +3 -0
- package/pricing-cards/upd-pricing-cards.module.d.ts +12 -0
- package/public-api.d.ts +1 -0
- package/table/abstractions/base-column.model.d.ts +31 -0
- package/table/abstractions/base.column.d.ts +26 -0
- package/table/abstractions/filters-operands.service.d.ts +8 -0
- package/table/abstractions/public-api.d.ts +2 -0
- package/table/components/columns/boolean-column/boolean-column.component.d.ts +9 -0
- package/table/components/columns/date-time-column/date-time-column.component.d.ts +7 -0
- package/table/components/columns/number-column/number-column.component.d.ts +7 -0
- package/table/components/columns/text-column/text-column.component.d.ts +9 -0
- package/table/components/columns-manager/columns-manager.component.d.ts +15 -0
- package/table/components/filter-row/filter-row.component.d.ts +40 -0
- package/table/components/save-search/save-search.component.d.ts +17 -0
- package/table/components/search-section/search-section.component.d.ts +36 -0
- package/table/directives/public-api.d.ts +1 -0
- package/table/directives/table-column.directive.d.ts +14 -0
- package/table/index.d.ts +1 -0
- package/table/models/columns/boolean-column.model.d.ts +15 -0
- package/table/models/columns/date-time-column.model.d.ts +8 -0
- package/table/models/columns/guid-column.model.d.ts +4 -0
- package/table/models/columns/image-column.model.d.ts +6 -0
- package/table/models/columns/number-column.model.d.ts +8 -0
- package/table/models/columns/public-api.d.ts +6 -0
- package/table/models/columns/text-column.model.d.ts +6 -0
- package/table/models/enums/column-type.enum.d.ts +13 -0
- package/table/models/enums/public-api.d.ts +1 -0
- package/table/models/filter-item.model.d.ts +6 -0
- package/table/models/filter-operand.config.d.ts +9 -0
- package/table/models/operands-lists/boolean-filter-operands-list.model.d.ts +6 -0
- package/table/models/operands-lists/date-filter-operands-list.model.d.ts +6 -0
- package/table/models/operands-lists/date-or-number-operands-list.config.d.ts +5 -0
- package/table/models/operands-lists/filter-operands-list.config.d.ts +5 -0
- package/table/models/operands-lists/guid-filter-operands-list.model.d.ts +6 -0
- package/table/models/operands-lists/number-filter-operands-list.model.d.ts +6 -0
- package/table/models/operands-lists/string-filter-operands-list.model.d.ts +6 -0
- package/table/models/public-api.d.ts +4 -0
- package/table/models/saved-view.model.d.ts +11 -0
- package/table/models/table-config.model.d.ts +33 -0
- package/table/models/table.config.d.ts +31 -0
- package/table/models/upd-table-config.model.d.ts +6 -0
- package/table/models/upd-table.config.d.ts +6 -0
- package/table/public-api.d.ts +5 -0
- package/table/services/default-filters-operands.service.d.ts +17 -0
- package/table/services/storages/saved-views.storage.d.ts +19 -0
- package/table/services/stores/filters-operands.store.d.ts +11 -0
- package/table/services/upd-table-config.service.d.ts +12 -0
- package/table/table.component.d.ts +81 -0
- package/table/tools/filters.tools.d.ts +9 -0
- package/table/tools/table.constants.d.ts +15 -0
- package/table/upd-table.module.d.ts +40 -0
- package/esm2022/form/form.module.mjs +0 -18
- package/esm2022/layout/partials/footer/footer-copyright.directive.mjs +0 -15
- package/form/form.module.d.ts +0 -7
- package/layout/partials/footer/footer-copyright.directive.d.ts +0 -6
|
@@ -1,25 +1,556 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
2
|
+
import { inject, Injectable, EventEmitter, input, signal, computed, effect, Output, HostBinding, Component, model, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1$1 from '@angular/forms';
|
|
4
|
+
import { Validators, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
5
|
+
import { TextService, UpdSdkModule } from '@updevs/sdk';
|
|
6
|
+
import { BaseComponent } from '@updevs/sdk/layout';
|
|
7
|
+
import { startWith } from 'rxjs';
|
|
8
|
+
import * as i1 from '@updevs/components/button';
|
|
9
|
+
import { UpdButtonModule } from '@updevs/components/button';
|
|
10
|
+
import * as i1$2 from '@jsverse/transloco';
|
|
11
|
+
import { TranslocoDirective } from '@jsverse/transloco';
|
|
12
|
+
import { ColumnSizeHelper } from '@updevs/components';
|
|
13
|
+
import * as i5 from '@updevs/components/form-controls/select';
|
|
14
|
+
import { Defaults, UpdSelectModule } from '@updevs/components/form-controls/select';
|
|
15
|
+
import * as i2 from '@updevs/components/form-controls/input';
|
|
16
|
+
import { UpdInputModule } from '@updevs/components/form-controls/input';
|
|
17
|
+
import * as i3 from '@updevs/components/form-controls/checkbox';
|
|
18
|
+
import { UpdCheckboxModule } from '@updevs/components/form-controls/checkbox';
|
|
19
|
+
import * as i4 from '@updevs/components/form-controls/radio';
|
|
20
|
+
import { UpdRadioModule } from '@updevs/components/form-controls/radio';
|
|
21
|
+
import * as i6 from '@updevs/components/form-controls/textarea';
|
|
22
|
+
import { UpdTextareaModule } from '@updevs/components/form-controls/textarea';
|
|
23
|
+
import * as i7 from '@updevs/components/form-controls/file-upload';
|
|
24
|
+
import { UpdFileUploadModule } from '@updevs/components/form-controls/file-upload';
|
|
3
25
|
import { CommonModule } from '@angular/common';
|
|
26
|
+
import { UpdDatePickerModule } from '@updevs/components/form-controls/date-picker';
|
|
4
27
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
28
|
+
/**
|
|
29
|
+
* How a parent field influences its child.
|
|
30
|
+
**/
|
|
31
|
+
var AttachmentTypeEnum;
|
|
32
|
+
(function (AttachmentTypeEnum) {
|
|
33
|
+
/**
|
|
34
|
+
* Enable / disable behaviour (default).
|
|
35
|
+
**/
|
|
36
|
+
AttachmentTypeEnum["Disabled"] = "disabled";
|
|
37
|
+
/**
|
|
38
|
+
* Child waits for the parent to have a value and (re)loads afterwards.
|
|
39
|
+
**/
|
|
40
|
+
AttachmentTypeEnum["ParentLoad"] = "parentLoad";
|
|
41
|
+
})(AttachmentTypeEnum || (AttachmentTypeEnum = {}));
|
|
42
|
+
|
|
43
|
+
var DynamicFieldType;
|
|
44
|
+
(function (DynamicFieldType) {
|
|
45
|
+
DynamicFieldType[DynamicFieldType["Input"] = 1] = "Input";
|
|
46
|
+
DynamicFieldType[DynamicFieldType["Select"] = 2] = "Select";
|
|
47
|
+
DynamicFieldType[DynamicFieldType["SelectMultiple"] = 3] = "SelectMultiple";
|
|
48
|
+
DynamicFieldType[DynamicFieldType["Label"] = 4] = "Label";
|
|
49
|
+
DynamicFieldType[DynamicFieldType["Checkbox"] = 5] = "Checkbox";
|
|
50
|
+
DynamicFieldType[DynamicFieldType["CheckboxGroup"] = 6] = "CheckboxGroup";
|
|
51
|
+
DynamicFieldType[DynamicFieldType["Radio"] = 7] = "Radio";
|
|
52
|
+
DynamicFieldType[DynamicFieldType["RadioGroup"] = 8] = "RadioGroup";
|
|
53
|
+
DynamicFieldType[DynamicFieldType["TextArea"] = 9] = "TextArea";
|
|
54
|
+
DynamicFieldType[DynamicFieldType["FileUpload"] = 10] = "FileUpload";
|
|
55
|
+
DynamicFieldType[DynamicFieldType["MaskedInput"] = 11] = "MaskedInput";
|
|
56
|
+
DynamicFieldType[DynamicFieldType["Button"] = 12] = "Button";
|
|
57
|
+
DynamicFieldType[DynamicFieldType["ButtonGroup"] = 13] = "ButtonGroup";
|
|
58
|
+
})(DynamicFieldType || (DynamicFieldType = {}));
|
|
59
|
+
|
|
60
|
+
class ErrorsHelper {
|
|
61
|
+
constructor() {
|
|
62
|
+
this.errors = {
|
|
63
|
+
'required': { text: 'UpDevs.Form.ErrorMessages.Required' },
|
|
64
|
+
'requiredTrue': { text: 'UpDevs.Form.ErrorMessages.RequiredTrue' },
|
|
65
|
+
'generic': { text: 'UpDevs.Form.ErrorMessages.Generic' },
|
|
66
|
+
'email': { text: 'UpDevs.Form.ErrorMessages.Email' },
|
|
67
|
+
'max': { text: 'UpDevs.Form.ErrorMessages.Max', defaultErrorParamToShow: 'max' },
|
|
68
|
+
'min': { text: 'UpDevs.Form.ErrorMessages.Min', defaultErrorParamToShow: 'min' },
|
|
69
|
+
'maxlength': { text: 'UpDevs.Form.ErrorMessages.MaxLength', defaultErrorParamToShow: 'requiredLength' },
|
|
70
|
+
'minlength': { text: 'UpDevs.Form.ErrorMessages.MinLength', defaultErrorParamToShow: 'requiredLength' }
|
|
71
|
+
};
|
|
72
|
+
this.textService = inject(TextService);
|
|
73
|
+
}
|
|
74
|
+
getMessages(control, customConfig) {
|
|
75
|
+
if (!control.errors) {
|
|
76
|
+
return [];
|
|
77
|
+
}
|
|
78
|
+
const errorMessages = [];
|
|
79
|
+
const genericText = this.textService.getText({ text: this.errors['generic'].text, isTranslated: false });
|
|
80
|
+
const combinedErrorMessagesList = Object.assign({}, this.errors, customConfig || {});
|
|
81
|
+
const controlErrorKeys = Object.keys(control.errors);
|
|
82
|
+
controlErrorKeys.forEach(key => {
|
|
83
|
+
const customError = !!control.errors ? control.errors[key] : undefined;
|
|
84
|
+
if (!!customError?.errorText) {
|
|
85
|
+
errorMessages.push(this.textService.getText(customError.errorText));
|
|
86
|
+
}
|
|
87
|
+
else if (key in combinedErrorMessagesList) {
|
|
88
|
+
const config = combinedErrorMessagesList[key];
|
|
89
|
+
let params;
|
|
90
|
+
if (config.showLength) {
|
|
91
|
+
params = { value: control.value?.length || 0 };
|
|
92
|
+
}
|
|
93
|
+
if (!!config.defaultErrorParamToShow) {
|
|
94
|
+
params = { value: control.errors[key][config.defaultErrorParamToShow] };
|
|
95
|
+
}
|
|
96
|
+
errorMessages.push(this.textService.getText({ text: config.text, isTranslated: false }, params));
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
if (controlErrorKeys.length > 0 && errorMessages.length < 1) {
|
|
100
|
+
errorMessages.push(genericText);
|
|
101
|
+
}
|
|
102
|
+
return errorMessages;
|
|
103
|
+
}
|
|
104
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ErrorsHelper, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
105
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ErrorsHelper }); }
|
|
106
|
+
}
|
|
107
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ErrorsHelper, decorators: [{
|
|
108
|
+
type: Injectable
|
|
109
|
+
}] });
|
|
110
|
+
|
|
111
|
+
class DynamicFieldComponent extends BaseComponent {
|
|
112
|
+
get hostClasses() {
|
|
113
|
+
return this.wrapperClasses();
|
|
114
|
+
}
|
|
115
|
+
get formControl() {
|
|
116
|
+
return this.formGroup().controls[this.field().name];
|
|
117
|
+
}
|
|
118
|
+
get inputField() {
|
|
119
|
+
return this.field();
|
|
120
|
+
}
|
|
121
|
+
get checkboxField() {
|
|
122
|
+
return this.field();
|
|
123
|
+
}
|
|
124
|
+
get checkboxGroupField() {
|
|
125
|
+
return this.field();
|
|
126
|
+
}
|
|
127
|
+
get radioField() {
|
|
128
|
+
return this.field();
|
|
129
|
+
}
|
|
130
|
+
get radioGroupField() {
|
|
131
|
+
return this.field();
|
|
132
|
+
}
|
|
133
|
+
get selectField() {
|
|
134
|
+
return this.field();
|
|
135
|
+
}
|
|
136
|
+
get singleSelectField() {
|
|
137
|
+
return this.field();
|
|
138
|
+
}
|
|
139
|
+
get textareaField() {
|
|
140
|
+
return this.field();
|
|
141
|
+
}
|
|
142
|
+
get fileUploadField() {
|
|
143
|
+
return this.field();
|
|
144
|
+
}
|
|
145
|
+
get maskedField() {
|
|
146
|
+
return this.field();
|
|
147
|
+
}
|
|
148
|
+
get buttonField() {
|
|
149
|
+
return this.field();
|
|
150
|
+
}
|
|
151
|
+
get buttonGroupField() {
|
|
152
|
+
return this.field();
|
|
153
|
+
}
|
|
154
|
+
get checkboxGroupOptionsKeys() {
|
|
155
|
+
return Object.keys(this.checkboxGroupField.options);
|
|
156
|
+
}
|
|
157
|
+
get radioGroupOptionsKeys() {
|
|
158
|
+
return Object.keys(this.radioGroupField.options);
|
|
159
|
+
}
|
|
160
|
+
get fileNameControl() {
|
|
161
|
+
return !!this.fileUploadField.fileNameFormProperty
|
|
162
|
+
? this.formGroup().controls[this.fileUploadField.fileNameFormProperty]
|
|
163
|
+
: undefined;
|
|
164
|
+
}
|
|
165
|
+
constructor() {
|
|
166
|
+
super();
|
|
167
|
+
this.submitForm = new EventEmitter();
|
|
168
|
+
this.DynamicFieldType = DynamicFieldType;
|
|
169
|
+
this.SelectDefaults = Defaults;
|
|
170
|
+
this.formGroup = input.required();
|
|
171
|
+
this.field = input.required();
|
|
172
|
+
this.layout = input.required();
|
|
173
|
+
this.validationStatusDescriptions = [];
|
|
174
|
+
this.selectedItemByValue = signal(undefined);
|
|
175
|
+
this.textService = inject(TextService);
|
|
176
|
+
this.wrapperClasses = computed(() => {
|
|
177
|
+
const isVisible = this.field().isVisible?.() ?? true;
|
|
178
|
+
const columnClasses = ColumnSizeHelper.getSizeClasses(this.field().colSize);
|
|
179
|
+
return `${columnClasses} ${isVisible ? '' : 'd-none'}`;
|
|
180
|
+
});
|
|
181
|
+
this.errorsHelper = inject(ErrorsHelper);
|
|
182
|
+
effect(() => {
|
|
183
|
+
const control = this.formControl;
|
|
184
|
+
const isVisible = this.field().isVisible?.() ?? true;
|
|
185
|
+
// If a field is not visible, we should remove its validators and restore if it becomes visible again.
|
|
186
|
+
if (!!control) {
|
|
187
|
+
if (isVisible) {
|
|
188
|
+
const fieldConfig = this.field();
|
|
189
|
+
const originalValidators = fieldConfig.validators || [];
|
|
190
|
+
const finalValidators = [...originalValidators];
|
|
191
|
+
if (fieldConfig.isRequired && !originalValidators.includes(Validators.required)) {
|
|
192
|
+
finalValidators.push(Validators.required);
|
|
193
|
+
}
|
|
194
|
+
control.setValidators(finalValidators);
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
control.clearValidators();
|
|
198
|
+
}
|
|
199
|
+
control.updateValueAndValidity();
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
ngOnInit() {
|
|
204
|
+
if (!!this.formControl) {
|
|
205
|
+
const statusSub = this.formControl.statusChanges.subscribe(status => {
|
|
206
|
+
if (status === 'INVALID') {
|
|
207
|
+
this.validationStatusDescriptions = this.errorsHelper.getMessages(this.formControl)
|
|
208
|
+
.map(t => ({ text: t, isTranslated: true }));
|
|
209
|
+
this.validationStatus = 'invalid';
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
this.validationStatusDescriptions = [];
|
|
213
|
+
this.validationStatus = this.field().showValidStatus ? 'valid' : undefined;
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
// Listen for value changes to update the select component's display
|
|
217
|
+
const valueChangeSub = this.formControl.valueChanges.subscribe(value => {
|
|
218
|
+
const item = this.selectField.items?.find(i => i.value == value);
|
|
219
|
+
this.selectedItemByValue.set(item);
|
|
220
|
+
});
|
|
221
|
+
// Set the initial value on init
|
|
222
|
+
if (this.field().initValue) {
|
|
223
|
+
const initialItem = this.selectField.items?.find(i => i.value == this.field().initValue);
|
|
224
|
+
this.selectedItemByValue.set(initialItem);
|
|
225
|
+
}
|
|
226
|
+
this.addSubscriptions(statusSub, valueChangeSub);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
onBlur() {
|
|
230
|
+
if (this.field().shouldValidateOnBlur) {
|
|
231
|
+
this.formControl.updateValueAndValidity();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
setControlValue(value) {
|
|
235
|
+
this.formControl.setValue(value);
|
|
236
|
+
this.formControl.markAsDirty();
|
|
237
|
+
}
|
|
238
|
+
getText(textModel) {
|
|
239
|
+
return this.textService.getText(textModel);
|
|
240
|
+
}
|
|
241
|
+
getOptionDescription(key, type) {
|
|
242
|
+
return type === 'checkbox' ? this.checkboxGroupField.options[key] : this.radioGroupField.options[key];
|
|
243
|
+
}
|
|
244
|
+
handleFileSelected(event) {
|
|
245
|
+
this.formControl.setValue(!!this.fileUploadField.saveAsDataUrl ? event?.dataUrl : event?.file);
|
|
246
|
+
this.formControl.markAsDirty();
|
|
247
|
+
if (!!this.fileUploadField.fileNameFormProperty) {
|
|
248
|
+
this.fileNameControl.setValue(event?.file.name);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
onInputEnter() {
|
|
252
|
+
if (!!this.inputField.shouldSubmitOnEnter) {
|
|
253
|
+
this.submitForm.next();
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DynamicFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
257
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: DynamicFieldComponent, selector: "upd-dynamic-field", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, field: { classPropertyName: "field", publicName: "field", isSignal: true, isRequired: true, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { submitForm: "submitForm" }, host: { properties: { "class": "this.hostClasses" } }, usesInheritance: true, ngImport: i0, template: "@switch (field().type) {\n @case (DynamicFieldType.Input) {\n <upd-input [name]=\"field().name\" [label]=\"field().label\" [placeholder]=\"field().placeholder\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [layout]=\"layout()\" [isDisabled]=\"field().isDisabled || false\"\n [type]=\"inputField.inputType || 'text'\" [labelColSize]=\"field().labelColSize\" [value]=\"formControl.value\"\n (valueChange)=\"setControlValue($event)\" (blurred)=\"onBlur()\" (keyUpEnter)=\"onInputEnter()\">\n @if (!!inputField.prefix) {\n <ng-template updInputPrepend>\n {{ textService.getText(inputField.prefix) }}\n </ng-template>\n }\n\n @if (!!inputField.suffix) {\n <ng-template updInputAppend>\n {{ textService.getText(inputField.suffix) }}\n </ng-template>\n }\n </upd-input>\n }\n @case (DynamicFieldType.Checkbox) {\n <upd-checkbox [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\" [hintAsTooltip]=\"field().hintAsTooltip || false\"\n [validationStatus]=\"validationStatus\" [validationStatusDescriptions]=\"validationStatusDescriptions\" [value]=\"true\"\n [isDisabled]=\"field().isDisabled || false\" [isChecked]=\"formControl.value\" [isInline]=\"checkboxField.isInline || false\"\n [isSwitch]=\"checkboxField.isSwitch || false\" (changed)=\"setControlValue($event)\"></upd-checkbox>\n }\n @case (DynamicFieldType.CheckboxGroup) {\n @if (!!field().label) {\n <label class=\"form-label\">{{ getText(field().label) }}</label>\n }\n\n @for (option of checkboxGroupOptionsKeys; track option) {\n <upd-checkbox [name]=\"field().name\" [label]=\"getOptionDescription(option, 'checkbox')\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [value]=\"option\" [isDisabled]=\"field().isDisabled || false\"\n [isChecked]=\"formControl.value\" [isInline]=\"checkboxField.isInline || false\" [isSwitch]=\"checkboxField.isSwitch || false\"\n (changed)=\"setControlValue(option)\"></upd-checkbox>\n }\n }\n @case (DynamicFieldType.Radio) {\n <upd-radio [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\" [hintAsTooltip]=\"field().hintAsTooltip || false\"\n [validationStatus]=\"validationStatus\" [validationStatusDescriptions]=\"validationStatusDescriptions\" [value]=\"true\"\n [isChecked]=\"formControl.value\" [isDisabled]=\"field().isDisabled || false\" [isInline]=\"radioField.isInline || false\"\n (selected)=\"setControlValue($event)\">\n </upd-radio>\n }\n @case (DynamicFieldType.RadioGroup) {\n @if (!!field().label) {\n <label class=\"form-label\">{{ getText(field().label) }}</label>\n }\n\n @for (option of radioGroupOptionsKeys; track option) {\n <upd-radio [name]=\"field().name\" [label]=\"getOptionDescription(option, 'radio')\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [value]=\"option\" [isDisabled]=\"field().isDisabled || false\"\n [isChecked]=\"formControl.value\" [isInline]=\"checkboxField.isInline || false\"\n (selected)=\"setControlValue(option)\"></upd-radio>\n }\n }\n @case (DynamicFieldType.Select) {\n <upd-select [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\" [hintAsTooltip]=\"field().hintAsTooltip || false\"\n [validationStatus]=\"validationStatus\" [validationStatusDescriptions]=\"validationStatusDescriptions\"\n [useSystemStyle]=\"singleSelectField.useSystemStyle || false\" [isDisabled]=\"field().isDisabled || false\"\n [items]=\"selectField.items\" [layout]=\"layout()\" [labelColSize]=\"field().labelColSize\" [store]=\"selectField.store!\"\n [observable]=\"selectField.observable\" [itemKey]=\"selectField.itemKey\" [itemValue]=\"selectField.itemValue\"\n [dropdownMaxHeight]=\"selectField.dropdownMaxHeight || SelectDefaults.dropdownMaxHeight\"\n [typeaheadDebounce]=\"selectField.typeaheadDebounce || SelectDefaults.typeaheadDebounce\"\n [shouldAutoSearch]=\"selectField.shouldAutoSearch || SelectDefaults.shouldAutoSearch\"\n [shouldCloseOnOutsideClick]=\"selectField.shouldCloseOnOutsideClick || SelectDefaults.shouldCloseOnOutsideClick\"\n [shouldTruncateSelectedText]=\"selectField.shouldTruncateSelectedText\" [parentValue]=\"selectField.parentValue\"\n [selected]=\"selectedItemByValue()\" (selectedItem)=\"setControlValue($event?.value)\"></upd-select>\n }\n @case (DynamicFieldType.SelectMultiple) {\n <upd-select-multiple [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [isDisabled]=\"field().isDisabled || false\"\n [items]=\"selectField.items\" [layout]=\"layout()\" [labelColSize]=\"field().labelColSize\" [store]=\"selectField.store!\"\n [observable]=\"selectField.observable\" [itemKey]=\"selectField.itemKey\" [itemValue]=\"selectField.itemValue\"\n [dropdownMaxHeight]=\"selectField.dropdownMaxHeight || SelectDefaults.dropdownMaxHeight\"\n [typeaheadDebounce]=\"selectField.typeaheadDebounce || SelectDefaults.typeaheadDebounce\"\n [shouldAutoSearch]=\"selectField.shouldAutoSearch || SelectDefaults.shouldAutoSearch\" [parentValue]=\"selectField.parentValue\"\n [shouldCloseOnOutsideClick]=\"selectField.shouldCloseOnOutsideClick || SelectDefaults.shouldCloseOnOutsideClick\"\n [selectedValues]=\"formControl.value\" (selectedIds)=\"setControlValue($event)\"></upd-select-multiple>\n }\n @case (DynamicFieldType.Label) {\n <label class=\"form-label\">{{ getText(field().label) }}</label>\n }\n @case (DynamicFieldType.TextArea) {\n <upd-textarea [name]=\"field().name\" [label]=\"field().label\" [placeholder]=\"field().placeholder\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [isDisabled]=\"field().isDisabled || false\"\n [value]=\"formControl.value\" [customClasses]=\"textareaField.customClasses\" [wrapperClasses]=\"textareaField.wrapperClasses\"\n [maxLength]=\"textareaField.maxLength\" [rows]=\"textareaField.rows\"\n [displayCharactersCount]=\"textareaField.displayCharactersCount || false\" (valueChange)=\"setControlValue($event)\">\n </upd-textarea>\n }\n @case (DynamicFieldType.FileUpload) {\n <upd-file-upload [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\" [isDisabled]=\"field().isDisabled || false\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\" [fileName]=\"fileNameControl?.value\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [allowFilesDrop]=\"fileUploadField.allowFilesDrop || false\"\n [title]=\"fileUploadField.title\" [labelColSize]=\"field().labelColSize\" [minFileSize]=\"fileUploadField.minFileSize\"\n [isMultiple]=\"fileUploadField.isMultiple || false\" [allowedExtensions]=\"fileUploadField.allowedExtensions || '*'\"\n [maxFileSize]=\"fileUploadField.maxFileSize\" [layout]=\"layout()\" (fileChanged)=\"handleFileSelected($event)\"></upd-file-upload>\n }\n @case (DynamicFieldType.MaskedInput) {\n <upd-input [name]=\"field().name\" [label]=\"field().label\" [placeholder]=\"field().placeholder\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\" [mask]=\"maskedField.mask\"\n [maskConfig]=\"maskedField.maskConfig\" [validationStatusDescriptions]=\"validationStatusDescriptions\" [layout]=\"layout()\"\n [isDisabled]=\"field().isDisabled || false\" [type]=\"inputField.inputType || 'text'\" [labelColSize]=\"field().labelColSize\"\n [value]=\"formControl.value\" (valueChange)=\"setControlValue($event)\" (blurred)=\"onBlur()\" (keyUpEnter)=\"onInputEnter()\">\n @if (!!inputField.prefix) {\n <ng-template updInputPrepend>\n {{ textService.getText(inputField.prefix) }}\n </ng-template>\n }\n\n @if (!!inputField.suffix) {\n <ng-template updInputAppend>\n {{ textService.getText(inputField.suffix) }}\n </ng-template>\n }\n </upd-input>\n }\n @case(DynamicFieldType.Button) {\n <upd-button [text]=\"field().label\" [isDisabled]=\"field().isDisabled || false\" [model]=\"buttonField.model\" />\n }\n @case(DynamicFieldType.ButtonGroup) {\n @if(!!field().label) {\n <label class=\"form-label\">{{ getText(field().label) }}</label>\n }\n\n <div class=\"btn-group\" role=\"group\">\n @for (btn of buttonGroupField.buttons; track btn) {\n <upd-button [model]=\"btn\" [isDisabled]=\"field().isDisabled || false\" />\n }\n </div>\n }\n}", styles: [""], dependencies: [{ kind: "component", type: i1.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "component", type: i2.InputComponent, selector: "upd-input", inputs: ["type", "mask", "maskConfig", "value", "size", "customClasses", "wrapperClasses", "maxLength", "isPlainText", "isReadOnly", "isLoading", "isRound", "isFlush", "isInputGroupFlat", "isPrependButton", "isAppendButton", "isFloating", "loaderPosition", "prependIconModel", "appendIconModel", "isValidationStatusLight", "layout"], outputs: ["valueChange", "blurred", "keyDown", "keyDownEsc", "keyUpEnter"] }, { kind: "directive", type: i2.InputAppendDirective, selector: "ng-template[updInputAppend]" }, { kind: "directive", type: i2.InputPrependDirective, selector: "ng-template[updInputPrepend]" }, { kind: "component", type: i3.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline", "isSwitch", "isIndeterminate"], outputs: ["changed", "isCheckedChange", "isIndeterminateChange"] }, { kind: "component", type: i4.RadioComponent, selector: "upd-radio", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline"], outputs: ["selected"] }, { kind: "component", type: i5.SelectComponent, selector: "upd-select", inputs: ["useSystemStyle", "shouldShowClearButton", "shouldTruncateSelectedText", "isCompact", "selected"], outputs: ["selectedItem"] }, { kind: "component", type: i5.SelectMultipleComponent, selector: "upd-select-multiple", inputs: ["selectedValues"], outputs: ["selectedItems", "selectedIds"] }, { kind: "component", type: i6.TextareaComponent, selector: "upd-textarea", inputs: ["value", "customClasses", "wrapperClasses", "maxLength", "rows", "displayCharactersCount"], outputs: ["valueChange"] }, { kind: "component", type: i7.FileUploadComponent, selector: "upd-file-upload", inputs: ["fileName", "title", "allowFilesDrop", "isMultiple", "allowedExtensions", "minFileSize", "maxFileSize", "layout"], outputs: ["fileChanged"] }] }); }
|
|
258
|
+
}
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DynamicFieldComponent, decorators: [{
|
|
260
|
+
type: Component,
|
|
261
|
+
args: [{ selector: 'upd-dynamic-field', template: "@switch (field().type) {\n @case (DynamicFieldType.Input) {\n <upd-input [name]=\"field().name\" [label]=\"field().label\" [placeholder]=\"field().placeholder\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [layout]=\"layout()\" [isDisabled]=\"field().isDisabled || false\"\n [type]=\"inputField.inputType || 'text'\" [labelColSize]=\"field().labelColSize\" [value]=\"formControl.value\"\n (valueChange)=\"setControlValue($event)\" (blurred)=\"onBlur()\" (keyUpEnter)=\"onInputEnter()\">\n @if (!!inputField.prefix) {\n <ng-template updInputPrepend>\n {{ textService.getText(inputField.prefix) }}\n </ng-template>\n }\n\n @if (!!inputField.suffix) {\n <ng-template updInputAppend>\n {{ textService.getText(inputField.suffix) }}\n </ng-template>\n }\n </upd-input>\n }\n @case (DynamicFieldType.Checkbox) {\n <upd-checkbox [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\" [hintAsTooltip]=\"field().hintAsTooltip || false\"\n [validationStatus]=\"validationStatus\" [validationStatusDescriptions]=\"validationStatusDescriptions\" [value]=\"true\"\n [isDisabled]=\"field().isDisabled || false\" [isChecked]=\"formControl.value\" [isInline]=\"checkboxField.isInline || false\"\n [isSwitch]=\"checkboxField.isSwitch || false\" (changed)=\"setControlValue($event)\"></upd-checkbox>\n }\n @case (DynamicFieldType.CheckboxGroup) {\n @if (!!field().label) {\n <label class=\"form-label\">{{ getText(field().label) }}</label>\n }\n\n @for (option of checkboxGroupOptionsKeys; track option) {\n <upd-checkbox [name]=\"field().name\" [label]=\"getOptionDescription(option, 'checkbox')\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [value]=\"option\" [isDisabled]=\"field().isDisabled || false\"\n [isChecked]=\"formControl.value\" [isInline]=\"checkboxField.isInline || false\" [isSwitch]=\"checkboxField.isSwitch || false\"\n (changed)=\"setControlValue(option)\"></upd-checkbox>\n }\n }\n @case (DynamicFieldType.Radio) {\n <upd-radio [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\" [hintAsTooltip]=\"field().hintAsTooltip || false\"\n [validationStatus]=\"validationStatus\" [validationStatusDescriptions]=\"validationStatusDescriptions\" [value]=\"true\"\n [isChecked]=\"formControl.value\" [isDisabled]=\"field().isDisabled || false\" [isInline]=\"radioField.isInline || false\"\n (selected)=\"setControlValue($event)\">\n </upd-radio>\n }\n @case (DynamicFieldType.RadioGroup) {\n @if (!!field().label) {\n <label class=\"form-label\">{{ getText(field().label) }}</label>\n }\n\n @for (option of radioGroupOptionsKeys; track option) {\n <upd-radio [name]=\"field().name\" [label]=\"getOptionDescription(option, 'radio')\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [value]=\"option\" [isDisabled]=\"field().isDisabled || false\"\n [isChecked]=\"formControl.value\" [isInline]=\"checkboxField.isInline || false\"\n (selected)=\"setControlValue(option)\"></upd-radio>\n }\n }\n @case (DynamicFieldType.Select) {\n <upd-select [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\" [hintAsTooltip]=\"field().hintAsTooltip || false\"\n [validationStatus]=\"validationStatus\" [validationStatusDescriptions]=\"validationStatusDescriptions\"\n [useSystemStyle]=\"singleSelectField.useSystemStyle || false\" [isDisabled]=\"field().isDisabled || false\"\n [items]=\"selectField.items\" [layout]=\"layout()\" [labelColSize]=\"field().labelColSize\" [store]=\"selectField.store!\"\n [observable]=\"selectField.observable\" [itemKey]=\"selectField.itemKey\" [itemValue]=\"selectField.itemValue\"\n [dropdownMaxHeight]=\"selectField.dropdownMaxHeight || SelectDefaults.dropdownMaxHeight\"\n [typeaheadDebounce]=\"selectField.typeaheadDebounce || SelectDefaults.typeaheadDebounce\"\n [shouldAutoSearch]=\"selectField.shouldAutoSearch || SelectDefaults.shouldAutoSearch\"\n [shouldCloseOnOutsideClick]=\"selectField.shouldCloseOnOutsideClick || SelectDefaults.shouldCloseOnOutsideClick\"\n [shouldTruncateSelectedText]=\"selectField.shouldTruncateSelectedText\" [parentValue]=\"selectField.parentValue\"\n [selected]=\"selectedItemByValue()\" (selectedItem)=\"setControlValue($event?.value)\"></upd-select>\n }\n @case (DynamicFieldType.SelectMultiple) {\n <upd-select-multiple [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [isDisabled]=\"field().isDisabled || false\"\n [items]=\"selectField.items\" [layout]=\"layout()\" [labelColSize]=\"field().labelColSize\" [store]=\"selectField.store!\"\n [observable]=\"selectField.observable\" [itemKey]=\"selectField.itemKey\" [itemValue]=\"selectField.itemValue\"\n [dropdownMaxHeight]=\"selectField.dropdownMaxHeight || SelectDefaults.dropdownMaxHeight\"\n [typeaheadDebounce]=\"selectField.typeaheadDebounce || SelectDefaults.typeaheadDebounce\"\n [shouldAutoSearch]=\"selectField.shouldAutoSearch || SelectDefaults.shouldAutoSearch\" [parentValue]=\"selectField.parentValue\"\n [shouldCloseOnOutsideClick]=\"selectField.shouldCloseOnOutsideClick || SelectDefaults.shouldCloseOnOutsideClick\"\n [selectedValues]=\"formControl.value\" (selectedIds)=\"setControlValue($event)\"></upd-select-multiple>\n }\n @case (DynamicFieldType.Label) {\n <label class=\"form-label\">{{ getText(field().label) }}</label>\n }\n @case (DynamicFieldType.TextArea) {\n <upd-textarea [name]=\"field().name\" [label]=\"field().label\" [placeholder]=\"field().placeholder\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [isDisabled]=\"field().isDisabled || false\"\n [value]=\"formControl.value\" [customClasses]=\"textareaField.customClasses\" [wrapperClasses]=\"textareaField.wrapperClasses\"\n [maxLength]=\"textareaField.maxLength\" [rows]=\"textareaField.rows\"\n [displayCharactersCount]=\"textareaField.displayCharactersCount || false\" (valueChange)=\"setControlValue($event)\">\n </upd-textarea>\n }\n @case (DynamicFieldType.FileUpload) {\n <upd-file-upload [name]=\"field().name\" [label]=\"field().label\" [hint]=\"field().hint\" [isDisabled]=\"field().isDisabled || false\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\" [fileName]=\"fileNameControl?.value\"\n [validationStatusDescriptions]=\"validationStatusDescriptions\" [allowFilesDrop]=\"fileUploadField.allowFilesDrop || false\"\n [title]=\"fileUploadField.title\" [labelColSize]=\"field().labelColSize\" [minFileSize]=\"fileUploadField.minFileSize\"\n [isMultiple]=\"fileUploadField.isMultiple || false\" [allowedExtensions]=\"fileUploadField.allowedExtensions || '*'\"\n [maxFileSize]=\"fileUploadField.maxFileSize\" [layout]=\"layout()\" (fileChanged)=\"handleFileSelected($event)\"></upd-file-upload>\n }\n @case (DynamicFieldType.MaskedInput) {\n <upd-input [name]=\"field().name\" [label]=\"field().label\" [placeholder]=\"field().placeholder\" [hint]=\"field().hint\"\n [hintAsTooltip]=\"field().hintAsTooltip || false\" [validationStatus]=\"validationStatus\" [mask]=\"maskedField.mask\"\n [maskConfig]=\"maskedField.maskConfig\" [validationStatusDescriptions]=\"validationStatusDescriptions\" [layout]=\"layout()\"\n [isDisabled]=\"field().isDisabled || false\" [type]=\"inputField.inputType || 'text'\" [labelColSize]=\"field().labelColSize\"\n [value]=\"formControl.value\" (valueChange)=\"setControlValue($event)\" (blurred)=\"onBlur()\" (keyUpEnter)=\"onInputEnter()\">\n @if (!!inputField.prefix) {\n <ng-template updInputPrepend>\n {{ textService.getText(inputField.prefix) }}\n </ng-template>\n }\n\n @if (!!inputField.suffix) {\n <ng-template updInputAppend>\n {{ textService.getText(inputField.suffix) }}\n </ng-template>\n }\n </upd-input>\n }\n @case(DynamicFieldType.Button) {\n <upd-button [text]=\"field().label\" [isDisabled]=\"field().isDisabled || false\" [model]=\"buttonField.model\" />\n }\n @case(DynamicFieldType.ButtonGroup) {\n @if(!!field().label) {\n <label class=\"form-label\">{{ getText(field().label) }}</label>\n }\n\n <div class=\"btn-group\" role=\"group\">\n @for (btn of buttonGroupField.buttons; track btn) {\n <upd-button [model]=\"btn\" [isDisabled]=\"field().isDisabled || false\" />\n }\n </div>\n }\n}" }]
|
|
262
|
+
}], ctorParameters: () => [], propDecorators: { hostClasses: [{
|
|
263
|
+
type: HostBinding,
|
|
264
|
+
args: ['class']
|
|
265
|
+
}], submitForm: [{
|
|
266
|
+
type: Output
|
|
267
|
+
}] } });
|
|
268
|
+
|
|
269
|
+
class FormComponent extends BaseComponent {
|
|
270
|
+
get titleText() {
|
|
271
|
+
return this.textService.getText(this.title());
|
|
272
|
+
}
|
|
273
|
+
constructor() {
|
|
274
|
+
super();
|
|
275
|
+
this.initialized = new EventEmitter();
|
|
276
|
+
this.dataLoaded = new EventEmitter(); // TODO: implementar
|
|
277
|
+
this.submitted = new EventEmitter();
|
|
278
|
+
/**
|
|
279
|
+
* Rows to generate the form.
|
|
280
|
+
*/
|
|
281
|
+
this.rows = input.required();
|
|
282
|
+
/**
|
|
283
|
+
* Form's layout.
|
|
284
|
+
*/
|
|
285
|
+
this.layout = input('vertical');
|
|
286
|
+
/**
|
|
287
|
+
* Title of the form.
|
|
288
|
+
* Optional.
|
|
289
|
+
*/
|
|
290
|
+
this.title = input(undefined);
|
|
291
|
+
/**
|
|
292
|
+
* Whether the actions section will be displayed.
|
|
293
|
+
*/
|
|
294
|
+
this.hasActionsSection = input(true);
|
|
295
|
+
/**
|
|
296
|
+
* Whether the form is contained in a card.
|
|
297
|
+
* If true, it'll display a card as a form wrapper.
|
|
298
|
+
*/
|
|
299
|
+
this.isCard = input(false);
|
|
300
|
+
/**
|
|
301
|
+
* Whether the form is in read only mode, which means no fields can be edited.
|
|
302
|
+
*/
|
|
303
|
+
this.isDisabled = input(false, { transform: (val) => typeof val === 'string' ? val === '' : val });
|
|
304
|
+
/**
|
|
305
|
+
* Whether the form is loading.
|
|
306
|
+
*/
|
|
307
|
+
this.isLoading = input(false); // TODO: implementar
|
|
308
|
+
/**
|
|
309
|
+
* Whether the form is saving.
|
|
310
|
+
*/
|
|
311
|
+
this.isSaving = input(false); // TODO: implementar
|
|
312
|
+
/**
|
|
313
|
+
* Current form data.
|
|
314
|
+
*/
|
|
315
|
+
this.formData = model({});
|
|
316
|
+
this.formGroup = model(new FormGroup({}));
|
|
317
|
+
this.textService = inject(TextService);
|
|
318
|
+
effect(() => {
|
|
319
|
+
this.rows();
|
|
320
|
+
this.setupFormGroup();
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
ngOnInit() {
|
|
324
|
+
this.setupFormGroup();
|
|
325
|
+
this.initialized.emit();
|
|
326
|
+
const valueChangesSub = this.formGroup().valueChanges.subscribe(() => this.formData.set(this.formGroup().getRawValue()));
|
|
327
|
+
this.addSubscriptions(valueChangesSub);
|
|
328
|
+
}
|
|
329
|
+
submit() {
|
|
330
|
+
this.formGroup().markAllAsTouched();
|
|
331
|
+
this.formGroup().updateValueAndValidity();
|
|
332
|
+
Object.values(this.formGroup().controls).forEach(control => control.updateValueAndValidity());
|
|
333
|
+
if (this.formGroup().valid) {
|
|
334
|
+
this.submitted.emit(this.formGroup().value);
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
setupFormGroup() {
|
|
338
|
+
const allFields = this.rows().map(r => r.fields).reduce((acc, fields) => acc.concat(fields), []);
|
|
339
|
+
allFields.forEach(field => {
|
|
340
|
+
const validators = field.validators || [];
|
|
341
|
+
if (field.isRequired && !validators.includes(Validators.required)) {
|
|
342
|
+
validators.push(Validators.required);
|
|
343
|
+
}
|
|
344
|
+
// TODO: handle extra cases, when ready. DateRange, DateTimeRange, TimeRange, etc.
|
|
345
|
+
switch (field.type) {
|
|
346
|
+
case DynamicFieldType.FileUpload:
|
|
347
|
+
this.formGroup().addControl(field.name, new FormControl({
|
|
348
|
+
value: field.initValue,
|
|
349
|
+
disabled: field.isDisabled || this.isDisabled()
|
|
350
|
+
}, { validators: validators }));
|
|
351
|
+
const fileNameFormProp = field.fileNameFormProperty;
|
|
352
|
+
if (!!fileNameFormProp) {
|
|
353
|
+
this.formGroup().addControl(fileNameFormProp, new FormControl({
|
|
354
|
+
value: field.initValue,
|
|
355
|
+
disabled: field.isDisabled || this.isDisabled()
|
|
356
|
+
}, { validators: validators }));
|
|
357
|
+
}
|
|
358
|
+
break;
|
|
359
|
+
// Buttons don't generate values, so they don't need to have a control.
|
|
360
|
+
case DynamicFieldType.Button:
|
|
361
|
+
case DynamicFieldType.ButtonGroup:
|
|
362
|
+
break;
|
|
363
|
+
default:
|
|
364
|
+
this.formGroup().addControl(field.name, new FormControl({
|
|
365
|
+
value: field.initValue,
|
|
366
|
+
disabled: field.isDisabled || this.isDisabled()
|
|
367
|
+
}, { validators: validators, updateOn: field.updateOn || 'blur' }));
|
|
368
|
+
}
|
|
369
|
+
});
|
|
370
|
+
this.bindAttachments(allFields);
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Glue the declarative AttachmentRule array to actual FormControls.
|
|
374
|
+
**/
|
|
375
|
+
bindAttachments(fields) {
|
|
376
|
+
fields.forEach(childField => {
|
|
377
|
+
if (!childField.attachments?.length) {
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
const childCtrl = this.formGroup().get(childField.name);
|
|
381
|
+
childField.attachments.forEach((rule) => {
|
|
382
|
+
const parentCtrl = this.formGroup().get(rule.name);
|
|
383
|
+
if (!parentCtrl) {
|
|
384
|
+
console.warn(`[FormComponent] attachment parent '${rule.name}' not found`);
|
|
385
|
+
return;
|
|
386
|
+
}
|
|
387
|
+
const sub = parentCtrl.valueChanges
|
|
388
|
+
.pipe(startWith(parentCtrl.value))
|
|
389
|
+
.subscribe(parentVal => {
|
|
390
|
+
const childVal = childCtrl.value;
|
|
391
|
+
let shouldDisable = false;
|
|
392
|
+
if (rule.type === AttachmentTypeEnum.ParentLoad || rule.disableIfEmpty) {
|
|
393
|
+
shouldDisable = parentVal === null || parentVal === undefined || parentVal === '';
|
|
394
|
+
}
|
|
395
|
+
if (!!rule.disableIf) {
|
|
396
|
+
shouldDisable = rule.disableIf(childVal, parentVal);
|
|
397
|
+
}
|
|
398
|
+
if (shouldDisable) {
|
|
399
|
+
if (rule.clearValueIfDisabled && childCtrl.enabled) {
|
|
400
|
+
childCtrl.setValue(null, { emitEvent: false });
|
|
401
|
+
}
|
|
402
|
+
childField.parentValue = undefined;
|
|
403
|
+
childCtrl.disable({ emitEvent: false });
|
|
404
|
+
}
|
|
405
|
+
else {
|
|
406
|
+
childField.parentValue = parentVal;
|
|
407
|
+
if (childCtrl.disabled) {
|
|
408
|
+
childCtrl.enable({ emitEvent: false });
|
|
409
|
+
}
|
|
410
|
+
if (rule.clearValueIfEmpty && !parentVal) {
|
|
411
|
+
childCtrl.setValue(null, { emitEvent: false });
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
if (rule.visibleIf) {
|
|
415
|
+
const visible = rule.visibleIf(childVal, parentVal);
|
|
416
|
+
childField.isHidden = !visible;
|
|
417
|
+
}
|
|
418
|
+
});
|
|
419
|
+
this.addSubscriptions(sub);
|
|
420
|
+
});
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
424
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: FormComponent, selector: "upd-form", inputs: { rows: { classPropertyName: "rows", publicName: "rows", isSignal: true, isRequired: true, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, hasActionsSection: { classPropertyName: "hasActionsSection", publicName: "hasActionsSection", isSignal: true, isRequired: false, transformFunction: null }, isCard: { classPropertyName: "isCard", publicName: "isCard", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isSaving: { classPropertyName: "isSaving", publicName: "isSaving", isSignal: true, isRequired: false, transformFunction: null }, formData: { classPropertyName: "formData", publicName: "formData", isSignal: true, isRequired: false, transformFunction: null }, formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { initialized: "initialized", dataLoaded: "dataLoaded", submitted: "submitted", formData: "formDataChange", formGroup: "formGroupChange" }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Form'\">\n <div [class.card]=\"isCard()\">\n @if (!!titleText) {\n <div [class.card-header]=\"isCard()\">\n <h3 [class.card-title]=\"isCard()\">{{ titleText }}</h3>\n </div>\n }\n <div [class.card-body]=\"isCard()\">\n @for (row of rows(); track row; let isFirst = $first) {\n <div class=\"row\" [class.mt-4]=\"!isFirst\">\n @if (!!row.title) {\n <div class=\"card-title col-12\">{{ textService.getText(row.title) }}</div>\n }\n\n @for (field of row.fields; track field.name) {\n @if (!field.isHidden) {\n <upd-dynamic-field [layout]=\"layout()\" [field]=\"field\" [formGroup]=\"formGroup()\" (submitForm)=\"submit()\">\n </upd-dynamic-field>\n }\n }\n </div>\n }\n </div>\n\n @if (hasActionsSection()) {\n <div [class.card-footer]=\"isCard()\" [class.mt-4]=\"!isCard()\">\n <upd-button colorStyle=\"primary\" (clicked)=\"submit()\">\n {{ t('Submit') }}\n </upd-button>\n </div>\n }\n </div>\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i1$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i1.ButtonComponent, selector: "upd-button", inputs: ["model", "text", "brandColorStyle", "customClasses", "isOutline", "isGhost", "isSquare", "isPill", "isIcon", "isLoading", "isList", "isFloating", "isAction", "isNavigationLink", "isLink", "shouldIgnoreBtnClass", "iconModel", "iconPosition", "isDisabled", "isActive", "badgeConfig", "colorStyle", "size", "title"], outputs: ["clicked"] }, { kind: "directive", type: i1$2.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: DynamicFieldComponent, selector: "upd-dynamic-field", inputs: ["formGroup", "field", "layout"], outputs: ["submitForm"] }] }); }
|
|
9
425
|
}
|
|
10
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
426
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FormComponent, decorators: [{
|
|
427
|
+
type: Component,
|
|
428
|
+
args: [{ selector: 'upd-form', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Form'\">\n <div [class.card]=\"isCard()\">\n @if (!!titleText) {\n <div [class.card-header]=\"isCard()\">\n <h3 [class.card-title]=\"isCard()\">{{ titleText }}</h3>\n </div>\n }\n <div [class.card-body]=\"isCard()\">\n @for (row of rows(); track row; let isFirst = $first) {\n <div class=\"row\" [class.mt-4]=\"!isFirst\">\n @if (!!row.title) {\n <div class=\"card-title col-12\">{{ textService.getText(row.title) }}</div>\n }\n\n @for (field of row.fields; track field.name) {\n @if (!field.isHidden) {\n <upd-dynamic-field [layout]=\"layout()\" [field]=\"field\" [formGroup]=\"formGroup()\" (submitForm)=\"submit()\">\n </upd-dynamic-field>\n }\n }\n </div>\n }\n </div>\n\n @if (hasActionsSection()) {\n <div [class.card-footer]=\"isCard()\" [class.mt-4]=\"!isCard()\">\n <upd-button colorStyle=\"primary\" (clicked)=\"submit()\">\n {{ t('Submit') }}\n </upd-button>\n </div>\n }\n </div>\n</ng-container>" }]
|
|
429
|
+
}], ctorParameters: () => [], propDecorators: { initialized: [{
|
|
430
|
+
type: Output
|
|
431
|
+
}], dataLoaded: [{
|
|
432
|
+
type: Output
|
|
433
|
+
}], submitted: [{
|
|
434
|
+
type: Output
|
|
435
|
+
}] } });
|
|
436
|
+
|
|
437
|
+
var UpDevs$1 = {
|
|
438
|
+
Form: {
|
|
439
|
+
Submit: "Submit",
|
|
440
|
+
ErrorMessages: {
|
|
441
|
+
Generic: "Error",
|
|
442
|
+
Email: "Invalid email",
|
|
443
|
+
Max: "Value should not be greater than {{value}}",
|
|
444
|
+
Min: "Value should not be lower than {{value}}",
|
|
445
|
+
MaxLength: "Maximum length: {{value}}",
|
|
446
|
+
MinLength: "Minimum length: {{value}}",
|
|
447
|
+
Required: "Required field",
|
|
448
|
+
RequiredTrue: "This field must be selected"
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
var en = {
|
|
453
|
+
UpDevs: UpDevs$1
|
|
454
|
+
};
|
|
455
|
+
|
|
456
|
+
var en$1 = /*#__PURE__*/Object.freeze({
|
|
457
|
+
__proto__: null,
|
|
458
|
+
UpDevs: UpDevs$1,
|
|
459
|
+
default: en
|
|
460
|
+
});
|
|
461
|
+
|
|
462
|
+
var UpDevs = {
|
|
463
|
+
Form: {
|
|
464
|
+
Submit: "Enviar",
|
|
465
|
+
ErrorMessages: {
|
|
466
|
+
Generic: "Erro",
|
|
467
|
+
Email: "E-mail inválido",
|
|
468
|
+
Max: "O valor não pode ser maior do que {{value}}",
|
|
469
|
+
Min: "O valor não pode ser menor do que {{value}}",
|
|
470
|
+
MaxLength: "Tamanho máximo permitido: {{value}}",
|
|
471
|
+
MinLength: "Tamanho mínimo permitido: {{value}}",
|
|
472
|
+
Required: "Campo obrigatório",
|
|
473
|
+
RequiredTrue: "Este campo deve ser selecionado"
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
};
|
|
477
|
+
var pt = {
|
|
478
|
+
UpDevs: UpDevs
|
|
479
|
+
};
|
|
480
|
+
|
|
481
|
+
var pt$1 = /*#__PURE__*/Object.freeze({
|
|
482
|
+
__proto__: null,
|
|
483
|
+
UpDevs: UpDevs,
|
|
484
|
+
default: pt
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
class UpdFormModule {
|
|
488
|
+
constructor(translocoService) {
|
|
489
|
+
translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });
|
|
490
|
+
translocoService.setTranslation(en$1, 'en');
|
|
491
|
+
translocoService.setTranslation(pt$1, 'pt');
|
|
492
|
+
}
|
|
493
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdFormModule, deps: [{ token: i1$2.TranslocoService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
494
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: UpdFormModule, declarations: [FormComponent,
|
|
495
|
+
DynamicFieldComponent], imports: [CommonModule,
|
|
496
|
+
ReactiveFormsModule,
|
|
497
|
+
UpdButtonModule,
|
|
498
|
+
TranslocoDirective,
|
|
499
|
+
UpdInputModule,
|
|
500
|
+
UpdCheckboxModule,
|
|
501
|
+
UpdRadioModule,
|
|
502
|
+
UpdDatePickerModule,
|
|
503
|
+
UpdSelectModule,
|
|
504
|
+
UpdTextareaModule,
|
|
505
|
+
UpdFileUploadModule,
|
|
506
|
+
UpdSdkModule], exports: [FormComponent] }); }
|
|
507
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdFormModule, providers: [
|
|
508
|
+
ErrorsHelper
|
|
509
|
+
], imports: [CommonModule,
|
|
510
|
+
ReactiveFormsModule,
|
|
511
|
+
UpdButtonModule,
|
|
512
|
+
UpdInputModule,
|
|
513
|
+
UpdCheckboxModule,
|
|
514
|
+
UpdRadioModule,
|
|
515
|
+
UpdDatePickerModule,
|
|
516
|
+
UpdSelectModule,
|
|
517
|
+
UpdTextareaModule,
|
|
518
|
+
UpdFileUploadModule,
|
|
519
|
+
UpdSdkModule] }); }
|
|
520
|
+
}
|
|
521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdFormModule, decorators: [{
|
|
11
522
|
type: NgModule,
|
|
12
523
|
args: [{
|
|
13
|
-
declarations: [],
|
|
14
524
|
imports: [
|
|
15
|
-
CommonModule
|
|
525
|
+
CommonModule,
|
|
526
|
+
ReactiveFormsModule,
|
|
527
|
+
UpdButtonModule,
|
|
528
|
+
TranslocoDirective,
|
|
529
|
+
UpdInputModule,
|
|
530
|
+
UpdCheckboxModule,
|
|
531
|
+
UpdRadioModule,
|
|
532
|
+
UpdDatePickerModule,
|
|
533
|
+
UpdSelectModule,
|
|
534
|
+
UpdTextareaModule,
|
|
535
|
+
UpdFileUploadModule,
|
|
536
|
+
UpdSdkModule
|
|
537
|
+
],
|
|
538
|
+
declarations: [
|
|
539
|
+
FormComponent,
|
|
540
|
+
DynamicFieldComponent
|
|
541
|
+
],
|
|
542
|
+
exports: [
|
|
543
|
+
FormComponent
|
|
544
|
+
],
|
|
545
|
+
providers: [
|
|
546
|
+
ErrorsHelper
|
|
16
547
|
]
|
|
17
548
|
}]
|
|
18
|
-
}] });
|
|
549
|
+
}], ctorParameters: () => [{ type: i1$2.TranslocoService }] });
|
|
19
550
|
|
|
20
551
|
/**
|
|
21
552
|
* Generated bundle index. Do not edit.
|
|
22
553
|
*/
|
|
23
554
|
|
|
24
|
-
export {
|
|
555
|
+
export { AttachmentTypeEnum, DynamicFieldType, FormComponent, UpdFormModule };
|
|
25
556
|
//# sourceMappingURL=updevs-components-form.mjs.map
|