@unipin/angular-applet 18.9.5 → 18.9.6
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 +8 -11
- package/esm2022/graphql/generated.mjs +938 -0
- package/esm2022/lib/components/approval/detail/approval-detail.component.mjs +78 -0
- package/esm2022/lib/components/approval/form/approval-form.component.mjs +128 -0
- package/esm2022/lib/components/approval/index.mjs +5 -0
- package/esm2022/lib/components/approval/list/approval-list.component.mjs +114 -0
- package/esm2022/lib/components/approval/list/provide-approval-entities.util.mjs +9 -0
- package/esm2022/lib/components/approval/services/approval.service.mjs +46 -0
- package/esm2022/lib/components/audit/detail/audit-detail.component.mjs +123 -0
- package/esm2022/lib/components/audit/index.mjs +3 -0
- package/esm2022/lib/components/audit/list/audit-list.component.mjs +81 -0
- package/esm2022/lib/components/audit/service/audit.service.mjs +49 -0
- package/esm2022/lib/components/audit/types/audit-detail-form.type.mjs +2 -0
- package/esm2022/lib/components/buttons/group/btn-group.component.mjs +43 -0
- package/esm2022/lib/components/buttons/group/interfaces/btn-group-config.interface.mjs +2 -0
- package/esm2022/lib/components/buttons/index.mjs +3 -0
- package/esm2022/lib/components/buttons/loading/btn-loading.component.mjs +48 -0
- package/esm2022/lib/components/containers/applet-container/applet-container.component.mjs +55 -0
- package/esm2022/lib/components/containers/applet-container/provide-applet-config.util.mjs +9 -0
- package/esm2022/lib/components/containers/colum-header-container/column-header-container.component.mjs +23 -0
- package/esm2022/lib/components/containers/column-container/column-container.component.mjs +79 -0
- package/esm2022/lib/components/containers/column-container/directives/lazy-route.directive.mjs +57 -0
- package/esm2022/lib/components/containers/index.mjs +7 -0
- package/esm2022/lib/components/containers/list-container/index.mjs +3 -0
- package/esm2022/lib/components/containers/list-container/interfaces/list-container-config.interface.mjs +2 -0
- package/esm2022/lib/components/containers/list-container/list-pagination-container/list-pagination-container.component.mjs +58 -0
- package/esm2022/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.component.mjs +57 -0
- package/esm2022/lib/components/containers/modal-container/modal-container.component.mjs +40 -0
- package/esm2022/lib/components/filter/filter.component.mjs +222 -0
- package/esm2022/lib/components/filter/index.mjs +2 -0
- package/esm2022/lib/components/filter/interfaces/filter-config.interface.mjs +2 -0
- package/esm2022/lib/components/filter/interfaces/filter-field.interface.mjs +2 -0
- package/esm2022/lib/components/filter/interfaces/filter-search-event.interface.mjs +2 -0
- package/esm2022/lib/components/forms/country-input/form-country-input.component.mjs +122 -0
- package/esm2022/lib/components/forms/currency-input/form-currency-input.component.mjs +157 -0
- package/esm2022/lib/components/forms/date/form-date.component.mjs +117 -0
- package/esm2022/lib/components/forms/image-picker/directives/drag-n-drop.directive.mjs +49 -0
- package/esm2022/lib/components/forms/image-picker/form-image-picker.component.mjs +68 -0
- package/esm2022/lib/components/forms/index.mjs +12 -0
- package/esm2022/lib/components/forms/input/form-input.component.mjs +98 -0
- package/esm2022/lib/components/forms/number/form-number.component.mjs +97 -0
- package/esm2022/lib/components/forms/number/pipes/locale-number.pipe.mjs +33 -0
- package/esm2022/lib/components/forms/password/form-password.component.mjs +100 -0
- package/esm2022/lib/components/forms/rate-group-code-input/form-rate-group-code-input.component.mjs +135 -0
- package/esm2022/lib/components/forms/searchable-select/form-searchable-select.component.mjs +138 -0
- package/esm2022/lib/components/forms/select/form-select.component.mjs +119 -0
- package/esm2022/lib/components/forms/textarea/form-textarea.component.mjs +88 -0
- package/esm2022/lib/components/grids/grid-pagination/grid-pagination.component.mjs +111 -0
- package/esm2022/lib/components/grids/grid-snapshot/grid-snapshot.component.mjs +109 -0
- package/esm2022/lib/components/grids/index.mjs +4 -0
- package/esm2022/lib/components/grids/interfaces/grid-config.interface.mjs +2 -0
- package/esm2022/lib/components/grids/services/grid.service.mjs +25 -0
- package/esm2022/lib/components/index.mjs +9 -0
- package/esm2022/lib/components/infinite-scroll/directive/infinite-scroll.directive.mjs +43 -0
- package/esm2022/lib/components/infinite-scroll/index.mjs +3 -0
- package/esm2022/lib/components/infinite-scroll/infinite-scroll.component.mjs +36 -0
- package/esm2022/lib/components/tabs/index.mjs +3 -0
- package/esm2022/lib/components/tabs/tab-content/tab-content.component.mjs +37 -0
- package/esm2022/lib/components/tabs/tab-group/tab-group.component.mjs +47 -0
- package/esm2022/lib/guards/auth/auth.guard.mjs +10 -0
- package/esm2022/lib/guards/index.mjs +2 -0
- package/esm2022/lib/interceptors/header/header.interceptor.mjs +29 -0
- package/esm2022/lib/interceptors/index.mjs +3 -0
- package/esm2022/lib/interceptors/refresh-token/refresh-token.interceptor.mjs +83 -0
- package/esm2022/lib/interfaces/index.mjs +2 -0
- package/esm2022/lib/interfaces/user/user.interface.mjs +2 -0
- package/esm2022/lib/modules/index.mjs +3 -0
- package/esm2022/lib/modules/micro-frontend/index.mjs +2 -0
- package/esm2022/lib/modules/micro-frontend/utils/mf-bootstrap.util.mjs +55 -0
- package/esm2022/lib/modules/micro-frontend/utils/mf-global-state.util.mjs +14 -0
- package/esm2022/lib/modules/permission/directive/permission.directive.mjs +41 -0
- package/esm2022/lib/modules/permission/guards/permission.guard.mjs +26 -0
- package/esm2022/lib/modules/permission/index.mjs +7 -0
- package/esm2022/lib/modules/permission/pages/401/unauthorized.page.mjs +15 -0
- package/esm2022/lib/modules/permission/pages/loading/loading.page.mjs +65 -0
- package/esm2022/lib/modules/permission/pages/loading/provide-loading-config.util.mjs +9 -0
- package/esm2022/lib/modules/permission/services/permission.service.mjs +50 -0
- package/esm2022/lib/resolvers/auth/auth.resolver.mjs +87 -0
- package/esm2022/lib/resolvers/index.mjs +2 -0
- package/esm2022/lib/services/auth/auth.service.mjs +171 -0
- package/esm2022/lib/services/country/country.service.mjs +43 -0
- package/esm2022/lib/services/currency/currency.service.mjs +40 -0
- package/esm2022/lib/services/index.mjs +6 -0
- package/esm2022/lib/services/profile/profile.service.mjs +82 -0
- package/esm2022/lib/services/rate-group-code/rate-group-code.service.mjs +31 -0
- package/esm2022/lib/utils/contrast-color-generator/contrast-color-generator.util.mjs +16 -0
- package/esm2022/lib/utils/form-error-message/form-error-message.util.mjs +21 -0
- package/esm2022/lib/utils/format-capitalize/format-capitalize.util.mjs +18 -0
- package/esm2022/lib/utils/index.mjs +5 -0
- package/esm2022/lib/utils/redirect-to-first-menu/redirect-to-first-menu.util.mjs +9 -0
- package/esm2022/public-api.mjs +10 -0
- package/esm2022/unipin-angular-applet.mjs +2 -0
- package/fesm2022/unipin-angular-applet.mjs +4620 -0
- package/fesm2022/unipin-angular-applet.mjs.map +1 -0
- package/graphql/generated.d.ts +16225 -0
- package/index.d.ts +2 -0
- package/lib/components/approval/detail/approval-detail.component.d.ts +26 -0
- package/lib/components/approval/form/approval-form.component.d.ts +33 -0
- package/{projects/unipin-angular/src/lib/components/approval/index.ts → lib/components/approval/index.d.ts} +0 -1
- package/lib/components/approval/list/approval-list.component.d.ts +33 -0
- package/lib/components/approval/list/provide-approval-entities.util.d.ts +3 -0
- package/lib/components/approval/services/approval.service.d.ts +18 -0
- package/lib/components/audit/detail/audit-detail.component.d.ts +33 -0
- package/lib/components/audit/list/audit-list.component.d.ts +31 -0
- package/lib/components/audit/service/audit.service.d.ts +15 -0
- package/lib/components/audit/types/audit-detail-form.type.d.ts +12 -0
- package/lib/components/buttons/group/btn-group.component.d.ts +18 -0
- package/lib/components/buttons/group/interfaces/btn-group-config.interface.d.ts +11 -0
- package/lib/components/buttons/loading/btn-loading.component.d.ts +19 -0
- package/lib/components/containers/applet-container/applet-container.component.d.ts +22 -0
- package/lib/components/containers/applet-container/provide-applet-config.util.d.ts +15 -0
- package/lib/components/containers/colum-header-container/column-header-container.component.d.ts +7 -0
- package/lib/components/containers/column-container/column-container.component.d.ts +26 -0
- package/lib/components/containers/column-container/directives/lazy-route.directive.d.ts +17 -0
- package/{projects/unipin-angular/src/lib/components/containers/index.ts → lib/components/containers/index.d.ts} +0 -1
- package/{projects/unipin-angular/src/lib/components/containers/list-container/interfaces/list-container-config.interface.ts → lib/components/containers/list-container/interfaces/list-container-config.interface.d.ts} +4 -5
- package/lib/components/containers/list-container/list-pagination-container/list-pagination-container.component.d.ts +23 -0
- package/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.component.d.ts +23 -0
- package/lib/components/containers/modal-container/modal-container.component.d.ts +16 -0
- package/lib/components/filter/filter.component.d.ts +44 -0
- package/{projects/unipin-angular/src/lib/components/filter/index.ts → lib/components/filter/index.d.ts} +1 -1
- package/lib/components/filter/interfaces/filter-config.interface.d.ts +5 -0
- package/lib/components/filter/interfaces/filter-field.interface.d.ts +24 -0
- package/lib/components/filter/interfaces/filter-search-event.interface.d.ts +4 -0
- package/lib/components/forms/country-input/form-country-input.component.d.ts +41 -0
- package/lib/components/forms/currency-input/form-currency-input.component.d.ts +52 -0
- package/lib/components/forms/date/form-date.component.d.ts +33 -0
- package/lib/components/forms/image-picker/directives/drag-n-drop.directive.d.ts +10 -0
- package/lib/components/forms/image-picker/form-image-picker.component.d.ts +21 -0
- package/lib/components/forms/input/form-input.component.d.ts +31 -0
- package/lib/components/forms/number/form-number.component.d.ts +27 -0
- package/lib/components/forms/number/pipes/locale-number.pipe.d.ts +8 -0
- package/lib/components/forms/password/form-password.component.d.ts +27 -0
- package/lib/components/forms/rate-group-code-input/form-rate-group-code-input.component.d.ts +41 -0
- package/lib/components/forms/searchable-select/form-searchable-select.component.d.ts +42 -0
- package/lib/components/forms/select/form-select.component.d.ts +34 -0
- package/lib/components/forms/textarea/form-textarea.component.d.ts +26 -0
- package/lib/components/grids/grid-pagination/grid-pagination.component.d.ts +33 -0
- package/lib/components/grids/grid-snapshot/grid-snapshot.component.d.ts +36 -0
- package/lib/components/grids/interfaces/grid-config.interface.d.ts +16 -0
- package/lib/components/grids/services/grid.service.d.ts +12 -0
- package/{projects/unipin-angular/src/lib/components/index.ts → lib/components/index.d.ts} +2 -14
- package/lib/components/infinite-scroll/directive/infinite-scroll.directive.d.ts +15 -0
- package/lib/components/infinite-scroll/infinite-scroll.component.d.ts +12 -0
- package/{projects/unipin-angular/src/lib/components/tabs/index.ts → lib/components/tabs/index.d.ts} +2 -3
- package/lib/components/tabs/tab-content/tab-content.component.d.ts +14 -0
- package/lib/components/tabs/tab-group/tab-group.component.d.ts +18 -0
- package/lib/guards/auth/auth.guard.d.ts +1 -0
- package/lib/interceptors/header/header.interceptor.d.ts +9 -0
- package/lib/interceptors/refresh-token/refresh-token.interceptor.d.ts +14 -0
- package/lib/interfaces/user/user.interface.d.ts +27 -0
- package/lib/modules/index.d.ts +2 -0
- package/lib/modules/micro-frontend/utils/mf-bootstrap.util.d.ts +9 -0
- package/lib/modules/micro-frontend/utils/mf-global-state.util.d.ts +4 -0
- package/lib/modules/permission/directive/permission.directive.d.ts +16 -0
- package/lib/modules/permission/guards/permission.guard.d.ts +2 -0
- package/{projects/unipin-angular/src/lib/modules/permission/index.ts → lib/modules/permission/index.d.ts} +0 -1
- package/lib/modules/permission/pages/401/unauthorized.page.d.ts +5 -0
- package/lib/modules/permission/pages/loading/loading.page.d.ts +18 -0
- package/lib/modules/permission/pages/loading/provide-loading-config.util.d.ts +10 -0
- package/lib/modules/permission/services/permission.service.d.ts +21 -0
- package/lib/resolvers/auth/auth.resolver.d.ts +14 -0
- package/lib/services/auth/auth.service.d.ts +39 -0
- package/lib/services/country/country.service.d.ts +16 -0
- package/lib/services/currency/currency.service.d.ts +16 -0
- package/lib/services/profile/profile.service.d.ts +12 -0
- package/lib/services/rate-group-code/rate-group-code.service.d.ts +14 -0
- package/lib/utils/contrast-color-generator/contrast-color-generator.util.d.ts +4 -0
- package/lib/utils/form-error-message/form-error-message.util.d.ts +2 -0
- package/lib/utils/format-capitalize/format-capitalize.util.d.ts +1 -0
- package/lib/utils/redirect-to-first-menu/redirect-to-first-menu.util.d.ts +2 -0
- package/package.json +38 -86
- package/public-api.d.ts +11 -0
- package/.editorconfig +0 -16
- package/.eslintrc.json +0 -72
- package/.github/ISSUE_TEMPLATE/bug_fix.yml +0 -60
- package/.github/ISSUE_TEMPLATE/dependency_update.yml +0 -20
- package/.github/ISSUE_TEMPLATE/documentation.yml +0 -13
- package/.github/ISSUE_TEMPLATE/engineering.yml +0 -22
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -38
- package/.github/ISSUE_TEMPLATE/testing.yml +0 -38
- package/.github/dependabot.yml +0 -11
- package/.github/pull_request_template.md +0 -77
- package/.github/workflows/npm_publish.yml +0 -52
- package/.storybook/main.ts +0 -28
- package/.storybook/preview.ts +0 -19
- package/.storybook/test-runner.ts +0 -29
- package/.storybook/tsconfig.json +0 -14
- package/.storybook/typings.d.ts +0 -4
- package/.vscode/extensions.json +0 -7
- package/.vscode/launch.json +0 -20
- package/.vscode/settings.json +0 -16
- package/.vscode/tasks.json +0 -42
- package/angular.json +0 -102
- package/codegen.yml +0 -8
- package/projects/unipin-angular/README.md +0 -24
- package/projects/unipin-angular/documentation.json +0 -116258
- package/projects/unipin-angular/ng-package.json +0 -19
- package/projects/unipin-angular/package-lock.json +0 -23
- package/projects/unipin-angular/package.json +0 -32
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_accordion.scss +0 -149
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_alert.scss +0 -71
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_badge.scss +0 -38
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_breadcrumb.scss +0 -40
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_button-group.scss +0 -142
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_buttons.scss +0 -209
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_card.scss +0 -234
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_carousel.scss +0 -226
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_close.scss +0 -40
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_containers.scss +0 -41
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_dropdown.scss +0 -249
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_forms.scss +0 -9
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_functions.scss +0 -302
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_grid.scss +0 -33
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_helpers.scss +0 -10
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_images.scss +0 -42
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_list-group.scss +0 -192
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_maps.scss +0 -54
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_mixins.scss +0 -43
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_modal.scss +0 -237
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_nav.scss +0 -172
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_navbar.scss +0 -278
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_offcanvas.scss +0 -144
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_pagination.scss +0 -109
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_placeholders.scss +0 -51
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_popover.scss +0 -196
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_progress.scss +0 -59
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_reboot.scss +0 -610
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_root.scss +0 -73
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_spinners.scss +0 -85
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_tables.scss +0 -164
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_toasts.scss +0 -73
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_tooltip.scss +0 -120
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_transitions.scss +0 -27
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_type.scss +0 -106
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_utilities.scss +0 -647
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/_variables.scss +0 -1634
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/bootstrap-grid.scss +0 -64
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/bootstrap-reboot.scss +0 -9
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/bootstrap-utilities.scss +0 -18
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/bootstrap.scss +0 -24
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_floating-labels.scss +0 -75
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_form-check.scss +0 -175
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_form-control.scss +0 -195
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_form-range.scss +0 -91
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_form-select.scss +0 -71
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_form-text.scss +0 -11
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_input-group.scss +0 -132
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_labels.scss +0 -36
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/forms/_validation.scss +0 -12
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_clearfix.scss +0 -3
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_color-bg.scss +0 -10
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_colored-links.scss +0 -12
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_position.scss +0 -36
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_ratio.scss +0 -26
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_stacks.scss +0 -15
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_stretched-link.scss +0 -15
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_text-truncation.scss +0 -7
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_visually-hidden.scss +0 -8
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/helpers/_vr.scss +0 -8
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_alert.scss +0 -15
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_backdrop.scss +0 -14
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_banner.scss +0 -9
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_border-radius.scss +0 -78
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_box-shadow.scss +0 -18
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_breakpoints.scss +0 -127
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_buttons.scss +0 -70
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_caret.scss +0 -64
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_clearfix.scss +0 -9
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_color-scheme.scss +0 -7
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_container.scss +0 -11
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_deprecate.scss +0 -10
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_forms.scss +0 -152
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_gradients.scss +0 -47
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_grid.scss +0 -151
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_image.scss +0 -16
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_list-group.scss +0 -24
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_lists.scss +0 -7
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_pagination.scss +0 -10
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_reset-text.scss +0 -17
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_resize.scss +0 -6
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_table-variants.scss +0 -24
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_text-truncate.scss +0 -8
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_transition.scss +0 -26
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_utilities.scss +0 -97
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/mixins/_visually-hidden.scss +0 -29
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/utilities/_api.scss +0 -47
- package/projects/unipin-angular/src/assets/private/scss/bootstrap/vendor/_rfs.scss +0 -354
- package/projects/unipin-angular/src/assets/private/scss/theme/variables.scss +0 -59
- package/projects/unipin-angular/src/graphql/generated.d.ts +0 -715
- package/projects/unipin-angular/src/graphql/generated.mjs +0 -49
- package/projects/unipin-angular/src/graphql/generated.ts +0 -19998
- package/projects/unipin-angular/src/lib/components/approval/detail/approval-detail.component.html +0 -14
- package/projects/unipin-angular/src/lib/components/approval/detail/approval-detail.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/approval/detail/approval-detail.component.ts +0 -90
- package/projects/unipin-angular/src/lib/components/approval/detail/approval-detail.stories.ts +0 -61
- package/projects/unipin-angular/src/lib/components/approval/form/approval-form.component.html +0 -41
- package/projects/unipin-angular/src/lib/components/approval/form/approval-form.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/approval/form/approval-form.component.ts +0 -152
- package/projects/unipin-angular/src/lib/components/approval/form/approval-form.stories.ts +0 -111
- package/projects/unipin-angular/src/lib/components/approval/list/approval-list.component.html +0 -15
- package/projects/unipin-angular/src/lib/components/approval/list/approval-list.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/approval/list/approval-list.component.ts +0 -136
- package/projects/unipin-angular/src/lib/components/approval/list/approval-list.stories.ts +0 -141
- package/projects/unipin-angular/src/lib/components/approval/list/provide-approval-entities.util.ts +0 -10
- package/projects/unipin-angular/src/lib/components/approval/services/approval.service.ts +0 -46
- package/projects/unipin-angular/src/lib/components/audit/detail/audit-detail.component.html +0 -50
- package/projects/unipin-angular/src/lib/components/audit/detail/audit-detail.component.scss +0 -4
- package/projects/unipin-angular/src/lib/components/audit/detail/audit-detail.component.spec.ts +0 -51
- package/projects/unipin-angular/src/lib/components/audit/detail/audit-detail.component.ts +0 -141
- package/projects/unipin-angular/src/lib/components/audit/detail/audit-detail.stories.ts +0 -126
- package/projects/unipin-angular/src/lib/components/audit/list/audit-list.component.html +0 -5
- package/projects/unipin-angular/src/lib/components/audit/list/audit-list.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/audit/list/audit-list.component.ts +0 -85
- package/projects/unipin-angular/src/lib/components/audit/list/audit-list.stories.ts +0 -170
- package/projects/unipin-angular/src/lib/components/audit/service/audit.service.ts +0 -48
- package/projects/unipin-angular/src/lib/components/audit/types/audit-detail-form.type.ts +0 -13
- package/projects/unipin-angular/src/lib/components/buttons/group/btn-group.component.html +0 -42
- package/projects/unipin-angular/src/lib/components/buttons/group/btn-group.component.scss +0 -19
- package/projects/unipin-angular/src/lib/components/buttons/group/btn-group.component.ts +0 -72
- package/projects/unipin-angular/src/lib/components/buttons/group/btn-group.stories.ts +0 -132
- package/projects/unipin-angular/src/lib/components/buttons/group/interfaces/btn-group-config.interface.ts +0 -63
- package/projects/unipin-angular/src/lib/components/buttons/loading/btn-loading.component.html +0 -9
- package/projects/unipin-angular/src/lib/components/buttons/loading/btn-loading.component.scss +0 -8
- package/projects/unipin-angular/src/lib/components/buttons/loading/btn-loading.component.ts +0 -87
- package/projects/unipin-angular/src/lib/components/buttons/loading/btn-loading.stories.ts +0 -188
- package/projects/unipin-angular/src/lib/components/containers/applet-container/applet-container.component.html +0 -39
- package/projects/unipin-angular/src/lib/components/containers/applet-container/applet-container.component.scss +0 -68
- package/projects/unipin-angular/src/lib/components/containers/applet-container/applet-container.component.ts +0 -98
- package/projects/unipin-angular/src/lib/components/containers/applet-container/provide-applet-config.util.ts +0 -23
- package/projects/unipin-angular/src/lib/components/containers/colum-header-container/column-header-container.component.html +0 -17
- package/projects/unipin-angular/src/lib/components/containers/colum-header-container/column-header-container.component.scss +0 -4
- package/projects/unipin-angular/src/lib/components/containers/colum-header-container/column-header-container.component.ts +0 -32
- package/projects/unipin-angular/src/lib/components/containers/colum-header-container/column-header.stories.ts +0 -77
- package/projects/unipin-angular/src/lib/components/containers/column-container/column-container.component.html +0 -17
- package/projects/unipin-angular/src/lib/components/containers/column-container/column-container.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/containers/column-container/column-container.component.ts +0 -139
- package/projects/unipin-angular/src/lib/components/containers/column-container/directives/lazy-route.directive.ts +0 -86
- package/projects/unipin-angular/src/lib/components/containers/list-container/list-pagination-container/list-pagination-container.component.html +0 -19
- package/projects/unipin-angular/src/lib/components/containers/list-container/list-pagination-container/list-pagination-container.component.scss +0 -7
- package/projects/unipin-angular/src/lib/components/containers/list-container/list-pagination-container/list-pagination-container.component.ts +0 -113
- package/projects/unipin-angular/src/lib/components/containers/list-container/list-pagination-container/list-pagination-container.stories.ts +0 -207
- package/projects/unipin-angular/src/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.component.html +0 -19
- package/projects/unipin-angular/src/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.component.scss +0 -7
- package/projects/unipin-angular/src/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.component.ts +0 -114
- package/projects/unipin-angular/src/lib/components/containers/list-container/list-snapshot-container/list-snapshot-container.stories.ts +0 -212
- package/projects/unipin-angular/src/lib/components/containers/modal-container/modal-container.component.html +0 -15
- package/projects/unipin-angular/src/lib/components/containers/modal-container/modal-container.component.scss +0 -2
- package/projects/unipin-angular/src/lib/components/containers/modal-container/modal-container.component.ts +0 -88
- package/projects/unipin-angular/src/lib/components/containers/modal-container/modal-container.stories.ts +0 -66
- package/projects/unipin-angular/src/lib/components/filter/filter.component.html +0 -113
- package/projects/unipin-angular/src/lib/components/filter/filter.component.scss +0 -28
- package/projects/unipin-angular/src/lib/components/filter/filter.component.ts +0 -329
- package/projects/unipin-angular/src/lib/components/filter/filter.stories.ts +0 -176
- package/projects/unipin-angular/src/lib/components/filter/interfaces/filter-config.interface.ts +0 -17
- package/projects/unipin-angular/src/lib/components/filter/interfaces/filter-field.interface.ts +0 -80
- package/projects/unipin-angular/src/lib/components/filter/interfaces/filter-search-event.interface.ts +0 -15
- package/projects/unipin-angular/src/lib/components/forms/country-input/form-country-input.component.html +0 -19
- package/projects/unipin-angular/src/lib/components/forms/country-input/form-country-input.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/forms/country-input/form-country-input.component.ts +0 -210
- package/projects/unipin-angular/src/lib/components/forms/country-input/form-country-input.stories.ts +0 -175
- package/projects/unipin-angular/src/lib/components/forms/currency-input/form-currency-input.component.html +0 -42
- package/projects/unipin-angular/src/lib/components/forms/currency-input/form-currency-input.component.scss +0 -4
- package/projects/unipin-angular/src/lib/components/forms/currency-input/form-currency-input.component.ts +0 -285
- package/projects/unipin-angular/src/lib/components/forms/currency-input/form-currency-input.spec.ts +0 -119
- package/projects/unipin-angular/src/lib/components/forms/currency-input/form-currency-input.stories.ts +0 -243
- package/projects/unipin-angular/src/lib/components/forms/date/form-date.component.html +0 -27
- package/projects/unipin-angular/src/lib/components/forms/date/form-date.component.scss +0 -7
- package/projects/unipin-angular/src/lib/components/forms/date/form-date.component.ts +0 -225
- package/projects/unipin-angular/src/lib/components/forms/date/form-date.stories.ts +0 -201
- package/projects/unipin-angular/src/lib/components/forms/image-picker/directives/drag-n-drop.directive.ts +0 -40
- package/projects/unipin-angular/src/lib/components/forms/image-picker/form-image-picker.component.html +0 -29
- package/projects/unipin-angular/src/lib/components/forms/image-picker/form-image-picker.component.scss +0 -40
- package/projects/unipin-angular/src/lib/components/forms/image-picker/form-image-picker.component.ts +0 -109
- package/projects/unipin-angular/src/lib/components/forms/image-picker/form-image-picker.stories.ts +0 -133
- package/projects/unipin-angular/src/lib/components/forms/input/form-input.component.html +0 -22
- package/projects/unipin-angular/src/lib/components/forms/input/form-input.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/forms/input/form-input.component.ts +0 -177
- package/projects/unipin-angular/src/lib/components/forms/input/form-input.stories.ts +0 -185
- package/projects/unipin-angular/src/lib/components/forms/number/form-number.component.html +0 -6
- package/projects/unipin-angular/src/lib/components/forms/number/form-number.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/forms/number/form-number.component.ts +0 -176
- package/projects/unipin-angular/src/lib/components/forms/number/form-number.spec.ts +0 -62
- package/projects/unipin-angular/src/lib/components/forms/number/form-number.stories.ts +0 -150
- package/projects/unipin-angular/src/lib/components/forms/number/pipes/locale-number.pipe.ts +0 -32
- package/projects/unipin-angular/src/lib/components/forms/password/form-password.component.html +0 -11
- package/projects/unipin-angular/src/lib/components/forms/password/form-password.component.scss +0 -5
- package/projects/unipin-angular/src/lib/components/forms/password/form-password.component.ts +0 -177
- package/projects/unipin-angular/src/lib/components/forms/password/form-password.stories.ts +0 -151
- package/projects/unipin-angular/src/lib/components/forms/rate-group-code-input/form-rate-group-code-input.component.html +0 -30
- package/projects/unipin-angular/src/lib/components/forms/rate-group-code-input/form-rate-group-code-input.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/forms/rate-group-code-input/form-rate-group-code-input.component.ts +0 -271
- package/projects/unipin-angular/src/lib/components/forms/rate-group-code-input/form-rate-group-code-input.stories.ts +0 -248
- package/projects/unipin-angular/src/lib/components/forms/searchable-select/form-searchable-select.component.html +0 -28
- package/projects/unipin-angular/src/lib/components/forms/searchable-select/form-searchable-select.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/forms/searchable-select/form-searchable-select.component.ts +0 -281
- package/projects/unipin-angular/src/lib/components/forms/searchable-select/form-searchable-select.stories.ts +0 -267
- package/projects/unipin-angular/src/lib/components/forms/select/form-select.component.html +0 -25
- package/projects/unipin-angular/src/lib/components/forms/select/form-select.component.scss +0 -1
- package/projects/unipin-angular/src/lib/components/forms/select/form-select.component.ts +0 -223
- package/projects/unipin-angular/src/lib/components/forms/select/form-select.stories.ts +0 -220
- package/projects/unipin-angular/src/lib/components/forms/textarea/form-textarea.component.html +0 -9
- package/projects/unipin-angular/src/lib/components/forms/textarea/form-textarea.component.scss +0 -0
- package/projects/unipin-angular/src/lib/components/forms/textarea/form-textarea.component.ts +0 -146
- package/projects/unipin-angular/src/lib/components/forms/textarea/form-textarea.stories.ts +0 -163
- package/projects/unipin-angular/src/lib/components/grids/grid-pagination/grid-pagination.component.html +0 -17
- package/projects/unipin-angular/src/lib/components/grids/grid-pagination/grid-pagination.component.scss +0 -8
- package/projects/unipin-angular/src/lib/components/grids/grid-pagination/grid-pagination.component.ts +0 -224
- package/projects/unipin-angular/src/lib/components/grids/grid-pagination/grid-pagination.stories.ts +0 -219
- package/projects/unipin-angular/src/lib/components/grids/grid-snapshot/grid-snapshot.component.html +0 -17
- package/projects/unipin-angular/src/lib/components/grids/grid-snapshot/grid-snapshot.component.scss +0 -8
- package/projects/unipin-angular/src/lib/components/grids/grid-snapshot/grid-snapshot.component.ts +0 -229
- package/projects/unipin-angular/src/lib/components/grids/grid-snapshot/grid-snapshot.stories.ts +0 -173
- package/projects/unipin-angular/src/lib/components/grids/interfaces/grid-config.interface.ts +0 -44
- package/projects/unipin-angular/src/lib/components/grids/services/grid.service.ts +0 -23
- package/projects/unipin-angular/src/lib/components/infinite-scroll/directive/infinite-scroll.directive.ts +0 -72
- package/projects/unipin-angular/src/lib/components/infinite-scroll/infinite-scroll.component.html +0 -13
- package/projects/unipin-angular/src/lib/components/infinite-scroll/infinite-scroll.component.scss +0 -10
- package/projects/unipin-angular/src/lib/components/infinite-scroll/infinite-scroll.component.ts +0 -61
- package/projects/unipin-angular/src/lib/components/infinite-scroll/infinite-scroll.stories.ts +0 -80
- package/projects/unipin-angular/src/lib/components/tabs/tab-content/tab-content.component.html +0 -3
- package/projects/unipin-angular/src/lib/components/tabs/tab-content/tab-content.component.scss +0 -6
- package/projects/unipin-angular/src/lib/components/tabs/tab-content/tab-content.component.ts +0 -56
- package/projects/unipin-angular/src/lib/components/tabs/tab-group/tab-group.component.html +0 -24
- package/projects/unipin-angular/src/lib/components/tabs/tab-group/tab-group.component.scss +0 -39
- package/projects/unipin-angular/src/lib/components/tabs/tab-group/tab-group.component.ts +0 -92
- package/projects/unipin-angular/src/lib/components/tabs/tab.stories.ts +0 -117
- package/projects/unipin-angular/src/lib/guards/auth/auth.guard.ts +0 -11
- package/projects/unipin-angular/src/lib/interceptors/header/header.interceptor.ts +0 -36
- package/projects/unipin-angular/src/lib/interceptors/refresh-token/refresh-token.interceptor.ts +0 -123
- package/projects/unipin-angular/src/lib/interfaces/user/user.interface.ts +0 -27
- package/projects/unipin-angular/src/lib/modules/index.ts +0 -11
- package/projects/unipin-angular/src/lib/modules/micro-frontend/utils/mf-bootstrap.util.ts +0 -74
- package/projects/unipin-angular/src/lib/modules/micro-frontend/utils/mf-global-state.util.ts +0 -20
- package/projects/unipin-angular/src/lib/modules/permission/directive/permission.directive.spec.ts +0 -50
- package/projects/unipin-angular/src/lib/modules/permission/directive/permission.directive.ts +0 -68
- package/projects/unipin-angular/src/lib/modules/permission/guards/permission.guard.spec.ts +0 -76
- package/projects/unipin-angular/src/lib/modules/permission/guards/permission.guard.ts +0 -30
- package/projects/unipin-angular/src/lib/modules/permission/pages/401/unauthorized.page.html +0 -3
- package/projects/unipin-angular/src/lib/modules/permission/pages/401/unauthorized.page.scss +0 -3
- package/projects/unipin-angular/src/lib/modules/permission/pages/401/unauthorized.page.ts +0 -14
- package/projects/unipin-angular/src/lib/modules/permission/pages/loading/loading.page.html +0 -2
- package/projects/unipin-angular/src/lib/modules/permission/pages/loading/loading.page.scss +0 -4
- package/projects/unipin-angular/src/lib/modules/permission/pages/loading/loading.page.ts +0 -76
- package/projects/unipin-angular/src/lib/modules/permission/pages/loading/provide-loading-config.util.ts +0 -18
- package/projects/unipin-angular/src/lib/modules/permission/services/permission.service.spec.ts +0 -62
- package/projects/unipin-angular/src/lib/modules/permission/services/permission.service.ts +0 -78
- package/projects/unipin-angular/src/lib/resolvers/auth/auth.resolver.spec.ts +0 -46
- package/projects/unipin-angular/src/lib/resolvers/auth/auth.resolver.ts +0 -144
- package/projects/unipin-angular/src/lib/services/auth/auth.service.ts +0 -243
- package/projects/unipin-angular/src/lib/services/country/country.service.ts +0 -47
- package/projects/unipin-angular/src/lib/services/currency/currency.service.ts +0 -44
- package/projects/unipin-angular/src/lib/services/profile/profile.service.ts +0 -86
- package/projects/unipin-angular/src/lib/services/rate-group-code/rate-group-code.service.ts +0 -29
- package/projects/unipin-angular/src/lib/utils/contrast-color-generator/contrast-color-generator.util.spec.ts +0 -19
- package/projects/unipin-angular/src/lib/utils/contrast-color-generator/contrast-color-generator.util.ts +0 -28
- package/projects/unipin-angular/src/lib/utils/form-error-message/form-error-message.util.spec.ts +0 -58
- package/projects/unipin-angular/src/lib/utils/form-error-message/form-error-message.util.ts +0 -30
- package/projects/unipin-angular/src/lib/utils/format-capitalize/format-capitalize.util.spec.ts +0 -30
- package/projects/unipin-angular/src/lib/utils/format-capitalize/format-capitalize.util.ts +0 -22
- package/projects/unipin-angular/src/lib/utils/redirect-to-first-menu/redirect-to-first-menu.util.ts +0 -15
- package/projects/unipin-angular/src/public-api.ts +0 -126
- package/projects/unipin-angular/tsconfig.lib.json +0 -14
- package/projects/unipin-angular/tsconfig.lib.prod.json +0 -10
- package/projects/unipin-angular/tsconfig.spec.json +0 -14
- package/snapshot-serializer.js +0 -12
- package/test-runner-jest.config.js +0 -13
- package/tsconfig.json +0 -51
- /package/{projects/unipin-angular/src/lib/components/audit/index.ts → lib/components/audit/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/components/buttons/index.ts → lib/components/buttons/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/components/containers/list-container/index.ts → lib/components/containers/list-container/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/components/forms/index.ts → lib/components/forms/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/components/grids/index.ts → lib/components/grids/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/components/infinite-scroll/index.ts → lib/components/infinite-scroll/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/guards/index.ts → lib/guards/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/interceptors/index.ts → lib/interceptors/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/interfaces/index.ts → lib/interfaces/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/modules/micro-frontend/index.ts → lib/modules/micro-frontend/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/resolvers/index.ts → lib/resolvers/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/services/index.ts → lib/services/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src/lib/utils/index.ts → lib/utils/index.d.ts} +0 -0
- /package/{projects/unipin-angular/src → src}/assets/scss/forms.scss +0 -0
- /package/{projects/unipin-angular/src → src}/assets/scss/grid.scss +0 -0
- /package/{projects/unipin-angular/src → src}/assets/scss/select.scss +0 -0
package/projects/unipin-angular/src/lib/components/grids/grid-snapshot/grid-snapshot.component.ts
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
|
2
|
-
import { Subscription } from 'rxjs';
|
|
3
|
-
import { ColDef, IDatasource, IGetRowsParams, ModuleRegistry, GridReadyEvent, DragStoppedEvent, SelectionChangedEvent, GridApi, PaginationChangedEvent, RowClassParams, RowNode } from '@ag-grid-community/core';
|
|
4
|
-
import { AgGridModule } from '@ag-grid-community/angular';
|
|
5
|
-
import { InfiniteRowModelModule } from '@ag-grid-community/infinite-row-model';
|
|
6
|
-
import { GridConfig } from '../interfaces/grid-config.interface';
|
|
7
|
-
import { GridService } from '../services/grid.service';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
standalone: true,
|
|
11
|
-
selector: 'up-snapshot-grid',
|
|
12
|
-
styleUrl: './grid-snapshot.component.scss',
|
|
13
|
-
templateUrl: './grid-snapshot.component.html',
|
|
14
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
15
|
-
imports: [
|
|
16
|
-
AgGridModule
|
|
17
|
-
]
|
|
18
|
-
})
|
|
19
|
-
export class GridSnapshotComponent implements OnInit, OnDestroy {
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Input variable for specifying the unique identifier of the ag-Grid component.
|
|
23
|
-
* @type {`grid-${ string }`}
|
|
24
|
-
*/
|
|
25
|
-
@Input() public id: `grid-${ string }` = 'grid-s';
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Input variable for the configuration object defining the ag-Grid properties.
|
|
29
|
-
* @type {GridConfig}
|
|
30
|
-
* @required
|
|
31
|
-
*/
|
|
32
|
-
@Input({ required: true }) public config!: GridConfig;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Input variable for specifying the row selection mode. It can be 'single' or 'multiple'.
|
|
36
|
-
* @type {('single' | 'multiple')}
|
|
37
|
-
*/
|
|
38
|
-
@Input() public rowSelection: 'single' | 'multiple' = 'single';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Callback version of property `rowClass` to set class(es) for each row individually.
|
|
42
|
-
* Function should return either a string (class name), array of strings (array of class names) or undefined for no class.
|
|
43
|
-
* @type { RowClassParams<TData = any, TContext = any> }
|
|
44
|
-
* @returns { string }
|
|
45
|
-
*/
|
|
46
|
-
@Input() public getRowClass: ((params: RowClassParams<RowNode, any>) => string) | undefined;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Output event emitter triggered when a row in the ag-Grid is clicked.
|
|
50
|
-
* Emits the data associated with the clicked row.
|
|
51
|
-
* @type {EventEmitter<any>}
|
|
52
|
-
*/
|
|
53
|
-
@Output() public readonly onRowClick: EventEmitter<any> = new EventEmitter();
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Output event emitter triggered when the ag-Grid is ready.
|
|
57
|
-
* Emits a `GridReadyEvent` object.
|
|
58
|
-
* @type {EventEmitter<GridReadyEvent>}
|
|
59
|
-
*/
|
|
60
|
-
@Output() public readonly onGridReady: EventEmitter<GridReadyEvent> = new EventEmitter();
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Output event emitter triggered when the selection in the ag-Grid changes.
|
|
64
|
-
* Emits a `SelectionChangedEvent<any>` object.
|
|
65
|
-
* @type {EventEmitter<SelectionChangedEvent<any>>}
|
|
66
|
-
*/
|
|
67
|
-
@Output() public readonly onSelectionChanged: EventEmitter<SelectionChangedEvent<any>> = new EventEmitter();
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Default column definition for the ag-Grid.
|
|
71
|
-
* @type {ColDef}
|
|
72
|
-
*/
|
|
73
|
-
public readonly defaultColDef: ColDef = { minWidth: 200, flex: 1, sortable: true, resizable: true, sortingOrder: [ 'asc', 'desc' ], cellStyle: { textAlign: 'left' }};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* Protected variable to store sorting information.
|
|
77
|
-
* @type {{ orderBy: string, order: string }}
|
|
78
|
-
*/
|
|
79
|
-
protected readonly sort: { orderBy: string, order: string } = { order: '', orderBy: '' };
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Protected variable to store the total count of records.
|
|
83
|
-
* @type {number | undefined}
|
|
84
|
-
*/
|
|
85
|
-
protected count?: number;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Protected variable to store the ag-Grid API.
|
|
89
|
-
* @type {GridApi}
|
|
90
|
-
*/
|
|
91
|
-
protected gridApi!: GridApi;
|
|
92
|
-
|
|
93
|
-
/**
|
|
94
|
-
* Protected variable to store the subscription to data retrieval.
|
|
95
|
-
* @type {Subscription | undefined}
|
|
96
|
-
*/
|
|
97
|
-
protected subs?: Subscription;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* Protected variable to store the cursor for paginating snapshot data.
|
|
101
|
-
* @type {string | null}
|
|
102
|
-
*/
|
|
103
|
-
protected after?: string | null;
|
|
104
|
-
|
|
105
|
-
constructor(
|
|
106
|
-
protected readonly service: GridService
|
|
107
|
-
) {
|
|
108
|
-
ModuleRegistry.register(InfiniteRowModelModule);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Lifecycle hook to initialize the component.
|
|
113
|
-
* Sets default values for rowPerPage and noRowText properties in the configuration.
|
|
114
|
-
*/
|
|
115
|
-
public ngOnInit(): void{
|
|
116
|
-
if (!this.config.rowPerPage) this.config.rowPerPage = 50;
|
|
117
|
-
|
|
118
|
-
this.config.noRowText = `<span class="f20">${ this.config.noRowText?? 'Data not found' }</span>`;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
/**
|
|
122
|
-
* Lifecycle hook to handle component destruction.
|
|
123
|
-
* Unsubscribes from data retrieval subscriptions.
|
|
124
|
-
*/
|
|
125
|
-
public ngOnDestroy(): void{ this.subs?.unsubscribe(); }
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Event handler for clicking a row in the ag-Grid.
|
|
129
|
-
* Emits the data associated with the clicked row.
|
|
130
|
-
* @param {any} data - Data associated with the clicked row.
|
|
131
|
-
*/
|
|
132
|
-
public clickRow(data: any): void{ this.onRowClick.emit(data.node); }
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Event handler for when column drag stops in the ag-Grid.
|
|
136
|
-
* Saves the column state to local storage.
|
|
137
|
-
* @param {DragStoppedEvent} param0 - DragStoppedEvent object containing API information.
|
|
138
|
-
*/
|
|
139
|
-
public dragColumn({ api }: DragStoppedEvent): void{ localStorage.setItem(this.id, JSON.stringify(api.getColumnState())); }
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Event handler for selection change in the ag-Grid.
|
|
143
|
-
* Emits a `SelectionChangedEvent<any>` object.
|
|
144
|
-
* @param {SelectionChangedEvent<any>} data - SelectionChangedEvent object.
|
|
145
|
-
*/
|
|
146
|
-
public changeSelected(data: SelectionChangedEvent<any>): void{ this.onSelectionChanged.emit(data); }
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Event handler for pagination change in the ag-Grid.
|
|
150
|
-
* Updates the rowPerPage property in the configuration based on the new page size.
|
|
151
|
-
* @param {PaginationChangedEvent} ev - PaginationChangedEvent object.
|
|
152
|
-
*/
|
|
153
|
-
public changePagination(ev: PaginationChangedEvent): void{
|
|
154
|
-
if (ev.newPageSize) this.config.rowPerPage = this.gridApi.paginationGetPageSize();
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Event handler for setting the datasource when the ag-Grid is ready.
|
|
159
|
-
* Emits the onGridReady event and sets the API in the GridService.
|
|
160
|
-
* Applies column state from local storage and resets the grid.
|
|
161
|
-
* @param {GridReadyEvent} ev - GridReadyEvent object.
|
|
162
|
-
*/
|
|
163
|
-
public setDatasource(ev: GridReadyEvent): void{
|
|
164
|
-
this.gridApi = ev.api;
|
|
165
|
-
this.onGridReady.emit(ev);
|
|
166
|
-
this.service.setApi(this.id, this.gridApi);
|
|
167
|
-
|
|
168
|
-
const state = JSON.parse(localStorage.getItem(this.id) as any);
|
|
169
|
-
if (state) {
|
|
170
|
-
this.gridApi.applyColumnState({ state, applyOrder: true });
|
|
171
|
-
this.gridApi.setColumnsVisible(this.gridApi.getAllGridColumns(), true);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
this.reset();
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Resets the datasource for snapshot data.
|
|
179
|
-
* Retrieves rows asynchronously based on pagination and sorting.
|
|
180
|
-
* Updates the count of records and calls success or fail callbacks accordingly.
|
|
181
|
-
*/
|
|
182
|
-
public reset(): void{
|
|
183
|
-
const datasource: IDatasource = {
|
|
184
|
-
getRows: ({ sortModel: [{ colId, sort }], successCallback, failCallback }: IGetRowsParams) => {
|
|
185
|
-
this.gridApi.showLoadingOverlay();
|
|
186
|
-
|
|
187
|
-
if (colId !== this.sort.orderBy || sort !== this.sort.order) {
|
|
188
|
-
this.sort.order = sort;
|
|
189
|
-
this.sort.orderBy = colId;
|
|
190
|
-
|
|
191
|
-
this.gridApi.paginationGoToFirstPage();
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
const page = this.gridApi.paginationGetCurrentPage();
|
|
195
|
-
if (page === 0) this.after = null;
|
|
196
|
-
|
|
197
|
-
this.subs = this.config.getDataSnapshot!(this.config.rowPerPage!, colId, sort, this.after).subscribe({
|
|
198
|
-
next: ({ data, totalRecord }) => {
|
|
199
|
-
this.gridApi.hideOverlay();
|
|
200
|
-
|
|
201
|
-
const { edges, pageInfo } = data;
|
|
202
|
-
if (edges.length > 0) this.after = pageInfo.endCursor;
|
|
203
|
-
|
|
204
|
-
if (page === 0) {
|
|
205
|
-
if (edges.length === 0){
|
|
206
|
-
this.gridApi.setGridOption('overlayNoRowsTemplate', this.config.noRowText);
|
|
207
|
-
this.gridApi.showNoRowsOverlay();
|
|
208
|
-
}
|
|
209
|
-
this.count = totalRecord;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
if (!this.config.useTotalRecord && !pageInfo.hasNextPage) {
|
|
213
|
-
this.count = (page * this.config.rowPerPage!) + edges.length;
|
|
214
|
-
}
|
|
215
|
-
successCallback(edges, this.count);
|
|
216
|
-
},
|
|
217
|
-
error: ({ message }) => {
|
|
218
|
-
this.gridApi.setGridOption('overlayNoRowsTemplate', `<span class="f20">${ message }</span>`);
|
|
219
|
-
|
|
220
|
-
this.gridApi.hideOverlay();
|
|
221
|
-
this.gridApi.showNoRowsOverlay();
|
|
222
|
-
failCallback();
|
|
223
|
-
}
|
|
224
|
-
});
|
|
225
|
-
}
|
|
226
|
-
};
|
|
227
|
-
this.gridApi.setGridOption('datasource', datasource);
|
|
228
|
-
}
|
|
229
|
-
}
|
package/projects/unipin-angular/src/lib/components/grids/grid-snapshot/grid-snapshot.stories.ts
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { formatDate } from '@angular/common';
|
|
2
|
-
import { of } from 'rxjs';
|
|
3
|
-
import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular';
|
|
4
|
-
import { ICellRendererParams } from '@ag-grid-community/core';
|
|
5
|
-
import { GridSnapshotComponent } from './grid-snapshot.component';
|
|
6
|
-
|
|
7
|
-
const meta: Meta<GridSnapshotComponent> = {
|
|
8
|
-
title: 'Grids/Grid Snapshot',
|
|
9
|
-
tags: [ 'autodocs' ],
|
|
10
|
-
component: GridSnapshotComponent,
|
|
11
|
-
decorators: [
|
|
12
|
-
moduleMetadata({
|
|
13
|
-
imports: [
|
|
14
|
-
GridSnapshotComponent
|
|
15
|
-
]
|
|
16
|
-
})
|
|
17
|
-
],
|
|
18
|
-
argTypes: {
|
|
19
|
-
config: {
|
|
20
|
-
defaultValue: undefined,
|
|
21
|
-
description: 'Configuration object for the grid, specifying the column definitions, pagination settings, and data retrieval function.',
|
|
22
|
-
control: {
|
|
23
|
-
type: 'object'
|
|
24
|
-
},
|
|
25
|
-
table: {
|
|
26
|
-
category: 'Input'
|
|
27
|
-
},
|
|
28
|
-
type: {
|
|
29
|
-
required: true,
|
|
30
|
-
name: 'string'
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
id: {
|
|
34
|
-
defaultValue: 'grid-s',
|
|
35
|
-
description: 'Unique identifier for the grid component.',
|
|
36
|
-
table: {
|
|
37
|
-
category: 'Input'
|
|
38
|
-
},
|
|
39
|
-
type: {
|
|
40
|
-
name: 'string'
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
rowSelection: {
|
|
44
|
-
defaultValue: 'single',
|
|
45
|
-
description: 'Type of row selection allowed in the grid.',
|
|
46
|
-
control: {
|
|
47
|
-
type: 'select'
|
|
48
|
-
},
|
|
49
|
-
options: [ 'single', 'multiple' ],
|
|
50
|
-
table: {
|
|
51
|
-
category: 'Input'
|
|
52
|
-
},
|
|
53
|
-
type: {
|
|
54
|
-
name: 'string'
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
getRowClass: {
|
|
58
|
-
type: 'function',
|
|
59
|
-
description: 'Callback version of property `rowClass` to set class(es) for each row individually',
|
|
60
|
-
control: { disable: true },
|
|
61
|
-
table: { disable: true }
|
|
62
|
-
},
|
|
63
|
-
changeSelected: {
|
|
64
|
-
control: { disable: true },
|
|
65
|
-
table: { disable: true }
|
|
66
|
-
},
|
|
67
|
-
clickRow: {
|
|
68
|
-
control: { disable: true },
|
|
69
|
-
table: { disable: true }
|
|
70
|
-
},
|
|
71
|
-
defaultColDef: {
|
|
72
|
-
control: { disable: true },
|
|
73
|
-
table: { disable: true }
|
|
74
|
-
},
|
|
75
|
-
dragColumn: {
|
|
76
|
-
control: { disable: true },
|
|
77
|
-
table: { disable: true }
|
|
78
|
-
},
|
|
79
|
-
ngOnDestroy: {
|
|
80
|
-
control: { disable: true },
|
|
81
|
-
table: { disable: true }
|
|
82
|
-
},
|
|
83
|
-
ngOnInit: {
|
|
84
|
-
control: { disable: true },
|
|
85
|
-
table: { disable: true }
|
|
86
|
-
},
|
|
87
|
-
onGridReady: {
|
|
88
|
-
control: { disable: true },
|
|
89
|
-
table: { disable: true }
|
|
90
|
-
},
|
|
91
|
-
onRowClick: {
|
|
92
|
-
control: { disable: true },
|
|
93
|
-
table: { disable: true }
|
|
94
|
-
},
|
|
95
|
-
onSelectionChanged: {
|
|
96
|
-
control: { disable: true },
|
|
97
|
-
table: { disable: true }
|
|
98
|
-
},
|
|
99
|
-
reset: {
|
|
100
|
-
control: { disable: true },
|
|
101
|
-
table: { disable: true }
|
|
102
|
-
},
|
|
103
|
-
setDatasource: {
|
|
104
|
-
control: { disable: true },
|
|
105
|
-
table: { disable: true }
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export default meta;
|
|
111
|
-
type Story = StoryObj<GridSnapshotComponent>;
|
|
112
|
-
|
|
113
|
-
export const DisplayData: Story = {
|
|
114
|
-
args: {
|
|
115
|
-
config: {
|
|
116
|
-
useTotalRecord: false,
|
|
117
|
-
noRowText: 'Data not found',
|
|
118
|
-
colDefs: [
|
|
119
|
-
{ headerName: 'Name', sortable: false, field: 'node.name' },
|
|
120
|
-
{ headerName: 'Status', sortable: false, field: 'node.status', cellRenderer: ({ value }: ICellRendererParams)=> value? `<div class='badge bg-${ value === 'ACTIVE'? 'success' : 'warning'}'>${ value }</div>` : '' },
|
|
121
|
-
{ headerName: 'Created Date', colId: 'createdDate', field: 'node.createdDate', valueFormatter: ({ value }) => value? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' },
|
|
122
|
-
{ headerName: 'Updated Date', colId: 'updatedDate', field: 'node.updatedDate', sort: 'desc', valueFormatter: ({ value }) => value? formatDate(value, 'dd MMM yyyy HH:mm', 'en-US') : '' }
|
|
123
|
-
],
|
|
124
|
-
getDataSnapshot: (pageSize: number, sortBy: string, dir: 'asc' | 'desc', after: any) => {
|
|
125
|
-
const criteria = { sortBy: 'createdAt', sortDirection: 'desc', pageSize: 50, after: null };
|
|
126
|
-
|
|
127
|
-
criteria.sortBy = sortBy;
|
|
128
|
-
criteria.pageSize = pageSize;
|
|
129
|
-
criteria.sortDirection = dir;
|
|
130
|
-
criteria.after = after;
|
|
131
|
-
|
|
132
|
-
return of({
|
|
133
|
-
data: {
|
|
134
|
-
'pageInfo': {
|
|
135
|
-
'endCursor': 'MzcwYzYzMGItYTM5Mi00ZWU1LWJkMTktNDg3ZTRkMmJhZTRhXzIwMjMtMTEtMDhUMDQ6NTk6NDEuNjcwMTE4Wg==',
|
|
136
|
-
'hasNextPage': false
|
|
137
|
-
},
|
|
138
|
-
'edges': [
|
|
139
|
-
{
|
|
140
|
-
'node': {
|
|
141
|
-
'name': 'John Doe',
|
|
142
|
-
'status': 'ACTIVE',
|
|
143
|
-
'createdDate': '2024-01-25T09:29:31.281245Z',
|
|
144
|
-
'updatedDate': '2024-01-25T09:29:31.281250Z',
|
|
145
|
-
'appLoginPrincipal': [
|
|
146
|
-
{
|
|
147
|
-
'principalId': 'john_doe@gmail.com',
|
|
148
|
-
'principalType': 'EMAIL_USERNAME'
|
|
149
|
-
}
|
|
150
|
-
]
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
},
|
|
159
|
-
getRowClass : ({ node }: any) => {
|
|
160
|
-
if(!node) return '';
|
|
161
|
-
|
|
162
|
-
if (node.rowIndex % 2 === 1) return 'bg-primary';
|
|
163
|
-
|
|
164
|
-
return 'bg-secondary'
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
render: (args) => ({
|
|
168
|
-
props: args,
|
|
169
|
-
template: `
|
|
170
|
-
<up-snapshot-grid style="height: 500px !important; width: 768px !important;" id="id" class="flex-grow-1" rowSelection="rowSelection" [config]="config" />
|
|
171
|
-
`
|
|
172
|
-
}),
|
|
173
|
-
}
|
package/projects/unipin-angular/src/lib/components/grids/interfaces/grid-config.interface.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { ColDef, ColGroupDef } from '@ag-grid-community/core';
|
|
3
|
-
|
|
4
|
-
export interface GridConfig {
|
|
5
|
-
/**
|
|
6
|
-
* Array of column definitions for the ag-Grid.
|
|
7
|
-
* @type {(ColDef | ColGroupDef)[]}
|
|
8
|
-
*/
|
|
9
|
-
colDefs: (ColDef | ColGroupDef)[];
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Function to retrieve data asynchronously for the ag-Grid.
|
|
13
|
-
* It returns an Observable of { data, totalRecord } object, where data is an array of records and
|
|
14
|
-
* totalRecord is an optional total count of records.
|
|
15
|
-
* @type {(page: number, pageSize: number, orderBy: string, order: 'asc' | 'desc') => Observable<{ data: any[], totalRecord?: number }>}
|
|
16
|
-
*/
|
|
17
|
-
getData?: (page: number, pageSize: number, orderBy: string, order: 'asc' | 'desc') => Observable<{ data: any[], totalRecord?: number }>;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Function to retrieve a data snapshot asynchronously for the ag-Grid.
|
|
21
|
-
* It returns an Observable of { data, totalRecord } object, where data is a single record and
|
|
22
|
-
* totalRecord is an optional total count of records.
|
|
23
|
-
* @type {(pageSize: number, orderBy: string, order: 'asc' | 'desc', after?: any) => Observable<{ data: any, totalRecord?: number }>}
|
|
24
|
-
*/
|
|
25
|
-
getDataSnapshot?: (pageSize: number, orderBy: string, order: 'asc' | 'desc', after?: any) => Observable<{ data: any, totalRecord?: number }>;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Text to display when no rows are available in the ag-Grid.
|
|
29
|
-
* @type {string}
|
|
30
|
-
*/
|
|
31
|
-
noRowText?: string;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Flag indicating whether to use the total record count for pagination.
|
|
35
|
-
* @type {boolean}
|
|
36
|
-
*/
|
|
37
|
-
useTotalRecord?: boolean;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Number of rows to display per page in the ag-Grid.
|
|
41
|
-
* @type {number}
|
|
42
|
-
*/
|
|
43
|
-
rowPerPage?: number;
|
|
44
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { GridApi } from '@ag-grid-community/core';
|
|
3
|
-
|
|
4
|
-
@Injectable({
|
|
5
|
-
providedIn: 'root'
|
|
6
|
-
})
|
|
7
|
-
export class GridService {
|
|
8
|
-
|
|
9
|
-
protected readonly apis: { [id: string]: GridApi } = {};
|
|
10
|
-
|
|
11
|
-
public getApi(id: string): GridApi{ return this.apis[id]; }
|
|
12
|
-
|
|
13
|
-
public setApi(id: string, api: GridApi): void{ this.apis[id] = api; }
|
|
14
|
-
|
|
15
|
-
public refreshGridCache(id: string, forceRefresh: boolean = false): void{
|
|
16
|
-
this.apis[id]?.refreshInfiniteCache();
|
|
17
|
-
|
|
18
|
-
if (forceRefresh) {
|
|
19
|
-
this.apis[id]?.paginationGoToFirstPage();
|
|
20
|
-
this.apis[id]?.purgeInfiniteCache();
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { AfterViewInit, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
@Directive({
|
|
4
|
-
standalone: true,
|
|
5
|
-
selector: '[upInfiniteScroll]',
|
|
6
|
-
})
|
|
7
|
-
export class InfiniteScrollDirective implements OnInit, AfterViewInit, OnDestroy {
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Threshold at which to trigger the callback. A value of 0.0 means that the callback
|
|
11
|
-
* will be triggered as soon as a single pixel is visible. 1.0 means that the callback will only be triggered when the entire element is visible.
|
|
12
|
-
* @type {number}
|
|
13
|
-
*/
|
|
14
|
-
@Input() public threshold: number = 0.5;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Margin around the root. This can be used to grow or shrink the area used to
|
|
18
|
-
* determine intersections. It follows the same syntax as the CSS margin property.
|
|
19
|
-
* Example values: '10px', '10px 20px', '10%', '10% 20% 30% 40%'.
|
|
20
|
-
* @type {string}
|
|
21
|
-
*/
|
|
22
|
-
@Input() public rootMargin: string = '0px';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Event emitted when the observed element scrolls into view.
|
|
26
|
-
* This triggers the component to load more data.
|
|
27
|
-
* @type {EventEmitter<boolean>}
|
|
28
|
-
*/
|
|
29
|
-
@Output() public readonly onScrollThreshold: EventEmitter<boolean> = new EventEmitter<boolean>();
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* IntersectionObserver instance used to observe the element.
|
|
33
|
-
* @type {IntersectionObserver}
|
|
34
|
-
*/
|
|
35
|
-
protected observer!: IntersectionObserver;
|
|
36
|
-
|
|
37
|
-
constructor(
|
|
38
|
-
protected readonly element: ElementRef
|
|
39
|
-
) {}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Lifecycle hook that is called after Angular has initialized all data-bound properties.
|
|
43
|
-
* Initializes the IntersectionObserver with specific options.
|
|
44
|
-
*/
|
|
45
|
-
public ngOnInit(): void{
|
|
46
|
-
const options = {
|
|
47
|
-
root: null,
|
|
48
|
-
rootMargin: this.rootMargin,
|
|
49
|
-
threshold: Math.max(0, Math.min(1, this.threshold))
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
this.observer = new IntersectionObserver((entries: IntersectionObserverEntry[]) => {
|
|
53
|
-
if (entries[0].isIntersecting) this.onScrollThreshold.emit(true);
|
|
54
|
-
}, options);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Lifecycle hook that is called after Angular has fully initialized the component's view.
|
|
59
|
-
* Starts observing the element.
|
|
60
|
-
*/
|
|
61
|
-
public ngAfterViewInit(): void{
|
|
62
|
-
this.observer.observe(this.element.nativeElement);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Lifecycle hook that is called when the directive is being destroyed.
|
|
67
|
-
* Disconnects the IntersectionObserver to stop observing the element to prevent memory leaks.
|
|
68
|
-
*/
|
|
69
|
-
public ngOnDestroy(): void{
|
|
70
|
-
this.observer.disconnect();
|
|
71
|
-
}
|
|
72
|
-
}
|
package/projects/unipin-angular/src/lib/components/infinite-scroll/infinite-scroll.component.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="scroll-container"
|
|
3
|
-
[threshold]="threshold"
|
|
4
|
-
[rootMargin]="rootMargin"
|
|
5
|
-
(onScrollThreshold)="scroll()"
|
|
6
|
-
upInfiniteScroll
|
|
7
|
-
>
|
|
8
|
-
<ion-spinner [name]="loadingIcon" />
|
|
9
|
-
|
|
10
|
-
@if (loadingText) {
|
|
11
|
-
<div class="loading-text">{{ loadingText }}</div>
|
|
12
|
-
}
|
|
13
|
-
</div>
|
package/projects/unipin-angular/src/lib/components/infinite-scroll/infinite-scroll.component.ts
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { IonicModule } from '@ionic/angular';
|
|
3
|
-
import { InfiniteScrollDirective } from './directive/infinite-scroll.directive';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
standalone: true,
|
|
7
|
-
selector: 'up-infinite-scroll',
|
|
8
|
-
styleUrl: './infinite-scroll.component.scss',
|
|
9
|
-
templateUrl: './infinite-scroll.component.html',
|
|
10
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
11
|
-
imports: [
|
|
12
|
-
IonicModule,
|
|
13
|
-
InfiniteScrollDirective
|
|
14
|
-
]
|
|
15
|
-
})
|
|
16
|
-
export class InfiniteScrollComponent {
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Text to display when loading more items.
|
|
20
|
-
* @type {string}
|
|
21
|
-
*/
|
|
22
|
-
@Input() public loadingText?: string;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Threshold at which to trigger the callback. A value of 0.0 means that the callback
|
|
26
|
-
* will be triggered as soon as a single pixel is visible. 1.0 means that the callback will only be triggered when the entire element is visible.
|
|
27
|
-
* @type {number}
|
|
28
|
-
*/
|
|
29
|
-
@Input() public threshold: number = 0.5;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Margin around the root. This can be used to grow or shrink the area used to
|
|
33
|
-
* determine intersections. It follows the same syntax as the CSS margin property.
|
|
34
|
-
* Example values: '10px', '10px 20px', '10%', '10% 20% 30% 40%'.
|
|
35
|
-
* @type {string}
|
|
36
|
-
*/
|
|
37
|
-
@Input() public rootMargin: string = '0px';
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Icon to display while loading more items.
|
|
41
|
-
* Can be one of 'bubbles', 'circles', 'circular', 'crescent', 'dots', 'lines', 'lines-sharp', 'lines-sharp-small', or 'lines-small'.
|
|
42
|
-
* @type {'bubbles' | 'circles' | 'circular' | 'crescent' | 'dots' | 'lines' | 'lines-sharp' | 'lines-sharp-small' | 'lines-small'}
|
|
43
|
-
* @default 'dots'
|
|
44
|
-
*/
|
|
45
|
-
@Input() public loadingIcon: 'bubbles' | 'circles' | 'circular' | 'crescent' | 'dots' | 'lines' | 'lines-sharp' | 'lines-sharp-small' | 'lines-small' = 'dots';
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Event emitted when the user has scrolled to the bottom of the list.
|
|
49
|
-
* Used for triggering the component to load more data.
|
|
50
|
-
* @type {EventEmitter<void>}
|
|
51
|
-
*/
|
|
52
|
-
@Output() public onScrollThreshold: EventEmitter<void> = new EventEmitter<void>();
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Method to emit the scrolled event, indicating that the user has reached the bottom of the list.
|
|
56
|
-
* This triggers the component to load more data.
|
|
57
|
-
*/
|
|
58
|
-
public scroll(): void{
|
|
59
|
-
this.onScrollThreshold.emit();
|
|
60
|
-
}
|
|
61
|
-
}
|