@gipisistemas/ngx-core 1.0.9 → 1.0.10
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/.editorconfig +18 -0
- package/.github/workflows/publish.yaml +35 -0
- package/.husky/pre-commit +4 -0
- package/.prettierignore +19 -0
- package/.prettierrc +11 -0
- package/.releaserc.js +28 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +20 -0
- package/.vscode/tasks.json +42 -0
- package/CHANGELOG.md +46 -0
- package/README.md +121 -168
- package/angular.json +80 -0
- package/eslint.config.js +151 -0
- package/package.json +77 -53
- package/projects/ngx-core/README.md +168 -0
- package/projects/ngx-core/eslint.config.js +15 -0
- package/projects/ngx-core/ng-package.json +28 -0
- package/projects/ngx-core/package.json +50 -0
- package/projects/ngx-core/src/animations/fly-in-out.animation.ts +50 -0
- package/projects/ngx-core/src/animations/index.ts +2 -0
- package/projects/ngx-core/src/animations/rotate.animation.ts +49 -0
- package/projects/ngx-core/src/base/components/base-form-dialog.component.ts +122 -0
- package/projects/ngx-core/src/base/components/base-form.component.ts +134 -0
- package/projects/ngx-core/src/base/components/base-list-dialog.component.ts +234 -0
- package/projects/ngx-core/src/base/components/base-list.component.ts +645 -0
- package/projects/ngx-core/src/base/components/base-report.component.ts +310 -0
- package/projects/ngx-core/src/base/components/base.component.ts +144 -0
- package/projects/ngx-core/src/base/index.ts +25 -0
- package/projects/ngx-core/src/base/interfaces/base-report-type.interface.ts +32 -0
- package/projects/ngx-core/src/base/models/base-applied-filter.model.ts +14 -0
- package/projects/ngx-core/src/base/models/base-authority.model.ts +12 -0
- package/projects/ngx-core/src/base/models/base-filter.model.ts +30 -0
- package/projects/ngx-core/src/base/models/base-form-dialog-data.model.ts +22 -0
- package/projects/ngx-core/src/base/models/base-list-dialog-data.model.ts +21 -0
- package/projects/ngx-core/src/base/models/base-menu.model.ts +48 -0
- package/projects/ngx-core/src/base/models/base-page.model.ts +27 -0
- package/projects/ngx-core/src/base/models/base-query-params.model.ts +19 -0
- package/projects/ngx-core/src/base/models/base-sort.model.ts +14 -0
- package/projects/ngx-core/src/base/models/base-token.model.ts +29 -0
- package/projects/ngx-core/src/base/models/base-user.model.ts +33 -0
- package/projects/ngx-core/src/base/models/base.model.ts +37 -0
- package/projects/ngx-core/src/base/services/base-auth.service.ts +125 -0
- package/projects/ngx-core/src/base/services/base-crud.service.ts +360 -0
- package/projects/ngx-core/src/base/services/base.service.ts +197 -0
- package/projects/ngx-core/src/components/action-row/action-row.component.ts +24 -0
- package/projects/ngx-core/src/components/action-row/index.ts +2 -0
- package/projects/ngx-core/src/components/auto-focus/auto-focus.directive.ts +78 -0
- package/projects/ngx-core/src/components/auto-focus/index.ts +2 -0
- package/projects/ngx-core/src/components/avatar/avatar.component.ts +87 -0
- package/projects/ngx-core/src/components/avatar/index.ts +2 -0
- package/projects/ngx-core/src/components/base-component/base-control-value-accessor.ts +138 -0
- package/projects/ngx-core/src/components/base-component/base-input.ts +68 -0
- package/projects/ngx-core/src/components/base-component/index.ts +2 -0
- package/projects/ngx-core/src/components/button/button.component.ts +263 -0
- package/projects/ngx-core/src/components/button/index.ts +2 -0
- package/projects/ngx-core/src/components/button-group/button-group.component.ts +87 -0
- package/projects/ngx-core/src/components/button-group/index.ts +1 -0
- package/projects/ngx-core/src/components/checkbox/checkbox.component.ts +298 -0
- package/projects/ngx-core/src/components/checkbox/index.ts +2 -0
- package/projects/ngx-core/src/components/chips/chips.component.ts +170 -0
- package/projects/ngx-core/src/components/chips/index.ts +1 -0
- package/projects/ngx-core/src/components/confirm-dialog/confirm-dialog.component.ts +146 -0
- package/projects/ngx-core/src/components/confirm-dialog/index.ts +5 -0
- package/projects/ngx-core/src/components/confirm-dialog/shared/confirm-dialog-types.enum.ts +8 -0
- package/projects/ngx-core/src/components/confirm-dialog/shared/confirm-dialog.model.ts +32 -0
- package/projects/ngx-core/src/components/confirm-dialog/shared/confirm-dialog.service.ts +59 -0
- package/projects/ngx-core/src/components/currency/currency-config.ts +33 -0
- package/projects/ngx-core/src/components/currency/currency-input.handler.ts +162 -0
- package/projects/ngx-core/src/components/currency/currency-input.manager.ts +64 -0
- package/projects/ngx-core/src/components/currency/currency-input.service.ts +386 -0
- package/projects/ngx-core/src/components/currency/currency.directive.ts +144 -0
- package/projects/ngx-core/src/components/currency/index.ts +2 -0
- package/projects/ngx-core/src/components/date-picker/date-picker.component.ts +192 -0
- package/projects/ngx-core/src/components/date-picker/index.ts +1 -0
- package/projects/ngx-core/src/components/date-range-picker/date-range-picker.component.ts +464 -0
- package/projects/ngx-core/src/components/date-range-picker/index.ts +6 -0
- package/projects/ngx-core/src/components/date-range-picker/shared/calendar/calendar.component.ts +144 -0
- package/projects/ngx-core/src/components/date-range-picker/shared/default-preset-date-options.ts +61 -0
- package/projects/ngx-core/src/components/date-range-picker/shared/preset-key.enum.ts +11 -0
- package/projects/ngx-core/src/components/date-range-picker/shared/range-selection-strategy.service.ts +84 -0
- package/projects/ngx-core/src/components/date-range-picker/shared/select-date-option.interface.ts +39 -0
- package/projects/ngx-core/src/components/date-range-picker/shared/selected-date-event.interface.ts +7 -0
- package/projects/ngx-core/src/components/datetime-picker/datetime-picker.component.ts +749 -0
- package/projects/ngx-core/src/components/datetime-picker/index.ts +1 -0
- package/projects/ngx-core/src/components/disable-auto-fill/disable-auto-fill.directive.ts +22 -0
- package/projects/ngx-core/src/components/disable-auto-fill/index.ts +2 -0
- package/projects/ngx-core/src/components/echarts/echarts.directive.ts +325 -0
- package/projects/ngx-core/src/components/echarts/index.ts +5 -0
- package/projects/ngx-core/src/components/echarts/shared/echarts-change-filter.ts +63 -0
- package/projects/ngx-core/src/components/echarts/shared/echarts-config.interface.ts +6 -0
- package/projects/ngx-core/src/components/echarts/shared/echarts-theme.type.ts +1 -0
- package/projects/ngx-core/src/components/empty/empty.component.ts +66 -0
- package/projects/ngx-core/src/components/empty/index.ts +1 -0
- package/projects/ngx-core/src/components/expansion-panel/expansion-panel.component.ts +127 -0
- package/projects/ngx-core/src/components/expansion-panel/index.ts +1 -0
- package/projects/ngx-core/src/components/field-error/field-error.component.ts +190 -0
- package/projects/ngx-core/src/components/field-error/index.ts +2 -0
- package/projects/ngx-core/src/components/field-error/shared/field-error-custom-validators.type.ts +6 -0
- package/projects/ngx-core/src/components/fieldset/fieldset.component.ts +69 -0
- package/projects/ngx-core/src/components/fieldset/index.ts +1 -0
- package/projects/ngx-core/src/components/file-drag-and-drop/file-drag-and-drop.component.ts +205 -0
- package/projects/ngx-core/src/components/file-drag-and-drop/index.ts +1 -0
- package/projects/ngx-core/src/components/flex-layout/flex-layout.directive.ts +248 -0
- package/projects/ngx-core/src/components/flex-layout/index.ts +1 -0
- package/projects/ngx-core/src/components/form-wrapper/form-wrapper.component.ts +61 -0
- package/projects/ngx-core/src/components/form-wrapper/index.ts +2 -0
- package/projects/ngx-core/src/components/helpful-tip/helpful-tip.component.ts +37 -0
- package/projects/ngx-core/src/components/helpful-tip/index.ts +2 -0
- package/projects/ngx-core/src/components/icon/icon.component.ts +165 -0
- package/projects/ngx-core/src/components/icon/index.ts +2 -0
- package/projects/ngx-core/src/components/index.ts +59 -0
- package/projects/ngx-core/src/components/input/index.ts +4 -0
- package/projects/ngx-core/src/components/input/input.component.ts +234 -0
- package/projects/ngx-core/src/components/input/shared/input-prefix.directive.ts +7 -0
- package/projects/ngx-core/src/components/input/shared/input-suffix.directive.ts +7 -0
- package/projects/ngx-core/src/components/input/shared/input.directive.ts +83 -0
- package/projects/ngx-core/src/components/input-currency/index.ts +1 -0
- package/projects/ngx-core/src/components/input-currency/input-currency.component.ts +232 -0
- package/projects/ngx-core/src/components/input-file/index.ts +1 -0
- package/projects/ngx-core/src/components/input-file/input-file.component.ts +283 -0
- package/projects/ngx-core/src/components/input-file/shared/file-upload-event.interface.ts +4 -0
- package/projects/ngx-core/src/components/input-group/index.ts +2 -0
- package/projects/ngx-core/src/components/input-group/input-group-addon.component.ts +24 -0
- package/projects/ngx-core/src/components/input-group/input-group.component.ts +38 -0
- package/projects/ngx-core/src/components/input-phone/index.ts +1 -0
- package/projects/ngx-core/src/components/input-phone/input-phone.component.ts +249 -0
- package/projects/ngx-core/src/components/label/index.ts +1 -0
- package/projects/ngx-core/src/components/label/label.component.ts +38 -0
- package/projects/ngx-core/src/components/loading/index.ts +2 -0
- package/projects/ngx-core/src/components/loading/loading.component.ts +45 -0
- package/projects/ngx-core/src/components/lozenge/index.ts +3 -0
- package/projects/ngx-core/src/components/lozenge/lozenge.component.ts +70 -0
- package/projects/ngx-core/src/components/lozenge/shared/lozenge-fill.type.ts +4 -0
- package/projects/ngx-core/src/components/lozenge/shared/lozenge-variant.type.ts +9 -0
- package/projects/ngx-core/src/components/month-picker/index.ts +1 -0
- package/projects/ngx-core/src/components/month-picker/month-picker.component.ts +233 -0
- package/projects/ngx-core/src/components/paginator/index.ts +1 -0
- package/projects/ngx-core/src/components/paginator/paginator.component.ts +95 -0
- package/projects/ngx-core/src/components/password-requeriments/index.ts +4 -0
- package/projects/ngx-core/src/components/password-requeriments/password-requeriments.component.ts +162 -0
- package/projects/ngx-core/src/components/password-requeriments/shared/password-requeriments.interface.ts +5 -0
- package/projects/ngx-core/src/components/password-requeriments/shared/password-validation.util.ts +132 -0
- package/projects/ngx-core/src/components/pdf-viewer/index.ts +4 -0
- package/projects/ngx-core/src/components/pdf-viewer/pdf-viewer-dialog.component.ts +63 -0
- package/projects/ngx-core/src/components/pdf-viewer/pdf-viewer.component.ts +543 -0
- package/projects/ngx-core/src/components/pdf-viewer/pdf-viewer.d.ts +7 -0
- package/projects/ngx-core/src/components/pdf-viewer/shared/pdf-viewer-dialog.model.ts +17 -0
- package/projects/ngx-core/src/components/pdf-viewer/shared/pdf-viewer-dialog.service.ts +101 -0
- package/projects/ngx-core/src/components/popover/index.ts +5 -0
- package/projects/ngx-core/src/components/popover/popover-target.directive.ts +12 -0
- package/projects/ngx-core/src/components/popover/popover-trigger.directive.ts +533 -0
- package/projects/ngx-core/src/components/popover/popover.component.ts +346 -0
- package/projects/ngx-core/src/components/popover/popover.module.ts +10 -0
- package/projects/ngx-core/src/components/popover/shared/popover-animations.ts +31 -0
- package/projects/ngx-core/src/components/popover/shared/popover-errors.ts +28 -0
- package/projects/ngx-core/src/components/popover/shared/popover-types.type.ts +7 -0
- package/projects/ngx-core/src/components/popover/shared/popover.interface.ts +31 -0
- package/projects/ngx-core/src/components/radio-button/radio-button.component.scss +0 -0
- package/projects/ngx-core/src/components/radio-button/radio-button.component.ts +104 -0
- package/projects/ngx-core/src/components/radio-group/index.ts +2 -0
- package/projects/ngx-core/src/components/radio-group/radio-group.component.ts +186 -0
- package/projects/ngx-core/src/components/radio-group/shared/option-radio-group.type.ts +1 -0
- package/projects/ngx-core/src/components/scroll-fade/index.ts +1 -0
- package/projects/ngx-core/src/components/scroll-fade/scroll-fade.directive.ts +130 -0
- package/projects/ngx-core/src/components/select/index.ts +4 -0
- package/projects/ngx-core/src/components/select/select.component.ts +284 -0
- package/projects/ngx-core/src/components/select/shared/mat-select-media-tracker.ts +40 -0
- package/projects/ngx-core/src/components/select/shared/mat-select-options-helper.ts +62 -0
- package/projects/ngx-core/src/components/select/shared/mat-select.directive.ts +1298 -0
- package/projects/ngx-core/src/components/select-enum/index.ts +3 -0
- package/projects/ngx-core/src/components/select-enum/select-enum.component.ts +257 -0
- package/projects/ngx-core/src/components/select-enum/shared/option-select-enum.type.ts +8 -0
- package/projects/ngx-core/src/components/select-enum/shared/select-check-all.component.ts +104 -0
- package/projects/ngx-core/src/components/sidenav/index.ts +2 -0
- package/projects/ngx-core/src/components/sidenav/shared/sidenav-arrow-animations.ts +13 -0
- package/projects/ngx-core/src/components/sidenav/sidenav.component.ts +267 -0
- package/projects/ngx-core/src/components/skeleton/index.ts +2 -0
- package/{components → projects/ngx-core/src/components}/skeleton/skeleton.component.scss +76 -76
- package/projects/ngx-core/src/components/skeleton/skeleton.component.ts +101 -0
- package/projects/ngx-core/src/components/split-button/index.ts +1 -0
- package/projects/ngx-core/src/components/split-button/shared/split-button-arrow-animations.ts +17 -0
- package/projects/ngx-core/src/components/split-button/split-button.component.ts +328 -0
- package/projects/ngx-core/src/components/stepper/index.ts +2 -0
- package/projects/ngx-core/src/components/stepper/step.component.ts +67 -0
- package/projects/ngx-core/src/components/stepper/stepper.component.ts +98 -0
- package/projects/ngx-core/src/components/table/index.ts +9 -0
- package/projects/ngx-core/src/components/table/shared/table-column-action-type.enum.ts +1 -0
- package/projects/ngx-core/src/components/table/shared/table-column-align-type.enum.ts +34 -0
- package/projects/ngx-core/src/components/table/shared/table-column-builder.model.ts +275 -0
- package/projects/ngx-core/src/components/table/shared/table-column-condition.enum.ts +6 -0
- package/projects/ngx-core/src/components/table/shared/table-column-partial.model.ts +9 -0
- package/projects/ngx-core/src/components/table/shared/table-column.model.ts +132 -0
- package/projects/ngx-core/src/components/table/shared/table-menu-item-context-builder.model.ts +155 -0
- package/projects/ngx-core/src/components/table/shared/table-menu-item-context.model.ts +79 -0
- package/projects/ngx-core/src/components/table/table.component.html +341 -0
- package/projects/ngx-core/src/components/table/table.component.ts +781 -0
- package/projects/ngx-core/src/components/tabs/index.ts +2 -0
- package/projects/ngx-core/src/components/tabs/tab-group.component.ts +147 -0
- package/projects/ngx-core/src/components/tabs/tab.component.ts +90 -0
- package/projects/ngx-core/src/components/tag/index.ts +1 -0
- package/projects/ngx-core/src/components/tag/tag.component.ts +82 -0
- package/projects/ngx-core/src/components/text-capitalize/index.ts +1 -0
- package/projects/ngx-core/src/components/text-capitalize/text-capitalize.directive.ts +73 -0
- package/projects/ngx-core/src/components/text-ellipsis/index.ts +2 -0
- package/projects/ngx-core/src/components/text-ellipsis/text-ellipsis.directive.ts +42 -0
- package/projects/ngx-core/src/components/textarea/index.ts +1 -0
- package/projects/ngx-core/src/components/textarea/textarea.component.ts +234 -0
- package/projects/ngx-core/src/components/time-clock/index.ts +2 -0
- package/projects/ngx-core/src/components/time-clock/shared/time-clock.interface.ts +15 -0
- package/projects/ngx-core/src/components/time-clock/time-clock.component.ts +670 -0
- package/projects/ngx-core/src/components/toast/index.ts +5 -0
- package/projects/ngx-core/src/components/toast/shared/toast-types.enum.ts +8 -0
- package/projects/ngx-core/src/components/toast/shared/toast.model.ts +18 -0
- package/projects/ngx-core/src/components/toast/shared/toast.service.ts +66 -0
- package/projects/ngx-core/src/components/toast/toast.component.ts +116 -0
- package/projects/ngx-core/src/components/toggle-switch/index.ts +2 -0
- package/projects/ngx-core/src/components/toggle-switch/toggle-switch.component.ts +175 -0
- package/projects/ngx-core/src/components/toolbar/index.ts +2 -0
- package/{components → projects/ngx-core/src/components}/toolbar/toolbar.component.scss +22 -22
- package/projects/ngx-core/src/components/toolbar/toolbar.component.ts +28 -0
- package/projects/ngx-core/src/components/top-nav/index.ts +2 -0
- package/{components → projects/ngx-core/src/components}/top-nav/top-nav.component.scss +18 -18
- package/projects/ngx-core/src/components/top-nav/top-nav.component.ts +25 -0
- package/projects/ngx-core/src/components/tree-table/index.ts +8 -0
- package/projects/ngx-core/src/components/tree-table/shared/tree-table-arrow-animations.ts +17 -0
- package/projects/ngx-core/src/components/tree-table/shared/tree-table-column-builder.model.ts +135 -0
- package/projects/ngx-core/src/components/tree-table/shared/tree-table-column-condition.enum.ts +6 -0
- package/projects/ngx-core/src/components/tree-table/shared/tree-table-column-partial.model.ts +9 -0
- package/projects/ngx-core/src/components/tree-table/shared/tree-table-column.model.ts +64 -0
- package/projects/ngx-core/src/components/tree-table/shared/tree-table-menu-item-context-builder.model.ts +155 -0
- package/projects/ngx-core/src/components/tree-table/shared/tree-table-menu-item-context.model.ts +79 -0
- package/projects/ngx-core/src/components/tree-table/tree-table.component.html +207 -0
- package/projects/ngx-core/src/components/tree-table/tree-table.component.ts +358 -0
- package/projects/ngx-core/src/components/user-profile/index.ts +2 -0
- package/projects/ngx-core/src/components/user-profile/shared/user-profile-arrow-animations.ts +13 -0
- package/{components → projects/ngx-core/src/components}/user-profile/user-profile.component.scss +76 -76
- package/projects/ngx-core/src/components/user-profile/user-profile.component.ts +159 -0
- package/projects/ngx-core/src/components/year-picker/index.ts +1 -0
- package/projects/ngx-core/src/components/year-picker/year-picker.component.ts +264 -0
- package/projects/ngx-core/src/decorators/debounce.decorator.ts +124 -0
- package/projects/ngx-core/src/decorators/index.ts +1 -0
- package/projects/ngx-core/src/enums/index.ts +3 -0
- package/projects/ngx-core/src/enums/menu-type.enum.ts +7 -0
- package/projects/ngx-core/src/enums/sort-direction.enum.ts +6 -0
- package/projects/ngx-core/src/enums/type-operation-dialog.enum.ts +15 -0
- package/projects/ngx-core/src/guards/auth.guard.ts +15 -0
- package/projects/ngx-core/src/guards/index.ts +3 -0
- package/projects/ngx-core/src/guards/permission.guard.ts +15 -0
- package/projects/ngx-core/src/guards/public.guard.ts +21 -0
- package/projects/ngx-core/src/interceptors/auth.interceptor.ts +56 -0
- package/projects/ngx-core/src/interceptors/error.interceptor.ts +121 -0
- package/projects/ngx-core/src/interceptors/index.ts +3 -0
- package/projects/ngx-core/src/interfaces/filter-persistence.interface.ts +31 -0
- package/projects/ngx-core/src/interfaces/index.ts +3 -0
- package/projects/ngx-core/src/interfaces/page-adjust.interface.ts +10 -0
- package/projects/ngx-core/src/interfaces/permissions.interface.ts +12 -0
- package/projects/ngx-core/src/pipes/index.ts +3 -0
- package/projects/ngx-core/src/pipes/money.pipe.ts +41 -0
- package/projects/ngx-core/src/pipes/nomalize-text.pipe.ts +32 -0
- package/projects/ngx-core/src/pipes/paginator.pipe.ts +44 -0
- package/projects/ngx-core/src/providers/allowed-public-routes.provider.ts +36 -0
- package/projects/ngx-core/src/providers/app-messages.provider.ts +32 -0
- package/projects/ngx-core/src/providers/base-auth-service.provider.ts +11 -0
- package/projects/ngx-core/src/providers/echarts-core.provider.ts +11 -0
- package/projects/ngx-core/src/providers/index.ts +5 -0
- package/projects/ngx-core/src/providers/paginator-intl.provider.ts +40 -0
- package/projects/ngx-core/src/public-api.ts +14 -0
- package/projects/ngx-core/src/services/cacheable.service.ts +57 -0
- package/projects/ngx-core/src/services/dialog.service.ts +126 -0
- package/projects/ngx-core/src/services/file-saver.service.ts +86 -0
- package/projects/ngx-core/src/services/filter-indexed-db.service.ts +237 -0
- package/projects/ngx-core/src/services/filter-persistence.service.ts +359 -0
- package/projects/ngx-core/src/services/filter-url.service.ts +151 -0
- package/projects/ngx-core/src/services/index.ts +10 -0
- package/projects/ngx-core/src/services/moment-date-adapter.service.ts +15 -0
- package/projects/ngx-core/src/services/native-date-adapter.service.ts +14 -0
- package/projects/ngx-core/src/services/page-adjust.service.ts +149 -0
- package/projects/ngx-core/src/services/svg-register.service.ts +59 -0
- package/projects/ngx-core/src/signals/filter.signal.ts +138 -0
- package/projects/ngx-core/src/signals/index.ts +1 -0
- package/{theming → projects/ngx-core/src/theming}/_index.scss +19 -19
- package/projects/ngx-core/src/types/booleanish.type.ts +2 -0
- package/projects/ngx-core/src/types/implicit-template.type.ts +3 -0
- package/projects/ngx-core/src/types/index.ts +8 -0
- package/projects/ngx-core/src/types/mixable-object.type.ts +2 -0
- package/projects/ngx-core/src/types/nullable.type.ts +2 -0
- package/projects/ngx-core/src/types/numberish.type.ts +2 -0
- package/projects/ngx-core/src/types/page-event.type.ts +4 -0
- package/projects/ngx-core/src/types/uuid.type.ts +2 -0
- package/projects/ngx-core/src/types/void-listener.type.ts +2 -0
- package/projects/ngx-core/src/utils/array.util.ts +21 -0
- package/projects/ngx-core/src/utils/css.util.ts +28 -0
- package/projects/ngx-core/src/utils/currency.util.ts +176 -0
- package/projects/ngx-core/src/utils/date.util.ts +527 -0
- package/projects/ngx-core/src/utils/document.util.ts +1126 -0
- package/projects/ngx-core/src/utils/email.util.ts +25 -0
- package/projects/ngx-core/src/utils/index.ts +14 -0
- package/projects/ngx-core/src/utils/number-to-words.util.ts +249 -0
- package/projects/ngx-core/src/utils/number.util.ts +160 -0
- package/projects/ngx-core/src/utils/object.util.ts +191 -0
- package/projects/ngx-core/src/utils/phone.util.ts +242 -0
- package/projects/ngx-core/src/utils/states.util.ts +247 -0
- package/projects/ngx-core/src/utils/storage.util.ts +110 -0
- package/projects/ngx-core/src/utils/string.util.ts +172 -0
- package/projects/ngx-core/src/utils/uuid.util.ts +60 -0
- package/projects/ngx-core/tsconfig.lib.json +14 -0
- package/projects/ngx-core/tsconfig.lib.prod.json +10 -0
- package/scripts/sync-version.js +19 -0
- package/tsconfig.json +41 -0
- package/fesm2022/gipisistemas-ngx-core.mjs +0 -22406
- package/fesm2022/gipisistemas-ngx-core.mjs.map +0 -1
- package/index.d.ts +0 -6176
- /package/{components → projects/ngx-core/src/components}/action-row/action-row.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/avatar/avatar.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/button/button.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/button-group/button-group.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/checkbox/checkbox.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/chips/chips.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/confirm-dialog/confirm-dialog.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/date-picker/date-picker.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/date-range-picker/date-range-picker.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/date-range-picker/shared/calendar/calendar.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/datetime-picker/datetime-picker.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/empty/empty.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/expansion-panel/expansion-panel.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/field-error/field-error.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/fieldset/fieldset.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/file-drag-and-drop/file-drag-and-drop.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/form-wrapper/form-wrapper.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/helpful-tip/helpful-tip.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/icon/icon.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/input/input.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/input-currency/input-currency.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/input-file/input-file.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/input-group/input-group.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/input-phone/input-phone.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/label/label.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/loading/loading.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/lozenge/lozenge.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/month-picker/month-picker.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/paginator/paginator.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/password-requeriments/password-requeriments.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/pdf-viewer/pdf-viewer.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/popover/popover.component.scss +0 -0
- /package/{components/radio-button/radio-button.component.scss → projects/ngx-core/src/components/radio-button/index.ts} +0 -0
- /package/{components → projects/ngx-core/src/components}/radio-group/radio-group.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/select/select.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/select/shared/mat-select-styles.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/select-enum/select-enum.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/sidenav/sidenav.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/split-button/split-button.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/stepper/stepper.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/table/table.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/tabs/tabs.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/tag/tag.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/textarea/textarea.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/time-clock/time-clock.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/toast/toast.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/toggle-switch/toggle-switch.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/tree-table/tree-table.component.scss +0 -0
- /package/{components → projects/ngx-core/src/components}/year-picker/year-picker.component.scss +0 -0
- /package/{theming → projects/ngx-core/src/theming}/_breakpoints.scss +0 -0
- /package/{theming → projects/ngx-core/src/theming}/_palettes.scss +0 -0
- /package/{theming → projects/ngx-core/src/theming}/_theme.scss +0 -0
- /package/{theming → projects/ngx-core/src/theming}/_utils.scss +0 -0
package/.editorconfig
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Editor configuration, see https://editorconfig.org
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
[*]
|
|
5
|
+
charset = utf-8
|
|
6
|
+
indent_style = space
|
|
7
|
+
indent_size = 4
|
|
8
|
+
insert_final_newline = true
|
|
9
|
+
trim_trailing_whitespace = true
|
|
10
|
+
max_line_length = 80
|
|
11
|
+
|
|
12
|
+
[*.ts]
|
|
13
|
+
quote_type = single
|
|
14
|
+
ij_typescript_use_double_quotes = false
|
|
15
|
+
|
|
16
|
+
[*.md]
|
|
17
|
+
max_line_length = off
|
|
18
|
+
trim_trailing_whitespace = true
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
name: Publish to npm
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write # Necessário para autenticação OIDC
|
|
10
|
+
contents: read # Necessário para baixar o código
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
publish:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Checkout repository
|
|
18
|
+
uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- name: Setup Node
|
|
21
|
+
uses: actions/setup-node@v4
|
|
22
|
+
with:
|
|
23
|
+
node-version: 20
|
|
24
|
+
registry-url: 'https://registry.npmjs.org'
|
|
25
|
+
|
|
26
|
+
- name: Install dependencies
|
|
27
|
+
run: npm ci
|
|
28
|
+
|
|
29
|
+
- name: Build package
|
|
30
|
+
run: npm run build:prod
|
|
31
|
+
|
|
32
|
+
- name: Publish to npm
|
|
33
|
+
run: npm publish --access public
|
|
34
|
+
env:
|
|
35
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/.prettierignore
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
dist/
|
|
2
|
+
node_modules/
|
|
3
|
+
.angular/
|
|
4
|
+
.husky/
|
|
5
|
+
.vscode/
|
|
6
|
+
angular.json
|
|
7
|
+
# package.json
|
|
8
|
+
package-lock.json
|
|
9
|
+
tsconfig.json
|
|
10
|
+
tsconfig.app.json
|
|
11
|
+
npm/
|
|
12
|
+
public/
|
|
13
|
+
src/index.html
|
|
14
|
+
src/environments/
|
|
15
|
+
# *.json
|
|
16
|
+
*.md
|
|
17
|
+
.prettierrc
|
|
18
|
+
# eslint.config.js
|
|
19
|
+
README.md
|
package/.prettierrc
ADDED
package/.releaserc.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
branches: ['main'],
|
|
3
|
+
repositoryUrl: 'https://github.com/gipi-sistemas/gipi-ngx-core.git',
|
|
4
|
+
plugins: [
|
|
5
|
+
'@semantic-release/commit-analyzer',
|
|
6
|
+
'@semantic-release/release-notes-generator',
|
|
7
|
+
'@semantic-release/changelog',
|
|
8
|
+
[
|
|
9
|
+
'@semantic-release/npm',
|
|
10
|
+
{
|
|
11
|
+
npmPublish: true,
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
'@semantic-release/exec',
|
|
16
|
+
{
|
|
17
|
+
prepareCmd: 'node scripts/sync-version.js',
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
'@semantic-release/git',
|
|
22
|
+
{
|
|
23
|
+
assets: ['CHANGELOG.md', 'package.json', 'projects/ngx-core/package.json'],
|
|
24
|
+
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
],
|
|
28
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"configurations": [
|
|
5
|
+
{
|
|
6
|
+
"name": "ng serve",
|
|
7
|
+
"type": "chrome",
|
|
8
|
+
"request": "launch",
|
|
9
|
+
"preLaunchTask": "npm: start",
|
|
10
|
+
"url": "http://localhost:4200/"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "ng test",
|
|
14
|
+
"type": "chrome",
|
|
15
|
+
"request": "launch",
|
|
16
|
+
"preLaunchTask": "npm: test",
|
|
17
|
+
"url": "http://localhost:9876/debug.html"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"tasks": [
|
|
5
|
+
{
|
|
6
|
+
"type": "npm",
|
|
7
|
+
"script": "start",
|
|
8
|
+
"isBackground": true,
|
|
9
|
+
"problemMatcher": {
|
|
10
|
+
"owner": "typescript",
|
|
11
|
+
"pattern": "$tsc",
|
|
12
|
+
"background": {
|
|
13
|
+
"activeOnStart": true,
|
|
14
|
+
"beginsPattern": {
|
|
15
|
+
"regexp": "(.*?)"
|
|
16
|
+
},
|
|
17
|
+
"endsPattern": {
|
|
18
|
+
"regexp": "bundle generation complete"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "npm",
|
|
25
|
+
"script": "test",
|
|
26
|
+
"isBackground": true,
|
|
27
|
+
"problemMatcher": {
|
|
28
|
+
"owner": "typescript",
|
|
29
|
+
"pattern": "$tsc",
|
|
30
|
+
"background": {
|
|
31
|
+
"activeOnStart": true,
|
|
32
|
+
"beginsPattern": {
|
|
33
|
+
"regexp": "(.*?)"
|
|
34
|
+
},
|
|
35
|
+
"endsPattern": {
|
|
36
|
+
"regexp": "bundle generation complete"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# [1.1.0](https://github.com/gipi-sistemas/gipi-ngx-core/compare/v1.0.8...v1.1.0) (2025-11-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* configure Trusted Publishing via OIDC para publicação no npm ([f79b10b](https://github.com/gipi-sistemas/gipi-ngx-core/commit/f79b10b04d0aec027202d076f777448d8c5ef16e))
|
|
7
|
+
* configure Trusted Publishing via OIDC para publicação no npm ([18241cf](https://github.com/gipi-sistemas/gipi-ngx-core/commit/18241cfeae369451f7a8ddd2305c30f394b98b9c))
|
|
8
|
+
* configure Trusted Publishing via OIDC para publicação no npm ([9a7f6de](https://github.com/gipi-sistemas/gipi-ngx-core/commit/9a7f6de53a9820c21177cf02785cd355bf60e570))
|
|
9
|
+
* configure Trusted Publishing via OIDC para publicação no npm ([4137dd0](https://github.com/gipi-sistemas/gipi-ngx-core/commit/4137dd0ea71ddc1eae9c81302660dbdb2b19de90))
|
|
10
|
+
* configure Trusted Publishing via OIDC para publicação no npm ([9e7b505](https://github.com/gipi-sistemas/gipi-ngx-core/commit/9e7b505633fe4add2c857d3ae47196df41d5b2a5))
|
|
11
|
+
* Node version in GH Actions to satisfy semantic-release engine requirements ([d1a1ed4](https://github.com/gipi-sistemas/gipi-ngx-core/commit/d1a1ed4ae7dca73a76f82211097b68d48603d95f))
|
|
12
|
+
* npm ci by regenerating package-lock.json ([492a3f5](https://github.com/gipi-sistemas/gipi-ngx-core/commit/492a3f50b6e97b32f4facb9d32cad0975e8db60b))
|
|
13
|
+
* npm ci by regenerating package-lock.json ([9386c79](https://github.com/gipi-sistemas/gipi-ngx-core/commit/9386c7953285df47e42f4985965d0070b2f4ca65))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* update Angular version and dependencies ([0efa7c8](https://github.com/gipi-sistemas/gipi-ngx-core/commit/0efa7c88978436364252933309aec8092559a130))
|
|
19
|
+
|
|
20
|
+
## [1.0.8](https://github.com/gipi-sistemas/gipi-ngx-core/compare/v1.0.7...v1.0.8) (2025-11-14)
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* bug fixes, tweaks, and new implementations ([1f142ea](https://github.com/gipi-sistemas/gipi-ngx-core/commit/1f142ea8877c0b46eb0e466e7a3f2af9c76981dc))
|
|
26
|
+
|
|
27
|
+
## [1.0.7](https://github.com/gipi-sistemas/gipi-ngx-core/compare/v1.0.6...v1.0.7) (2025-10-15)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Bug Fixes
|
|
31
|
+
|
|
32
|
+
* bug fixes, tweaks, and new implementations ([6233e51](https://github.com/gipi-sistemas/gipi-ngx-core/commit/6233e51c8c0fbfe10a1c057ff64006a235a37582))
|
|
33
|
+
|
|
34
|
+
## [1.0.6](https://github.com/gipi-sistemas/gipi-ngx-core/compare/v1.0.5...v1.0.6) (2025-09-23)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* update to version 7 ([aaa429b](https://github.com/gipi-sistemas/gipi-ngx-core/commit/aaa429be82b20e8b5936ea177ae87d113ae3013c))
|
|
40
|
+
|
|
41
|
+
## [1.0.5](https://github.com/gipi-sistemas/gipi-ngx-core/compare/v1.0.4...v1.0.5) (2025-09-17)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Bug Fixes
|
|
45
|
+
|
|
46
|
+
* adjustments for publishing the library with the new NPM token ([a67c3f7](https://github.com/gipi-sistemas/gipi-ngx-core/commit/a67c3f7dc02239178f0db84b4aa29bba39ccfae8))
|
package/README.md
CHANGED
|
@@ -1,168 +1,121 @@
|
|
|
1
|
-
# GIPI -
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
##
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
###
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
No `main.ts` ou no arquivo de configuração `app.config.ts`, adicione os seguintes providers:
|
|
90
|
-
|
|
91
|
-
```typescript
|
|
92
|
-
import {
|
|
93
|
-
import {
|
|
94
|
-
import {
|
|
95
|
-
import { MatSnackBarModule } from "@angular/material/snack-bar";
|
|
96
|
-
import {
|
|
97
|
-
import {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
importProvidersFrom(MatSnackBarModule),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
- danger: `$palette-danger`
|
|
123
|
-
- white: `$palette-white`
|
|
124
|
-
- black: `$palette-black`
|
|
125
|
-
- pastels: `$palette-pastels`
|
|
126
|
-
|
|
127
|
-
##### Typography
|
|
128
|
-
|
|
129
|
-
- font-family: `'Roboto, sans-serif'`
|
|
130
|
-
- font-size: `1.4rem`
|
|
131
|
-
- font-base: `62.5%` - _100% equivale a 16px; Logo 62.5% de 16px = 10px; Assim 1rem equivale 10px;_
|
|
132
|
-
|
|
133
|
-
##### Density
|
|
134
|
-
|
|
135
|
-
- scale: `0`
|
|
136
|
-
|
|
137
|
-
Utilizando tema customizado:
|
|
138
|
-
|
|
139
|
-
```scss
|
|
140
|
-
@use "@gipisistemas/ngx-core" as ngx-core;
|
|
141
|
-
|
|
142
|
-
$custom-theme: ngx-core.define-theme(
|
|
143
|
-
(
|
|
144
|
-
palettes: (
|
|
145
|
-
primary: $palette-primary,
|
|
146
|
-
secondary: $palette-secondary,
|
|
147
|
-
// ... other palettes
|
|
148
|
-
),
|
|
149
|
-
typography: (
|
|
150
|
-
font-family: "Roboto, sans-serif",
|
|
151
|
-
font-size: 1.4rem,
|
|
152
|
-
font-base: 62.5%,
|
|
153
|
-
),
|
|
154
|
-
)
|
|
155
|
-
);
|
|
156
|
-
|
|
157
|
-
@include ngx-core.all-component-themes($custom-theme);
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
Utilizando tema padrão:
|
|
161
|
-
|
|
162
|
-
```scss
|
|
163
|
-
@use "@gipisistemas/ngx-core" as ngx-core;
|
|
164
|
-
@include ngx-core.all-component-themes();
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
## 🚀 Produção
|
|
168
|
-
Ainda será implementado
|
|
1
|
+
# GIPI NGX-CORE
|
|
2
|
+
|
|
3
|
+
NGX-CORE é um projeto modular que fornece componentes, interceptadores, guardas de rotas, estilos e utilitários para acelerar o desenvolvimento das aplicações da GIPI Sistemas. Projetada para ser flexível e escalável, ela facilita a criação de interfaces padronizadas e a implementação de funcionalidades essenciais para os projetos.
|
|
4
|
+
|
|
5
|
+
## ⚠️ Estrutura de Commits (Conventional Commits)
|
|
6
|
+
|
|
7
|
+
Este projeto utiliza **Semantic Release** para gerar versões automaticamente.
|
|
8
|
+
A versão (`patch`, `minor`, `major`) é definida de acordo com o **tipo do commit**.
|
|
9
|
+
|
|
10
|
+
### 🔑 Regras principais
|
|
11
|
+
- **fix:** incrementa **patch** → `1.0.0 → 1.0.1`
|
|
12
|
+
- **feat:** incrementa **minor** → `1.0.0 → 1.1.0`
|
|
13
|
+
- **feat!:** ou qualquer commit com **BREAKING CHANGE** no corpo → incrementa **major** → `1.0.0 → 2.0.0`
|
|
14
|
+
|
|
15
|
+
### ✅ Exemplos de commits válidos
|
|
16
|
+
- `fix: corrige bug no botão de login`
|
|
17
|
+
- `feat: adiciona novo componente de avatar`
|
|
18
|
+
- `feat!: altera API de autenticação`
|
|
19
|
+
- `chore: atualiza dependências (não gera release)`
|
|
20
|
+
- `docs: adiciona instruções no README (não gera release)`
|
|
21
|
+
|
|
22
|
+
### ⚠️ Importante
|
|
23
|
+
Sempre coloque dois pontos e um espaço depois do tipo.
|
|
24
|
+
- ✅ fix: descrição
|
|
25
|
+
- ❌ fix:descrição
|
|
26
|
+
|
|
27
|
+
Somente commits fix, feat ou com BREAKING CHANGE geram versão.
|
|
28
|
+
Outros tipos (chore, docs, refactor, etc.) não geram release automaticamente.
|
|
29
|
+
|
|
30
|
+
## 🚀 Servidor de desenvolvimento
|
|
31
|
+
|
|
32
|
+
Para iniciar um servidor de desenvolvimento local, execute:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
ng run watch
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Após iniciar o servidor, o diretório `/dist` será gerado automaticamente. Se ele já existir, será excluído e recriado, garantindo uma versão sempre atualizada da saída do projeto. Além disso, qualquer modificação nos arquivos do projeto acionará uma nova `build` automaticamente, aplicando as mudanças sem necessidade de reconstrução manual.
|
|
39
|
+
|
|
40
|
+
## 🏗 Estrutura de código
|
|
41
|
+
|
|
42
|
+
**Ainda falta detalhar**
|
|
43
|
+
|
|
44
|
+
## 🏨 Building
|
|
45
|
+
|
|
46
|
+
Para gerar a `build` do projeto, execute:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
ng build
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Isso compilará seu projeto e armazenará os artefatos de build no diretório `dist/`. Por padrão, o build de produção otimiza seu aplicativo para desempenho e velocidade.
|
|
53
|
+
|
|
54
|
+
## 📦 Instalação
|
|
55
|
+
|
|
56
|
+
Para utilizar esta biblioteca, siga os passos abaixo:
|
|
57
|
+
|
|
58
|
+
### 1️⃣ Instale os pacotes necessários
|
|
59
|
+
|
|
60
|
+
Execute o seguinte comando para instalar as dependências obrigatórias:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
npm install extensao moment-timezone
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 2️⃣ Adicione o Angular Material
|
|
67
|
+
|
|
68
|
+
Se ainda não tiver o Angular Material instalado, execute:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
ng add @angular/material
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Siga as instruções do assistente de instalação para configurar o Material corretamente.
|
|
75
|
+
|
|
76
|
+
## ⚙️ Configuração
|
|
77
|
+
|
|
78
|
+
Para evitar erros durante a execução, é necessário realizar algumas configurações no projeto Angular.
|
|
79
|
+
|
|
80
|
+
### 1️⃣ Configurar preserveSymlinks
|
|
81
|
+
|
|
82
|
+
É necessário definir `preserveSymlinks: true` no arquivo `angular.json` para evitar o seguinte erro:
|
|
83
|
+
`core.mjs:7195 ERROR RuntimeError: NG0203: inject() must be called from an injection context...`
|
|
84
|
+
|
|
85
|
+
🔹 No `angular.json`, dentro de `projects -> gipi-web -> architect -> build -> options`, adicione: `"preserveSymlinks": true`
|
|
86
|
+
|
|
87
|
+
### 2️⃣ Adicionar os Providers Necessários
|
|
88
|
+
|
|
89
|
+
No `main.ts` ou no arquivo de configuração `app.config.ts`, adicione os seguintes providers:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
import { provideHttpClient, withInterceptors } from "@angular/common/http";
|
|
93
|
+
import { importProvidersFrom, inject, provideAppInitializer } from "@angular/core";
|
|
94
|
+
import { FormsModule } from "@angular/forms";
|
|
95
|
+
import { MatSnackBarModule } from "@angular/material/snack-bar";
|
|
96
|
+
import { AuthService } from "@domain/auth/services/auth.service";
|
|
97
|
+
import { authInterceptor, DEFAULT_MESSAGES, errorInterceptor, provideALlowedPublicRoutes, provideAppMessages, provideBaseAuthService } from "@gipisistemas/ngx-core";
|
|
98
|
+
import { appRoutes } from "./app.routes";
|
|
99
|
+
|
|
100
|
+
bootstrapApplication(AppComponent, {
|
|
101
|
+
providers: [
|
|
102
|
+
...importProvidersFrom([MatSnackBarModule, FormsModule]),
|
|
103
|
+
provideBaseAuthService(AuthService),
|
|
104
|
+
// Rotas públicas que não podem redirecionar para a rota / mesmo que autenticado
|
|
105
|
+
provideALlowedPublicRoutes(["/oauth/change-password", "/oauth/confirm-access"]),
|
|
106
|
+
provideAppInitializer(() => {
|
|
107
|
+
const authService = inject(AuthService);
|
|
108
|
+
return authService.load();
|
|
109
|
+
}),
|
|
110
|
+
provideHttpClient(withInterceptors([authInterceptor, errorInterceptor])),
|
|
111
|
+
provideAppMessages(DEFAULT_MESSAGES),
|
|
112
|
+
providePaginatorIntl(),
|
|
113
|
+
],
|
|
114
|
+
}).catch((err) => console.error(err));
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Esses providers são essenciais para o funcionamento da biblioteca.
|
|
118
|
+
|
|
119
|
+
## 🔗 Recursos Adicionais
|
|
120
|
+
|
|
121
|
+
Para obter mais informações sobre como usar o Angular CLI, incluindo referências detalhadas de comandos, visite a página [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli).
|
package/angular.json
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
|
3
|
+
"version": 1,
|
|
4
|
+
"newProjectRoot": "projects",
|
|
5
|
+
"projects": {
|
|
6
|
+
"ngx-core": {
|
|
7
|
+
"schematics": {
|
|
8
|
+
"@schematics/angular:component": {
|
|
9
|
+
"style": "scss"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"i18n": {
|
|
13
|
+
"sourceLocale": "pt-BR"
|
|
14
|
+
},
|
|
15
|
+
"projectType": "library",
|
|
16
|
+
"root": "projects/ngx-core",
|
|
17
|
+
"sourceRoot": "projects/ngx-core/src",
|
|
18
|
+
"prefix": "gipi",
|
|
19
|
+
"architect": {
|
|
20
|
+
"build": {
|
|
21
|
+
"builder": "@angular/build:ng-packagr",
|
|
22
|
+
"options": {
|
|
23
|
+
"project": "projects/ngx-core/ng-package.json"
|
|
24
|
+
},
|
|
25
|
+
"configurations": {
|
|
26
|
+
"production": {
|
|
27
|
+
"tsConfig": "projects/ngx-core/tsconfig.lib.prod.json"
|
|
28
|
+
},
|
|
29
|
+
"development": {
|
|
30
|
+
"tsConfig": "projects/ngx-core/tsconfig.lib.json"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"defaultConfiguration": "production"
|
|
34
|
+
},
|
|
35
|
+
"lint": {
|
|
36
|
+
"builder": "@angular-eslint/builder:lint",
|
|
37
|
+
"options": {
|
|
38
|
+
"lintFilePatterns": [
|
|
39
|
+
"projects/ngx-core/**/*.ts",
|
|
40
|
+
"projects/ngx-core/**/*.html"
|
|
41
|
+
],
|
|
42
|
+
"eslintConfig": "projects/ngx-core/eslint.config.js"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"cli": {
|
|
49
|
+
"analytics": false,
|
|
50
|
+
"schematicCollections": [
|
|
51
|
+
"angular-eslint"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"schematics": {
|
|
55
|
+
"@schematics/angular:component": {
|
|
56
|
+
"type": "component"
|
|
57
|
+
},
|
|
58
|
+
"@schematics/angular:directive": {
|
|
59
|
+
"type": "directive"
|
|
60
|
+
},
|
|
61
|
+
"@schematics/angular:service": {
|
|
62
|
+
"type": "service"
|
|
63
|
+
},
|
|
64
|
+
"@schematics/angular:guard": {
|
|
65
|
+
"typeSeparator": "."
|
|
66
|
+
},
|
|
67
|
+
"@schematics/angular:interceptor": {
|
|
68
|
+
"typeSeparator": "."
|
|
69
|
+
},
|
|
70
|
+
"@schematics/angular:module": {
|
|
71
|
+
"typeSeparator": "."
|
|
72
|
+
},
|
|
73
|
+
"@schematics/angular:pipe": {
|
|
74
|
+
"typeSeparator": "."
|
|
75
|
+
},
|
|
76
|
+
"@schematics/angular:resolver": {
|
|
77
|
+
"typeSeparator": "."
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|