@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
|
@@ -0,0 +1,1754 @@
|
|
|
1
|
+
import { DataTypeEnum, StringColumnFilter, GuidColumnFilter, NumberColumnFilter, DateColumnFilter, BooleanColumnFilter, SortDirectionEnum, ColumnSort, BaseStore, FilterOperandEnum, FilterDateOperandEnum, FilterNumberOperandEnum, FilterBooleanOperandEnum, FilterGuidOperandEnum } from '@updevs/sdk/stores';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { inject, Directive, Component, input, ViewContainerRef, effect, computed, signal, Injectable, model, InjectionToken, Inject, EventEmitter, Output, HostBinding, viewChild, ElementRef, NgModule } from '@angular/core';
|
|
4
|
+
import { DynamicComponentLoaderService, BaseComponent, ButtonModel } from '@updevs/sdk/layout';
|
|
5
|
+
import { TextService } from '@updevs/sdk';
|
|
6
|
+
import * as i1 from '@angular/common';
|
|
7
|
+
import { CommonModule } from '@angular/common';
|
|
8
|
+
import * as i3 from '@updevs/icons';
|
|
9
|
+
import { UpdIconsModule } from '@updevs/icons';
|
|
10
|
+
import { DateTimeFormatEnum, Tools, SelectionModel, ServerResponseService } from '@updevs/sdk/core';
|
|
11
|
+
import { BaseModal, ModalService, ModalAlertService, UpdModalModule } from '@updevs/components/modal';
|
|
12
|
+
import { Subject, distinctUntilChanged, debounceTime, tap, switchMap, catchError, of, finalize, forkJoin } from 'rxjs';
|
|
13
|
+
import * as i1$1 from '@jsverse/transloco';
|
|
14
|
+
import { TranslocoDirective } from '@jsverse/transloco';
|
|
15
|
+
import * as i2 from '@updevs/components/drag-and-drop';
|
|
16
|
+
import { UpdDragAndDropModule } from '@updevs/components/drag-and-drop';
|
|
17
|
+
import { FormGroup, Validators } from '@angular/forms';
|
|
18
|
+
import * as i3$1 from '@updevs/components/form';
|
|
19
|
+
import { DynamicFieldType, UpdFormModule } from '@updevs/components/form';
|
|
20
|
+
import { BaseByUserSignalStorage } from '@updevs/sdk/security';
|
|
21
|
+
import * as i4 from '@updevs/components/button';
|
|
22
|
+
import { UpdButtonModule } from '@updevs/components/button';
|
|
23
|
+
import * as i5$1 from '@updevs/components/paginator';
|
|
24
|
+
import { UpdPaginatorModule } from '@updevs/components/paginator';
|
|
25
|
+
import * as i6 from '@updevs/components/form-controls/checkbox';
|
|
26
|
+
import { UpdCheckboxModule } from '@updevs/components/form-controls/checkbox';
|
|
27
|
+
import * as i7 from '@updevs/components/dropdown';
|
|
28
|
+
import { UpdDropdownModule } from '@updevs/components/dropdown';
|
|
29
|
+
import * as i8 from '@updevs/components/popover';
|
|
30
|
+
import { UpdPopoverModule } from '@updevs/components/popover';
|
|
31
|
+
import * as i5 from '@updevs/components/form-controls/input';
|
|
32
|
+
import { UpdInputModule } from '@updevs/components/form-controls/input';
|
|
33
|
+
import * as i3$2 from '@updevs/components/form-controls/select';
|
|
34
|
+
import { UpdSelectModule } from '@updevs/components/form-controls/select';
|
|
35
|
+
import { UpdTimePickerModule } from '@updevs/components/form-controls/time-picker';
|
|
36
|
+
import { UpdBadgeModule } from '@updevs/components/badge';
|
|
37
|
+
|
|
38
|
+
var ColumnTypeEnum;
|
|
39
|
+
(function (ColumnTypeEnum) {
|
|
40
|
+
ColumnTypeEnum[ColumnTypeEnum["Text"] = 1] = "Text";
|
|
41
|
+
ColumnTypeEnum[ColumnTypeEnum["DateTime"] = 2] = "DateTime";
|
|
42
|
+
ColumnTypeEnum[ColumnTypeEnum["Number"] = 3] = "Number";
|
|
43
|
+
ColumnTypeEnum[ColumnTypeEnum["Boolean"] = 4] = "Boolean";
|
|
44
|
+
ColumnTypeEnum[ColumnTypeEnum["Date"] = 5] = "Date";
|
|
45
|
+
ColumnTypeEnum[ColumnTypeEnum["Time"] = 6] = "Time";
|
|
46
|
+
ColumnTypeEnum[ColumnTypeEnum["Image"] = 7] = "Image";
|
|
47
|
+
ColumnTypeEnum[ColumnTypeEnum["Currency"] = 8] = "Currency";
|
|
48
|
+
ColumnTypeEnum[ColumnTypeEnum["Custom"] = 9] = "Custom";
|
|
49
|
+
ColumnTypeEnum[ColumnTypeEnum["Masked"] = 10] = "Masked";
|
|
50
|
+
ColumnTypeEnum[ColumnTypeEnum["Guid"] = 11] = "Guid";
|
|
51
|
+
})(ColumnTypeEnum || (ColumnTypeEnum = {}));
|
|
52
|
+
|
|
53
|
+
class BaseColumnModel {
|
|
54
|
+
get dataType() {
|
|
55
|
+
switch (this.type) {
|
|
56
|
+
case ColumnTypeEnum.Boolean:
|
|
57
|
+
return DataTypeEnum.Boolean;
|
|
58
|
+
case ColumnTypeEnum.DateTime:
|
|
59
|
+
case ColumnTypeEnum.Date:
|
|
60
|
+
case ColumnTypeEnum.Time:
|
|
61
|
+
return DataTypeEnum.Date;
|
|
62
|
+
case ColumnTypeEnum.Currency:
|
|
63
|
+
case ColumnTypeEnum.Number:
|
|
64
|
+
return DataTypeEnum.Number;
|
|
65
|
+
case ColumnTypeEnum.Guid:
|
|
66
|
+
return DataTypeEnum.Guid;
|
|
67
|
+
default:
|
|
68
|
+
return DataTypeEnum.String;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
get widthClass() {
|
|
72
|
+
if (!this.width || !!this.width.pixels) {
|
|
73
|
+
return '';
|
|
74
|
+
}
|
|
75
|
+
const prefix = !!this.width.gridColumn ? 'col' : 'w';
|
|
76
|
+
const auto = !!this.width.gridColumn && this.width.gridColumn === 0 ? 'auto' : '';
|
|
77
|
+
return `${prefix}-${auto || this.widthSize}`;
|
|
78
|
+
}
|
|
79
|
+
get widthSize() {
|
|
80
|
+
return !this.width ? 0 : this.width.gridColumn || this.width.percentage || 0;
|
|
81
|
+
}
|
|
82
|
+
get pixelsSize() {
|
|
83
|
+
return this.width?.pixels;
|
|
84
|
+
}
|
|
85
|
+
constructor(columnType, init) {
|
|
86
|
+
this.titleAlignment = 'left';
|
|
87
|
+
this.allowSort = true;
|
|
88
|
+
this.isItalic = false;
|
|
89
|
+
this.type = ColumnTypeEnum.Text;
|
|
90
|
+
this.alignment = 'left';
|
|
91
|
+
this.weight = 'normal';
|
|
92
|
+
this.overflowStrategy = 'truncate';
|
|
93
|
+
this.shouldSpaceAfterPrefix = true;
|
|
94
|
+
this.shouldSpaceBeforeSuffix = true;
|
|
95
|
+
this.isHidden = false;
|
|
96
|
+
if (!!init) {
|
|
97
|
+
Object.assign(this, init);
|
|
98
|
+
}
|
|
99
|
+
this.type = columnType;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
class FiltersOperandsService {
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
class BaseColumn {
|
|
107
|
+
constructor() {
|
|
108
|
+
this.textService = inject(TextService);
|
|
109
|
+
}
|
|
110
|
+
static { this.alignmentClassMap = {
|
|
111
|
+
justify: { text: 'text-justify', nonText: 'justify-content-between' },
|
|
112
|
+
center: { text: 'text-center', nonText: 'justify-content-center' },
|
|
113
|
+
right: { text: 'text-end', nonText: 'justify-content-end' },
|
|
114
|
+
left: { text: 'text-start', nonText: 'justify-content-start' }
|
|
115
|
+
}; }
|
|
116
|
+
static { this.overflowClassMap = {
|
|
117
|
+
'no-wrap': 'text-nowrap',
|
|
118
|
+
wrap: 'text-wrap',
|
|
119
|
+
'word-break': 'text-break',
|
|
120
|
+
truncate: 'text-truncate'
|
|
121
|
+
}; }
|
|
122
|
+
static { this.decorationClassMap = {
|
|
123
|
+
underline: 'text-decoration-underline',
|
|
124
|
+
strikethrough: 'text-decoration-line-through',
|
|
125
|
+
none: 'text-decoration-none'
|
|
126
|
+
}; }
|
|
127
|
+
static { this.weightClassMap = {
|
|
128
|
+
bold: 'fw-bold',
|
|
129
|
+
bolder: 'fw-bolder',
|
|
130
|
+
light: 'fw-light',
|
|
131
|
+
lighter: 'fw-lighter',
|
|
132
|
+
normal: 'fw-normal'
|
|
133
|
+
}; }
|
|
134
|
+
get value() {
|
|
135
|
+
return this.record[this.config.name];
|
|
136
|
+
}
|
|
137
|
+
get isTextType() {
|
|
138
|
+
return this.config.type !== ColumnTypeEnum.Boolean
|
|
139
|
+
&& this.config.type !== ColumnTypeEnum.Image
|
|
140
|
+
&& this.config.type !== ColumnTypeEnum.Custom;
|
|
141
|
+
}
|
|
142
|
+
get prefix() {
|
|
143
|
+
return this.textService.getText(this.config.prefix);
|
|
144
|
+
}
|
|
145
|
+
get suffix() {
|
|
146
|
+
return this.textService.getText(this.config.suffix);
|
|
147
|
+
}
|
|
148
|
+
get prefixSpace() {
|
|
149
|
+
return !!this.prefix && this.config.shouldSpaceAfterPrefix ? ' ' : '';
|
|
150
|
+
}
|
|
151
|
+
get suffixSpace() {
|
|
152
|
+
return !!this.suffix && this.config.shouldSpaceBeforeSuffix ? ' ' : '';
|
|
153
|
+
}
|
|
154
|
+
get alignmentClass() {
|
|
155
|
+
const map = BaseColumn.alignmentClassMap[this.config.alignment] || BaseColumn.alignmentClassMap['left'];
|
|
156
|
+
return this.isTextType ? map.text : map.nonText;
|
|
157
|
+
}
|
|
158
|
+
get overflowClass() {
|
|
159
|
+
return BaseColumn.overflowClassMap[this.config.overflowStrategy] || 'text-truncate';
|
|
160
|
+
}
|
|
161
|
+
get decorationClass() {
|
|
162
|
+
return this.config.decoration ? BaseColumn.decorationClassMap[this.config.decoration] : '';
|
|
163
|
+
}
|
|
164
|
+
get weightClass() {
|
|
165
|
+
return BaseColumn.weightClassMap[this.config.weight] || 'fw-normal';
|
|
166
|
+
}
|
|
167
|
+
getRecordAs() {
|
|
168
|
+
return this.record;
|
|
169
|
+
}
|
|
170
|
+
getClasses() {
|
|
171
|
+
return [
|
|
172
|
+
this.alignmentClass,
|
|
173
|
+
this.overflowClass,
|
|
174
|
+
this.decorationClass,
|
|
175
|
+
this.weightClass,
|
|
176
|
+
this.config.isItalic ? 'fst-italic' : ''
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseColumn, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
180
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.1.0", type: BaseColumn, ngImport: i0 }); }
|
|
181
|
+
}
|
|
182
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BaseColumn, decorators: [{
|
|
183
|
+
type: Directive
|
|
184
|
+
}] });
|
|
185
|
+
|
|
186
|
+
class TextColumnComponent extends BaseColumn {
|
|
187
|
+
getClasses() {
|
|
188
|
+
return [
|
|
189
|
+
...super.getClasses(),
|
|
190
|
+
this.transformClass
|
|
191
|
+
];
|
|
192
|
+
}
|
|
193
|
+
get transformClass() {
|
|
194
|
+
switch (this.config.transform) {
|
|
195
|
+
case 'capitalize':
|
|
196
|
+
return 'text-capitalize';
|
|
197
|
+
case 'lowercase':
|
|
198
|
+
return 'text-lowercase';
|
|
199
|
+
case 'uppercase':
|
|
200
|
+
return 'text-uppercase';
|
|
201
|
+
default:
|
|
202
|
+
return '';
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TextColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
206
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: TextColumnComponent, selector: "upd-text-column", usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value }}{{ suffixSpace }}{{ suffix }}</span>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
207
|
+
}
|
|
208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TextColumnComponent, decorators: [{
|
|
209
|
+
type: Component,
|
|
210
|
+
args: [{ selector: 'upd-text-column', template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value }}{{ suffixSpace }}{{ suffix }}</span>\n" }]
|
|
211
|
+
}] });
|
|
212
|
+
|
|
213
|
+
class NumberColumnComponent extends BaseColumn {
|
|
214
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NumberColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
215
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: NumberColumnComponent, selector: "upd-number-column", usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value | number:config.numberFormat }}{{ suffixSpace }}{{ suffix }}</span>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] }); }
|
|
216
|
+
}
|
|
217
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: NumberColumnComponent, decorators: [{
|
|
218
|
+
type: Component,
|
|
219
|
+
args: [{ selector: 'upd-number-column', template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value | number:config.numberFormat }}{{ suffixSpace }}{{ suffix }}</span>\n" }]
|
|
220
|
+
}] });
|
|
221
|
+
|
|
222
|
+
class BooleanColumnComponent extends BaseColumn {
|
|
223
|
+
getClasses() {
|
|
224
|
+
return [
|
|
225
|
+
...super.getClasses(),
|
|
226
|
+
this.colorClass
|
|
227
|
+
];
|
|
228
|
+
}
|
|
229
|
+
get colorClass() {
|
|
230
|
+
if (!this.config.shouldColorHighlight) {
|
|
231
|
+
return '';
|
|
232
|
+
}
|
|
233
|
+
return `text-${(!!this.value ? this.config.trueColor : this.config.falseColor)}`;
|
|
234
|
+
}
|
|
235
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BooleanColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
236
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: BooleanColumnComponent, selector: "upd-boolean-column", usesInheritance: true, ngImport: i0, template: "<div [ngClass]=\"getClasses()\">\n @switch (config.displayType) {\n @case ('text') {\n {{ prefix }}{{ prefixSpace }}{{ !!value ? textService.getText(config.trueText) : textService.getText(config.falseText) }}{{ suffixSpace }}{{ suffix }}\n }\n @case ('toggle') {\n {{ prefix }}{{ prefixSpace }}\n <upd-icon [tablerIcon]=\"!!value ? 'toggle-right' : 'toggle-left'\"></upd-icon>{{ suffixSpace }}{{ suffix }}\n }\n @case ('icon') {\n {{ prefix }}{{ prefixSpace }}\n <upd-icon [model]=\"!!value ? config.trueIcon : config.falseIcon\"></upd-icon>{{ suffixSpace }}{{ suffix }}\n }\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }] }); }
|
|
237
|
+
}
|
|
238
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: BooleanColumnComponent, decorators: [{
|
|
239
|
+
type: Component,
|
|
240
|
+
args: [{ selector: 'upd-boolean-column', template: "<div [ngClass]=\"getClasses()\">\n @switch (config.displayType) {\n @case ('text') {\n {{ prefix }}{{ prefixSpace }}{{ !!value ? textService.getText(config.trueText) : textService.getText(config.falseText) }}{{ suffixSpace }}{{ suffix }}\n }\n @case ('toggle') {\n {{ prefix }}{{ prefixSpace }}\n <upd-icon [tablerIcon]=\"!!value ? 'toggle-right' : 'toggle-left'\"></upd-icon>{{ suffixSpace }}{{ suffix }}\n }\n @case ('icon') {\n {{ prefix }}{{ prefixSpace }}\n <upd-icon [model]=\"!!value ? config.trueIcon : config.falseIcon\"></upd-icon>{{ suffixSpace }}{{ suffix }}\n }\n }\n</div>\n" }]
|
|
241
|
+
}] });
|
|
242
|
+
|
|
243
|
+
class DateTimeColumnComponent extends BaseColumn {
|
|
244
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DateTimeColumnComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
245
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: DateTimeColumnComponent, selector: "upd-date-time-column", usesInheritance: true, ngImport: i0, template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value | date:config.dateTimeFormat }}{{ suffixSpace }}{{ suffix }}</span>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] }); }
|
|
246
|
+
}
|
|
247
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DateTimeColumnComponent, decorators: [{
|
|
248
|
+
type: Component,
|
|
249
|
+
args: [{ selector: 'upd-date-time-column', template: "<span [ngClass]=\"getClasses()\">{{ prefix }}{{ prefixSpace }}{{ value | date:config.dateTimeFormat }}{{ suffixSpace }}{{ suffix }}</span>\n" }]
|
|
250
|
+
}] });
|
|
251
|
+
|
|
252
|
+
class TableColumnDirective {
|
|
253
|
+
constructor() {
|
|
254
|
+
this.record = input.required();
|
|
255
|
+
this.config = input.required();
|
|
256
|
+
this.viewContainerRef = inject(ViewContainerRef);
|
|
257
|
+
this.dynamicLoaderService = inject(DynamicComponentLoaderService);
|
|
258
|
+
effect(() => {
|
|
259
|
+
const component = this.dynamicLoaderService.load(this.getComponentType(), this.viewContainerRef);
|
|
260
|
+
component.instance.record = this.record();
|
|
261
|
+
component.instance.config = this.config();
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
getComponentType() {
|
|
265
|
+
switch (this.config().type) {
|
|
266
|
+
case ColumnTypeEnum.Text:
|
|
267
|
+
// @ts-ignore
|
|
268
|
+
return TextColumnComponent;
|
|
269
|
+
case ColumnTypeEnum.Number:
|
|
270
|
+
// @ts-ignore
|
|
271
|
+
return NumberColumnComponent;
|
|
272
|
+
case ColumnTypeEnum.Boolean:
|
|
273
|
+
// @ts-ignore
|
|
274
|
+
return BooleanColumnComponent;
|
|
275
|
+
case ColumnTypeEnum.Date:
|
|
276
|
+
case ColumnTypeEnum.DateTime:
|
|
277
|
+
// @ts-ignore
|
|
278
|
+
return DateTimeColumnComponent;
|
|
279
|
+
case ColumnTypeEnum.Guid:
|
|
280
|
+
// @ts-ignore
|
|
281
|
+
return TextColumnComponent;
|
|
282
|
+
default:
|
|
283
|
+
throw Error();
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
287
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.1.0", type: TableColumnDirective, selector: "[updTableColumn]", inputs: { record: { classPropertyName: "record", publicName: "record", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
|
|
288
|
+
}
|
|
289
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableColumnDirective, decorators: [{
|
|
290
|
+
type: Directive,
|
|
291
|
+
args: [{
|
|
292
|
+
selector: '[updTableColumn]'
|
|
293
|
+
}]
|
|
294
|
+
}], ctorParameters: () => [] });
|
|
295
|
+
|
|
296
|
+
class BooleanColumnModel extends BaseColumnModel {
|
|
297
|
+
constructor(init) {
|
|
298
|
+
super(ColumnTypeEnum.Boolean, init);
|
|
299
|
+
this.displayType = 'text';
|
|
300
|
+
this.trueText = { text: 'UpDevs.Table.Filters.Boolean.True', isTranslated: false };
|
|
301
|
+
this.falseText = { text: 'UpDevs.Table.Filters.Boolean.False', isTranslated: false };
|
|
302
|
+
this.trueIcon = { tablerIcon: 'square-check' };
|
|
303
|
+
this.falseIcon = { tablerIcon: 'square' };
|
|
304
|
+
this.trueColor = 'success';
|
|
305
|
+
this.falseColor = 'secondary';
|
|
306
|
+
this.shouldColorHighlight = true;
|
|
307
|
+
if (this.displayType !== 'text') {
|
|
308
|
+
this.alignment = 'center';
|
|
309
|
+
}
|
|
310
|
+
if (!!init) {
|
|
311
|
+
Object.assign(this, init);
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
class DateTimeColumnModel extends BaseColumnModel {
|
|
317
|
+
get dateTimeFormat() {
|
|
318
|
+
return this.customFormat || this.format;
|
|
319
|
+
}
|
|
320
|
+
constructor(init) {
|
|
321
|
+
super(ColumnTypeEnum.DateTime, init);
|
|
322
|
+
this.format = DateTimeFormatEnum.ShortDate;
|
|
323
|
+
if (!!init) {
|
|
324
|
+
Object.assign(this, init);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
class TextColumnModel extends BaseColumnModel {
|
|
330
|
+
constructor(init) {
|
|
331
|
+
super(ColumnTypeEnum.Text, init);
|
|
332
|
+
if (!!init) {
|
|
333
|
+
Object.assign(this, init);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
class GuidColumnModel extends TextColumnModel {
|
|
339
|
+
constructor(init) {
|
|
340
|
+
super(init);
|
|
341
|
+
this.transform = 'uppercase';
|
|
342
|
+
if (!!init) {
|
|
343
|
+
Object.assign(this, init);
|
|
344
|
+
}
|
|
345
|
+
this.type = ColumnTypeEnum.Guid;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
class ImageColumnModel extends BaseColumnModel {
|
|
350
|
+
constructor(init) {
|
|
351
|
+
super(ColumnTypeEnum.Image, init);
|
|
352
|
+
if (!!init) {
|
|
353
|
+
Object.assign(this, init);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
class NumberColumnModel extends BaseColumnModel {
|
|
359
|
+
get numberFormat() {
|
|
360
|
+
return `${this.minIntegerDigits}.${this.minFractionDigits}-${this.maxFractionDigits}`;
|
|
361
|
+
}
|
|
362
|
+
constructor(init) {
|
|
363
|
+
super(ColumnTypeEnum.Number, init);
|
|
364
|
+
this.minIntegerDigits = 1;
|
|
365
|
+
this.minFractionDigits = 0;
|
|
366
|
+
this.maxFractionDigits = 3;
|
|
367
|
+
if (!!init) {
|
|
368
|
+
Object.assign(this, init);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
class TableConfigModel {
|
|
374
|
+
constructor(init) {
|
|
375
|
+
this.columns = [];
|
|
376
|
+
this.canSearch = true;
|
|
377
|
+
this.canSaveViews = true;
|
|
378
|
+
this.canLoadSavedViews = true;
|
|
379
|
+
this.canManageColumns = true;
|
|
380
|
+
this.shouldAutoSearch = true;
|
|
381
|
+
this.hasCheckboxColumn = true;
|
|
382
|
+
this.isResponsive = true;
|
|
383
|
+
this.hasStickyHeader = false;
|
|
384
|
+
this.data = [];
|
|
385
|
+
this.preSelectedItems = [];
|
|
386
|
+
this.searchInputDebounceTime = 300;
|
|
387
|
+
/**
|
|
388
|
+
* Actions added to each record row as a group of buttons.
|
|
389
|
+
*/
|
|
390
|
+
this.customActions = [];
|
|
391
|
+
/**
|
|
392
|
+
* Actions added to the header of the table as regular buttons.
|
|
393
|
+
*/
|
|
394
|
+
this.customHeaderActions = [];
|
|
395
|
+
this.getIdFunction = (item) => item.id;
|
|
396
|
+
if (!!init) {
|
|
397
|
+
Object.assign(this, init);
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
class ColumnsManagerComponent extends BaseModal {
|
|
403
|
+
constructor() {
|
|
404
|
+
super(...arguments);
|
|
405
|
+
this.config = computed(() => ({ columns: [this.visibleColumn(), this.hiddenColumn()], canReorder: true }));
|
|
406
|
+
this.columns = signal([]);
|
|
407
|
+
this.visibleColumn = computed(() => ({
|
|
408
|
+
name: 'visible',
|
|
409
|
+
title: { text: 'UpDevs.Table.VisibleColumns', isTranslated: false },
|
|
410
|
+
canBeEmpty: false,
|
|
411
|
+
items: this.data().columns.filter(c => !c.isHidden).map(c => ({
|
|
412
|
+
name: c.name,
|
|
413
|
+
text: c.title || { text: 'UpDevs.Table.ColumnTitleNotSet', isTranslated: false }
|
|
414
|
+
}))
|
|
415
|
+
}));
|
|
416
|
+
this.hiddenColumn = computed(() => ({
|
|
417
|
+
name: 'hidden',
|
|
418
|
+
title: { text: 'UpDevs.Table.HiddenColumns', isTranslated: false },
|
|
419
|
+
items: this.data().columns.filter(c => c.isHidden).map(c => ({
|
|
420
|
+
name: c.name,
|
|
421
|
+
text: c.title || { text: 'UpDevs.Table.ColumnTitleNotSet', isTranslated: false }
|
|
422
|
+
}))
|
|
423
|
+
}));
|
|
424
|
+
}
|
|
425
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ColumnsManagerComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
426
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.0", type: ColumnsManagerComponent, selector: "upd-columns-manager", usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table.ColumnsManager'\">\n <upd-drag-and-drop [config]=\"config()\" [(columns)]=\"columns\"></upd-drag-and-drop>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i2.DragAndDropComponent, selector: "upd-drag-and-drop", inputs: ["config", "columns"], outputs: ["columnsChange"] }] }); }
|
|
427
|
+
}
|
|
428
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: ColumnsManagerComponent, decorators: [{
|
|
429
|
+
type: Component,
|
|
430
|
+
args: [{ selector: 'upd-columns-manager', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table.ColumnsManager'\">\n <upd-drag-and-drop [config]=\"config()\" [(columns)]=\"columns\"></upd-drag-and-drop>\n</ng-container>\n" }]
|
|
431
|
+
}] });
|
|
432
|
+
|
|
433
|
+
class SavedViewsStorage extends BaseByUserSignalStorage {
|
|
434
|
+
constructor() {
|
|
435
|
+
super('saved-views');
|
|
436
|
+
this.lastStateKey = 'last-state';
|
|
437
|
+
}
|
|
438
|
+
saveView(data) {
|
|
439
|
+
data.id = data.id || Tools.Guid.generate();
|
|
440
|
+
data.userId = this._loggedUserId;
|
|
441
|
+
this.save(data, this._getUserKey(data.id, data.tableName));
|
|
442
|
+
}
|
|
443
|
+
saveLastState(data) {
|
|
444
|
+
data.id = this.lastStateKey;
|
|
445
|
+
this.saveView(data);
|
|
446
|
+
}
|
|
447
|
+
getById(tableName, id) {
|
|
448
|
+
return this.get(this._getUserKey(id, tableName));
|
|
449
|
+
}
|
|
450
|
+
getAll(tableName) {
|
|
451
|
+
return computed(() => {
|
|
452
|
+
const records = this.getAllItems();
|
|
453
|
+
return records().filter(sv => sv.tableName.toLowerCase() === tableName.toLowerCase()
|
|
454
|
+
&& sv.userId === this._loggedUserId
|
|
455
|
+
&& sv.id !== this.lastStateKey);
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
getLastState(tableName) {
|
|
459
|
+
return this.getById(tableName, this.lastStateKey);
|
|
460
|
+
}
|
|
461
|
+
resetAllIsDefault(tableName) {
|
|
462
|
+
const savedViews = this.getAll(tableName)();
|
|
463
|
+
savedViews.forEach(sv => {
|
|
464
|
+
sv.isDefault = false;
|
|
465
|
+
this.saveView(sv);
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
removeViews(tableName, ...keys) {
|
|
469
|
+
super.remove(...keys.map(k => this._getUserKey(k, tableName)));
|
|
470
|
+
}
|
|
471
|
+
getByName(tableName, name) {
|
|
472
|
+
const records = this.getAllItems();
|
|
473
|
+
return records().find(sv => sv.tableName.toLowerCase() === tableName.toLowerCase()
|
|
474
|
+
&& sv.userId === this._loggedUserId
|
|
475
|
+
&& sv.name?.toLowerCase() === name?.toLowerCase()
|
|
476
|
+
&& sv.id !== this.lastStateKey);
|
|
477
|
+
}
|
|
478
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SavedViewsStorage, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
479
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SavedViewsStorage }); }
|
|
480
|
+
}
|
|
481
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SavedViewsStorage, decorators: [{
|
|
482
|
+
type: Injectable
|
|
483
|
+
}], ctorParameters: () => [] });
|
|
484
|
+
|
|
485
|
+
class SaveSearchComponent extends BaseModal {
|
|
486
|
+
constructor() {
|
|
487
|
+
super(...arguments);
|
|
488
|
+
this.formGroup = model(new FormGroup({}));
|
|
489
|
+
this.formRows = [];
|
|
490
|
+
this.savedViewsStorage = inject(SavedViewsStorage);
|
|
491
|
+
this.uniqueNameValidator = () => (control) => {
|
|
492
|
+
const existingRecord = this.savedViewsStorage.getByName(this.data().tableName, control.value);
|
|
493
|
+
return !!existingRecord
|
|
494
|
+
? { nameNotUnique: { errorText: { text: 'UpDevs.Table.SavedViews.NameNotUnique', isTranslated: false } } }
|
|
495
|
+
// eslint-disable-next-line no-null/no-null
|
|
496
|
+
: null;
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
ngOnInit() {
|
|
500
|
+
this.formRows = [
|
|
501
|
+
{
|
|
502
|
+
fields: [
|
|
503
|
+
{
|
|
504
|
+
name: 'name',
|
|
505
|
+
type: DynamicFieldType.Input,
|
|
506
|
+
colSize: { default: 12 },
|
|
507
|
+
label: { text: 'UpDevs.Table.SaveSearch.Name', isTranslated: false },
|
|
508
|
+
validators: [Validators.required, Validators.minLength(3), this.uniqueNameValidator()],
|
|
509
|
+
initValue: this.data().name
|
|
510
|
+
}
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
fields: [
|
|
515
|
+
{
|
|
516
|
+
name: 'isDefault',
|
|
517
|
+
type: DynamicFieldType.Checkbox,
|
|
518
|
+
colSize: { default: 6 },
|
|
519
|
+
label: { text: 'UpDevs.Table.SaveSearch.IsDefault', isTranslated: false },
|
|
520
|
+
hint: { text: 'UpDevs.Table.SaveSearch.IsDefaultHint', isTranslated: false },
|
|
521
|
+
hintAsTooltip: true,
|
|
522
|
+
initValue: this.data().isDefault || false
|
|
523
|
+
}
|
|
524
|
+
]
|
|
525
|
+
}
|
|
526
|
+
];
|
|
527
|
+
}
|
|
528
|
+
cancel() {
|
|
529
|
+
this.modalRef().close();
|
|
530
|
+
}
|
|
531
|
+
save() {
|
|
532
|
+
const formValue = this.formGroup().value;
|
|
533
|
+
const data = { ...this.data(), name: formValue.name, isDefault: formValue.isDefault };
|
|
534
|
+
if (data.isDefault) {
|
|
535
|
+
this.savedViewsStorage.resetAllIsDefault(this.data().tableName);
|
|
536
|
+
}
|
|
537
|
+
this.savedViewsStorage.saveView(data);
|
|
538
|
+
this.modalRef().close();
|
|
539
|
+
}
|
|
540
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SaveSearchComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
541
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.1.0", type: SaveSearchComponent, selector: "upd-save-search", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { formGroup: "formGroupChange" }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table.SaveSearch'\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">{{ t('Title') }}</h5>\n </div>\n <div class=\"modal-body py-4\">\n <upd-form [rows]=\"formRows\" [hasActionsSection]=\"false\" [(formGroup)]=\"formGroup\"></upd-form>\n </div>\n <div class=\"modal-footer\">\n <upd-button colorStyle=\"secondary\" [isLink]=\"true\" (clicked)=\"cancel()\">\n {{ t('Cancel') }}\n </upd-button>\n <upd-button colorStyle=\"primary\" [iconModel]=\"{tablerIcon:'device-floppy'}\" (clicked)=\"save()\" [isDisabled]=\"!formGroup().valid\">\n {{ t('Save') }}\n </upd-button>\n </div>\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i4.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: i3$1.FormComponent, selector: "upd-form", inputs: ["rows", "layout", "title", "hasActionsSection", "isCard", "isDisabled", "isLoading", "isSaving", "formData", "formGroup"], outputs: ["initialized", "dataLoaded", "submitted", "formDataChange", "formGroupChange"] }] }); }
|
|
542
|
+
}
|
|
543
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SaveSearchComponent, decorators: [{
|
|
544
|
+
type: Component,
|
|
545
|
+
args: [{ selector: 'upd-save-search', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table.SaveSearch'\">\n <div class=\"modal-header\">\n <h5 class=\"modal-title\">{{ t('Title') }}</h5>\n </div>\n <div class=\"modal-body py-4\">\n <upd-form [rows]=\"formRows\" [hasActionsSection]=\"false\" [(formGroup)]=\"formGroup\"></upd-form>\n </div>\n <div class=\"modal-footer\">\n <upd-button colorStyle=\"secondary\" [isLink]=\"true\" (clicked)=\"cancel()\">\n {{ t('Cancel') }}\n </upd-button>\n <upd-button colorStyle=\"primary\" [iconModel]=\"{tablerIcon:'device-floppy'}\" (clicked)=\"save()\" [isDisabled]=\"!formGroup().valid\">\n {{ t('Save') }}\n </upd-button>\n </div>\n</ng-container>\n" }]
|
|
546
|
+
}] });
|
|
547
|
+
|
|
548
|
+
class FilterTools {
|
|
549
|
+
static convertToFilterItem(filters, operands) {
|
|
550
|
+
return filters.map(f => ({
|
|
551
|
+
name: f.column,
|
|
552
|
+
value: f.value,
|
|
553
|
+
operandConfig: operands[f.dataType].find(op => op.operand === f.operand)
|
|
554
|
+
}));
|
|
555
|
+
}
|
|
556
|
+
static convertToRequestFilter(filters, columns) {
|
|
557
|
+
return filters.map(af => {
|
|
558
|
+
const col = columns.find(c => c.name === af.name);
|
|
559
|
+
switch (col?.dataType) {
|
|
560
|
+
case DataTypeEnum.Boolean:
|
|
561
|
+
return new BooleanColumnFilter({
|
|
562
|
+
column: af.name,
|
|
563
|
+
value: af.value,
|
|
564
|
+
operand: !!af.operandConfig ? af.operandConfig.operand : undefined
|
|
565
|
+
});
|
|
566
|
+
case DataTypeEnum.Date:
|
|
567
|
+
return new DateColumnFilter({
|
|
568
|
+
column: af.name,
|
|
569
|
+
value: af.value,
|
|
570
|
+
operand: !!af.operandConfig ? af.operandConfig.operand : undefined
|
|
571
|
+
});
|
|
572
|
+
case DataTypeEnum.Number:
|
|
573
|
+
return new NumberColumnFilter({
|
|
574
|
+
column: af.name,
|
|
575
|
+
value: af.value,
|
|
576
|
+
operand: !!af.operandConfig ? af.operandConfig.operand : undefined
|
|
577
|
+
});
|
|
578
|
+
case DataTypeEnum.Guid:
|
|
579
|
+
return new GuidColumnFilter({
|
|
580
|
+
column: af.name,
|
|
581
|
+
value: af.value,
|
|
582
|
+
operand: !!af.operandConfig ? af.operandConfig.operand : undefined
|
|
583
|
+
});
|
|
584
|
+
default:
|
|
585
|
+
return new StringColumnFilter({
|
|
586
|
+
column: af.name,
|
|
587
|
+
value: af.value,
|
|
588
|
+
operand: !!af.operandConfig ? af.operandConfig.operand : undefined
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Table constants.
|
|
597
|
+
*/
|
|
598
|
+
class TableConstants {
|
|
599
|
+
/**
|
|
600
|
+
* Key to inject the default configuration.
|
|
601
|
+
*/
|
|
602
|
+
static { this.defaultOptionsKey = 'upd-table-default-options'; }
|
|
603
|
+
/**
|
|
604
|
+
* Injection token for the default configuration.
|
|
605
|
+
*/
|
|
606
|
+
static { this.defaultOptionsInjectionToken = new InjectionToken(TableConstants.defaultOptionsKey); }
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
class UpdTableConfigModel {
|
|
610
|
+
constructor(init) {
|
|
611
|
+
this.shouldLoadFieldsFromServer = false;
|
|
612
|
+
if (!!init) {
|
|
613
|
+
Object.assign(this, init);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
class UpdTableConfigService {
|
|
619
|
+
constructor(layoutConfig) {
|
|
620
|
+
this.config = new UpdTableConfigModel(layoutConfig);
|
|
621
|
+
}
|
|
622
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableConfigService, deps: [{ token: TableConstants.defaultOptionsInjectionToken }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
623
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableConfigService }); }
|
|
624
|
+
}
|
|
625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableConfigService, decorators: [{
|
|
626
|
+
type: Injectable
|
|
627
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
628
|
+
type: Inject,
|
|
629
|
+
args: [TableConstants.defaultOptionsInjectionToken]
|
|
630
|
+
}] }] });
|
|
631
|
+
|
|
632
|
+
class FilterRowComponent extends BaseComponent {
|
|
633
|
+
constructor() {
|
|
634
|
+
super(...arguments);
|
|
635
|
+
this.wrapperClasses = 'd-flex gap-2';
|
|
636
|
+
this.removed = new EventEmitter();
|
|
637
|
+
this.DataTypeEnum = DataTypeEnum;
|
|
638
|
+
this.activeFilters = model.required();
|
|
639
|
+
this.rowIndex = input.required();
|
|
640
|
+
this.columns = input.required();
|
|
641
|
+
this.isDisabled = input.required();
|
|
642
|
+
this.store = input();
|
|
643
|
+
this.currentFilter = input();
|
|
644
|
+
this.currentField = signal(undefined);
|
|
645
|
+
this.currentOperand = signal(undefined);
|
|
646
|
+
this.fieldsOptions = signal([]);
|
|
647
|
+
this.comparisonOperatorOptions = signal([]);
|
|
648
|
+
this.isValueSectionEnabled = signal(true);
|
|
649
|
+
this.currentOperands = [];
|
|
650
|
+
this.configService = inject(UpdTableConfigService);
|
|
651
|
+
this.filtersOperandsService = inject(FiltersOperandsService);
|
|
652
|
+
this.textService = inject(TextService);
|
|
653
|
+
}
|
|
654
|
+
get fieldType() {
|
|
655
|
+
return this.currentField()?.objectData || DataTypeEnum.String;
|
|
656
|
+
}
|
|
657
|
+
get selectedField() {
|
|
658
|
+
const currentFilter = this.currentFilter();
|
|
659
|
+
return !!currentFilter?.name
|
|
660
|
+
? this.fieldsOptions().find(f => f.value === currentFilter.name)
|
|
661
|
+
: undefined;
|
|
662
|
+
}
|
|
663
|
+
get selectedOperand() {
|
|
664
|
+
const currentFilter = this.currentFilter();
|
|
665
|
+
return !!currentFilter?.name
|
|
666
|
+
? this.comparisonOperatorOptions().find(co => co.value === currentFilter.operandConfig?.operand)
|
|
667
|
+
: undefined;
|
|
668
|
+
}
|
|
669
|
+
get selectedValue() {
|
|
670
|
+
const currentFilter = this.currentFilter();
|
|
671
|
+
return !!currentFilter?.name ? currentFilter.value : undefined;
|
|
672
|
+
}
|
|
673
|
+
ngOnInit() {
|
|
674
|
+
if (!!this.store() && this.configService.config.shouldLoadFieldsFromServer) {
|
|
675
|
+
this.store().getFilterableFields().subscribe(fields => this.fieldsOptions.set(fields.map(f => ({ value: f.name, text: f.description, objectData: f.type }))));
|
|
676
|
+
}
|
|
677
|
+
else {
|
|
678
|
+
this.fieldsOptions.set(this.columns().filter(c => !!c.title).map(c => ({ value: c.name, text: this.textService.getText(c.title), objectData: c.dataType })));
|
|
679
|
+
}
|
|
680
|
+
if (!!this.selectedField) {
|
|
681
|
+
if (!!this.selectedOperand) {
|
|
682
|
+
this.onSelectOperand(this.selectedOperand);
|
|
683
|
+
}
|
|
684
|
+
this.onSelectField(this.selectedField);
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
onSelectField(item) {
|
|
688
|
+
this.currentField.set(item);
|
|
689
|
+
const dataType = item?.objectData;
|
|
690
|
+
if (!!dataType) {
|
|
691
|
+
this.currentOperands = this.filtersOperandsService.getOperands(dataType);
|
|
692
|
+
this.comparisonOperatorOptions.set(this.currentOperands.map(o => ({ value: o.operand, text: this.textService.getText(o.text), listItem: { icon: o.icon } })));
|
|
693
|
+
}
|
|
694
|
+
else {
|
|
695
|
+
this.comparisonOperatorOptions.set([]);
|
|
696
|
+
}
|
|
697
|
+
this.activeFilters.update(curr => {
|
|
698
|
+
curr[this.rowIndex()].name = this.currentField()?.value;
|
|
699
|
+
return [...curr];
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
onSelectOperand(item) {
|
|
703
|
+
this.currentOperand.set(this.currentOperands.find(co => co.operand === item?.value));
|
|
704
|
+
this.isValueSectionEnabled.set(!!this.currentOperand()?.requiresValue);
|
|
705
|
+
this.activeFilters.update(curr => {
|
|
706
|
+
curr[this.rowIndex()].operandConfig = this.currentOperand();
|
|
707
|
+
return [...curr];
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
updateValue(value) {
|
|
711
|
+
this.activeFilters.update(curr => {
|
|
712
|
+
curr[this.rowIndex()].value = value;
|
|
713
|
+
return [...curr];
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
removeFilterItem() {
|
|
717
|
+
this.activeFilters.update(curr => {
|
|
718
|
+
curr.splice(this.rowIndex(), 1);
|
|
719
|
+
return [...curr];
|
|
720
|
+
});
|
|
721
|
+
this.removed.emit();
|
|
722
|
+
}
|
|
723
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FilterRowComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
724
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: FilterRowComponent, selector: "upd-filter-row", inputs: { activeFilters: { classPropertyName: "activeFilters", publicName: "activeFilters", isSignal: true, isRequired: true, transformFunction: null }, rowIndex: { classPropertyName: "rowIndex", publicName: "rowIndex", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: true, transformFunction: null }, store: { classPropertyName: "store", publicName: "store", isSignal: true, isRequired: false, transformFunction: null }, currentFilter: { classPropertyName: "currentFilter", publicName: "currentFilter", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { removed: "removed", activeFilters: "activeFiltersChange" }, host: { properties: { "class": "this.wrapperClasses" } }, usesInheritance: true, ngImport: i0, template: "<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"fieldsOptions()\" (selectedItem)=\"onSelectField($event)\"\n [selected]=\"selectedField\">\n</upd-select>\n<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"comparisonOperatorOptions()\" (selectedItem)=\"onSelectOperand($event)\"\n [selected]=\"selectedOperand\">\n</upd-select>\n\n@if (isValueSectionEnabled()) {\n @switch (fieldType) {\n @case (DataTypeEnum.Number) {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"number\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n @case (DataTypeEnum.Date) {\n\n }\n @default {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"text\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n }\n} @else {\n <div class=\"w-100\">\n <input type=\"text\" class=\"form-control h-100\" disabled>\n </div>\n}\n\n<upd-button class=\"flex-shrink-1\" colorStyle=\"danger\" [isDisabled]=\"isDisabled()\" [isOutline]=\"true\" [isIcon]=\"true\"\n [iconModel]=\"{tablerIcon:'x'}\" (clicked)=\"removeFilterItem()\"></upd-button>\n", styles: [""], dependencies: [{ kind: "component", type: i4.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: i5.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: "component", type: i3$2.SelectComponent, selector: "upd-select", inputs: ["useSystemStyle", "shouldShowClearButton", "shouldTruncateSelectedText", "isCompact", "selected"], outputs: ["selectedItem"] }] }); }
|
|
725
|
+
}
|
|
726
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FilterRowComponent, decorators: [{
|
|
727
|
+
type: Component,
|
|
728
|
+
args: [{ selector: 'upd-filter-row', template: "<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"fieldsOptions()\" (selectedItem)=\"onSelectField($event)\"\n [selected]=\"selectedField\">\n</upd-select>\n<upd-select class=\"w-100\" [isDisabled]=\"isDisabled()\" [items]=\"comparisonOperatorOptions()\" (selectedItem)=\"onSelectOperand($event)\"\n [selected]=\"selectedOperand\">\n</upd-select>\n\n@if (isValueSectionEnabled()) {\n @switch (fieldType) {\n @case (DataTypeEnum.Number) {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"number\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n @case (DataTypeEnum.Date) {\n\n }\n @default {\n <upd-input wrapperClasses=\"w-100\" customClasses=\"h-100\" type=\"text\" (valueChange)=\"updateValue($event)\"\n [value]=\"selectedValue\"></upd-input>\n }\n }\n} @else {\n <div class=\"w-100\">\n <input type=\"text\" class=\"form-control h-100\" disabled>\n </div>\n}\n\n<upd-button class=\"flex-shrink-1\" colorStyle=\"danger\" [isDisabled]=\"isDisabled()\" [isOutline]=\"true\" [isIcon]=\"true\"\n [iconModel]=\"{tablerIcon:'x'}\" (clicked)=\"removeFilterItem()\"></upd-button>\n" }]
|
|
729
|
+
}], propDecorators: { wrapperClasses: [{
|
|
730
|
+
type: HostBinding,
|
|
731
|
+
args: ['class']
|
|
732
|
+
}], removed: [{
|
|
733
|
+
type: Output
|
|
734
|
+
}] } });
|
|
735
|
+
|
|
736
|
+
class SearchSectionComponent extends BaseComponent {
|
|
737
|
+
constructor() {
|
|
738
|
+
super();
|
|
739
|
+
this.wrapperClass = 'card-body border-bottom py-3 d-flex flex-column gap-2';
|
|
740
|
+
this.searchRequest = model.required();
|
|
741
|
+
this.hasChanges = model.required();
|
|
742
|
+
this.columns = input.required();
|
|
743
|
+
this.isSearching = input.required();
|
|
744
|
+
this.searchRequestSubject = input.required();
|
|
745
|
+
this.config = input.required();
|
|
746
|
+
this.actionsTpl = input();
|
|
747
|
+
this.activeFilters = signal([]);
|
|
748
|
+
this.isFilterSectionOpen = signal(false);
|
|
749
|
+
this.canApplyFilters = computed(() => this.activeFilters().length > 0
|
|
750
|
+
&& this.activeFilters().every(af => !!af.name && !!af.operandConfig?.operand && (!af.operandConfig?.requiresValue || !!af.value)));
|
|
751
|
+
this.canPerformActions = computed(() => this.canApplyFilters() && !this.isSearching());
|
|
752
|
+
this.badgeConfig = computed(() => (this.searchRequest().filters?.length || 0) > 0
|
|
753
|
+
? ({
|
|
754
|
+
isNotification: true,
|
|
755
|
+
isPill: true,
|
|
756
|
+
bgColor: 'primary-lt',
|
|
757
|
+
text: { text: this.searchRequest().filters.length.toString(), isTranslated: true }
|
|
758
|
+
})
|
|
759
|
+
: undefined);
|
|
760
|
+
this.filterSectionBtnColor = computed(() => this.isFilterSectionOpen() ? 'primary' : undefined);
|
|
761
|
+
this.searchSubject = new Subject();
|
|
762
|
+
this.filtersOperandsService = inject(FiltersOperandsService);
|
|
763
|
+
effect(() => {
|
|
764
|
+
if ((this.searchRequest().filters?.length || 0) > 0) {
|
|
765
|
+
this.activeFilters.set([...FilterTools.convertToFilterItem(this.searchRequest().filters || [], this.filtersOperandsService.getAllOperands())]);
|
|
766
|
+
}
|
|
767
|
+
else {
|
|
768
|
+
this.activeFilters.set([]);
|
|
769
|
+
this.isFilterSectionOpen.set(false);
|
|
770
|
+
}
|
|
771
|
+
}, { allowSignalWrites: true });
|
|
772
|
+
}
|
|
773
|
+
ngOnInit() {
|
|
774
|
+
const searchSub = this.searchSubject
|
|
775
|
+
.pipe(distinctUntilChanged(), debounceTime(this.config().searchInputDebounceTime))
|
|
776
|
+
.subscribe(term => this.searchRequestSubject().next({
|
|
777
|
+
...this.searchRequest(),
|
|
778
|
+
description: term
|
|
779
|
+
}));
|
|
780
|
+
this.addSubscriptions(searchSub);
|
|
781
|
+
}
|
|
782
|
+
search() {
|
|
783
|
+
this.searchRequestSubject().next({
|
|
784
|
+
...this.searchRequest(),
|
|
785
|
+
filters: FilterTools.convertToRequestFilter(this.activeFilters(), this.config().columns)
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
toggleFilterSection() {
|
|
789
|
+
if (this.activeFilters().length === 0) {
|
|
790
|
+
this.addEmptyFilterRow();
|
|
791
|
+
}
|
|
792
|
+
this.isFilterSectionOpen.update(isOpen => !isOpen);
|
|
793
|
+
}
|
|
794
|
+
onRowRemoved() {
|
|
795
|
+
if (this.activeFilters().length === 0) {
|
|
796
|
+
this.isFilterSectionOpen.set(false);
|
|
797
|
+
}
|
|
798
|
+
this.search();
|
|
799
|
+
}
|
|
800
|
+
addEmptyFilterRow() {
|
|
801
|
+
this.activeFilters.update(curr => {
|
|
802
|
+
curr.push({});
|
|
803
|
+
return [...curr];
|
|
804
|
+
});
|
|
805
|
+
}
|
|
806
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SearchSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
807
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: SearchSectionComponent, selector: "upd-search-section", inputs: { searchRequest: { classPropertyName: "searchRequest", publicName: "searchRequest", isSignal: true, isRequired: true, transformFunction: null }, hasChanges: { classPropertyName: "hasChanges", publicName: "hasChanges", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: true, transformFunction: null }, isSearching: { classPropertyName: "isSearching", publicName: "isSearching", isSignal: true, isRequired: true, transformFunction: null }, searchRequestSubject: { classPropertyName: "searchRequestSubject", publicName: "searchRequestSubject", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, actionsTpl: { classPropertyName: "actionsTpl", publicName: "actionsTpl", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchRequest: "searchRequestChange", hasChanges: "hasChangesChange" }, host: { properties: { "class": "this.wrapperClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n @if (!!actionsTpl()) {\n <ng-template [ngTemplateOutlet]=\"actionsTpl()!\"></ng-template>\n }\n\n <div class=\"d-flex align-items-center gap-2\">\n <upd-input wrapperClasses=\"w-100\" [placeholder]=\"{text:'UpDevs.Table.Search', isTranslated:false}\" [isAppendButton]=\"true\"\n (valueChange)=\"searchSubject.next($event)\" [value]=\"searchRequest().description\">\n <ng-template updInputAppend>\n <upd-button [isIcon]=\"true\" [colorStyle]=\"filterSectionBtnColor()\" (clicked)=\"toggleFilterSection()\"\n [badgeConfig]=\"badgeConfig()\">\n <upd-icon [tablerIcon]=\"isFilterSectionOpen() ? 'filter-up' : 'filter-down'\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n </ng-template>\n </upd-input>\n </div>\n\n @if (isFilterSectionOpen()) {\n @for (row of activeFilters(); track row; let i = $index) {\n <upd-filter-row [store]=\"config().store\" [currentFilter]=\"row\" [(activeFilters)]=\"activeFilters\" [columns]=\"columns()\"\n [rowIndex]=\"i\" (removed)=\"onRowRemoved()\" [isDisabled]=\"isSearching()\">\n </upd-filter-row>\n }\n\n <div class=\"ms-auto d-flex gap-2\">\n <upd-button customClasses=\"gap-2\" colorStyle=\"primary\" [isOutline]=\"true\" (clicked)=\"addEmptyFilterRow()\"\n [isDisabled]=\"!canPerformActions()\">\n <upd-icon tablerIcon=\"plus\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('AddNewFilter') }}\n </upd-button>\n <upd-button customClasses=\"gap-2\" colorStyle=\"success\" [isDisabled]=\"!canPerformActions()\" (clicked)=\"search()\">\n <upd-icon tablerIcon=\"checks\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ApplyFilters') }}\n </upd-button>\n </div>\n }\n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.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: i5.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: i5.InputAppendDirective, selector: "ng-template[updInputAppend]" }, { kind: "component", type: FilterRowComponent, selector: "upd-filter-row", inputs: ["activeFilters", "rowIndex", "columns", "isDisabled", "store", "currentFilter"], outputs: ["removed", "activeFiltersChange"] }] }); }
|
|
808
|
+
}
|
|
809
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: SearchSectionComponent, decorators: [{
|
|
810
|
+
type: Component,
|
|
811
|
+
args: [{ selector: 'upd-search-section', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n @if (!!actionsTpl()) {\n <ng-template [ngTemplateOutlet]=\"actionsTpl()!\"></ng-template>\n }\n\n <div class=\"d-flex align-items-center gap-2\">\n <upd-input wrapperClasses=\"w-100\" [placeholder]=\"{text:'UpDevs.Table.Search', isTranslated:false}\" [isAppendButton]=\"true\"\n (valueChange)=\"searchSubject.next($event)\" [value]=\"searchRequest().description\">\n <ng-template updInputAppend>\n <upd-button [isIcon]=\"true\" [colorStyle]=\"filterSectionBtnColor()\" (clicked)=\"toggleFilterSection()\"\n [badgeConfig]=\"badgeConfig()\">\n <upd-icon [tablerIcon]=\"isFilterSectionOpen() ? 'filter-up' : 'filter-down'\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n </ng-template>\n </upd-input>\n </div>\n\n @if (isFilterSectionOpen()) {\n @for (row of activeFilters(); track row; let i = $index) {\n <upd-filter-row [store]=\"config().store\" [currentFilter]=\"row\" [(activeFilters)]=\"activeFilters\" [columns]=\"columns()\"\n [rowIndex]=\"i\" (removed)=\"onRowRemoved()\" [isDisabled]=\"isSearching()\">\n </upd-filter-row>\n }\n\n <div class=\"ms-auto d-flex gap-2\">\n <upd-button customClasses=\"gap-2\" colorStyle=\"primary\" [isOutline]=\"true\" (clicked)=\"addEmptyFilterRow()\"\n [isDisabled]=\"!canPerformActions()\">\n <upd-icon tablerIcon=\"plus\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('AddNewFilter') }}\n </upd-button>\n <upd-button customClasses=\"gap-2\" colorStyle=\"success\" [isDisabled]=\"!canPerformActions()\" (clicked)=\"search()\">\n <upd-icon tablerIcon=\"checks\" tablerIconWeight=\"bold\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ApplyFilters') }}\n </upd-button>\n </div>\n }\n</ng-container>\n" }]
|
|
812
|
+
}], ctorParameters: () => [], propDecorators: { wrapperClass: [{
|
|
813
|
+
type: HostBinding,
|
|
814
|
+
args: ['class']
|
|
815
|
+
}] } });
|
|
816
|
+
|
|
817
|
+
var Utils = Tools.Utils;
|
|
818
|
+
class TableComponent extends BaseComponent {
|
|
819
|
+
get numberOfColumns() {
|
|
820
|
+
return this.columns().length
|
|
821
|
+
+ (this.configModel().hasCheckboxColumn ? 1 : 0)
|
|
822
|
+
+ (this.configModel().customActions.length > 0 ? 1 : 0)
|
|
823
|
+
+ (!!this.pendingWidthColClass ? 1 : 0);
|
|
824
|
+
}
|
|
825
|
+
get hasWidth() {
|
|
826
|
+
return this.columns().some(rec => !!rec.width);
|
|
827
|
+
}
|
|
828
|
+
get pendingWidthColClass() {
|
|
829
|
+
if (!this.hasWidth || this.isWidthInPixels) {
|
|
830
|
+
return '';
|
|
831
|
+
}
|
|
832
|
+
const isGrid = this.columns().some(rec => !!rec.width?.gridColumn);
|
|
833
|
+
const total = isGrid ? 12 : 100;
|
|
834
|
+
const remainingSize = total - this.columns().reduce((acc, item) => acc + item.widthSize, 0);
|
|
835
|
+
// TODO: add spaces of checkbox and customactions columns
|
|
836
|
+
return remainingSize > 0 ? `${(isGrid ? 'col' : 'w')}-${remainingSize}` : '';
|
|
837
|
+
}
|
|
838
|
+
get isWidthInPixels() {
|
|
839
|
+
return this.columns().some(rec => !!rec.width?.pixels);
|
|
840
|
+
}
|
|
841
|
+
get isRemote() {
|
|
842
|
+
return !!this.configModel().store;
|
|
843
|
+
}
|
|
844
|
+
get store() {
|
|
845
|
+
return this.configModel().store;
|
|
846
|
+
}
|
|
847
|
+
constructor() {
|
|
848
|
+
super();
|
|
849
|
+
this.savedViewsRef = viewChild('savedViewsBtn', { read: ElementRef });
|
|
850
|
+
this.config = model.required();
|
|
851
|
+
this.isSearching = signal(false);
|
|
852
|
+
this.selectedItems = computed(() => this.selectionModel().selected());
|
|
853
|
+
this.activeSavedView = signal(undefined);
|
|
854
|
+
this.isMainCheckboxChecked = false;
|
|
855
|
+
this.isMainCheckboxIndeterminate = false;
|
|
856
|
+
this.isSavedViewsDropdownOpen = false;
|
|
857
|
+
this.searchRequest = model({});
|
|
858
|
+
this.activeFilters = model([]);
|
|
859
|
+
this.currentPage = model(1);
|
|
860
|
+
this.pageSize = model(0);
|
|
861
|
+
this.hasSearchChanged = signal(false);
|
|
862
|
+
this.totalRecords = signal(0);
|
|
863
|
+
this.configModel = computed(() => new TableConfigModel(this.config()));
|
|
864
|
+
this.data = computed(() => this.configModel().data.length > 0 ? this.configModel().data : this.currentData());
|
|
865
|
+
this.selectionModel = computed(() => new SelectionModel(this.configModel().getIdFunction));
|
|
866
|
+
this.currentSorting = signal(undefined);
|
|
867
|
+
this.hiddenColumns = computed(() => this.configModel().canManageColumns ? this.configModel().columns.filter(c => c.isHidden).length : 0);
|
|
868
|
+
this.columns = signal([]);
|
|
869
|
+
this.searchRequestSubject = new Subject();
|
|
870
|
+
this.textService = inject(TextService);
|
|
871
|
+
this.savedViewsOptions = computed(() => {
|
|
872
|
+
const allSavedViewsOptions = [];
|
|
873
|
+
this.allSavedViews().forEach(sv => allSavedViewsOptions.push(this.getSavedViewOption(sv)));
|
|
874
|
+
return allSavedViewsOptions;
|
|
875
|
+
});
|
|
876
|
+
this.shouldForceSearch = false;
|
|
877
|
+
this.columnsBackup = [];
|
|
878
|
+
this.currentData = signal([]);
|
|
879
|
+
this.currentFavoriteButtons = computed(() => this.favoriteButtons);
|
|
880
|
+
this.smallSizeSignal = signal('small');
|
|
881
|
+
this.allSavedViews = computed(() => this.savedViewsStorage.getAll(this.configModel().name)());
|
|
882
|
+
this.favoriteButtons = [];
|
|
883
|
+
this.serverResponseService = inject(ServerResponseService);
|
|
884
|
+
this.savedViewsStorage = inject(SavedViewsStorage);
|
|
885
|
+
this.modalService = inject(ModalService);
|
|
886
|
+
this.modalAlertService = inject(ModalAlertService);
|
|
887
|
+
effect(() => {
|
|
888
|
+
if (this.data().length > 0 && this.configModel().data.length > 0) {
|
|
889
|
+
this.setupPreSelected();
|
|
890
|
+
}
|
|
891
|
+
if (this.selectedItems().length > 0) {
|
|
892
|
+
if (this.selectedItems().length !== this.data().length) {
|
|
893
|
+
this.isMainCheckboxChecked = false;
|
|
894
|
+
this.isMainCheckboxIndeterminate = true;
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
this.isMainCheckboxIndeterminate = false;
|
|
898
|
+
this.isMainCheckboxChecked = true;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
else {
|
|
902
|
+
this.isMainCheckboxChecked = false;
|
|
903
|
+
this.isMainCheckboxIndeterminate = false;
|
|
904
|
+
}
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
ngOnInit() {
|
|
908
|
+
this.columnsBackup = [...this.config().columns];
|
|
909
|
+
const searchSubjectSub = this.searchRequestSubject
|
|
910
|
+
.pipe(distinctUntilChanged((prev, curr) => !this.shouldForceSearch ? Utils.areEqual(prev, curr) : false), tap((request) => {
|
|
911
|
+
this.isSearching.set(true);
|
|
912
|
+
this.currentData.set([]);
|
|
913
|
+
this.searchRequest.set(request);
|
|
914
|
+
if ((request.filters?.length || 0) > 0
|
|
915
|
+
|| (request.description || '').length > 0
|
|
916
|
+
|| (request.sortings?.length || 0) > 0) {
|
|
917
|
+
this.hasSearchChanged.set(true);
|
|
918
|
+
}
|
|
919
|
+
}), switchMap(() => this.store.search(this.searchRequest()).pipe(catchError(() => of()) // Already handled by the ServerResponseService.
|
|
920
|
+
)), finalize(() => this.shouldForceSearch = false))
|
|
921
|
+
.subscribe(resp => this.setupSearchResults(resp));
|
|
922
|
+
const serverResponseSub = this.serverResponseService.onError.subscribe(error => {
|
|
923
|
+
if (!!error) {
|
|
924
|
+
this.isSearching.set(false);
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
if (this.configModel().shouldAutoSearch && this.isRemote) {
|
|
928
|
+
this.shouldForceSearch = true;
|
|
929
|
+
this.searchRequestSubject.next({});
|
|
930
|
+
}
|
|
931
|
+
this.updateColumns(this.configModel().columns);
|
|
932
|
+
this.addSubscriptions(searchSubjectSub, serverResponseSub);
|
|
933
|
+
}
|
|
934
|
+
toggleAllSelection(isChecked) {
|
|
935
|
+
if (isChecked) {
|
|
936
|
+
this.selectionModel().select(...this.currentData());
|
|
937
|
+
}
|
|
938
|
+
else {
|
|
939
|
+
this.selectionModel().clearSelection();
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
toggleItemSelection(record) {
|
|
943
|
+
if (this.selectionModel().isSelected(record)) {
|
|
944
|
+
this.selectionModel().deselect(record);
|
|
945
|
+
}
|
|
946
|
+
else {
|
|
947
|
+
this.selectionModel().select(record);
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
canSortColumn(columnName) {
|
|
951
|
+
return this.getColumnByName(columnName).allowSort;
|
|
952
|
+
}
|
|
953
|
+
sortByColumn(columnName) {
|
|
954
|
+
const currentSort = this.currentSorting();
|
|
955
|
+
const nextDirection = (currentSort?.column === columnName && currentSort.direction === SortDirectionEnum.Asc)
|
|
956
|
+
? SortDirectionEnum.Desc
|
|
957
|
+
: SortDirectionEnum.Asc;
|
|
958
|
+
this.currentSorting.set(new ColumnSort({
|
|
959
|
+
column: columnName,
|
|
960
|
+
direction: nextDirection
|
|
961
|
+
}));
|
|
962
|
+
if (this.isRemote) {
|
|
963
|
+
this.searchRequest.set({
|
|
964
|
+
...this.searchRequest(),
|
|
965
|
+
sortings: [this.currentSorting()]
|
|
966
|
+
});
|
|
967
|
+
this.searchRequestSubject.next(this.searchRequest());
|
|
968
|
+
}
|
|
969
|
+
else {
|
|
970
|
+
const col = this.getColumnByName(columnName);
|
|
971
|
+
// TODO: local sort
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
getSortingIcon(columnName) {
|
|
975
|
+
return !!this.currentSorting() && this.currentSorting().column === columnName
|
|
976
|
+
? (this.currentSorting().direction === SortDirectionEnum.Asc ? 'sort-ascending' : 'sort-descending')
|
|
977
|
+
: 'arrows-sort';
|
|
978
|
+
}
|
|
979
|
+
onPageSettingsChanged() {
|
|
980
|
+
this.searchRequest.set({
|
|
981
|
+
...this.searchRequest(),
|
|
982
|
+
pageSize: this.pageSize(),
|
|
983
|
+
pageIndex: this.currentPage()
|
|
984
|
+
});
|
|
985
|
+
this.searchRequestSubject.next(this.searchRequest());
|
|
986
|
+
}
|
|
987
|
+
getRecordId(record) {
|
|
988
|
+
return this.configModel().getIdFunction(record);
|
|
989
|
+
}
|
|
990
|
+
openColumnsManagerModal() {
|
|
991
|
+
const ref = this.modalService.open(undefined, {
|
|
992
|
+
bodyContentType: ColumnsManagerComponent,
|
|
993
|
+
showCloseButton: false,
|
|
994
|
+
showCancelButton: true,
|
|
995
|
+
data: this.config(),
|
|
996
|
+
isTextCentered: false,
|
|
997
|
+
actionButtons: [
|
|
998
|
+
new ButtonModel({
|
|
999
|
+
text: signal({ text: 'UpDevs.Table.ColumnsManager.Apply', isTranslated: false }),
|
|
1000
|
+
colorStyle: signal('primary'),
|
|
1001
|
+
iconModel: signal({ tablerIcon: 'checks' }),
|
|
1002
|
+
clickFunction: () => ref.close()
|
|
1003
|
+
})
|
|
1004
|
+
]
|
|
1005
|
+
});
|
|
1006
|
+
ref.afterClose = () => {
|
|
1007
|
+
const result = ref.getBodyInstance()?.columns();
|
|
1008
|
+
if (!!result) {
|
|
1009
|
+
const previousVisibleColumnsOrder = this.columns().map(c => c.name);
|
|
1010
|
+
const visibleColumnsNames = result.find(c => c.name === 'visible')?.items().map(i => i.name) || [];
|
|
1011
|
+
const newColumns = [];
|
|
1012
|
+
this.config.update(config => {
|
|
1013
|
+
visibleColumnsNames.forEach(name => {
|
|
1014
|
+
const col = config.columns.find(c => c.name === name);
|
|
1015
|
+
col.isHidden = false;
|
|
1016
|
+
newColumns.push(col);
|
|
1017
|
+
});
|
|
1018
|
+
config.columns.forEach(c => {
|
|
1019
|
+
if (!visibleColumnsNames.includes(c.name)) {
|
|
1020
|
+
c.isHidden = true;
|
|
1021
|
+
newColumns.push(c);
|
|
1022
|
+
}
|
|
1023
|
+
});
|
|
1024
|
+
return { ...config, columns: [...newColumns] };
|
|
1025
|
+
});
|
|
1026
|
+
this.updateColumns(newColumns);
|
|
1027
|
+
const newVisibleColumnsOrder = newColumns.map(c => c.name);
|
|
1028
|
+
if (previousVisibleColumnsOrder.length !== newVisibleColumnsOrder.length
|
|
1029
|
+
|| !previousVisibleColumnsOrder.every((v, i) => v === newVisibleColumnsOrder[i])) {
|
|
1030
|
+
this.hasSearchChanged.set(true);
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
openSaveSearchModal(data) {
|
|
1036
|
+
data = data || {
|
|
1037
|
+
tableName: this.configModel().name,
|
|
1038
|
+
request: this.searchRequest(),
|
|
1039
|
+
columns: this.configModel().columns
|
|
1040
|
+
};
|
|
1041
|
+
this.modalService.open(SaveSearchComponent, { showCloseButton: false, data });
|
|
1042
|
+
}
|
|
1043
|
+
selectSavedView(item) {
|
|
1044
|
+
const savedView = this.savedViewsStorage.getById(this.configModel().name, item.id)();
|
|
1045
|
+
this.isSavedViewsDropdownOpen = false;
|
|
1046
|
+
if (!!savedView) {
|
|
1047
|
+
this.updateColumns(savedView.columns);
|
|
1048
|
+
this.config.update(curr => {
|
|
1049
|
+
curr.columns = savedView.columns;
|
|
1050
|
+
return { ...curr };
|
|
1051
|
+
});
|
|
1052
|
+
this.activeSavedView.set(savedView);
|
|
1053
|
+
this.searchRequestSubject.next({ ...savedView.request });
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
resetViewState() {
|
|
1057
|
+
this.activeSavedView.set(undefined);
|
|
1058
|
+
this.updateColumns(this.columnsBackup);
|
|
1059
|
+
this.config.update(curr => {
|
|
1060
|
+
curr.columns = this.columnsBackup;
|
|
1061
|
+
return { ...curr };
|
|
1062
|
+
});
|
|
1063
|
+
this.searchRequestSubject.next({});
|
|
1064
|
+
}
|
|
1065
|
+
reload() {
|
|
1066
|
+
this.shouldForceSearch = true;
|
|
1067
|
+
this.searchRequestSubject.next({});
|
|
1068
|
+
}
|
|
1069
|
+
adaptCustomAction(btn, item) {
|
|
1070
|
+
const newBtn = new ButtonModel({
|
|
1071
|
+
id: btn.id,
|
|
1072
|
+
iconModel: btn.iconModel,
|
|
1073
|
+
title: btn.title,
|
|
1074
|
+
isIcon: signal(true),
|
|
1075
|
+
isLink: signal(true),
|
|
1076
|
+
size: signal('small'),
|
|
1077
|
+
text: undefined,
|
|
1078
|
+
colorStyle: btn.colorStyle,
|
|
1079
|
+
isOutline: btn.isOutline
|
|
1080
|
+
});
|
|
1081
|
+
const defaultFunction = btn.clickFunction;
|
|
1082
|
+
newBtn.clickFunction = (evt) => {
|
|
1083
|
+
evt.event?.preventDefault();
|
|
1084
|
+
evt.event?.stopPropagation();
|
|
1085
|
+
if (!!defaultFunction) {
|
|
1086
|
+
defaultFunction({ event: evt.event, data: item });
|
|
1087
|
+
}
|
|
1088
|
+
};
|
|
1089
|
+
return newBtn;
|
|
1090
|
+
}
|
|
1091
|
+
updateColumns(columns) {
|
|
1092
|
+
this.columns.set(columns.filter(c => !c.isHidden).map(c => this.createColumnModel(c)));
|
|
1093
|
+
}
|
|
1094
|
+
createColumnModel(data) {
|
|
1095
|
+
switch (data.type) {
|
|
1096
|
+
case ColumnTypeEnum.Text:
|
|
1097
|
+
return new TextColumnModel({ ...data });
|
|
1098
|
+
case ColumnTypeEnum.Number:
|
|
1099
|
+
return new NumberColumnModel({ ...data });
|
|
1100
|
+
case ColumnTypeEnum.Boolean:
|
|
1101
|
+
return new BooleanColumnModel({ ...data });
|
|
1102
|
+
case ColumnTypeEnum.DateTime:
|
|
1103
|
+
case ColumnTypeEnum.Date:
|
|
1104
|
+
case ColumnTypeEnum.Time:
|
|
1105
|
+
return new DateTimeColumnModel({ ...data });
|
|
1106
|
+
case ColumnTypeEnum.Image:
|
|
1107
|
+
return new ImageColumnModel({ ...data });
|
|
1108
|
+
case ColumnTypeEnum.Guid:
|
|
1109
|
+
return new GuidColumnModel({ ...data });
|
|
1110
|
+
case ColumnTypeEnum.Masked:
|
|
1111
|
+
case ColumnTypeEnum.Custom:
|
|
1112
|
+
case ColumnTypeEnum.Currency:
|
|
1113
|
+
default:
|
|
1114
|
+
return new BaseColumnModel(data.type, { ...data });
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
getColumnByName(columnName) {
|
|
1118
|
+
const col = this.columns().find(c => c.name === columnName);
|
|
1119
|
+
if (!col) {
|
|
1120
|
+
throw Error('Tried accessing non existing column');
|
|
1121
|
+
}
|
|
1122
|
+
return col;
|
|
1123
|
+
}
|
|
1124
|
+
setupPreSelected() {
|
|
1125
|
+
this.configModel().preSelectedItems.forEach(item => {
|
|
1126
|
+
const id = this.getRecordId(item);
|
|
1127
|
+
if (this.data().find(d => this.getRecordId(d) === id) && !this.selectionModel().isSelected(item)) {
|
|
1128
|
+
this.selectionModel().select(item);
|
|
1129
|
+
}
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
setupSearchResults(resp) {
|
|
1133
|
+
this.isSearching.set(false);
|
|
1134
|
+
this.currentData.set(resp.records);
|
|
1135
|
+
this.totalRecords.set(resp.totalRecords || 0);
|
|
1136
|
+
this.currentPage.set(resp.pageIndex || 0);
|
|
1137
|
+
this.pageSize.set(resp.pageSize || 0);
|
|
1138
|
+
this.setupPreSelected();
|
|
1139
|
+
}
|
|
1140
|
+
getActionButtons(currentFavoriteButtons, savedView) {
|
|
1141
|
+
return [
|
|
1142
|
+
new ButtonModel({
|
|
1143
|
+
isIcon: signal(true),
|
|
1144
|
+
isGhost: signal(true),
|
|
1145
|
+
colorStyle: signal('primary'),
|
|
1146
|
+
size: this.smallSizeSignal,
|
|
1147
|
+
title: signal({ text: 'UpDevs.Table.SavedViews.MarkAsDefault', isTranslated: false }),
|
|
1148
|
+
isActive: signal(savedView.isDefault || false),
|
|
1149
|
+
iconModel: signal({ tablerIcon: 'heart' }),
|
|
1150
|
+
clickFunction: (evt) => {
|
|
1151
|
+
const btnModel = evt.data;
|
|
1152
|
+
const isButtonActive = btnModel.button.isActive();
|
|
1153
|
+
if (!isButtonActive) {
|
|
1154
|
+
this.savedViewsStorage.resetAllIsDefault(this.configModel().name);
|
|
1155
|
+
}
|
|
1156
|
+
savedView.isDefault = !isButtonActive;
|
|
1157
|
+
currentFavoriteButtons().forEach(cfb => cfb.isActive.set(false));
|
|
1158
|
+
btnModel.button.isActive.set(!isButtonActive);
|
|
1159
|
+
this.savedViewsStorage.saveView(savedView);
|
|
1160
|
+
}
|
|
1161
|
+
}),
|
|
1162
|
+
new ButtonModel({
|
|
1163
|
+
isIcon: signal(true),
|
|
1164
|
+
isGhost: signal(true),
|
|
1165
|
+
colorStyle: signal('secondary'),
|
|
1166
|
+
size: this.smallSizeSignal,
|
|
1167
|
+
title: signal({ text: 'UpDevs.Table.SavedViews.Duplicate', isTranslated: false }),
|
|
1168
|
+
iconModel: signal({ tablerIcon: 'copy' }),
|
|
1169
|
+
clickFunction: () => {
|
|
1170
|
+
const duplicateView = {
|
|
1171
|
+
...savedView,
|
|
1172
|
+
id: Tools.Guid.generate(),
|
|
1173
|
+
name: savedView.name +
|
|
1174
|
+
` (${this.textService.getText({ text: 'UpDevs.Table.SavedViews.DuplicateSuffix', isTranslated: false })})`
|
|
1175
|
+
};
|
|
1176
|
+
this.openSaveSearchModal(duplicateView);
|
|
1177
|
+
}
|
|
1178
|
+
}),
|
|
1179
|
+
new ButtonModel({
|
|
1180
|
+
isIcon: signal(true),
|
|
1181
|
+
isGhost: signal(true),
|
|
1182
|
+
colorStyle: signal('secondary'),
|
|
1183
|
+
size: this.smallSizeSignal,
|
|
1184
|
+
title: signal({ text: 'UpDevs.Table.SavedViews.Edit', isTranslated: false }),
|
|
1185
|
+
iconModel: signal({ tablerIcon: 'edit' }),
|
|
1186
|
+
clickFunction: () => this.openSaveSearchModal(savedView)
|
|
1187
|
+
}),
|
|
1188
|
+
new ButtonModel({
|
|
1189
|
+
isIcon: signal(true),
|
|
1190
|
+
isGhost: signal(true),
|
|
1191
|
+
colorStyle: signal('danger'),
|
|
1192
|
+
size: this.smallSizeSignal,
|
|
1193
|
+
title: signal({ text: 'UpDevs.Table.SavedViews.Remove', isTranslated: false }),
|
|
1194
|
+
iconModel: signal({ tablerIcon: 'x' }),
|
|
1195
|
+
clickFunction: () => {
|
|
1196
|
+
const title = this.textService.getText({ text: 'UpDevs.Table.SavedViews.ConfirmRemove', isTranslated: false }, { view: savedView.name });
|
|
1197
|
+
this.modalAlertService.showConfirm({ text: title, isTranslated: true }).subscribe(isConfirmed => {
|
|
1198
|
+
if (isConfirmed) {
|
|
1199
|
+
this.savedViewsStorage.removeViews(this.configModel().name, savedView.id);
|
|
1200
|
+
}
|
|
1201
|
+
});
|
|
1202
|
+
}
|
|
1203
|
+
})
|
|
1204
|
+
];
|
|
1205
|
+
}
|
|
1206
|
+
getSavedViewOption(savedView) {
|
|
1207
|
+
const actionButtons = this.getActionButtons(this.currentFavoriteButtons, savedView);
|
|
1208
|
+
this.favoriteButtons.push(actionButtons.find(ab => ab.iconModel?.().tablerIcon === 'heart'));
|
|
1209
|
+
return {
|
|
1210
|
+
id: savedView.id,
|
|
1211
|
+
type: 'with-toolbar',
|
|
1212
|
+
text: { text: savedView.name, isTranslated: true },
|
|
1213
|
+
toolbarType: 'spaced',
|
|
1214
|
+
isActive: this.activeSavedView()?.id === savedView.id,
|
|
1215
|
+
actionButtons
|
|
1216
|
+
};
|
|
1217
|
+
}
|
|
1218
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1219
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.1.0", type: TableComponent, selector: "upd-table", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null }, searchRequest: { classPropertyName: "searchRequest", publicName: "searchRequest", isSignal: true, isRequired: false, transformFunction: null }, activeFilters: { classPropertyName: "activeFilters", publicName: "activeFilters", isSignal: true, isRequired: false, transformFunction: null }, currentPage: { classPropertyName: "currentPage", publicName: "currentPage", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { config: "configChange", searchRequest: "searchRequestChange", activeFilters: "activeFiltersChange", currentPage: "currentPageChange", pageSize: "pageSizeChange" }, viewQueries: [{ propertyName: "savedViewsRef", first: true, predicate: ["savedViewsBtn"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n <div class=\"card\">\n @if (!!configModel().title || !configModel().canSearch) {\n <div class=\"card-header\">\n @if (!!configModel().title) {\n <h3 class=\"card-title\">{{ textService.getText(configModel().title) }}</h3>\n }\n <ng-template [ngTemplateOutlet]=\"actionsTpl\"></ng-template>\n </div>\n }\n\n @if (configModel().customHeaderActions.length > 0) {\n <div class=\"card-body py-3 d-flex flex-column gap-2\">\n <div class=\"ms-auto d-flex gap-2\">\n @for (btn of configModel().customHeaderActions; track btn) {\n <upd-button customClasses=\"gap-2\" [model]=\"btn\"></upd-button>\n }\n </div>\n </div>\n }\n\n @if (configModel().canSearch) {\n <upd-search-section [actionsTpl]=\"!configModel().title ? actionsTpl : undefined\" [isSearching]=\"isSearching()\"\n [(searchRequest)]=\"searchRequest\" [searchRequestSubject]=\"searchRequestSubject\" [config]=\"configModel()\"\n [(hasChanges)]=\"hasSearchChanged\" [columns]=\"columns()\">\n </upd-search-section>\n }\n\n <div [class.table-responsive]=\"configModel().isResponsive\">\n <!-- TODO: implement pixel sized table -->\n <table class=\"table card-table table-vcenter table-nowrap\" [class.fixed]=\"hasWidth\"\n [class.pixel-sized]=\"isWidthInPixels\">\n <thead [class.sticky-top]=\"configModel().hasStickyHeader\">\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <th class=\"checkbox-selector\">\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleAllSelection($event)\"\n [(isChecked)]=\"isMainCheckboxChecked\"\n [(isIndeterminate)]=\"isMainCheckboxIndeterminate\"></upd-checkbox>\n </th>\n }\n\n @for (col of columns(); track col) {\n <th [ngClass]=\"col.widthClass\" [style.width.px]=\"col.pixelsSize\">\n {{ textService.getText(col.title) }}\n @if (canSortColumn(col.name)) {\n <upd-icon [tablerIcon]=\"getSortingIcon(col.name)\" tablerIconWeight=\"bold\" colorClass=\"text-body-tertiary\"\n [tablerIconSize]=\"16\" (click)=\"sortByColumn(col.name)\">\n </upd-icon>\n }\n </th>\n }\n\n @if (!!pendingWidthColClass) {\n <th [ngClass]=\"pendingWidthColClass\"></th>\n }\n\n @if (configModel().customActions.length > 0) {\n <th class=\"custom-actions\"></th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSearching()) {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <h1 class=\"text-body-tertiary\">{{ t('Loading') }}...</h1>\n <div class=\"progress progress-sm w-25\">\n <div class=\"progress-bar progress-bar-indeterminate bg-body-tertiary\"></div>\n </div>\n </div>\n </td>\n </tr>\n } @else {\n @for (record of data(); track record) {\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <td>\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleItemSelection(record)\"\n [isChecked]=\"selectionModel().isSelected(record)\"></upd-checkbox>\n </td>\n }\n\n @for (col of columns(); track col) {\n <td>\n <ng-container updTableColumn [record]=\"record\" [config]=\"col\"></ng-container>\n </td>\n }\n\n @if (!!pendingWidthColClass) {\n <td></td>\n }\n\n @if (configModel().customActions.length > 0) {\n <td style=\"overflow: unset\">\n <div class=\"grow-left d-flex\">\n @if (configModel().customActions.length > 1) {\n <upd-button customClasses=\"ca-item\" [iconModel]=\"{tablerIcon:'dots'}\" [isIcon]=\"true\"\n [isLink]=\"true\" size=\"small\"></upd-button>\n\n <div class=\"ca-dropdown-content rounded shadow-sm\">\n @for (btn of configModel().customActions; track btn) {\n <upd-button [model]=\"adaptCustomAction(btn, record)\"></upd-button>\n }\n </div>\n } @else {\n <upd-button [model]=\"adaptCustomAction(configModel().customActions[0], record)\">\n </upd-button>\n }\n </div>\n </td>\n }\n </tr>\n } @empty {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <p class=\"empty-title\">{{ t('NoRecordsFoundTitle') }}</p>\n <p class=\"empty-subtitle text-secondary\">{{ t('NoRecordsFoundSubtitle') }}</p>\n </div>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n <upd-paginator wrapperClasses=\"card-footer\" [shouldDisplayPreviousText]=\"false\" [shouldDisplayNextText]=\"false\"\n [(pageSize)]=\"pageSize\" [shouldDisplayFirstText]=\"false\" [shouldDisplayLastText]=\"false\"\n [(currentPage)]=\"currentPage\"\n [totalRecords]=\"totalRecords()\" (changed)=\"onPageSettingsChanged()\">\n </upd-paginator>\n </div>\n\n <ng-template #actionsTpl>\n <div class=\"ms-auto d-flex gap-2\">\n @if (!!activeSavedView()) {\n @if (activeSavedView()!.isDefault) {\n <div class=\"ribbon ribbon-top ribbon-start\">\n <upd-icon tablerIcon=\"heart\" [tablerIconSize]=\"20\"></upd-icon>\n </div>\n }\n <div class=\"tag align-self-center py-3 text-primary bg-primary-lt border-primary\"\n updPopover=\"{{ t('CurrentSavedView') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"list-details\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ activeSavedView()!.name }}</span>\n </div>\n }\n @if (hiddenColumns() > 0) {\n <div class=\"tag align-self-center py-3 text-orange bg-orange-lt border-orange\"\n updPopover=\"{{ t('HiddenColumnsTooltip') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"eye-off\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ hiddenColumns() }}</span>\n </div>\n }\n @if (!!activeSavedView() || hiddenColumns() > 0) {\n <upd-button (clicked)=\"resetViewState()\" colorStyle=\"danger\" updPopover=\"{{ t('ResetView') }}\"\n [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\" [isOutline]=\"true\">\n <upd-icon tablerIcon=\"restore\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canSaveViews) {\n <upd-button customClasses=\"gap-2\" [isDisabled]=\"!hasSearchChanged()\" (clicked)=\"openSaveSearchModal()\"\n updPopover=\"{{ t('SaveCurrentView') }}\" [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\">\n <upd-icon tablerIcon=\"device-floppy\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canManageColumns) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"openColumnsManagerModal()\">\n <upd-icon tablerIcon=\"columns\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ColumnsManagerButton') }}\n </upd-button>\n }\n @if (configModel().canSaveViews || configModel().canLoadSavedViews) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"isSavedViewsDropdownOpen = true\" #savedViewsBtn>\n <upd-icon tablerIcon=\"folders\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('SavedViews.ButtonTitle') }}\n </upd-button>\n <upd-dropdown wrapperClasses=\"overflow-x-hidden mt-1\" [isOpen]=\"isSavedViewsDropdownOpen\"\n [dropdownReference]=\"savedViewsRef()\" [items]=\"savedViewsOptions()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isSavedViewsDropdownOpen = $event\" [minWidth]=\"350\" (selectedItem)=\"selectSavedView($event)\">\n @if (savedViewsOptions().length < 1) {\n <span class=\"m-2\">{{ t('NoSavedViews') }}</span>\n }\n </upd-dropdown>\n }\n </div>\n </ng-template>\n</ng-container>\n", styles: [".fixed{table-layout:fixed!important}.fixed td,.fixed th{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.checkbox-selector{width:52px!important}.custom-actions{width:56px!important}.ca-item{transition:all,.5s}.ca-item:hover{width:400px}.grow-left{direction:rtl}.ca-dropdown-content{display:none;background:var(--upd-secondary-lt)}.grow-left:hover .ca-dropdown-content{display:block}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1$1.TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: i3.IconComponent, selector: "upd-icon", inputs: ["model", "wrapperClasses", "color", "colorClass", "removeDefaultClasses", "customClasses", "tablerIcon", "tablerIconWeight", "tablerIconType", "tablerIconSize", "heroIcon", "heroIconSize", "heroIconType"] }, { kind: "component", type: i4.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: i5$1.PaginatorComponent, selector: "upd-paginator", inputs: ["startPageIndex", "currentPage", "wrapperClasses", "availablePageSizes", "defaultInitPageSize", "pageSize", "shouldDisplayFirstIcon", "shouldDisplayFirstText", "shouldDisplayPreviousIcon", "shouldDisplayPreviousText", "shouldDisplayNextIcon", "shouldDisplayNextText", "shouldDisplayLastIcon", "shouldDisplayLastText", "previousDescription", "nextDescription", "totalRecords"], outputs: ["changed", "currentPageChange", "pageSizeChange"] }, { kind: "component", type: i6.CheckboxComponent, selector: "upd-checkbox", inputs: ["wrapperClasses", "value", "customClasses", "isChecked", "isInline", "isSwitch", "isIndeterminate"], outputs: ["changed", "isCheckedChange", "isIndeterminateChange"] }, { kind: "component", type: i7.DropdownComponent, selector: "upd-dropdown", inputs: ["items", "header", "isOpen", "shouldCloseOnOutsideClick", "arrowType", "wrapperClasses", "elementsExcludedFromOutsideClick", "minHeight", "maxHeight", "minWidth", "maxWidth", "dropdownReference", "dropdownReferencePosition", "textOverflowStrategy"], outputs: ["isOpenChange", "selectedItem", "checkboxChanged"] }, { kind: "directive", type: i8.PopoverDirective, selector: "[updPopover]", inputs: ["updPopover", "updPopoverTitle", "updPopoverTitleTemplate", "updPopoverTemplate", "updPopoverPlacement", "updPopoverCustomClasses", "updPopoverActAsTooltip"] }, { kind: "component", type: SearchSectionComponent, selector: "upd-search-section", inputs: ["searchRequest", "hasChanges", "columns", "isSearching", "searchRequestSubject", "config", "actionsTpl"], outputs: ["searchRequestChange", "hasChangesChange"] }, { kind: "directive", type: TableColumnDirective, selector: "[updTableColumn]", inputs: ["record", "config"] }] }); }
|
|
1220
|
+
}
|
|
1221
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: TableComponent, decorators: [{
|
|
1222
|
+
type: Component,
|
|
1223
|
+
args: [{ selector: 'upd-table', template: "<ng-container *transloco=\"let t; prefix: 'UpDevs.Table'\">\n <div class=\"card\">\n @if (!!configModel().title || !configModel().canSearch) {\n <div class=\"card-header\">\n @if (!!configModel().title) {\n <h3 class=\"card-title\">{{ textService.getText(configModel().title) }}</h3>\n }\n <ng-template [ngTemplateOutlet]=\"actionsTpl\"></ng-template>\n </div>\n }\n\n @if (configModel().customHeaderActions.length > 0) {\n <div class=\"card-body py-3 d-flex flex-column gap-2\">\n <div class=\"ms-auto d-flex gap-2\">\n @for (btn of configModel().customHeaderActions; track btn) {\n <upd-button customClasses=\"gap-2\" [model]=\"btn\"></upd-button>\n }\n </div>\n </div>\n }\n\n @if (configModel().canSearch) {\n <upd-search-section [actionsTpl]=\"!configModel().title ? actionsTpl : undefined\" [isSearching]=\"isSearching()\"\n [(searchRequest)]=\"searchRequest\" [searchRequestSubject]=\"searchRequestSubject\" [config]=\"configModel()\"\n [(hasChanges)]=\"hasSearchChanged\" [columns]=\"columns()\">\n </upd-search-section>\n }\n\n <div [class.table-responsive]=\"configModel().isResponsive\">\n <!-- TODO: implement pixel sized table -->\n <table class=\"table card-table table-vcenter table-nowrap\" [class.fixed]=\"hasWidth\"\n [class.pixel-sized]=\"isWidthInPixels\">\n <thead [class.sticky-top]=\"configModel().hasStickyHeader\">\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <th class=\"checkbox-selector\">\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleAllSelection($event)\"\n [(isChecked)]=\"isMainCheckboxChecked\"\n [(isIndeterminate)]=\"isMainCheckboxIndeterminate\"></upd-checkbox>\n </th>\n }\n\n @for (col of columns(); track col) {\n <th [ngClass]=\"col.widthClass\" [style.width.px]=\"col.pixelsSize\">\n {{ textService.getText(col.title) }}\n @if (canSortColumn(col.name)) {\n <upd-icon [tablerIcon]=\"getSortingIcon(col.name)\" tablerIconWeight=\"bold\" colorClass=\"text-body-tertiary\"\n [tablerIconSize]=\"16\" (click)=\"sortByColumn(col.name)\">\n </upd-icon>\n }\n </th>\n }\n\n @if (!!pendingWidthColClass) {\n <th [ngClass]=\"pendingWidthColClass\"></th>\n }\n\n @if (configModel().customActions.length > 0) {\n <th class=\"custom-actions\"></th>\n }\n </tr>\n </thead>\n\n <tbody>\n @if (isSearching()) {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <h1 class=\"text-body-tertiary\">{{ t('Loading') }}...</h1>\n <div class=\"progress progress-sm w-25\">\n <div class=\"progress-bar progress-bar-indeterminate bg-body-tertiary\"></div>\n </div>\n </div>\n </td>\n </tr>\n } @else {\n @for (record of data(); track record) {\n <tr>\n @if (configModel().hasCheckboxColumn) {\n <td>\n <upd-checkbox customClasses=\"m-0 ps-0\" (changed)=\"toggleItemSelection(record)\"\n [isChecked]=\"selectionModel().isSelected(record)\"></upd-checkbox>\n </td>\n }\n\n @for (col of columns(); track col) {\n <td>\n <ng-container updTableColumn [record]=\"record\" [config]=\"col\"></ng-container>\n </td>\n }\n\n @if (!!pendingWidthColClass) {\n <td></td>\n }\n\n @if (configModel().customActions.length > 0) {\n <td style=\"overflow: unset\">\n <div class=\"grow-left d-flex\">\n @if (configModel().customActions.length > 1) {\n <upd-button customClasses=\"ca-item\" [iconModel]=\"{tablerIcon:'dots'}\" [isIcon]=\"true\"\n [isLink]=\"true\" size=\"small\"></upd-button>\n\n <div class=\"ca-dropdown-content rounded shadow-sm\">\n @for (btn of configModel().customActions; track btn) {\n <upd-button [model]=\"adaptCustomAction(btn, record)\"></upd-button>\n }\n </div>\n } @else {\n <upd-button [model]=\"adaptCustomAction(configModel().customActions[0], record)\">\n </upd-button>\n }\n </div>\n </td>\n }\n </tr>\n } @empty {\n <tr>\n <td [colSpan]=\"numberOfColumns\">\n <div class=\"empty\">\n <p class=\"empty-title\">{{ t('NoRecordsFoundTitle') }}</p>\n <p class=\"empty-subtitle text-secondary\">{{ t('NoRecordsFoundSubtitle') }}</p>\n </div>\n </td>\n </tr>\n }\n }\n </tbody>\n </table>\n </div>\n <upd-paginator wrapperClasses=\"card-footer\" [shouldDisplayPreviousText]=\"false\" [shouldDisplayNextText]=\"false\"\n [(pageSize)]=\"pageSize\" [shouldDisplayFirstText]=\"false\" [shouldDisplayLastText]=\"false\"\n [(currentPage)]=\"currentPage\"\n [totalRecords]=\"totalRecords()\" (changed)=\"onPageSettingsChanged()\">\n </upd-paginator>\n </div>\n\n <ng-template #actionsTpl>\n <div class=\"ms-auto d-flex gap-2\">\n @if (!!activeSavedView()) {\n @if (activeSavedView()!.isDefault) {\n <div class=\"ribbon ribbon-top ribbon-start\">\n <upd-icon tablerIcon=\"heart\" [tablerIconSize]=\"20\"></upd-icon>\n </div>\n }\n <div class=\"tag align-self-center py-3 text-primary bg-primary-lt border-primary\"\n updPopover=\"{{ t('CurrentSavedView') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"list-details\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ activeSavedView()!.name }}</span>\n </div>\n }\n @if (hiddenColumns() > 0) {\n <div class=\"tag align-self-center py-3 text-orange bg-orange-lt border-orange\"\n updPopover=\"{{ t('HiddenColumnsTooltip') }}\"\n [updPopoverActAsTooltip]=\"true\">\n <upd-icon tablerIcon=\"eye-off\" [tablerIconSize]=\"20\"></upd-icon>\n <span class=\"me-1\">{{ hiddenColumns() }}</span>\n </div>\n }\n @if (!!activeSavedView() || hiddenColumns() > 0) {\n <upd-button (clicked)=\"resetViewState()\" colorStyle=\"danger\" updPopover=\"{{ t('ResetView') }}\"\n [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\" [isOutline]=\"true\">\n <upd-icon tablerIcon=\"restore\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canSaveViews) {\n <upd-button customClasses=\"gap-2\" [isDisabled]=\"!hasSearchChanged()\" (clicked)=\"openSaveSearchModal()\"\n updPopover=\"{{ t('SaveCurrentView') }}\" [updPopoverActAsTooltip]=\"true\" [isIcon]=\"true\">\n <upd-icon tablerIcon=\"device-floppy\" [tablerIconSize]=\"20\"></upd-icon>\n </upd-button>\n }\n @if (configModel().canManageColumns) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"openColumnsManagerModal()\">\n <upd-icon tablerIcon=\"columns\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('ColumnsManagerButton') }}\n </upd-button>\n }\n @if (configModel().canSaveViews || configModel().canLoadSavedViews) {\n <upd-button customClasses=\"gap-2\" (clicked)=\"isSavedViewsDropdownOpen = true\" #savedViewsBtn>\n <upd-icon tablerIcon=\"folders\" [tablerIconSize]=\"20\"></upd-icon>\n {{ t('SavedViews.ButtonTitle') }}\n </upd-button>\n <upd-dropdown wrapperClasses=\"overflow-x-hidden mt-1\" [isOpen]=\"isSavedViewsDropdownOpen\"\n [dropdownReference]=\"savedViewsRef()\" [items]=\"savedViewsOptions()\" [shouldCloseOnOutsideClick]=\"true\"\n (isOpenChange)=\"isSavedViewsDropdownOpen = $event\" [minWidth]=\"350\" (selectedItem)=\"selectSavedView($event)\">\n @if (savedViewsOptions().length < 1) {\n <span class=\"m-2\">{{ t('NoSavedViews') }}</span>\n }\n </upd-dropdown>\n }\n </div>\n </ng-template>\n</ng-container>\n", styles: [".fixed{table-layout:fixed!important}.fixed td,.fixed th{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.checkbox-selector{width:52px!important}.custom-actions{width:56px!important}.ca-item{transition:all,.5s}.ca-item:hover{width:400px}.grow-left{direction:rtl}.ca-dropdown-content{display:none;background:var(--upd-secondary-lt)}.grow-left:hover .ca-dropdown-content{display:block}\n"] }]
|
|
1224
|
+
}], ctorParameters: () => [] });
|
|
1225
|
+
|
|
1226
|
+
var UpDevs$1 = {
|
|
1227
|
+
Table: {
|
|
1228
|
+
Search: "Search",
|
|
1229
|
+
NoRecordsFoundTitle: "No records found",
|
|
1230
|
+
NoRecordsFoundSubtitle: "Please, adjust your search terms to find what you're looking for",
|
|
1231
|
+
HiddenColumnsTooltip: "Hidden columns",
|
|
1232
|
+
SaveCurrentView: "Save current view",
|
|
1233
|
+
ApplyFilters: "Apply filters",
|
|
1234
|
+
AddNewFilter: "Add new filter",
|
|
1235
|
+
Loading: "Loading",
|
|
1236
|
+
VisibleColumns: "Visible",
|
|
1237
|
+
HiddenColumns: "Hidden",
|
|
1238
|
+
ColumnTitleNotSet: "Title not set",
|
|
1239
|
+
NoSavedViews: "No saved views",
|
|
1240
|
+
CurrentSavedView: "View currently applied",
|
|
1241
|
+
ColumnsManagerButton: "Columns manager",
|
|
1242
|
+
ResetView: "Reset table state",
|
|
1243
|
+
Filters: {
|
|
1244
|
+
General: {
|
|
1245
|
+
Equals: "Equals",
|
|
1246
|
+
NotEquals: "Different than",
|
|
1247
|
+
IsEmpty: "Is empty",
|
|
1248
|
+
IsNotEmpty: "Is not empty"
|
|
1249
|
+
},
|
|
1250
|
+
"String": {
|
|
1251
|
+
StartsWith: "Starts with",
|
|
1252
|
+
EndsWith: "Ends with",
|
|
1253
|
+
Contains: "Contains",
|
|
1254
|
+
NotContains: "Doesn't contain",
|
|
1255
|
+
In: "In"
|
|
1256
|
+
},
|
|
1257
|
+
"Boolean": {
|
|
1258
|
+
True: "True",
|
|
1259
|
+
False: "False"
|
|
1260
|
+
},
|
|
1261
|
+
DateOrNumber: {
|
|
1262
|
+
GreaterThan: "Greater than",
|
|
1263
|
+
LessThan: "Less than",
|
|
1264
|
+
GreaterThanOrEqualTo: "Greater than or equal to",
|
|
1265
|
+
LessThanOrEqualTo: "Less than or equal to"
|
|
1266
|
+
},
|
|
1267
|
+
"Date": {
|
|
1268
|
+
Between: "Between"
|
|
1269
|
+
},
|
|
1270
|
+
"Number": {
|
|
1271
|
+
In: "In"
|
|
1272
|
+
}
|
|
1273
|
+
},
|
|
1274
|
+
ColumnsManager: {
|
|
1275
|
+
Apply: "Apply"
|
|
1276
|
+
},
|
|
1277
|
+
SaveSearch: {
|
|
1278
|
+
Title: "Save view",
|
|
1279
|
+
Save: "Save",
|
|
1280
|
+
Cancel: "Cancel",
|
|
1281
|
+
Name: "Name",
|
|
1282
|
+
IsDefault: "Is default",
|
|
1283
|
+
IsDefaultHint: "If this option is checked, this view will be loaded by default.",
|
|
1284
|
+
NoSavedViews: "No saved views"
|
|
1285
|
+
},
|
|
1286
|
+
SavedViews: {
|
|
1287
|
+
ButtonTitle: "Saved views",
|
|
1288
|
+
MarkAsDefault: "Mark as default (loads on start)",
|
|
1289
|
+
Duplicate: "Duplicate",
|
|
1290
|
+
DuplicateSuffix: "copy",
|
|
1291
|
+
Edit: "Edit",
|
|
1292
|
+
Remove: "Remove",
|
|
1293
|
+
ConfirmRemove: "Are you sure you would like to remove the view \"{{view}}\"?<br><br><b class='text-danger'>This action can not be undone.</b>",
|
|
1294
|
+
NameNotUnique: "There is already a saved view with that name, please choose another."
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
var en = {
|
|
1299
|
+
UpDevs: UpDevs$1
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
var en$1 = /*#__PURE__*/Object.freeze({
|
|
1303
|
+
__proto__: null,
|
|
1304
|
+
UpDevs: UpDevs$1,
|
|
1305
|
+
default: en
|
|
1306
|
+
});
|
|
1307
|
+
|
|
1308
|
+
var UpDevs = {
|
|
1309
|
+
Table: {
|
|
1310
|
+
Search: "Pesquisar",
|
|
1311
|
+
NoRecordsFoundTitle: "Nenhum registro encontrado",
|
|
1312
|
+
NoRecordsFoundSubtitle: "Por favor, ajuste sua pesquisa para encontrar o que você está procurando",
|
|
1313
|
+
HiddenColumnsTooltip: "Colunas ocultas",
|
|
1314
|
+
SaveCurrentView: "Salvar consulta atual",
|
|
1315
|
+
ApplyFilters: "Aplicar filtros",
|
|
1316
|
+
AddNewFilter: "Adicionar novo filtro",
|
|
1317
|
+
Loading: "Carregando",
|
|
1318
|
+
VisibleColumns: "Visíveis",
|
|
1319
|
+
HiddenColumns: "Ocultas",
|
|
1320
|
+
ColumnTitleNotSet: "Título não definido",
|
|
1321
|
+
NoSavedViews: "Nenhuma consulta salva",
|
|
1322
|
+
CurrentSavedView: "Consulta sendo visualizada",
|
|
1323
|
+
ColumnsManagerButton: "Gerenciar colunas",
|
|
1324
|
+
ResetView: "Restaurar a condição tabela",
|
|
1325
|
+
Filters: {
|
|
1326
|
+
General: {
|
|
1327
|
+
Equals: "Igual à",
|
|
1328
|
+
NotEquals: "Diferente de",
|
|
1329
|
+
IsEmpty: "Está vazio",
|
|
1330
|
+
IsNotEmpty: "Não está vazio"
|
|
1331
|
+
},
|
|
1332
|
+
"String": {
|
|
1333
|
+
StartsWith: "Começa com",
|
|
1334
|
+
EndsWith: "Termina com",
|
|
1335
|
+
Contains: "Contém",
|
|
1336
|
+
NotContains: "Não contém",
|
|
1337
|
+
In: "Está em"
|
|
1338
|
+
},
|
|
1339
|
+
"Boolean": {
|
|
1340
|
+
True: "Verdadeiro",
|
|
1341
|
+
False: "Falso"
|
|
1342
|
+
},
|
|
1343
|
+
DateOrNumber: {
|
|
1344
|
+
GreaterThan: "Maior que",
|
|
1345
|
+
LessThan: "Menor que",
|
|
1346
|
+
GreaterThanOrEqualTo: "Maior que ou igual à",
|
|
1347
|
+
LessThanOrEqualTo: "Menor que ou igual à"
|
|
1348
|
+
},
|
|
1349
|
+
"Date": {
|
|
1350
|
+
Between: "Entre"
|
|
1351
|
+
},
|
|
1352
|
+
"Number": {
|
|
1353
|
+
In: "Está em"
|
|
1354
|
+
}
|
|
1355
|
+
},
|
|
1356
|
+
ColumnsManager: {
|
|
1357
|
+
Apply: "Aplicar"
|
|
1358
|
+
},
|
|
1359
|
+
SaveSearch: {
|
|
1360
|
+
Title: "Salvar consulta",
|
|
1361
|
+
Save: "Salvar",
|
|
1362
|
+
Cancel: "Cancelar",
|
|
1363
|
+
Name: "Nome",
|
|
1364
|
+
IsDefault: "É padrão",
|
|
1365
|
+
IsDefaultHint: "Se esta opção estiver marcada, esta consulta será carregada por padrão.",
|
|
1366
|
+
NoSavedViews: "Sem consultas salvas"
|
|
1367
|
+
},
|
|
1368
|
+
SavedViews: {
|
|
1369
|
+
ButtonTitle: "Consultas salvas",
|
|
1370
|
+
MarkAsDefault: "Mark como padrão (carrega automaticamente)",
|
|
1371
|
+
Duplicate: "Duplicar",
|
|
1372
|
+
DuplicateSuffix: "cópia",
|
|
1373
|
+
Edit: "Editar",
|
|
1374
|
+
Remove: "Remover",
|
|
1375
|
+
ConfirmRemove: "Deseja realmente remover a consulta \"{{view}}\"?<br><br><b class='text-danger'>Esta ação não pode ser desfeita.</b>",
|
|
1376
|
+
NameNotUnique: "Já existe uma consulta com esse nome, favor escolher outro."
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
};
|
|
1380
|
+
var pt = {
|
|
1381
|
+
UpDevs: UpDevs
|
|
1382
|
+
};
|
|
1383
|
+
|
|
1384
|
+
var pt$1 = /*#__PURE__*/Object.freeze({
|
|
1385
|
+
__proto__: null,
|
|
1386
|
+
UpDevs: UpDevs,
|
|
1387
|
+
default: pt
|
|
1388
|
+
});
|
|
1389
|
+
|
|
1390
|
+
class FiltersOperandsStore extends BaseStore {
|
|
1391
|
+
constructor(configService) {
|
|
1392
|
+
super({ baseUrl: configService.config.urlToLoadOperandsFromServer || '' });
|
|
1393
|
+
}
|
|
1394
|
+
load(fieldType) {
|
|
1395
|
+
return this._requestService.makeGet(this.getRequestModel(fieldType.toString()));
|
|
1396
|
+
}
|
|
1397
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FiltersOperandsStore, deps: [{ token: UpdTableConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1398
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FiltersOperandsStore }); }
|
|
1399
|
+
}
|
|
1400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: FiltersOperandsStore, decorators: [{
|
|
1401
|
+
type: Injectable
|
|
1402
|
+
}], ctorParameters: () => [{ type: UpdTableConfigService }] });
|
|
1403
|
+
|
|
1404
|
+
const translationKey$3 = 'UpDevs.Table.Filters.General';
|
|
1405
|
+
class FilterOperandsListConfig {
|
|
1406
|
+
static { this.options = {
|
|
1407
|
+
[FilterOperandEnum.Equals]: {
|
|
1408
|
+
operand: FilterOperandEnum.Equals,
|
|
1409
|
+
text: { text: `${translationKey$3}.Equals`, isTranslated: false },
|
|
1410
|
+
icon: { tablerIcon: 'equal' },
|
|
1411
|
+
requiresValue: true
|
|
1412
|
+
},
|
|
1413
|
+
[FilterOperandEnum.NotEquals]: {
|
|
1414
|
+
operand: FilterOperandEnum.NotEquals,
|
|
1415
|
+
text: { text: `${translationKey$3}.NotEquals`, isTranslated: false },
|
|
1416
|
+
icon: { tablerIcon: 'equal-not' },
|
|
1417
|
+
requiresValue: true
|
|
1418
|
+
},
|
|
1419
|
+
[FilterOperandEnum.IsEmpty]: {
|
|
1420
|
+
operand: FilterOperandEnum.IsEmpty,
|
|
1421
|
+
text: { text: `${translationKey$3}.IsEmpty`, isTranslated: false },
|
|
1422
|
+
icon: { tablerIcon: 'droplet' },
|
|
1423
|
+
requiresValue: false
|
|
1424
|
+
},
|
|
1425
|
+
[FilterOperandEnum.IsNotEmpty]: {
|
|
1426
|
+
operand: FilterOperandEnum.IsNotEmpty,
|
|
1427
|
+
text: { text: `${translationKey$3}.IsNotEmpty`, isTranslated: false },
|
|
1428
|
+
icon: { tablerIcon: 'droplet', tablerIconType: 'solid' },
|
|
1429
|
+
requiresValue: false
|
|
1430
|
+
}
|
|
1431
|
+
}; }
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
const translationKey$2 = 'UpDevs.Table.Filters.String';
|
|
1435
|
+
class StringFilterOperandsListModel {
|
|
1436
|
+
static { this.options = {
|
|
1437
|
+
[FilterOperandEnum.Equals]: FilterOperandsListConfig.options[FilterOperandEnum.Equals],
|
|
1438
|
+
[FilterOperandEnum.NotEquals]: FilterOperandsListConfig.options[FilterOperandEnum.NotEquals],
|
|
1439
|
+
[FilterOperandEnum.StartsWith]: {
|
|
1440
|
+
operand: FilterOperandEnum.StartsWith,
|
|
1441
|
+
text: { text: `${translationKey$2}.StartsWith`, isTranslated: false },
|
|
1442
|
+
icon: { tablerIcon: 'brackets-contain-start' },
|
|
1443
|
+
requiresValue: true
|
|
1444
|
+
},
|
|
1445
|
+
[FilterOperandEnum.EndsWith]: {
|
|
1446
|
+
operand: FilterOperandEnum.EndsWith,
|
|
1447
|
+
text: { text: `${translationKey$2}.EndsWith`, isTranslated: false },
|
|
1448
|
+
icon: { tablerIcon: 'brackets-contain-end' },
|
|
1449
|
+
requiresValue: true
|
|
1450
|
+
},
|
|
1451
|
+
[FilterOperandEnum.Contains]: {
|
|
1452
|
+
operand: FilterOperandEnum.Contains,
|
|
1453
|
+
text: { text: `${translationKey$2}.Contains`, isTranslated: false },
|
|
1454
|
+
icon: { tablerIcon: 'brackets-contain' },
|
|
1455
|
+
requiresValue: true
|
|
1456
|
+
},
|
|
1457
|
+
[FilterOperandEnum.NotContains]: {
|
|
1458
|
+
operand: FilterOperandEnum.NotContains,
|
|
1459
|
+
text: { text: `${translationKey$2}.NotContains`, isTranslated: false },
|
|
1460
|
+
icon: { tablerIcon: 'brackets-off' },
|
|
1461
|
+
requiresValue: true
|
|
1462
|
+
},
|
|
1463
|
+
[FilterOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
|
|
1464
|
+
[FilterOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty],
|
|
1465
|
+
[FilterOperandEnum.In]: {
|
|
1466
|
+
operand: FilterOperandEnum.In,
|
|
1467
|
+
text: { text: `${translationKey$2}.In`, isTranslated: false },
|
|
1468
|
+
icon: { tablerIcon: 'spacing-horizontal' },
|
|
1469
|
+
requiresValue: true
|
|
1470
|
+
}
|
|
1471
|
+
}; }
|
|
1472
|
+
static get optionsAsList() {
|
|
1473
|
+
return (Object.values(this.options) || []);
|
|
1474
|
+
}
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
const translationKey$1 = 'UpDevs.Table.Filters.DateOrNumber';
|
|
1478
|
+
class DateOrNumberOperandsListConfig {
|
|
1479
|
+
static { this.options = {
|
|
1480
|
+
[FilterDateOperandEnum.GreaterThan]: {
|
|
1481
|
+
operand: FilterDateOperandEnum.GreaterThan,
|
|
1482
|
+
text: { text: `${translationKey$1}.GreaterThan`, isTranslated: false },
|
|
1483
|
+
icon: { tablerIcon: 'math-greater' },
|
|
1484
|
+
requiresValue: true
|
|
1485
|
+
},
|
|
1486
|
+
[FilterDateOperandEnum.LessThan]: {
|
|
1487
|
+
operand: FilterDateOperandEnum.LessThan,
|
|
1488
|
+
text: { text: `${translationKey$1}.LessThan`, isTranslated: false },
|
|
1489
|
+
icon: { tablerIcon: 'math-lower' },
|
|
1490
|
+
requiresValue: true
|
|
1491
|
+
},
|
|
1492
|
+
[FilterDateOperandEnum.GreaterThanOrEqualTo]: {
|
|
1493
|
+
operand: FilterDateOperandEnum.GreaterThanOrEqualTo,
|
|
1494
|
+
text: { text: `${translationKey$1}.GreaterThanOrEqualTo`, isTranslated: false },
|
|
1495
|
+
icon: { tablerIcon: 'math-equal-greater' },
|
|
1496
|
+
requiresValue: true
|
|
1497
|
+
},
|
|
1498
|
+
[FilterDateOperandEnum.LessThanOrEqualTo]: {
|
|
1499
|
+
operand: FilterDateOperandEnum.LessThanOrEqualTo,
|
|
1500
|
+
text: { text: `${translationKey$1}.LessThanOrEqualTo`, isTranslated: false },
|
|
1501
|
+
icon: { tablerIcon: 'math-equal-lower' },
|
|
1502
|
+
requiresValue: true
|
|
1503
|
+
}
|
|
1504
|
+
}; }
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
class NumberFilterOperandsListModel {
|
|
1508
|
+
static { this.options = {
|
|
1509
|
+
[FilterNumberOperandEnum.Equals]: FilterOperandsListConfig.options[FilterOperandEnum.Equals],
|
|
1510
|
+
[FilterNumberOperandEnum.NotEquals]: FilterOperandsListConfig.options[FilterOperandEnum.NotEquals],
|
|
1511
|
+
[FilterNumberOperandEnum.GreaterThan]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.GreaterThan],
|
|
1512
|
+
[FilterNumberOperandEnum.LessThan]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.LessThan],
|
|
1513
|
+
[FilterNumberOperandEnum.GreaterThanOrEqualTo]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.GreaterThanOrEqualTo],
|
|
1514
|
+
[FilterNumberOperandEnum.LessThanOrEqualTo]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.LessThanOrEqualTo],
|
|
1515
|
+
[FilterNumberOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
|
|
1516
|
+
[FilterNumberOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty],
|
|
1517
|
+
[FilterNumberOperandEnum.In]: {
|
|
1518
|
+
operand: FilterNumberOperandEnum.In,
|
|
1519
|
+
text: { text: 'UpDevs.Table.Filters.Number.In', isTranslated: false },
|
|
1520
|
+
icon: { tablerIcon: 'spacing-horizontal' },
|
|
1521
|
+
requiresValue: true
|
|
1522
|
+
}
|
|
1523
|
+
}; }
|
|
1524
|
+
static get optionsAsList() {
|
|
1525
|
+
return (Object.values(this.options) || []);
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
const translationKey = 'UpDevs.Table.Filters.Boolean';
|
|
1530
|
+
class BooleanFilterOperandsListModel {
|
|
1531
|
+
static { this.options = {
|
|
1532
|
+
[FilterBooleanOperandEnum.True]: {
|
|
1533
|
+
operand: FilterBooleanOperandEnum.True,
|
|
1534
|
+
text: { text: `${translationKey}.True`, isTranslated: false },
|
|
1535
|
+
icon: { tablerIcon: 'toggle-right' },
|
|
1536
|
+
requiresValue: false
|
|
1537
|
+
},
|
|
1538
|
+
[FilterBooleanOperandEnum.False]: {
|
|
1539
|
+
operand: FilterBooleanOperandEnum.False,
|
|
1540
|
+
text: { text: `${translationKey}.False`, isTranslated: false },
|
|
1541
|
+
icon: { tablerIcon: 'toggle-left' },
|
|
1542
|
+
requiresValue: false
|
|
1543
|
+
},
|
|
1544
|
+
[FilterBooleanOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
|
|
1545
|
+
[FilterBooleanOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty]
|
|
1546
|
+
}; }
|
|
1547
|
+
static get optionsAsList() {
|
|
1548
|
+
return (Object.values(this.options) || []);
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
class DateFilterOperandsListModel {
|
|
1553
|
+
static { this.options = {
|
|
1554
|
+
[FilterDateOperandEnum.Equals]: FilterOperandsListConfig.options[FilterOperandEnum.Equals],
|
|
1555
|
+
[FilterDateOperandEnum.NotEquals]: FilterOperandsListConfig.options[FilterOperandEnum.NotEquals],
|
|
1556
|
+
[FilterDateOperandEnum.GreaterThan]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.GreaterThan],
|
|
1557
|
+
[FilterDateOperandEnum.LessThan]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.LessThan],
|
|
1558
|
+
[FilterDateOperandEnum.GreaterThanOrEqualTo]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.GreaterThanOrEqualTo],
|
|
1559
|
+
[FilterDateOperandEnum.LessThanOrEqualTo]: DateOrNumberOperandsListConfig.options[FilterDateOperandEnum.LessThanOrEqualTo],
|
|
1560
|
+
[FilterDateOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
|
|
1561
|
+
[FilterDateOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty],
|
|
1562
|
+
[FilterDateOperandEnum.Between]: {
|
|
1563
|
+
operand: FilterDateOperandEnum.Between,
|
|
1564
|
+
text: { text: 'UpDevs.Table.Filters.Date.Between', isTranslated: false },
|
|
1565
|
+
icon: { tablerIcon: 'spacing-horizontal' },
|
|
1566
|
+
requiresValue: true
|
|
1567
|
+
}
|
|
1568
|
+
}; }
|
|
1569
|
+
static get optionsAsList() {
|
|
1570
|
+
return (Object.values(this.options) || []);
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
class GuidFilterOperandsListModel {
|
|
1575
|
+
static { this.options = {
|
|
1576
|
+
[FilterGuidOperandEnum.Equals]: FilterOperandsListConfig.options[FilterOperandEnum.Equals],
|
|
1577
|
+
[FilterGuidOperandEnum.NotEquals]: FilterOperandsListConfig.options[FilterOperandEnum.NotEquals],
|
|
1578
|
+
[FilterGuidOperandEnum.IsEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsEmpty],
|
|
1579
|
+
[FilterGuidOperandEnum.IsNotEmpty]: FilterOperandsListConfig.options[FilterOperandEnum.IsNotEmpty],
|
|
1580
|
+
[FilterGuidOperandEnum.In]: StringFilterOperandsListModel.options[FilterOperandEnum.In]
|
|
1581
|
+
}; }
|
|
1582
|
+
static get optionsAsList() {
|
|
1583
|
+
return (Object.values(this.options) || []);
|
|
1584
|
+
}
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
class DefaultFiltersOperandsService extends FiltersOperandsService {
|
|
1588
|
+
get isLoaded() {
|
|
1589
|
+
return this._isLoaded;
|
|
1590
|
+
}
|
|
1591
|
+
constructor() {
|
|
1592
|
+
super();
|
|
1593
|
+
this._isLoaded = false;
|
|
1594
|
+
this.configService = inject(UpdTableConfigService);
|
|
1595
|
+
this.filterOperandsStore = inject(FiltersOperandsStore);
|
|
1596
|
+
this.cachedData = {};
|
|
1597
|
+
if (!!this.configService.config.urlToLoadOperandsFromServer) {
|
|
1598
|
+
forkJoin({
|
|
1599
|
+
guidOps: this.filterOperandsStore.load(DataTypeEnum.Guid),
|
|
1600
|
+
stringOps: this.filterOperandsStore.load(DataTypeEnum.String),
|
|
1601
|
+
numberOps: this.filterOperandsStore.load(DataTypeEnum.Number),
|
|
1602
|
+
dateOps: this.filterOperandsStore.load(DataTypeEnum.Date),
|
|
1603
|
+
booleanOps: this.filterOperandsStore.load(DataTypeEnum.Boolean)
|
|
1604
|
+
}).subscribe(resp => {
|
|
1605
|
+
this.cachedData[DataTypeEnum.Guid] = resp.guidOps;
|
|
1606
|
+
this.cachedData[DataTypeEnum.String] = resp.stringOps;
|
|
1607
|
+
this.cachedData[DataTypeEnum.Number] = resp.numberOps;
|
|
1608
|
+
this.cachedData[DataTypeEnum.Date] = resp.dateOps;
|
|
1609
|
+
this.cachedData[DataTypeEnum.Boolean] = resp.booleanOps;
|
|
1610
|
+
this._isLoaded = true;
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1613
|
+
else {
|
|
1614
|
+
this.cachedData[DataTypeEnum.Guid] = GuidFilterOperandsListModel.optionsAsList;
|
|
1615
|
+
this.cachedData[DataTypeEnum.String] = StringFilterOperandsListModel.optionsAsList;
|
|
1616
|
+
this.cachedData[DataTypeEnum.Number] = NumberFilterOperandsListModel.optionsAsList;
|
|
1617
|
+
this.cachedData[DataTypeEnum.Date] = DateFilterOperandsListModel.optionsAsList;
|
|
1618
|
+
this.cachedData[DataTypeEnum.Boolean] = BooleanFilterOperandsListModel.optionsAsList;
|
|
1619
|
+
this._isLoaded = true;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
getOperands(type) {
|
|
1623
|
+
return this._isLoaded ? this.cachedData[type] : [];
|
|
1624
|
+
}
|
|
1625
|
+
getAllOperands() {
|
|
1626
|
+
return this.cachedData;
|
|
1627
|
+
}
|
|
1628
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DefaultFiltersOperandsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1629
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DefaultFiltersOperandsService }); }
|
|
1630
|
+
}
|
|
1631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: DefaultFiltersOperandsService, decorators: [{
|
|
1632
|
+
type: Injectable
|
|
1633
|
+
}], ctorParameters: () => [] });
|
|
1634
|
+
|
|
1635
|
+
class UpdTableModule {
|
|
1636
|
+
constructor(translocoService) {
|
|
1637
|
+
translocoService.setFallbackLangForMissingTranslation({ fallbackLang: 'en' });
|
|
1638
|
+
translocoService.setTranslation(en$1, 'en');
|
|
1639
|
+
translocoService.setTranslation(pt$1, 'pt');
|
|
1640
|
+
}
|
|
1641
|
+
/**
|
|
1642
|
+
* Sets up the table module with the provided configuration.
|
|
1643
|
+
* @param config Configuration.
|
|
1644
|
+
*/
|
|
1645
|
+
static forRoot(config) {
|
|
1646
|
+
const customizableProviders = [
|
|
1647
|
+
config.filtersOperandsService || {
|
|
1648
|
+
provide: FiltersOperandsService,
|
|
1649
|
+
useClass: DefaultFiltersOperandsService
|
|
1650
|
+
}
|
|
1651
|
+
];
|
|
1652
|
+
return {
|
|
1653
|
+
ngModule: UpdTableModule,
|
|
1654
|
+
providers: [
|
|
1655
|
+
{ provide: TableConstants.defaultOptionsInjectionToken, useValue: config },
|
|
1656
|
+
...customizableProviders
|
|
1657
|
+
]
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableModule, deps: [{ token: i1$1.TranslocoService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1661
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.0", ngImport: i0, type: UpdTableModule, declarations: [TableComponent,
|
|
1662
|
+
SearchSectionComponent,
|
|
1663
|
+
FilterRowComponent,
|
|
1664
|
+
TableColumnDirective,
|
|
1665
|
+
NumberColumnComponent,
|
|
1666
|
+
DateTimeColumnComponent,
|
|
1667
|
+
BooleanColumnComponent,
|
|
1668
|
+
TextColumnComponent,
|
|
1669
|
+
ColumnsManagerComponent,
|
|
1670
|
+
SaveSearchComponent], imports: [CommonModule,
|
|
1671
|
+
TranslocoDirective,
|
|
1672
|
+
UpdIconsModule,
|
|
1673
|
+
UpdButtonModule,
|
|
1674
|
+
UpdModalModule,
|
|
1675
|
+
UpdPaginatorModule,
|
|
1676
|
+
UpdInputModule,
|
|
1677
|
+
UpdCheckboxModule,
|
|
1678
|
+
UpdSelectModule,
|
|
1679
|
+
UpdDragAndDropModule,
|
|
1680
|
+
UpdFormModule,
|
|
1681
|
+
UpdDropdownModule,
|
|
1682
|
+
UpdTimePickerModule,
|
|
1683
|
+
UpdBadgeModule,
|
|
1684
|
+
UpdPopoverModule], exports: [TableComponent,
|
|
1685
|
+
TableColumnDirective] }); }
|
|
1686
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableModule, providers: [
|
|
1687
|
+
UpdTableConfigService,
|
|
1688
|
+
FiltersOperandsStore,
|
|
1689
|
+
SavedViewsStorage
|
|
1690
|
+
], imports: [CommonModule,
|
|
1691
|
+
UpdIconsModule,
|
|
1692
|
+
UpdButtonModule,
|
|
1693
|
+
UpdModalModule,
|
|
1694
|
+
UpdPaginatorModule,
|
|
1695
|
+
UpdInputModule,
|
|
1696
|
+
UpdCheckboxModule,
|
|
1697
|
+
UpdSelectModule,
|
|
1698
|
+
UpdDragAndDropModule,
|
|
1699
|
+
UpdFormModule,
|
|
1700
|
+
UpdDropdownModule,
|
|
1701
|
+
UpdTimePickerModule,
|
|
1702
|
+
UpdBadgeModule,
|
|
1703
|
+
UpdPopoverModule] }); }
|
|
1704
|
+
}
|
|
1705
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.0", ngImport: i0, type: UpdTableModule, decorators: [{
|
|
1706
|
+
type: NgModule,
|
|
1707
|
+
args: [{
|
|
1708
|
+
imports: [
|
|
1709
|
+
CommonModule,
|
|
1710
|
+
TranslocoDirective,
|
|
1711
|
+
UpdIconsModule,
|
|
1712
|
+
UpdButtonModule,
|
|
1713
|
+
UpdModalModule,
|
|
1714
|
+
UpdPaginatorModule,
|
|
1715
|
+
UpdInputModule,
|
|
1716
|
+
UpdCheckboxModule,
|
|
1717
|
+
UpdSelectModule,
|
|
1718
|
+
UpdDragAndDropModule,
|
|
1719
|
+
UpdFormModule,
|
|
1720
|
+
UpdDropdownModule,
|
|
1721
|
+
UpdTimePickerModule,
|
|
1722
|
+
UpdBadgeModule,
|
|
1723
|
+
UpdPopoverModule
|
|
1724
|
+
],
|
|
1725
|
+
declarations: [
|
|
1726
|
+
TableComponent,
|
|
1727
|
+
SearchSectionComponent,
|
|
1728
|
+
FilterRowComponent,
|
|
1729
|
+
TableColumnDirective,
|
|
1730
|
+
NumberColumnComponent,
|
|
1731
|
+
DateTimeColumnComponent,
|
|
1732
|
+
BooleanColumnComponent,
|
|
1733
|
+
TextColumnComponent,
|
|
1734
|
+
ColumnsManagerComponent,
|
|
1735
|
+
SaveSearchComponent
|
|
1736
|
+
],
|
|
1737
|
+
exports: [
|
|
1738
|
+
TableComponent,
|
|
1739
|
+
TableColumnDirective
|
|
1740
|
+
],
|
|
1741
|
+
providers: [
|
|
1742
|
+
UpdTableConfigService,
|
|
1743
|
+
FiltersOperandsStore,
|
|
1744
|
+
SavedViewsStorage
|
|
1745
|
+
]
|
|
1746
|
+
}]
|
|
1747
|
+
}], ctorParameters: () => [{ type: i1$1.TranslocoService }] });
|
|
1748
|
+
|
|
1749
|
+
/**
|
|
1750
|
+
* Generated bundle index. Do not edit.
|
|
1751
|
+
*/
|
|
1752
|
+
|
|
1753
|
+
export { BaseColumnModel, BooleanColumnModel, ColumnTypeEnum, DateTimeColumnModel, FiltersOperandsService, GuidColumnModel, ImageColumnModel, NumberColumnModel, TableColumnDirective, TableComponent, TextColumnModel, UpdTableModule };
|
|
1754
|
+
//# sourceMappingURL=updevs-components-table.mjs.map
|