@gipisistemas/ng-core 1.0.67 → 1.0.68
Sign up to get free protection for your applications and to get access to all the features.
- package/assets/styles/colors.scss +261 -0
- package/assets/styles/layout-grid.scss +146 -0
- package/assets/styles/styles.scss +149 -0
- package/assets/styles/theme.scss +22 -0
- package/assets/styles/typography.scss +54 -0
- package/assets/styles/variable.scss +41 -0
- package/bundles/gipisistemas-ng-core.umd.js +28311 -0
- package/bundles/gipisistemas-ng-core.umd.js.map +1 -0
- package/bundles/gipisistemas-ng-core.umd.min.js +66 -0
- package/bundles/gipisistemas-ng-core.umd.min.js.map +1 -0
- package/core/app-messages.d.ts +9 -0
- package/core/app.messages.d.ts +4 -0
- package/core/components/abstract-crud.component.d.ts +27 -0
- package/core/components/abstract-find.component.d.ts +43 -0
- package/core/components/abstract.component.d.ts +23 -0
- package/core/components/alert/alert.component.d.ts +7 -0
- package/core/core.module.d.ts +17 -0
- package/core/custom-breakpoints.d.ts +7 -0
- package/core/enums/local-time.enum.d.ts +5 -0
- package/core/extensions/string.extension.d.ts +3 -0
- package/core/gipi-components/components/abstract-crud.component.d.ts +25 -0
- package/core/gipi-components/components/abstract-find.component.d.ts +73 -0
- package/core/gipi-components/components/abstract.component.d.ts +38 -0
- package/core/gipi-components/decorators/autowired.decorator.d.ts +7 -0
- package/core/gipi-components/enums/sort-direction.enum.d.ts +5 -0
- package/core/gipi-components/interface/abstract-crud.interface.d.ts +5 -0
- package/core/gipi-components/interface/abstract-find.interface.d.ts +12 -0
- package/core/gipi-components/interface/abstract.interface.d.ts +11 -0
- package/core/gipi-components/interface/base-permission.interface.d.ts +9 -0
- package/core/gipi-components/models/abstract-filter.model.d.ts +9 -0
- package/core/gipi-components/models/abstract.model.d.ts +7 -0
- package/core/gipi-components/models/applied-filter.model.d.ts +9 -0
- package/core/gipi-components/models/dto/abstract.dto.d.ts +7 -0
- package/core/gipi-components/models/page-event.model.d.ts +18 -0
- package/core/gipi-components/models/page.model.d.ts +7 -0
- package/core/gipi-components/models/sort.model.d.ts +6 -0
- package/core/gipi-components/services/abstract-crud.service.d.ts +83 -0
- package/core/gipi-components/services/abstract.service.d.ts +19 -0
- package/core/gipi-components/services/base.service.d.ts +35 -0
- package/core/gipi-components/services/file.service.d.ts +6 -0
- package/core/gipi-components/services/session-storage.service.d.ts +8 -0
- package/core/gipi-components/types/generic.type.d.ts +1 -0
- package/core/gipi-components/types/uuid.type.d.ts +1 -0
- package/core/guards/auth.guard.d.ts +11 -0
- package/core/guards/permission.guard.d.ts +14 -0
- package/core/guards/public.guard.d.ts +11 -0
- package/core/interceptors/auth.interceptor.d.ts +9 -0
- package/core/interceptors/error.interceptor.d.ts +11 -0
- package/core/models/abstract.model.d.ts +3 -0
- package/core/models/archive.model.d.ts +4 -0
- package/core/models/authority.model.d.ts +3 -0
- package/core/models/base-user.model.d.ts +12 -0
- package/core/models/dto/abstract.dto.d.ts +2 -0
- package/core/models/dto/api-error.dto.d.ts +9 -0
- package/core/models/dto/api-sub-error.dto.d.ts +7 -0
- package/core/models/dto/chart.dto.d.ts +5 -0
- package/core/models/dto/confirmation.dto.d.ts +10 -0
- package/core/models/dto/dialog.dto.d.ts +36 -0
- package/core/models/dto/filter.dto.d.ts +8 -0
- package/core/models/dto/input-listbox.dto.d.ts +6 -0
- package/core/models/dto/menu.dto.d.ts +15 -0
- package/core/models/dto/message.dto.d.ts +7 -0
- package/core/models/dto/page.dto.d.ts +8 -0
- package/core/models/dto/sort.dto.d.ts +7 -0
- package/core/models/dto/tab.dto.d.ts +12 -0
- package/core/models/dto/table-column.dto.d.ts +21 -0
- package/core/models/dto/table-group-header.dto.d.ts +7 -0
- package/core/models/dto/table-page-event.dto.d.ts +6 -0
- package/core/models/dto/token.dto.d.ts +8 -0
- package/core/models/enums/criteria-operation.enum.d.ts +13 -0
- package/core/models/enums/criteria-sort-direction.enum.d.ts +4 -0
- package/core/models/enums/menu-type.enum.d.ts +6 -0
- package/core/models/enums/radio-button.enum.d.ts +6 -0
- package/core/models/enums/sort-direction.enum.d.ts +4 -0
- package/core/models/multitenant.model.d.ts +4 -0
- package/core/models/permission.model.d.ts +8 -0
- package/core/models/role.model.d.ts +7 -0
- package/core/pipes/local-time.pipe.d.ts +6 -0
- package/core/services/abstract-crud.service.d.ts +15 -0
- package/core/services/abstract-find.service.d.ts +30 -0
- package/core/services/abstract.service.d.ts +13 -0
- package/core/services/authentication.service.d.ts +23 -0
- package/core/services/breakpoint-observer.service.d.ts +9 -0
- package/core/services/confirmation.service.d.ts +8 -0
- package/core/services/dialog.service.d.ts +8 -0
- package/core/services/message.service.d.ts +8 -0
- package/core/services/nav.service.d.ts +16 -0
- package/core/services/svg-register.service.d.ts +22 -0
- package/core/types/local-time.type.d.ts +5 -0
- package/core/types/ng-class.type.d.ts +10 -0
- package/core/utils/array.util.d.ts +14 -0
- package/core/utils/browser.util.d.ts +4 -0
- package/core/utils/currency.util.d.ts +6 -0
- package/core/utils/date.util.d.ts +39 -0
- package/core/utils/document.util.d.ts +11 -0
- package/core/utils/email.util.d.ts +4 -0
- package/core/utils/number.util.d.ts +8 -0
- package/core/utils/object.util.d.ts +20 -0
- package/core/utils/password.util.d.ts +11 -0
- package/core/utils/phone.util.d.ts +13 -0
- package/core/utils/string.util.d.ts +9 -0
- package/core/utils/table-column-builder.d.ts +40 -0
- package/core/utils/time.util.d.ts +9 -0
- package/core/utils/url-params.util.d.ts +7 -0
- package/core/utils/uuid.util.d.ts +5 -0
- package/core/utils/zindex.util.d.ts +7 -0
- package/core.d.ts +88 -0
- package/esm2015/core/app-messages.js +1 -0
- package/esm2015/core/app.messages.js +12 -0
- package/esm2015/core/components/abstract-crud.component.js +97 -0
- package/esm2015/core/components/abstract-find.component.js +189 -0
- package/esm2015/core/components/abstract.component.js +110 -0
- package/esm2015/core/components/alert/alert.component.js +24 -0
- package/esm2015/core/core.module.js +103 -0
- package/esm2015/core/custom-breakpoints.js +87 -0
- package/esm2015/core/enums/local-time.enum.js +6 -0
- package/esm2015/core/extensions/string.extension.js +37 -0
- package/esm2015/core/gipi-components/components/abstract-crud.component.js +110 -0
- package/esm2015/core/gipi-components/components/abstract-find.component.js +471 -0
- package/esm2015/core/gipi-components/components/abstract.component.js +140 -0
- package/esm2015/core/gipi-components/decorators/autowired.decorator.js +47 -0
- package/esm2015/core/gipi-components/enums/sort-direction.enum.js +6 -0
- package/esm2015/core/gipi-components/interface/abstract-crud.interface.js +1 -0
- package/esm2015/core/gipi-components/interface/abstract-find.interface.js +1 -0
- package/esm2015/core/gipi-components/interface/abstract.interface.js +1 -0
- package/esm2015/core/gipi-components/interface/base-permission.interface.js +1 -0
- package/esm2015/core/gipi-components/models/abstract-filter.model.js +3 -0
- package/esm2015/core/gipi-components/models/abstract.model.js +3 -0
- package/esm2015/core/gipi-components/models/applied-filter.model.js +19 -0
- package/esm2015/core/gipi-components/models/dto/abstract.dto.js +3 -0
- package/esm2015/core/gipi-components/models/page-event.model.js +35 -0
- package/esm2015/core/gipi-components/models/page.model.js +7 -0
- package/esm2015/core/gipi-components/models/sort.model.js +7 -0
- package/esm2015/core/gipi-components/services/abstract-crud.service.js +109 -0
- package/esm2015/core/gipi-components/services/abstract.service.js +47 -0
- package/esm2015/core/gipi-components/services/base.service.js +102 -0
- package/esm2015/core/gipi-components/services/file.service.js +51 -0
- package/esm2015/core/gipi-components/services/session-storage.service.js +44 -0
- package/esm2015/core/gipi-components/types/generic.type.js +1 -0
- package/esm2015/core/gipi-components/types/uuid.type.js +1 -0
- package/esm2015/core/guards/auth.guard.js +48 -0
- package/esm2015/core/guards/permission.guard.js +61 -0
- package/esm2015/core/guards/public.guard.js +45 -0
- package/esm2015/core/interceptors/auth.interceptor.js +28 -0
- package/esm2015/core/interceptors/error.interceptor.js +110 -0
- package/esm2015/core/models/abstract.model.js +3 -0
- package/esm2015/core/models/archive.model.js +3 -0
- package/esm2015/core/models/authority.model.js +3 -0
- package/esm2015/core/models/base-user.model.js +8 -0
- package/esm2015/core/models/dto/abstract.dto.js +3 -0
- package/esm2015/core/models/dto/api-error.dto.js +8 -0
- package/esm2015/core/models/dto/api-sub-error.dto.js +4 -0
- package/esm2015/core/models/dto/chart.dto.js +4 -0
- package/esm2015/core/models/dto/confirmation.dto.js +8 -0
- package/esm2015/core/models/dto/dialog.dto.js +4 -0
- package/esm2015/core/models/dto/filter.dto.js +4 -0
- package/esm2015/core/models/dto/input-listbox.dto.js +7 -0
- package/esm2015/core/models/dto/menu.dto.js +9 -0
- package/esm2015/core/models/dto/message.dto.js +4 -0
- package/esm2015/core/models/dto/page.dto.js +9 -0
- package/esm2015/core/models/dto/sort.dto.js +9 -0
- package/esm2015/core/models/dto/tab.dto.js +10 -0
- package/esm2015/core/models/dto/table-column.dto.js +24 -0
- package/esm2015/core/models/dto/table-group-header.dto.js +10 -0
- package/esm2015/core/models/dto/table-page-event.dto.js +7 -0
- package/esm2015/core/models/dto/token.dto.js +4 -0
- package/esm2015/core/models/enums/criteria-operation.enum.js +15 -0
- package/esm2015/core/models/enums/criteria-sort-direction.enum.js +6 -0
- package/esm2015/core/models/enums/menu-type.enum.js +7 -0
- package/esm2015/core/models/enums/radio-button.enum.js +8 -0
- package/esm2015/core/models/enums/sort-direction.enum.js +6 -0
- package/esm2015/core/models/multitenant.model.js +4 -0
- package/esm2015/core/models/permission.model.js +11 -0
- package/esm2015/core/models/role.model.js +8 -0
- package/esm2015/core/pipes/local-time.pipe.js +21 -0
- package/esm2015/core/services/abstract-crud.service.js +24 -0
- package/esm2015/core/services/abstract-find.service.js +65 -0
- package/esm2015/core/services/abstract.service.js +30 -0
- package/esm2015/core/services/authentication.service.js +100 -0
- package/esm2015/core/services/breakpoint-observer.service.js +42 -0
- package/esm2015/core/services/confirmation.service.js +55 -0
- package/esm2015/core/services/dialog.service.js +41 -0
- package/esm2015/core/services/message.service.js +33 -0
- package/esm2015/core/services/nav.service.js +48 -0
- package/esm2015/core/services/svg-register.service.js +55 -0
- package/esm2015/core/types/local-time.type.js +1 -0
- package/esm2015/core/types/ng-class.type.js +1 -0
- package/esm2015/core/utils/array.util.js +110 -0
- package/esm2015/core/utils/browser.util.js +13 -0
- package/esm2015/core/utils/currency.util.js +21 -0
- package/esm2015/core/utils/date.util.js +257 -0
- package/esm2015/core/utils/document.util.js +153 -0
- package/esm2015/core/utils/email.util.js +25 -0
- package/esm2015/core/utils/number.util.js +28 -0
- package/esm2015/core/utils/object.util.js +199 -0
- package/esm2015/core/utils/password.util.js +38 -0
- package/esm2015/core/utils/phone.util.js +125 -0
- package/esm2015/core/utils/string.util.js +40 -0
- package/esm2015/core/utils/table-column-builder.js +85 -0
- package/esm2015/core/utils/time.util.js +59 -0
- package/esm2015/core/utils/url-params.util.js +12 -0
- package/esm2015/core/utils/uuid.util.js +17 -0
- package/esm2015/core/utils/zindex.util.js +35 -0
- package/esm2015/core.js +89 -0
- package/esm2015/gipi-components.js +105 -0
- package/esm2015/gipisistemas-ng-core.js +21 -0
- package/esm2015/public_api.js +4 -0
- package/esm2015/shared/api/generate-id-component.js +12 -0
- package/esm2015/shared/api/gipi-ng-config.js +76 -0
- package/esm2015/shared/api/overlay-message.js +1 -0
- package/esm2015/shared/api/throttle.js +60 -0
- package/esm2015/shared/api/translation.js +1 -0
- package/esm2015/shared/components/button/button.component.js +110 -0
- package/esm2015/shared/components/card/card.component.js +44 -0
- package/esm2015/shared/components/checkbox/checkbox.component.js +79 -0
- package/esm2015/shared/components/dom/connected-overlay-scroll-handler.js +27 -0
- package/esm2015/shared/components/dom/dom-handler.js +538 -0
- package/esm2015/shared/components/icon/icon.component.js +35 -0
- package/esm2015/shared/components/input/input.component.js +235 -0
- package/esm2015/shared/components/input-currency/input-currency.component.js +115 -0
- package/esm2015/shared/components/input-file/input-file.component.js +161 -0
- package/esm2015/shared/components/loading/loading.component.js +15 -0
- package/esm2015/shared/components/loading-overlay/loading-overlay.component.js +21 -0
- package/esm2015/shared/components/overlay-panel/overlay-panel.component.js +361 -0
- package/esm2015/shared/components/popover/popover-ref.js +25 -0
- package/esm2015/shared/components/popover/popover.component.js +34 -0
- package/esm2015/shared/components/popover/popover.service.js +85 -0
- package/esm2015/shared/components/radio-group-entity/radio-group-entity.component.js +74 -0
- package/esm2015/shared/components/radio-group-enum/radio-group-enum.component.js +126 -0
- package/esm2015/shared/components/select-button/select-button.component.js +181 -0
- package/esm2015/shared/components/select-entity/select-entity.component.js +262 -0
- package/esm2015/shared/components/select-entity-paged/select-entity-paged.component.js +419 -0
- package/esm2015/shared/components/select-entity-paged/shared/default-options.js +35 -0
- package/esm2015/shared/components/select-entity-paged/shared/select-button-add/select-button-add.component.js +69 -0
- package/esm2015/shared/components/select-entity-paged/shared/select-button-next-batch/select-button-next-batch.component.js +59 -0
- package/esm2015/shared/components/select-entity-paged/shared/select-no-entries-found.directive.js +20 -0
- package/esm2015/shared/components/select-entity-paged/shared/select-search/select-search.component.js +547 -0
- package/esm2015/shared/components/select-entity-paged/shared/select-search-clear.directive.js +18 -0
- package/esm2015/shared/components/select-enum/select-enum.component.js +117 -0
- package/esm2015/shared/components/select-month-period/select-month-period.component.js +87 -0
- package/esm2015/shared/components/slide-toggle/slide-toggle.component.js +75 -0
- package/esm2015/shared/components/stepper/stepper.component.js +32 -0
- package/esm2015/shared/components/tab/tab.component.js +57 -0
- package/esm2015/shared/components/tab-group/tab-group.component.js +117 -0
- package/esm2015/shared/components/table/table.component.js +523 -0
- package/esm2015/shared/components/table-scrolled/table-scrolled.component.js +105 -0
- package/esm2015/shared/components/textarea/textarea.component.js +156 -0
- package/esm2015/shared/directives/dynamic-tab.directive.js +18 -0
- package/esm2015/shared/directives/generic-template.directive.js +30 -0
- package/esm2015/shared/directives/input-select-infinite-scroll.directive.js +109 -0
- package/esm2015/shared/directives/lower-case.directive.js +47 -0
- package/esm2015/shared/directives/phone-mask.directive.js +60 -0
- package/esm2015/shared/directives/space-drop.directive.js +47 -0
- package/esm2015/shared/directives/upper-case.directive.js +47 -0
- package/esm2015/shared/gipi-components/abstract-form/abstract-form.component.js +119 -0
- package/esm2015/shared/gipi-components/action-row/action-row.component.js +30 -0
- package/esm2015/shared/gipi-components/badge/badge.component.js +44 -0
- package/esm2015/shared/gipi-components/button/button.component.js +251 -0
- package/esm2015/shared/gipi-components/chips/chips.component.js +149 -0
- package/esm2015/shared/gipi-components/confirmation-dialog/confirmation-dialog.component.js +44 -0
- package/esm2015/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.js +324 -0
- package/esm2015/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range-selection-startegy.js +41 -0
- package/esm2015/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range.directive.js +35 -0
- package/esm2015/shared/gipi-components/datepicker/date-range-picker/shared/preset-range/preset-range.component.js +259 -0
- package/esm2015/shared/gipi-components/datepicker/datepicker/datepicker.component.js +218 -0
- package/esm2015/shared/gipi-components/datepicker/datepicker.module.js +130 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/calendar-body.js +341 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/calendar.js +397 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-input-parts.js +325 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-input.js +329 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-picker.js +41 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-range-selection-strategy.js +61 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/date-selection-model.js +159 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-animations.js +35 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-base.js +555 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-errors.js +14 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-input-base.js +303 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-input.js +179 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-intl.js +51 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker-toggle.js +124 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/datepicker.js +29 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/month-view.js +365 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/multi-year-view.js +305 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-adapter.js +116 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-formats.js +10 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-adapter.js +294 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-formats.js +19 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/platform.js +81 -0
- package/esm2015/shared/gipi-components/datepicker/mat-datepicker/year-view.js +294 -0
- package/esm2015/shared/gipi-components/dom/connected-overlay-scroll-handler.js +27 -0
- package/esm2015/shared/gipi-components/dom/dom-handler.js +645 -0
- package/esm2015/shared/gipi-components/dropdown-menu/dropdown-menu.component.js +185 -0
- package/esm2015/shared/gipi-components/expansion-panel/expansion-panel.component.js +81 -0
- package/esm2015/shared/gipi-components/file-drag-and-drop/file-drag-and-drop.component.js +240 -0
- package/esm2015/shared/gipi-components/file-drag-and-drop/shared/file-drag-and-drop.directive.js +92 -0
- package/esm2015/shared/gipi-components/footer/footer.component.js +29 -0
- package/esm2015/shared/gipi-components/form-field/form-field.component.js +262 -0
- package/esm2015/shared/gipi-components/helpful-tip/helpful-tip.component.js +62 -0
- package/esm2015/shared/gipi-components/infinite-scroll/infinite-scroll.directive.js +103 -0
- package/esm2015/shared/gipi-components/input-checkbox/input-checkbox.component.js +112 -0
- package/esm2015/shared/gipi-components/input-currency/input-currency.component.js +197 -0
- package/esm2015/shared/gipi-components/input-monthpicker/input-monthpicker.component.js +408 -0
- package/esm2015/shared/gipi-components/input-select/input-select.component.js +655 -0
- package/esm2015/shared/gipi-components/input-select-enum/input-select-enum.component.js +311 -0
- package/esm2015/shared/gipi-components/input-select-listbox/input-select-listbox.component.js +422 -0
- package/esm2015/shared/gipi-components/input-select-paged/input-search/input-search.component.js +374 -0
- package/esm2015/shared/gipi-components/input-select-paged/input-select-paged.component.js +350 -0
- package/esm2015/shared/gipi-components/input-select-radio/input-select-radio.component.js +269 -0
- package/esm2015/shared/gipi-components/layout-grid/col.directive.js +161 -0
- package/esm2015/shared/gipi-components/layout-grid/row.directive.js +124 -0
- package/esm2015/shared/gipi-components/layout-grid/services/breakpoint.service.js +87 -0
- package/esm2015/shared/gipi-components/layout-grid/services/resize.service.js +64 -0
- package/esm2015/shared/gipi-components/month-year-picker/calendar-month-year/calendar-month-year.component.js +193 -0
- package/esm2015/shared/gipi-components/month-year-picker/mont-year-picker.module.js +47 -0
- package/esm2015/shared/gipi-components/month-year-picker/month-year-picker.component.js +460 -0
- package/esm2015/shared/gipi-components/notification/notification.component.js +104 -0
- package/esm2015/shared/gipi-components/novelties/novelties.component.js +109 -0
- package/esm2015/shared/gipi-components/overlay/overlay.component.js +565 -0
- package/esm2015/shared/gipi-components/overlay/shared/overlay-service.js +21 -0
- package/esm2015/shared/gipi-components/overlay/shared/overlay_options.js +1 -0
- package/esm2015/shared/gipi-components/password-requeriments/password-requeriments.component.js +127 -0
- package/esm2015/shared/gipi-components/popover/popover.component.js +397 -0
- package/esm2015/shared/gipi-components/popover/shared/popover-animations.js +29 -0
- package/esm2015/shared/gipi-components/popover/shared/popover-errors.js +27 -0
- package/esm2015/shared/gipi-components/popover/shared/popover-interfaces.js +1 -0
- package/esm2015/shared/gipi-components/popover/shared/popover-target.js +19 -0
- package/esm2015/shared/gipi-components/popover/shared/popover-trigger.js +514 -0
- package/esm2015/shared/gipi-components/popover/shared/popover-types.js +1 -0
- package/esm2015/shared/gipi-components/radio-group/radio-group.component.js +143 -0
- package/esm2015/shared/gipi-components/range-page/range-page.component.js +254 -0
- package/esm2015/shared/gipi-components/range-slider/range-slider.component.js +345 -0
- package/esm2015/shared/gipi-components/select/select.component.js +211 -0
- package/esm2015/shared/gipi-components/select-button/select-button.component.js +187 -0
- package/esm2015/shared/gipi-components/sidebar/container/container.component.js +83 -0
- package/esm2015/shared/gipi-components/sidebar/sidenav/sidenav.component.js +240 -0
- package/esm2015/shared/gipi-components/stepper/stepper.component.js +37 -0
- package/esm2015/shared/gipi-components/table/components/table-body/table-body.component.js +203 -0
- package/esm2015/shared/gipi-components/table/components/table-footer/table-footer.component.js +30 -0
- package/esm2015/shared/gipi-components/table/components/table-header/table-header.component.js +152 -0
- package/esm2015/shared/gipi-components/table/components/table-pagination/shared/paginate.pipe.js +122 -0
- package/esm2015/shared/gipi-components/table/components/table-pagination/shared/pagination-controls.directive.js +225 -0
- package/esm2015/shared/gipi-components/table/components/table-pagination/shared/pagination-instance.js +1 -0
- package/esm2015/shared/gipi-components/table/components/table-pagination/shared/pagination.service.js +105 -0
- package/esm2015/shared/gipi-components/table/components/table-pagination/table-pagination.component.js +102 -0
- package/esm2015/shared/gipi-components/table/components/table-progress-bar/table-progress-bar.component.js +30 -0
- package/esm2015/shared/gipi-components/table/models/pipe-transform.model.js +1 -0
- package/esm2015/shared/gipi-components/table/models/sort.model.js +19 -0
- package/esm2015/shared/gipi-components/table/models/sorted-column.model.js +2 -0
- package/esm2015/shared/gipi-components/table/models/table-column-builder.model.js +104 -0
- package/esm2015/shared/gipi-components/table/models/table-column.model.js +162 -0
- package/esm2015/shared/gipi-components/table/table.component.js +159 -0
- package/esm2015/shared/gipi-components/table/types/sort-direction.type.js +1 -0
- package/esm2015/shared/gipi-components/table/types/sort.type.js +1 -0
- package/esm2015/shared/gipi-components/template/template.directive.js +33 -0
- package/esm2015/shared/gipi-components/toolbar/toolbar.component.js +53 -0
- package/esm2015/shared/gipi-components/top-nav/top-nav.component.js +38 -0
- package/esm2015/shared/gipi-components/user-profile/user-profile.component.js +109 -0
- package/esm2015/shared/material.module.js +102 -0
- package/esm2015/shared/shared.module.js +339 -0
- package/esm2015/shared.js +36 -0
- package/esm5/core/app-messages.js +1 -0
- package/esm5/core/app.messages.js +12 -0
- package/esm5/core/components/abstract-crud.component.js +108 -0
- package/esm5/core/components/abstract-find.component.js +201 -0
- package/esm5/core/components/abstract.component.js +112 -0
- package/esm5/core/components/alert/alert.component.js +25 -0
- package/esm5/core/core.module.js +107 -0
- package/esm5/core/custom-breakpoints.js +87 -0
- package/esm5/core/enums/local-time.enum.js +6 -0
- package/esm5/core/extensions/string.extension.js +37 -0
- package/esm5/core/gipi-components/components/abstract-crud.component.js +122 -0
- package/esm5/core/gipi-components/components/abstract-find.component.js +507 -0
- package/esm5/core/gipi-components/components/abstract.component.js +152 -0
- package/esm5/core/gipi-components/decorators/autowired.decorator.js +52 -0
- package/esm5/core/gipi-components/enums/sort-direction.enum.js +6 -0
- package/esm5/core/gipi-components/interface/abstract-crud.interface.js +1 -0
- package/esm5/core/gipi-components/interface/abstract-find.interface.js +1 -0
- package/esm5/core/gipi-components/interface/abstract.interface.js +1 -0
- package/esm5/core/gipi-components/interface/base-permission.interface.js +1 -0
- package/esm5/core/gipi-components/models/abstract-filter.model.js +7 -0
- package/esm5/core/gipi-components/models/abstract.model.js +7 -0
- package/esm5/core/gipi-components/models/applied-filter.model.js +29 -0
- package/esm5/core/gipi-components/models/dto/abstract.dto.js +7 -0
- package/esm5/core/gipi-components/models/page-event.model.js +49 -0
- package/esm5/core/gipi-components/models/page.model.js +9 -0
- package/esm5/core/gipi-components/models/sort.model.js +9 -0
- package/esm5/core/gipi-components/services/abstract-crud.service.js +114 -0
- package/esm5/core/gipi-components/services/abstract.service.js +49 -0
- package/esm5/core/gipi-components/services/base.service.js +143 -0
- package/esm5/core/gipi-components/services/file.service.js +53 -0
- package/esm5/core/gipi-components/services/session-storage.service.js +45 -0
- package/esm5/core/gipi-components/types/generic.type.js +1 -0
- package/esm5/core/gipi-components/types/uuid.type.js +1 -0
- package/esm5/core/guards/auth.guard.js +50 -0
- package/esm5/core/guards/permission.guard.js +74 -0
- package/esm5/core/guards/public.guard.js +47 -0
- package/esm5/core/interceptors/auth.interceptor.js +29 -0
- package/esm5/core/interceptors/error.interceptor.js +129 -0
- package/esm5/core/models/abstract.model.js +7 -0
- package/esm5/core/models/archive.model.js +7 -0
- package/esm5/core/models/authority.model.js +7 -0
- package/esm5/core/models/base-user.model.js +13 -0
- package/esm5/core/models/dto/abstract.dto.js +7 -0
- package/esm5/core/models/dto/api-error.dto.js +13 -0
- package/esm5/core/models/dto/api-sub-error.dto.js +11 -0
- package/esm5/core/models/dto/chart.dto.js +11 -0
- package/esm5/core/models/dto/confirmation.dto.js +13 -0
- package/esm5/core/models/dto/dialog.dto.js +11 -0
- package/esm5/core/models/dto/filter.dto.js +11 -0
- package/esm5/core/models/dto/input-listbox.dto.js +11 -0
- package/esm5/core/models/dto/menu.dto.js +14 -0
- package/esm5/core/models/dto/message.dto.js +11 -0
- package/esm5/core/models/dto/page.dto.js +14 -0
- package/esm5/core/models/dto/sort.dto.js +14 -0
- package/esm5/core/models/dto/tab.dto.js +15 -0
- package/esm5/core/models/dto/table-column.dto.js +29 -0
- package/esm5/core/models/dto/table-group-header.dto.js +15 -0
- package/esm5/core/models/dto/table-page-event.dto.js +11 -0
- package/esm5/core/models/dto/token.dto.js +11 -0
- package/esm5/core/models/enums/criteria-operation.enum.js +15 -0
- package/esm5/core/models/enums/criteria-sort-direction.enum.js +6 -0
- package/esm5/core/models/enums/menu-type.enum.js +7 -0
- package/esm5/core/models/enums/radio-button.enum.js +8 -0
- package/esm5/core/models/enums/sort-direction.enum.js +6 -0
- package/esm5/core/models/multitenant.model.js +11 -0
- package/esm5/core/models/permission.model.js +16 -0
- package/esm5/core/models/role.model.js +13 -0
- package/esm5/core/pipes/local-time.pipe.js +26 -0
- package/esm5/core/services/abstract-crud.service.js +30 -0
- package/esm5/core/services/abstract-find.service.js +71 -0
- package/esm5/core/services/abstract.service.js +32 -0
- package/esm5/core/services/authentication.service.js +121 -0
- package/esm5/core/services/breakpoint-observer.service.js +52 -0
- package/esm5/core/services/confirmation.service.js +66 -0
- package/esm5/core/services/dialog.service.js +44 -0
- package/esm5/core/services/message.service.js +36 -0
- package/esm5/core/services/nav.service.js +51 -0
- package/esm5/core/services/svg-register.service.js +67 -0
- package/esm5/core/types/local-time.type.js +1 -0
- package/esm5/core/types/ng-class.type.js +1 -0
- package/esm5/core/utils/array.util.js +120 -0
- package/esm5/core/utils/browser.util.js +17 -0
- package/esm5/core/utils/currency.util.js +26 -0
- package/esm5/core/utils/date.util.js +269 -0
- package/esm5/core/utils/document.util.js +157 -0
- package/esm5/core/utils/email.util.js +29 -0
- package/esm5/core/utils/number.util.js +32 -0
- package/esm5/core/utils/object.util.js +204 -0
- package/esm5/core/utils/password.util.js +42 -0
- package/esm5/core/utils/phone.util.js +135 -0
- package/esm5/core/utils/string.util.js +44 -0
- package/esm5/core/utils/table-column-builder.js +87 -0
- package/esm5/core/utils/time.util.js +65 -0
- package/esm5/core/utils/url-params.util.js +16 -0
- package/esm5/core/utils/uuid.util.js +21 -0
- package/esm5/core/utils/zindex.util.js +35 -0
- package/esm5/core.js +89 -0
- package/esm5/gipi-components.js +105 -0
- package/esm5/gipisistemas-ng-core.js +21 -0
- package/esm5/public_api.js +4 -0
- package/esm5/shared/api/generate-id-component.js +16 -0
- package/esm5/shared/api/gipi-ng-config.js +77 -0
- package/esm5/shared/api/overlay-message.js +1 -0
- package/esm5/shared/api/throttle.js +60 -0
- package/esm5/shared/api/translation.js +1 -0
- package/esm5/shared/components/button/button.component.js +111 -0
- package/esm5/shared/components/card/card.component.js +45 -0
- package/esm5/shared/components/checkbox/checkbox.component.js +85 -0
- package/esm5/shared/components/dom/connected-overlay-scroll-handler.js +30 -0
- package/esm5/shared/components/dom/dom-handler.js +573 -0
- package/esm5/shared/components/icon/icon.component.js +38 -0
- package/esm5/shared/components/input/input.component.js +242 -0
- package/esm5/shared/components/input-currency/input-currency.component.js +121 -0
- package/esm5/shared/components/input-file/input-file.component.js +165 -0
- package/esm5/shared/components/loading/loading.component.js +18 -0
- package/esm5/shared/components/loading-overlay/loading-overlay.component.js +23 -0
- package/esm5/shared/components/overlay-panel/overlay-panel.component.js +366 -0
- package/esm5/shared/components/popover/popover-ref.js +28 -0
- package/esm5/shared/components/popover/popover.component.js +35 -0
- package/esm5/shared/components/popover/popover.service.js +88 -0
- package/esm5/shared/components/radio-group-entity/radio-group-entity.component.js +80 -0
- package/esm5/shared/components/radio-group-enum/radio-group-enum.component.js +138 -0
- package/esm5/shared/components/select-button/select-button.component.js +195 -0
- package/esm5/shared/components/select-entity/select-entity.component.js +269 -0
- package/esm5/shared/components/select-entity-paged/select-entity-paged.component.js +453 -0
- package/esm5/shared/components/select-entity-paged/shared/default-options.js +35 -0
- package/esm5/shared/components/select-entity-paged/shared/select-button-add/select-button-add.component.js +72 -0
- package/esm5/shared/components/select-entity-paged/shared/select-button-next-batch/select-button-next-batch.component.js +62 -0
- package/esm5/shared/components/select-entity-paged/shared/select-no-entries-found.directive.js +23 -0
- package/esm5/shared/components/select-entity-paged/shared/select-search/select-search.component.js +590 -0
- package/esm5/shared/components/select-entity-paged/shared/select-search-clear.directive.js +21 -0
- package/esm5/shared/components/select-enum/select-enum.component.js +124 -0
- package/esm5/shared/components/select-month-period/select-month-period.component.js +91 -0
- package/esm5/shared/components/slide-toggle/slide-toggle.component.js +81 -0
- package/esm5/shared/components/stepper/stepper.component.js +36 -0
- package/esm5/shared/components/tab/tab.component.js +58 -0
- package/esm5/shared/components/tab-group/tab-group.component.js +125 -0
- package/esm5/shared/components/table/table.component.js +538 -0
- package/esm5/shared/components/table-scrolled/table-scrolled.component.js +107 -0
- package/esm5/shared/components/textarea/textarea.component.js +174 -0
- package/esm5/shared/directives/dynamic-tab.directive.js +19 -0
- package/esm5/shared/directives/generic-template.directive.js +31 -0
- package/esm5/shared/directives/input-select-infinite-scroll.directive.js +113 -0
- package/esm5/shared/directives/lower-case.directive.js +48 -0
- package/esm5/shared/directives/phone-mask.directive.js +61 -0
- package/esm5/shared/directives/space-drop.directive.js +48 -0
- package/esm5/shared/directives/upper-case.directive.js +48 -0
- package/esm5/shared/gipi-components/abstract-form/abstract-form.component.js +141 -0
- package/esm5/shared/gipi-components/action-row/action-row.component.js +33 -0
- package/esm5/shared/gipi-components/badge/badge.component.js +46 -0
- package/esm5/shared/gipi-components/button/button.component.js +257 -0
- package/esm5/shared/gipi-components/chips/chips.component.js +159 -0
- package/esm5/shared/gipi-components/confirmation-dialog/confirmation-dialog.component.js +46 -0
- package/esm5/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.js +378 -0
- package/esm5/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range-selection-startegy.js +42 -0
- package/esm5/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range.directive.js +40 -0
- package/esm5/shared/gipi-components/datepicker/date-range-picker/shared/preset-range/preset-range.component.js +291 -0
- package/esm5/shared/gipi-components/datepicker/datepicker/datepicker.component.js +252 -0
- package/esm5/shared/gipi-components/datepicker/datepicker.module.js +133 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/calendar-body.js +349 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/calendar.js +441 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-input-parts.js +339 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-input.js +376 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-picker.js +46 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-range-selection-strategy.js +62 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/date-selection-model.js +167 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-animations.js +35 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-base.js +586 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-errors.js +14 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-input-base.js +327 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-input.js +199 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-intl.js +52 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker-toggle.js +133 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/datepicker.js +34 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/month-view.js +384 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/multi-year-view.js +324 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-adapter.js +118 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-formats.js +10 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-adapter.js +300 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-formats.js +19 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/platform.js +82 -0
- package/esm5/shared/gipi-components/datepicker/mat-datepicker/year-view.js +313 -0
- package/esm5/shared/gipi-components/dom/connected-overlay-scroll-handler.js +30 -0
- package/esm5/shared/gipi-components/dom/dom-handler.js +681 -0
- package/esm5/shared/gipi-components/dropdown-menu/dropdown-menu.component.js +191 -0
- package/esm5/shared/gipi-components/expansion-panel/expansion-panel.component.js +83 -0
- package/esm5/shared/gipi-components/file-drag-and-drop/file-drag-and-drop.component.js +255 -0
- package/esm5/shared/gipi-components/file-drag-and-drop/shared/file-drag-and-drop.directive.js +93 -0
- package/esm5/shared/gipi-components/footer/footer.component.js +32 -0
- package/esm5/shared/gipi-components/form-field/form-field.component.js +276 -0
- package/esm5/shared/gipi-components/helpful-tip/helpful-tip.component.js +68 -0
- package/esm5/shared/gipi-components/infinite-scroll/infinite-scroll.directive.js +106 -0
- package/esm5/shared/gipi-components/input-checkbox/input-checkbox.component.js +118 -0
- package/esm5/shared/gipi-components/input-currency/input-currency.component.js +207 -0
- package/esm5/shared/gipi-components/input-monthpicker/input-monthpicker.component.js +426 -0
- package/esm5/shared/gipi-components/input-select/input-select.component.js +698 -0
- package/esm5/shared/gipi-components/input-select-enum/input-select-enum.component.js +351 -0
- package/esm5/shared/gipi-components/input-select-listbox/input-select-listbox.component.js +437 -0
- package/esm5/shared/gipi-components/input-select-paged/input-search/input-search.component.js +397 -0
- package/esm5/shared/gipi-components/input-select-paged/input-select-paged.component.js +384 -0
- package/esm5/shared/gipi-components/input-select-radio/input-select-radio.component.js +286 -0
- package/esm5/shared/gipi-components/layout-grid/col.directive.js +164 -0
- package/esm5/shared/gipi-components/layout-grid/row.directive.js +127 -0
- package/esm5/shared/gipi-components/layout-grid/services/breakpoint.service.js +90 -0
- package/esm5/shared/gipi-components/layout-grid/services/resize.service.js +68 -0
- package/esm5/shared/gipi-components/month-year-picker/calendar-month-year/calendar-month-year.component.js +200 -0
- package/esm5/shared/gipi-components/month-year-picker/mont-year-picker.module.js +50 -0
- package/esm5/shared/gipi-components/month-year-picker/month-year-picker.component.js +505 -0
- package/esm5/shared/gipi-components/notification/notification.component.js +106 -0
- package/esm5/shared/gipi-components/novelties/novelties.component.js +111 -0
- package/esm5/shared/gipi-components/overlay/overlay.component.js +670 -0
- package/esm5/shared/gipi-components/overlay/shared/overlay-service.js +22 -0
- package/esm5/shared/gipi-components/overlay/shared/overlay_options.js +1 -0
- package/esm5/shared/gipi-components/password-requeriments/password-requeriments.component.js +157 -0
- package/esm5/shared/gipi-components/popover/popover.component.js +473 -0
- package/esm5/shared/gipi-components/popover/shared/popover-animations.js +29 -0
- package/esm5/shared/gipi-components/popover/shared/popover-errors.js +21 -0
- package/esm5/shared/gipi-components/popover/shared/popover-interfaces.js +1 -0
- package/esm5/shared/gipi-components/popover/shared/popover-target.js +20 -0
- package/esm5/shared/gipi-components/popover/shared/popover-trigger.js +529 -0
- package/esm5/shared/gipi-components/popover/shared/popover-types.js +1 -0
- package/esm5/shared/gipi-components/radio-group/radio-group.component.js +155 -0
- package/esm5/shared/gipi-components/range-page/range-page.component.js +283 -0
- package/esm5/shared/gipi-components/range-slider/range-slider.component.js +364 -0
- package/esm5/shared/gipi-components/select/select.component.js +222 -0
- package/esm5/shared/gipi-components/select-button/select-button.component.js +206 -0
- package/esm5/shared/gipi-components/sidebar/container/container.component.js +96 -0
- package/esm5/shared/gipi-components/sidebar/sidenav/sidenav.component.js +267 -0
- package/esm5/shared/gipi-components/stepper/stepper.component.js +43 -0
- package/esm5/shared/gipi-components/table/components/table-body/table-body.component.js +209 -0
- package/esm5/shared/gipi-components/table/components/table-footer/table-footer.component.js +33 -0
- package/esm5/shared/gipi-components/table/components/table-header/table-header.component.js +155 -0
- package/esm5/shared/gipi-components/table/components/table-pagination/shared/paginate.pipe.js +123 -0
- package/esm5/shared/gipi-components/table/components/table-pagination/shared/pagination-controls.directive.js +228 -0
- package/esm5/shared/gipi-components/table/components/table-pagination/shared/pagination-instance.js +1 -0
- package/esm5/shared/gipi-components/table/components/table-pagination/shared/pagination.service.js +108 -0
- package/esm5/shared/gipi-components/table/components/table-pagination/table-pagination.component.js +116 -0
- package/esm5/shared/gipi-components/table/components/table-progress-bar/table-progress-bar.component.js +33 -0
- package/esm5/shared/gipi-components/table/models/pipe-transform.model.js +1 -0
- package/esm5/shared/gipi-components/table/models/sort.model.js +29 -0
- package/esm5/shared/gipi-components/table/models/sorted-column.model.js +2 -0
- package/esm5/shared/gipi-components/table/models/table-column-builder.model.js +106 -0
- package/esm5/shared/gipi-components/table/models/table-column.model.js +252 -0
- package/esm5/shared/gipi-components/table/table.component.js +161 -0
- package/esm5/shared/gipi-components/table/types/sort-direction.type.js +1 -0
- package/esm5/shared/gipi-components/table/types/sort.type.js +1 -0
- package/esm5/shared/gipi-components/template/template.directive.js +34 -0
- package/esm5/shared/gipi-components/toolbar/toolbar.component.js +56 -0
- package/esm5/shared/gipi-components/top-nav/top-nav.component.js +40 -0
- package/esm5/shared/gipi-components/user-profile/user-profile.component.js +115 -0
- package/esm5/shared/material.module.js +101 -0
- package/esm5/shared/shared.module.js +340 -0
- package/esm5/shared.js +36 -0
- package/fesm2015/gipisistemas-ng-core.js +25879 -0
- package/fesm2015/gipisistemas-ng-core.js.map +1 -0
- package/fesm5/gipisistemas-ng-core.js +27905 -0
- package/fesm5/gipisistemas-ng-core.js.map +1 -0
- package/gipi-components.d.ts +97 -0
- package/gipisistemas-ng-core.d.ts +20 -0
- package/gipisistemas-ng-core.metadata.json +1 -0
- package/package.json +31 -83
- package/public_api.d.ts +3 -0
- package/shared/api/generate-id-component.d.ts +3 -0
- package/shared/api/gipi-ng-config.d.ts +18 -0
- package/shared/api/overlay-message.d.ts +14 -0
- package/shared/api/throttle.d.ts +17 -0
- package/shared/api/translation.d.ts +45 -0
- package/shared/components/button/button.component.d.ts +26 -0
- package/shared/components/card/card.component.d.ts +10 -0
- package/shared/components/checkbox/checkbox.component.d.ts +20 -0
- package/shared/components/dom/connected-overlay-scroll-handler.d.ts +9 -0
- package/shared/components/dom/dom-handler.d.ts +74 -0
- package/shared/components/icon/icon.component.d.ts +9 -0
- package/shared/components/input/input.component.d.ts +52 -0
- package/shared/components/input-currency/input-currency.component.d.ts +29 -0
- package/shared/components/input-file/input-file.component.d.ts +28 -0
- package/shared/components/loading/loading.component.d.ts +4 -0
- package/shared/components/loading-overlay/loading-overlay.component.d.ts +6 -0
- package/shared/components/overlay-panel/overlay-panel.component.d.ts +67 -0
- package/shared/components/popover/popover-ref.d.ts +17 -0
- package/shared/components/popover/popover.component.d.ts +10 -0
- package/shared/components/popover/popover.service.d.ts +23 -0
- package/shared/components/radio-group-entity/radio-group-entity.component.d.ts +19 -0
- package/shared/components/radio-group-enum/radio-group-enum.component.d.ts +30 -0
- package/shared/components/select-button/select-button.component.d.ts +35 -0
- package/shared/components/select-entity/select-entity.component.d.ts +52 -0
- package/shared/components/select-entity-paged/select-entity-paged.component.d.ts +78 -0
- package/shared/components/select-entity-paged/shared/default-options.d.ts +25 -0
- package/shared/components/select-entity-paged/shared/select-button-add/select-button-add.component.d.ts +18 -0
- package/shared/components/select-entity-paged/shared/select-button-next-batch/select-button-next-batch.component.d.ts +16 -0
- package/shared/components/select-entity-paged/shared/select-no-entries-found.directive.d.ts +11 -0
- package/shared/components/select-entity-paged/shared/select-search/select-search.component.d.ts +119 -0
- package/shared/components/select-entity-paged/shared/select-search-clear.directive.d.ts +9 -0
- package/shared/components/select-enum/select-enum.component.d.ts +29 -0
- package/shared/components/select-month-period/select-month-period.component.d.ts +20 -0
- package/shared/components/slide-toggle/slide-toggle.component.d.ts +19 -0
- package/shared/components/stepper/stepper.component.d.ts +7 -0
- package/shared/components/tab/tab.component.d.ts +14 -0
- package/shared/components/tab-group/tab-group.component.d.ts +22 -0
- package/shared/components/table/table.component.d.ts +86 -0
- package/shared/components/table-scrolled/table-scrolled.component.d.ts +31 -0
- package/shared/components/textarea/textarea.component.d.ts +35 -0
- package/shared/directives/dynamic-tab.directive.d.ts +5 -0
- package/shared/directives/generic-template.directive.d.ts +8 -0
- package/shared/directives/input-select-infinite-scroll.directive.d.ts +35 -0
- package/shared/directives/lower-case.directive.d.ts +9 -0
- package/shared/directives/phone-mask.directive.d.ts +8 -0
- package/shared/directives/space-drop.directive.d.ts +9 -0
- package/shared/directives/upper-case.directive.d.ts +9 -0
- package/shared/gipi-components/abstract-form/abstract-form.component.d.ts +21 -0
- package/shared/gipi-components/action-row/action-row.component.d.ts +5 -0
- package/shared/gipi-components/badge/badge.component.d.ts +8 -0
- package/shared/gipi-components/button/button.component.d.ts +56 -0
- package/shared/gipi-components/chips/chips.component.d.ts +37 -0
- package/shared/gipi-components/confirmation-dialog/confirmation-dialog.component.d.ts +11 -0
- package/shared/gipi-components/datepicker/date-range-picker/date-range-picker.component.d.ts +71 -0
- package/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range-selection-startegy.d.ts +11 -0
- package/shared/gipi-components/datepicker/date-range-picker/shared/max-range/max-range.directive.d.ts +6 -0
- package/shared/gipi-components/datepicker/date-range-picker/shared/preset-range/preset-range.component.d.ts +40 -0
- package/shared/gipi-components/datepicker/datepicker/datepicker.component.d.ts +49 -0
- package/shared/gipi-components/datepicker/datepicker.module.d.ts +2 -0
- package/shared/gipi-components/datepicker/mat-datepicker/calendar-body.d.ts +143 -0
- package/shared/gipi-components/datepicker/mat-datepicker/calendar.d.ts +152 -0
- package/shared/gipi-components/datepicker/mat-datepicker/date-range-input-parts.d.ts +102 -0
- package/shared/gipi-components/datepicker/mat-datepicker/date-range-input.d.ts +124 -0
- package/shared/gipi-components/datepicker/mat-datepicker/date-range-picker.d.ts +21 -0
- package/shared/gipi-components/datepicker/mat-datepicker/date-range-selection-strategy.d.ts +45 -0
- package/shared/gipi-components/datepicker/mat-datepicker/date-selection-model.d.ts +106 -0
- package/shared/gipi-components/datepicker/mat-datepicker/datepicker-animations.d.ts +16 -0
- package/shared/gipi-components/datepicker/mat-datepicker/datepicker-base.d.ts +209 -0
- package/shared/gipi-components/datepicker/mat-datepicker/datepicker-errors.d.ts +9 -0
- package/shared/gipi-components/datepicker/mat-datepicker/datepicker-input-base.d.ts +136 -0
- package/shared/gipi-components/datepicker/mat-datepicker/datepicker-input.d.ts +68 -0
- package/shared/gipi-components/datepicker/mat-datepicker/datepicker-intl.d.ts +38 -0
- package/shared/gipi-components/datepicker/mat-datepicker/datepicker-toggle.d.ts +39 -0
- package/shared/gipi-components/datepicker/mat-datepicker/datepicker.d.ts +11 -0
- package/shared/gipi-components/datepicker/mat-datepicker/month-view.d.ts +120 -0
- package/shared/gipi-components/datepicker/mat-datepicker/multi-year-view.d.ts +85 -0
- package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-adapter.d.ts +225 -0
- package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/date-formats.d.ts +20 -0
- package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-adapter.d.ts +76 -0
- package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/native-date-formats.d.ts +9 -0
- package/shared/gipi-components/datepicker/mat-datepicker/shared/adapter/platform.d.ts +33 -0
- package/shared/gipi-components/datepicker/mat-datepicker/year-view.d.ts +97 -0
- package/shared/gipi-components/dom/connected-overlay-scroll-handler.d.ts +9 -0
- package/shared/gipi-components/dom/dom-handler.d.ts +85 -0
- package/shared/gipi-components/dropdown-menu/dropdown-menu.component.d.ts +36 -0
- package/shared/gipi-components/expansion-panel/expansion-panel.component.d.ts +16 -0
- package/shared/gipi-components/file-drag-and-drop/file-drag-and-drop.component.d.ts +43 -0
- package/shared/gipi-components/file-drag-and-drop/shared/file-drag-and-drop.directive.d.ts +13 -0
- package/shared/gipi-components/footer/footer.component.d.ts +5 -0
- package/shared/gipi-components/form-field/form-field.component.d.ts +61 -0
- package/shared/gipi-components/helpful-tip/helpful-tip.component.d.ts +13 -0
- package/shared/gipi-components/infinite-scroll/infinite-scroll.directive.d.ts +27 -0
- package/shared/gipi-components/input-checkbox/input-checkbox.component.d.ts +28 -0
- package/shared/gipi-components/input-currency/input-currency.component.d.ts +48 -0
- package/shared/gipi-components/input-monthpicker/input-monthpicker.component.d.ts +89 -0
- package/shared/gipi-components/input-select/input-select.component.d.ts +120 -0
- package/shared/gipi-components/input-select-enum/input-select-enum.component.d.ts +65 -0
- package/shared/gipi-components/input-select-listbox/input-select-listbox.component.d.ts +85 -0
- package/shared/gipi-components/input-select-paged/input-search/input-search.component.d.ts +77 -0
- package/shared/gipi-components/input-select-paged/input-select-paged.component.d.ts +66 -0
- package/shared/gipi-components/input-select-radio/input-select-radio.component.d.ts +53 -0
- package/shared/gipi-components/layout-grid/col.directive.d.ts +38 -0
- package/shared/gipi-components/layout-grid/row.directive.d.ts +28 -0
- package/shared/gipi-components/layout-grid/services/breakpoint.service.d.ts +30 -0
- package/shared/gipi-components/layout-grid/services/resize.service.d.ts +17 -0
- package/shared/gipi-components/month-year-picker/calendar-month-year/calendar-month-year.component.d.ts +37 -0
- package/shared/gipi-components/month-year-picker/mont-year-picker.module.d.ts +2 -0
- package/shared/gipi-components/month-year-picker/month-year-picker.component.d.ts +104 -0
- package/shared/gipi-components/notification/notification.component.d.ts +21 -0
- package/shared/gipi-components/novelties/novelties.component.d.ts +22 -0
- package/shared/gipi-components/overlay/overlay.component.d.ts +113 -0
- package/shared/gipi-components/overlay/shared/overlay-service.d.ts +6 -0
- package/shared/gipi-components/overlay/shared/overlay_options.d.ts +50 -0
- package/shared/gipi-components/password-requeriments/password-requeriments.component.d.ts +27 -0
- package/shared/gipi-components/popover/popover.component.d.ts +133 -0
- package/shared/gipi-components/popover/shared/popover-animations.d.ts +13 -0
- package/shared/gipi-components/popover/shared/popover-errors.d.ts +14 -0
- package/shared/gipi-components/popover/shared/popover-interfaces.d.ts +43 -0
- package/shared/gipi-components/popover/shared/popover-target.d.ts +5 -0
- package/shared/gipi-components/popover/shared/popover-trigger.d.ts +140 -0
- package/shared/gipi-components/popover/shared/popover-types.d.ts +4 -0
- package/shared/gipi-components/radio-group/radio-group.component.d.ts +33 -0
- package/shared/gipi-components/range-page/range-page.component.d.ts +55 -0
- package/shared/gipi-components/range-slider/range-slider.component.d.ts +57 -0
- package/shared/gipi-components/select/select.component.d.ts +45 -0
- package/shared/gipi-components/select-button/select-button.component.d.ts +39 -0
- package/shared/gipi-components/sidebar/container/container.component.d.ts +15 -0
- package/shared/gipi-components/sidebar/sidenav/sidenav.component.d.ts +40 -0
- package/shared/gipi-components/stepper/stepper.component.d.ts +8 -0
- package/shared/gipi-components/table/components/table-body/table-body.component.d.ts +36 -0
- package/shared/gipi-components/table/components/table-footer/table-footer.component.d.ts +5 -0
- package/shared/gipi-components/table/components/table-header/table-header.component.d.ts +28 -0
- package/shared/gipi-components/table/components/table-pagination/shared/paginate.pipe.d.ts +40 -0
- package/shared/gipi-components/table/components/table-pagination/shared/pagination-controls.directive.d.ts +81 -0
- package/shared/gipi-components/table/components/table-pagination/shared/pagination-instance.d.ts +24 -0
- package/shared/gipi-components/table/components/table-pagination/shared/pagination.service.d.ts +45 -0
- package/shared/gipi-components/table/components/table-pagination/table-pagination.component.d.ts +21 -0
- package/shared/gipi-components/table/components/table-progress-bar/table-progress-bar.component.d.ts +5 -0
- package/shared/gipi-components/table/models/pipe-transform.model.d.ts +3 -0
- package/shared/gipi-components/table/models/sort.model.d.ts +10 -0
- package/shared/gipi-components/table/models/sorted-column.model.d.ts +6 -0
- package/shared/gipi-components/table/models/table-column-builder.model.d.ts +52 -0
- package/shared/gipi-components/table/models/table-column.model.d.ts +74 -0
- package/shared/gipi-components/table/table.component.d.ts +37 -0
- package/shared/gipi-components/table/types/sort-direction.type.d.ts +1 -0
- package/shared/gipi-components/table/types/sort.type.d.ts +1 -0
- package/shared/gipi-components/template/template.directive.d.ts +8 -0
- package/shared/gipi-components/toolbar/toolbar.component.d.ts +11 -0
- package/shared/gipi-components/top-nav/top-nav.component.d.ts +8 -0
- package/shared/gipi-components/user-profile/user-profile.component.d.ts +24 -0
- package/shared/material.module.d.ts +2 -0
- package/shared/shared.module.d.ts +6 -0
- package/shared.d.ts +35 -0
- package/README.md +0 -38
- package/_ITSS-NG-CI-CD.yml +0 -53
- package/_ITSS-NG-CI-PR.yml +0 -53
- package/angular-cli.json +0 -42
- package/azure-pipelines.yml +0 -35
- package/projects/itss-ng/ng-package.json +0 -7
- package/projects/itss-ng/package.json +0 -25
@@ -0,0 +1,143 @@
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
3
|
+
import { ChangeDetectorRef, Injectable, Injector, OnDestroy } from '@angular/core';
|
4
|
+
import { MatDialog } from '@angular/material/dialog';
|
5
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
6
|
+
import { Router } from '@angular/router';
|
7
|
+
import { ConfirmationService } from '../../services/confirmation.service';
|
8
|
+
import { DialogService } from '../../services/dialog.service';
|
9
|
+
import { MessageService } from '../../services/message.service';
|
10
|
+
import { ObjectUtil } from '../../utils/object.util';
|
11
|
+
import { GIPIFileService } from './file.service';
|
12
|
+
import { GIPISessionStorageService } from './session-storage.service';
|
13
|
+
import * as i0 from "@angular/core";
|
14
|
+
import * as i1 from "@angular/router";
|
15
|
+
var GIPIBaseService = /** @class */ (function () {
|
16
|
+
function GIPIBaseService(_injector, _router) {
|
17
|
+
this._injector = _injector;
|
18
|
+
this._router = _router;
|
19
|
+
this._sessionStorageService = null;
|
20
|
+
this._confirmationService = null;
|
21
|
+
this._messageService = null;
|
22
|
+
this._dialogService = null;
|
23
|
+
this._fileService = null;
|
24
|
+
this._matDialog = null;
|
25
|
+
this._httpClient = null;
|
26
|
+
this._changeDetectorRef = null;
|
27
|
+
this._matSnackBar = null;
|
28
|
+
}
|
29
|
+
GIPIBaseService.prototype.ngOnDestroy = function () { };
|
30
|
+
Object.defineProperty(GIPIBaseService.prototype, "sessionStorageService", {
|
31
|
+
get: function () {
|
32
|
+
if (ObjectUtil.isNull(this._sessionStorageService)) {
|
33
|
+
this._sessionStorageService = this._injector.get(GIPISessionStorageService);
|
34
|
+
}
|
35
|
+
return this._sessionStorageService;
|
36
|
+
},
|
37
|
+
enumerable: false,
|
38
|
+
configurable: true
|
39
|
+
});
|
40
|
+
Object.defineProperty(GIPIBaseService.prototype, "confirmationService", {
|
41
|
+
get: function () {
|
42
|
+
if (ObjectUtil.isNull(this._confirmationService)) {
|
43
|
+
this._confirmationService = this._injector.get(ConfirmationService);
|
44
|
+
}
|
45
|
+
return this._confirmationService;
|
46
|
+
},
|
47
|
+
enumerable: false,
|
48
|
+
configurable: true
|
49
|
+
});
|
50
|
+
Object.defineProperty(GIPIBaseService.prototype, "messageService", {
|
51
|
+
get: function () {
|
52
|
+
if (ObjectUtil.isNull(this._messageService)) {
|
53
|
+
this._messageService = this._injector.get(MessageService);
|
54
|
+
}
|
55
|
+
return this._messageService;
|
56
|
+
},
|
57
|
+
enumerable: false,
|
58
|
+
configurable: true
|
59
|
+
});
|
60
|
+
Object.defineProperty(GIPIBaseService.prototype, "dialogService", {
|
61
|
+
get: function () {
|
62
|
+
if (ObjectUtil.isNull(this._dialogService)) {
|
63
|
+
this._dialogService = this._injector.get(DialogService);
|
64
|
+
}
|
65
|
+
return this._dialogService;
|
66
|
+
},
|
67
|
+
enumerable: false,
|
68
|
+
configurable: true
|
69
|
+
});
|
70
|
+
Object.defineProperty(GIPIBaseService.prototype, "fileService", {
|
71
|
+
get: function () {
|
72
|
+
if (ObjectUtil.isNull(this._fileService)) {
|
73
|
+
this._fileService = this._injector.get(GIPIFileService);
|
74
|
+
}
|
75
|
+
return this._fileService;
|
76
|
+
},
|
77
|
+
enumerable: false,
|
78
|
+
configurable: true
|
79
|
+
});
|
80
|
+
Object.defineProperty(GIPIBaseService.prototype, "matDialog", {
|
81
|
+
get: function () {
|
82
|
+
if (ObjectUtil.isNull(this._matDialog)) {
|
83
|
+
this._matDialog = this._injector.get(MatDialog);
|
84
|
+
}
|
85
|
+
return this._matDialog;
|
86
|
+
},
|
87
|
+
enumerable: false,
|
88
|
+
configurable: true
|
89
|
+
});
|
90
|
+
Object.defineProperty(GIPIBaseService.prototype, "httpClient", {
|
91
|
+
get: function () {
|
92
|
+
if (ObjectUtil.isNull(this._httpClient)) {
|
93
|
+
this._httpClient = this._injector.get(HttpClient);
|
94
|
+
}
|
95
|
+
return this._httpClient;
|
96
|
+
},
|
97
|
+
enumerable: false,
|
98
|
+
configurable: true
|
99
|
+
});
|
100
|
+
Object.defineProperty(GIPIBaseService.prototype, "router", {
|
101
|
+
get: function () {
|
102
|
+
if (ObjectUtil.isNull(this._router)) {
|
103
|
+
this._router = this._injector.get(Router);
|
104
|
+
}
|
105
|
+
return this._router;
|
106
|
+
},
|
107
|
+
enumerable: false,
|
108
|
+
configurable: true
|
109
|
+
});
|
110
|
+
Object.defineProperty(GIPIBaseService.prototype, "changeDetectorRef", {
|
111
|
+
get: function () {
|
112
|
+
if (ObjectUtil.isNull(this._changeDetectorRef)) {
|
113
|
+
this._changeDetectorRef = this._injector.get(ChangeDetectorRef);
|
114
|
+
}
|
115
|
+
return this._changeDetectorRef;
|
116
|
+
},
|
117
|
+
enumerable: false,
|
118
|
+
configurable: true
|
119
|
+
});
|
120
|
+
Object.defineProperty(GIPIBaseService.prototype, "matSnackBar", {
|
121
|
+
get: function () {
|
122
|
+
if (ObjectUtil.isNull(this._matSnackBar)) {
|
123
|
+
this._matSnackBar = this._injector.get(MatSnackBar);
|
124
|
+
}
|
125
|
+
return this._matSnackBar;
|
126
|
+
},
|
127
|
+
enumerable: false,
|
128
|
+
configurable: true
|
129
|
+
});
|
130
|
+
GIPIBaseService.ctorParameters = function () { return [
|
131
|
+
{ type: Injector },
|
132
|
+
{ type: Router }
|
133
|
+
]; };
|
134
|
+
GIPIBaseService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function GIPIBaseService_Factory() { return new GIPIBaseService(i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i1.Router)); }, token: GIPIBaseService, providedIn: "root" });
|
135
|
+
GIPIBaseService = __decorate([
|
136
|
+
Injectable({ providedIn: 'root' }),
|
137
|
+
__metadata("design:paramtypes", [Injector,
|
138
|
+
Router])
|
139
|
+
], GIPIBaseService);
|
140
|
+
return GIPIBaseService;
|
141
|
+
}());
|
142
|
+
export { GIPIBaseService };
|
143
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9naXBpLWNvbXBvbmVudHMvc2VydmljZXMvYmFzZS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxFQUFFLGlCQUFpQixFQUFFLFVBQVUsRUFBRSxRQUFRLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ25GLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUNyRCxPQUFPLEVBQUUs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FV0aWwuaXNOdWxsKHRoaXMuX21hdFNuYWNrQmFyKSkge1xuICAgICAgICAgICAgdGhpcy5fbWF0U25hY2tCYXIgPSB0aGlzLl9pbmplY3Rvci5nZXQoTWF0U25hY2tCYXIpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzLl9tYXRTbmFja0JhcjtcbiAgICB9XG5cbn1cbiJdfQ==
|
@@ -0,0 +1,53 @@
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
var GIPIFileService = /** @class */ (function () {
|
5
|
+
function GIPIFileService() {
|
6
|
+
}
|
7
|
+
GIPIFileService.prototype.download = function (data, fileName, mimeType) {
|
8
|
+
var blob = new Blob([data], { type: mimeType });
|
9
|
+
var link = document.createElement('a');
|
10
|
+
if (link.download !== undefined) {
|
11
|
+
var url = URL.createObjectURL(blob);
|
12
|
+
link.setAttribute('href', url);
|
13
|
+
link.setAttribute('download', fileName);
|
14
|
+
link.style.visibility = 'hidden';
|
15
|
+
document.body.appendChild(link);
|
16
|
+
link.click();
|
17
|
+
document.body.removeChild(link);
|
18
|
+
}
|
19
|
+
};
|
20
|
+
GIPIFileService.prototype.downloadContent = function (response) {
|
21
|
+
this.download(response.body, response.headers.get('content-disposition').split(';')[1].split('filename')[1].split('=')[1].trim(), response.headers.get('content-type'));
|
22
|
+
};
|
23
|
+
GIPIFileService.prototype.printArchive = function (data, mimeType) {
|
24
|
+
var blob = new Blob([data], { type: mimeType });
|
25
|
+
var url = URL.createObjectURL(blob);
|
26
|
+
var htmlIFrameElement = document.createElement('iframe');
|
27
|
+
document.body.appendChild(htmlIFrameElement);
|
28
|
+
htmlIFrameElement.style.display = 'none';
|
29
|
+
htmlIFrameElement.style.position = 'fixed';
|
30
|
+
htmlIFrameElement.style.right = '0';
|
31
|
+
htmlIFrameElement.style.bottom = '0';
|
32
|
+
htmlIFrameElement.style.width = '0';
|
33
|
+
htmlIFrameElement.style.height = '0';
|
34
|
+
htmlIFrameElement.style.border = '0';
|
35
|
+
htmlIFrameElement.src = url;
|
36
|
+
htmlIFrameElement.onload = function () {
|
37
|
+
setTimeout(function () {
|
38
|
+
htmlIFrameElement.focus();
|
39
|
+
htmlIFrameElement.contentWindow.print();
|
40
|
+
}, 1);
|
41
|
+
};
|
42
|
+
};
|
43
|
+
GIPIFileService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function GIPIFileService_Factory() { return new GIPIFileService(); }, token: GIPIFileService, providedIn: "root" });
|
44
|
+
GIPIFileService = __decorate([
|
45
|
+
Injectable({
|
46
|
+
providedIn: 'root'
|
47
|
+
}),
|
48
|
+
__metadata("design:paramtypes", [])
|
49
|
+
], GIPIFileService);
|
50
|
+
return GIPIFileService;
|
51
|
+
}());
|
52
|
+
export { GIPIFileService };
|
53
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9naXBpLWNvbXBvbmVudHMvc2VydmljZXMvZmlsZS5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUszQztJQUVJO0lBQWdCLENBQUM7SUFFakIsa0NBQVEsR0FBUixVQUFTLElBQVMsRUFBRSxRQUFnQixFQUFFLFFBQWdCO1FBQ2xELElBQU0sSUFBSSxHQUFTLElBQUksSUFBSSxDQUFDLENBQUMsSUFBSSxDQUFDLEVBQUUsRUFBRSxJQUFJLEVBQUUsUUFBUSxFQUFFLENBQUMsQ0FBQztRQUN4RCxJQUFNLElBQUksR0FBc0IsUUFBUSxDQUFDLGFBQWEsQ0FBQyxHQUFHLENBQUMsQ0FBQztRQUM1RCxJ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WxJRnJhbWVFbGVtZW50LnN0eWxlLndpZHRoID0gJzAnO1xuICAgICAgICBodG1sSUZyYW1lRWxlbWVudC5zdHlsZS5oZWlnaHQgPSAnMCc7XG4gICAgICAgIGh0bWxJRnJhbWVFbGVtZW50LnN0eWxlLmJvcmRlciA9ICcwJztcbiAgICAgICAgaHRtbElGcmFtZUVsZW1lbnQuc3JjID0gdXJsO1xuICAgICAgICBodG1sSUZyYW1lRWxlbWVudC5vbmxvYWQgPSAoKSA9PiB7XG4gICAgICAgICAgICBzZXRUaW1lb3V0KCgpID0+IHtcbiAgICAgICAgICAgICAgICBodG1sSUZyYW1lRWxlbWVudC5mb2N1cygpO1xuICAgICAgICAgICAgICAgIGh0bWxJRnJhbWVFbGVtZW50LmNvbnRlbnRXaW5kb3cucHJpbnQoKTtcbiAgICAgICAgICAgIH0sIDEpO1xuICAgICAgICB9O1xuICAgIH1cblxufVxuIl19
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { ObjectUtil } from '../../utils/object.util';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
var GIPISessionStorageService = /** @class */ (function () {
|
6
|
+
function GIPISessionStorageService() {
|
7
|
+
this._storage = window.sessionStorage;
|
8
|
+
}
|
9
|
+
GIPISessionStorageService.prototype.set = function (key, value) {
|
10
|
+
if (this._storage) {
|
11
|
+
this._storage.setItem(key, JSON.stringify(value));
|
12
|
+
return true;
|
13
|
+
}
|
14
|
+
return false;
|
15
|
+
};
|
16
|
+
GIPISessionStorageService.prototype.get = function (key) {
|
17
|
+
if (this._storage) {
|
18
|
+
var json = JSON.parse(this._storage.getItem(key));
|
19
|
+
return !ObjectUtil.isNull(json) ? json : null;
|
20
|
+
}
|
21
|
+
return null;
|
22
|
+
};
|
23
|
+
GIPISessionStorageService.prototype.remove = function (key) {
|
24
|
+
if (this._storage) {
|
25
|
+
this._storage.removeItem(key);
|
26
|
+
return true;
|
27
|
+
}
|
28
|
+
return false;
|
29
|
+
};
|
30
|
+
GIPISessionStorageService.prototype.clear = function () {
|
31
|
+
if (this._storage) {
|
32
|
+
this._storage.clear();
|
33
|
+
return true;
|
34
|
+
}
|
35
|
+
return false;
|
36
|
+
};
|
37
|
+
GIPISessionStorageService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function GIPISessionStorageService_Factory() { return new GIPISessionStorageService(); }, token: GIPISessionStorageService, providedIn: "root" });
|
38
|
+
GIPISessionStorageService = __decorate([
|
39
|
+
Injectable({ providedIn: 'root' }),
|
40
|
+
__metadata("design:paramtypes", [])
|
41
|
+
], GIPISessionStorageService);
|
42
|
+
return GIPISessionStorageService;
|
43
|
+
}());
|
44
|
+
export { GIPISessionStorageService };
|
45
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vzc2lvbi1zdG9yYWdlLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZ2lwaXNpc3RlbWFzL25nLWNvcmUvIiwic291cmNlcyI6WyJjb3JlL2dpcGktY29tcG9uZW50cy9zZXJ2aWNlcy9zZXNzaW9uLXN0b3JhZ2Uuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUzQyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0seUJBQXlCLENBQUM7O0FBR3JEO0lBSUk7UUFDSSxJQUFJLENBQUMsUUFBUSxHQUFHLE1BQU0sQ0FBQyxjQUFjLENBQUM7SUFDMUMsQ0FBQztJQUdELHVDQUFHLEdBQUgsVUFBSSxHQUFXLEVBQUUsS0FBYztRQUMzQixJQUFJLElBQUksQ0FBQyxRQUFRLEVBQUU7WUFDZixJQUFJLENBQUMsUUFBUSxDQUFDLE9BQU8sQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDL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zb24gOiBudWxsO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIHJlbW92ZShrZXk6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAgICAgICBpZiAodGhpcy5fc3RvcmFnZSkge1xuICAgICAgICAgICAgdGhpcy5fc3RvcmFnZS5yZW1vdmVJdGVtKGtleSk7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG4gICAgY2xlYXIoKTogYm9vbGVhbiB7XG4gICAgICAgIGlmICh0aGlzLl9zdG9yYWdlKSB7XG4gICAgICAgICAgICB0aGlzLl9zdG9yYWdlLmNsZWFyKCk7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgfVxuXG59XG4iXX0=
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJpYy50eXBlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9naXBpLWNvbXBvbmVudHMvdHlwZXMvZ2VuZXJpYy50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBHSVBJR2VuZXJpY1R5cGU8VDEsIFQyPiA9IChUMSBleHRlbmRzIHZvaWQgPyAoVDIgZXh0ZW5kcyB2b2lkID8gYW55IDogVDIpIDogVDEpO1xuIl19
|
@@ -0,0 +1 @@
|
|
1
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXVpZC50eXBlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9naXBpLWNvbXBvbmVudHMvdHlwZXMvdXVpZC50eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSBHSVBJVXVpZCA9IG51bWJlciB8IHN0cmluZztcbiJdfQ==
|
@@ -0,0 +1,50 @@
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';
|
4
|
+
import { of } from 'rxjs';
|
5
|
+
import { map } from 'rxjs/operators';
|
6
|
+
import { AuthenticationService } from '../services/authentication.service';
|
7
|
+
import { ObjectUtil } from '../utils/object.util';
|
8
|
+
import * as i0 from "@angular/core";
|
9
|
+
import * as i1 from "@angular/router";
|
10
|
+
import * as i2 from "../services/authentication.service";
|
11
|
+
var AuthGuard = /** @class */ (function () {
|
12
|
+
function AuthGuard(router, authenticationService) {
|
13
|
+
this.router = router;
|
14
|
+
this.authenticationService = authenticationService;
|
15
|
+
}
|
16
|
+
AuthGuard.prototype.canActivate = function (route, state) {
|
17
|
+
var _this = this;
|
18
|
+
if (!ObjectUtil.isNull(this.authenticationService.tokenValueLocalStorage)) {
|
19
|
+
return this.authenticationService.token.pipe(map(function (token) {
|
20
|
+
if (_this.authenticationService.isValidToken(token)) {
|
21
|
+
return true;
|
22
|
+
}
|
23
|
+
else if (!ObjectUtil.isNull(token)) {
|
24
|
+
_this.authenticationService.removeToken();
|
25
|
+
}
|
26
|
+
_this.router.navigate(['oauth/login'], { queryParams: { returnUrl: state.url } });
|
27
|
+
return false;
|
28
|
+
}));
|
29
|
+
}
|
30
|
+
this.router.navigate(['oauth/login'], { queryParams: { returnUrl: state.url } });
|
31
|
+
return of(false);
|
32
|
+
};
|
33
|
+
AuthGuard.prototype.canActivateChild = function (route, state) {
|
34
|
+
return this.canActivate(route, state);
|
35
|
+
};
|
36
|
+
AuthGuard.ctorParameters = function () { return [
|
37
|
+
{ type: Router },
|
38
|
+
{ type: AuthenticationService }
|
39
|
+
]; };
|
40
|
+
AuthGuard.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function AuthGuard_Factory() { return new AuthGuard(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.AuthenticationService)); }, token: AuthGuard, providedIn: "root" });
|
41
|
+
AuthGuard = __decorate([
|
42
|
+
Injectable({
|
43
|
+
providedIn: 'root'
|
44
|
+
}),
|
45
|
+
__metadata("design:paramtypes", [Router, AuthenticationService])
|
46
|
+
], AuthGuard);
|
47
|
+
return AuthGuard;
|
48
|
+
}());
|
49
|
+
export { AuthGuard };
|
50
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5ndWFyZC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BnaXBpc2lzdGVtYXMvbmctY29yZS8iLCJzb3VyY2VzIjpbImNvcmUvZ3VhcmRzL2F1dGguZ3VhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLHNCQUFzQixFQUFFLFdBQVcsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNySCxPQUFPLEVBQWMsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3RDLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUdyQyxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQztBQUMzRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7Ozs7QUFLbEQ7SUFFSSxtQkFBb0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gICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICApO1xuICAgICAgICB9XG4gICAgICAgIHRoaXMucm91dGVyLm5hdmlnYXRlKFsnb2F1dGgvbG9naW4nXSwgeyBxdWVyeVBhcmFtczogeyByZXR1cm5Vcmw6IHN0YXRlLnVybCB9IH0pO1xuICAgICAgICByZXR1cm4gb2YoZmFsc2UpO1xuICAgIH1cblxuICAgIGNhbkFjdGl2YXRlQ2hpbGQocm91dGU6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QsIHN0YXRlOiBSb3V0ZXJTdGF0ZVNuYXBzaG90KTogT2JzZXJ2YWJsZTxib29sZWFuPiB7XG4gICAgICAgIHJldHVybiB0aGlzLmNhbkFjdGl2YXRlKHJvdXRlLCBzdGF0ZSk7XG4gICAgfVxufVxuIl19
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { __decorate, __metadata, __values } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';
|
4
|
+
import { of } from 'rxjs';
|
5
|
+
import { map } from 'rxjs/operators';
|
6
|
+
import { AuthenticationService } from '../services/authentication.service';
|
7
|
+
import { ObjectUtil } from '../utils/object.util';
|
8
|
+
import { ArrayUtil } from './../utils/array.util';
|
9
|
+
import * as i0 from "@angular/core";
|
10
|
+
import * as i1 from "@angular/router";
|
11
|
+
import * as i2 from "../services/authentication.service";
|
12
|
+
var PermissionGuard = /** @class */ (function () {
|
13
|
+
function PermissionGuard(router, authenticationService) {
|
14
|
+
this.router = router;
|
15
|
+
this.authenticationService = authenticationService;
|
16
|
+
}
|
17
|
+
PermissionGuard.prototype.canActivate = function (route, state) {
|
18
|
+
var _this = this;
|
19
|
+
if (!ObjectUtil.isNull(this.authenticationService.tokenValueLocalStorage)) {
|
20
|
+
return this.authenticationService.token.pipe(map(function (token) {
|
21
|
+
if (_this.authenticationService.isValidToken(token)
|
22
|
+
&& (!_this.hasPermission(token.user.menuList, state.url) && !_this.hasAuthority(token.user, route.data.authority))) {
|
23
|
+
_this.router.navigate(['errors/403']);
|
24
|
+
return false;
|
25
|
+
}
|
26
|
+
return true;
|
27
|
+
}));
|
28
|
+
}
|
29
|
+
this.router.navigate(['errors/403']);
|
30
|
+
return of(false);
|
31
|
+
};
|
32
|
+
PermissionGuard.prototype.hasAuthority = function (user, permission) {
|
33
|
+
return !!user.authorities.find(function (authority) { return authority.authority.match(permission); });
|
34
|
+
};
|
35
|
+
PermissionGuard.prototype.hasPermission = function (menuList, url) {
|
36
|
+
var e_1, _a;
|
37
|
+
try {
|
38
|
+
for (var menuList_1 = __values(menuList), menuList_1_1 = menuList_1.next(); !menuList_1_1.done; menuList_1_1 = menuList_1.next()) {
|
39
|
+
var menu = menuList_1_1.value;
|
40
|
+
if (url.split('/').pop() === menu.route) {
|
41
|
+
return true;
|
42
|
+
}
|
43
|
+
else if (!ArrayUtil.isEmpty(menu.menuList)) {
|
44
|
+
return this.hasPermission(menu.menuList, url);
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
49
|
+
finally {
|
50
|
+
try {
|
51
|
+
if (menuList_1_1 && !menuList_1_1.done && (_a = menuList_1.return)) _a.call(menuList_1);
|
52
|
+
}
|
53
|
+
finally { if (e_1) throw e_1.error; }
|
54
|
+
}
|
55
|
+
return false;
|
56
|
+
};
|
57
|
+
PermissionGuard.prototype.canActivateChild = function (route, state) {
|
58
|
+
return this.canActivate(route, state);
|
59
|
+
};
|
60
|
+
PermissionGuard.ctorParameters = function () { return [
|
61
|
+
{ type: Router },
|
62
|
+
{ type: AuthenticationService }
|
63
|
+
]; };
|
64
|
+
PermissionGuard.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function PermissionGuard_Factory() { return new PermissionGuard(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.AuthenticationService)); }, token: PermissionGuard, providedIn: "root" });
|
65
|
+
PermissionGuard = __decorate([
|
66
|
+
Injectable({
|
67
|
+
providedIn: 'root'
|
68
|
+
}),
|
69
|
+
__metadata("design:paramtypes", [Router, AuthenticationService])
|
70
|
+
], PermissionGuard);
|
71
|
+
return PermissionGuard;
|
72
|
+
}());
|
73
|
+
export { PermissionGuard };
|
74
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGVybWlzc2lvbi5ndWFyZC5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BnaXBpc2lzdGVtYXMvbmctY29yZS8iLCJzb3VyY2VzIjpbImNvcmUvZ3VhcmRzL3Blcm1pc3Npb24uZ3VhcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLHNCQUFzQixFQUFFLFdBQVcsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUNySCxPQUFPLEVBQWMsRUFBRSxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQ3RDLE9BQU8sRUFBRSxHQUFHLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUdyQyxPQUFPLEVBQUUscUJBQXFCLEVBQUUsTUFBTSxvQ0FBb0MsQ0FBQztBQUMzRSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFFbEQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLHVCQUF1QixDQUFDOzs7O0FBS2xEO0lBRUkseUJBQW9CLE1BQWMsRUFBVSxxQkFBc0Q7UUFBOUUsV0FBTSxHQUFOLE1BQU0sQ0FBUTtRQUFVLDBCQUFxQixHQUFyQixxQkFBcUIsQ0FBaUM7SUFBSSxDQUFDO0lBRXZHLHFDQUFXL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BPYnNlcnZhYmxlPGJvb2xlYW4+IHtcbiAgICAgICAgaWYgKCFPYmplY3RVdGlsLmlzTnVsbCh0aGlzLmF1dGhlbnRpY2F0aW9uU2VydmljZS50b2tlblZhbHVlTG9jYWxTdG9yYWdlKSkge1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMuYXV0aGVudGljYXRpb25TZXJ2aWNlLnRva2VuLnBpcGUoXG4gICAgICAgICAgICAgICAgbWFwKHRva2VuID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMuYXV0aGVudGljYXRpb25TZXJ2aWNlLmlzVmFsaWRUb2tlbih0b2tlbilcbiAgICAgICAgICAgICAgICAgICAgICAgICYmICghdGhpcy5oYXNQZXJtaXNzaW9uKHRva2VuLnVzZXIubWVudUxpc3QsIHN0YXRlLnVybCkgJiYgIXRoaXMuaGFzQXV0aG9yaXR5KHRva2VuLnVzZXIsIHJvdXRlLmRhdGEuYXV0aG9yaXR5KSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMucm91dGVyLm5hdmlnYXRlKFsnZXJyb3JzLzQwMyddKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfVxuICAgICAgICB0aGlzLnJvdXRlci5uYXZpZ2F0ZShbJ2Vycm9ycy80MDMnXSk7XG4gICAgICAgIHJldHVybiBvZihmYWxzZSk7XG4gICAgfVxuXG4gICAgaGFzQXV0aG9yaXR5KHVzZXI6IGFueSwgcGVybWlzc2lvbjogc3RyaW5nKTogYm9vbGVhbiB7XG4gICAgICAgIHJldHVybiAhIXVzZXIuYXV0aG9yaXRpZXMuZmluZChhdXRob3JpdHkgPT4gYXV0aG9yaXR5LmF1dGhvcml0eS5tYXRjaChwZXJtaXNzaW9uKSk7XG4gICAgfVxuXG4gICAgaGFzUGVybWlzc2lvbihtZW51TGlzdDogTWVudURUT1tdLCB1cmw6IHN0cmluZyk6IGJvb2xlYW4ge1xuICAgICAgICBmb3IgKGNvbnN0IG1lbnUgb2YgbWVudUxpc3QpIHtcbiAgICAgICAgICAgIGlmICh1cmwuc3BsaXQoJy8nKS5wb3AoKSA9PT0gbWVudS5yb3V0ZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfSBlbHNlIGlmICghQXJyYXlVdGlsLmlzRW1wdHkobWVudS5tZW51TGlzdCkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5oYXNQZXJtaXNzaW9uKG1lbnUubWVudUxpc3QsIHVybCk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgIH1cblxuICAgIGNhbkFjdGl2YXRlQ2hpbGQocm91dGU6IEFjdGl2YXRlZFJvdXRlU25hcHNob3QsIHN0YXRlOiBSb3V0ZXJTdGF0ZVNuYXBzaG90KTogT2JzZXJ2YWJsZTxib29sZWFuPiB7XG4gICAgICAgIHJldHVybiB0aGlzLmNhbkFjdGl2YXRlKHJvdXRlLCBzdGF0ZSk7XG4gICAgfVxuXG59XG4iXX0=
|
@@ -0,0 +1,47 @@
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { ActivatedRouteSnapshot, CanActivate, CanActivateChild, Router, RouterStateSnapshot } from '@angular/router';
|
4
|
+
import { of } from 'rxjs';
|
5
|
+
import { map } from 'rxjs/operators';
|
6
|
+
import { AuthenticationService } from '../services/authentication.service';
|
7
|
+
import { ObjectUtil } from '../utils/object.util';
|
8
|
+
import * as i0 from "@angular/core";
|
9
|
+
import * as i1 from "@angular/router";
|
10
|
+
import * as i2 from "../services/authentication.service";
|
11
|
+
var PublicGuard = /** @class */ (function () {
|
12
|
+
function PublicGuard(router, authenticationService) {
|
13
|
+
this.router = router;
|
14
|
+
this.authenticationService = authenticationService;
|
15
|
+
}
|
16
|
+
PublicGuard.prototype.canActivate = function (route, state) {
|
17
|
+
var _this = this;
|
18
|
+
if (!ObjectUtil.isNull(this.authenticationService.tokenValueLocalStorage)) {
|
19
|
+
return this.authenticationService.token.pipe(map(function (token) {
|
20
|
+
if (_this.authenticationService.isValidToken(token)) {
|
21
|
+
_this.router.navigate(['dashboard']);
|
22
|
+
return false;
|
23
|
+
}
|
24
|
+
return true;
|
25
|
+
}));
|
26
|
+
}
|
27
|
+
this.router.navigate(['dashboard']);
|
28
|
+
return of(false);
|
29
|
+
};
|
30
|
+
PublicGuard.prototype.canActivateChild = function (route, state) {
|
31
|
+
return this.canActivate(route, state);
|
32
|
+
};
|
33
|
+
PublicGuard.ctorParameters = function () { return [
|
34
|
+
{ type: Router },
|
35
|
+
{ type: AuthenticationService }
|
36
|
+
]; };
|
37
|
+
PublicGuard.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function PublicGuard_Factory() { return new PublicGuard(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.AuthenticationService)); }, token: PublicGuard, providedIn: "root" });
|
38
|
+
PublicGuard = __decorate([
|
39
|
+
Injectable({
|
40
|
+
providedIn: 'root'
|
41
|
+
}),
|
42
|
+
__metadata("design:paramtypes", [Router, AuthenticationService])
|
43
|
+
], PublicGuard);
|
44
|
+
return PublicGuard;
|
45
|
+
}());
|
46
|
+
export { PublicGuard };
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLmd1YXJkLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9ndWFyZHMvcHVibGljLmd1YXJkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1B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VjdFV0aWwgfSBmcm9tICcuLi91dGlscy9vYmplY3QudXRpbCc7XG5cbkBJbmplY3RhYmxlKHtcbiAgICBwcm92aWRlZEluOiAncm9vdCdcbn0pXG5leHBvcnQgY2xhc3MgUHVibGljR3VhcmQgaW1wbGVtZW50cyBDYW5BY3RpdmF0ZSwgQ2FuQWN0aXZhdGVDaGlsZCB7XG5cbiAgICBjb25zdHJ1Y3Rvcihwcml2YXRlIHJvdXRlcjogUm91dGVyLCBwcml2YXRlIGF1dGhlbnRpY2F0aW9uU2VydmljZTogQXV0aGVudGljYXRpb25TZXJ2aWNlPEJhc2VVc2VyPikge1xuICAgIH1cblxuICAgIGNhbkFjdGl2YXRlKHJvdXRlOiBBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90LCBzdGF0ZTogUm91dGVyU3RhdGVTbmFwc2hvdCk6IE9ic2VydmFibGU8Ym9vbGVhbj4ge1xuICAgICAgICBpZiAoIU9iamVjdFV0aWwuaXNOdWxsKHRoaXMuYXV0aGVudGljYXRpb25TZXJ2aWNlLnRva2VuVmFsdWVMb2NhbFN0b3JhZ2UpKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5hdXRoZW50aWNhdGlvblNlcnZpY2UudG9rZW4ucGlwZShcbiAgICAgICAgICAgICAgICBtYXAodG9rZW4gPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy5hdXRoZW50aWNhdGlvblNlcnZpY2UuaXNWYWxpZFRva2VuKHRva2VuKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yb3V0ZXIubmF2aWdhdGUoWydkYXNoYm9hcmQnXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5yb3V0ZXIubmF2aWdhdGUoWydkYXNoYm9hcmQnXSk7XG4gICAgICAgIHJldHVybiBvZihmYWxzZSk7XG4gICAgfVxuXG4gICAgY2FuQWN0aXZhdGVDaGlsZChyb3V0ZTogQWN0aXZhdGVkUm91dGVTbmFwc2hvdCwgc3RhdGU6IFJvdXRlclN0YXRlU25hcHNob3QpOiBPYnNlcnZhYmxlPGJvb2xlYW4+IHtcbiAgICAgICAgcmV0dXJuIHRoaXMuY2FuQWN0aXZhdGUocm91dGUsIHN0YXRlKTtcbiAgICB9XG59XG4iXX0=
|
@@ -0,0 +1,29 @@
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { AuthenticationService } from '../services/authentication.service';
|
4
|
+
var AuthInterceptor = /** @class */ (function () {
|
5
|
+
function AuthInterceptor(authenticationService) {
|
6
|
+
this.authenticationService = authenticationService;
|
7
|
+
}
|
8
|
+
AuthInterceptor.prototype.intercept = function (request, next) {
|
9
|
+
var token = this.authenticationService.tokenValue;
|
10
|
+
if (token && token.accessToken && !request.headers.get('skip')) {
|
11
|
+
request = request.clone({
|
12
|
+
setHeaders: {
|
13
|
+
Authorization: "Bearer " + token.accessToken
|
14
|
+
}
|
15
|
+
});
|
16
|
+
}
|
17
|
+
return next.handle(request);
|
18
|
+
};
|
19
|
+
AuthInterceptor.ctorParameters = function () { return [
|
20
|
+
{ type: AuthenticationService }
|
21
|
+
]; };
|
22
|
+
AuthInterceptor = __decorate([
|
23
|
+
Injectable(),
|
24
|
+
__metadata("design:paramtypes", [AuthenticationService])
|
25
|
+
], AuthInterceptor);
|
26
|
+
return AuthInterceptor;
|
27
|
+
}());
|
28
|
+
export { AuthInterceptor };
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aC5pbnRlcmNlcHRvci5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BnaXBpc2lzdGVtYXMvbmctY29yZS8iLCJ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