@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,30 @@
|
|
1
|
+
import { __extends } from "tslib";
|
2
|
+
import { catchError, map } from 'rxjs/operators';
|
3
|
+
import { AbstractFindService } from './abstract-find.service';
|
4
|
+
var AbstractCrudService = /** @class */ (function (_super) {
|
5
|
+
__extends(AbstractCrudService, _super);
|
6
|
+
function AbstractCrudService(path, http) {
|
7
|
+
var _this = _super.call(this, path, http) || this;
|
8
|
+
_this.path = path;
|
9
|
+
return _this;
|
10
|
+
}
|
11
|
+
AbstractCrudService.prototype.save = function (entity) {
|
12
|
+
this.validate(entity);
|
13
|
+
return this.http.post(this.url(), entity, this.options()).pipe(map(this.mapper), catchError(this.handleError));
|
14
|
+
};
|
15
|
+
AbstractCrudService.prototype.saveAll = function (entities) {
|
16
|
+
var _this = this;
|
17
|
+
entities.forEach(function (entity) { return _this.validate(entity); });
|
18
|
+
return this.http.post(this.url('save-all'), entities, this.options()).pipe(map(this.mapper), catchError(this.handleError));
|
19
|
+
};
|
20
|
+
AbstractCrudService.prototype.delete = function (id) {
|
21
|
+
return this.http.delete(this.url("" + id)).pipe(map(function () { return null; }), catchError(this.handleError));
|
22
|
+
};
|
23
|
+
AbstractCrudService.prototype.deleteAll = function (entities) {
|
24
|
+
return this.http.post(this.url('delete-all'), entities, this.options()).pipe(map(this.mapper), catchError(this.handleError));
|
25
|
+
};
|
26
|
+
AbstractCrudService.prototype.validate = function (entity) { };
|
27
|
+
return AbstractCrudService;
|
28
|
+
}(AbstractFindService));
|
29
|
+
export { AbstractCrudService };
|
30
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3QtY3J1ZC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9zZXJ2aWNlcy9hYnN0cmFjdC1jcnVkLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUVBLE9BQU8sRUFBRSxVQUFVLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFJakQsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFFOUQ7SUFBZ0csdUNBQXlCO0lBTXJILDZCQUNJLElBQVksRUFDWixJQUFnQjtRQUZwQixZQUlJLGtCQUFNLElBQUksRUFBRSxJQUFJLENBQUMsU0FFcEI7UUFERyxLQUFJLENBQUMsSUFBSSxHQUFHLElBQUksQ0FBQzs7SUFDckIsQ0FBQztJQUVELGtDQUFJLEdBQUosVUFBSyxNQUFTO1FBQ1YsSUFBSSxDQUFDLFFBQVEsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUN0QixPQUFPLElBQUksQ0FBQyxJQUFJLENBQUM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Jyb3IpXG4gICAgICAgICk7XG4gICAgfVxuXG4gICAgZGVsZXRlQWxsKGVudGl0aWVzOiBUW10pOiBPYnNlcnZhYmxlPFRbXT4ge1xuICAgICAgICByZXR1cm4gdGhpcy5odHRwLnBvc3QodGhpcy51cmwoJ2RlbGV0ZS1hbGwnKSwgZW50aXRpZXMsIHRoaXMub3B0aW9ucygpKS5waXBlKFxuICAgICAgICAgICAgbWFwKHRoaXMubWFwcGVyKSxcbiAgICAgICAgICAgIGNhdGNoRXJyb3IodGhpcy5oYW5kbGVFcnJvcilcbiAgICAgICAgKTtcbiAgICB9XG5cbiAgICB2YWxpZGF0ZShlbnRpdHk6IFQpOiB2b2lkIHsgfVxuXG59XG4iXX0=
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import { __extends } from "tslib";
|
2
|
+
import { catchError, map, takeUntil } from 'rxjs/operators';
|
3
|
+
import { ObjectUtil } from '../utils/object.util';
|
4
|
+
import { StringUtil } from '../utils/string.util';
|
5
|
+
import { AbstractService } from './abstract.service';
|
6
|
+
var AbstractFindService = /** @class */ (function (_super) {
|
7
|
+
__extends(AbstractFindService, _super);
|
8
|
+
function AbstractFindService(path, http) {
|
9
|
+
var _this = _super.call(this) || this;
|
10
|
+
_this.path = path;
|
11
|
+
_this.http = http;
|
12
|
+
return _this;
|
13
|
+
}
|
14
|
+
AbstractFindService.prototype.ngOnDestroy = function () {
|
15
|
+
_super.prototype.ngOnDestroy.call(this);
|
16
|
+
};
|
17
|
+
AbstractFindService.prototype.url = function (path) {
|
18
|
+
var url = "api/" + this.path;
|
19
|
+
return path ? url.concat("/" + path) : url;
|
20
|
+
};
|
21
|
+
AbstractFindService.prototype.getOne = function (id) {
|
22
|
+
return this.http.get(this.url("" + id), this.options()).pipe(takeUntil(this.onDestroy), map(this.mapper), catchError(this.handleError));
|
23
|
+
};
|
24
|
+
AbstractFindService.prototype.find = function (filter) {
|
25
|
+
return this.http.post(this.url('find-all'), filter, this.options()).pipe(takeUntil(this.onDestroy), map(this.mapper), catchError(this.handleError));
|
26
|
+
};
|
27
|
+
AbstractFindService.prototype.findAll = function () {
|
28
|
+
return this.http.get(this.url(), this.options()).pipe(takeUntil(this.onDestroy), map(this.mapper), catchError(this.handleError));
|
29
|
+
};
|
30
|
+
AbstractFindService.prototype.findAllEnabled = function (page, size) {
|
31
|
+
if ((!page) || (page && (page < 0))) {
|
32
|
+
page = 0;
|
33
|
+
}
|
34
|
+
if ((!size) || (size && (size <= 0))) {
|
35
|
+
size = 10;
|
36
|
+
}
|
37
|
+
return this.http.get(this.url("find-all-enabled?page=" + page + "&size=" + size), this.options()).pipe(takeUntil(this.onDestroy), map(this.mapper), catchError(this.handleError));
|
38
|
+
};
|
39
|
+
/**
|
40
|
+
* Pesquisa páginada por valor.
|
41
|
+
* @param value valor para pesquisar
|
42
|
+
* @param page página que ira consultar. default = 0;
|
43
|
+
* @param size quantidade de registros a retornar. default = 10;
|
44
|
+
* @param sort tipo de ordenação. default = null;
|
45
|
+
* @returns Observable<PageDTO<T>>;
|
46
|
+
*/
|
47
|
+
AbstractFindService.prototype.findByValue = function (value, page, size, sort) {
|
48
|
+
if (size === void 0) { size = 10; }
|
49
|
+
var lValue = value;
|
50
|
+
if (value) {
|
51
|
+
lValue = StringUtil.removeAccents(value).trim();
|
52
|
+
}
|
53
|
+
else {
|
54
|
+
lValue = '';
|
55
|
+
}
|
56
|
+
if ((!page) || (page && (page < 0))) {
|
57
|
+
page = 0;
|
58
|
+
}
|
59
|
+
if ((!size) || (size && (size <= 0))) {
|
60
|
+
size = 10;
|
61
|
+
}
|
62
|
+
var lSort = '';
|
63
|
+
if (!ObjectUtil.isNull(sort) && !StringUtil.isEmpty(sort.property)) {
|
64
|
+
lSort = "&sort=" + sort.property + "," + sort.direction;
|
65
|
+
}
|
66
|
+
return this.http.get(this.url("find-by-value?page=" + page + "&size=" + size + lSort + "&value=" + lValue), this.options()).pipe(takeUntil(this.onDestroy), map(this.mapper), catchError(this.handleError));
|
67
|
+
};
|
68
|
+
return AbstractFindService;
|
69
|
+
}(AbstractService));
|
70
|
+
export { AbstractFindService };
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3QtZmluZC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9zZXJ2aWNlcy9hYnN0cmFjdC1maW5kLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUdBLE9BQU8sRUFBRSxVQUFVLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBSzVELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDbEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRXJEO0lBQWdHLHVDQUFlO0lBRTNHLDZCQUNjLElBQVksRUFDWixJQUFnQjtRQUY5QixZQUlJLGlCQUFPLFNBQ1Y7UUFKYSxVQUFJLEdBQUosSUFBSSxDQUFRO1FBQ1osVUFBSSxHQUFKLElBQUksQ0FBWTs7SUFHOUIsQ0FBQztJQUVELHlDQUFXLEdBQVg7UUFDSSxpQkFBTSxXQUFXLFdBQUUsQ0FBQztJQUN4QixDQUFDO0lBRVMsaUNBQUcsR0FBYixVQUFjLElBQWE7UUFDdkIsSUFBTSxHQUFHLEdBQUcsU0FBTyxJQUFJLENBQUMsSUFBTSxDQUFDO1FBQy9CLE9BQU8sSUFBSSxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLE1BQUksSUFBTSxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQztJQUMvQyxDQUFDO0lBRUQsb0NBQ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bFZhbHVlfWApLCB0aGlzLm9wdGlvbnMoKSkucGlwZShcbiAgICAgICAgICAgIHRha2VVbnRpbCh0aGlzLm9uRGVzdHJveSksXG4gICAgICAgICAgICBtYXAodGhpcy5tYXBwZXIpLFxuICAgICAgICAgICAgY2F0Y2hFcnJvcih0aGlzLmhhbmRsZUVycm9yKVxuICAgICAgICApO1xuICAgIH1cblxufVxuXG4iXX0=
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import { HttpHeaders, HttpParams } from '@angular/common/http';
|
2
|
+
import { Subject, throwError } from 'rxjs';
|
3
|
+
var AbstractService = /** @class */ (function () {
|
4
|
+
function AbstractService() {
|
5
|
+
this.onDestroy = new Subject();
|
6
|
+
}
|
7
|
+
AbstractService.prototype.ngOnDestroy = function () {
|
8
|
+
this.onDestroy.next();
|
9
|
+
this.onDestroy.complete();
|
10
|
+
};
|
11
|
+
AbstractService.prototype.options = function (params, headers) {
|
12
|
+
return {
|
13
|
+
headers: headers ? headers : this.buildHeaders(),
|
14
|
+
params: params ? params : this.buildParams()
|
15
|
+
};
|
16
|
+
};
|
17
|
+
AbstractService.prototype.buildHeaders = function () {
|
18
|
+
return new HttpHeaders();
|
19
|
+
};
|
20
|
+
AbstractService.prototype.buildParams = function () {
|
21
|
+
return new HttpParams();
|
22
|
+
};
|
23
|
+
AbstractService.prototype.mapper = function (jsonObj) {
|
24
|
+
return jsonObj;
|
25
|
+
};
|
26
|
+
AbstractService.prototype.handleError = function (error) {
|
27
|
+
return throwError(error);
|
28
|
+
};
|
29
|
+
return AbstractService;
|
30
|
+
}());
|
31
|
+
export { AbstractService };
|
32
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWJzdHJhY3Quc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BnaXBpc2lzdGVtYXMvbmctY29yZS8iLCJzb3VyY2VzIjpbImNvcmUvc2VydmljZXMvYWJzdHJhY3Quc2VydmljZS50cyJdLCJ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HtcbiAgICAgICAgcmV0dXJuIG5ldyBIdHRwUGFyYW1zKCk7XG4gICAgfVxuXG4gICAgcHJvdGVjdGVkIG1hcHBlcihqc29uT2JqOiBhbnkpOiBhbnkge1xuICAgICAgICByZXR1cm4ganNvbk9iajtcbiAgICB9XG5cbiAgICBwcm90ZWN0ZWQgaGFuZGxlRXJyb3IoZXJyb3I6IHN0cmluZyk6IE9ic2VydmFibGU8YW55PiB7XG4gICAgICAgIHJldHVybiB0aHJvd0Vycm9yKGVycm9yKTtcbiAgICB9XG5cbn1cbiJdfQ==
|
@@ -0,0 +1,121 @@
|
|
1
|
+
import { __awaiter, __decorate, __extends, __generator, __metadata } from "tslib";
|
2
|
+
import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http';
|
3
|
+
import { Injectable } from '@angular/core';
|
4
|
+
import { Router } from '@angular/router';
|
5
|
+
import { BehaviorSubject } from 'rxjs';
|
6
|
+
import { map } from 'rxjs/operators';
|
7
|
+
import * as moment_ from 'moment';
|
8
|
+
import * as i0 from "@angular/core";
|
9
|
+
import * as i1 from "@angular/router";
|
10
|
+
import * as i2 from "@angular/common/http";
|
11
|
+
var moment = moment_;
|
12
|
+
import { ObjectUtil } from '../utils/object.util';
|
13
|
+
import { AbstractService } from './abstract.service';
|
14
|
+
import { StringUtil } from '../utils/string.util';
|
15
|
+
var AuthenticationService = /** @class */ (function (_super) {
|
16
|
+
__extends(AuthenticationService, _super);
|
17
|
+
function AuthenticationService(router, http) {
|
18
|
+
var _this = _super.call(this) || this;
|
19
|
+
_this.router = router;
|
20
|
+
_this.http = http;
|
21
|
+
_this.tokenSubject = new BehaviorSubject(JSON.parse(localStorage.getItem('token')));
|
22
|
+
_this.token = _this.tokenSubject.asObservable();
|
23
|
+
return _this;
|
24
|
+
}
|
25
|
+
AuthenticationService.prototype.login = function (user) {
|
26
|
+
var _this = this;
|
27
|
+
var body = new HttpParams()
|
28
|
+
.set('grant_type', 'password')
|
29
|
+
.set('username', user.username)
|
30
|
+
.set('password', user.password);
|
31
|
+
return this.http.post('api/authenticator/oauth/token', body, this.options()).pipe(map(function (accessToken) { return _this.setCurrentUser(accessToken); }));
|
32
|
+
};
|
33
|
+
AuthenticationService.prototype.logout = function () {
|
34
|
+
return __awaiter(this, void 0, void 0, function () {
|
35
|
+
var _this = this;
|
36
|
+
return __generator(this, function (_a) {
|
37
|
+
switch (_a.label) {
|
38
|
+
case 0: return [4 /*yield*/, this.revokeToken().toPromise().then(function () {
|
39
|
+
_this.removeToken();
|
40
|
+
_this.router.navigate(['/oauth/login'], { queryParams: { returnUrl: _this.router.routerState.snapshot.url } });
|
41
|
+
})];
|
42
|
+
case 1:
|
43
|
+
_a.sent();
|
44
|
+
return [2 /*return*/];
|
45
|
+
}
|
46
|
+
});
|
47
|
+
});
|
48
|
+
};
|
49
|
+
AuthenticationService.prototype.removeToken = function () {
|
50
|
+
localStorage.removeItem('token');
|
51
|
+
this.tokenSubject.next(null);
|
52
|
+
};
|
53
|
+
AuthenticationService.prototype.refreshToken = function (additionalParams) {
|
54
|
+
var _this = this;
|
55
|
+
var body = new HttpParams()
|
56
|
+
.set('grant_type', 'refresh_token')
|
57
|
+
.set('refresh_token', this.tokenValue.refreshToken);
|
58
|
+
if (!ObjectUtil.isNull(additionalParams)) {
|
59
|
+
additionalParams.forEach(function (value, key) { return body = body.append(key, value); });
|
60
|
+
}
|
61
|
+
return this.http.post('api/authenticator/oauth/token', body, this.options(this.buildParams(), this.buildHeaders().append('skip', 'true'))).pipe(map(function (accessToken) { return _this.setCurrentUser(accessToken); }));
|
62
|
+
};
|
63
|
+
AuthenticationService.prototype.revokeToken = function (token) {
|
64
|
+
var lHttpHeaders = null;
|
65
|
+
if (!ObjectUtil.isNull(token)) {
|
66
|
+
lHttpHeaders = new HttpHeaders()
|
67
|
+
.append('Authorization', token.accessToken)
|
68
|
+
.append('skip', 'true');
|
69
|
+
}
|
70
|
+
return this.http.post('api/authenticator/oauth/token/revoke', {}, this.options(null, lHttpHeaders));
|
71
|
+
};
|
72
|
+
AuthenticationService.prototype.isValidToken = function (token) {
|
73
|
+
if (!ObjectUtil.isNull(token) && !ObjectUtil.isNull(token.expiration)) {
|
74
|
+
return new Date(token.expiration).valueOf() > new Date().valueOf();
|
75
|
+
}
|
76
|
+
return false;
|
77
|
+
};
|
78
|
+
AuthenticationService.prototype.setCurrentUser = function (token) {
|
79
|
+
if (token && token.accessToken) {
|
80
|
+
localStorage.setItem('token', JSON.stringify(token));
|
81
|
+
this.tokenSubject.next(token);
|
82
|
+
}
|
83
|
+
return token;
|
84
|
+
};
|
85
|
+
Object.defineProperty(AuthenticationService.prototype, "tokenValue", {
|
86
|
+
get: function () {
|
87
|
+
return this.tokenSubject.value;
|
88
|
+
},
|
89
|
+
enumerable: false,
|
90
|
+
configurable: true
|
91
|
+
});
|
92
|
+
Object.defineProperty(AuthenticationService.prototype, "tokenValueLocalStorage", {
|
93
|
+
get: function () {
|
94
|
+
var token = localStorage.getItem('token');
|
95
|
+
return !StringUtil.isEmpty(token) ? JSON.parse(token) : null;
|
96
|
+
},
|
97
|
+
enumerable: false,
|
98
|
+
configurable: true
|
99
|
+
});
|
100
|
+
AuthenticationService.prototype.buildHeaders = function () {
|
101
|
+
return new HttpHeaders()
|
102
|
+
.append('Authorization', 'Basic ' + btoa('CONVENANT_MANAGEMENT:123'))
|
103
|
+
.append('Content-Type', 'application/x-www-form-urlencoded')
|
104
|
+
.append('accessType', 'WEB')
|
105
|
+
.append('timeZone', moment(new Date()).format('ZZ'));
|
106
|
+
};
|
107
|
+
AuthenticationService.ctorParameters = function () { return [
|
108
|
+
{ type: Router },
|
109
|
+
{ type: HttpClient }
|
110
|
+
]; };
|
111
|
+
AuthenticationService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function AuthenticationService_Factory() { return new AuthenticationService(i0.ɵɵinject(i1.Router), i0.ɵɵinject(i2.HttpClient)); }, token: AuthenticationService, providedIn: "root" });
|
112
|
+
AuthenticationService = __decorate([
|
113
|
+
Injectable({
|
114
|
+
providedIn: 'root'
|
115
|
+
}),
|
116
|
+
__metadata("design:paramtypes", [Router, HttpClient])
|
117
|
+
], AuthenticationService);
|
118
|
+
return AuthenticationService;
|
119
|
+
}(AbstractService));
|
120
|
+
export { AuthenticationService };
|
121
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aGVudGljYXRpb24uc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiJuZzovL0BnaXBpc2lzdGVtYXMvbmctY29yZS8iLCJzb3VyY2VzIjpbImNvcmUvc2VydmljZXMvYXV0aGVudGljYXRpb24uc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQUUsVUFBVSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDM0UsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUMzQyxPQUFPLEVBQUUsTUFBTSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDekMsT0FBTyxFQUFFLGVBQWUsRUFBYyxNQUFNLE1BQU0sQ0FBQztBQUNuRCxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFckMsT0FBTyxLQUFLLE9BQU8sTUFBTSxRQUFRLENBQUM7Ozs7QUFDbEMsSUFBTSxNQUFNLEdBQUcsT0FBTyxDQUFDO0FBSXZCLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFDckQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBS2xEO0lBQStELHlDQUFlO0lBTTFFLCtCQUFzQixNQUFjLEVBQVksSUFBZ0I7UUFBaEUsWUFDSSxpQkFBTyxTQUdWO1F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0b2EoJ0NPTlZFTkFOVF9NQU5BR0VNRU5UOjEyMycpKVxuICAgICAgICAgICAgLmFwcGVuZCgnQ29udGVudC1UeXBlJywgJ2FwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZCcpXG4gICAgICAgICAgICAuYXBwZW5kKCdhY2Nlc3NUeXBlJywgJ1dFQicpXG4gICAgICAgICAgICAuYXBwZW5kKCd0aW1lWm9uZScsIG1vbWVudChuZXcgRGF0ZSgpKS5mb3JtYXQoJ1paJykpO1xuICAgIH1cblxufVxuIl19
|
@@ -0,0 +1,52 @@
|
|
1
|
+
import { __decorate, __extends, __metadata, __read } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { fromEvent } from 'rxjs';
|
4
|
+
import { distinctUntilChanged, map, shareReplay, startWith } from 'rxjs/operators';
|
5
|
+
import { AbstractService } from './abstract.service';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
export var POINTS_NAME = [
|
8
|
+
'xl',
|
9
|
+
'lg',
|
10
|
+
'md',
|
11
|
+
'sm',
|
12
|
+
'xs'
|
13
|
+
];
|
14
|
+
var QUERY = new Map([
|
15
|
+
[POINTS_NAME[0], '(min-width: 1920px)'],
|
16
|
+
[POINTS_NAME[1], '(min-width: 1366px)'],
|
17
|
+
[POINTS_NAME[2], '(min-width: 768px)'],
|
18
|
+
[POINTS_NAME[3], '(min-width: 600px)'],
|
19
|
+
[POINTS_NAME[4], '(min-width: 0px)'],
|
20
|
+
]);
|
21
|
+
var BreakpointObserverService = /** @class */ (function (_super) {
|
22
|
+
__extends(BreakpointObserverService, _super);
|
23
|
+
function BreakpointObserverService() {
|
24
|
+
var _this = _super.call(this) || this;
|
25
|
+
_this._size$ = fromEvent(window, 'resize').pipe(startWith(_this._getScreenSize()), map(function (event) { return _this._getScreenSize(); }), distinctUntilChanged(), shareReplay(1));
|
26
|
+
return _this;
|
27
|
+
}
|
28
|
+
Object.defineProperty(BreakpointObserverService.prototype, "size$", {
|
29
|
+
get: function () {
|
30
|
+
return this._size$;
|
31
|
+
},
|
32
|
+
enumerable: false,
|
33
|
+
configurable: true
|
34
|
+
});
|
35
|
+
BreakpointObserverService.prototype._getScreenSize = function () {
|
36
|
+
var _a = __read(Array.from(QUERY.entries()).filter(function (_a) {
|
37
|
+
var _b = __read(_a, 2), size = _b[0], mediaQuery = _b[1];
|
38
|
+
return window.matchMedia(mediaQuery).matches;
|
39
|
+
}), 1), _b = __read(_a[0], 1), _c = _b[0], newSize = _c === void 0 ? 'never' : _c;
|
40
|
+
return newSize;
|
41
|
+
};
|
42
|
+
BreakpointObserverService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function BreakpointObserverService_Factory() { return new BreakpointObserverService(); }, token: BreakpointObserverService, providedIn: "root" });
|
43
|
+
BreakpointObserverService = __decorate([
|
44
|
+
Injectable({
|
45
|
+
providedIn: 'root'
|
46
|
+
}),
|
47
|
+
__metadata("design:paramtypes", [])
|
48
|
+
], BreakpointObserverService);
|
49
|
+
return BreakpointObserverService;
|
50
|
+
}(AbstractService));
|
51
|
+
export { BreakpointObserverService };
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnJlYWtwb2ludC1vYnNlcnZlci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9zZXJ2aWNlcy9icmVha3BvaW50LW9ic2VydmVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLFNBQVMsRUFBYyxNQUFNLE1BQU0sQ0FBQztBQUM3QyxPQUFPLEVBQUUsb0JBQW9CLEVBQUUsR0FBRyxFQUFFLFdBQVcsRUFBRSxTQUFTLEVBQUUsTUFBTSxnQ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kKCk6IE9ic2VydmFibGU8c3RyaW5nPiB7XG4gICAgICAgIHJldHVybiB0aGlzLl9zaXplJDtcbiAgICB9XG5cbiAgICBwcml2YXRlIF9nZXRTY3JlZW5TaXplKCk6IHN0cmluZyB7XG4gICAgICAgIGNvbnN0IFtbbmV3U2l6ZSA9ICduZXZlciddXSA9IEFycmF5LmZyb20oUVVFUlkuZW50cmllcygpKS5maWx0ZXIoKFtzaXplLCBtZWRpYVF1ZXJ5XSkgPT4gd2luZG93Lm1hdGNoTWVkaWEobWVkaWFRdWVyeSkubWF0Y2hlcyk7XG4gICAgICAgIHJldHVybiBuZXdTaXplO1xuICAgIH1cbn1cbiJdfQ==
|
@@ -0,0 +1,66 @@
|
|
1
|
+
import { __awaiter, __decorate, __extends, __generator, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { MatDialog, MatDialogConfig } from '@angular/material';
|
4
|
+
import { tap } from 'rxjs/operators';
|
5
|
+
import { GIPIConfirmationDialogComponent } from '../../shared/gipi-components/confirmation-dialog/confirmation-dialog.component';
|
6
|
+
import { AbstractService } from './abstract.service';
|
7
|
+
import * as i0 from "@angular/core";
|
8
|
+
import * as i1 from "@angular/material/dialog";
|
9
|
+
var ConfirmationService = /** @class */ (function (_super) {
|
10
|
+
__extends(ConfirmationService, _super);
|
11
|
+
function ConfirmationService(dialog) {
|
12
|
+
var _this = _super.call(this) || this;
|
13
|
+
_this.dialog = dialog;
|
14
|
+
return _this;
|
15
|
+
}
|
16
|
+
ConfirmationService.prototype.confirm = function (confirmation) {
|
17
|
+
return __awaiter(this, void 0, void 0, function () {
|
18
|
+
var result, dialogConfig;
|
19
|
+
return __generator(this, function (_a) {
|
20
|
+
switch (_a.label) {
|
21
|
+
case 0:
|
22
|
+
result = false;
|
23
|
+
dialogConfig = new MatDialogConfig();
|
24
|
+
dialogConfig.disableClose = true;
|
25
|
+
dialogConfig.autoFocus = true;
|
26
|
+
dialogConfig.data = confirmation;
|
27
|
+
dialogConfig.minWidth = '20%';
|
28
|
+
(confirmation.width ? dialogConfig.width = confirmation.width : dialogConfig.maxWidth = '40%');
|
29
|
+
return [4 /*yield*/, this.dialog
|
30
|
+
.open(GIPIConfirmationDialogComponent, dialogConfig)
|
31
|
+
.afterClosed()
|
32
|
+
.pipe(tap(function (isAccept) {
|
33
|
+
if (isAccept) {
|
34
|
+
if ((confirmation.accept !== null) && (confirmation.accept !== undefined)) {
|
35
|
+
confirmation.accept();
|
36
|
+
}
|
37
|
+
}
|
38
|
+
else {
|
39
|
+
if ((confirmation.cancel !== null) && (confirmation.cancel !== undefined)) {
|
40
|
+
confirmation.cancel();
|
41
|
+
}
|
42
|
+
}
|
43
|
+
result = isAccept;
|
44
|
+
}))
|
45
|
+
.toPromise()];
|
46
|
+
case 1:
|
47
|
+
_a.sent();
|
48
|
+
return [2 /*return*/, result];
|
49
|
+
}
|
50
|
+
});
|
51
|
+
});
|
52
|
+
};
|
53
|
+
ConfirmationService.ctorParameters = function () { return [
|
54
|
+
{ type: MatDialog }
|
55
|
+
]; };
|
56
|
+
ConfirmationService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function ConfirmationService_Factory() { return new ConfirmationService(i0.ɵɵinject(i1.MatDialog)); }, token: ConfirmationService, providedIn: "root" });
|
57
|
+
ConfirmationService = __decorate([
|
58
|
+
Injectable({
|
59
|
+
providedIn: 'root'
|
60
|
+
}),
|
61
|
+
__metadata("design:paramtypes", [MatDialog])
|
62
|
+
], ConfirmationService);
|
63
|
+
return ConfirmationService;
|
64
|
+
}(AbstractService));
|
65
|
+
export { ConfirmationService };
|
66
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybWF0aW9uLnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZ2lwaXNpc3RlbWFzL25nLWNvcmUvIiwic291cmNlcyI6WyJjb3JlL3NlcnZpY2VzL2NvbmZpcm1hdGlvbi5zZXJ2a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2dDb25maWcud2lkdGggPSBjb25maXJtYXRpb24ud2lkdGggOiBkaWFsb2dDb25maWcubWF4V2lkdGggPSAnNDAlJyk7XG5cbiAgICAgICAgYXdhaXQgdGhpcy5kaWFsb2dcbiAgICAgICAgICAgIC5vcGVuKEdJUElDb25maXJtYXRpb25EaWFsb2dDb21wb25lbnQsIGRpYWxvZ0NvbmZpZylcbiAgICAgICAgICAgIC5hZnRlckNsb3NlZCgpXG4gICAgICAgICAgICAucGlwZShcbiAgICAgICAgICAgICAgICB0YXAoKGlzQWNjZXB0OiBib29sZWFuKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0FjY2VwdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjb25maXJtYXRpb24uYWNjZXB0ICE9PSBudWxsKSAmJiAoY29uZmlybWF0aW9uLmFjY2VwdCAhPT0gdW5kZWZpbmVkKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpcm1hdGlvbi5hY2NlcHQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY29uZmlybWF0aW9uLmNhbmNlbCAhPT0gbnVsbCkgJiYgKGNvbmZpcm1hdGlvbi5jYW5jZWwgIT09IHVuZGVmaW5lZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maXJtYXRpb24uY2FuY2VsKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gaXNBY2NlcHQ7XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIC50b1Byb21pc2UoKTtcblxuICAgICAgICByZXR1cm4gcmVzdWx0O1xuICAgIH1cblxufVxuIl19
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { __decorate, __extends, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { MatDialog, MatDialogRef } from '@angular/material';
|
4
|
+
import { AbstractService } from './abstract.service';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
import * as i1 from "@angular/material/dialog";
|
7
|
+
var DialogService = /** @class */ (function (_super) {
|
8
|
+
__extends(DialogService, _super);
|
9
|
+
function DialogService(dialog) {
|
10
|
+
var _this = _super.call(this) || this;
|
11
|
+
_this.dialog = dialog;
|
12
|
+
return _this;
|
13
|
+
}
|
14
|
+
DialogService.prototype.open = function (dialog) {
|
15
|
+
return this.dialog.open(dialog.componentOrTemplateRef, {
|
16
|
+
panelClass: dialog.panelClass,
|
17
|
+
disableClose: dialog.disableClose,
|
18
|
+
width: dialog.width,
|
19
|
+
height: dialog.height,
|
20
|
+
minWidth: dialog.minWidth,
|
21
|
+
minHeight: dialog.minHeight,
|
22
|
+
maxWidth: dialog.maxWidth,
|
23
|
+
maxHeight: dialog.maxHeight,
|
24
|
+
position: dialog.position,
|
25
|
+
data: dialog.data,
|
26
|
+
autoFocus: dialog.autoFocus,
|
27
|
+
restoreFocus: dialog.restoreFocus,
|
28
|
+
closeOnNavigation: dialog.closeOnNavigation,
|
29
|
+
});
|
30
|
+
};
|
31
|
+
DialogService.ctorParameters = function () { return [
|
32
|
+
{ type: MatDialog }
|
33
|
+
]; };
|
34
|
+
DialogService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function DialogService_Factory() { return new DialogService(i0.ɵɵinject(i1.MatDialog)); }, token: DialogService, providedIn: "root" });
|
35
|
+
DialogService = __decorate([
|
36
|
+
Injectable({
|
37
|
+
providedIn: 'root'
|
38
|
+
}),
|
39
|
+
__metadata("design:paramtypes", [MatDialog])
|
40
|
+
], DialogService);
|
41
|
+
return DialogService;
|
42
|
+
}(AbstractService));
|
43
|
+
export { DialogService };
|
44
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjo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cbiAgICAgICAgICAgIHBhbmVsQ2xhc3M6IGRpYWxvZy5wYW5lbENsYXNzLFxuICAgICAgICAgICAgZGlzYWJsZUNsb3NlOiBkaWFsb2cuZGlzYWJsZUNsb3NlLFxuICAgICAgICAgICAgd2lkdGg6IGRpYWxvZy53aWR0aCxcbiAgICAgICAgICAgIGhlaWdodDogZGlhbG9nLmhlaWdodCxcbiAgICAgICAgICAgIG1pbldpZHRoOiBkaWFsb2cubWluV2lkdGgsXG4gICAgICAgICAgICBtaW5IZWlnaHQ6IGRpYWxvZy5taW5IZWlnaHQsXG4gICAgICAgICAgICBtYXhXaWR0aDogZGlhbG9nLm1heFdpZHRoLFxuICAgICAgICAgICAgbWF4SGVpZ2h0OiBkaWFsb2cubWF4SGVpZ2h0LFxuICAgICAgICAgICAgcG9zaXRpb246IGRpYWxvZy5wb3NpdGlvbixcbiAgICAgICAgICAgIGRhdGE6IGRpYWxvZy5kYXRhLFxuICAgICAgICAgICAgYXV0b0ZvY3VzOiBkaWFsb2cuYXV0b0ZvY3VzLFxuICAgICAgICAgICAgcmVzdG9yZUZvY3VzOiBkaWFsb2cucmVzdG9yZUZvY3VzLFxuICAgICAgICAgICAgY2xvc2VPbk5hdmlnYXRpb246IGRpYWxvZy5jbG9zZU9uTmF2aWdhdGlvbixcbiAgICAgICAgfSk7XG4gICAgfVxuXG59XG4iXX0=
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { __decorate, __extends, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { MatSnackBar } from '@angular/material';
|
4
|
+
import { AbstractService } from './abstract.service';
|
5
|
+
import { AlertComponent } from '../components/alert/alert.component';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
import * as i1 from "@angular/material/snack-bar";
|
8
|
+
var MessageService = /** @class */ (function (_super) {
|
9
|
+
__extends(MessageService, _super);
|
10
|
+
function MessageService(snackBar) {
|
11
|
+
var _this = _super.call(this) || this;
|
12
|
+
_this.snackBar = snackBar;
|
13
|
+
return _this;
|
14
|
+
}
|
15
|
+
MessageService.prototype.add = function (message) {
|
16
|
+
this.snackBar.openFromComponent(AlertComponent, {
|
17
|
+
verticalPosition: 'top',
|
18
|
+
horizontalPosition: 'center',
|
19
|
+
duration: 8000,
|
20
|
+
data: message
|
21
|
+
});
|
22
|
+
};
|
23
|
+
MessageService.ctorParameters = function () { return [
|
24
|
+
{ type: MatSnackBar }
|
25
|
+
]; };
|
26
|
+
MessageService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function MessageService_Factory() { return new MessageService(i0.ɵɵinject(i1.MatSnackBar)); }, token: MessageService, providedIn: "root" });
|
27
|
+
MessageService = __decorate([
|
28
|
+
Injectable({
|
29
|
+
providedIn: 'root'
|
30
|
+
}),
|
31
|
+
__metadata("design:paramtypes", [MatSnackBar])
|
32
|
+
], MessageService);
|
33
|
+
return MessageService;
|
34
|
+
}(AbstractService));
|
35
|
+
export { MessageService };
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVzc2FnZS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6Im5nOi8vQGdpcGlzaXN0ZW1hcy9uZy1jb3JlLyIsInNvdXJjZXMiOlsiY29yZS9zZXJ2aWNlcy9tZXNzYWdlLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDM0MsT0FBTyxFQUFFLFdBQVcsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBRWhELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUVyRCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0scUNBQXFDLENBQUM7OztBQUtyRTtJQUFvQyxrQ0FBZTtJQUUvQyx3QkFBc0IsUUFBcUI7UUFBM0MsWUFDSSxpQkFBTyxTQUNWO1F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IocHJvdGVjdGVkIHNuYWNrQmFyOiBNYXRTbmFja0Jhcikge1xuICAgICAgICBzdXBlcigpO1xuICAgIH1cblxuICAgIGFkZChtZXNzYWdlOiBNZXNzYWdlRFRPKTogdm9pZCB7XG4gICAgICAgIHRoaXMuc25hY2tCYXIub3BlbkZyb21Db21wb25lbnQoQWxlcnRDb21wb25lbnQsIHtcbiAgICAgICAgICAgIHZlcnRpY2FsUG9zaXRpb246ICd0b3AnLFxuICAgICAgICAgICAgaG9yaXpvbnRhbFBvc2l0aW9uOiAnY2VudGVyJyxcbiAgICAgICAgICAgIGR1cmF0aW9uOiA4MDAwLFxuICAgICAgICAgICAgZGF0YTogbWVzc2FnZVxuICAgICAgICB9KTtcbiAgICB9XG5cbn1cbiJdfQ==
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { __decorate, __extends, __metadata } from "tslib";
|
2
|
+
import { Injectable } from '@angular/core';
|
3
|
+
import { NavigationEnd, Router } from '@angular/router';
|
4
|
+
import { BehaviorSubject } from 'rxjs';
|
5
|
+
import { AbstractService } from './abstract.service';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
import * as i1 from "@angular/router";
|
8
|
+
var NavService = /** @class */ (function (_super) {
|
9
|
+
__extends(NavService, _super);
|
10
|
+
function NavService(router) {
|
11
|
+
var _this = _super.call(this) || this;
|
12
|
+
_this.router = router;
|
13
|
+
_this.menuItems = [];
|
14
|
+
_this.isOpened = false;
|
15
|
+
_this.currentUrl = new BehaviorSubject(undefined);
|
16
|
+
_this.router.events.subscribe(function (event) {
|
17
|
+
if (event instanceof NavigationEnd) {
|
18
|
+
_this.currentUrl.next(event.url);
|
19
|
+
}
|
20
|
+
});
|
21
|
+
return _this;
|
22
|
+
}
|
23
|
+
NavService.prototype.close = function () {
|
24
|
+
this.isOpened = false;
|
25
|
+
this._collapseAllMenu();
|
26
|
+
};
|
27
|
+
NavService.prototype.open = function () {
|
28
|
+
this.isOpened = true;
|
29
|
+
this._collapseAllMenu();
|
30
|
+
};
|
31
|
+
NavService.prototype.toggle = function () {
|
32
|
+
this.isOpened = !this.isOpened;
|
33
|
+
this._collapseAllMenu();
|
34
|
+
};
|
35
|
+
NavService.prototype._collapseAllMenu = function () {
|
36
|
+
this.menuItems.forEach(function (m) { return m.expanded = false; });
|
37
|
+
};
|
38
|
+
NavService.ctorParameters = function () { return [
|
39
|
+
{ type: Router }
|
40
|
+
]; };
|
41
|
+
NavService.ngInjectableDef = i0.ɵɵdefineInjectable({ factory: function NavService_Factory() { return new NavService(i0.ɵɵinject(i1.Router)); }, token: NavService, providedIn: "root" });
|
42
|
+
NavService = __decorate([
|
43
|
+
Injectable({
|
44
|
+
providedIn: 'root'
|
45
|
+
}),
|
46
|
+
__metadata("design:paramtypes", [Router])
|
47
|
+
], NavService);
|
48
|
+
return NavService;
|
49
|
+
}(AbstractService));
|
50
|
+
export { NavService };
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmF2LnNlcnZpY2UuanMiLCJzb3VyY2VSb290Ijoibmc6Ly9AZ2lwaXNpc3RlbWFzL25nLWNvcmUvIiwic291cmNlcyI6WyJjb3JlL3NlcnZpY2VzL25hdi5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFDeEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUV2QyxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7OztBQU1yRDtJQUFnQyw4QkFBZTtJQVUzQyxvQkFBb0IsTUFBYztRQUFsQyxZQUNJLGlCQUFPLFNBTVY7UUFQbUIsWUFBTSxHQUFOLE1BQU0sQ0FBUTtRQU4zQix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