From 3b78be087be98c1021ebe24da1bac80ca10f1028 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Fri, 5 Mar 2021 21:34:26 +0100 Subject: [PATCH] Migrate tslint to eslint (#9064) * tslint to eslint migration * Autofix issues * Fix codeclimate path to eslintrc * Extend linter config for use with ng lint * Change prefix to op in angular lints --- .codeclimate.yml | 16 +- .editorconfig | 108 +- frontend/.eslintignore | 1 + frontend/.eslintrc.js | 174 + frontend/angular.json | 11 +- frontend/npm-shrinkwrap.json | 5545 +++++++++++++---- frontend/package.json | 15 +- frontend/src/app/angular4-modules.ts | 102 +- .../ckeditor-augmented-textarea.component.ts | 54 +- .../angular/debounced-event-emitter.ts | 8 +- .../components/angular/tracking-functions.ts | 6 +- .../api/api-v3/api-v3-filter-builder.ts | 12 +- .../op-direct-file-upload.service.ts | 16 +- .../op-file-upload.service.spec.ts | 22 +- .../op-file-upload/op-file-upload.service.ts | 22 +- .../datepicker/datepicker.modal.helper.ts | 18 +- .../components/datepicker/datepicker.modal.ts | 166 +- .../datetime/timezone.service.spec.ts | 22 +- .../components/datetime/timezone.service.ts | 8 +- .../enterprise-banner-bootstrap.component.ts | 6 +- .../ee-active-saved-trial.component.ts | 6 +- .../ee-active-trial.base.ts | 4 +- .../ee-active-trial.component.ts | 16 +- .../enterprise/enterprise-base.component.ts | 10 +- .../ee-trial-form.component.ts | 12 +- .../enterprise-trial.modal.ts | 18 +- .../ee-trial-waiting.component.ts | 20 +- .../enterprise/enterprise-trial.service.ts | 30 +- .../openproject-enterprise.module.ts | 22 +- ...tract-filter-date-time-value.controller.ts | 12 +- .../filter-boolean-value.component.ts | 10 +- .../filter-container.directive.ts | 20 +- .../filter-date-time-value.component.ts | 20 +- .../filter-date-times-value.component.ts | 20 +- .../filter-date-value.component.ts | 18 +- .../filter-dates-value.component.ts | 18 +- .../filter-integer-value.component.ts | 32 +- ...-searchable-multiselect-value.component.ts | 48 +- .../filter-string-value.component.ts | 16 +- ...ter-toggled-multiselect-value.component.ts | 38 +- .../query-filter/query-filter.component.ts | 22 +- .../query-filters/query-filters.component.ts | 36 +- .../quick-filter-by-text-input.component.ts | 22 +- .../filters/wp-filters/wp-filters.service.ts | 8 +- .../blocks/new-features.component.spec.ts | 6 +- .../blocks/new-features.component.ts | 16 +- .../app/components/html/op-title.service.ts | 6 +- .../main-menu/main-menu-navigation.service.ts | 22 +- .../main-menu/main-menu-toggle.component.ts | 16 +- .../main-menu/main-menu-toggle.service.ts | 25 +- .../confirm-dialog/confirm-dialog.modal.ts | 10 +- .../confirm-dialog/confirm-dialog.service.ts | 6 +- .../confirm-form-submit.directive.ts | 12 +- .../modals/editor/editor-macros.service.ts | 18 +- .../child-pages-macro.modal.ts | 14 +- .../code-block-macro.modal.ts | 12 +- .../wiki-include-page-macro.modal.ts | 12 +- .../wp-button-macro.modal.ts | 20 +- .../export-modal/wp-table-export.modal.ts | 34 +- .../modal-wrapper/dynamic-content.modal.ts | 16 +- .../wp-preview-modal/wp-preview.modal.ts | 18 +- .../password-confirmation.modal.ts | 4 +- .../modals/save-modal/save-query.modal.ts | 26 +- .../query-sharing-form.component.ts | 10 +- .../modals/share-modal/query-sharing.modal.ts | 26 +- .../wp-destroy-modal/wp-destroy.modal.ts | 40 +- .../op-columns-context-menu.directive.ts | 36 +- .../op-context-menu-trigger.directive.ts | 8 +- .../op-settings-dropdown-menu.directive.ts | 34 +- .../op-types-context-menu.directive.ts | 22 +- .../wp-create-settings-menu.directive.ts | 16 +- ...wp-group-toggle-dropdown-menu.directive.ts | 12 +- .../wp-status-dropdown-menu.directive.ts | 26 +- .../wp-view-dropdown-menu.directive.ts | 10 +- .../icon-triggered-context-menu.component.ts | 18 +- .../op-context-menu-handler.ts | 6 +- .../op-context-menu.component.ts | 4 +- .../op-context-menu.service.ts | 16 +- .../op-context-menu/op-context-menu.types.ts | 4 +- .../wp-context-menu/wp-single-context-menu.ts | 76 +- .../wp-table-context-menu.directive.ts | 42 +- .../wp-view-context-menu.directive.ts | 80 +- .../projects/current-project.service.spec.ts | 8 +- .../projects/current-project.service.ts | 6 +- .../project-menu-autocomplete.component.ts | 36 +- .../resizer/main-menu-resizer.component.ts | 12 +- .../resizer/wp-resizer.component.ts | 40 +- .../schemas/schema-cache.service.ts | 30 +- frontend/src/app/components/states.service.ts | 40 +- .../table-pagination/pagination-service.ts | 4 +- .../table-pagination.component.ts | 24 +- .../time-entries/time-entry-changeset.ts | 4 +- .../components/user/current-user.service.ts | 2 +- .../user-avatar-renderer.service.ts | 28 +- .../user-avatar/user-avatar.component.spec.ts | 8 +- .../user/user-avatar/user-avatar.component.ts | 10 +- .../user-link/user-link.component.spec.ts | 8 +- .../user/user-link/user-link.component.ts | 6 +- .../work-package-authorization.service.ts | 9 +- .../work-package-comment-field-handler.ts | 12 +- .../work-package-comment.component.ts | 24 +- .../wp-comment-field.component.ts | 8 +- .../work-packages/work-package.service.ts | 20 +- .../wp-breadcrumb-parent.component.ts | 14 +- .../wp-breadcrumb/wp-breadcrumb.component.ts | 8 +- .../wp-relations-count.component.ts | 16 +- .../wp-watchers-count.component.ts | 26 +- .../wp-single-view.component.ts | 62 +- .../wp-subject/wp-subject.component.ts | 12 +- .../wp-type-status.component.ts | 4 +- .../wp-watcher-button.component.ts | 16 +- .../wp-activity/activity-entry.component.ts | 8 +- .../wp-activity/activity-link.component.ts | 4 +- .../components/wp-activity/comment-service.ts | 14 +- .../revision/revision-activity.component.ts | 18 +- .../user/user-activity.component.ts | 24 +- .../wp-buttons/wp-buttons.module.ts | 6 +- .../wp-create-button.component.ts | 20 +- .../wp-details-view-button.component.ts | 26 +- .../wp-filter-button.component.ts | 18 +- .../wp-fold-toggle-button.component.ts | 4 +- .../wp-settings-button.component.ts | 4 +- .../wp-status-button.component.ts | 20 +- .../wp-timeline-toggle-button.component.ts | 18 +- ...rk-package-view-toggle-button.component.ts | 12 +- .../zen-mode-toggle-button.component.ts | 18 +- .../card-view-handler-registry.ts | 8 +- .../event-handler/click-handler.ts | 30 +- .../event-handler/double-click-handler.ts | 20 +- .../event-handler/right-click-handler.ts | 28 +- .../services/wp-card-drag-and-drop.service.ts | 32 +- .../services/wp-card-view.service.ts | 8 +- .../wp-card-view/wp-card-view.component.ts | 82 +- .../wp-single-card.component.ts | 36 +- .../wp-copy/wp-copy-full-view.component.ts | 4 +- .../wp-copy/wp-copy-split-view.component.ts | 4 +- .../components/wp-copy/wp-copy.controller.ts | 20 +- .../custom-date-action-admin.component.ts | 14 +- .../wp-custom-actions.component.ts | 10 +- .../wp-custom-action.component.ts | 22 +- .../wp-details-toolbar.component.ts | 12 +- .../wp-edit-form/table-edit-form.ts | 32 +- .../work-package-filter-values.spec.ts | 60 +- .../work-package-filter-values.ts | 26 +- .../wp-edit/work-package-changeset.ts | 6 +- .../wp-replacement-label.component.ts | 4 +- .../wp-fast-table/builders/cell-builder.ts | 10 +- .../drag-and-drop/drag-drop-handle-builder.ts | 18 +- .../drag-drop-handle-render-pass.ts | 16 +- .../highlighting/row-highlight-render-pass.ts | 16 +- .../builders/internal-sort-columns.ts | 2 +- .../modes/grouped/group-header-builder.ts | 14 +- .../modes/grouped/group-sums-builder.ts | 18 +- .../modes/grouped/grouped-render-pass.ts | 40 +- .../modes/grouped/grouped-rows-builder.ts | 34 +- .../modes/grouped/grouped-rows-helpers.ts | 4 +- .../modes/hierarchy/hierarchy-render-pass.ts | 46 +- .../modes/hierarchy/hierarchy-rows-builder.ts | 18 +- .../hierarchy/single-hierarchy-row-builder.ts | 32 +- .../builders/modes/plain/plain-render-pass.ts | 12 +- .../modes/plain/plain-rows-builder.ts | 16 +- .../builders/modes/rows-builder.ts | 10 +- .../builders/primary-render-pass.ts | 52 +- .../builders/relation-cell-builder.ts | 18 +- .../relations/relation-row-builder.ts | 24 +- .../relations/relations-render-pass.ts | 24 +- .../builders/rows/single-row-builder.ts | 62 +- .../builders/table-action-renderer.ts | 18 +- .../builders/timeline/timeline-render-pass.ts | 8 +- .../builders/timeline/timeline-row-builder.ts | 18 +- .../builders/ui-state-link-builder.ts | 8 +- .../handlers/cell/edit-cell-handler.ts | 28 +- .../handlers/cell/relations-cell-handler.ts | 20 +- .../handlers/click-or-enter-handler.ts | 6 +- .../context-menu-click-handler.ts | 16 +- .../context-menu/context-menu-handler.ts | 14 +- .../context-menu-keyboard-handler.ts | 14 +- .../context-menu-rightclick-handler.ts | 24 +- .../handlers/row/click-handler.ts | 36 +- .../handlers/row/double-click-handler.ts | 34 +- .../handlers/row/group-row-handler.ts | 16 +- .../handlers/row/hierarchy-click-handler.ts | 22 +- .../handlers/row/wp-state-links-handler.ts | 30 +- .../handlers/state/columns-transformer.ts | 14 +- .../state/drag-and-drop-transformer.ts | 44 +- .../handlers/state/group-fold-transformer.ts | 14 +- .../handlers/state/hierarchy-transformer.ts | 22 +- .../state/highlighting-transformer.ts | 14 +- .../handlers/state/relations-transformer.ts | 14 +- .../handlers/state/rows-transformer.ts | 20 +- .../handlers/state/selection-transformer.ts | 20 +- .../handlers/state/timeline-transformer.ts | 14 +- .../handlers/table-handler-registry.ts | 44 +- .../helpers/wp-table-hierarchy-helpers.ts | 2 +- .../helpers/wp-table-row-helpers.ts | 12 +- .../components/wp-fast-table/wp-fast-table.ts | 42 +- .../wp-fast-table/wp-table-editing.ts | 16 +- .../wp-fast-table/wp-table.interfaces.ts | 4 +- .../wp-attribute-group.component.ts | 20 +- .../components/wp-grid/wp-grid.component.ts | 32 +- .../inline-create-row-builder.ts | 36 +- .../wp-inline-create.component.ts | 40 +- .../wp-inline-create.service.ts | 14 +- .../wp-list/wp-list-checksum.service.ts | 26 +- .../wp-list/wp-list-invalid-query.service.ts | 28 +- .../app/components/wp-list/wp-list.service.ts | 70 +- .../wp-states-initialization.service.ts | 54 +- .../components/wp-new/wp-create.component.ts | 44 +- .../components/wp-new/wp-create.service.ts | 76 +- .../wp-new/wp-new-full-view.component.ts | 6 +- .../wp-new/wp-new-split-view.component.ts | 4 +- .../wp-query-select-dropdown.component.ts | 70 +- .../wp-static-queries.service.ts | 20 +- .../app/components/wp-query/query-column.ts | 10 +- .../wp-query/query-filters.service.ts | 14 +- .../wp-query/query-param-listener.service.ts | 16 +- .../wp-query/url-params-helper.spec.ts | 34 +- .../components/wp-query/url-params-helper.ts | 64 +- .../wp-children-inline-create.service.ts | 16 +- .../children/wp-children-query.component.ts | 34 +- ...-relation-inline-add-existing.component.ts | 32 +- .../wp-relation-inline-create.service.ts | 14 +- .../relations/wp-relation-query.component.ts | 34 +- ...elation-inline-create.service.interface.ts | 4 +- .../embedded/wp-relation-query.base.ts | 14 +- .../wp-relation-row.component.ts | 28 +- .../wp-relations-autocomplete.component.ts | 30 +- .../wp-relations-create.component.ts | 16 +- .../wp-relations-group.component.ts | 6 +- .../wp-relations-hierarchy.directive.ts | 20 +- .../wp-relations-hierarchy.service.ts | 28 +- .../wp-relations/wp-relations.component.ts | 26 +- .../wp-relations/wp-relations.service.ts | 32 +- .../activity-base.controller.ts | 20 +- .../activity-panel/activity-entry-info.ts | 8 +- .../activity-on-overview.component.ts | 20 +- .../activity-panel/activity-tab.component.ts | 8 +- .../activity-panel/wp-activity.service.ts | 18 +- .../keep-tab/keep-tab.service.spec.ts | 6 +- .../keep-tab/keep-tab.service.ts | 8 +- .../overview-tab/overview-tab.component.ts | 12 +- .../relations-tab/relations-tab.component.ts | 12 +- .../watchers-tab/watchers-tab.component.ts | 26 +- .../wp-watcher-entry.component.ts | 8 +- .../watchers-tab/wp-watchers.service.ts | 12 +- .../wp-linked-resource-cache.service.ts | 8 +- .../config-menu/config-menu.component.ts | 10 +- .../configuration-modal/tab-portal-outlet.ts | 2 +- .../tabs/columns-tab.component.ts | 18 +- .../tabs/display-settings-tab.component.ts | 18 +- .../tabs/filters-tab.component.ts | 16 +- .../tabs/highlighting-tab.component.ts | 30 +- .../tabs/sort-by-tab.component.ts | 22 +- .../tabs/timelines-tab.component.ts | 18 +- ...p-table-configuration-relation-selector.ts | 30 +- .../wp-table-configuration.modal.ts | 34 +- .../wp-table-configuration.service.ts | 18 +- .../wp-context-menu-helper.service.ts | 40 +- .../actions/group-by-drag-action.service.ts | 24 +- .../actions/hierarchy-drag-action.service.ts | 20 +- .../actions/table-drag-action.service.ts | 8 +- .../table-drag-actions-registry.service.ts | 10 +- .../embedded-tables-macro.component.ts | 4 +- .../embedded/wp-embedded-base.component.ts | 30 +- .../wp-embedded-table-entry.component.ts | 4 +- .../embedded/wp-embedded-table.component.ts | 36 +- .../external-query-configuration.component.ts | 12 +- .../external-query-configuration.constants.ts | 2 +- .../external-query-configuration.service.ts | 10 +- ...-relation-query-configuration.component.ts | 10 +- ...al-relation-query-configuration.service.ts | 4 +- ...stricted-wp-table-configuration.service.ts | 12 +- .../sort-header/sort-header.directive.ts | 36 +- .../actions/context-menu-table-action.ts | 4 +- .../actions/details-table-action.ts | 14 +- .../actions/unlink-table-action.ts | 14 +- .../wp-table/table-actions/table-action.ts | 8 +- .../table-actions/table-actions.service.ts | 10 +- .../wp-table-pagination.component.spec.ts | 28 +- .../wp-table-pagination.component.ts | 20 +- .../timeline/cells/timeline-cell-renderer.ts | 74 +- .../cells/timeline-milestone-cell-renderer.ts | 38 +- .../cells/wp-timeline-cell-mouse-handler.ts | 54 +- .../timeline/cells/wp-timeline-cell.ts | 28 +- .../cells/wp-timeline-cells-renderer.ts | 22 +- .../wp-timeline-container.directive.ts | 88 +- .../timeline-relation-element.ts | 2 +- .../timeline-static-element.ts | 2 +- .../wp-timeline-relations.directive.ts | 54 +- .../wp-timeline-static-elements.directive.ts | 12 +- .../global-elements/wp-timeline.today-line.ts | 4 +- .../grid/wp-timeline-grid.directive.ts | 40 +- .../header/wp-timeline-header.directive.ts | 46 +- .../wp-table/timeline/wp-timeline.ts | 44 +- .../wp-table/wp-table-configuration.ts | 30 +- .../wp-table/wp-table-hover-sync.ts | 6 +- .../wp-table/wp-table-scroll-sync.ts | 18 +- .../wp-table-sums-row.directive.ts | 36 +- .../components/wp-table/wp-table.component.ts | 40 +- .../permissions/permissions.service.ts | 12 +- .../app/global-dynamic-components.const.ts | 18 +- .../src/app/globals/dynamic-bootstrapper.ts | 6 +- frontend/src/app/globals/global-helpers.ts | 10 +- frontend/src/app/globals/global-listeners.ts | 30 +- .../globals/global-listeners/action-menu.ts | 7 +- .../global-listeners/augmented-date-picker.ts | 2 +- .../globals/global-listeners/color-preview.ts | 6 +- .../danger-zone-validation.ts | 2 +- .../preview-trigger.service.ts | 10 +- .../refresh-on-form-changes.ts | 2 +- .../request-for-confirmation.ts | 6 +- .../app/globals/global-listeners/settings.ts | 20 +- .../global-listeners/setup-server-response.ts | 6 +- .../global-listeners/toggable-fieldset.ts | 2 +- .../global-listeners/top-menu-scroll.ts | 2 +- .../app/globals/global-listeners/top-menu.ts | 4 +- .../src/app/globals/onboarding/helpers.ts | 6 +- .../app/globals/onboarding/onboarding_tour.ts | 42 +- .../onboarding/onboarding_tour_trigger.ts | 4 +- .../globals/onboarding/tours/backlogs_tour.ts | 2 +- .../globals/onboarding/tours/boards_tour.ts | 2 +- .../onboarding/tours/homescreen_tour.ts | 2 +- .../onboarding/tours/work_package_tour.ts | 2 +- frontend/src/app/globals/openproject.ts | 12 +- frontend/src/app/globals/tree-menu.ts | 20 +- .../helpers/angular/inject-field.decorator.ts | 6 +- .../helpers/angular/until-destroyed.mixin.ts | 6 +- frontend/src/app/helpers/debug_output.ts | 2 +- frontend/src/app/helpers/images/resizer.ts | 12 +- frontend/src/app/helpers/op-icon-builder.ts | 2 +- frontend/src/app/helpers/random-string.ts | 6 +- .../helpers/rxjs/debounced-input-switchmap.ts | 8 +- .../src/app/helpers/rxjs/request-switchmap.ts | 6 +- .../accessible-by-keyboard.component.spec.ts | 4 +- .../a11y/accessible-by-keyboard.component.ts | 2 +- .../a11y/accessible-click.directive.spec.ts | 8 +- .../a11y/accessible-click.directive.ts | 8 +- .../a11y/double-click-or-tap.directive.ts | 6 +- .../modules/a11y/keyboard-shortcut-service.ts | 26 +- .../modules/a11y/openproject-a11y.module.ts | 12 +- .../editable-query-props.component.ts | 10 +- .../modules/admin/openproject-admin.module.ts | 18 +- .../admin/types/attribute-group.component.ts | 6 +- .../types/group-edit-in-place.component.ts | 4 +- .../admin/types/query-group.component.ts | 4 +- .../admin/types/type-banner.service.ts | 8 +- .../type-form-configuration.component.ts | 30 +- .../app/modules/apiv3/api-v3.service.spec.ts | 6 +- .../src/app/modules/apiv3/api-v3.service.ts | 52 +- .../apiv3/cache/cachable-apiv3-collection.ts | 16 +- .../apiv3/cache/cachable-apiv3-resource.ts | 18 +- .../apiv3/cache/state-cache.service.ts | 12 +- .../configuration/apiv3-configuration-path.ts | 14 +- .../apiv3/endpoints/grids/apiv3-grid-form.ts | 14 +- .../apiv3/endpoints/grids/apiv3-grid-paths.ts | 12 +- .../endpoints/grids/apiv3-grids-paths.ts | 16 +- .../endpoints/groups/apiv3-group-paths.ts | 6 +- .../endpoints/groups/apiv3-groups-paths.ts | 12 +- .../help_texts/apiv3-help-texts-paths.ts | 10 +- .../apiv3/endpoints/news/apiv3-news-paths.ts | 12 +- .../apiv3-placeholder-user-paths.ts | 6 +- .../apiv3-placeholder-users-paths.ts | 12 +- .../apiv3-available-projects-paths.ts | 12 +- .../endpoints/projects/apiv3-project-paths.ts | 18 +- .../projects/apiv3-projects-paths.ts | 18 +- .../apiv3/endpoints/projects/project.cache.ts | 18 +- .../endpoints/queries/apiv3-queries-paths.ts | 26 +- .../endpoints/queries/apiv3-query-form.ts | 20 +- .../endpoints/queries/apiv3-query-order.ts | 10 +- .../endpoints/queries/apiv3-query-paths.ts | 20 +- .../relations/apiv3-relations-paths.ts | 26 +- .../apiv3/endpoints/roles/apiv3-role-paths.ts | 6 +- .../endpoints/roles/apiv3-roles-paths.ts | 16 +- .../endpoints/statuses/apiv3-status-paths.ts | 6 +- .../statuses/apiv3-statuses-paths.ts | 16 +- .../time-entries/apiv3-time-entries-paths.ts | 20 +- .../time-entries/apiv3-time-entry-paths.ts | 22 +- .../time-entries/time-entry-cache.service.ts | 14 +- .../apiv3/endpoints/types/apiv3-type-paths.ts | 8 +- .../endpoints/types/apiv3-types-paths.ts | 12 +- .../apiv3/endpoints/users/apiv3-user-paths.ts | 8 +- .../endpoints/users/apiv3-users-paths.ts | 10 +- .../endpoints/versions/apiv3-version-paths.ts | 12 +- .../versions/apiv3-versions-paths.ts | 18 +- .../api-v3-work-package-cached-subresource.ts | 12 +- .../api-v3-work-package-paths.ts | 18 +- .../api-v3-work-packages-paths.ts | 52 +- .../work_packages/apiv3-work-package-form.ts | 10 +- .../work_packages/work-package-cache.spec.ts | 54 +- .../work_packages/work-package.cache.ts | 18 +- .../apiv3/forms/apiv3-form-resource.ts | 10 +- .../apiv3/openproject-api-v3.module.ts | 6 +- .../paths/apiv3-list-resource.interface.ts | 10 +- .../app/modules/apiv3/paths/apiv3-resource.ts | 16 +- .../app/modules/apiv3/paths/path-resources.ts | 6 +- .../modules/apiv3/virtual/apiv3-board-path.ts | 16 +- .../apiv3/virtual/apiv3-boards-paths.ts | 38 +- .../attachment-list-item.component.ts | 14 +- .../attachment-list.component.ts | 18 +- .../attachments-upload.component.ts | 24 +- .../attachments/attachments.component.ts | 14 +- .../openproject-attachments.module.ts | 12 +- .../two_factor_authentication.ts | 34 +- .../openproject-augmenting.module.ts | 10 +- .../services/path-script.augment.service.ts | 6 +- ...utocomplete-select-decoration.component.ts | 6 +- .../create-autocompleter.component.ts | 30 +- .../lazyloaded/lazyloaded-autocompleter.ts | 8 +- .../openproject-autocompleter.module.ts | 32 +- ...te-work-package-autocompleter.component.ts | 18 +- .../user-autocompleter.component.ts | 42 +- .../version-autocompleter.component.ts | 18 +- .../wp-autocompleter.component.ts | 2 +- .../backlogs-page/backlogs-page.component.ts | 2 +- .../backlogs/openproject-backlogs.module.ts | 8 +- .../backlogs/openproject-backlogs.routes.ts | 4 +- .../bim/bcf/api/bcf-api-request.service.ts | 16 +- .../bim/bcf/api/bcf-api.service.spec.ts | 42 +- .../modules/bim/bcf/api/bcf-api.service.ts | 8 +- .../bim/bcf/api/bcf-authorization.service.ts | 12 +- .../modules/bim/bcf/api/bcf-path-resources.ts | 8 +- .../bcf/api/extensions/bcf-extension.paths.ts | 8 +- .../api/extensions/bcf-extension.resource.ts | 2 +- .../bim/bcf/api/projects/bcf-project.paths.ts | 12 +- .../bcf/api/projects/bcf-project.resource.ts | 2 +- .../bim/bcf/api/topics/bcf-topic.paths.ts | 12 +- .../bcf/api/topics/bcf-topic.resource.spec.ts | 8 +- .../bim/bcf/api/topics/bcf-topic.resource.ts | 4 +- .../topics/bcf-viewpoint-collection.paths.ts | 14 +- .../bcf-viewpoint-collection.paths.ts | 12 +- .../bcf-viewpoint-item.interface.ts | 2 +- .../api/viewpoints/bcf-viewpoint.interface.ts | 2 +- .../bcf/api/viewpoints/bcf-viewpoint.paths.ts | 8 +- .../viewer-bridge.service.ts | 12 +- .../bcf-new-wp-attribute-group.component.ts | 78 +- .../bcf-wp-attribute-group.component.ts | 30 +- .../display/bcf-thumbnail-field.module.ts | 6 +- .../bim/bcf/helper/bcf-detector.service.ts | 4 +- .../bim/bcf/helper/bcf-path-helper.service.ts | 6 +- .../bim/bcf/helper/viewpoints.service.ts | 88 +- .../modules/bim/bcf/openproject-bcf.module.ts | 38 +- .../bcf-list-container.component.ts | 72 +- .../bcf/new-split/bcf-new-split.component.ts | 12 +- .../ifc-viewer/ifc-viewer.component.ts | 6 +- .../ifc-viewer/ifc-viewer.service.ts | 30 +- .../openproject-ifc-models.module.ts | 38 +- .../openproject-ifc-models.routes.ts | 26 +- .../pages/viewer/bim-view.service.ts | 24 +- .../pages/viewer/ifc-models-data.service.ts | 8 +- .../pages/viewer/ifc-viewer-page.component.ts | 32 +- .../bcf-export-button.component.ts | 26 +- .../bcf-import-button.component.ts | 8 +- .../bim-manage-ifc-models-button.component.ts | 6 +- .../bim-view-toggle-button.component.ts | 6 +- .../bim-view-toggle-dropdown.directive.ts | 104 +- .../bim/ifc_models/xeokit/xeokit-server.ts | 6 +- .../app/modules/bim/openproject-bim.module.ts | 6 +- .../revit-add-in-settings-button.service.ts | 4 +- .../bim/revit_add_in/revit-bridge.service.ts | 52 +- .../add-card-dropdown-menu.directive.ts | 22 +- .../add-list-modal.component.ts | 54 +- .../assignee/assignee-action.service.ts | 28 +- .../assignee-board-header.component.ts | 8 +- .../board-actions/board-action.service.ts | 52 +- .../board-actions-registry.service.ts | 6 +- .../cached-board-action.service.ts | 16 +- .../status/status-action.service.ts | 14 +- .../status/status-board-header.component.ts | 6 +- .../subproject/subproject-action.service.ts | 34 +- .../subproject-board-header.component.ts | 8 +- .../subtasks/board-subtasks-action.service.ts | 24 +- .../subtasks-board-header.component.ts | 12 +- .../version/version-action.service.ts | 34 +- .../version/version-board-header.component.ts | 8 +- .../board-filter/board-filter.component.ts | 34 +- .../board-filter/board-filters.service.ts | 4 +- .../board-list/board-inline-create.service.ts | 18 +- .../board-list-cross-selection.service.ts | 4 +- .../board-list/board-list-menu.component.ts | 22 +- .../board/board-list/board-list.component.ts | 106 +- .../board/board-list/board-lists.service.ts | 28 +- .../board-list-container.component.ts | 60 +- .../board-partitioned-page.component.ts | 52 +- .../board-video-teaser-modal.component.ts | 16 +- .../app/modules/boards/board/board.service.ts | 22 +- .../src/app/modules/boards/board/board.ts | 8 +- .../caused-updates/caused-updates.service.ts | 4 +- .../board-configuration.modal.ts | 14 +- .../board-configuration.service.ts | 8 +- .../tabs/highlighting-tab.component.ts | 16 +- ...oard-inline-add-autocompleter.component.ts | 34 +- .../query-updated/query-updated.service.ts | 14 +- .../boards-menu-button.component.ts | 8 +- .../boards-toolbar-menu.directive.ts | 24 +- .../boards-root/boards-root.component.ts | 18 +- .../boards-sidebar/boards-menu.component.ts | 22 +- .../new-board-modal.component.ts | 28 +- .../boards/openproject-boards.module.ts | 58 +- .../boards/openproject-boards.routes.ts | 14 +- .../tile-view/tile-view.component.spec.ts | 16 +- .../boards/tile-view/tile-view.component.ts | 6 +- .../calendar/openproject-calendar.module.ts | 20 +- .../te-calendar/te-calendar.component.ts | 136 +- .../wp-calendar-entry.component.ts | 6 +- .../wp-calendar/wp-calendar.component.ts | 82 +- .../active-window/active-window.service.ts | 10 +- .../common/authoring/authoring.component.ts | 10 +- .../common/autofocus/autofocus.directive.ts | 4 +- .../back-routing/back-button.component.ts | 6 +- .../back-routing/back-routing.service.ts | 28 +- .../browser/browser-detector.service.ts | 4 +- .../modules/common/browser/device.service.ts | 4 +- .../ckeditor/ckeditor-preview.service.ts | 24 +- .../common/ckeditor/ckeditor-setup.service.ts | 6 +- .../common/ckeditor/op-ckeditor.component.ts | 10 +- .../collapsible-section.component.ts | 4 +- .../colors/colors-autocompleter.component.ts | 14 +- .../common/config/configuration.service.ts | 10 +- .../copy-to-clipboard.directive.ts | 10 +- .../common/date/op-date-time.component.ts | 4 +- .../drag-and-drop/dom-autoscroll.service.ts | 14 +- .../drag-and-drop/drag-and-drop.service.ts | 8 +- .../reorder-delta-builder.spec.ts | 58 +- .../drag-and-drop/reorder-delta-builder.ts | 20 +- .../draggable-autocomplete.component.ts | 16 +- .../dynamic-bootstrap.component.spec.ts | 8 +- .../dynamic-bootstrap.component.ts | 6 +- .../wp-edit-actions-bar.component.ts | 8 +- .../editable-toolbar-title.component.ts | 20 +- .../app/modules/common/focus/focus-helper.ts | 2 +- .../common/focus/focus-within.directive.ts | 16 +- .../modules/common/focus/focus.directive.ts | 4 +- .../common/form-field/form-field.component.ts | 4 +- .../src/app/modules/common/gon/gon.service.ts | 4 +- .../add-section-dropdown.component.ts | 20 +- .../hide-section-link.component.ts | 6 +- .../hide-section/hide-section.service.ts | 6 +- .../show-section-dropdown.component.ts | 6 +- .../highlight-col/highlight-col.directive.ts | 2 +- .../html-sanitize/html-sanitize.service.ts | 4 +- .../app/modules/common/i18n/i18n.service.ts | 4 +- .../app/modules/common/icon/icon.component.ts | 4 +- .../app/modules/common/icon/op-icon.spec.ts | 6 +- .../loading-indicator.service.ts | 8 +- .../common/modal/modal-heading.component.ts | 2 +- .../model-auth/model-auth.service.spec.ts | 4 +- .../common/model-auth/model-auth.service.ts | 10 +- .../common/no-results/no-results.component.ts | 2 +- .../notifications/notification.component.ts | 6 +- .../notifications-container.component.ts | 6 +- .../notifications.service.spec.ts | 10 +- .../notifications/notifications.service.ts | 14 +- .../upload-progress.component.ts | 40 +- .../common/op-date-picker/datepicker.ts | 8 +- .../op-date-picker.component.ts | 38 +- .../option-list/option-list.component.ts | 2 +- .../common/path-helper/path-helper.service.ts | 12 +- .../persistent-toggle.component.ts | 4 +- .../remote-field-updater.component.ts | 36 +- .../common/resizer/resizer.component.ts | 4 +- .../set-click-position/set-click-position.ts | 4 +- .../slide-toggle.component.spec.ts | 10 +- .../content-tabs/content-tabs.component.ts | 8 +- .../scrollable-tabs.component.ts | 8 +- .../common/ui/op-drag-scroll.directive.ts | 2 +- .../dashboard/dashboard.component.ts | 6 +- .../openproject-dashboards.module.ts | 10 +- .../editor/openproject-editor.module.ts | 26 +- .../fields/changeset/resource-changeset.ts | 30 +- .../fields/display/display-field-renderer.ts | 60 +- .../fields/display/display-field.component.ts | 18 +- .../display/display-field.initializer.ts | 58 +- .../fields/display/display-field.module.ts | 15 +- .../fields/display/display-field.service.ts | 12 +- .../boolean-display-field.module.ts | 2 +- .../combined-date-display.field.ts | 14 +- .../field-types/date-display-field.module.ts | 18 +- .../datetime-display-field.module.ts | 6 +- .../duration-display-field.module.ts | 12 +- .../field-types/float-display-field.module.ts | 2 +- .../formattable-display-field.module.ts | 12 +- .../highlightable-display-field.module.ts | 6 +- ...ghlighted-resource-display-field.module.ts | 9 +- .../field-types/id-display-field.module.ts | 5 +- .../integer-display-field.module.ts | 2 +- ...inked-work-package-display-field.module.ts | 16 +- ...nes-custom-options-display-field.module.ts | 4 +- ...ultiple-lines-user-display-field.module.ts | 8 +- .../multiple-user-display-field.module.ts | 10 +- .../plain-formattable-display-field.module.ts | 2 +- .../progress-display-field.module.ts | 5 +- .../progress-text-display-field.module.ts | 2 +- .../project-status-display-field.module.ts | 4 +- .../resource-display-field.module.ts | 5 +- .../resources-display-field.module.ts | 4 +- .../field-types/text-display-field.module.ts | 2 +- .../field-types/type-display-field.module.ts | 2 +- .../field-types/user-display-field.module.ts | 6 +- .../work-package-display-field.module.ts | 2 +- .../field-types/wp-id-display-field.module.ts | 14 +- .../wp-spent-time-display-field.module.ts | 2 +- .../fields/edit/edit-field.component.ts | 12 +- .../fields/edit/edit-field.initializer.ts | 42 +- .../modules/fields/edit/edit-field.service.ts | 6 +- .../edit-form/edit-form-routing.service.ts | 4 +- .../edit/edit-form/edit-form.component.ts | 36 +- .../fields/edit/edit-form/edit-form.ts | 34 +- .../edit/editing-portal/edit-field-handler.ts | 6 +- .../edit-form-portal.component.ts | 10 +- .../edit-form-portal.injector.ts | 10 +- .../editing-portal/editing-portal-service.ts | 30 +- .../edit-field-controls.component.ts | 4 +- .../hal-resource-edit-field-handler.ts | 34 +- .../boolean-edit-field.component.ts | 4 +- .../combined-date-edit-field.component.ts | 18 +- .../field-types/date-edit-field.component.ts | 10 +- .../duration-edit-field.component.ts | 8 +- .../field-types/float-edit-field.component.ts | 4 +- .../formattable-edit-field.component.ts | 18 +- .../integer-edit-field.component.ts | 4 +- .../multi-select-edit-field.component.ts | 34 +- .../plain-formattable-edit-field.component.ts | 4 +- .../project-status-edit-field.component.ts | 18 +- .../select-autocompleter-register.service.ts | 4 +- .../select-edit-field.component.ts | 34 +- .../te-work-package-edit-field.component.ts | 16 +- .../field-types/text-edit-field.component.ts | 4 +- .../work-package-edit-field.component.ts | 16 +- .../editable-attribute-field.component.ts | 36 +- ...-edit-form-changes-tracker.service.spec.ts | 2 +- ...lobal-edit-form-changes-tracker.service.ts | 4 +- .../services/hal-resource-editing.service.ts | 24 +- frontend/src/app/modules/fields/field.base.ts | 4 +- .../src/app/modules/fields/field.service.ts | 14 +- .../attribute-help-text.component.ts | 10 +- .../help-texts/attribute-help-text.modal.ts | 12 +- .../help-texts/attribute-help-text.service.ts | 34 +- .../fields/helpers/project-status-helper.ts | 2 +- .../macros/attribute-label-macro.component.ts | 20 +- .../macros/attribute-model-loader.service.ts | 32 +- .../macros/attribute-value-macro.component.ts | 18 +- .../work-package-quickinfo-macro.component.ts | 26 +- .../fields/openproject-fields.module.ts | 70 +- ...al-search-work-packages-entry.component.ts | 2 +- .../global-search-work-packages.component.ts | 28 +- .../input/global-search-input.component.ts | 94 +- .../openproject-global-search.module.ts | 18 +- .../services/global-search.service.spec.ts | 22 +- .../services/global-search.service.ts | 14 +- .../tabs/global-search-tabs.component.ts | 8 +- .../title/global-search-title.component.ts | 40 +- .../src/app/modules/grids/areas/grid-gap.ts | 2 +- .../modules/grids/areas/grid-widget-area.ts | 4 +- .../modules/grids/grid/add-widget.service.ts | 34 +- .../app/modules/grids/grid/area.service.ts | 80 +- .../grids/grid/drag-and-drop.service.ts | 14 +- .../app/modules/grids/grid/grid.component.ts | 40 +- .../grids/grid/initialization.service.ts | 16 +- .../app/modules/grids/grid/move.service.ts | 16 +- .../grids/grid/page/grid-page.component.ts | 18 +- .../grids/grid/remove-widget.service.ts | 8 +- .../app/modules/grids/grid/resize.service.ts | 26 +- .../modules/grids/openproject-grids.module.ts | 98 +- .../widgets/abstract-widget.component.ts | 18 +- .../modules/grids/widgets/add/add.modal.ts | 18 +- .../custom-text-edit-field.service.ts | 32 +- .../custom-text/custom-text.component.ts | 22 +- .../widgets/documents/documents.component.ts | 26 +- .../grids/widgets/header/header.component.ts | 6 +- .../menu/widget-abstract-menu.component.ts | 10 +- .../widgets/menu/widget-menu.component.ts | 4 +- .../widgets/menu/wp-set-menu.component.ts | 24 +- .../grids/widgets/news/news.component.spec.ts | 20 +- .../grids/widgets/news/news.component.ts | 8 +- .../project-description.component.ts | 16 +- .../project-details.component.ts | 22 +- .../project-status.component.ts | 22 +- .../subprojects/subprojects.component.ts | 22 +- ...ntries-current-user-configuration.modal.ts | 22 +- ...ime-entries-current-user-menu.component.ts | 22 +- .../time-entries-current-user.component.ts | 16 +- .../list/time-entries-list.component.ts | 56 +- .../project/time-entries-project.component.ts | 16 +- .../modules/grids/widgets/widget-changeset.ts | 4 +- .../modules/grids/widgets/widgets.service.ts | 6 +- .../wp-calendar/wp-calendar.component.ts | 8 +- .../wp-graph/wp-graph-menu.component.ts | 6 +- .../widgets/wp-graph/wp-graph.component.ts | 20 +- .../wp-overview/wp-overview.component.ts | 4 +- .../wp-table/wp-table-menu.component.ts | 6 +- .../widgets/wp-table/wp-table-qs.component.ts | 6 +- .../widgets/wp-table/wp-table.component.ts | 34 +- .../src/app/modules/hal/hal-link/hal-link.ts | 8 +- .../hal/helpers/hal-resource-builder.ts | 10 +- .../modules/hal/helpers/lazy-accessor.spec.ts | 17 +- .../app/modules/hal/helpers/lazy-accessor.ts | 10 +- .../app/modules/hal/http/http.interfaces.ts | 2 +- .../http/openproject-header-interceptor.ts | 2 +- .../app/modules/hal/openproject-hal.module.ts | 16 +- .../attachment-collection-resource.ts | 4 +- .../hal/resources/collection-resource.ts | 2 +- .../hal/resources/configuration-resource.ts | 2 +- .../hal/resources/custom-action-resource.ts | 12 +- .../modules/hal/resources/error-resource.ts | 23 +- .../modules/hal/resources/form-resource.ts | 12 +- .../modules/hal/resources/grid-resource.ts | 18 +- .../hal/resources/grid-widget-resource.ts | 12 +- .../modules/hal/resources/group-resource.ts | 2 +- .../hal/resources/hal-resource.spec.ts | 36 +- .../app/modules/hal/resources/hal-resource.ts | 20 +- .../hal/resources/help-text-resource.ts | 6 +- .../hal/resources/meeting-content-resource.ts | 7 +- .../hal/resources/membership-resource.ts | 8 +- .../hal/resources/mixins/attachable-mixin.ts | 26 +- .../modules/hal/resources/news-resource.ts | 2 +- .../resources/placeholder-user-resource.ts | 4 +- .../modules/hal/resources/post-resource.ts | 7 +- .../modules/hal/resources/project-resource.ts | 2 +- .../query-filter-instance-resource.ts | 16 +- .../query-filter-instance-schema-resource.ts | 26 +- .../hal/resources/query-filter-resource.ts | 4 +- .../hal/resources/query-form-resource.ts | 8 +- .../hal/resources/query-group-by-resource.ts | 2 +- .../hal/resources/query-operator-resource.ts | 2 +- .../modules/hal/resources/query-resource.ts | 35 +- .../hal/resources/query-schema-resource.ts | 12 +- .../hal/resources/query-sort-by-resource.ts | 8 +- .../hal/resources/relation-resource.ts | 17 +- .../modules/hal/resources/role-resource.ts | 2 +- .../modules/hal/resources/root-resource.ts | 4 +- .../resources/schema-dependency-resource.ts | 2 +- .../modules/hal/resources/schema-resource.ts | 12 +- .../modules/hal/resources/status-resource.ts | 4 +- .../hal/resources/time-entry-resource.ts | 8 +- .../modules/hal/resources/type-resource.ts | 4 +- .../modules/hal/resources/user-resource.ts | 4 +- .../modules/hal/resources/version-resource.ts | 2 +- .../hal/resources/wiki-page-resource.ts | 7 +- .../resources/work-package-resource.spec.ts | 46 +- .../hal/resources/work-package-resource.ts | 42 +- .../hal/resources/wp-collection-resource.ts | 13 +- .../modules/hal/schemas/hal-payload.helper.ts | 10 +- .../app/modules/hal/schemas/schema-proxy.ts | 40 +- .../hal/schemas/work-package-schema-proxy.ts | 24 +- .../hal/services/hal-aware-error-handler.ts | 8 +- .../hal/services/hal-events.service.ts | 10 +- .../hal-resource-notification.service.ts | 40 +- .../services/hal-resource-sorting.service.ts | 4 +- .../hal/services/hal-resource.config.ts | 66 +- .../hal/services/hal-resource.service.ts | 38 +- .../hal/services/url-params-encoder.ts | 2 +- .../button/invite-user-button.component.ts | 24 +- .../invite-user-modal.module.ts | 32 +- .../project-search.component.ts | 14 +- .../role/role-search.component.ts | 14 +- .../display-job-page.component.ts | 14 +- .../job-status-modal/job-status.modal.ts | 56 +- .../openproject-job-status.module.ts | 12 +- .../members-autocompleter.component.ts | 16 +- .../src/app/modules/members/members.module.ts | 8 +- .../modules/modal/modal-header.component.ts | 4 +- .../modal/modal-wrapper-augment.service.ts | 12 +- .../src/app/modules/modal/modal.component.ts | 10 +- .../src/app/modules/modal/modal.module.ts | 10 +- .../src/app/modules/modal/modal.service.ts | 14 +- frontend/src/app/modules/modal/modal.types.ts | 4 +- .../app/modules/my-page/my-page.component.ts | 6 +- .../my-page/openproject-my-page.module.ts | 12 +- .../overview/openproject-overview.module.ts | 10 +- .../modules/overview/overview.component.ts | 6 +- .../app/modules/plugins/hook-service.spec.ts | 2 +- .../src/app/modules/plugins/hook-service.ts | 6 +- .../plugins/openproject-plugins.module.ts | 8 +- .../src/app/modules/plugins/plugin-context.ts | 50 +- .../projects/openproject-projects.module.ts | 8 +- .../reporting/openproject-reporting.module.ts | 6 +- .../reporting/openproject-reporting.routes.ts | 4 +- .../reporting-page.component.ts | 4 +- .../router/base/application-base.component.ts | 2 +- .../app/modules/router/first-route-service.ts | 2 +- .../router/openproject-router.module.ts | 8 +- .../app/modules/router/openproject.routes.ts | 20 +- .../time_entries/create/create.modal.ts | 8 +- .../time_entries/create/create.service.ts | 16 +- .../modules/time_entries/edit/edit.modal.ts | 10 +- .../modules/time_entries/edit/edit.service.ts | 20 +- .../edit/trigger-actions-entry.component.ts | 18 +- .../time_entries/form/form.component.ts | 18 +- .../openproject-time-entries.module.ts | 20 +- .../time_entries/shared/modal/base.modal.ts | 14 +- .../abstract-query-spaced-tab.component.ts | 20 +- .../tabs/filters-tab-inner.component.ts | 18 +- .../tabs/filters-tab.component.ts | 4 +- .../tabs/settings-tab-inner.component.ts | 34 +- .../tabs/settings-tab.component.ts | 4 +- .../wp-graph-configuration.modal.ts | 20 +- .../wp-graph-configuration.service.ts | 44 +- .../configuration/wp-graph-configuration.ts | 6 +- .../embedded/wp-embedded-graph.component.ts | 34 +- .../openproject-work-package-graphs.module.ts | 24 +- .../overview/wp-overview-graph.component.ts | 34 +- .../work-package-notification.service.ts | 16 +- .../openproject-work-package-routes.module.ts | 8 +- .../openproject-work-packages.module.ts | 292 +- .../query-space/isolated-graph-query-space.ts | 8 +- .../query-space/isolated-query-space.ts | 18 +- ...wp-isolated-graph-query-space.directive.ts | 64 +- .../wp-isolated-query-space.directive.ts | 78 +- .../partitioned-query-space-page.component.ts | 44 +- .../routing/split-view-routes.helper.ts | 2 +- .../routing/split-view-routes.template.ts | 30 +- .../routing/work-packages-routes.ts | 24 +- .../routing/wp-base/wp--base.component.ts | 6 +- .../wp-edit-form-routing.service.ts | 6 +- .../wp-full-view/wp-full-view.component.ts | 16 +- .../wp-list-view/wp-list-view.component.ts | 38 +- .../wp-split-view/wp-split-view.component.ts | 26 +- .../event-handling/event-handler-registry.ts | 6 +- .../view-services/wp-table-hierarchies.ts | 2 +- .../view-services/wp-table-highlight.ts | 4 +- .../view-services/wp-table-pagination.ts | 4 +- .../wp-view-additional-elements.service.ts | 26 +- .../view-services/wp-view-base.service.ts | 16 +- .../wp-view-collapsed-groups.service.ts | 32 +- .../view-services/wp-view-columns.service.ts | 36 +- .../wp-view-display-representation.service.ts | 10 +- .../view-services/wp-view-filters.service.ts | 42 +- .../view-services/wp-view-focus.service.ts | 18 +- .../view-services/wp-view-group-by.service.ts | 20 +- ...view-hierarchy-indentation.service.spec.ts | 50 +- .../wp-view-hierarchy-indentation.service.ts | 16 +- .../wp-view-hierarchy.service.ts | 10 +- .../wp-view-highlighting.service.ts | 22 +- .../view-services/wp-view-order.service.ts | 46 +- .../wp-view-pagination.service.ts | 18 +- .../wp-view-relation-columns.service.ts | 38 +- .../wp-view-selection.service.ts | 34 +- .../view-services/wp-view-sort-by.service.ts | 30 +- .../view-services/wp-view-sum.service.ts | 8 +- .../view-services/wp-view-timeline.service.ts | 24 +- .../work-package-single-view.base.ts | 40 +- .../wp-view-base/work-packages-view.base.ts | 72 +- .../wp-view-page/wp-view-page.component.ts | 56 +- frontend/src/app/sentry/sentry-reporter.ts | 34 +- frontend/src/test.ts | 13 +- frontend/src/typings/shims.d.ts | 13 +- frontend/tslint.json | 113 - frontend/tslint_typechecks.json | 17 - .../avatar-upload-form.component.ts | 34 +- modules/avatars/frontend/module/main.ts | 20 +- .../cost-budget-subform.augment.service.ts | 22 +- .../augment/cost-subform.augment.service.ts | 6 +- .../module/augment/planned-costs-form.ts | 14 +- .../module/hal/resources/budget-resource.ts | 4 +- modules/budgets/frontend/module/main.ts | 22 +- modules/costs/frontend/module/main.ts | 14 +- .../costs-by-type-display-field.module.ts | 110 +- .../currency-display-field.module.ts | 8 +- .../module/hal/resources/document-resource.ts | 7 +- modules/documents/frontend/module/main.ts | 14 +- 860 files changed, 12518 insertions(+), 9637 deletions(-) create mode 100644 frontend/.eslintignore create mode 100644 frontend/.eslintrc.js delete mode 100644 frontend/tslint.json delete mode 100644 frontend/tslint_typechecks.json diff --git a/.codeclimate.yml b/.codeclimate.yml index 7e782aaa4dc..2841651b647 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -37,23 +37,13 @@ plugins: enabled: false eslint: enabled: true - checks: - no-unused-expressions: - enabled: false + channel: "eslint-7" + config: + config: frontend/.eslintrc.js csslint: enabled: true scsslint: enabled: true - tslint: - enabled: true - config: tslint.json - checks: - # Disable whitespace due to 3.7 incompatibiltiy with ? navigation - whitespace: - enabled: false - # Disable difference in import styles until we migrate to eslint - quotemark: - enabled: false fixme: enabled: true ratings: diff --git a/.editorconfig b/.editorconfig index 4fede9c1c86..f62bf958132 100644 --- a/.editorconfig +++ b/.editorconfig @@ -17,7 +17,6 @@ ij_wrap_on_typing = false ij_css_align_closing_brace_with_properties = false ij_css_blank_lines_around_nested_selector = 1 ij_css_blank_lines_between_blocks = 1 -ij_css_brace_placement = 0 ij_css_hex_color_long_format = false ij_css_hex_color_lower_case = false ij_css_hex_color_short_format = false @@ -28,7 +27,6 @@ ij_css_keep_single_line_blocks = false ij_css_properties_order = font,font-family,font-size,font-weight,font-style,font-variant,font-size-adjust,font-stretch,line-height,position,z-index,top,right,bottom,left,display,visibility,float,clear,overflow,overflow-x,overflow-y,clip,zoom,align-content,align-items,align-self,flex,flex-flow,flex-basis,flex-direction,flex-grow,flex-shrink,flex-wrap,justify-content,order,box-sizing,width,min-width,max-width,height,min-height,max-height,margin,margin-top,margin-right,margin-bottom,margin-left,padding,padding-top,padding-right,padding-bottom,padding-left,table-layout,empty-cells,caption-side,border-spacing,border-collapse,list-style,list-style-position,list-style-type,list-style-image,content,quotes,counter-reset,counter-increment,resize,cursor,user-select,nav-index,nav-up,nav-right,nav-down,nav-left,transition,transition-delay,transition-timing-function,transition-duration,transition-property,transform,transform-origin,animation,animation-name,animation-duration,animation-play-state,animation-timing-function,animation-delay,animation-iteration-count,animation-direction,text-align,text-align-last,vertical-align,white-space,text-decoration,text-emphasis,text-emphasis-color,text-emphasis-style,text-emphasis-position,text-indent,text-justify,letter-spacing,word-spacing,text-outline,text-transform,text-wrap,text-overflow,text-overflow-ellipsis,text-overflow-mode,word-wrap,word-break,tab-size,hyphens,pointer-events,opacity,color,border,border-width,border-style,border-color,border-top,border-top-width,border-top-style,border-top-color,border-right,border-right-width,border-right-style,border-right-color,border-bottom,border-bottom-width,border-bottom-style,border-bottom-color,border-left,border-left-width,border-left-style,border-left-color,border-radius,border-top-left-radius,border-top-right-radius,border-bottom-right-radius,border-bottom-left-radius,border-image,border-image-source,border-image-slice,border-image-width,border-image-outset,border-image-repeat,outline,outline-width,outline-style,outline-color,outline-offset,background,background-color,background-image,background-repeat,background-attachment,background-position,background-position-x,background-position-y,background-clip,background-origin,background-size,box-decoration-break,box-shadow,text-shadow ij_css_space_after_colon = true ij_css_space_before_opening_brace = true -ij_css_value_alignment = 0 [*.feature] indent_size = 2 @@ -128,108 +126,10 @@ ij_editorconfig_space_before_colon = false ij_editorconfig_space_before_comma = false ij_editorconfig_spaces_around_assignment_operators = true -[{*.cjsx,*.coffee}] -indent_size = 2 -tab_width = 2 -ij_continuation_indent_size = 2 -ij_coffeescript_align_function_body = false -ij_coffeescript_align_imports = false -ij_coffeescript_align_multiline_array_initializer_expression = true -ij_coffeescript_align_multiline_parameters = true -ij_coffeescript_align_multiline_parameters_in_calls = false -ij_coffeescript_align_object_properties = 0 -ij_coffeescript_align_union_types = false -ij_coffeescript_align_var_statements = 0 -ij_coffeescript_array_initializer_new_line_after_left_brace = false -ij_coffeescript_array_initializer_right_brace_on_new_line = false -ij_coffeescript_array_initializer_wrap = normal -ij_coffeescript_blacklist_imports = rxjs/Rx,node_modules/**/*,@angular/material,@angular/material/typings/** -ij_coffeescript_blank_lines_around_function = 1 -ij_coffeescript_call_parameters_new_line_after_left_paren = false -ij_coffeescript_call_parameters_right_paren_on_new_line = false -ij_coffeescript_call_parameters_wrap = normal -ij_coffeescript_chained_call_dot_on_new_line = true -ij_coffeescript_comma_on_new_line = false -ij_coffeescript_enforce_trailing_comma = keep -ij_coffeescript_field_prefix = _ -ij_coffeescript_file_name_style = relaxed -ij_coffeescript_force_quote_style = false -ij_coffeescript_force_semicolon_style = false -ij_coffeescript_function_expression_brace_style = end_of_line -ij_coffeescript_import_merge_members = global -ij_coffeescript_import_prefer_absolute_path = global -ij_coffeescript_import_sort_members = true -ij_coffeescript_import_sort_module_name = false -ij_coffeescript_import_use_node_resolution = true -ij_coffeescript_imports_wrap = on_every_item -ij_coffeescript_indent_chained_calls = true -ij_coffeescript_indent_package_children = 0 -ij_coffeescript_jsx_attribute_value = braces -ij_coffeescript_keep_blank_lines_in_code = 2 -ij_coffeescript_keep_first_column_comment = true -ij_coffeescript_keep_indents_on_empty_lines = false -ij_coffeescript_keep_line_breaks = true -ij_coffeescript_keep_simple_methods_in_one_line = false -ij_coffeescript_method_parameters_new_line_after_left_paren = false -ij_coffeescript_method_parameters_right_paren_on_new_line = false -ij_coffeescript_method_parameters_wrap = off -ij_coffeescript_object_literal_wrap = on_every_item -ij_coffeescript_prefer_as_type_cast = false -ij_coffeescript_reformat_c_style_comments = false -ij_coffeescript_space_after_comma = true -ij_coffeescript_space_after_dots_in_rest_parameter = false -ij_coffeescript_space_after_generator_mult = true -ij_coffeescript_space_after_property_colon = true -ij_coffeescript_space_after_type_colon = true -ij_coffeescript_space_after_unary_not = false -ij_coffeescript_space_before_async_arrow_lparen = true -ij_coffeescript_space_before_class_lbrace = true -ij_coffeescript_space_before_comma = false -ij_coffeescript_space_before_function_left_parenth = true -ij_coffeescript_space_before_generator_mult = false -ij_coffeescript_space_before_property_colon = false -ij_coffeescript_space_before_type_colon = false -ij_coffeescript_space_before_unary_not = false -ij_coffeescript_spaces_around_additive_operators = true -ij_coffeescript_spaces_around_arrow_function_operator = true -ij_coffeescript_spaces_around_assignment_operators = true -ij_coffeescript_spaces_around_bitwise_operators = true -ij_coffeescript_spaces_around_equality_operators = true -ij_coffeescript_spaces_around_logical_operators = true -ij_coffeescript_spaces_around_multiplicative_operators = true -ij_coffeescript_spaces_around_relational_operators = true -ij_coffeescript_spaces_around_shift_operators = true -ij_coffeescript_spaces_around_unary_operator = false -ij_coffeescript_spaces_within_array_initializer_braces = false -ij_coffeescript_spaces_within_array_initializer_brackets = false -ij_coffeescript_spaces_within_imports = false -ij_coffeescript_spaces_within_index_brackets = false -ij_coffeescript_spaces_within_interpolation_expressions = false -ij_coffeescript_spaces_within_method_call_parentheses = false -ij_coffeescript_spaces_within_method_parentheses = false -ij_coffeescript_spaces_within_object_braces = false -ij_coffeescript_spaces_within_object_literal_braces = false -ij_coffeescript_spaces_within_object_type_braces = true -ij_coffeescript_spaces_within_range_brackets = false -ij_coffeescript_spaces_within_type_assertion = false -ij_coffeescript_spaces_within_union_types = true -ij_coffeescript_union_types_wrap = on_every_item -ij_coffeescript_use_chained_calls_group_indents = false -ij_coffeescript_use_double_quotes = true -ij_coffeescript_use_explicit_js_extension = global -ij_coffeescript_use_path_mapping = always -ij_coffeescript_use_public_modifier = false -ij_coffeescript_use_semicolon_after_statement = false -ij_coffeescript_var_declaration_wrap = normal - [{*.erb,*.rhtml}] -indent_size = 2 -tab_width = 2 -ij_continuation_indent_size = 2 ij_rhtml_keep_indents_on_empty_lines = false [{*.js,*.cjs}] -ij_continuation_indent_size = 2 ij_javascript_align_imports = false ij_javascript_align_multiline_array_initializer_expression = false ij_javascript_align_multiline_binary_operation = false @@ -264,7 +164,7 @@ ij_javascript_class_brace_style = end_of_line ij_javascript_comma_on_new_line = false ij_javascript_do_while_brace_force = never ij_javascript_else_on_new_line = false -ij_javascript_enforce_trailing_comma = keep +ij_javascript_enforce_trailing_comma = whenmultiline ij_javascript_extends_keyword_wrap = off ij_javascript_extends_list_wrap = off ij_javascript_field_prefix = _ @@ -364,7 +264,7 @@ ij_javascript_spaces_within_brackets = false ij_javascript_spaces_within_catch_parentheses = false ij_javascript_spaces_within_for_parentheses = false ij_javascript_spaces_within_if_parentheses = false -ij_javascript_spaces_within_imports = false +ij_javascript_spaces_within_imports = true ij_javascript_spaces_within_interpolation_expressions = false ij_javascript_spaces_within_method_call_parentheses = false ij_javascript_spaces_within_method_parentheses = false @@ -514,7 +414,7 @@ ij_typescript_class_brace_style = end_of_line ij_typescript_comma_on_new_line = false ij_typescript_do_while_brace_force = never ij_typescript_else_on_new_line = false -ij_typescript_enforce_trailing_comma = keep +ij_typescript_enforce_trailing_comma = whenmultiline ij_typescript_extends_keyword_wrap = off ij_typescript_extends_list_wrap = off ij_typescript_field_prefix = _ @@ -615,7 +515,7 @@ ij_typescript_spaces_within_brackets = false ij_typescript_spaces_within_catch_parentheses = false ij_typescript_spaces_within_for_parentheses = false ij_typescript_spaces_within_if_parentheses = false -ij_typescript_spaces_within_imports = false +ij_typescript_spaces_within_imports = true ij_typescript_spaces_within_interpolation_expressions = false ij_typescript_spaces_within_method_call_parentheses = false ij_typescript_spaces_within_method_parentheses = false diff --git a/frontend/.eslintignore b/frontend/.eslintignore new file mode 100644 index 00000000000..82a9a730d1e --- /dev/null +++ b/frontend/.eslintignore @@ -0,0 +1 @@ +.eslintrc.js \ No newline at end of file diff --git a/frontend/.eslintrc.js b/frontend/.eslintrc.js new file mode 100644 index 00000000000..3644b7d8eb4 --- /dev/null +++ b/frontend/.eslintrc.js @@ -0,0 +1,174 @@ +module.exports = { + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], + env: { + browser: true, + }, + parser: "@typescript-eslint/parser", + parserOptions: { + project: "./src/tsconfig.app.json", + sourceType: "module", + createDefaultProgram: true, + }, + plugins: [ + "@typescript-eslint", + ], + overrides: [ + { + "files": ["*.ts"], + "parserOptions": { + "project": [ + "./src/tsconfig.app.json" + ], + "createDefaultProgram": true + }, + "extends": [ + "plugin:@angular-eslint/recommended", + // This is required if you use inline templates in Components + "plugin:@angular-eslint/template/process-inline-templates" + ], + "rules": { + /** + * Any TypeScript source code (NOT TEMPLATE) related rules you wish to use/reconfigure over and above the + * recommended set provided by the @angular-eslint project would go here. + */ + "@angular-eslint/directive-selector": [ + "error", + { "type": "attribute", "prefix": "op", "style": "camelCase" } + ], + "@angular-eslint/component-selector": [ + "error", + { "type": "element", "prefix": "op", "style": "kebab-case" } + ], + "@typescript-eslint/dot-notation": "off", + "@typescript-eslint/naming-convention": "off", + "@typescript-eslint/no-empty-function": "error", + // note you must disable the base rule as it can report incorrect errors + semi: "off", + "@typescript-eslint/semi": ["error"], + "brace-style": [ + "error", + "1tbs", + ], + curly: "error", + "eol-last": "off", + eqeqeq: [ + "error", + "smart", + ], + "guard-for-in": "error", + "id-blacklist": "off", + "id-match": "off", + "max-len": [ + "off", + { + code: 140, + }, + ], + "no-bitwise": "off", + "no-caller": "error", + "no-console": [ + "error", + { + allow: [ + "log", + "warn", + "dir", + "timeLog", + "assert", + "clear", + "count", + "countReset", + "group", + "groupEnd", + "table", + "dirxml", + "error", + "groupCollapsed", + "Console", + "profile", + "profileEnd", + "timeStamp", + "context", + ], + }, + ], + "no-debugger": "error", + "no-empty": "error", + "no-eval": "error", + "no-new-wrappers": "error", + "no-redeclare": "error", + "no-trailing-spaces": "error", + "no-underscore-dangle": "off", + "no-unused-labels": "error", + "no-var": "off", + radix: "off", + // Disable required spaces in license comments + "spaced-comment": "off", + + // Disable preference on quotes, rely on formatter instead + quotes: "off", + + // Disable consistent return as typescript checks return type + "consistent-return": "off", + + // Disable forcing arrow function params for one + "arrow-parens": "off", + + // Disable enforce class methods use this + "class-methods-use-this": "off", + + // Disable webpack loader definitions + "import/no-webpack-loader-syntax": "off", + + // Disable use before define, as irrelevant for TS interfaces + "no-use-before-define": "off", + "@typescript-eslint/no-use-before-define": "off", + + // Allow object.hasOwnProperty calls + "no-prototype-builtins": "off", + + // We need to redeclare interface with the same name + // as a class or constant for type ducking + "no-redeclare": "off", + + // Whitespace configuration + "@typescript-eslint/type-annotation-spacing": [ + "error", + { + before: false, + after: false, + overrides: { + arrow: { + before: true, + after: true, + }, + }, + }, + ], + + // Allow empty interfaces for naming purposes (HAL resources) + "@typescript-eslint/no-empty-interface": "off", + + // Force spaces in objects + "object-curly-spacing": ["error", "always"], + + // Force indent to 2space + indent: ["error", 2], + } + }, + { + "files": ["*.html"], + "extends": ["plugin:@angular-eslint/template/recommended"], + "rules": { + /** + * Any template/HTML related rules you wish to use/reconfigure over and above the + * recommended set provided by the @angular-eslint project would go here. + */ + } + } + ], +}; diff --git a/frontend/angular.json b/frontend/angular.json index 2f70fc06f4f..3a9ffe60dd0 100644 --- a/frontend/angular.json +++ b/frontend/angular.json @@ -119,14 +119,11 @@ } }, "lint": { - "builder": "@angular-devkit/build-angular:tslint", + "builder": "@angular-eslint/builder:lint", "options": { - "tsConfig": [ - "src/tsconfig.app.json", - "src/tsconfig.spec.json" - ], - "exclude": [ - "**/node_modules/**" + "lintFilePatterns": [ + "src/**/*.ts", + "src/**/*.html" ] } } diff --git a/frontend/npm-shrinkwrap.json b/frontend/npm-shrinkwrap.json index 22040e64f24..ef341d3af77 100644 --- a/frontend/npm-shrinkwrap.json +++ b/frontend/npm-shrinkwrap.json @@ -90,10 +90,20 @@ "zone.js": "~0.11.3" }, "devDependencies": { + "@angular-eslint/builder": "1.2.0", + "@angular-eslint/eslint-plugin": "1.2.0", + "@angular-eslint/eslint-plugin-template": "1.2.0", + "@angular-eslint/schematics": "1.2.0", + "@angular-eslint/template-parser": "1.2.0", "@angular/language-service": "11.2.3", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@types/jasmine": "~3.6.0", + "@typescript-eslint/eslint-plugin": "^4.16.1", + "@typescript-eslint/parser": "^4.16.1", "codelyzer": "^6.0.0", + "eslint": "^7.21.0", + "eslint-config-airbnb-base": "^14.2.1", + "eslint-plugin-import": "^2.22.1", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", @@ -102,21 +112,41 @@ "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~3.3.0", "karma-jasmine-html-reporter": "^1.5.0", - "ts-node": "~8.3.0", - "tslint": "~6.1.0" + "ts-node": "~8.3.0" } }, "node_modules/@angular-devkit/architect": { - "version": "0.1102.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.2.tgz", - "integrity": "sha512-FE7DeT13elqDlELF23QqvEFnT2BkxeC5t31/QW85IN/OR5Tf/q7XEpj7giJXyzKFQ60M3ZzbznZyRz0EqtfaBQ==", + "version": "0.1100.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1100.7.tgz", + "integrity": "sha512-b2zv2yiRbdhJ7hJfZsAvGYcqgh2DVtc7gRIPo1eDPvOAKrenmZ4zo/v0PRYScrTsPzqmoCokNA5nIwufwUEnuA==", + "dev": true, + "peer": true, "dependencies": { - "@angular-devkit/core": "11.2.2", + "@angular-devkit/core": "11.0.7", "rxjs": "6.6.3" }, "engines": { "node": ">= 10.13.0", - "npm": "^6.11.0 || ^7.5.6", + "npm": ">= 6.11.0", + "yarn": ">= 1.13.0" + } + }, + "node_modules/@angular-devkit/architect/node_modules/@angular-devkit/core": { + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-11.0.7.tgz", + "integrity": "sha512-1GKnIT++YSUHpzzRx9QC0+8yOw4wy+ZpiJVDlroPSeK4FGrTCJqJKenkfRjVFRFOSrzTiJds+IU6kI4+bFbw9g==", + "dev": true, + "peer": true, + "dependencies": { + "ajv": "6.12.6", + "fast-json-stable-stringify": "2.1.0", + "magic-string": "0.25.7", + "rxjs": "6.6.3", + "source-map": "0.7.3" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 6.11.0", "yarn": ">= 1.13.0" } }, @@ -124,6 +154,8 @@ "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "peer": true, "dependencies": { "tslib": "^1.9.0" }, @@ -134,7 +166,9 @@ "node_modules/@angular-devkit/architect/node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "peer": true }, "node_modules/@angular-devkit/build-angular": { "version": "0.1102.2", @@ -220,15 +254,18 @@ "yarn": ">= 1.13.0" } }, - "node_modules/@angular-devkit/build-angular/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "node_modules/@angular-devkit/build-angular/node_modules/@angular-devkit/architect": { + "version": "0.1102.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.2.tgz", + "integrity": "sha512-FE7DeT13elqDlELF23QqvEFnT2BkxeC5t31/QW85IN/OR5Tf/q7XEpj7giJXyzKFQ60M3ZzbznZyRz0EqtfaBQ==", "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@angular-devkit/core": "11.2.2", + "rxjs": "6.6.3" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" } }, "node_modules/@angular-devkit/build-angular/node_modules/ajv-keywords": { @@ -327,11 +364,6 @@ "node": ">= 4" } }, - "node_modules/@angular-devkit/build-angular/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "node_modules/@angular-devkit/build-angular/node_modules/find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -357,22 +389,6 @@ "node": ">=8" } }, - "node_modules/@angular-devkit/build-angular/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/@angular-devkit/build-angular/node_modules/import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -385,20 +401,6 @@ "node": ">=6" } }, - "node_modules/@angular-devkit/build-angular/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@angular-devkit/build-angular/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -647,20 +649,6 @@ "node": ">= 4" } }, - "node_modules/@angular-devkit/build-optimizer/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@angular-devkit/build-optimizer/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -706,6 +694,20 @@ "yarn": ">= 1.13.0" } }, + "node_modules/@angular-devkit/build-webpack/node_modules/@angular-devkit/architect": { + "version": "0.1102.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.2.tgz", + "integrity": "sha512-FE7DeT13elqDlELF23QqvEFnT2BkxeC5t31/QW85IN/OR5Tf/q7XEpj7giJXyzKFQ60M3ZzbznZyRz0EqtfaBQ==", + "dependencies": { + "@angular-devkit/core": "11.2.2", + "rxjs": "6.6.3" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, "node_modules/@angular-devkit/build-webpack/node_modules/rxjs": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", @@ -739,27 +741,6 @@ "yarn": ">= 1.13.0" } }, - "node_modules/@angular-devkit/core/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "node_modules/@angular-devkit/core/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/@angular-devkit/core/node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, "node_modules/@angular-devkit/core/node_modules/rxjs": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", @@ -807,6 +788,453 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/@angular-eslint/builder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-1.2.0.tgz", + "integrity": "sha512-bYIut4edOq/RWyYsi3Z5NW/wEHSGLpjXfQ38zbdRlsX93+N8nAu1hf5ishbnpkEobEyerktoRVmRI8UXPsijjg==", + "dev": true, + "peerDependencies": { + "@angular-devkit/architect": "~0.1001.4 || ~0.1100.1", + "eslint": "*", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-1.2.0.tgz", + "integrity": "sha512-HxSDdAS2/lbwYBJmRVRKlx5wjiKdeBPl7JJlciwhrP7QR01a66AWun+fW1ZpMnnqivkF+D5sISsoedRLthRcwA==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.3.0" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*", + "eslint-plugin-jsdoc": "*", + "eslint-plugin-prefer-arrow": "*", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-1.2.0.tgz", + "integrity": "sha512-Oi/y+N/FETuyhbVuFxbkCqSfLo61CAvIPwnQQCfDku/IsCSTI1SjW+B2xO9thDI5po7t5V+3n26uMLQsWNZmlw==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.3.0", + "aria-query": "^4.2.2", + "axobject-query": "^2.2.0" + }, + "peerDependencies": { + "@angular-eslint/template-parser": "*", + "eslint": "*", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/experimental-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.3.0.tgz", + "integrity": "sha512-cmmIK8shn3mxmhpKfzMMywqiEheyfXLV/+yPDnOTvQX/ztngx7Lg/OD26J8gTZfkLKUmaEBxO2jYP3keV7h2OQ==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.3.0", + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/typescript-estree": "4.3.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/scope-manager": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.3.0.tgz", + "integrity": "sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/types": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.3.0.tgz", + "integrity": "sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/typescript-estree": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.3.0.tgz", + "integrity": "sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@typescript-eslint/visitor-keys": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz", + "integrity": "sha512-xZxkuR7XLM6RhvLkgv9yYlTcBHnTULzfnw4i6+z2TGBLy9yljAypQaZl9c3zFvy7PNI7fYWyvKYtohyF8au3cw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.3.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/aria-query": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", + "dev": true, + "dependencies": { + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/axobject-query": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", + "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", + "dev": true + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-eslint/eslint-plugin-template/node_modules/tsutils": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", + "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/experimental-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.3.0.tgz", + "integrity": "sha512-cmmIK8shn3mxmhpKfzMMywqiEheyfXLV/+yPDnOTvQX/ztngx7Lg/OD26J8gTZfkLKUmaEBxO2jYP3keV7h2OQ==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.3.0", + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/typescript-estree": "4.3.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/scope-manager": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.3.0.tgz", + "integrity": "sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/types": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.3.0.tgz", + "integrity": "sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/typescript-estree": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.3.0.tgz", + "integrity": "sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/@typescript-eslint/visitor-keys": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz", + "integrity": "sha512-xZxkuR7XLM6RhvLkgv9yYlTcBHnTULzfnw4i6+z2TGBLy9yljAypQaZl9c3zFvy7PNI7fYWyvKYtohyF8au3cw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.3.0", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@angular-eslint/eslint-plugin/node_modules/tsutils": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", + "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@angular-eslint/schematics": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-1.2.0.tgz", + "integrity": "sha512-F0Mb6XyLWGmmtov5kv/BHvt22Uo/FuD4y2WhO7NUA9rZRJd+anmyHCkC9HXmNKUuLQIUKjJ4DJgsmD0Kh0Hr2g==", + "dev": true, + "dependencies": { + "@angular-eslint/eslint-plugin": "1.2.0", + "@angular-eslint/eslint-plugin-template": "1.2.0", + "strip-json-comments": "3.1.1", + "tslint-to-eslint-config": "2.0.1" + }, + "peerDependencies": { + "@angular-devkit/core": "*", + "@angular-devkit/schematics": "*" + } + }, + "node_modules/@angular-eslint/template-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-1.2.0.tgz", + "integrity": "sha512-EfNJh0nFGJInHa2ccVw8Eb9ujWoUAwaQMCi9GppzYrqhSPc0YZqdQg4eIW2AlZs1giHD2Ko/V1rphzw+9gisCw==", + "dev": true, + "dependencies": { + "eslint-scope": "^5.1.0" + }, + "peerDependencies": { + "@angular/compiler": "*", + "eslint": "*", + "typescript": "*" + } + }, + "node_modules/@angular-eslint/template-parser/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/@angular/animations": { "version": "11.2.3", "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-11.2.3.tgz", @@ -869,6 +1297,20 @@ "yarn": ">= 1.13.0" } }, + "node_modules/@angular/cli/node_modules/@angular-devkit/architect": { + "version": "0.1102.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.2.tgz", + "integrity": "sha512-FE7DeT13elqDlELF23QqvEFnT2BkxeC5t31/QW85IN/OR5Tf/q7XEpj7giJXyzKFQ60M3ZzbznZyRz0EqtfaBQ==", + "dependencies": { + "@angular-devkit/core": "11.2.2", + "rxjs": "6.6.3" + }, + "engines": { + "node": ">= 10.13.0", + "npm": "^6.11.0 || ^7.5.6", + "yarn": ">= 1.13.0" + } + }, "node_modules/@angular/cli/node_modules/debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -905,6 +1347,17 @@ "rimraf": "bin.js" } }, + "node_modules/@angular/cli/node_modules/rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, "node_modules/@angular/cli/node_modules/semver": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", @@ -919,6 +1372,11 @@ "node": ">=10" } }, + "node_modules/@angular/cli/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@angular/cli/node_modules/uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -1130,11 +1588,11 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "dependencies": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.10.4" } }, "node_modules/@babel/compat-data": { @@ -1167,24 +1625,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dependencies": { - "@babel/highlight": "^7.12.13" - } - }, - "node_modules/@babel/core/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/core/node_modules/debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -1196,20 +1636,6 @@ "node": ">=6.0" } }, - "node_modules/@babel/core/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@babel/core/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -1357,16 +1783,6 @@ "@babel/highlight": "^7.12.13" } }, - "node_modules/@babel/helper-function-name/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/helper-function-name/node_modules/@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -1434,16 +1850,6 @@ "@babel/highlight": "^7.12.13" } }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/helper-module-transforms/node_modules/@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -1541,16 +1947,6 @@ "@babel/highlight": "^7.12.13" } }, - "node_modules/@babel/helper-wrap-function/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/helper-wrap-function/node_modules/@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -1579,16 +1975,6 @@ "@babel/highlight": "^7.12.13" } }, - "node_modules/@babel/helpers/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/helpers/node_modules/@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -1600,20 +1986,15 @@ } }, "node_modules/@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", + "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" } }, - "node_modules/@babel/highlight/node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - }, "node_modules/@babel/parser": { "version": "7.13.4", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.4.tgz", @@ -2227,6 +2608,16 @@ "regenerator-runtime": "^0.13.4" } }, + "node_modules/@babel/runtime-corejs3": { + "version": "7.13.9", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.13.9.tgz", + "integrity": "sha512-p6WSr71+5u/VBf1KDS/Y4dK3ZwbV+DD6wQO3X2EbUVluEOiyXUk09DzcwSaUH4WomYXrEPC+i2rqzuthhZhOJw==", + "dev": true, + "dependencies": { + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" + } + }, "node_modules/@babel/template": { "version": "7.12.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", @@ -2237,24 +2628,6 @@ "@babel/types": "^7.12.7" } }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "dependencies": { - "@babel/highlight": "^7.12.13" - } - }, - "node_modules/@babel/template/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/traverse": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.0.tgz", @@ -2289,16 +2662,6 @@ "source-map": "^0.5.0" } }, - "node_modules/@babel/traverse/node_modules/@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "dependencies": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "node_modules/@babel/traverse/node_modules/debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -2333,6 +2696,107 @@ "to-fast-properties": "^2.0.0" } }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@eslint/eslintrc/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/@fullcalendar/angular": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@fullcalendar/angular/-/angular-5.5.0.tgz", @@ -2347,11 +2811,6 @@ "npm": ">= 3.0.0" } }, - "node_modules/@fullcalendar/angular/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "node_modules/@fullcalendar/common": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@fullcalendar/common/-/common-5.5.0.tgz", @@ -2444,17 +2903,6 @@ "schema-utils": "^2.7.0" } }, - "node_modules/@jsdevtools/coverage-istanbul-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/@jsdevtools/coverage-istanbul-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -2476,25 +2924,6 @@ "node": ">= 4" } }, - "node_modules/@jsdevtools/coverage-istanbul-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/@jsdevtools/coverage-istanbul-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/@jsdevtools/coverage-istanbul-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -2978,6 +3407,12 @@ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==" }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "node_modules/@types/lodash": { "version": "4.14.149", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.149.tgz", @@ -3072,6 +3507,317 @@ "node": ">=0.10.0" } }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz", + "integrity": "sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.16.1", + "@typescript-eslint/scope-manager": "4.16.1", + "debug": "^4.1.1", + "functional-red-black-tree": "^1.0.1", + "lodash": "^4.17.15", + "regexpp": "^3.0.0", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/tsutils": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", + "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz", + "integrity": "sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.16.1", + "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/typescript-estree": "4.16.1", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.16.1.tgz", + "integrity": "sha512-/c0LEZcDL5y8RyI1zLcmZMvJrsR6SM1uetskFkoh3dvqDKVXPsXI+wFB/CbVw7WkEyyTKobC1mUNp/5y6gRvXg==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "4.16.1", + "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/typescript-estree": "4.16.1", + "debug": "^4.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz", + "integrity": "sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/visitor-keys": "4.16.1" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz", + "integrity": "sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz", + "integrity": "sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/visitor-keys": "4.16.1", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/@typescript-eslint/typescript-estree/node_modules/tsutils": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", + "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz", + "integrity": "sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.16.1", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/@uirouter/angular": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@uirouter/angular/-/angular-8.0.0.tgz", @@ -3327,6 +4073,15 @@ "node": ">=0.4.0" } }, + "node_modules/acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, "node_modules/adjust-sourcemap-loader": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-3.0.0.tgz", @@ -3355,20 +4110,6 @@ "node": ">= 4" } }, - "node_modules/adjust-sourcemap-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/adjust-sourcemap-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -3457,14 +4198,18 @@ } }, "node_modules/ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dependencies": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, "node_modules/ajv-errors": { @@ -3634,6 +4379,25 @@ "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=" }, + "node_modules/array-includes": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -3658,6 +4422,23 @@ "node": ">=0.10.0" } }, + "node_modules/array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", @@ -3732,6 +4513,15 @@ "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", "dev": true }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -3872,17 +4662,6 @@ "node": ">= 8.9" } }, - "node_modules/babel-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/babel-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -3904,11 +4683,6 @@ "node": ">= 4" } }, - "node_modules/babel-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "node_modules/babel-loader/node_modules/find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -4990,6 +5764,19 @@ "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.48.4.tgz", "integrity": "sha512-pUhZXDQ6qXSpWdwlgAwHEkd4imA0kf83hINmUEzJpmG80T/XLtDDEzZo8f6PQLuRCcUQhmzqqIo3ZPTRaWByRA==" }, + "node_modules/coffeescript": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.12.7.tgz", + "integrity": "sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==", + "dev": true, + "bin": { + "cake": "bin/cake", + "coffee": "bin/coffee" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -5063,6 +5850,16 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, + "node_modules/comment-parser": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.2.tgz", + "integrity": "sha512-AOdq0i8ghZudnYv8RUnHrhTgafUGs61Rdz9jemU5x2lnZwAWyOq7vySo626K59e1fVKH1xSRorJwPVRLSWOoAQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 10.0.0" + } + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -5140,6 +5937,12 @@ "typedarray": "^0.0.6" } }, + "node_modules/confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", + "dev": true + }, "node_modules/connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -5178,6 +5981,15 @@ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" }, + "node_modules/contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -5278,17 +6090,6 @@ "node": ">= 10.13.0" } }, - "node_modules/copy-webpack-plugin/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/copy-webpack-plugin/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -5310,11 +6111,6 @@ "node": ">= 4" } }, - "node_modules/copy-webpack-plugin/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "node_modules/copy-webpack-plugin/node_modules/find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -5340,20 +6136,6 @@ "node": ">=8" } }, - "node_modules/copy-webpack-plugin/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/copy-webpack-plugin/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -5542,6 +6324,17 @@ "semver": "bin/semver.js" } }, + "node_modules/core-js-pure": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.9.1.tgz", + "integrity": "sha512-laz3Zx0avrw9a4QEIdmIblnVuJz8W51leY9iLThatCsFawWxC3sE4guASC78JbCin+DkwMpCdp1AVAuzL/GN7A==", + "dev": true, + "hasInstallScript": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -5708,6 +6501,18 @@ "node": "*" } }, + "node_modules/cson-parser": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/cson-parser/-/cson-parser-4.0.7.tgz", + "integrity": "sha512-BSnAl0gllETWjU9/lb8MmeqhsGaRINPwhoPiBjI/TJBRvKf/24I9EVqnwvmk6R3Gt66cMRSGVktl6QicxIb72g==", + "dev": true, + "dependencies": { + "coffeescript": "1.12.7" + }, + "engines": { + "node": ">=10.13" + } + }, "node_modules/css": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", @@ -5760,17 +6565,6 @@ "node": ">= 10.13.0" } }, - "node_modules/css-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/css-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -5792,25 +6586,6 @@ "node": ">= 4" } }, - "node_modules/css-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/css-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/css-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -6223,6 +6998,12 @@ "regexp.prototype.flags": "^1.2.0" } }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "node_modules/default-gateway": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", @@ -6471,6 +7252,18 @@ "buffer-indexof": "^1.0.0" } }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/dom-autoscroller": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/dom-autoscroller/-/dom-autoscroller-2.3.4.tgz", @@ -6784,6 +7577,18 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, "node_modules/ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -6960,6 +7765,299 @@ "node": ">=0.8.0" } }, + "node_modules/eslint": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", + "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-airbnb-base": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", + "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "dev": true, + "dependencies": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "eslint": "^5.16.0 || ^6.8.0 || ^7.2.0", + "eslint-plugin-import": "^2.22.1" + } + }, + "node_modules/eslint-config-prettier": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", + "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", + "dev": true, + "dependencies": { + "get-stdin": "^6.0.0" + }, + "bin": { + "eslint-config-prettier-check": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=3.14.1" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "dev": true, + "dependencies": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "dev": true, + "dependencies": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "dependencies": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "32.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.2.0.tgz", + "integrity": "sha512-ikeVeF3JVmzjcmGd04OZK0rXjgiw46TWtNX+OhyF2jQlw3w1CAU1vyAyLv8PZcIjp7WxP4N20Vg1CI9bp/52dw==", + "dev": true, + "peer": true, + "dependencies": { + "comment-parser": "1.1.2", + "debug": "^4.3.1", + "jsdoctypeparser": "^9.0.0", + "lodash": "^4.17.20", + "regextras": "^0.7.1", + "semver": "^7.3.4", + "spdx-expression-parse": "^3.0.1" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0" + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "peer": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint-plugin-jsdoc/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "peer": true + }, + "node_modules/eslint-plugin-jsdoc/node_modules/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "peer": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint-plugin-prefer-arrow": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", + "integrity": "sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "eslint": ">=2.0.0" + } + }, "node_modules/eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -6972,6 +8070,312 @@ "node": ">=4.0.0" } }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/eslint/node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/eslint/node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint/node_modules/semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -6984,6 +8388,27 @@ "node": ">=4" } }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -7319,9 +8744,9 @@ ] }, "node_modules/fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { "version": "3.2.5", @@ -7340,9 +8765,15 @@ } }, "node_modules/fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "node_modules/fastparse": { "version": "1.1.2", @@ -7385,6 +8816,18 @@ "node": ">=8" } }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, "node_modules/file-loader": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", @@ -7397,17 +8840,6 @@ "node": ">= 10.13.0" } }, - "node_modules/file-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/file-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -7429,25 +8861,6 @@ "node": ">= 4" } }, - "node_modules/file-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/file-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/file-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -7532,6 +8945,40 @@ "node": ">=6" } }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache/node_modules/flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/flatpickr": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.3.tgz", @@ -7697,6 +9144,12 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "node_modules/fuse.js": { "version": "3.4.5", "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-3.4.5.tgz", @@ -7789,6 +9242,15 @@ "has-symbols": "^1.0.1" } }, + "node_modules/get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -7817,9 +9279,9 @@ } }, "node_modules/glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -7830,6 +9292,9 @@ }, "engines": { "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/glob-parent": { @@ -7905,22 +9370,6 @@ "node": ">=6" } }, - "node_modules/har-validator/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "node_modules/har-validator/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -8960,6 +10409,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-svg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", @@ -9294,6 +10755,19 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "node_modules/jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "dev": true, + "peer": true, + "bin": { + "jsdoctypeparser": "bin/jsdoctypeparser" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -9325,6 +10799,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "node_modules/json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -9336,11 +10816,11 @@ "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==" }, "node_modules/json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "dependencies": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" }, "bin": { "json5": "lib/cli.js" @@ -9610,23 +11090,6 @@ "node": ">=8" } }, - "node_modules/karma/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/karma/node_modules/graceful-fs": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", @@ -9819,17 +11282,6 @@ "node": ">= 10.13.0" } }, - "node_modules/less-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/less-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -9851,25 +11303,6 @@ "node": ">= 4" } }, - "node_modules/less-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/less-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/less-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -9910,6 +11343,19 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/license-webpack-plugin": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.3.11.tgz", @@ -9941,6 +11387,42 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, + "node_modules/load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "dependencies": { + "error-ex": "^1.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/load-json-file/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/loader-runner": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", @@ -9983,9 +11465,9 @@ } }, "node_modules/lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "node_modules/lodash-es": { "version": "4.17.15", @@ -10411,17 +11893,6 @@ "node": ">= 10.13.0" } }, - "node_modules/mini-css-extract-plugin/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -10443,25 +11914,6 @@ "node": ">= 4" } }, - "node_modules/mini-css-extract-plugin/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/mini-css-extract-plugin/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/mini-css-extract-plugin/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -10784,6 +12236,12 @@ "node": ">=0.10.0" } }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "node_modules/needle": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz", @@ -11026,6 +12484,24 @@ "node": ">=6" } }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -11132,22 +12608,6 @@ "node": ">=10" } }, - "node_modules/npm-packlist/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/npm-pick-manifest": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-6.1.0.tgz", @@ -11334,6 +12794,21 @@ "node": ">= 0.4" } }, + "node_modules/object.entries": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.3.tgz", + "integrity": "sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/object.getownpropertydescriptors": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", @@ -11473,6 +12948,23 @@ "node": ">=4" } }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/ora": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ora/-/ora-5.3.0.tgz", @@ -12631,6 +14123,15 @@ "resolved": "https://registry.npmjs.org/preact/-/preact-10.5.9.tgz", "integrity": "sha512-X4m+4VMVINl/JFQKALOCwa3p8vhMAhBvle0hJ/W44w/WWfNb2TA7RNicDV3K2dNVs57f61GviEnVLiwN+fxiIg==" }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -12652,6 +14153,15 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -12916,17 +14426,6 @@ "node": ">= 10.13.0" } }, - "node_modules/raw-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/raw-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -12948,25 +14447,6 @@ "node": ">= 4" } }, - "node_modules/raw-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/raw-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/raw-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -13026,6 +14506,112 @@ "npm-normalize-package-bin": "^1.0.1" } }, + "node_modules/read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "dependencies": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg/node_modules/path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "dependencies": { + "pify": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg/node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -13114,6 +14700,18 @@ "node": ">= 0.4" } }, + "node_modules/regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, "node_modules/regexpu-core": { "version": "4.7.1", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", @@ -13130,6 +14728,16 @@ "node": ">=4" } }, + "node_modules/regextras": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.1.14" + } + }, "node_modules/regjsgen": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", @@ -13221,6 +14829,15 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -13232,9 +14849,16 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/resolve-cwd": { "version": "2.0.0", @@ -13600,17 +15224,6 @@ "node": ">= 10.13.0" } }, - "node_modules/sass-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/sass-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -13632,25 +15245,6 @@ "node": ">= 4" } }, - "node_modules/sass-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/sass-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/sass-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -13941,6 +15535,56 @@ "node": ">=8" } }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "node_modules/smart-buffer": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", @@ -14323,17 +15967,6 @@ "node": ">= 10.13.0" } }, - "node_modules/source-map-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/source-map-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -14355,11 +15988,6 @@ "node": ">= 4" } }, - "node_modules/source-map-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "node_modules/source-map-loader/node_modules/iconv-lite": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", @@ -14371,20 +15999,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/source-map-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -14455,6 +16069,38 @@ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", + "dev": true + }, "node_modules/spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", @@ -14807,6 +16453,15 @@ "node": ">=8" } }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", @@ -14815,6 +16470,18 @@ "node": ">=0.10.0" } }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/style-loader": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz", @@ -14827,17 +16494,6 @@ "node": ">= 10.13.0" } }, - "node_modules/style-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/style-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -14859,25 +16515,6 @@ "node": ">= 4" } }, - "node_modules/style-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/style-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/style-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -14966,17 +16603,6 @@ "node": ">= 10.13.0" } }, - "node_modules/stylus-loader/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/stylus-loader/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -14998,25 +16624,6 @@ "node": ">= 4" } }, - "node_modules/stylus-loader/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "node_modules/stylus-loader/node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, "node_modules/stylus-loader/node_modules/loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -15051,22 +16658,6 @@ "ms": "2.0.0" } }, - "node_modules/stylus/node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, "node_modules/stylus/node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -15131,6 +16722,43 @@ "node": ">=0.10" } }, + "node_modules/table": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "dev": true, + "dependencies": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.1.tgz", + "integrity": "sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, "node_modules/tablesorter": { "version": "2.31.3", "resolved": "https://registry.npmjs.org/tablesorter/-/tablesorter-2.31.3.tgz", @@ -15217,27 +16845,11 @@ "node": ">= 10.13.0" } }, - "node_modules/terser-webpack-plugin/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/terser-webpack-plugin/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" }, - "node_modules/terser-webpack-plugin/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "node_modules/terser-webpack-plugin/node_modules/find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -15586,15 +17198,40 @@ "node": ">=6" } }, + "node_modules/tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, "node_modules/tslib": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" }, "node_modules/tslint": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.0.tgz", - "integrity": "sha512-fXjYd/61vU6da04E505OZQGb2VCN2Mq3doeWcOIryuG+eqdmFUXTYVwdhnbEu2k46LNLgUYt9bI5icQze/j0bQ==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", "dev": true, "dependencies": { "@babel/code-frame": "^7.0.0", @@ -15605,10 +17242,10 @@ "glob": "^7.1.1", "js-yaml": "^3.13.1", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "mkdirp": "^0.5.3", "resolve": "^1.3.2", "semver": "^5.3.0", - "tslib": "^1.10.0", + "tslib": "^1.13.0", "tsutils": "^2.29.0" }, "bin": { @@ -15616,21 +17253,137 @@ }, "engines": { "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" } }, - "node_modules/tslint/node_modules/resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "node_modules/tslint-to-eslint-config": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslint-to-eslint-config/-/tslint-to-eslint-config-2.0.1.tgz", + "integrity": "sha512-RURU/zcBQpW9jKS7H2J6of4+64npTb0nrH7ND8tNhagMwryVjVnUDcucsl8DQuD7tO9RgjFO9bmJfDhyP0yV1w==", "dev": true, "dependencies": { - "path-parse": "^1.0.6" + "chalk": "4.1.0", + "commander": "6.2.0", + "cson-parser": "4.0.7", + "eslint-config-prettier": "6.15.0", + "glob": "7.1.6", + "json5": "2.1.3", + "lodash": "4.17.20", + "minimatch": "3.0.4", + "tslint": "6.1.3", + "typescript": "4.1.2" + }, + "bin": { + "tslint-to-eslint-config": "bin/tslint-to-eslint-config" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/tslint-to-eslint-config/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tslint-to-eslint-config/node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/tslint-to-eslint-config/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tslint-to-eslint-config/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/tslint-to-eslint-config/node_modules/commander": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/tslint-to-eslint-config/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/tslint-to-eslint-config/node_modules/lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "node_modules/tslint-to-eslint-config/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tslint-to-eslint-config/node_modules/typescript": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz", + "integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" } }, "node_modules/tslint/node_modules/tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "node_modules/tsutils": { @@ -15640,12 +17393,15 @@ "dev": true, "dependencies": { "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" } }, "node_modules/tsutils/node_modules/tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, "node_modules/tty-browserify": { @@ -15669,6 +17425,18 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, "node_modules/type-fest": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", @@ -16030,6 +17798,22 @@ "uuid": "bin/uuid" } }, + "node_modules/v8-compile-cache": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", + "dev": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/validate-npm-package-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", @@ -16834,17 +18618,6 @@ "source-map": "~0.6.1" } }, - "node_modules/webpack/node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "node_modules/webpack/node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -16944,11 +18717,6 @@ "node": ">=4.3.0 <5.0.0 || >=5.10" } }, - "node_modules/webpack/node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "node_modules/webpack/node_modules/fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -17230,6 +18998,15 @@ "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/worker-farm": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", @@ -17478,18 +19255,36 @@ }, "dependencies": { "@angular-devkit/architect": { - "version": "0.1102.2", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.2.tgz", - "integrity": "sha512-FE7DeT13elqDlELF23QqvEFnT2BkxeC5t31/QW85IN/OR5Tf/q7XEpj7giJXyzKFQ60M3ZzbznZyRz0EqtfaBQ==", + "version": "0.1100.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1100.7.tgz", + "integrity": "sha512-b2zv2yiRbdhJ7hJfZsAvGYcqgh2DVtc7gRIPo1eDPvOAKrenmZ4zo/v0PRYScrTsPzqmoCokNA5nIwufwUEnuA==", + "dev": true, + "peer": true, "requires": { - "@angular-devkit/core": "11.2.2", + "@angular-devkit/core": "11.0.7", "rxjs": "6.6.3" }, "dependencies": { + "@angular-devkit/core": { + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-11.0.7.tgz", + "integrity": "sha512-1GKnIT++YSUHpzzRx9QC0+8yOw4wy+ZpiJVDlroPSeK4FGrTCJqJKenkfRjVFRFOSrzTiJds+IU6kI4+bFbw9g==", + "dev": true, + "peer": true, + "requires": { + "ajv": "6.12.6", + "fast-json-stable-stringify": "2.1.0", + "magic-string": "0.25.7", + "rxjs": "6.6.3", + "source-map": "0.7.3" + } + }, "rxjs": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "dev": true, + "peer": true, "requires": { "tslib": "^1.9.0" } @@ -17497,7 +19292,9 @@ "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "peer": true } } }, @@ -17580,15 +19377,13 @@ "worker-plugin": "5.0.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "@angular-devkit/architect": { + "version": "0.1102.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.2.tgz", + "integrity": "sha512-FE7DeT13elqDlELF23QqvEFnT2BkxeC5t31/QW85IN/OR5Tf/q7XEpj7giJXyzKFQ60M3ZzbznZyRz0EqtfaBQ==", "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" + "@angular-devkit/core": "11.2.2", + "rxjs": "6.6.3" } }, "ajv-keywords": { @@ -17665,11 +19460,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -17689,19 +19479,6 @@ "path-exists": "^4.0.0" } }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "import-fresh": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", @@ -17711,14 +19488,6 @@ "resolve-from": "^4.0.0" } }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -17907,14 +19676,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -17947,6 +19708,15 @@ "rxjs": "6.6.3" }, "dependencies": { + "@angular-devkit/architect": { + "version": "0.1102.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.2.tgz", + "integrity": "sha512-FE7DeT13elqDlELF23QqvEFnT2BkxeC5t31/QW85IN/OR5Tf/q7XEpj7giJXyzKFQ60M3ZzbznZyRz0EqtfaBQ==", + "requires": { + "@angular-devkit/core": "11.2.2", + "rxjs": "6.6.3" + } + }, "rxjs": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", @@ -17974,27 +19744,6 @@ "source-map": "0.7.3" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, "rxjs": { "version": "6.6.3", "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", @@ -18035,6 +19784,296 @@ } } }, + "@angular-eslint/builder": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-1.2.0.tgz", + "integrity": "sha512-bYIut4edOq/RWyYsi3Z5NW/wEHSGLpjXfQ38zbdRlsX93+N8nAu1hf5ishbnpkEobEyerktoRVmRI8UXPsijjg==", + "dev": true, + "requires": {} + }, + "@angular-eslint/eslint-plugin": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-1.2.0.tgz", + "integrity": "sha512-HxSDdAS2/lbwYBJmRVRKlx5wjiKdeBPl7JJlciwhrP7QR01a66AWun+fW1ZpMnnqivkF+D5sISsoedRLthRcwA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.3.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.3.0.tgz", + "integrity": "sha512-cmmIK8shn3mxmhpKfzMMywqiEheyfXLV/+yPDnOTvQX/ztngx7Lg/OD26J8gTZfkLKUmaEBxO2jYP3keV7h2OQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.3.0", + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/typescript-estree": "4.3.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.3.0.tgz", + "integrity": "sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0" + } + }, + "@typescript-eslint/types": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.3.0.tgz", + "integrity": "sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.3.0.tgz", + "integrity": "sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz", + "integrity": "sha512-xZxkuR7XLM6RhvLkgv9yYlTcBHnTULzfnw4i6+z2TGBLy9yljAypQaZl9c3zFvy7PNI7fYWyvKYtohyF8au3cw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", + "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@angular-eslint/eslint-plugin-template": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-1.2.0.tgz", + "integrity": "sha512-Oi/y+N/FETuyhbVuFxbkCqSfLo61CAvIPwnQQCfDku/IsCSTI1SjW+B2xO9thDI5po7t5V+3n26uMLQsWNZmlw==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.3.0", + "aria-query": "^4.2.2", + "axobject-query": "^2.2.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.3.0.tgz", + "integrity": "sha512-cmmIK8shn3mxmhpKfzMMywqiEheyfXLV/+yPDnOTvQX/ztngx7Lg/OD26J8gTZfkLKUmaEBxO2jYP3keV7h2OQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.3.0", + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/typescript-estree": "4.3.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.3.0.tgz", + "integrity": "sha512-cTeyP5SCNE8QBRfc+Lgh4Xpzje46kNUhXYfc3pQWmJif92sjrFuHT9hH4rtOkDTo/si9Klw53yIr+djqGZS1ig==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0" + } + }, + "@typescript-eslint/types": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.3.0.tgz", + "integrity": "sha512-Cx9TpRvlRjOppGsU6Y6KcJnUDOelja2NNCX6AZwtVHRzaJkdytJWMuYiqi8mS35MRNA3cJSwDzXePfmhU6TANw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.3.0.tgz", + "integrity": "sha512-ZAI7xjkl+oFdLV/COEz2tAbQbR3XfgqHEGy0rlUXzfGQic6EBCR4s2+WS3cmTPG69aaZckEucBoTxW9PhzHxxw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "@typescript-eslint/visitor-keys": "4.3.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.3.0.tgz", + "integrity": "sha512-xZxkuR7XLM6RhvLkgv9yYlTcBHnTULzfnw4i6+z2TGBLy9yljAypQaZl9c3zFvy7PNI7fYWyvKYtohyF8au3cw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.3.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "aria-query": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz", + "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==", + "dev": true, + "requires": { + "@babel/runtime": "^7.10.2", + "@babel/runtime-corejs3": "^7.10.2" + } + }, + "axobject-query": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz", + "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==", + "dev": true + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", + "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@angular-eslint/schematics": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-1.2.0.tgz", + "integrity": "sha512-F0Mb6XyLWGmmtov5kv/BHvt22Uo/FuD4y2WhO7NUA9rZRJd+anmyHCkC9HXmNKUuLQIUKjJ4DJgsmD0Kh0Hr2g==", + "dev": true, + "requires": { + "@angular-eslint/eslint-plugin": "1.2.0", + "@angular-eslint/eslint-plugin-template": "1.2.0", + "strip-json-comments": "3.1.1", + "tslint-to-eslint-config": "2.0.1" + } + }, + "@angular-eslint/template-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-1.2.0.tgz", + "integrity": "sha512-EfNJh0nFGJInHa2ccVw8Eb9ujWoUAwaQMCi9GppzYrqhSPc0YZqdQg4eIW2AlZs1giHD2Ko/V1rphzw+9gisCw==", + "dev": true, + "requires": { + "eslint-scope": "^5.1.0" + }, + "dependencies": { + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + } + } + }, "@angular/animations": { "version": "11.2.3", "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-11.2.3.tgz", @@ -18089,6 +20128,15 @@ "uuid": "8.3.2" }, "dependencies": { + "@angular-devkit/architect": { + "version": "0.1102.2", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1102.2.tgz", + "integrity": "sha512-FE7DeT13elqDlELF23QqvEFnT2BkxeC5t31/QW85IN/OR5Tf/q7XEpj7giJXyzKFQ60M3ZzbznZyRz0EqtfaBQ==", + "requires": { + "@angular-devkit/core": "11.2.2", + "rxjs": "6.6.3" + } + }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -18119,6 +20167,14 @@ "glob": "^7.1.3" } }, + "rxjs": { + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.3.tgz", + "integrity": "sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ==", + "requires": { + "tslib": "^1.9.0" + } + }, "semver": { "version": "7.3.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", @@ -18127,6 +20183,11 @@ "lru-cache": "^6.0.0" } }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "uuid": { "version": "8.3.2", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", @@ -18306,11 +20367,11 @@ } }, "@babel/code-frame": { - "version": "7.5.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz", - "integrity": "sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw==", + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", "requires": { - "@babel/highlight": "^7.0.0" + "@babel/highlight": "^7.10.4" } }, "@babel/compat-data": { @@ -18340,24 +20401,6 @@ "source-map": "^0.5.0" }, "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "requires": { - "@babel/highlight": "^7.12.13" - } - }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -18366,14 +20409,6 @@ "ms": "2.1.2" } }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -18512,16 +20547,6 @@ "@babel/highlight": "^7.12.13" } }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -18591,16 +20616,6 @@ "@babel/highlight": "^7.12.13" } }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -18700,16 +20715,6 @@ "@babel/highlight": "^7.12.13" } }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -18740,16 +20745,6 @@ "@babel/highlight": "^7.12.13" } }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "@babel/template": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.13.tgz", @@ -18763,20 +20758,13 @@ } }, "@babel/highlight": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz", - "integrity": "sha512-7dV4eu9gBxoM0dAnj/BCFDW9LFU0zvTrkq0ugM7pnHEgguOEeOz1so2ZghEdzviYzQEED0r4EAgpsBChKy1TRQ==", + "version": "7.13.8", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.8.tgz", + "integrity": "sha512-4vrIhfJyfNf+lCtXC2ck1rKSzDwciqF7IWFhXXrSOUC2O5DrVp+w4c6ed4AllTxhTkUP5x2tYj41VaxdVMMRDw==", "requires": { + "@babel/helper-validator-identifier": "^7.12.11", "chalk": "^2.0.0", - "esutils": "^2.0.2", "js-tokens": "^4.0.0" - }, - "dependencies": { - "js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" - } } }, "@babel/parser": { @@ -19383,6 +21371,16 @@ "regenerator-runtime": "^0.13.4" } }, + "@babel/runtime-corejs3": { + "version": "7.13.9", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.13.9.tgz", + "integrity": "sha512-p6WSr71+5u/VBf1KDS/Y4dK3ZwbV+DD6wQO3X2EbUVluEOiyXUk09DzcwSaUH4WomYXrEPC+i2rqzuthhZhOJw==", + "dev": true, + "requires": { + "core-js-pure": "^3.0.0", + "regenerator-runtime": "^0.13.4" + } + }, "@babel/template": { "version": "7.12.7", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", @@ -19391,26 +21389,6 @@ "@babel/code-frame": "^7.10.4", "@babel/parser": "^7.12.7", "@babel/types": "^7.12.7" - }, - "dependencies": { - "@babel/code-frame": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.13.tgz", - "integrity": "sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==", - "requires": { - "@babel/highlight": "^7.12.13" - } - }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - } } }, "@babel/traverse": { @@ -19447,16 +21425,6 @@ "source-map": "^0.5.0" } }, - "@babel/highlight": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.12.13.tgz", - "integrity": "sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==", - "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - } - }, "debug": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", @@ -19487,6 +21455,77 @@ "to-fast-properties": "^2.0.0" } }, + "@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, "@fullcalendar/angular": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/@fullcalendar/angular/-/angular-5.5.0.tgz", @@ -19495,13 +21534,6 @@ "@fullcalendar/core": "~5.5.0", "fast-deep-equal": "^3.1.1", "tslib": "^2.0.0" - }, - "dependencies": { - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - } } }, "@fullcalendar/common": { @@ -19603,17 +21635,6 @@ "schema-utils": "^2.7.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -19629,19 +21650,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -20044,6 +22052,12 @@ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", "integrity": "sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA==" }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "dev": true + }, "@types/lodash": { "version": "4.14.149", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.149.tgz", @@ -20137,6 +22151,200 @@ } } }, + "@typescript-eslint/eslint-plugin": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.16.1.tgz", + "integrity": "sha512-SK777klBdlkUZpZLC1mPvyOWk9yAFCWmug13eAjVQ4/Q1LATE/NbcQL1xDHkptQkZOLnPmLUA1Y54m8dqYwnoQ==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.16.1", + "@typescript-eslint/scope-manager": "4.16.1", + "debug": "^4.1.1", + "functional-red-black-tree": "^1.0.1", + "lodash": "^4.17.15", + "regexpp": "^3.0.0", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", + "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.16.1.tgz", + "integrity": "sha512-0Hm3LSlMYFK17jO4iY3un1Ve9x1zLNn4EM50Lia+0EV99NdbK+cn0er7HC7IvBA23mBg3P+8dUkMXy4leL33UQ==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.16.1", + "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/typescript-estree": "4.16.1", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + }, + "dependencies": { + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + } + } + }, + "@typescript-eslint/parser": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.16.1.tgz", + "integrity": "sha512-/c0LEZcDL5y8RyI1zLcmZMvJrsR6SM1uetskFkoh3dvqDKVXPsXI+wFB/CbVw7WkEyyTKobC1mUNp/5y6gRvXg==", + "dev": true, + "requires": { + "@typescript-eslint/scope-manager": "4.16.1", + "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/typescript-estree": "4.16.1", + "debug": "^4.1.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "@typescript-eslint/scope-manager": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.16.1.tgz", + "integrity": "sha512-6IlZv9JaurqV0jkEg923cV49aAn8V6+1H1DRfhRcvZUrptQ+UtSKHb5kwTayzOYTJJ/RsYZdcvhOEKiBLyc0Cw==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/visitor-keys": "4.16.1" + } + }, + "@typescript-eslint/types": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.16.1.tgz", + "integrity": "sha512-nnKqBwMgRlhzmJQF8tnFDZWfunXmJyuXj55xc8Kbfup4PbkzdoDXZvzN8//EiKR27J6vUSU8j4t37yUuYPiLqA==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.16.1.tgz", + "integrity": "sha512-m8I/DKHa8YbeHt31T+UGd/l8Kwr0XCTCZL3H4HMvvLCT7HU9V7yYdinTOv1gf/zfqNeDcCgaFH2BMsS8x6NvJg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.16.1", + "@typescript-eslint/visitor-keys": "4.16.1", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tsutils": { + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.20.0.tgz", + "integrity": "sha512-RYbuQuvkhuqVeXweWT3tJLKOEJ/UUw9GjNEZGWdrLLlM+611o1gwLHBpxoFJKKl25fLprp2eVthtKs5JOrNeXg==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.16.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.16.1.tgz", + "integrity": "sha512-s/aIP1XcMkEqCNcPQtl60ogUYjSM8FU2mq1O7y5cFf3Xcob1z1iXWNB6cC43Op+NGRTFgGolri6s8z/efA9i1w==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.16.1", + "eslint-visitor-keys": "^2.0.0" + } + }, "@uirouter/angular": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@uirouter/angular/-/angular-8.0.0.tgz", @@ -20379,6 +22587,13 @@ "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true, + "requires": {} + }, "adjust-sourcemap-loader": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-3.0.0.tgz", @@ -20398,14 +22613,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -20482,11 +22689,11 @@ } }, "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "requires": { - "fast-deep-equal": "^2.0.1", + "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.4.1", "uri-js": "^4.2.2" @@ -20626,6 +22833,19 @@ "resolved": "https://registry.npmjs.org/array-from/-/array-from-2.1.1.tgz", "integrity": "sha1-z+nYwmYoudxa7MYqn12PHzUsEZU=" }, + "array-includes": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.5" + } + }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -20641,6 +22861,17 @@ "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, + "array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + } + }, "arraybuffer.slice": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz", @@ -20713,6 +22944,12 @@ "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0=", "dev": true }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -20827,17 +23064,6 @@ "schema-utils": "^2.6.5" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -20853,11 +23079,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -21778,6 +23999,12 @@ "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.48.4.tgz", "integrity": "sha512-pUhZXDQ6qXSpWdwlgAwHEkd4imA0kf83hINmUEzJpmG80T/XLtDDEzZo8f6PQLuRCcUQhmzqqIo3ZPTRaWByRA==" }, + "coffeescript": { + "version": "1.12.7", + "resolved": "https://registry.npmjs.org/coffeescript/-/coffeescript-1.12.7.tgz", + "integrity": "sha512-pLXHFxQMPklVoEekowk8b3erNynC+DVJzChxS/LCBBgR6/8AJkHivkm//zbowcfc7BTCAjryuhx6gPqPRfsFoA==", + "dev": true + }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", @@ -21842,6 +24069,13 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, + "comment-parser": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.2.tgz", + "integrity": "sha512-AOdq0i8ghZudnYv8RUnHrhTgafUGs61Rdz9jemU5x2lnZwAWyOq7vySo626K59e1fVKH1xSRorJwPVRLSWOoAQ==", + "dev": true, + "peer": true + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -21910,6 +24144,12 @@ "typedarray": "^0.0.6" } }, + "confusing-browser-globals": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz", + "integrity": "sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==", + "dev": true + }, "connect": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", @@ -21942,6 +24182,12 @@ "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, "content-disposition": { "version": "0.5.3", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz", @@ -22027,17 +24273,6 @@ "webpack-sources": "^1.4.3" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -22053,11 +24288,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -22077,14 +24307,6 @@ "path-exists": "^4.0.0" } }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -22237,6 +24459,12 @@ } } }, + "core-js-pure": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.9.1.tgz", + "integrity": "sha512-laz3Zx0avrw9a4QEIdmIblnVuJz8W51leY9iLThatCsFawWxC3sE4guASC78JbCin+DkwMpCdp1AVAuzL/GN7A==", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -22386,6 +24614,15 @@ "randomfill": "^1.0.3" } }, + "cson-parser": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/cson-parser/-/cson-parser-4.0.7.tgz", + "integrity": "sha512-BSnAl0gllETWjU9/lb8MmeqhsGaRINPwhoPiBjI/TJBRvKf/24I9EVqnwvmk6R3Gt66cMRSGVktl6QicxIb72g==", + "dev": true, + "requires": { + "coffeescript": "1.12.7" + } + }, "css": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz", @@ -22441,17 +24678,6 @@ "semver": "^7.3.2" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -22467,19 +24693,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -22811,6 +25024,12 @@ "regexp.prototype.flags": "^1.2.0" } }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "default-gateway": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-4.2.0.tgz", @@ -23019,6 +25238,15 @@ "buffer-indexof": "^1.0.0" } }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dom-autoscroller": { "version": "2.3.4", "resolved": "https://registry.npmjs.org/dom-autoscroller/-/dom-autoscroller-2.3.4.tgz", @@ -23323,6 +25551,15 @@ } } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, "ent": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz", @@ -23487,6 +25724,394 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "eslint": { + "version": "7.21.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.21.0.tgz", + "integrity": "sha512-W2aJbXpMNofUp0ztQaF40fveSsJBjlSCSWpy//gzfTvwC+USs/nceBrKmlJOiM8r1bLwP2EuYkCqArn/6QTIgg==", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.20", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "eslint-config-airbnb-base": { + "version": "14.2.1", + "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz", + "integrity": "sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==", + "dev": true, + "requires": { + "confusing-browser-globals": "^1.0.10", + "object.assign": "^4.1.2", + "object.entries": "^1.1.2" + } + }, + "eslint-config-prettier": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", + "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", + "dev": true, + "requires": { + "get-stdin": "^6.0.0" + } + }, + "eslint-import-resolver-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + } + }, + "eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "dev": true, + "requires": { + "array-includes": "^3.1.1", + "array.prototype.flat": "^1.2.3", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-module-utils": "^2.6.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.1", + "read-pkg-up": "^2.0.0", + "resolve": "^1.17.0", + "tsconfig-paths": "^3.9.0" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + } + } + }, + "eslint-plugin-jsdoc": { + "version": "32.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.2.0.tgz", + "integrity": "sha512-ikeVeF3JVmzjcmGd04OZK0rXjgiw46TWtNX+OhyF2jQlw3w1CAU1vyAyLv8PZcIjp7WxP4N20Vg1CI9bp/52dw==", + "dev": true, + "peer": true, + "requires": { + "comment-parser": "1.1.2", + "debug": "^4.3.1", + "jsdoctypeparser": "^9.0.0", + "lodash": "^4.17.20", + "regextras": "^0.7.1", + "semver": "^7.3.4", + "spdx-expression-parse": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "peer": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "peer": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "peer": true, + "requires": { + "lru-cache": "^6.0.0" + } + } + } + }, + "eslint-plugin-prefer-arrow": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.3.tgz", + "integrity": "sha512-J9I5PKCOJretVuiZRGvPQxCbllxGAV/viI20JO3LYblAodofBxyMnZAJ+WGeClHgANnSJberTNoFWWjrWKBuXQ==", + "dev": true, + "peer": true, + "requires": {} + }, "eslint-scope": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", @@ -23496,11 +26121,76 @@ "estraverse": "^4.1.1" } }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, "esrecurse": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", @@ -23776,9 +26466,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-glob": { "version": "3.2.5", @@ -23794,9 +26484,15 @@ } }, "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true }, "fastparse": { "version": "1.1.2", @@ -23833,6 +26529,15 @@ "escape-string-regexp": "^1.0.5" } }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "file-loader": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", @@ -23842,17 +26547,6 @@ "schema-utils": "^3.0.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -23868,19 +26562,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -23949,6 +26630,33 @@ "locate-path": "^3.0.0" } }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "dependencies": { + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, "flatpickr": { "version": "4.6.3", "resolved": "https://registry.npmjs.org/flatpickr/-/flatpickr-4.6.3.tgz", @@ -24080,6 +26788,12 @@ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "fuse.js": { "version": "3.4.5", "resolved": "https://registry.npmjs.org/fuse.js/-/fuse.js-3.4.5.tgz", @@ -24153,6 +26867,12 @@ "has-symbols": "^1.0.1" } }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -24175,9 +26895,9 @@ } }, "glob": { - "version": "7.1.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", - "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -24240,24 +26960,6 @@ "requires": { "ajv": "^6.12.3", "har-schema": "^2.0.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - } } }, "has": { @@ -25103,6 +27805,12 @@ "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, "is-svg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", @@ -25372,6 +28080,13 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "dev": true, + "peer": true + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -25397,6 +28112,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -25408,11 +28129,11 @@ "integrity": "sha512-c7/8mbUsKigAbLkD5B010BK4D9LZm7A1pNItkEwiUZRpIN66exu/e7YQWysGun+TRKaJp8MhemM+VkfWv42aCA==" }, "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", "requires": { - "minimist": "^1.2.0" + "minimist": "^1.2.5" }, "dependencies": { "minimist": { @@ -25534,20 +28255,6 @@ "path-exists": "^4.0.0" } }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "graceful-fs": { "version": "4.2.6", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", @@ -25798,17 +28505,6 @@ "schema-utils": "^3.0.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -25824,19 +28520,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -25859,6 +28542,16 @@ } } }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, "license-webpack-plugin": { "version": "2.3.11", "resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-2.3.11.tgz", @@ -25889,6 +28582,35 @@ "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, "loader-runner": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz", @@ -25921,9 +28643,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash-es": { "version": "4.17.15", @@ -26276,17 +28998,6 @@ "webpack-sources": "^1.1.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -26302,19 +29013,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -26578,6 +29276,12 @@ "to-regex": "^3.0.1" } }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "needle": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz", @@ -26787,6 +29491,26 @@ "abbrev": "1" } }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + } + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -26862,21 +29586,6 @@ "ignore-walk": "^3.0.3", "npm-bundled": "^1.1.1", "npm-normalize-package-bin": "^1.0.1" - }, - "dependencies": { - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } } }, "npm-pick-manifest": { @@ -27027,6 +29736,18 @@ "object-keys": "^1.1.1" } }, + "object.entries": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.3.tgz", + "integrity": "sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1", + "has": "^1.0.3" + } + }, "object.getownpropertydescriptors": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz", @@ -27141,6 +29862,20 @@ "is-wsl": "^1.1.0" } }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, "ora": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/ora/-/ora-5.3.0.tgz", @@ -28110,6 +30845,12 @@ "resolved": "https://registry.npmjs.org/preact/-/preact-10.5.9.tgz", "integrity": "sha512-X4m+4VMVINl/JFQKALOCwa3p8vhMAhBvle0hJ/W44w/WWfNb2TA7RNicDV3K2dNVs57f61GviEnVLiwN+fxiIg==" }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, "pretty-bytes": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", @@ -28125,6 +30866,12 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "promise-inflight": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", @@ -28345,17 +31092,6 @@ "schema-utils": "^3.0.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -28371,19 +31107,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -28438,6 +31161,89 @@ "npm-normalize-package-bin": "^1.0.1" } }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "dependencies": { + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + } + } + }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", @@ -28514,6 +31320,12 @@ "define-properties": "^1.1.3" } }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, "regexpu-core": { "version": "4.7.1", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", @@ -28527,6 +31339,13 @@ "unicode-match-property-value-ecmascript": "^1.2.0" } }, + "regextras": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", + "dev": true, + "peer": true + }, "regjsgen": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", @@ -28601,6 +31420,12 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", @@ -28612,9 +31437,13 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" }, "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=" + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } }, "resolve-cwd": { "version": "2.0.0", @@ -28912,17 +31741,6 @@ "semver": "^7.3.2" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -28938,19 +31756,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -29197,6 +32002,43 @@ "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + } + } + }, "smart-buffer": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz", @@ -29540,17 +32382,6 @@ "whatwg-mimetype": "^2.3.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -29566,11 +32397,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "iconv-lite": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", @@ -29579,14 +32405,6 @@ "safer-buffer": ">= 2.1.2 < 3.0.0" } }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -29649,6 +32467,38 @@ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==" }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", + "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==", + "dev": true + }, "spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", @@ -29946,11 +32796,23 @@ "ansi-regex": "^5.0.0" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, "style-loader": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-2.0.0.tgz", @@ -29960,17 +32822,6 @@ "schema-utils": "^3.0.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -29986,19 +32837,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -30066,19 +32904,6 @@ "ms": "2.0.0" } }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -30103,17 +32928,6 @@ "schema-utils": "^3.0.0" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -30129,19 +32943,6 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "requires": { - "minimist": "^1.2.5" - } - }, "loader-utils": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", @@ -30197,6 +32998,38 @@ "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-3.0.0.tgz", "integrity": "sha512-6tDOXSHiVjuCaasQSWTmHUWn4PuG7qa3+1WT031yTc/swT7+rLiw3GOrFxaH1E3lLP09dH3bVuVDf2gK5rxG3Q==" }, + "table": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "dev": true, + "requires": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ajv": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.1.tgz", + "integrity": "sha512-ga/aqDYnUy/o7vbsRTFhhTsNeXiYb5JWDIcRIeZfwRNCefwjNTVYCGdGSUrEmiu3yDK3vFvNbgJxvrQW4JXrYQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, "tablesorter": { "version": "2.31.3", "resolved": "https://registry.npmjs.org/tablesorter/-/tablesorter-2.31.3.tgz", @@ -30279,27 +33112,11 @@ "webpack-sources": "^1.4.3" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "find-cache-dir": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", @@ -30562,15 +33379,38 @@ "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz", "integrity": "sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==" }, + "tsconfig-paths": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", + "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + } + } + }, "tslib": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==" }, "tslint": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.0.tgz", - "integrity": "sha512-fXjYd/61vU6da04E505OZQGb2VCN2Mq3doeWcOIryuG+eqdmFUXTYVwdhnbEu2k46LNLgUYt9bI5icQze/j0bQ==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -30581,26 +33421,104 @@ "glob": "^7.1.1", "js-yaml": "^3.13.1", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "mkdirp": "^0.5.3", "resolve": "^1.3.2", "semver": "^5.3.0", - "tslib": "^1.10.0", + "tslib": "^1.13.0", "tsutils": "^2.29.0" }, "dependencies": { - "resolve": { - "version": "1.15.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", - "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + } + } + }, + "tslint-to-eslint-config": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/tslint-to-eslint-config/-/tslint-to-eslint-config-2.0.1.tgz", + "integrity": "sha512-RURU/zcBQpW9jKS7H2J6of4+64npTb0nrH7ND8tNhagMwryVjVnUDcucsl8DQuD7tO9RgjFO9bmJfDhyP0yV1w==", + "dev": true, + "requires": { + "chalk": "4.1.0", + "commander": "6.2.0", + "cson-parser": "4.0.7", + "eslint-config-prettier": "6.15.0", + "glob": "7.1.6", + "json5": "2.1.3", + "lodash": "4.17.20", + "minimatch": "3.0.4", + "tslint": "6.1.3", + "typescript": "4.1.2" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "path-parse": "^1.0.6" + "color-convert": "^2.0.1" } }, - "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "commander": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", + "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", + "dev": true + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "typescript": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.2.tgz", + "integrity": "sha512-thGloWsGH3SOxv1SoY7QojKi0tc+8FnOmiarEGMbd/lar7QOEd3hvlx3Fp5y6FlDUGl9L+pd4n2e+oToGMmhRQ==", "dev": true } } @@ -30615,9 +33533,9 @@ }, "dependencies": { "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true } } @@ -30640,6 +33558,15 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, "type-fest": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", @@ -30939,6 +33866,22 @@ "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" }, + "v8-compile-cache": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", + "dev": true + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "validate-npm-package-name": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz", @@ -31247,17 +34190,6 @@ "webpack-sources": "^1.4.1" }, "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -31343,11 +34275,6 @@ } } }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -31940,6 +34867,12 @@ "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "worker-farm": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/worker-farm/-/worker-farm-1.7.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index aaec0fac669..c2a449ceb5a 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -5,10 +5,20 @@ "version": "0.1.0", "private": true, "devDependencies": { + "@angular-eslint/builder": "1.2.0", + "@angular-eslint/eslint-plugin": "1.2.0", + "@angular-eslint/eslint-plugin-template": "1.2.0", + "@angular-eslint/schematics": "1.2.0", + "@angular-eslint/template-parser": "1.2.0", "@angular/language-service": "11.2.3", "@jsdevtools/coverage-istanbul-loader": "3.0.5", "@types/jasmine": "~3.6.0", + "@typescript-eslint/eslint-plugin": "^4.16.1", + "@typescript-eslint/parser": "^4.16.1", "codelyzer": "^6.0.0", + "eslint": "^7.21.0", + "eslint-config-airbnb-base": "^14.2.1", + "eslint-plugin-import": "^2.22.1", "jasmine-core": "~3.6.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~5.0.0", @@ -17,8 +27,7 @@ "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~3.3.0", "karma-jasmine-html-reporter": "^1.5.0", - "ts-node": "~8.3.0", - "tslint": "~6.1.0" + "ts-node": "~8.3.0" }, "dependencies": { "@angular-devkit/build-angular": "~0.1102.2", @@ -111,7 +120,7 @@ "serve-test": "node --max_old_space_size=8096 ./node_modules/@angular/cli/bin/ng serve --host 0.0.0.0 --disable-host-check --public-host http://frontend-test:4200", "pretest": "./scripts/link_plugin_placeholder.js", "test": "ng test --watch=false", - "tslint_typechecks": "./node_modules/.bin/tslint -p . -c tslint_typechecks.json", + "lint": "eslint -c .eslintrc.js --ext .ts src/app/", "generate-typings": "tsc -d -p src/tsconfig.app.json" } } diff --git a/frontend/src/app/angular4-modules.ts b/frontend/src/app/angular4-modules.ts index e4aa7c0b125..971f8d2d95d 100644 --- a/frontend/src/app/angular4-modules.ts +++ b/frontend/src/app/angular4-modules.ts @@ -26,58 +26,58 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APP_INITIALIZER, ApplicationRef, Injector, NgModule} from '@angular/core'; -import {ReactiveFormsModule} from '@angular/forms'; -import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module'; +import { APP_INITIALIZER, ApplicationRef, Injector, NgModule } from '@angular/core'; +import { ReactiveFormsModule } from '@angular/forms'; +import { OpenprojectHalModule } from 'core-app/modules/hal/openproject-hal.module'; -import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; -import {States} from 'core-components/states.service'; -import {PaginationService} from 'core-components/table-pagination/pagination-service'; -import {MainMenuResizerComponent} from 'core-components/resizer/main-menu-resizer.component'; -import {ConfirmDialogModal} from "core-components/modals/confirm-dialog/confirm-dialog.modal"; -import {ConfirmDialogService} from "core-components/modals/confirm-dialog/confirm-dialog.service"; -import {DynamicContentModal} from "core-components/modals/modal-wrapper/dynamic-content.modal"; -import {PasswordConfirmationModal} from "core-components/modals/request-for-confirmation/password-confirmation.modal"; -import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module"; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {CommentService} from "core-components/wp-activity/comment-service"; -import {OpDragScrollDirective} from "core-app/modules/common/ui/op-drag-scroll.directive"; -import {OpenprojectPluginsModule} from "core-app/modules/plugins/openproject-plugins.module"; -import {ConfirmFormSubmitController} from "core-components/modals/confirm-form-submit/confirm-form-submit.directive"; -import {ProjectMenuAutocompleteComponent} from "core-components/projects/project-menu-autocomplete/project-menu-autocomplete.component"; -import {OpenProjectFileUploadService} from "core-components/api/op-file-upload/op-file-upload.service"; -import {OpenProjectDirectFileUploadService} from './components/api/op-file-upload/op-direct-file-upload.service'; -import {LinkedPluginsModule} from "core-app/modules/plugins/linked-plugins.module"; -import {HookService} from "core-app/modules/plugins/hook-service"; -import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; -import {OpenprojectWorkPackagesModule} from 'core-app/modules/work_packages/openproject-work-packages.module'; -import {OpenprojectAttachmentsModule} from 'core-app/modules/attachments/openproject-attachments.module'; -import {OpenprojectEditorModule} from 'core-app/modules/editor/openproject-editor.module'; -import {OpenprojectGridsModule} from "core-app/modules/grids/openproject-grids.module"; -import {OpenprojectRouterModule} from "core-app/modules/router/openproject-router.module"; -import {OpenprojectWorkPackageRoutesModule} from "core-app/modules/work_packages/openproject-work-package-routes.module"; -import {BrowserModule} from "@angular/platform-browser"; -import {OpenprojectCalendarModule} from "core-app/modules/calendar/openproject-calendar.module"; -import {OpenprojectGlobalSearchModule} from "core-app/modules/global_search/openproject-global-search.module"; -import {MainMenuToggleComponent} from "core-components/main-menu/main-menu-toggle.component"; -import {MainMenuNavigationService} from "core-components/main-menu/main-menu-navigation.service"; -import {OpenprojectAdminModule} from "core-app/modules/admin/openproject-admin.module"; -import {OpenprojectDashboardsModule} from "core-app/modules/dashboards/openproject-dashboards.module"; -import {OpenprojectWorkPackageGraphsModule} from "core-app/modules/work-package-graphs/openproject-work-package-graphs.module"; -import {WpPreviewModal} from "core-components/modals/preview-modal/wp-preview-modal/wp-preview.modal"; -import {PreviewTriggerService} from "core-app/globals/global-listeners/preview-trigger.service"; -import {OpenprojectOverviewModule} from "core-app/modules/overview/openproject-overview.module"; -import {OpenprojectMyPageModule} from "core-app/modules/my-page/openproject-my-page.module"; -import {OpenprojectProjectsModule} from "core-app/modules/projects/openproject-projects.module"; -import {KeyboardShortcutService} from "core-app/modules/a11y/keyboard-shortcut-service"; -import {globalDynamicComponents} from "core-app/global-dynamic-components.const"; -import {OpenprojectMembersModule} from "core-app/modules/members/members.module"; -import {OpenprojectEnterpriseModule} from "core-components/enterprise/openproject-enterprise.module"; -import {OpenprojectAugmentingModule} from "core-app/modules/augmenting/openproject-augmenting.module"; -import {OpenprojectInviteUserModalModule} from "core-app/modules/invite-user-modal/invite-user-modal.module"; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {RevitAddInSettingsButtonService} from "core-app/modules/bim/revit_add_in/revit-add-in-settings-button.service"; -import {OpenprojectAutocompleterModule} from "core-app/modules/autocompleter/openproject-autocompleter.module"; +import { OpContextMenuTrigger } from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; +import { States } from 'core-components/states.service'; +import { PaginationService } from 'core-components/table-pagination/pagination-service'; +import { MainMenuResizerComponent } from 'core-components/resizer/main-menu-resizer.component'; +import { ConfirmDialogModal } from "core-components/modals/confirm-dialog/confirm-dialog.modal"; +import { ConfirmDialogService } from "core-components/modals/confirm-dialog/confirm-dialog.service"; +import { DynamicContentModal } from "core-components/modals/modal-wrapper/dynamic-content.modal"; +import { PasswordConfirmationModal } from "core-components/modals/request-for-confirmation/password-confirmation.modal"; +import { OpenprojectFieldsModule } from "core-app/modules/fields/openproject-fields.module"; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { CommentService } from "core-components/wp-activity/comment-service"; +import { OpDragScrollDirective } from "core-app/modules/common/ui/op-drag-scroll.directive"; +import { OpenprojectPluginsModule } from "core-app/modules/plugins/openproject-plugins.module"; +import { ConfirmFormSubmitController } from "core-components/modals/confirm-form-submit/confirm-form-submit.directive"; +import { ProjectMenuAutocompleteComponent } from "core-components/projects/project-menu-autocomplete/project-menu-autocomplete.component"; +import { OpenProjectFileUploadService } from "core-components/api/op-file-upload/op-file-upload.service"; +import { OpenProjectDirectFileUploadService } from './components/api/op-file-upload/op-direct-file-upload.service'; +import { LinkedPluginsModule } from "core-app/modules/plugins/linked-plugins.module"; +import { HookService } from "core-app/modules/plugins/hook-service"; +import { DynamicBootstrapper } from "core-app/globals/dynamic-bootstrapper"; +import { OpenprojectWorkPackagesModule } from 'core-app/modules/work_packages/openproject-work-packages.module'; +import { OpenprojectAttachmentsModule } from 'core-app/modules/attachments/openproject-attachments.module'; +import { OpenprojectEditorModule } from 'core-app/modules/editor/openproject-editor.module'; +import { OpenprojectGridsModule } from "core-app/modules/grids/openproject-grids.module"; +import { OpenprojectRouterModule } from "core-app/modules/router/openproject-router.module"; +import { OpenprojectWorkPackageRoutesModule } from "core-app/modules/work_packages/openproject-work-package-routes.module"; +import { BrowserModule } from "@angular/platform-browser"; +import { OpenprojectCalendarModule } from "core-app/modules/calendar/openproject-calendar.module"; +import { OpenprojectGlobalSearchModule } from "core-app/modules/global_search/openproject-global-search.module"; +import { MainMenuToggleComponent } from "core-components/main-menu/main-menu-toggle.component"; +import { MainMenuNavigationService } from "core-components/main-menu/main-menu-navigation.service"; +import { OpenprojectAdminModule } from "core-app/modules/admin/openproject-admin.module"; +import { OpenprojectDashboardsModule } from "core-app/modules/dashboards/openproject-dashboards.module"; +import { OpenprojectWorkPackageGraphsModule } from "core-app/modules/work-package-graphs/openproject-work-package-graphs.module"; +import { WpPreviewModal } from "core-components/modals/preview-modal/wp-preview-modal/wp-preview.modal"; +import { PreviewTriggerService } from "core-app/globals/global-listeners/preview-trigger.service"; +import { OpenprojectOverviewModule } from "core-app/modules/overview/openproject-overview.module"; +import { OpenprojectMyPageModule } from "core-app/modules/my-page/openproject-my-page.module"; +import { OpenprojectProjectsModule } from "core-app/modules/projects/openproject-projects.module"; +import { KeyboardShortcutService } from "core-app/modules/a11y/keyboard-shortcut-service"; +import { globalDynamicComponents } from "core-app/global-dynamic-components.const"; +import { OpenprojectMembersModule } from "core-app/modules/members/members.module"; +import { OpenprojectEnterpriseModule } from "core-components/enterprise/openproject-enterprise.module"; +import { OpenprojectAugmentingModule } from "core-app/modules/augmenting/openproject-augmenting.module"; +import { OpenprojectInviteUserModalModule } from "core-app/modules/invite-user-modal/invite-user-modal.module"; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { RevitAddInSettingsButtonService } from "core-app/modules/bim/revit_add_in/revit-add-in-settings-button.service"; +import { OpenprojectAutocompleterModule } from "core-app/modules/autocompleter/openproject-autocompleter.module"; @NgModule({ imports: [ diff --git a/frontend/src/app/ckeditor/ckeditor-augmented-textarea.component.ts b/frontend/src/app/ckeditor/ckeditor-augmented-textarea.component.ts index a224fad0e12..3dab225d2fa 100644 --- a/frontend/src/app/ckeditor/ckeditor-augmented-textarea.component.ts +++ b/frontend/src/app/ckeditor/ckeditor-augmented-textarea.component.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit, ViewChild} from '@angular/core'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {States} from 'core-components/states.service'; -import {filter, takeUntil} from 'rxjs/operators'; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ICKEditorContext, ICKEditorInstance} from "core-app/modules/common/ckeditor/ckeditor-setup.service"; -import {OpCkeditorComponent} from "core-app/modules/common/ckeditor/op-ckeditor.component"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { States } from 'core-components/states.service'; +import { filter, takeUntil } from 'rxjs/operators'; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ICKEditorContext, ICKEditorInstance } from "core-app/modules/common/ckeditor/ckeditor-setup.service"; +import { OpCkeditorComponent } from "core-app/modules/common/ckeditor/op-ckeditor.component"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export const ckeditorAugmentedTextareaSelector = 'ckeditor-augmented-textarea'; @@ -58,8 +58,8 @@ export class CkeditorAugmentedTextareaComponent extends UntilDestroyedMixin impl public $attachmentsElement:JQuery; // Remember if the user changed - public changed:boolean = false; - public inFlight:boolean = false; + public changed = false; + public inFlight = false; public initialContent:string; public resource?:HalResource; @@ -166,25 +166,25 @@ export class CkeditorAugmentedTextareaComponent extends UntilDestroyedMixin impl takeUntil(componentDestroyed(this)), filter(resource => !!resource) ).subscribe(resource => { - let missingAttachments = _.differenceBy(this.attachments, + const missingAttachments = _.differenceBy(this.attachments, resource!.attachments.elements, (attachment:HalResource) => attachment.id); - let removedUrls = missingAttachments.map(attachment => attachment.downloadLocation.$href); + const removedUrls = missingAttachments.map(attachment => attachment.downloadLocation.$href); - if (removedUrls.length) { - editor.model.fire('op:attachment-removed', removedUrls); - } + if (removedUrls.length) { + editor.model.fire('op:attachment-removed', removedUrls); + } - this.attachments = _.clone(resource!.attachments.elements); - }); + this.attachments = _.clone(resource!.attachments.elements); + }); } private setLabel() { - let textareaId = this.textareaSelector.substring(1); - let label = jQuery(`label[for=${textareaId}]`); + const textareaId = this.textareaSelector.substring(1); + const label = jQuery(`label[for=${textareaId}]`); - let ckContent = this.$element.find('.ck-content'); + const ckContent = this.$element.find('.ck-content'); ckContent.attr('aria-label', null); ckContent.attr('aria-labelledby', textareaId); @@ -200,7 +200,7 @@ export class CkeditorAugmentedTextareaComponent extends UntilDestroyedMixin impl } const takenIds = this.$attachmentsElement.find('input[type=\'file\']').map((index, input) => { - let match = (input.getAttribute('name') || '').match(/attachments\[(\d+)\]\[(?:file|id)\]/); + const match = (input.getAttribute('name') || '').match(/attachments\[(\d+)\]\[(?:file|id)\]/); if (match) { return parseInt(match[1]); @@ -211,7 +211,7 @@ export class CkeditorAugmentedTextareaComponent extends UntilDestroyedMixin impl const maxValue:number = takenIds.toArray().sort().pop() || 0; - let addedAttachments = this.resource.attachments.elements || []; + const addedAttachments = this.resource.attachments.elements || []; jQuery.each(addedAttachments, (index:number, attachment:HalResource) => { this.$attachmentsElement.append(``); diff --git a/frontend/src/app/components/angular/debounced-event-emitter.ts b/frontend/src/app/components/angular/debounced-event-emitter.ts index 3b861283025..aa73ee9a085 100644 --- a/frontend/src/app/components/angular/debounced-event-emitter.ts +++ b/frontend/src/app/components/angular/debounced-event-emitter.ts @@ -1,13 +1,13 @@ -import {EventEmitter} from '@angular/core'; -import {Observable, Subject} from 'rxjs'; -import {debounceTime, takeUntil} from 'rxjs/operators'; +import { EventEmitter } from '@angular/core'; +import { Observable, Subject } from 'rxjs'; +import { debounceTime, takeUntil } from 'rxjs/operators'; export class DebouncedEventEmitter { private emitter = new EventEmitter(); private debouncer:Subject; - constructor(takeUntil$:Observable, debounceTimeInMs:number = 250) { + constructor(takeUntil$:Observable, debounceTimeInMs = 250) { this.debouncer = new Subject(); this.debouncer .pipe( diff --git a/frontend/src/app/components/angular/tracking-functions.ts b/frontend/src/app/components/angular/tracking-functions.ts index 7501bf3f81c..c47780cadf1 100644 --- a/frontend/src/app/components/angular/tracking-functions.ts +++ b/frontend/src/app/components/angular/tracking-functions.ts @@ -1,4 +1,4 @@ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export namespace AngularTrackingHelpers { export function halHref(_index:number, item:T):string|null { @@ -30,8 +30,8 @@ export namespace AngularTrackingHelpers { export function trackByHrefAndProperty(propertyName:string) { return (i:number, item:HalResource) => { - let href = _.get(item, 'href'); - let prop = _.get(item, propertyName, 'none'); + const href = _.get(item, 'href'); + const prop = _.get(item, propertyName, 'none'); return `${href}#${propertyName}=${prop}`; }; diff --git a/frontend/src/app/components/api/api-v3/api-v3-filter-builder.ts b/frontend/src/app/components/api/api-v3/api-v3-filter-builder.ts index 9b0ba062529..9580207adba 100644 --- a/frontend/src/app/components/api/api-v3/api-v3-filter-builder.ts +++ b/frontend/src/app/components/api/api-v3/api-v3-filter-builder.ts @@ -77,7 +77,7 @@ export class ApiV3FilterBuilder { * @return A map { foo: { operator: '=', val: ['bar'] } , ... } */ public toFilterObject(filters:ApiV3Filter[]):ApiV3FilterObject { - let map:ApiV3FilterObject = {}; + const map:ApiV3FilterObject = {}; filters.forEach((item:ApiV3Filter) => { _.each(item, (val:ApiV3FilterValue, filter:string) => { @@ -108,7 +108,7 @@ export class ApiV3FilterBuilder { } public get filters():ApiV3Filter[] { - let filters:ApiV3Filter[] = []; + const filters:ApiV3Filter[] = []; _.each(this.filterMap, (val:ApiV3FilterValue, filter:string) => { filters.push({ [filter]: val }); }); @@ -127,12 +127,12 @@ export class ApiV3FilterBuilder { return this.serializeFilter(filter); }); - let params = { filters: `[${transformedFilters.join(",")}]`, ...mergeParams }; + const params = { filters: `[${transformedFilters.join(",")}]`, ...mergeParams }; return new URLSearchParams(params).toString(); } public clone() { - let newFilters = new ApiV3FilterBuilder(); + const newFilters = new ApiV3FilterBuilder(); this.filters.forEach(filter => { Object.keys(filter).forEach(name => { @@ -149,8 +149,8 @@ export class ApiV3FilterBuilder { keys = Object.keys(filter); - let typeName = keys[0]; - let operatorAndValues:any = filter[typeName]; + const typeName = keys[0]; + const operatorAndValues:any = filter[typeName]; transformedFilter = `{"${typeName}":{"operator":"${operatorAndValues['operator']}","values":[${operatorAndValues['values'] .map((val:any) => this.serializeFilterValue(val)) diff --git a/frontend/src/app/components/api/op-file-upload/op-direct-file-upload.service.ts b/frontend/src/app/components/api/op-file-upload/op-direct-file-upload.service.ts index 1adc083feac..636e4c28620 100644 --- a/frontend/src/app/components/api/op-file-upload/op-direct-file-upload.service.ts +++ b/frontend/src/app/components/api/op-file-upload/op-direct-file-upload.service.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; -import {HttpEvent, HttpResponse} from "@angular/common/http"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {from, Observable, of} from "rxjs"; -import {share, switchMap} from "rxjs/operators"; -import {OpenProjectFileUploadService, UploadBlob, UploadFile, UploadInProgress} from './op-file-upload.service'; +import { Injectable } from "@angular/core"; +import { HttpEvent, HttpResponse } from "@angular/common/http"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { from, Observable, of } from "rxjs"; +import { share, switchMap } from "rxjs/operators"; +import { OpenProjectFileUploadService, UploadBlob, UploadFile, UploadInProgress } from './op-file-upload.service'; interface PrepareUploadResult { url:string; @@ -47,7 +47,7 @@ export class OpenProjectDirectFileUploadService extends OpenProjectFileUploadSer * @param {UploadFile} file * @param {string} method */ - public uploadSingle(url:string, file:UploadFile|UploadBlob, method:string = 'post', responseType:'text'|'json' = 'text') { + public uploadSingle(url:string, file:UploadFile|UploadBlob, method = 'post', responseType:'text'|'json' = 'text') { const observable = from(this.getDirectUploadFormFrom(url, file)) .pipe( switchMap(this.uploadToExternal(file, method, responseType)), @@ -134,7 +134,7 @@ export class OpenProjectDirectFileUploadService extends OpenProjectFileUploadSer ) .toPromise() .then((res) => { - let form = new FormData(); + const form = new FormData(); _.each(res._links.addAttachment.form_fields, (value, key) => { form.append(key, value); diff --git a/frontend/src/app/components/api/op-file-upload/op-file-upload.service.spec.ts b/frontend/src/app/components/api/op-file-upload/op-file-upload.service.spec.ts index b6f3d88264a..d78380af6fe 100644 --- a/frontend/src/app/components/api/op-file-upload/op-file-upload.service.spec.ts +++ b/frontend/src/app/components/api/op-file-upload/op-file-upload.service.spec.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpenProjectFileUploadService, UploadFile, UploadResult} from './op-file-upload.service'; -import {OpenProjectDirectFileUploadService} from "core-components/api/op-file-upload/op-direct-file-upload.service"; -import {HttpClientTestingModule, HttpTestingController} from "@angular/common/http/testing"; -import {getTestBed, TestBed} from "@angular/core/testing"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {States} from "core-components/states.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { OpenProjectFileUploadService, UploadFile, UploadResult } from './op-file-upload.service'; +import { OpenProjectDirectFileUploadService } from "core-components/api/op-file-upload/op-direct-file-upload.service"; +import { HttpClientTestingModule, HttpTestingController } from "@angular/common/http/testing"; +import { getTestBed, TestBed } from "@angular/core/testing"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { States } from "core-components/states.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; describe('opFileUpload service', () => { let injector:TestBed; @@ -43,7 +43,7 @@ describe('opFileUpload service', () => { TestBed.configureTestingModule({ imports: [HttpClientTestingModule], providers: [ - {provide: States, useValue: new States()}, + { provide: States, useValue: new States() }, I18nService, OpenProjectFileUploadService, OpenProjectDirectFileUploadService, @@ -63,9 +63,9 @@ describe('opFileUpload service', () => { describe('when uploading multiple files', () => { var result:UploadResult; const file:UploadFile = new File([ JSON.stringify({ - name: 'name', - description: 'description' - })], 'name'); + name: 'name', + description: 'description' + })], 'name'); beforeEach(() => { result = service.upload('/my/api/path', [file, file]); diff --git a/frontend/src/app/components/api/op-file-upload/op-file-upload.service.ts b/frontend/src/app/components/api/op-file-upload/op-file-upload.service.ts index 585aff2f963..91c78a7b4df 100644 --- a/frontend/src/app/components/api/op-file-upload/op-file-upload.service.ts +++ b/frontend/src/app/components/api/op-file-upload/op-file-upload.service.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; -import {HttpClient, HttpEvent, HttpEventType, HttpResponse} from "@angular/common/http"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Observable} from "rxjs"; -import {filter, map, share} from "rxjs/operators"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; +import { Injectable } from "@angular/core"; +import { HttpClient, HttpEvent, HttpEventType, HttpResponse } from "@angular/common/http"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Observable } from "rxjs"; +import { filter, map, share } from "rxjs/operators"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; export interface UploadFile extends File { description?:string; @@ -72,11 +72,11 @@ export class OpenProjectFileUploadService { * @param {string} method * @returns {Promise<{response:HalResource; uploadUrl:any}[]>} */ - public uploadAndMapResponse(url:string, files:UploadFile[], method:string = 'post') { + public uploadAndMapResponse(url:string, files:UploadFile[], method = 'post') { const { uploads, finished } = this.upload(url, files); const mapped = finished .then((result:HalResource[]) => result.map((el:HalResource) => { - return { response: el, uploadUrl: el.staticDownloadLocation.href }; + return { response: el, uploadUrl: el.staticDownloadLocation.href }; })) as Promise<{ response:HalResource, uploadUrl:string }[]>; return { uploads: uploads, finished: mapped } as MappedUploadResult; @@ -86,12 +86,12 @@ export class OpenProjectFileUploadService { * Upload multiple files and return a promise for each uploading file and a single promise for all processed uploads * Ignore directories. */ - public upload(url:string, files:UploadFile[], method:string = 'post'):UploadResult { + public upload(url:string, files:UploadFile[], method = 'post'):UploadResult { files = _.filter(files, (file:UploadFile) => file.type !== 'directory'); const uploads:UploadInProgress[] = _.map(files, (file:UploadFile) => this.uploadSingle(url, file, method)); const finished = this.whenFinished(uploads); - return {uploads, finished} as UploadResult; + return { uploads, finished } as UploadResult; } /** @@ -100,7 +100,7 @@ export class OpenProjectFileUploadService { * @param {UploadFile} file * @param {string} method */ - public uploadSingle(url:string, file:UploadFile|UploadBlob, method:string = 'post', responseType:'text'|'json' = 'json') { + public uploadSingle(url:string, file:UploadFile|UploadBlob, method = 'post', responseType:'text'|'json' = 'json') { const formData = new FormData(); const metadata = { description: file.description, diff --git a/frontend/src/app/components/datepicker/datepicker.modal.helper.ts b/frontend/src/app/components/datepicker/datepicker.modal.helper.ts index a0ab7159533..5947b3a1742 100644 --- a/frontend/src/app/components/datepicker/datepicker.modal.helper.ts +++ b/frontend/src/app/components/datepicker/datepicker.modal.helper.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {DateKeys} from "core-components/datepicker/datepicker.modal"; -import {DatePicker} from "core-app/modules/common/op-date-picker/datepicker"; -import {DateOption} from "flatpickr/dist/types/options"; +import { Injectable } from '@angular/core'; +import { DateKeys } from "core-components/datepicker/datepicker.modal"; +import { DatePicker } from "core-app/modules/common/op-date-picker/datepicker"; +import { DateOption } from "flatpickr/dist/types/options"; @Injectable({ providedIn: 'root' }) export class DatePickerModalHelper { @@ -67,8 +67,8 @@ export class DatePickerModalHelper { } public areDatesEqual(firstDate:Date|string, secondDate:Date|string) { - let parsedDate1 = this.parseDate(firstDate); - let parsedDate2 = this.parseDate(secondDate); + const parsedDate1 = this.parseDate(firstDate); + const parsedDate2 = this.parseDate(secondDate); if ((typeof(parsedDate1) === 'string') || (typeof(parsedDate2) === 'string')) { return false; @@ -91,8 +91,8 @@ export class DatePickerModalHelper { } public setDates(dates:DateOption|DateOption[], datePicker:DatePicker, enforceDate?:Date) { - let currentMonth = datePicker.datepickerInstance.currentMonth; - let currentYear = datePicker.datepickerInstance.currentYear; + const currentMonth = datePicker.datepickerInstance.currentMonth; + const currentYear = datePicker.datepickerInstance.currentYear; datePicker.setDates(dates); if (enforceDate) { @@ -155,7 +155,7 @@ export class DatePickerModalHelper { selectedElements[0].classList.add('startRange'); this.selectRangeFromUntil(selectedElements[0], ''); } else if (this.datepickerShowsDate(dates.end, selectedElements[0])) { - let firstDay = jQuery(container).find('.flatpickr-day')[0]; + const firstDay = jQuery(container).find('.flatpickr-day')[0]; selectedElements[0].classList.add('endRange'); firstDay.classList.add('inRange'); diff --git a/frontend/src/app/components/datepicker/datepicker.modal.ts b/frontend/src/app/components/datepicker/datepicker.modal.ts index db2f161787f..53648ec6dd8 100644 --- a/frontend/src/app/components/datepicker/datepicker.modal.ts +++ b/frontend/src/app/components/datepicker/datepicker.modal.ts @@ -37,18 +37,18 @@ import { Injector, ViewChild, ViewEncapsulation } from "@angular/core"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {DatePicker} from "core-app/modules/common/op-date-picker/datepicker"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {DatePickerModalHelper} from "core-components/datepicker/datepicker.modal.helper"; -import {BrowserDetector} from "core-app/modules/common/browser/browser-detector.service"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { DatePicker } from "core-app/modules/common/op-date-picker/datepicker"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { DatePickerModalHelper } from "core-components/datepicker/datepicker.modal.helper"; +import { BrowserDetector } from "core-app/modules/common/browser/browser-detector.service"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; export type DateKeys = 'date'|'start'|'end'; @@ -86,7 +86,7 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit { public scheduleManually = false; - public htmlId:string = ''; + public htmlId = ''; public dates:{ [key in DateKeys]:string } = { date: '', @@ -181,7 +181,7 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit { } setToday(key:DateKeys) { - let today = this.datepickerHelper.parseDate(new Date()); + const today = this.datepickerHelper.parseDate(new Date()); this.dates[key] = this.timezoneService.formattedISODate(today); (today instanceof Date) ? this.enforceManualChangesToDatepicker(true, today) : this.enforceManualChangesToDatepicker(); @@ -265,20 +265,24 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit { this.onDataChange(); }, - onMonthChange: () => { this.datepickerHelper.setRangeClasses(this.dates); }, - onYearChange: () => { this.datepickerHelper.setRangeClasses(this.dates); }, + onMonthChange: () => { + this.datepickerHelper.setRangeClasses(this.dates); + }, + onYearChange: () => { + this.datepickerHelper.setRangeClasses(this.dates); + }, }, undefined, this.configurationService ); } - private enforceManualChangesToDatepicker(toggleField:boolean = true, enforceDate?:Date) { + private enforceManualChangesToDatepicker(toggleField = true, enforceDate?:Date) { if (this.singleDate) { - let date = this.datepickerHelper.parseDate(this.dates.date); + const date = this.datepickerHelper.parseDate(this.dates.date); this.datepickerHelper.setDates(date, this.datePickerInstance, enforceDate); } else { - let dates = [this.datepickerHelper.parseDate(this.dates.start), this.datepickerHelper.parseDate(this.dates.end)]; + const dates = [this.datepickerHelper.parseDate(this.dates.start), this.datepickerHelper.parseDate(this.dates.end)]; this.datepickerHelper.setDates(dates, this.datePickerInstance, enforceDate); this.setRangeClassesAndToggleActiveField(toggleField); @@ -287,75 +291,75 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit { private handleDatePickerChange(dates:Date[]) { switch (dates.length) { - case 0: { - // In case we removed the only value by clicking on a already selected date within the datepicker: - if (this.dates.start || this.dates.end) { - this.setDateAndToggleActiveField(this.dates.start || this.dates.end); - } - - break; + case 0: { + // In case we removed the only value by clicking on a already selected date within the datepicker: + if (this.dates.start || this.dates.end) { + this.setDateAndToggleActiveField(this.dates.start || this.dates.end); } - case 1: { - if (this.singleDate) { - this.dates.date = this.timezoneService.formattedISODate(dates[0]); - } else { - // In case we removed a value by clicking on a already selected date within the datepicker: - if (this.dates.start && this.dates.end) { - // Both dates are the same, so it is correct to only highlight one date - if (this.dates.start === this.dates.end) { - return; - } - // I wanted to set the new start date to the preselected endDate OR - // I wanted to set the new end date to the preselected startDate - if ((this.datepickerHelper.isStateOfCurrentActivatedField('start') && this.datepickerHelper.areDatesEqual(this.dates.start, dates[0])) || + break; + } + case 1: { + if (this.singleDate) { + this.dates.date = this.timezoneService.formattedISODate(dates[0]); + } else { + // In case we removed a value by clicking on a already selected date within the datepicker: + if (this.dates.start && this.dates.end) { + // Both dates are the same, so it is correct to only highlight one date + if (this.dates.start === this.dates.end) { + return; + } + + // I wanted to set the new start date to the preselected endDate OR + // I wanted to set the new end date to the preselected startDate + if ((this.datepickerHelper.isStateOfCurrentActivatedField('start') && this.datepickerHelper.areDatesEqual(this.dates.start, dates[0])) || (this.datepickerHelper.isStateOfCurrentActivatedField('end') && this.datepickerHelper.areDatesEqual(this.dates.end, dates[0]))) { - let otherDateIndex:DateKeys = this.datepickerHelper.isStateOfCurrentActivatedField('start') ? 'end' : 'start'; - this.setDateAndToggleActiveField(this.dates[otherDateIndex]); - } else { - // I clicked on the already set start or end date (and thus removed it): - // We restore both values - this.enforceManualChangesToDatepicker(true); - } + const otherDateIndex:DateKeys = this.datepickerHelper.isStateOfCurrentActivatedField('start') ? 'end' : 'start'; + this.setDateAndToggleActiveField(this.dates[otherDateIndex]); } else { - // It is the first value we set (either start or end date) - this.setDateAndToggleActiveField(this.timezoneService.formattedISODate(dates[0]), false); + // I clicked on the already set start or end date (and thus removed it): + // We restore both values + this.enforceManualChangesToDatepicker(true); } + } else { + // It is the first value we set (either start or end date) + this.setDateAndToggleActiveField(this.timezoneService.formattedISODate(dates[0]), false); } - - break; } - case 2: { - if ((!this.dates.end && this.datepickerHelper.isStateOfCurrentActivatedField('start')) || + + break; + } + case 2: { + if ((!this.dates.end && this.datepickerHelper.isStateOfCurrentActivatedField('start')) || (!this.dates.start && this.datepickerHelper.isStateOfCurrentActivatedField('end'))) { - // If we change a start date when no end date is set, we keep only the newly clicked value and not both - this.overwriteDatePickerWithNewDates([dates[1]]); - } else { - // Sort dates so that the start date is always first - if (dates[0] > dates[1]) { - dates = this.datepickerHelper.sortDates(dates); - this.datepickerHelper.setDates(dates, this.datePickerInstance); - } - - let index = this.datepickerHelper.isStateOfCurrentActivatedField('start') ? 0 : 1; - this.dates[this.datepickerHelper.currentlyActivatedDateField] = this.timezoneService.formattedISODate(dates[index]); - - this.setRangeClassesAndToggleActiveField(); + // If we change a start date when no end date is set, we keep only the newly clicked value and not both + this.overwriteDatePickerWithNewDates([dates[1]]); + } else { + // Sort dates so that the start date is always first + if (dates[0] > dates[1]) { + dates = this.datepickerHelper.sortDates(dates); + this.datepickerHelper.setDates(dates, this.datePickerInstance); } - break; - } - default: { - // Reset the date picker with the two new values - if (this.datepickerHelper.isStateOfCurrentActivatedField('start')) { - this.overwriteDatePickerWithNewDates([dates[2], dates[1]]); - } else { - this.overwriteDatePickerWithNewDates([dates[0], dates[2]]); - } + const index = this.datepickerHelper.isStateOfCurrentActivatedField('start') ? 0 : 1; + this.dates[this.datepickerHelper.currentlyActivatedDateField] = this.timezoneService.formattedISODate(dates[index]); - break; + this.setRangeClassesAndToggleActiveField(); } + + break; + } + default: { + // Reset the date picker with the two new values + if (this.datepickerHelper.isStateOfCurrentActivatedField('start')) { + this.overwriteDatePickerWithNewDates([dates[2], dates[1]]); + } else { + this.overwriteDatePickerWithNewDates([dates[0], dates[2]]); + } + + break; + } } this.cdRef.detectChanges(); @@ -366,7 +370,7 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit { this.handleDatePickerChange(dates); } - private setDateAndToggleActiveField(newDate:string, forceDatePickerUpdate:boolean = true) { + private setDateAndToggleActiveField(newDate:string, forceDatePickerUpdate = true) { this.dates[this.datepickerHelper.currentlyActivatedDateField] = newDate; if (forceDatePickerUpdate) { this.datepickerHelper.setDates([this.datepickerHelper.parseDate(newDate)], this.datePickerInstance); @@ -374,7 +378,7 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit { this.datepickerHelper.toggleCurrentActivatedField(this.dates, this.datePickerInstance); } - private setRangeClassesAndToggleActiveField(toggleField:boolean = true) { + private setRangeClassesAndToggleActiveField(toggleField = true) { if (toggleField) { this.datepickerHelper.toggleCurrentActivatedField(this.dates, this.datePickerInstance); } @@ -382,11 +386,11 @@ export class DatePickerModal extends OpModalComponent implements AfterViewInit { } private onDataChange() { - let date = this.dates.date || ''; - let start = this.dates.start || ''; - let end = this.dates.end || ''; + const date = this.dates.date || ''; + const start = this.dates.start || ''; + const end = this.dates.end || ''; - let output = this.singleDate ? date : start + ' - ' + end; + const output = this.singleDate ? date : start + ' - ' + end; this.onDataUpdated.emit(output); } diff --git a/frontend/src/app/components/datetime/timezone.service.spec.ts b/frontend/src/app/components/datetime/timezone.service.spec.ts index 47dee148494..bdbcad01923 100644 --- a/frontend/src/app/components/datetime/timezone.service.spec.ts +++ b/frontend/src/app/components/datetime/timezone.service.spec.ts @@ -28,21 +28,21 @@ /*jshint expr: true*/ -import {TestBed} from '@angular/core/testing'; -import {HttpClientModule} from '@angular/common/http'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; +import { TestBed } from '@angular/core/testing'; +import { HttpClientModule } from '@angular/common/http'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; describe('TimezoneService', function () { - let TIME = '2013-02-08T09:30:26'; - let DATE = '2013-02-08'; + const TIME = '2013-02-08T09:30:26'; + const DATE = '2013-02-08'; let timezoneService:TimezoneService; - let compile = (timezone?:string) => { - let ConfigurationServiceStub = { + const compile = (timezone?:string) => { + const ConfigurationServiceStub = { isTimezoneSet: () => !!timezone, timezone: () => timezone }; @@ -89,7 +89,7 @@ describe('TimezoneService', function () { describe('Non-UTC timezone', function () { it('is in the given timezone' , function () { - let date = timezoneService.parseDatetime(TIME); + const date = timezoneService.parseDatetime(TIME); expect(date.format('HH:mm')).toEqual('01:30'); }); diff --git a/frontend/src/app/components/datetime/timezone.service.ts b/frontend/src/app/components/datetime/timezone.service.ts index d962714d7fd..3418dbc90a6 100644 --- a/frontend/src/app/components/datetime/timezone.service.ts +++ b/frontend/src/app/components/datetime/timezone.service.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { Injectable } from '@angular/core'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; import * as moment from 'moment-timezone'; -import {Moment} from 'moment'; +import { Moment } from 'moment'; @Injectable({ providedIn: 'root' }) export class TimezoneService { diff --git a/frontend/src/app/components/enterprise-banner/enterprise-banner-bootstrap.component.ts b/frontend/src/app/components/enterprise-banner/enterprise-banner-bootstrap.component.ts index 7691883ef3f..58da12ff4ef 100644 --- a/frontend/src/app/components/enterprise-banner/enterprise-banner-bootstrap.component.ts +++ b/frontend/src/app/components/enterprise-banner/enterprise-banner-bootstrap.component.ts @@ -1,5 +1,5 @@ -import {Component, ElementRef, OnInit} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Component, ElementRef, OnInit } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; export const enterpriseBannerSelector = 'enterprise-banner-bootstrap'; @@ -23,7 +23,7 @@ export class EnterpriseBannerBootstrapComponent implements OnInit { } ngOnInit() { - let $element = jQuery(this.elementRef.nativeElement); + const $element = jQuery(this.elementRef.nativeElement); this.textMessage = $element.attr('text-message')!; this.linkMessage = $element.attr('link-message') || this.i18n.t('js.work_packages.table_configuration.upsale.check_out_link'); diff --git a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts index a7de8e0d5e4..a5de4c050f4 100644 --- a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts +++ b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-saved-trial.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef} from "@angular/core"; -import {I18nService} from "app/modules/common/i18n/i18n.service"; -import {EEActiveTrialBase} from "core-components/enterprise/enterprise-active-trial/ee-active-trial.base"; +import { Component, ElementRef } from "@angular/core"; +import { I18nService } from "app/modules/common/i18n/i18n.service"; +import { EEActiveTrialBase } from "core-components/enterprise/enterprise-active-trial/ee-active-trial.base"; export const enterpriseActiveSavedTrialSelector = 'enterprise-active-saved-trial'; diff --git a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.base.ts b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.base.ts index cde478cdd7e..000b6fcf51a 100644 --- a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.base.ts +++ b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.base.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {I18nService} from "app/modules/common/i18n/i18n.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { I18nService } from "app/modules/common/i18n/i18n.service"; export class EEActiveTrialBase extends UntilDestroyedMixin { public text = { diff --git a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts index 99cebc52974..e4a488672c5 100644 --- a/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts +++ b/frontend/src/app/components/enterprise/enterprise-active-trial/ee-active-trial.component.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, OnInit} from "@angular/core"; -import {distinctUntilChanged} from "rxjs/operators"; -import {I18nService} from "app/modules/common/i18n/i18n.service"; -import {EnterpriseTrialService} from "app/components/enterprise/enterprise-trial.service"; -import {HttpClient, HttpErrorResponse} from "@angular/common/http"; -import {EEActiveTrialBase} from "core-components/enterprise/enterprise-active-trial/ee-active-trial.base"; -import {GonService} from "core-app/modules/common/gon/gon.service"; +import { ChangeDetectorRef, Component, ElementRef, OnInit } from "@angular/core"; +import { distinctUntilChanged } from "rxjs/operators"; +import { I18nService } from "app/modules/common/i18n/i18n.service"; +import { EnterpriseTrialService } from "app/components/enterprise/enterprise-trial.service"; +import { HttpClient, HttpErrorResponse } from "@angular/common/http"; +import { EEActiveTrialBase } from "core-components/enterprise/enterprise-active-trial/ee-active-trial.base"; +import { GonService } from "core-app/modules/common/gon/gon.service"; @Component({ selector: 'enterprise-active-trial', @@ -75,7 +75,7 @@ export class EEActiveTrialComponent extends EEActiveTrialBase implements OnInit } private initialize():void { - let eeTrialKey = this.Gon.get('ee_trial_key') as any; + const eeTrialKey = this.Gon.get('ee_trial_key') as any; if (eeTrialKey && !this.eeTrialService.userData$.hasValue()) { // after reload: get data from Augur using the trial key saved in gon diff --git a/frontend/src/app/components/enterprise/enterprise-base.component.ts b/frontend/src/app/components/enterprise/enterprise-base.component.ts index a2fc03a381d..3aa8b93c15a 100644 --- a/frontend/src/app/components/enterprise/enterprise-base.component.ts +++ b/frontend/src/app/components/enterprise/enterprise-base.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Injector} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {EnterpriseTrialModal} from "core-components/enterprise/enterprise-modal/enterprise-trial.modal"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {EnterpriseTrialService} from "core-components/enterprise/enterprise-trial.service"; +import { Component, Injector } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { EnterpriseTrialModal } from "core-components/enterprise/enterprise-modal/enterprise-trial.modal"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { EnterpriseTrialService } from "core-components/enterprise/enterprise-trial.service"; export const enterpriseBaseSelector = 'enterprise-base'; diff --git a/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial-form/ee-trial-form.component.ts b/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial-form/ee-trial-form.component.ts index 8c1574c6709..4f0e969e16a 100644 --- a/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial-form/ee-trial-form.component.ts +++ b/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial-form/ee-trial-form.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef} from "@angular/core"; -import {FormBuilder, Validators} from "@angular/forms"; -import {I18nService} from "app/modules/common/i18n/i18n.service"; -import {EnterpriseTrialData, EnterpriseTrialService} from "core-components/enterprise/enterprise-trial.service"; -import {CurrentUserService} from "core-components/user/current-user.service"; -import {I18nHelpers} from "core-app/helpers/i18n/localized-link"; +import { Component, ElementRef } from "@angular/core"; +import { FormBuilder, Validators } from "@angular/forms"; +import { I18nService } from "app/modules/common/i18n/i18n.service"; +import { EnterpriseTrialData, EnterpriseTrialService } from "core-components/enterprise/enterprise-trial.service"; +import { CurrentUserService } from "core-components/user/current-user.service"; +import { I18nHelpers } from "core-app/helpers/i18n/localized-link"; const newsletterURL = 'https://www.openproject.com/newsletter/'; diff --git a/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.ts b/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.ts index a5c2a47fab6..26b7fb74d56 100644 --- a/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.ts +++ b/frontend/src/app/components/enterprise/enterprise-modal/enterprise-trial.modal.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, Input, ViewChild} from "@angular/core"; -import {DomSanitizer, SafeResourceUrl} from "@angular/platform-browser"; -import {FormControl, FormGroup} from "@angular/forms"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {I18nService} from "app/modules/common/i18n/i18n.service"; -import {EETrialFormComponent} from "core-components/enterprise/enterprise-modal/enterprise-trial-form/ee-trial-form.component"; -import {EnterpriseTrialService} from "core-components/enterprise/enterprise-trial.service"; +import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, Input, ViewChild } from "@angular/core"; +import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser"; +import { FormControl, FormGroup } from "@angular/forms"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { I18nService } from "app/modules/common/i18n/i18n.service"; +import { EETrialFormComponent } from "core-components/enterprise/enterprise-modal/enterprise-trial-form/ee-trial-form.component"; +import { EnterpriseTrialService } from "core-components/enterprise/enterprise-trial.service"; export const eeOnboardingVideoURL = 'https://www.youtube.com/embed/zLMSydhFSkw?autoplay=1'; diff --git a/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts b/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts index 956b43cbf48..a36d6e736db 100644 --- a/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts +++ b/frontend/src/app/components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit} from "@angular/core"; -import {I18nService} from "app/modules/common/i18n/i18n.service"; -import {EnterpriseTrialService} from "app/components/enterprise/enterprise-trial.service"; -import {HttpClient} from "@angular/common/http"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {distinctUntilChanged} from "rxjs/operators"; -import {TimezoneService} from "core-components/datetime/timezone.service"; +import { Component, ElementRef, OnInit } from "@angular/core"; +import { I18nService } from "app/modules/common/i18n/i18n.service"; +import { EnterpriseTrialService } from "app/components/enterprise/enterprise-trial.service"; +import { HttpClient } from "@angular/common/http"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { distinctUntilChanged } from "rxjs/operators"; +import { TimezoneService } from "core-components/datetime/timezone.service"; @Component({ selector: 'enterprise-trial-waiting', @@ -41,7 +41,7 @@ import {TimezoneService} from "core-components/datetime/timezone.service"; }) export class EETrialWaitingComponent implements OnInit { created = this.timezoneService.formattedDate(new Date().toString()); - email:string = ''; + email = ''; public text = { confirmation_info: (date:string, email:string) => this.I18n.t('js.admin.enterprise.trial.confirmation_info',{ @@ -66,9 +66,9 @@ export class EETrialWaitingComponent implements OnInit { } ngOnInit() { - let eeTrialKey = (window as any).gon.ee_trial_key; + const eeTrialKey = (window as any).gon.ee_trial_key; if (eeTrialKey) { - let savedDateStr = eeTrialKey.created.split(' ')[0]; + const savedDateStr = eeTrialKey.created.split(' ')[0]; this.created = this.timezoneService.formattedDate(savedDateStr); } diff --git a/frontend/src/app/components/enterprise/enterprise-trial.service.ts b/frontend/src/app/components/enterprise/enterprise-trial.service.ts index d7b868f4bb9..ab4808527ba 100644 --- a/frontend/src/app/components/enterprise/enterprise-trial.service.ts +++ b/frontend/src/app/components/enterprise/enterprise-trial.service.ts @@ -1,10 +1,10 @@ -import {Injectable} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HttpClient, HttpErrorResponse, HttpHeaders} from "@angular/common/http"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {FormGroup} from "@angular/forms"; -import {input} from "reactivestates"; +import { Injectable } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HttpClient, HttpErrorResponse, HttpHeaders } from "@angular/common/http"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { FormGroup } from "@angular/forms"; +import { input } from "reactivestates"; export interface EnterpriseTrialData { id?:string; @@ -33,7 +33,7 @@ export class EnterpriseTrialService { public cancelled = false; public status:'mailSubmitted'|'startTrial'|undefined; public error:HttpErrorResponse|undefined; - public emailInvalid:boolean = false; + public emailInvalid = false; public text = { invalid_email: this.I18n.t('js.admin.enterprise.trial.form.invalid_email'), taken_email: this.I18n.t('js.admin.enterprise.trial.form.taken_email'), @@ -44,7 +44,7 @@ export class EnterpriseTrialService { protected http:HttpClient, readonly pathHelper:PathHelperService, protected notificationsService:NotificationsService) { - let gon = (window as any).gon; + const gon = (window as any).gon; this.baseUrlAugur = gon.augur_url; this.tokenVersion = gon.token_version; @@ -56,7 +56,7 @@ export class EnterpriseTrialService { // send POST request with form object // receive an enterprise trial link to access a token public sendForm(form:FormGroup) { - const request = { ...form.value, token_version: this.tokenVersion}; + const request = { ...form.value, token_version: this.tokenVersion }; this.http.post(this.baseUrlAugur + '/public/v1/trials', request) .toPromise() .then((enterpriseTrial:any) => { @@ -119,7 +119,7 @@ export class EnterpriseTrialService { // and to ask for the corresponding user data saved in Augur private saveTrialKey(resendlink:string) { // extract token from resend link - let trialKey = resendlink.split('/')[6]; + const trialKey = resendlink.split('/')[6]; return this.http.post( this.pathHelper.appBasePath + '/admin/enterprise/save_trial_key', { trial_key: trialKey }, @@ -152,8 +152,8 @@ export class EnterpriseTrialService { // Without this deletion, we run into an endless loop of an confirmed mail, but no saved token. this.http .delete( - this.pathHelper.api.v3.apiV3Base + '/admin/enterprise/delete_trial_key', - { withCredentials: true } + this.pathHelper.api.v3.apiV3Base + '/admin/enterprise/delete_trial_key', + { withCredentials: true } ) .toPromise(); @@ -162,7 +162,7 @@ export class EnterpriseTrialService { } // retry request while waiting for mail confirmation - public retryConfirmation(delay:number = 5000, retries:number = 60) { + public retryConfirmation(delay = 5000, retries = 60) { if (this.cancelled || this.confirmed) { return; } else if (retries === 0) { @@ -210,7 +210,7 @@ export class EnterpriseTrialService { } public get errorMsg() { - let error:string = ''; + let error = ''; if (this.emailInvalid) { error = this.text.invalid_email; } else if (this.domainTaken) { diff --git a/frontend/src/app/components/enterprise/openproject-enterprise.module.ts b/frontend/src/app/components/enterprise/openproject-enterprise.module.ts index bb3a2ac2fba..e340553779c 100644 --- a/frontend/src/app/components/enterprise/openproject-enterprise.module.ts +++ b/frontend/src/app/components/enterprise/openproject-enterprise.module.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {EnterpriseTrialService} from "core-components/enterprise/enterprise-trial.service"; -import {EnterpriseBaseComponent} from "core-components/enterprise/enterprise-base.component"; -import {EnterpriseTrialModal} from "core-components/enterprise/enterprise-modal/enterprise-trial.modal"; -import {EETrialFormComponent} from "core-components/enterprise/enterprise-modal/enterprise-trial-form/ee-trial-form.component"; -import {EETrialWaitingComponent} from "core-components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component"; -import {EEActiveTrialComponent} from "core-components/enterprise/enterprise-active-trial/ee-active-trial.component"; -import {EEActiveSavedTrialComponent} from "core-components/enterprise/enterprise-active-trial/ee-active-saved-trial.component"; -import {FormsModule, ReactiveFormsModule} from "@angular/forms"; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { EnterpriseTrialService } from "core-components/enterprise/enterprise-trial.service"; +import { EnterpriseBaseComponent } from "core-components/enterprise/enterprise-base.component"; +import { EnterpriseTrialModal } from "core-components/enterprise/enterprise-modal/enterprise-trial.modal"; +import { EETrialFormComponent } from "core-components/enterprise/enterprise-modal/enterprise-trial-form/ee-trial-form.component"; +import { EETrialWaitingComponent } from "core-components/enterprise/enterprise-trial-waiting/ee-trial-waiting.component"; +import { EEActiveTrialComponent } from "core-components/enterprise/enterprise-active-trial/ee-active-trial.component"; +import { EEActiveSavedTrialComponent } from "core-components/enterprise/enterprise-active-trial/ee-active-saved-trial.component"; +import { FormsModule, ReactiveFormsModule } from "@angular/forms"; @NgModule({ imports: [ diff --git a/frontend/src/app/components/filters/abstract-filter-date-time-value/abstract-filter-date-time-value.controller.ts b/frontend/src/app/components/filters/abstract-filter-date-time-value/abstract-filter-date-time-value.controller.ts index 57da99a5a8e..5ab3e7b2f71 100644 --- a/frontend/src/app/components/filters/abstract-filter-date-time-value/abstract-filter-date-time-value.controller.ts +++ b/frontend/src/app/components/filters/abstract-filter-date-time-value/abstract-filter-date-time-value.controller.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Moment} from 'moment'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Moment } from 'moment'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { OnInit, Directive } from '@angular/core'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Directive() export abstract class AbstractDateTimeValueController extends UntilDestroyedMixin implements OnInit { @@ -67,7 +67,7 @@ export abstract class AbstractDateTimeValueController extends UntilDestroyedMixi } public get isTimeZoneDifferent() { - let value = this.lowerBoundary || this.upperBoundary; + const value = this.lowerBoundary || this.upperBoundary; if (!value) { return false; diff --git a/frontend/src/app/components/filters/filter-boolean-value/filter-boolean-value.component.ts b/frontend/src/app/components/filters/filter-boolean-value/filter-boolean-value.component.ts index dbe35d1b5cc..6b666b94faf 100644 --- a/frontend/src/app/components/filters/filter-boolean-value/filter-boolean-value.component.ts +++ b/frontend/src/app/components/filters/filter-boolean-value/filter-boolean-value.component.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, EventEmitter, Input, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; @Component({ selector: 'filter-boolean-value', templateUrl: './filter-boolean-value.component.html' }) export class FilterBooleanValueComponent { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new EventEmitter(); diff --git a/frontend/src/app/components/filters/filter-container/filter-container.directive.ts b/frontend/src/app/components/filters/filter-container/filter-container.directive.ts index 2f59658e287..d67a5a20222 100644 --- a/frontend/src/app/components/filters/filter-container/filter-container.directive.ts +++ b/frontend/src/app/components/filters/filter-container/filter-container.directive.ts @@ -36,13 +36,13 @@ import { Output, ViewEncapsulation } from '@angular/core'; -import {WorkPackageViewFiltersService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service'; -import {WorkPackageFiltersService} from 'core-components/filters/wp-filters/wp-filters.service'; -import {DebouncedEventEmitter} from "core-components/angular/debounced-event-emitter"; -import {QueryFilterInstanceResource} from "core-app/modules/hal/resources/query-filter-instance-resource"; -import {Observable} from "rxjs"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { WorkPackageViewFiltersService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service'; +import { WorkPackageFiltersService } from 'core-components/filters/wp-filters/wp-filters.service'; +import { DebouncedEventEmitter } from "core-components/angular/debounced-event-emitter"; +import { QueryFilterInstanceResource } from "core-app/modules/hal/resources/query-filter-instance-resource"; +import { Observable } from "rxjs"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; @Component({ templateUrl: './filter-container.directive.html', @@ -50,11 +50,11 @@ import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; selector: 'filter-container' }) export class WorkPackageFilterContainerComponent extends UntilDestroyedMixin implements OnInit, OnDestroy { - @Input('showFilterButton') showFilterButton:boolean = false; + @Input('showFilterButton') showFilterButton = false; @Input('filterButtonText') filterButtonText:string = I18n.t('js.button_filter'); @Output() public filtersChanged = new DebouncedEventEmitter(componentDestroyed(this)); - public visible$:Observable; + public visible$:Observable; public filters = this.wpTableFilters.current; public loaded = false; @@ -79,7 +79,7 @@ export class WorkPackageFilterContainerComponent extends UntilDestroyedMixin imp } public replaceIfComplete(filters:QueryFilterInstanceResource[]) { - let available = filters.filter(el => this.wpTableFilters.isAvailable(el)); + const available = filters.filter(el => this.wpTableFilters.isAvailable(el)); this.wpTableFilters.replaceIfComplete(available); this.filtersChanged.emit(available); } diff --git a/frontend/src/app/components/filters/filter-date-time-value/filter-date-time-value.component.ts b/frontend/src/app/components/filters/filter-date-time-value/filter-date-time-value.component.ts index 6bfded5eec9..b06f2a59c7c 100644 --- a/frontend/src/app/components/filters/filter-date-time-value/filter-date-time-value.component.ts +++ b/frontend/src/app/components/filters/filter-date-time-value/filter-date-time-value.component.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, OnInit, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {DebouncedEventEmitter} from 'core-components/angular/debounced-event-emitter'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; -import {Moment} from 'moment'; -import {AbstractDateTimeValueController} from '../abstract-filter-date-time-value/abstract-filter-date-time-value.controller'; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { Component, Input, OnInit, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { DebouncedEventEmitter } from 'core-components/angular/debounced-event-emitter'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; +import { Moment } from 'moment'; +import { AbstractDateTimeValueController } from '../abstract-filter-date-time-value/abstract-filter-date-time-value.controller'; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; @Component({ selector: 'filter-date-time-value', templateUrl: './filter-date-time-value.component.html' }) export class FilterDateTimeValueComponent extends AbstractDateTimeValueController implements OnInit { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new DebouncedEventEmitter(componentDestroyed(this)); diff --git a/frontend/src/app/components/filters/filter-date-times-value/filter-date-times-value.component.ts b/frontend/src/app/components/filters/filter-date-times-value/filter-date-times-value.component.ts index 542a38a1013..75010d8eb00 100644 --- a/frontend/src/app/components/filters/filter-date-times-value/filter-date-times-value.component.ts +++ b/frontend/src/app/components/filters/filter-date-times-value/filter-date-times-value.component.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {Moment} from 'moment'; -import {AbstractDateTimeValueController} from '../abstract-filter-date-time-value/abstract-filter-date-time-value.controller' -import {Component, Input, OnInit, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {DebouncedEventEmitter} from 'core-components/angular/debounced-event-emitter'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { Moment } from 'moment'; +import { AbstractDateTimeValueController } from '../abstract-filter-date-time-value/abstract-filter-date-time-value.controller'; +import { Component, Input, OnInit, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { DebouncedEventEmitter } from 'core-components/angular/debounced-event-emitter'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; @Component({ selector: 'filter-date-times-value', templateUrl: './filter-date-times-value.component.html' }) export class FilterDateTimesValueComponent extends AbstractDateTimeValueController implements OnInit { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new DebouncedEventEmitter(componentDestroyed(this)); diff --git a/frontend/src/app/components/filters/filter-date-value/filter-date-value.component.ts b/frontend/src/app/components/filters/filter-date-value/filter-date-value.component.ts index ba5de7604d8..c91a5bfef29 100644 --- a/frontend/src/app/components/filters/filter-date-value/filter-date-value.component.ts +++ b/frontend/src/app/components/filters/filter-date-value/filter-date-value.component.ts @@ -26,21 +26,21 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {DebouncedEventEmitter} from 'core-components/angular/debounced-event-emitter'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { Component, Input, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { DebouncedEventEmitter } from 'core-components/angular/debounced-event-emitter'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; @Component({ selector: 'filter-date-value', templateUrl: './filter-date-value.component.html' }) export class FilterDateValueComponent extends UntilDestroyedMixin { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new DebouncedEventEmitter(componentDestroyed(this)); diff --git a/frontend/src/app/components/filters/filter-dates-value/filter-dates-value.component.ts b/frontend/src/app/components/filters/filter-dates-value/filter-dates-value.component.ts index e0e5b85c117..fe403decd95 100644 --- a/frontend/src/app/components/filters/filter-dates-value/filter-dates-value.component.ts +++ b/frontend/src/app/components/filters/filter-dates-value/filter-dates-value.component.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {Component, Input, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {DebouncedEventEmitter} from 'core-components/angular/debounced-event-emitter'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { Component, Input, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { DebouncedEventEmitter } from 'core-components/angular/debounced-event-emitter'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; import * as moment from 'moment'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; @Component({ selector: 'filter-dates-value', templateUrl: './filter-dates-value.component.html' }) export class FilterDatesValueComponent extends UntilDestroyedMixin { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new DebouncedEventEmitter(componentDestroyed(this)); diff --git a/frontend/src/app/components/filters/filter-integer-value/filter-integer-value.component.ts b/frontend/src/app/components/filters/filter-integer-value/filter-integer-value.component.ts index 1d049e8a131..de5a8f0622c 100644 --- a/frontend/src/app/components/filters/filter-integer-value/filter-integer-value.component.ts +++ b/frontend/src/app/components/filters/filter-integer-value/filter-integer-value.component.ts @@ -27,21 +27,21 @@ //++ -import {QueryFilterResource} from 'core-app/modules/hal/resources/query-filter-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {Component, Input, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {DebouncedEventEmitter} from 'core-components/angular/debounced-event-emitter'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { QueryFilterResource } from 'core-app/modules/hal/resources/query-filter-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { Component, Input, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { DebouncedEventEmitter } from 'core-components/angular/debounced-event-emitter'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; @Component({ selector: 'filter-integer-value', templateUrl: './filter-integer-value.component.html' }) export class FilterIntegerValueComponent extends UntilDestroyedMixin { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new DebouncedEventEmitter(componentDestroyed(this)); @@ -66,13 +66,13 @@ export class FilterIntegerValueComponent extends UntilDestroyedMixin { public get unit() { switch ((this.schema.filter.allowedValues as QueryFilterResource[])[0].id) { - case 'startDate': - case 'dueDate': - case 'updatedAt': - case 'createdAt': - return this.I18n.t('js.work_packages.time_relative.days'); - default: - return ''; + case 'startDate': + case 'dueDate': + case 'updatedAt': + case 'createdAt': + return this.I18n.t('js.work_packages.time_relative.days'); + default: + return ''; } } diff --git a/frontend/src/app/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts b/frontend/src/app/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts index a90c75baea5..7a4f7a6b4d8 100644 --- a/frontend/src/app/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts +++ b/frontend/src/app/components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component.ts @@ -1,13 +1,13 @@ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {AngularTrackingHelpers} from 'core-components/angular/tracking-functions'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {HalResourceSortingService} from 'core-app/modules/hal/services/hal-resource-sorting.service'; -import {NgSelectComponent} from '@ng-select/ng-select'; -import {APIV3Service} from 'core-app/modules/apiv3/api-v3.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { AfterViewInit, ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { AngularTrackingHelpers } from 'core-components/angular/tracking-functions'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { HalResourceSortingService } from 'core-app/modules/hal/services/hal-resource-sorting.service'; +import { NgSelectComponent } from '@ng-select/ng-select'; +import { APIV3Service } from 'core-app/modules/apiv3/api-v3.service'; import { DebouncedRequestSwitchmap, errorNotificationHandler } from 'core-app/helpers/rxjs/debounced-input-switchmap'; import { ValueOption } from 'core-app/modules/fields/edit/field-types/select-edit-field.component'; import { Observable } from 'rxjs'; @@ -21,7 +21,7 @@ import { APIv3UserPaths } from 'core-app/modules/apiv3/endpoints/users/apiv3-use import { APIV3WorkPackagePaths } from 'core-app/modules/apiv3/endpoints/work_packages/api-v3-work-package-paths'; import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; import { UntilDestroyedMixin } from 'core-app/helpers/angular/until-destroyed.mixin'; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; export interface FilterConditions {name:string; operator:FilterOperator; values:unknown[]|boolean; } @Component({ @@ -33,7 +33,7 @@ export interface FilterConditions {name:string; operator:FilterOperator; values: export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMixin implements OnInit, AfterViewInit { @Input() public filter:QueryFilterInstanceResource; - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Output() public filterChanged = new EventEmitter(); private _isEmpty:boolean; @@ -73,7 +73,7 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMix readonly I18n:I18nService, protected currentProject:CurrentProjectService, readonly halNotification:HalResourceNotificationService) { - super(); + super(); } ngOnInit() { @@ -90,14 +90,14 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMix initialization() { this - .requests - .output$.pipe( - this.untilDestroyed() - ) - .subscribe((values:HalResource[]) => { - this.availableOptions = values; - this.cdRef.detectChanges(); - }); + .requests + .output$.pipe( + this.untilDestroyed() + ) + .subscribe((values:HalResource[]) => { + this.availableOptions = values; + this.cdRef.detectChanges(); + }); } public loadAvailable(matching:string):Observable { @@ -132,10 +132,10 @@ export class FilterSearchableMultiselectValueComponent extends UntilDestroyedMix public repositionDropdown() { if (this.ngSelectInstance) { - const component = (this.ngSelectInstance) as any; - if (component && component.dropdownPanel) { - component.dropdownPanel._updatePosition(); - } + const component = (this.ngSelectInstance) as any; + if (component && component.dropdownPanel) { + component.dropdownPanel._updatePosition(); + } } } } diff --git a/frontend/src/app/components/filters/filter-string-value/filter-string-value.component.ts b/frontend/src/app/components/filters/filter-string-value/filter-string-value.component.ts index ce45a85ca7e..21799e3cad5 100644 --- a/frontend/src/app/components/filters/filter-string-value/filter-string-value.component.ts +++ b/frontend/src/app/components/filters/filter-string-value/filter-string-value.component.ts @@ -26,20 +26,20 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {DebouncedEventEmitter} from 'core-components/angular/debounced-event-emitter'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { Component, Input, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { DebouncedEventEmitter } from 'core-components/angular/debounced-event-emitter'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; @Component({ selector: 'filter-string-value', templateUrl: './filter-string-value.component.html' }) export class FilterStringValueComponent extends UntilDestroyedMixin { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new DebouncedEventEmitter(componentDestroyed(this)); diff --git a/frontend/src/app/components/filters/filter-toggled-multiselect-value/filter-toggled-multiselect-value.component.ts b/frontend/src/app/components/filters/filter-toggled-multiselect-value/filter-toggled-multiselect-value.component.ts index 367e8f71586..3abe8254988 100644 --- a/frontend/src/app/components/filters/filter-toggled-multiselect-value/filter-toggled-multiselect-value.component.ts +++ b/frontend/src/app/components/filters/filter-toggled-multiselect-value/filter-toggled-multiselect-value.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {RootResource} from 'core-app/modules/hal/resources/root-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { RootResource } from 'core-app/modules/hal/resources/root-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; import { AfterViewInit, ChangeDetectionStrategy, @@ -42,14 +42,14 @@ import { Output, ViewChild } from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {AngularTrackingHelpers} from 'core-components/angular/tracking-functions'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {HalResourceSortingService} from "core-app/modules/hal/services/hal-resource-sorting.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {CurrentUserService} from "core-components/user/current-user.service"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { AngularTrackingHelpers } from 'core-components/angular/tracking-functions'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { HalResourceSortingService } from "core-app/modules/hal/services/hal-resource-sorting.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { CurrentUserService } from "core-components/user/current-user.service"; @Component({ selector: 'filter-toggled-multiselect-value', @@ -57,7 +57,7 @@ import {CurrentUserService} from "core-components/user/current-user.service"; templateUrl: './filter-toggled-multiselect-value.component.html' }) export class FilterToggledMultiselectValueComponent implements OnInit, AfterViewInit { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new EventEmitter(); @@ -125,7 +125,7 @@ export class FilterToggledMultiselectValueComponent implements OnInit, AfterView } private get isUserResource() { - let type = _.get(this.filter.currentSchema, 'values.type', null); + const type = _.get(this.filter.currentSchema, 'values.type', null); return type && type.indexOf('User') > 0; } @@ -138,8 +138,8 @@ export class FilterToggledMultiselectValueComponent implements OnInit, AfterView } private loadAllowedValues() { - let valuesSchema = this.filter.currentSchema!.values!; - let loadingPromises = [(valuesSchema.allowedValues as any).$load()]; + const valuesSchema = this.filter.currentSchema!.values!; + const loadingPromises = [(valuesSchema.allowedValues as any).$load()]; // If it is a User resource, we want to have the 'me' option. // We therefore fetch the current user from the api and copy @@ -152,7 +152,7 @@ export class FilterToggledMultiselectValueComponent implements OnInit, AfterView Promise.all(loadingPromises) .then(((resources:Array) => { - let options = (resources[0] as CollectionResource).elements; + const options = (resources[0] as CollectionResource).elements; this.availableOptions = options; @@ -167,7 +167,7 @@ export class FilterToggledMultiselectValueComponent implements OnInit, AfterView return; } - let me:HalResource = this.halResourceService.createHalResource( + const me:HalResource = this.halResourceService.createHalResource( { _links: { self: { diff --git a/frontend/src/app/components/filters/query-filter/query-filter.component.ts b/frontend/src/app/components/filters/query-filter/query-filter.component.ts index be52a64a11b..3d86bbfed24 100644 --- a/frontend/src/app/components/filters/query-filter/query-filter.component.ts +++ b/frontend/src/app/components/filters/query-filter/query-filter.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {QueryFilterResource} from 'core-app/modules/hal/resources/query-filter-resource'; -import {AngularTrackingHelpers} from 'core-components/angular/tracking-functions'; -import {QueryFilterInstanceResource} from "core-app/modules/hal/resources/query-filter-instance-resource"; -import {BannersService} from "core-app/modules/common/enterprise/banners.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { QueryFilterResource } from 'core-app/modules/hal/resources/query-filter-resource'; +import { AngularTrackingHelpers } from 'core-components/angular/tracking-functions'; +import { QueryFilterInstanceResource } from "core-app/modules/hal/resources/query-filter-instance-resource"; +import { BannersService } from "core-app/modules/common/enterprise/banners.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; import { CurrentProjectService } from 'core-app/components/projects/current-project.service'; @Component({ @@ -41,14 +41,14 @@ import { CurrentProjectService } from 'core-app/components/projects/current-proj templateUrl: './query-filter.component.html' }) export class QueryFilterComponent implements OnInit { - @Input() public shouldFocus:boolean = false; + @Input() public shouldFocus = false; @Input() public filter:QueryFilterInstanceResource; @Output() public filterChanged = new EventEmitter(); @Output() public deactivateFilter = new EventEmitter(); public availableOperators:any; - public showValuesInput:boolean = false; - public eeShowBanners:boolean = false; + public showValuesInput = false; + public eeShowBanners = false; public trackByHref = AngularTrackingHelpers.halHref; public compareByHref = AngularTrackingHelpers.compareByHref; diff --git a/frontend/src/app/components/filters/query-filters/query-filters.component.ts b/frontend/src/app/components/filters/query-filters/query-filters.component.ts index 02c607a1ce6..c9cee878e1e 100644 --- a/frontend/src/app/components/filters/query-filters/query-filters.component.ts +++ b/frontend/src/app/components/filters/query-filters/query-filters.component.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, Output, ViewChild} from '@angular/core'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {QueryFilterResource} from 'core-app/modules/hal/resources/query-filter-resource'; -import {DebouncedEventEmitter} from 'core-components/angular/debounced-event-emitter'; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {BannersService} from "core-app/modules/common/enterprise/banners.service"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {WorkPackageFiltersService} from "core-components/filters/wp-filters/wp-filters.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { ChangeDetectionStrategy, Component, Input, OnChanges, OnInit, Output, ViewChild } from '@angular/core'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { QueryFilterResource } from 'core-app/modules/hal/resources/query-filter-resource'; +import { DebouncedEventEmitter } from 'core-components/angular/debounced-event-emitter'; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { BannersService } from "core-app/modules/common/enterprise/banners.service"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { WorkPackageFiltersService } from "core-components/filters/wp-filters/wp-filters.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; const ADD_FILTER_SELECT_INDEX = -1; @@ -51,13 +51,13 @@ export class QueryFiltersComponent extends UntilDestroyedMixin implements OnInit @ViewChild(NgSelectComponent) public ngSelectComponent:NgSelectComponent; @Input() public filters:QueryFilterInstanceResource[]; - @Input() public showCloseFilter:boolean = false; + @Input() public showCloseFilter = false; @Output() public filtersChanged = new DebouncedEventEmitter(componentDestroyed(this)); public remainingFilters:any[] = []; - public eeShowBanners:boolean = false; - public focusElementIndex:number = 0; + public eeShowBanners = false; + public focusElementIndex = 0; public trackByName = AngularTrackingHelpers.trackByName; public text = { @@ -90,7 +90,7 @@ export class QueryFiltersComponent extends UntilDestroyedMixin implements OnInit public onFilterAdded(filterToBeAdded:QueryFilterResource) { if (filterToBeAdded) { - let newFilter = this.wpTableFilters.instantiate(filterToBeAdded); + const newFilter = this.wpTableFilters.instantiate(filterToBeAdded); this.filters.push(newFilter); const index = this.currentFilterLength(); @@ -107,7 +107,7 @@ export class QueryFiltersComponent extends UntilDestroyedMixin implements OnInit } public deactivateFilter(removedFilter:QueryFilterInstanceResource) { - let index = this.filters.indexOf(removedFilter); + const index = this.filters.indexOf(removedFilter); _.remove(this.filters, f => f.id === removedFilter.id); this.filtersChanged.emit(this.filters); @@ -128,7 +128,7 @@ export class QueryFiltersComponent extends UntilDestroyedMixin implements OnInit } private updateFilterFocus(index:number) { - let activeFilterCount = this.currentFilterLength(); + const activeFilterCount = this.currentFilterLength(); if (activeFilterCount === 0) { this.focusElementIndex = ADD_FILTER_SELECT_INDEX; diff --git a/frontend/src/app/components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component.ts b/frontend/src/app/components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component.ts index 0ed1c88278d..3cb8b2783e5 100644 --- a/frontend/src/app/components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component.ts +++ b/frontend/src/app/components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, EventEmitter, Output} from '@angular/core'; -import {I18nService} from "app/modules/common/i18n/i18n.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {Subject} from "rxjs"; -import {debounceTime, distinctUntilChanged, map, tap} from "rxjs/operators"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {input} from "reactivestates"; -import {QueryFilterResource} from "core-app/modules/hal/resources/query-filter-resource"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, EventEmitter, Output } from '@angular/core'; +import { I18nService } from "app/modules/common/i18n/i18n.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { Subject } from "rxjs"; +import { debounceTime, distinctUntilChanged, map, tap } from "rxjs/operators"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { input } from "reactivestates"; +import { QueryFilterResource } from "core-app/modules/hal/resources/query-filter-resource"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'wp-filter-by-text-input', @@ -94,7 +94,7 @@ export class WorkPackageFilterByTextInputComponent extends UntilDestroyedMixin { filter.values = [term]; }); } else { - let filter = this.wpTableFilters.find('search'); + const filter = this.wpTableFilters.find('search'); this.wpTableFilters.remove(filter!); diff --git a/frontend/src/app/components/filters/wp-filters/wp-filters.service.ts b/frontend/src/app/components/filters/wp-filters/wp-filters.service.ts index eed268f0c8d..1ede48c6a8d 100644 --- a/frontend/src/app/components/filters/wp-filters/wp-filters.service.ts +++ b/frontend/src/app/components/filters/wp-filters/wp-filters.service.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; -import {input} from "reactivestates"; -import {Observable} from "rxjs"; -import {takeUntil} from "rxjs/operators"; +import { Injectable } from "@angular/core"; +import { input } from "reactivestates"; +import { Observable } from "rxjs"; +import { takeUntil } from "rxjs/operators"; @Injectable() export class WorkPackageFiltersService { diff --git a/frontend/src/app/components/homescreen/blocks/new-features.component.spec.ts b/frontend/src/app/components/homescreen/blocks/new-features.component.spec.ts index 513dda6bac1..e9dfeb67234 100644 --- a/frontend/src/app/components/homescreen/blocks/new-features.component.spec.ts +++ b/frontend/src/app/components/homescreen/blocks/new-features.component.spec.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DebugElement} from "@angular/core"; +import { DebugElement } from "@angular/core"; -import {ComponentFixture, fakeAsync, TestBed} from '@angular/core/testing'; -import {By} from "@angular/platform-browser"; +import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing'; +import { By } from "@angular/platform-browser"; import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; import { HomescreenNewFeaturesBlockComponent } from './new-features.component'; diff --git a/frontend/src/app/components/homescreen/blocks/new-features.component.ts b/frontend/src/app/components/homescreen/blocks/new-features.component.ts index 741991b1488..9503d6b7a12 100644 --- a/frontend/src/app/components/homescreen/blocks/new-features.component.ts +++ b/frontend/src/app/components/homescreen/blocks/new-features.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {DomSanitizer} from "@angular/platform-browser"; -import {BcfRestApi} from "core-app/modules/bim/bcf/bcf-constants.const"; -import {ImageHelpers} from "core-app/helpers/images/path-helper"; +import { Component } from '@angular/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { DomSanitizer } from "@angular/platform-browser"; +import { BcfRestApi } from "core-app/modules/bim/bcf/bcf-constants.const"; +import { ImageHelpers } from "core-app/helpers/images/path-helper"; import imagePath = ImageHelpers.imagePath; export const homescreenNewFeaturesBlockSelector = 'homescreen-new-features-block'; @@ -75,7 +75,7 @@ export class HomescreenNewFeaturesBlockComponent { } public get teaserWebsiteUrl() { - let url = this.translated('learn_about_link'); + const url = this.translated('learn_about_link'); return this.domSanitizer.bypassSecurityTrustResourceUrl(url); } @@ -84,10 +84,10 @@ export class HomescreenNewFeaturesBlockComponent { } private translated(key:string):string { - return this.i18n.t(this.i18nBase + this.i18nPrefix + '.' + key, { list_styling_class: 'widget-box--arrow-links', bcf_api_link: BcfRestApi}); + return this.i18n.t(this.i18nBase + this.i18nPrefix + '.' + key, { list_styling_class: 'widget-box--arrow-links', bcf_api_link: BcfRestApi }); } - private i18nBase:string = 'js.homescreen.blocks.new_features.'; + private i18nBase = 'js.homescreen.blocks.new_features.'; private get i18nPrefix():string { return this.isStandardEdition ? "standard" : "bim"; diff --git a/frontend/src/app/components/html/op-title.service.ts b/frontend/src/app/components/html/op-title.service.ts index b6d824719c9..9f5ba0cb73d 100644 --- a/frontend/src/app/components/html/op-title.service.ts +++ b/frontend/src/app/components/html/op-title.service.ts @@ -1,5 +1,5 @@ -import {Title} from "@angular/platform-browser"; -import {Injectable} from "@angular/core"; +import { Title } from "@angular/platform-browser"; +import { Injectable } from "@angular/core"; const titlePartsSeparator = ' | '; @@ -18,7 +18,7 @@ export class OpTitleService { } public setFirstPart(value:string) { - let parts = this.titleParts; + const parts = this.titleParts; parts[0] = value; this.titleService.setTitle(parts.join(titlePartsSeparator)); diff --git a/frontend/src/app/components/main-menu/main-menu-navigation.service.ts b/frontend/src/app/components/main-menu/main-menu-navigation.service.ts index 1272dcd4e45..5674bee6722 100644 --- a/frontend/src/app/components/main-menu/main-menu-navigation.service.ts +++ b/frontend/src/app/components/main-menu/main-menu-navigation.service.ts @@ -1,6 +1,6 @@ -import {BehaviorSubject} from "rxjs"; -import {filter, take} from "rxjs/operators"; -import {Injectable} from "@angular/core"; +import { BehaviorSubject } from "rxjs"; +import { filter, take } from "rxjs/operators"; +import { Injectable } from "@angular/core"; @Injectable({ providedIn: 'root' }) export class MainMenuNavigationService { @@ -17,22 +17,22 @@ export class MainMenuNavigationService { } private recreateToggler() { - let that = this; + const that = this; // rejigger the main-menu sub-menu functionality. jQuery("#main-menu .toggler").remove(); // remove the togglers so they're inserted properly later. var toggler = jQuery('') .on('click', function() { - let target = jQuery(this); + const target = jQuery(this); if (target.hasClass('toggler')) { // TODO: Instead of hiding the sidebar move sidebar's contents to submenus and cache it. jQuery('#sidebar').toggleClass('-hidden', true); - jQuery(".menu_root li").removeClass('open') + jQuery(".menu_root li").removeClass('open'); jQuery(".menu_root").removeClass('open').addClass('closed'); - let targetLi = target.closest('li') + const targetLi = target.closest('li'); targetLi .addClass('open') .find('li > a:first, .tree-menu--title:first').first().focus(); @@ -54,11 +54,11 @@ export class MainMenuNavigationService { var item = mainItems[index]; var elementId = item.id; - var wrapperElement = jQuery('
') + var wrapperElement = jQuery('
'); // inherit element id if (elementId) { - wrapperElement.attr('id', elementId + '-wrapper') + wrapperElement.attr('id', elementId + '-wrapper'); } return wrapperElement; @@ -81,8 +81,8 @@ export class MainMenuNavigationService { const toggler = this.recreateToggler(); // Emit first active - let active = jQuery('#main-menu .menu_root > li.open').data('name'); - let activeRoot = jQuery('#main-menu .menu_root.open > li').data('name'); + const active = jQuery('#main-menu .menu_root > li.open').data('name'); + const activeRoot = jQuery('#main-menu .menu_root.open > li').data('name'); if (active || activeRoot) { this.navigationEvents$.next(active || activeRoot); } diff --git a/frontend/src/app/components/main-menu/main-menu-toggle.component.ts b/frontend/src/app/components/main-menu/main-menu-toggle.component.ts index 4eb8165af99..1cc566d0b81 100644 --- a/frontend/src/app/components/main-menu/main-menu-toggle.component.ts +++ b/frontend/src/app/components/main-menu/main-menu-toggle.component.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnInit} from '@angular/core'; -import {MainMenuToggleService} from './main-menu-toggle.service'; -import {distinctUntilChanged} from 'rxjs/operators'; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {DeviceService} from "app/modules/common/browser/device.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnInit } from '@angular/core'; +import { MainMenuToggleService } from './main-menu-toggle.service'; +import { distinctUntilChanged } from 'rxjs/operators'; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { DeviceService } from "app/modules/common/browser/device.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export const mainMenuToggleSelector = 'main-menu-toggle'; @@ -53,7 +53,7 @@ export const mainMenuToggleSelector = 'main-menu-toggle'; }) export class MainMenuToggleComponent extends UntilDestroyedMixin implements OnInit { - toggleTitle:string = ""; + toggleTitle = ""; @InjectField() currentProject:CurrentProjectService; constructor(readonly toggleService:MainMenuToggleService, diff --git a/frontend/src/app/components/main-menu/main-menu-toggle.service.ts b/frontend/src/app/components/main-menu/main-menu-toggle.service.ts index 1d7e926e66d..bfde8ba533d 100644 --- a/frontend/src/app/components/main-menu/main-menu-toggle.service.ts +++ b/frontend/src/app/components/main-menu/main-menu-toggle.service.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {BehaviorSubject} from 'rxjs'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {DeviceService} from "app/modules/common/browser/device.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injectable, Injector } from '@angular/core'; +import { BehaviorSubject } from 'rxjs'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { DeviceService } from "app/modules/common/browser/device.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; @Injectable({ providedIn: 'root' }) export class MainMenuToggleService { @@ -63,7 +63,9 @@ export class MainMenuToggleService { } public initializeMenu():void { - if (!this.mainMenu) { return; } + if (!this.mainMenu) { + return; + } this.elementWidth = parseInt(window.OpenProject.guardedLocalStorage(this.localStorageKey) as string); const menuCollapsed = window.OpenProject.guardedLocalStorage(this.localStorageStateKey) as string; @@ -72,12 +74,11 @@ export class MainMenuToggleService { this.saveWidth(this.mainMenu.offsetWidth); } else if (menuCollapsed && JSON.parse(menuCollapsed)) { this.closeMenu(); - } - else { + } else { this.setWidth(); } - let currentProject:CurrentProjectService = this.injector.get(CurrentProjectService); + const currentProject:CurrentProjectService = this.injector.get(CurrentProjectService); if (jQuery(document.body).hasClass('controller-my') && this.elementWidth === 0 || currentProject.id === null) { this.saveWidth(this.defaultWidth); } @@ -135,7 +136,7 @@ export class MainMenuToggleService { public setWidth(width?:any):void { if (width !== undefined) { // Leave a minimum amount of space for space fot the content - let maxMenuWidth = this.deviceService.isMobile ? window.innerWidth - 120 : window.innerWidth - 520; + const maxMenuWidth = this.deviceService.isMobile ? window.innerWidth - 120 : window.innerWidth - 520; if (width > maxMenuWidth) { this.elementWidth = maxMenuWidth; } else { @@ -152,7 +153,7 @@ export class MainMenuToggleService { // Send change event when size of menu is changing (menu toggled or resized) // Event should only be fired, when transition is finished - let changeEvent = jQuery.Event("change"); + const changeEvent = jQuery.Event("change"); jQuery('#content-wrapper').on('transitionend webkitTransitionEnd oTransitionEnd otransitionend MSTransitionEnd', () => { this.changeData.next(changeEvent); }); diff --git a/frontend/src/app/components/modals/confirm-dialog/confirm-dialog.modal.ts b/frontend/src/app/components/modals/confirm-dialog/confirm-dialog.modal.ts index 36a1f446bd0..3e1a210a626 100644 --- a/frontend/src/app/components/modals/confirm-dialog/confirm-dialog.modal.ts +++ b/frontend/src/app/components/modals/confirm-dialog/confirm-dialog.modal.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, Inject} from "@angular/core"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { ChangeDetectorRef, Component, ElementRef, Inject } from "@angular/core"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; export interface ConfirmDialogOptions { text:{ diff --git a/frontend/src/app/components/modals/confirm-dialog/confirm-dialog.service.ts b/frontend/src/app/components/modals/confirm-dialog/confirm-dialog.service.ts index d0544adbf38..ab329d8bff0 100644 --- a/frontend/src/app/components/modals/confirm-dialog/confirm-dialog.service.ts +++ b/frontend/src/app/components/modals/confirm-dialog/confirm-dialog.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ConfirmDialogModal, ConfirmDialogOptions} from "core-components/modals/confirm-dialog/confirm-dialog.modal"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {Injectable, Injector} from "@angular/core"; +import { ConfirmDialogModal, ConfirmDialogOptions } from "core-components/modals/confirm-dialog/confirm-dialog.modal"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { Injectable, Injector } from "@angular/core"; @Injectable() export class ConfirmDialogService { diff --git a/frontend/src/app/components/modals/confirm-form-submit/confirm-form-submit.directive.ts b/frontend/src/app/components/modals/confirm-form-submit/confirm-form-submit.directive.ts index 106d31dda48..abf25204752 100644 --- a/frontend/src/app/components/modals/confirm-form-submit/confirm-form-submit.directive.ts +++ b/frontend/src/app/components/modals/confirm-form-submit/confirm-form-submit.directive.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ConfirmDialogService} from './../confirm-dialog/confirm-dialog.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Component, ElementRef, OnInit} from "@angular/core"; +import { ConfirmDialogService } from './../confirm-dialog/confirm-dialog.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Component, ElementRef, OnInit } from "@angular/core"; export const confirmFormSubmitSelector = 'confirm-form-submit'; @@ -80,9 +80,9 @@ export class ConfirmFormSubmitController implements OnInit { showClose: true, closeByDocument: true, }).then(() => { - this.confirmed = true; - this.$form.trigger('submit'); - }) + this.confirmed = true; + this.$form.trigger('submit'); + }) .catch(() => this.confirmed = false); } } diff --git a/frontend/src/app/components/modals/editor/editor-macros.service.ts b/frontend/src/app/components/modals/editor/editor-macros.service.ts index 3d1c79b1565..6a7adb679a9 100644 --- a/frontend/src/app/components/modals/editor/editor-macros.service.ts +++ b/frontend/src/app/components/modals/editor/editor-macros.service.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {Injectable, Injector} from "@angular/core"; -import {WpButtonMacroModal} from "core-components/modals/editor/macro-wp-button-modal/wp-button-macro.modal"; -import {WikiIncludePageMacroModal} from "core-components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal"; -import {CodeBlockMacroModal} from "core-components/modals/editor/macro-code-block-modal/code-block-macro.modal"; -import {ChildPagesMacroModal} from "core-components/modals/editor/macro-child-pages-modal/child-pages-macro.modal"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { Injectable, Injector } from "@angular/core"; +import { WpButtonMacroModal } from "core-components/modals/editor/macro-wp-button-modal/wp-button-macro.modal"; +import { WikiIncludePageMacroModal } from "core-components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal"; +import { CodeBlockMacroModal } from "core-components/modals/editor/macro-code-block-modal/code-block-macro.modal"; +import { ChildPagesMacroModal } from "core-components/modals/editor/macro-child-pages-modal/child-pages-macro.modal"; @Injectable() export class EditorMacrosService { @@ -49,7 +49,7 @@ export class EditorMacrosService { const modal = this.opModalService.show(WpButtonMacroModal, this.injector, { type: typeName, classes: classes }); modal.closingEvent.subscribe((modal:WpButtonMacroModal) => { if (modal.changed) { - resolve({type: modal.type, classes: modal.classes}); + resolve({ type: modal.type, classes: modal.classes }); } }); }); @@ -80,13 +80,13 @@ export class EditorMacrosService { const modal = this.opModalService.show(CodeBlockMacroModal, this.injector, { content: content, languageClass: languageClass }); modal.closingEvent.subscribe((modal:CodeBlockMacroModal) => { if (modal.changed) { - resolve({languageClass: modal.languageClass, content: modal.content}); + resolve({ languageClass: modal.languageClass, content: modal.content }); } }); }); } - /** + /** * Show a modal to edit the child pages macro. * Used from within ckeditor. */ diff --git a/frontend/src/app/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.ts b/frontend/src/app/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.ts index 1e2b4f987e1..d3a90698835 100644 --- a/frontend/src/app/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.ts +++ b/frontend/src/app/components/modals/editor/macro-child-pages-modal/child-pages-macro.modal.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, ViewChild} from "@angular/core"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, ViewChild } from "@angular/core"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ templateUrl: './child-pages-macro.modal.html' @@ -44,8 +44,8 @@ export class ChildPagesMacroModal extends OpModalComponent implements AfterViewI public selectedPage:string; public selectedIncludeParent:boolean; - public page:string = ''; - public includeParent:boolean = false; + public page = ''; + public includeParent = false; @ViewChild('selectedPageInput', { static: true }) selectedPageInput:ElementRef; diff --git a/frontend/src/app/components/modals/editor/macro-code-block-modal/code-block-macro.modal.ts b/frontend/src/app/components/modals/editor/macro-code-block-modal/code-block-macro.modal.ts index e29b0a1237c..06157ec4a82 100644 --- a/frontend/src/app/components/modals/editor/macro-code-block-modal/code-block-macro.modal.ts +++ b/frontend/src/app/components/modals/editor/macro-code-block-modal/code-block-macro.modal.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, ViewChild} from "@angular/core"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, ViewChild } from "@angular/core"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ templateUrl: './code-block-macro.modal.html' @@ -46,7 +46,7 @@ export class CodeBlockMacroModal extends OpModalComponent implements AfterViewIn public languageClass:string; // Language string, e.g, 'ruby' - public _language:string = ''; + public _language = ''; public content:string; // Codemirror instance diff --git a/frontend/src/app/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.ts b/frontend/src/app/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.ts index 5d5cdd34294..d6e1873b646 100644 --- a/frontend/src/app/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.ts +++ b/frontend/src/app/components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, ViewChild} from "@angular/core"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Inject, ViewChild } from "@angular/core"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ templateUrl: './wiki-include-page-macro.modal.html' @@ -43,7 +43,7 @@ export class WikiIncludePageMacroModal extends OpModalComponent implements After public closeOnOutsideClick = true; public selectedPage:string; - public page:string = ''; + public page = ''; @ViewChild('selectedPageInput', { static: true }) selectedPageInput:ElementRef; diff --git a/frontend/src/app/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.ts b/frontend/src/app/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.ts index 81ad09691d6..4e3069e5784 100644 --- a/frontend/src/app/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.ts +++ b/frontend/src/app/components/modals/editor/macro-wp-button-modal/wp-button-macro.modal.ts @@ -34,14 +34,14 @@ import { Inject, ViewChild } from "@angular/core"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {TypeResource} from "core-app/modules/hal/resources/type-resource"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {FormResource} from "core-app/modules/hal/resources/form-resource"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { TypeResource } from "core-app/modules/hal/resources/type-resource"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { FormResource } from "core-app/modules/hal/resources/form-resource"; @Component({ templateUrl: './wp-button-macro.modal.html' @@ -57,8 +57,8 @@ export class WpButtonMacroModal extends OpModalComponent implements AfterViewIni public buttonStyle:boolean; public availableTypes:TypeResource[]; - public type:string = ''; - public classes:string = ''; + public type = ''; + public classes = ''; @ViewChild('typeSelect', { static: true }) typeSelect:ElementRef; diff --git a/frontend/src/app/components/modals/export-modal/wp-table-export.modal.ts b/frontend/src/app/components/modals/export-modal/wp-table-export.modal.ts index 90a044fec06..187dc600e0d 100644 --- a/frontend/src/app/components/modals/export-modal/wp-table-export.modal.ts +++ b/frontend/src/app/components/modals/export-modal/wp-table-export.modal.ts @@ -1,18 +1,18 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, OnInit} from '@angular/core'; -import {OpModalLocalsMap} from 'core-app/modules/modal/modal.types'; -import {OpModalComponent} from 'core-app/modules/modal/modal.component'; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {WorkPackageViewColumnsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {HalLink} from "core-app/modules/hal/hal-link/hal-link"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, OnInit } from '@angular/core'; +import { OpModalLocalsMap } from 'core-app/modules/modal/modal.types'; +import { OpModalComponent } from 'core-app/modules/modal/modal.component'; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { WorkPackageViewColumnsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { HalLink } from "core-app/modules/hal/hal-link/hal-link"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import * as URI from 'urijs'; -import {HttpClient, HttpErrorResponse} from '@angular/common/http'; -import {LoadingIndicatorService} from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {Observable} from 'rxjs'; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {JobStatusModal} from "core-app/modules/job-status/job-status-modal/job-status.modal"; +import { HttpClient, HttpErrorResponse } from '@angular/common/http'; +import { LoadingIndicatorService } from "core-app/modules/common/loading-indicator/loading-indicator.service"; +import { Observable } from 'rxjs'; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { JobStatusModal } from "core-app/modules/job-status/job-status-modal/job-status.modal"; interface ExportLink extends HalLink { identifier:string; @@ -123,13 +123,13 @@ export class WpTableExportModal extends OpModalComponent implements OnInit { } private addColumnsToHref(href:string) { - let columns = this.wpTableColumns.getColumns(); + const columns = this.wpTableColumns.getColumns(); - let columnIds = columns.map(function (column) { + const columnIds = columns.map(function (column) { return column.id; }); - let url = URI(href); + const url = URI(href); // Remove current columns url.removeSearch('columns[]'); url.addSearch('columns[]', columnIds); diff --git a/frontend/src/app/components/modals/modal-wrapper/dynamic-content.modal.ts b/frontend/src/app/components/modals/modal-wrapper/dynamic-content.modal.ts index 69ee38e4a74..a0d750dbec3 100644 --- a/frontend/src/app/components/modals/modal-wrapper/dynamic-content.modal.ts +++ b/frontend/src/app/components/modals/modal-wrapper/dynamic-content.modal.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, Inject, OnDestroy, OnInit} from "@angular/core"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { ChangeDetectorRef, Component, ElementRef, Inject, OnDestroy, OnInit } from "@angular/core"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ templateUrl: './dynamic-content.modal.html' @@ -39,7 +39,7 @@ export class DynamicContentModal extends OpModalComponent implements OnInit, OnD // override superclass // Allowing outside clicks to close the modal leads to the user involuntarily closing // the modal when removing error messages or clicking on labels e.g. in the registration modal. - public closeOnOutsideClick:boolean = false; + public closeOnOutsideClick = false; constructor(readonly elementRef:ElementRef, @Inject(OpModalLocalsToken) public locals:OpModalLocalsMap, @@ -66,8 +66,8 @@ export class DynamicContentModal extends OpModalComponent implements OnInit, OnD .on('click.opdynamicmodal', '.op-modal--close-button, [dynamic-content-modal-close-button]', (evt:JQuery.TriggeredEvent) => { - this.closeMe(evt); - }); + this.closeMe(evt); + }); } ngOnDestroy() { diff --git a/frontend/src/app/components/modals/preview-modal/wp-preview-modal/wp-preview.modal.ts b/frontend/src/app/components/modals/preview-modal/wp-preview-modal/wp-preview.modal.ts index fe301a8d55d..1c61591f6ca 100644 --- a/frontend/src/app/components/modals/preview-modal/wp-preview-modal/wp-preview.modal.ts +++ b/frontend/src/app/components/modals/preview-modal/wp-preview-modal/wp-preview.modal.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, OnInit} from "@angular/core"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken, OpModalService} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {StateService} from "@uirouter/core"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, OnInit } from "@angular/core"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken, OpModalService } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { StateService } from "@uirouter/core"; @Component({ templateUrl: './wp-preview.modal.html', diff --git a/frontend/src/app/components/modals/request-for-confirmation/password-confirmation.modal.ts b/frontend/src/app/components/modals/request-for-confirmation/password-confirmation.modal.ts index 9a29a389237..2478b253ba7 100644 --- a/frontend/src/app/components/modals/request-for-confirmation/password-confirmation.modal.ts +++ b/frontend/src/app/components/modals/request-for-confirmation/password-confirmation.modal.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ConfirmDialogModal} from "core-components/modals/confirm-dialog/confirm-dialog.modal"; -import {Component, ElementRef, OnInit, ViewChild} from "@angular/core"; +import { ConfirmDialogModal } from "core-components/modals/confirm-dialog/confirm-dialog.modal"; +import { Component, ElementRef, OnInit, ViewChild } from "@angular/core"; @Component({ templateUrl: './password-confirmation.modal.html' diff --git a/frontend/src/app/components/modals/save-modal/save-query.modal.ts b/frontend/src/app/components/modals/save-modal/save-query.modal.ts index 682a6e422d9..500238d8011 100644 --- a/frontend/src/app/components/modals/save-modal/save-query.modal.ts +++ b/frontend/src/app/components/modals/save-modal/save-query.modal.ts @@ -26,24 +26,24 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, Inject, ViewChild} from "@angular/core"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {QuerySharingChange} from "core-components/modals/share-modal/query-sharing-form.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; -import {States} from '../../states.service'; +import { ChangeDetectorRef, Component, ElementRef, Inject, ViewChild } from "@angular/core"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { QuerySharingChange } from "core-components/modals/share-modal/query-sharing-form.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackagesListService } from "core-components/wp-list/wp-list.service"; +import { States } from '../../states.service'; @Component({ templateUrl: './save-query.modal.html' }) export class SaveQueryModal extends OpModalComponent { - public queryName:string = ''; + public queryName = ''; public isStarred = false; public isPublic = false; public isBusy = false; diff --git a/frontend/src/app/components/modals/share-modal/query-sharing-form.component.ts b/frontend/src/app/components/modals/share-modal/query-sharing-form.component.ts index a3923c0742f..1109149319b 100644 --- a/frontend/src/app/components/modals/share-modal/query-sharing-form.component.ts +++ b/frontend/src/app/components/modals/share-modal/query-sharing-form.component.ts @@ -1,8 +1,8 @@ -import {States} from '../../states.service'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {Component, EventEmitter, Input, Output} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { States } from '../../states.service'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { Component, EventEmitter, Input, Output } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; export interface QuerySharingChange { isStarred:boolean; diff --git a/frontend/src/app/components/modals/share-modal/query-sharing.modal.ts b/frontend/src/app/components/modals/share-modal/query-sharing.modal.ts index 0049de3a5bd..071d1f24559 100644 --- a/frontend/src/app/components/modals/share-modal/query-sharing.modal.ts +++ b/frontend/src/app/components/modals/share-modal/query-sharing.modal.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackagesListService} from '../../wp-list/wp-list.service'; -import {States} from '../../states.service'; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {ChangeDetectorRef, Component, ElementRef, Inject, OnInit} from "@angular/core"; -import {QuerySharingChange} from "core-components/modals/share-modal/query-sharing-form.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackagesListService } from '../../wp-list/wp-list.service'; +import { States } from '../../states.service'; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { ChangeDetectorRef, Component, ElementRef, Inject, OnInit } from "@angular/core"; +import { QuerySharingChange } from "core-components/modals/share-modal/query-sharing-form.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; @Component({ templateUrl: './query-sharing.modal.html' @@ -96,7 +96,7 @@ export class QuerySharingModal extends OpModalComponent implements OnInit { } this.isBusy = true; - let promises = []; + const promises = []; if (this.query.public !== this.isPublic) { this.query.public = this.isPublic; diff --git a/frontend/src/app/components/modals/wp-destroy-modal/wp-destroy.modal.ts b/frontend/src/app/components/modals/wp-destroy-modal/wp-destroy.modal.ts index 4e2e257c09c..573acdb8f66 100644 --- a/frontend/src/app/components/modals/wp-destroy-modal/wp-destroy.modal.ts +++ b/frontend/src/app/components/modals/wp-destroy-modal/wp-destroy.modal.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackagesListService} from '../../wp-list/wp-list.service'; -import {States} from '../../states.service'; -import {ChangeDetectorRef, Component, ElementRef, Inject, OnInit} from "@angular/core"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {StateService} from '@uirouter/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageService} from "core-components/work-packages/work-package.service"; -import {BackRoutingService} from "core-app/modules/common/back-routing/back-routing.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { WorkPackagesListService } from '../../wp-list/wp-list.service'; +import { States } from '../../states.service'; +import { ChangeDetectorRef, Component, ElementRef, Inject, OnInit } from "@angular/core"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { StateService } from '@uirouter/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageService } from "core-components/work-packages/work-package.service"; +import { BackRoutingService } from "core-app/modules/common/back-routing/back-routing.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Component({ templateUrl: './wp-destroy.modal.html' @@ -93,10 +93,10 @@ export class WpDestroyModal extends OpModalComponent implements OnInit { } this.text.title = this.I18n.t('js.modals.destroy_work_package.title', { label: this.workPackageLabel }), - this.text.text = this.I18n.t('js.modals.destroy_work_package.text', { - label: this.workPackageLabel, - count: this.workPackages.length - }); + this.text.text = this.I18n.t('js.modals.destroy_work_package.text', { + label: this.workPackageLabel, + count: this.workPackages.length + }); this.text.childCount = (wp:WorkPackageResource) => { const count = this.children(wp).length; @@ -106,7 +106,7 @@ export class WpDestroyModal extends OpModalComponent implements OnInit { this.text.hasChildren = (wp:WorkPackageResource) => this.I18n.t('js.modals.destroy_work_package.has_children', { childUnits: this.text.childCount(wp) }), - this.text.deletesChildren = this.I18n.t('js.modals.destroy_work_package.deletes_children'); + this.text.deletesChildren = this.I18n.t('js.modals.destroy_work_package.deletes_children'); } public get blockedDueToUnconfirmedChildren() { @@ -114,10 +114,10 @@ export class WpDestroyModal extends OpModalComponent implements OnInit { } public get mustConfirmChildren() { - let result = false; + const result = false; if (this.singleWorkPackage && this.singleWorkPackageChildren) { - let result = this.singleWorkPackageChildren.length > 0; + const result = this.singleWorkPackageChildren.length > 0; } return result || !!_.find(this.workPackages, wp => diff --git a/frontend/src/app/components/op-context-menu/handlers/op-columns-context-menu.directive.ts b/frontend/src/app/components/op-context-menu/handlers/op-columns-context-menu.directive.ts index c3bad3d318e..cb421d64ec6 100644 --- a/frontend/src/app/components/op-context-menu/handlers/op-columns-context-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/handlers/op-columns-context-menu.directive.ts @@ -26,21 +26,21 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Directive, ElementRef, Injector, Input} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { Directive, ElementRef, Injector, Input } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; -import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; -import {OPContextMenuService} from 'core-components/op-context-menu/op-context-menu.service'; -import {OpModalService} from 'core-app/modules/modal/modal.service'; -import {WorkPackageViewColumnsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; -import {WorkPackageViewGroupByService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service'; -import {WorkPackageViewHierarchiesService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service'; -import {WorkPackageViewSortByService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service'; -import {WorkPackageTable} from 'core-components/wp-fast-table/wp-fast-table'; -import {QueryColumn} from 'core-components/wp-query/query-column'; -import {WpTableConfigurationModalComponent} from 'core-components/wp-table/configuration-modal/wp-table-configuration.modal'; -import {ConfirmDialogService} from "core-components/modals/confirm-dialog/confirm-dialog.service"; -import {QUERY_SORT_BY_ASC, QUERY_SORT_BY_DESC} from "core-app/modules/hal/resources/query-sort-by-resource"; +import { OpContextMenuTrigger } from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; +import { OPContextMenuService } from 'core-components/op-context-menu/op-context-menu.service'; +import { OpModalService } from 'core-app/modules/modal/modal.service'; +import { WorkPackageViewColumnsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; +import { WorkPackageViewGroupByService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service'; +import { WorkPackageViewHierarchiesService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service'; +import { WorkPackageViewSortByService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service'; +import { WorkPackageTable } from 'core-components/wp-fast-table/wp-fast-table'; +import { QueryColumn } from 'core-components/wp-query/query-column'; +import { WpTableConfigurationModalComponent } from 'core-components/wp-table/configuration-modal/wp-table-configuration.modal'; +import { ConfirmDialogService } from "core-components/modals/confirm-dialog/confirm-dialog.service"; +import { QUERY_SORT_BY_ASC, QUERY_SORT_BY_DESC } from "core-app/modules/hal/resources/query-sort-by-resource"; @Directive({ selector: '[opColumnsContextMenu]' @@ -93,11 +93,11 @@ export class OpColumnsContextMenu extends OpContextMenuTrigger { * @param {Event} openerEvent */ public positionArgs(evt:JQuery.TriggeredEvent) { - let additionalPositionArgs = { + const additionalPositionArgs = { of: this.$element.find('.generic-table--sort-header-outer'), }; - let position = super.positionArgs(evt); + const position = super.positionArgs(evt); _.assign(position, additionalPositionArgs); return position; @@ -108,7 +108,7 @@ export class OpColumnsContextMenu extends OpContextMenuTrigger { } private buildItems() { - let c = this.column; + const c = this.column; this.items = [ { @@ -189,7 +189,7 @@ export class OpColumnsContextMenu extends OpContextMenuTrigger { linkText: this.I18n.t('js.work_packages.query.hide_column'), icon: 'icon-delete', onClick: () => { - let focusColumn = this.wpTableColumns.previous(c) || this.wpTableColumns.next(c); + const focusColumn = this.wpTableColumns.previous(c) || this.wpTableColumns.next(c); this.wpTableColumns.removeColumn(c); setTimeout(() => { diff --git a/frontend/src/app/components/op-context-menu/handlers/op-context-menu-trigger.directive.ts b/frontend/src/app/components/op-context-menu/handlers/op-context-menu-trigger.directive.ts index 7325618db81..a731bf2bc7f 100644 --- a/frontend/src/app/components/op-context-menu/handlers/op-context-menu-trigger.directive.ts +++ b/frontend/src/app/components/op-context-menu/handlers/op-context-menu-trigger.directive.ts @@ -1,7 +1,7 @@ -import {AfterViewInit, Directive, ElementRef} from "@angular/core"; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {OpContextMenuHandler} from "core-components/op-context-menu/op-context-menu-handler"; -import {OpContextMenuItem} from "core-components/op-context-menu/op-context-menu.types"; +import { AfterViewInit, Directive, ElementRef } from "@angular/core"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { OpContextMenuHandler } from "core-components/op-context-menu/op-context-menu-handler"; +import { OpContextMenuItem } from "core-components/op-context-menu/op-context-menu.types"; @Directive({ selector: '[opContextMenuTrigger]' diff --git a/frontend/src/app/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts b/frontend/src/app/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts index 7e911a5f944..86bc3bb4e37 100644 --- a/frontend/src/app/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/handlers/op-settings-dropdown-menu.directive.ts @@ -26,21 +26,21 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Directive, ElementRef, Injector, Input} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; -import {OPContextMenuService} from 'core-components/op-context-menu/op-context-menu.service'; -import {States} from 'core-components/states.service'; -import {WorkPackagesListService} from 'core-components/wp-list/wp-list.service'; -import {QueryFormResource} from 'core-app/modules/hal/resources/query-form-resource'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {WpTableExportModal} from "core-components/modals/export-modal/wp-table-export.modal"; -import {SaveQueryModal} from "core-components/modals/save-modal/save-query.modal"; -import {QuerySharingModal} from "core-components/modals/share-modal/query-sharing.modal"; -import {WpTableConfigurationModalComponent} from 'core-components/wp-table/configuration-modal/wp-table-configuration.modal'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Directive, ElementRef, Injector, Input } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { OpContextMenuTrigger } from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; +import { OPContextMenuService } from 'core-components/op-context-menu/op-context-menu.service'; +import { States } from 'core-components/states.service'; +import { WorkPackagesListService } from 'core-components/wp-list/wp-list.service'; +import { QueryFormResource } from 'core-app/modules/hal/resources/query-form-resource'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { WpTableExportModal } from "core-components/modals/export-modal/wp-table-export.modal"; +import { SaveQueryModal } from "core-components/modals/save-modal/save-query.modal"; +import { QuerySharingModal } from "core-components/modals/share-modal/query-sharing.modal"; +import { WpTableConfigurationModalComponent } from 'core-components/wp-table/configuration-modal/wp-table-configuration.modal'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; import { selectableTitleIdentifier, triggerEditingEvent @@ -110,12 +110,12 @@ export class OpSettingsMenuDirective extends OpContextMenuTrigger { * @param {Event} openerEvent */ public positionArgs(evt:JQuery.TriggeredEvent) { - let additionalPositionArgs = { + const additionalPositionArgs = { my: 'right top', at: 'right bottom' }; - let position = super.positionArgs(evt); + const position = super.positionArgs(evt); _.assign(position, additionalPositionArgs); return position; diff --git a/frontend/src/app/components/op-context-menu/handlers/op-types-context-menu.directive.ts b/frontend/src/app/components/op-context-menu/handlers/op-types-context-menu.directive.ts index ac9d4b87471..8c470fd9fb2 100644 --- a/frontend/src/app/components/op-context-menu/handlers/op-types-context-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/handlers/op-types-context-menu.directive.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpContextMenuItem} from 'core-components/op-context-menu/op-context-menu.types'; -import {StateService} from '@uirouter/core'; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {Directive, ElementRef, Input, OnInit} from "@angular/core"; -import {LinkHandling} from "core-app/modules/common/link-handling/link-handling"; -import {OpContextMenuTrigger} from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; -import {TypeResource} from 'core-app/modules/hal/resources/type-resource'; -import {Highlighting} from 'core-app/components/wp-fast-table/builders/highlighting/highlighting.functions'; -import {BrowserDetector} from "core-app/modules/common/browser/browser-detector.service"; -import {WorkPackageCreateService} from 'core-components/wp-new/wp-create.service'; +import { OpContextMenuItem } from 'core-components/op-context-menu/op-context-menu.types'; +import { StateService } from '@uirouter/core'; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { Directive, ElementRef, Input, OnInit } from "@angular/core"; +import { LinkHandling } from "core-app/modules/common/link-handling/link-handling"; +import { OpContextMenuTrigger } from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; +import { TypeResource } from 'core-app/modules/hal/resources/type-resource'; +import { Highlighting } from 'core-app/components/wp-fast-table/builders/highlighting/highlighting.functions'; +import { BrowserDetector } from "core-app/modules/common/browser/browser-detector.service"; +import { WorkPackageCreateService } from 'core-components/wp-new/wp-create.service'; @Directive({ selector: '[opTypesCreateDropdown]' @@ -57,7 +57,7 @@ export class OpTypesContextMenuDirective extends OpContextMenuTrigger { super.ngAfterViewInit(); if (!this.active) { - return; + return; } // Force full-view create if in mobile view diff --git a/frontend/src/app/components/op-context-menu/handlers/wp-create-settings-menu.directive.ts b/frontend/src/app/components/op-context-menu/handlers/wp-create-settings-menu.directive.ts index 0b65963fd64..84cb5809366 100644 --- a/frontend/src/app/components/op-context-menu/handlers/wp-create-settings-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/handlers/wp-create-settings-menu.directive.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {Directive, ElementRef} from "@angular/core"; -import {OpContextMenuTrigger} from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { Directive, ElementRef } from "@angular/core"; +import { OpContextMenuTrigger } from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {States} from "core-components/states.service"; -import {FormResource} from 'core-app/modules/hal/resources/form-resource'; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { States } from "core-components/states.service"; +import { FormResource } from 'core-app/modules/hal/resources/form-resource'; @Directive({ selector: '[wpCreateSettingsMenu]' @@ -67,12 +67,12 @@ export class WorkPackageCreateSettingsMenuDirective extends OpContextMenuTrigger * @param {Event} openerEvent */ public positionArgs(evt:JQuery.TriggeredEvent) { - let additionalPositionArgs = { + const additionalPositionArgs = { my: 'right top', at: 'right bottom' }; - let position = super.positionArgs(evt); + const position = super.positionArgs(evt); _.assign(position, additionalPositionArgs); return position; diff --git a/frontend/src/app/components/op-context-menu/handlers/wp-group-toggle-dropdown-menu.directive.ts b/frontend/src/app/components/op-context-menu/handlers/wp-group-toggle-dropdown-menu.directive.ts index 5e773b0b28f..c10724cfafd 100644 --- a/frontend/src/app/components/op-context-menu/handlers/wp-group-toggle-dropdown-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/handlers/wp-group-toggle-dropdown-menu.directive.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {Directive, ElementRef} from "@angular/core"; -import {OpContextMenuTrigger} from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { Directive, ElementRef } from "@angular/core"; +import { OpContextMenuTrigger } from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { WorkPackageViewDisplayRepresentationService, wpDisplayCardRepresentation, wpDisplayListRepresentation } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {WorkPackageViewCollapsedGroupsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageViewCollapsedGroupsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service"; @Directive({ selector: '[wpGroupToggleDropdown]' diff --git a/frontend/src/app/components/op-context-menu/handlers/wp-status-dropdown-menu.directive.ts b/frontend/src/app/components/op-context-menu/handlers/wp-status-dropdown-menu.directive.ts index cc6a5b2ef3d..66924ea6188 100644 --- a/frontend/src/app/components/op-context-menu/handlers/wp-status-dropdown-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/handlers/wp-status-dropdown-menu.directive.ts @@ -26,20 +26,20 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {StateService} from '@uirouter/core'; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {Directive, ElementRef, Input} from "@angular/core"; -import {OpContextMenuTrigger} from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; +import { StateService } from '@uirouter/core'; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { Directive, ElementRef, Input } from "@angular/core"; +import { OpContextMenuTrigger } from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Directive({ selector: '[wpStatusDropdown]' diff --git a/frontend/src/app/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts b/frontend/src/app/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts index 263b1277a0e..41ecb82da89 100644 --- a/frontend/src/app/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/handlers/wp-view-dropdown-menu.directive.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {Directive, ElementRef} from "@angular/core"; -import {OpContextMenuTrigger} from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { Directive, ElementRef } from "@angular/core"; +import { OpContextMenuTrigger } from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { WorkPackageViewDisplayRepresentationService, wpDisplayCardRepresentation, wpDisplayListRepresentation } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; @Directive({ selector: '[wpViewDropdown]' diff --git a/frontend/src/app/components/op-context-menu/icon-triggered-context-menu/icon-triggered-context-menu.component.ts b/frontend/src/app/components/op-context-menu/icon-triggered-context-menu/icon-triggered-context-menu.component.ts index 1b1428a4e50..6d15d36e580 100644 --- a/frontend/src/app/components/op-context-menu/icon-triggered-context-menu/icon-triggered-context-menu.component.ts +++ b/frontend/src/app/components/op-context-menu/icon-triggered-context-menu/icon-triggered-context-menu.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, Injector, Input} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; -import {OPContextMenuService} from 'core-components/op-context-menu/op-context-menu.service'; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {OpContextMenuItem} from "core-components/op-context-menu/op-context-menu.types"; +import { ChangeDetectorRef, Component, ElementRef, Injector, Input } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { OpContextMenuTrigger } from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; +import { OPContextMenuService } from 'core-components/op-context-menu/op-context-menu.service'; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { OpContextMenuItem } from "core-components/op-context-menu/op-context-menu.types"; @Component({ selector: 'icon-triggered-context-menu', @@ -62,19 +62,19 @@ export class IconTriggeredContextMenuComponent extends OpContextMenuTrigger { * @param {Event} openerEvent */ public positionArgs(evt:JQuery.TriggeredEvent) { - let additionalPositionArgs = { + const additionalPositionArgs = { my: 'right top', at: 'right bottom' }; - let position = super.positionArgs(evt); + const position = super.positionArgs(evt); _.assign(position, additionalPositionArgs); return position; } private async buildItems() { - let items:OpContextMenuItem[] = []; + const items:OpContextMenuItem[] = []; // Add action specific menu entries if (this.menuItems) { diff --git a/frontend/src/app/components/op-context-menu/op-context-menu-handler.ts b/frontend/src/app/components/op-context-menu/op-context-menu-handler.ts index 1c8eb36966e..5228f6c40ff 100644 --- a/frontend/src/app/components/op-context-menu/op-context-menu-handler.ts +++ b/frontend/src/app/components/op-context-menu/op-context-menu-handler.ts @@ -1,6 +1,6 @@ -import {OPContextMenuService} from 'core-components/op-context-menu/op-context-menu.service'; -import {OpContextMenuItem} from 'core-components/op-context-menu/op-context-menu.types'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { OPContextMenuService } from 'core-components/op-context-menu/op-context-menu.service'; +import { OpContextMenuItem } from 'core-components/op-context-menu/op-context-menu.types'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; /** * Interface passed to CM service to open a particular context menu. diff --git a/frontend/src/app/components/op-context-menu/op-context-menu.component.ts b/frontend/src/app/components/op-context-menu/op-context-menu.component.ts index 6f2a1441449..ca13ca38429 100644 --- a/frontend/src/app/components/op-context-menu/op-context-menu.component.ts +++ b/frontend/src/app/components/op-context-menu/op-context-menu.component.ts @@ -1,9 +1,9 @@ -import {Component, Inject} from "@angular/core"; +import { Component, Inject } from "@angular/core"; import { OpContextMenuItem, OpContextMenuLocalsMap, OpContextMenuLocalsToken } from "core-components/op-context-menu/op-context-menu.types"; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; @Component({ templateUrl: './op-context-menu.html' diff --git a/frontend/src/app/components/op-context-menu/op-context-menu.service.ts b/frontend/src/app/components/op-context-menu/op-context-menu.service.ts index b55b234a1c4..75f81bd74a8 100644 --- a/frontend/src/app/components/op-context-menu/op-context-menu.service.ts +++ b/frontend/src/app/components/op-context-menu/op-context-menu.service.ts @@ -1,11 +1,11 @@ -import {ApplicationRef, ComponentFactoryResolver, Injectable, Injector} from '@angular/core'; -import {ComponentPortal, DomPortalOutlet, PortalInjector} from "@angular/cdk/portal"; -import {TransitionService} from "@uirouter/core"; -import {OpContextMenuHandler} from "core-components/op-context-menu/op-context-menu-handler"; -import {OpContextMenuLocalsMap, OpContextMenuLocalsToken} from "core-components/op-context-menu/op-context-menu.types"; -import {OPContextMenuComponent} from "core-components/op-context-menu/op-context-menu.component"; -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {FocusHelperService} from 'core-app/modules/common/focus/focus-helper'; +import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector } from '@angular/core'; +import { ComponentPortal, DomPortalOutlet, PortalInjector } from "@angular/cdk/portal"; +import { TransitionService } from "@uirouter/core"; +import { OpContextMenuHandler } from "core-components/op-context-menu/op-context-menu-handler"; +import { OpContextMenuLocalsMap, OpContextMenuLocalsToken } from "core-components/op-context-menu/op-context-menu.types"; +import { OPContextMenuComponent } from "core-components/op-context-menu/op-context-menu.component"; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { FocusHelperService } from 'core-app/modules/common/focus/focus-helper'; @Injectable({ providedIn: 'root' }) export class OPContextMenuService { diff --git a/frontend/src/app/components/op-context-menu/op-context-menu.types.ts b/frontend/src/app/components/op-context-menu/op-context-menu.types.ts index d238a9c5990..1ce894d5665 100644 --- a/frontend/src/app/components/op-context-menu/op-context-menu.types.ts +++ b/frontend/src/app/components/op-context-menu/op-context-menu.types.ts @@ -1,4 +1,4 @@ -import {InjectionToken} from "@angular/core"; +import { InjectionToken } from "@angular/core"; export const OpContextMenuLocalsToken = new InjectionToken('CONTEXT_MENU_LOCALS'); @@ -6,7 +6,7 @@ export interface OpContextMenuLocalsMap { items:OpContextMenuItem[]; contextMenuId?:string; [key:string]:any; -}; +} export interface OpContextMenuItem { disabled?:boolean; diff --git a/frontend/src/app/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts b/frontend/src/app/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts index 2c02570b776..f509f0b4e8c 100644 --- a/frontend/src/app/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts +++ b/frontend/src/app/components/op-context-menu/wp-context-menu/wp-single-context-menu.ts @@ -1,20 +1,20 @@ -import {Directive, ElementRef, Injector, Input} from '@angular/core'; -import {StateService} from '@uirouter/core'; -import {LinkHandling} from 'core-app/modules/common/link-handling/link-handling'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HookService} from 'core-app/modules/plugins/hook-service'; -import {WpDestroyModal} from 'core-components/modals/wp-destroy-modal/wp-destroy.modal'; -import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; -import {OPContextMenuService} from 'core-components/op-context-menu/op-context-menu.service'; -import {OpContextMenuItem} from 'core-components/op-context-menu/op-context-menu.types'; -import {PERMITTED_CONTEXT_MENU_ACTIONS} from 'core-components/op-context-menu/wp-context-menu/wp-static-context-menu-actions'; -import {OpModalService} from 'core-app/modules/modal/modal.service'; -import {WorkPackageAuthorization} from 'core-components/work-packages/work-package-authorization.service'; -import {WorkPackageAction} from 'core-components/wp-table/context-menu-helper/wp-context-menu-helper.service'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {TimeEntryCreateService} from "core-app/modules/time_entries/create/create.service"; +import { Directive, ElementRef, Injector, Input } from '@angular/core'; +import { StateService } from '@uirouter/core'; +import { LinkHandling } from 'core-app/modules/common/link-handling/link-handling'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HookService } from 'core-app/modules/plugins/hook-service'; +import { WpDestroyModal } from 'core-components/modals/wp-destroy-modal/wp-destroy.modal'; +import { OpContextMenuTrigger } from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; +import { OPContextMenuService } from 'core-components/op-context-menu/op-context-menu.service'; +import { OpContextMenuItem } from 'core-components/op-context-menu/op-context-menu.types'; +import { PERMITTED_CONTEXT_MENU_ACTIONS } from 'core-components/op-context-menu/wp-context-menu/wp-static-context-menu-actions'; +import { OpModalService } from 'core-app/modules/modal/modal.service'; +import { WorkPackageAuthorization } from 'core-components/work-packages/work-package-authorization.service'; +import { WorkPackageAction } from 'core-components/wp-table/context-menu-helper/wp-context-menu-helper.service'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { TimeEntryCreateService } from "core-app/modules/time_entries/create/create.service"; @Directive({ selector: '[wpSingleContextMenu]' @@ -51,23 +51,23 @@ export class WorkPackageSingleContextMenuDirective extends OpContextMenuTrigger const link = action.link; switch (key) { - case 'copy': - this.$state.go('work-packages.copy', { copiedFromWorkPackageId: this.workPackage.id }); - break; - case 'delete': - this.opModalService.show(WpDestroyModal, this.injector, { workPackages: [this.workPackage] }); - break; - case 'log_time': - this.timeEntryCreateService - .create(moment(new Date()), this.workPackage, false) - .catch(() => { - // do nothing, the user closed without changes - }); - break; + case 'copy': + this.$state.go('work-packages.copy', { copiedFromWorkPackageId: this.workPackage.id }); + break; + case 'delete': + this.opModalService.show(WpDestroyModal, this.injector, { workPackages: [this.workPackage] }); + break; + case 'log_time': + this.timeEntryCreateService + .create(moment(new Date()), this.workPackage, false) + .catch(() => { + // do nothing, the user closed without changes + }); + break; - default: - window.location.href = link!; - break; + default: + window.location.href = link!; + break; } } @@ -77,23 +77,23 @@ export class WorkPackageSingleContextMenuDirective extends OpContextMenuTrigger * @param {Event} openerEvent */ public positionArgs(evt:JQuery.TriggeredEvent) { - let additionalPositionArgs = { + const additionalPositionArgs = { my: 'right top', at: 'right bottom' }; - let position = super.positionArgs(evt); + const position = super.positionArgs(evt); _.assign(position, additionalPositionArgs); return position; } private getPermittedActions(authorization:WorkPackageAuthorization) { - let actions:WorkPackageAction[] = authorization.permittedActionsWithLinks(PERMITTED_CONTEXT_MENU_ACTIONS); + const actions:WorkPackageAction[] = authorization.permittedActionsWithLinks(PERMITTED_CONTEXT_MENU_ACTIONS); // Splice plugin actions onto the core actions _.each(this.getPermittedPluginActions(authorization), (action:WorkPackageAction) => { - let index = action.indexBy ? action.indexBy(actions) : actions.length; + const index = action.indexBy ? action.indexBy(actions) : actions.length; actions.splice(index, 0, action); }); @@ -101,7 +101,7 @@ export class WorkPackageSingleContextMenuDirective extends OpContextMenuTrigger } private getPermittedPluginActions(authorization:WorkPackageAuthorization) { - let actions:WorkPackageAction[] = this.HookService.call('workPackageSingleContextMenu'); + const actions:WorkPackageAction[] = this.HookService.call('workPackageSingleContextMenu'); return authorization.permittedActionsWithLinks(actions); } diff --git a/frontend/src/app/components/op-context-menu/wp-context-menu/wp-table-context-menu.directive.ts b/frontend/src/app/components/op-context-menu/wp-context-menu/wp-table-context-menu.directive.ts index f822b7178ba..e16d9449f25 100644 --- a/frontend/src/app/components/op-context-menu/wp-context-menu/wp-table-context-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/wp-context-menu/wp-table-context-menu.directive.ts @@ -1,9 +1,9 @@ -import {Injector} from "@angular/core"; -import {WorkPackageAction} from "core-components/wp-table/context-menu-helper/wp-context-menu-helper.service"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {WorkPackageViewContextMenu} from "core-components/op-context-menu/wp-context-menu/wp-view-context-menu.directive"; -import {WorkPackageViewHierarchyIdentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from "@angular/core"; +import { WorkPackageAction } from "core-components/wp-table/context-menu-helper/wp-context-menu-helper.service"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { WorkPackageViewContextMenu } from "core-components/op-context-menu/wp-context-menu/wp-view-context-menu.directive"; +import { WorkPackageViewHierarchyIdentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class WorkPackageTableContextMenu extends WorkPackageViewContextMenu { @@ -19,25 +19,25 @@ export class WorkPackageTableContextMenu extends WorkPackageViewContextMenu { public triggerContextMenuAction(action:WorkPackageAction) { switch (action.key) { - case 'relation-precedes': - this.table.timelineController.startAddRelationPredecessor(this.workPackage); - break; + case 'relation-precedes': + this.table.timelineController.startAddRelationPredecessor(this.workPackage); + break; - case 'relation-follows': - this.table.timelineController.startAddRelationFollower(this.workPackage); - break; + case 'relation-follows': + this.table.timelineController.startAddRelationFollower(this.workPackage); + break; - case 'hierarchy-indent': - this.wpViewIndentation.indent(this.workPackage); - break; + case 'hierarchy-indent': + this.wpViewIndentation.indent(this.workPackage); + break; - case 'hierarchy-outdent': - this.wpViewIndentation.outdent(this.workPackage); - break; + case 'hierarchy-outdent': + this.wpViewIndentation.outdent(this.workPackage); + break; - default: - super.triggerContextMenuAction(action); - break; + default: + super.triggerContextMenuAction(action); + break; } } } diff --git a/frontend/src/app/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts b/frontend/src/app/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts index eb3f64ca780..a531ecbf29b 100644 --- a/frontend/src/app/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts +++ b/frontend/src/app/components/op-context-menu/wp-context-menu/wp-view-context-menu.directive.ts @@ -1,22 +1,22 @@ -import {Injector} from "@angular/core"; +import { Injector } from "@angular/core"; import { WorkPackageAction, WorkPackageContextMenuHelperService } from "core-components/wp-table/context-menu-helper/wp-context-menu-helper.service"; -import {States} from "core-components/states.service"; -import {WorkPackageRelationsHierarchyService} from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {LinkHandling} from "core-app/modules/common/link-handling/link-handling"; -import {OpContextMenuHandler} from "core-components/op-context-menu/op-context-menu-handler"; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {OpContextMenuItem, OpContextMenuLocalsMap} from "core-components/op-context-menu/op-context-menu.types"; -import {PERMITTED_CONTEXT_MENU_ACTIONS} from "core-components/op-context-menu/wp-context-menu/wp-static-context-menu-actions"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {WpDestroyModal} from "core-components/modals/wp-destroy-modal/wp-destroy.modal"; -import {StateService} from "@uirouter/core"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {TimeEntryCreateService} from "core-app/modules/time_entries/create/create.service"; -import {splitViewRoute} from "core-app/modules/work_packages/routing/split-view-routes.helper"; +import { States } from "core-components/states.service"; +import { WorkPackageRelationsHierarchyService } from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { LinkHandling } from "core-app/modules/common/link-handling/link-handling"; +import { OpContextMenuHandler } from "core-components/op-context-menu/op-context-menu-handler"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { OpContextMenuItem, OpContextMenuLocalsMap } from "core-components/op-context-menu/op-context-menu.types"; +import { PERMITTED_CONTEXT_MENU_ACTIONS } from "core-components/op-context-menu/wp-context-menu/wp-static-context-menu-actions"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { WpDestroyModal } from "core-components/modals/wp-destroy-modal/wp-destroy.modal"; +import { StateService } from "@uirouter/core"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { TimeEntryCreateService } from "core-app/modules/time_entries/create/create.service"; +import { splitViewRoute } from "core-app/modules/work_packages/routing/split-view-routes.helper"; export class WorkPackageViewContextMenu extends OpContextMenuHandler { @@ -54,7 +54,7 @@ export class WorkPackageViewContextMenu extends OpContextMenuHandler { } public positionArgs(evt:JQuery.TriggeredEvent) { - let position = super.positionArgs(evt); + const position = super.positionArgs(evt); _.assign(position, this.additionalPositionArgs); return position; @@ -64,39 +64,39 @@ export class WorkPackageViewContextMenu extends OpContextMenuHandler { const link = action.link; switch (action.key) { - case 'delete': - this.deleteSelectedWorkPackages(); - break; + case 'delete': + this.deleteSelectedWorkPackages(); + break; - case 'edit': - this.editSelectedWorkPackages(link!); - break; + case 'edit': + this.editSelectedWorkPackages(link!); + break; - case 'copy': - this.copySelectedWorkPackages(link!); - break; + case 'copy': + this.copySelectedWorkPackages(link!); + break; - case 'relation-new-child': - this.wpRelationsHierarchyService.addNewChildWp(this.baseRoute, this.workPackage); - break; + case 'relation-new-child': + this.wpRelationsHierarchyService.addNewChildWp(this.baseRoute, this.workPackage); + break; - case 'log_time': - this.logTimeForSelectedWorkPackage(); - break; + case 'log_time': + this.logTimeForSelectedWorkPackage(); + break; - default: - window.location.href = link!; - break; + default: + window.location.href = link!; + break; } } private deleteSelectedWorkPackages() { - let selected = this.getSelectedWorkPackages(); + const selected = this.getSelectedWorkPackages(); this.opModalService.show(WpDestroyModal, this.injector, { workPackages: selected }); } private editSelectedWorkPackages(link:any) { - let selected = this.getSelectedWorkPackages(); + const selected = this.getSelectedWorkPackages(); if (selected.length > 1) { window.location.href = link; @@ -105,14 +105,14 @@ export class WorkPackageViewContextMenu extends OpContextMenuHandler { } private copySelectedWorkPackages(link:any) { - let selected = this.getSelectedWorkPackages(); + const selected = this.getSelectedWorkPackages(); if (selected.length > 1) { window.location.href = link; return; } - let params = { + const params = { copiedFromWorkPackageId: selected[0].id }; @@ -128,7 +128,7 @@ export class WorkPackageViewContextMenu extends OpContextMenuHandler { } private getSelectedWorkPackages() { - let selectedWorkPackages = this.wpTableSelection.getSelectedWorkPackages(); + const selectedWorkPackages = this.wpTableSelection.getSelectedWorkPackages(); if (selectedWorkPackages.length === 0) { return [this.workPackage]; @@ -142,7 +142,7 @@ export class WorkPackageViewContextMenu extends OpContextMenuHandler { } protected buildItems():OpContextMenuItem[] { - let items = this.permittedActions.map((action:WorkPackageAction) => { + const items = this.permittedActions.map((action:WorkPackageAction) => { return { class: undefined as string|undefined, disabled: false, diff --git a/frontend/src/app/components/projects/current-project.service.spec.ts b/frontend/src/app/components/projects/current-project.service.spec.ts index 8b967744cb4..742cc069c6d 100644 --- a/frontend/src/app/components/projects/current-project.service.spec.ts +++ b/frontend/src/app/components/projects/current-project.service.spec.ts @@ -28,14 +28,14 @@ /*jshint expr: true*/ -import {CurrentProjectService} from './current-project.service'; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; +import { CurrentProjectService } from './current-project.service'; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; describe('currentProject service', function() { let element:JQuery; let currentProject:CurrentProjectService; - let apiV3Stub:any = { + const apiV3Stub:any = { projects: { id: (id:string) => { return { toString: () => '/api/v3/projects/' + id }; @@ -59,7 +59,7 @@ describe('currentProject service', function() { describe('with a meta value present', () => { beforeEach(() => { - let html = ` + const html = ` `; diff --git a/frontend/src/app/components/projects/current-project.service.ts b/frontend/src/app/components/projects/current-project.service.ts index c72dbfa6971..bd5500246f8 100644 --- a/frontend/src/app/components/projects/current-project.service.ts +++ b/frontend/src/app/components/projects/current-project.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injectable } from "@angular/core"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable({ providedIn: 'root' }) export class CurrentProjectService { diff --git a/frontend/src/app/components/projects/project-menu-autocomplete/project-menu-autocomplete.component.ts b/frontend/src/app/components/projects/project-menu-autocomplete/project-menu-autocomplete.component.ts index 409b72993fb..fe856418c4a 100644 --- a/frontend/src/app/components/projects/project-menu-autocomplete/project-menu-autocomplete.component.ts +++ b/frontend/src/app/components/projects/project-menu-autocomplete/project-menu-autocomplete.component.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; import { IAutocompleteItem, ILazyAutocompleterBridge } from 'core-app/modules/autocompleter/lazyloaded/lazyloaded-autocompleter'; -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {LinkHandling} from 'core-app/modules/common/link-handling/link-handling'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HttpClient} from "@angular/common/http"; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit} from "@angular/core"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { LinkHandling } from 'core-app/modules/common/link-handling/link-handling'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HttpClient } from "@angular/common/http"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit } from "@angular/core"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; export interface IProjectMenuEntry { id:number; @@ -109,7 +109,7 @@ export class ProjectMenuAutocompleteComponent extends ILazyAutocompleterBridge { - let autocompleteValues = _.map(results, project => { + const autocompleteValues = _.map(results, project => { return { label: project.name, render: 'match', object: project } as ProjectAutocompleteItem; }); @@ -266,7 +266,7 @@ export class ProjectMenuAutocompleteComponent extends ILazyAutocompleterBridge { @@ -284,10 +284,10 @@ export class ProjectMenuAutocompleteComponent extends ILazyAutocompleterBridgedocument.getElementsByClassName(this.elementClass)[0]; // Get initial width from local storage and apply - let localStorageValue = this.parseLocalStorageValue(); + const localStorageValue = this.parseLocalStorageValue(); this.elementWidth = localStorageValue || (this.resizingElement.offsetWidth < this.elementMinWidth ? this.elementMinWidth : @@ -129,15 +129,15 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A resizeStart() { // In case we dragged the resizer farther than the element can actually grow, // we reset it to the actual width at the start of the new resizing - let localStorageValue = this.parseLocalStorageValue(); - let actualElementWidth = this.resizingElement.offsetWidth; + const localStorageValue = this.parseLocalStorageValue(); + const actualElementWidth = this.resizingElement.offsetWidth; if (localStorageValue && localStorageValue > actualElementWidth) { this.elementWidth = actualElementWidth; } } resizeEnd() { - let localStorageValue = this.parseLocalStorageValue(); + const localStorageValue = this.parseLocalStorageValue(); if (localStorageValue) { this.elementWidth = localStorageValue; } @@ -177,8 +177,8 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A } private parseLocalStorageValue():number|undefined { - let localStorageValue = window.OpenProject.guardedLocalStorage(this.localStorageKey); - let number = parseInt(localStorageValue || '', 10); + const localStorageValue = window.OpenProject.guardedLocalStorage(this.localStorageKey); + const number = parseInt(localStorageValue || '', 10); if (typeof number === 'number' && number !== NaN) { return number; @@ -198,7 +198,7 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A } } - private toggleColumns(element:HTMLElement, checkWidth:number = 750) { + private toggleColumns(element:HTMLElement, checkWidth = 750) { // Disable two column layout for MS Edge (#29941) if (element && !this.browserDetector.isEdge) { jQuery(element).toggleClass('-can-have-columns', element.offsetWidth > checkWidth); @@ -206,14 +206,14 @@ export class WpResizerDirective extends UntilDestroyedMixin implements OnInit, A } private toggleFullscreenColumns() { - let fullScreenLeftView = jQuery('.work-packages-full-view--split-left')[0]; + const fullScreenLeftView = jQuery('.work-packages-full-view--split-left')[0]; this.toggleColumns(fullScreenLeftView); } private manageErrorClass(shouldBePresent:boolean) { -   if (shouldBePresent && !this.resizer.classList.contains('-error-font')) { -    this.resizer.classList.add('-error-font'); -   } + if (shouldBePresent && !this.resizer.classList.contains('-error-font')) { + this.resizer.classList.add('-error-font'); + } if (!shouldBePresent && this.resizer.classList.contains('-error-font')) { this.resizer.classList.remove('-error-font'); diff --git a/frontend/src/app/components/schemas/schema-cache.service.ts b/frontend/src/app/components/schemas/schema-cache.service.ts index d602b998666..e3e4214d89c 100644 --- a/frontend/src/app/components/schemas/schema-cache.service.ts +++ b/frontend/src/app/components/schemas/schema-cache.service.ts @@ -25,17 +25,17 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {MultiInputState, State} from 'reactivestates'; -import {States} from '../states.service'; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Injectable} from '@angular/core'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {ISchemaProxy, SchemaProxy} from "core-app/modules/hal/schemas/schema-proxy"; -import {WorkPackageSchemaProxy} from "core-app/modules/hal/schemas/work-package-schema-proxy"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {Observable} from "rxjs"; -import {take} from "rxjs/operators"; +import { MultiInputState, State } from 'reactivestates'; +import { States } from '../states.service'; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Injectable } from '@angular/core'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { ISchemaProxy, SchemaProxy } from "core-app/modules/hal/schemas/schema-proxy"; +import { WorkPackageSchemaProxy } from "core-app/modules/hal/schemas/work-package-schema-proxy"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { Observable } from "rxjs"; +import { take } from "rxjs/operators"; @Injectable() export class SchemaCacheService extends StateCacheService { @@ -57,7 +57,7 @@ export class SchemaCacheService extends StateCacheService { * @return The schema for the HalResource */ of(resource:HalResource):ISchemaProxy { - let schema = this.state(resource).value; + const schema = this.state(resource).value; if (!schema) { throw `Schema for resource ${resource} was expected to be loaded but isn't.`; @@ -71,7 +71,7 @@ export class SchemaCacheService extends StateCacheService { } public getSchemaHref(resource:HalResource):string { - let href = resource.$links.schema?.href; + const href = resource.$links.schema?.href; if (!href) { throw new Error(`Resource ${resource} has no schema to load.`); @@ -86,7 +86,7 @@ export class SchemaCacheService extends StateCacheService { * @return A promise with the loaded schema. */ ensureLoaded(resource:HalResource|string):Promise { - let href = resource instanceof HalResource ? this.getSchemaHref(resource) : resource; + const href = resource instanceof HalResource ? this.getSchemaHref(resource) : resource; return this .requireAndStream(href) @@ -105,7 +105,7 @@ export class SchemaCacheService extends StateCacheService { * @param id The state to require * @param force Load the value anyway. */ - public requireAndStream(href:string, force:boolean = false):Observable { + public requireAndStream(href:string, force = false):Observable { // Refresh when stale or being forced if (this.stale(href) || force) { this.clearAndLoad( diff --git a/frontend/src/app/components/states.service.ts b/frontend/src/app/components/states.service.ts index 7b56ba7a79e..9d2ca693ff5 100644 --- a/frontend/src/app/components/states.service.ts +++ b/frontend/src/app/components/states.service.ts @@ -1,22 +1,22 @@ -import {ProjectResource} from 'core-app/modules/hal/resources/project-resource'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; -import {TypeResource} from 'core-app/modules/hal/resources/type-resource'; -import {RoleResource} from 'core-app/modules/hal/resources/role-resource'; -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; -import {PlaceholderUserResource} from 'core-app/modules/hal/resources/placeholder-user-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {input, InputState, multiInput, MultiInputState, StatesGroup} from 'reactivestates'; -import {QueryColumn} from './wp-query/query-column'; -import {PostResource} from 'core-app/modules/hal/resources/post-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {StatusResource} from "core-app/modules/hal/resources/status-resource"; -import {QueryFilterInstanceSchemaResource} from "core-app/modules/hal/resources/query-filter-instance-schema-resource"; -import {Subject} from "rxjs"; -import {QuerySortByResource} from "core-app/modules/hal/resources/query-sort-by-resource"; -import {QueryGroupByResource} from "core-app/modules/hal/resources/query-group-by-resource"; -import {VersionResource} from "core-app/modules/hal/resources/version-resource"; -import {WorkPackageDisplayRepresentationValue} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; +import { ProjectResource } from 'core-app/modules/hal/resources/project-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; +import { TypeResource } from 'core-app/modules/hal/resources/type-resource'; +import { RoleResource } from 'core-app/modules/hal/resources/role-resource'; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; +import { PlaceholderUserResource } from 'core-app/modules/hal/resources/placeholder-user-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { input, InputState, multiInput, MultiInputState, StatesGroup } from 'reactivestates'; +import { QueryColumn } from './wp-query/query-column'; +import { PostResource } from 'core-app/modules/hal/resources/post-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { StatusResource } from "core-app/modules/hal/resources/status-resource"; +import { QueryFilterInstanceSchemaResource } from "core-app/modules/hal/resources/query-filter-instance-schema-resource"; +import { Subject } from "rxjs"; +import { QuerySortByResource } from "core-app/modules/hal/resources/query-sort-by-resource"; +import { QueryGroupByResource } from "core-app/modules/hal/resources/query-group-by-resource"; +import { VersionResource } from "core-app/modules/hal/resources/version-resource"; +import { WorkPackageDisplayRepresentationValue } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; export class States extends StatesGroup { name = 'MainStore'; @@ -76,7 +76,7 @@ export class States extends StatesGroup { forResource(resource:T):InputState|undefined { const stateName = _.camelCase(resource._type) + 's'; - let state = this.forType(stateName); + const state = this.forType(stateName); return state && state.get(resource.id!); } diff --git a/frontend/src/app/components/table-pagination/pagination-service.ts b/frontend/src/app/components/table-pagination/pagination-service.ts index 8a24fdd2175..e7fda9c7633 100644 --- a/frontend/src/app/components/table-pagination/pagination-service.ts +++ b/frontend/src/app/components/table-pagination/pagination-service.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; +import { Injectable } from '@angular/core'; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; export const DEFAULT_PAGINATION_OPTIONS = { maxVisiblePageOptions: 6, diff --git a/frontend/src/app/components/table-pagination/table-pagination.component.ts b/frontend/src/app/components/table-pagination/table-pagination.component.ts index 5b082548faa..dbc2748eada 100644 --- a/frontend/src/app/components/table-pagination/table-pagination.component.ts +++ b/frontend/src/app/components/table-pagination/table-pagination.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {PaginationService} from 'core-components/table-pagination/pagination-service'; -import {PaginationInstance} from 'core-components/table-pagination/pagination-instance'; -import {IPaginationOptions} from './pagination-service'; +import { PaginationService } from 'core-components/table-pagination/pagination-service'; +import { PaginationInstance } from 'core-components/table-pagination/pagination-instance'; +import { IPaginationOptions } from './pagination-service'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -38,8 +38,8 @@ import { OnInit, Output } from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Component({ selector: '[tablePagination]', @@ -48,9 +48,9 @@ import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixi }) export class TablePaginationComponent extends UntilDestroyedMixin implements OnInit { @Input() totalEntries:string; - @Input() hideForSinglePageResults:boolean = false; - @Input() showPerPage:boolean = true; - @Input() showPageSelections:boolean = true; + @Input() hideForSinglePageResults = false; + @Input() showPerPage = true; + @Input() showPageSelections = true; @Input() infoText?:string; @Output() updateResults = new EventEmitter(); @@ -62,7 +62,7 @@ export class TablePaginationComponent extends UntilDestroyedMixin implements OnI no_other_page: this.I18n.t('js.pagination.no_other_page') }; - public currentRange:string = ''; + public currentRange = ''; public pageNumbers:number[] = []; public postPageNumbers:number[] = []; public prePageNumbers:number[] = []; @@ -121,9 +121,9 @@ export class TablePaginationComponent extends UntilDestroyedMixin implements OnI */ public updateCurrentRangeLabel() { if (this.pagination.total) { - let totalItems = this.pagination.total; - let lowerBound = this.pagination.getLowerPageBound(); - let upperBound = this.pagination.getUpperPageBound(this.pagination.total); + const totalItems = this.pagination.total; + const lowerBound = this.pagination.getLowerPageBound(); + const upperBound = this.pagination.getUpperPageBound(this.pagination.total); this.currentRange = '(' + lowerBound + ' - ' + upperBound + '/' + totalItems + ')'; } else { diff --git a/frontend/src/app/components/time-entries/time-entry-changeset.ts b/frontend/src/app/components/time-entries/time-entry-changeset.ts index b3997bc3dd5..97ad49f584b 100644 --- a/frontend/src/app/components/time-entries/time-entry-changeset.ts +++ b/frontend/src/app/components/time-entries/time-entry-changeset.ts @@ -1,4 +1,4 @@ -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; import { TimeEntryResource } from 'core-app/modules/hal/resources/time-entry-resource'; export class TimeEntryChangeset extends ResourceChangeset { @@ -13,7 +13,7 @@ export class TimeEntryChangeset extends ResourceChangeset { } protected buildPayloadFromChanges() { - let payload = super.buildPayloadFromChanges(); + const payload = super.buildPayloadFromChanges(); // we ignore the project and instead rely completely on the work package. delete payload['_links']['project']; diff --git a/frontend/src/app/components/user/current-user.service.ts b/frontend/src/app/components/user/current-user.service.ts index 345c20d0fd5..d3505b7b6b0 100644 --- a/frontend/src/app/components/user/current-user.service.ts +++ b/frontend/src/app/components/user/current-user.service.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; +import { Injectable } from "@angular/core"; @Injectable({ providedIn: 'root' }) export class CurrentUserService { diff --git a/frontend/src/app/components/user/user-avatar/user-avatar-renderer.service.ts b/frontend/src/app/components/user/user-avatar/user-avatar-renderer.service.ts index 810bf575e1b..30e2826e517 100644 --- a/frontend/src/app/components/user/user-avatar/user-avatar-renderer.service.ts +++ b/frontend/src/app/components/user/user-avatar/user-avatar-renderer.service.ts @@ -1,7 +1,7 @@ -import {Injectable} from "@angular/core"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {ColorsService} from "core-app/modules/common/colors/colors.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injectable } from "@angular/core"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { ColorsService } from "core-app/modules/common/colors/colors.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export interface UserLike { name:string; @@ -18,9 +18,9 @@ export class UserAvatarRendererService { } renderMultiple(container:HTMLElement, - users:UserLike[], - renderName:boolean = true, - multiLine:boolean = false) { + users:UserLike[], + renderName = true, + multiLine = false) { const span = document.createElement('span'); @@ -46,9 +46,9 @@ export class UserAvatarRendererService { } render(container:HTMLElement, - user:UserLike, - renderName:boolean = true, - classes:string = 'avatar-medium'):void { + user:UserLike, + renderName = true, + classes = 'avatar-medium'):void { const userInitials = this.getInitials(user.name); const colorCode = this.colors.toHsl(user.name); @@ -84,10 +84,10 @@ export class UserAvatarRendererService { } private getInitials(name:string) { - let characters = [...name]; - let lastSpace = name.lastIndexOf(' '); - let first = characters[0]?.toUpperCase(); - let last = name[lastSpace + 1]?.toUpperCase(); + const characters = [...name]; + const lastSpace = name.lastIndexOf(' '); + const first = characters[0]?.toUpperCase(); + const last = name[lastSpace + 1]?.toUpperCase(); return [first, last].join(""); } diff --git a/frontend/src/app/components/user/user-avatar/user-avatar.component.spec.ts b/frontend/src/app/components/user/user-avatar/user-avatar.component.spec.ts index 97fb479b0cc..2531c23c1db 100644 --- a/frontend/src/app/components/user/user-avatar/user-avatar.component.spec.ts +++ b/frontend/src/app/components/user/user-avatar/user-avatar.component.spec.ts @@ -27,10 +27,10 @@ //++ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {UserAvatarComponent} from "core-components/user/user-avatar/user-avatar.component"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {States} from "core-components/states.service"; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { UserAvatarComponent } from "core-components/user/user-avatar/user-avatar.component"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { States } from "core-components/states.service"; describe('UserAvatar component test', () => { let app:UserAvatarComponent; diff --git a/frontend/src/app/components/user/user-avatar/user-avatar.component.ts b/frontend/src/app/components/user/user-avatar/user-avatar.component.ts index e3f94dd7261..264fda72ccf 100644 --- a/frontend/src/app/components/user/user-avatar/user-avatar.component.ts +++ b/frontend/src/app/components/user/user-avatar/user-avatar.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; -import {AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Input} from "@angular/core"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {UserAvatarRendererService} from "core-components/user/user-avatar/user-avatar-renderer.service"; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; +import { AfterViewInit, ChangeDetectionStrategy, Component, ElementRef, Input } from "@angular/core"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { UserAvatarRendererService } from "core-components/user/user-avatar/user-avatar-renderer.service"; export const userAvatarSelector = 'user-avatar'; @@ -49,7 +49,7 @@ export class UserAvatarComponent implements AfterViewInit { public ngAfterViewInit() { const element = this.elementRef.nativeElement; - let user = this.user || { name: element.dataset.userName!, id: element.dataset.userId }; + const user = this.user || { name: element.dataset.userName!, id: element.dataset.userId }; this.avatarRenderer.render(element, user, false, element.dataset.classList); } } diff --git a/frontend/src/app/components/user/user-link/user-link.component.spec.ts b/frontend/src/app/components/user/user-link/user-link.component.spec.ts index 5a7b534b4b4..622bc466875 100644 --- a/frontend/src/app/components/user/user-link/user-link.component.spec.ts +++ b/frontend/src/app/components/user/user-link/user-link.component.spec.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {UserLinkComponent} from './user-link.component'; +import { UserLinkComponent } from './user-link.component'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {UserResource} from '../../../modules/hal/resources/user-resource'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { UserResource } from '../../../modules/hal/resources/user-resource'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; describe('UserLinkComponent component test', () => { const PathHelperStub = { diff --git a/frontend/src/app/components/user/user-link/user-link.component.ts b/frontend/src/app/components/user/user-link/user-link.component.ts index 0ae4d71316e..423b8969dbf 100644 --- a/frontend/src/app/components/user/user-link/user-link.component.ts +++ b/frontend/src/app/components/user/user-link/user-link.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component, Input} from '@angular/core'; -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; @Component({ selector: 'user-link', diff --git a/frontend/src/app/components/work-packages/work-package-authorization.service.ts b/frontend/src/app/components/work-packages/work-package-authorization.service.ts index 5c1ca0e4283..6e9e0f56d87 100644 --- a/frontend/src/app/components/work-packages/work-package-authorization.service.ts +++ b/frontend/src/app/components/work-packages/work-package-authorization.service.ts @@ -27,9 +27,9 @@ //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {StateService} from '@uirouter/core'; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { StateService } from '@uirouter/core'; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; export class WorkPackageAuthorization { @@ -60,8 +60,7 @@ export class WorkPackageAuthorization { public linkForAction(action:any) { if (action.key === 'copy') { action.link = this.copyLink(); - } - else { + } else { action.link = this.allActions[action.resource][action.link].href; } diff --git a/frontend/src/app/components/work-packages/work-package-comment/work-package-comment-field-handler.ts b/frontend/src/app/components/work-packages/work-package-comment/work-package-comment-field-handler.ts index 7650229b4d4..b39e9c24d2f 100644 --- a/frontend/src/app/components/work-packages/work-package-comment/work-package-comment-field-handler.ts +++ b/frontend/src/app/components/work-packages/work-package-comment/work-package-comment-field-handler.ts @@ -1,9 +1,9 @@ -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; import { ElementRef, Injector, OnInit, Directive } from "@angular/core"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {Subject} from "rxjs"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { Subject } from "rxjs"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; @Directive() export abstract class WorkPackageCommentFieldHandler extends EditFieldHandler implements OnInit { @@ -34,7 +34,7 @@ export abstract class WorkPackageCommentFieldHandler extends EditFieldHandler im public abstract get workPackage():WorkPackageResource; - public reset(withText:string = '') { + public reset(withText = '') { if (withText.length > 0) { withText += '\n'; } diff --git a/frontend/src/app/components/work-packages/work-package-comment/work-package-comment.component.ts b/frontend/src/app/components/work-packages/work-package-comment/work-package-comment.component.ts index aabf4f3f775..4c53a55a16e 100644 --- a/frontend/src/app/components/work-packages/work-package-comment/work-package-comment.component.ts +++ b/frontend/src/app/components/work-packages/work-package-comment/work-package-comment.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {ErrorResource} from 'core-app/modules/hal/resources/error-resource'; -import {WorkPackagesActivityService} from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; -import {LoadingIndicatorService} from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {CommentService} from "core-components/wp-activity/comment-service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { ErrorResource } from 'core-app/modules/hal/resources/error-resource'; +import { WorkPackagesActivityService } from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; +import { LoadingIndicatorService } from "core-app/modules/common/loading-indicator/loading-indicator.service"; +import { CommentService } from "core-components/wp-activity/comment-service"; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -44,13 +44,13 @@ import { TemplateRef, ViewChild } from "@angular/core"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageCommentFieldHandler} from "core-components/work-packages/work-package-comment/work-package-comment-field-handler"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageCommentFieldHandler } from "core-components/work-packages/work-package-comment/work-package-comment-field-handler"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'work-package-comment', @@ -142,7 +142,7 @@ export class WorkPackageCommentComponent extends WorkPackageCommentFieldHandler this.inFlight = true; await this.onSubmit(); - let indicator = this.loadingIndicator.wpDetails; + const indicator = this.loadingIndicator.wpDetails; return indicator.promise = this.commentService.createComment(this.workPackage, this.commentValue) .then(() => { this.active = false; diff --git a/frontend/src/app/components/work-packages/work-package-comment/wp-comment-field.component.ts b/frontend/src/app/components/work-packages/work-package-comment/wp-comment-field.component.ts index b161b61ad3b..26c2a71764f 100644 --- a/frontend/src/app/components/work-packages/work-package-comment/wp-comment-field.component.ts +++ b/frontend/src/app/components/work-packages/work-package-comment/wp-comment-field.component.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {Component, OnInit} from "@angular/core"; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { Component, OnInit } from "@angular/core"; import { FormattableEditFieldComponent, formattableFieldTemplate } from "core-app/modules/fields/edit/field-types/formattable-edit-field.component"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; @Component({ template: formattableFieldTemplate }) export class WorkPackageCommentFieldComponent extends FormattableEditFieldComponent implements OnInit { - public isBusy:boolean = false; + public isBusy = false; public name = 'comment'; @InjectField() public ConfigurationService:ConfigurationService; diff --git a/frontend/src/app/components/work-packages/work-package.service.ts b/frontend/src/app/components/work-packages/work-package.service.ts index a66a8d38333..74422e47d6f 100644 --- a/frontend/src/app/components/work-packages/work-package.service.ts +++ b/frontend/src/app/components/work-packages/work-package.service.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {StateService} from '@uirouter/core'; -import {Injectable} from "@angular/core"; -import {HttpClient} from "@angular/common/http"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HalDeletedEvent, HalEventsService} from "core-app/modules/hal/services/hal-events.service"; +import { StateService } from '@uirouter/core'; +import { Injectable } from "@angular/core"; +import { HttpClient } from "@angular/common/http"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { UrlParamsHelperService } from "core-components/wp-query/url-params-helper"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HalDeletedEvent, HalEventsService } from "core-app/modules/hal/services/hal-events.service"; @Injectable() export class WorkPackageService { @@ -58,7 +58,7 @@ export class WorkPackageService { const promise = this.http .delete( this.PathHelper.workPackagesBulkDeletePath(), - {params: params, withCredentials: true} + { params: params, withCredentials: true } ) .toPromise(); @@ -67,7 +67,7 @@ export class WorkPackageService { .then(() => { this.NotificationsService.addSuccess(this.text.successful_delete); - ids.forEach(id => this.halEvents.push({_type:'WorkPackage', id: id}, { eventType: 'deleted'} as HalDeletedEvent)); + ids.forEach(id => this.halEvents.push({ _type:'WorkPackage', id: id }, { eventType: 'deleted' } as HalDeletedEvent)); if (this.$state.includes('**.list.details.**') && ids.indexOf(this.$state.params.workPackageId) > -1) { diff --git a/frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb-parent.component.ts b/frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb-parent.component.ts index d71724f3750..1089e3a1588 100644 --- a/frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb-parent.component.ts +++ b/frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb-parent.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, EventEmitter, Output} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageRelationsHierarchyService} from 'core-app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { Component, Input, EventEmitter, Output } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageRelationsHierarchyService } from 'core-app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Component({ templateUrl: './wp-breadcrumb-parent.html', @@ -54,7 +54,7 @@ export class WorkPackageBreadcrumbParentComponent { protected readonly I18n:I18nService, protected readonly wpRelationsHierarchy:WorkPackageRelationsHierarchyService, protected readonly notificationService:WorkPackageNotificationService - ) { + ) { } public canModifyParent():boolean { @@ -79,7 +79,7 @@ export class WorkPackageBreadcrumbParentComponent { public updateParent(newParent:WorkPackageResource|null) { this.close(); - let newParentId = newParent ? newParent.id : null; + const newParentId = newParent ? newParent.id : null; if (_.get(this.parent, 'id', null) === newParentId) { return; } diff --git a/frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb.component.ts b/frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb.component.ts index 89746165cde..360d6e485bb 100644 --- a/frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb.component.ts +++ b/frontend/src/app/components/work-packages/wp-breadcrumb/wp-breadcrumb.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { Component, Input } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; @Component({ templateUrl: './wp-breadcrumb.html', @@ -46,7 +46,7 @@ export class WorkPackageBreadcrumbComponent { constructor(private I18n:I18nService) { } - public inputActive:boolean = false; + public inputActive = false; public get hierarchyCount() { return this.workPackage.ancestors.length; diff --git a/frontend/src/app/components/work-packages/wp-relations-count/wp-relations-count.component.ts b/frontend/src/app/components/work-packages/wp-relations-count/wp-relations-count.component.ts index 99380376750..2624f640c45 100644 --- a/frontend/src/app/components/work-packages/wp-relations-count/wp-relations-count.component.ts +++ b/frontend/src/app/components/work-packages/wp-relations-count/wp-relations-count.component.ts @@ -1,8 +1,8 @@ -import {Component, Input, OnInit} from '@angular/core'; -import {WorkPackageRelationsService} from '../../wp-relations/wp-relations.service'; -import {combineLatest} from 'rxjs'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, Input, OnInit } from '@angular/core'; +import { WorkPackageRelationsService } from '../../wp-relations/wp-relations.service'; +import { combineLatest } from 'rxjs'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './wp-relations-count.html', @@ -10,7 +10,7 @@ import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; }) export class WorkPackageRelationsCountComponent extends UntilDestroyedMixin implements OnInit { @Input('wpId') wpId:string; - public count:number = 0; + public count = 0; constructor(protected apiV3Service:APIV3Service, protected wpRelations:WorkPackageRelationsService) { @@ -33,8 +33,8 @@ export class WorkPackageRelationsCountComponent extends UntilDestroyedMixin impl ]).pipe( this.untilDestroyed() ).subscribe(([relations, workPackage]) => { - let relationCount = _.size(relations); - let childrenCount = _.size(workPackage.children); + const relationCount = _.size(relations); + const childrenCount = _.size(workPackage.children); this.count = relationCount + childrenCount; }); diff --git a/frontend/src/app/components/work-packages/wp-relations-count/wp-watchers-count.component.ts b/frontend/src/app/components/work-packages/wp-relations-count/wp-watchers-count.component.ts index b20508b7114..d14a3c80aef 100644 --- a/frontend/src/app/components/work-packages/wp-relations-count/wp-watchers-count.component.ts +++ b/frontend/src/app/components/work-packages/wp-relations-count/wp-watchers-count.component.ts @@ -1,8 +1,8 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit} from '@angular/core'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {WorkPackageWatchersService} from 'core-app/components/wp-single-view-tabs/watchers-tab/wp-watchers.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { WorkPackageWatchersService } from 'core-app/components/wp-single-view-tabs/watchers-tab/wp-watchers.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './wp-relations-count.html', @@ -11,7 +11,7 @@ import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; }) export class WorkPackageWatchersCountComponent extends UntilDestroyedMixin implements OnInit { @Input('wpId') wpId:string; - public count:number = 0; + public count = 0; constructor(protected apiV3Service:APIV3Service, protected wpWatcherService:WorkPackageWatchersService, @@ -28,12 +28,12 @@ export class WorkPackageWatchersCountComponent extends UntilDestroyedMixin imple .pipe( this.untilDestroyed() ).subscribe((workPackage) => { - this.wpWatcherService - .require(workPackage) - .then((watchers:HalResource[]) => { - this.count = watchers.length; - this.cdRef.detectChanges(); - }); - }); + this.wpWatcherService + .require(workPackage) + .then((watchers:HalResource[]) => { + this.count = watchers.length; + this.cdRef.detectChanges(); + }); + }); } } diff --git a/frontend/src/app/components/work-packages/wp-single-view/wp-single-view.component.ts b/frontend/src/app/components/work-packages/wp-single-view/wp-single-view.component.ts index 2364a35e201..1da99d49fb8 100644 --- a/frontend/src/app/components/work-packages/wp-single-view/wp-single-view.component.ts +++ b/frontend/src/app/components/work-packages/wp-single-view/wp-single-view.component.ts @@ -35,28 +35,28 @@ import { Input, OnInit } from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {distinctUntilChanged, map} from 'rxjs/operators'; -import {debugLog} from '../../../helpers/debug_output'; -import {CurrentProjectService} from '../../projects/current-project.service'; -import {States} from '../../states.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { distinctUntilChanged, map } from 'rxjs/operators'; +import { debugLog } from '../../../helpers/debug_output'; +import { CurrentProjectService } from '../../projects/current-project.service'; +import { States } from '../../states.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {DisplayFieldService} from 'core-app/modules/fields/display/display-field.service'; -import {DisplayField} from 'core-app/modules/fields/display/display-field.module'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {HookService} from 'core-app/modules/plugins/hook-service'; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {Subject} from "rxjs"; -import {randomString} from "core-app/helpers/random-string"; -import {BrowserDetector} from "core-app/modules/common/browser/browser-detector.service"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {ISchemaProxy} from "core-app/modules/hal/schemas/schema-proxy"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { DisplayFieldService } from 'core-app/modules/fields/display/display-field.service'; +import { DisplayField } from 'core-app/modules/fields/display/display-field.module'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { HookService } from 'core-app/modules/plugins/hook-service'; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { Subject } from "rxjs"; +import { randomString } from "core-app/helpers/random-string"; +import { BrowserDetector } from "core-app/modules/common/browser/browser-detector.service"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { ISchemaProxy } from "core-app/modules/hal/schemas/schema-proxy"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export interface FieldDescriptor { name:string; @@ -94,7 +94,7 @@ export class WorkPackageSingleViewComponent extends UntilDestroyedMixin implemen @Input() public workPackage:WorkPackageResource; /** Should we show the project field */ - @Input() public showProject:boolean = false; + @Input() public showProject = false; // Grouped fields returned from API public groupedFields:GroupDescriptor[] = []; @@ -129,7 +129,7 @@ export class WorkPackageSingleViewComponent extends UntilDestroyedMixin implemen }, }; - protected firstTimeFocused:boolean = false; + protected firstTimeFocused = false; $element:JQuery; @@ -259,9 +259,9 @@ export class WorkPackageSingleViewComponent extends UntilDestroyedMixin implemen } public get projectContextText():string { - let id = this.workPackage.project.idFromLink; - let projectPath = this.PathHelper.projectPath(id); - let project = `${this.workPackage.project.name}`; + const id = this.workPackage.project.idFromLink; + const projectPath = this.PathHelper.projectPath(id); + const project = `${this.workPackage.project.name}`; return this.I18n.t('js.project.work_package_belongs_to', { projectname: project }); } @@ -278,7 +278,7 @@ export class WorkPackageSingleViewComponent extends UntilDestroyedMixin implemen } return attributeGroups.map((group:any) => { - let groupId = this.getAttributesGroupId(group); + const groupId = this.getAttributesGroupId(group); if (group._type === 'WorkPackageFormAttributeGroup') { return { @@ -339,7 +339,7 @@ export class WorkPackageSingleViewComponent extends UntilDestroyedMixin implemen * combined 'start' and 'due' date field. */ private getDateField(change:WorkPackageChangeset):FieldDescriptor { - let object:any = { + const object:any = { label: this.I18n.t('js.work_packages.properties.date'), multiple: false }; @@ -364,10 +364,10 @@ export class WorkPackageSingleViewComponent extends UntilDestroyedMixin implemen * @returns {SchemaContext} */ private contextFrom(workPackage:WorkPackageResource):ResourceContextChange { - let schema = this.schema(workPackage); + const schema = this.schema(workPackage); let schemaHref:string|null = null; - let projectHref:string|null = workPackage.project && workPackage.project.href; + const projectHref:string|null = workPackage.project && workPackage.project.href; if (schema.baseSchema) { schemaHref = schema.baseSchema.href; @@ -393,7 +393,7 @@ export class WorkPackageSingleViewComponent extends UntilDestroyedMixin implemen } private getAttributesGroupId(group:any):string { - let overflowingIdentifier = this.$element + const overflowingIdentifier = this.$element .find("[data-group-name=\'" + group.name + "\']") .data(overflowingContainerAttribute); diff --git a/frontend/src/app/components/work-packages/wp-subject/wp-subject.component.ts b/frontend/src/app/components/work-packages/wp-subject/wp-subject.component.ts index 5b1df90039a..6295a98c800 100644 --- a/frontend/src/app/components/work-packages/wp-subject/wp-subject.component.ts +++ b/frontend/src/app/components/work-packages/wp-subject/wp-subject.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, OnInit} from '@angular/core'; -import {UIRouterGlobals} from '@uirouter/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {randomString} from "core-app/helpers/random-string"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, Input, OnInit } from '@angular/core'; +import { UIRouterGlobals } from '@uirouter/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { randomString } from "core-app/helpers/random-string"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'wp-subject', diff --git a/frontend/src/app/components/work-packages/wp-type-status/wp-type-status.component.ts b/frontend/src/app/components/work-packages/wp-type-status/wp-type-status.component.ts index d750524b71d..c5103ed4c18 100644 --- a/frontend/src/app/components/work-packages/wp-type-status/wp-type-status.component.ts +++ b/frontend/src/app/components/work-packages/wp-type-status/wp-type-status.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {Component, Input} from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { Component, Input } from '@angular/core'; @Component({ selector: 'wp-type-status', diff --git a/frontend/src/app/components/work-packages/wp-watcher-button/wp-watcher-button.component.ts b/frontend/src/app/components/work-packages/wp-watcher-button/wp-watcher-button.component.ts index 4a7dbc7cded..b8d9d73b711 100644 --- a/frontend/src/app/components/work-packages/wp-watcher-button/wp-watcher-button.component.ts +++ b/frontend/src/app/components/work-packages/wp-watcher-button/wp-watcher-button.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageWatchersService} from 'core-components/wp-single-view-tabs/watchers-tab/wp-watchers.service'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageWatchersService } from 'core-components/wp-single-view-tabs/watchers-tab/wp-watchers.service'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'wp-watcher-button', @@ -40,8 +40,8 @@ import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; }) export class WorkPackageWatcherButtonComponent extends UntilDestroyedMixin implements OnInit { @Input('workPackage') public workPackage:WorkPackageResource; - @Input('showText') public showText:boolean = false; - @Input('disabled') public disabled:boolean = false; + @Input('showText') public showText = false; + @Input('disabled') public disabled = false; public buttonText:string; public buttonTitle:string; diff --git a/frontend/src/app/components/wp-activity/activity-entry.component.ts b/frontend/src/app/components/wp-activity/activity-entry.component.ts index fa4a8975ae0..8108fb69e29 100644 --- a/frontend/src/app/components/wp-activity/activity-entry.component.ts +++ b/frontend/src/app/components/wp-activity/activity-entry.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, OnInit} from "@angular/core"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Component, Input, OnInit } from "@angular/core"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ diff --git a/frontend/src/app/components/wp-activity/activity-link.component.ts b/frontend/src/app/components/wp-activity/activity-link.component.ts index 7f05379e587..6a486fbd316 100644 --- a/frontend/src/app/components/wp-activity/activity-link.component.ts +++ b/frontend/src/app/components/wp-activity/activity-link.component.ts @@ -1,5 +1,5 @@ -import {Component, Input, OnInit} from "@angular/core"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; +import { Component, Input, OnInit } from "@angular/core"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; @Component({ selector: 'activity-link', diff --git a/frontend/src/app/components/wp-activity/comment-service.ts b/frontend/src/app/components/wp-activity/comment-service.ts index 11e2abef980..548473590db 100644 --- a/frontend/src/app/components/wp-activity/comment-service.ts +++ b/frontend/src/app/components/wp-activity/comment-service.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {Subject} from "rxjs"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { Injectable } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { Subject } from "rxjs"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Injectable() export class CommentService { diff --git a/frontend/src/app/components/wp-activity/revision/revision-activity.component.ts b/frontend/src/app/components/wp-activity/revision/revision-activity.component.ts index efa4a48f8d0..db46390133b 100644 --- a/frontend/src/app/components/wp-activity/revision/revision-activity.component.ts +++ b/frontend/src/app/components/wp-activity/revision/revision-activity.component.ts @@ -25,14 +25,14 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit} from "@angular/core"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from "@angular/core"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {UserResource} from "core-app/modules/hal/resources/user-resource"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { UserResource } from "core-app/modules/hal/resources/user-resource"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'revision-activity', @@ -78,7 +78,7 @@ export class RevisionActivityComponent implements OnInit { link.title = this.revision; link.textContent = this.I18n.t( "js.label_committed_link", - {revision_identifier: formattedRevision} + { revision_identifier: formattedRevision } ); this.revisionLink = this.I18n.t("js.label_committed_at", @@ -103,7 +103,7 @@ export class RevisionActivityComponent implements OnInit { this.userActive = user.isActive; this.userAvatar = user.avatar; this.userPath = user.showUser.href; - this.userLabel = this.I18n.t('js.label_author', {user: this.userName}); + this.userLabel = this.I18n.t('js.label_author', { user: this.userName }); this.cdRef.detectChanges(); }); } diff --git a/frontend/src/app/components/wp-activity/user/user-activity.component.ts b/frontend/src/app/components/wp-activity/user/user-activity.component.ts index 9cbf3d75dbc..1397baabaff 100644 --- a/frontend/src/app/components/wp-activity/user/user-activity.component.ts +++ b/frontend/src/app/components/wp-activity/user/user-activity.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackagesActivityService} from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackagesActivityService } from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; import { ApplicationRef, ChangeDetectionStrategy, @@ -41,12 +41,12 @@ import { Input, NgZone, OnInit } from "@angular/core"; -import {CommentService} from "core-components/wp-activity/comment-service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageCommentFieldHandler} from "core-components/work-packages/work-package-comment/work-package-comment-field-handler"; -import {DomSanitizer, SafeHtml} from "@angular/platform-browser"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { CommentService } from "core-components/wp-activity/comment-service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageCommentFieldHandler } from "core-components/work-packages/work-package-comment/work-package-comment-field-handler"; +import { DomSanitizer, SafeHtml } from "@angular/platform-browser"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'user-activity', @@ -212,7 +212,7 @@ export class UserActivityComponent extends WorkPackageCommentFieldHandler implem } public quotedText(rawComment:string) { - let quoted = rawComment.split('\n') + const quoted = rawComment.split('\n') .map(function(line:string) { return '\n> ' + line; }) diff --git a/frontend/src/app/components/wp-buttons/wp-buttons.module.ts b/frontend/src/app/components/wp-buttons/wp-buttons.module.ts index 7b3d16640f0..1029c18bb0a 100644 --- a/frontend/src/app/components/wp-buttons/wp-buttons.module.ts +++ b/frontend/src/app/components/wp-buttons/wp-buttons.module.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export interface ButtonControllerText { activate:string; @@ -42,7 +42,7 @@ export abstract class AbstractWorkPackageButtonComponent extends UntilDestroyedM public iconClass:string; public accessKey:number; - public isActive:boolean = false; + public isActive = false; protected text:ButtonControllerText; diff --git a/frontend/src/app/components/wp-buttons/wp-create-button/wp-create-button.component.ts b/frontend/src/app/components/wp-buttons/wp-create-button/wp-create-button.component.ts index e262468087b..521ab0f2d34 100644 --- a/frontend/src/app/components/wp-buttons/wp-create-button/wp-create-button.component.ts +++ b/frontend/src/app/components/wp-buttons/wp-create-button/wp-create-button.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {StateService, TransitionService} from '@uirouter/core'; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnDestroy, OnInit} from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {AuthorisationService} from "core-app/modules/common/model-auth/model-auth.service"; -import {Observable} from "rxjs"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { StateService, TransitionService } from '@uirouter/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { AuthorisationService } from "core-app/modules/common/model-auth/model-auth.service"; +import { Observable } from "rxjs"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; @Component({ selector: 'wp-create-button', @@ -45,7 +45,7 @@ export class WorkPackageCreateButtonComponent extends UntilDestroyedMixin implem @Input('stateName$') stateName$:Observable; allowed:boolean; - disabled:boolean + disabled:boolean; projectIdentifier:string|null; types:any; transitionUnregisterFn:Function; @@ -75,7 +75,7 @@ export class WorkPackageCreateButtonComponent extends UntilDestroyedMixin implem this.allowed = !!this .allowedWhen .find(combined => { - let [module, permission] = combined.split('.'); + const [module, permission] = combined.split('.'); return this.authorisationService.can(module, permission); }); diff --git a/frontend/src/app/components/wp-buttons/wp-details-view-button/wp-details-view-button.component.ts b/frontend/src/app/components/wp-buttons/wp-details-view-button/wp-details-view-button.component.ts index c2b4155cf18..ca81979b58c 100644 --- a/frontend/src/app/components/wp-buttons/wp-details-view-button/wp-details-view-button.component.ts +++ b/frontend/src/app/components/wp-buttons/wp-details-view-button/wp-details-view-button.component.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {KeepTabService} from '../../wp-single-view-tabs/keep-tab/keep-tab.service'; -import {States} from '../../states.service'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {StateService, TransitionService} from '@uirouter/core'; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy} from '@angular/core'; -import {AbstractWorkPackageButtonComponent} from 'core-components/wp-buttons/wp-buttons.module'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { KeepTabService } from '../../wp-single-view-tabs/keep-tab/keep-tab.service'; +import { States } from '../../states.service'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { StateService, TransitionService } from '@uirouter/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy } from '@angular/core'; +import { AbstractWorkPackageButtonComponent } from 'core-components/wp-buttons/wp-buttons.module'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ templateUrl: '../wp-button.template.html', @@ -41,12 +41,12 @@ import {I18nService} from "core-app/modules/common/i18n/i18n.service"; }) export class WorkPackageDetailsViewButtonComponent extends AbstractWorkPackageButtonComponent implements OnDestroy { public projectIdentifier:string; - public accessKey:number = 8; - public activeState:string = 'work-packages.partitioned.list.details'; - public listState:string = 'work-packages.partitioned.list'; - public buttonId:string = 'work-packages-details-view-button'; - public buttonClass:string = 'toolbar-icon'; - public iconClass:string = 'icon-info2'; + public accessKey = 8; + public activeState = 'work-packages.partitioned.list.details'; + public listState = 'work-packages.partitioned.list'; + public buttonId = 'work-packages-details-view-button'; + public buttonClass = 'toolbar-icon'; + public iconClass = 'icon-info2'; public activateLabel:string; public deactivateLabel:string; diff --git a/frontend/src/app/components/wp-buttons/wp-filter-button/wp-filter-button.component.ts b/frontend/src/app/components/wp-buttons/wp-filter-button/wp-filter-button.component.ts index 0c4fd891007..0a900a76036 100644 --- a/frontend/src/app/components/wp-buttons/wp-filter-button/wp-filter-button.component.ts +++ b/frontend/src/app/components/wp-buttons/wp-filter-button/wp-filter-button.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AbstractWorkPackageButtonComponent} from 'core-components/wp-buttons/wp-buttons.module'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit} from '@angular/core'; -import {WorkPackageFiltersService} from 'core-components/filters/wp-filters/wp-filters.service'; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; +import { AbstractWorkPackageButtonComponent } from 'core-components/wp-buttons/wp-buttons.module'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { WorkPackageFiltersService } from 'core-components/filters/wp-filters/wp-filters.service'; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; @Component({ selector: 'wp-filter-button', @@ -40,10 +40,10 @@ import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; }) export class WorkPackageFilterButtonComponent extends AbstractWorkPackageButtonComponent implements OnInit { public count:number; - public initialized:boolean = false; + public initialized = false; - public buttonId:string = 'work-packages-filter-toggle-button'; - public iconClass:string = 'icon-filter'; + public buttonId = 'work-packages-filter-toggle-button'; + public iconClass = 'icon-filter'; constructor(readonly I18n:I18nService, protected cdRef:ChangeDetectorRef, diff --git a/frontend/src/app/components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component.ts b/frontend/src/app/components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component.ts index 2866aa641bf..bc0d642b493 100644 --- a/frontend/src/app/components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component.ts +++ b/frontend/src/app/components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component} from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ template: ` diff --git a/frontend/src/app/components/wp-buttons/wp-settings-button/wp-settings-button.component.ts b/frontend/src/app/components/wp-buttons/wp-settings-button/wp-settings-button.component.ts index def9e22297d..a0b67686e2e 100644 --- a/frontend/src/app/components/wp-buttons/wp-settings-button/wp-settings-button.component.ts +++ b/frontend/src/app/components/wp-buttons/wp-settings-button/wp-settings-button.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component} from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ templateUrl: './wp-settings-button.component.html', diff --git a/frontend/src/app/components/wp-buttons/wp-status-button/wp-status-button.component.ts b/frontend/src/app/components/wp-buttons/wp-status-button/wp-status-button.component.ts index 15e9cad0128..728d95716c7 100644 --- a/frontend/src/app/components/wp-buttons/wp-status-button/wp-status-button.component.ts +++ b/frontend/src/app/components/wp-buttons/wp-status-button/wp-status-button.component.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {ChangeDetectorRef, Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {ISchemaProxy} from "core-app/modules/hal/schemas/schema-proxy"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { ISchemaProxy } from "core-app/modules/hal/schemas/schema-proxy"; @Component({ selector: 'wp-status-button', @@ -88,7 +88,7 @@ export class WorkPackageStatusButtonComponent extends UntilDestroyedMixin implem } public get statusHighlightClass() { - let status = this.status; + const status = this.status; if (!status) { return; } diff --git a/frontend/src/app/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component.ts b/frontend/src/app/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component.ts index a94e6a5e614..1038eda1fea 100644 --- a/frontend/src/app/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component.ts +++ b/frontend/src/app/components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AbstractWorkPackageButtonComponent, ButtonControllerText} from '../wp-buttons.module'; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {TimelineZoomLevel} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { AbstractWorkPackageButtonComponent, ButtonControllerText } from '../wp-buttons.module'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { TimelineZoomLevel } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; export interface TimelineButtonText extends ButtonControllerText { zoomOut:string; @@ -45,8 +45,8 @@ export interface TimelineButtonText extends ButtonControllerText { changeDetection: ChangeDetectionStrategy.OnPush }) export class WorkPackageTimelineButtonComponent extends AbstractWorkPackageButtonComponent implements OnInit { - public buttonId:string = 'work-packages-timeline-toggle-button'; - public iconClass:string = 'icon-view-timeline'; + public buttonId = 'work-packages-timeline-toggle-button'; + public iconClass = 'icon-view-timeline'; private activateLabel:string; private deactivateLabel:string; @@ -58,8 +58,8 @@ export class WorkPackageTimelineButtonComponent extends AbstractWorkPackageButto public isAutoZoom = false; - public isMaxLevel:boolean = false; - public isMinLevel:boolean = false; + public isMaxLevel = false; + public isMinLevel = false; constructor(readonly I18n:I18nService, readonly cdRef:ChangeDetectorRef, diff --git a/frontend/src/app/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component.ts b/frontend/src/app/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component.ts index 355b819f516..34906e93811 100644 --- a/frontend/src/app/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component.ts +++ b/frontend/src/app/components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; import { WorkPackageViewDisplayRepresentationService, wpDisplayCardRepresentation, wpDisplayListRepresentation } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {combineLatest} from "rxjs"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { combineLatest } from "rxjs"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Component({ @@ -71,7 +71,7 @@ export class WorkPackageViewToggleButton extends UntilDestroyedMixin implements } ngOnInit() { - let statesCombined = combineLatest([ + const statesCombined = combineLatest([ this.wpDisplayRepresentationService.live$(), this.wpTableTimeline.live$(), ]); diff --git a/frontend/src/app/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component.ts b/frontend/src/app/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component.ts index eaf720a32ea..d61d6a8a05b 100644 --- a/frontend/src/app/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component.ts +++ b/frontend/src/app/components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AbstractWorkPackageButtonComponent} from '../wp-buttons.module'; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { AbstractWorkPackageButtonComponent } from '../wp-buttons.module'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; import * as sfimport from "screenfull"; -import {Screenfull} from "screenfull"; +import { Screenfull } from "screenfull"; const screenfull:Screenfull = sfimport as any; export const zenModeComponentSelector = 'zen-mode-toggle-button'; @@ -42,11 +42,11 @@ export const zenModeComponentSelector = 'zen-mode-toggle-button'; selector: zenModeComponentSelector, }) export class ZenModeButtonComponent extends AbstractWorkPackageButtonComponent { - public buttonId:string = 'work-packages-zen-mode-toggle-button'; - public buttonClass:string = 'toolbar-icon'; - public iconClass:string = 'icon-zen-mode'; + public buttonId = 'work-packages-zen-mode-toggle-button'; + public buttonClass = 'toolbar-icon'; + public iconClass = 'icon-zen-mode'; - static inZenMode:boolean = false; + static inZenMode = false; private activateLabel:string; private deactivateLabel:string; @@ -57,7 +57,7 @@ export class ZenModeButtonComponent extends AbstractWorkPackageButtonComponent { this.activateLabel = I18n.t('js.zen_mode.button_activate'); this.deactivateLabel = I18n.t('js.zen_mode.button_deactivate'); - let self = this; + const self = this; if (screenfull.enabled) { diff --git a/frontend/src/app/components/wp-card-view/event-handler/card-view-handler-registry.ts b/frontend/src/app/components/wp-card-view/event-handler/card-view-handler-registry.ts index f29c4c698ef..6f4624ca169 100644 --- a/frontend/src/app/components/wp-card-view/event-handler/card-view-handler-registry.ts +++ b/frontend/src/app/components/wp-card-view/event-handler/card-view-handler-registry.ts @@ -1,7 +1,7 @@ -import {WorkPackageCardViewComponent} from "core-components/wp-card-view/wp-card-view.component"; -import {CardClickHandler} from "core-components/wp-card-view/event-handler/click-handler"; -import {CardDblClickHandler} from "core-components/wp-card-view/event-handler/double-click-handler"; -import {CardRightClickHandler} from "core-components/wp-card-view/event-handler/right-click-handler"; +import { WorkPackageCardViewComponent } from "core-components/wp-card-view/wp-card-view.component"; +import { CardClickHandler } from "core-components/wp-card-view/event-handler/click-handler"; +import { CardDblClickHandler } from "core-components/wp-card-view/event-handler/double-click-handler"; +import { CardRightClickHandler } from "core-components/wp-card-view/event-handler/right-click-handler"; import { WorkPackageViewEventHandler, WorkPackageViewHandlerRegistry diff --git a/frontend/src/app/components/wp-card-view/event-handler/click-handler.ts b/frontend/src/app/components/wp-card-view/event-handler/click-handler.ts index 25f2e9327f1..ba5b1782ff1 100644 --- a/frontend/src/app/components/wp-card-view/event-handler/click-handler.ts +++ b/frontend/src/app/components/wp-card-view/event-handler/click-handler.ts @@ -1,12 +1,12 @@ -import {Injector} from '@angular/core'; -import {CardEventHandler} from "core-components/wp-card-view/event-handler/card-view-handler-registry"; -import {WorkPackageCardViewComponent} from "core-components/wp-card-view/wp-card-view.component"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {WorkPackageViewFocusService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; -import {WorkPackageCardViewService} from "core-components/wp-card-view/services/wp-card-view.service"; -import {StateService} from "@uirouter/core"; -import {DeviceService} from "core-app/modules/common/browser/device.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { CardEventHandler } from "core-components/wp-card-view/event-handler/card-view-handler-registry"; +import { WorkPackageCardViewComponent } from "core-components/wp-card-view/wp-card-view.component"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { WorkPackageViewFocusService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; +import { WorkPackageCardViewService } from "core-components/wp-card-view/services/wp-card-view.service"; +import { StateService } from "@uirouter/core"; +import { DeviceService } from "core-app/modules/common/browser/device.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class CardClickHandler implements CardEventHandler { @@ -18,7 +18,7 @@ export class CardClickHandler implements CardEventHandler { @InjectField() wpCardView:WorkPackageCardViewService; constructor(public readonly injector:Injector, - card:WorkPackageCardViewComponent) { + card:WorkPackageCardViewComponent) { } public get EVENT() { @@ -34,7 +34,7 @@ export class CardClickHandler implements CardEventHandler { } public handleEvent(card:WorkPackageCardViewComponent, evt:JQuery.TriggeredEvent) { - let target = jQuery(evt.target); + const target = jQuery(evt.target); // Ignore links if (target.is('a') || target.parent().is('a')) { @@ -42,8 +42,8 @@ export class CardClickHandler implements CardEventHandler { } // Locate the card from event - let element = target.closest('wp-single-card'); - let wpId = element.data('workPackageId'); + const element = target.closest('wp-single-card'); + const wpId = element.data('workPackageId'); if (!wpId) { return true; @@ -62,8 +62,8 @@ export class CardClickHandler implements CardEventHandler { } protected setSelection(card:WorkPackageCardViewComponent, wpId:string, element:JQuery, evt:JQuery.TriggeredEvent) { - let classIdentifier = element.data('classIdentifier'); - let index = this.wpCardView.findRenderedCard(classIdentifier); + const classIdentifier = element.data('classIdentifier'); + const index = this.wpCardView.findRenderedCard(classIdentifier); // Update single selection if no modifier present if (!(evt.ctrlKey || evt.metaKey || evt.shiftKey)) { diff --git a/frontend/src/app/components/wp-card-view/event-handler/double-click-handler.ts b/frontend/src/app/components/wp-card-view/event-handler/double-click-handler.ts index 0f9845d372e..12797a279ec 100644 --- a/frontend/src/app/components/wp-card-view/event-handler/double-click-handler.ts +++ b/frontend/src/app/components/wp-card-view/event-handler/double-click-handler.ts @@ -1,16 +1,16 @@ -import {Injector} from '@angular/core'; -import {CardEventHandler} from "core-components/wp-card-view/event-handler/card-view-handler-registry"; -import {WorkPackageCardViewComponent} from "core-components/wp-card-view/wp-card-view.component"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {StateService} from "@uirouter/core"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { CardEventHandler } from "core-components/wp-card-view/event-handler/card-view-handler-registry"; +import { WorkPackageCardViewComponent } from "core-components/wp-card-view/wp-card-view.component"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { StateService } from "@uirouter/core"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class CardDblClickHandler implements CardEventHandler { @InjectField() $state:StateService; @InjectField() wpTableSelection:WorkPackageViewSelectionService; constructor(public readonly injector:Injector, - card:WorkPackageCardViewComponent) { + card:WorkPackageCardViewComponent) { } public get EVENT() { @@ -26,7 +26,7 @@ export class CardDblClickHandler implements CardEventHandler { } public handleEvent(card:WorkPackageCardViewComponent, evt:JQuery.TriggeredEvent) { - let target = jQuery(evt.target); + const target = jQuery(evt.target); // Ignore links if (target.is('a') || target.parent().is('a')) { @@ -34,8 +34,8 @@ export class CardDblClickHandler implements CardEventHandler { } // Locate the row from event - let element = target.closest('wp-single-card'); - let wpId = element.data('workPackageId'); + const element = target.closest('wp-single-card'); + const wpId = element.data('workPackageId'); if (!wpId) { return true; diff --git a/frontend/src/app/components/wp-card-view/event-handler/right-click-handler.ts b/frontend/src/app/components/wp-card-view/event-handler/right-click-handler.ts index 223c341f607..ea4589c1152 100644 --- a/frontend/src/app/components/wp-card-view/event-handler/right-click-handler.ts +++ b/frontend/src/app/components/wp-card-view/event-handler/right-click-handler.ts @@ -1,13 +1,13 @@ -import {Injector} from '@angular/core'; -import {CardEventHandler} from "core-components/wp-card-view/event-handler/card-view-handler-registry"; -import {WorkPackageCardViewComponent} from "core-components/wp-card-view/wp-card-view.component"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {uiStateLinkClass} from "core-components/wp-fast-table/builders/ui-state-link-builder"; -import {debugLog} from "core-app/helpers/debug_output"; -import {WorkPackageCardViewService} from "core-components/wp-card-view/services/wp-card-view.service"; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {WorkPackageViewContextMenu} from "core-components/op-context-menu/wp-context-menu/wp-view-context-menu.directive"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { CardEventHandler } from "core-components/wp-card-view/event-handler/card-view-handler-registry"; +import { WorkPackageCardViewComponent } from "core-components/wp-card-view/wp-card-view.component"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { uiStateLinkClass } from "core-components/wp-fast-table/builders/ui-state-link-builder"; +import { debugLog } from "core-app/helpers/debug_output"; +import { WorkPackageCardViewService } from "core-components/wp-card-view/services/wp-card-view.service"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { WorkPackageViewContextMenu } from "core-components/op-context-menu/wp-context-menu/wp-view-context-menu.directive"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class CardRightClickHandler implements CardEventHandler { @@ -17,7 +17,7 @@ export class CardRightClickHandler implements CardEventHandler { @InjectField() opContextMenu:OPContextMenuService; constructor(public readonly injector:Injector, - card:WorkPackageCardViewComponent) { + card:WorkPackageCardViewComponent) { } public get EVENT() { @@ -33,7 +33,7 @@ export class CardRightClickHandler implements CardEventHandler { } public handleEvent(card:WorkPackageCardViewComponent, evt:JQuery.TriggeredEvent) { - let target = jQuery(evt.target); + const target = jQuery(evt.target); // We want to keep the original context menu on hrefs // (currently, this is only the id) @@ -52,8 +52,8 @@ export class CardRightClickHandler implements CardEventHandler { if (!wpId) { return true; } else { - let classIdentifier = element.data('classIdentifier'); - let index = this.wpCardView.findRenderedCard(classIdentifier); + const classIdentifier = element.data('classIdentifier'); + const index = this.wpCardView.findRenderedCard(classIdentifier); if (!this.wpTableSelection.isSelected(wpId)) { this.wpTableSelection.setSelection(wpId, index); diff --git a/frontend/src/app/components/wp-card-view/services/wp-card-drag-and-drop.service.ts b/frontend/src/app/components/wp-card-view/services/wp-card-drag-and-drop.service.ts index c929c5da8ab..0b85159a27e 100644 --- a/frontend/src/app/components/wp-card-view/services/wp-card-drag-and-drop.service.ts +++ b/frontend/src/app/components/wp-card-view/services/wp-card-drag-and-drop.service.ts @@ -1,16 +1,16 @@ -import {Injectable, Injector, Optional} from '@angular/core'; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {WorkPackageViewOrderService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; -import {States} from "core-components/states.service"; -import {WorkPackageCreateService} from "core-components/wp-new/wp-create.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; -import {DragAndDropHelpers} from "core-app/modules/common/drag-and-drop/drag-and-drop.helpers"; -import {WorkPackageCardViewComponent} from "core-components/wp-card-view/wp-card-view.component"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injectable, Injector, Optional } from '@angular/core'; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { WorkPackageViewOrderService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; +import { States } from "core-components/states.service"; +import { WorkPackageCreateService } from "core-components/wp-new/wp-create.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { DragAndDropService } from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; +import { DragAndDropHelpers } from "core-app/modules/common/drag-and-drop/drag-and-drop.helpers"; +import { WorkPackageCardViewComponent } from "core-components/wp-card-view/wp-card-view.component"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() export class WorkPackageCardDragAndDropService { @@ -112,12 +112,12 @@ export class WorkPackageCardDragAndDropService { */ public set workPackages(workPackages:WorkPackageResource[]) { if (this.activeInlineCreateWp) { - let existingNewWp = this._workPackages.find(o => o.isNew); + const existingNewWp = this._workPackages.find(o => o.isNew); // If there is already a card for a new WP, // we have to replace this one by the new activeInlineCreateWp if (existingNewWp) { - let index = this._workPackages.indexOf(existingNewWp); + const index = this._workPackages.indexOf(existingNewWp); this._workPackages[index] = this.activeInlineCreateWp; } else { this._workPackages = [this.activeInlineCreateWp, ...workPackages]; @@ -173,7 +173,7 @@ export class WorkPackageCardDragAndDropService { /** * Add the given work package to the query */ - async addWorkPackageToQuery(workPackage:WorkPackageResource, toIndex:number = -1):Promise { + async addWorkPackageToQuery(workPackage:WorkPackageResource, toIndex = -1):Promise { try { await this.cardView.workPackageAddedHandler(workPackage); const newOrder = await this.reorderService.add(this.currentOrder, workPackage.id!, toIndex); diff --git a/frontend/src/app/components/wp-card-view/services/wp-card-view.service.ts b/frontend/src/app/components/wp-card-view/services/wp-card-view.service.ts index 35786457c7a..23f3cd11959 100644 --- a/frontend/src/app/components/wp-card-view/services/wp-card-view.service.ts +++ b/frontend/src/app/components/wp-card-view/services/wp-card-view.service.ts @@ -1,6 +1,6 @@ -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Injectable} from '@angular/core'; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable } from '@angular/core'; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; @Injectable() export class WorkPackageCardViewService { @@ -31,6 +31,6 @@ export class WorkPackageCardViewService { hidden: false }; }) - ) + ); } } diff --git a/frontend/src/app/components/wp-card-view/wp-card-view.component.ts b/frontend/src/app/components/wp-card-view/wp-card-view.component.ts index fd77e70102d..c72862cdfc2 100644 --- a/frontend/src/app/components/wp-card-view/wp-card-view.component.ts +++ b/frontend/src/app/components/wp-card-view/wp-card-view.component.ts @@ -11,35 +11,35 @@ import { Output, ViewChild } from "@angular/core"; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {QueryColumn} from "app/components/wp-query/query-column"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {WorkPackageCreateService} from "core-components/wp-new/wp-create.service"; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {CardHighlightingMode} from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; -import {AuthorisationService} from "core-app/modules/common/model-auth/model-auth.service"; -import {StateService} from "@uirouter/core"; -import {States} from "core-components/states.service"; -import {WorkPackageViewOrderService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {filter, map, withLatestFrom} from 'rxjs/operators'; -import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {CardViewHandlerRegistry} from "core-components/wp-card-view/event-handler/card-view-handler-registry"; -import {WorkPackageCardViewService} from "core-components/wp-card-view/services/wp-card-view.service"; -import {WorkPackageCardDragAndDropService} from "core-components/wp-card-view/services/wp-card-drag-and-drop.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {DeviceService} from "core-app/modules/common/browser/device.service"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { QueryColumn } from "app/components/wp-query/query-column"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { WorkPackageCreateService } from "core-components/wp-new/wp-create.service"; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { CardHighlightingMode } from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; +import { AuthorisationService } from "core-app/modules/common/model-auth/model-auth.service"; +import { StateService } from "@uirouter/core"; +import { States } from "core-components/states.service"; +import { WorkPackageViewOrderService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { filter, map, withLatestFrom } from 'rxjs/operators'; +import { CausedUpdatesService } from "core-app/modules/boards/board/caused-updates/caused-updates.service"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { CardViewHandlerRegistry } from "core-components/wp-card-view/event-handler/card-view-handler-registry"; +import { WorkPackageCardViewService } from "core-components/wp-card-view/services/wp-card-view.service"; +import { WorkPackageCardDragAndDropService } from "core-components/wp-card-view/services/wp-card-drag-and-drop.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { DeviceService } from "core-app/modules/common/browser/device.service"; import { WorkPackageViewHandlerToken, WorkPackageViewOutputs } from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; export type CardViewOrientation = 'horizontal'|'vertical'; @@ -54,15 +54,15 @@ export class WorkPackageCardViewComponent extends UntilDestroyedMixin implements @Input() public dragInto:boolean; @Input() public highlightingMode:CardHighlightingMode; @Input() public workPackageAddedHandler:(wp:WorkPackageResource) => Promise; - @Input() public showStatusButton:boolean = true; - @Input() public showInfoButton:boolean = false; + @Input() public showStatusButton = true; + @Input() public showInfoButton = false; @Input() public orientation:CardViewOrientation = 'vertical'; /** Whether cards are removable */ - @Input() public cardsRemovable:boolean = false; + @Input() public cardsRemovable = false; /** Whether a notification box shall be shown when there are no WP to display */ - @Input() public showEmptyResultsBox:boolean = false; + @Input() public showEmptyResultsBox = false; /** Whether on special mobile version of the cards shall be shown */ - @Input() public shrinkOnMobile:boolean = false; + @Input() public shrinkOnMobile = false; /** Container reference */ @ViewChild('container', { static: true }) public container:ElementRef; @@ -74,7 +74,7 @@ export class WorkPackageCardViewComponent extends UntilDestroyedMixin implements public trackByHref = AngularTrackingHelpers.trackByHrefAndProperty('lockVersion'); public query:QueryResource; - public isResultEmpty:boolean = false; + public isResultEmpty = false; public columns:QueryColumn[]; public text = { removeCard: this.I18n.t('js.card.remove_from_list'), @@ -140,9 +140,9 @@ export class WorkPackageCardViewComponent extends UntilDestroyedMixin implements return !!events.find(event => wpIds.indexOf(event.id) !== -1); }) ).subscribe(() => { - this.workPackages = this.wpViewOrder.orderedWorkPackages(); - this.cdRef.detectChanges(); - }); + this.workPackages = this.wpViewOrder.orderedWorkPackages(); + this.cdRef.detectChanges(); + }); this.querySpace.results .values$() @@ -150,12 +150,12 @@ export class WorkPackageCardViewComponent extends UntilDestroyedMixin implements withLatestFrom(this.querySpace.query.values$()), this.untilDestroyed(), ).subscribe(([results, query]) => { - this.query = query; - this.workPackages = this.wpViewOrder.orderedWorkPackages(); - this.cardView.updateRenderedCardsValues(this.workPackages); - this.isResultEmpty = this.workPackages.length === 0; - this.cdRef.detectChanges(); - }); + this.query = query; + this.workPackages = this.wpViewOrder.orderedWorkPackages(); + this.cardView.updateRenderedCardsValues(this.workPackages); + this.isResultEmpty = this.workPackages.length === 0; + this.cdRef.detectChanges(); + }); } ngAfterViewInit() { @@ -167,7 +167,7 @@ export class WorkPackageCardViewComponent extends UntilDestroyedMixin implements } // Register event handlers for the cards - let registry = this.injector.get(WorkPackageViewHandlerToken, CardViewHandlerRegistry); + const registry = this.injector.get(WorkPackageViewHandlerToken, CardViewHandlerRegistry); if (registry instanceof CardViewHandlerRegistry) { registry.attachTo(this); } else { diff --git a/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.ts b/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.ts index 08ad1c5e83f..9f9dd24cdb8 100644 --- a/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.ts +++ b/frontend/src/app/components/wp-card-view/wp-single-card/wp-single-card.component.ts @@ -7,19 +7,19 @@ import { OnInit, Output } from "@angular/core"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {checkedClassName, uiStateLinkClass} from "core-components/wp-fast-table/builders/ui-state-link-builder"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {StateService} from "@uirouter/core"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {WorkPackageCardViewService} from "core-components/wp-card-view/services/wp-card-view.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CardHighlightingMode} from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; -import {CardViewOrientation} from "core-components/wp-card-view/wp-card-view.component"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {WorkPackageViewFocusService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; -import {splitViewRoute} from "core-app/modules/work_packages/routing/split-view-routes.helper"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { checkedClassName, uiStateLinkClass } from "core-components/wp-fast-table/builders/ui-state-link-builder"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { StateService } from "@uirouter/core"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { WorkPackageCardViewService } from "core-components/wp-card-view/services/wp-card-view.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CardHighlightingMode } from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; +import { CardViewOrientation } from "core-components/wp-card-view/wp-card-view.component"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { WorkPackageViewFocusService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; +import { splitViewRoute } from "core-app/modules/work_packages/routing/split-view-routes.helper"; @Component({ selector: 'wp-single-card', @@ -29,13 +29,13 @@ import {splitViewRoute} from "core-app/modules/work_packages/routing/split-view- }) export class WorkPackageSingleCardComponent extends UntilDestroyedMixin implements OnInit { @Input() public workPackage:WorkPackageResource; - @Input() public showInfoButton:boolean = false; - @Input() public showStatusButton:boolean = true; - @Input() public showRemoveButton:boolean = false; + @Input() public showInfoButton = false; + @Input() public showStatusButton = true; + @Input() public showRemoveButton = false; @Input() public highlightingMode:CardHighlightingMode = 'inline'; - @Input() public draggable:boolean = false; + @Input() public draggable = false; @Input() public orientation:CardViewOrientation = 'vertical'; - @Input() public shrinkOnMobile:boolean = false; + @Input() public shrinkOnMobile = false; @Output() onRemove = new EventEmitter(); @Output() stateLinkClicked = new EventEmitter<{ workPackageId:string, requestedState:string }>(); diff --git a/frontend/src/app/components/wp-copy/wp-copy-full-view.component.ts b/frontend/src/app/components/wp-copy/wp-copy-full-view.component.ts index 9cfc02ad123..815abb5c7df 100644 --- a/frontend/src/app/components/wp-copy/wp-copy-full-view.component.ts +++ b/frontend/src/app/components/wp-copy/wp-copy-full-view.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component} from '@angular/core'; -import {WorkPackageCopyController} from 'core-components/wp-copy/wp-copy.controller'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { WorkPackageCopyController } from 'core-components/wp-copy/wp-copy.controller'; @Component({ selector: 'wp-copy-full-view', diff --git a/frontend/src/app/components/wp-copy/wp-copy-split-view.component.ts b/frontend/src/app/components/wp-copy/wp-copy-split-view.component.ts index 15fcc9665cd..6055b944cad 100644 --- a/frontend/src/app/components/wp-copy/wp-copy-split-view.component.ts +++ b/frontend/src/app/components/wp-copy/wp-copy-split-view.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component} from '@angular/core'; -import {WorkPackageCopyController} from 'core-components/wp-copy/wp-copy.controller'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { WorkPackageCopyController } from 'core-components/wp-copy/wp-copy.controller'; @Component({ selector: 'wp-copy-split-view', diff --git a/frontend/src/app/components/wp-copy/wp-copy.controller.ts b/frontend/src/app/components/wp-copy/wp-copy.controller.ts index d4080332158..ff6e55fbbca 100644 --- a/frontend/src/app/components/wp-copy/wp-copy.controller.ts +++ b/frontend/src/app/components/wp-copy/wp-copy.controller.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {take} from 'rxjs/operators'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageCreateComponent} from 'core-components/wp-new/wp-create.component'; -import {WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; +import { take } from 'rxjs/operators'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageCreateComponent } from 'core-components/wp-new/wp-create.component'; +import { WorkPackageRelationsService } from "core-components/wp-relations/wp-relations.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {Directive} from "@angular/core"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { Directive } from "@angular/core"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; @Directive() export class WorkPackageCopyController extends WorkPackageCreateComponent { - private __initialized_at:Number; + private __initialized_at:number; private copiedWorkPackageId:string; /** Are we in the copying substates ? */ @@ -83,7 +83,7 @@ export class WorkPackageCopyController extends WorkPackageCreateComponent { } private createCopyFrom(wp:WorkPackageResource) { - let sourceChangeset = this.halEditing.changeFor(wp) as WorkPackageChangeset; + const sourceChangeset = this.halEditing.changeFor(wp) as WorkPackageChangeset; return this.wpCreate .copyWorkPackage(sourceChangeset) diff --git a/frontend/src/app/components/wp-custom-actions/date-action/custom-date-action-admin.component.ts b/frontend/src/app/components/wp-custom-actions/date-action/custom-date-action-admin.component.ts index 55a4d18a451..d8ab8f0a84a 100644 --- a/frontend/src/app/components/wp-custom-actions/date-action/custom-date-action-admin.component.ts +++ b/frontend/src/app/components/wp-custom-actions/date-action/custom-date-action-admin.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ApplicationRef, ChangeDetectorRef, Component, ElementRef, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { ApplicationRef, ChangeDetectorRef, Component, ElementRef, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; export const customDateActionAdminSelector = 'custom-date-action-admin'; @@ -48,8 +48,8 @@ export class CustomDateActionAdminComponent implements OnInit { private currentFieldValue = '%CURRENT_DATE%'; public operators = [ - {key: this.onKey, label: this.I18n.t('js.custom_actions.date.specific')}, - {key: this.currentKey, label: this.I18n.t('js.custom_actions.date.current_date')} + { key: this.onKey, label: this.I18n.t('js.custom_actions.date.specific') }, + { key: this.currentKey, label: this.I18n.t('js.custom_actions.date.current_date') } ]; constructor(private elementRef:ElementRef, @@ -93,9 +93,9 @@ export class CustomDateActionAdminComponent implements OnInit { // replace all square brackets by underscore // to match the label's for value return this.fieldName - .replace(/\[|\]/g, '_') - .replace('__', '_') - .replace(/_$/, ''); + .replace(/\[|\]/g, '_') + .replace('__', '_') + .replace(/_$/, ''); } updateField(val:string) { diff --git a/frontend/src/app/components/wp-custom-actions/wp-custom-actions.component.ts b/frontend/src/app/components/wp-custom-actions/wp-custom-actions.component.ts index fae61e8ef6e..842da965efc 100644 --- a/frontend/src/app/components/wp-custom-actions/wp-custom-actions.component.ts +++ b/frontend/src/app/components/wp-custom-actions/wp-custom-actions.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {CustomActionResource} from "core-app/modules/hal/resources/custom-action-resource"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { CustomActionResource } from "core-app/modules/hal/resources/custom-action-resource"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Component({ selector: 'wp-custom-actions', diff --git a/frontend/src/app/components/wp-custom-actions/wp-custom-actions/wp-custom-action.component.ts b/frontend/src/app/components/wp-custom-actions/wp-custom-actions/wp-custom-action.component.ts index b3583605e88..118bcc0bf8e 100644 --- a/frontend/src/app/components/wp-custom-actions/wp-custom-actions/wp-custom-action.component.ts +++ b/frontend/src/app/components/wp-custom-actions/wp-custom-actions/wp-custom-action.component.ts @@ -27,17 +27,17 @@ //++ -import {Component, HostListener, Input} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {CustomActionResource} from 'core-app/modules/hal/resources/custom-action-resource'; -import {WorkPackagesActivityService} from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; +import { Component, HostListener, Input } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { CustomActionResource } from 'core-app/modules/hal/resources/custom-action-resource'; +import { WorkPackagesActivityService } from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'wp-custom-action', @@ -66,7 +66,7 @@ export class WpCustomActionComponent { } public update() { - let payload = { + const payload = { lockVersion: this.workPackage.lockVersion, _links: { workPackage: { diff --git a/frontend/src/app/components/wp-details/wp-details-toolbar.component.ts b/frontend/src/app/components/wp-details/wp-details-toolbar.component.ts index 69edc9e709d..dfdcd1bf55d 100644 --- a/frontend/src/app/components/wp-details/wp-details-toolbar.component.ts +++ b/frontend/src/app/components/wp-details/wp-details-toolbar.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {Component, Input} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { Component, Input } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; @Component({ selector: 'wp-details-toolbar', @@ -40,8 +40,8 @@ export class WorkPackageSplitViewToolbarComponent { public text = { button_more: this.I18n.t('js.button_more') - } + }; -constructor(readonly I18n:I18nService, + constructor(readonly I18n:I18nService, readonly halEditing:HalResourceEditingService) {} } diff --git a/frontend/src/app/components/wp-edit-form/table-edit-form.ts b/frontend/src/app/components/wp-edit-form/table-edit-form.ts index afb4159cfee..2953809334c 100644 --- a/frontend/src/app/components/wp-edit-form/table-edit-form.ts +++ b/frontend/src/app/components/wp-edit-form/table-edit-form.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector} from '@angular/core'; -import {Subscription} from 'rxjs'; -import {States} from 'core-components/states.service'; -import {IFieldSchema} from "core-app/modules/fields/field.base"; +import { Injector } from '@angular/core'; +import { Subscription } from 'rxjs'; +import { States } from 'core-components/states.service'; +import { IFieldSchema } from "core-app/modules/fields/field.base"; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {FocusHelperService} from "core-app/modules/common/focus/focus-helper"; -import {EditingPortalService} from "core-app/modules/fields/edit/editing-portal/editing-portal-service"; -import {CellBuilder, editCellContainer, tdClassName} from "core-components/wp-fast-table/builders/cell-builder"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {EditForm} from "core-app/modules/fields/edit/edit-form/edit-form"; -import {editModeClassName} from "core-app/modules/fields/edit/edit-field.component"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { FocusHelperService } from "core-app/modules/common/focus/focus-helper"; +import { EditingPortalService } from "core-app/modules/fields/edit/editing-portal/editing-portal-service"; +import { CellBuilder, editCellContainer, tdClassName } from "core-components/wp-fast-table/builders/cell-builder"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { EditForm } from "core-app/modules/fields/edit/edit-form/edit-form"; +import { editModeClassName } from "core-app/modules/fields/edit/edit-field.component"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export const activeFieldContainerClassName = 'inline-edit--active-field'; export const activeFieldClassName = 'inline-edit--field'; @@ -142,7 +142,7 @@ export class TableEditForm extends EditForm { * values loaded. * @param fieldName */ - protected loadFieldSchema(fieldName:string, noWarnings:boolean = false):Promise { + protected loadFieldSchema(fieldName:string, noWarnings = false):Promise { // We need to handle start/due date cases like they were combined dates if (['startDate', 'dueDate', 'date'].includes(fieldName)) { fieldName = 'combinedDate'; diff --git a/frontend/src/app/components/wp-edit-form/work-package-filter-values.spec.ts b/frontend/src/app/components/wp-edit-form/work-package-filter-values.spec.ts index b1bf369c1e1..9ef4c264a0a 100644 --- a/frontend/src/app/components/wp-edit-form/work-package-filter-values.spec.ts +++ b/frontend/src/app/components/wp-edit-form/work-package-filter-values.spec.ts @@ -26,35 +26,35 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {TestBed} from "@angular/core/testing"; -import {CurrentUserService} from "core-components/user/current-user.service"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {Injector} from "@angular/core"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {WorkPackageFilterValues} from "core-components/wp-edit-form/work-package-filter-values"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackagesActivityService} from "core-components/wp-single-view-tabs/activity-panel/wp-activity.service"; -import {WorkPackageCreateService} from "core-components/wp-new/wp-create.service"; +import { TestBed } from "@angular/core/testing"; +import { CurrentUserService } from "core-components/user/current-user.service"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { Injector } from "@angular/core"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { WorkPackageFilterValues } from "core-components/wp-edit-form/work-package-filter-values"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackagesActivityService } from "core-components/wp-single-view-tabs/activity-panel/wp-activity.service"; +import { WorkPackageCreateService } from "core-components/wp-new/wp-create.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {TypeResource} from "core-app/modules/hal/resources/type-resource"; -import {HttpClientModule} from "@angular/common/http"; -import {States} from "core-components/states.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {UIRouterModule} from "@uirouter/angular"; -import {LoadingIndicatorService} from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {OpenProjectFileUploadService} from "core-components/api/op-file-upload/op-file-upload.service"; -import {OpenProjectDirectFileUploadService} from "core-components/api/op-file-upload/op-direct-file-upload.service"; -import {HookService} from "core-app/modules/plugins/hook-service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { TypeResource } from "core-app/modules/hal/resources/type-resource"; +import { HttpClientModule } from "@angular/common/http"; +import { States } from "core-components/states.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { UIRouterModule } from "@uirouter/angular"; +import { LoadingIndicatorService } from "core-app/modules/common/loading-indicator/loading-indicator.service"; +import { OpenProjectFileUploadService } from "core-components/api/op-file-upload/op-file-upload.service"; +import { OpenProjectDirectFileUploadService } from "core-components/api/op-file-upload/op-direct-file-upload.service"; +import { HookService } from "core-app/modules/plugins/hook-service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; describe('WorkPackageFilterValues', () => { let resource:WorkPackageResource; @@ -103,11 +103,11 @@ describe('WorkPackageFilterValues', () => { resource = halResourceService.createHalResourceOfClass(WorkPackageResource, source, true); changeset = new WorkPackageChangeset(resource); - let type1 = halResourceService.createHalResourceOfClass( + const type1 = halResourceService.createHalResourceOfClass( TypeResource, { _type: 'Type', id: '1', _links: { self: { href: '/api/v3/types/1', name: 'Task' } } } ); - let type2 = halResourceService.createHalResourceOfClass( + const type2 = halResourceService.createHalResourceOfClass( TypeResource, { _type: 'Type', id: '2', _links: { self: { href: '/api/v3/types/2', name: 'Bug' } } } ); diff --git a/frontend/src/app/components/wp-edit-form/work-package-filter-values.ts b/frontend/src/app/components/wp-edit-form/work-package-filter-values.ts index 7c36dd5cbc6..0ec66f5cee7 100644 --- a/frontend/src/app/components/wp-edit-form/work-package-filter-values.ts +++ b/frontend/src/app/components/wp-edit-form/work-package-filter-values.ts @@ -1,13 +1,13 @@ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {CurrentUserService} from "core-components/user/current-user.service"; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {Injector} from '@angular/core'; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { CurrentUserService } from "core-components/user/current-user.service"; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { Injector } from '@angular/core'; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; import compareByHrefOrString = AngularTrackingHelpers.compareByHrefOrString; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {FilterOperator} from "core-components/api/api-v3/api-v3-filter-builder"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { FilterOperator } from "core-components/api/api-v3/api-v3-filter-builder"; export class WorkPackageFilterValues { @@ -55,11 +55,11 @@ export class WorkPackageFilterValues { } // Select the first value - let value = filter.values[0]; + const value = filter.values[0]; // Avoid empty values if (value) { - let attributeName = this.mapFilterToAttribute(filter); + const attributeName = this.mapFilterToAttribute(filter); this.setValueFor(change, attributeName, value); } } @@ -71,13 +71,13 @@ export class WorkPackageFilterValues { * @private */ private setToNull(change:WorkPackageChangeset|{[id:string]:any}, filter:QueryFilterInstanceResource):void { - let attributeName = this.mapFilterToAttribute(filter); + const attributeName = this.mapFilterToAttribute(filter); this.setValue(change, attributeName,{ href: null }); } private setValueFor(change:WorkPackageChangeset|Object, field:string, value:string|HalResource) { - let newValue = this.findSpecialValue(value, field) || value; + const newValue = this.findSpecialValue(value, field) || value; if (newValue) { this.setValue(change, field, newValue); diff --git a/frontend/src/app/components/wp-edit/work-package-changeset.ts b/frontend/src/app/components/wp-edit/work-package-changeset.ts index e0306009a49..b2a1c8f617e 100644 --- a/frontend/src/app/components/wp-edit/work-package-changeset.ts +++ b/frontend/src/app/components/wp-edit/work-package-changeset.ts @@ -1,6 +1,6 @@ -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; import { WorkPackageSchemaProxy } from 'core-app/modules/hal/schemas/work-package-schema-proxy'; export class WorkPackageChangeset extends ResourceChangeset { diff --git a/frontend/src/app/components/wp-edit/wp-edit-field/wp-replacement-label.component.ts b/frontend/src/app/components/wp-edit/wp-edit-field/wp-replacement-label.component.ts index fe8fabf7d7c..f555cadee24 100644 --- a/frontend/src/app/components/wp-edit/wp-edit-field/wp-replacement-label.component.ts +++ b/frontend/src/app/components/wp-edit/wp-edit-field/wp-replacement-label.component.ts @@ -27,8 +27,8 @@ //++ -import {Component, ElementRef, Input, OnInit} from '@angular/core'; -import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component"; +import { Component, ElementRef, Input, OnInit } from '@angular/core'; +import { EditFormComponent } from "core-app/modules/fields/edit/edit-form/edit-form.component"; @Component({ selector: 'wp-replacement-label', diff --git a/frontend/src/app/components/wp-fast-table/builders/cell-builder.ts b/frontend/src/app/components/wp-fast-table/builders/cell-builder.ts index 4a3a5b42123..3297573a272 100644 --- a/frontend/src/app/components/wp-fast-table/builders/cell-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/cell-builder.ts @@ -1,12 +1,12 @@ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; import { DisplayFieldRenderer, editFieldContainerClass } from "core-app/modules/fields/display/display-field-renderer"; -import {Injector} from '@angular/core'; -import {QueryColumn} from "core-components/wp-query/query-column"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { QueryColumn } from "core-components/wp-query/query-column"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export const tdClassName = 'wp-table--cell-td'; export const editCellContainer = 'wp-table--cell-container'; diff --git a/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-builder.ts b/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-builder.ts index d5a165acf54..a8120f5ffc5 100644 --- a/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-builder.ts @@ -1,9 +1,9 @@ -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {tdClassName} from "core-components/wp-fast-table/builders/cell-builder"; -import {Injector} from "@angular/core"; -import {TableDragActionsRegistryService} from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service"; -import {TableDragActionService} from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; -import {internalSortColumn} from "core-components/wp-fast-table/builders/internal-sort-columns"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { tdClassName } from "core-components/wp-fast-table/builders/cell-builder"; +import { Injector } from "@angular/core"; +import { TableDragActionsRegistryService } from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service"; +import { TableDragActionService } from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; +import { internalSortColumn } from "core-components/wp-fast-table/builders/internal-sort-columns"; /** Debug the render position */ const RENDER_DRAG_AND_DROP_POSITION = false; @@ -23,7 +23,7 @@ export class DragDropHandleBuilder { */ public build(workPackage:WorkPackageResource, position?:number):HTMLElement { // Append sort handle - let td = document.createElement('td'); + const td = document.createElement('td'); td.classList.add(tdClassName, internalSortColumn.id); @@ -34,12 +34,12 @@ export class DragDropHandleBuilder { td.classList.add('wp-table--sort-td', internalSortColumn.id, 'hide-when-print'); // Wrap handle as span - let span = document.createElement('span'); + const span = document.createElement('span'); span.classList.add('wp-table--drag-and-drop-handle', 'icon-drag-handle'); td.appendChild(span); if (RENDER_DRAG_AND_DROP_POSITION) { - let text = document.createElement('span'); + const text = document.createElement('span'); text.textContent = '' + position; td.appendChild(text); } diff --git a/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts index 4a515bb30d4..cf0e73717d0 100644 --- a/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts +++ b/frontend/src/app/components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass.ts @@ -1,11 +1,11 @@ -import {Injector} from '@angular/core'; -import {PrimaryRenderPass, RowRenderInfo} from '../primary-render-pass'; -import {DragDropHandleBuilder} from "core-components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-builder"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {WorkPackageViewOrderService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {QueryOrder} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; +import { Injector } from '@angular/core'; +import { PrimaryRenderPass, RowRenderInfo } from '../primary-render-pass'; +import { DragDropHandleBuilder } from "core-components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-builder"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { WorkPackageViewOrderService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { QueryOrder } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; export class DragDropHandleRenderPass { diff --git a/frontend/src/app/components/wp-fast-table/builders/highlighting/row-highlight-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/highlighting/row-highlight-render-pass.ts index 30ebfd976ba..8f54b53da95 100644 --- a/frontend/src/app/components/wp-fast-table/builders/highlighting/row-highlight-render-pass.ts +++ b/frontend/src/app/components/wp-fast-table/builders/highlighting/row-highlight-render-pass.ts @@ -1,11 +1,11 @@ -import {Injector} from '@angular/core'; -import {PrimaryRenderPass, RowRenderInfo} from "core-components/wp-fast-table/builders/primary-render-pass"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { PrimaryRenderPass, RowRenderInfo } from "core-components/wp-fast-table/builders/primary-render-pass"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { WorkPackageViewHighlightingService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class HighlightingRenderPass { diff --git a/frontend/src/app/components/wp-fast-table/builders/internal-sort-columns.ts b/frontend/src/app/components/wp-fast-table/builders/internal-sort-columns.ts index 5addf2cf99c..7d571eaaf73 100644 --- a/frontend/src/app/components/wp-fast-table/builders/internal-sort-columns.ts +++ b/frontend/src/app/components/wp-fast-table/builders/internal-sort-columns.ts @@ -1,4 +1,4 @@ -import {QueryColumn} from "core-components/wp-query/query-column"; +import { QueryColumn } from "core-components/wp-query/query-column"; export const internalSortColumn = { id: '__internal-sorthandle' diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/group-header-builder.ts b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/group-header-builder.ts index a1b1f254fd9..5661c87411f 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/group-header-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/group-header-builder.ts @@ -1,9 +1,9 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {groupName} from './grouped-rows-helpers'; -import {GroupObject} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {rowGroupClassName} from "core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { groupName } from './grouped-rows-helpers'; +import { GroupObject } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { rowGroupClassName } from "core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export function groupClassNameFor(group:GroupObject) { return `group-${group.identifier}`; @@ -22,7 +22,7 @@ export class GroupHeaderBuilder { } public buildGroupRow(group:GroupObject, colspan:number) { - let row = document.createElement('tr'); + const row = document.createElement('tr'); let togglerIconClass, text; if (group.collapsed) { diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/group-sums-builder.ts b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/group-sums-builder.ts index 715fde05b1a..909a9b13098 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/group-sums-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/group-sums-builder.ts @@ -1,12 +1,12 @@ -import {GroupObject} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SingleRowBuilder} from "core-components/wp-fast-table/builders/rows/single-row-builder"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {groupedRowClassName} from "core-components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers"; +import { GroupObject } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SingleRowBuilder } from "core-components/wp-fast-table/builders/rows/single-row-builder"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { groupedRowClassName } from "core-components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers"; export class GroupSumsBuilder extends SingleRowBuilder { diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-render-pass.ts index cdce234cbe8..248414fa594 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-render-pass.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-render-pass.ts @@ -1,15 +1,15 @@ -import {Injector} from '@angular/core'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageTable} from '../../../wp-fast-table'; -import {WorkPackageTableRow} from '../../../wp-table.interfaces'; -import {SingleRowBuilder} from '../../rows/single-row-builder'; -import {PlainRenderPass} from '../plain/plain-render-pass'; -import {groupClassNameFor, GroupHeaderBuilder} from './group-header-builder'; -import {groupByProperty, groupedRowClassName} from './grouped-rows-helpers'; -import {GroupObject} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {collapsedRowClass} from "core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants"; -import {GroupSumsBuilder} from "core-components/wp-fast-table/builders/modes/grouped/group-sums-builder"; +import { Injector } from '@angular/core'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageTable } from '../../../wp-fast-table'; +import { WorkPackageTableRow } from '../../../wp-table.interfaces'; +import { SingleRowBuilder } from '../../rows/single-row-builder'; +import { PlainRenderPass } from '../plain/plain-render-pass'; +import { groupClassNameFor, GroupHeaderBuilder } from './group-header-builder'; +import { groupByProperty, groupedRowClassName } from './grouped-rows-helpers'; +import { GroupObject } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { collapsedRowClass } from "core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants"; +import { GroupSumsBuilder } from "core-components/wp-fast-table/builders/modes/grouped/group-sums-builder"; export const groupRowClass = '-group-row'; @@ -33,9 +33,9 @@ export class GroupedRenderPass extends PlainRenderPass { let currentGroup:GroupObject | null = null; const length = this.workPackageTable.originalRows.length; this.workPackageTable.originalRows.forEach((wpId:string, index:number) => { - let row = this.workPackageTable.originalRowIndex[wpId]; - let nextGroup = this.matchingGroup(row.object); - let groupsChanged = currentGroup !== nextGroup; + const row = this.workPackageTable.originalRowIndex[wpId]; + const nextGroup = this.matchingGroup(row.object); + const groupsChanged = currentGroup !== nextGroup; // Render the sums row if (currentGroup && groupsChanged) { @@ -45,7 +45,7 @@ export class GroupedRenderPass extends PlainRenderPass { // Render the next group row if (nextGroup && groupsChanged) { const groupClass = groupClassNameFor(nextGroup); - let rowElement = this.headerBuilder.buildGroupRow(nextGroup, this.colspan); + const rowElement = this.headerBuilder.buildGroupRow(nextGroup, this.colspan); this.appendNonWorkPackageRow(rowElement, groupClass, [groupRowClass]); currentGroup = nextGroup; } @@ -104,7 +104,7 @@ export class GroupedRenderPass extends PlainRenderPass { return false; } - let joinedOrderedHrefs = (objects:any[]) => { + const joinedOrderedHrefs = (objects:any[]) => { return _.map(objects, object => object.href).sort().join(', '); }; @@ -126,9 +126,9 @@ export class GroupedRenderPass extends PlainRenderPass { } let hidden = false; - let additionalClasses:string[] = []; + const additionalClasses:string[] = []; - let [tr, _] = this.rowBuilder.buildEmpty(row.object); + const [tr, _] = this.rowBuilder.buildEmpty(row.object); if (group) { additionalClasses.push(groupedRowClassName(group.index)); @@ -153,7 +153,7 @@ export class GroupedRenderPass extends PlainRenderPass { } const groupClass = groupClassNameFor(group); - let rowElement = this.sumsBuilder.buildSumsRow(group); + const rowElement = this.sumsBuilder.buildSumsRow(group); this.appendNonWorkPackageRow(rowElement, groupClass); } } diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-rows-builder.ts b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-rows-builder.ts index fa8a3e5dab3..2341be51125 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-rows-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-rows-builder.ts @@ -1,20 +1,20 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {States} from '../../../../states.service'; -import {WorkPackageTable} from '../../../wp-fast-table'; -import {tableRowClassName} from '../../rows/single-row-builder'; -import {RowsBuilder} from '../rows-builder'; -import {GroupHeaderBuilder} from './group-header-builder'; -import {GroupedRenderPass} from './grouped-render-pass'; -import {groupedRowClassName, groupIdentifier} from './grouped-rows-helpers'; -import {GroupObject} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { States } from '../../../../states.service'; +import { WorkPackageTable } from '../../../wp-fast-table'; +import { tableRowClassName } from '../../rows/single-row-builder'; +import { RowsBuilder } from '../rows-builder'; +import { GroupHeaderBuilder } from './group-header-builder'; +import { GroupedRenderPass } from './grouped-render-pass'; +import { groupedRowClassName, groupIdentifier } from './grouped-rows-helpers'; +import { GroupObject } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; import { collapsedRowClass, rowGroupClassName } from "core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class GroupedRowsBuilder extends RowsBuilder { @@ -76,11 +76,11 @@ export class GroupedRowsBuilder extends RowsBuilder { jQuery(this.workPackageTable.tableAndTimelineContainer) .find(`.${rowGroupClassName}`) .each((i:number, oldRow:Element) => { - let groupIndex = jQuery(oldRow).data('groupIndex'); - let group = groups[groupIndex]; + const groupIndex = jQuery(oldRow).data('groupIndex'); + const group = groups[groupIndex]; // Refresh the group header - let newRow = builder.buildGroupRow(group, this.colspan); + const newRow = builder.buildGroupRow(group, this.colspan); if (oldRow.parentNode) { oldRow.parentNode.replaceChild(newRow, oldRow); @@ -88,7 +88,7 @@ export class GroupedRowsBuilder extends RowsBuilder { // Set expansion state of contained rows const affected = jQuery(this.workPackageTable.tableAndTimelineContainer) - .find(`.${groupedRowClassName(groupIndex)}`); + .find(`.${groupedRowClassName(groupIndex)}`); affected.toggleClass(collapsedRowClass, !!group.collapsed); // Update the hidden section of the rendered state diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers.ts b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers.ts index ca1710bceb4..85741348ea6 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers.ts @@ -1,4 +1,4 @@ -import {GroupObject} from 'core-app/modules/hal/resources/wp-collection-resource'; +import { GroupObject } from 'core-app/modules/hal/resources/wp-collection-resource'; export function groupIdentifier(group:GroupObject) { let value = group.value || 'nullValue'; @@ -16,7 +16,7 @@ export function groupIdentifier(group:GroupObject) { } export function groupName(group:GroupObject) { - let value = group.value; + const value = group.value; if (value === null) { return '-'; } else { diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/hierarchy-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/hierarchy-render-pass.ts index 29a7127e762..82a539a24e7 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/hierarchy-render-pass.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/hierarchy-render-pass.ts @@ -1,19 +1,19 @@ -import {Injector} from '@angular/core'; -import {additionalHierarchyRowClassName, SingleHierarchyRowBuilder} from './single-hierarchy-row-builder'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {PrimaryRenderPass, RowRenderInfo} from "core-components/wp-fast-table/builders/primary-render-pass"; -import {States} from "core-components/states.service"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {WorkPackageTableRow} from "core-components/wp-fast-table/wp-table.interfaces"; +import { Injector } from '@angular/core'; +import { additionalHierarchyRowClassName, SingleHierarchyRowBuilder } from './single-hierarchy-row-builder'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { PrimaryRenderPass, RowRenderInfo } from "core-components/wp-fast-table/builders/primary-render-pass"; +import { States } from "core-components/states.service"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { WorkPackageTableRow } from "core-components/wp-fast-table/wp-table.interfaces"; import { ancestorClassIdentifier, hierarchyGroupClass } from "core-components/wp-fast-table/helpers/wp-table-hierarchy-helpers"; -import {WorkPackageViewHierarchies} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageViewHierarchies } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export class HierarchyRenderPass extends PrimaryRenderPass { @@ -76,7 +76,7 @@ export class HierarchyRenderPass extends PrimaryRenderPass { this.buildWithHierarchy(row); } else { // Render a work package root with no parents - let [tr, hidden] = this.rowBuilder.buildEmpty(workPackage); + const [tr, hidden] = this.rowBuilder.buildEmpty(workPackage); row.element = tr; this.tableBody.appendChild(tr); this.markRendered(tr, workPackage, hidden); @@ -108,7 +108,7 @@ export class HierarchyRenderPass extends PrimaryRenderPass { // -> deferred[a ancestor] = parent // -> deferred[parent] = wp // 4. Any ancestor already rendered -> Render normally (don't defer) - let ancestorChain = ancestors.concat([workPackage]); + const ancestorChain = ancestors.concat([workPackage]); for (let i = ancestorChain.length - 2; i >= 0; --i) { const parent = ancestorChain[i]; @@ -163,7 +163,7 @@ export class HierarchyRenderPass extends PrimaryRenderPass { let row:WorkPackageTableRow = this.workPackageTable.originalRowIndex[workPackage.id!]; if (!row) { - row = {object: workPackage} as WorkPackageTableRow; + row = { object: workPackage } as WorkPackageTableRow; } return row; @@ -181,7 +181,7 @@ export class HierarchyRenderPass extends PrimaryRenderPass { // If we see the parent the first time, // build it as an additional row and insert it into the ancestry if (!this.rendered[ancestor.id!]) { - let [ancestorRow, hidden] = this.rowBuilder.buildAncestorRow(ancestor, ancestorGroups, index); + const [ancestorRow, hidden] = this.rowBuilder.buildAncestorRow(ancestor, ancestorGroups, index); // Insert the ancestor row, either right here if it's a root node // Or below the appropriate parent @@ -228,7 +228,7 @@ export class HierarchyRenderPass extends PrimaryRenderPass { * @param hidden * @param isAncestor */ - private markRendered(row:HTMLTableRowElement, workPackage:WorkPackageResource, hidden:boolean = false, isAncestor:boolean = false) { + private markRendered(row:HTMLTableRowElement, workPackage:WorkPackageResource, hidden = false, isAncestor = false) { this.rendered[workPackage.id!] = true; this.renderedOrder.push(this.buildRenderInfo(row, workPackage, hidden, isAncestor)); } @@ -237,10 +237,10 @@ export class HierarchyRenderPass extends PrimaryRenderPass { * Append a row to the given parent hierarchy group. */ private insertAtExistingHierarchy(workPackage:WorkPackageResource, - el:HTMLTableRowElement, - parent:WorkPackageResource, - hidden:boolean, - isAncestor:boolean) { + el:HTMLTableRowElement, + parent:WorkPackageResource, + hidden:boolean, + isAncestor:boolean) { // Either append to the hierarchy group root (= the parentID row itself) const hierarchyRoot = `.__hierarchy-root-${parent.id}`; // Or, if it has descendants, append to the LATEST of that set @@ -257,7 +257,7 @@ export class HierarchyRenderPass extends PrimaryRenderPass { } private buildRenderInfo(row:HTMLTableRowElement, workPackage:WorkPackageResource, hidden:boolean, isAncestor:boolean):RowRenderInfo { - let info:RowRenderInfo = { + const info:RowRenderInfo = { element: row, classIdentifier: '', additionalClasses: [], @@ -266,7 +266,7 @@ export class HierarchyRenderPass extends PrimaryRenderPass { hidden: hidden }; - let [ancestorClasses, _] = this.rowBuilder.ancestorRowData(workPackage); + const [ancestorClasses, _] = this.rowBuilder.ancestorRowData(workPackage); if (isAncestor) { info.additionalClasses = [additionalHierarchyRowClassName].concat(ancestorClasses); diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/hierarchy-rows-builder.ts b/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/hierarchy-rows-builder.ts index 253ff960ad2..fec53279525 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/hierarchy-rows-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/hierarchy-rows-builder.ts @@ -1,12 +1,12 @@ -import {Injector} from '@angular/core'; -import {States} from '../../../../states.service'; -import {WorkPackageTable} from '../../../wp-fast-table'; -import {RowsBuilder} from '../rows-builder'; -import {HierarchyRenderPass} from './hierarchy-render-pass'; -import {SingleHierarchyRowBuilder} from './single-hierarchy-row-builder'; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { States } from '../../../../states.service'; +import { WorkPackageTable } from '../../../wp-fast-table'; +import { RowsBuilder } from '../rows-builder'; +import { HierarchyRenderPass } from './hierarchy-render-pass'; +import { SingleHierarchyRowBuilder } from './single-hierarchy-row-builder'; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class HierarchyRowsBuilder extends RowsBuilder { diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder.ts b/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder.ts index 9f0176c8c6e..9153aff8a4a 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder.ts @@ -1,15 +1,15 @@ -import {Injector} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {SingleRowBuilder} from "core-components/wp-fast-table/builders/rows/single-row-builder"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {States} from "core-components/states.service"; +import { Injector } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { SingleRowBuilder } from "core-components/wp-fast-table/builders/rows/single-row-builder"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { States } from "core-components/states.service"; import { collapsedGroupClass, hierarchyGroupClass, hierarchyRootClass } from "core-components/wp-fast-table/helpers/wp-table-hierarchy-helpers"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export const indicatorCollapsedClass = '-hierarchy-collapsed'; export const hierarchyCellClassName = 'wp-table--hierarchy-span'; @@ -38,11 +38,11 @@ export class SingleHierarchyRowBuilder extends SingleRowBuilder { super(injector, workPackageTable); this.text = { - leaf: (level:number) => this.I18n.t('js.work_packages.hierarchy.leaf', {level: level}), + leaf: (level:number) => this.I18n.t('js.work_packages.hierarchy.leaf', { level: level }), expanded: (level:number) => this.I18n.t('js.work_packages.hierarchy.children_expanded', - {level: level}), + { level: level }), collapsed: (level:number) => this.I18n.t('js.work_packages.hierarchy.children_collapsed', - {level: level}), + { level: level }), }; } @@ -63,8 +63,8 @@ export class SingleHierarchyRowBuilder extends SingleRowBuilder { * Build the columns on the given empty row */ public buildEmpty(workPackage:WorkPackageResource):[HTMLTableRowElement, boolean] { - let [element, _] = super.buildEmpty(workPackage); - let [classes, hidden] = this.ancestorRowData(workPackage); + const [element, _] = super.buildEmpty(workPackage); + const [classes, hidden] = this.ancestorRowData(workPackage); element.classList.add(...classes); this.appendHierarchyIndicator(workPackage, jQuery(element)); @@ -103,8 +103,8 @@ export class SingleHierarchyRowBuilder extends SingleRowBuilder { * Append an additional ancestor row that is not yet loaded */ public buildAncestorRow(ancestor:WorkPackageResource, - ancestorGroups:string[], - index:number):[HTMLTableRowElement, boolean] { + ancestorGroups:string[], + index:number):[HTMLTableRowElement, boolean] { const workPackage = this.states.workPackages.get(ancestor.id!).value!; const [tr, hidden] = this.buildEmpty(workPackage); @@ -149,9 +149,9 @@ export class SingleHierarchyRowBuilder extends SingleRowBuilder { ${this.text.expanded( - level)} + level)} ${this.text.collapsed( - level)} + level)} `; } else { diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/plain/plain-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/modes/plain/plain-render-pass.ts index 75b678768db..0a36f635587 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/plain/plain-render-pass.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/plain/plain-render-pass.ts @@ -1,7 +1,7 @@ -import {Injector} from '@angular/core'; -import {WorkPackageTable} from '../../../wp-fast-table'; -import {PrimaryRenderPass} from '../../primary-render-pass'; -import {SingleRowBuilder} from '../../rows/single-row-builder'; +import { Injector } from '@angular/core'; +import { WorkPackageTable } from '../../../wp-fast-table'; +import { PrimaryRenderPass } from '../../primary-render-pass'; +import { SingleRowBuilder } from '../../rows/single-row-builder'; export class PlainRenderPass extends PrimaryRenderPass { @@ -17,8 +17,8 @@ export class PlainRenderPass extends PrimaryRenderPass { */ protected doRender():void { this.workPackageTable.originalRows.forEach((wpId:string) => { - let row = this.workPackageTable.originalRowIndex[wpId]; - let [tr,] = this.rowBuilder.buildEmpty(row.object); + const row = this.workPackageTable.originalRowIndex[wpId]; + const [tr,] = this.rowBuilder.buildEmpty(row.object); row.element = tr; this.appendRow(row.object, tr); this.tableBody.appendChild(tr); diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/plain/plain-rows-builder.ts b/frontend/src/app/components/wp-fast-table/builders/modes/plain/plain-rows-builder.ts index 025a8693c3d..e98846b4230 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/plain/plain-rows-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/plain/plain-rows-builder.ts @@ -1,11 +1,11 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageTable} from '../../../wp-fast-table'; -import {PrimaryRenderPass} from '../../primary-render-pass'; -import {SingleRowBuilder} from '../../rows/single-row-builder'; -import {RowsBuilder} from '../rows-builder'; -import {PlainRenderPass} from './plain-render-pass'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageTable } from '../../../wp-fast-table'; +import { PrimaryRenderPass } from '../../primary-render-pass'; +import { SingleRowBuilder } from '../../rows/single-row-builder'; +import { RowsBuilder } from '../rows-builder'; +import { PlainRenderPass } from './plain-render-pass'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class PlainRowsBuilder extends RowsBuilder { diff --git a/frontend/src/app/components/wp-fast-table/builders/modes/rows-builder.ts b/frontend/src/app/components/wp-fast-table/builders/modes/rows-builder.ts index fe38735de7f..7deb26b0cab 100644 --- a/frontend/src/app/components/wp-fast-table/builders/modes/rows-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/modes/rows-builder.ts @@ -1,8 +1,8 @@ -import {Injector} from '@angular/core'; -import {States} from '../../../states.service'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {PrimaryRenderPass} from '../primary-render-pass'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { States } from '../../../states.service'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { PrimaryRenderPass } from '../primary-render-pass'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export abstract class RowsBuilder { diff --git a/frontend/src/app/components/wp-fast-table/builders/primary-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/primary-render-pass.ts index 379fac008f6..ade315ff788 100644 --- a/frontend/src/app/components/wp-fast-table/builders/primary-render-pass.ts +++ b/frontend/src/app/components/wp-fast-table/builders/primary-render-pass.ts @@ -1,18 +1,18 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {timeOutput} from '../../../helpers/debug_output'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {States} from '../../states.service'; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { timeOutput } from '../../../helpers/debug_output'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { States } from '../../states.service'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackageTable} from '../wp-fast-table'; -import {RelationRenderInfo, RelationsRenderPass} from './relations/relations-render-pass'; -import {SingleRowBuilder} from './rows/single-row-builder'; -import {TimelineRenderPass} from './timeline/timeline-render-pass'; -import {HighlightingRenderPass} from "core-components/wp-fast-table/builders/highlighting/row-highlight-render-pass"; -import {DragDropHandleRenderPass} from "core-components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass"; -import {RenderedWorkPackage} from "core-app/modules/work_packages/render-info/rendered-work-package.type"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackageTable } from '../wp-fast-table'; +import { RelationRenderInfo, RelationsRenderPass } from './relations/relations-render-pass'; +import { SingleRowBuilder } from './rows/single-row-builder'; +import { TimelineRenderPass } from './timeline/timeline-render-pass'; +import { HighlightingRenderPass } from "core-components/wp-fast-table/builders/highlighting/row-highlight-render-pass"; +import { DragDropHandleRenderPass } from "core-components/wp-fast-table/builders/drag-and-drop/drag-drop-handle-render-pass"; +import { RenderedWorkPackage } from "core-app/modules/work_packages/render-info/rendered-work-package.type"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export type RenderedRowType = 'primary'|'relations'; @@ -109,15 +109,15 @@ export abstract class PrimaryRenderPass { * @param row */ public refresh(row:RowRenderInfo, workPackage:WorkPackageResource, body:HTMLElement) { - let oldRow = jQuery(body).find(`.${row.classIdentifier}`); + const oldRow = jQuery(body).find(`.${row.classIdentifier}`); let replacement:JQuery|null = null; switch (row.renderType) { - case 'primary': - replacement = this.rowBuilder.refreshRow(workPackage, oldRow); - break; - case 'relations': - replacement = this.relations.refreshRelationRow(row as RelationRenderInfo, workPackage, oldRow); + case 'primary': + replacement = this.rowBuilder.refreshRow(workPackage, oldRow); + break; + case 'relations': + replacement = this.relations.refreshRelationRow(row as RelationRenderInfo, workPackage, oldRow); } if (replacement !== null && oldRow.length) { @@ -186,9 +186,9 @@ export abstract class PrimaryRenderPass { * @param hidden whether the row was rendered hidden */ protected appendRow(workPackage:WorkPackageResource, - row:HTMLTableRowElement, - additionalClasses:string[] = [], - hidden:boolean = false) { + row:HTMLTableRowElement, + additionalClasses:string[] = [], + hidden = false) { this.tableBody.appendChild(row); @@ -209,9 +209,9 @@ export abstract class PrimaryRenderPass { * @param hidden whether the row was rendered hidden */ protected appendNonWorkPackageRow(row:HTMLTableRowElement, - classIdentifer:string, - additionalClasses:string[] = [], - hidden:boolean = false) { + classIdentifer:string, + additionalClasses:string[] = [], + hidden = false) { row.classList.add(classIdentifer); this.tableBody.appendChild(row); diff --git a/frontend/src/app/components/wp-fast-table/builders/relation-cell-builder.ts b/frontend/src/app/components/wp-fast-table/builders/relation-cell-builder.ts index 82a3294b234..7a50936b6d8 100644 --- a/frontend/src/app/components/wp-fast-table/builders/relation-cell-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/relation-cell-builder.ts @@ -1,12 +1,12 @@ -import {Injector} from '@angular/core'; -import {States} from '../../states.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {tdClassName} from './cell-builder'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {QueryColumn} from '../../wp-query/query-column'; -import {WorkPackageRelationsService} from '../../wp-relations/wp-relations.service'; -import {WorkPackageViewRelationColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { States } from '../../states.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { tdClassName } from './cell-builder'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { QueryColumn } from '../../wp-query/query-column'; +import { WorkPackageRelationsService } from '../../wp-relations/wp-relations.service'; +import { WorkPackageViewRelationColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export const relationCellTdClassName = 'wp-table--relation-cell-td'; export const relationCellIndicatorClassName = 'wp-table--relation-indicator'; diff --git a/frontend/src/app/components/wp-fast-table/builders/relations/relation-row-builder.ts b/frontend/src/app/components/wp-fast-table/builders/relations/relation-row-builder.ts index bfec415a390..2028e5673b2 100644 --- a/frontend/src/app/components/wp-fast-table/builders/relations/relation-row-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/relations/relation-row-builder.ts @@ -1,14 +1,14 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {States} from '../../../states.service'; -import {isRelationColumn, QueryColumn} from '../../../wp-query/query-column'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {tdClassName} from '../cell-builder'; -import {commonRowClassName, SingleRowBuilder, tableRowClassName} from '../rows/single-row-builder'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {RelationColumnType} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { States } from '../../../states.service'; +import { isRelationColumn, QueryColumn } from '../../../wp-query/query-column'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { tdClassName } from '../cell-builder'; +import { commonRowClassName, SingleRowBuilder, tableRowClassName } from '../rows/single-row-builder'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { RelationColumnType } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export function relationGroupClass(workPackageId:string) { return `__relations-expanded-from-${workPackageId}`; @@ -70,7 +70,7 @@ export class RelationRowBuilder extends SingleRowBuilder { */ public createEmptyRelationRow(from:WorkPackageResource, to:WorkPackageResource) { const identifier = this.relationClassIdentifier(from, to); - let tr = document.createElement('tr'); + const tr = document.createElement('tr'); tr.dataset['workPackageId'] = to.id!; tr.dataset['classIdentifier'] = identifier; diff --git a/frontend/src/app/components/wp-fast-table/builders/relations/relations-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/relations/relations-render-pass.ts index 4bbe58f4b70..bc6498dd96c 100644 --- a/frontend/src/app/components/wp-fast-table/builders/relations/relations-render-pass.ts +++ b/frontend/src/app/components/wp-fast-table/builders/relations/relations-render-pass.ts @@ -1,17 +1,17 @@ -import {Injector} from '@angular/core'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {PrimaryRenderPass, RowRenderInfo} from '../primary-render-pass'; -import {relationGroupClass, RelationRowBuilder} from './relation-row-builder'; -import {QueryColumn} from 'core-components/wp-query/query-column'; -import {WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { Injector } from '@angular/core'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { PrimaryRenderPass, RowRenderInfo } from '../primary-render-pass'; +import { relationGroupClass, RelationRowBuilder } from './relation-row-builder'; +import { QueryColumn } from 'core-components/wp-query/query-column'; +import { WorkPackageRelationsService } from "core-components/wp-relations/wp-relations.service"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; import { RelationColumnType, WorkPackageViewRelationColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export interface RelationRenderInfo extends RowRenderInfo { data:{ @@ -103,8 +103,8 @@ export class RelationsRenderPass { } public refreshRelationRow(renderedRow:RelationRenderInfo, - workPackage:WorkPackageResource, - oldRow:JQuery) { + workPackage:WorkPackageResource, + oldRow:JQuery) { const newRow = this.relationRowBuilder.refreshRow(workPackage, oldRow); this.relationRowBuilder.appendRelationLabel(newRow, renderedRow.belongsTo!, diff --git a/frontend/src/app/components/wp-fast-table/builders/rows/single-row-builder.ts b/frontend/src/app/components/wp-fast-table/builders/rows/single-row-builder.ts index b46d17a1e0a..1cb9a1f5f67 100644 --- a/frontend/src/app/components/wp-fast-table/builders/rows/single-row-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/rows/single-row-builder.ts @@ -1,21 +1,21 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {locateTableRowByIdentifier} from 'core-components/wp-fast-table/helpers/wp-table-row-helpers'; -import {debugLog} from '../../../../helpers/debug_output'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {isRelationColumn, QueryColumn} from '../../../wp-query/query-column'; -import {WorkPackageViewColumnsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {CellBuilder, tdClassName} from '../cell-builder'; -import {RelationCellbuilder} from '../relation-cell-builder'; -import {checkedClassName} from '../ui-state-link-builder'; -import {TableActionRenderer} from 'core-components/wp-fast-table/builders/table-action-renderer'; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { locateTableRowByIdentifier } from 'core-components/wp-fast-table/helpers/wp-table-row-helpers'; +import { debugLog } from '../../../../helpers/debug_output'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { isRelationColumn, QueryColumn } from '../../../wp-query/query-column'; +import { WorkPackageViewColumnsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { CellBuilder, tdClassName } from '../cell-builder'; +import { RelationCellbuilder } from '../relation-cell-builder'; +import { checkedClassName } from '../ui-state-link-builder'; +import { TableActionRenderer } from 'core-components/wp-fast-table/builders/table-action-renderer'; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; import { internalContextMenuColumn, internalSortColumn } from "core-components/wp-fast-table/builders/internal-sort-columns"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; // Work package table row entries export const tableRowClassName = 'wp-table--row'; @@ -56,7 +56,7 @@ export class SingleRowBuilder { * we add for buttons and timeline. */ private buildAugmentedColumns():QueryColumn[] { - let columns = [...this.columns, internalContextMenuColumn]; + const columns = [...this.columns, internalContextMenuColumn]; if (this.workPackageTable.configuration.dragAndDropEnabled) { columns.unshift(internalSortColumn); @@ -73,18 +73,18 @@ export class SingleRowBuilder { // Handle property types switch (column.id) { - case internalContextMenuColumn.id: - if (this.workPackageTable.configuration.actionsColumnEnabled) { - return this.contextLinkBuilder.build(workPackage); - } else if (this.workPackageTable.configuration.columnMenuEnabled) { - let td = document.createElement('td'); - td.classList.add('hide-when-print'); - return td; - } else { - return null; - } - default: - return this.cellBuilder.build(workPackage, column); + case internalContextMenuColumn.id: + if (this.workPackageTable.configuration.actionsColumnEnabled) { + return this.contextLinkBuilder.build(workPackage); + } else if (this.workPackageTable.configuration.columnMenuEnabled) { + const td = document.createElement('td'); + td.classList.add('hide-when-print'); + return td; + } else { + return null; + } + default: + return this.cellBuilder.build(workPackage, column); } } @@ -92,7 +92,7 @@ export class SingleRowBuilder { * Build the columns on the given empty row */ public buildEmpty(workPackage:WorkPackageResource):[HTMLTableRowElement, boolean] { - let row = this.createEmptyRow(workPackage); + const row = this.createEmptyRow(workPackage); return this.buildEmptyRow(workPackage, row); } @@ -103,7 +103,7 @@ export class SingleRowBuilder { */ public createEmptyRow(workPackage:WorkPackageResource) { const identifier = this.classIdentifier(workPackage); - let tr = document.createElement('tr'); + const tr = document.createElement('tr'); tr.setAttribute('tabindex', '0'); tr.dataset['workPackageId'] = workPackage.id!; tr.dataset['classIdentifier'] = identifier; @@ -180,7 +180,7 @@ export class SingleRowBuilder { protected buildEmptyRow(workPackage:WorkPackageResource, row:HTMLTableRowElement):[HTMLTableRowElement, boolean] { const change = this.workPackageTable.editing.change(workPackage); - let cells:{ [attribute:string]:JQuery } = {}; + const cells:{ [attribute:string]:JQuery } = {}; if (change && !change.isEmpty()) { // Try to find an old instance of this row @@ -193,7 +193,7 @@ export class SingleRowBuilder { this.augmentedColumns.forEach((column:QueryColumn) => { let cell:Element|null; - let oldCell:JQuery|undefined = cells[column.id]; + const oldCell:JQuery|undefined = cells[column.id]; if (oldCell && oldCell.length) { debugLog(`Rendering previous open column ${column.id} on ${workPackage.id}`); diff --git a/frontend/src/app/components/wp-fast-table/builders/table-action-renderer.ts b/frontend/src/app/components/wp-fast-table/builders/table-action-renderer.ts index fde82ce90b4..d9547134846 100644 --- a/frontend/src/app/components/wp-fast-table/builders/table-action-renderer.ts +++ b/frontend/src/app/components/wp-fast-table/builders/table-action-renderer.ts @@ -1,10 +1,10 @@ -import {Injector} from '@angular/core'; -import {tdClassName} from './cell-builder'; -import {OpTableActionsService} from 'core-components/wp-table/table-actions/table-actions.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {contextMenuSpanClassName, contextMenuTdClassName} from "core-components/wp-table/table-actions/table-action"; -import {internalContextMenuColumn} from "core-components/wp-fast-table/builders/internal-sort-columns"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { tdClassName } from './cell-builder'; +import { OpTableActionsService } from 'core-components/wp-table/table-actions/table-actions.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { contextMenuSpanClassName, contextMenuTdClassName } from "core-components/wp-table/table-actions/table-action"; +import { internalContextMenuColumn } from "core-components/wp-fast-table/builders/internal-sort-columns"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class TableActionRenderer { @@ -16,11 +16,11 @@ export class TableActionRenderer { public build(workPackage:WorkPackageResource):HTMLElement { // Append details button - let td = document.createElement('td'); + const td = document.createElement('td'); td.classList.add(tdClassName, contextMenuTdClassName, internalContextMenuColumn.id, 'hide-when-print'); // Wrap any actions in a span - let span = document.createElement('span'); + const span = document.createElement('span'); span.classList.add(contextMenuSpanClassName); this.tableActionsService diff --git a/frontend/src/app/components/wp-fast-table/builders/timeline/timeline-render-pass.ts b/frontend/src/app/components/wp-fast-table/builders/timeline/timeline-render-pass.ts index 1a8892ed4b3..31cdfd4d8f9 100644 --- a/frontend/src/app/components/wp-fast-table/builders/timeline/timeline-render-pass.ts +++ b/frontend/src/app/components/wp-fast-table/builders/timeline/timeline-render-pass.ts @@ -1,7 +1,7 @@ -import {Injector} from '@angular/core'; -import {PrimaryRenderPass, RowRenderInfo} from '../primary-render-pass'; -import {TimelineRowBuilder} from './timeline-row-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; +import { Injector } from '@angular/core'; +import { PrimaryRenderPass, RowRenderInfo } from '../primary-render-pass'; +import { TimelineRowBuilder } from './timeline-row-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; export class TimelineRenderPass { diff --git a/frontend/src/app/components/wp-fast-table/builders/timeline/timeline-row-builder.ts b/frontend/src/app/components/wp-fast-table/builders/timeline/timeline-row-builder.ts index f466b2e8eaf..283ba0a3ce6 100644 --- a/frontend/src/app/components/wp-fast-table/builders/timeline/timeline-row-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/timeline/timeline-row-builder.ts @@ -1,10 +1,10 @@ -import {Injector} from '@angular/core'; -import {States} from '../../../states.service'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {commonRowClassName} from '../rows/single-row-builder'; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injector } from '@angular/core'; +import { States } from '../../../states.service'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { commonRowClassName } from '../rows/single-row-builder'; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export const timelineCellClassName = 'wp-timeline-cell'; @@ -35,8 +35,8 @@ export class TimelineRowBuilder { * @param rowClasses */ public insert(workPackageId:string|null, - timelineBody:DocumentFragment|HTMLElement, - rowClasses:string[] = []) { + timelineBody:DocumentFragment|HTMLElement, + rowClasses:string[] = []) { const cell = this.build(workPackageId); cell.classList.add(...rowClasses); diff --git a/frontend/src/app/components/wp-fast-table/builders/ui-state-link-builder.ts b/frontend/src/app/components/wp-fast-table/builders/ui-state-link-builder.ts index 93b0df60325..24dbec7aed8 100644 --- a/frontend/src/app/components/wp-fast-table/builders/ui-state-link-builder.ts +++ b/frontend/src/app/components/wp-fast-table/builders/ui-state-link-builder.ts @@ -1,5 +1,5 @@ -import {KeepTabService} from 'core-components/wp-single-view-tabs/keep-tab/keep-tab.service'; -import {StateService} from '@uirouter/core'; +import { KeepTabService } from 'core-components/wp-single-view-tabs/keep-tab/keep-tab.service'; +import { StateService } from '@uirouter/core'; export const uiStateLinkClass = '__ui-state-link'; export const checkedClassName = '-checked'; @@ -22,9 +22,9 @@ export class UiStateLinkBuilder { } private build(workPackageId:string, state:string, title:string, content:string) { - let a = document.createElement('a'); + const a = document.createElement('a'); - a.href = this.$state.href((this.keepTab as any)[state], {workPackageId: workPackageId}); + a.href = this.$state.href((this.keepTab as any)[state], { workPackageId: workPackageId }); a.classList.add(uiStateLinkClass); a.dataset['workPackageId'] = workPackageId; a.dataset['wpState'] = state; diff --git a/frontend/src/app/components/wp-fast-table/handlers/cell/edit-cell-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/cell/edit-cell-handler.ts index 4d72f70050f..303b47756c5 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/cell/edit-cell-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/cell/edit-cell-handler.ts @@ -1,16 +1,16 @@ -import {Injector} from '@angular/core'; -import {debugLog} from '../../../../helpers/debug_output'; -import {States} from '../../../states.service'; -import {displayClassName, editableClassName, readOnlyClassName} from 'core-app/modules/fields/display/display-field-renderer'; +import { Injector } from '@angular/core'; +import { debugLog } from '../../../../helpers/debug_output'; +import { States } from '../../../states.service'; +import { displayClassName, editableClassName, readOnlyClassName } from 'core-app/modules/fields/display/display-field-renderer'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {ClickOrEnterHandler} from '../click-or-enter-handler'; -import {TableEventComponent, TableEventHandler} from '../table-handler-registry'; -import {ClickPositionMapper} from "core-app/modules/common/set-click-position/set-click-position"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { ClickOrEnterHandler } from '../click-or-enter-handler'; +import { TableEventComponent, TableEventHandler } from '../table-handler-registry'; +import { ClickPositionMapper } from "core-app/modules/common/set-click-position/set-click-position"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; export class EditCellHandler extends ClickOrEnterHandler implements TableEventHandler { @@ -41,9 +41,9 @@ export class EditCellHandler extends ClickOrEnterHandler implements TableEventHa evt.preventDefault(); // Locate the cell from event - let target = jQuery(evt.target).closest(`.${displayClassName}`); + const target = jQuery(evt.target).closest(`.${displayClassName}`); // Get the target field name - let fieldName = target.data('fieldName'); + const fieldName = target.data('fieldName'); if (!fieldName) { debugLog('Click handled by cell not a field? ', evt.target); diff --git a/frontend/src/app/components/wp-fast-table/handlers/cell/relations-cell-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/cell/relations-cell-handler.ts index 3ffd1294eb2..65745871504 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/cell/relations-cell-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/cell/relations-cell-handler.ts @@ -1,12 +1,12 @@ -import {Injector} from '@angular/core'; -import {debugLog} from '../../../../helpers/debug_output'; -import {relationCellIndicatorClassName, relationCellTdClassName} from '../../builders/relation-cell-builder'; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {ClickOrEnterHandler} from '../click-or-enter-handler'; -import {TableEventComponent, TableEventHandler} from '../table-handler-registry'; -import {WorkPackageViewRelationColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { debugLog } from '../../../../helpers/debug_output'; +import { relationCellIndicatorClassName, relationCellTdClassName } from '../../builders/relation-cell-builder'; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { ClickOrEnterHandler } from '../click-or-enter-handler'; +import { TableEventComponent, TableEventHandler } from '../table-handler-registry'; +import { WorkPackageViewRelationColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class RelationsCellHandler extends ClickOrEnterHandler implements TableEventHandler { @@ -22,7 +22,7 @@ export class RelationsCellHandler extends ClickOrEnterHandler implements TableEv } public eventScope(view:TableEventComponent) { - return jQuery(view.workPackageTable.tableAndTimelineContainer); + return jQuery(view.workPackageTable.tableAndTimelineContainer); } constructor(public readonly injector:Injector) { diff --git a/frontend/src/app/components/wp-fast-table/handlers/click-or-enter-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/click-or-enter-handler.ts index f0c9f2008ac..68379a1d785 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/click-or-enter-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/click-or-enter-handler.ts @@ -1,6 +1,6 @@ -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {WorkPackageTable} from "../wp-fast-table"; -import {TableEventComponent} from "core-components/wp-fast-table/handlers/table-handler-registry"; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { WorkPackageTable } from "../wp-fast-table"; +import { TableEventComponent } from "core-components/wp-fast-table/handlers/table-handler-registry"; /** diff --git a/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-click-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-click-handler.ts index 1f106fa272c..28880941eba 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-click-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-click-handler.ts @@ -1,10 +1,10 @@ -import {Injector} from '@angular/core'; -import {debugLog} from '../../../../helpers/debug_output'; -import {uiStateLinkClass} from '../../builders/ui-state-link-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {ContextMenuHandler} from './context-menu-handler'; -import {contextMenuLinkClassName} from "core-components/wp-table/table-actions/table-action"; -import {TableEventComponent} from "core-components/wp-fast-table/handlers/table-handler-registry"; +import { Injector } from '@angular/core'; +import { debugLog } from '../../../../helpers/debug_output'; +import { uiStateLinkClass } from '../../builders/ui-state-link-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { ContextMenuHandler } from './context-menu-handler'; +import { contextMenuLinkClassName } from "core-components/wp-table/table-actions/table-action"; +import { TableEventComponent } from "core-components/wp-fast-table/handlers/table-handler-registry"; export class ContextMenuClickHandler extends ContextMenuHandler { @@ -21,7 +21,7 @@ export class ContextMenuClickHandler extends ContextMenuHandler { } public handleEvent(view:TableEventComponent, evt:JQuery.TriggeredEvent):boolean { - let target = jQuery(evt.target); + const target = jQuery(evt.target); // We want to keep the original context menu on hrefs // (currently, this is only the id diff --git a/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-handler.ts index e5c3df18aa3..f7b16a03c49 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-handler.ts @@ -1,10 +1,10 @@ -import {Injector} from '@angular/core'; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {TableEventComponent, TableEventHandler} from '../table-handler-registry'; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {WorkPackageTableContextMenu} from "core-components/op-context-menu/wp-context-menu/wp-table-context-menu.directive"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { TableEventComponent, TableEventHandler } from '../table-handler-registry'; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { WorkPackageTableContextMenu } from "core-components/op-context-menu/wp-context-menu/wp-table-context-menu.directive"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export abstract class ContextMenuHandler implements TableEventHandler { // Injections diff --git a/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-keyboard-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-keyboard-handler.ts index 38502271db0..08855e96c89 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-keyboard-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-keyboard-handler.ts @@ -1,8 +1,8 @@ -import {Injector} from '@angular/core'; -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {ContextMenuHandler} from './context-menu-handler'; -import {TableEventComponent} from "core-components/wp-fast-table/handlers/table-handler-registry"; +import { Injector } from '@angular/core'; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { ContextMenuHandler } from './context-menu-handler'; +import { TableEventComponent } from "core-components/wp-fast-table/handlers/table-handler-registry"; export class ContextMenuKeyboardHandler extends ContextMenuHandler { @@ -23,7 +23,7 @@ export class ContextMenuKeyboardHandler extends ContextMenuHandler { return false; } - let target = jQuery(evt.target); + const target = jQuery(evt.target); if (!(evt.keyCode === keyCodes.F10 && evt.shiftKey && evt.altKey)) { return true; @@ -37,7 +37,7 @@ export class ContextMenuKeyboardHandler extends ContextMenuHandler { const wpId = element.data('workPackageId'); // Set position args to open at element - let position = { my: 'left top', at: 'left bottom', of: target }; + const position = { my: 'left top', at: 'left bottom', of: target }; super.openContextMenu(component.workPackageTable, evt, wpId, position); diff --git a/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-rightclick-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-rightclick-handler.ts index 4a6323b4661..592272845e2 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-rightclick-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/context-menu/context-menu-rightclick-handler.ts @@ -1,13 +1,13 @@ -import {Injector} from '@angular/core'; -import {debugLog} from '../../../../helpers/debug_output'; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {timelineCellClassName} from '../../builders/timeline/timeline-row-builder'; -import {uiStateLinkClass} from '../../builders/ui-state-link-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {ContextMenuHandler} from './context-menu-handler'; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {TableEventComponent} from "core-components/wp-fast-table/handlers/table-handler-registry"; +import { Injector } from '@angular/core'; +import { debugLog } from '../../../../helpers/debug_output'; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { timelineCellClassName } from '../../builders/timeline/timeline-row-builder'; +import { uiStateLinkClass } from '../../builders/ui-state-link-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { ContextMenuHandler } from './context-menu-handler'; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { TableEventComponent } from "core-components/wp-fast-table/handlers/table-handler-registry"; export class ContextMenuRightClickHandler extends ContextMenuHandler { @@ -33,7 +33,7 @@ export class ContextMenuRightClickHandler extends ContextMenuHandler { if (!view.workPackageTable.configuration.contextMenuEnabled) { return false; } - let target = jQuery(evt.target); + const target = jQuery(evt.target); // We want to keep the original context menu on hrefs // (currently, this is only the id @@ -50,7 +50,7 @@ export class ContextMenuRightClickHandler extends ContextMenuHandler { const wpId = element.data('workPackageId'); if (wpId) { - let [index,] = view.workPackageTable.findRenderedRow(wpId); + const [index,] = view.workPackageTable.findRenderedRow(wpId); if (!this.wpTableSelection.isSelected(wpId)) { this.wpTableSelection.setSelection(wpId, index); diff --git a/frontend/src/app/components/wp-fast-table/handlers/row/click-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/row/click-handler.ts index ebf248bc470..b51430e52a4 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/row/click-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/row/click-handler.ts @@ -1,16 +1,16 @@ -import {Injector} from '@angular/core'; -import {StateService} from '@uirouter/core'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {debugLog} from '../../../../helpers/debug_output'; -import {States} from '../../../states.service'; -import {KeepTabService} from '../../../wp-single-view-tabs/keep-tab/keep-tab.service'; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {TableEventComponent, TableEventHandler} from '../table-handler-registry'; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {displayClassName} from "core-app/modules/fields/display/display-field-renderer"; -import {activeFieldClassName} from "core-app/modules/fields/edit/edit-form/edit-form"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { StateService } from '@uirouter/core'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { debugLog } from '../../../../helpers/debug_output'; +import { States } from '../../../states.service'; +import { KeepTabService } from '../../../wp-single-view-tabs/keep-tab/keep-tab.service'; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { TableEventComponent, TableEventHandler } from '../table-handler-registry'; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { displayClassName } from "core-app/modules/fields/display/display-field-renderer"; +import { activeFieldClassName } from "core-app/modules/fields/edit/edit-form/edit-form"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class RowClickHandler implements TableEventHandler { @@ -37,7 +37,7 @@ export class RowClickHandler implements TableEventHandler { } public handleEvent(view:TableEventComponent, evt:JQuery.TriggeredEvent) { - let target = jQuery(evt.target); + const target = jQuery(evt.target); // Ignore links if (target.is('a') || target.parent().is('a')) { @@ -52,15 +52,15 @@ export class RowClickHandler implements TableEventHandler { } // Locate the row from event - let element = target.closest(this.SELECTOR); - let wpId = element.data('workPackageId'); - let classIdentifier = element.data('classIdentifier'); + const element = target.closest(this.SELECTOR); + const wpId = element.data('workPackageId'); + const classIdentifier = element.data('classIdentifier'); if (!wpId) { return true; } - let [index, row] = view.workPackageTable.findRenderedRow(classIdentifier); + const [index, row] = view.workPackageTable.findRenderedRow(classIdentifier); // Update single selection if no modifier present if (!(evt.ctrlKey || evt.metaKey || evt.shiftKey)) { diff --git a/frontend/src/app/components/wp-fast-table/handlers/row/double-click-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/row/double-click-handler.ts index 0c43bb74c9f..36e27e4a883 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/row/double-click-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/row/double-click-handler.ts @@ -1,17 +1,17 @@ -import {Injector} from '@angular/core'; -import {StateService} from '@uirouter/core'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {debugLog} from '../../../../helpers/debug_output'; -import {States} from '../../../states.service'; -import {tdClassName} from '../../builders/cell-builder'; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {TableEventComponent, TableEventHandler} from '../table-handler-registry'; -import {LinkHandling} from "core-app/modules/common/link-handling/link-handling"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {displayClassName} from "core-app/modules/fields/display/display-field-renderer"; -import {activeFieldClassName} from "core-app/modules/fields/edit/edit-form/edit-form"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { StateService } from '@uirouter/core'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { debugLog } from '../../../../helpers/debug_output'; +import { States } from '../../../states.service'; +import { tdClassName } from '../../builders/cell-builder'; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { TableEventComponent, TableEventHandler } from '../table-handler-registry'; +import { LinkHandling } from "core-app/modules/common/link-handling/link-handling"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { displayClassName } from "core-app/modules/fields/display/display-field-renderer"; +import { activeFieldClassName } from "core-app/modules/fields/edit/edit-form/edit-form"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class RowDoubleClickHandler implements TableEventHandler { @@ -37,7 +37,7 @@ export class RowDoubleClickHandler implements TableEventHandler { } public handleEvent(view:TableEventComponent, evt:JQuery.TriggeredEvent) { - let target = jQuery(evt.target); + const target = jQuery(evt.target); // Skip clicks with modifiers if (LinkHandling.isClickedWithModifier(evt)) { @@ -52,8 +52,8 @@ export class RowDoubleClickHandler implements TableEventHandler { } // Locate the row from event - let element = target.closest(this.SELECTOR).closest(`.${tableRowClassName}`); - let wpId = element.data('workPackageId'); + const element = target.closest(this.SELECTOR).closest(`.${tableRowClassName}`); + const wpId = element.data('workPackageId'); // Ignore links if (target.is('a') || target.parent().is('a')) { diff --git a/frontend/src/app/components/wp-fast-table/handlers/row/group-row-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/row/group-row-handler.ts index a02035c6d93..3acb66c1891 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/row/group-row-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/row/group-row-handler.ts @@ -1,9 +1,9 @@ -import {Injector} from '@angular/core'; -import {TableEventComponent, TableEventHandler} from '../table-handler-registry'; -import {IsolatedQuerySpace} from 'core-app/modules/work_packages/query-space/isolated-query-space'; -import {rowGroupClassName} from 'core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants'; -import {InjectField} from 'core-app/helpers/angular/inject-field.decorator'; -import {WorkPackageViewCollapsedGroupsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service'; +import { Injector } from '@angular/core'; +import { TableEventComponent, TableEventHandler } from '../table-handler-registry'; +import { IsolatedQuerySpace } from 'core-app/modules/work_packages/query-space/isolated-query-space'; +import { rowGroupClassName } from 'core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants'; +import { InjectField } from 'core-app/helpers/angular/inject-field.decorator'; +import { WorkPackageViewCollapsedGroupsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service'; export class GroupRowHandler implements TableEventHandler { @@ -30,8 +30,8 @@ export class GroupRowHandler implements TableEventHandler { evt.preventDefault(); evt.stopPropagation(); - let groupHeader = jQuery(evt.target).parents(`.${rowGroupClassName}`); - let groupIdentifier = groupHeader.data('groupIdentifier'); + const groupHeader = jQuery(evt.target).parents(`.${rowGroupClassName}`); + const groupIdentifier = groupHeader.data('groupIdentifier'); this.workPackageViewCollapsedGroupsService.toggleGroupCollapseState(groupIdentifier); } diff --git a/frontend/src/app/components/wp-fast-table/handlers/row/hierarchy-click-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/row/hierarchy-click-handler.ts index d1601cc8e56..62adb503d31 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/row/hierarchy-click-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/row/hierarchy-click-handler.ts @@ -1,11 +1,11 @@ -import {Injector} from '@angular/core'; -import {States} from '../../../states.service'; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {ClickOrEnterHandler} from '../click-or-enter-handler'; -import {TableEventComponent, TableEventHandler} from "core-components/wp-fast-table/handlers/table-handler-registry"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { States } from '../../../states.service'; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { ClickOrEnterHandler } from '../click-or-enter-handler'; +import { TableEventComponent, TableEventHandler } from "core-components/wp-fast-table/handlers/table-handler-registry"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class HierarchyClickHandler extends ClickOrEnterHandler implements TableEventHandler { // Injections @@ -29,11 +29,11 @@ export class HierarchyClickHandler extends ClickOrEnterHandler implements TableE } public processEvent(table:WorkPackageTable, evt:JQuery.TriggeredEvent):boolean { - let target = jQuery(evt.target); + const target = jQuery(evt.target); // Locate the row from event - let element = target.closest(`.${tableRowClassName}`); - let wpId = element.data('workPackageId'); + const element = target.closest(`.${tableRowClassName}`); + const wpId = element.data('workPackageId'); this.wpTableHierarchies.toggle(wpId); diff --git a/frontend/src/app/components/wp-fast-table/handlers/row/wp-state-links-handler.ts b/frontend/src/app/components/wp-fast-table/handlers/row/wp-state-links-handler.ts index f9903dbfcc0..5670119ff10 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/row/wp-state-links-handler.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/row/wp-state-links-handler.ts @@ -1,15 +1,15 @@ -import {Injector} from '@angular/core'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {States} from '../../../states.service'; -import {KeepTabService} from '../../../wp-single-view-tabs/keep-tab/keep-tab.service'; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {uiStateLinkClass} from '../../builders/ui-state-link-builder'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {TableEventComponent, TableEventHandler} from '../table-handler-registry'; -import {StateService} from '@uirouter/core'; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { States } from '../../../states.service'; +import { KeepTabService } from '../../../wp-single-view-tabs/keep-tab/keep-tab.service'; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { uiStateLinkClass } from '../../builders/ui-state-link-builder'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { TableEventComponent, TableEventHandler } from '../table-handler-registry'; +import { StateService } from '@uirouter/core'; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class WorkPackageStateLinksHandler implements TableEventHandler { @@ -56,9 +56,9 @@ export class WorkPackageStateLinksHandler implements TableEventHandler { // not matter what other rows are (de-)selected below. // Thus save that row for the details view button. // Locate the row from event - let row = target.closest(`.${tableRowClassName}`); - let classIdentifier = row.data('classIdentifier'); - let [index, _] = view.workPackageTable.findRenderedRow(classIdentifier); + const row = target.closest(`.${tableRowClassName}`); + const classIdentifier = row.data('classIdentifier'); + const [index, _] = view.workPackageTable.findRenderedRow(classIdentifier); // Update single selection if no modifier present this.wpTableSelection.setSelection(workPackageId, index); diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/columns-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/columns-transformer.ts index 84f1337f986..2a583d7bc24 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/columns-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/columns-transformer.ts @@ -1,10 +1,10 @@ -import {Injector} from '@angular/core'; -import {debugLog} from '../../../../helpers/debug_output'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {takeUntil} from "rxjs/operators"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { debugLog } from '../../../../helpers/debug_output'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { takeUntil } from "rxjs/operators"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class ColumnsTransformer { diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/drag-and-drop-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/drag-and-drop-transformer.ts index d8ed8d7f84d..aab165d937b 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/drag-and-drop-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/drag-and-drop-transformer.ts @@ -1,24 +1,24 @@ -import {Injector} from '@angular/core'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {take, takeUntil} from "rxjs/operators"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {TableDragActionsRegistryService} from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service"; -import {TableDragActionService} from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; -import {States} from "core-components/states.service"; -import {tableRowClassName} from "core-components/wp-fast-table/builders/rows/single-row-builder"; -import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; -import {DragAndDropHelpers} from "core-app/modules/common/drag-and-drop/drag-and-drop.helpers"; -import {WorkPackageViewOrderService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; -import {RenderedWorkPackage} from "core-app/modules/work_packages/render-info/rendered-work-package.type"; -import {BrowserDetector} from "core-app/modules/common/browser/browser-detector.service"; -import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {isInsideCollapsedGroup} from "core-components/wp-fast-table/helpers/wp-table-row-helpers"; -import {collapsedGroupClass} from "core-components/wp-fast-table/helpers/wp-table-hierarchy-helpers"; +import { Injector } from '@angular/core'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { take, takeUntil } from "rxjs/operators"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { TableDragActionsRegistryService } from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service"; +import { TableDragActionService } from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; +import { States } from "core-components/states.service"; +import { tableRowClassName } from "core-components/wp-fast-table/builders/rows/single-row-builder"; +import { DragAndDropService } from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; +import { DragAndDropHelpers } from "core-app/modules/common/drag-and-drop/drag-and-drop.helpers"; +import { WorkPackageViewOrderService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; +import { RenderedWorkPackage } from "core-app/modules/work_packages/render-info/rendered-work-package.type"; +import { BrowserDetector } from "core-app/modules/common/browser/browser-detector.service"; +import { WorkPackagesListService } from "core-components/wp-list/wp-list.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { isInsideCollapsedGroup } from "core-components/wp-fast-table/helpers/wp-table-row-helpers"; +import { collapsedGroupClass } from "core-components/wp-fast-table/helpers/wp-table-hierarchy-helpers"; export class DragAndDropTransformer { @@ -93,7 +93,7 @@ export class DragAndDropTransformer { this.actionService.onNewOrder(newOrder); // Save the query when switching to manual - let query = this.querySpace.query.value; + const query = this.querySpace.query.value; if (query && this.wpTableSortBy.switchToManualSorting(query)) { await this.wpListService.save(query); } diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/group-fold-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/group-fold-transformer.ts index 8665a55075b..f7312523d68 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/group-fold-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/group-fold-transformer.ts @@ -1,9 +1,9 @@ -import {Injector} from '@angular/core'; -import {distinctUntilChanged, takeUntil} from 'rxjs/operators'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {WorkPackageViewCollapsedGroupsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service"; +import { Injector } from '@angular/core'; +import { distinctUntilChanged, takeUntil } from 'rxjs/operators'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { WorkPackageViewCollapsedGroupsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service"; export class GroupFoldTransformer { @@ -11,7 +11,7 @@ export class GroupFoldTransformer { @InjectField() public querySpace:IsolatedQuerySpace; constructor(public readonly injector:Injector, - table:WorkPackageTable) { + table:WorkPackageTable) { this.workPackageViewCollapsedGroupsService .updates$() .pipe( diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/hierarchy-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/hierarchy-transformer.ts index 9fa76006efb..54431eefa94 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/hierarchy-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/hierarchy-transformer.ts @@ -1,18 +1,18 @@ -import {Injector} from '@angular/core'; -import {scrollTableRowIntoView} from 'core-components/wp-fast-table/helpers/wp-table-row-helpers'; -import {distinctUntilChanged, filter, map, takeUntil} from 'rxjs/operators'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; +import { Injector } from '@angular/core'; +import { scrollTableRowIntoView } from 'core-components/wp-fast-table/helpers/wp-table-row-helpers'; +import { distinctUntilChanged, filter, map, takeUntil } from 'rxjs/operators'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; import { collapsedGroupClass, hierarchyGroupClass, hierarchyRootClass } from "core-components/wp-fast-table/helpers/wp-table-hierarchy-helpers"; -import {indicatorCollapsedClass} from "core-components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder"; -import {tableRowClassName} from "core-components/wp-fast-table/builders/rows/single-row-builder"; -import {WorkPackageViewHierarchies} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { indicatorCollapsedClass } from "core-components/wp-fast-table/builders/modes/hierarchy/single-hierarchy-row-builder"; +import { tableRowClassName } from "core-components/wp-fast-table/builders/rows/single-row-builder"; +import { WorkPackageViewHierarchies } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class HierarchyTransformer { @@ -20,7 +20,7 @@ export class HierarchyTransformer { @InjectField() public querySpace:IsolatedQuerySpace; constructor(public readonly injector:Injector, - table:WorkPackageTable) { + table:WorkPackageTable) { this.wpTableHierarchies .updates$() diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/highlighting-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/highlighting-transformer.ts index 01c069043ef..dde2ca73a49 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/highlighting-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/highlighting-transformer.ts @@ -1,9 +1,9 @@ -import {Injector} from '@angular/core'; -import {distinctUntilChanged, takeUntil} from 'rxjs/operators'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageViewHighlightingService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { distinctUntilChanged, takeUntil } from 'rxjs/operators'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageViewHighlightingService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class HighlightingTransformer { @@ -11,7 +11,7 @@ export class HighlightingTransformer { @InjectField() public querySpace:IsolatedQuerySpace; constructor(public readonly injector:Injector, - table:WorkPackageTable) { + table:WorkPackageTable) { this.wpTableHighlighting .updates$() .pipe( diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/relations-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/relations-transformer.ts index 574ffc50655..386c3a6a822 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/relations-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/relations-transformer.ts @@ -1,9 +1,9 @@ -import {Injector} from '@angular/core'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {takeUntil} from "rxjs/operators"; -import {WorkPackageViewRelationColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { takeUntil } from "rxjs/operators"; +import { WorkPackageViewRelationColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class RelationsTransformer { @@ -11,7 +11,7 @@ export class RelationsTransformer { @InjectField() public querySpace:IsolatedQuerySpace; constructor(public readonly injector:Injector, - table:WorkPackageTable) { + table:WorkPackageTable) { this.wpTableRelationColumns .updates$() diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/rows-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/rows-transformer.ts index bf6aa8b00ea..80e35f257b9 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/rows-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/rows-transformer.ts @@ -1,12 +1,12 @@ -import {Injector} from '@angular/core'; -import {filter, takeUntil} from 'rxjs/operators'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {States} from 'core-components/states.service'; -import {WorkPackageViewOrderService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { filter, takeUntil } from 'rxjs/operators'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { States } from 'core-components/states.service'; +import { WorkPackageViewOrderService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class RowsTransformer { @@ -42,7 +42,7 @@ export class RowsTransformer { .pipe( takeUntil(this.querySpace.stopAllSubscriptions.asObservable()), filter(() => { - let rendered = this.querySpace.tableRendered.getValueOr([]); + const rendered = this.querySpace.tableRendered.getValueOr([]); return rendered && rendered.length > 0; }) ) diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/selection-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/selection-transformer.ts index 09378b1679d..fcbf497e561 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/selection-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/selection-transformer.ts @@ -1,17 +1,17 @@ -import {Injector} from '@angular/core'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {takeUntil} from 'rxjs/operators'; -import {tableRowClassName} from '../../builders/rows/single-row-builder'; -import {checkedClassName} from '../../builders/ui-state-link-builder'; -import {locateTableRow, scrollTableRowIntoView} from '../../helpers/wp-table-row-helpers'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {FocusHelperService} from 'core-app/modules/common/focus/focus-helper'; +import { Injector } from '@angular/core'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { takeUntil } from 'rxjs/operators'; +import { tableRowClassName } from '../../builders/rows/single-row-builder'; +import { checkedClassName } from '../../builders/ui-state-link-builder'; +import { locateTableRow, scrollTableRowIntoView } from '../../helpers/wp-table-row-helpers'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { FocusHelperService } from 'core-app/modules/common/focus/focus-helper'; import { WorkPackageViewSelectionService, WorkPackageViewSelectionState } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class SelectionTransformer { diff --git a/frontend/src/app/components/wp-fast-table/handlers/state/timeline-transformer.ts b/frontend/src/app/components/wp-fast-table/handlers/state/timeline-transformer.ts index a5e98faee28..ff9868bd703 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/state/timeline-transformer.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/state/timeline-transformer.ts @@ -1,10 +1,10 @@ -import {Injector} from '@angular/core'; -import {takeUntil} from 'rxjs/operators'; -import {WorkPackageTable} from '../../wp-fast-table'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {WorkPackageTimelineState} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-timeline"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { takeUntil } from 'rxjs/operators'; +import { WorkPackageTable } from '../../wp-fast-table'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageTimelineState } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-timeline"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class TimelineTransformer { diff --git a/frontend/src/app/components/wp-fast-table/handlers/table-handler-registry.ts b/frontend/src/app/components/wp-fast-table/handlers/table-handler-registry.ts index 43ac83bbc33..297b444a68e 100644 --- a/frontend/src/app/components/wp-fast-table/handlers/table-handler-registry.ts +++ b/frontend/src/app/components/wp-fast-table/handlers/table-handler-registry.ts @@ -1,29 +1,29 @@ -import {EventEmitter, Injector} from '@angular/core'; -import {WorkPackageTable} from '../wp-fast-table'; -import {EditCellHandler} from './cell/edit-cell-handler'; -import {RelationsCellHandler} from './cell/relations-cell-handler'; -import {ContextMenuClickHandler} from './context-menu/context-menu-click-handler'; -import {ContextMenuKeyboardHandler} from './context-menu/context-menu-keyboard-handler'; -import {ContextMenuRightClickHandler} from './context-menu/context-menu-rightclick-handler'; -import {RowClickHandler} from './row/click-handler'; -import {RowDoubleClickHandler} from './row/double-click-handler'; -import {GroupRowHandler} from './row/group-row-handler'; -import {HierarchyClickHandler} from './row/hierarchy-click-handler'; -import {WorkPackageStateLinksHandler} from './row/wp-state-links-handler'; -import {ColumnsTransformer} from './state/columns-transformer'; -import {HierarchyTransformer} from './state/hierarchy-transformer'; -import {RelationsTransformer} from './state/relations-transformer'; -import {RowsTransformer} from './state/rows-transformer'; -import {SelectionTransformer} from './state/selection-transformer'; -import {TimelineTransformer} from './state/timeline-transformer'; -import {HighlightingTransformer} from "core-components/wp-fast-table/handlers/state/highlighting-transformer"; -import {DragAndDropTransformer} from "core-components/wp-fast-table/handlers/state/drag-and-drop-transformer"; +import { EventEmitter, Injector } from '@angular/core'; +import { WorkPackageTable } from '../wp-fast-table'; +import { EditCellHandler } from './cell/edit-cell-handler'; +import { RelationsCellHandler } from './cell/relations-cell-handler'; +import { ContextMenuClickHandler } from './context-menu/context-menu-click-handler'; +import { ContextMenuKeyboardHandler } from './context-menu/context-menu-keyboard-handler'; +import { ContextMenuRightClickHandler } from './context-menu/context-menu-rightclick-handler'; +import { RowClickHandler } from './row/click-handler'; +import { RowDoubleClickHandler } from './row/double-click-handler'; +import { GroupRowHandler } from './row/group-row-handler'; +import { HierarchyClickHandler } from './row/hierarchy-click-handler'; +import { WorkPackageStateLinksHandler } from './row/wp-state-links-handler'; +import { ColumnsTransformer } from './state/columns-transformer'; +import { HierarchyTransformer } from './state/hierarchy-transformer'; +import { RelationsTransformer } from './state/relations-transformer'; +import { RowsTransformer } from './state/rows-transformer'; +import { SelectionTransformer } from './state/selection-transformer'; +import { TimelineTransformer } from './state/timeline-transformer'; +import { HighlightingTransformer } from "core-components/wp-fast-table/handlers/state/highlighting-transformer"; +import { DragAndDropTransformer } from "core-components/wp-fast-table/handlers/state/drag-and-drop-transformer"; import { WorkPackageViewEventHandler, WorkPackageViewOutputs, WorkPackageViewHandlerRegistry } from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry"; -import {WorkPackageFocusContext} from "core-components/wp-table/wp-table.component"; -import {GroupFoldTransformer} from "core-components/wp-fast-table/handlers/state/group-fold-transformer"; +import { WorkPackageFocusContext } from "core-components/wp-table/wp-table.component"; +import { GroupFoldTransformer } from "core-components/wp-fast-table/handlers/state/group-fold-transformer"; type StateTransformers = { // noinspection JSUnusedLocalSymbols diff --git a/frontend/src/app/components/wp-fast-table/helpers/wp-table-hierarchy-helpers.ts b/frontend/src/app/components/wp-fast-table/helpers/wp-table-hierarchy-helpers.ts index fbe87c7055c..2d051efd928 100644 --- a/frontend/src/app/components/wp-fast-table/helpers/wp-table-hierarchy-helpers.ts +++ b/frontend/src/app/components/wp-fast-table/helpers/wp-table-hierarchy-helpers.ts @@ -1,7 +1,7 @@ /** * Returns the collapsed group class for the given ancestor id */ -export function collapsedGroupClass(ancestorId:string = ''):string { +export function collapsedGroupClass(ancestorId = ''):string { return `__collapsed-group-${ancestorId}`; } diff --git a/frontend/src/app/components/wp-fast-table/helpers/wp-table-row-helpers.ts b/frontend/src/app/components/wp-fast-table/helpers/wp-table-row-helpers.ts index 4e36dbb60ad..d492c9825b1 100644 --- a/frontend/src/app/components/wp-fast-table/helpers/wp-table-row-helpers.ts +++ b/frontend/src/app/components/wp-fast-table/helpers/wp-table-row-helpers.ts @@ -1,7 +1,7 @@ /** * Return the row html id attribute for the given work package ID. */ -import {collapsedGroupClass} from "core-components/wp-fast-table/helpers/wp-table-hierarchy-helpers"; +import { collapsedGroupClass } from "core-components/wp-fast-table/helpers/wp-table-hierarchy-helpers"; export function rowId(workPackageId:string):string { return `wp-row-${workPackageId}-table`; @@ -51,11 +51,11 @@ export function scrollTableRowIntoView(workPackageId:string):void { const elemTop = element[0].offsetTop; const elemBottom = elemTop + element.height()!; - if (elemTop < containerTop) { - container[0].scrollTop = elemTop; - } else if (elemBottom > containerBottom) { - container[0].scrollTop = elemBottom - container.height()!; - } + if (elemTop < containerTop) { + container[0].scrollTop = elemTop; + } else if (elemBottom > containerBottom) { + container[0].scrollTop = elemBottom - container.height()!; + } } catch (e) { console.warn("Can't scroll row element into view: " + e); } diff --git a/frontend/src/app/components/wp-fast-table/wp-fast-table.ts b/frontend/src/app/components/wp-fast-table/wp-fast-table.ts index 437453b22bf..8fa5400e055 100644 --- a/frontend/src/app/components/wp-fast-table/wp-fast-table.ts +++ b/frontend/src/app/components/wp-fast-table/wp-fast-table.ts @@ -1,22 +1,22 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {IsolatedQuerySpace} from 'core-app/modules/work_packages/query-space/isolated-query-space'; -import {debugLog} from '../../helpers/debug_output'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {States} from '../states.service'; -import {WorkPackageTimelineTableController} from '../wp-table/timeline/container/wp-timeline-container.directive'; -import {GroupedRowsBuilder} from './builders/modes/grouped/grouped-rows-builder'; -import {HierarchyRowsBuilder} from './builders/modes/hierarchy/hierarchy-rows-builder'; -import {PlainRowsBuilder} from './builders/modes/plain/plain-rows-builder'; -import {RowsBuilder} from './builders/modes/rows-builder'; -import {PrimaryRenderPass} from './builders/primary-render-pass'; -import {WorkPackageTableEditingContext} from './wp-table-editing'; -import {WorkPackageTableRow} from './wp-table.interfaces'; -import {WorkPackageTableConfiguration} from 'core-app/components/wp-table/wp-table-configuration'; -import {RenderedWorkPackage} from 'core-app/modules/work_packages/render-info/rendered-work-package.type'; -import {InjectField} from 'core-app/helpers/angular/inject-field.decorator'; -import {APIV3Service} from 'core-app/modules/apiv3/api-v3.service'; -import {WorkPackageViewCollapsedGroupsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service'; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { IsolatedQuerySpace } from 'core-app/modules/work_packages/query-space/isolated-query-space'; +import { debugLog } from '../../helpers/debug_output'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { States } from '../states.service'; +import { WorkPackageTimelineTableController } from '../wp-table/timeline/container/wp-timeline-container.directive'; +import { GroupedRowsBuilder } from './builders/modes/grouped/grouped-rows-builder'; +import { HierarchyRowsBuilder } from './builders/modes/hierarchy/hierarchy-rows-builder'; +import { PlainRowsBuilder } from './builders/modes/plain/plain-rows-builder'; +import { RowsBuilder } from './builders/modes/rows-builder'; +import { PrimaryRenderPass } from './builders/primary-render-pass'; +import { WorkPackageTableEditingContext } from './wp-table-editing'; +import { WorkPackageTableRow } from './wp-table.interfaces'; +import { WorkPackageTableConfiguration } from 'core-app/components/wp-table/wp-table-configuration'; +import { RenderedWorkPackage } from 'core-app/modules/work_packages/render-info/rendered-work-package.type'; +import { InjectField } from 'core-app/helpers/angular/inject-field.decorator'; +import { APIV3Service } from 'core-app/modules/apiv3/api-v3.service'; +import { WorkPackageViewCollapsedGroupsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service'; export class WorkPackageTable { @@ -73,7 +73,7 @@ export class WorkPackageTable { private buildIndex(rows:WorkPackageResource[]) { this.originalRowIndex = {}; this.originalRows = rows.map((wp:WorkPackageResource, i:number) => { - let wpId = wp.id!; + const wpId = wp.id!; // Ensure we get the latest version wp = this.apiV3Service.work_packages.cache.current(wpId, wp)!; @@ -157,7 +157,7 @@ export class WorkPackageTable { * Perform the render pass * @param insert whether to insert the result (set to false for timeline) */ - private performRenderPass(insert:boolean = true) { + private performRenderPass(insert = true) { this.editing.reset(); const renderPass = this.lastRenderPass = this.rowBuilder.buildRows(); diff --git a/frontend/src/app/components/wp-fast-table/wp-table-editing.ts b/frontend/src/app/components/wp-fast-table/wp-table-editing.ts index 9f815393880..2c924e7ede7 100644 --- a/frontend/src/app/components/wp-fast-table/wp-table-editing.ts +++ b/frontend/src/app/components/wp-fast-table/wp-table-editing.ts @@ -1,11 +1,11 @@ -import {Injector} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackageTable} from 'core-components/wp-fast-table/wp-fast-table'; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {EditForm} from "core-app/modules/fields/edit/edit-form/edit-form"; -import {TableEditForm} from "core-components/wp-edit-form/table-edit-form"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackageTable } from 'core-components/wp-fast-table/wp-fast-table'; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { EditForm } from "core-app/modules/fields/edit/edit-form/edit-form"; +import { TableEditForm } from "core-components/wp-edit-form/table-edit-form"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class WorkPackageTableEditingContext { diff --git a/frontend/src/app/components/wp-fast-table/wp-table.interfaces.ts b/frontend/src/app/components/wp-fast-table/wp-table.interfaces.ts index 4aeb2e993ac..f9fb63c6fef 100644 --- a/frontend/src/app/components/wp-fast-table/wp-table.interfaces.ts +++ b/frontend/src/app/components/wp-fast-table/wp-table.interfaces.ts @@ -3,8 +3,8 @@ * May contain references to the current inserted row (if present) * or the group it belonged to when initially rendered. */ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {GroupObject} from 'core-app/modules/hal/resources/wp-collection-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { GroupObject } from 'core-app/modules/hal/resources/wp-collection-resource'; export interface WorkPackageTableRow { object:WorkPackageResource; diff --git a/frontend/src/app/components/wp-form-group/wp-attribute-group.component.ts b/frontend/src/app/components/wp-form-group/wp-attribute-group.component.ts index 99916600356..7b4f271d07a 100644 --- a/frontend/src/app/components/wp-form-group/wp-attribute-group.component.ts +++ b/frontend/src/app/components/wp-form-group/wp-attribute-group.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Injector, Input, AfterViewInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {FieldDescriptor, GroupDescriptor} from 'core-components/work-packages/wp-single-view/wp-single-view.component'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {fromEvent} from "rxjs"; -import {debounceTime} from "rxjs/operators"; +import { Component, Injector, Input, AfterViewInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { FieldDescriptor, GroupDescriptor } from 'core-components/work-packages/wp-single-view/wp-single-view.component'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { EditFormComponent } from "core-app/modules/fields/edit/edit-form/edit-form.component"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { fromEvent } from "rxjs"; +import { debounceTime } from "rxjs/operators"; @Component({ selector: 'wp-attribute-group', @@ -91,10 +91,10 @@ export class WorkPackageFormAttributeGroupComponent extends UntilDestroyedMixin private fixColumns() { let lastOffset = 0; // Find corresponding HTML of attribute fields for each group - let htmlAttributes = jQuery('div.attributes-group:contains(' + this.group.name + ')').find('.attributes-key-value'); + const htmlAttributes = jQuery('div.attributes-group:contains(' + this.group.name + ')').find('.attributes-key-value'); htmlAttributes.each(function() { - let offset = jQuery(this).position().top; + const offset = jQuery(this).position().top; if (offset < lastOffset) { // Fix position of the column start diff --git a/frontend/src/app/components/wp-grid/wp-grid.component.ts b/frontend/src/app/components/wp-grid/wp-grid.component.ts index cf69e15fb13..c7a9bef9e85 100644 --- a/frontend/src/app/components/wp-grid/wp-grid.component.ts +++ b/frontend/src/app/components/wp-grid/wp-grid.component.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output} from "@angular/core"; -import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; -import {CardViewOrientation} from "core-components/wp-card-view/wp-card-view.component"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {distinctUntilChanged, takeUntil} from "rxjs/operators"; -import {HighlightingMode} from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; -import {WorkPackageCardDragAndDropService} from "core-components/wp-card-view/services/wp-card-drag-and-drop.service"; -import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; -import {WorkPackageTableConfiguration} from "core-components/wp-table/wp-table-configuration"; -import {WorkPackageViewOutputs} from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output } from "@angular/core"; +import { WorkPackageViewHighlightingService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; +import { CardViewOrientation } from "core-components/wp-card-view/wp-card-view.component"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { distinctUntilChanged, takeUntil } from "rxjs/operators"; +import { HighlightingMode } from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { DragAndDropService } from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; +import { WorkPackageCardDragAndDropService } from "core-components/wp-card-view/services/wp-card-drag-and-drop.service"; +import { WorkPackagesListService } from "core-components/wp-list/wp-list.service"; +import { WorkPackageTableConfiguration } from "core-components/wp-table/wp-table-configuration"; +import { WorkPackageViewOutputs } from "core-app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry"; @Component({ selector: 'wp-grid', @@ -71,9 +71,9 @@ import {WorkPackageViewOutputs} from "core-app/modules/work_packages/routing/wp- }) export class WorkPackagesGridComponent implements WorkPackageViewOutputs { @Input() public configuration:WorkPackageTableConfiguration; - @Input() public showResizer:boolean = false; - @Input() public resizerClass:string = ''; - @Input() public resizerStorageKey:string = ''; + @Input() public showResizer = false; + @Input() public resizerClass = ''; + @Input() public resizerStorageKey = ''; @Output() selectionChanged = new EventEmitter(); @Output() itemClicked = new EventEmitter<{ workPackageId:string, double:boolean }>(); @@ -111,7 +111,7 @@ export class WorkPackagesGridComponent implements WorkPackageViewOutputs { } public switchToManualSorting() { - let query = this.querySpace.query.value; + const query = this.querySpace.query.value; if (query && this.wpTableSortBy.switchToManualSorting(query)) { this.wpList.save(query); } diff --git a/frontend/src/app/components/wp-inline-create/inline-create-row-builder.ts b/frontend/src/app/components/wp-inline-create/inline-create-row-builder.ts index e963485dd47..1c11092aef5 100644 --- a/frontend/src/app/components/wp-inline-create/inline-create-row-builder.ts +++ b/frontend/src/app/components/wp-inline-create/inline-create-row-builder.ts @@ -1,21 +1,21 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {States} from '../states.service'; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { States } from '../states.service'; import { commonRowClassName, SingleRowBuilder, tableRowClassName } from '../wp-fast-table/builders/rows/single-row-builder'; -import {rowId} from '../wp-fast-table/helpers/wp-table-row-helpers'; -import {WorkPackageTable} from '../wp-fast-table/wp-fast-table'; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {QueryColumn} from "core-components/wp-query/query-column"; -import {tdClassName} from "core-components/wp-fast-table/builders/cell-builder"; -import {internalContextMenuColumn} from "core-components/wp-fast-table/builders/internal-sort-columns"; -import {EditForm} from "core-app/modules/fields/edit/edit-form/edit-form"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { rowId } from '../wp-fast-table/helpers/wp-table-row-helpers'; +import { WorkPackageTable } from '../wp-fast-table/wp-fast-table'; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { QueryColumn } from "core-components/wp-query/query-column"; +import { tdClassName } from "core-components/wp-fast-table/builders/cell-builder"; +import { internalContextMenuColumn } from "core-components/wp-fast-table/builders/internal-sort-columns"; +import { EditForm } from "core-app/modules/fields/edit/edit-form/edit-form"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export const inlineCreateRowClassName = 'wp-inline-create-row'; export const inlineCreateCancelClassName = 'wp-table--cancel-create-link'; @@ -31,7 +31,7 @@ export class InlineCreateRowBuilder extends SingleRowBuilder { protected text:{ cancelButton:string }; constructor(public readonly injector:Injector, - workPackageTable:WorkPackageTable) { + workPackageTable:WorkPackageTable) { super(injector, workPackageTable); @@ -42,10 +42,10 @@ export class InlineCreateRowBuilder extends SingleRowBuilder { public buildCell(workPackage:WorkPackageResource, column:QueryColumn):HTMLElement|null { switch (column.id) { - case internalContextMenuColumn.id: - return this.buildCancelButton(); - default: - return super.buildCell(workPackage, column); + case internalContextMenuColumn.id: + return this.buildCancelButton(); + default: + return super.buildCell(workPackage, column); } } diff --git a/frontend/src/app/components/wp-inline-create/wp-inline-create.component.ts b/frontend/src/app/components/wp-inline-create/wp-inline-create.component.ts index d433279761d..c56641fc540 100644 --- a/frontend/src/app/components/wp-inline-create/wp-inline-create.component.ts +++ b/frontend/src/app/components/wp-inline-create/wp-inline-create.component.ts @@ -36,28 +36,28 @@ import { Input, OnInit } from '@angular/core'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {filter} from 'rxjs/operators'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {onClickOrEnter} from '../wp-fast-table/handlers/click-or-enter-handler'; -import {WorkPackageTable} from '../wp-fast-table/wp-fast-table'; -import {WorkPackageCreateService} from '../wp-new/wp-create.service'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { filter } from 'rxjs/operators'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { onClickOrEnter } from '../wp-fast-table/handlers/click-or-enter-handler'; +import { WorkPackageTable } from '../wp-fast-table/wp-fast-table'; +import { WorkPackageCreateService } from '../wp-new/wp-create.service'; import { inlineCreateCancelClassName, InlineCreateRowBuilder, inlineCreateRowClassName } from './inline-create-row-builder'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {Subscription} from 'rxjs'; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {EditForm} from "core-app/modules/fields/edit/edit-form/edit-form"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { Subscription } from 'rxjs'; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { EditForm } from "core-app/modules/fields/edit/edit-form/edit-form"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; @Component({ selector: '[wpInlineCreate]', @@ -69,13 +69,13 @@ export class WorkPackageInlineCreateComponent extends UntilDestroyedMixin implem @Input('wp-inline-create--project-identifier') projectIdentifier:string; // inner state - public canAdd:boolean = false; - public canReference:boolean = false; + public canAdd = false; + public canReference = false; // Inline create / reference row is active public mode:'inactive'|'create'|'reference' = 'inactive'; - public focus:boolean = false; + public focus = false; public text = this.wpInlineCreate.buttonTexts; diff --git a/frontend/src/app/components/wp-inline-create/wp-inline-create.service.ts b/frontend/src/app/components/wp-inline-create/wp-inline-create.service.ts index 8c300e43fe4..fef976ccb8d 100644 --- a/frontend/src/app/components/wp-inline-create/wp-inline-create.service.ts +++ b/frontend/src/app/components/wp-inline-create/wp-inline-create.service.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector, OnDestroy} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {Subject} from "rxjs"; -import {ComponentType} from "@angular/cdk/portal"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {AuthorisationService} from "core-app/modules/common/model-auth/model-auth.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injectable, Injector, OnDestroy } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { Subject } from "rxjs"; +import { ComponentType } from "@angular/cdk/portal"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { AuthorisationService } from "core-app/modules/common/model-auth/model-auth.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; @Injectable() export class WorkPackageInlineCreateService implements OnDestroy { diff --git a/frontend/src/app/components/wp-list/wp-list-checksum.service.ts b/frontend/src/app/components/wp-list/wp-list-checksum.service.ts index 087fc1b24f4..8d7b6278d23 100644 --- a/frontend/src/app/components/wp-list/wp-list-checksum.service.ts +++ b/frontend/src/app/components/wp-list/wp-list-checksum.service.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {StateService, TransitionPromise} from '@uirouter/core'; -import {UrlParamsHelperService} from 'core-components/wp-query/url-params-helper'; -import {Injectable} from '@angular/core'; -import {WorkPackageViewPagination} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { StateService, TransitionPromise } from '@uirouter/core'; +import { UrlParamsHelperService } from 'core-components/wp-query/url-params-helper'; +import { Injectable } from '@angular/core'; +import { WorkPackageViewPagination } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination"; @Injectable() export class WorkPackagesListChecksumService { @@ -43,9 +43,9 @@ export class WorkPackagesListChecksumService { public visibleChecksum:string|null; public updateIfDifferent(query:QueryResource, - pagination:WorkPackageViewPagination):Promise { + pagination:WorkPackageViewPagination):Promise { - let newQueryChecksum = this.getNewChecksum(query, pagination); + const newQueryChecksum = this.getNewChecksum(query, pagination); let routePromise:Promise = Promise.resolve(); if (this.isUninitialized()) { @@ -64,7 +64,7 @@ export class WorkPackagesListChecksumService { } public update(query:QueryResource, pagination:WorkPackageViewPagination) { - let newQueryChecksum = this.getNewChecksum(query, pagination); + const newQueryChecksum = this.getNewChecksum(query, pagination); this.set(query.id, newQueryChecksum); @@ -72,7 +72,7 @@ export class WorkPackagesListChecksumService { } public setToQuery(query:QueryResource, pagination:WorkPackageViewPagination) { - let newQueryChecksum = this.getNewChecksum(query, pagination); + const newQueryChecksum = this.getNewChecksum(query, pagination); this.set(query.id, newQueryChecksum); @@ -80,15 +80,15 @@ export class WorkPackagesListChecksumService { } public isQueryOutdated(query:QueryResource, - pagination:WorkPackageViewPagination) { - let newQueryChecksum = this.getNewChecksum(query, pagination); + pagination:WorkPackageViewPagination) { + const newQueryChecksum = this.getNewChecksum(query, pagination); return this.isOutdated(query.id, newQueryChecksum); } public executeIfOutdated(newId:string, - newChecksum:string|null, - callback:Function) { + newChecksum:string|null, + callback:Function) { if (this.isUninitialized() || this.isOutdated(newId, newChecksum)) { this.set(newId, newChecksum); diff --git a/frontend/src/app/components/wp-list/wp-list-invalid-query.service.ts b/frontend/src/app/components/wp-list/wp-list-invalid-query.service.ts index f9a8373bb77..8d43c032c5a 100644 --- a/frontend/src/app/components/wp-list/wp-list-invalid-query.service.ts +++ b/frontend/src/app/components/wp-list/wp-list-invalid-query.service.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {QueryFormResource} from 'core-app/modules/hal/resources/query-form-resource'; -import {QuerySortByResource} from 'core-app/modules/hal/resources/query-sort-by-resource'; -import {QueryGroupByResource} from 'core-app/modules/hal/resources/query-group-by-resource'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; -import {QueryFilterResource} from 'core-app/modules/hal/resources/query-filter-resource'; -import {QueryFilterInstanceSchemaResource} from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; -import {QueryColumn} from '../wp-query/query-column'; -import {Injectable} from '@angular/core'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { QueryFormResource } from 'core-app/modules/hal/resources/query-form-resource'; +import { QuerySortByResource } from 'core-app/modules/hal/resources/query-sort-by-resource'; +import { QueryGroupByResource } from 'core-app/modules/hal/resources/query-group-by-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; +import { QueryFilterResource } from 'core-app/modules/hal/resources/query-filter-resource'; +import { QueryFilterInstanceSchemaResource } from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; +import { QueryColumn } from '../wp-query/query-column'; +import { Injectable } from '@angular/core'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; @Injectable() export class WorkPackagesListInvalidQueryService { @@ -52,7 +52,7 @@ export class WorkPackagesListInvalidQueryService { private restoreFilters(query:QueryResource, payload:QueryResource, querySchema:SchemaResource) { let filters = _.map((payload.filters), filter => { - let filterInstanceSchema = _.find(querySchema.filtersSchemas.elements, (schema:QueryFilterInstanceSchemaResource) => { + const filterInstanceSchema = _.find(querySchema.filtersSchemas.elements, (schema:QueryFilterInstanceSchemaResource) => { return (schema.filter.allowedValues as QueryFilterResource[])[0].$href === filter.filter.$href; }); @@ -60,9 +60,9 @@ export class WorkPackagesListInvalidQueryService { return null; } - let recreatedFilter = filterInstanceSchema.getFilter(); + const recreatedFilter = filterInstanceSchema.getFilter(); - let operator = _.find(filterInstanceSchema.operator.allowedValues, operator => { + const operator = _.find(filterInstanceSchema.operator.allowedValues, operator => { return operator.$href === filter.operator.$href; }); @@ -110,7 +110,7 @@ export class WorkPackagesListInvalidQueryService { } private restoreGroupBy(query:QueryResource, stubQuery:QueryResource, schema:SchemaResource) { - let groupBy = _.find((schema.groupBy.allowedValues as QueryGroupByResource[]), candidate => { + const groupBy = _.find((schema.groupBy.allowedValues as QueryGroupByResource[]), candidate => { return stubQuery.groupBy && stubQuery.groupBy.$href === candidate.$href; }) as any; diff --git a/frontend/src/app/components/wp-list/wp-list.service.ts b/frontend/src/app/components/wp-list/wp-list.service.ts index 3dbc7885116..c17d1f5d479 100644 --- a/frontend/src/app/components/wp-list/wp-list.service.ts +++ b/frontend/src/app/components/wp-list/wp-list.service.ts @@ -26,32 +26,32 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {QueryFormResource} from 'core-app/modules/hal/resources/query-form-resource'; -import {States} from '../states.service'; -import {ErrorResource} from 'core-app/modules/hal/resources/error-resource'; -import {WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {WorkPackagesListInvalidQueryService} from './wp-list-invalid-query.service'; -import {WorkPackageStatesInitializationService} from './wp-states-initialization.service'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {StateService} from '@uirouter/core'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Injectable} from '@angular/core'; -import {UrlParamsHelperService} from 'core-components/wp-query/url-params-helper'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {from, Observable, of} from 'rxjs'; -import {input} from "reactivestates"; -import {catchError, mergeMap, share, switchMap, take} from "rxjs/operators"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { QueryFormResource } from 'core-app/modules/hal/resources/query-form-resource'; +import { States } from '../states.service'; +import { ErrorResource } from 'core-app/modules/hal/resources/error-resource'; +import { WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { WorkPackagesListInvalidQueryService } from './wp-list-invalid-query.service'; +import { WorkPackageStatesInitializationService } from './wp-states-initialization.service'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { StateService } from '@uirouter/core'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable } from '@angular/core'; +import { UrlParamsHelperService } from 'core-components/wp-query/url-params-helper'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { from, Observable, of } from 'rxjs'; +import { input } from "reactivestates"; +import { catchError, mergeMap, share, switchMap, take } from "rxjs/operators"; import { PaginationUpdateObject, WorkPackageViewPaginationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; -import {PaginationService} from "core-components/table-pagination/pagination-service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {APIv3QueriesPaths} from "core-app/modules/apiv3/endpoints/queries/apiv3-queries-paths"; -import {APIv3QueryPaths} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-paths"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; +import { PaginationService } from "core-components/table-pagination/pagination-service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { APIv3QueriesPaths } from "core-app/modules/apiv3/endpoints/queries/apiv3-queries-paths"; +import { APIv3QueryPaths } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-paths"; export interface QueryDefinition { queryParams:{ query_id?:string, query_props?:string }; @@ -111,7 +111,7 @@ export class WorkPackagesListService { * @param queryParams * @param projectIdentifier */ - private streamQueryRequest(queryParams:{ query_id?:string, query_props?:string }, projectIdentifier ?:string):Observable { + private streamQueryRequest(queryParams:{ query_id?:string, query_props?:string }, projectIdentifier?:string):Observable { const decodedProps = this.getCurrentQueryProps(queryParams); const queryData = this.UrlParamsHelper.buildV3GetQueryFromJsonParams(decodedProps); const stream = this @@ -132,7 +132,7 @@ export class WorkPackagesListService { * Load a query. * The query is either a persisted query, identified by the query_id parameter, or the default query. Both will be modified by the parameters in the query_props parameter. */ - public fromQueryParams(queryParams:{ query_id?:string, query_props?:string }, projectIdentifier ?:string):Observable { + public fromQueryParams(queryParams:{ query_id?:string, query_props?:string }, projectIdentifier?:string):Observable { this.queryRequests.clear(); this.queryRequests.putValue({ queryParams: queryParams, projectIdentifier: projectIdentifier }); @@ -147,7 +147,7 @@ export class WorkPackagesListService { * Get the current decoded query props, if any */ public getCurrentQueryProps(params:{ query_props?:string }):string|null { - if (!!params.query_props) { + if (params.query_props) { return decodeURIComponent(params.query_props); } @@ -157,7 +157,7 @@ export class WorkPackagesListService { /** * Load the default query. */ - public loadDefaultQuery(projectIdentifier ?:string):Promise { + public loadDefaultQuery(projectIdentifier?:string):Promise { return this.fromQueryParams({}, projectIdentifier).toPromise(); } @@ -231,11 +231,11 @@ export class WorkPackagesListService { * After the update, the new query is reloaded (e.g. for the work packages) */ public create(query:QueryResource, name:string):Promise { - let form = this.querySpace.queryForm.value!; + const form = this.querySpace.queryForm.value!; query.name = name; - let promise = this + const promise = this .apiV3Service .queries .post(query, form) @@ -260,9 +260,9 @@ export class WorkPackagesListService { * Destroy the current query. */ public delete() { - let query = this.currentQuery; + const query = this.currentQuery; - let promise = this + const promise = this .apiV3Service .queries .id(query) @@ -290,9 +290,9 @@ export class WorkPackagesListService { public save(query?:QueryResource) { query = query || this.currentQuery; - let form = this.querySpace.queryForm.value!; + const form = this.querySpace.queryForm.value!; - let promise = this + const promise = this .apiV3Service .queries .id(query) @@ -314,7 +314,7 @@ export class WorkPackagesListService { } public toggleStarred(query:QueryResource):Promise { - let promise = this + const promise = this .apiV3Service .queries .toggleStarred(query); @@ -335,7 +335,7 @@ export class WorkPackagesListService { } private conditionallyLoadForm(query:QueryResource):void { - let currentForm = this.querySpace.queryForm.value; + const currentForm = this.querySpace.queryForm.value; if (!currentForm || query.$links.update.$href !== currentForm.$href) { setTimeout(() => this.loadForm(query), 0); @@ -370,7 +370,7 @@ export class WorkPackagesListService { this .apiV3Service .queries - .find({ pageSize: 0}, undefined, projectIdentifier) + .find({ pageSize: 0 }, undefined, projectIdentifier) .toPromise() .then((query:QueryResource) => { this.wpListInvalidQueryService.restoreQuery(query, form); diff --git a/frontend/src/app/components/wp-list/wp-states-initialization.service.ts b/frontend/src/app/components/wp-list/wp-states-initialization.service.ts index 2515ee920d0..af2f2ce3b38 100644 --- a/frontend/src/app/components/wp-list/wp-states-initialization.service.ts +++ b/frontend/src/app/components/wp-list/wp-states-initialization.service.ts @@ -1,29 +1,29 @@ -import {States} from '../states.service'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; -import {QueryFormResource} from 'core-app/modules/hal/resources/query-form-resource'; -import {WorkPackagesListChecksumService} from './wp-list-checksum.service'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Injectable} from '@angular/core'; -import {QuerySchemaResource} from 'core-app/modules/hal/resources/query-schema-resource'; -import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; -import {take} from "rxjs/operators"; -import {WorkPackageViewOrderService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; -import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {WorkPackageViewSumService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {WorkPackageViewAdditionalElementsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageViewPaginationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {WorkPackageViewGroupByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {WorkPackageViewRelationColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {WorkPackageViewCollapsedGroupsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service"; +import { States } from '../states.service'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; +import { QueryFormResource } from 'core-app/modules/hal/resources/query-form-resource'; +import { WorkPackagesListChecksumService } from './wp-list-checksum.service'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable } from '@angular/core'; +import { QuerySchemaResource } from 'core-app/modules/hal/resources/query-schema-resource'; +import { WorkPackageViewHighlightingService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; +import { take } from "rxjs/operators"; +import { WorkPackageViewOrderService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; +import { WorkPackageViewDisplayRepresentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; +import { WorkPackageViewSumService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { WorkPackageViewAdditionalElementsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageViewPaginationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageViewGroupByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { WorkPackageViewRelationColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageViewCollapsedGroupsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service"; @Injectable() export class WorkPackageStatesInitializationService { @@ -76,7 +76,7 @@ export class WorkPackageStatesInitializationService { * @param form */ public updateStatesFromForm(query:QueryResource, form:QueryFormResource) { - let schema:QuerySchemaResource = form.schema as any; + const schema:QuerySchemaResource = form.schema as any; _.each(schema.filtersSchemas.elements, (schema) => { this.states.schemas.get(schema.$href as string).putValue(schema as any); diff --git a/frontend/src/app/components/wp-new/wp-create.component.ts b/frontend/src/app/components/wp-new/wp-create.component.ts index 9f7ffec9e48..783bf1e7f2c 100644 --- a/frontend/src/app/components/wp-new/wp-create.component.ts +++ b/frontend/src/app/components/wp-new/wp-create.component.ts @@ -26,26 +26,26 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Directive, Injector, OnInit, ViewChild} from '@angular/core'; -import {StateService, Transition} from '@uirouter/core'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {States} from '../states.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {RootResource} from 'core-app/modules/hal/resources/root-resource'; -import {WorkPackageCreateService} from './wp-create.service'; -import {takeWhile} from 'rxjs/operators'; -import {OpTitleService} from 'core-components/html/op-title.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {WorkPackageViewFocusService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; -import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { ChangeDetectorRef, Directive, Injector, OnInit, ViewChild } from '@angular/core'; +import { StateService, Transition } from '@uirouter/core'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { States } from '../states.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { RootResource } from 'core-app/modules/hal/resources/root-resource'; +import { WorkPackageCreateService } from './wp-create.service'; +import { takeWhile } from 'rxjs/operators'; +import { OpTitleService } from 'core-components/html/op-title.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { WorkPackageViewFocusService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; +import { EditFormComponent } from "core-app/modules/fields/edit/edit-form/edit-form.component"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; import * as URI from 'urijs'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {splitViewRoute} from "core-app/modules/work_packages/routing/split-view-routes.helper"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {HalSource, HalSourceLinks} from "core-app/modules/hal/resources/hal-resource"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { splitViewRoute } from "core-app/modules/work_packages/routing/split-view-routes.helper"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { HalSource, HalSourceLinks } from "core-app/modules/hal/resources/hal-resource"; @Directive() export class WorkPackageCreateComponent extends UntilDestroyedMixin implements OnInit { @@ -99,7 +99,7 @@ export class WorkPackageCreateComponent extends UntilDestroyedMixin implements O } public onSaved(params:{ savedResource:WorkPackageResource, isInitial:boolean }) { - let { savedResource, isInitial } = params; + const { savedResource, isInitial } = params; this.editForm?.cancel(false); @@ -150,7 +150,7 @@ export class WorkPackageCreateComponent extends UntilDestroyedMixin implements O this.apiV3Service.root.get().subscribe((root:RootResource) => { if (!root.user) { // Not logged in - let url = URI(this.pathHelper.loginPath()); + const url = URI(this.pathHelper.loginPath()); url.search({ back_url: url }); window.location.href = url.toString(); } @@ -170,7 +170,7 @@ export class WorkPackageCreateComponent extends UntilDestroyedMixin implements O } protected createdWorkPackage() { - let defaults:HalSource = { + const defaults:HalSource = { _links: {} }; diff --git a/frontend/src/app/components/wp-new/wp-create.service.ts b/frontend/src/app/components/wp-new/wp-create.service.ts index 2878f0f5f5a..317894e8f5b 100644 --- a/frontend/src/app/components/wp-new/wp-create.service.ts +++ b/frontend/src/app/components/wp-new/wp-create.service.ts @@ -26,27 +26,27 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {Observable, Subject} from 'rxjs'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {HookService} from 'core-app/modules/plugins/hook-service'; -import {WorkPackageFilterValues} from "core-components/wp-edit-form/work-package-filter-values"; +import { Injectable, Injector } from '@angular/core'; +import { Observable, Subject } from 'rxjs'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { HookService } from 'core-app/modules/plugins/hook-service'; +import { WorkPackageFilterValues } from "core-components/wp-edit-form/work-package-filter-values"; import { HalResourceEditingService, ResourceChangesetCommit } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {filter} from "rxjs/operators"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {FormResource} from "core-app/modules/hal/resources/form-resource"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {AuthorisationService} from "core-app/modules/common/model-auth/model-auth.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {HalResource, HalSource, HalSourceLink} from "core-app/modules/hal/resources/hal-resource"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { filter } from "rxjs/operators"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { FormResource } from "core-app/modules/hal/resources/form-resource"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { AuthorisationService } from "core-app/modules/common/model-auth/model-auth.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { HalResource, HalSource, HalSourceLink } from "core-app/modules/hal/resources/hal-resource"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; export const newWorkPackageHref = '/api/v3/work_packages/new'; @@ -112,7 +112,7 @@ export class WorkPackageCreateService extends UntilDestroyedMixin { } public fromCreateForm(form:FormResource):WorkPackageChangeset { - let wp = this.initializeNewResource(form); + const wp = this.initializeNewResource(form); const change = this.halEditing.edit(wp, form); @@ -123,7 +123,7 @@ export class WorkPackageCreateService extends UntilDestroyedMixin { } public copyWorkPackage(copyFrom:WorkPackageChangeset) { - let request = copyFrom.pristineResource.$source; + const request = copyFrom.pristineResource.$source; // Ideally we would make an empty request before to get the create schema (cannot use the update schema of the source changeset) // to get all the writable attributes and only send those. @@ -135,10 +135,10 @@ export class WorkPackageCreateService extends UntilDestroyedMixin { .post(request) .toPromise() .then((form:FormResource) => { - let changeset = this.fromCreateForm(form); + const changeset = this.fromCreateForm(form); - return changeset; - }); + return changeset; + }); } /** @@ -146,7 +146,7 @@ export class WorkPackageCreateService extends UntilDestroyedMixin { * @param form Work Package create form */ private copyFrom(form:FormResource) { - let wp = this.initializeNewResource(form); + const wp = this.initializeNewResource(form); return this.halEditing.edit(wp, form); } @@ -254,7 +254,7 @@ export class WorkPackageCreateService extends UntilDestroyedMixin { return change; }); - }); + }); } /** @@ -269,13 +269,13 @@ export class WorkPackageCreateService extends UntilDestroyedMixin { private defaultsFromFilters(object:HalSource|WorkPackageChangeset, defaults?:HalSource) { // Not using WorkPackageViewFiltersService here as the embedded table does not load the form // which will result in that service having empty current filters. - let query = this.querySpace.query.value; + const query = this.querySpace.query.value; if (query) { const except:string[] = defaults?._links && defaults._links['type'] ? ['type'] : []; new WorkPackageFilterValues(this.injector, query.filters, except) - .applyDefaultsFromFilters(object); + .applyDefaultsFromFilters(object); } } @@ -312,19 +312,19 @@ export class WorkPackageCreateService extends UntilDestroyedMixin { } private toApiPayload(payload:HalSource, schema:SchemaResource) { - let links:string[] = []; + const links:string[] = []; Object.keys(schema.$source).forEach(attribute => { if (!['Integer', - 'Float', - 'Date', - 'DateTime', - 'Duration', - 'Formattable', - 'Boolean', - 'String', - 'Text', - undefined].includes(schema.$source[attribute].type)) { + 'Float', + 'Date', + 'DateTime', + 'Duration', + 'Formattable', + 'Boolean', + 'String', + 'Text', + undefined].includes(schema.$source[attribute].type)) { links.push(attribute); } }); @@ -349,12 +349,12 @@ export class WorkPackageCreateService extends UntilDestroyedMixin { * @param form */ private initializeNewResource(form:FormResource) { - let payload = form.payload.$plain(); + const payload = form.payload.$plain(); // maintain the reference to the schema payload['_links']['schema'] = { href: 'new' }; - let wp = this.halResourceService.createHalResourceOfType('WorkPackage', payload); + const wp = this.halResourceService.createHalResourceOfType('WorkPackage', payload); wp.$source.id = 'new'; diff --git a/frontend/src/app/components/wp-new/wp-new-full-view.component.ts b/frontend/src/app/components/wp-new/wp-new-full-view.component.ts index 21ed300ed00..4db81001ea8 100644 --- a/frontend/src/app/components/wp-new/wp-new-full-view.component.ts +++ b/frontend/src/app/components/wp-new/wp-new-full-view.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageCreateComponent} from 'core-components/wp-new/wp-create.component'; -import {ChangeDetectionStrategy, Component} from '@angular/core'; +import { WorkPackageCreateComponent } from 'core-components/wp-new/wp-create.component'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; @Component({ selector: 'wp-new-full-view', @@ -36,5 +36,5 @@ import {ChangeDetectionStrategy, Component} from '@angular/core'; changeDetection: ChangeDetectionStrategy.OnPush }) export class WorkPackageNewFullViewComponent extends WorkPackageCreateComponent { - public successState:string = 'work-packages.show'; + public successState = 'work-packages.show'; } diff --git a/frontend/src/app/components/wp-new/wp-new-split-view.component.ts b/frontend/src/app/components/wp-new/wp-new-split-view.component.ts index aaa19a8bc01..2ab05735d9a 100644 --- a/frontend/src/app/components/wp-new/wp-new-split-view.component.ts +++ b/frontend/src/app/components/wp-new/wp-new-split-view.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageCreateComponent} from 'core-components/wp-new/wp-create.component'; -import {ChangeDetectionStrategy, Component} from '@angular/core'; +import { WorkPackageCreateComponent } from 'core-components/wp-new/wp-create.component'; +import { ChangeDetectionStrategy, Component } from '@angular/core'; @Component({ selector: 'wp-new-split-view', diff --git a/frontend/src/app/components/wp-query-select/wp-query-select-dropdown.component.ts b/frontend/src/app/components/wp-query-select/wp-query-select-dropdown.component.ts index 0ed73e342f6..9e2c0a4ae19 100644 --- a/frontend/src/app/components/wp-query-select/wp-query-select-dropdown.component.ts +++ b/frontend/src/app/components/wp-query-select/wp-query-select-dropdown.component.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {States} from '../states.service'; -import {StateService, TransitionService} from '@uirouter/core'; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild} from "@angular/core"; -import {LoadingIndicatorService} from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {WorkPackageStaticQueriesService} from 'core-components/wp-query-select/wp-static-queries.service'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {LinkHandling} from "core-app/modules/common/link-handling/link-handling"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {MainMenuToggleService} from "core-components/main-menu/main-menu-toggle.service"; -import {MainMenuNavigationService} from "core-components/main-menu/main-menu-navigation.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { States } from '../states.service'; +import { StateService, TransitionService } from '@uirouter/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild } from "@angular/core"; +import { LoadingIndicatorService } from "core-app/modules/common/loading-indicator/loading-indicator.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { WorkPackageStaticQueriesService } from 'core-components/wp-query-select/wp-static-queries.service'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { LinkHandling } from "core-app/modules/common/link-handling/link-handling"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { MainMenuToggleService } from "core-components/main-menu/main-menu-toggle.service"; +import { MainMenuNavigationService } from "core-components/main-menu/main-menu-navigation.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export type QueryCategory = 'starred'|'public'|'private'|'default'; @@ -157,7 +157,7 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin } private transformQueries(collection:CollectionResource) { - let loadedQueries:IAutocompleteItem[] = collection.elements + const loadedQueries:IAutocompleteItem[] = collection.elements .map(query => { return { label: query.name, query: query, query_props: null }; }); @@ -171,7 +171,7 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin // Sort every category array alphabetically, except the default queries private sortQueries(items:IAutocompleteItem[]):IAutocompleteItem[] { // Concat all categories in the right order - let categorized:{ [category:string]:IAutocompleteItem[] } = { + const categorized:{ [category:string]:IAutocompleteItem[] } = { // Starred / favored starred: [], // default @@ -235,7 +235,7 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin // To search an empty string would expand all categories again every time // Remember all previously hidden categories and set them again after updating the menu _.each(this.hiddenCategories, category => { - let thisCategory:string = jQuery(category).attr("category")!; + const thisCategory:string = jQuery(category).attr("category")!; this.expandCollapseCategory(thisCategory); }); @@ -307,7 +307,7 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin } private defineJQueryQueryComplete() { - let thisComponent = this; + const thisComponent = this; jQuery.widget('custom.querycomplete', jQuery.ui.autocomplete, { _create: function (this:any) { @@ -340,7 +340,7 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin // Check if item has same category as previous item and if not insert a new category label in the list if (option.category !== currentCategory) { currentCategory = option.category!; - let label = thisComponent.labelFunction(currentCategory); + const label = thisComponent.labelFunction(currentCategory); ul.append(``); jQuery('
  • ') @@ -356,7 +356,7 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin // Scroll to selected element if search is empty if (thisComponent.searchInput.val() === '') { - let selected = thisComponent.queryResultsContainer.find('.collapsible-menu--item.selected'); + const selected = thisComponent.queryResultsContainer.find('.collapsible-menu--item.selected'); if (selected.length > 0) { setTimeout(() => selected[0].scrollIntoView({ behavior: 'auto', block: 'center' }), 20); } @@ -372,8 +372,8 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin const params = this.getQueryParams(item); const currentId = this.$state.params.query_id; const currentProps = this.$state.params.query_props; - let onWorkPackagesPage:boolean = this.$state.includes('work-packages'); - let onWorkPackagesReportPage:boolean = jQuery('body').hasClass('controller-work_packages/reports'); + const onWorkPackagesPage:boolean = this.$state.includes('work-packages'); + const onWorkPackagesReportPage:boolean = jQuery('body').hasClass('controller-work_packages/reports'); // When the current ID is selected const currentIdSelected = params.query_id && (currentId || '').toString() === params.query_id.toString(); @@ -394,16 +394,16 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin private labelFunction(category:QueryCategory):string { switch (category) { - case 'starred': - return this.text.scope_starred; - case 'public': - return this.text.scope_global; - case 'private': - return this.text.scope_private; - case 'default': - return this.text.scope_default; - default: - return ''; + case 'starred': + return this.text.scope_starred; + case 'public': + return this.text.scope_global; + case 'private': + return this.text.scope_private; + case 'default': + return this.text.scope_default; + default: + return ''; } } @@ -441,7 +441,7 @@ export class WorkPackageQuerySelectDropdownComponent extends UntilDestroyedMixin } private getQueryParams(item:IAutocompleteItem) { - let val:{ query_id:string|null, query_props:string|null, projects?:string, projectPath?:string } = { + const val:{ query_id:string|null, query_props:string|null, projects?:string, projectPath?:string } = { query_id: item.query ? _.toString(item.query.id) : null, query_props: item.query ? null : item.query_props, }; diff --git a/frontend/src/app/components/wp-query-select/wp-static-queries.service.ts b/frontend/src/app/components/wp-query-select/wp-static-queries.service.ts index 77f69cd6d5a..f89e300e834 100644 --- a/frontend/src/app/components/wp-query-select/wp-static-queries.service.ts +++ b/frontend/src/app/components/wp-query-select/wp-static-queries.service.ts @@ -25,14 +25,14 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {IAutocompleteItem} from 'core-components/wp-query-select/wp-query-select-dropdown.component'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Injectable} from '@angular/core'; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {StateService} from "@uirouter/core"; -import {CurrentUserService} from "core-components/user/current-user.service"; +import { IAutocompleteItem } from 'core-components/wp-query-select/wp-query-select-dropdown.component'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Injectable } from '@angular/core'; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { StateService } from "@uirouter/core"; +import { CurrentUserService } from "core-components/user/current-user.service"; @Injectable() export class WorkPackageStaticQueriesService { @@ -115,10 +115,10 @@ export class WorkPackageStaticQueriesService { public getStaticName(query:QueryResource) { if (this.$state.params.query_props) { - let queryProps = JSON.parse(this.$state.params.query_props); + const queryProps = JSON.parse(this.$state.params.query_props); delete queryProps.pp; delete queryProps.pa; - let queryPropsString = JSON.stringify(queryProps); + const queryPropsString = JSON.stringify(queryProps); const matched = this.all.find( item => item.query_props && item.query_props === queryPropsString diff --git a/frontend/src/app/components/wp-query/query-column.ts b/frontend/src/app/components/wp-query/query-column.ts index 4c8031797cd..cfd35fb9fc1 100644 --- a/frontend/src/app/components/wp-query/query-column.ts +++ b/frontend/src/app/components/wp-query/query-column.ts @@ -1,5 +1,5 @@ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export const queryColumnTypes = { PROPERTY: 'QueryColumn::Property', RELATION_OF_TYPE: 'QueryColumn::RelationOfType', @@ -18,19 +18,19 @@ export interface QueryColumn extends HalResource { id:string; name:string; custom_field?:any; - _links?: { + _links?:{ self:{ href:string, title:string }; }; } export interface TypeRelationQueryColumn extends QueryColumn { - type:{ href: string, name:string }, - _links?: { + type:{ href:string, name:string }, + _links?:{ self:{ href:string, title:string }, type:{ href:string, title:string } } } export interface RelationQueryColumn extends QueryColumn { - relationType: string; + relationType:string; } diff --git a/frontend/src/app/components/wp-query/query-filters.service.ts b/frontend/src/app/components/wp-query/query-filters.service.ts index 3eb2613c038..62eacd94b89 100644 --- a/frontend/src/app/components/wp-query/query-filters.service.ts +++ b/frontend/src/app/components/wp-query/query-filters.service.ts @@ -1,13 +1,13 @@ -import {Injectable} from "@angular/core"; -import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource"; +import { Injectable } from "@angular/core"; +import { QueryFormResource } from "core-app/modules/hal/resources/query-form-resource"; import { QueryFilterInstanceSchemaResource, QueryFilterInstanceSchemaResourceLinks } from "core-app/modules/hal/resources/query-filter-instance-schema-resource"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {QueryFilterInstanceResource} from "core-app/modules/hal/resources/query-filter-instance-resource"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { QueryFilterInstanceResource } from "core-app/modules/hal/resources/query-filter-instance-resource"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; @Injectable() export class QueryFiltersService { @@ -31,7 +31,7 @@ export class QueryFiltersService { */ public mapSchemasIntoFilters(query:QueryResource, form:QueryFormResource) { query.filters.forEach(filter => { - let schema = this.getFilterSchema(filter, form)!; + const schema = this.getFilterSchema(filter, form)!; filter.$links.schema = schema.$links.self; this.schemaCache.update(filter, schema); }); diff --git a/frontend/src/app/components/wp-query/query-param-listener.service.ts b/frontend/src/app/components/wp-query/query-param-listener.service.ts index 4e6546362f5..05eb60aa74a 100644 --- a/frontend/src/app/components/wp-query/query-param-listener.service.ts +++ b/frontend/src/app/components/wp-query/query-param-listener.service.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {WorkPackagesListChecksumService} from "core-components/wp-list/wp-list-checksum.service"; -import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; -import {TransitionService} from "@uirouter/core"; -import {Subject} from "rxjs"; +import { Injectable, Injector } from '@angular/core'; +import { WorkPackagesListChecksumService } from "core-components/wp-list/wp-list-checksum.service"; +import { WorkPackagesListService } from "core-components/wp-list/wp-list.service"; +import { TransitionService } from "@uirouter/core"; +import { Subject } from "rxjs"; @Injectable() export class QueryParamListenerService { @@ -48,11 +48,11 @@ export class QueryParamListenerService { public listenForQueryParamsChanged():any { // Listen for param changes return this.queryChangeListener = this.$transitions.onSuccess({}, (transition):any => { - let options = transition.options(); + const options = transition.options(); const params = transition.params('to'); - let newChecksum = this.wpListService.getCurrentQueryProps(params); - let newId:string = params.query_id ? params.query_id.toString() : null; + const newChecksum = this.wpListService.getCurrentQueryProps(params); + const newId:string = params.query_id ? params.query_id.toString() : null; // Avoid performing any changes when we're going to reload if (options.reload || (options.custom && options.custom.notify === false)) { diff --git a/frontend/src/app/components/wp-query/url-params-helper.spec.ts b/frontend/src/app/components/wp-query/url-params-helper.spec.ts index 819ff359b2f..3ffc93cdbc9 100644 --- a/frontend/src/app/components/wp-query/url-params-helper.spec.ts +++ b/frontend/src/app/components/wp-query/url-params-helper.spec.ts @@ -28,14 +28,14 @@ /*jshint expr: true*/ -import {UrlParamsHelperService} from 'core-components/wp-query/url-params-helper'; +import { UrlParamsHelperService } from 'core-components/wp-query/url-params-helper'; describe('UrlParamsHelper', function() { const paginationStub = { getPerPage: () => 20 } as any; - let UrlParamsHelper = new UrlParamsHelperService(paginationStub); + const UrlParamsHelper = new UrlParamsHelperService(paginationStub); let queryString; describe('buildQueryString', function() { @@ -63,7 +63,7 @@ describe('UrlParamsHelper', function() { let additional:any; beforeEach(function() { - let filter1 = { + const filter1 = { id: 'soße', name: 'soße_id', type: 'list_model', @@ -75,7 +75,7 @@ describe('UrlParamsHelper', function() { }, values: ['knoblauch'] }; - let filter2 = { + const filter2 = { id: 'created_at', type: 'datetime_past', operator: { @@ -107,12 +107,12 @@ describe('UrlParamsHelper', function() { additional = { page: 10, perPage: 100 - } + }; }); it('should encode query to params JSON', function() { - let encodedJSON = UrlParamsHelper.encodeQueryJsonParams(query, additional); - let expectedJSON = "{\"c\":[\"type\",\"status\",\"soße\"],\"s\":true,\"tv\":true,\"tzl\":\"days\",\"hl\":\"disabled\",\"hi\":true,\"g\":\"status\",\"t\":\"type:desc\",\"f\":[{\"n\":\"soße\",\"o\":\"=\",\"v\":[\"knoblauch\"]},{\"n\":\"created_at\",\"o\":\" { - if (!value) return; - if (!Array.isArray(value)) value = [value]; + if (!value) { + return; + } + if (!Array.isArray(value)) { + value = [value]; + } _.each(value, (v) => { if (v !== null && typeof v === 'object') { @@ -91,7 +95,7 @@ export class UrlParamsHelperService { } private encodeSums(paramsData:any, query:QueryResource) { - if (!!query.sums) { + if (query.sums) { paramsData.s = query.sums; } return paramsData; @@ -118,7 +122,7 @@ export class UrlParamsHelperService { paramsData.t = query .sortBy .map(function (sort:QuerySortByResource) { - return sort.id!.replace('-', ':') + return sort.id!.replace('-', ':'); }) .join(); } @@ -146,7 +150,7 @@ export class UrlParamsHelperService { } private encodeTimelineVisible(paramsData:any, query:QueryResource) { - if (!!query.timelineVisible) { + if (query.timelineVisible) { paramsData.tv = query.timelineVisible; if (!_.isEmpty(query.timelineLabels)) { @@ -175,14 +179,14 @@ export class UrlParamsHelperService { if (properties.c) { queryData["columns[]"] = properties.c.map((column:any) => column); } - if (!!properties.s) { + if (properties.s) { queryData.showSums = properties.s; } queryData.timelineVisible = properties.tv; - if (!!properties.tv) { - if (!!properties.tll) { + if (properties.tv) { + if (properties.tll) { queryData.timelineLabels = properties.tll; } @@ -214,7 +218,7 @@ export class UrlParamsHelperService { var filters = properties.f.map(function (urlFilter:any) { var attributes = { operator: decodeURIComponent(urlFilter.o) - } + }; if (urlFilter.v) { // the array check is only there for backwards compatibility reasons. // Nowadays, it will always be an array; @@ -253,7 +257,7 @@ export class UrlParamsHelperService { queryData.showSums = query.sums; queryData.timelineVisible = !!query.timelineVisible; - if (!!query.timelineVisible) { + if (query.timelineVisible) { queryData.timelineZoomLevel = query.timelineZoomLevel; queryData.timelineLabels = JSON.stringify(query.timelineLabels); } @@ -303,7 +307,7 @@ export class UrlParamsHelperService { return query.columns.map((column:any) => column.id || column.idFromLink); } else if (query._links.columns) { return query._links.columns.map((column:HalLink) => { - let id = column.href!; + const id = column.href!; return this.idFromHref(id); }); @@ -311,10 +315,10 @@ export class UrlParamsHelperService { } public buildV3GetFilters(filters:QueryFilterInstanceResource[], replacements = {}):ApiV3Filter[] { - let newFilters = filters.map((filter:QueryFilterInstanceResource) => { - let id = this.buildV3GetFilterIdFromFilter(filter); - let operator = this.buildV3GetOperatorIdFromFilter(filter); - let values = this.buildV3GetValuesFromFilter(filter).map(value => { + const newFilters = filters.map((filter:QueryFilterInstanceResource) => { + const id = this.buildV3GetFilterIdFromFilter(filter); + const operator = this.buildV3GetOperatorIdFromFilter(filter); + const values = this.buildV3GetValuesFromFilter(filter).map(value => { _.each(replacements, (val:string, key:string) => { value = value.replace(`{${key}}`, val); }); @@ -336,7 +340,7 @@ export class UrlParamsHelperService { } public buildV3GetFilterIdFromFilter(filter:QueryFilterInstanceResource) { - let href = filter.filter ? filter.filter.$href : filter._links.filter.href; + const href = filter.filter ? filter.filter.$href : filter._links.filter.href; return this.idFromHref(href); } @@ -345,7 +349,7 @@ export class UrlParamsHelperService { if (filter.operator) { return filter.operator.id || filter.operator.idFromLink; } else { - let href = filter._links.operator.href; + const href = filter._links.operator.href; return this.idFromHref(href); } @@ -361,14 +365,14 @@ export class UrlParamsHelperService { } private buildV3GetSortByFromQuery(query:QueryResource) { - let sortBys = query.sortBy ? query.sortBy : query._links.sortBy; - let sortByIds = sortBys.map((sort:QuerySortByResource) => { + const sortBys = query.sortBy ? query.sortBy : query._links.sortBy; + const sortByIds = sortBys.map((sort:QuerySortByResource) => { if (sort.id) { return sort.id; } else { - let href = sort.href!; + const href = sort.href!; - let id = this.idFromHref(href); + const id = this.idFromHref(href); return id; } @@ -378,7 +382,7 @@ export class UrlParamsHelperService { } private idFromHref(href:string) { - let id = href.substring(href.lastIndexOf('/') + 1, href.length); + const id = href.substring(href.lastIndexOf('/') + 1, href.length); return decodeURIComponent(id); } diff --git a/frontend/src/app/components/wp-relations/embedded/children/wp-children-inline-create.service.ts b/frontend/src/app/components/wp-relations/embedded/children/wp-children-inline-create.service.ts index 9031a6a4b98..bd6bbef07a1 100644 --- a/frontend/src/app/components/wp-relations/embedded/children/wp-children-inline-create.service.ts +++ b/frontend/src/app/components/wp-relations/embedded/children/wp-children-inline-create.service.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageRelationsHierarchyService} from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {WpRelationInlineCreateServiceInterface} from "core-components/wp-relations/embedded/wp-relation-inline-create.service.interface"; -import {WpRelationInlineAddExistingComponent} from "core-components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { Injectable, Injector } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageRelationsHierarchyService } from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { WpRelationInlineCreateServiceInterface } from "core-components/wp-relations/embedded/wp-relation-inline-create.service.interface"; +import { WpRelationInlineAddExistingComponent } from "core-components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; @Injectable() export class WpChildrenInlineCreateService extends WorkPackageInlineCreateService implements WpRelationInlineCreateServiceInterface { @@ -51,7 +51,7 @@ export class WpChildrenInlineCreateService extends WorkPackageInlineCreateServic /** * Define the reference type */ - public relationType:string = 'children'; + public relationType = 'children'; /** * Add a new relation of the above type diff --git a/frontend/src/app/components/wp-relations/embedded/children/wp-children-query.component.ts b/frontend/src/app/components/wp-relations/embedded/children/wp-children-query.component.ts index 4e307512271..93bc633b294 100644 --- a/frontend/src/app/components/wp-relations/embedded/children/wp-children-query.component.ts +++ b/frontend/src/app/components/wp-relations/embedded/children/wp-children-query.component.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {UrlParamsHelperService} from 'core-components/wp-query/url-params-helper'; -import {WorkPackageRelationsHierarchyService} from 'core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service'; -import {OpUnlinkTableAction} from 'core-components/wp-table/table-actions/actions/unlink-table-action'; -import {OpTableActionFactory} from 'core-components/wp-table/table-actions/table-action'; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {WorkPackageRelationQueryBase} from "core-components/wp-relations/embedded/wp-relation-query.base"; -import {WpChildrenInlineCreateService} from "core-components/wp-relations/embedded/children/wp-children-inline-create.service"; -import {filter} from "rxjs/operators"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {GroupDescriptor} from "core-components/work-packages/wp-single-view/wp-single-view.component"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { UrlParamsHelperService } from 'core-components/wp-query/url-params-helper'; +import { WorkPackageRelationsHierarchyService } from 'core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service'; +import { OpUnlinkTableAction } from 'core-components/wp-table/table-actions/actions/unlink-table-action'; +import { OpTableActionFactory } from 'core-components/wp-table/table-actions/table-action'; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { WorkPackageRelationQueryBase } from "core-components/wp-relations/embedded/wp-relation-query.base"; +import { WpChildrenInlineCreateService } from "core-components/wp-relations/embedded/children/wp-children-inline-create.service"; +import { filter } from "rxjs/operators"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { GroupDescriptor } from "core-components/work-packages/wp-single-view/wp-single-view.component"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'wp-children-query', @@ -56,7 +56,7 @@ export class WorkPackageChildrenQueryComponent extends WorkPackageRelationQueryB /** An optional group descriptor if we're rendering on the single view */ @Input() public group?:GroupDescriptor; - @Input() public addExistingChildEnabled:boolean = false; + @Input() public addExistingChildEnabled = false; public tableActions:OpTableActionFactory[] = [ OpUnlinkTableAction.factoryFor( diff --git a/frontend/src/app/components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component.ts b/frontend/src/app/components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component.ts index 38aef1ff261..33eb06f7831 100644 --- a/frontend/src/app/components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component.ts +++ b/frontend/src/app/components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component.ts @@ -26,20 +26,20 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Inject} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {WorkPackageInlineCreateComponent} from "core-components/wp-inline-create/wp-inline-create.component"; -import {WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; -import {WpRelationInlineCreateServiceInterface} from "core-components/wp-relations/embedded/wp-relation-inline-create.service.interface"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {ApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; -import {RelationResource} from "core-app/modules/hal/resources/relation-resource"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, Inject } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { WorkPackageInlineCreateComponent } from "core-components/wp-inline-create/wp-inline-create.component"; +import { WorkPackageRelationsService } from "core-components/wp-relations/wp-relations.service"; +import { WpRelationInlineCreateServiceInterface } from "core-components/wp-relations/embedded/wp-relation-inline-create.service.interface"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { ApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { UrlParamsHelperService } from "core-components/wp-query/url-params-helper"; +import { RelationResource } from "core-app/modules/hal/resources/relation-resource"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './wp-relation-inline-add-existing.component.html' @@ -125,8 +125,8 @@ export class WpRelationInlineAddExistingComponent { } const relationTypes = RelationResource.RELATION_TYPES(true); - let filters = query.filters.filter(filter => { - let id = this.urlParamsHelper.buildV3GetFilterIdFromFilter(filter); + const filters = query.filters.filter(filter => { + const id = this.urlParamsHelper.buildV3GetFilterIdFromFilter(filter); return relationTypes.indexOf(id) === -1; }); diff --git a/frontend/src/app/components/wp-relations/embedded/relations/wp-relation-inline-create.service.ts b/frontend/src/app/components/wp-relations/embedded/relations/wp-relation-inline-create.service.ts index 9a2fad4eec8..4c4eb868b7d 100644 --- a/frontend/src/app/components/wp-relations/embedded/relations/wp-relation-inline-create.service.ts +++ b/frontend/src/app/components/wp-relations/embedded/relations/wp-relation-inline-create.service.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector, OnDestroy} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {WpRelationInlineAddExistingComponent} from "core-components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component"; -import {WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; -import {WpRelationInlineCreateServiceInterface} from "core-components/wp-relations/embedded/wp-relation-inline-create.service.interface"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injectable, Injector, OnDestroy } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { WpRelationInlineAddExistingComponent } from "core-components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component"; +import { WorkPackageRelationsService } from "core-components/wp-relations/wp-relations.service"; +import { WpRelationInlineCreateServiceInterface } from "core-components/wp-relations/embedded/wp-relation-inline-create.service.interface"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; @Injectable() export class WpRelationInlineCreateService extends WorkPackageInlineCreateService implements WpRelationInlineCreateServiceInterface, OnDestroy { diff --git a/frontend/src/app/components/wp-relations/embedded/relations/wp-relation-query.component.ts b/frontend/src/app/components/wp-relations/embedded/relations/wp-relation-query.component.ts index 5ea1320a2f1..2dcb78c24e6 100644 --- a/frontend/src/app/components/wp-relations/embedded/relations/wp-relation-query.component.ts +++ b/frontend/src/app/components/wp-relations/embedded/relations/wp-relation-query.component.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Inject, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {UrlParamsHelperService} from 'core-components/wp-query/url-params-helper'; -import {OpUnlinkTableAction} from 'core-components/wp-table/table-actions/actions/unlink-table-action'; -import {OpTableActionFactory} from 'core-components/wp-table/table-actions/table-action'; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {WorkPackageRelationQueryBase} from "core-components/wp-relations/embedded/wp-relation-query.base"; -import {WpRelationInlineCreateService} from "core-components/wp-relations/embedded/relations/wp-relation-inline-create.service"; -import {WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; -import {filter} from "rxjs/operators"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {GroupDescriptor} from "core-components/work-packages/wp-single-view/wp-single-view.component"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { Component, Inject, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { UrlParamsHelperService } from 'core-components/wp-query/url-params-helper'; +import { OpUnlinkTableAction } from 'core-components/wp-table/table-actions/actions/unlink-table-action'; +import { OpTableActionFactory } from 'core-components/wp-table/table-actions/table-action'; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { WorkPackageRelationQueryBase } from "core-components/wp-relations/embedded/wp-relation-query.base"; +import { WpRelationInlineCreateService } from "core-components/wp-relations/embedded/relations/wp-relation-inline-create.service"; +import { WorkPackageRelationsService } from "core-components/wp-relations/wp-relations.service"; +import { filter } from "rxjs/operators"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { GroupDescriptor } from "core-components/work-packages/wp-single-view/wp-single-view.component"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Component({ selector: 'wp-relation-query', @@ -81,7 +81,7 @@ export class WorkPackageRelationQueryComponent extends WorkPackageRelationQueryB } ngOnInit() { - let relationType = this.getRelationTypeFromQuery(); + const relationType = this.getRelationTypeFromQuery(); // Set reference target and reference class this.wpInlineCreate.referenceTarget = this.workPackage; diff --git a/frontend/src/app/components/wp-relations/embedded/wp-relation-inline-create.service.interface.ts b/frontend/src/app/components/wp-relations/embedded/wp-relation-inline-create.service.interface.ts index 1aee7787e93..d6c5275053c 100644 --- a/frontend/src/app/components/wp-relations/embedded/wp-relation-inline-create.service.interface.ts +++ b/frontend/src/app/components/wp-relations/embedded/wp-relation-inline-create.service.interface.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; export interface WpRelationInlineCreateServiceInterface extends WorkPackageInlineCreateService { diff --git a/frontend/src/app/components/wp-relations/embedded/wp-relation-query.base.ts b/frontend/src/app/components/wp-relations/embedded/wp-relation-query.base.ts index 3afa30f1bc5..95da9c0f98d 100644 --- a/frontend/src/app/components/wp-relations/embedded/wp-relation-query.base.ts +++ b/frontend/src/app/components/wp-relations/embedded/wp-relation-query.base.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {Directive, ViewChild} from "@angular/core"; -import {WorkPackageEmbeddedTableComponent} from "core-components/wp-table/embedded/wp-embedded-table.component"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { Directive, ViewChild } from "@angular/core"; +import { WorkPackageEmbeddedTableComponent } from "core-components/wp-table/embedded/wp-embedded-table.component"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { UrlParamsHelperService } from "core-components/wp-query/url-params-helper"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Directive() export abstract class WorkPackageRelationQueryBase extends UntilDestroyedMixin { @@ -44,7 +44,7 @@ export abstract class WorkPackageRelationQueryBase extends UntilDestroyedMixin { public queryProps:Object; /** Whether this section should be hidden completely (due to missing permissions e.g.) */ - public hidden:boolean = false; + public hidden = false; /** Reference to the embedded table instance */ @ViewChild('embeddedTable') protected embeddedTable:WorkPackageEmbeddedTableComponent; diff --git a/frontend/src/app/components/wp-relations/wp-relation-row/wp-relation-row.component.ts b/frontend/src/app/components/wp-relations/wp-relation-row/wp-relation-row.component.ts index 07b20c759c5..7cf64fe52d6 100644 --- a/frontend/src/app/components/wp-relations/wp-relation-row/wp-relation-row.component.ts +++ b/frontend/src/app/components/wp-relations/wp-relation-row/wp-relation-row.component.ts @@ -1,13 +1,13 @@ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageRelationsService} from '../wp-relations.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {ChangeDetectorRef, Component, ElementRef, Input, OnInit, ViewChild} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageRelationsService } from '../wp-relations.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { ChangeDetectorRef, Component, ElementRef, Input, OnInit, ViewChild } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ @@ -22,8 +22,8 @@ export class WorkPackageRelationRowComponent extends UntilDestroyedMixin impleme @ViewChild('relationDescriptionTextarea') readonly relationDescriptionTextarea:ElementRef; public relationType:string; - public showRelationInfo:boolean = false; - public showEditForm:boolean = false; + public showRelationInfo = false; + public showEditForm = false; public availableRelationTypes:{ label:string, name:string }[]; public selectedRelationType:{ name:string }; @@ -81,8 +81,8 @@ export class WorkPackageRelationRowComponent extends UntilDestroyedMixin impleme .pipe( this.untilDestroyed() ).subscribe((wp) => { - this.relatedWorkPackage = wp; - }); + this.relatedWorkPackage = wp; + }); } /** diff --git a/frontend/src/app/components/wp-relations/wp-relations-create/wp-relations-autocomplete/wp-relations-autocomplete.component.ts b/frontend/src/app/components/wp-relations/wp-relations-create/wp-relations-autocomplete/wp-relations-autocomplete.component.ts index 2e46b6cfa72..0ca002518b5 100644 --- a/frontend/src/app/components/wp-relations/wp-relations-create/wp-relations-autocomplete/wp-relations-autocomplete.component.ts +++ b/frontend/src/app/components/wp-relations/wp-relations-create/wp-relations-autocomplete/wp-relations-autocomplete.component.ts @@ -36,19 +36,19 @@ import { ViewChild, ViewEncapsulation } from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {from, Observable, of, Subject} from "rxjs"; -import {catchError, debounceTime, distinctUntilChanged, map, switchMap, tap} from "rxjs/operators"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {ApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { from, Observable, of, Subject } from "rxjs"; +import { catchError, debounceTime, distinctUntilChanged, map, switchMap, tap } from "rxjs/operators"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { ApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Component({ selector: 'wp-relations-autocomplete', @@ -71,7 +71,7 @@ export class WorkPackageRelationsAutocomplete implements AfterContentInit { /** Do we take the current query filters into account? */ @Input() additionalFilters:ApiV3Filter[] = []; - @Input() hiddenOverflowContainer:string = 'body'; + @Input() hiddenOverflowContainer = 'body'; @ViewChild(NgSelectComponent, { static: true }) public ngSelectComponent:NgSelectComponent; @Output() onCancel = new EventEmitter(); @@ -151,7 +151,7 @@ export class WorkPackageRelationsAutocomplete implements AfterContentInit { type: this.filterCandidatesFor || this.selectedRelationType }) as Promise ) - .pipe( + .pipe( map(collection => collection.elements), catchError((error:unknown) => { this.notificationService.handleRawError(error); diff --git a/frontend/src/app/components/wp-relations/wp-relations-create/wp-relations-create.component.ts b/frontend/src/app/components/wp-relations/wp-relations-create/wp-relations-create.component.ts index 331d228de73..05b4d518c35 100644 --- a/frontend/src/app/components/wp-relations/wp-relations-create/wp-relations-create.component.ts +++ b/frontend/src/app/components/wp-relations/wp-relations-create/wp-relations-create.component.ts @@ -1,10 +1,10 @@ -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageRelationsService} from '../wp-relations.service'; -import {Component, Input} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageRelationsService } from '../wp-relations.service'; +import { Component, Input } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Component({ selector: 'wp-relations-create', @@ -13,7 +13,7 @@ import {WorkPackageNotificationService} from "core-app/modules/work_packages/not export class WorkPackageRelationsCreateComponent { @Input() readonly workPackage:WorkPackageResource; - public showRelationsCreateForm:boolean = false; + public showRelationsCreateForm = false; public selectedRelationType:string = RelationResource.DEFAULT(); public selectedWpId:string; public relationTypes = RelationResource.LOCALIZED_RELATION_TYPES(false); diff --git a/frontend/src/app/components/wp-relations/wp-relations-group/wp-relations-group.component.ts b/frontend/src/app/components/wp-relations/wp-relations-group/wp-relations-group.component.ts index d6de883466a..5704a135760 100644 --- a/frontend/src/app/components/wp-relations/wp-relations-group/wp-relations-group.component.ts +++ b/frontend/src/app/components/wp-relations/wp-relations-group/wp-relations-group.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {Component, ElementRef, EventEmitter, Input, Output, ViewChild} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { Component, ElementRef, EventEmitter, Input, Output, ViewChild } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; diff --git a/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts b/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts index f9324e9735b..5421541ee8f 100644 --- a/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts +++ b/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {WorkPackageRelationsHierarchyService} from 'core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service'; -import {take} from 'rxjs/operators'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { WorkPackageRelationsHierarchyService } from 'core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service'; +import { take } from 'rxjs/operators'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'wp-relations-hierarchy', @@ -43,7 +43,7 @@ export class WorkPackageRelationsHierarchyComponent extends UntilDestroyedMixin @Input() public workPackage:WorkPackageResource; @Input() public relationType:string; - public showEditForm:boolean = false; + public showEditForm = false; public workPackagePath:string; public canHaveChildren:boolean; public canModifyHierarchy:boolean; @@ -85,7 +85,7 @@ export class WorkPackageRelationsHierarchyComponent extends UntilDestroyedMixin .subscribe((wp:WorkPackageResource) => { this.workPackage = wp; - let parentId = this.workPackage.parent?.id?.toString(); + const parentId = this.workPackage.parent?.id?.toString(); if (parentId) { this diff --git a/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts b/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts index 17b436fa3e7..3b0b95535a4 100644 --- a/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts +++ b/frontend/src/app/components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {States} from '../../states.service'; -import {StateService} from '@uirouter/core'; -import {Injectable} from '@angular/core'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { States } from '../../states.service'; +import { StateService } from '@uirouter/core'; +import { Injectable } from '@angular/core'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() export class WorkPackageRelationsHierarchyService { @@ -47,7 +47,7 @@ export class WorkPackageRelationsHierarchyService { } public changeParent(workPackage:WorkPackageResource, parentId:string|null) { - let payload:any = { + const payload:any = { lockVersion: workPackage.lockVersion }; @@ -140,7 +140,7 @@ export class WorkPackageRelationsHierarchyService { public removeChild(childWorkPackage:WorkPackageResource) { return childWorkPackage.$load().then(() => { - let parentWorkPackage = childWorkPackage.parent; + const parentWorkPackage = childWorkPackage.parent; return childWorkPackage.changeParent({ _links: { parent: { @@ -157,11 +157,11 @@ export class WorkPackageRelationsHierarchyService { .refresh() .then((wp) => { this.halEvents.push(wp, { - eventType: 'association', - relatedWorkPackage: null, - relationType: 'child' + eventType: 'association', + relatedWorkPackage: null, + relationType: 'child' + }); }); - }); } this diff --git a/frontend/src/app/components/wp-relations/wp-relations.component.ts b/frontend/src/app/components/wp-relations/wp-relations.component.ts index 7969996b8e5..aa1cabda9ff 100644 --- a/frontend/src/app/components/wp-relations/wp-relations.component.ts +++ b/frontend/src/app/components/wp-relations/wp-relations.component.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; -import {Observable, zip} from 'rxjs'; -import {take, takeUntil} from 'rxjs/operators'; -import {RelatedWorkPackagesGroup} from './wp-relations.interfaces'; -import {RelationsStateValue, WorkPackageRelationsService} from './wp-relations.service'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Observable, zip } from 'rxjs'; +import { take, takeUntil } from 'rxjs/operators'; +import { RelatedWorkPackagesGroup } from './wp-relations.interfaces'; +import { RelationsStateValue, WorkPackageRelationsService } from './wp-relations.service'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ @@ -49,7 +49,7 @@ export class WorkPackageRelationsComponent extends UntilDestroyedMixin implement @Input() public workPackage:WorkPackageResource; public relationGroups:RelatedWorkPackagesGroup = {}; public relationGroupKeys:string[] = []; - public relationsPresent:boolean = false; + public relationsPresent = false; public canAddRelation:boolean; // By default, group by relation type @@ -97,7 +97,7 @@ export class WorkPackageRelationsComponent extends UntilDestroyedMixin implement } private getRelatedWorkPackages(workPackageIds:string[]):Observable { - let observablesToGetZipped:Observable[] = workPackageIds.map(wpId => + const observablesToGetZipped:Observable[] = workPackageIds.map(wpId => this .apiV3Service .work_packages diff --git a/frontend/src/app/components/wp-relations/wp-relations.service.ts b/frontend/src/app/components/wp-relations/wp-relations.service.ts index f978990bb59..85a19138ce0 100644 --- a/frontend/src/app/components/wp-relations/wp-relations.service.ts +++ b/frontend/src/app/components/wp-relations/wp-relations.service.ts @@ -1,14 +1,14 @@ -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {multiInput, MultiInputState, StatesGroup} from 'reactivestates'; -import {Injectable} from "@angular/core"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {Observable} from "rxjs"; -import {map, take, tap} from "rxjs/operators"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { multiInput, MultiInputState, StatesGroup } from 'reactivestates'; +import { Injectable } from "@angular/core"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { Observable } from "rxjs"; +import { map, take, tap } from "rxjs/operators"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; export type RelationsStateValue = { [relationId:string]:RelationResource }; @@ -41,7 +41,7 @@ export class WorkPackageRelationsService extends StateCacheService { + public require(id:string, force = false):Promise { return this .requireAndStream(id, force) .pipe( @@ -59,7 +59,7 @@ export class WorkPackageRelationsService extends StateCacheService { + public requireAndStream(id:string, force = false):Observable { // Refresh when stale or being forced if (this.stale(id) || force) { this.clearAndLoad( @@ -156,8 +156,8 @@ export class WorkPackageRelationsService extends StateCacheService { - let value:RelationsStateValue = {}; + const value:RelationsStateValue = {}; value[relation.id!] = relation; return value; }); diff --git a/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-base.controller.ts b/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-base.controller.ts index b798dca2859..cd7d44e0706 100644 --- a/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-base.controller.ts +++ b/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-base.controller.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Directive, OnInit} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {ActivityEntryInfo} from 'core-components/wp-single-view-tabs/activity-panel/activity-entry-info'; -import {WorkPackagesActivityService} from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Transition} from "@uirouter/core"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { ChangeDetectorRef, Directive, OnInit } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { ActivityEntryInfo } from 'core-components/wp-single-view-tabs/activity-panel/activity-entry-info'; +import { WorkPackagesActivityService } from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Transition } from "@uirouter/core"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Directive() export class ActivityPanelBaseController extends UntilDestroyedMixin implements OnInit { @@ -50,7 +50,7 @@ export class ActivityPanelBaseController extends UntilDestroyedMixin implements public reverse:boolean; public showToggler:boolean; - public onlyComments:boolean = false; + public onlyComments = false; public togglerText:string; public text = { commentsOnly: this.I18n.t('js.label_activity_show_only_comments'), diff --git a/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-entry-info.ts b/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-entry-info.ts index dec2db52b23..a781a018408 100644 --- a/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-entry-info.ts +++ b/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-entry-info.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {TimezoneService} from 'core-components/datetime/timezone.service'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; export class ActivityEntryInfo { @@ -37,7 +37,7 @@ export class ActivityEntryInfo { public index:number) { } - public number(forceReverse:boolean = false) { + public number(forceReverse = false) { return this.orderedIndex(this.index, forceReverse); } @@ -67,7 +67,7 @@ export class ActivityEntryInfo { return this.date !== this.dateOfPrevious; } - public isInitial(forceReverse:boolean = false) { + public isInitial(forceReverse = false) { var activityNo = this.number(forceReverse); if (this.activity._type.indexOf('Activity') !== 0) { @@ -94,7 +94,7 @@ export class ActivityEntryInfo { return moment(activity.createdAt).format('LL'); } - protected orderedIndex(activityNo:number, forceReverse:boolean = false) { + protected orderedIndex(activityNo:number, forceReverse = false) { if (forceReverse || this.isReversed) { return this.activities.length - activityNo; } diff --git a/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-on-overview.component.ts b/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-on-overview.component.ts index d8099f78fd3..1881827e388 100644 --- a/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-on-overview.component.ts +++ b/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-on-overview.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {ActivityPanelBaseController} from 'core-components/wp-single-view-tabs/activity-panel/activity-base.controller'; -import {ChangeDetectionStrategy, Component, Input} from '@angular/core'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {ActivityEntryInfo} from 'core-components/wp-single-view-tabs/activity-panel/activity-entry-info'; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { ActivityPanelBaseController } from 'core-components/wp-single-view-tabs/activity-panel/activity-base.controller'; +import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { ActivityEntryInfo } from 'core-components/wp-single-view-tabs/activity-panel/activity-entry-info'; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; @Component({ selector: 'newest-activity-on-overview', @@ -58,17 +58,17 @@ export class NewestActivityOnOverviewComponent extends ActivityPanelBaseControll this.latestActivityInfo = this.latestActivities(); } - private latestActivities(visible:number = 3) { + private latestActivities(visible = 3) { if (this.reverse) { // In reverse, we already get reversed entries from API. // So simply take the first three - let segment = this.unfilteredActivities.slice(0, visible); + const segment = this.unfilteredActivities.slice(0, visible); return segment.map((el:HalResource, i:number) => this.info(el, i)); } else { // In ascending sort, take the last three items - let segment = this.unfilteredActivities.slice(-visible); - let startIndex = this.unfilteredActivities.length - segment.length; + const segment = this.unfilteredActivities.slice(-visible); + const startIndex = this.unfilteredActivities.length - segment.length; return segment.map((el:HalResource, i:number) => this.info(el, startIndex + i)); } } diff --git a/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-tab.component.ts b/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-tab.component.ts index 40ec52ffbd9..853f6e32452 100644 --- a/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-tab.component.ts +++ b/frontend/src/app/components/wp-single-view-tabs/activity-panel/activity-tab.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {ActivityPanelBaseController} from 'core-components/wp-single-view-tabs/activity-panel/activity-base.controller'; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; +import { Component } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { ActivityPanelBaseController } from 'core-components/wp-single-view-tabs/activity-panel/activity-base.controller'; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; @Component({ templateUrl: './activity-tab.html', diff --git a/frontend/src/app/components/wp-single-view-tabs/activity-panel/wp-activity.service.ts b/frontend/src/app/components/wp-single-view-tabs/activity-panel/wp-activity.service.ts index 37ac45b4ba3..97f6dbb53bb 100644 --- a/frontend/src/app/components/wp-single-view-tabs/activity-panel/wp-activity.service.ts +++ b/frontend/src/app/components/wp-single-view-tabs/activity-panel/wp-activity.service.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ActivityEntryInfo} from './activity-entry-info'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {Injectable} from '@angular/core'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {WorkPackageLinkedResourceCache} from 'core-components/wp-single-view-tabs/wp-linked-resource-cache.service'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; +import { ActivityEntryInfo } from './activity-entry-info'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { Injectable } from '@angular/core'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { WorkPackageLinkedResourceCache } from 'core-components/wp-single-view-tabs/wp-linked-resource-cache.service'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; @Injectable() export class WorkPackagesActivityService extends WorkPackageLinkedResourceCache { @@ -72,8 +72,8 @@ export class WorkPackagesActivityService extends WorkPackageLinkedResourceCache< }); } - protected sortedActivityList(activities:HalResource[], attr:string = 'createdAt'):HalResource[] { - let sorted = _.sortBy(_.flatten(activities), attr); + protected sortedActivityList(activities:HalResource[], attr = 'createdAt'):HalResource[] { + const sorted = _.sortBy(_.flatten(activities), attr); if (this.isReversed) { return sorted.reverse(); diff --git a/frontend/src/app/components/wp-single-view-tabs/keep-tab/keep-tab.service.spec.ts b/frontend/src/app/components/wp-single-view-tabs/keep-tab/keep-tab.service.spec.ts index 124d8e40161..969fb93be05 100644 --- a/frontend/src/app/components/wp-single-view-tabs/keep-tab/keep-tab.service.spec.ts +++ b/frontend/src/app/components/wp-single-view-tabs/keep-tab/keep-tab.service.spec.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {KeepTabService} from './keep-tab.service'; +import { KeepTabService } from './keep-tab.service'; describe('keepTab service', () => { let callback:(transition:any) => void; - let includes = (path:string) => false; + const includes = (path:string) => false; let $state:any; let $transitions:any; let keepTab:KeepTabService; @@ -95,7 +95,7 @@ describe('keepTab service', () => { active: 'relations', show: 'work-packages.show.relations', details: 'work-packages.partitioned.list.details.relations' - } + }; keepTab.observable.subscribe(cb); expect(cb).toHaveBeenCalledWith(expected); diff --git a/frontend/src/app/components/wp-single-view-tabs/keep-tab/keep-tab.service.ts b/frontend/src/app/components/wp-single-view-tabs/keep-tab/keep-tab.service.ts index 25d77074a45..a6470b4594e 100644 --- a/frontend/src/app/components/wp-single-view-tabs/keep-tab/keep-tab.service.ts +++ b/frontend/src/app/components/wp-single-view-tabs/keep-tab/keep-tab.service.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {StateService, Transition, TransitionService} from '@uirouter/core'; -import {ReplaySubject} from 'rxjs'; -import {Injectable} from "@angular/core"; +import { StateService, Transition, TransitionService } from '@uirouter/core'; +import { ReplaySubject } from 'rxjs'; +import { Injectable } from "@angular/core"; @Injectable({ providedIn: 'root' }) export class KeepTabService { - protected currentTab:string = 'overview'; + protected currentTab = 'overview'; protected subject = new ReplaySubject<{ [tab:string]:string; }>(1); diff --git a/frontend/src/app/components/wp-single-view-tabs/overview-tab/overview-tab.component.ts b/frontend/src/app/components/wp-single-view-tabs/overview-tab/overview-tab.component.ts index 62b7e336c8f..d81690d3e3f 100644 --- a/frontend/src/app/components/wp-single-view-tabs/overview-tab/overview-tab.component.ts +++ b/frontend/src/app/components/wp-single-view-tabs/overview-tab/overview-tab.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from '@angular/core'; -import {StateService} from '@uirouter/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component } from '@angular/core'; +import { StateService } from '@uirouter/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './overview-tab.html', diff --git a/frontend/src/app/components/wp-single-view-tabs/relations-tab/relations-tab.component.ts b/frontend/src/app/components/wp-single-view-tabs/relations-tab/relations-tab.component.ts index b38b214d919..b5113401f9e 100644 --- a/frontend/src/app/components/wp-single-view-tabs/relations-tab/relations-tab.component.ts +++ b/frontend/src/app/components/wp-single-view-tabs/relations-tab/relations-tab.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Transition} from '@uirouter/core'; -import {Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Transition } from '@uirouter/core'; +import { Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './relations-tab.html', diff --git a/frontend/src/app/components/wp-single-view-tabs/watchers-tab/watchers-tab.component.ts b/frontend/src/app/components/wp-single-view-tabs/watchers-tab/watchers-tab.component.ts index c8adc5f86ca..5c3f24bc7ed 100644 --- a/frontend/src/app/components/wp-single-view-tabs/watchers-tab/watchers-tab.component.ts +++ b/frontend/src/app/components/wp-single-view-tabs/watchers-tab/watchers-tab.component.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit} from '@angular/core'; -import {Transition} from '@uirouter/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {LoadingIndicatorService} from 'core-app/modules/common/loading-indicator/loading-indicator.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageWatchersService} from 'core-components/wp-single-view-tabs/watchers-tab/wp-watchers.service'; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit } from '@angular/core'; +import { Transition } from '@uirouter/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { LoadingIndicatorService } from 'core-app/modules/common/loading-indicator/loading-indicator.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageWatchersService } from 'core-components/wp-single-view-tabs/watchers-tab/wp-watchers.service'; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './watchers-tab.html', @@ -50,7 +50,7 @@ export class WorkPackageWatchersTabComponent extends UntilDestroyedMixin impleme public trackByHref = AngularTrackingHelpers.trackByHref; public error = false; - public noResults:boolean = false; + public noResults = false; public allowedToView = false; public allowedToAdd = false; public allowedToRemove = false; diff --git a/frontend/src/app/components/wp-single-view-tabs/watchers-tab/wp-watcher-entry.component.ts b/frontend/src/app/components/wp-single-view-tabs/watchers-tab/wp-watcher-entry.component.ts index 14d6cb3d399..7666d760e96 100644 --- a/frontend/src/app/components/wp-single-view-tabs/watchers-tab/wp-watcher-entry.component.ts +++ b/frontend/src/app/components/wp-single-view-tabs/watchers-tab/wp-watcher-entry.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageWatchersTabComponent} from './watchers-tab.component'; -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; +import { Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageWatchersTabComponent } from './watchers-tab.component'; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; @Component({ templateUrl: './wp-watcher-entry.html', diff --git a/frontend/src/app/components/wp-single-view-tabs/watchers-tab/wp-watchers.service.ts b/frontend/src/app/components/wp-single-view-tabs/watchers-tab/wp-watchers.service.ts index f9f318435b1..fa58edd90f4 100644 --- a/frontend/src/app/components/wp-single-view-tabs/watchers-tab/wp-watchers.service.ts +++ b/frontend/src/app/components/wp-single-view-tabs/watchers-tab/wp-watchers.service.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {WorkPackageLinkedResourceCache} from 'core-components/wp-single-view-tabs/wp-linked-resource-cache.service'; +import { Injectable } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { WorkPackageLinkedResourceCache } from 'core-components/wp-single-view-tabs/wp-linked-resource-cache.service'; @Injectable() export class WorkPackageWatchersService extends WorkPackageLinkedResourceCache { @@ -39,6 +39,6 @@ export class WorkPackageWatchersService extends WorkPackageLinkedResourceCache) => { return collection.elements; - }); + }); } } diff --git a/frontend/src/app/components/wp-single-view-tabs/wp-linked-resource-cache.service.ts b/frontend/src/app/components/wp-single-view-tabs/wp-linked-resource-cache.service.ts index 2f0669d53ae..d14351c6538 100644 --- a/frontend/src/app/components/wp-single-view-tabs/wp-linked-resource-cache.service.ts +++ b/frontend/src/app/components/wp-single-view-tabs/wp-linked-resource-cache.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {input, InputState} from 'reactivestates'; -import {take} from 'rxjs/operators'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { input, InputState } from 'reactivestates'; +import { take } from 'rxjs/operators'; export abstract class WorkPackageLinkedResourceCache { @@ -50,7 +50,7 @@ export abstract class WorkPackageLinkedResourceCache { * @param {WorkPackageResource} workPackage * @returns {Promise} */ - public require(workPackage:WorkPackageResource, force:boolean = false):Promise { + public require(workPackage:WorkPackageResource, force = false):Promise { const id = workPackage.id!; const state = this.cache.state; diff --git a/frontend/src/app/components/wp-table/config-menu/config-menu.component.ts b/frontend/src/app/components/wp-table/config-menu/config-menu.component.ts index 0b84cc06ad3..630eaed6973 100644 --- a/frontend/src/app/components/wp-table/config-menu/config-menu.component.ts +++ b/frontend/src/app/components/wp-table/config-menu/config-menu.component.ts @@ -1,8 +1,8 @@ -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Component, OnInit, Injector} from '@angular/core'; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {WpTableConfigurationModalComponent} from "core-components/wp-table/configuration-modal/wp-table-configuration.modal"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Component, OnInit, Injector } from '@angular/core'; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { WpTableConfigurationModalComponent } from "core-components/wp-table/configuration-modal/wp-table-configuration.modal"; @Component({ templateUrl: './config-menu.template.html', diff --git a/frontend/src/app/components/wp-table/configuration-modal/tab-portal-outlet.ts b/frontend/src/app/components/wp-table/configuration-modal/tab-portal-outlet.ts index 47a1ba4ed01..72de9d56d82 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/tab-portal-outlet.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/tab-portal-outlet.ts @@ -2,7 +2,7 @@ * A PortalOutlet that lets multiple components live for the lifetime of the outlet, * allowing faster switching and persistent data. */ -import {ComponentPortal} from '@angular/cdk/portal'; +import { ComponentPortal } from '@angular/cdk/portal'; import { ApplicationRef, ComponentFactoryResolver, diff --git a/frontend/src/app/components/wp-table/configuration-modal/tabs/columns-tab.component.ts b/frontend/src/app/components/wp-table/configuration-modal/tabs/columns-tab.component.ts index 730719580b3..175abd5c808 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/tabs/columns-tab.component.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/tabs/columns-tab.component.ts @@ -1,11 +1,11 @@ -import {Component, Injector, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {QueryColumn} from 'core-components/wp-query/query-column'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {WorkPackageViewColumnsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {BannersService} from "core-app/modules/common/enterprise/banners.service"; -import {DraggableOption} from "core-app/modules/common/draggable-autocomplete/draggable-autocomplete.component"; +import { Component, Injector, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { QueryColumn } from 'core-components/wp-query/query-column'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { WorkPackageViewColumnsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { BannersService } from "core-app/modules/common/enterprise/banners.service"; +import { DraggableOption } from "core-app/modules/common/draggable-autocomplete/draggable-autocomplete.component"; @Component({ templateUrl: './columns-tab.component.html' @@ -18,7 +18,7 @@ export class WpTableConfigurationColumnsTab implements TabComponent, OnInit { public selectedColumns:DraggableOption[] = this.wpTableColumns.getColumns().map(c => this.column2Like(c)); public selectedColumnMap:{ [id:string]:boolean } = {}; - public eeShowBanners:boolean = false; + public eeShowBanners = false; public text = { columnsHelp: this.I18n.t('js.work_packages.table_configuration.columns_help_text'), diff --git a/frontend/src/app/components/wp-table/configuration-modal/tabs/display-settings-tab.component.ts b/frontend/src/app/components/wp-table/configuration-modal/tabs/display-settings-tab.component.ts index f3cb4896ec8..b05241851fb 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/tabs/display-settings-tab.component.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/tabs/display-settings-tab.component.ts @@ -1,11 +1,11 @@ -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {WorkPackageViewGroupByService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service'; -import {QueryGroupByResource} from 'core-app/modules/hal/resources/query-group-by-resource'; -import {WorkPackageViewHierarchiesService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service'; -import {WorkPackageViewSumService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service'; -import {Component, Injector} from "@angular/core"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { WorkPackageViewGroupByService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service'; +import { QueryGroupByResource } from 'core-app/modules/hal/resources/query-group-by-resource'; +import { WorkPackageViewHierarchiesService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service'; +import { WorkPackageViewSumService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service'; +import { Component, Injector } from "@angular/core"; @Component({ templateUrl: './display-settings-tab.component.html' @@ -20,7 +20,7 @@ export class WpTableConfigurationDisplaySettingsTab implements TabComponent { public availableGroups:QueryGroupByResource[] = []; // Sums row display - public displaySums:boolean = false; + public displaySums = false; public text = { choose_mode: this.I18n.t('js.work_packages.table_configuration.choose_display_mode'), @@ -51,7 +51,7 @@ export class WpTableConfigurationDisplaySettingsTab implements TabComponent { this.wpTableHierarchies.setEnabled(this.displayMode === 'hierarchy'); // Update grouping state - let group = this.displayMode === 'grouped' ? this.currentGroup : null; + const group = this.displayMode === 'grouped' ? this.currentGroup : null; this.wpTableGroupBy.update(group); // Update sums state diff --git a/frontend/src/app/components/wp-table/configuration-modal/tabs/filters-tab.component.ts b/frontend/src/app/components/wp-table/configuration-modal/tabs/filters-tab.component.ts index 50a7518699a..d8adf640419 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/tabs/filters-tab.component.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/tabs/filters-tab.component.ts @@ -1,10 +1,10 @@ -import {Component, Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {WorkPackageFiltersService} from 'core-components/filters/wp-filters/wp-filters.service'; -import {WorkPackageViewFiltersService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service'; -import {QueryFilterInstanceResource} from "core-app/modules/hal/resources/query-filter-instance-resource"; -import {BannersService} from "core-app/modules/common/enterprise/banners.service"; +import { Component, Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { WorkPackageFiltersService } from 'core-components/filters/wp-filters/wp-filters.service'; +import { WorkPackageViewFiltersService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service'; +import { QueryFilterInstanceResource } from "core-app/modules/hal/resources/query-filter-instance-resource"; +import { BannersService } from "core-app/modules/common/enterprise/banners.service"; @Component({ templateUrl: './filters-tab.component.html', @@ -13,7 +13,7 @@ import {BannersService} from "core-app/modules/common/enterprise/banners.service export class WpTableConfigurationFiltersTab implements TabComponent { public filters:QueryFilterInstanceResource[] = []; - public eeShowBanners:boolean = false; + public eeShowBanners = false; public text = { columnsLabel: this.I18n.t('js.label_columns'), diff --git a/frontend/src/app/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts b/frontend/src/app/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts index 97a2a23b355..b8898363d40 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/tabs/highlighting-tab.component.ts @@ -1,13 +1,13 @@ -import {Component, Injector, ViewChild} from '@angular/core'; -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {WorkPackageViewHighlightingService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HighlightingMode} from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {States} from "core-app/components/states.service"; -import {BannersService} from "core-app/modules/common/enterprise/banners.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {NgSelectComponent} from "@ng-select/ng-select"; +import { Component, Injector, ViewChild } from '@angular/core'; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { WorkPackageViewHighlightingService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HighlightingMode } from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { States } from "core-app/components/states.service"; +import { BannersService } from "core-app/modules/common/enterprise/banners.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { NgSelectComponent } from "@ng-select/ng-select"; @Component({ templateUrl: './highlighting-tab.component.html' @@ -16,9 +16,9 @@ export class WpTableConfigurationHighlightingTab implements TabComponent { // Display mode public highlightingMode:HighlightingMode = 'inline'; - public entireRowMode:boolean = false; + public entireRowMode = false; public lastEntireRowAttribute:HighlightingMode = 'status'; - public eeShowBanners:boolean = false; + public eeShowBanners = false; public availableInlineHighlightedAttributes:HalResource[] = []; public selectedAttributes:any[] = []; @@ -55,8 +55,8 @@ export class WpTableConfigurationHighlightingTab implements TabComponent { ngOnInit() { this.availableInlineHighlightedAttributes = this.availableHighlightedAttributes; this.availableRowHighlightedAttributes = [ - {name: this.text.highlighting_mode.status, value: 'status'}, - {name: this.text.highlighting_mode.priority, value: 'priority'}, + { name: this.text.highlighting_mode.status, value: 'status' }, + { name: this.text.highlighting_mode.priority, value: 'priority' }, ]; this.setSelectedValues(); @@ -70,7 +70,7 @@ export class WpTableConfigurationHighlightingTab implements TabComponent { } public onSave() { - let mode = this.highlightingMode; + const mode = this.highlightingMode; this.wpTableHighlight.update({ mode: mode, selectedAttributes: this.selectedAttributes }); } diff --git a/frontend/src/app/components/wp-table/configuration-modal/tabs/sort-by-tab.component.ts b/frontend/src/app/components/wp-table/configuration-modal/tabs/sort-by-tab.component.ts index fe801380f63..ff3e776d170 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/tabs/sort-by-tab.component.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/tabs/sort-by-tab.component.ts @@ -1,12 +1,12 @@ -import {Component, Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { Component, Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; import { QUERY_SORT_BY_ASC, QUERY_SORT_BY_DESC, QuerySortByResource } from 'core-app/modules/hal/resources/query-sort-by-resource'; -import {WorkPackageViewSortByService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service'; -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { WorkPackageViewSortByService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service'; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; export class SortModalObject { constructor(public column:SortColumn, @@ -41,14 +41,14 @@ export class WpTableConfigurationSortByTab implements TabComponent { }; readonly availableDirections = [ - {$href: QUERY_SORT_BY_ASC, name: this.I18n.t('js.label_ascending')}, - {$href: QUERY_SORT_BY_DESC, name: this.I18n.t('js.label_descending')} + { $href: QUERY_SORT_BY_ASC, name: this.I18n.t('js.label_ascending') }, + { $href: QUERY_SORT_BY_DESC, name: this.I18n.t('js.label_descending') } ]; public availableColumns:SortColumn[] = []; public allColumns:SortColumn[] = []; public sortationObjects:SortModalObject[] = []; - public emptyColumn:SortColumn = {name: this.text.placeholder, href: null}; + public emptyColumn:SortColumn = { name: this.text.placeholder, href: null }; public sortingMode:SortingMode = 'automatic'; public manualSortColumn:SortColumn; @@ -75,13 +75,13 @@ export class WpTableConfigurationSortByTab implements TabComponent { this.wpTableSortBy .onReadyWithAvailable() .subscribe(() => { - let allColumns:SortColumn[] = this.wpTableSortBy.available.filter( + const allColumns:SortColumn[] = this.wpTableSortBy.available.filter( (sort:QuerySortByResource) => { return !sort.column.$href!.endsWith('/parent'); } ).map( (sort:QuerySortByResource) => { - return {name: sort.column.name, href: sort.column.$href}; + return { name: sort.column.name, href: sort.column.$href }; } ); @@ -94,7 +94,7 @@ export class WpTableConfigurationSortByTab implements TabComponent { _.each(this.wpTableSortBy.current, sort => { if (!sort.column.$href!.endsWith('/parent')) { this.sortationObjects.push( - new SortModalObject({name: sort.column.name, href: sort.column.$href}, + new SortModalObject({ name: sort.column.name, href: sort.column.$href }, sort.direction.$href!) ); if (sort.column.href === this.manualSortColumn.href) { @@ -114,7 +114,7 @@ export class WpTableConfigurationSortByTab implements TabComponent { } public updateUsedColumns() { - let usedColumns = this.sortationObjects + const usedColumns = this.sortationObjects .filter(o => o.column !== null) .map((object:SortModalObject) => object.column); diff --git a/frontend/src/app/components/wp-table/configuration-modal/tabs/timelines-tab.component.ts b/frontend/src/app/components/wp-table/configuration-modal/tabs/timelines-tab.component.ts index 704b06877cd..20834e38ea7 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/tabs/timelines-tab.component.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/tabs/timelines-tab.component.ts @@ -1,18 +1,18 @@ -import {Component, Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {WorkPackageViewTimelineService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service'; -import {TimelineLabels, TimelineZoomLevel} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageViewColumnsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; -import {QueryColumn} from 'core-components/wp-query/query-column'; -import {zoomLevelOrder} from "core-components/wp-table/timeline/wp-timeline"; +import { Component, Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { WorkPackageViewTimelineService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service'; +import { TimelineLabels, TimelineZoomLevel } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageViewColumnsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; +import { QueryColumn } from 'core-components/wp-query/query-column'; +import { zoomLevelOrder } from "core-components/wp-table/timeline/wp-timeline"; @Component({ templateUrl: './timelines-tab.component.html' }) export class WpTableConfigurationTimelinesTab implements TabComponent { - public timelineVisible:boolean = false; + public timelineVisible = false; public availableAttributes:{ id:string, name:string }[]; public labels:TimelineLabels; diff --git a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.ts b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.ts index 6c2355e3fb4..098b1aa6d06 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration-relation-selector.ts @@ -3,14 +3,14 @@ import { Injector, OnInit, } from '@angular/core'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {QueryFilterResource} from "core-app/modules/hal/resources/query-filter-resource"; -import {QueryOperatorResource} from "core-app/modules/hal/resources/query-operator-resource"; -import {QueryFilterInstanceResource} from "core-app/modules/hal/resources/query-filter-instance-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { QueryFilterResource } from "core-app/modules/hal/resources/query-filter-resource"; +import { QueryOperatorResource } from "core-app/modules/hal/resources/query-operator-resource"; +import { QueryFilterInstanceResource } from "core-app/modules/hal/resources/query-filter-instance-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; @Component({ templateUrl: './wp-table-configuration-relation-selector.html', @@ -62,7 +62,7 @@ export class WpTableConfigurationRelationSelectorComponent implements OnInit { } ngOnInit() { - let self:WpTableConfigurationRelationSelectorComponent = this; + const self:WpTableConfigurationRelationSelectorComponent = this; this.wpTableFilters .onReady() @@ -73,7 +73,7 @@ export class WpTableConfigurationRelationSelectorComponent implements OnInit { } private setSelectedRelationFilter():void { - let currentRelationFilters:QueryFilterInstanceResource[] = this.relationFiltersOf(this.wpTableFilters.current) as QueryFilterInstanceResource[]; + const currentRelationFilters:QueryFilterInstanceResource[] = this.relationFiltersOf(this.wpTableFilters.current) as QueryFilterInstanceResource[]; if (currentRelationFilters.length > 0) { this.selectedRelationFilter = _.find(this.availableRelationFilters, { id: currentRelationFilters[0].id }) as QueryFilterResource; } else { @@ -90,7 +90,7 @@ export class WpTableConfigurationRelationSelectorComponent implements OnInit { } private removeRelationFiltersFromCurrentState() { - let filtersToRemove = this.relationFiltersOf(this.wpTableFilters.current) as QueryFilterInstanceResource[]; + const filtersToRemove = this.relationFiltersOf(this.wpTableFilters.current) as QueryFilterInstanceResource[]; this.wpTableFilters.remove(...filtersToRemove); } @@ -99,16 +99,16 @@ export class WpTableConfigurationRelationSelectorComponent implements OnInit { } private addFilterToCurrentState(filter:QueryFilterResource):void { - let newFilter = this.wpTableFilters.instantiate(filter); - let operator:QueryOperatorResource = this.getOperatorForId(newFilter, '='); + const newFilter = this.wpTableFilters.instantiate(filter); + const operator:QueryOperatorResource = this.getOperatorForId(newFilter, '='); newFilter.operator = operator; - newFilter.values = [{href: '/api/v3/work_packages/{id}'}] as HalResource[]; + newFilter.values = [{ href: '/api/v3/work_packages/{id}' }] as HalResource[]; this.wpTableFilters.add(newFilter); } private getOperatorForId(filter:QueryFilterResource, id:string):QueryOperatorResource { - return _.find(this.schemaCache.of(filter).availableOperators, { 'id': id}) as QueryOperatorResource; + return _.find(this.schemaCache.of(filter).availableOperators, { 'id': id }) as QueryOperatorResource; } public compareRelationFilters(f1:undefined|QueryFilterResource, f2:undefined|QueryFilterResource):boolean { diff --git a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.modal.ts b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.modal.ts index b489a5a7a7e..6c8fe0f0d3e 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.modal.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.modal.ts @@ -13,26 +13,26 @@ import { Optional, ViewChild } from '@angular/core'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {WorkPackageViewColumnsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; -import {WpTableConfigurationService} from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { WorkPackageViewColumnsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; +import { WpTableConfigurationService } from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; import { ActiveTabInterface, TabComponent, TabInterface, TabPortalOutlet } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {WorkPackageStatesInitializationService} from 'core-components/wp-list/wp-states-initialization.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {QueryFormResource} from 'core-app/modules/hal/resources/query-form-resource'; -import {LoadingIndicatorService} from 'core-app/modules/common/loading-indicator/loading-indicator.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalComponent} from 'core-app/modules/modal/modal.component'; -import {OpModalLocalsMap} from 'core-app/modules/modal/modal.types'; -import {ComponentType} from "@angular/cdk/portal"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageStatesInitializationService } from 'core-components/wp-list/wp-states-initialization.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { QueryFormResource } from 'core-app/modules/hal/resources/query-form-resource'; +import { LoadingIndicatorService } from 'core-app/modules/common/loading-indicator/loading-indicator.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalComponent } from 'core-app/modules/modal/modal.component'; +import { OpModalLocalsMap } from 'core-app/modules/modal/modal.types'; +import { ComponentType } from "@angular/cdk/portal"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export const WpTableConfigurationModalPrependToken = new InjectionToken>('WpTableConfigurationModalPrependComponent'); @@ -160,10 +160,10 @@ export class WpTableConfigurationModalComponent extends OpModalComponent impleme .load(query) .toPromise() .then(([form, _]) => { - this.wpStatesInitialization.updateStatesFromForm(query, form); + this.wpStatesInitialization.updateStatesFromForm(query, form); - return form; - }) + return form; + }) .catch((error) => this.notificationService.handleRawError(error)); } } diff --git a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.service.ts b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.service.ts index 3c7c42ddee0..96180a7f90b 100644 --- a/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.service.ts +++ b/frontend/src/app/components/wp-table/configuration-modal/wp-table-configuration.service.ts @@ -1,12 +1,12 @@ -import {Injectable} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WpTableConfigurationDisplaySettingsTab} from 'core-components/wp-table/configuration-modal/tabs/display-settings-tab.component'; -import {TabInterface} from "core-components/wp-table/configuration-modal/tab-portal-outlet"; -import {WpTableConfigurationColumnsTab} from "core-components/wp-table/configuration-modal/tabs/columns-tab.component"; -import {WpTableConfigurationFiltersTab} from "core-components/wp-table/configuration-modal/tabs/filters-tab.component"; -import {WpTableConfigurationSortByTab} from "core-components/wp-table/configuration-modal/tabs/sort-by-tab.component"; -import {WpTableConfigurationTimelinesTab} from "core-components/wp-table/configuration-modal/tabs/timelines-tab.component"; -import {WpTableConfigurationHighlightingTab} from "core-components/wp-table/configuration-modal/tabs/highlighting-tab.component"; +import { Injectable } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WpTableConfigurationDisplaySettingsTab } from 'core-components/wp-table/configuration-modal/tabs/display-settings-tab.component'; +import { TabInterface } from "core-components/wp-table/configuration-modal/tab-portal-outlet"; +import { WpTableConfigurationColumnsTab } from "core-components/wp-table/configuration-modal/tabs/columns-tab.component"; +import { WpTableConfigurationFiltersTab } from "core-components/wp-table/configuration-modal/tabs/filters-tab.component"; +import { WpTableConfigurationSortByTab } from "core-components/wp-table/configuration-modal/tabs/sort-by-tab.component"; +import { WpTableConfigurationTimelinesTab } from "core-components/wp-table/configuration-modal/tabs/timelines-tab.component"; +import { WpTableConfigurationHighlightingTab } from "core-components/wp-table/configuration-modal/tabs/highlighting-tab.component"; @Injectable() export class WpTableConfigurationService { diff --git a/frontend/src/app/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts b/frontend/src/app/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts index ec1da4e2eab..3aa0d1497de 100644 --- a/frontend/src/app/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts +++ b/frontend/src/app/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts @@ -25,14 +25,14 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {Injectable} from "@angular/core"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {UrlParamsHelperService} from 'core-components/wp-query/url-params-helper'; -import {HookService} from "core-app/modules/plugins/hook-service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {WorkPackageViewHierarchyIdentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; -import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { Injectable } from "@angular/core"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { UrlParamsHelperService } from 'core-components/wp-query/url-params-helper'; +import { HookService } from "core-app/modules/plugins/hook-service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageViewHierarchyIdentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; +import { WorkPackageViewDisplayRepresentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; export type WorkPackageAction = { text:string; @@ -82,7 +82,7 @@ export class WorkPackageContextMenuHelperService { } public getPermittedActionLinks(workPackage:WorkPackageResource, permittedActionConstants:any, allowSplitScreenActions:boolean):WorkPackageAction[] { - let singularPermittedActions:any[] = []; + const singularPermittedActions:any[] = []; let allowedActions = this.getAllowedActions(workPackage, permittedActionConstants); @@ -103,9 +103,9 @@ export class WorkPackageContextMenuHelperService { } public getIntersectOfPermittedActions(workPackages:any) { - let bulkPermittedActions:any = []; + const bulkPermittedActions:any = []; - let permittedActions = _.filter(this.BULK_ACTIONS, (action:any) => { + const permittedActions = _.filter(this.BULK_ACTIONS, (action:any) => { return _.every(workPackages, (workPackage:WorkPackageResource) => { return this.getAllowedActions(workPackage, [action]).length >= 1; }); @@ -123,22 +123,22 @@ export class WorkPackageContextMenuHelperService { } public getBulkActionLink(action:any, workPackages:any) { - let workPackageIdParams = { + const workPackageIdParams = { 'ids[]': workPackages.map(function(wp:any) { return wp.id; }) }; - let serializedIdParams = this.UrlParamsHelper.buildQueryString(workPackageIdParams); + const serializedIdParams = this.UrlParamsHelper.buildQueryString(workPackageIdParams); - let linkAndQueryString = action.href.split('?'); - let link = linkAndQueryString.shift(); - let queryParts = linkAndQueryString.concat(new Array(serializedIdParams)); + const linkAndQueryString = action.href.split('?'); + const link = linkAndQueryString.shift(); + const queryParts = linkAndQueryString.concat(new Array(serializedIdParams)); return link + '?' + queryParts.join('&'); } private getAllowedActions(workPackage:WorkPackageResource, actions:WorkPackageAction[]):WorkPackageAction[] { - let allowedActions:WorkPackageAction[] = []; + const allowedActions:WorkPackageAction[] = []; _.each(actions, (action) => { if (action.link && workPackage.hasOwnProperty(action.link)) { @@ -149,7 +149,7 @@ export class WorkPackageContextMenuHelperService { _.each(this.HookService.call('workPackageTableContextMenu'), (action) => { if (workPackage.hasOwnProperty(action.link)) { - let index = action.indexBy ? action.indexBy(allowedActions) : allowedActions.length; + const index = action.indexBy ? action.indexBy(allowedActions) : allowedActions.length; allowedActions.splice(index, 0, action); } }); @@ -158,7 +158,7 @@ export class WorkPackageContextMenuHelperService { } private getAllowedParentActions(workPackage:WorkPackageResource) { - let actions:WorkPackageAction[] = []; + const actions:WorkPackageAction[] = []; // Do not add these actions unless we're in the table if (!this.wpViewRepresentation.isList) { @@ -187,7 +187,7 @@ export class WorkPackageContextMenuHelperService { } private getAllowedRelationActions(workPackage:WorkPackageResource, allowSplitScreenActions:boolean) { - let allowedActions:WorkPackageAction[] = []; + const allowedActions:WorkPackageAction[] = []; if (workPackage.addRelation && this.wpViewTimeline.isVisible) { allowedActions.push({ diff --git a/frontend/src/app/components/wp-table/drag-and-drop/actions/group-by-drag-action.service.ts b/frontend/src/app/components/wp-table/drag-and-drop/actions/group-by-drag-action.service.ts index 50e98dc0cae..8ae3a47ee18 100644 --- a/frontend/src/app/components/wp-table/drag-and-drop/actions/group-by-drag-action.service.ts +++ b/frontend/src/app/components/wp-table/drag-and-drop/actions/group-by-drag-action.service.ts @@ -1,15 +1,15 @@ -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {TableDragActionService} from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; -import {WorkPackageViewGroupByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { TableDragActionService } from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; +import { WorkPackageViewGroupByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {rowGroupClassName} from "core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants"; -import {locatePredecessorBySelector} from "core-components/wp-fast-table/helpers/wp-table-row-helpers"; -import {groupIdentifier} from "core-components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { rowGroupClassName } from "core-components/wp-fast-table/builders/modes/grouped/grouped-classes.constants"; +import { locatePredecessorBySelector } from "core-components/wp-fast-table/helpers/wp-table-row-helpers"; +import { groupIdentifier } from "core-components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; export class GroupByDragActionService extends TableDragActionService { @@ -38,7 +38,7 @@ export class GroupByDragActionService extends TableDragActionService { changeset.projectedResource[this.groupedAttribute!] = groupedValue; return this.halEditing .save(changeset) - .then((saved) => this.halEvents.push(saved.resource, {eventType: 'updated'})) + .then((saved) => this.halEvents.push(saved.resource, { eventType: 'updated' })) .catch(e => this.halNotification.handleRawError(e, workPackage)); } diff --git a/frontend/src/app/components/wp-table/drag-and-drop/actions/hierarchy-drag-action.service.ts b/frontend/src/app/components/wp-table/drag-and-drop/actions/hierarchy-drag-action.service.ts index e7008ee98cc..162a311c543 100644 --- a/frontend/src/app/components/wp-table/drag-and-drop/actions/hierarchy-drag-action.service.ts +++ b/frontend/src/app/components/wp-table/drag-and-drop/actions/hierarchy-drag-action.service.ts @@ -1,14 +1,14 @@ -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {TableDragActionService} from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageRelationsHierarchyService} from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { TableDragActionService } from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageRelationsHierarchyService } from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; import { hierarchyGroupClass, hierarchyRootClass } from "core-components/wp-fast-table/helpers/wp-table-hierarchy-helpers"; -import {relationRowClass, isInsideCollapsedGroup} from "core-components/wp-fast-table/helpers/wp-table-row-helpers"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { relationRowClass, isInsideCollapsedGroup } from "core-components/wp-fast-table/helpers/wp-table-row-helpers"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export class HierarchyDragActionService extends TableDragActionService { @@ -39,7 +39,7 @@ export class HierarchyDragActionService extends TableDragActionService { */ private determineParent(el:Element):Promise { let previous = el.previousElementSibling; - let next = el.nextElementSibling; + const next = el.nextElementSibling; let parent = null; if (previous !== null && this.droppedIntoGroup(el, previous, next)) { @@ -48,14 +48,14 @@ export class HierarchyDragActionService extends TableDragActionService { const isRelationRow = previous.className.indexOf(relationRowClass()) >= 0; if (isRelationRow) { - let relationRoot = this.findRelationRowRoot(previous); + const relationRoot = this.findRelationRowRoot(previous); if (relationRoot == null) { return Promise.resolve(null); } previous = relationRoot; } - let previousWpId = (previous as HTMLElement).dataset.workPackageId!; + const previousWpId = (previous as HTMLElement).dataset.workPackageId!; if (this.isHiearchyRoot(previous, previousWpId)) { const droppedIntoCollapsedGroup = isInsideCollapsedGroup(next); diff --git a/frontend/src/app/components/wp-table/drag-and-drop/actions/table-drag-action.service.ts b/frontend/src/app/components/wp-table/drag-and-drop/actions/table-drag-action.service.ts index 17651c7e3b1..8d06fb6b702 100644 --- a/frontend/src/app/components/wp-table/drag-and-drop/actions/table-drag-action.service.ts +++ b/frontend/src/app/components/wp-table/drag-and-drop/actions/table-drag-action.service.ts @@ -1,6 +1,6 @@ -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {Injector} from "@angular/core"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { Injector } from "@angular/core"; export class TableDragActionService { @@ -51,7 +51,7 @@ export class TableDragActionService { * @param shadowElement * @param backToDefault: Shall the modifications be made undone */ - public changeShadowElement(shadowElement:HTMLElement, backToDefault:boolean = false) { + public changeShadowElement(shadowElement:HTMLElement, backToDefault = false) { if (backToDefault) { shadowElement.classList.remove('-dragged'); } else { diff --git a/frontend/src/app/components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service.ts b/frontend/src/app/components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service.ts index 6b08b5d5dac..119052d4274 100644 --- a/frontend/src/app/components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service.ts +++ b/frontend/src/app/components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service.ts @@ -1,8 +1,8 @@ -import {Injectable, Injector} from "@angular/core"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {TableDragActionService} from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; -import {HierarchyDragActionService} from "core-components/wp-table/drag-and-drop/actions/hierarchy-drag-action.service"; -import {GroupByDragActionService} from "core-components/wp-table/drag-and-drop/actions/group-by-drag-action.service"; +import { Injectable, Injector } from "@angular/core"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { TableDragActionService } from "core-components/wp-table/drag-and-drop/actions/table-drag-action.service"; +import { HierarchyDragActionService } from "core-components/wp-table/drag-and-drop/actions/hierarchy-drag-action.service"; +import { GroupByDragActionService } from "core-components/wp-table/drag-and-drop/actions/group-by-drag-action.service"; interface ITableDragActionService { new(querySpace:IsolatedQuerySpace, injector:Injector):TableDragActionService; diff --git a/frontend/src/app/components/wp-table/embedded/embedded-tables-macro.component.ts b/frontend/src/app/components/wp-table/embedded/embedded-tables-macro.component.ts index d34c524040f..8e2c57ddd4d 100644 --- a/frontend/src/app/components/wp-table/embedded/embedded-tables-macro.component.ts +++ b/frontend/src/app/components/wp-table/embedded/embedded-tables-macro.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ Ng1FieldControlsWrapper, -import {Component, ElementRef} from "@angular/core"; -import {WorkPackageTableConfigurationObject} from "core-components/wp-table/wp-table-configuration"; +import { Component, ElementRef } from "@angular/core"; +import { WorkPackageTableConfigurationObject } from "core-components/wp-table/wp-table-configuration"; export const wpEmbeddedTableMacroSelector = 'macro.embedded-table'; diff --git a/frontend/src/app/components/wp-table/embedded/wp-embedded-base.component.ts b/frontend/src/app/components/wp-table/embedded/wp-embedded-base.component.ts index 5ad5a8d830b..e138e44eebf 100644 --- a/frontend/src/app/components/wp-table/embedded/wp-embedded-base.component.ts +++ b/frontend/src/app/components/wp-table/embedded/wp-embedded-base.component.ts @@ -1,31 +1,31 @@ -import {AfterViewInit, ChangeDetectorRef, Directive, Input, SimpleChanges} from '@angular/core'; -import {CurrentProjectService} from '../../projects/current-project.service'; -import {WorkPackageStatesInitializationService} from '../../wp-list/wp-states-initialization.service'; +import { AfterViewInit, ChangeDetectorRef, Directive, Input, SimpleChanges } from '@angular/core'; +import { CurrentProjectService } from '../../projects/current-project.service'; +import { WorkPackageStatesInitializationService } from '../../wp-list/wp-states-initialization.service'; import { WorkPackageTableConfiguration, WorkPackageTableConfigurationObject } from 'core-components/wp-table/wp-table-configuration'; -import {LoadingIndicatorService} from 'core-app/modules/common/loading-indicator/loading-indicator.service'; -import {UrlParamsHelperService} from 'core-components/wp-query/url-params-helper'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackagesViewBase} from "core-app/modules/work_packages/routing/wp-view-base/work-packages-view.base"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { LoadingIndicatorService } from 'core-app/modules/common/loading-indicator/loading-indicator.service'; +import { UrlParamsHelperService } from 'core-components/wp-query/url-params-helper'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackagesViewBase } from "core-app/modules/work_packages/routing/wp-view-base/work-packages-view.base"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Directive() export abstract class WorkPackageEmbeddedBaseComponent extends WorkPackagesViewBase implements AfterViewInit { @Input('configuration') protected providedConfiguration:WorkPackageTableConfigurationObject; - @Input() public uniqueEmbeddedTableName:string = `embedded-table-${Date.now()}`; - @Input() public initialLoadingIndicator:boolean = true; + @Input() public uniqueEmbeddedTableName = `embedded-table-${Date.now()}`; + @Input() public initialLoadingIndicator = true; public renderTable = false; public showTablePagination = false; public configuration:WorkPackageTableConfiguration; public error:string|null = null; - protected initialized:boolean = false; + protected initialized = false; @InjectField() apiV3Service:APIV3Service; @InjectField() querySpace:IsolatedQuerySpace; @@ -83,7 +83,7 @@ export abstract class WorkPackageEmbeddedBaseComponent extends WorkPackagesViewB this.cdRef.detectChanges(); } - public refresh(visible:boolean = true, firstPage:boolean = false):Promise { + public refresh(visible = true, firstPage = false):Promise { const query = this.querySpace.query.value!; const pagination = this.wpTablePagination.paginationObject; diff --git a/frontend/src/app/components/wp-table/embedded/wp-embedded-table-entry.component.ts b/frontend/src/app/components/wp-table/embedded/wp-embedded-table-entry.component.ts index bf9135148d4..6c626b95384 100644 --- a/frontend/src/app/components/wp-table/embedded/wp-embedded-table-entry.component.ts +++ b/frontend/src/app/components/wp-table/embedded/wp-embedded-table-entry.component.ts @@ -1,4 +1,4 @@ -import {Component, ElementRef, Input, OnInit} from '@angular/core'; +import { Component, ElementRef, Input, OnInit } from '@angular/core'; export const wpTableEntrySelector = 'wp-embedded-table-entry'; @@ -16,7 +16,7 @@ export const wpTableEntrySelector = 'wp-embedded-table-entry'; export class WorkPackageEmbeddedTableEntryComponent implements OnInit { @Input() public queryProps:any; @Input() public configuration:any; - @Input() public initialLoadingIndicator:boolean = true; + @Input() public initialLoadingIndicator = true; constructor(readonly elementRef:ElementRef) { } diff --git a/frontend/src/app/components/wp-table/embedded/wp-embedded-table.component.ts b/frontend/src/app/components/wp-table/embedded/wp-embedded-table.component.ts index bf381fbb8dc..5c04bfb451d 100644 --- a/frontend/src/app/components/wp-table/embedded/wp-embedded-table.component.ts +++ b/frontend/src/app/components/wp-table/embedded/wp-embedded-table.component.ts @@ -1,17 +1,17 @@ -import {AfterViewInit, Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core'; -import {WorkPackageViewTimelineService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service'; -import {WorkPackageViewPaginationService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service'; -import {OpTableActionFactory} from 'core-components/wp-table/table-actions/table-action'; -import {OpTableActionsService} from 'core-components/wp-table/table-actions/table-actions.service'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {WpTableConfigurationModalComponent} from 'core-components/wp-table/configuration-modal/wp-table-configuration.modal'; -import {OpModalService} from 'core-app/modules/modal/modal.service'; -import {WorkPackageEmbeddedBaseComponent} from "core-components/wp-table/embedded/wp-embedded-base.component"; -import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource"; -import {distinctUntilChanged, map, take, withLatestFrom} from "rxjs/operators"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {KeepTabService} from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { AfterViewInit, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; +import { WorkPackageViewTimelineService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service'; +import { WorkPackageViewPaginationService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service'; +import { OpTableActionFactory } from 'core-components/wp-table/table-actions/table-action'; +import { OpTableActionsService } from 'core-components/wp-table/table-actions/table-actions.service'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { WpTableConfigurationModalComponent } from 'core-components/wp-table/configuration-modal/wp-table-configuration.modal'; +import { OpModalService } from 'core-app/modules/modal/modal.service'; +import { WorkPackageEmbeddedBaseComponent } from "core-components/wp-table/embedded/wp-embedded-base.component"; +import { QueryFormResource } from "core-app/modules/hal/resources/query-form-resource"; +import { distinctUntilChanged, map, take, withLatestFrom } from "rxjs/operators"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { KeepTabService } from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'wp-embedded-table', @@ -21,7 +21,7 @@ export class WorkPackageEmbeddedTableComponent extends WorkPackageEmbeddedBaseCo @Input('queryId') public queryId?:string; @Input('queryProps') public queryProps:any = {}; @Input() public tableActions:OpTableActionFactory[] = []; - @Input() public externalHeight:boolean = false; + @Input() public externalHeight = false; /** Inform about loading errors */ @Output() public onError = new EventEmitter(); @@ -68,13 +68,13 @@ export class WorkPackageEmbeddedTableComponent extends WorkPackageEmbeddedBaseCo const pagination = this.wpTablePagination.paginationObject; const params = this.urlParamsHelper.buildV3GetQueryFromQueryResource(query, pagination); - this.loadingIndicator = + this.loadingIndicator = this .wpListService .loadQueryFromExisting(query, params, this.queryProjectScope) .toPromise() .then((query) => this.initializeStates(query)); - }); + }); } public openConfigurationModal(onUpdated:() => void) { @@ -133,7 +133,7 @@ export class WorkPackageEmbeddedTableComponent extends WorkPackageEmbeddedBaseCo .catch(() => this.formPromise = undefined); } - public loadQuery(visible:boolean = true, firstPage:boolean = false):Promise { + public loadQuery(visible = true, firstPage = false):Promise { // Ensure we are loading the form. this.formPromise = undefined; diff --git a/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.component.ts b/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.component.ts index 1e5ac992ab1..ad51aad5b63 100644 --- a/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.component.ts +++ b/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.component.ts @@ -1,9 +1,9 @@ -import {AfterViewInit, ChangeDetectorRef, Component, Inject, OnInit, ViewChild} from '@angular/core'; -import {WorkPackageEmbeddedTableComponent} from 'core-components/wp-table/embedded/wp-embedded-table.component'; -import {WpTableConfigurationService} from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; -import {RestrictedWpTableConfigurationService} from 'core-components/wp-table/external-configuration/restricted-wp-table-configuration.service'; -import {OpQueryConfigurationLocalsToken} from "core-components/wp-table/external-configuration/external-query-configuration.constants"; -import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; +import { AfterViewInit, ChangeDetectorRef, Component, Inject, OnInit, ViewChild } from '@angular/core'; +import { WorkPackageEmbeddedTableComponent } from 'core-components/wp-table/embedded/wp-embedded-table.component'; +import { WpTableConfigurationService } from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; +import { RestrictedWpTableConfigurationService } from 'core-components/wp-table/external-configuration/restricted-wp-table-configuration.service'; +import { OpQueryConfigurationLocalsToken } from "core-components/wp-table/external-configuration/external-query-configuration.constants"; +import { UrlParamsHelperService } from "core-components/wp-query/url-params-helper"; export interface QueryConfigurationLocals { service:any; diff --git a/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.constants.ts b/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.constants.ts index 8616fdc876a..1cb2916817e 100644 --- a/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.constants.ts +++ b/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.constants.ts @@ -1,3 +1,3 @@ -import {InjectionToken} from "@angular/core"; +import { InjectionToken } from "@angular/core"; export const OpQueryConfigurationLocalsToken = new InjectionToken('OpQueryConfigurationLocalsToken'); diff --git a/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.service.ts b/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.service.ts index b4450da3f31..01237af6b9c 100644 --- a/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.service.ts +++ b/frontend/src/app/components/wp-table/external-configuration/external-query-configuration.service.ts @@ -1,12 +1,12 @@ -import {ApplicationRef, ComponentFactoryResolver, Injectable, Injector} from '@angular/core'; -import {ComponentPortal, DomPortalOutlet, PortalInjector} from '@angular/cdk/portal'; -import {TransitionService} from '@uirouter/core'; -import {FocusHelperService} from 'core-app/modules/common/focus/focus-helper'; +import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector } from '@angular/core'; +import { ComponentPortal, DomPortalOutlet, PortalInjector } from '@angular/cdk/portal'; +import { TransitionService } from '@uirouter/core'; +import { FocusHelperService } from 'core-app/modules/common/focus/focus-helper'; import { ExternalQueryConfigurationComponent, QueryConfigurationLocals } from "core-components/wp-table/external-configuration/external-query-configuration.component"; -import {OpQueryConfigurationLocalsToken} from "core-components/wp-table/external-configuration/external-query-configuration.constants"; +import { OpQueryConfigurationLocalsToken } from "core-components/wp-table/external-configuration/external-query-configuration.constants"; export type Class = { new(...args:any[]):any; }; diff --git a/frontend/src/app/components/wp-table/external-configuration/external-relation-query-configuration.component.ts b/frontend/src/app/components/wp-table/external-configuration/external-relation-query-configuration.component.ts index 63726dce91e..1742959e13b 100644 --- a/frontend/src/app/components/wp-table/external-configuration/external-relation-query-configuration.component.ts +++ b/frontend/src/app/components/wp-table/external-configuration/external-relation-query-configuration.component.ts @@ -1,11 +1,11 @@ import { Component, } from '@angular/core'; -import {WpTableConfigurationService} from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; -import {RestrictedWpTableConfigurationService} from 'core-components/wp-table/external-configuration/restricted-wp-table-configuration.service'; -import {WpTableConfigurationRelationSelectorComponent} from "core-components/wp-table/configuration-modal/wp-table-configuration-relation-selector"; -import {WpTableConfigurationModalPrependToken} from "core-components/wp-table/configuration-modal/wp-table-configuration.modal"; -import {ExternalQueryConfigurationComponent} from "core-components/wp-table/external-configuration/external-query-configuration.component"; +import { WpTableConfigurationService } from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; +import { RestrictedWpTableConfigurationService } from 'core-components/wp-table/external-configuration/restricted-wp-table-configuration.service'; +import { WpTableConfigurationRelationSelectorComponent } from "core-components/wp-table/configuration-modal/wp-table-configuration-relation-selector"; +import { WpTableConfigurationModalPrependToken } from "core-components/wp-table/configuration-modal/wp-table-configuration.modal"; +import { ExternalQueryConfigurationComponent } from "core-components/wp-table/external-configuration/external-query-configuration.component"; @Component({ templateUrl: './external-query-configuration.template.html', diff --git a/frontend/src/app/components/wp-table/external-configuration/external-relation-query-configuration.service.ts b/frontend/src/app/components/wp-table/external-configuration/external-relation-query-configuration.service.ts index 87f38b3e893..9bba5da32ff 100644 --- a/frontend/src/app/components/wp-table/external-configuration/external-relation-query-configuration.service.ts +++ b/frontend/src/app/components/wp-table/external-configuration/external-relation-query-configuration.service.ts @@ -1,9 +1,9 @@ -import {Injectable} from '@angular/core'; +import { Injectable } from '@angular/core'; import { Class, ExternalQueryConfigurationService } from "core-components/wp-table/external-configuration/external-query-configuration.service"; -import {ExternalRelationQueryConfigurationComponent} from "core-components/wp-table/external-configuration/external-relation-query-configuration.component"; +import { ExternalRelationQueryConfigurationComponent } from "core-components/wp-table/external-configuration/external-relation-query-configuration.component"; @Injectable() export class ExternalRelationQueryConfigurationService extends ExternalQueryConfigurationService { diff --git a/frontend/src/app/components/wp-table/external-configuration/restricted-wp-table-configuration.service.ts b/frontend/src/app/components/wp-table/external-configuration/restricted-wp-table-configuration.service.ts index 38deb0eb026..16186da6e65 100644 --- a/frontend/src/app/components/wp-table/external-configuration/restricted-wp-table-configuration.service.ts +++ b/frontend/src/app/components/wp-table/external-configuration/restricted-wp-table-configuration.service.ts @@ -1,9 +1,9 @@ -import {Inject, Injectable} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {TabInterface} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {WpTableConfigurationService} from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; -import {QueryConfigurationLocals} from 'core-components/wp-table/external-configuration/external-query-configuration.component'; -import {OpQueryConfigurationLocalsToken} from "core-components/wp-table/external-configuration/external-query-configuration.constants"; +import { Inject, Injectable } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { TabInterface } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { WpTableConfigurationService } from 'core-components/wp-table/configuration-modal/wp-table-configuration.service'; +import { QueryConfigurationLocals } from 'core-components/wp-table/external-configuration/external-query-configuration.component'; +import { OpQueryConfigurationLocalsToken } from "core-components/wp-table/external-configuration/external-query-configuration.constants"; @Injectable() export class RestrictedWpTableConfigurationService extends WpTableConfigurationService { diff --git a/frontend/src/app/components/wp-table/sort-header/sort-header.directive.ts b/frontend/src/app/components/wp-table/sort-header/sort-header.directive.ts index fe5fafe254c..7583f003283 100644 --- a/frontend/src/app/components/wp-table/sort-header/sort-header.directive.ts +++ b/frontend/src/app/components/wp-table/sort-header/sort-header.directive.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, Input} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {RelationQueryColumn, TypeRelationQueryColumn} from 'core-components/wp-query/query-column'; -import {WorkPackageTable} from 'core-components/wp-fast-table/wp-fast-table'; -import {QUERY_SORT_BY_ASC, QUERY_SORT_BY_DESC} from 'core-app/modules/hal/resources/query-sort-by-resource'; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {WorkPackageViewGroupByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; -import {WorkPackageViewRelationColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {combineLatest} from "rxjs"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, Input } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { RelationQueryColumn, TypeRelationQueryColumn } from 'core-components/wp-query/query-column'; +import { WorkPackageTable } from 'core-components/wp-fast-table/wp-fast-table'; +import { QUERY_SORT_BY_ASC, QUERY_SORT_BY_DESC } from 'core-app/modules/hal/resources/query-sort-by-resource'; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { WorkPackageViewGroupByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; +import { WorkPackageViewRelationColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; +import { combineLatest } from "rxjs"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Component({ @@ -100,7 +100,7 @@ export class SortHeaderDirective extends UntilDestroyedMixin implements AfterVie this.untilDestroyed() ) .subscribe(() => { - let latestSortElement = this.wpTableSortBy.current[0]; + const latestSortElement = this.wpTableSortBy.current[0]; if (!latestSortElement || this.headerColumn.$href !== latestSortElement.column.$href) { this.currentSortDirection = null; @@ -201,12 +201,12 @@ export class SortHeaderDirective extends UntilDestroyedMixin implements AfterVie } switch (this.currentSortDirection.$href) { - case QUERY_SORT_BY_ASC: - return 'asc'; - case QUERY_SORT_BY_DESC: - return 'desc'; - default: - return ''; + case QUERY_SORT_BY_ASC: + return 'asc'; + case QUERY_SORT_BY_DESC: + return 'desc'; + default: + return ''; } } diff --git a/frontend/src/app/components/wp-table/table-actions/actions/context-menu-table-action.ts b/frontend/src/app/components/wp-table/table-actions/actions/context-menu-table-action.ts index ecde2015eb4..c4e3ad56d86 100644 --- a/frontend/src/app/components/wp-table/table-actions/actions/context-menu-table-action.ts +++ b/frontend/src/app/components/wp-table/table-actions/actions/context-menu-table-action.ts @@ -3,7 +3,7 @@ import { contextMenuLinkClassName, OpTableAction } from 'core-components/wp-table/table-actions/table-action'; -import {opIconElement} from 'core-app/helpers/op-icon-builder'; +import { opIconElement } from 'core-app/helpers/op-icon-builder'; export class OpContextMenuTableAction extends OpTableAction { @@ -14,7 +14,7 @@ export class OpContextMenuTableAction extends OpTableAction { }; public buildElement() { - let contextMenu = document.createElement('a'); + const contextMenu = document.createElement('a'); contextMenu.href = '#'; contextMenu.classList.add(contextMenuLinkClassName, contextColumnIcon); contextMenu.title = this.text.linkTitle; diff --git a/frontend/src/app/components/wp-table/table-actions/actions/details-table-action.ts b/frontend/src/app/components/wp-table/table-actions/actions/details-table-action.ts index cb889183b52..b6683dd445a 100644 --- a/frontend/src/app/components/wp-table/table-actions/actions/details-table-action.ts +++ b/frontend/src/app/components/wp-table/table-actions/actions/details-table-action.ts @@ -1,9 +1,9 @@ -import {contextColumnIcon, OpTableAction} from 'core-components/wp-table/table-actions/table-action'; -import {opIconElement} from 'core-app/helpers/op-icon-builder'; +import { contextColumnIcon, OpTableAction } from 'core-components/wp-table/table-actions/table-action'; +import { opIconElement } from 'core-app/helpers/op-icon-builder'; -import {KeepTabService} from 'core-components/wp-single-view-tabs/keep-tab/keep-tab.service'; -import {UiStateLinkBuilder} from 'core-components/wp-fast-table/builders/ui-state-link-builder'; -import {StateService} from "@uirouter/core"; +import { KeepTabService } from 'core-components/wp-single-view-tabs/keep-tab/keep-tab.service'; +import { UiStateLinkBuilder } from 'core-components/wp-fast-table/builders/ui-state-link-builder'; +import { StateService } from "@uirouter/core"; export const detailsLinkClassName = 'wp-table--details-link'; @@ -13,11 +13,11 @@ export class OpDetailsTableAction extends OpTableAction { private uiStatebuilder = new UiStateLinkBuilder(this.injector.get(StateService), this.injector.get(KeepTabService)); private text = { button: this.I18n.t('js.button_open_details') - } + }; public buildElement() { // Append details button - let detailsLink = this.uiStatebuilder.linkToDetails( + const detailsLink = this.uiStatebuilder.linkToDetails( this.workPackage.id!, this.text.button, '' diff --git a/frontend/src/app/components/wp-table/table-actions/actions/unlink-table-action.ts b/frontend/src/app/components/wp-table/table-actions/actions/unlink-table-action.ts index bf7c7797077..064d2db5d72 100644 --- a/frontend/src/app/components/wp-table/table-actions/actions/unlink-table-action.ts +++ b/frontend/src/app/components/wp-table/table-actions/actions/unlink-table-action.ts @@ -3,9 +3,9 @@ import { OpTableAction, OpTableActionFactory, } from 'core-components/wp-table/table-actions/table-action'; -import {opIconElement} from 'core-app/helpers/op-icon-builder'; -import {Injector} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { opIconElement } from 'core-app/helpers/op-icon-builder'; +import { Injector } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; export class OpUnlinkTableAction extends OpTableAction { @@ -27,9 +27,9 @@ export class OpUnlinkTableAction extends OpTableAction { * @param {string} title */ public static factoryFor(identifier:string, - title:string, - onClick:(workPackage:WorkPackageResource) => void, - applicable:(workPackage:WorkPackageResource) => boolean = () => true):OpTableActionFactory { + title:string, + onClick:(workPackage:WorkPackageResource) => void, + applicable:(workPackage:WorkPackageResource) => boolean = () => true):OpTableActionFactory { return (injector:Injector, workPackage:WorkPackageResource) => { return new OpUnlinkTableAction(injector, workPackage, @@ -45,7 +45,7 @@ export class OpUnlinkTableAction extends OpTableAction { return null; } - let element = document.createElement('a'); + const element = document.createElement('a'); element.title = this.title; element.href = '#'; element.classList.add(contextColumnIcon, 'wp-table-action--unlink'); diff --git a/frontend/src/app/components/wp-table/table-actions/table-action.ts b/frontend/src/app/components/wp-table/table-actions/table-action.ts index e5df4d801a3..57d6f81cd46 100644 --- a/frontend/src/app/components/wp-table/table-actions/table-action.ts +++ b/frontend/src/app/components/wp-table/table-actions/table-action.ts @@ -1,7 +1,7 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export type OpTableActionFactory = (i:Injector, wp:WorkPackageResource) => OpTableAction; export const contextMenuTdClassName = 'wp-table--context-menu-td'; diff --git a/frontend/src/app/components/wp-table/table-actions/table-actions.service.ts b/frontend/src/app/components/wp-table/table-actions/table-actions.service.ts index 0814e8d382d..b3b198660dc 100644 --- a/frontend/src/app/components/wp-table/table-actions/table-actions.service.ts +++ b/frontend/src/app/components/wp-table/table-actions/table-actions.service.ts @@ -1,10 +1,10 @@ -import {Injectable, Injector} from '@angular/core'; +import { Injectable, Injector } from '@angular/core'; import { OpTableActionFactory, } from 'core-components/wp-table/table-actions/table-action'; -import {OpDetailsTableAction} from 'core-components/wp-table/table-actions/actions/details-table-action'; -import {OpContextMenuTableAction} from 'core-components/wp-table/table-actions/actions/context-menu-table-action'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { OpDetailsTableAction } from 'core-components/wp-table/table-actions/actions/details-table-action'; +import { OpContextMenuTableAction } from 'core-components/wp-table/table-actions/actions/context-menu-table-action'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; @Injectable() export class OpTableActionsService { @@ -32,7 +32,7 @@ export class OpTableActionsService { * @param {WorkPackageResource} workPackage */ public render(workPackage:WorkPackageResource):HTMLElement[] { - let built = this.actions.map((factory) => factory(this.injector, workPackage).buildElement()); + const built = this.actions.map((factory) => factory(this.injector, workPackage).buildElement()); return _.compact(built); } } diff --git a/frontend/src/app/components/wp-table/table-pagination/wp-table-pagination.component.spec.ts b/frontend/src/app/components/wp-table/table-pagination/wp-table-pagination.component.spec.ts index 3d2007b6e62..1000a564435 100644 --- a/frontend/src/app/components/wp-table/table-pagination/wp-table-pagination.component.spec.ts +++ b/frontend/src/app/components/wp-table/table-pagination/wp-table-pagination.component.spec.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HttpClientModule} from '@angular/common/http'; +import { HttpClientModule } from '@angular/common/http'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; import { inject, TestBed, waitForAsync } from '@angular/core/testing'; -import {States} from 'core-components/states.service'; -import {PaginationInstance} from 'core-components/table-pagination/pagination-instance'; -import {IPaginationOptions, PaginationService} from 'core-components/table-pagination/pagination-service'; -import {WorkPackageViewPaginationService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service'; -import {WorkPackageTablePaginationComponent} from 'core-components/wp-table/table-pagination/wp-table-pagination.component'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {OpenProject} from "core-app/globals/openproject"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; -import {OpIconComponent} from "core-app/modules/common/icon/icon.component"; +import { States } from 'core-components/states.service'; +import { PaginationInstance } from 'core-components/table-pagination/pagination-instance'; +import { IPaginationOptions, PaginationService } from 'core-components/table-pagination/pagination-service'; +import { WorkPackageViewPaginationService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service'; +import { WorkPackageTablePaginationComponent } from 'core-components/wp-table/table-pagination/wp-table-pagination.component'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { OpenProject } from "core-app/globals/openproject"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; +import { OpIconComponent } from "core-app/modules/common/icon/icon.component"; function setupMocks(paginationService:PaginationService) { const options:IPaginationOptions = { diff --git a/frontend/src/app/components/wp-table/table-pagination/wp-table-pagination.component.ts b/frontend/src/app/components/wp-table/table-pagination/wp-table-pagination.component.ts index 39b29c6236c..a18db5fe7d0 100644 --- a/frontend/src/app/components/wp-table/table-pagination/wp-table-pagination.component.ts +++ b/frontend/src/app/components/wp-table/table-pagination/wp-table-pagination.component.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {TablePaginationComponent} from 'core-components/table-pagination/table-pagination.component'; -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {IPaginationOptions, PaginationService} from 'core-components/table-pagination/pagination-service'; -import {WorkPackageViewPaginationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; -import {WorkPackageViewPagination} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {combineLatest} from 'rxjs'; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; +import { TablePaginationComponent } from 'core-components/table-pagination/table-pagination.component'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { IPaginationOptions, PaginationService } from 'core-components/table-pagination/pagination-service'; +import { WorkPackageViewPaginationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; +import { WorkPackageViewPagination } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { combineLatest } from 'rxjs'; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; @Component({ templateUrl: '../../table-pagination/table-pagination.component.html', diff --git a/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts b/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts index 166db5ec6de..77929c6a860 100644 --- a/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts +++ b/frontend/src/app/components/wp-table/timeline/cells/timeline-cell-renderer.ts @@ -1,5 +1,5 @@ import * as moment from 'moment'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; import { calculatePositionValueForDayCount, calculatePositionValueForDayCountingPx, @@ -20,19 +20,19 @@ import { classNameShowOnHover, WorkPackageCellLabels } from './wp-timeline-cell'; -import {classNameBarLabel, classNameLeftHandle, classNameRightHandle} from './wp-timeline-cell-mouse-handler'; -import {WorkPackageTimelineTableController} from '../container/wp-timeline-container.directive'; -import {DisplayFieldRenderer} from 'core-app/modules/fields/display/display-field-renderer'; -import {Injector} from '@angular/core'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {HierarchyRenderPass} from "core-components/wp-fast-table/builders/modes/hierarchy/hierarchy-render-pass"; +import { classNameBarLabel, classNameLeftHandle, classNameRightHandle } from './wp-timeline-cell-mouse-handler'; +import { WorkPackageTimelineTableController } from '../container/wp-timeline-container.directive'; +import { DisplayFieldRenderer } from 'core-app/modules/fields/display/display-field-renderer'; +import { Injector } from '@angular/core'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { HierarchyRenderPass } from "core-components/wp-fast-table/builders/modes/hierarchy/hierarchy-render-pass"; import Moment = moment.Moment; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; export interface CellDateMovement { // Target values to move work package to @@ -63,8 +63,8 @@ export class TimelineCellRenderer { constructor(readonly injector:Injector, readonly workPackageTimeline:WorkPackageTimelineTableController) { this.ganttChartRowHeight = +getComputedStyle(document.documentElement) - .getPropertyValue('--table-timeline--row-height') - .replace('px', ''); + .getPropertyValue('--table-timeline--row-height') + .replace('px', ''); } public get type():string { @@ -105,8 +105,8 @@ export class TimelineCellRenderer { * */ public assignDateValues(change:WorkPackageChangeset, - labels:WorkPackageCellLabels, - dates:any):void { + labels:WorkPackageCellLabels, + dates:any):void { this.assignDate(change, 'startDate', dates.startDate); this.assignDate(change, 'dueDate', dates.dueDate); @@ -119,9 +119,9 @@ export class TimelineCellRenderer { * depending on which initial date was set. */ public onDaysMoved(change:WorkPackageChangeset, - dayUnderCursor:Moment, - delta:number, - direction:'left'|'right'|'both'|'create'|'dragright'):CellDateMovement { + dayUnderCursor:Moment, + delta:number, + direction:'left'|'right'|'both'|'create'|'dragright'):CellDateMovement { const initialStartDate = change.pristineResource.startDate; const initialDueDate = change.pristineResource.dueDate; @@ -131,7 +131,7 @@ export class TimelineCellRenderer { const startDate = moment(change.projectedResource.startDate); const dueDate = moment(change.projectedResource.dueDate); - let dates:CellDateMovement = {}; + const dates:CellDateMovement = {}; if (direction === 'left') { dates.startDate = moment(initialStartDate || initialDueDate).add(delta, 'days'); @@ -161,10 +161,10 @@ export class TimelineCellRenderer { } public onMouseDown(ev:MouseEvent, - dateForCreate:string|null, - renderInfo:RenderInfo, - labels:WorkPackageCellLabels, - elem:HTMLElement):'left'|'right'|'both'|'dragright'|'create' { + dateForCreate:string|null, + renderInfo:RenderInfo, + labels:WorkPackageCellLabels, + elem:HTMLElement):'left'|'right'|'both'|'dragright'|'create' { // check for active selection mode if (renderInfo.viewParams.activeSelectionMode) { @@ -267,7 +267,7 @@ export class TimelineCellRenderer { const projection = renderInfo.change.projectedResource; let start = moment(projection.startDate); - let due = moment(projection.dueDate); + const due = moment(projection.dueDate); start = _.isNaN(start.valueOf()) ? due.clone() : start; const offsetStart = start.diff(renderInfo.viewParams.dateDisplayStart, 'days'); @@ -363,9 +363,9 @@ export class TimelineCellRenderer { } protected applyTypeColor(renderInfo:RenderInfo, bg:HTMLElement):void { - let wp = renderInfo.workPackage; - let type = wp.type; - let selectionMode = renderInfo.viewParams.activeSelectionMode; + const wp = renderInfo.workPackage; + const type = wp.type; + const selectionMode = renderInfo.viewParams.activeSelectionMode; // Don't apply the class in selection mode const id = type.id; @@ -410,7 +410,7 @@ export class TimelineCellRenderer { checkForSpecialDisplaySituations(renderInfo:RenderInfo, bar:HTMLElement) { const wp = renderInfo.workPackage; const row = bar.parentElement!.parentElement!; - let selectionMode = renderInfo.viewParams.activeSelectionMode; + const selectionMode = renderInfo.viewParams.activeSelectionMode; // Cannot edit the work package if it has children // and it is not on 'Manual scheduling' mode @@ -452,8 +452,8 @@ export class TimelineCellRenderer { } protected updateLabels(activeDragNDrop:boolean, - labels:WorkPackageCellLabels, - change:WorkPackageChangeset) { + labels:WorkPackageCellLabels, + change:WorkPackageChangeset) { const labelConfiguration = this.wpTableTimeline.getNormalizedLabels(change.projectedResource); @@ -474,13 +474,13 @@ export class TimelineCellRenderer { } protected renderLabel(change:WorkPackageChangeset, - labels:WorkPackageCellLabels, - position:LabelPosition|'leftHover'|'rightHover', - attribute:string|null) { + labels:WorkPackageCellLabels, + position:LabelPosition|'leftHover'|'rightHover', + attribute:string|null) { // Get the label position // Skip label if it does not exist (milestones) - let label = labels[position]; + const label = labels[position]; if (!label) { return; } @@ -494,7 +494,7 @@ export class TimelineCellRenderer { } // Get the rendered field - let [field, span] = this.fieldRenderer.renderFieldValue(change.projectedResource, attribute, change); + const [field, span] = this.fieldRenderer.renderFieldValue(change.projectedResource, attribute, change); if (label && field && span) { span.classList.add('label-content'); diff --git a/frontend/src/app/components/wp-table/timeline/cells/timeline-milestone-cell-renderer.ts b/frontend/src/app/components/wp-table/timeline/cells/timeline-milestone-cell-renderer.ts index e9d7d5c54c7..86d03dbb726 100644 --- a/frontend/src/app/components/wp-table/timeline/cells/timeline-milestone-cell-renderer.ts +++ b/frontend/src/app/components/wp-table/timeline/cells/timeline-milestone-cell-renderer.ts @@ -1,11 +1,11 @@ import * as moment from 'moment'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; import { calculatePositionValueForDayCountingPx, RenderInfo, timelineElementCssClass } from '../wp-timeline'; -import {CellDateMovement, LabelPosition, TimelineCellRenderer} from './timeline-cell-renderer'; +import { CellDateMovement, LabelPosition, TimelineCellRenderer } from './timeline-cell-renderer'; import { classNameFarRightLabel, classNameHideOnHover, @@ -19,7 +19,7 @@ import { WorkPackageCellLabels } from './wp-timeline-cell'; import Moment = moment.Moment; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; export class TimelineMilestoneCellRenderer extends TimelineCellRenderer { public get type():string { @@ -64,8 +64,8 @@ export class TimelineMilestoneCellRenderer extends TimelineCellRenderer { * */ public assignDateValues(change:WorkPackageChangeset, - labels:WorkPackageCellLabels, - dates:any):void { + labels:WorkPackageCellLabels, + dates:any):void { this.assignDate(change, 'date', dates.date); this.updateLabels(true, labels, change); @@ -75,12 +75,12 @@ export class TimelineMilestoneCellRenderer extends TimelineCellRenderer { * Handle movement by days of milestone. */ public onDaysMoved(change:WorkPackageChangeset, - dayUnderCursor:Moment, - delta:number, - direction:'left' | 'right' | 'both' | 'create' | 'dragright') { + dayUnderCursor:Moment, + delta:number, + direction:'left' | 'right' | 'both' | 'create' | 'dragright') { const initialDate = change.pristineResource.date; - let dates:CellDateMovement = {}; + const dates:CellDateMovement = {}; if (initialDate) { dates.date = moment(initialDate).add(delta, 'days'); @@ -90,10 +90,10 @@ export class TimelineMilestoneCellRenderer extends TimelineCellRenderer { } public onMouseDown(ev:MouseEvent, - dateForCreate:string | null, - renderInfo:RenderInfo, - labels:WorkPackageCellLabels, - elem:HTMLElement):'left' | 'right' | 'both' | 'create' | 'dragright' { + dateForCreate:string | null, + renderInfo:RenderInfo, + labels:WorkPackageCellLabels, + elem:HTMLElement):'left' | 'right' | 'both' | 'create' | 'dragright' { // check for active selection mode if (renderInfo.viewParams.activeSelectionMode) { @@ -150,7 +150,7 @@ export class TimelineMilestoneCellRenderer extends TimelineCellRenderer { getMarginLeftOfLeftSide(renderInfo:RenderInfo):number { const change = renderInfo.change; - let start = moment(change.projectedResource.date); + const start = moment(change.projectedResource.date); const offsetStart = start.diff(renderInfo.viewParams.dateDisplayStart, 'days'); return calculatePositionValueForDayCountingPx(renderInfo.viewParams, offsetStart); } @@ -229,8 +229,8 @@ export class TimelineMilestoneCellRenderer extends TimelineCellRenderer { } protected updateLabels(activeDragNDrop:boolean, - labels:WorkPackageCellLabels, - change:WorkPackageChangeset) { + labels:WorkPackageCellLabels, + change:WorkPackageChangeset) { const labelConfiguration = this.wpTableTimeline.getNormalizedLabels(change.projectedResource); @@ -258,9 +258,9 @@ export class TimelineMilestoneCellRenderer extends TimelineCellRenderer { } protected renderLabel(change:WorkPackageChangeset, - labels:WorkPackageCellLabels, - position:LabelPosition|'leftHover'|'rightHover', - attribute:string|null) { + labels:WorkPackageCellLabels, + position:LabelPosition|'leftHover'|'rightHover', + attribute:string|null) { // Normalize attribute if (attribute === 'startDate' || attribute === 'dueDate') { attribute = 'date'; diff --git a/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts b/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts index 035541f1616..2eb7addfcd7 100644 --- a/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts +++ b/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell-mouse-handler.ts @@ -26,24 +26,24 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector} from '@angular/core'; +import { Injector } from '@angular/core'; import * as moment from 'moment'; -import {WorkPackageTimelineTableController} from '../container/wp-timeline-container.directive'; -import {RenderInfo} from '../wp-timeline'; -import {TimelineCellRenderer} from './timeline-cell-renderer'; -import {WorkPackageCellLabels} from './wp-timeline-cell'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {LoadingIndicatorService} from "core-app/modules/common/loading-indicator/loading-indicator.service"; +import { WorkPackageTimelineTableController } from '../container/wp-timeline-container.directive'; +import { RenderInfo } from '../wp-timeline'; +import { TimelineCellRenderer } from './timeline-cell-renderer'; +import { WorkPackageCellLabels } from './wp-timeline-cell'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { LoadingIndicatorService } from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; import Moment = moment.Moment; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {take} from "rxjs/operators"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { take } from "rxjs/operators"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export const classNameBar = 'bar'; export const classNameLeftHandle = 'leftHandle'; @@ -52,18 +52,18 @@ export const classNameBarLabel = 'bar-label'; export function registerWorkPackageMouseHandler(this:void, - injector:Injector, - getRenderInfo:() => RenderInfo, - workPackageTimeline:WorkPackageTimelineTableController, - halEditing:HalResourceEditingService, - halEvents:HalEventsService, - notificationService:WorkPackageNotificationService, - loadingIndicator:LoadingIndicatorService, - cell:HTMLElement, - bar:HTMLDivElement, - labels:WorkPackageCellLabels, - renderer:TimelineCellRenderer, - renderInfo:RenderInfo) { + injector:Injector, + getRenderInfo:() => RenderInfo, + workPackageTimeline:WorkPackageTimelineTableController, + halEditing:HalResourceEditingService, + halEvents:HalEventsService, + notificationService:WorkPackageNotificationService, + loadingIndicator:LoadingIndicatorService, + cell:HTMLElement, + bar:HTMLDivElement, + labels:WorkPackageCellLabels, + renderer:TimelineCellRenderer, + renderInfo:RenderInfo) { const querySpace:IsolatedQuerySpace = injector.get(IsolatedQuerySpace); diff --git a/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell.ts b/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell.ts index 0b966393dc8..0e4d4a9610e 100644 --- a/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell.ts +++ b/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cell.ts @@ -25,21 +25,21 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {States} from '../../../states.service'; -import {WorkPackageTimelineTableController} from '../container/wp-timeline-container.directive'; -import {RenderInfo} from '../wp-timeline'; -import {TimelineCellRenderer} from './timeline-cell-renderer'; -import {TimelineMilestoneCellRenderer} from './timeline-milestone-cell-renderer'; -import {registerWorkPackageMouseHandler} from './wp-timeline-cell-mouse-handler'; -import {Injector} from '@angular/core'; -import {LoadingIndicatorService} from "core-app/modules/common/loading-indicator/loading-indicator.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { States } from '../../../states.service'; +import { WorkPackageTimelineTableController } from '../container/wp-timeline-container.directive'; +import { RenderInfo } from '../wp-timeline'; +import { TimelineCellRenderer } from './timeline-cell-renderer'; +import { TimelineMilestoneCellRenderer } from './timeline-milestone-cell-renderer'; +import { registerWorkPackageMouseHandler } from './wp-timeline-cell-mouse-handler'; +import { Injector } from '@angular/core'; +import { LoadingIndicatorService } from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; export const classNameLeftLabel = 'labelLeft'; export const classNameRightContainer = 'containerRight'; diff --git a/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cells-renderer.ts b/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cells-renderer.ts index b03e5b1633c..03e92f52af4 100644 --- a/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cells-renderer.ts +++ b/frontend/src/app/components/wp-table/timeline/cells/wp-timeline-cells-renderer.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector} from '@angular/core'; -import {States} from '../../../states.service'; -import {WorkPackageTimelineTableController} from '../container/wp-timeline-container.directive'; -import {RenderInfo} from '../wp-timeline'; -import {TimelineCellRenderer} from './timeline-cell-renderer'; -import {TimelineMilestoneCellRenderer} from './timeline-milestone-cell-renderer'; -import {WorkPackageTimelineCell} from './wp-timeline-cell'; +import { Injector } from '@angular/core'; +import { States } from '../../../states.service'; +import { WorkPackageTimelineTableController } from '../container/wp-timeline-container.directive'; +import { RenderInfo } from '../wp-timeline'; +import { TimelineCellRenderer } from './timeline-cell-renderer'; +import { TimelineMilestoneCellRenderer } from './timeline-milestone-cell-renderer'; +import { WorkPackageTimelineCell } from './wp-timeline-cell'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {RenderedWorkPackage} from "core-app/modules/work_packages/render-info/rendered-work-package.type"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { RenderedWorkPackage } from "core-app/modules/work_packages/render-info/rendered-work-package.type"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class WorkPackageTimelineCellsRenderer { diff --git a/frontend/src/app/components/wp-table/timeline/container/wp-timeline-container.directive.ts b/frontend/src/app/components/wp-table/timeline/container/wp-timeline-container.directive.ts index aa3a9731c20..76756254318 100644 --- a/frontend/src/app/components/wp-table/timeline/container/wp-timeline-container.directive.ts +++ b/frontend/src/app/components/wp-table/timeline/container/wp-timeline-container.directive.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, Component, ElementRef, Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {INotification, NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {IsolatedQuerySpace} from 'core-app/modules/work_packages/query-space/isolated-query-space'; +import { AfterViewInit, Component, ElementRef, Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { INotification, NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { IsolatedQuerySpace } from 'core-app/modules/work_packages/query-space/isolated-query-space'; import * as moment from 'moment'; -import {Moment} from 'moment'; -import {filter, takeUntil} from 'rxjs/operators'; +import { Moment } from 'moment'; +import { filter, takeUntil } from 'rxjs/operators'; import { calculateDaySpan, getPixelPerDayForZoomLevel, @@ -44,27 +44,27 @@ import { TimelineViewParameters, zoomLevelOrder } from '../wp-timeline'; -import {input, InputState} from 'reactivestates'; -import {WorkPackageTable} from 'core-components/wp-fast-table/wp-fast-table'; -import {WorkPackageTimelineCellsRenderer} from 'core-components/wp-table/timeline/cells/wp-timeline-cells-renderer'; -import {States} from 'core-components/states.service'; -import {WorkPackageViewTimelineService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service'; -import {WorkPackageRelationsService} from 'core-components/wp-relations/wp-relations.service'; -import {WorkPackageViewHierarchiesService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service'; -import {WorkPackageTimelineCell} from 'core-components/wp-table/timeline/cells/wp-timeline-cell'; -import {selectorTimelineSide} from 'core-components/wp-table/wp-table-scroll-sync'; -import {debugLog, timeOutput} from 'core-app/helpers/debug_output'; -import {RenderedWorkPackage} from 'core-app/modules/work_packages/render-info/rendered-work-package.type'; -import {HalEventsService} from 'core-app/modules/hal/services/hal-events.service'; -import {WorkPackageNotificationService} from 'core-app/modules/work_packages/notifications/work-package-notification.service'; -import {combineLatest, Observable} from 'rxjs'; -import {UntilDestroyedMixin} from 'core-app/helpers/angular/until-destroyed.mixin'; -import {WorkPackagesTableComponent} from 'core-components/wp-table/wp-table.component'; +import { input, InputState } from 'reactivestates'; +import { WorkPackageTable } from 'core-components/wp-fast-table/wp-fast-table'; +import { WorkPackageTimelineCellsRenderer } from 'core-components/wp-table/timeline/cells/wp-timeline-cells-renderer'; +import { States } from 'core-components/states.service'; +import { WorkPackageViewTimelineService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service'; +import { WorkPackageRelationsService } from 'core-components/wp-relations/wp-relations.service'; +import { WorkPackageViewHierarchiesService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service'; +import { WorkPackageTimelineCell } from 'core-components/wp-table/timeline/cells/wp-timeline-cell'; +import { selectorTimelineSide } from 'core-components/wp-table/wp-table-scroll-sync'; +import { debugLog, timeOutput } from 'core-app/helpers/debug_output'; +import { RenderedWorkPackage } from 'core-app/modules/work_packages/render-info/rendered-work-package.type'; +import { HalEventsService } from 'core-app/modules/hal/services/hal-events.service'; +import { WorkPackageNotificationService } from 'core-app/modules/work_packages/notifications/work-package-notification.service'; +import { combineLatest, Observable } from 'rxjs'; +import { UntilDestroyedMixin } from 'core-app/helpers/angular/until-destroyed.mixin'; +import { WorkPackagesTableComponent } from 'core-components/wp-table/wp-table.component'; import { groupIdFromIdentifier, groupTypeFromIdentifier } from 'core-components/wp-fast-table/builders/modes/grouped/grouped-rows-helpers'; -import {WorkPackageViewCollapsedGroupsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service'; +import { WorkPackageViewCollapsedGroupsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service'; @Component({ selector: 'wp-timeline-container', @@ -161,12 +161,12 @@ export class WorkPackageTimelineTableController extends UntilDestroyedMixin impl ]).pipe( this.commonPipes, ) - .subscribe(([orderedRows, changes, timelineState]) => { + .subscribe(([orderedRows, changes, timelineState]) => { // Remember all visible rows in their order of appearance. - this.workPackageIdOrder = orderedRows.filter((row:RenderedWorkPackage) => !row.hidden); - this.orderedRows = orderedRows; - this.refreshView(); - }); + this.workPackageIdOrder = orderedRows.filter((row:RenderedWorkPackage) => !row.hidden); + this.orderedRows = orderedRows; + this.refreshView(); + }); this.setupManageCollapsedGroupHeaderCells(); } @@ -431,7 +431,7 @@ export class WorkPackageTimelineTableController extends UntilDestroyedMixin impl const daysSpan = calculateDaySpan(workPackagesToCalculateWidthFrom, this.states.workPackages, this._viewParameters); const timelineWidthInPx = this.$element.parent().width()! - (2 * requiredPixelMarginLeft); - for (let zoomLevel of zoomLevelOrder) { + for (const zoomLevel of zoomLevelOrder) { const pixelPerDay = getPixelPerDayForZoomLevel(zoomLevel); const visibleDays = timelineWidthInPx / pixelPerDay; @@ -453,27 +453,29 @@ export class WorkPackageTimelineTableController extends UntilDestroyedMixin impl setupManageCollapsedGroupHeaderCells() { this.workPackageViewCollapsedGroupsService.updates$() - .pipe( - this.commonPipes, - ) - .subscribe((groupsCollapseEvent:IGroupsCollapseEvent) => { - this.manageCollapsedGroupHeaderCells( - groupsCollapseEvent, + .pipe( + this.commonPipes, + ) + .subscribe((groupsCollapseEvent:IGroupsCollapseEvent) => { + this.manageCollapsedGroupHeaderCells( + groupsCollapseEvent, this.querySpace.results.value!.elements, this.collapsedGroupsCellsMap, - ); - }); + ); + }); } manageCollapsedGroupHeaderCells(groupsCollapseConfig:IGroupsCollapseEvent, - tableWorkPackages:WorkPackageResource[], - collapsedGroupsCellsMap:IGroupCellsMap) { + tableWorkPackages:WorkPackageResource[], + collapsedGroupsCellsMap:IGroupCellsMap) { const refreshAllGroupHeaderCells = groupsCollapseConfig.allGroupsChanged; const collapsedGroupsChange = groupsCollapseConfig.state; const collapsedGroupsChangeArray = Object.keys(collapsedGroupsChange); let groupsToUpdate:string[] = []; - if (!collapsedGroupsChangeArray.length) { return; } + if (!collapsedGroupsChangeArray.length) { + return; + } if (refreshAllGroupHeaderCells) { groupsToUpdate = collapsedGroupsChangeArray.filter(groupIdentifier => this.shouldManageCollapsedGroupHeaderCells(groupIdentifier, groupsCollapseConfig)); @@ -532,8 +534,8 @@ export class WorkPackageTimelineTableController extends UntilDestroyedMixin impl shouldBeShownInCollapsedGroupHeaders(workPackage:WorkPackageResource) { return this.workPackageViewCollapsedGroupsService - .wpTypesToShowInCollapsedGroupHeaders - .some(wpTypeFunction => wpTypeFunction(workPackage)); + .wpTypesToShowInCollapsedGroupHeaders + .some(wpTypeFunction => wpTypeFunction(workPackage)); } getWorkPackagesToCalculateTimelineWidthFrom() { diff --git a/frontend/src/app/components/wp-table/timeline/global-elements/timeline-relation-element.ts b/frontend/src/app/components/wp-table/timeline/global-elements/timeline-relation-element.ts index 3c90826cf59..6e5973cc5d0 100644 --- a/frontend/src/app/components/wp-table/timeline/global-elements/timeline-relation-element.ts +++ b/frontend/src/app/components/wp-table/timeline/global-elements/timeline-relation-element.ts @@ -1,4 +1,4 @@ -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; export function workPackagePrefix(workPackageId:string) { return `__tl-relation-${workPackageId}`; diff --git a/frontend/src/app/components/wp-table/timeline/global-elements/timeline-static-element.ts b/frontend/src/app/components/wp-table/timeline/global-elements/timeline-static-element.ts index 1633df0fed5..4d61f2ce888 100644 --- a/frontend/src/app/components/wp-table/timeline/global-elements/timeline-static-element.ts +++ b/frontend/src/app/components/wp-table/timeline/global-elements/timeline-static-element.ts @@ -1,4 +1,4 @@ -import {TimelineViewParameters} from "../wp-timeline"; +import { TimelineViewParameters } from "../wp-timeline"; export const timelineStaticElementCssClassname = "wp-timeline--static-element"; export abstract class TimelineStaticElement { diff --git a/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline-relations.directive.ts b/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline-relations.directive.ts index ec0776946eb..72bd0dcc2ba 100644 --- a/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline-relations.directive.ts +++ b/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline-relations.directive.ts @@ -26,33 +26,33 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, Injector, OnInit} from '@angular/core'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {State} from 'reactivestates'; -import {combineLatest} from 'rxjs'; -import {filter, map, take} from 'rxjs/operators'; -import {States} from '../../../states.service'; -import {RelationsStateValue, WorkPackageRelationsService} from '../../../wp-relations/wp-relations.service'; -import {WorkPackageTimelineCell} from '../cells/wp-timeline-cell'; -import {WorkPackageTimelineTableController} from '../container/wp-timeline-container.directive'; -import {timelineElementCssClass, TimelineViewParameters} from '../wp-timeline'; -import {TimelineRelationElement, workPackagePrefix} from './timeline-relation-element'; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { Component, ElementRef, Injector, OnInit } from '@angular/core'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { State } from 'reactivestates'; +import { combineLatest } from 'rxjs'; +import { filter, map, take } from 'rxjs/operators'; +import { States } from '../../../states.service'; +import { RelationsStateValue, WorkPackageRelationsService } from '../../../wp-relations/wp-relations.service'; +import { WorkPackageTimelineCell } from '../cells/wp-timeline-cell'; +import { WorkPackageTimelineTableController } from '../container/wp-timeline-container.directive'; +import { timelineElementCssClass, TimelineViewParameters } from '../wp-timeline'; +import { TimelineRelationElement, workPackagePrefix } from './timeline-relation-element'; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; const DEBUG_DRAW_RELATION_LINES_WITH_COLOR = false; export const timelineGlobalElementCssClassname = 'relation-line'; function newSegment(vp:TimelineViewParameters, - classNames:string[], - yPosition:number, - top:number, - left:number, - width:number, - height:number, - color?:string):HTMLElement { + classNames:string[], + yPosition:number, + top:number, + left:number, + width:number, + height:number, + color?:string):HTMLElement { const segment = document.createElement('div'); segment.classList.add( @@ -231,11 +231,11 @@ export class WorkPackageTableTimelineRelations extends UntilDestroyedMixin imple } private renderRelation(vp:TimelineViewParameters, - e:TimelineRelationElement, - idxFrom:number, - idxTo:number, - startCell:WorkPackageTimelineCell, - endCell:WorkPackageTimelineCell) { + e:TimelineRelationElement, + idxFrom:number, + idxTo:number, + startCell:WorkPackageTimelineCell, + endCell:WorkPackageTimelineCell) { const rowFrom = this.workPackageIdOrder[idxFrom]; const rowTo = this.workPackageIdOrder[idxTo]; @@ -272,7 +272,7 @@ export class WorkPackageTableTimelineRelations extends UntilDestroyedMixin imple const startLineWith = endCell.getPaddingLeftForIncomingRelationLines() + (paddingRight > 0 ? paddingRight : 0); this.container.append(newSegment(vp, e.classNames, idxFrom, 19, startX, startLineWith, 1, 'red')); - let lastX = startX + startLineWith; + const lastX = startX + startLineWith; // lastX += hookLength; // Draw vertical line between rows diff --git a/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline-static-elements.directive.ts b/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline-static-elements.directive.ts index d5896b5af11..d17cf7e706c 100644 --- a/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline-static-elements.directive.ts +++ b/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline-static-elements.directive.ts @@ -25,12 +25,12 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit} from '@angular/core'; -import {States} from '../../../states.service'; -import {WorkPackageTimelineTableController} from '../container/wp-timeline-container.directive'; -import {TimelineViewParameters} from '../wp-timeline'; -import {TimelineStaticElement, timelineStaticElementCssClassname} from './timeline-static-element'; -import {TodayLineElement} from './wp-timeline.today-line'; +import { Component, ElementRef, OnInit } from '@angular/core'; +import { States } from '../../../states.service'; +import { WorkPackageTimelineTableController } from '../container/wp-timeline-container.directive'; +import { TimelineViewParameters } from '../wp-timeline'; +import { TimelineStaticElement, timelineStaticElementCssClassname } from './timeline-static-element'; +import { TodayLineElement } from './wp-timeline.today-line'; @Component({ selector: 'wp-timeline-static-elements', diff --git a/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline.today-line.ts b/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline.today-line.ts index 768d115ceeb..e7772f34a19 100644 --- a/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline.today-line.ts +++ b/frontend/src/app/components/wp-table/timeline/global-elements/wp-timeline.today-line.ts @@ -27,8 +27,8 @@ //++ import * as moment from 'moment'; -import {calculatePositionValueForDayCount, TimelineViewParameters} from '../wp-timeline'; -import {TimelineStaticElement} from './timeline-static-element'; +import { calculatePositionValueForDayCount, TimelineViewParameters } from '../wp-timeline'; +import { TimelineStaticElement } from './timeline-static-element'; export class TodayLineElement extends TimelineStaticElement { diff --git a/frontend/src/app/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts b/frontend/src/app/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts index 315f5f8d11e..a38d210d108 100644 --- a/frontend/src/app/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts +++ b/frontend/src/app/components/wp-table/timeline/grid/wp-timeline-grid.directive.ts @@ -25,9 +25,9 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, Component, ElementRef} from '@angular/core'; +import { AfterViewInit, Component, ElementRef } from '@angular/core'; import * as moment from 'moment'; -import {WorkPackageTimelineTableController} from '../container/wp-timeline-container.directive'; +import { WorkPackageTimelineTableController } from '../container/wp-timeline-container.directive'; import { calculatePositionValueForDayCount, getTimeSlicesForHeader, @@ -36,7 +36,7 @@ import { TimelineViewParameters } from '../wp-timeline'; import Moment = moment.Moment; -import {TimelineZoomLevel} from 'core-app/modules/hal/resources/query-resource'; +import { TimelineZoomLevel } from 'core-app/modules/hal/resources/query-resource'; function checkForWeekendHighlight(date:Moment, cell:HTMLElement) { const day = date.day(); @@ -80,16 +80,16 @@ export class WorkPackageTableTimelineGrid implements AfterViewInit { this.gridContainer.empty(); switch (vp.settings.zoomLevel) { - case 'days': - return this.renderLabelsDays(vp); - case 'weeks': - return this.renderLabelsWeeks(vp); - case 'months': - return this.renderLabelsMonths(vp); - case 'quarters': - return this.renderLabelsQuarters(vp); - case 'years': - return this.renderLabelsYears(vp); + case 'days': + return this.renderLabelsDays(vp); + case 'weeks': + return this.renderLabelsWeeks(vp); + case 'months': + return this.renderLabelsMonths(vp); + case 'quarters': + return this.renderLabelsQuarters(vp); + case 'years': + return this.renderLabelsYears(vp); } this.activeZoomLevel = vp.settings.zoomLevel; @@ -160,14 +160,14 @@ export class WorkPackageTableTimelineGrid implements AfterViewInit { } renderTimeSlices(vp:TimelineViewParameters, - unit:moment.unitOfTime.DurationConstructor, - startView:Moment, - endView:Moment, - cellCallback:(start:Moment, cell:HTMLElement) => void) { + unit:moment.unitOfTime.DurationConstructor, + startView:Moment, + endView:Moment, + cellCallback:(start:Moment, cell:HTMLElement) => void) { - const {inViewportAndBoundaries, rest} = getTimeSlicesForHeader(vp, unit, startView, endView); + const { inViewportAndBoundaries, rest } = getTimeSlicesForHeader(vp, unit, startView, endView); - for (let [start, end] of inViewportAndBoundaries) { + for (const [start, end] of inViewportAndBoundaries) { const cell = document.createElement('div'); cell.classList.add(timelineElementCssClass, timelineGridElementCssClass); cell.style.left = calculatePositionValueForDayCount(vp, start.diff(startView, 'days')); @@ -176,7 +176,7 @@ export class WorkPackageTableTimelineGrid implements AfterViewInit { cellCallback(start, cell); } setTimeout(() => { - for (let [start, end] of rest) { + for (const [start, end] of rest) { const cell = document.createElement('div'); cell.classList.add(timelineElementCssClass, timelineGridElementCssClass); cell.style.left = calculatePositionValueForDayCount(vp, start.diff(startView, 'days')); diff --git a/frontend/src/app/components/wp-table/timeline/header/wp-timeline-header.directive.ts b/frontend/src/app/components/wp-table/timeline/header/wp-timeline-header.directive.ts index 8f3e70526f3..53a86bee08b 100644 --- a/frontend/src/app/components/wp-table/timeline/header/wp-timeline-header.directive.ts +++ b/frontend/src/app/components/wp-table/timeline/header/wp-timeline-header.directive.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit} from '@angular/core'; -import {TimelineZoomLevel} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageTimelineTableController} from 'core-components/wp-table/timeline/container/wp-timeline-container.directive'; +import { Component, ElementRef, OnInit } from '@angular/core'; +import { TimelineZoomLevel } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageTimelineTableController } from 'core-components/wp-table/timeline/container/wp-timeline-container.directive'; import * as moment from 'moment'; import { calculatePositionValueForDayCount, @@ -37,8 +37,8 @@ import { timelineHeaderSelector, TimelineViewParameters } from '../wp-timeline'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; import Moment = moment.Moment; @Component({ @@ -80,16 +80,16 @@ export class WorkPackageTimelineHeaderController implements OnInit { this.innerHeader.attr('data-current-zoom-level', this.wpTimelineService.zoomLevel); switch (vp.settings.zoomLevel) { - case 'days': - return this.renderLabelsDays(vp); - case 'weeks': - return this.renderLabelsWeeks(vp); - case 'months': - return this.renderLabelsMonths(vp); - case 'quarters': - return this.renderLabelsQuarters(vp); - case 'years': - return this.renderLabelsYears(vp); + case 'days': + return this.renderLabelsDays(vp); + case 'weeks': + return this.renderLabelsWeeks(vp); + case 'months': + return this.renderLabelsMonths(vp); + case 'quarters': + return this.renderLabelsQuarters(vp); + case 'years': + return this.renderLabelsYears(vp); } this.activeZoomLevel = vp.settings.zoomLevel; @@ -196,15 +196,15 @@ export class WorkPackageTimelineHeaderController implements OnInit { } private renderTimeSlices(vp:TimelineViewParameters, - unit:moment.unitOfTime.DurationConstructor, - marginTop:number, - startView:Moment, - endView:Moment, - cellCallback:(start:Moment, cell:HTMLElement) => void) { + unit:moment.unitOfTime.DurationConstructor, + marginTop:number, + startView:Moment, + endView:Moment, + cellCallback:(start:Moment, cell:HTMLElement) => void) { - const {inViewportAndBoundaries, rest} = getTimeSlicesForHeader(vp, unit, startView, endView); + const { inViewportAndBoundaries, rest } = getTimeSlicesForHeader(vp, unit, startView, endView); - for (let [start, end] of inViewportAndBoundaries) { + for (const [start, end] of inViewportAndBoundaries) { const cell = this.addLabelCell(); cell.style.top = marginTop + 'px'; cell.style.left = calculatePositionValueForDayCount(vp, start.diff(startView, 'days')); @@ -212,7 +212,7 @@ export class WorkPackageTimelineHeaderController implements OnInit { cellCallback(start, cell); } setTimeout(() => { - for (let [start, end] of rest) { + for (const [start, end] of rest) { const cell = this.addLabelCell(); cell.style.top = marginTop + 'px'; cell.style.left = calculatePositionValueForDayCount(vp, start.diff(startView, 'days')); diff --git a/frontend/src/app/components/wp-table/timeline/wp-timeline.ts b/frontend/src/app/components/wp-table/timeline/wp-timeline.ts index 0cdda9854ee..5e3ca620fff 100644 --- a/frontend/src/app/components/wp-table/timeline/wp-timeline.ts +++ b/frontend/src/app/components/wp-table/timeline/wp-timeline.ts @@ -1,4 +1,4 @@ -import {TimelineZoomLevel} from 'core-app/modules/hal/resources/query-resource'; +import { TimelineZoomLevel } from 'core-app/modules/hal/resources/query-resource'; //-- copyright // OpenProject is an open source project management software. // Copyright (C) 2012-2021 the OpenProject GmbH @@ -27,10 +27,10 @@ import {TimelineZoomLevel} from 'core-app/modules/hal/resources/query-resource'; // See docs/COPYRIGHT.rdoc for more details. //++ import * as moment from 'moment'; -import {InputState, MultiInputState} from 'reactivestates'; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {RenderedWorkPackage} from "core-app/modules/work_packages/render-info/rendered-work-package.type"; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { InputState, MultiInputState } from 'reactivestates'; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { RenderedWorkPackage } from "core-app/modules/work_packages/render-info/rendered-work-package.type"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; import Moment = moment.Moment; export const timelineElementCssClass = 'timeline-element'; @@ -56,16 +56,16 @@ export const zoomLevelOrder:TimelineZoomLevel[] = [ export function getPixelPerDayForZoomLevel(zoomLevel:TimelineZoomLevel) { switch (zoomLevel) { - case 'days': - return 30; - case 'weeks': - return 15; - case 'months': - return 6; - case 'quarters': - return 2; - case 'years': - return 0.5; + case 'days': + return 30; + case 'weeks': + return 15; + case 'months': + return 6; + case 'quarters': + return 2; + case 'years': + return 0.5; } throw new Error('invalid zoom level: ' + zoomLevel); } @@ -80,9 +80,9 @@ export const requiredPixelMarginLeft = 120; */ export class TimelineViewParameters { - readonly now:Moment = moment({hour: 0, minute: 0, seconds: 0}); + readonly now:Moment = moment({ hour: 0, minute: 0, seconds: 0 }); - dateDisplayStart:Moment = moment({hour: 0, minute: 0, seconds: 0}); + dateDisplayStart:Moment = moment({ hour: 0, minute: 0, seconds: 0 }); dateDisplayEnd:Moment = this.dateDisplayStart.clone().add(1, 'day'); @@ -143,9 +143,9 @@ export function calculatePositionValueForDayCount(viewParams:TimelineViewParamet } export function getTimeSlicesForHeader(vp:TimelineViewParameters, - unit:moment.unitOfTime.DurationConstructor, - startView:Moment, - endView:Moment) { + unit:moment.unitOfTime.DurationConstructor, + startView:Moment, + endView:Moment) { const inViewport:[Moment, Moment][] = []; const rest:[Moment, Moment][] = []; @@ -184,8 +184,8 @@ export function getTimeSlicesForHeader(vp:TimelineViewParameters, } export function calculateDaySpan(visibleWorkPackages:RenderedWorkPackage[], - loadedWorkPackages:MultiInputState, - viewParameters:TimelineViewParameters):number { + loadedWorkPackages:MultiInputState, + viewParameters:TimelineViewParameters):number { let earliest:Moment = moment(); let latest:Moment = moment(); diff --git a/frontend/src/app/components/wp-table/wp-table-configuration.ts b/frontend/src/app/components/wp-table/wp-table-configuration.ts index baf7aef6d11..d7e0464a50d 100644 --- a/frontend/src/app/components/wp-table/wp-table-configuration.ts +++ b/frontend/src/app/components/wp-table/wp-table-configuration.ts @@ -31,56 +31,56 @@ export type WorkPackageTableConfigurationObject = Partial<{ [field in keyof Work export class WorkPackageTableConfiguration { /** Render the table results, set to false when only wanting the table initialization */ - public tableVisible:boolean = true; + public tableVisible = true; /** Render the table as compact style */ - public compactTableStyle:boolean = false; + public compactTableStyle = false; /** Render the action column (last column) with the actions defined in the TableActionsService */ - public actionsColumnEnabled:boolean = true; + public actionsColumnEnabled = true; /** Whether the work package context menu is enabled*/ - public contextMenuEnabled:boolean = true; + public contextMenuEnabled = true; /** Whether the column dropdown menu is enabled*/ - public columnMenuEnabled:boolean = true; + public columnMenuEnabled = true; /** Whether the query should be resolved using the current project identifier */ - public projectContext:boolean = true; + public projectContext = true; /** Whether the embedded table should live within a specific project context (e.g., given by its parent) */ public projectIdentifier:string|null = null; /** Whether inline create is enabled*/ - public inlineCreateEnabled:boolean = true; + public inlineCreateEnabled = true; /** Whether the hierarchy toggler item in the subject column is enabled */ - public hierarchyToggleEnabled:boolean = true; + public hierarchyToggleEnabled = true; /** Whether this table supports drag and drop */ - public dragAndDropEnabled:boolean = false; + public dragAndDropEnabled = false; /** Whether this table is in an embedded context*/ - public isEmbedded:boolean = false; + public isEmbedded = false; /** Whether the work packages shall be shown in cards instead of a table */ - public isCardView:boolean = false; + public isCardView = false; /** Whether this table provides a UI for filters*/ - public withFilters:boolean = false; + public withFilters = false; /** Whether the filters are expanded */ - public filtersExpanded:boolean = false; + public filtersExpanded = false; /** Whether the button to open filters shall be visible*/ - public showFilterButton:boolean = false; + public showFilterButton = false; /** Whether this table provides a UI for filters*/ public filterButtonText:string = I18n.t("js.button_filter"); constructor(providedConfig:WorkPackageTableConfigurationObject) { _.each(providedConfig, (value, k) => { - let key = (k as keyof WorkPackageTableConfiguration); + const key = (k as keyof WorkPackageTableConfiguration); (this as any)[key] = value; }); } diff --git a/frontend/src/app/components/wp-table/wp-table-hover-sync.ts b/frontend/src/app/components/wp-table/wp-table-hover-sync.ts index 937435357b9..528896467a9 100644 --- a/frontend/src/app/components/wp-table/wp-table-hover-sync.ts +++ b/frontend/src/app/components/wp-table/wp-table-hover-sync.ts @@ -38,7 +38,7 @@ export class WpTableHoverSync { this.handleHover(target); } this.lastHoveredElement = target; - } + }; constructor(private tableAndTimeline:JQuery) { } @@ -92,8 +92,8 @@ export class WpTableHoverSync { const tableRow:JQuery = this.tableAndTimeline.find('tr.wp-row-' + wpId).first(); const timelineRow:JQuery = this.tableAndTimeline.find('div.wp-row-' + wpId).length ? - this.tableAndTimeline.find('div.wp-row-' + wpId).first() : - this.tableAndTimeline.find('div.wp-ancestor-row-' + wpId).first(); + this.tableAndTimeline.find('div.wp-row-' + wpId).first() : + this.tableAndTimeline.find('div.wp-ancestor-row-' + wpId).first(); requestAnimationFrame(() => { this.removeAllHoverClasses(); diff --git a/frontend/src/app/components/wp-table/wp-table-scroll-sync.ts b/frontend/src/app/components/wp-table/wp-table-scroll-sync.ts index 0afed23fce7..2fe40b84333 100644 --- a/frontend/src/app/components/wp-table/wp-table-scroll-sync.ts +++ b/frontend/src/app/components/wp-table/wp-table-scroll-sync.ts @@ -32,7 +32,7 @@ const jQueryScrollSyncEventNamespace = ".scroll-sync"; const scrollStep = 15; -function getXandYScrollDeltas(ev: WheelEvent): [number, number] { +function getXandYScrollDeltas(ev:WheelEvent):[number, number] { let x = ev.deltaX; let y = ev.deltaY; @@ -44,7 +44,7 @@ function getXandYScrollDeltas(ev: WheelEvent): [number, number] { return [x, y]; } -function getPlattformAgnosticScrollAmount(originalValue: number) { +function getPlattformAgnosticScrollAmount(originalValue:number) { if (originalValue === 0) { return originalValue; } @@ -60,9 +60,9 @@ function getPlattformAgnosticScrollAmount(originalValue: number) { return delta; } -function syncWheelEvent(jev: JQuery.TriggeredEvent, elementTable: JQuery, elementTimeline: JQuery) { +function syncWheelEvent(jev:JQuery.TriggeredEvent, elementTable:JQuery, elementTimeline:JQuery) { const scrollTarget = jev.target; - const ev: WheelEvent = jev.originalEvent as any; + const ev:WheelEvent = jev.originalEvent as any; let [deltaX, deltaY] = getXandYScrollDeltas(ev); if (deltaY === 0) { @@ -90,7 +90,7 @@ export function createScrollSync($element:JQuery) { var elTable = jQuery($element).find(selectorTableSide); var elTimeline = jQuery($element).find(selectorTimelineSide); - return (timelineVisible: boolean) => { + return (timelineVisible:boolean) => { // state vars var syncedLeft = false; @@ -98,10 +98,10 @@ export function createScrollSync($element:JQuery) { if (timelineVisible) { // setup event listener for table - elTable.on("wheel" + jQueryScrollSyncEventNamespace, (jev: JQuery.TriggeredEvent) => { + elTable.on("wheel" + jQueryScrollSyncEventNamespace, (jev:JQuery.TriggeredEvent) => { syncWheelEvent(jev, elTable, elTimeline); }); - elTable.on("scroll" + jQueryScrollSyncEventNamespace, (ev: JQuery.TriggeredEvent) => { + elTable.on("scroll" + jQueryScrollSyncEventNamespace, (ev:JQuery.TriggeredEvent) => { syncedLeft = true; if (!syncedRight) { elTimeline[0].scrollTop = ev.target.scrollTop; @@ -113,10 +113,10 @@ export function createScrollSync($element:JQuery) { }); // setup event listener for timeline - elTimeline.on("wheel" + jQueryScrollSyncEventNamespace, (jev: JQuery.TriggeredEvent) => { + elTimeline.on("wheel" + jQueryScrollSyncEventNamespace, (jev:JQuery.TriggeredEvent) => { syncWheelEvent(jev, elTable, elTimeline); }); - elTimeline.on("scroll" + jQueryScrollSyncEventNamespace, (ev: JQuery.TriggeredEvent) => { + elTimeline.on("scroll" + jQueryScrollSyncEventNamespace, (ev:JQuery.TriggeredEvent) => { syncedRight = true; if (!syncedLeft) { elTable[0].scrollTop = ev.target.scrollTop; diff --git a/frontend/src/app/components/wp-table/wp-table-sums-row/wp-table-sums-row.directive.ts b/frontend/src/app/components/wp-table/wp-table-sums-row/wp-table-sums-row.directive.ts index d10911106fb..c3e0efa88ff 100644 --- a/frontend/src/app/components/wp-table/wp-table-sums-row/wp-table-sums-row.directive.ts +++ b/frontend/src/app/components/wp-table/wp-table-sums-row/wp-table-sums-row.directive.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, Directive, ElementRef, Injector, Input} from '@angular/core'; -import {takeUntil} from 'rxjs/operators'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; -import {WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {States} from '../../states.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {QueryColumn} from "core-components/wp-query/query-column"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {WorkPackageViewSumService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; -import {combineLatest} from "rxjs"; -import {GroupSumsBuilder} from "core-components/wp-fast-table/builders/modes/grouped/group-sums-builder"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { AfterViewInit, Directive, ElementRef, Injector, Input } from '@angular/core'; +import { takeUntil } from 'rxjs/operators'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; +import { WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { States } from '../../states.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { QueryColumn } from "core-components/wp-query/query-column"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { WorkPackageViewSumService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; +import { combineLatest } from "rxjs"; +import { GroupSumsBuilder } from "core-components/wp-fast-table/builders/modes/grouped/group-sums-builder"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; @Directive({ selector: '[wpTableSumsRow]' @@ -86,8 +86,8 @@ export class WorkPackageTableSumsRowController implements AfterViewInit { this.schemaCache .ensureLoaded(resource.sumsSchema.$href!) .then((schema:SchemaResource) => { - this.refresh(columns, resource, schema); - }); + this.refresh(columns, resource, schema); + }); } else { this.clear(); } diff --git a/frontend/src/app/components/wp-table/wp-table.component.ts b/frontend/src/app/components/wp-table/wp-table.component.ts index 41e2b6c5b92..cfc5c7e7c86 100644 --- a/frontend/src/app/components/wp-table/wp-table.component.ts +++ b/frontend/src/app/components/wp-table/wp-table.component.ts @@ -37,29 +37,29 @@ import { OnInit, Output, ViewEncapsulation } from '@angular/core'; -import {QueryGroupByResource} from 'core-app/modules/hal/resources/query-group-by-resource'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {TableEventComponent, TableHandlerRegistry} from 'core-components/wp-fast-table/handlers/table-handler-registry'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {combineLatest} from 'rxjs'; -import {States} from '../states.service'; +import { QueryGroupByResource } from 'core-app/modules/hal/resources/query-group-by-resource'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { TableEventComponent, TableHandlerRegistry } from 'core-components/wp-fast-table/handlers/table-handler-registry'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { combineLatest } from 'rxjs'; +import { States } from '../states.service'; import { WorkPackageTableConfiguration, WorkPackageTableConfigurationObject } from 'core-app/components/wp-table/wp-table-configuration'; -import {QueryColumn} from 'core-components/wp-query/query-column'; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {WorkPackageViewGroupByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {createScrollSync} from "core-components/wp-table/wp-table-scroll-sync"; -import {WpTableHoverSync} from "core-components/wp-table/wp-table-hover-sync"; -import {WorkPackageTimelineTableController} from "core-components/wp-table/timeline/container/wp-timeline-container.directive"; -import {WorkPackageTable} from "core-components/wp-fast-table/wp-fast-table"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { QueryColumn } from 'core-components/wp-query/query-column'; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { WorkPackageViewGroupByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { createScrollSync } from "core-components/wp-table/wp-table-scroll-sync"; +import { WpTableHoverSync } from "core-components/wp-table/wp-table-hover-sync"; +import { WorkPackageTimelineTableController } from "core-components/wp-table/timeline/container/wp-timeline-container.directive"; +import { WorkPackageTable } from "core-components/wp-fast-table/wp-fast-table"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export interface WorkPackageFocusContext { /** Work package that was focused */ @@ -162,7 +162,7 @@ export class WorkPackagesTableComponent extends UntilDestroyedMixin implements O ].join(' ') }; - let statesCombined = combineLatest([ + const statesCombined = combineLatest([ this.querySpace.results.values$(), this.wpTableGroupBy.live$(), this.wpTableColumns.live$(), diff --git a/frontend/src/app/core/services/permissions/permissions.service.ts b/frontend/src/app/core/services/permissions/permissions.service.ts index 6d8e657e79e..7571e704fe1 100644 --- a/frontend/src/app/core/services/permissions/permissions.service.ts +++ b/frontend/src/app/core/services/permissions/permissions.service.ts @@ -1,9 +1,9 @@ import { Injectable } from '@angular/core'; -import {APIV3Service} from 'core-app/modules/apiv3/api-v3.service'; -import {Observable} from 'rxjs'; -import {CurrentProjectService} from 'core-components/projects/current-project.service'; -import {map} from 'rxjs/operators'; -import {FilterOperator} from 'core-components/api/api-v3/api-v3-filter-builder'; +import { APIV3Service } from 'core-app/modules/apiv3/api-v3.service'; +import { Observable } from 'rxjs'; +import { CurrentProjectService } from 'core-components/projects/current-project.service'; +import { map } from 'rxjs/operators'; +import { FilterOperator } from 'core-components/api/api-v3/api-v3-filter-builder'; @Injectable({ providedIn: 'root', @@ -21,7 +21,7 @@ export class PermissionsService { return this.apiV3Service .memberships .available_projects - .list({filters}) + .list({ filters }) .pipe(map(collection => !!collection.elements.length)); } } diff --git a/frontend/src/app/global-dynamic-components.const.ts b/frontend/src/app/global-dynamic-components.const.ts index a571639e659..ec9fd1f4c03 100644 --- a/frontend/src/app/global-dynamic-components.const.ts +++ b/frontend/src/app/global-dynamic-components.const.ts @@ -1,5 +1,5 @@ -import {OptionalBootstrapDefinition} from "core-app/globals/dynamic-bootstrapper"; -import {appBaseSelector, ApplicationBaseComponent} from "core-app/modules/router/base/application-base.component"; +import { OptionalBootstrapDefinition } from "core-app/globals/dynamic-bootstrapper"; +import { appBaseSelector, ApplicationBaseComponent } from "core-app/modules/router/base/application-base.component"; import { EmbeddedTablesMacroComponent, wpEmbeddedTableMacroSelector @@ -12,7 +12,7 @@ import { ZenModeButtonComponent, zenModeComponentSelector } from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component"; -import {AttachmentsComponent, attachmentsSelector} from "core-app/modules/attachments/attachments.component"; +import { AttachmentsComponent, attachmentsSelector } from "core-app/modules/attachments/attachments.component"; import { UserAutocompleterComponent, usersAutocompleterSelector @@ -29,7 +29,7 @@ import { CustomDateActionAdminComponent, customDateActionAdminSelector } from "core-components/wp-custom-actions/date-action/custom-date-action-admin.component"; -import {BoardsMenuComponent, boardsMenuSelector} from "core-app/modules/boards/boards-sidebar/boards-menu.component"; +import { BoardsMenuComponent, boardsMenuSelector } from "core-app/modules/boards/boards-sidebar/boards-menu.component"; import { GlobalSearchWorkPackagesEntryComponent, globalSearchWorkPackagesSelectorEntry @@ -50,7 +50,7 @@ import { PersistentToggleComponent, persistentToggleSelector } from "core-app/modules/common/persistent-toggle/persistent-toggle.component"; -import {UserAvatarComponent, userAvatarSelector} from "core-components/user/user-avatar/user-avatar.component"; +import { UserAvatarComponent, userAvatarSelector } from "core-components/user/user-avatar/user-avatar.component"; import { HideSectionLinkComponent, hideSectionLinkSelector @@ -79,7 +79,7 @@ import { ConfirmFormSubmitController, confirmFormSubmitSelector } from "core-components/modals/confirm-form-submit/confirm-form-submit.directive"; -import {MainMenuResizerComponent, mainMenuResizerSelector} from "core-components/resizer/main-menu-resizer.component"; +import { MainMenuResizerComponent, mainMenuResizerSelector } from "core-components/resizer/main-menu-resizer.component"; import { GlobalSearchInputComponent, globalSearchSelector @@ -116,12 +116,12 @@ import { GlobalSearchTabsComponent, globalSearchTabsSelector } from "core-app/modules/global_search/tabs/global-search-tabs.component"; -import {MainMenuToggleComponent, mainMenuToggleSelector} from "core-components/main-menu/main-menu-toggle.component"; +import { MainMenuToggleComponent, mainMenuToggleSelector } from "core-components/main-menu/main-menu-toggle.component"; import { MembersAutocompleterComponent, membersAutocompleterSelector } from "core-app/modules/members/members-autocompleter.component"; -import {EnterpriseBaseComponent, enterpriseBaseSelector} from "core-components/enterprise/enterprise-base.component"; +import { EnterpriseBaseComponent, enterpriseBaseSelector } from "core-components/enterprise/enterprise-base.component"; import { EEActiveSavedTrialComponent, enterpriseActiveSavedTrialSelector @@ -154,7 +154,7 @@ import { EditableQueryPropsComponent, editableQueryPropsSelector } from "core-app/modules/admin/editable-query-props/editable-query-props.component"; -import {SlideToggleComponent, slideToggleSelector} from "core-app/modules/common/slide-toggle/slide-toggle.component"; +import { SlideToggleComponent, slideToggleSelector } from "core-app/modules/common/slide-toggle/slide-toggle.component"; export const globalDynamicComponents:OptionalBootstrapDefinition[] = [ { selector: appBaseSelector, cls: ApplicationBaseComponent }, diff --git a/frontend/src/app/globals/dynamic-bootstrapper.ts b/frontend/src/app/globals/dynamic-bootstrapper.ts index 41bb165faa6..654ad9c1d3e 100644 --- a/frontend/src/app/globals/dynamic-bootstrapper.ts +++ b/frontend/src/app/globals/dynamic-bootstrapper.ts @@ -25,9 +25,9 @@ // // See docs/COPYRIGHT.rdoc for more details. -import {ComponentType} from "@angular/cdk/portal"; -import {ApplicationRef} from "@angular/core"; -import {filter, take} from "rxjs/operators"; +import { ComponentType } from "@angular/cdk/portal"; +import { ApplicationRef } from "@angular/core"; +import { filter, take } from "rxjs/operators"; /** * Optional bootstrap definition to allow selecting all matching diff --git a/frontend/src/app/globals/global-helpers.ts b/frontend/src/app/globals/global-helpers.ts index ebc41e84994..63c4216aa0e 100644 --- a/frontend/src/app/globals/global-helpers.ts +++ b/frontend/src/app/globals/global-helpers.ts @@ -42,7 +42,13 @@ export class GlobalHelpers { public toggleCheckboxesBySelector(selector:any) { const boxes = jQuery(selector); var all_checked = true; - for (let i = 0; i < boxes.length; i++) { if (boxes[i].checked === false) { all_checked = false; } } - for (let i = 0; i < boxes.length; i++) { boxes[i].checked = !all_checked; } + for (let i = 0; i < boxes.length; i++) { + if (boxes[i].checked === false) { + all_checked = false; + } + } + for (let i = 0; i < boxes.length; i++) { + boxes[i].checked = !all_checked; + } } } diff --git a/frontend/src/app/globals/global-listeners.ts b/frontend/src/app/globals/global-listeners.ts index 4009f314693..39e4c20d2d3 100644 --- a/frontend/src/app/globals/global-listeners.ts +++ b/frontend/src/app/globals/global-listeners.ts @@ -26,20 +26,20 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {performAnchorHijacking} from "./global-listeners/link-hijacking"; -import {augmentedDatePicker} from "./global-listeners/augmented-date-picker"; -import {refreshOnFormChanges} from 'core-app/globals/global-listeners/refresh-on-form-changes'; -import {registerRequestForConfirmation} from "core-app/globals/global-listeners/request-for-confirmation"; -import {DeviceService} from "core-app/modules/common/browser/device.service"; -import {scrollHeaderOnMobile} from "core-app/globals/global-listeners/top-menu-scroll"; -import {setupToggableFieldsets} from "core-app/globals/global-listeners/toggable-fieldset"; -import {TopMenu} from "core-app/globals/global-listeners/top-menu"; -import {install_menu_logic} from "core-app/globals/global-listeners/action-menu"; -import {makeColorPreviews} from "core-app/globals/global-listeners/color-preview"; -import {dangerZoneValidation} from "core-app/globals/global-listeners/danger-zone-validation"; -import {setupServerResponse} from "core-app/globals/global-listeners/setup-server-response"; -import {listenToSettingChanges} from "core-app/globals/global-listeners/settings"; -import {detectOnboardingTour} from "core-app/globals/onboarding/onboarding_tour_trigger"; +import { performAnchorHijacking } from "./global-listeners/link-hijacking"; +import { augmentedDatePicker } from "./global-listeners/augmented-date-picker"; +import { refreshOnFormChanges } from 'core-app/globals/global-listeners/refresh-on-form-changes'; +import { registerRequestForConfirmation } from "core-app/globals/global-listeners/request-for-confirmation"; +import { DeviceService } from "core-app/modules/common/browser/device.service"; +import { scrollHeaderOnMobile } from "core-app/globals/global-listeners/top-menu-scroll"; +import { setupToggableFieldsets } from "core-app/globals/global-listeners/toggable-fieldset"; +import { TopMenu } from "core-app/globals/global-listeners/top-menu"; +import { install_menu_logic } from "core-app/globals/global-listeners/action-menu"; +import { makeColorPreviews } from "core-app/globals/global-listeners/color-preview"; +import { dangerZoneValidation } from "core-app/globals/global-listeners/danger-zone-validation"; +import { setupServerResponse } from "core-app/globals/global-listeners/setup-server-response"; +import { listenToSettingChanges } from "core-app/globals/global-listeners/settings"; +import { detectOnboardingTour } from "core-app/globals/onboarding/onboarding_tour_trigger"; /** * A set of listeners that are relevant on every page to set sensible defaults @@ -83,7 +83,7 @@ import {detectOnboardingTour} from "core-app/globals/onboarding/onboarding_tour_ // Add to content if warnings displayed if (document.querySelector('.warning-bar--item')) { - let content = document.querySelector('#content') as HTMLElement; + const content = document.querySelector('#content') as HTMLElement; if (content) { content.style.marginBottom = '100px'; } diff --git a/frontend/src/app/globals/global-listeners/action-menu.ts b/frontend/src/app/globals/global-listeners/action-menu.ts index 730ffe21323..770db6b6776 100644 --- a/frontend/src/app/globals/global-listeners/action-menu.ts +++ b/frontend/src/app/globals/global-listeners/action-menu.ts @@ -41,7 +41,7 @@ The following code is responsible to open and close the "more functions" submenu. */ -import {ANIMATION_RATE_MS} from "core-app/globals/global-listeners/top-menu"; +import { ANIMATION_RATE_MS } from "core-app/globals/global-listeners/top-menu"; import ClickEvent = JQuery.ClickEvent; function menu_top_position(menu:JQuery) { @@ -49,8 +49,7 @@ function menu_top_position(menu:JQuery) { var menu_start_position; if (menu.next().get(0) !== undefined && (menu.next().get(0).tagName === 'H2')) { menu_start_position = menu.next().innerHeight()! + menu.next().position().top; - } - else if (menu.next().hasClass("wiki-content") && menu.next().children().next().first().get(0) != undefined && menu.next().children().next().first().get(0).tagName == 'H1') { + } else if (menu.next().hasClass("wiki-content") && menu.next().children().next().first().get(0) != undefined && menu.next().children().next().first().get(0).tagName == 'H1') { var wiki_heading = menu.next().children().next().first(); menu_start_position = wiki_heading.innerHeight()! + wiki_heading.position().top; } @@ -74,7 +73,7 @@ function open_menu(menu:JQuery) { drop_down.find('> ul').slideDown(ANIMATION_RATE_MS, function () { drop_down.find('li > a:first').focus(); // when clicking on something, which is not the menu, close the menu - jQuery('html').on('click', {menu: menu.get(0)}, close_menu); + jQuery('html').on('click', { menu: menu.get(0) }, close_menu); }); drop_down.addClass('open'); } diff --git a/frontend/src/app/globals/global-listeners/augmented-date-picker.ts b/frontend/src/app/globals/global-listeners/augmented-date-picker.ts index c2bbed3329d..18663b9c06c 100644 --- a/frontend/src/app/globals/global-listeners/augmented-date-picker.ts +++ b/frontend/src/app/globals/global-listeners/augmented-date-picker.ts @@ -1,4 +1,4 @@ -import {DatePicker} from "core-app/modules/common/op-date-picker/datepicker"; +import { DatePicker } from "core-app/modules/common/op-date-picker/datepicker"; /** * Our application is still a hybrid one, meaning most routes are still diff --git a/frontend/src/app/globals/global-listeners/color-preview.ts b/frontend/src/app/globals/global-listeners/color-preview.ts index af400ea4122..cc6302def76 100644 --- a/frontend/src/app/globals/global-listeners/color-preview.ts +++ b/frontend/src/app/globals/global-listeners/color-preview.ts @@ -34,10 +34,10 @@ */ export function makeColorPreviews() { jQuery('.color--preview').each(function () { - let preview = jQuery(this); + const preview = jQuery(this); let input:any; let func:any; - let target = preview.data('target'); + const target = preview.data('target'); if (target) { input = jQuery(target); @@ -56,7 +56,7 @@ export function makeColorPreviews() { previewColor = input.val(); } else if (input.attr('placeholder') && input.attr('placeholder').length > 0) { - previewColor = input.attr('placeholder') + previewColor = input.attr('placeholder'); } preview.css('background-color', previewColor); diff --git a/frontend/src/app/globals/global-listeners/danger-zone-validation.ts b/frontend/src/app/globals/global-listeners/danger-zone-validation.ts index 9a8b62726be..685689d0ffa 100644 --- a/frontend/src/app/globals/global-listeners/danger-zone-validation.ts +++ b/frontend/src/app/globals/global-listeners/danger-zone-validation.ts @@ -34,7 +34,7 @@ export function dangerZoneValidation() { var expectedValue = jQuery('.danger-zone--expected-value').text(); dangerZoneVerification.find('input').on('input', function () { - var actualValue = dangerZoneVerification.find('input').val() as String; + var actualValue = dangerZoneVerification.find('input').val() as string; if (expectedValue.toLowerCase() === actualValue.toLowerCase()) { dangerZoneVerification.find('button').prop('disabled', false); } else { diff --git a/frontend/src/app/globals/global-listeners/preview-trigger.service.ts b/frontend/src/app/globals/global-listeners/preview-trigger.service.ts index b9596f4a882..d9f0edf0f9c 100644 --- a/frontend/src/app/globals/global-listeners/preview-trigger.service.ts +++ b/frontend/src/app/globals/global-listeners/preview-trigger.service.ts @@ -27,9 +27,9 @@ //++ -import {Injectable, Injector} from "@angular/core"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {WpPreviewModal} from "core-components/modals/preview-modal/wp-preview-modal/wp-preview.modal"; +import { Injectable, Injector } from "@angular/core"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { WpPreviewModal } from "core-components/modals/preview-modal/wp-preview-modal/wp-preview.modal"; @Injectable({ providedIn: 'root' }) export class PreviewTriggerService { @@ -82,9 +82,9 @@ export class PreviewTriggerService { const previewElement = jQuery(this.modalElement.children[0]); if (previewElement && previewElement.offset()) { - let horizontalHover = e.pageX >= Math.floor(previewElement.offset()!.left) && + const horizontalHover = e.pageX >= Math.floor(previewElement.offset()!.left) && e.pageX < previewElement.offset()!.left + previewElement.width()!; - let verticalHover = e.pageY >= Math.floor(previewElement.offset()!.top) && + const verticalHover = e.pageY >= Math.floor(previewElement.offset()!.top) && e.pageY < previewElement.offset()!.top + previewElement.height()!; return horizontalHover && verticalHover; } diff --git a/frontend/src/app/globals/global-listeners/refresh-on-form-changes.ts b/frontend/src/app/globals/global-listeners/refresh-on-form-changes.ts index 27728d54ea4..14272a36137 100644 --- a/frontend/src/app/globals/global-listeners/refresh-on-form-changes.ts +++ b/frontend/src/app/globals/global-listeners/refresh-on-form-changes.ts @@ -30,7 +30,7 @@ export function refreshOnFormChanges() { const matches = document.querySelectorAll('.augment--refresh-on-form-changes'); for (let i = 0; i < matches.length; i++) { - let element = matches[i]; + const element = matches[i]; const form = jQuery(element); const url = form.data('refreshUrl'); const inputId = form.data('inputSelector'); diff --git a/frontend/src/app/globals/global-listeners/request-for-confirmation.ts b/frontend/src/app/globals/global-listeners/request-for-confirmation.ts index 84ceb33777c..ac372a625b5 100644 --- a/frontend/src/app/globals/global-listeners/request-for-confirmation.ts +++ b/frontend/src/app/globals/global-listeners/request-for-confirmation.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {PasswordConfirmationModal} from "core-components/modals/request-for-confirmation/password-confirmation.modal"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { PasswordConfirmationModal } from "core-components/modals/request-for-confirmation/password-confirmation.modal"; function registerListener( form:JQuery, @@ -73,7 +73,7 @@ export function registerRequestForConfirmation($:JQueryStatic) { const form = jQuery(this); if (form.find('input[name="_password_confirmation"]').length) { - return true; + return true; } return registerListener(form, $event, opModalService, passwordConfirmationModal); diff --git a/frontend/src/app/globals/global-listeners/settings.ts b/frontend/src/app/globals/global-listeners/settings.ts index df36ef58140..af519fa1970 100644 --- a/frontend/src/app/globals/global-listeners/settings.ts +++ b/frontend/src/app/globals/global-listeners/settings.ts @@ -28,13 +28,13 @@ export function listenToSettingChanges() { }); /* Javascript for Settings::TextSettingCell */ - let langSelectSwitchData = function (select:any) { - let self = jQuery(select); - let id:string = self.attr("id") || ''; - let settingName = id.replace('lang-for-', ''); - let newLang = self.val(); - let textArea = jQuery(`#settings-${settingName}`); - let editor = textArea.siblings('ckeditor-augmented-textarea').data('editor'); + const langSelectSwitchData = function (select:any) { + const self = jQuery(select); + const id:string = self.attr("id") || ''; + const settingName = id.replace('lang-for-', ''); + const newLang = self.val(); + const textArea = jQuery(`#settings-${settingName}`); + const editor = textArea.siblings('ckeditor-augmented-textarea').data('editor'); return { id: id, settingName: settingName, newLang: newLang, textArea: textArea, editor: editor }; }; @@ -47,14 +47,14 @@ export function listenToSettingChanges() { // is overwritten. jQuery(".lang-select-switch") .focus(function () { - let data = langSelectSwitchData(this); + const data = langSelectSwitchData(this); jQuery(`#${data.id}-${data.newLang}`).val(data.editor.getData()); }) .change(function () { - let data = langSelectSwitchData(this); + const data = langSelectSwitchData(this); - let storedValue = jQuery(`#${data.id}-${data.newLang}`).val(); + const storedValue = jQuery(`#${data.id}-${data.newLang}`).val(); data.editor.setData(storedValue); data.textArea.attr('name', `settings[${data.settingName}][${data.newLang}]`); diff --git a/frontend/src/app/globals/global-listeners/setup-server-response.ts b/frontend/src/app/globals/global-listeners/setup-server-response.ts index c97207825e3..e27a72cc220 100644 --- a/frontend/src/app/globals/global-listeners/setup-server-response.ts +++ b/frontend/src/app/globals/global-listeners/setup-server-response.ts @@ -123,8 +123,8 @@ function addClickEventToAllErrorMessages() { } function initMainMenuExpandStatus() { - let wrapper = jQuery('#wrapper'); - let upToggle = jQuery('ul.menu_root.closed li.open a.arrow-left-to-project'); + const wrapper = jQuery('#wrapper'); + const upToggle = jQuery('ul.menu_root.closed li.open a.arrow-left-to-project'); if (upToggle.length === 1 && wrapper.hasClass('hidden-navigation')) { upToggle.trigger('click'); @@ -132,7 +132,7 @@ function initMainMenuExpandStatus() { } function activateFlash(selector:any) { - let flashMessages = jQuery(selector); + const flashMessages = jQuery(selector); flashMessages.each(function (ix, e) { const flashMessage = jQuery(e); diff --git a/frontend/src/app/globals/global-listeners/toggable-fieldset.ts b/frontend/src/app/globals/global-listeners/toggable-fieldset.ts index f1dda5a19c5..154a61c86a1 100644 --- a/frontend/src/app/globals/global-listeners/toggable-fieldset.ts +++ b/frontend/src/app/globals/global-listeners/toggable-fieldset.ts @@ -92,7 +92,7 @@ export function setupToggableFieldsets() { .each(function() { var fieldset = getFieldset(this); - let contentArea = fieldset.find('> div'); + const contentArea = fieldset.find('> div'); if (fieldset.hasClass('collapsed')) { contentArea.hide(); } diff --git a/frontend/src/app/globals/global-listeners/top-menu-scroll.ts b/frontend/src/app/globals/global-listeners/top-menu-scroll.ts index b39d1e58521..236a9e332b8 100644 --- a/frontend/src/app/globals/global-listeners/top-menu-scroll.ts +++ b/frontend/src/app/globals/global-listeners/top-menu-scroll.ts @@ -34,7 +34,7 @@ export function scrollHeaderOnMobile() { window.addEventListener('scroll', function() { // Condition needed for safari browser to avoid negative positions - let currentScrollPos = window.scrollY < 0 ? 0 : window.scrollY; + const currentScrollPos = window.scrollY < 0 ? 0 : window.scrollY; // Only if sidebar is not opened or search bar is opened if (!(jQuery('#main').hasClass('hidden-navigation')) || jQuery('#top-menu').hasClass('-global-search-expanded') || diff --git a/frontend/src/app/globals/global-listeners/top-menu.ts b/frontend/src/app/globals/global-listeners/top-menu.ts index 5d8aac13e88..0f7bab76306 100644 --- a/frontend/src/app/globals/global-listeners/top-menu.ts +++ b/frontend/src/app/globals/global-listeners/top-menu.ts @@ -104,8 +104,8 @@ export class TopMenu { } closeOnBodyClick() { - let self = this; - let wrapper = document.getElementById('wrapper'); + const self = this; + const wrapper = document.getElementById('wrapper'); if (!wrapper) { return; diff --git a/frontend/src/app/globals/onboarding/helpers.ts b/frontend/src/app/globals/onboarding/helpers.ts index 2724d84d0bc..8134a6de6df 100644 --- a/frontend/src/app/globals/onboarding/helpers.ts +++ b/frontend/src/app/globals/onboarding/helpers.ts @@ -19,9 +19,9 @@ export function waitForElement(element:string, container:string, execFunction:Fu } export function demoProjectsLinks() { - let demoProjects = []; - let demoProjectsLink = jQuery(".widget-box.welcome a:contains(" + demoProjectName + ")"); - let scrumDemoProjectsLink = jQuery(".widget-box.welcome a:contains(" + scrumDemoProjectName + ")"); + const demoProjects = []; + const demoProjectsLink = jQuery(".widget-box.welcome a:contains(" + demoProjectName + ")"); + const scrumDemoProjectsLink = jQuery(".widget-box.welcome a:contains(" + scrumDemoProjectName + ")"); if (demoProjectsLink.length) { demoProjects.push(demoProjectsLink); diff --git a/frontend/src/app/globals/onboarding/onboarding_tour.ts b/frontend/src/app/globals/onboarding/onboarding_tour.ts index 7a6f34ef0af..35f3a935275 100644 --- a/frontend/src/app/globals/onboarding/onboarding_tour.ts +++ b/frontend/src/app/globals/onboarding/onboarding_tour.ts @@ -1,15 +1,15 @@ -import {wpOnboardingTourSteps} from "core-app/globals/onboarding/tours/work_package_tour"; +import { wpOnboardingTourSteps } from "core-app/globals/onboarding/tours/work_package_tour"; import { demoProjectsLinks, OnboardingTourNames, onboardingTourStorageKey, preventClickHandler, waitForElement } from "core-app/globals/onboarding/helpers"; -import {boardTourSteps} from "core-app/globals/onboarding/tours/boards_tour"; -import {menuTourSteps} from "core-app/globals/onboarding/tours/menu_tour"; -import {homescreenOnboardingTourSteps} from "core-app/globals/onboarding/tours/homescreen_tour"; -import {scrumBacklogsTourSteps, scrumTaskBoardTourSteps} from "core-app/globals/onboarding/tours/backlogs_tour"; -import {Injector} from "@angular/core"; +import { boardTourSteps } from "core-app/globals/onboarding/tours/boards_tour"; +import { menuTourSteps } from "core-app/globals/onboarding/tours/menu_tour"; +import { homescreenOnboardingTourSteps } from "core-app/globals/onboarding/tours/homescreen_tour"; +import { scrumBacklogsTourSteps, scrumTaskBoardTourSteps } from "core-app/globals/onboarding/tours/backlogs_tour"; +import { Injector } from "@angular/core"; require('core-vendor/enjoyhint'); @@ -24,21 +24,21 @@ declare global { export function start(name:OnboardingTourNames) { switch (name) { - case 'backlogs': - initializeTour('startTaskBoardTour'); - startTour(scrumBacklogsTourSteps()); - break; - case 'taskboard': - initializeTour('startMainTourFromBacklogs'); - startTour(scrumTaskBoardTourSteps()); - break; - case 'homescreen': - initializeTour('startProjectTour', '.widget-box--blocks--buttons a', true); - startTour(homescreenOnboardingTourSteps()); - break; - case 'main': - mainTour(); - break; + case 'backlogs': + initializeTour('startTaskBoardTour'); + startTour(scrumBacklogsTourSteps()); + break; + case 'taskboard': + initializeTour('startMainTourFromBacklogs'); + startTour(scrumTaskBoardTourSteps()); + break; + case 'homescreen': + initializeTour('startProjectTour', '.widget-box--blocks--buttons a', true); + startTour(homescreenOnboardingTourSteps()); + break; + case 'main': + mainTour(); + break; } } diff --git a/frontend/src/app/globals/onboarding/onboarding_tour_trigger.ts b/frontend/src/app/globals/onboarding/onboarding_tour_trigger.ts index 7084170c1f0..9e1943d6e1b 100644 --- a/frontend/src/app/globals/onboarding/onboarding_tour_trigger.ts +++ b/frontend/src/app/globals/onboarding/onboarding_tour_trigger.ts @@ -1,7 +1,7 @@ // Dynamically loads and triggers the onboarding tour // when on the correct spots -import {demoProjectsLinks, OnboardingTourNames, onboardingTourStorageKey} from "core-app/globals/onboarding/helpers"; -import {debugLog} from "core-app/helpers/debug_output"; +import { demoProjectsLinks, OnboardingTourNames, onboardingTourStorageKey } from "core-app/globals/onboarding/helpers"; +import { debugLog } from "core-app/helpers/debug_output"; export function detectOnboardingTour() { // ------------------------------- Global ------------------------------- diff --git a/frontend/src/app/globals/onboarding/tours/backlogs_tour.ts b/frontend/src/app/globals/onboarding/tours/backlogs_tour.ts index a7a15b0ec9c..13864509b8f 100644 --- a/frontend/src/app/globals/onboarding/tours/backlogs_tour.ts +++ b/frontend/src/app/globals/onboarding/tours/backlogs_tour.ts @@ -1,4 +1,4 @@ -import {onboardingTourStorageKey} from "core-app/globals/onboarding/helpers"; +import { onboardingTourStorageKey } from "core-app/globals/onboarding/helpers"; export function scrumBacklogsTourSteps() { return [ diff --git a/frontend/src/app/globals/onboarding/tours/boards_tour.ts b/frontend/src/app/globals/onboarding/tours/boards_tour.ts index 0a88419e032..43cbd0fbfd0 100644 --- a/frontend/src/app/globals/onboarding/tours/boards_tour.ts +++ b/frontend/src/app/globals/onboarding/tours/boards_tour.ts @@ -1,4 +1,4 @@ -import {waitForElement} from "core-app/globals/onboarding/helpers"; +import { waitForElement } from "core-app/globals/onboarding/helpers"; export function boardTourSteps() { return [ diff --git a/frontend/src/app/globals/onboarding/tours/homescreen_tour.ts b/frontend/src/app/globals/onboarding/tours/homescreen_tour.ts index 1e39a625f87..8919306bed5 100644 --- a/frontend/src/app/globals/onboarding/tours/homescreen_tour.ts +++ b/frontend/src/app/globals/onboarding/tours/homescreen_tour.ts @@ -1,4 +1,4 @@ -import {demoProjectName, preventClickHandler, scrumDemoProjectName} from "core-app/globals/onboarding/helpers"; +import { demoProjectName, preventClickHandler, scrumDemoProjectName } from "core-app/globals/onboarding/helpers"; export function homescreenOnboardingTourSteps() { return [ diff --git a/frontend/src/app/globals/onboarding/tours/work_package_tour.ts b/frontend/src/app/globals/onboarding/tours/work_package_tour.ts index 431c95297d9..ddb9bf6cf37 100644 --- a/frontend/src/app/globals/onboarding/tours/work_package_tour.ts +++ b/frontend/src/app/globals/onboarding/tours/work_package_tour.ts @@ -1,4 +1,4 @@ -import {waitForElement} from "core-app/globals/onboarding/helpers"; +import { waitForElement } from "core-app/globals/onboarding/helpers"; export function wpOnboardingTourSteps():any[] { return [ diff --git a/frontend/src/app/globals/openproject.ts b/frontend/src/app/globals/openproject.ts index 70b01a8a216..d689cb5ec61 100644 --- a/frontend/src/app/globals/openproject.ts +++ b/frontend/src/app/globals/openproject.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpenProjectPluginContext} from 'core-app/modules/plugins/plugin-context'; -import {input, InputState} from 'reactivestates'; -import {take} from 'rxjs/operators'; -import {GlobalHelpers} from "core-app/globals/global-helpers"; +import { OpenProjectPluginContext } from 'core-app/modules/plugins/plugin-context'; +import { input, InputState } from 'reactivestates'; +import { take } from 'rxjs/operators'; +import { GlobalHelpers } from "core-app/globals/global-helpers"; /** * OpenProject instance methods @@ -41,10 +41,10 @@ export class OpenProject { public helpers = new GlobalHelpers(); /** Globally setable variable whether the page was edited */ - public pageWasEdited:boolean = false; + public pageWasEdited = false; /** Globally setable variable whether the page form is submitted. * Necessary to avoid a data loss warning on beforeunload */ - public pageIsSubmitted:boolean = false; + public pageIsSubmitted = false; /** Globally setable variable whether any of the EditFormComponent * contain changes. * Necessary to show a data loss warning on beforeunload when clicking diff --git a/frontend/src/app/globals/tree-menu.ts b/frontend/src/app/globals/tree-menu.ts index f7cc618bbc0..0767294bb1c 100644 --- a/frontend/src/app/globals/tree-menu.ts +++ b/frontend/src/app/globals/tree-menu.ts @@ -32,23 +32,25 @@ $(function() { // set selected page for menu tree if provided. $('[data-selected-page]').closest('.tree-menu--container').each(function(_i:number, tree:HTMLElement) { - let selectedPage = $(tree).data('selected-page'); + const selectedPage = $(tree).data('selected-page'); if (selectedPage) { - let selected = $('[slug="' + selectedPage + '"]', tree); - selected.toggleClass('-selected', true); - if (selected.length > 1) { - selected[0].scrollIntoView(); - } + const selected = $('[slug="' + selectedPage + '"]', tree); + selected.toggleClass('-selected', true); + if (selected.length > 1) { + selected[0].scrollIntoView(); + } } }); function toggle (event:any) { // ignore the event if a key different from ENTER was pressed. - if (event.type === 'keypress' && event.which !== 13) { return false; } + if (event.type === 'keypress' && event.which !== 13) { + return false; + } - let target = $(event.target); - let targetList = target.closest('ul.-with-hierarchy > li'); + const target = $(event.target); + const targetList = target.closest('ul.-with-hierarchy > li'); targetList.toggleClass('-hierarchy-collapsed -hierarchy-expanded'); return false; } diff --git a/frontend/src/app/helpers/angular/inject-field.decorator.ts b/frontend/src/app/helpers/angular/inject-field.decorator.ts index d580b6eab80..ac9e0b521e1 100644 --- a/frontend/src/app/helpers/angular/inject-field.decorator.ts +++ b/frontend/src/app/helpers/angular/inject-field.decorator.ts @@ -1,6 +1,6 @@ import "reflect-metadata"; -import {Injector} from "@angular/core"; -import {debugLog} from "core-app/helpers/debug_output"; +import { Injector } from "@angular/core"; +import { debugLog } from "core-app/helpers/debug_output"; export interface InjectableClass { injector:Injector; @@ -24,4 +24,4 @@ export function InjectField(token?:any, defaultValue:any = null) { }); } }; -}; \ No newline at end of file +} \ No newline at end of file diff --git a/frontend/src/app/helpers/angular/until-destroyed.mixin.ts b/frontend/src/app/helpers/angular/until-destroyed.mixin.ts index d89aff3b605..ac283336f17 100644 --- a/frontend/src/app/helpers/angular/until-destroyed.mixin.ts +++ b/frontend/src/app/helpers/angular/until-destroyed.mixin.ts @@ -1,6 +1,6 @@ -import {OnDestroyMixin, untilComponentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {Directive, OnDestroy} from "@angular/core"; -import {Observable} from "rxjs"; +import { OnDestroyMixin, untilComponentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { Directive, OnDestroy } from "@angular/core"; +import { Observable } from "rxjs"; /** * Mixin function to provide access to observable and flags diff --git a/frontend/src/app/helpers/debug_output.ts b/frontend/src/app/helpers/debug_output.ts index 21d79d1aaaa..3adc277e56e 100644 --- a/frontend/src/app/helpers/debug_output.ts +++ b/frontend/src/app/helpers/debug_output.ts @@ -1,4 +1,4 @@ -import {environment} from '../../environments/environment'; +import { environment } from '../../environments/environment'; /** * Execute the callback when DEBUG is defined diff --git a/frontend/src/app/helpers/images/resizer.ts b/frontend/src/app/helpers/images/resizer.ts index 08a349a4626..fce626de20c 100644 --- a/frontend/src/app/helpers/images/resizer.ts +++ b/frontend/src/app/helpers/images/resizer.ts @@ -1,4 +1,4 @@ -import {UploadBlob} from "core-components/api/op-file-upload/op-file-upload.service"; +import { UploadBlob } from "core-components/api/op-file-upload/op-file-upload.service"; export namespace ImageHelpers { @@ -11,7 +11,7 @@ export namespace ImageHelpers { export function resizeFile(maxSize:number, file:File):Promise<[string, UploadBlob]> { return new Promise((resolve, _) => { const reader = new FileReader(); - reader.onload = (readerEvent: any) => { + reader.onload = (readerEvent:any) => { const image = new Image(); image.onload = () => resolve(resizeImage(maxSize, image)); image.src = readerEvent.target.result; @@ -49,7 +49,7 @@ export namespace ImageHelpers { canvas.width = width; canvas.height = height; ctx.drawImage(image, 0, 0, width, height); - let dataUrl = canvas.toDataURL('image/jpeg'); + const dataUrl = canvas.toDataURL('image/jpeg'); return [dataUrl, dataURItoBlob(dataUrl)]; } @@ -60,7 +60,9 @@ export namespace ImageHelpers { const mime = dataURI.split(',')[0].split(':')[1].split(';')[0]; const max = bytes.length; const ia = new Uint8Array(max); - for (var i = 0; i < max; i++) ia[i] = bytes.charCodeAt(i); - return new Blob([ia], {type: mime}); + for (var i = 0; i < max; i++) { + ia[i] = bytes.charCodeAt(i); + } + return new Blob([ia], { type: mime }); } } diff --git a/frontend/src/app/helpers/op-icon-builder.ts b/frontend/src/app/helpers/op-icon-builder.ts index 6a7efe18a7b..1a9e06d8d2d 100644 --- a/frontend/src/app/helpers/op-icon-builder.ts +++ b/frontend/src/app/helpers/op-icon-builder.ts @@ -3,7 +3,7 @@ * and aria-hidden=true set. */ export function opIconElement(...classes:string[]) { - let icon = document.createElement('i'); + const icon = document.createElement('i'); icon.setAttribute('aria-hidden', 'true'); icon.classList.add(...classes); diff --git a/frontend/src/app/helpers/random-string.ts b/frontend/src/app/helpers/random-string.ts index a557622c3f6..d137daeb78c 100644 --- a/frontend/src/app/helpers/random-string.ts +++ b/frontend/src/app/helpers/random-string.ts @@ -1,7 +1,7 @@ -export function randomString(length:number = 16) { - let pattern = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; +export function randomString(length = 16) { + const pattern = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; let random = ''; - for (let _element of new Array(length)) { + for (const _element of new Array(length)) { random += pattern.charAt(Math.floor(Math.random() * pattern.length)); } return random; diff --git a/frontend/src/app/helpers/rxjs/debounced-input-switchmap.ts b/frontend/src/app/helpers/rxjs/debounced-input-switchmap.ts index 5a9dfb50781..fbcb0eea205 100644 --- a/frontend/src/app/helpers/rxjs/debounced-input-switchmap.ts +++ b/frontend/src/app/helpers/rxjs/debounced-input-switchmap.ts @@ -1,5 +1,5 @@ -import {concat, Observable, of, Subject} from "rxjs"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; +import { concat, Observable, of, Subject } from "rxjs"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; import { catchError, debounceTime, @@ -8,8 +8,8 @@ import { takeUntil, tap } from "rxjs/operators"; -import {RequestSwitchmapHandler} from "core-app/helpers/rxjs/request-switchmap"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; +import { RequestSwitchmapHandler } from "core-app/helpers/rxjs/request-switchmap"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; export type RequestErrorHandler = (error:unknown) => void; diff --git a/frontend/src/app/helpers/rxjs/request-switchmap.ts b/frontend/src/app/helpers/rxjs/request-switchmap.ts index 76c2ef67eb8..751757df4bf 100644 --- a/frontend/src/app/helpers/rxjs/request-switchmap.ts +++ b/frontend/src/app/helpers/rxjs/request-switchmap.ts @@ -1,6 +1,6 @@ -import {Observable, Subject} from "rxjs"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {switchMap, takeUntil} from "rxjs/operators"; +import { Observable, Subject } from "rxjs"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { switchMap, takeUntil } from "rxjs/operators"; export type RequestSwitchmapHandler = (input:T) => Observable; diff --git a/frontend/src/app/modules/a11y/accessible-by-keyboard.component.spec.ts b/frontend/src/app/modules/a11y/accessible-by-keyboard.component.spec.ts index e8a7f66deff..b880a928b12 100644 --- a/frontend/src/app/modules/a11y/accessible-by-keyboard.component.spec.ts +++ b/frontend/src/app/modules/a11y/accessible-by-keyboard.component.spec.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AccessibleByKeyboardComponent} from "core-app/modules/a11y/accessible-by-keyboard.component"; +import { AccessibleByKeyboardComponent } from "core-app/modules/a11y/accessible-by-keyboard.component"; -import {ComponentFixture, TestBed} from '@angular/core/testing'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; describe('accessibleByKeyboard component', () => { diff --git a/frontend/src/app/modules/a11y/accessible-by-keyboard.component.ts b/frontend/src/app/modules/a11y/accessible-by-keyboard.component.ts index c1cb4cbb49f..95be34a1664 100644 --- a/frontend/src/app/modules/a11y/accessible-by-keyboard.component.ts +++ b/frontend/src/app/modules/a11y/accessible-by-keyboard.component.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, EventEmitter, Input, Output} from '@angular/core'; +import { Component, EventEmitter, Input, Output } from '@angular/core'; @Component({ selector: 'accessible-by-keyboard', diff --git a/frontend/src/app/modules/a11y/accessible-click.directive.spec.ts b/frontend/src/app/modules/a11y/accessible-click.directive.spec.ts index 93fbd1b2de5..cfffa73ac93 100644 --- a/frontend/src/app/modules/a11y/accessible-click.directive.spec.ts +++ b/frontend/src/app/modules/a11y/accessible-click.directive.spec.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, DebugElement} from "@angular/core"; +import { Component, DebugElement } from "@angular/core"; -import {ComponentFixture, fakeAsync, TestBed, tick} from '@angular/core/testing'; -import {By} from "@angular/platform-browser"; -import {AccessibleClickDirective} from "core-app/modules/a11y/accessible-click.directive"; +import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing'; +import { By } from "@angular/platform-browser"; +import { AccessibleClickDirective } from "core-app/modules/a11y/accessible-click.directive"; @Component({ template: `
    Click me
    ` diff --git a/frontend/src/app/modules/a11y/accessible-click.directive.ts b/frontend/src/app/modules/a11y/accessible-click.directive.ts index 91a69912840..dd060aae19a 100644 --- a/frontend/src/app/modules/a11y/accessible-click.directive.ts +++ b/frontend/src/app/modules/a11y/accessible-click.directive.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Directive, EventEmitter, HostListener, Input, Output} from '@angular/core'; -import {LinkHandling} from 'core-app/modules/common/link-handling/link-handling'; +import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/core'; +import { LinkHandling } from 'core-app/modules/common/link-handling/link-handling'; @Directive({ selector: '[accessibleClick]', }) export class AccessibleClickDirective { - @Input('accessibleClickStopEvent') stopEventPropagation:boolean = true; - @Input('accessibleClickSkipModifiers') skipEventModifiers:boolean = false; + @Input('accessibleClickStopEvent') stopEventPropagation = true; + @Input('accessibleClickSkipModifiers') skipEventModifiers = false; @Output('accessibleClick') onClick = new EventEmitter(); @HostListener('click', ['$event']) diff --git a/frontend/src/app/modules/a11y/double-click-or-tap.directive.ts b/frontend/src/app/modules/a11y/double-click-or-tap.directive.ts index 15ff56d33c7..b6ef4d30a7c 100644 --- a/frontend/src/app/modules/a11y/double-click-or-tap.directive.ts +++ b/frontend/src/app/modules/a11y/double-click-or-tap.directive.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Directive, EventEmitter, HostListener, Input, Output} from '@angular/core'; +import { Directive, EventEmitter, HostListener, Input, Output } from '@angular/core'; @Directive({ selector: '[doubleClickOrTap]', }) export class DoubleClickOrTapDirective { - @Input('doubleClickOrTapStopEvent') stopEventPropagation:boolean = true; + @Input('doubleClickOrTapStopEvent') stopEventPropagation = true; @Output('doubleClickOrTap') eventHandler = new EventEmitter(); @HostListener('dblclick', ['$event']) @@ -60,7 +60,7 @@ export class DoubleClickOrTapDirective { if (this.stopEventPropagation) { event.preventDefault(); - if (!!event.stopPropagation) { + if (event.stopPropagation) { event.stopPropagation(); } diff --git a/frontend/src/app/modules/a11y/keyboard-shortcut-service.ts b/frontend/src/app/modules/a11y/keyboard-shortcut-service.ts index 9d9779a0764..c25b835fab2 100644 --- a/frontend/src/app/modules/a11y/keyboard-shortcut-service.ts +++ b/frontend/src/app/modules/a11y/keyboard-shortcut-service.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; -import {PathHelperService} from "../common/path-helper/path-helper.service"; -import {CurrentProjectService} from "../../components/projects/current-project.service"; -import {FocusHelperService} from "../common/focus/focus-helper"; +import { Injectable } from "@angular/core"; +import { PathHelperService } from "../common/path-helper/path-helper.service"; +import { CurrentProjectService } from "../../components/projects/current-project.service"; +import { FocusHelperService } from "../common/focus/focus-helper"; const accessKeys = { preview: 1, @@ -122,18 +122,12 @@ export class KeyboardShortcutService { } clickLink(link:any) { - var cancelled = false; - - if (!!document.createEvent) { - var event = new MouseEvent('click', { - view: window, - bubbles: true, - cancelable: true - }); - cancelled = !link.dispatchEvent(event); - } else if (link.fireEvent) { - cancelled = !link.fireEvent('onclick'); - } + const event = new MouseEvent('click', { + view: window, + bubbles: true, + cancelable: true + }); + const cancelled = !link.dispatchEvent(event); if (!cancelled) { window.location.href = link.href; diff --git a/frontend/src/app/modules/a11y/openproject-a11y.module.ts b/frontend/src/app/modules/a11y/openproject-a11y.module.ts index 7b0de7cd392..601a344e47b 100644 --- a/frontend/src/app/modules/a11y/openproject-a11y.module.ts +++ b/frontend/src/app/modules/a11y/openproject-a11y.module.ts @@ -27,12 +27,12 @@ //++ Ng1FieldControlsWrapper, -import {FormsModule} from "@angular/forms"; -import {NgModule} from "@angular/core"; -import {AccessibleClickDirective} from "core-app/modules/a11y/accessible-click.directive"; -import {AccessibleByKeyboardComponent} from "core-app/modules/a11y/accessible-by-keyboard.component"; -import {CommonModule} from "@angular/common"; -import {DoubleClickOrTapDirective} from "core-app/modules/a11y/double-click-or-tap.directive"; +import { FormsModule } from "@angular/forms"; +import { NgModule } from "@angular/core"; +import { AccessibleClickDirective } from "core-app/modules/a11y/accessible-click.directive"; +import { AccessibleByKeyboardComponent } from "core-app/modules/a11y/accessible-by-keyboard.component"; +import { CommonModule } from "@angular/common"; +import { DoubleClickOrTapDirective } from "core-app/modules/a11y/double-click-or-tap.directive"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/admin/editable-query-props/editable-query-props.component.ts b/frontend/src/app/modules/admin/editable-query-props/editable-query-props.component.ts index 3d3ef0c5f31..e7c48c5e55b 100644 --- a/frontend/src/app/modules/admin/editable-query-props/editable-query-props.component.ts +++ b/frontend/src/app/modules/admin/editable-query-props/editable-query-props.component.ts @@ -1,7 +1,7 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ExternalQueryConfigurationService} from "core-components/wp-table/external-configuration/external-query-configuration.service"; -import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, OnInit } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ExternalQueryConfigurationService } from "core-components/wp-table/external-configuration/external-query-configuration.service"; +import { UrlParamsHelperService } from "core-components/wp-query/url-params-helper"; export const editableQueryPropsSelector = 'editable-query-props'; @@ -13,7 +13,7 @@ export const editableQueryPropsSelector = 'editable-query-props'; export class EditableQueryPropsComponent implements OnInit { id:string|null; name:string|null; - urlParams:boolean = false; + urlParams = false; queryProps:string; diff --git a/frontend/src/app/modules/admin/openproject-admin.module.ts b/frontend/src/app/modules/admin/openproject-admin.module.ts index 2af597198f5..50ef4c8801e 100644 --- a/frontend/src/app/modules/admin/openproject-admin.module.ts +++ b/frontend/src/app/modules/admin/openproject-admin.module.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {TypeFormConfigurationComponent} from 'core-app/modules/admin/types/type-form-configuration.component'; -import {GroupEditInPlaceComponent} from 'core-app/modules/admin/types/group-edit-in-place.component'; -import {TypeFormAttributeGroupComponent} from 'core-app/modules/admin/types/attribute-group.component'; -import {DragulaModule} from 'ng2-dragula'; -import {TypeFormQueryGroupComponent} from "core-app/modules/admin/types/query-group.component"; -import {OpenprojectAccessibilityModule} from "core-app/modules/a11y/openproject-a11y.module"; -import {EditableQueryPropsComponent} from "core-app/modules/admin/editable-query-props/editable-query-props.component"; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { TypeFormConfigurationComponent } from 'core-app/modules/admin/types/type-form-configuration.component'; +import { GroupEditInPlaceComponent } from 'core-app/modules/admin/types/group-edit-in-place.component'; +import { TypeFormAttributeGroupComponent } from 'core-app/modules/admin/types/attribute-group.component'; +import { DragulaModule } from 'ng2-dragula'; +import { TypeFormQueryGroupComponent } from "core-app/modules/admin/types/query-group.component"; +import { OpenprojectAccessibilityModule } from "core-app/modules/a11y/openproject-a11y.module"; +import { EditableQueryPropsComponent } from "core-app/modules/admin/editable-query-props/editable-query-props.component"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/admin/types/attribute-group.component.ts b/frontend/src/app/modules/admin/types/attribute-group.component.ts index eb42fca065a..be41d2bf1d6 100644 --- a/frontend/src/app/modules/admin/types/attribute-group.component.ts +++ b/frontend/src/app/modules/admin/types/attribute-group.component.ts @@ -1,6 +1,6 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output} from '@angular/core'; -import {TypeFormAttribute, TypeGroup} from "core-app/modules/admin/types/type-form-configuration.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core'; +import { TypeFormAttribute, TypeGroup } from "core-app/modules/admin/types/type-form-configuration.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ selector: 'type-form-attribute-group', diff --git a/frontend/src/app/modules/admin/types/group-edit-in-place.component.ts b/frontend/src/app/modules/admin/types/group-edit-in-place.component.ts index b541bd703b0..6fe082a4f55 100644 --- a/frontend/src/app/modules/admin/types/group-edit-in-place.component.ts +++ b/frontend/src/app/modules/admin/types/group-edit-in-place.component.ts @@ -35,7 +35,7 @@ import { OnInit, Output } from '@angular/core'; -import {TypeBannerService} from 'core-app/modules/admin/types/type-banner.service'; +import { TypeBannerService } from 'core-app/modules/admin/types/type-banner.service'; @Component({ selector: 'group-edit-in-place', @@ -43,7 +43,7 @@ import {TypeBannerService} from 'core-app/modules/admin/types/type-banner.servic templateUrl: './group-edit-in-place.html' }) export class GroupEditInPlaceComponent implements OnInit { - @Input() public placeholder:string = ''; + @Input() public placeholder = ''; @Input() public name:string; @Output() public onValueChange = new EventEmitter(); diff --git a/frontend/src/app/modules/admin/types/query-group.component.ts b/frontend/src/app/modules/admin/types/query-group.component.ts index b13d2a32e50..b0bbf4c9281 100644 --- a/frontend/src/app/modules/admin/types/query-group.component.ts +++ b/frontend/src/app/modules/admin/types/query-group.component.ts @@ -1,5 +1,5 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output} from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ selector: 'type-form-query-group', diff --git a/frontend/src/app/modules/admin/types/type-banner.service.ts b/frontend/src/app/modules/admin/types/type-banner.service.ts index 62d14225b24..e52d7a7ccee 100644 --- a/frontend/src/app/modules/admin/types/type-banner.service.ts +++ b/frontend/src/app/modules/admin/types/type-banner.service.ts @@ -1,8 +1,8 @@ -import {ConfirmDialogService} from 'core-components/modals/confirm-dialog/confirm-dialog.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {BannersService} from 'core-app/modules/common/enterprise/banners.service'; +import { ConfirmDialogService } from 'core-components/modals/confirm-dialog/confirm-dialog.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { BannersService } from 'core-app/modules/common/enterprise/banners.service'; import { Inject, Injectable } from '@angular/core'; -import {DOCUMENT} from '@angular/common'; +import { DOCUMENT } from '@angular/common'; @Injectable() export class TypeBannerService extends BannersService { diff --git a/frontend/src/app/modules/admin/types/type-form-configuration.component.ts b/frontend/src/app/modules/admin/types/type-form-configuration.component.ts index e970d5acf68..5d284329928 100644 --- a/frontend/src/app/modules/admin/types/type-form-configuration.component.ts +++ b/frontend/src/app/modules/admin/types/type-form-configuration.component.ts @@ -1,15 +1,15 @@ -import {AfterViewInit, Component, ElementRef, OnInit} from '@angular/core'; -import {TypeBannerService} from 'core-app/modules/admin/types/type-banner.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {ExternalRelationQueryConfigurationService} from 'core-components/wp-table/external-configuration/external-relation-query-configuration.service'; -import {DomAutoscrollService} from 'core-app/modules/common/drag-and-drop/dom-autoscroll.service'; -import {DragulaService, DrakeWithModels} from 'ng2-dragula'; -import {ConfirmDialogService} from 'core-components/modals/confirm-dialog/confirm-dialog.service'; -import {Drake} from 'dragula'; -import {GonService} from "core-app/modules/common/gon/gon.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {install_menu_logic} from "core-app/globals/global-listeners/action-menu"; +import { AfterViewInit, Component, ElementRef, OnInit } from '@angular/core'; +import { TypeBannerService } from 'core-app/modules/admin/types/type-banner.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { ExternalRelationQueryConfigurationService } from 'core-components/wp-table/external-configuration/external-relation-query-configuration.service'; +import { DomAutoscrollService } from 'core-app/modules/common/drag-and-drop/dom-autoscroll.service'; +import { DragulaService, DrakeWithModels } from 'ng2-dragula'; +import { ConfirmDialogService } from 'core-components/modals/confirm-dialog/confirm-dialog.service'; +import { Drake } from 'dragula'; +import { GonService } from "core-app/modules/common/gon/gon.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { install_menu_logic } from "core-app/globals/global-listeners/action-menu"; export type TypeGroupType = 'attribute'|'query'; @@ -158,7 +158,7 @@ export class TypeFormConfigurationComponent extends UntilDestroyedMixin implemen } public addGroupAndOpenQuery():void { - let newGroup = this.createGroup('query'); + const newGroup = this.createGroup('query'); this.editQuery(newGroup); } @@ -186,8 +186,8 @@ export class TypeFormConfigurationComponent extends UntilDestroyedMixin implemen return group; } - public createGroup(type:TypeGroupType, groupName:string = '') { - let group:TypeGroup = { + public createGroup(type:TypeGroupType, groupName = '') { + const group:TypeGroup = { type: type, name: '', key: null, diff --git a/frontend/src/app/modules/apiv3/api-v3.service.spec.ts b/frontend/src/app/modules/apiv3/api-v3.service.spec.ts index 38418457892..4a8e3c6c482 100644 --- a/frontend/src/app/modules/apiv3/api-v3.service.spec.ts +++ b/frontend/src/app/modules/apiv3/api-v3.service.spec.ts @@ -27,9 +27,9 @@ //++ import { TestBed, waitForAsync } from "@angular/core/testing"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {States} from "core-components/states.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { States } from "core-components/states.service"; describe('APIv3Service', function() { let service:APIV3Service; diff --git a/frontend/src/app/modules/apiv3/api-v3.service.ts b/frontend/src/app/modules/apiv3/api-v3.service.ts index 44963805eba..ab018029b8a 100644 --- a/frontend/src/app/modules/apiv3/api-v3.service.ts +++ b/frontend/src/app/modules/apiv3/api-v3.service.ts @@ -26,35 +26,35 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from "@angular/core"; +import { Injectable, Injector } from "@angular/core"; import { APIv3GettableResource, APIv3ResourceCollection, APIv3ResourcePath } from "core-app/modules/apiv3/paths/apiv3-resource"; -import {Constructor} from "@angular/cdk/table"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {Apiv3GridsPaths} from "core-app/modules/apiv3/endpoints/grids/apiv3-grids-paths"; -import {Apiv3TimeEntriesPaths} from "core-app/modules/apiv3/endpoints/time-entries/apiv3-time-entries-paths"; -import {Apiv3MembershipsPaths} from "core-app/modules/apiv3/endpoints/memberships/apiv3-memberships-paths"; -import {Apiv3UsersPaths} from "core-app/modules/apiv3/endpoints/users/apiv3-users-paths"; -import {Apiv3PlaceholderUsersPaths} from 'core-app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-users-paths.ts'; -import {Apiv3GroupsPaths} from 'core-app/modules/apiv3/endpoints/groups/apiv3-groups-paths.ts'; -import {APIv3TypesPaths} from "core-app/modules/apiv3/endpoints/types/apiv3-types-paths"; -import {APIv3QueriesPaths} from "core-app/modules/apiv3/endpoints/queries/apiv3-queries-paths"; -import {APIV3WorkPackagesPaths} from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths"; -import {APIv3ProjectPaths} from "core-app/modules/apiv3/endpoints/projects/apiv3-project-paths"; -import {APIv3ProjectsPaths} from "core-app/modules/apiv3/endpoints/projects/apiv3-projects-paths"; -import {APIv3StatusesPaths} from "core-app/modules/apiv3/endpoints/statuses/apiv3-statuses-paths"; -import {APIv3RolesPaths} from "core-app/modules/apiv3/endpoints/roles/apiv3-roles-paths"; -import {APIv3VersionsPaths} from "core-app/modules/apiv3/endpoints/versions/apiv3-versions-paths"; -import {Apiv3RelationsPaths} from "core-app/modules/apiv3/endpoints/relations/apiv3-relations-paths"; -import {Apiv3NewsPaths} from "core-app/modules/apiv3/endpoints/news/apiv3-news-paths"; -import {Apiv3HelpTextsPaths} from "core-app/modules/apiv3/endpoints/help_texts/apiv3-help-texts-paths"; -import {Apiv3ConfigurationPath} from "core-app/modules/apiv3/endpoints/configuration/apiv3-configuration-path"; -import {Apiv3BoardsPaths} from "core-app/modules/apiv3/virtual/apiv3-boards-paths"; -import {RootResource} from "core-app/modules/hal/resources/root-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; +import { Constructor } from "@angular/cdk/table"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { Apiv3GridsPaths } from "core-app/modules/apiv3/endpoints/grids/apiv3-grids-paths"; +import { Apiv3TimeEntriesPaths } from "core-app/modules/apiv3/endpoints/time-entries/apiv3-time-entries-paths"; +import { Apiv3MembershipsPaths } from "core-app/modules/apiv3/endpoints/memberships/apiv3-memberships-paths"; +import { Apiv3UsersPaths } from "core-app/modules/apiv3/endpoints/users/apiv3-users-paths"; +import { Apiv3PlaceholderUsersPaths } from 'core-app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-users-paths.ts'; +import { Apiv3GroupsPaths } from 'core-app/modules/apiv3/endpoints/groups/apiv3-groups-paths.ts'; +import { APIv3TypesPaths } from "core-app/modules/apiv3/endpoints/types/apiv3-types-paths"; +import { APIv3QueriesPaths } from "core-app/modules/apiv3/endpoints/queries/apiv3-queries-paths"; +import { APIV3WorkPackagesPaths } from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths"; +import { APIv3ProjectPaths } from "core-app/modules/apiv3/endpoints/projects/apiv3-project-paths"; +import { APIv3ProjectsPaths } from "core-app/modules/apiv3/endpoints/projects/apiv3-projects-paths"; +import { APIv3StatusesPaths } from "core-app/modules/apiv3/endpoints/statuses/apiv3-statuses-paths"; +import { APIv3RolesPaths } from "core-app/modules/apiv3/endpoints/roles/apiv3-roles-paths"; +import { APIv3VersionsPaths } from "core-app/modules/apiv3/endpoints/versions/apiv3-versions-paths"; +import { Apiv3RelationsPaths } from "core-app/modules/apiv3/endpoints/relations/apiv3-relations-paths"; +import { Apiv3NewsPaths } from "core-app/modules/apiv3/endpoints/news/apiv3-news-paths"; +import { Apiv3HelpTextsPaths } from "core-app/modules/apiv3/endpoints/help_texts/apiv3-help-texts-paths"; +import { Apiv3ConfigurationPath } from "core-app/modules/apiv3/endpoints/configuration/apiv3-configuration-path"; +import { Apiv3BoardsPaths } from "core-app/modules/apiv3/virtual/apiv3-boards-paths"; +import { RootResource } from "core-app/modules/hal/resources/root-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; import * as ts from "typescript/lib/tsserverlibrary"; import Project = ts.server.Project; @@ -115,10 +115,10 @@ export class APIV3Service { public readonly users = this.apiV3CustomEndpoint(Apiv3UsersPaths); // /api/v3/placeholderUsers - public readonly placeholder_users = this.apiV3CustomEndpoint(Apiv3PlaceholderUsersPaths) + public readonly placeholder_users = this.apiV3CustomEndpoint(Apiv3PlaceholderUsersPaths); // /api/v3/groups - public readonly groups = this.apiV3CustomEndpoint(Apiv3GroupsPaths) + public readonly groups = this.apiV3CustomEndpoint(Apiv3GroupsPaths); // /api/v3/roles public readonly roles = this.apiV3CustomEndpoint(APIv3RolesPaths); diff --git a/frontend/src/app/modules/apiv3/cache/cachable-apiv3-collection.ts b/frontend/src/app/modules/apiv3/cache/cachable-apiv3-collection.ts index 77ba96432a0..2c1a07d2aee 100644 --- a/frontend/src/app/modules/apiv3/cache/cachable-apiv3-collection.ts +++ b/frontend/src/app/modules/apiv3/cache/cachable-apiv3-collection.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource, APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {States} from "core-components/states.service"; -import {HasId, StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {Observable} from "rxjs"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {tap} from "rxjs/operators"; +import { APIv3GettableResource, APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { States } from "core-components/states.service"; +import { HasId, StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { Observable } from "rxjs"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { tap } from "rxjs/operators"; export abstract class CachableAPIV3Collection< T extends HasId = HalResource, diff --git a/frontend/src/app/modules/apiv3/cache/cachable-apiv3-resource.ts b/frontend/src/app/modules/apiv3/cache/cachable-apiv3-resource.ts index f0c9776cf16..a5e7e5db8da 100644 --- a/frontend/src/app/modules/apiv3/cache/cachable-apiv3-resource.ts +++ b/frontend/src/app/modules/apiv3/cache/cachable-apiv3-resource.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {States} from "core-components/states.service"; -import {HasId, StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {concat, from, merge, Observable, of} from "rxjs"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {mapTo, publish, share, shareReplay, switchMap, take, tap} from "rxjs/operators"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { APIv3GettableResource } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { States } from "core-components/states.service"; +import { HasId, StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { concat, from, merge, Observable, of } from "rxjs"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { mapTo, publish, share, shareReplay, switchMap, take, tap } from "rxjs/operators"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; export abstract class CachableAPIV3Resource extends APIv3GettableResource { @@ -50,7 +50,7 @@ export abstract class CachableAPIV3Resource * * @param force Load the value anyway. */ - public requireAndStream(force:boolean = false):Observable { + public requireAndStream(force = false):Observable { const id = this.id.toString(); // Refresh when stale or being forced diff --git a/frontend/src/app/modules/apiv3/cache/state-cache.service.ts b/frontend/src/app/modules/apiv3/cache/state-cache.service.ts index b566acad925..478d9b80572 100644 --- a/frontend/src/app/modules/apiv3/cache/state-cache.service.ts +++ b/frontend/src/app/modules/apiv3/cache/state-cache.service.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {MultiInputState, State} from 'reactivestates'; -import {Observable} from "rxjs"; -import {auditTime, map, share, startWith, take} from "rxjs/operators"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; +import { MultiInputState, State } from 'reactivestates'; +import { Observable } from "rxjs"; +import { auditTime, map, share, startWith, take } from "rxjs/operators"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; export interface HasId { id:string|null; @@ -39,7 +39,7 @@ export class StateCacheService { protected cacheDurationInMs:number; protected multiState:MultiInputState; - constructor(state:MultiInputState, holdValuesForSeconds:number = 3600) { + constructor(state:MultiInputState, holdValuesForSeconds = 3600) { this.multiState = state; this.cacheDurationInMs = holdValuesForSeconds * 1000; } @@ -128,7 +128,7 @@ export class StateCacheService { startWith([]), auditTime(250), map(() => { - let mapped:T[] = []; + const mapped:T[] = []; _.each(this.multiState.getValueOr({}), (state:State) => { if (state.value) { mapped.push(state.value); diff --git a/frontend/src/app/modules/apiv3/endpoints/configuration/apiv3-configuration-path.ts b/frontend/src/app/modules/apiv3/endpoints/configuration/apiv3-configuration-path.ts index bd14f4d3860..3c9fd4c361f 100644 --- a/frontend/src/app/modules/apiv3/endpoints/configuration/apiv3-configuration-path.ts +++ b/frontend/src/app/modules/apiv3/endpoints/configuration/apiv3-configuration-path.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource, APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {APIv3FormResource} from "core-app/modules/apiv3/forms/apiv3-form-resource"; -import {ConfigurationResource} from "core-app/modules/hal/resources/configuration-resource"; -import {Observable} from "rxjs"; -import {shareReplay} from "rxjs/operators"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { APIv3GettableResource, APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; +import { ConfigurationResource } from "core-app/modules/hal/resources/configuration-resource"; +import { Observable } from "rxjs"; +import { shareReplay } from "rxjs/operators"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export class Apiv3ConfigurationPath extends APIv3GettableResource { private $configuration:Observable; diff --git a/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grid-form.ts b/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grid-form.ts index 1c7d932c608..123af525acb 100644 --- a/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grid-form.ts +++ b/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grid-form.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3FormResource} from "core-app/modules/apiv3/forms/apiv3-form-resource"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {HalPayloadHelper} from "core-app/modules/hal/schemas/hal-payload.helper"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; +import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { HalPayloadHelper } from "core-app/modules/hal/schemas/hal-payload.helper"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; export class Apiv3GridForm extends APIv3FormResource { @@ -43,8 +43,8 @@ export class Apiv3GridForm extends APIv3FormResource { */ public static extractPayload(resource:HalResource|Object, schema:SchemaResource|null = null):Object { if (resource instanceof HalResource && schema) { - let grid = resource as HalResource; - let payload = HalPayloadHelper.extractPayloadFromSchema(grid, schema); + const grid = resource as HalResource; + const payload = HalPayloadHelper.extractPayloadFromSchema(grid, schema); // The widget only states the type of the widget resource but does not explain // the widget itself. We therefore have to do that by hand. diff --git a/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grid-paths.ts b/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grid-paths.ts index 0663c684df6..1a91d642407 100644 --- a/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grid-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grid-paths.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {Observable} from "rxjs"; -import {Apiv3GridForm} from "core-app/modules/apiv3/endpoints/grids/apiv3-grid-form"; +import { APIv3GettableResource } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { Observable } from "rxjs"; +import { Apiv3GridForm } from "core-app/modules/apiv3/endpoints/grids/apiv3-grid-form"; export class Apiv3GridPaths extends APIv3GettableResource { // Static paths @@ -42,7 +42,7 @@ export class Apiv3GridPaths extends APIv3GettableResource { * @param schema */ public patch(resource:GridResource|Object, schema:SchemaResource|null = null):Observable { - let payload = this.form.extractPayload(resource, schema); + const payload = this.form.extractPayload(resource, schema); return this .halResourceService diff --git a/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grids-paths.ts b/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grids-paths.ts index 40e8cb6cc9e..e2b53434aba 100644 --- a/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grids-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/grids/apiv3-grids-paths.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {Apiv3GridPaths} from "core-app/modules/apiv3/endpoints/grids/apiv3-grid-paths"; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {Apiv3GridForm} from "core-app/modules/apiv3/endpoints/grids/apiv3-grid-form"; -import {Observable} from "rxjs"; +import { APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { Apiv3GridPaths } from "core-app/modules/apiv3/endpoints/grids/apiv3-grid-paths"; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { Apiv3GridForm } from "core-app/modules/apiv3/endpoints/grids/apiv3-grid-form"; +import { Observable } from "rxjs"; import { Apiv3ListParameters, Apiv3ListResourceInterface, listParamsString } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; export class Apiv3GridsPaths extends APIv3ResourceCollection diff --git a/frontend/src/app/modules/apiv3/endpoints/groups/apiv3-group-paths.ts b/frontend/src/app/modules/apiv3/endpoints/groups/apiv3-group-paths.ts index 365be7d6fdf..f6d17aebfdd 100644 --- a/frontend/src/app/modules/apiv3/endpoints/groups/apiv3-group-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/groups/apiv3-group-paths.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {GroupResource} from "core-app/modules/hal/resources/group-resource"; -import {Observable} from "rxjs"; +import { APIv3GettableResource } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { GroupResource } from "core-app/modules/hal/resources/group-resource"; +import { Observable } from "rxjs"; export class Apiv3GroupPaths extends APIv3GettableResource { /** diff --git a/frontend/src/app/modules/apiv3/endpoints/groups/apiv3-groups-paths.ts b/frontend/src/app/modules/apiv3/endpoints/groups/apiv3-groups-paths.ts index c10ab638b24..ab5b7460113 100644 --- a/frontend/src/app/modules/apiv3/endpoints/groups/apiv3-groups-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/groups/apiv3-groups-paths.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {Apiv3GroupPaths} from "core-app/modules/apiv3/endpoints/groups/apiv3-group-paths"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Observable} from "rxjs"; +import { APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { Apiv3GroupPaths } from "core-app/modules/apiv3/endpoints/groups/apiv3-group-paths"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Observable } from "rxjs"; import { Apiv3ListParameters, Apiv3ListResourceInterface, listParamsString } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {GroupResource} from 'core-app/modules/hal/resources/group-resource'; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { GroupResource } from 'core-app/modules/hal/resources/group-resource'; export class Apiv3GroupsPaths extends APIv3ResourceCollection diff --git a/frontend/src/app/modules/apiv3/endpoints/help_texts/apiv3-help-texts-paths.ts b/frontend/src/app/modules/apiv3/endpoints/help_texts/apiv3-help-texts-paths.ts index 23b87aaf6ee..36735726f00 100644 --- a/frontend/src/app/modules/apiv3/endpoints/help_texts/apiv3-help-texts-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/help_texts/apiv3-help-texts-paths.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource, APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Observable} from "rxjs"; -import {HelpTextResource} from "core-app/modules/hal/resources/help-text-resource"; +import { APIv3GettableResource, APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Observable } from "rxjs"; +import { HelpTextResource } from "core-app/modules/hal/resources/help-text-resource"; export class Apiv3HelpTextsPaths extends APIv3ResourceCollection> { diff --git a/frontend/src/app/modules/apiv3/endpoints/news/apiv3-news-paths.ts b/frontend/src/app/modules/apiv3/endpoints/news/apiv3-news-paths.ts index 0ce3495403b..5b5d19e38b3 100644 --- a/frontend/src/app/modules/apiv3/endpoints/news/apiv3-news-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/news/apiv3-news-paths.ts @@ -27,17 +27,17 @@ //++ -import {APIv3GettableResource, APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Observable} from "rxjs"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; +import { APIv3GettableResource, APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Observable } from "rxjs"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; import { Apiv3ListParameters, Apiv3ListResourceInterface, listParamsString } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; -import {NewsResource} from "core-app/modules/hal/resources/news-resource"; +import { NewsResource } from "core-app/modules/hal/resources/news-resource"; export class Apiv3NewsPaths extends APIv3ResourceCollection> diff --git a/frontend/src/app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-user-paths.ts b/frontend/src/app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-user-paths.ts index abe37e46a1a..4012316252f 100644 --- a/frontend/src/app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-user-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-user-paths.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {PlaceholderUserResource} from "core-app/modules/hal/resources/placeholder-user-resource"; -import {Observable} from "rxjs"; +import { APIv3GettableResource } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { PlaceholderUserResource } from "core-app/modules/hal/resources/placeholder-user-resource"; +import { Observable } from "rxjs"; export class Apiv3PlaceholderUserPaths extends APIv3GettableResource { /** diff --git a/frontend/src/app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-users-paths.ts b/frontend/src/app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-users-paths.ts index 187fcb14153..54d0c91f555 100644 --- a/frontend/src/app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-users-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-users-paths.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {Apiv3PlaceholderUserPaths} from "core-app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-user-paths"; -import {PlaceholderUserResource} from "core-app/modules/hal/resources/placeholder-user-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Observable} from "rxjs"; +import { APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { Apiv3PlaceholderUserPaths } from "core-app/modules/apiv3/endpoints/placeholder-users/apiv3-placeholder-user-paths"; +import { PlaceholderUserResource } from "core-app/modules/hal/resources/placeholder-user-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Observable } from "rxjs"; import { Apiv3ListParameters, Apiv3ListResourceInterface, listParamsString } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; export class Apiv3PlaceholderUsersPaths extends APIv3ResourceCollection diff --git a/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-available-projects-paths.ts b/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-available-projects-paths.ts index 31540187362..a026e7c833b 100644 --- a/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-available-projects-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-available-projects-paths.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {APIv3GettableResource} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {buildApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {Observable} from "rxjs"; -import {map} from "rxjs/operators"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { APIv3GettableResource } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { buildApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { Observable } from "rxjs"; +import { map } from "rxjs/operators"; import { Apiv3ListParameters, Apiv3ListResourceInterface, listParamsString diff --git a/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-project-paths.ts b/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-project-paths.ts index 4a705d3c50f..5e70ebbd5d2 100644 --- a/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-project-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-project-paths.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3QueriesPaths} from "core-app/modules/apiv3/endpoints/queries/apiv3-queries-paths"; -import {APIv3TypesPaths} from "core-app/modules/apiv3/endpoints/types/apiv3-types-paths"; -import {APIV3WorkPackagesPaths} from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {MultiInputState} from "reactivestates"; -import {APIv3VersionsPaths} from "core-app/modules/apiv3/endpoints/versions/apiv3-versions-paths"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {APIv3ProjectsPaths} from "core-app/modules/apiv3/endpoints/projects/apiv3-projects-paths"; +import { APIv3QueriesPaths } from "core-app/modules/apiv3/endpoints/queries/apiv3-queries-paths"; +import { APIv3TypesPaths } from "core-app/modules/apiv3/endpoints/types/apiv3-types-paths"; +import { APIV3WorkPackagesPaths } from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { MultiInputState } from "reactivestates"; +import { APIv3VersionsPaths } from "core-app/modules/apiv3/endpoints/versions/apiv3-versions-paths"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { APIv3ProjectsPaths } from "core-app/modules/apiv3/endpoints/projects/apiv3-projects-paths"; export class APIv3ProjectPaths extends CachableAPIV3Resource { // /api/v3/projects/:project_id/available_assignees diff --git a/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-projects-paths.ts b/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-projects-paths.ts index 834bfb11502..367cb31934d 100644 --- a/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-projects-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/projects/apiv3-projects-paths.ts @@ -26,20 +26,20 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3ProjectPaths} from "core-app/modules/apiv3/endpoints/projects/apiv3-project-paths"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; +import { APIv3ProjectPaths } from "core-app/modules/apiv3/endpoints/projects/apiv3-project-paths"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; import { Apiv3ListParameters, Apiv3ListResourceInterface, listParamsString } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; -import {Observable} from "rxjs"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {CachableAPIV3Collection} from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {ProjectCache} from "core-app/modules/apiv3/endpoints/projects/project.cache"; +import { Observable } from "rxjs"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { CachableAPIV3Collection } from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { ProjectCache } from "core-app/modules/apiv3/endpoints/projects/project.cache"; export class APIv3ProjectsPaths extends CachableAPIV3Collection diff --git a/frontend/src/app/modules/apiv3/endpoints/projects/project.cache.ts b/frontend/src/app/modules/apiv3/endpoints/projects/project.cache.ts index 32b22107a10..fe597c27253 100644 --- a/frontend/src/app/modules/apiv3/endpoints/projects/project.cache.ts +++ b/frontend/src/app/modules/apiv3/endpoints/projects/project.cache.ts @@ -26,21 +26,21 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {MultiInputState} from 'reactivestates'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {Injectable, Injector} from '@angular/core'; -import {debugLog} from "core-app/helpers/debug_output"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; +import { MultiInputState } from 'reactivestates'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { Injectable, Injector } from '@angular/core'; +import { debugLog } from "core-app/helpers/debug_output"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; @Injectable() export class ProjectCache extends StateCacheService { @InjectField() private schemaCacheService:SchemaCacheService; constructor(readonly injector:Injector, - state:MultiInputState) { + state:MultiInputState) { super(state); } diff --git a/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-queries-paths.ts b/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-queries-paths.ts index c18a38698b6..188bf467449 100644 --- a/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-queries-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-queries-paths.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource, APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {APIv3QueryPaths} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-paths"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Apiv3QueryForm} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-form"; -import {Observable} from "rxjs"; -import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {Apiv3ListParameters, listParamsString} from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; -import {QueryFiltersService} from "core-components/wp-query/query-filters.service"; -import {HalPayloadHelper} from "core-app/modules/hal/schemas/hal-payload.helper"; +import { APIv3GettableResource, APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { APIv3QueryPaths } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-paths"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Apiv3QueryForm } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-form"; +import { Observable } from "rxjs"; +import { QueryFormResource } from "core-app/modules/hal/resources/query-form-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { Apiv3ListParameters, listParamsString } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; +import { QueryFiltersService } from "core-components/wp-query/query-filters.service"; +import { HalPayloadHelper } from "core-app/modules/hal/schemas/hal-payload.helper"; export class APIv3QueriesPaths extends APIv3ResourceCollection { @InjectField() private queryFilters:QueryFiltersService; @@ -141,7 +141,7 @@ export class APIv3QueriesPaths extends APIv3ResourceCollection> { - let listParams:Apiv3ListParameters = { + const listParams:Apiv3ListParameters = { filters: [['hidden', '=', ['f']]] }; diff --git a/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-form.ts b/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-form.ts index 1d3c787692c..fd492ee1133 100644 --- a/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-form.ts +++ b/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-form.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {APIv3FormResource} from "core-app/modules/apiv3/forms/apiv3-form-resource"; -import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource"; -import {Observable} from "rxjs"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; +import { QueryFormResource } from "core-app/modules/hal/resources/query-form-resource"; +import { Observable } from "rxjs"; import * as URI from "urijs"; -import {map, tap} from "rxjs/operators"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {QueryFiltersService} from "core-components/wp-query/query-filters.service"; +import { map, tap } from "rxjs/operators"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { QueryFiltersService } from "core-components/wp-query/query-filters.service"; export class Apiv3QueryForm extends APIv3FormResource { @InjectField() private queryFilters:QueryFiltersService; @@ -46,7 +46,7 @@ export class Apiv3QueryForm extends APIv3FormResource { // We need a valid payload so that we // can check whether form saving is possible. // The query needs a name to be valid. - let payload:any = { + const payload:any = { 'name': query.name || '!!!__O__o__O__!!!' }; @@ -58,7 +58,7 @@ export class Apiv3QueryForm extends APIv3FormResource { }; } - let path = this.apiRoot.queries.withOptionalId(query.id).form.path; + const path = this.apiRoot.queries.withOptionalId(query.id).form.path; return this.halResourceService .post(path, payload) .pipe( @@ -91,7 +91,7 @@ export class Apiv3QueryForm extends APIv3FormResource { } - let path = this.apiRoot.queries.withOptionalId(queryId).form.path; + const path = this.apiRoot.queries.withOptionalId(queryId).form.path; const href = URI(path).search(params).toString(); return this.halResourceService .post(href, payload) diff --git a/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-order.ts b/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-order.ts index a2d1472f51b..d57da9a016b 100644 --- a/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-order.ts +++ b/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-order.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector} from "@angular/core"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {HttpClient} from "@angular/common/http"; -import {SimpleResource} from "core-app/modules/apiv3/paths/path-resources"; +import { Injector } from "@angular/core"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { HttpClient } from "@angular/common/http"; +import { SimpleResource } from "core-app/modules/apiv3/paths/path-resources"; export type QueryOrder = { [wpId:string]:number }; @@ -63,7 +63,7 @@ export class APIV3QueryOrder extends SimpleResource { } public delete(id:string, ...wpIds:string[]) { - let delta:QueryOrder = {}; + const delta:QueryOrder = {}; wpIds.forEach(id => delta[id] = -1); return this.update(delta); diff --git a/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-paths.ts b/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-paths.ts index a6cc651f69d..af828d4b08d 100644 --- a/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/queries/apiv3-query-paths.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {APIV3QueryOrder} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; -import {Apiv3QueryForm} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-form"; -import {Observable} from "rxjs"; -import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {QueryFiltersService} from "core-components/wp-query/query-filters.service"; -import {PaginationObject} from "core-components/table-pagination/pagination-service"; -import {HalPayloadHelper} from "core-app/modules/hal/schemas/hal-payload.helper"; +import { APIv3GettableResource } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { APIV3QueryOrder } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; +import { Apiv3QueryForm } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-form"; +import { Observable } from "rxjs"; +import { QueryFormResource } from "core-app/modules/hal/resources/query-form-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { QueryFiltersService } from "core-components/wp-query/query-filters.service"; +import { PaginationObject } from "core-components/table-pagination/pagination-service"; +import { HalPayloadHelper } from "core-app/modules/hal/schemas/hal-payload.helper"; export class APIv3QueryPaths extends APIv3GettableResource { @InjectField() private queryFilters:QueryFiltersService; diff --git a/frontend/src/app/modules/apiv3/endpoints/relations/apiv3-relations-paths.ts b/frontend/src/app/modules/apiv3/endpoints/relations/apiv3-relations-paths.ts index f3c97589d2a..71badf45d74 100644 --- a/frontend/src/app/modules/apiv3/endpoints/relations/apiv3-relations-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/relations/apiv3-relations-paths.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource, APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {VersionResource} from "core-app/modules/hal/resources/version-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {APIv3FormResource} from "core-app/modules/apiv3/forms/apiv3-form-resource"; -import {from, NEVER, Observable} from "rxjs"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {Apiv3AvailableProjectsPaths} from "core-app/modules/apiv3/endpoints/projects/apiv3-available-projects-paths"; -import {APIv3VersionPaths} from "core-app/modules/apiv3/endpoints/versions/apiv3-version-paths"; -import {RelationResource} from "core-app/modules/hal/resources/relation-resource"; -import {buildApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {map} from "rxjs/operators"; +import { APIv3GettableResource, APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { VersionResource } from "core-app/modules/hal/resources/version-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; +import { from, NEVER, Observable } from "rxjs"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { Apiv3AvailableProjectsPaths } from "core-app/modules/apiv3/endpoints/projects/apiv3-available-projects-paths"; +import { APIv3VersionPaths } from "core-app/modules/apiv3/endpoints/versions/apiv3-version-paths"; +import { RelationResource } from "core-app/modules/hal/resources/relation-resource"; +import { buildApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { map } from "rxjs/operators"; export class Apiv3RelationsPaths extends APIv3ResourceCollection> { constructor(protected apiRoot:APIV3Service, @@ -55,7 +55,7 @@ export class Apiv3RelationsPaths extends APIv3ResourceCollection { - let validIds = _.filter(workPackageIds, id => /\d+/.test(id)); + const validIds = _.filter(workPackageIds, id => /\d+/.test(id)); if (validIds.length === 0) { return from([]); diff --git a/frontend/src/app/modules/apiv3/endpoints/roles/apiv3-role-paths.ts b/frontend/src/app/modules/apiv3/endpoints/roles/apiv3-role-paths.ts index f5a9898b306..b20d65d8ea6 100644 --- a/frontend/src/app/modules/apiv3/endpoints/roles/apiv3-role-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/roles/apiv3-role-paths.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {RoleResource} from "core-app/modules/hal/resources/role-resource"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { RoleResource } from "core-app/modules/hal/resources/role-resource"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; export class APIv3RolePaths extends CachableAPIV3Resource { diff --git a/frontend/src/app/modules/apiv3/endpoints/roles/apiv3-roles-paths.ts b/frontend/src/app/modules/apiv3/endpoints/roles/apiv3-roles-paths.ts index 6263eb2329d..eca369a5de5 100644 --- a/frontend/src/app/modules/apiv3/endpoints/roles/apiv3-roles-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/roles/apiv3-roles-paths.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3ResourceCollection, APIv3ResourcePath} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {Injector} from "@angular/core"; -import {RoleResource} from "core-app/modules/hal/resources/role-resource"; -import {APIv3RolePaths} from "core-app/modules/apiv3/endpoints/roles/apiv3-role-paths"; -import {Observable} from "rxjs"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {tap} from "rxjs/operators"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { APIv3ResourceCollection, APIv3ResourcePath } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { Injector } from "@angular/core"; +import { RoleResource } from "core-app/modules/hal/resources/role-resource"; +import { APIv3RolePaths } from "core-app/modules/apiv3/endpoints/roles/apiv3-role-paths"; +import { Observable } from "rxjs"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { tap } from "rxjs/operators"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export class APIv3RolesPaths extends APIv3ResourceCollection { constructor(protected apiRoot:APIV3Service, diff --git a/frontend/src/app/modules/apiv3/endpoints/statuses/apiv3-status-paths.ts b/frontend/src/app/modules/apiv3/endpoints/statuses/apiv3-status-paths.ts index bf260cb14f2..19032902526 100644 --- a/frontend/src/app/modules/apiv3/endpoints/statuses/apiv3-status-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/statuses/apiv3-status-paths.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {StatusResource} from "core-app/modules/hal/resources/status-resource"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { StatusResource } from "core-app/modules/hal/resources/status-resource"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; export class APIv3StatusPaths extends CachableAPIV3Resource { diff --git a/frontend/src/app/modules/apiv3/endpoints/statuses/apiv3-statuses-paths.ts b/frontend/src/app/modules/apiv3/endpoints/statuses/apiv3-statuses-paths.ts index 5c92908bb25..bf9a3759d90 100644 --- a/frontend/src/app/modules/apiv3/endpoints/statuses/apiv3-statuses-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/statuses/apiv3-statuses-paths.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3ResourceCollection, APIv3ResourcePath} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {Injector} from "@angular/core"; -import {StatusResource} from "core-app/modules/hal/resources/status-resource"; -import {APIv3StatusPaths} from "core-app/modules/apiv3/endpoints/statuses/apiv3-status-paths"; -import {Observable} from "rxjs"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {tap} from "rxjs/operators"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { APIv3ResourceCollection, APIv3ResourcePath } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { Injector } from "@angular/core"; +import { StatusResource } from "core-app/modules/hal/resources/status-resource"; +import { APIv3StatusPaths } from "core-app/modules/apiv3/endpoints/statuses/apiv3-status-paths"; +import { Observable } from "rxjs"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { tap } from "rxjs/operators"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export class APIv3StatusesPaths extends APIv3ResourceCollection { constructor(protected apiRoot:APIV3Service, diff --git a/frontend/src/app/modules/apiv3/endpoints/time-entries/apiv3-time-entries-paths.ts b/frontend/src/app/modules/apiv3/endpoints/time-entries/apiv3-time-entries-paths.ts index e4dca9b5b4a..b58e1eee1cf 100644 --- a/frontend/src/app/modules/apiv3/endpoints/time-entries/apiv3-time-entries-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/time-entries/apiv3-time-entries-paths.ts @@ -27,21 +27,21 @@ //++ -import {Apiv3TimeEntryPaths} from "core-app/modules/apiv3/endpoints/time-entries/apiv3-time-entry-paths"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {APIv3FormResource} from "core-app/modules/apiv3/forms/apiv3-form-resource"; -import {Observable} from "rxjs"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {CachableAPIV3Collection} from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; -import {MultiInputState} from "reactivestates"; +import { Apiv3TimeEntryPaths } from "core-app/modules/apiv3/endpoints/time-entries/apiv3-time-entry-paths"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; +import { Observable } from "rxjs"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { CachableAPIV3Collection } from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; +import { MultiInputState } from "reactivestates"; import { Apiv3ListParameters, Apiv3ListResourceInterface, listParamsString } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; -import {TimeEntryCacheService} from "core-app/modules/apiv3/endpoints/time-entries/time-entry-cache.service"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { TimeEntryCacheService } from "core-app/modules/apiv3/endpoints/time-entries/time-entry-cache.service"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; export class Apiv3TimeEntriesPaths extends CachableAPIV3Collection diff --git a/frontend/src/app/modules/apiv3/endpoints/time-entries/apiv3-time-entry-paths.ts b/frontend/src/app/modules/apiv3/endpoints/time-entries/apiv3-time-entry-paths.ts index eb5a38646e1..c7464e07f7f 100644 --- a/frontend/src/app/modules/apiv3/endpoints/time-entries/apiv3-time-entry-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/time-entries/apiv3-time-entry-paths.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {MultiInputState} from "reactivestates"; -import {APIv3FormResource} from "core-app/modules/apiv3/forms/apiv3-form-resource"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Observable} from "rxjs"; -import {tap} from "rxjs/operators"; -import {Apiv3TimeEntriesPaths} from "core-app/modules/apiv3/endpoints/time-entries/apiv3-time-entries-paths"; -import {HalPayloadHelper} from "core-app/modules/hal/schemas/hal-payload.helper"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { MultiInputState } from "reactivestates"; +import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Observable } from "rxjs"; +import { tap } from "rxjs/operators"; +import { Apiv3TimeEntriesPaths } from "core-app/modules/apiv3/endpoints/time-entries/apiv3-time-entries-paths"; +import { HalPayloadHelper } from "core-app/modules/hal/schemas/hal-payload.helper"; export class Apiv3TimeEntryPaths extends CachableAPIV3Resource { // Static paths diff --git a/frontend/src/app/modules/apiv3/endpoints/time-entries/time-entry-cache.service.ts b/frontend/src/app/modules/apiv3/endpoints/time-entries/time-entry-cache.service.ts index ace62e16e29..e3dda4ce103 100644 --- a/frontend/src/app/modules/apiv3/endpoints/time-entries/time-entry-cache.service.ts +++ b/frontend/src/app/modules/apiv3/endpoints/time-entries/time-entry-cache.service.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {States} from "core-components/states.service"; -import {Injector} from "@angular/core"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {MultiInputState} from "reactivestates"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { States } from "core-components/states.service"; +import { Injector } from "@angular/core"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { MultiInputState } from "reactivestates"; export class TimeEntryCacheService extends StateCacheService { @InjectField() readonly states:States; diff --git a/frontend/src/app/modules/apiv3/endpoints/types/apiv3-type-paths.ts b/frontend/src/app/modules/apiv3/endpoints/types/apiv3-type-paths.ts index 40e725e0a45..10a364e73e7 100644 --- a/frontend/src/app/modules/apiv3/endpoints/types/apiv3-type-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/types/apiv3-type-paths.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {TypeResource} from "core-app/modules/hal/resources/type-resource"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {APIv3TypesPaths} from "core-app/modules/apiv3/endpoints/types/apiv3-types-paths"; +import { TypeResource } from "core-app/modules/hal/resources/type-resource"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { APIv3TypesPaths } from "core-app/modules/apiv3/endpoints/types/apiv3-types-paths"; export class APIv3TypePaths extends CachableAPIV3Resource { diff --git a/frontend/src/app/modules/apiv3/endpoints/types/apiv3-types-paths.ts b/frontend/src/app/modules/apiv3/endpoints/types/apiv3-types-paths.ts index 54a5ae61393..3096d680597 100644 --- a/frontend/src/app/modules/apiv3/endpoints/types/apiv3-types-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/types/apiv3-types-paths.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {TypeResource} from "core-app/modules/hal/resources/type-resource"; -import {APIv3TypePaths} from "core-app/modules/apiv3/endpoints/types/apiv3-type-paths"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {CachableAPIV3Collection} from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { TypeResource } from "core-app/modules/hal/resources/type-resource"; +import { APIv3TypePaths } from "core-app/modules/apiv3/endpoints/types/apiv3-type-paths"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { CachableAPIV3Collection } from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; export class APIv3TypesPaths extends CachableAPIV3Collection { constructor(protected apiRoot:APIV3Service, diff --git a/frontend/src/app/modules/apiv3/endpoints/users/apiv3-user-paths.ts b/frontend/src/app/modules/apiv3/endpoints/users/apiv3-user-paths.ts index 0a8407d9e31..c72986c5776 100644 --- a/frontend/src/app/modules/apiv3/endpoints/users/apiv3-user-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/users/apiv3-user-paths.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {UserResource} from "core-app/modules/hal/resources/user-resource"; -import {MultiInputState} from "reactivestates"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { UserResource } from "core-app/modules/hal/resources/user-resource"; +import { MultiInputState } from "reactivestates"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; export class APIv3UserPaths extends CachableAPIV3Resource { diff --git a/frontend/src/app/modules/apiv3/endpoints/users/apiv3-users-paths.ts b/frontend/src/app/modules/apiv3/endpoints/users/apiv3-users-paths.ts index 4cea29b5942..199ce430fe4 100644 --- a/frontend/src/app/modules/apiv3/endpoints/users/apiv3-users-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/users/apiv3-users-paths.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {APIv3UserPaths} from "core-app/modules/apiv3/endpoints/users/apiv3-user-paths"; -import {Observable} from "rxjs"; -import {UserResource} from "core-app/modules/hal/resources/user-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { APIv3UserPaths } from "core-app/modules/apiv3/endpoints/users/apiv3-user-paths"; +import { Observable } from "rxjs"; +import { UserResource } from "core-app/modules/hal/resources/user-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export class Apiv3UsersPaths extends APIv3ResourceCollection { constructor(protected apiRoot:APIV3Service, diff --git a/frontend/src/app/modules/apiv3/endpoints/versions/apiv3-version-paths.ts b/frontend/src/app/modules/apiv3/endpoints/versions/apiv3-version-paths.ts index aca75c94eb9..5e074a53a42 100644 --- a/frontend/src/app/modules/apiv3/endpoints/versions/apiv3-version-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/versions/apiv3-version-paths.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {VersionResource} from "core-app/modules/hal/resources/version-resource"; -import {Observable} from "rxjs"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {MultiInputState} from "reactivestates"; -import {tap} from "rxjs/operators"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { VersionResource } from "core-app/modules/hal/resources/version-resource"; +import { Observable } from "rxjs"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { MultiInputState } from "reactivestates"; +import { tap } from "rxjs/operators"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; export class APIv3VersionPaths extends CachableAPIV3Resource { diff --git a/frontend/src/app/modules/apiv3/endpoints/versions/apiv3-versions-paths.ts b/frontend/src/app/modules/apiv3/endpoints/versions/apiv3-versions-paths.ts index 194a125e5ad..c245e03c5ec 100644 --- a/frontend/src/app/modules/apiv3/endpoints/versions/apiv3-versions-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/versions/apiv3-versions-paths.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource, APIv3ResourceCollection} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {VersionResource} from "core-app/modules/hal/resources/version-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {APIv3FormResource} from "core-app/modules/apiv3/forms/apiv3-form-resource"; -import {Observable} from "rxjs"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {Apiv3AvailableProjectsPaths} from "core-app/modules/apiv3/endpoints/projects/apiv3-available-projects-paths"; -import {APIv3VersionPaths} from "core-app/modules/apiv3/endpoints/versions/apiv3-version-paths"; +import { APIv3GettableResource, APIv3ResourceCollection } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { VersionResource } from "core-app/modules/hal/resources/version-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; +import { Observable } from "rxjs"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { Apiv3AvailableProjectsPaths } from "core-app/modules/apiv3/endpoints/projects/apiv3-available-projects-paths"; +import { APIv3VersionPaths } from "core-app/modules/apiv3/endpoints/versions/apiv3-version-paths"; export class APIv3VersionsPaths extends APIv3ResourceCollection { constructor(protected apiRoot:APIV3Service, diff --git a/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-package-cached-subresource.ts b/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-package-cached-subresource.ts index 04065bf15d4..7befb610f44 100644 --- a/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-package-cached-subresource.ts +++ b/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-package-cached-subresource.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {Observable} from "rxjs"; -import {APIV3WorkPackagesPaths} from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths"; -import {take, tap} from "rxjs/operators"; -import {WorkPackageCache} from "core-app/modules/apiv3/endpoints/work_packages/work-package.cache"; +import { APIv3GettableResource } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { Observable } from "rxjs"; +import { APIV3WorkPackagesPaths } from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths"; +import { take, tap } from "rxjs/operators"; +import { WorkPackageCache } from "core-app/modules/apiv3/endpoints/work_packages/work-package.cache"; export class ApiV3WorkPackageCachedSubresource extends APIv3GettableResource { diff --git a/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-package-paths.ts b/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-package-paths.ts index 059417de8ea..c0fc96823c5 100644 --- a/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-package-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-package-paths.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIv3GettableResource, APIv3ResourcePath} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {Apiv3RelationsPaths} from "core-app/modules/apiv3/endpoints/relations/apiv3-relations-paths"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {Observable} from "rxjs"; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {APIV3WorkPackagesPaths} from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { APIv3GettableResource, APIv3ResourcePath } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { Apiv3RelationsPaths } from "core-app/modules/apiv3/endpoints/relations/apiv3-relations-paths"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { Observable } from "rxjs"; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { APIV3WorkPackagesPaths } from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; export class APIV3WorkPackagePaths extends CachableAPIV3Resource { diff --git a/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths.ts b/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths.ts index d907b3d7016..d98066ee61c 100644 --- a/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths.ts +++ b/frontend/src/app/modules/apiv3/endpoints/work_packages/api-v3-work-packages-paths.ts @@ -26,20 +26,20 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APIV3WorkPackagePaths} from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-package-paths"; -import {ApiV3FilterBuilder, buildApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {Observable} from "rxjs"; -import {APIv3WorkPackageForm} from "core-app/modules/apiv3/endpoints/work_packages/apiv3-work-package-form"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {CachableAPIV3Collection} from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {WorkPackageCache} from "core-app/modules/apiv3/endpoints/work_packages/work-package.cache"; -import {APIv3GettableResource} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {ApiV3WorkPackageCachedSubresource} from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-package-cached-subresource"; +import { APIV3WorkPackagePaths } from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-package-paths"; +import { ApiV3FilterBuilder, buildApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { Observable } from "rxjs"; +import { APIv3WorkPackageForm } from "core-app/modules/apiv3/endpoints/work_packages/apiv3-work-package-form"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { CachableAPIV3Collection } from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { WorkPackageCache } from "core-app/modules/apiv3/endpoints/work_packages/work-package.cache"; +import { APIv3GettableResource } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { ApiV3WorkPackageCachedSubresource } from "core-app/modules/apiv3/endpoints/work_packages/api-v3-work-package-cached-subresource"; export class APIV3WorkPackagesPaths extends CachableAPIV3Collection { // Base path @@ -109,8 +109,8 @@ export class APIV3WorkPackagesPaths extends CachableAPIV3Collectiond', [timestamp, '']); - let params = { + const params = { offset: '1', pageSize: '10' }; @@ -157,12 +157,12 @@ export class APIV3WorkPackagesPaths extends CachableAPIV3Collection( - this.path, - ids.length, - { - filters: buildApiV3Filter('id', '=', ids).toJson(), - } - ); + this.path, + ids.length, + { + filters: buildApiV3Filter('id', '=', ids).toJson(), + } + ); } protected createCache():WorkPackageCache { diff --git a/frontend/src/app/modules/apiv3/endpoints/work_packages/apiv3-work-package-form.ts b/frontend/src/app/modules/apiv3/endpoints/work_packages/apiv3-work-package-form.ts index 6633d67100d..6b7d0d85008 100644 --- a/frontend/src/app/modules/apiv3/endpoints/work_packages/apiv3-work-package-form.ts +++ b/frontend/src/app/modules/apiv3/endpoints/work_packages/apiv3-work-package-form.ts @@ -1,7 +1,7 @@ -import {APIv3FormResource} from "core-app/modules/apiv3/forms/apiv3-form-resource"; -import {FormResource} from "core-app/modules/hal/resources/form-resource"; -import {Observable} from "rxjs"; -import {HalSource} from "core-app/modules/hal/resources/hal-resource"; +import { APIv3FormResource } from "core-app/modules/apiv3/forms/apiv3-form-resource"; +import { FormResource } from "core-app/modules/hal/resources/form-resource"; +import { Observable } from "rxjs"; +import { HalSource } from "core-app/modules/hal/resources/hal-resource"; export class APIv3WorkPackageForm extends APIv3FormResource { /** @@ -12,7 +12,7 @@ export class APIv3WorkPackageForm extends APIv3FormResource { * @returns A work package form resource prefilled with the provided payload. */ public forTypePayload(payload:HalSource):Observable { - let typePayload = payload._links['type'] ? { _links: { type: payload['_links']['type'] } } : { _links: {} } ; + const typePayload = payload._links['type'] ? { _links: { type: payload['_links']['type'] } } : { _links: {} } ; return this.post(payload); } diff --git a/frontend/src/app/modules/apiv3/endpoints/work_packages/work-package-cache.spec.ts b/frontend/src/app/modules/apiv3/endpoints/work_packages/work-package-cache.spec.ts index 626a1801e95..87172b0b8d0 100644 --- a/frontend/src/app/modules/apiv3/endpoints/work_packages/work-package-cache.spec.ts +++ b/frontend/src/app/modules/apiv3/endpoints/work_packages/work-package-cache.spec.ts @@ -26,25 +26,25 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector} from '@angular/core'; -import {TestBed} from '@angular/core/testing'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {OpenProjectFileUploadService} from 'core-components/api/op-file-upload/op-file-upload.service'; -import {OpenProjectDirectFileUploadService} from "core-components/api/op-file-upload/op-direct-file-upload.service"; -import {SchemaCacheService} from 'core-components/schemas/schema-cache.service'; -import {States} from 'core-components/states.service'; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {take, takeWhile} from 'rxjs/operators'; -import {WorkPackagesActivityService} from "core-components/wp-single-view-tabs/activity-panel/wp-activity.service"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {WorkPackageCache} from "core-app/modules/apiv3/endpoints/work_packages/work-package.cache"; +import { Injector } from '@angular/core'; +import { TestBed } from '@angular/core/testing'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { OpenprojectHalModule } from 'core-app/modules/hal/openproject-hal.module'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { OpenProjectFileUploadService } from 'core-components/api/op-file-upload/op-file-upload.service'; +import { OpenProjectDirectFileUploadService } from "core-components/api/op-file-upload/op-direct-file-upload.service"; +import { SchemaCacheService } from 'core-components/schemas/schema-cache.service'; +import { States } from 'core-components/states.service'; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { take, takeWhile } from 'rxjs/operators'; +import { WorkPackagesActivityService } from "core-components/wp-single-view-tabs/activity-panel/wp-activity.service"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { WorkPackageCache } from "core-app/modules/apiv3/endpoints/work_packages/work-package.cache"; describe('WorkPackageCache', () => { let injector:Injector; @@ -65,14 +65,14 @@ describe('WorkPackageCache', () => { WorkPackagesActivityService, SchemaCacheService, PathHelperService, - {provide: ConfigurationService, useValue: {}}, - {provide: I18nService, useValue: {t: (...args:any[]) => 'translation'}}, - {provide: WorkPackageResource, useValue: {}}, - {provide: NotificationsService, useValue: {}}, - {provide: HalResourceNotificationService, useValue: {handleRawError: () => false}}, - {provide: WorkPackageNotificationService, useValue: {}}, - {provide: OpenProjectFileUploadService, useValue: {}}, - {provide: OpenProjectDirectFileUploadService, useValue: {}}, + { provide: ConfigurationService, useValue: {} }, + { provide: I18nService, useValue: { t: (...args:any[]) => 'translation' } }, + { provide: WorkPackageResource, useValue: {} }, + { provide: NotificationsService, useValue: {} }, + { provide: HalResourceNotificationService, useValue: { handleRawError: () => false } }, + { provide: WorkPackageNotificationService, useValue: {} }, + { provide: OpenProjectFileUploadService, useValue: {} }, + { provide: OpenProjectDirectFileUploadService, useValue: {} }, ] }); diff --git a/frontend/src/app/modules/apiv3/endpoints/work_packages/work-package.cache.ts b/frontend/src/app/modules/apiv3/endpoints/work_packages/work-package.cache.ts index 7d9381a6de8..71631158ca6 100644 --- a/frontend/src/app/modules/apiv3/endpoints/work_packages/work-package.cache.ts +++ b/frontend/src/app/modules/apiv3/endpoints/work_packages/work-package.cache.ts @@ -26,20 +26,20 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {MultiInputState} from 'reactivestates'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {Injectable, Injector} from '@angular/core'; -import {debugLog} from "core-app/helpers/debug_output"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { MultiInputState } from 'reactivestates'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { Injectable, Injector } from '@angular/core'; +import { debugLog } from "core-app/helpers/debug_output"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; @Injectable() export class WorkPackageCache extends StateCacheService { @InjectField() private schemaCacheService:SchemaCacheService; constructor(readonly injector:Injector, - state:MultiInputState) { + state:MultiInputState) { super(state); } @@ -50,7 +50,7 @@ export class WorkPackageCache extends StateCacheService { }); } - updateWorkPackage(wp:WorkPackageResource, immediate:boolean = false):Promise { + updateWorkPackage(wp:WorkPackageResource, immediate = false):Promise { if (immediate || wp.isNew) { return super.updateValue(wp.id!, wp); } else { diff --git a/frontend/src/app/modules/apiv3/forms/apiv3-form-resource.ts b/frontend/src/app/modules/apiv3/forms/apiv3-form-resource.ts index f487de21e9b..6a69d128290 100644 --- a/frontend/src/app/modules/apiv3/forms/apiv3-form-resource.ts +++ b/frontend/src/app/modules/apiv3/forms/apiv3-form-resource.ts @@ -1,8 +1,8 @@ -import {APIv3ResourcePath} from "core-app/modules/apiv3/paths/apiv3-resource"; -import {FormResource} from "core-app/modules/hal/resources/form-resource"; -import {Observable} from "rxjs"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {HalPayloadHelper} from "core-app/modules/hal/schemas/hal-payload.helper"; +import { APIv3ResourcePath } from "core-app/modules/apiv3/paths/apiv3-resource"; +import { FormResource } from "core-app/modules/hal/resources/form-resource"; +import { Observable } from "rxjs"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { HalPayloadHelper } from "core-app/modules/hal/schemas/hal-payload.helper"; export class APIv3FormResource extends APIv3ResourcePath { /** diff --git a/frontend/src/app/modules/apiv3/openproject-api-v3.module.ts b/frontend/src/app/modules/apiv3/openproject-api-v3.module.ts index d66ad932692..6ce7f5c2223 100644 --- a/frontend/src/app/modules/apiv3/openproject-api-v3.module.ts +++ b/frontend/src/app/modules/apiv3/openproject-api-v3.module.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; -import {NgModule} from '@angular/core'; -import {OpenprojectHalModule} from "core-app/modules/hal/openproject-hal.module"; +import { OpenprojectCommonModule } from 'core-app/modules/common/openproject-common.module'; +import { NgModule } from '@angular/core'; +import { OpenprojectHalModule } from "core-app/modules/hal/openproject-hal.module"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/apiv3/paths/apiv3-list-resource.interface.ts b/frontend/src/app/modules/apiv3/paths/apiv3-list-resource.interface.ts index 83b85de5dba..2a4ead2d9c7 100644 --- a/frontend/src/app/modules/apiv3/paths/apiv3-list-resource.interface.ts +++ b/frontend/src/app/modules/apiv3/paths/apiv3-list-resource.interface.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {ApiV3FilterBuilder, FilterOperator} from "core-components/api/api-v3/api-v3-filter-builder"; -import {Observable} from "rxjs"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { ApiV3FilterBuilder, FilterOperator } from "core-components/api/api-v3/api-v3-filter-builder"; +import { Observable } from "rxjs"; export interface Apiv3ListParameters { filters?:[string, FilterOperator, string[]][]; @@ -41,7 +41,7 @@ export interface Apiv3ListResourceInterface { } export function listParamsString(params?:Apiv3ListParameters):string { - let queryProps = []; + const queryProps = []; if (params && params.sortBy) { queryProps.push(`sortBy=${JSON.stringify(params.sortBy)}`); @@ -53,7 +53,7 @@ export function listParamsString(params?:Apiv3ListParameters):string { } if (params && params.filters) { - let filters = new ApiV3FilterBuilder(); + const filters = new ApiV3FilterBuilder(); params.filters.forEach((filterParam) => { filters.add(...filterParam); diff --git a/frontend/src/app/modules/apiv3/paths/apiv3-resource.ts b/frontend/src/app/modules/apiv3/paths/apiv3-resource.ts index c294bf5c540..57f8d294585 100644 --- a/frontend/src/app/modules/apiv3/paths/apiv3-resource.ts +++ b/frontend/src/app/modules/apiv3/paths/apiv3-resource.ts @@ -1,11 +1,11 @@ -import {Constructor} from "@angular/cdk/table"; -import {SimpleResource, SimpleResourceCollection} from "core-app/modules/apiv3/paths/path-resources"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Observable} from "rxjs"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Constructor } from "@angular/cdk/table"; +import { SimpleResource, SimpleResourceCollection } from "core-app/modules/apiv3/paths/path-resources"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Observable } from "rxjs"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export class APIv3ResourcePath extends SimpleResource { readonly injector = this.apiRoot.injector; diff --git a/frontend/src/app/modules/apiv3/paths/path-resources.ts b/frontend/src/app/modules/apiv3/paths/path-resources.ts index 05c6a5b7c28..4fbcb337307 100644 --- a/frontend/src/app/modules/apiv3/paths/path-resources.ts +++ b/frontend/src/app/modules/apiv3/paths/path-resources.ts @@ -1,5 +1,5 @@ -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {Constructor} from "@angular/cdk/table"; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { Constructor } from "@angular/cdk/table"; /** * Simple resource collection to construct paths for RESTful resources. @@ -50,7 +50,7 @@ export class SimpleResource { public readonly path:string; constructor(readonly basePath:string, readonly segment:string|number) { - let separator = segment.toString().startsWith('?') ? '' : '/'; + const separator = segment.toString().startsWith('?') ? '' : '/'; this.path = `${this.basePath}${separator}${segment}`; } diff --git a/frontend/src/app/modules/apiv3/virtual/apiv3-board-path.ts b/frontend/src/app/modules/apiv3/virtual/apiv3-board-path.ts index 08b54c6d302..466182d8cce 100644 --- a/frontend/src/app/modules/apiv3/virtual/apiv3-board-path.ts +++ b/frontend/src/app/modules/apiv3/virtual/apiv3-board-path.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Board} from "core-app/modules/boards/board/board"; -import {Observable} from "rxjs"; -import {map, switchMap, tap} from "rxjs/operators"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {CachableAPIV3Resource} from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; -import {MultiInputState} from "reactivestates"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; -import {Apiv3BoardsPaths} from "core-app/modules/apiv3/virtual/apiv3-boards-paths"; +import { Board } from "core-app/modules/boards/board/board"; +import { Observable } from "rxjs"; +import { map, switchMap, tap } from "rxjs/operators"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { CachableAPIV3Resource } from "core-app/modules/apiv3/cache/cachable-apiv3-resource"; +import { MultiInputState } from "reactivestates"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; +import { Apiv3BoardsPaths } from "core-app/modules/apiv3/virtual/apiv3-boards-paths"; export class APIv3BoardPath extends CachableAPIV3Resource { diff --git a/frontend/src/app/modules/apiv3/virtual/apiv3-boards-paths.ts b/frontend/src/app/modules/apiv3/virtual/apiv3-boards-paths.ts index 155a7020d57..5e57a178562 100644 --- a/frontend/src/app/modules/apiv3/virtual/apiv3-boards-paths.ts +++ b/frontend/src/app/modules/apiv3/virtual/apiv3-boards-paths.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Constructor} from "@angular/cdk/table"; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Observable} from "rxjs"; -import {Apiv3ListParameters, listParamsString} from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {Board, BoardType} from "core-app/modules/boards/board/board"; -import {map, switchMap, tap} from "rxjs/operators"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {AuthorisationService} from "core-app/modules/common/model-auth/model-auth.service"; -import {CachableAPIV3Collection} from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {MultiInputState} from "reactivestates"; -import {APIv3BoardPath} from "core-app/modules/apiv3/virtual/apiv3-board-path"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { Constructor } from "@angular/cdk/table"; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Observable } from "rxjs"; +import { Apiv3ListParameters, listParamsString } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { Board, BoardType } from "core-app/modules/boards/board/board"; +import { map, switchMap, tap } from "rxjs/operators"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { AuthorisationService } from "core-app/modules/common/model-auth/model-auth.service"; +import { CachableAPIV3Collection } from "core-app/modules/apiv3/cache/cachable-apiv3-collection"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { MultiInputState } from "reactivestates"; +import { APIv3BoardPath } from "core-app/modules/apiv3/virtual/apiv3-board-path"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; export class Apiv3BoardsPaths extends CachableAPIV3Collection { @@ -65,7 +65,7 @@ export class Apiv3BoardsPaths extends CachableAPIV3Collection this.authorisationService.initModelAuth('boards', collection.$links)), map(collection => collection.elements.map(grid => { - let board = new Board(grid); + const board = new Board(grid); board.sortWidgets(); this.touch(board); @@ -110,12 +110,12 @@ export class Apiv3BoardsPaths extends CachableAPIV3Collection { - let state = this.states.forType('boards'); + const state = this.states.forType('boards'); return new StateCacheService(state); } private createGrid(type:BoardType, name:string, scope:string, actionAttribute?:string):Observable { - let payload:any = _.set({ name: name }, '_links.scope.href', scope); + const payload:any = _.set({ name: name }, '_links.scope.href', scope); payload.options = { type: type, }; diff --git a/frontend/src/app/modules/attachments/attachment-list/attachment-list-item.component.ts b/frontend/src/app/modules/attachments/attachment-list/attachment-list-item.component.ts index 38f137fe9a2..299653d8a6d 100644 --- a/frontend/src/app/modules/attachments/attachment-list/attachment-list-item.component.ts +++ b/frontend/src/app/modules/attachments/attachment-list/attachment-list-item.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, EventEmitter, Input, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {States} from 'core-components/states.service'; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; +import { Component, EventEmitter, Input, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { States } from 'core-components/states.service'; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; @Component({ selector: 'attachment-list-item', @@ -41,7 +41,7 @@ export class AttachmentListItemComponent { @Input() public resource:HalResource; @Input() public attachment:any; @Input() public index:any; - @Input() destroyImmediately:boolean = true; + @Input() destroyImmediately = true; @Output() public removeAttachment = new EventEmitter(); diff --git a/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts b/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts index e72cf017d50..159e9bb80bd 100644 --- a/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts +++ b/frontend/src/app/modules/attachments/attachment-list/attachment-list.component.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, Input, OnInit} from '@angular/core'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {filter} from "rxjs/operators"; -import {States} from "core-components/states.service"; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { ChangeDetectorRef, Component, ElementRef, Input, OnInit } from '@angular/core'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { filter } from "rxjs/operators"; +import { States } from "core-components/states.service"; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Component({ selector: 'attachment-list', @@ -40,7 +40,7 @@ import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixi }) export class AttachmentListComponent extends UntilDestroyedMixin implements OnInit { @Input() public resource:HalResource; - @Input() public destroyImmediately:boolean = true; + @Input() public destroyImmediately = true; trackByHref = AngularTrackingHelpers.trackByHref; @@ -95,7 +95,7 @@ export class AttachmentListComponent extends UntilDestroyedMixin implements OnIn // Keep the same object as we would otherwise loose the connection to the // resource's attachments array. That way, attachments added after removing one would not be displayed. // This is bad design. - let newAttachments = this.attachments.filter((el) => el !== attachment); + const newAttachments = this.attachments.filter((el) => el !== attachment); this.attachments.length = 0; this.attachments.push(...newAttachments); diff --git a/frontend/src/app/modules/attachments/attachments-upload/attachments-upload.component.ts b/frontend/src/app/modules/attachments/attachments-upload/attachments-upload.component.ts index bc2ae8f94e7..6e439d96f6e 100644 --- a/frontend/src/app/modules/attachments/attachments-upload/attachments-upload.component.ts +++ b/frontend/src/app/modules/attachments/attachments-upload/attachments-upload.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {Component, ElementRef, Input, ViewChild} from '@angular/core'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {OnInit} from '@angular/core'; -import {UploadFile} from "core-components/api/op-file-upload/op-file-upload.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { Component, ElementRef, Input, ViewChild , OnInit } from '@angular/core'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; + +import { UploadFile } from "core-components/api/op-file-upload/op-file-upload.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; @Component({ selector: 'attachments-upload', @@ -44,7 +44,7 @@ export class AttachmentsUploadComponent implements OnInit { @ViewChild('hiddenFileInput') public filePicker:ElementRef; - public draggingOver:boolean = false; + public draggingOver = false; public text:any; public maxFileSize:number; public $element:JQuery; @@ -83,10 +83,10 @@ export class AttachmentsUploadComponent implements OnInit { event.preventDefault(); event.stopPropagation(); - let dfFiles = event.dataTransfer!.files; - let length:number = dfFiles ? dfFiles.length : 0; + const dfFiles = event.dataTransfer!.files; + const length:number = dfFiles ? dfFiles.length : 0; - let files:UploadFile[] = []; + const files:UploadFile[] = []; for (let i = 0; i < length; i++) { files.push(dfFiles[i]); } diff --git a/frontend/src/app/modules/attachments/attachments.component.ts b/frontend/src/app/modules/attachments/attachments.component.ts index 243d1494b66..5464907545f 100644 --- a/frontend/src/app/modules/attachments/attachments.component.ts +++ b/frontend/src/app/modules/attachments/attachments.component.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, Input, OnInit} from '@angular/core'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {States} from 'core-components/states.service'; -import {filter} from 'rxjs/operators'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { Component, ElementRef, Input, OnInit } from '@angular/core'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { States } from 'core-components/states.service'; +import { filter } from 'rxjs/operators'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export const attachmentsSelector = 'attachments'; diff --git a/frontend/src/app/modules/attachments/openproject-attachments.module.ts b/frontend/src/app/modules/attachments/openproject-attachments.module.ts index df8c53a719b..18c4467a0e3 100644 --- a/frontend/src/app/modules/attachments/openproject-attachments.module.ts +++ b/frontend/src/app/modules/attachments/openproject-attachments.module.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; +import { NgModule } from '@angular/core'; -import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; -import {AttachmentsComponent} from "core-app/modules/attachments/attachments.component"; -import {AttachmentListComponent} from "core-app/modules/attachments/attachment-list/attachment-list.component"; -import {AttachmentListItemComponent} from "core-app/modules/attachments/attachment-list/attachment-list-item.component"; -import {AttachmentsUploadComponent} from "core-app/modules/attachments/attachments-upload/attachments-upload.component"; +import { OpenprojectCommonModule } from 'core-app/modules/common/openproject-common.module'; +import { AttachmentsComponent } from "core-app/modules/attachments/attachments.component"; +import { AttachmentListComponent } from "core-app/modules/attachments/attachment-list/attachment-list.component"; +import { AttachmentListItemComponent } from "core-app/modules/attachments/attachment-list/attachment-list-item.component"; +import { AttachmentsUploadComponent } from "core-app/modules/attachments/attachments-upload/attachments-upload.component"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/augmenting/dynamic-scripts/two_factor_authentication.ts b/frontend/src/app/modules/augmenting/dynamic-scripts/two_factor_authentication.ts index e9a463db484..19c7206c68d 100644 --- a/frontend/src/app/modules/augmenting/dynamic-scripts/two_factor_authentication.ts +++ b/frontend/src/app/modules/augmenting/dynamic-scripts/two_factor_authentication.ts @@ -27,22 +27,22 @@ jQuery(function ($) { $('.ajax_form').submit(function() { $('#submit_otp').find("input").attr('disabled', 'disabled'); var form = $(this), - submit_button = form.find("input[type=submit]"); + submit_button = form.find("input[type=submit]"); $.ajax({ url: form.attr('action'), - type: 'post', - data: form.serialize(), - beforeSend: function() { - submit_button.attr('disabled', 'disabled'); - submit_button.toggleClass('submitting'); - $('.flash.notice').toggle(); - }, - complete: function(response) { - submit_button.removeAttr('disabled'); - $('#submit_otp').find("input").removeAttr('disabled'); - $('.flash.notice a').html(response.responseText); - $('form#resend_otp, #toggle_resend_form, .flash.notice').toggle(); - submit_button.toggleClass('submitting'); - } + type: 'post', + data: form.serialize(), + beforeSend: function() { + submit_button.attr('disabled', 'disabled'); + submit_button.toggleClass('submitting'); + $('.flash.notice').toggle(); + }, + complete: function(response) { + submit_button.removeAttr('disabled'); + $('#submit_otp').find("input").removeAttr('disabled'); + $('.flash.notice a').html(response.responseText); + $('form#resend_otp, #toggle_resend_form, .flash.notice').toggle(); + submit_button.toggleClass('submitting'); + } }); return false; }); @@ -53,7 +53,9 @@ jQuery(function ($) { if ($('#download_2fa_backup_codes').length) { var text = ''; - $('.two-factor-authentication--backup-codes li').each(function() { text += this.textContent + "\n"; }); + $('.two-factor-authentication--backup-codes li').each(function() { + text += this.textContent + "\n"; + }); var element = $('#download_2fa_backup_codes'); element.attr('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.attr('download', 'backup-codes.txt'); diff --git a/frontend/src/app/modules/augmenting/openproject-augmenting.module.ts b/frontend/src/app/modules/augmenting/openproject-augmenting.module.ts index 81d7f4b322e..5a84425096f 100644 --- a/frontend/src/app/modules/augmenting/openproject-augmenting.module.ts +++ b/frontend/src/app/modules/augmenting/openproject-augmenting.module.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {OpModalWrapperAugmentService} from "core-app/modules/modal/modal-wrapper-augment.service"; -import {PathScriptAugmentService} from "core-app/modules/augmenting/services/path-script.augment.service"; +import { NgModule } from '@angular/core'; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { OpModalWrapperAugmentService } from "core-app/modules/modal/modal-wrapper-augment.service"; +import { PathScriptAugmentService } from "core-app/modules/augmenting/services/path-script.augment.service"; @NgModule({ imports: [ OpenprojectModalModule ], @@ -37,7 +37,7 @@ import {PathScriptAugmentService} from "core-app/modules/augmenting/services/pat }) export class OpenprojectAugmentingModule { constructor(modalWrapper:OpModalWrapperAugmentService, - pathScript:PathScriptAugmentService) { + pathScript:PathScriptAugmentService) { // Setup augmenting services modalWrapper.setupListener(); pathScript.loadRequiredScripts(); diff --git a/frontend/src/app/modules/augmenting/services/path-script.augment.service.ts b/frontend/src/app/modules/augmenting/services/path-script.augment.service.ts index fbb6f3567ca..cf04bc6afdc 100644 --- a/frontend/src/app/modules/augmenting/services/path-script.augment.service.ts +++ b/frontend/src/app/modules/augmenting/services/path-script.augment.service.ts @@ -27,9 +27,9 @@ //++ -import {Inject, Injectable} from "@angular/core"; -import {DOCUMENT} from "@angular/common"; -import {debugLog} from "core-app/helpers/debug_output"; +import { Inject, Injectable } from "@angular/core"; +import { DOCUMENT } from "@angular/common"; +import { debugLog } from "core-app/helpers/debug_output"; @Injectable({ providedIn: 'root' }) export class PathScriptAugmentService { diff --git a/frontend/src/app/modules/autocompleter/autocomplete-select-decoration/autocomplete-select-decoration.component.ts b/frontend/src/app/modules/autocompleter/autocomplete-select-decoration/autocomplete-select-decoration.component.ts index c4747227b8e..95ca059f7ce 100644 --- a/frontend/src/app/modules/autocompleter/autocomplete-select-decoration/autocomplete-select-decoration.component.ts +++ b/frontend/src/app/modules/autocompleter/autocomplete-select-decoration/autocomplete-select-decoration.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit, ViewChild} from '@angular/core'; -import {NgSelectComponent} from "@ng-select/ng-select"; +import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; +import { NgSelectComponent } from "@ng-select/ng-select"; type SelectItem = { label:string, value:string, selected?:boolean }; @@ -57,7 +57,7 @@ export class AutocompleteSelectDecorationComponent implements OnInit { public options:SelectItem[]; /** Whether we're a multiselect */ - public multiselect:boolean = false; + public multiselect = false; /** Get the selected options */ public selected:SelectItem|SelectItem[]; diff --git a/frontend/src/app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts b/frontend/src/app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts index 61fc527d328..4b79697026f 100644 --- a/frontend/src/app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts +++ b/frontend/src/app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts @@ -35,13 +35,13 @@ import { Output, ViewChild } from '@angular/core'; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {AddTagFn} from "@ng-select/ng-select/lib/ng-select.component"; -import {Subject} from 'rxjs'; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { AddTagFn } from "@ng-select/ng-select/lib/ng-select.component"; +import { Subject } from 'rxjs'; export interface CreateAutocompleterValueOption { name:string; @@ -57,13 +57,13 @@ export class CreateAutocompleterComponent implements AfterViewInit { @Input() public availableValues:CreateAutocompleterValueOption[]; @Input() public appendTo:string; @Input() public model:any; - @Input() public required:boolean = false; - @Input() public disabled:boolean = false; - @Input() public finishedLoading:boolean = false; - @Input() public id:string = ''; - @Input() public classes:string = ''; + @Input() public required = false; + @Input() public disabled = false; + @Input() public finishedLoading = false; + @Input() public id = ''; + @Input() public classes = ''; @Input() public typeahead?:Subject; - @Input() public hideSelected:boolean = false; + @Input() public hideSelected = false; @Input() public showAddNewButton:boolean; @Output() public onChange = new EventEmitter(); @@ -82,13 +82,13 @@ export class CreateAutocompleterComponent implements AfterViewInit { public createAllowed:boolean|AddTagFn = false; - private _openDirectly:boolean = false; + private _openDirectly = false; constructor(readonly I18n:I18nService, readonly cdRef:ChangeDetectorRef, readonly currentProject:CurrentProjectService, readonly pathHelper:PathHelperService, -) { } + ) { } ngAfterViewInit() { this.onAfterViewInit.emit(this); diff --git a/frontend/src/app/modules/autocompleter/lazyloaded/lazyloaded-autocompleter.ts b/frontend/src/app/modules/autocompleter/lazyloaded/lazyloaded-autocompleter.ts index e562f10077a..9d72e6c9b7b 100644 --- a/frontend/src/app/modules/autocompleter/lazyloaded/lazyloaded-autocompleter.ts +++ b/frontend/src/app/modules/autocompleter/lazyloaded/lazyloaded-autocompleter.ts @@ -182,10 +182,10 @@ export namespace LazyLoadedAutocompleter { // Rener the menu for the current page _renderMenuPage(this:any, ul:JQuery, items:IAutocompleteItem[], page:number|null = null) { - let widget = this; + const widget = this; let rendered:number = items.length; let pageElements = items; - let max = ctrl.maxItemsPerPage; + const max = ctrl.maxItemsPerPage; if (page !== null) { pageElements = items.slice(page * max, (page * max) + max); rendered = Math.min(items.length, (page * max) + max); @@ -226,7 +226,7 @@ export namespace LazyLoadedAutocompleter { // Call ui's own resize widget._resizeMenu(); - container.position(jQuery.extend({of: widget.element}, widget.options.position)); + container.position(jQuery.extend({ of: widget.element }, widget.options.position)); if (widget.options.autoFocus) { menu.next(new jQuery.Event('mouseover')); } @@ -251,7 +251,7 @@ export namespace LazyLoadedAutocompleter { .appendTo(ul); if (term !== '') { - (element as any).mark(term, {className: 'ui-autocomplete-match'}); + (element as any).mark(term, { className: 'ui-autocomplete-match' }); } return element; diff --git a/frontend/src/app/modules/autocompleter/openproject-autocompleter.module.ts b/frontend/src/app/modules/autocompleter/openproject-autocompleter.module.ts index c69d46a7495..2e3567bfdd5 100644 --- a/frontend/src/app/modules/autocompleter/openproject-autocompleter.module.ts +++ b/frontend/src/app/modules/autocompleter/openproject-autocompleter.module.ts @@ -1,19 +1,19 @@ -import {NgModule} from "@angular/core"; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {NgSelectModule} from "@ng-select/ng-select"; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {CreateAutocompleterComponent} from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; -import {DraggableAutocompleteComponent} from "core-app/modules/common/draggable-autocomplete/draggable-autocomplete.component"; -import {DynamicModule} from "ng-dynamic-component"; -import {ColorsAutocompleter} from "core-app/modules/common/colors/colors-autocompleter.component"; -import {WorkPackageAutocompleterComponent} from "core-app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component"; -import {TimeEntryWorkPackageAutocompleterComponent} from "core-app/modules/autocompleter/te-work-package-autocompleter/te-work-package-autocompleter.component"; -import {AutocompleteSelectDecorationComponent} from "core-app/modules/autocompleter/autocomplete-select-decoration/autocomplete-select-decoration.component"; -import {VersionAutocompleterComponent} from "core-app/modules/autocompleter/version-autocompleter/version-autocompleter.component"; -import {UserAutocompleterComponent} from "core-app/modules/autocompleter/user-autocompleter/user-autocompleter.component"; -import {CommonModule} from "@angular/common"; -import {OpenprojectInviteUserModalModule} from "core-app/modules/invite-user-modal/invite-user-modal.module"; -import {DragulaModule} from "ng2-dragula"; +import { NgModule } from "@angular/core"; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { NgSelectModule } from "@ng-select/ng-select"; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { CreateAutocompleterComponent } from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; +import { DraggableAutocompleteComponent } from "core-app/modules/common/draggable-autocomplete/draggable-autocomplete.component"; +import { DynamicModule } from "ng-dynamic-component"; +import { ColorsAutocompleter } from "core-app/modules/common/colors/colors-autocompleter.component"; +import { WorkPackageAutocompleterComponent } from "core-app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component"; +import { TimeEntryWorkPackageAutocompleterComponent } from "core-app/modules/autocompleter/te-work-package-autocompleter/te-work-package-autocompleter.component"; +import { AutocompleteSelectDecorationComponent } from "core-app/modules/autocompleter/autocomplete-select-decoration/autocomplete-select-decoration.component"; +import { VersionAutocompleterComponent } from "core-app/modules/autocompleter/version-autocompleter/version-autocompleter.component"; +import { UserAutocompleterComponent } from "core-app/modules/autocompleter/user-autocompleter/user-autocompleter.component"; +import { CommonModule } from "@angular/common"; +import { OpenprojectInviteUserModalModule } from "core-app/modules/invite-user-modal/invite-user-modal.module"; +import { DragulaModule } from "ng2-dragula"; export const OPENPROJECT_AUTOCOMPLETE_COMPONENTS = [ CreateAutocompleterComponent, diff --git a/frontend/src/app/modules/autocompleter/te-work-package-autocompleter/te-work-package-autocompleter.component.ts b/frontend/src/app/modules/autocompleter/te-work-package-autocompleter/te-work-package-autocompleter.component.ts index 18a895d2610..14bf5432312 100644 --- a/frontend/src/app/modules/autocompleter/te-work-package-autocompleter/te-work-package-autocompleter.component.ts +++ b/frontend/src/app/modules/autocompleter/te-work-package-autocompleter/te-work-package-autocompleter.component.ts @@ -29,15 +29,15 @@ import { AfterViewInit, Component, - ViewEncapsulation, - Output, - EventEmitter, - ChangeDetectorRef, + ViewEncapsulation, + Output, + EventEmitter, + ChangeDetectorRef, } from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {WorkPackageAutocompleterComponent} from "core-app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { WorkPackageAutocompleterComponent } from "core-app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component"; export type TimeEntryWorkPackageAutocompleterMode = 'all'|'recent'; @@ -60,7 +60,7 @@ export class TimeEntryWorkPackageAutocompleterComponent extends WorkPackageAutoc this.text['recent'] = this.I18n.t('js.label_recent'); } - public loading:boolean = false; + public loading = false; public mode:TimeEntryWorkPackageAutocompleterMode = 'all'; public setMode(value:TimeEntryWorkPackageAutocompleterMode) { diff --git a/frontend/src/app/modules/autocompleter/user-autocompleter/user-autocompleter.component.ts b/frontend/src/app/modules/autocompleter/user-autocompleter/user-autocompleter.component.ts index 94a6a406f3f..13a12a74de8 100644 --- a/frontend/src/app/modules/autocompleter/user-autocompleter/user-autocompleter.component.ts +++ b/frontend/src/app/modules/autocompleter/user-autocompleter/user-autocompleter.component.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, EventEmitter, Injector, Input, OnInit, Output, ViewChild} from '@angular/core'; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {ApiV3FilterBuilder, FilterOperator} from "core-components/api/api-v3/api-v3-filter-builder"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Observable} from "rxjs"; -import {map} from "rxjs/operators"; -import {DebouncedRequestSwitchmap, errorNotificationHandler} from "core-app/helpers/rxjs/debounced-input-switchmap"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {UserResource} from "core-app/modules/hal/resources/user-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, ElementRef, EventEmitter, Injector, Input, OnInit, Output, ViewChild } from '@angular/core'; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { ApiV3FilterBuilder, FilterOperator } from "core-components/api/api-v3/api-v3-filter-builder"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Observable } from "rxjs"; +import { map } from "rxjs/operators"; +import { DebouncedRequestSwitchmap, errorNotificationHandler } from "core-app/helpers/rxjs/debounced-input-switchmap"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { UserResource } from "core-app/modules/hal/resources/user-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export const usersAutocompleterSelector = 'user-autocompleter'; @@ -50,13 +50,13 @@ export class UserAutocompleterComponent implements OnInit { @ViewChild(NgSelectComponent, { static: true }) public ngSelectComponent:NgSelectComponent; @Output() public onChange = new EventEmitter(); - @Input() public clearAfterSelection:boolean = false; + @Input() public clearAfterSelection = false; // Load all users as default @Input() public url:string = this.apiV3Service.users.path; - @Input() public allowEmpty:boolean = false; - @Input() public appendTo:string = ''; - @Input() public multiple:boolean = false; + @Input() public allowEmpty = false; + @Input() public appendTo = ''; + @Input() public multiple = false; @Input() public initialSelection:number|null = null; @@ -92,7 +92,7 @@ export class UserAutocompleterComponent implements OnInit { this.setInitialSelection(); } - let filterInput = this.elementRef.nativeElement.dataset['additionalFilter']; + const filterInput = this.elementRef.nativeElement.dataset['additionalFilter']; if (filterInput) { JSON.parse(filterInput).forEach((filter:{selector:string; operator:FilterOperator, values:string[]}) => { this.inputFilters.add(filter['selector'], filter['operator'], filter['values']); @@ -144,7 +144,7 @@ export class UserAutocompleterComponent implements OnInit { protected getAvailableUsers(url:string, searchTerm:any):Observable<{[key:string]:string|null}[]> { // Need to clone the filters to not add additional filters on every // search term being processed. - let searchFilters = this.inputFilters.clone(); + const searchFilters = this.inputFilters.clone(); if (searchTerm && searchTerm.length) { searchFilters.add('name', '~', [searchTerm]); @@ -154,12 +154,12 @@ export class UserAutocompleterComponent implements OnInit { .get(url, { filters: searchFilters.toJson() }) .pipe( map(res => { - let options = res.elements.map((el:any) => { - return {name: el.name, id: el.id, href: el.href, avatar: el.avatar}; + const options = res.elements.map((el:any) => { + return { name: el.name, id: el.id, href: el.href, avatar: el.avatar }; }); if (this.allowEmpty) { - options.unshift({name: this.I18n.t('js.timelines.filter.noneSelection'), href: null, id: null}); + options.unshift({ name: this.I18n.t('js.timelines.filter.noneSelection'), href: null, id: null }); } return options; diff --git a/frontend/src/app/modules/autocompleter/version-autocompleter/version-autocompleter.component.ts b/frontend/src/app/modules/autocompleter/version-autocompleter/version-autocompleter.component.ts index d2b1ec924a9..de5f82bf8b2 100644 --- a/frontend/src/app/modules/autocompleter/version-autocompleter/version-autocompleter.component.ts +++ b/frontend/src/app/modules/autocompleter/version-autocompleter/version-autocompleter.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, ChangeDetectorRef, Component, EventEmitter, Input, Output} from '@angular/core'; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {VersionResource} from "core-app/modules/hal/resources/version-resource"; -import {CreateAutocompleterComponent} from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { AfterViewInit, ChangeDetectorRef, Component, EventEmitter, Input, Output } from '@angular/core'; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { VersionResource } from "core-app/modules/hal/resources/version-resource"; +import { CreateAutocompleterComponent } from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: '../create-autocompleter/create-autocompleter.component.html', @@ -95,7 +95,7 @@ export class VersionAutocompleterComponent extends CreateAutocompleterComponent } private getVersionPayload(name:string) { - let payload:any = {}; + const payload:any = {}; payload['name'] = name; payload['_links'] = { definingProject: { diff --git a/frontend/src/app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component.ts b/frontend/src/app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component.ts index d868218e3c9..e4faba32d05 100644 --- a/frontend/src/app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component.ts +++ b/frontend/src/app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component.ts @@ -30,7 +30,7 @@ import { AfterViewInit, Component, } from '@angular/core'; -import {CreateAutocompleterComponent} from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; +import { CreateAutocompleterComponent } from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; @Component({ templateUrl: '../create-autocompleter/create-autocompleter.component.html', diff --git a/frontend/src/app/modules/backlogs/backlogs-page/backlogs-page.component.ts b/frontend/src/app/modules/backlogs/backlogs-page/backlogs-page.component.ts index 228e68be88a..58b833698fe 100644 --- a/frontend/src/app/modules/backlogs/backlogs-page/backlogs-page.component.ts +++ b/frontend/src/app/modules/backlogs/backlogs-page/backlogs-page.component.ts @@ -1,4 +1,4 @@ -import {Component, OnInit, ViewEncapsulation} from "@angular/core"; +import { Component, OnInit, ViewEncapsulation } from "@angular/core"; export const backlogsPageComponentSelector = 'op-backlogs-page'; diff --git a/frontend/src/app/modules/backlogs/openproject-backlogs.module.ts b/frontend/src/app/modules/backlogs/openproject-backlogs.module.ts index a043b71acb5..785e03464a1 100644 --- a/frontend/src/app/modules/backlogs/openproject-backlogs.module.ts +++ b/frontend/src/app/modules/backlogs/openproject-backlogs.module.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {UIRouterModule} from "@uirouter/angular"; -import {BacklogsPageComponent} from "core-app/modules/backlogs/backlogs-page/backlogs-page.component"; -import {BACKLOGS_ROUTES} from "core-app/modules/backlogs/openproject-backlogs.routes"; +import { NgModule } from '@angular/core'; +import { UIRouterModule } from "@uirouter/angular"; +import { BacklogsPageComponent } from "core-app/modules/backlogs/backlogs-page/backlogs-page.component"; +import { BACKLOGS_ROUTES } from "core-app/modules/backlogs/openproject-backlogs.routes"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/backlogs/openproject-backlogs.routes.ts b/frontend/src/app/modules/backlogs/openproject-backlogs.routes.ts index b5ae99a62f8..4f9b40047a1 100644 --- a/frontend/src/app/modules/backlogs/openproject-backlogs.routes.ts +++ b/frontend/src/app/modules/backlogs/openproject-backlogs.routes.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Ng2StateDeclaration, UIRouter} from "@uirouter/angular"; -import {BacklogsPageComponent} from "core-app/modules/backlogs/backlogs-page/backlogs-page.component"; +import { Ng2StateDeclaration, UIRouter } from "@uirouter/angular"; +import { BacklogsPageComponent } from "core-app/modules/backlogs/backlogs-page/backlogs-page.component"; export const BACKLOGS_ROUTES:Ng2StateDeclaration[] = [ { diff --git a/frontend/src/app/modules/bim/bcf/api/bcf-api-request.service.ts b/frontend/src/app/modules/bim/bcf/api/bcf-api-request.service.ts index 95c3acc7168..922cc40fdf7 100644 --- a/frontend/src/app/modules/bim/bcf/api/bcf-api-request.service.ts +++ b/frontend/src/app/modules/bim/bcf/api/bcf-api-request.service.ts @@ -1,17 +1,17 @@ -import {HttpClient, HttpErrorResponse, HttpParams} from "@angular/common/http"; -import {Injector} from "@angular/core"; -import {TypedJSON} from "typedjson"; -import {Constructor} from "@angular/cdk/table"; -import {Observable, throwError} from "rxjs"; +import { HttpClient, HttpErrorResponse, HttpParams } from "@angular/common/http"; +import { Injector } from "@angular/core"; +import { TypedJSON } from "typedjson"; +import { Constructor } from "@angular/cdk/table"; +import { Observable, throwError } from "rxjs"; import { HTTPClientHeaders, HTTPClientOptions, HTTPClientParamMap, HTTPSupportedMethods } from "core-app/modules/hal/http/http.interfaces"; -import {URLParamsEncoder} from "core-app/modules/hal/services/url-params-encoder"; -import {catchError, map} from "rxjs/operators"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { URLParamsEncoder } from "core-app/modules/hal/services/url-params-encoder"; +import { catchError, map } from "rxjs/operators"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class BcfApiRequestService { @InjectField() http:HttpClient; diff --git a/frontend/src/app/modules/bim/bcf/api/bcf-api.service.spec.ts b/frontend/src/app/modules/bim/bcf/api/bcf-api.service.spec.ts index dff1fe473e2..731d1556c53 100644 --- a/frontend/src/app/modules/bim/bcf/api/bcf-api.service.spec.ts +++ b/frontend/src/app/modules/bim/bcf/api/bcf-api.service.spec.ts @@ -27,9 +27,9 @@ //++ import { TestBed, waitForAsync } from "@angular/core/testing"; -import {BcfApiService} from "core-app/modules/bim/bcf/api/bcf-api.service"; -import {BcfResourceCollectionPath, BcfResourcePath} from "core-app/modules/bim/bcf/api/bcf-path-resources"; -import {BcfTopicPaths} from "core-app/modules/bim/bcf/api/topics/bcf-topic.paths"; +import { BcfApiService } from "core-app/modules/bim/bcf/api/bcf-api.service"; +import { BcfResourceCollectionPath, BcfResourcePath } from "core-app/modules/bim/bcf/api/bcf-path-resources"; +import { BcfTopicPaths } from "core-app/modules/bim/bcf/api/topics/bcf-topic.paths"; describe('BcfApiService', function () { let service:BcfApiService; @@ -49,64 +49,64 @@ describe('BcfApiService', function () { describe('building the path', () => { it('can build projects', () => { - let subject = service.projects; + const subject = service.projects; expect(subject.toPath()).toEqual('/api/bcf/2.1/projects'); }); it('can build project', () => { - let subject = service.projects.id('foo'); + const subject = service.projects.id('foo'); expect(subject.toPath()).toEqual('/api/bcf/2.1/projects/foo'); }); it('can build topics', () => { - let subject = service.projects.id('foo').topics; + const subject = service.projects.id('foo').topics; expect(subject.toPath()).toEqual('/api/bcf/2.1/projects/foo/topics'); }); it('can build topic', () => { - let subject = service.projects.id('foo').topics.id('bar'); + const subject = service.projects.id('foo').topics.id('bar'); expect(subject.toPath()).toEqual('/api/bcf/2.1/projects/foo/topics/bar'); }); it('can build viewpoints', () => { - let subject = service.projects.id('foo').topics.id('bar').viewpoints; + const subject = service.projects.id('foo').topics.id('bar').viewpoints; expect(subject.toPath()).toEqual('/api/bcf/2.1/projects/foo/topics/bar/viewpoints'); }); it('can build comments', () => { - let subject = service.projects.id('foo').topics.id('bar').comments; + const subject = service.projects.id('foo').topics.id('bar').comments; expect(subject.toPath()).toEqual('/api/bcf/2.1/projects/foo/topics/bar/comments'); }); }); describe('#parse', () => { it('can parse projects', () => { - let href = '/api/bcf/2.1/projects'; - let subject:any = service.parse(href); + const href = '/api/bcf/2.1/projects'; + const subject:any = service.parse(href); expect(subject).toBeInstanceOf(BcfResourceCollectionPath); expect(subject.segment).toEqual('projects'); expect(subject.toPath()).toEqual(href); }); it('can parse single project', () => { - let href = '/api/bcf/2.1/projects/foo'; - let subject:any = service.parse(href); + const href = '/api/bcf/2.1/projects/foo'; + const subject:any = service.parse(href); expect(subject).toBeInstanceOf(BcfResourcePath); expect(subject.id).toEqual('foo'); expect(subject.toPath()).toEqual(href); }); it('can parse topics in projects', () => { - let href = '/api/bcf/2.1/projects/foo/topics'; - let subject:any = service.parse(href); + const href = '/api/bcf/2.1/projects/foo/topics'; + const subject:any = service.parse(href); expect(subject).toBeInstanceOf(BcfResourceCollectionPath); expect(subject.segment).toEqual('topics'); expect(subject.toPath()).toEqual(href); }); it('can parse single topic in projects', () => { - let href = '/api/bcf/2.1/projects/foo/topics/0efc0da-b4d5-4933-bcb6-e01513ee2bcc'; - let subject:any = service.parse(href); + const href = '/api/bcf/2.1/projects/foo/topics/0efc0da-b4d5-4933-bcb6-e01513ee2bcc'; + const subject:any = service.parse(href); expect(subject).toBeInstanceOf(BcfTopicPaths); expect(subject.comments).toBeDefined(); expect(subject.viewpoints).toBeDefined(); @@ -115,16 +115,16 @@ describe('BcfApiService', function () { }); it('can parse viewpoints in topic', () => { - let href = '/api/bcf/2.1/projects/foo/topics/0efc0da-b4d5-4933-bcb6-e01513ee2bcc/viewpoints'; - let subject:any = service.parse(href); + const href = '/api/bcf/2.1/projects/foo/topics/0efc0da-b4d5-4933-bcb6-e01513ee2bcc/viewpoints'; + const subject:any = service.parse(href); expect(subject).toBeInstanceOf(BcfResourceCollectionPath); expect(subject.segment).toEqual('viewpoints'); expect(subject.toPath()).toEqual(href); }); it('can parse single viewpoint in topic', () => { - let href = '/api/bcf/2.1/projects/demo-bcf-management-project/topics/00efc0da-b4d5-4933-bcb6-e01513ee2bcc/viewpoints/dfca6c25-832f-6a94-53ca-48d510b6bad9'; - let subject:any = service.parse(href); + const href = '/api/bcf/2.1/projects/demo-bcf-management-project/topics/00efc0da-b4d5-4933-bcb6-e01513ee2bcc/viewpoints/dfca6c25-832f-6a94-53ca-48d510b6bad9'; + const subject:any = service.parse(href); expect(subject).toBeInstanceOf(BcfResourcePath); expect(subject.id).toEqual('dfca6c25-832f-6a94-53ca-48d510b6bad9'); expect(subject.toPath()).toEqual(href); diff --git a/frontend/src/app/modules/bim/bcf/api/bcf-api.service.ts b/frontend/src/app/modules/bim/bcf/api/bcf-api.service.ts index 9d01a47fe1c..52bad6924e1 100644 --- a/frontend/src/app/modules/bim/bcf/api/bcf-api.service.ts +++ b/frontend/src/app/modules/bim/bcf/api/bcf-api.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from "@angular/core"; -import {BcfResourceCollectionPath} from "core-app/modules/bim/bcf/api/bcf-path-resources"; -import {BcfProjectPaths} from "core-app/modules/bim/bcf/api/projects/bcf-project.paths"; +import { Injectable, Injector } from "@angular/core"; +import { BcfResourceCollectionPath } from "core-app/modules/bim/bcf/api/bcf-path-resources"; +import { BcfProjectPaths } from "core-app/modules/bim/bcf/api/projects/bcf-project.paths"; @Injectable({ providedIn: 'root' }) @@ -62,7 +62,7 @@ export class BcfApiService { let current:any = this; for (let i = 0; i < parts.length; i++) { - let pathOrId:string = parts[i]; + const pathOrId:string = parts[i]; if (pathOrId in current) { // Current has a member named like this URL part // descend into it diff --git a/frontend/src/app/modules/bim/bcf/api/bcf-authorization.service.ts b/frontend/src/app/modules/bim/bcf/api/bcf-authorization.service.ts index 6c9708496a8..37e6453ff75 100644 --- a/frontend/src/app/modules/bim/bcf/api/bcf-authorization.service.ts +++ b/frontend/src/app/modules/bim/bcf/api/bcf-authorization.service.ts @@ -1,9 +1,9 @@ -import {multiInput} from "reactivestates"; -import {BcfExtensionResource} from "core-app/modules/bim/bcf/api/extensions/bcf-extension.resource"; -import {BcfApiService} from "core-app/modules/bim/bcf/api/bcf-api.service"; -import {Observable} from "rxjs"; -import {map, take} from "rxjs/operators"; -import {Injectable} from "@angular/core"; +import { multiInput } from "reactivestates"; +import { BcfExtensionResource } from "core-app/modules/bim/bcf/api/extensions/bcf-extension.resource"; +import { BcfApiService } from "core-app/modules/bim/bcf/api/bcf-api.service"; +import { Observable } from "rxjs"; +import { map, take } from "rxjs/operators"; +import { Injectable } from "@angular/core"; export type AllowedExtensionKey = keyof BcfExtensionResource; diff --git a/frontend/src/app/modules/bim/bcf/api/bcf-path-resources.ts b/frontend/src/app/modules/bim/bcf/api/bcf-path-resources.ts index 8422091ea8f..9341098ad63 100644 --- a/frontend/src/app/modules/bim/bcf/api/bcf-path-resources.ts +++ b/frontend/src/app/modules/bim/bcf/api/bcf-path-resources.ts @@ -1,10 +1,10 @@ -import {Injector} from "@angular/core"; -import {Constructor} from "@angular/cdk/table"; -import {SimpleResource, SimpleResourceCollection} from "core-app/modules/apiv3/paths/path-resources"; +import { Injector } from "@angular/core"; +import { Constructor } from "@angular/cdk/table"; +import { SimpleResource, SimpleResourceCollection } from "core-app/modules/apiv3/paths/path-resources"; export class BcfResourcePath extends SimpleResource { constructor(readonly injector:Injector, - basePath:string, + basePath:string, readonly id:string|number) { super(basePath, id); } diff --git a/frontend/src/app/modules/bim/bcf/api/extensions/bcf-extension.paths.ts b/frontend/src/app/modules/bim/bcf/api/extensions/bcf-extension.paths.ts index 97674fc198d..ac7975dd654 100644 --- a/frontend/src/app/modules/bim/bcf/api/extensions/bcf-extension.paths.ts +++ b/frontend/src/app/modules/bim/bcf/api/extensions/bcf-extension.paths.ts @@ -1,7 +1,7 @@ -import {BcfResourcePath} from "core-app/modules/bim/bcf/api/bcf-path-resources"; -import {BcfApiRequestService} from "core-app/modules/bim/bcf/api/bcf-api-request.service"; -import {HTTPClientHeaders, HTTPClientParamMap} from "core-app/modules/hal/http/http.interfaces"; -import {BcfExtensionResource} from "core-app/modules/bim/bcf/api/extensions/bcf-extension.resource"; +import { BcfResourcePath } from "core-app/modules/bim/bcf/api/bcf-path-resources"; +import { BcfApiRequestService } from "core-app/modules/bim/bcf/api/bcf-api-request.service"; +import { HTTPClientHeaders, HTTPClientParamMap } from "core-app/modules/hal/http/http.interfaces"; +import { BcfExtensionResource } from "core-app/modules/bim/bcf/api/extensions/bcf-extension.resource"; export class BcfExtensionPaths extends BcfResourcePath { readonly bcfExtensionService = new BcfApiRequestService(this.injector, BcfExtensionResource); diff --git a/frontend/src/app/modules/bim/bcf/api/extensions/bcf-extension.resource.ts b/frontend/src/app/modules/bim/bcf/api/extensions/bcf-extension.resource.ts index 94a95718aca..c22a4b02896 100644 --- a/frontend/src/app/modules/bim/bcf/api/extensions/bcf-extension.resource.ts +++ b/frontend/src/app/modules/bim/bcf/api/extensions/bcf-extension.resource.ts @@ -1,4 +1,4 @@ -import {jsonArrayMember, jsonObject} from "typedjson"; +import { jsonArrayMember, jsonObject } from "typedjson"; @jsonObject export class BcfExtensionResource { diff --git a/frontend/src/app/modules/bim/bcf/api/projects/bcf-project.paths.ts b/frontend/src/app/modules/bim/bcf/api/projects/bcf-project.paths.ts index a219071a7d1..633997c9c40 100644 --- a/frontend/src/app/modules/bim/bcf/api/projects/bcf-project.paths.ts +++ b/frontend/src/app/modules/bim/bcf/api/projects/bcf-project.paths.ts @@ -1,9 +1,9 @@ -import {BcfResourcePath} from "core-app/modules/bim/bcf/api/bcf-path-resources"; -import {BcfApiRequestService} from "core-app/modules/bim/bcf/api/bcf-api-request.service"; -import {BcfProjectResource} from "core-app/modules/bim/bcf/api/projects/bcf-project.resource"; -import {HTTPClientHeaders, HTTPClientParamMap} from "core-app/modules/hal/http/http.interfaces"; -import {BcfTopicCollectionPath} from "core-app/modules/bim/bcf/api/topics/bcf-viewpoint-collection.paths"; -import {BcfExtensionPaths} from "core-app/modules/bim/bcf/api/extensions/bcf-extension.paths"; +import { BcfResourcePath } from "core-app/modules/bim/bcf/api/bcf-path-resources"; +import { BcfApiRequestService } from "core-app/modules/bim/bcf/api/bcf-api-request.service"; +import { BcfProjectResource } from "core-app/modules/bim/bcf/api/projects/bcf-project.resource"; +import { HTTPClientHeaders, HTTPClientParamMap } from "core-app/modules/hal/http/http.interfaces"; +import { BcfTopicCollectionPath } from "core-app/modules/bim/bcf/api/topics/bcf-viewpoint-collection.paths"; +import { BcfExtensionPaths } from "core-app/modules/bim/bcf/api/extensions/bcf-extension.paths"; export class BcfProjectPaths extends BcfResourcePath { readonly bcfProjectService = new BcfApiRequestService(this.injector, BcfProjectResource); diff --git a/frontend/src/app/modules/bim/bcf/api/projects/bcf-project.resource.ts b/frontend/src/app/modules/bim/bcf/api/projects/bcf-project.resource.ts index 84e63d294c4..9805eb4c68d 100644 --- a/frontend/src/app/modules/bim/bcf/api/projects/bcf-project.resource.ts +++ b/frontend/src/app/modules/bim/bcf/api/projects/bcf-project.resource.ts @@ -1,4 +1,4 @@ -import {jsonMember, jsonObject} from "typedjson"; +import { jsonMember, jsonObject } from "typedjson"; @jsonObject export class BcfProjectResource { diff --git a/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.paths.ts b/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.paths.ts index 6d1e3a64351..281afec358e 100644 --- a/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.paths.ts +++ b/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.paths.ts @@ -1,9 +1,9 @@ -import {HTTPClientHeaders, HTTPClientParamMap} from "core-app/modules/hal/http/http.interfaces"; -import {BcfResourceCollectionPath, BcfResourcePath} from "core-app/modules/bim/bcf/api/bcf-path-resources"; -import {BcfTopicResource} from "core-app/modules/bim/bcf/api/topics/bcf-topic.resource"; -import {BcfApiRequestService} from "core-app/modules/bim/bcf/api/bcf-api-request.service"; -import {BcfViewpointPaths} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths"; -import {BcfViewpointCollectionPath} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-collection.paths"; +import { HTTPClientHeaders, HTTPClientParamMap } from "core-app/modules/hal/http/http.interfaces"; +import { BcfResourceCollectionPath, BcfResourcePath } from "core-app/modules/bim/bcf/api/bcf-path-resources"; +import { BcfTopicResource } from "core-app/modules/bim/bcf/api/topics/bcf-topic.resource"; +import { BcfApiRequestService } from "core-app/modules/bim/bcf/api/bcf-api-request.service"; +import { BcfViewpointPaths } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths"; +import { BcfViewpointCollectionPath } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-collection.paths"; export class BcfTopicPaths extends BcfResourcePath { readonly bcfTopicService = new BcfApiRequestService(this.injector, BcfTopicResource); diff --git a/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.resource.spec.ts b/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.resource.spec.ts index c0296013b6c..4c459609864 100644 --- a/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.resource.spec.ts +++ b/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.resource.spec.ts @@ -1,5 +1,5 @@ -import {TypedJSON} from "typedjson"; -import {BcfTopicResource} from "core-app/modules/bim/bcf/api/topics/bcf-topic.resource"; +import { TypedJSON } from "typedjson"; +import { BcfTopicResource } from "core-app/modules/bim/bcf/api/topics/bcf-topic.resource"; import * as moment from 'moment'; export const topic_object = { @@ -27,8 +27,8 @@ export const topic_object = { describe('BcfTopicResource', () => { it('can parse from the API returned JSON', () => { - let serializer = new TypedJSON(BcfTopicResource); - let subject = serializer.parse(topic_object)!; + const serializer = new TypedJSON(BcfTopicResource); + const subject = serializer.parse(topic_object)!; expect(subject).toBeInstanceOf(BcfTopicResource); ['guid', 'topic_type', 'topic_status', 'priority', 'reference_links', 'title', diff --git a/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.resource.ts b/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.resource.ts index f823b03dc11..fe0b179e6c4 100644 --- a/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.resource.ts +++ b/frontend/src/app/modules/bim/bcf/api/topics/bcf-topic.resource.ts @@ -1,6 +1,6 @@ -import {jsonArrayMember, jsonMember, jsonObject} from "typedjson"; +import { jsonArrayMember, jsonMember, jsonObject } from "typedjson"; import * as moment from "moment"; -import {Moment} from "moment"; +import { Moment } from "moment"; @jsonObject export class BcfTopicAuthorizationMap { diff --git a/frontend/src/app/modules/bim/bcf/api/topics/bcf-viewpoint-collection.paths.ts b/frontend/src/app/modules/bim/bcf/api/topics/bcf-viewpoint-collection.paths.ts index 6bca6cc5ba1..c81a80e8cd8 100644 --- a/frontend/src/app/modules/bim/bcf/api/topics/bcf-viewpoint-collection.paths.ts +++ b/frontend/src/app/modules/bim/bcf/api/topics/bcf-viewpoint-collection.paths.ts @@ -1,10 +1,10 @@ -import {BcfResourceCollectionPath} from "core-app/modules/bim/bcf/api/bcf-path-resources"; -import {BcfApiRequestService} from "core-app/modules/bim/bcf/api/bcf-api-request.service"; -import {HTTPClientHeaders, HTTPClientParamMap} from "core-app/modules/hal/http/http.interfaces"; -import {Observable} from "rxjs"; -import {BcfTopicPaths} from "core-app/modules/bim/bcf/api/topics/bcf-topic.paths"; -import {Injector} from "@angular/core"; -import {BcfTopicResource} from "core-app/modules/bim/bcf/api/topics/bcf-topic.resource"; +import { BcfResourceCollectionPath } from "core-app/modules/bim/bcf/api/bcf-path-resources"; +import { BcfApiRequestService } from "core-app/modules/bim/bcf/api/bcf-api-request.service"; +import { HTTPClientHeaders, HTTPClientParamMap } from "core-app/modules/hal/http/http.interfaces"; +import { Observable } from "rxjs"; +import { BcfTopicPaths } from "core-app/modules/bim/bcf/api/topics/bcf-topic.paths"; +import { Injector } from "@angular/core"; +import { BcfTopicResource } from "core-app/modules/bim/bcf/api/topics/bcf-topic.resource"; export class BcfTopicCollectionPath extends BcfResourceCollectionPath { readonly bcfTopicService = new BcfApiRequestService(this.injector, BcfTopicResource); diff --git a/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-collection.paths.ts b/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-collection.paths.ts index fb7eaa575c8..2336037cedc 100644 --- a/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-collection.paths.ts +++ b/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-collection.paths.ts @@ -1,9 +1,9 @@ -import {BcfResourceCollectionPath} from "core-app/modules/bim/bcf/api/bcf-path-resources"; -import {BcfApiRequestService} from "core-app/modules/bim/bcf/api/bcf-api-request.service"; -import {BcfViewpointInterface} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; -import {HTTPClientHeaders, HTTPClientParamMap} from "core-app/modules/hal/http/http.interfaces"; -import {Observable} from "rxjs"; -import {BcfViewpointPaths} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths"; +import { BcfResourceCollectionPath } from "core-app/modules/bim/bcf/api/bcf-path-resources"; +import { BcfApiRequestService } from "core-app/modules/bim/bcf/api/bcf-api-request.service"; +import { BcfViewpointInterface } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; +import { HTTPClientHeaders, HTTPClientParamMap } from "core-app/modules/hal/http/http.interfaces"; +import { Observable } from "rxjs"; +import { BcfViewpointPaths } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths"; export class BcfViewpointCollectionPath extends BcfResourceCollectionPath { readonly bcfTopicService = new BcfApiRequestService(this.injector); diff --git a/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-item.interface.ts b/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-item.interface.ts index 96c64945da3..62d0a16b99a 100644 --- a/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-item.interface.ts +++ b/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-item.interface.ts @@ -1,4 +1,4 @@ -import {BcfViewpointInterface} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; +import { BcfViewpointInterface } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; export interface BcfViewpointItem { /** The URL of the viewpoint, if persisted */ diff --git a/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface.ts b/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface.ts index f131989787b..44434d118d5 100644 --- a/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface.ts +++ b/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface.ts @@ -7,5 +7,5 @@ export interface BcfViewpointInterface { orthogonal_camera?:unknown; perspective_camera?:unknown; clipping_planes?:unknown[]; - lines?:unknown[]; + lines?:unknown[]; } diff --git a/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths.ts b/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths.ts index e07d006fcc8..db9574b646b 100644 --- a/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths.ts +++ b/frontend/src/app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths.ts @@ -1,7 +1,7 @@ -import {HTTPClientHeaders, HTTPClientParamMap} from "core-app/modules/hal/http/http.interfaces"; -import {BcfResourcePath} from "core-app/modules/bim/bcf/api/bcf-path-resources"; -import {BcfApiRequestService} from "core-app/modules/bim/bcf/api/bcf-api-request.service"; -import {BcfViewpointInterface} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; +import { HTTPClientHeaders, HTTPClientParamMap } from "core-app/modules/hal/http/http.interfaces"; +import { BcfResourcePath } from "core-app/modules/bim/bcf/api/bcf-path-resources"; +import { BcfApiRequestService } from "core-app/modules/bim/bcf/api/bcf-api-request.service"; +import { BcfViewpointInterface } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; export class BcfViewpointPaths extends BcfResourcePath { readonly bcfTopicService = new BcfApiRequestService(this.injector); diff --git a/frontend/src/app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service.ts b/frontend/src/app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service.ts index a21040ef257..f7dc2a10e33 100644 --- a/frontend/src/app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service.ts +++ b/frontend/src/app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service.ts @@ -1,9 +1,9 @@ -import {Injector, Injectable} from '@angular/core'; -import {BcfViewpointInterface} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; -import {Observable} from "rxjs"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {StateService} from "@uirouter/core"; +import { Injector, Injectable } from '@angular/core'; +import { BcfViewpointInterface } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; +import { Observable } from "rxjs"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { StateService } from "@uirouter/core"; @Injectable() diff --git a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component.ts b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component.ts index 6467be15bcc..f86c1100cdd 100644 --- a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component.ts +++ b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component.ts @@ -1,10 +1,10 @@ -import {ChangeDetectionStrategy, Component} from "@angular/core"; -import {BcfWpAttributeGroupComponent} from "core-app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component"; -import {take, switchMap} from "rxjs/operators"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {forkJoin} from "rxjs"; -import {BcfViewpointInterface} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; -import {BcfViewpointItem} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-item.interface"; +import { ChangeDetectionStrategy, Component } from "@angular/core"; +import { BcfWpAttributeGroupComponent } from "core-app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component"; +import { take, switchMap } from "rxjs/operators"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { forkJoin } from "rxjs"; +import { BcfViewpointInterface } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; +import { BcfViewpointItem } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-item.interface"; @Component({ @@ -32,23 +32,23 @@ export class BcfNewWpAttributeGroupComponent extends BcfWpAttributeGroupComponen // - Create the BCFTopic on it to save the viewpoints private observeCreation() { this.wpCreate - .onNewWorkPackage() - .pipe( - this.untilDestroyed(), - take(1), - switchMap((wp:WorkPackageResource) => this.viewpointsService.setBcfTopic$(wp), (wp) => wp), - switchMap((wp:WorkPackageResource) => { - this.workPackage = wp; - const observables = this.galleryViewpoints - .filter(viewPointItem => !viewPointItem.href && viewPointItem.viewpoint) - .map(viewPointItem => this.viewpointsService.saveViewpoint$(this.workPackage, viewPointItem.viewpoint)); + .onNewWorkPackage() + .pipe( + this.untilDestroyed(), + take(1), + switchMap((wp:WorkPackageResource) => this.viewpointsService.setBcfTopic$(wp), (wp) => wp), + switchMap((wp:WorkPackageResource) => { + this.workPackage = wp; + const observables = this.galleryViewpoints + .filter(viewPointItem => !viewPointItem.href && viewPointItem.viewpoint) + .map(viewPointItem => this.viewpointsService.saveViewpoint$(this.workPackage, viewPointItem.viewpoint)); - return forkJoin(observables); - }) - ) - .subscribe((viewpoints: BcfViewpointInterface[]) => { - this.showIndex = this.galleryViewpoints.length - 1; - }); + return forkJoin(observables); + }) + ) + .subscribe((viewpoints:BcfViewpointInterface[]) => { + this.showIndex = this.galleryViewpoints.length - 1; + }); } // Disable show viewpoint functionality @@ -60,30 +60,30 @@ export class BcfNewWpAttributeGroupComponent extends BcfWpAttributeGroupComponen this.galleryViewpoints = this.galleryViewpoints.filter((_, i) => i !== index); this.setViewpointsOnGallery(this.galleryViewpoints); - + return; } saveViewpoint() { this.viewerBridge - .getViewpoint$() - .subscribe(viewpoint => { - const newViewpoint = { - snapshotURL: viewpoint.snapshot.snapshot_data, - viewpoint: viewpoint - }; + .getViewpoint$() + .subscribe(viewpoint => { + const newViewpoint = { + snapshotURL: viewpoint.snapshot.snapshot_data, + viewpoint: viewpoint + }; - this.galleryViewpoints = [ - ...this.galleryViewpoints, - newViewpoint - ]; + this.galleryViewpoints = [ + ...this.galleryViewpoints, + newViewpoint + ]; - this.setViewpointsOnGallery(this.galleryViewpoints); + this.setViewpointsOnGallery(this.galleryViewpoints); - // Select the last created viewpoint and show it - this.showIndex = this.galleryViewpoints.length - 1; - this.selectViewpointInGallery(); - }); + // Select the last created viewpoint and show it + this.showIndex = this.galleryViewpoints.length - 1; + this.selectViewpointInGallery(); + }); } shouldShowGroup() { diff --git a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.ts b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.ts index 067a0c18d4b..d42e2c9bf32 100644 --- a/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.ts +++ b/frontend/src/app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component.ts @@ -8,19 +8,19 @@ import { OnInit, ViewChild } from "@angular/core"; -import {StateService} from "@uirouter/core"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {NgxGalleryComponent, NgxGalleryOptions} from '@kolkov/ngx-gallery'; -import {HalLink} from "core-app/modules/hal/hal-link/hal-link"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {WorkPackageCreateService} from "core-components/wp-new/wp-create.service"; -import {BcfAuthorizationService} from "core-app/modules/bim/bcf/api/bcf-authorization.service"; -import {ViewpointsService} from "core-app/modules/bim/bcf/helper/viewpoints.service"; -import {BcfViewpointItem} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-item.interface"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { StateService } from "@uirouter/core"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { NgxGalleryComponent, NgxGalleryOptions } from '@kolkov/ngx-gallery'; +import { HalLink } from "core-app/modules/hal/hal-link/hal-link"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { WorkPackageCreateService } from "core-components/wp-new/wp-create.service"; +import { BcfAuthorizationService } from "core-app/modules/bim/bcf/api/bcf-authorization.service"; +import { ViewpointsService } from "core-app/modules/bim/bcf/helper/viewpoints.service"; +import { BcfViewpointItem } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint-item.interface"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ @@ -103,9 +103,9 @@ export class BcfWpAttributeGroupComponent extends UntilDestroyedMixin implements galleryImages:any[] = []; // Store whether viewing is allowed - viewAllowed:boolean = false; + viewAllowed = false; // Store whether viewpoint creation is allowed - createAllowed:boolean = false; + createAllowed = false; // Currently, this is static. Need observable if this changes over time viewerVisible = false; projectId:string; diff --git a/frontend/src/app/modules/bim/bcf/fields/display/bcf-thumbnail-field.module.ts b/frontend/src/app/modules/bim/bcf/fields/display/bcf-thumbnail-field.module.ts index ad93774ddd6..04aa0b3855c 100644 --- a/frontend/src/app/modules/bim/bcf/fields/display/bcf-thumbnail-field.module.ts +++ b/frontend/src/app/modules/bim/bcf/fields/display/bcf-thumbnail-field.module.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {BcfPathHelperService} from "core-app/modules/bim/bcf/helper/bcf-path-helper.service"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { BcfPathHelperService } from "core-app/modules/bim/bcf/helper/bcf-path-helper.service"; export class BcfThumbnailDisplayField extends DisplayField { @InjectField() bcfPathHelper:BcfPathHelperService; diff --git a/frontend/src/app/modules/bim/bcf/helper/bcf-detector.service.ts b/frontend/src/app/modules/bim/bcf/helper/bcf-detector.service.ts index c5287dc879c..6da9e849a18 100644 --- a/frontend/src/app/modules/bim/bcf/helper/bcf-detector.service.ts +++ b/frontend/src/app/modules/bim/bcf/helper/bcf-detector.service.ts @@ -1,5 +1,5 @@ -import {Inject, Injectable} from '@angular/core'; -import {DOCUMENT} from "@angular/common"; +import { Inject, Injectable } from '@angular/core'; +import { DOCUMENT } from "@angular/common"; @Injectable() export class BcfDetectorService { diff --git a/frontend/src/app/modules/bim/bcf/helper/bcf-path-helper.service.ts b/frontend/src/app/modules/bim/bcf/helper/bcf-path-helper.service.ts index 9ef04945f71..6ec25b9c8d8 100644 --- a/frontend/src/app/modules/bim/bcf/helper/bcf-path-helper.service.ts +++ b/frontend/src/app/modules/bim/bcf/helper/bcf-path-helper.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {HalLink} from "core-app/modules/hal/hal-link/hal-link"; +import { Injectable } from '@angular/core'; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { HalLink } from "core-app/modules/hal/hal-link/hal-link"; @Injectable() export class BcfPathHelperService { diff --git a/frontend/src/app/modules/bim/bcf/helper/viewpoints.service.ts b/frontend/src/app/modules/bim/bcf/helper/viewpoints.service.ts index 971c12b3ab3..0a6de6238b3 100644 --- a/frontend/src/app/modules/bim/bcf/helper/viewpoints.service.ts +++ b/frontend/src/app/modules/bim/bcf/helper/viewpoints.service.ts @@ -1,14 +1,14 @@ -import {Injectable, Injector} from '@angular/core'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {BcfApiService} from "core-app/modules/bim/bcf/api/bcf-api.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {BcfViewpointPaths} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; -import {switchMap, map, tap} from 'rxjs/operators'; -import {of, forkJoin, Observable} from 'rxjs'; -import {BcfViewpointInterface} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; -import {BcfTopicResource} from "core-app/modules/bim/bcf/api/topics/bcf-topic.resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injectable, Injector } from '@angular/core'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { BcfApiService } from "core-app/modules/bim/bcf/api/bcf-api.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { BcfViewpointPaths } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.paths"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { switchMap, map, tap } from 'rxjs/operators'; +import { of, forkJoin, Observable } from 'rxjs'; +import { BcfViewpointInterface } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; +import { BcfTopicResource } from "core-app/modules/bim/bcf/api/topics/bcf-topic.resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() @@ -37,11 +37,11 @@ export class ViewpointsService { const viewpointResource = this.getViewPointResource(workPackage, index); return viewpointResource - .delete() - .pipe( - // Update the work package to reload the viewpoints - tap(() => this.apiV3Service.work_packages.id(workPackage).requireAndStream(true)) - ); + .delete() + .pipe( + // Update the work package to reload the viewpoints + tap(() => this.apiV3Service.work_packages.id(workPackage).requireAndStream(true)) + ); } public saveViewpoint$(workPackage:WorkPackageResource, viewpoint?:BcfViewpointInterface):Observable { @@ -49,26 +49,26 @@ export class ViewpointsService { const topicUUID$ = this.setBcfTopic$(workPackage); // Default to the current viewer's viewpoint const viewpoint$ = viewpoint ? - of(viewpoint) : + of(viewpoint) : this.viewerBridge!.getViewpoint$(); return forkJoin({ - topicUUID: topicUUID$, - viewpoint: viewpoint$, - }) - .pipe( - switchMap(results => { - return this.bcfApi - .projects.id(wpProjectId) - .topics.id(results.topicUUID as (string | number)) - .viewpoints - .post(results.viewpoint); - } - ), - // Update the work package to reload the viewpoints - tap((results) => - this.apiV3Service.work_packages.id(workPackage).requireAndStream(true)) - ); + topicUUID: topicUUID$, + viewpoint: viewpoint$, + }) + .pipe( + switchMap(results => { + return this.bcfApi + .projects.id(wpProjectId) + .topics.id(results.topicUUID as (string | number)) + .viewpoints + .post(results.viewpoint); + } + ), + // Update the work package to reload the viewpoints + tap((results) => + this.apiV3Service.work_packages.id(workPackage).requireAndStream(true)) + ); } public setBcfTopic$(workPackage:WorkPackageResource) { @@ -77,8 +77,8 @@ export class ViewpointsService { } else { const topicHref = workPackage.bcfTopic?.href; const topicUUID$ = topicHref ? - of(this.bcfApi.parse(topicHref)!.id) : - this.createBcfTopic$(workPackage); + of(this.bcfApi.parse(topicHref)!.id) : + this.createBcfTopic$(workPackage); return topicUUID$.pipe(map(topicUUID => this.topicUUID = topicUUID)); } @@ -89,14 +89,14 @@ export class ViewpointsService { const wpPayload = workPackage.convertBCF.payload; return this.bcfApi - .projects.id(wpProjectId) - .topics - .post(wpPayload) - .pipe( - map((resource:BcfTopicResource) => { - this.topicUUID = resource.guid; - return this.topicUUID; - }) - ); + .projects.id(wpProjectId) + .topics + .post(wpPayload) + .pipe( + map((resource:BcfTopicResource) => { + this.topicUUID = resource.guid; + return this.topicUUID; + }) + ); } } \ No newline at end of file diff --git a/frontend/src/app/modules/bim/bcf/openproject-bcf.module.ts b/frontend/src/app/modules/bim/bcf/openproject-bcf.module.ts index 971ee42fc9c..d0d38e44572 100644 --- a/frontend/src/app/modules/bim/bcf/openproject-bcf.module.ts +++ b/frontend/src/app/modules/bim/bcf/openproject-bcf.module.ts @@ -26,25 +26,25 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector, NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {NgxGalleryModule} from "@kolkov/ngx-gallery"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {BcfThumbnailDisplayField} from "core-app/modules/bim/bcf/fields/display/bcf-thumbnail-field.module"; -import {HTTP_INTERCEPTORS} from "@angular/common/http"; -import {OpenProjectHeaderInterceptor} from "core-app/modules/hal/http/openproject-header-interceptor"; -import {BcfDetectorService} from "core-app/modules/bim/bcf/helper/bcf-detector.service"; -import {BcfPathHelperService} from "core-app/modules/bim/bcf/helper/bcf-path-helper.service"; -import {ViewpointsService} from "core-app/modules/bim/bcf/helper/viewpoints.service"; -import {BcfImportButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-import-button.component"; -import {BcfExportButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-export-button.component"; -import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; -import {HookService} from "core-app/modules/plugins/hook-service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {BcfWpAttributeGroupComponent} from "core-app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component"; -import {BcfNewWpAttributeGroupComponent} from "core-app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component"; -import {RevitBridgeService} from "core-app/modules/bim/revit_add_in/revit-bridge.service"; +import { Injector, NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { NgxGalleryModule } from "@kolkov/ngx-gallery"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { BcfThumbnailDisplayField } from "core-app/modules/bim/bcf/fields/display/bcf-thumbnail-field.module"; +import { HTTP_INTERCEPTORS } from "@angular/common/http"; +import { OpenProjectHeaderInterceptor } from "core-app/modules/hal/http/openproject-header-interceptor"; +import { BcfDetectorService } from "core-app/modules/bim/bcf/helper/bcf-detector.service"; +import { BcfPathHelperService } from "core-app/modules/bim/bcf/helper/bcf-path-helper.service"; +import { ViewpointsService } from "core-app/modules/bim/bcf/helper/viewpoints.service"; +import { BcfImportButtonComponent } from "core-app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-import-button.component"; +import { BcfExportButtonComponent } from "core-app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-export-button.component"; +import { IFCViewerService } from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { HookService } from "core-app/modules/plugins/hook-service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { BcfWpAttributeGroupComponent } from "core-app/modules/bim/bcf/bcf-wp-attribute-group/bcf-wp-attribute-group.component"; +import { BcfNewWpAttributeGroupComponent } from "core-app/modules/bim/bcf/bcf-wp-attribute-group/bcf-new-wp-attribute-group.component"; +import { RevitBridgeService } from "core-app/modules/bim/revit_add_in/revit-bridge.service"; /** * Determines based on the current user agent whether diff --git a/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts b/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts index 89cfe14515f..962ecc8f3b4 100644 --- a/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component.ts @@ -1,20 +1,20 @@ -import {ChangeDetectionStrategy, Component, OnInit, NgZone} from "@angular/core"; -import {WorkPackageListViewComponent} from "core-app/modules/work_packages/routing/wp-list-view/wp-list-view.component"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; -import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; -import {bimSplitViewCardsIdentifier, bimSplitViewListIdentifier, bimListViewIdentifier, BimViewService} from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {IfcModelsDataService} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; -import {WorkPackageViewColumnsService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; -import {UIRouterGlobals} from '@uirouter/core'; -import {pluck, distinctUntilChanged} from "rxjs/operators"; -import {States} from "core-components/states.service"; -import {BcfApiService} from "core-app/modules/bim/bcf/api/bcf-api.service"; -import {splitViewRoute} from "core-app/modules/work_packages/routing/split-view-routes.helper"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { ChangeDetectionStrategy, Component, OnInit, NgZone } from "@angular/core"; +import { WorkPackageListViewComponent } from "core-app/modules/work_packages/routing/wp-list-view/wp-list-view.component"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { DragAndDropService } from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; +import { CausedUpdatesService } from "core-app/modules/boards/board/caused-updates/caused-updates.service"; +import { bimSplitViewCardsIdentifier, bimSplitViewListIdentifier, bimListViewIdentifier, BimViewService } from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { IfcModelsDataService } from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; +import { WorkPackageViewColumnsService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service'; +import { UIRouterGlobals } from '@uirouter/core'; +import { pluck, distinctUntilChanged } from "rxjs/operators"; +import { States } from "core-components/states.service"; +import { BcfApiService } from "core-app/modules/bim/bcf/api/bcf-api.service"; +import { splitViewRoute } from "core-app/modules/work_packages/routing/split-view-routes.helper"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; @Component({ templateUrl: './bcf-list-container.component.html', @@ -49,25 +49,25 @@ export class BcfListContainerComponent extends WorkPackageListViewComponent impl // Ensure we add a bcf thumbnail column // until we can load the initial query this.wpTableColumns - .onReady() - .then(() => this.wpTableColumns.addColumn('bcfThumbnail', 2)); + .onReady() + .then(() => this.wpTableColumns.addColumn('bcfThumbnail', 2)); this.uIRouterGlobals - .params$! - .pipe( - this.untilDestroyed(), - pluck('cards'), - distinctUntilChanged(), - ) - .subscribe((cards:boolean) => { - if (cards == null || cards || this.deviceService.isMobile) { - this.showTableView = false; - } else { - this.showTableView = true; - } + .params$! + .pipe( + this.untilDestroyed(), + pluck('cards'), + distinctUntilChanged(), + ) + .subscribe((cards:boolean) => { + if (cards == null || cards || this.deviceService.isMobile) { + this.showTableView = false; + } else { + this.showTableView = true; + } - this.cdRef.detectChanges(); - }); + this.cdRef.detectChanges(); + }); } protected updateViewRepresentation(query:QueryResource) { @@ -85,7 +85,7 @@ export class BcfListContainerComponent extends WorkPackageListViewComponent impl } handleWorkPackageClicked(event:{ workPackageId:string; double:boolean }) { - const {workPackageId, double} = event; + const { workPackageId, double } = event; if (!this.showViewPointInFlight) { this.showViewPointInFlight = true; @@ -114,8 +114,8 @@ export class BcfListContainerComponent extends WorkPackageListViewComponent impl // Show the split view when there is a viewer (browser) // Show only wp details when there is no viewer, plugin environment (ie: Revit) const stateToGo = this.viewer.shouldShowViewer ? - splitViewRoute(this.$state) : - 'bim.partitioned.show'; + splitViewRoute(this.$state) : + 'bim.partitioned.show'; // Passing the card param to the new state because the router doesn't keep // it when going to 'bim.partitioned.show' const params = { workPackageId, cards, focus }; diff --git a/frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.ts b/frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.ts index 3b0d5f96531..a049e245cf4 100644 --- a/frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageCreateComponent} from 'core-components/wp-new/wp-create.component'; -import {Component} from '@angular/core'; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service"; +import { WorkPackageCreateComponent } from 'core-components/wp-new/wp-create.component'; +import { Component } from '@angular/core'; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { IFCViewerService } from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service"; @Component({ selector: 'bcf-new-split', templateUrl: './bcf-new-split.component.html' }) export class BCFNewSplitComponent extends WorkPackageCreateComponent { - public cancelState:string = '^'; + public cancelState = '^'; @InjectField() readonly viewer:IFCViewerService; diff --git a/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts b/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts index e15258bcc21..aa9408af6f2 100644 --- a/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component.ts @@ -35,9 +35,9 @@ import { OnInit, ViewChild } from '@angular/core'; -import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service"; -import {IfcModelsDataService} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { IFCViewerService } from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service"; +import { IfcModelsDataService } from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ selector: 'ifc-viewer', diff --git a/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service.ts b/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service.ts index 0241a21fbac..dc44d65da8f 100644 --- a/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service.ts +++ b/frontend/src/app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service.ts @@ -1,14 +1,14 @@ -import {Injectable, Inject, Injector} from '@angular/core'; -import {XeokitServer} from "core-app/modules/bim/ifc_models/xeokit/xeokit-server"; -import {BcfViewpointInterface} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; -import {BehaviorSubject, Observable, Subject} from "rxjs"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {BcfApiService} from "core-app/modules/bim/bcf/api/bcf-api.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {ViewpointsService} from "core-app/modules/bim/bcf/helper/viewpoints.service"; -import {of} from 'rxjs'; +import { Injectable, Inject, Injector } from '@angular/core'; +import { XeokitServer } from "core-app/modules/bim/ifc_models/xeokit/xeokit-server"; +import { BcfViewpointInterface } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { BehaviorSubject, Observable, Subject , of } from "rxjs"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { BcfApiService } from "core-app/modules/bim/bcf/api/bcf-api.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { ViewpointsService } from "core-app/modules/bim/bcf/helper/viewpoints.service"; + export interface XeokitElements { @@ -47,8 +47,8 @@ export class IFCViewerService extends ViewerBridgeService { public newViewer(elements:XeokitElements, projects:any[]) { import('@xeokit/xeokit-bim-viewer/dist/main').then((XeokitViewerModule:any) => { - let server = new XeokitServer(this.pathHelper); - let viewerUI = new XeokitViewerModule.BIMViewer(server, elements); + const server = new XeokitServer(this.pathHelper); + const viewerUI = new XeokitViewerModule.BIMViewer(server, elements); viewerUI.on("queryPicked", (event:any) => { alert(`IFC Name = "${event.objectName}"\nIFC class = "${event.objectType}"\nIFC GUID = ${event.objectId}`); @@ -100,8 +100,8 @@ export class IFCViewerService extends ViewerBridgeService { if (this.routeWithViewer) { if (this.viewer) { this.viewpointsService - .getViewPoint$(workPackage, index) - .subscribe(viewpoint => this.viewer.loadBCFViewpoint(viewpoint, {})); + .getViewPoint$(workPackage, index) + .subscribe(viewpoint => this.viewer.loadBCFViewpoint(viewpoint, {})); } } else { // Reload the whole app to get the correct menus and GON data diff --git a/frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.module.ts b/frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.module.ts index 4adfd8f9bff..e22fc99f6bf 100644 --- a/frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.module.ts +++ b/frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.module.ts @@ -25,25 +25,25 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from "@angular/core"; -import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module"; -import {UIRouterModule} from '@uirouter/angular'; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {IFCViewerComponent} from './ifc-viewer/ifc-viewer.component'; -import {IFC_ROUTES} from "core-app/modules/bim/ifc_models/openproject-ifc-models.routes"; -import {IFCViewerPageComponent} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component"; -import {EmptyComponent} from "core-app/modules/bim/ifc_models/empty/empty-component"; -import {BimViewToggleButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component"; -import {BimViewToggleDropdownDirective} from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive"; -import {BimManageIfcModelsButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component"; -import {IFCViewerService} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service"; -import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module"; -import {BCFNewSplitComponent} from "core-app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component"; -import {BcfListContainerComponent} from "core-app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component"; -import {OpenprojectHalModule} from "core-app/modules/hal/openproject-hal.module"; -import {BimViewService} from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service"; -import {IfcModelsDataService} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; -import {OpenprojectBcfModule} from "core-app/modules/bim/bcf/openproject-bcf.module"; +import { NgModule } from "@angular/core"; +import { OpenprojectWorkPackagesModule } from "core-app/modules/work_packages/openproject-work-packages.module"; +import { UIRouterModule } from '@uirouter/angular'; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { IFCViewerComponent } from './ifc-viewer/ifc-viewer.component'; +import { IFC_ROUTES } from "core-app/modules/bim/ifc_models/openproject-ifc-models.routes"; +import { IFCViewerPageComponent } from "core-app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component"; +import { EmptyComponent } from "core-app/modules/bim/ifc_models/empty/empty-component"; +import { BimViewToggleButtonComponent } from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component"; +import { BimViewToggleDropdownDirective } from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive"; +import { BimManageIfcModelsButtonComponent } from "core-app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component"; +import { IFCViewerService } from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.service"; +import { OpenprojectFieldsModule } from "core-app/modules/fields/openproject-fields.module"; +import { BCFNewSplitComponent } from "core-app/modules/bim/ifc_models/bcf/new-split/bcf-new-split.component"; +import { BcfListContainerComponent } from "core-app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component"; +import { OpenprojectHalModule } from "core-app/modules/hal/openproject-hal.module"; +import { BimViewService } from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service"; +import { IfcModelsDataService } from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; +import { OpenprojectBcfModule } from "core-app/modules/bim/bcf/openproject-bcf.module"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.routes.ts b/frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.routes.ts index a3a18cabf3a..84ff65ad439 100644 --- a/frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.routes.ts +++ b/frontend/src/app/modules/bim/ifc_models/openproject-ifc-models.routes.ts @@ -25,16 +25,16 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Ng2StateDeclaration} from '@uirouter/angular'; -import {IFCViewerPageComponent} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component"; -import {IFCViewerComponent} from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component"; -import {WorkPackagesBaseComponent} from "core-app/modules/work_packages/routing/wp-base/wp--base.component"; -import {EmptyComponent} from "core-app/modules/bim/ifc_models/empty/empty-component"; -import {makeSplitViewRoutes} from "core-app/modules/work_packages/routing/split-view-routes.template"; -import {BcfListContainerComponent} from "core-app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component"; -import {WorkPackageSplitViewComponent} from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; -import {WorkPackageNewFullViewComponent} from "core-components/wp-new/wp-new-full-view.component"; +import { Ng2StateDeclaration } from '@uirouter/angular'; +import { IFCViewerPageComponent } from "core-app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component"; +import { IFCViewerComponent } from "core-app/modules/bim/ifc_models/ifc-viewer/ifc-viewer.component"; +import { WorkPackagesBaseComponent } from "core-app/modules/work_packages/routing/wp-base/wp--base.component"; +import { EmptyComponent } from "core-app/modules/bim/ifc_models/empty/empty-component"; +import { makeSplitViewRoutes } from "core-app/modules/work_packages/routing/split-view-routes.template"; +import { BcfListContainerComponent } from "core-app/modules/bim/ifc_models/bcf/list-container/bcf-list-container.component"; +import { WorkPackageSplitViewComponent } from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { WorkPackageNewFullViewComponent } from "core-components/wp-new/wp-new-full-view.component"; export const IFC_ROUTES:Ng2StateDeclaration[] = [ { @@ -59,8 +59,8 @@ export const IFC_ROUTES:Ng2StateDeclaration[] = [ const viewerBridgeService = transition.injector().get(ViewerBridgeService); return viewerBridgeService.shouldShowViewer ? - 'bim.partitioned.split' : - 'bim.partitioned.list'; + 'bim.partitioned.split' : + 'bim.partitioned.list'; }, }, { @@ -121,7 +121,7 @@ export const IFC_ROUTES:Ng2StateDeclaration[] = [ allowMovingInEditMode: true, partition: '-left-only', }, - views: {'content-left': { component:WorkPackageNewFullViewComponent }} + views: { 'content-left': { component:WorkPackageNewFullViewComponent } } }, { name: 'bim.partitioned.show', diff --git a/frontend/src/app/modules/bim/ifc_models/pages/viewer/bim-view.service.ts b/frontend/src/app/modules/bim/ifc_models/pages/viewer/bim-view.service.ts index 57631711028..df6d0facb32 100644 --- a/frontend/src/app/modules/bim/ifc_models/pages/viewer/bim-view.service.ts +++ b/frontend/src/app/modules/bim/ifc_models/pages/viewer/bim-view.service.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, OnDestroy} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {Observable} from "rxjs"; -import {StateService, TransitionService} from "@uirouter/core"; -import {input} from "reactivestates"; -import {takeUntil} from "rxjs/operators"; +import { Injectable, OnDestroy } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { Observable } from "rxjs"; +import { StateService, TransitionService } from "@uirouter/core"; +import { input } from "reactivestates"; +import { takeUntil } from "rxjs/operators"; export const bimListViewIdentifier = 'list'; @@ -90,18 +90,18 @@ export class BimViewService implements OnDestroy { public currentViewerState():BimViewState { if (this.state.includes('bim.partitioned.list')) { return this.state.params?.cards ? - bimListViewIdentifier : - bimTableViewIdentifier; + bimListViewIdentifier : + bimTableViewIdentifier; } else if (this.state.includes('bim.**.model')) { return bimViewerViewIdentifier; } else if (this.state.includes('bim.partitioned.show')) { return this.state.params?.cards || this.state.params?.cards == null ? - bimListViewIdentifier : - bimTableViewIdentifier; + bimListViewIdentifier : + bimTableViewIdentifier; } else { return this.state.params?.cards || this.state.params?.cards == null ? - bimSplitViewCardsIdentifier : - bimSplitViewListIdentifier; + bimSplitViewCardsIdentifier : + bimSplitViewListIdentifier; } } diff --git a/frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service.ts b/frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service.ts index 83626e83ffc..5c8044ee9b0 100644 --- a/frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service.ts +++ b/frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service.ts @@ -1,7 +1,7 @@ -import {Injectable} from "@angular/core"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {GonService} from "core-app/modules/common/gon/gon.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; +import { Injectable } from "@angular/core"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { GonService } from "core-app/modules/common/gon/gon.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; export interface IFCPermissionMap { manage_ifc_models:boolean; diff --git a/frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts b/frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts index 0f01c14afc6..b767ad39547 100644 --- a/frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/pages/viewer/ifc-viewer-page.component.ts @@ -1,28 +1,28 @@ -import {ChangeDetectionStrategy, Component, Injector, ViewEncapsulation} from "@angular/core"; -import {GonService} from "core-app/modules/common/gon/gon.service"; +import { ChangeDetectionStrategy, Component, Injector, ViewEncapsulation } from "@angular/core"; +import { GonService } from "core-app/modules/common/gon/gon.service"; import { PartitionedQuerySpacePageComponent, ToolbarButtonComponentDefinition } from "core-app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component"; -import {WorkPackageFilterButtonComponent} from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component"; -import {ZenModeButtonComponent} from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component"; +import { WorkPackageFilterButtonComponent } from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component"; +import { ZenModeButtonComponent } from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component"; import { bimListViewIdentifier, bimViewerViewIdentifier, BimViewService } from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service"; -import {BimViewToggleButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component"; -import {IfcModelsDataService} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; -import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {BimManageIfcModelsButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component"; -import {WorkPackageCreateButtonComponent} from "core-components/wp-buttons/wp-create-button/wp-create-button.component"; -import {StateService, TransitionService} from "@uirouter/core"; -import {BehaviorSubject} from "rxjs"; -import {BcfImportButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-import-button.component"; -import {BcfExportButtonComponent} from "core-app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-export-button.component"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { BimViewToggleButtonComponent } from "core-app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component"; +import { IfcModelsDataService } from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; +import { QueryParamListenerService } from "core-components/wp-query/query-param-listener.service"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { BimManageIfcModelsButtonComponent } from "core-app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component"; +import { WorkPackageCreateButtonComponent } from "core-components/wp-buttons/wp-create-button/wp-create-button.component"; +import { StateService, TransitionService } from "@uirouter/core"; +import { BehaviorSubject } from "rxjs"; +import { BcfImportButtonComponent } from "core-app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-import-button.component"; +import { BcfExportButtonComponent } from "core-app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-export-button.component"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; @Component({ templateUrl: '../../../../work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html', diff --git a/frontend/src/app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-export-button.component.ts b/frontend/src/app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-export-button.component.ts index 2785266744f..3c065d0958f 100644 --- a/frontend/src/app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-export-button.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-export-button.component.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, OnDestroy, OnInit, Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {BcfPathHelperService} from "core-app/modules/bim/bcf/helper/bcf-path-helper.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; -import {StateService} from "@uirouter/core"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {WpTableExportModal} from "core-components/modals/export-modal/wp-table-export.modal"; -import {OpModalService} from "core-app/modules/modal/modal.service"; +import { Component, OnDestroy, OnInit, Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { BcfPathHelperService } from "core-app/modules/bim/bcf/helper/bcf-path-helper.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { UrlParamsHelperService } from "core-components/wp-query/url-params-helper"; +import { StateService } from "@uirouter/core"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { WpTableExportModal } from "core-components/modals/export-modal/wp-table-export.modal"; +import { OpModalService } from "core-app/modules/modal/modal.service"; @Component({ template: ` @@ -78,8 +78,8 @@ export class BcfExportButtonComponent extends UntilDestroyedMixin implements OnI .subscribe((query) => { this.query = query; - let projectIdentifier = this.currentProject.identifier; - let filters = this.queryUrlParamsHelper.buildV3GetFilters(this.query.filters); + const projectIdentifier = this.currentProject.identifier; + const filters = this.queryUrlParamsHelper.buildV3GetFilters(this.query.filters); this.exportLink = this.bcfPathHelper.projectExportIssuesPath( projectIdentifier!, JSON.stringify(filters) diff --git a/frontend/src/app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-import-button.component.ts b/frontend/src/app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-import-button.component.ts index 43f6eb36980..2c99f0e7968 100644 --- a/frontend/src/app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-import-button.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/toolbar/import-export-bcf/bcf-import-button.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {BcfPathHelperService} from "core-app/modules/bim/bcf/helper/bcf-path-helper.service"; +import { Component } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { BcfPathHelperService } from "core-app/modules/bim/bcf/helper/bcf-path-helper.service"; @Component({ template: ` diff --git a/frontend/src/app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts b/frontend/src/app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts index c7a9d9c531c..19775be310e 100644 --- a/frontend/src/app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/toolbar/manage-ifc-models-button/bim-manage-ifc-models-button.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {IfcModelsDataService} from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { IfcModelsDataService } from "core-app/modules/bim/ifc_models/pages/viewer/ifc-models-data.service"; @Component({ diff --git a/frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component.ts b/frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component.ts index 47f9d07b8a6..527adda7d2d 100644 --- a/frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component.ts +++ b/frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-button.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {BimViewService} from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service"; +import { ChangeDetectionStrategy, Component } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { BimViewService } from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service"; @Component({ diff --git a/frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive.ts b/frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive.ts index dec4207be73..3259e63986e 100644 --- a/frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive.ts +++ b/frontend/src/app/modules/bim/ifc_models/toolbar/view-toggle/bim-view-toggle-dropdown.directive.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {Directive, ElementRef} from "@angular/core"; -import {OpContextMenuTrigger} from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {StateService} from "@uirouter/core"; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { Directive, ElementRef } from "@angular/core"; +import { OpContextMenuTrigger } from "core-components/op-context-menu/handlers/op-context-menu-trigger.directive"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { StateService } from "@uirouter/core"; -import {WorkPackageFiltersService} from "core-components/filters/wp-filters/wp-filters.service"; +import { WorkPackageFiltersService } from "core-components/filters/wp-filters/wp-filters.service"; import { bimListViewIdentifier, bimSplitViewListIdentifier, bimSplitViewCardsIdentifier, bimTableViewIdentifier, bimViewerViewIdentifier, BimViewService } from "core-app/modules/bim/ifc_models/pages/viewer/bim-view.service"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; import { WorkPackageViewDisplayRepresentationService, wpDisplayCardRepresentation, @@ -76,55 +76,55 @@ export class BimViewToggleDropdownDirective extends OpContextMenuTrigger { private buildItems() { const current = this.bimView.current; - let items = this.viewerBridgeService.shouldShowViewer ? - [bimViewerViewIdentifier, bimListViewIdentifier, bimSplitViewCardsIdentifier, bimSplitViewListIdentifier, bimTableViewIdentifier] : - [bimListViewIdentifier, bimTableViewIdentifier]; + const items = this.viewerBridgeService.shouldShowViewer ? + [bimViewerViewIdentifier, bimListViewIdentifier, bimSplitViewCardsIdentifier, bimSplitViewListIdentifier, bimTableViewIdentifier] : + [bimListViewIdentifier, bimTableViewIdentifier]; this.items = items - .map(key => { - return { - hidden: key === current, - linkText: this.bimView.text[key], - icon: this.bimView.icon[key], - onClick: () => { - // Close filter section - if (this.wpFiltersService.visible) { - this.wpFiltersService.toggleVisibility(); - } + .map(key => { + return { + hidden: key === current, + linkText: this.bimView.text[key], + icon: this.bimView.icon[key], + onClick: () => { + // Close filter section + if (this.wpFiltersService.visible) { + this.wpFiltersService.toggleVisibility(); + } - switch (key) { - // This project controls the view representation of the data through - // the wpDisplayRepresentation service that modifies the QuerySpace - // to inform the rest of the app about which display mode is currently - // active (this.querySpace.query.live$). - // Under the hood it is done by modifying the params of actual route. - // Because of that, it is not possible to call this.state.go and - // this.wpDisplayRepresentation.setDisplayRepresentation at the same - // time, it raises a route error (The transition has been superseded by - // a different transition...). To avoid this error, we are passing - // a cards params to inform the view about the display representation mode - // it has to show (cards or list). - case bimListViewIdentifier: - this.state.go('bim.partitioned.list', {cards: true}); - break; - case bimTableViewIdentifier: - this.state.go('bim.partitioned.list', {cards: false}); - break; - case bimViewerViewIdentifier: - this.state.go('bim.partitioned.model'); - break; - case bimSplitViewCardsIdentifier: - this.state.go('bim.partitioned.split', {cards: true}); - break; - case bimSplitViewListIdentifier: - this.state.go('bim.partitioned.split', {cards: false}); - break; - } + switch (key) { + // This project controls the view representation of the data through + // the wpDisplayRepresentation service that modifies the QuerySpace + // to inform the rest of the app about which display mode is currently + // active (this.querySpace.query.live$). + // Under the hood it is done by modifying the params of actual route. + // Because of that, it is not possible to call this.state.go and + // this.wpDisplayRepresentation.setDisplayRepresentation at the same + // time, it raises a route error (The transition has been superseded by + // a different transition...). To avoid this error, we are passing + // a cards params to inform the view about the display representation mode + // it has to show (cards or list). + case bimListViewIdentifier: + this.state.go('bim.partitioned.list', { cards: true }); + break; + case bimTableViewIdentifier: + this.state.go('bim.partitioned.list', { cards: false }); + break; + case bimViewerViewIdentifier: + this.state.go('bim.partitioned.model'); + break; + case bimSplitViewCardsIdentifier: + this.state.go('bim.partitioned.split', { cards: true }); + break; + case bimSplitViewListIdentifier: + this.state.go('bim.partitioned.split', { cards: false }); + break; + } - return true; - } - }; - }); + return true; + } + }; + }); } } diff --git a/frontend/src/app/modules/bim/ifc_models/xeokit/xeokit-server.ts b/frontend/src/app/modules/bim/ifc_models/xeokit/xeokit-server.ts index 77b5066e787..8db7f4f0174 100644 --- a/frontend/src/app/modules/bim/ifc_models/xeokit/xeokit-server.ts +++ b/frontend/src/app/modules/bim/ifc_models/xeokit/xeokit-server.ts @@ -1,7 +1,7 @@ // @ts-ignore -import {utils} from "@xeokit/xeokit-sdk/src/viewer/scene/utils"; -import {PathHelperService} from "../../../common/path-helper/path-helper.service"; -import {IFCGonDefinition} from "../pages/viewer/ifc-models-data.service"; +import { utils } from "@xeokit/xeokit-sdk/src/viewer/scene/utils"; +import { PathHelperService } from "../../../common/path-helper/path-helper.service"; +import { IFCGonDefinition } from "../pages/viewer/ifc-models-data.service"; /** * Default server client which loads content via HTTP from the file system. diff --git a/frontend/src/app/modules/bim/openproject-bim.module.ts b/frontend/src/app/modules/bim/openproject-bim.module.ts index ded5ebd32cb..00cf27a6e95 100644 --- a/frontend/src/app/modules/bim/openproject-bim.module.ts +++ b/frontend/src/app/modules/bim/openproject-bim.module.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectBcfModule} from "core-app/modules/bim/bcf/openproject-bcf.module"; -import {OpenprojectIFCModelsModule} from "core-app/modules/bim/ifc_models/openproject-ifc-models.module"; +import { NgModule } from '@angular/core'; +import { OpenprojectBcfModule } from "core-app/modules/bim/bcf/openproject-bcf.module"; +import { OpenprojectIFCModelsModule } from "core-app/modules/bim/ifc_models/openproject-ifc-models.module"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/bim/revit_add_in/revit-add-in-settings-button.service.ts b/frontend/src/app/modules/bim/revit_add_in/revit-add-in-settings-button.service.ts index 3ed8ee4569a..6e02640b067 100644 --- a/frontend/src/app/modules/bim/revit_add_in/revit-add-in-settings-button.service.ts +++ b/frontend/src/app/modules/bim/revit_add_in/revit-add-in-settings-button.service.ts @@ -1,5 +1,5 @@ -import {Injectable, Injector} from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Injectable, Injector } from '@angular/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; /* * This service conditionally creates two settings buttons (on the user menu and on diff --git a/frontend/src/app/modules/bim/revit_add_in/revit-bridge.service.ts b/frontend/src/app/modules/bim/revit_add_in/revit-bridge.service.ts index ea6291f1833..63562e7e16f 100644 --- a/frontend/src/app/modules/bim/revit_add_in/revit-bridge.service.ts +++ b/frontend/src/app/modules/bim/revit_add_in/revit-bridge.service.ts @@ -1,11 +1,11 @@ -import {Injectable, Injector} from '@angular/core'; -import {Observable, Subject, BehaviorSubject} from "rxjs"; -import {distinctUntilChanged, filter, first, map, mapTo} from "rxjs/operators"; -import {BcfViewpointInterface} from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; -import {ViewerBridgeService} from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {ViewpointsService} from "core-app/modules/bim/bcf/helper/viewpoints.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injectable, Injector } from '@angular/core'; +import { Observable, Subject, BehaviorSubject } from "rxjs"; +import { distinctUntilChanged, filter, first, map, mapTo } from "rxjs/operators"; +import { BcfViewpointInterface } from "core-app/modules/bim/bcf/api/viewpoints/bcf-viewpoint.interface"; +import { ViewerBridgeService } from "core-app/modules/bim/bcf/bcf-viewer-bridge/viewer-bridge.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { ViewpointsService } from "core-app/modules/bim/bcf/helper/viewpoints.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; declare global { @@ -47,29 +47,29 @@ export class RevitBridgeService extends ViewerBridgeService { this.sendMessageToRevit('ViewpointGenerationRequest', trackingId, ''); return this.revitMessageReceived$ - .pipe( - distinctUntilChanged(), - filter(message => message.messageType === 'ViewpointData' && message.trackingId === trackingId), - first() - ) - .pipe( - map((message) => { - let viewpointJson = message.messagePayload; + .pipe( + distinctUntilChanged(), + filter(message => message.messageType === 'ViewpointData' && message.trackingId === trackingId), + first() + ) + .pipe( + map((message) => { + const viewpointJson = message.messagePayload; - viewpointJson.snapshot = { - snapshot_type: 'png', - snapshot_data: viewpointJson.snapshot, - }; + viewpointJson.snapshot = { + snapshot_type: 'png', + snapshot_data: viewpointJson.snapshot, + }; - return viewpointJson; - }) - ); + return viewpointJson; + }) + ); } public showViewpoint(workPackage:WorkPackageResource, index:number) { - this.viewpointsService - .getViewPoint$(workPackage, index) - .subscribe((viewpoint:BcfViewpointInterface) => this.sendMessageToRevit('ShowViewpoint', this.newTrackingId(), JSON.stringify(viewpoint))); + this.viewpointsService + .getViewPoint$(workPackage, index) + .subscribe((viewpoint:BcfViewpointInterface) => this.sendMessageToRevit('ShowViewpoint', this.newTrackingId(), JSON.stringify(viewpoint))); } sendMessageToRevit(messageType:string, trackingId:string, messagePayload?:any) { diff --git a/frontend/src/app/modules/boards/board/add-card-dropdown/add-card-dropdown-menu.directive.ts b/frontend/src/app/modules/boards/board/add-card-dropdown/add-card-dropdown-menu.directive.ts index 93ab32c10f1..cac8a1a8d8f 100644 --- a/frontend/src/app/modules/boards/board/add-card-dropdown/add-card-dropdown-menu.directive.ts +++ b/frontend/src/app/modules/boards/board/add-card-dropdown/add-card-dropdown-menu.directive.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Directive, ElementRef, Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; -import {OPContextMenuService} from 'core-components/op-context-menu/op-context-menu.service'; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {BoardListComponent} from "core-app/modules/boards/board/board-list/board-list.component"; +import { ChangeDetectorRef, Directive, ElementRef, Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { OpContextMenuTrigger } from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; +import { OPContextMenuService } from 'core-components/op-context-menu/op-context-menu.service'; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { BoardListComponent } from "core-app/modules/boards/board/board-list/board-list.component"; @Directive({ selector: '[addCardDropdown]' @@ -68,12 +68,12 @@ export class AddCardDropdownMenuDirective extends OpContextMenuTrigger { * @param {Event} openerEvent */ public positionArgs(evt:JQuery.TriggeredEvent) { - let additionalPositionArgs = { + const additionalPositionArgs = { my: 'left top', at: 'left bottom' }; - let position = super.positionArgs(evt); + const position = super.positionArgs(evt); _.assign(position, additionalPositionArgs); return position; diff --git a/frontend/src/app/modules/boards/board/add-list-modal/add-list-modal.component.ts b/frontend/src/app/modules/boards/board/add-list-modal/add-list-modal.component.ts index aaa62f70e2c..e63d68588b5 100644 --- a/frontend/src/app/modules/boards/board/add-list-modal/add-list-modal.component.ts +++ b/frontend/src/app/modules/boards/board/add-list-modal/add-list-modal.component.ts @@ -26,23 +26,23 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, Inject, OnInit} from "@angular/core"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Board} from "core-app/modules/boards/board/board"; -import {StateService} from "@uirouter/core"; -import {BoardService} from "core-app/modules/boards/board/board.service"; -import {BoardActionsRegistryService} from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; -import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {CreateAutocompleterComponent} from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; -import {of} from "rxjs"; -import {DebouncedRequestSwitchmap, errorNotificationHandler} from "core-app/helpers/rxjs/debounced-input-switchmap"; -import {ValueOption} from "core-app/modules/fields/edit/field-types/select-edit-field.component"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; +import { ChangeDetectorRef, Component, ElementRef, Inject, OnInit } from "@angular/core"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Board } from "core-app/modules/boards/board/board"; +import { StateService } from "@uirouter/core"; +import { BoardService } from "core-app/modules/boards/board/board.service"; +import { BoardActionsRegistryService } from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; +import { BoardActionService } from "core-app/modules/boards/board/board-actions/board-action.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { CreateAutocompleterComponent } from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; +import { of } from "rxjs"; +import { DebouncedRequestSwitchmap, errorNotificationHandler } from "core-app/helpers/rxjs/debounced-input-switchmap"; +import { ValueOption } from "core-app/modules/fields/edit/field-types/select-edit-field.component"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; @Component({ templateUrl: './add-list-modal.html' @@ -107,7 +107,7 @@ export class AddListModalComponent extends OpModalComponent implements OnInit { availableValues:any; /** Whether the no results warning is displayed */ - showWarning:boolean = false; + showWarning = false; constructor(readonly elementRef:ElementRef, @Inject(OpModalLocalsToken) public locals:OpModalLocalsMap, @@ -138,21 +138,19 @@ export class AddListModalComponent extends OpModalComponent implements OnInit { .subscribe((values:unknown[]) => { let hasMember = false; if (values.length === 0) { - if (this.requests.lastRequestedValue !== undefined && this.requests.lastRequestedValue !== '') { + if (this.requests.lastRequestedValue !== undefined && this.requests.lastRequestedValue !== '') { hasMember = true; - } - else { + } else { hasMember = false; } - } - else { - hasMember = false; + } else { + hasMember = false; } this.actionService - .warningTextWhenNoOptionsAvailable(hasMember) - .then((text) => { - this.warningText = text; - }); + .warningTextWhenNoOptionsAvailable(hasMember) + .then((text) => { + this.warningText = text; + }); this.availableValues = values; this.showWarning = this.requests.lastRequestedValue !== undefined && (values.length === 0); this.cdRef.detectChanges(); diff --git a/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-action.service.ts index 7d2a0434c69..dca4084ef01 100644 --- a/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-action.service.ts +++ b/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-action.service.ts @@ -1,14 +1,14 @@ -import {Injectable} from "@angular/core"; -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {AssigneeBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/assignee/assignee-board-header.component"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {CachedBoardActionService} from "core-app/modules/boards/board/board-actions/cached-board-action.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Board} from "core-app/modules/boards/board/board"; -import {ApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {ImageHelpers} from "core-app/helpers/images/path-helper"; +import { Injectable } from "@angular/core"; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { AssigneeBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/assignee/assignee-board-header.component"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { CachedBoardActionService } from "core-app/modules/boards/board/board-actions/cached-board-action.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Board } from "core-app/modules/boards/board/board"; +import { ApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { ImageHelpers } from "core-app/helpers/images/path-helper"; import imagePath = ImageHelpers.imagePath; @Injectable() @@ -35,7 +35,7 @@ export class BoardAssigneeActionService extends CachedBoardActionService { * Add a single action query */ addColumnWithActionAttribute(board:Board, value:HalResource):Promise { - let params:any = { + const params:any = { name: value.name, }; @@ -84,8 +84,8 @@ export class BoardAssigneeActionService extends CachedBoardActionService { public warningTextWhenNoOptionsAvailable(hasMember?:boolean) { let text = hasMember ? - this.I18n.t('js.boards.add_list_modal.warning.assignee'): - this.I18n.t('js.boards.add_list_modal.warning.no_member'); + this.I18n.t('js.boards.add_list_modal.warning.assignee'): + this.I18n.t('js.boards.add_list_modal.warning.no_member'); return this .apiV3Service diff --git a/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-board-header.component.ts b/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-board-header.component.ts index 9ac098b06c7..2c3499971a6 100644 --- a/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-board-header.component.ts +++ b/frontend/src/app/modules/boards/board/board-actions/assignee/assignee-board-header.component.ts @@ -25,10 +25,10 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input} from "@angular/core"; -import {UserResource} from "core-app/modules/hal/resources/user-resource"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Component, Input } from "@angular/core"; +import { UserResource } from "core-app/modules/hal/resources/user-resource"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ diff --git a/frontend/src/app/modules/boards/board/board-actions/board-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/board-action.service.ts index c2a5813ce7d..894bb286cad 100644 --- a/frontend/src/app/modules/boards/board/board-actions/board-action.service.ts +++ b/frontend/src/app/modules/boards/board/board-actions/board-action.service.ts @@ -1,26 +1,26 @@ -import {Board} from "core-app/modules/boards/board/board"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {ComponentType} from "@angular/cdk/portal"; -import {OpContextMenuItem} from "core-components/op-context-menu/op-context-menu.types"; -import {DisabledButtonPlaceholder} from "core-app/modules/boards/board/board-list/board-list.component"; -import {CreateAutocompleterComponent} from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; -import {FilterOperator} from "core-components/api/api-v3/api-v3-filter-builder"; -import {BoardListsService} from "core-app/modules/boards/board/board-list/board-lists.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {Injectable, Injector} from "@angular/core"; -import {map} from "rxjs/operators"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {WorkPackageFilterValues} from "core-components/wp-edit-form/work-package-filter-values"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {Observable} from "rxjs"; -import {QueryFilterInstanceResource} from "core-app/modules/hal/resources/query-filter-instance-resource"; +import { Board } from "core-app/modules/boards/board/board"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { ComponentType } from "@angular/cdk/portal"; +import { OpContextMenuItem } from "core-components/op-context-menu/op-context-menu.types"; +import { DisabledButtonPlaceholder } from "core-app/modules/boards/board/board-list/board-list.component"; +import { CreateAutocompleterComponent } from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component.ts"; +import { FilterOperator } from "core-components/api/api-v3/api-v3-filter-builder"; +import { BoardListsService } from "core-app/modules/boards/board/board-list/board-lists.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { Injectable, Injector } from "@angular/core"; +import { map } from "rxjs/operators"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { WorkPackageFilterValues } from "core-components/wp-edit-form/work-package-filter-values"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { Observable } from "rxjs"; +import { QueryFilterInstanceResource } from "core-app/modules/hal/resources/query-filter-instance-resource"; @Injectable() export abstract class BoardActionService { @@ -127,11 +127,11 @@ export abstract class BoardActionService { * Add a single action query */ addColumnWithActionAttribute(board:Board, value:HalResource):Promise { - let params:any = { + const params:any = { name: value.name, }; - let filter = { + const filter = { [this.filterName]: { operator: '=' as FilterOperator, values: [value.idFromLink] @@ -236,7 +236,7 @@ export abstract class BoardActionService { } new WorkPackageFilterValues(this.injector, query.filters) - .applyDefaultsFromFilters(changeset); + .applyDefaultsFromFilters(changeset); } /** diff --git a/frontend/src/app/modules/boards/board/board-actions/board-actions-registry.service.ts b/frontend/src/app/modules/boards/board/board-actions/board-actions-registry.service.ts index eefe79c4b9c..4b0b76a460e 100644 --- a/frontend/src/app/modules/boards/board/board-actions/board-actions-registry.service.ts +++ b/frontend/src/app/modules/boards/board/board-actions/board-actions-registry.service.ts @@ -1,5 +1,5 @@ -import {Injectable} from "@angular/core"; -import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service"; +import { Injectable } from "@angular/core"; +import { BoardActionService } from "core-app/modules/boards/board/board-actions/board-action.service"; @Injectable({ providedIn: 'root' }) export class BoardActionsRegistryService { @@ -12,7 +12,7 @@ export class BoardActionsRegistryService { public available() { return _.map(this.mapping, (service:BoardActionService, attribute:string) => { - return { attribute: attribute, text: service.localizedName, icon:'', description:'', image:''}; + return { attribute: attribute, text: service.localizedName, icon:'', description:'', image:'' }; }); } diff --git a/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts index e7a3354ab13..a7dc0e4c927 100644 --- a/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts +++ b/frontend/src/app/modules/boards/board/board-actions/cached-board-action.service.ts @@ -1,10 +1,10 @@ -import {Injectable} from "@angular/core"; -import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service"; -import {input} from "reactivestates"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Observable} from "rxjs"; -import {filter, map, take} from "rxjs/operators"; -import {Board} from "core-app/modules/boards/board/board"; +import { Injectable } from "@angular/core"; +import { BoardActionService } from "core-app/modules/boards/board/board-actions/board-action.service"; +import { input } from "reactivestates"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Observable } from "rxjs"; +import { filter, map, take } from "rxjs/operators"; +import { Board } from "core-app/modules/boards/board/board"; @Injectable() export abstract class CachedBoardActionService extends BoardActionService { @@ -33,7 +33,7 @@ export abstract class CachedBoardActionService extends BoardActionService { addColumnWithActionAttribute(board:Board, value:HalResource):Promise { if (this.cache.value) { // Add the new value to the cache - let newValue = [...this.cache.value, value]; + const newValue = [...this.cache.value, value]; this.cache.putValue(newValue); } diff --git a/frontend/src/app/modules/boards/board/board-actions/status/status-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/status/status-action.service.ts index 10e3fca7871..2cc1d357305 100644 --- a/frontend/src/app/modules/boards/board/board-actions/status/status-action.service.ts +++ b/frontend/src/app/modules/boards/board/board-actions/status/status-action.service.ts @@ -1,10 +1,10 @@ -import {Injectable} from "@angular/core"; -import {Board} from "core-app/modules/boards/board/board"; -import {StatusResource} from "core-app/modules/hal/resources/status-resource"; -import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service"; -import {CachedBoardActionService} from "core-app/modules/boards/board/board-actions/cached-board-action.service"; -import {StatusBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/status/status-board-header.component"; -import {ImageHelpers} from "core-app/helpers/images/path-helper"; +import { Injectable } from "@angular/core"; +import { Board } from "core-app/modules/boards/board/board"; +import { StatusResource } from "core-app/modules/hal/resources/status-resource"; +import { BoardActionService } from "core-app/modules/boards/board/board-actions/board-action.service"; +import { CachedBoardActionService } from "core-app/modules/boards/board/board-actions/cached-board-action.service"; +import { StatusBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/status/status-board-header.component"; +import { ImageHelpers } from "core-app/helpers/images/path-helper"; @Injectable() export class BoardStatusActionService extends CachedBoardActionService { diff --git a/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.component.ts b/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.component.ts index ba2e43ae2ba..cffbb57820c 100644 --- a/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.component.ts +++ b/frontend/src/app/modules/boards/board/board-actions/status/status-board-header.component.ts @@ -25,9 +25,9 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {StatusResource} from "core-app/modules/hal/resources/status-resource"; +import { Component, Input } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { StatusResource } from "core-app/modules/hal/resources/status-resource"; @Component({ diff --git a/frontend/src/app/modules/boards/board/board-actions/subproject/subproject-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/subproject/subproject-action.service.ts index 16fb0794aa2..ff76c281f0a 100644 --- a/frontend/src/app/modules/boards/board/board-actions/subproject/subproject-action.service.ts +++ b/frontend/src/app/modules/boards/board/board-actions/subproject/subproject-action.service.ts @@ -1,14 +1,14 @@ -import {Injectable} from "@angular/core"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {buildApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {SubprojectBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/subproject/subproject-board-header.component"; -import {CachedBoardActionService} from "core-app/modules/boards/board/board-actions/cached-board-action.service"; -import {ImageHelpers} from "core-app/helpers/images/path-helper"; +import { Injectable } from "@angular/core"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { buildApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { SubprojectBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/subproject/subproject-board-header.component"; +import { CachedBoardActionService } from "core-app/modules/boards/board/board-actions/cached-board-action.service"; +import { ImageHelpers } from "core-app/helpers/images/path-helper"; @Injectable() export class BoardSubprojectActionService extends CachedBoardActionService { @@ -44,12 +44,12 @@ export class BoardSubprojectActionService extends CachedBoardActionService { protected loadUncached():Promise { const currentProjectId = this.currentProject.id!; return this - .apiV3Service - .projects - .filtered(buildApiV3Filter('ancestor', '=', [currentProjectId])) - .get() - .toPromise() - .then((collection:CollectionResource) => collection.elements); + .apiV3Service + .projects + .filtered(buildApiV3Filter('ancestor', '=', [currentProjectId])) + .get() + .toPromise() + .then((collection:CollectionResource) => collection.elements); } } diff --git a/frontend/src/app/modules/boards/board/board-actions/subproject/subproject-board-header.component.ts b/frontend/src/app/modules/boards/board/board-actions/subproject/subproject-board-header.component.ts index 53273b301b5..93387fcb070 100644 --- a/frontend/src/app/modules/boards/board/board-actions/subproject/subproject-board-header.component.ts +++ b/frontend/src/app/modules/boards/board/board-actions/subproject/subproject-board-header.component.ts @@ -25,10 +25,10 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input} from "@angular/core"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Component, Input } from "@angular/core"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ diff --git a/frontend/src/app/modules/boards/board/board-actions/subtasks/board-subtasks-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/subtasks/board-subtasks-action.service.ts index de8b6b29918..8e93686543d 100644 --- a/frontend/src/app/modules/boards/board/board-actions/subtasks/board-subtasks-action.service.ts +++ b/frontend/src/app/modules/boards/board/board-actions/subtasks/board-subtasks-action.service.ts @@ -1,14 +1,14 @@ -import {Injectable} from "@angular/core"; -import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Observable} from "rxjs"; -import {map} from "rxjs/operators"; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {SubtasksBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {ImageHelpers} from "core-app/helpers/images/path-helper"; +import { Injectable } from "@angular/core"; +import { BoardActionService } from "core-app/modules/boards/board/board-actions/board-action.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Observable } from "rxjs"; +import { map } from "rxjs/operators"; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { SubtasksBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { ImageHelpers } from "core-app/helpers/images/path-helper"; @Injectable() export class BoardSubtasksActionService extends BoardActionService { @@ -46,7 +46,7 @@ export class BoardSubtasksActionService extends BoardActionService { } protected loadValues(matching?:string):Observable { - let filters = new ApiV3FilterBuilder(); + const filters = new ApiV3FilterBuilder(); filters.add('is_milestone', '=', false); filters.add('project', '=', [this.currentProject.id]); diff --git a/frontend/src/app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component.ts b/frontend/src/app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component.ts index a22a41ce619..876431571d5 100644 --- a/frontend/src/app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component.ts +++ b/frontend/src/app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component.ts @@ -25,12 +25,12 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, OnInit} from "@angular/core"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { Component, Input, OnInit } from "@angular/core"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; @Component({ diff --git a/frontend/src/app/modules/boards/board/board-actions/version/version-action.service.ts b/frontend/src/app/modules/boards/board/board-actions/version/version-action.service.ts index fcb1762828c..bec85b0aec1 100644 --- a/frontend/src/app/modules/boards/board/board-actions/version/version-action.service.ts +++ b/frontend/src/app/modules/boards/board/board-actions/version/version-action.service.ts @@ -1,19 +1,19 @@ -import {Injectable} from "@angular/core"; -import {Board} from "core-app/modules/boards/board/board"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {VersionResource} from "core-app/modules/hal/resources/version-resource"; -import {OpContextMenuItem} from "core-components/op-context-menu/op-context-menu.types"; -import {LinkHandling} from "core-app/modules/common/link-handling/link-handling"; -import {StateService} from "@uirouter/core"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {VersionBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/version/version-board-header.component"; -import {FormResource} from "core-app/modules/hal/resources/form-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {CachedBoardActionService} from "core-app/modules/boards/board/board-actions/cached-board-action.service"; -import {ImageHelpers} from "core-app/helpers/images/path-helper"; -import {VersionAutocompleterComponent} from "core-app/modules/autocompleter/version-autocompleter/version-autocompleter.component"; +import { Injectable } from "@angular/core"; +import { Board } from "core-app/modules/boards/board/board"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { BoardActionService } from "core-app/modules/boards/board/board-actions/board-action.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { VersionResource } from "core-app/modules/hal/resources/version-resource"; +import { OpContextMenuItem } from "core-components/op-context-menu/op-context-menu.types"; +import { LinkHandling } from "core-app/modules/common/link-handling/link-handling"; +import { StateService } from "@uirouter/core"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { VersionBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/version/version-board-header.component"; +import { FormResource } from "core-app/modules/hal/resources/form-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { CachedBoardActionService } from "core-app/modules/boards/board/board-actions/cached-board-action.service"; +import { ImageHelpers } from "core-app/helpers/images/path-helper"; +import { VersionAutocompleterComponent } from "core-app/modules/autocompleter/version-autocompleter/version-autocompleter.component"; @Injectable() export class BoardVersionActionService extends CachedBoardActionService { @@ -131,7 +131,7 @@ export class BoardVersionActionService extends CachedBoardActionService { .patch({ status: newStatus }) .subscribe( version => { - this.state.go('.', {}, { reload: true }); + this.state.go('.', {}, { reload: true }); }, error => this.halNotification.handleRawError(error) ); diff --git a/frontend/src/app/modules/boards/board/board-actions/version/version-board-header.component.ts b/frontend/src/app/modules/boards/board/board-actions/version/version-board-header.component.ts index 964cc3ac0a7..e5e8ec5ef13 100644 --- a/frontend/src/app/modules/boards/board/board-actions/version/version-board-header.component.ts +++ b/frontend/src/app/modules/boards/board/board-actions/version/version-board-header.component.ts @@ -25,10 +25,10 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input} from "@angular/core"; -import {VersionResource} from "core-app/modules/hal/resources/version-resource"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; +import { Component, Input } from "@angular/core"; +import { VersionResource } from "core-app/modules/hal/resources/version-resource"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; @Component({ diff --git a/frontend/src/app/modules/boards/board/board-filter/board-filter.component.ts b/frontend/src/app/modules/boards/board/board-filter/board-filter.component.ts index 71a23d668d7..0589f1b467f 100644 --- a/frontend/src/app/modules/boards/board/board-filter/board-filter.component.ts +++ b/frontend/src/app/modules/boards/board/board-filter/board-filter.component.ts @@ -1,18 +1,18 @@ -import {AfterViewInit, Component, Input} from "@angular/core"; -import {Board} from "core-app/modules/boards/board/board"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {QueryFilterInstanceResource} from "core-app/modules/hal/resources/query-filter-instance-resource"; -import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; -import {StateService} from "@uirouter/core"; -import {debounceTime, skip, take} from "rxjs/operators"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {Observable} from "rxjs"; -import {BoardFiltersService} from "core-app/modules/boards/board/board-filter/board-filters.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { AfterViewInit, Component, Input } from "@angular/core"; +import { Board } from "core-app/modules/boards/board/board"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { WorkPackageStatesInitializationService } from "core-components/wp-list/wp-states-initialization.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { QueryFilterInstanceResource } from "core-app/modules/hal/resources/query-filter-instance-resource"; +import { UrlParamsHelperService } from "core-components/wp-query/url-params-helper"; +import { StateService } from "@uirouter/core"; +import { debounceTime, skip, take } from "rxjs/operators"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { Observable } from "rxjs"; +import { BoardFiltersService } from "core-app/modules/boards/board/board-filter/board-filters.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'board-filter', @@ -68,8 +68,8 @@ export class BoardFilterComponent extends UntilDestroyedMixin implements AfterVi .subscribe(() => { const filters:QueryFilterInstanceResource[] = this.wpTableFilters.current; - let filterHash = this.urlParamsHelper.buildV3GetFilters(filters); - let query_props = JSON.stringify(filterHash); + const filterHash = this.urlParamsHelper.buildV3GetFilters(filters); + const query_props = JSON.stringify(filterHash); this.boardFilters.filters.putValue(filterHash); diff --git a/frontend/src/app/modules/boards/board/board-filter/board-filters.service.ts b/frontend/src/app/modules/boards/board/board-filter/board-filters.service.ts index 7787fb954bf..c182662b32a 100644 --- a/frontend/src/app/modules/boards/board/board-filter/board-filters.service.ts +++ b/frontend/src/app/modules/boards/board/board-filter/board-filters.service.ts @@ -1,5 +1,5 @@ -import {ApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {input} from "reactivestates"; +import { ApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { input } from "reactivestates"; import { Injectable } from "@angular/core"; @Injectable() diff --git a/frontend/src/app/modules/boards/board/board-list/board-inline-create.service.ts b/frontend/src/app/modules/boards/board/board-list/board-inline-create.service.ts index dd6afddeda8..92aeacaa0dc 100644 --- a/frontend/src/app/modules/boards/board/board-list/board-inline-create.service.ts +++ b/frontend/src/app/modules/boards/board/board-list/board-inline-create.service.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageRelationsHierarchyService} from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {BoardInlineAddAutocompleterComponent} from "core-app/modules/boards/board/inline-add/board-inline-add-autocompleter.component"; -import {GonService} from "core-app/modules/common/gon/gon.service"; +import { Injectable, Injector } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageRelationsHierarchyService } from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { BoardInlineAddAutocompleterComponent } from "core-app/modules/boards/board/inline-add/board-inline-add-autocompleter.component"; +import { GonService } from "core-app/modules/common/gon/gon.service"; @Injectable() export class BoardInlineCreateService extends WorkPackageInlineCreateService { diff --git a/frontend/src/app/modules/boards/board/board-list/board-list-cross-selection.service.ts b/frontend/src/app/modules/boards/board/board-list/board-list-cross-selection.service.ts index d993ee1ebe3..af94fb280c9 100644 --- a/frontend/src/app/modules/boards/board/board-list/board-list-cross-selection.service.ts +++ b/frontend/src/app/modules/boards/board/board-list/board-list-cross-selection.service.ts @@ -1,5 +1,5 @@ -import {Observable, Subject} from "rxjs"; -import {filter} from "rxjs/operators"; +import { Observable, Subject } from "rxjs"; +import { filter } from "rxjs/operators"; import { Injectable } from "@angular/core"; export interface BoardSelection { diff --git a/frontend/src/app/modules/boards/board/board-list/board-list-menu.component.ts b/frontend/src/app/modules/boards/board/board-list/board-list-menu.component.ts index fa294e187a7..a0448379ffe 100644 --- a/frontend/src/app/modules/boards/board/board-list/board-list-menu.component.ts +++ b/frontend/src/app/modules/boards/board/board-list/board-list-menu.component.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Output, EventEmitter, Input} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Board} from "core-app/modules/boards/board/board"; -import {BoardActionsRegistryService} from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; -import {OpContextMenuItem} from "core-components/op-context-menu/op-context-menu.types"; -import {BoardService} from "core-app/modules/boards/board/board.service"; -import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service"; +import { Component, Output, EventEmitter, Input } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Board } from "core-app/modules/boards/board/board"; +import { BoardActionsRegistryService } from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; +import { OpContextMenuItem } from "core-components/op-context-menu/op-context-menu.types"; +import { BoardService } from "core-app/modules/boards/board/board.service"; +import { BoardActionService } from "core-app/modules/boards/board/board-actions/board-action.service"; @Component({ selector: 'board-list-menu', @@ -55,7 +55,7 @@ export class BoardListMenuComponent { public get menuItems() { return async () => { - let items:OpContextMenuItem[] = [ + const items:OpContextMenuItem[] = [ { disabled: !this.canDelete, linkText: this.I18n.t('js.boards.lists.delete'), diff --git a/frontend/src/app/modules/boards/board/board-list/board-list.component.ts b/frontend/src/app/modules/boards/board/board-list/board-list.component.ts index 2a9c07f8940..5a4125dbd25 100644 --- a/frontend/src/app/modules/boards/board/board-list/board-list.component.ts +++ b/frontend/src/app/modules/boards/board/board-list/board-list.component.ts @@ -15,43 +15,43 @@ import { LoadingIndicatorService, withLoadingIndicator } from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {BoardInlineCreateService} from "core-app/modules/boards/board/board-list/board-inline-create.service"; -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Board} from "core-app/modules/boards/board/board"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {AuthorisationService} from "core-app/modules/common/model-auth/model-auth.service"; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {WorkPackageCardViewComponent} from "core-components/wp-card-view/wp-card-view.component"; -import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service"; -import {ApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {BoardService} from "app/modules/boards/board/board.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {BoardActionsRegistryService} from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; -import {BoardActionService} from "core-app/modules/boards/board/board-actions/board-action.service"; -import {ComponentType} from "@angular/cdk/portal"; -import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; -import {BoardListMenuComponent} from "core-app/modules/boards/board/board-list/board-list-menu.component"; -import {debugLog} from "core-app/helpers/debug_output"; -import {WorkPackageCardDragAndDropService} from "core-components/wp-card-view/services/wp-card-drag-and-drop.service"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {BoardFiltersService} from "core-app/modules/boards/board/board-filter/board-filters.service"; -import {StateService, TransitionService} from "@uirouter/core"; -import {WorkPackageViewFocusService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {BoardListCrossSelectionService} from "core-app/modules/boards/board/board-list/board-list-cross-selection.service"; -import {debounceTime, filter, map, retry} from "rxjs/operators"; -import {HalEvent, HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {ChangeItem} from "core-app/modules/fields/changeset/changeset"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { BoardInlineCreateService } from "core-app/modules/boards/board/board-list/board-inline-create.service"; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Board } from "core-app/modules/boards/board/board"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { AuthorisationService } from "core-app/modules/common/model-auth/model-auth.service"; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { WorkPackageCardViewComponent } from "core-components/wp-card-view/wp-card-view.component"; +import { WorkPackageStatesInitializationService } from "core-components/wp-list/wp-states-initialization.service"; +import { ApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { BoardService } from "app/modules/boards/board/board.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { BoardActionsRegistryService } from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; +import { BoardActionService } from "core-app/modules/boards/board/board-actions/board-action.service"; +import { ComponentType } from "@angular/cdk/portal"; +import { CausedUpdatesService } from "core-app/modules/boards/board/caused-updates/caused-updates.service"; +import { BoardListMenuComponent } from "core-app/modules/boards/board/board-list/board-list-menu.component"; +import { debugLog } from "core-app/helpers/debug_output"; +import { WorkPackageCardDragAndDropService } from "core-components/wp-card-view/services/wp-card-drag-and-drop.service"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { BoardFiltersService } from "core-app/modules/boards/board/board-filter/board-filters.service"; +import { StateService, TransitionService } from "@uirouter/core"; +import { WorkPackageViewFocusService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { BoardListCrossSelectionService } from "core-app/modules/boards/board/board-list/board-list-cross-selection.service"; +import { debounceTime, filter, map, retry } from "rxjs/operators"; +import { HalEvent, HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { ChangeItem } from "core-app/modules/fields/changeset/changeset"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export interface DisabledButtonPlaceholder { text:string; @@ -90,7 +90,7 @@ export class BoardListComponent extends AbstractWidgetComponent implements OnIni /** The action attribute resource if any */ public actionResource:HalResource|undefined; - public actionResourceClass:string = ''; + public actionResourceClass = ''; public headerComponent:ComponentType|undefined; /** Rename inFlight */ @@ -110,16 +110,16 @@ export class BoardListComponent extends AbstractWidgetComponent implements OnIni }; /** Are we allowed to remove and drag & drop elements ? */ - public canDragInto:boolean = false; + public canDragInto = false; /** Initially focus the list */ - public initiallyFocused:boolean = false; + public initiallyFocused = false; /** Editing handler to be passed into card component */ public workPackageAddedHandler = (workPackage:WorkPackageResource) => this.addWorkPackage(workPackage); /** Move check to be passed into card component */ - public canDragOutOf:boolean = false; + public canDragOutOf = false; public canDragOutOfHandler = (workPackage:WorkPackageResource) => this.canMove(workPackage); public buttonPlaceholder:DisabledButtonPlaceholder|undefined; @@ -158,7 +158,7 @@ export class BoardListComponent extends AbstractWidgetComponent implements OnIni // Set initial selection if split view open if (this.state.includes(this.state.current.data.baseRoute + '.details')) { - let wpId = this.state.params.workPackageId; + const wpId = this.state.params.workPackageId; this.wpViewSelectionService.initializeSelection([wpId]); } @@ -180,16 +180,16 @@ export class BoardListComponent extends AbstractWidgetComponent implements OnIni debounceTime(100), this.untilDestroyed() ).subscribe((selectionState) => { - let selected = Object.keys(_.pickBy(selectionState.selected, (selected, _) => selected === true)); + const selected = Object.keys(_.pickBy(selectionState.selected, (selected, _) => selected === true)); - const focused = this.wpViewFocusService.focusedWorkPackage; + const focused = this.wpViewFocusService.focusedWorkPackage; - this.boardListCrossSelectionService.updateSelection({ - withinQuery: this.queryId, - focusedWorkPackage: focused, - allSelected: selected + this.boardListCrossSelectionService.updateSelection({ + withinQuery: this.queryId, + focusedWorkPackage: focused, + allSelected: selected + }); }); - }); // Apply focus and selection when changed in cross service this.boardListCrossSelectionService @@ -329,7 +329,7 @@ export class BoardListComponent extends AbstractWidgetComponent implements OnIni return; } - let actionService = this.actionService!; + const actionService = this.actionService!; const id = actionService.getActionValueId(query); // Test if we loaded the resource already @@ -368,7 +368,7 @@ export class BoardListComponent extends AbstractWidgetComponent implements OnIni * @param workPackage */ private addWorkPackage(workPackage:WorkPackageResource) { - let query = this.querySpace.query.value!; + const query = this.querySpace.query.value!; const changeset = this.halEditing.changeFor(workPackage) as WorkPackageChangeset; // Assign to the action attribute if this is an action board @@ -459,8 +459,8 @@ export class BoardListComponent extends AbstractWidgetComponent implements OnIni return !!current && (current === to || current === from); }) ).subscribe((event) => { - this.updateQuery(true); - }); + this.updateQuery(true); + }); } openFullViewOnDoubleClick(event:{ workPackageId:string, double:boolean }) { diff --git a/frontend/src/app/modules/boards/board/board-list/board-lists.service.ts b/frontend/src/app/modules/boards/board/board-list/board-lists.service.ts index 6f08e77369d..c3def329354 100644 --- a/frontend/src/app/modules/boards/board/board-list/board-lists.service.ts +++ b/frontend/src/app/modules/boards/board/board-list/board-lists.service.ts @@ -1,14 +1,14 @@ -import {Injectable} from "@angular/core"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {Board} from "core-app/modules/boards/board/board"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {ApiV3Filter} from "core-components/api/api-v3/api-v3-filter-builder"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injectable } from "@angular/core"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { Board } from "core-app/modules/boards/board/board"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { ApiV3Filter } from "core-components/api/api-v3/api-v3-filter-builder"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable({ providedIn: 'root' }) export class BoardListsService { @@ -25,7 +25,7 @@ export class BoardListsService { } private create(params:Object, filters:ApiV3Filter[]):Promise { - let filterJson = JSON.stringify(filters); + const filterJson = JSON.stringify(filters); return this .apiV3Service @@ -74,7 +74,7 @@ export class BoardListsService { try { const query = await this.create(queryParams, filters); - let source = { + const source = { _type: 'GridWidget', identifier: 'work_package_query', startRow: 1, @@ -87,7 +87,7 @@ export class BoardListsService { } }; - let resource = this.halResourceService.createHalResourceOfClass(GridWidgetResource, source); + const resource = this.halResourceService.createHalResourceOfClass(GridWidgetResource, source); board.addQuery(resource); } catch (e) { this.notifications.addError(e); diff --git a/frontend/src/app/modules/boards/board/board-partitioned-page/board-list-container.component.ts b/frontend/src/app/modules/boards/board/board-partitioned-page/board-list-container.component.ts index 03df330fc26..4a6bf4b8b2f 100644 --- a/frontend/src/app/modules/boards/board/board-partitioned-page/board-list-container.component.ts +++ b/frontend/src/app/modules/boards/board/board-partitioned-page/board-list-container.component.ts @@ -1,27 +1,27 @@ -import {Component, ElementRef, Injector, OnInit, QueryList, ViewChild, ViewChildren} from "@angular/core"; -import {forkJoin, Observable, of, Subscription} from "rxjs"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {BoardListComponent} from "core-app/modules/boards/board/board-list/board-list.component"; -import {StateService} from "@uirouter/core"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {BoardListsService} from "core-app/modules/boards/board/board-list/board-lists.service"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {BoardService} from "core-app/modules/boards/board/board.service"; -import {BannersService} from "core-app/modules/common/enterprise/banners.service"; -import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; -import {QueryUpdatedService} from "core-app/modules/boards/board/query-updated/query-updated.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {Board, BoardWidgetOption} from "core-app/modules/boards/board/board"; -import {CdkDragDrop, moveItemInArray} from "@angular/cdk/drag-drop"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; -import {BoardPartitionedPageComponent} from "core-app/modules/boards/board/board-partitioned-page/board-partitioned-page.component"; -import {AddListModalComponent} from "core-app/modules/boards/board/add-list-modal/add-list-modal.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {BoardListCrossSelectionService} from "core-app/modules/boards/board/board-list/board-list-cross-selection.service"; -import {catchError, filter, map, switchMap, tap} from "rxjs/operators"; -import {BoardActionsRegistryService} from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, ElementRef, Injector, OnInit, QueryList, ViewChild, ViewChildren } from "@angular/core"; +import { forkJoin, Observable, of, Subscription } from "rxjs"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { BoardListComponent } from "core-app/modules/boards/board/board-list/board-list.component"; +import { StateService } from "@uirouter/core"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { BoardListsService } from "core-app/modules/boards/board/board-list/board-lists.service"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { BoardService } from "core-app/modules/boards/board/board.service"; +import { BannersService } from "core-app/modules/common/enterprise/banners.service"; +import { DragAndDropService } from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; +import { QueryUpdatedService } from "core-app/modules/boards/board/query-updated/query-updated.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { Board, BoardWidgetOption } from "core-app/modules/boards/board/board"; +import { CdkDragDrop, moveItemInArray } from "@angular/cdk/drag-drop"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; +import { BoardPartitionedPageComponent } from "core-app/modules/boards/board/board-partitioned-page/board-partitioned-page.component"; +import { AddListModalComponent } from "core-app/modules/boards/board/add-list-modal/add-list-modal.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { BoardListCrossSelectionService } from "core-app/modules/boards/board/board-list/board-list-cross-selection.service"; +import { catchError, filter, map, switchMap, tap } from "rxjs/operators"; +import { BoardActionsRegistryService } from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; import { WorkPackageStatesInitializationService } from 'core-app/components/wp-list/wp-states-initialization.service'; @Component({ @@ -113,8 +113,8 @@ export class BoardListContainerComponent extends UntilDestroyedMixin implements filter(() => this.state.includes(this.state.current.data.baseRoute + '.details')) ).subscribe(selection => { // Update split screen - this.state.go(this.state.current.data.baseRoute + '.details', { workPackageId: selection.focusedWorkPackage }); - }); + this.state.go(this.state.current.data.baseRoute + '.details', { workPackageId: selection.focusedWorkPackage }); + }); } setAllowedBoardWidgets = (boardObservable:Observable) => { @@ -123,7 +123,7 @@ export class BoardListContainerComponent extends UntilDestroyedMixin implements return boardObservable .pipe( switchMap( - board => this.getAllowedBoardWidgets(board).pipe(map(allowedBoardWidgets => ({board, allowedBoardWidgets}))), + board => this.getAllowedBoardWidgets(board).pipe(map(allowedBoardWidgets => ({ board, allowedBoardWidgets }))), ), map(result => { this.boardWidgets = result.allowedBoardWidgets; @@ -131,12 +131,12 @@ export class BoardListContainerComponent extends UntilDestroyedMixin implements return result.board; }) ); - } + }; getAllowedBoardWidgets(board:Board) { if (board.queries?.length) { const queryRequests$ = board.queries.map(query => this.apiv3Service.queries - .find({filters: JSON.stringify(query.options.filters), pageSize: 0}, query.options.queryId as string) + .find({ filters: JSON.stringify(query.options.filters), pageSize: 0 }, query.options.queryId as string) .pipe( map(() => query), catchError(error => { @@ -149,7 +149,7 @@ export class BoardListContainerComponent extends UntilDestroyedMixin implements ); return forkJoin([...queryRequests$]) - .pipe(map(boardWidgets => boardWidgets.filter(boardWidget => !!boardWidget) as GridWidgetResource[])); + .pipe(map(boardWidgets => boardWidgets.filter(boardWidget => !!boardWidget) as GridWidgetResource[])); } else { return of([]); } diff --git a/frontend/src/app/modules/boards/board/board-partitioned-page/board-partitioned-page.component.ts b/frontend/src/app/modules/boards/board/board-partitioned-page/board-partitioned-page.component.ts index 9e85b557828..4e4af16cbf5 100644 --- a/frontend/src/app/modules/boards/board/board-partitioned-page/board-partitioned-page.component.ts +++ b/frontend/src/app/modules/boards/board/board-partitioned-page/board-partitioned-page.component.ts @@ -1,29 +1,29 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector} from "@angular/core"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector } from "@angular/core"; import { DynamicComponentDefinition, ToolbarButtonComponentDefinition, ViewPartitionState } from "core-app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component"; -import {StateService, TransitionService} from "@uirouter/core"; -import {BoardFilterComponent} from "core-app/modules/boards/board/board-filter/board-filter.component"; -import {Board} from "core-app/modules/boards/board/board"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {BoardService} from "core-app/modules/boards/board/board.service"; -import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; -import {WorkPackageFilterButtonComponent} from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component"; -import {ZenModeButtonComponent} from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component"; -import {BoardsMenuButtonComponent} from "core-app/modules/boards/board/toolbar-menu/boards-menu-button.component"; -import {RequestSwitchmap} from "core-app/helpers/rxjs/request-switchmap"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {finalize, take} from "rxjs/operators"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {Ng2StateDeclaration} from "@uirouter/angular"; -import {BoardFiltersService} from "core-app/modules/boards/board/board-filter/board-filters.service"; -import {CardViewHandlerRegistry} from "core-components/wp-card-view/event-handler/card-view-handler-registry"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { StateService, TransitionService } from "@uirouter/core"; +import { BoardFilterComponent } from "core-app/modules/boards/board/board-filter/board-filter.component"; +import { Board } from "core-app/modules/boards/board/board"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { BoardService } from "core-app/modules/boards/board/board.service"; +import { DragAndDropService } from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; +import { WorkPackageFilterButtonComponent } from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component"; +import { ZenModeButtonComponent } from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component"; +import { BoardsMenuButtonComponent } from "core-app/modules/boards/board/toolbar-menu/boards-menu-button.component"; +import { RequestSwitchmap } from "core-app/helpers/rxjs/request-switchmap"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { finalize, take } from "rxjs/operators"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { Ng2StateDeclaration } from "@uirouter/angular"; +import { BoardFiltersService } from "core-app/modules/boards/board/board-filter/board-filters.service"; +import { CardViewHandlerRegistry } from "core-components/wp-card-view/event-handler/card-view-handler-registry"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export function boardCardViewHandlerFactory(injector:Injector) { return new CardViewHandlerRegistry(injector); @@ -65,7 +65,7 @@ export class BoardPartitionedPageComponent extends UntilDestroyedMixin { .observe(); /** Whether this is a new board just created */ - isNew:boolean = !!this.state.params.isNew; + isNew = !!this.state.params.isNew; /** Whether the board is editable */ editable:boolean; @@ -78,7 +78,7 @@ export class BoardPartitionedPageComponent extends UntilDestroyedMixin { currentQuery:QueryResource|undefined; /** Whether we're saving the board */ - toolbarDisabled:boolean = false; + toolbarDisabled = false; /** Do we currently have query props ? */ showToolbarSaveButton:boolean; @@ -89,7 +89,7 @@ export class BoardPartitionedPageComponent extends UntilDestroyedMixin { showToolbar = true; /** Whether filtering is allowed */ - filterAllowed:boolean = true; + filterAllowed = true; /** We need to pass the correct partition state to the view to manage the grid */ currentPartition:ViewPartitionState = '-split'; @@ -174,7 +174,7 @@ export class BoardPartitionedPageComponent extends UntilDestroyedMixin { this.untilDestroyed() ) .subscribe(board => { - let queryProps = this.state.params.query_props; + const queryProps = this.state.params.query_props; this.editable = board.editable; this.selectedTitle = board.name; this.boardFilters.filters.putValue(queryProps ? JSON.parse(queryProps) : board.filters); @@ -194,7 +194,7 @@ export class BoardPartitionedPageComponent extends UntilDestroyedMixin { board.name = newName; board.filters = this.boardFilters.current; - let params = { isNew: false, query_props: null }; + const params = { isNew: false, query_props: null }; this.state.go('.', params, { custom: { notify: false } }); this.boardSaver.request(board); diff --git a/frontend/src/app/modules/boards/board/board-video-teaser-modal/board-video-teaser-modal.component.ts b/frontend/src/app/modules/boards/board/board-video-teaser-modal/board-video-teaser-modal.component.ts index 77da937e9b9..3c7a9109cd6 100644 --- a/frontend/src/app/modules/boards/board/board-video-teaser-modal/board-video-teaser-modal.component.ts +++ b/frontend/src/app/modules/boards/board/board-video-teaser-modal/board-video-teaser-modal.component.ts @@ -1,10 +1,10 @@ -import {ChangeDetectorRef, Component, ElementRef, Inject, OnDestroy, OnInit} from '@angular/core'; -import {OpModalLocalsMap} from 'core-app/modules/modal/modal.types'; -import {OpModalComponent} from 'core-app/modules/modal/modal.component'; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {boardTeaserVideoURL} from "core-app/modules/boards/board-constants.const"; -import {DomSanitizer} from "@angular/platform-browser"; +import { ChangeDetectorRef, Component, ElementRef, Inject, OnDestroy, OnInit } from '@angular/core'; +import { OpModalLocalsMap } from 'core-app/modules/modal/modal.types'; +import { OpModalComponent } from 'core-app/modules/modal/modal.component'; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { boardTeaserVideoURL } from "core-app/modules/boards/board-constants.const"; +import { DomSanitizer } from "@angular/platform-browser"; @Component({ @@ -15,7 +15,7 @@ import {DomSanitizer} from "@angular/platform-browser"; tabindex="0">

    - + (); diff --git a/frontend/src/app/modules/boards/board/query-updated/query-updated.service.ts b/frontend/src/app/modules/boards/board/query-updated/query-updated.service.ts index 35b8ec45cb7..a37a76503c4 100644 --- a/frontend/src/app/modules/boards/board/query-updated/query-updated.service.ts +++ b/frontend/src/app/modules/boards/board/query-updated/query-updated.service.ts @@ -1,8 +1,8 @@ -import {Injectable} from "@angular/core"; -import {interval} from 'rxjs'; -import {startWith, switchMap, filter} from 'rxjs/operators'; -import {ActiveWindowService} from "core-app/modules/common/active-window/active-window.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injectable } from "@angular/core"; +import { interval } from 'rxjs'; +import { startWith, switchMap, filter } from 'rxjs/operators'; +import { ActiveWindowService } from "core-app/modules/common/active-window/active-window.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; const POLLING_INTERVAL = 2000; @@ -20,9 +20,9 @@ export class QueryUpdatedService { .pipe( startWith(0), filter(() => ids.length > 0), - filter(() => this.activeWindow.isActive), + filter(() => this.activeWindow.isActive), switchMap(() => { - let result = this.queryForUpdates(ids, time); + const result = this.queryForUpdates(ids, time); time = new Date(); diff --git a/frontend/src/app/modules/boards/board/toolbar-menu/boards-menu-button.component.ts b/frontend/src/app/modules/boards/board/toolbar-menu/boards-menu-button.component.ts index 74941059e76..5b71b004c9b 100644 --- a/frontend/src/app/modules/boards/board/toolbar-menu/boards-menu-button.component.ts +++ b/frontend/src/app/modules/boards/board/toolbar-menu/boards-menu-button.component.ts @@ -1,7 +1,7 @@ -import {Component, Input} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Board} from "core-app/modules/boards/board/board"; -import {Observable} from "rxjs"; +import { Component, Input } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Board } from "core-app/modules/boards/board/board"; +import { Observable } from "rxjs"; @Component({ template: ` diff --git a/frontend/src/app/modules/boards/board/toolbar-menu/boards-toolbar-menu.directive.ts b/frontend/src/app/modules/boards/board/toolbar-menu/boards-toolbar-menu.directive.ts index 3574710a343..0d1d3aaafc7 100644 --- a/frontend/src/app/modules/boards/board/toolbar-menu/boards-toolbar-menu.directive.ts +++ b/frontend/src/app/modules/boards/board/toolbar-menu/boards-toolbar-menu.directive.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Directive, ElementRef, Injector, Input} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {OpContextMenuTrigger} from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; -import {OPContextMenuService} from 'core-components/op-context-menu/op-context-menu.service'; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {Board} from "core-app/modules/boards/board/board"; -import {BoardConfigurationModal} from "core-app/modules/boards/board/configuration-modal/board-configuration.modal"; -import {BoardService} from "core-app/modules/boards/board/board.service"; -import {StateService} from "@uirouter/core"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {triggerEditingEvent} from "core-app/modules/common/editable-toolbar-title/editable-toolbar-title.component"; +import { Directive, ElementRef, Injector, Input } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { OpContextMenuTrigger } from 'core-components/op-context-menu/handlers/op-context-menu-trigger.directive'; +import { OPContextMenuService } from 'core-components/op-context-menu/op-context-menu.service'; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { Board } from "core-app/modules/boards/board/board"; +import { BoardConfigurationModal } from "core-app/modules/boards/board/configuration-modal/board-configuration.modal"; +import { BoardService } from "core-app/modules/boards/board/board.service"; +import { StateService } from "@uirouter/core"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { triggerEditingEvent } from "core-app/modules/common/editable-toolbar-title/editable-toolbar-title.component"; @Directive({ selector: '[boardsToolbarMenu]' @@ -90,7 +90,7 @@ export class BoardsToolbarMenuDirective extends OpContextMenuTrigger { linkText: this.I18n.t('js.toolbar.settings.page_settings'), icon: 'icon-edit', onClick: ($event:JQuery.TriggeredEvent) => { - if (!!this.board.grid.updateImmediately) { + if (this.board.grid.updateImmediately) { jQuery(`.toolbar-container .editable-toolbar-title--input`).trigger(triggerEditingEvent); } diff --git a/frontend/src/app/modules/boards/boards-root/boards-root.component.ts b/frontend/src/app/modules/boards/boards-root/boards-root.component.ts index 6fab1d38692..231c703a925 100644 --- a/frontend/src/app/modules/boards/boards-root/boards-root.component.ts +++ b/frontend/src/app/modules/boards/boards-root/boards-root.component.ts @@ -1,12 +1,12 @@ -import {Component, Injector} from "@angular/core"; -import {BoardConfigurationService} from "core-app/modules/boards/board/configuration-modal/board-configuration.service"; -import {BoardActionsRegistryService} from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; -import {BoardStatusActionService} from "core-app/modules/boards/board/board-actions/status/status-action.service"; -import {BoardVersionActionService} from "core-app/modules/boards/board/board-actions/version/version-action.service"; -import {QueryUpdatedService} from "core-app/modules/boards/board/query-updated/query-updated.service"; -import {BoardAssigneeActionService} from "core-app/modules/boards/board/board-actions/assignee/assignee-action.service"; -import {BoardSubprojectActionService} from "core-app/modules/boards/board/board-actions/subproject/subproject-action.service"; -import {BoardSubtasksActionService} from "core-app/modules/boards/board/board-actions/subtasks/board-subtasks-action.service"; +import { Component, Injector } from "@angular/core"; +import { BoardConfigurationService } from "core-app/modules/boards/board/configuration-modal/board-configuration.service"; +import { BoardActionsRegistryService } from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; +import { BoardStatusActionService } from "core-app/modules/boards/board/board-actions/status/status-action.service"; +import { BoardVersionActionService } from "core-app/modules/boards/board/board-actions/version/version-action.service"; +import { QueryUpdatedService } from "core-app/modules/boards/board/query-updated/query-updated.service"; +import { BoardAssigneeActionService } from "core-app/modules/boards/board/board-actions/assignee/assignee-action.service"; +import { BoardSubprojectActionService } from "core-app/modules/boards/board/board-actions/subproject/subproject-action.service"; +import { BoardSubtasksActionService } from "core-app/modules/boards/board/board-actions/subtasks/board-subtasks-action.service"; @Component({ selector: 'boards-entry', diff --git a/frontend/src/app/modules/boards/boards-sidebar/boards-menu.component.ts b/frontend/src/app/modules/boards/boards-sidebar/boards-menu.component.ts index 531d2a4b78f..252d2c6fa3f 100644 --- a/frontend/src/app/modules/boards/boards-sidebar/boards-menu.component.ts +++ b/frontend/src/app/modules/boards/boards-sidebar/boards-menu.component.ts @@ -1,13 +1,13 @@ -import {Component, OnInit} from "@angular/core"; -import {Observable} from "rxjs"; -import {BoardService} from "core-app/modules/boards/board/board.service"; -import {Board} from "core-app/modules/boards/board/board"; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {MainMenuNavigationService} from "core-components/main-menu/main-menu-navigation.service"; -import {map} from "rxjs/operators"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, OnInit } from "@angular/core"; +import { Observable } from "rxjs"; +import { BoardService } from "core-app/modules/boards/board/board.service"; +import { Board } from "core-app/modules/boards/board/board"; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { MainMenuNavigationService } from "core-components/main-menu/main-menu-navigation.service"; +import { map } from "rxjs/operators"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export const boardsMenuSelector = 'boards-menu'; @@ -70,7 +70,7 @@ export class BoardsMenuComponent extends UntilDestroyedMixin implements OnInit { } private focusBackArrow() { - let buttonArrowLeft = jQuery('*[data-name="board_view"] .main-menu--arrow-left-to-project'); + const buttonArrowLeft = jQuery('*[data-name="board_view"] .main-menu--arrow-left-to-project'); buttonArrowLeft.focus(); } } diff --git a/frontend/src/app/modules/boards/new-board-modal/new-board-modal.component.ts b/frontend/src/app/modules/boards/new-board-modal/new-board-modal.component.ts index 65eae25631f..25621be3569 100644 --- a/frontend/src/app/modules/boards/new-board-modal/new-board-modal.component.ts +++ b/frontend/src/app/modules/boards/new-board-modal/new-board-modal.component.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, Inject, ViewChild} from "@angular/core"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {BoardType} from "core-app/modules/boards/board/board"; -import {StateService} from "@uirouter/core"; -import {BoardService} from "core-app/modules/boards/board/board.service"; -import {BoardActionsRegistryService} from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; -import {LoadingIndicatorService} from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {ITileViewEntry} from '../tile-view/tile-view.component'; -import {ImageHelpers} from "core-app/helpers/images/path-helper"; +import { ChangeDetectorRef, Component, ElementRef, Inject, ViewChild } from "@angular/core"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { BoardType } from "core-app/modules/boards/board/board"; +import { StateService } from "@uirouter/core"; +import { BoardService } from "core-app/modules/boards/board/board.service"; +import { BoardActionsRegistryService } from "core-app/modules/boards/board/board-actions/board-actions-registry.service"; +import { LoadingIndicatorService } from "core-app/modules/common/loading-indicator/loading-indicator.service"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { ITileViewEntry } from '../tile-view/tile-view.component'; +import { ImageHelpers } from "core-app/helpers/images/path-helper"; import imagePath = ImageHelpers.imagePath; @@ -48,7 +48,7 @@ import imagePath = ImageHelpers.imagePath; export class NewBoardModalComponent extends OpModalComponent { @ViewChild('actionAttributeSelect', { static: true }) actionAttributeSelect:ElementRef; - public showClose:boolean = true; + public showClose = true; public confirmed = false; diff --git a/frontend/src/app/modules/boards/openproject-boards.module.ts b/frontend/src/app/modules/boards/openproject-boards.module.ts index 82e44ad74f4..5e58c213615 100644 --- a/frontend/src/app/modules/boards/openproject-boards.module.ts +++ b/frontend/src/app/modules/boards/openproject-boards.module.ts @@ -26,36 +26,36 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module"; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {UIRouterModule} from "@uirouter/angular"; -import {BoardListComponent} from "core-app/modules/boards/board/board-list/board-list.component"; -import {BoardsRootComponent} from "core-app/modules/boards/boards-root/boards-root.component"; -import {BoardInlineAddAutocompleterComponent} from "core-app/modules/boards/board/inline-add/board-inline-add-autocompleter.component"; -import {BoardsToolbarMenuDirective} from "core-app/modules/boards/board/toolbar-menu/boards-toolbar-menu.directive"; -import {BoardConfigurationModal} from "core-app/modules/boards/board/configuration-modal/board-configuration.modal"; -import {BoardsIndexPageComponent} from "core-app/modules/boards/index-page/boards-index-page.component"; -import {BoardsMenuComponent} from "core-app/modules/boards/boards-sidebar/boards-menu.component"; -import {NewBoardModalComponent} from "core-app/modules/boards/new-board-modal/new-board-modal.component"; -import {AddListModalComponent} from "core-app/modules/boards/board/add-list-modal/add-list-modal.component"; -import {BoardHighlightingTabComponent} from "core-app/modules/boards/board/configuration-modal/tabs/highlighting-tab.component"; -import {AddCardDropdownMenuDirective} from "core-app/modules/boards/board/add-card-dropdown/add-card-dropdown-menu.directive"; -import {BoardFilterComponent} from "core-app/modules/boards/board/board-filter/board-filter.component"; -import {DragScrollModule} from "cdk-drag-scroll"; -import {BoardListMenuComponent} from "core-app/modules/boards/board/board-list/board-list-menu.component"; -import {VersionBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/version/version-board-header.component"; -import {DynamicModule} from "ng-dynamic-component"; -import {BOARDS_ROUTES, uiRouterBoardsConfiguration} from "core-app/modules/boards/openproject-boards.routes"; -import {BoardPartitionedPageComponent} from "core-app/modules/boards/board/board-partitioned-page/board-partitioned-page.component"; -import {BoardListContainerComponent} from "core-app/modules/boards/board/board-partitioned-page/board-list-container.component"; -import {BoardsMenuButtonComponent} from "core-app/modules/boards/board/toolbar-menu/boards-menu-button.component"; -import {AssigneeBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/assignee/assignee-board-header.component"; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { OpenprojectWorkPackagesModule } from "core-app/modules/work_packages/openproject-work-packages.module"; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { UIRouterModule } from "@uirouter/angular"; +import { BoardListComponent } from "core-app/modules/boards/board/board-list/board-list.component"; +import { BoardsRootComponent } from "core-app/modules/boards/boards-root/boards-root.component"; +import { BoardInlineAddAutocompleterComponent } from "core-app/modules/boards/board/inline-add/board-inline-add-autocompleter.component"; +import { BoardsToolbarMenuDirective } from "core-app/modules/boards/board/toolbar-menu/boards-toolbar-menu.directive"; +import { BoardConfigurationModal } from "core-app/modules/boards/board/configuration-modal/board-configuration.modal"; +import { BoardsIndexPageComponent } from "core-app/modules/boards/index-page/boards-index-page.component"; +import { BoardsMenuComponent } from "core-app/modules/boards/boards-sidebar/boards-menu.component"; +import { NewBoardModalComponent } from "core-app/modules/boards/new-board-modal/new-board-modal.component"; +import { AddListModalComponent } from "core-app/modules/boards/board/add-list-modal/add-list-modal.component"; +import { BoardHighlightingTabComponent } from "core-app/modules/boards/board/configuration-modal/tabs/highlighting-tab.component"; +import { AddCardDropdownMenuDirective } from "core-app/modules/boards/board/add-card-dropdown/add-card-dropdown-menu.directive"; +import { BoardFilterComponent } from "core-app/modules/boards/board/board-filter/board-filter.component"; +import { DragScrollModule } from "cdk-drag-scroll"; +import { BoardListMenuComponent } from "core-app/modules/boards/board/board-list/board-list-menu.component"; +import { VersionBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/version/version-board-header.component"; +import { DynamicModule } from "ng-dynamic-component"; +import { BOARDS_ROUTES, uiRouterBoardsConfiguration } from "core-app/modules/boards/openproject-boards.routes"; +import { BoardPartitionedPageComponent } from "core-app/modules/boards/board/board-partitioned-page/board-partitioned-page.component"; +import { BoardListContainerComponent } from "core-app/modules/boards/board/board-partitioned-page/board-list-container.component"; +import { BoardsMenuButtonComponent } from "core-app/modules/boards/board/toolbar-menu/boards-menu-button.component"; +import { AssigneeBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/assignee/assignee-board-header.component"; import { TileViewComponent } from './tile-view/tile-view.component'; -import {SubprojectBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/subproject/subproject-board-header.component"; -import {SubtasksBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component"; -import {StatusBoardHeaderComponent} from "core-app/modules/boards/board/board-actions/status/status-board-header.component"; +import { SubprojectBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/subproject/subproject-board-header.component"; +import { SubtasksBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/subtasks/subtasks-board-header.component"; +import { StatusBoardHeaderComponent } from "core-app/modules/boards/board/board-actions/status/status-board-header.component"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/boards/openproject-boards.routes.ts b/frontend/src/app/modules/boards/openproject-boards.routes.ts index 43d07365952..95a471d479f 100644 --- a/frontend/src/app/modules/boards/openproject-boards.routes.ts +++ b/frontend/src/app/modules/boards/openproject-boards.routes.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Ng2StateDeclaration, UIRouter} from "@uirouter/angular"; -import {BoardsRootComponent} from "core-app/modules/boards/boards-root/boards-root.component"; -import {BoardsIndexPageComponent} from "core-app/modules/boards/index-page/boards-index-page.component"; -import {BoardPartitionedPageComponent} from "core-app/modules/boards/board/board-partitioned-page/board-partitioned-page.component"; -import {BoardListContainerComponent} from "core-app/modules/boards/board/board-partitioned-page/board-list-container.component"; -import {makeSplitViewRoutes} from "core-app/modules/work_packages/routing/split-view-routes.template"; -import {WorkPackageSplitViewComponent} from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; +import { Ng2StateDeclaration, UIRouter } from "@uirouter/angular"; +import { BoardsRootComponent } from "core-app/modules/boards/boards-root/boards-root.component"; +import { BoardsIndexPageComponent } from "core-app/modules/boards/index-page/boards-index-page.component"; +import { BoardPartitionedPageComponent } from "core-app/modules/boards/board/board-partitioned-page/board-partitioned-page.component"; +import { BoardListContainerComponent } from "core-app/modules/boards/board/board-partitioned-page/board-list-container.component"; +import { makeSplitViewRoutes } from "core-app/modules/work_packages/routing/split-view-routes.template"; +import { WorkPackageSplitViewComponent } from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; export const menuItemClass = 'board-view-menu-item'; diff --git a/frontend/src/app/modules/boards/tile-view/tile-view.component.spec.ts b/frontend/src/app/modules/boards/tile-view/tile-view.component.spec.ts index 36a8fab8d6f..2c7af06f8f1 100644 --- a/frontend/src/app/modules/boards/tile-view/tile-view.component.spec.ts +++ b/frontend/src/app/modules/boards/tile-view/tile-view.component.spec.ts @@ -1,8 +1,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import {DebugElement} from '@angular/core'; -import {By} from '@angular/platform-browser'; -import {TileViewComponent} from './tile-view.component'; -import {ImageHelpers} from "core-app/helpers/images/path-helper"; +import { DebugElement } from '@angular/core'; +import { By } from '@angular/platform-browser'; +import { TileViewComponent } from './tile-view.component'; +import { ImageHelpers } from "core-app/helpers/images/path-helper"; import imagePath = ImageHelpers.imagePath; describe('shows tiles', () => { @@ -10,7 +10,7 @@ describe('shows tiles', () => { let fixture:ComponentFixture; let element:DebugElement; - let tilesStub = [{ + const tilesStub = [{ attribute: 'basic', text: 'Basic board', icon: 'icon-boards', @@ -35,20 +35,20 @@ describe('shows tiles', () => { it('should render the componenet successfully', () => { fixture.detectChanges(); - let tile = document.querySelector('.tile-blocks--container'); + const tile = document.querySelector('.tile-blocks--container'); expect(document.contains(tile)).toBeTruthy(); }); it('should show each tile', () => { fixture.detectChanges(); - let tile:HTMLElement = element.query(By.css('.tile-block')).nativeElement; + const tile:HTMLElement = element.query(By.css('.tile-block')).nativeElement; expect(tile.textContent).toContain('Basic'); }); it('should show the image', () => { fixture.detectChanges(); - let tile = document.querySelector('.tile-block-image'); + const tile = document.querySelector('.tile-block-image'); expect(document.contains(tile)).toBeTruthy(); }); diff --git a/frontend/src/app/modules/boards/tile-view/tile-view.component.ts b/frontend/src/app/modules/boards/tile-view/tile-view.component.ts index a8f98d4784e..72df33a46ec 100644 --- a/frontend/src/app/modules/boards/tile-view/tile-view.component.ts +++ b/frontend/src/app/modules/boards/tile-view/tile-view.component.ts @@ -1,4 +1,4 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output} from "@angular/core"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from "@angular/core"; export interface ITileViewEntry { text:string; @@ -14,9 +14,9 @@ export interface ITileViewEntry { templateUrl: './tile-view.component.html', changeDetection: ChangeDetectionStrategy.OnPush }) - export class TileViewComponent { +export class TileViewComponent { @Input() public tiles:ITileViewEntry[]; - @Input() public disable:boolean = false; + @Input() public disable = false; @Output() public create = new EventEmitter(); diff --git a/frontend/src/app/modules/calendar/openproject-calendar.module.ts b/frontend/src/app/modules/calendar/openproject-calendar.module.ts index 737b7338ef6..d3f07379279 100644 --- a/frontend/src/app/modules/calendar/openproject-calendar.module.ts +++ b/frontend/src/app/modules/calendar/openproject-calendar.module.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; -import {NgModule} from '@angular/core'; -import {FullCalendarModule} from '@fullcalendar/angular'; -import {WorkPackagesCalendarEntryComponent} from "core-app/modules/calendar/wp-calendar-entry/wp-calendar-entry.component"; -import {WorkPackagesCalendarController} from "core-app/modules/calendar/wp-calendar/wp-calendar.component"; -import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module"; -import {Ng2StateDeclaration, UIRouterModule} from "@uirouter/angular"; -import {TimeEntryCalendarComponent} from "core-app/modules/calendar/te-calendar/te-calendar.component"; -import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module"; -import {OpenprojectTimeEntriesModule} from "core-app/modules/time_entries/openproject-time-entries.module"; +import { OpenprojectCommonModule } from 'core-app/modules/common/openproject-common.module'; +import { NgModule } from '@angular/core'; +import { FullCalendarModule } from '@fullcalendar/angular'; +import { WorkPackagesCalendarEntryComponent } from "core-app/modules/calendar/wp-calendar-entry/wp-calendar-entry.component"; +import { WorkPackagesCalendarController } from "core-app/modules/calendar/wp-calendar/wp-calendar.component"; +import { OpenprojectWorkPackagesModule } from "core-app/modules/work_packages/openproject-work-packages.module"; +import { Ng2StateDeclaration, UIRouterModule } from "@uirouter/angular"; +import { TimeEntryCalendarComponent } from "core-app/modules/calendar/te-calendar/te-calendar.component"; +import { OpenprojectFieldsModule } from "core-app/modules/fields/openproject-fields.module"; +import { OpenprojectTimeEntriesModule } from "core-app/modules/time_entries/openproject-time-entries.module"; const menuItemClass = 'calendar-menu-item'; diff --git a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts index 50d4011cd09..e5b3252ac17 100644 --- a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts +++ b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts @@ -11,29 +11,29 @@ import { ViewChild, ViewEncapsulation } from "@angular/core"; -import {FullCalendarComponent} from '@fullcalendar/angular'; -import {States} from "core-components/states.service"; +import { FullCalendarComponent } from '@fullcalendar/angular'; +import { States } from "core-components/states.service"; import * as moment from "moment"; -import {Moment} from "moment"; -import {StateService} from "@uirouter/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {DomSanitizer} from "@angular/platform-browser"; +import { Moment } from "moment"; +import { StateService } from "@uirouter/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { DomSanitizer } from "@angular/platform-browser"; import timeGrid from '@fullcalendar/timegrid'; -import {CalendarOptions, Duration, EventApi, EventInput} from '@fullcalendar/core'; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; -import {FilterOperator} from "core-components/api/api-v3/api-v3-filter-builder"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; +import { CalendarOptions, Duration, EventApi, EventInput } from '@fullcalendar/core'; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; +import { FilterOperator } from "core-components/api/api-v3/api-v3-filter-builder"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; import interactionPlugin from '@fullcalendar/interaction'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {TimeEntryEditService} from "core-app/modules/time_entries/edit/edit.service"; -import {TimeEntryCreateService} from "core-app/modules/time_entries/create/create.service"; -import {ColorsService} from "core-app/modules/common/colors/colors.service"; -import {BrowserDetector} from "core-app/modules/common/browser/browser-detector.service"; -import {HalResourceNotificationService} from 'core-app/modules/hal/services/hal-resource-notification.service'; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { TimeEntryEditService } from "core-app/modules/time_entries/edit/edit.service"; +import { TimeEntryCreateService } from "core-app/modules/time_entries/create/create.service"; +import { ColorsService } from "core-app/modules/common/colors/colors.service"; +import { BrowserDetector } from "core-app/modules/common/browser/browser-detector.service"; +import { HalResourceNotificationService } from 'core-app/modules/hal/services/hal-resource-notification.service'; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; interface CalendarViewEvent { el:HTMLElement; @@ -72,7 +72,7 @@ const ADD_ENTRY_PROHIBITED_CLASS_NAME = '-prohibited'; export class TimeEntryCalendarComponent implements AfterViewInit { @ViewChild(FullCalendarComponent) ucCalendar:FullCalendarComponent; @Input() projectIdentifier:string; - @Input() static:boolean = false; + @Input() static = false; @Input() set displayedDays(days:DisplayedDays) { this.setHiddenDays(days); @@ -88,7 +88,7 @@ export class TimeEntryCalendarComponent implements AfterViewInit { public calendarEvents:Function; protected memoizedTimeEntries:{ start:Date, end:Date, entries:Promise> }; - public memoizedCreateAllowed:boolean = false; + public memoizedCreateAllowed = false; public hiddenDays:number[] = []; public text = { @@ -156,8 +156,8 @@ export class TimeEntryCalendarComponent implements AfterViewInit { } public calendarEventsFunction(fetchInfo:{ start:Date, end:Date }, - successCallback:(events:EventInput[]) => void, - failureCallback:(error:unknown) => void):void|PromiseLike { + successCallback:(events:EventInput[]) => void, + failureCallback:(error:unknown) => void):void|PromiseLike { this.fetchTimeEntries(fetchInfo.start, fetchInfo.end) .then((collection) => { @@ -171,7 +171,7 @@ export class TimeEntryCalendarComponent implements AfterViewInit { if (!this.memoizedTimeEntries || this.memoizedTimeEntries.start.getTime() !== start.getTime() || this.memoizedTimeEntries.end.getTime() !== end.getTime()) { - let promise = this + const promise = this .apiV3Service .time_entries .list({ filters: this.dmFilters(start, end), pageSize: 500 }) @@ -196,11 +196,11 @@ export class TimeEntryCalendarComponent implements AfterViewInit { } private setRatio(entries:TimeEntryResource[]) { - let dateSums = this.calculateDateSums(entries); + const dateSums = this.calculateDateSums(entries); - let maxHours = Math.max(...Object.values(dateSums), 0); + const maxHours = Math.max(...Object.values(dateSums), 0); - let oldRatio = this.scaleRatio; + const oldRatio = this.scaleRatio; if (maxHours > this.maxHour - this.minHour) { this.scaleRatio = this.smallerSuitableRatio((this.maxHour - this.minHour) / maxHours); @@ -214,19 +214,19 @@ export class TimeEntryCalendarComponent implements AfterViewInit { // But it will trigger repainting the calendar. // Weirdly, this.ucCalendar.getApi().rerender() does not. this.ucCalendar.getApi().setOption('slotLabelFormat', (info:any) => { - let val = (this.maxHour - info.date.hour) / this.scaleRatio; + const val = (this.maxHour - info.date.hour) / this.scaleRatio; return val.toString(); }); } } private buildTimeEntryEntries(entries:TimeEntryResource[]) { - let hoursDistribution:{ [key:string]:Moment } = {}; + const hoursDistribution:{ [key:string]:Moment } = {}; return entries.map((entry) => { let start:Moment; let end:Moment; - let hours = this.timezone.toHours(entry.hours) * this.scaleRatio; + const hours = this.timezone.toHours(entry.hours) * this.scaleRatio; if (hoursDistribution[entry.spentOn]) { start = hoursDistribution[entry.spentOn].clone().subtract(hours, 'h'); @@ -245,12 +245,12 @@ export class TimeEntryCalendarComponent implements AfterViewInit { } private buildAuxEntries(entries:TimeEntryResource[], fetchInfo:{ start:Date, end:Date }) { - let dateSums = this.calculateDateSums(entries); + const dateSums = this.calculateDateSums(entries); - let calendarEntries:EventInput[] = []; + const calendarEntries:EventInput[] = []; for (let m = moment(fetchInfo.start); m.diff(fetchInfo.end, 'days') <= 0; m.add(1, 'days')) { - let duration = dateSums[m.format('YYYY-MM-DD')] || 0; + const duration = dateSums[m.format('YYYY-MM-DD')] || 0; calendarEntries.push(this.sumEntry(m, duration)); @@ -263,10 +263,10 @@ export class TimeEntryCalendarComponent implements AfterViewInit { } private calculateDateSums(entries:TimeEntryResource[]) { - let dateSums:{ [key:string]:number } = {}; + const dateSums:{ [key:string]:number } = {}; entries.forEach((entry) => { - let hours = this.timezone.toHours(entry.hours); + const hours = this.timezone.toHours(entry.hours); if (dateSums[entry.spentOn]) { dateSums[entry.spentOn] += hours; @@ -281,9 +281,9 @@ export class TimeEntryCalendarComponent implements AfterViewInit { protected timeEntry(entry:TimeEntryResource, hours:number, start:Moment, end:Moment) { const color = this.colors.toHsl(this.entryName(entry)); - let classNames = [TIME_ENTRY_CLASS_NAME]; + const classNames = [TIME_ENTRY_CLASS_NAME]; - let span = end.diff(start, 'm'); + const span = end.diff(start, 'm'); if (span < 40) { classNames.push('-no-fadeout'); @@ -306,14 +306,14 @@ export class TimeEntryCalendarComponent implements AfterViewInit { start: date.clone().add(this.maxHour - Math.min(duration * this.scaleRatio, this.maxHour - 0.5) - 0.5, 'h').format(), end: date.clone().add(this.maxHour - Math.min(((duration + 0.05) * this.scaleRatio), this.maxHour - 0.5), 'h').format(), classNames: DAY_SUM_CLASS_NAME, - rendering: 'background' as 'background', + rendering: 'background' as const, startEditable: false, sum: this.i18n.t('js.units.hour', { count: this.formatNumber(duration) }) }; } protected addEntry(date:Moment, duration:number) { - let classNames = [ADD_ENTRY_CLASS_NAME]; + const classNames = [ADD_ENTRY_CLASS_NAME]; if (duration >= 24) { classNames.push(ADD_ENTRY_PROHIBITED_CLASS_NAME); @@ -328,8 +328,8 @@ export class TimeEntryCalendarComponent implements AfterViewInit { } protected dmFilters(start:Date, end:Date):Array<[string, FilterOperator, string[]]> { - let startDate = moment(start).format('YYYY-MM-DD'); - let endDate = moment(end).subtract(1, 'd').format('YYYY-MM-DD'); + const startDate = moment(start).format('YYYY-MM-DD'); + const endDate = moment(end).subtract(1, 'd').format('YYYY-MM-DD'); return [['spentOn', '<>d', [startDate, endDate]] as [string, FilterOperator, string[]], ['user_id', '=', ['me']] as [string, FilterOperator, [string]]]; } @@ -355,7 +355,7 @@ export class TimeEntryCalendarComponent implements AfterViewInit { } private moveEvent(event:CalendarMoveEvent) { - let entry = event.event.extendedProps.entry; + const entry = event.event.extendedProps.entry; // Use end instead of start as when dragging, the event might be too long and would thus be start // on the day before by fullcalendar. @@ -402,24 +402,24 @@ export class TimeEntryCalendarComponent implements AfterViewInit { private updateEventSet(event:TimeEntryResource, action:'update'|'destroy'|'create') { this.memoizedTimeEntries.entries.then(collection => { - let foundIndex = collection.elements.findIndex(x => x.id === event.id); + const foundIndex = collection.elements.findIndex(x => x.id === event.id); switch (action) { - case 'update': - collection.elements[foundIndex] = event; - break; - case 'destroy': - collection.elements.splice(foundIndex, 1); - break; - case 'create': - this - .apiV3Service - .time_entries - .cache - .updateFor(event); + case 'update': + collection.elements[foundIndex] = event; + break; + case 'destroy': + collection.elements.splice(foundIndex, 1); + break; + case 'create': + this + .apiV3Service + .time_entries + .cache + .updateFor(event); - collection.elements.push(event); - break; + collection.elements.push(event); + break; } this.ucCalendar.getApi().refetchEvents(); @@ -444,7 +444,7 @@ export class TimeEntryCalendarComponent implements AfterViewInit { return; } - let addIcon = document.createElement('div'); + const addIcon = document.createElement('div'); addIcon.classList.add(ADD_ICON_CLASS_NAME); addIcon.innerText = '+'; event.el.append(addIcon); @@ -476,13 +476,13 @@ export class TimeEntryCalendarComponent implements AfterViewInit { } private prependDuration(event:CalendarViewEvent) { - let timeEntry = event.event.extendedProps.entry; + const timeEntry = event.event.extendedProps.entry; if (this.timezone.toHours(timeEntry.hours) < 0.5) { return; } - let formattedDuration = this.timezone.formattedDuration(timeEntry.hours); + const formattedDuration = this.timezone.formattedDuration(timeEntry.hours); jQuery(event.el) .find('.fc-event-title') @@ -499,17 +499,17 @@ export class TimeEntryCalendarComponent implements AfterViewInit { * need to deactivate the fc-fadeout. */ private appendFadeout(event:CalendarViewEvent) { - let timeEntry = event.event.extendedProps.entry; + const timeEntry = event.event.extendedProps.entry; if (this.timezone.toHours(timeEntry.hours) < 0.5) { return; } - let $element = jQuery(event.el); - let fadeout = jQuery(`
    `); + const $element = jQuery(event.el); + const fadeout = jQuery(`
    `); - let hslaStart = this.colors.toHsla(this.entryName(timeEntry), 0); - let hslaEnd = this.colors.toHsla(this.entryName(timeEntry), 100); + const hslaStart = this.colors.toHsla(this.entryName(timeEntry), 0); + const hslaEnd = this.colors.toHsla(this.entryName(timeEntry), 100); fadeout.css('background', `-webkit-linear-gradient(${hslaStart} 0%, ${hslaEnd} 100%`); @@ -578,7 +578,7 @@ export class TimeEntryCalendarComponent implements AfterViewInit { private smallerSuitableRatio(value:number):number { for (let divisor = this.labelIntervalHours + 1; divisor < 100; divisor++) { - let candidate = this.labelIntervalHours / divisor; + const candidate = this.labelIntervalHours / divisor; if (value >= candidate) { return candidate; @@ -589,7 +589,7 @@ export class TimeEntryCalendarComponent implements AfterViewInit { } protected setHiddenDays(displayedDays:DisplayedDays) { - let hiddenDays:number[] = Array + const hiddenDays:number[] = Array .from(displayedDays, (value, index) => { if (!value) { return (index + 1) % 7; diff --git a/frontend/src/app/modules/calendar/wp-calendar-entry/wp-calendar-entry.component.ts b/frontend/src/app/modules/calendar/wp-calendar-entry/wp-calendar-entry.component.ts index 583e236e98a..a3a6887d7e5 100644 --- a/frontend/src/app/modules/calendar/wp-calendar-entry/wp-calendar-entry.component.ts +++ b/frontend/src/app/modules/calendar/wp-calendar-entry/wp-calendar-entry.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ViewChild} from '@angular/core'; -import {WorkPackagesViewBase} from "core-app/modules/work_packages/routing/wp-view-base/work-packages-view.base"; -import {WorkPackagesCalendarController} from "core-app/modules/calendar/wp-calendar/wp-calendar.component"; +import { Component, ViewChild } from '@angular/core'; +import { WorkPackagesViewBase } from "core-app/modules/work_packages/routing/wp-view-base/work-packages-view.base"; +import { WorkPackagesCalendarController } from "core-app/modules/calendar/wp-calendar/wp-calendar.component"; @Component({ templateUrl: './wp-calendar-entry.component.html' diff --git a/frontend/src/app/modules/calendar/wp-calendar/wp-calendar.component.ts b/frontend/src/app/modules/calendar/wp-calendar/wp-calendar.component.ts index 6093ea76fab..85b41a0a4c6 100644 --- a/frontend/src/app/modules/calendar/wp-calendar/wp-calendar.component.ts +++ b/frontend/src/app/modules/calendar/wp-calendar/wp-calendar.component.ts @@ -8,28 +8,28 @@ import { SecurityContext, ViewChild } from "@angular/core"; -import {FullCalendarComponent} from '@fullcalendar/angular'; -import {States} from "core-components/states.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { FullCalendarComponent } from '@fullcalendar/angular'; +import { States } from "core-components/states.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; import * as moment from "moment"; -import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; -import {StateService} from "@uirouter/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {DomSanitizer} from "@angular/platform-browser"; -import {WorkPackagesListChecksumService} from "core-components/wp-list/wp-list-checksum.service"; -import {OpTitleService} from "core-components/html/op-title.service"; +import { WorkPackagesListService } from "core-components/wp-list/wp-list.service"; +import { StateService } from "@uirouter/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { DomSanitizer } from "@angular/platform-browser"; +import { WorkPackagesListChecksumService } from "core-components/wp-list/wp-list-checksum.service"; +import { OpTitleService } from "core-components/html/op-title.service"; import dayGridPlugin from '@fullcalendar/daygrid'; -import {CalendarOptions, EventApi, EventInput} from '@fullcalendar/core'; -import {Subject} from "rxjs"; -import {take, debounceTime} from 'rxjs/operators'; -import {ToolbarInput} from '@fullcalendar/common'; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { CalendarOptions, EventApi, EventInput } from '@fullcalendar/core'; +import { Subject } from "rxjs"; +import { take, debounceTime } from 'rxjs/operators'; +import { ToolbarInput } from '@fullcalendar/common'; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; interface CalendarViewEvent { el:HTMLElement; @@ -79,7 +79,7 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen } @Input() projectIdentifier:string; - @Input() static:boolean = false; + @Input() static = false; static MAX_DISPLAYED = 100; public tooManyResultsText:string|null; @@ -119,17 +119,17 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen } public calendarEventsFunction(fetchInfo:{ start:Date, end:Date, timeZone:string }, - successCallback:(events:EventInput[]) => void, - failureCallback:(error:any) => void):void|PromiseLike { + successCallback:(events:EventInput[]) => void, + failureCallback:(error:any) => void):void|PromiseLike { if (this.alreadyLoaded) { this.alreadyLoaded = false; - let events = this.updateResults(this.querySpace.results.value!); + const events = this.updateResults(this.querySpace.results.value!); successCallback(events); } else { this.querySpace.results.values$().pipe( take(1) ).subscribe((collection:WorkPackageCollectionResource) => { - let events = this.updateResults((collection)); + const events = this.updateResults((collection)); successCallback(events); }); } @@ -162,15 +162,15 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen } public updateTimeframe(fetchInfo:{ start:Date, end:Date, timeZone:string }) { - let filtersEmpty = this.wpTableFilters.isEmpty; + const filtersEmpty = this.wpTableFilters.isEmpty; if (filtersEmpty && this.querySpace.query.value) { // nothing to do return; } - let startDate = moment(fetchInfo.start).format('YYYY-MM-DD'); - let endDate = moment(fetchInfo.end).format('YYYY-MM-DD'); + const startDate = moment(fetchInfo.start).format('YYYY-MM-DD'); + const endDate = moment(fetchInfo.end).format('YYYY-MM-DD'); if (filtersEmpty) { let queryProps = this.defaultQueryProps(startDate, endDate); @@ -181,7 +181,7 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen this.wpListService.fromQueryParams({ query_props: queryProps }, this.projectIdentifier).toPromise(); } else { - let params = this.$state.params; + const params = this.$state.params; this.wpTableFilters.modify('datesInterval', (datesIntervalFilter) => { datesIntervalFilter.values[0] = startDate; @@ -202,7 +202,7 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen } public toWPFullView(event:CalendarViewEvent) { - let workPackage = event.event.extendedProps.workPackage; + const workPackage = event.event.extendedProps.workPackage; if (event.el) { // do not display the tooltip on the wp show page @@ -232,8 +232,8 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen heightElement = heightElement.parent(); } - let topOfCalendar = jQuery(this.element.nativeElement).position().top; - let topOfHeightElement = heightElement.position().top; + const topOfCalendar = jQuery(this.element.nativeElement).position().top; + const topOfHeightElement = heightElement.position().top; return heightElement.height()! - (topOfCalendar - topOfHeightElement); } else { @@ -260,15 +260,15 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen return; } - let datesIntervalFilter = _.find(query.filters || [], { 'id': 'datesInterval' }) as any; + const datesIntervalFilter = _.find(query.filters || [], { 'id': 'datesInterval' }) as any; let calendarDate:any = null; let calendarUnit = 'dayGridMonth'; if (datesIntervalFilter) { - let lower = moment(datesIntervalFilter.values[0] as string); - let upper = moment(datesIntervalFilter.values[1] as string); - let diff = upper.diff(lower, 'days'); + const lower = moment(datesIntervalFilter.values[0] as string); + const upper = moment(datesIntervalFilter.values[1] as string); + const diff = upper.diff(lower, 'days'); calendarDate = lower.add(diff / 2, 'days'); @@ -302,11 +302,11 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen } private mapToCalendarEvents(workPackages:WorkPackageResource[]) { - let events = workPackages.map((workPackage:WorkPackageResource) => { - let startDate = this.eventDate(workPackage, 'start'); - let endDate = this.eventDate(workPackage, 'due'); + const events = workPackages.map((workPackage:WorkPackageResource) => { + const startDate = this.eventDate(workPackage, 'start'); + const endDate = this.eventDate(workPackage, 'due'); - let exclusiveEnd = moment(endDate).add(1, 'days').format('YYYY-MM-DD'); + const exclusiveEnd = moment(endDate).add(1, 'days').format('YYYY-MM-DD'); return { title: workPackage.subject, @@ -338,7 +338,7 @@ export class WorkPackagesCalendarController extends UntilDestroyedMixin implemen } private defaultQueryProps(startDate:string, endDate:string) { - let props = { + const props = { "c": ["id"], "t": "id:asc", diff --git a/frontend/src/app/modules/common/active-window/active-window.service.ts b/frontend/src/app/modules/common/active-window/active-window.service.ts index 3d3735c2607..4a313019124 100644 --- a/frontend/src/app/modules/common/active-window/active-window.service.ts +++ b/frontend/src/app/modules/common/active-window/active-window.service.ts @@ -1,7 +1,7 @@ -import {Inject, Injectable} from "@angular/core"; -import {DOCUMENT} from "@angular/common"; -import {BehaviorSubject, Observable, Subject} from "rxjs"; -import {debugLog} from "core-app/helpers/debug_output"; +import { Inject, Injectable } from "@angular/core"; +import { DOCUMENT } from "@angular/common"; +import { BehaviorSubject, Observable, Subject } from "rxjs"; +import { debugLog } from "core-app/helpers/debug_output"; @Injectable({ providedIn: 'root' }) export class ActiveWindowService { @@ -10,7 +10,7 @@ export class ActiveWindowService { constructor(@Inject(DOCUMENT) document:Document) { document.addEventListener('visibilitychange', () => { - if (!!document.visibilityState) { + if (document.visibilityState) { debugLog("Browser window has visibility state changed to " + document.visibilityState); this.activeState$.next(document.visibilityState === 'visible'); } diff --git a/frontend/src/app/modules/common/authoring/authoring.component.ts b/frontend/src/app/modules/common/authoring/authoring.component.ts index ac110abfe9b..22bc4165c26 100644 --- a/frontend/src/app/modules/common/authoring/authoring.component.ts +++ b/frontend/src/app/modules/common/authoring/authoring.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; +import { Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; @Component({ templateUrl: './authoring.html', diff --git a/frontend/src/app/modules/common/autofocus/autofocus.directive.ts b/frontend/src/app/modules/common/autofocus/autofocus.directive.ts index 9fe83bf52a8..9ecd969e2e7 100644 --- a/frontend/src/app/modules/common/autofocus/autofocus.directive.ts +++ b/frontend/src/app/modules/common/autofocus/autofocus.directive.ts @@ -1,11 +1,11 @@ import { AfterContentInit, Directive, ElementRef, Input } from '@angular/core'; -import {FocusHelperService} from "core-app/modules/common/focus/focus-helper"; +import { FocusHelperService } from "core-app/modules/common/focus/focus-helper"; @Directive({ selector: '[autoFocus]' }) export class AutofocusDirective implements AfterContentInit { - @Input('autoFocus-condition') public condition:boolean = true; + @Input('autoFocus-condition') public condition = true; public constructor(private el:ElementRef, private focusHelper:FocusHelperService) { diff --git a/frontend/src/app/modules/common/back-routing/back-button.component.ts b/frontend/src/app/modules/common/back-routing/back-button.component.ts index a550e2edbb5..c63566447c8 100644 --- a/frontend/src/app/modules/common/back-routing/back-button.component.ts +++ b/frontend/src/app/modules/common/back-routing/back-button.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component, Input} from '@angular/core'; -import {BackRoutingService} from "core-app/modules/common/back-routing/back-routing.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; +import { BackRoutingService } from "core-app/modules/common/back-routing/back-routing.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ template: ` diff --git a/frontend/src/app/modules/common/back-routing/back-routing.service.ts b/frontend/src/app/modules/common/back-routing/back-routing.service.ts index 886c8cddbfa..9f86ef7ad1a 100644 --- a/frontend/src/app/modules/common/back-routing/back-routing.service.ts +++ b/frontend/src/app/modules/common/back-routing/back-routing.service.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {StateService, Transition} from "@uirouter/core"; -import {KeepTabService} from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Injectable, Injector } from '@angular/core'; +import { StateService, Transition } from "@uirouter/core"; +import { KeepTabService } from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; interface BackRouteOptions { name:string; @@ -62,9 +62,10 @@ export class BackRoutingService { private goBackNotToDetailsState():void { if (this.backRoute.parent) { - this.goToOtherState(this.backRoute.name, this.backRoute.params).then(() => { this.$state.reload(); }); - } - else { + this.goToOtherState(this.backRoute.name, this.backRoute.params).then(() => { + this.$state.reload(); + }); + } else { this.goToOtherState(this.backRoute.name, this.backRoute.params); } } @@ -77,13 +78,14 @@ export class BackRoutingService { } } - public goBack(preferListOverSplit:boolean = false) { + public goBack(preferListOverSplit = false) { // Default: back to list // When coming from a deep link or a create form const baseRoute = this.backRoute?.baseRoute || this.$state.current.data.baseRoute || 'work-packages.partitioned.list'; // if we are in the first state - if (!this.backRoute && baseRoute.includes('show')) { this.$state.reload(); } - else { + if (!this.backRoute && baseRoute.includes('show')) { + this.$state.reload(); + } else { if (!this.backRoute || this.backRoute.name.includes('new')) { this.$state.go(baseRoute, this.$state.params); } else { @@ -108,9 +110,9 @@ export class BackRoutingService { fromState.data.parent !== toState.data.parent) { const paramsFromCopy = { ...transition.params('from') }; this.backRoute = { name: fromState.name, - params: paramsFromCopy, - parent: fromState.data.parent, - baseRoute: fromState.data.baseRoute }; + params: paramsFromCopy, + parent: fromState.data.parent, + baseRoute: fromState.data.baseRoute }; } } diff --git a/frontend/src/app/modules/common/browser/browser-detector.service.ts b/frontend/src/app/modules/common/browser/browser-detector.service.ts index 2a22efe6480..06956dac017 100644 --- a/frontend/src/app/modules/common/browser/browser-detector.service.ts +++ b/frontend/src/app/modules/common/browser/browser-detector.service.ts @@ -1,5 +1,5 @@ -import {Inject, Injectable} from "@angular/core"; -import {DOCUMENT} from "@angular/common"; +import { Inject, Injectable } from "@angular/core"; +import { DOCUMENT } from "@angular/common"; @Injectable({ providedIn: 'root' }) export class BrowserDetector { diff --git a/frontend/src/app/modules/common/browser/device.service.ts b/frontend/src/app/modules/common/browser/device.service.ts index 5f012ed7a6e..0d238556196 100644 --- a/frontend/src/app/modules/common/browser/device.service.ts +++ b/frontend/src/app/modules/common/browser/device.service.ts @@ -1,9 +1,9 @@ -import {Injectable} from '@angular/core'; +import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) export class DeviceService { - public mobileWidthTreshold:number = 680; + public mobileWidthTreshold = 680; public get isMobile():boolean { return (window.innerWidth < this.mobileWidthTreshold); diff --git a/frontend/src/app/modules/common/ckeditor/ckeditor-preview.service.ts b/frontend/src/app/modules/common/ckeditor/ckeditor-preview.service.ts index 80ecf680f08..a66a888cc27 100644 --- a/frontend/src/app/modules/common/ckeditor/ckeditor-preview.service.ts +++ b/frontend/src/app/modules/common/ckeditor/ckeditor-preview.service.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ApplicationRef, ComponentFactoryResolver, ComponentRef, Injectable, Injector} from "@angular/core"; -import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; +import { ApplicationRef, ComponentFactoryResolver, ComponentRef, Injectable, Injector } from "@angular/core"; +import { DynamicBootstrapper } from "core-app/globals/dynamic-bootstrapper"; @Injectable() export class CKEditorPreviewService { @@ -47,22 +47,22 @@ export class CKEditorPreviewService { */ public render(hostElement:HTMLElement, preview:string):() => void { hostElement.innerHTML = preview; - let refs:ComponentRef[] = []; + const refs:ComponentRef[] = []; DynamicBootstrapper .getEmbeddable() .forEach((entry) => { - const matchedElements = hostElement.querySelectorAll(entry.selector); + const matchedElements = hostElement.querySelectorAll(entry.selector); - for (let i = 0, l = matchedElements.length; i < l; i++) { - const factory = this.componentFactoryResolver.resolveComponentFactory(entry.cls); - const componentRef = factory.create(this.injector, [], matchedElements[i]); + for (let i = 0, l = matchedElements.length; i < l; i++) { + const factory = this.componentFactoryResolver.resolveComponentFactory(entry.cls); + const componentRef = factory.create(this.injector, [], matchedElements[i]); - refs.push(componentRef); - this.appRef.attachView(componentRef.hostView); - componentRef.changeDetectorRef.detectChanges(); - } - }); + refs.push(componentRef); + this.appRef.attachView(componentRef.hostView); + componentRef.changeDetectorRef.detectChanges(); + } + }); return () => { refs.forEach(ref => { diff --git a/frontend/src/app/modules/common/ckeditor/ckeditor-setup.service.ts b/frontend/src/app/modules/common/ckeditor/ckeditor-setup.service.ts index 6112721b55b..6b5efff1315 100644 --- a/frontend/src/app/modules/common/ckeditor/ckeditor-setup.service.ts +++ b/frontend/src/app/modules/common/ckeditor/ckeditor-setup.service.ts @@ -1,6 +1,6 @@ -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {Injectable} from "@angular/core"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { Injectable } from "@angular/core"; export interface ICKEditorInstance { getData(obtions:{ trim:boolean }):string; diff --git a/frontend/src/app/modules/common/ckeditor/op-ckeditor.component.ts b/frontend/src/app/modules/common/ckeditor/op-ckeditor.component.ts index 24696b67b1f..358a4d8f5c9 100644 --- a/frontend/src/app/modules/common/ckeditor/op-ckeditor.component.ts +++ b/frontend/src/app/modules/common/ckeditor/op-ckeditor.component.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core'; +import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; import { CKEditorSetupService, ICKEditorContext, ICKEditorInstance } from "core-app/modules/common/ckeditor/ckeditor-setup.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; declare module 'codemirror'; @@ -124,7 +124,7 @@ export class OpCkeditorComponent implements OnInit { resolve(this.getRawData()); } catch (e) { console.error(`Failed to save CKEditor content: ${e}.`); - let error = this.I18n.t( + const error = this.I18n.t( 'js.editor.error_saving_failed', { error: e || this.I18n.t('js.error.internal') } ); diff --git a/frontend/src/app/modules/common/collapsible-section/collapsible-section.component.ts b/frontend/src/app/modules/common/collapsible-section/collapsible-section.component.ts index 37676bf3054..813c8154750 100644 --- a/frontend/src/app/modules/common/collapsible-section/collapsible-section.component.ts +++ b/frontend/src/app/modules/common/collapsible-section/collapsible-section.component.ts @@ -27,7 +27,7 @@ //++ -import {Component, ElementRef, OnInit, ViewChild} from "@angular/core"; +import { Component, ElementRef, OnInit, ViewChild } from "@angular/core"; export const collapsibleSectionAugmentSelector = 'collapsible-section-augment'; @@ -36,7 +36,7 @@ export const collapsibleSectionAugmentSelector = 'collapsible-section-augment'; templateUrl: './collapsible-section.html' }) export class CollapsibleSectionComponent implements OnInit { - public expanded:boolean = false; + public expanded = false; public sectionTitle:string; @ViewChild('sectionBody', { static: true }) public sectionBody:ElementRef; diff --git a/frontend/src/app/modules/common/colors/colors-autocompleter.component.ts b/frontend/src/app/modules/common/colors/colors-autocompleter.component.ts index c3cc8e30542..bef842cb306 100644 --- a/frontend/src/app/modules/common/colors/colors-autocompleter.component.ts +++ b/frontend/src/app/modules/common/colors/colors-autocompleter.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit} from '@angular/core'; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Component, ElementRef, OnInit } from '@angular/core'; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; export const colorsAutocompleterSelector = 'colors-autocompleter'; @@ -55,7 +55,7 @@ export const colorsAutocompleterSelector = 'colors-autocompleter'; export class ColorsAutocompleter implements OnInit { public options:any[]; public selectedOption:any; - private highlightTextInline:boolean = false; + private highlightTextInline = false; private updateInputField:HTMLInputElement|undefined; private selectedColorId:string; @@ -78,7 +78,7 @@ export class ColorsAutocompleter implements OnInit { private setColorOptions() { this.options = JSON.parse(this.elementRef.nativeElement.dataset.colors); - this.options.unshift({name: this.I18n.t('js.label_no_color'), value: ''}); + this.options.unshift({ name: this.I18n.t('js.label_no_color'), value: '' }); this.selectedOption = this.options.find((item) => item.selected === true); @@ -92,7 +92,9 @@ export class ColorsAutocompleter implements OnInit { } private highlightColor(item:any) { - if (item.value === '') { return; } + if (item.value === '') { + return; + } let highlightingClass; if (this.highlightTextInline) { diff --git a/frontend/src/app/modules/common/config/configuration.service.ts b/frontend/src/app/modules/common/config/configuration.service.ts index ec28d91cae7..6bc80b9af9a 100644 --- a/frontend/src/app/modules/common/config/configuration.service.ts +++ b/frontend/src/app/modules/common/config/configuration.service.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {ConfigurationResource} from "core-app/modules/hal/resources/configuration-resource"; +import { Injectable } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { ConfigurationResource } from "core-app/modules/hal/resources/configuration-resource"; import * as moment from "moment"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable({ providedIn: 'root' }) export class ConfigurationService { @@ -38,7 +38,7 @@ export class ConfigurationService { // TODO: this currently saves the request between page reloads, // but could easily be stored in localStorage private configuration:ConfigurationResource; - public initialized:Promise; + public initialized:Promise; public constructor(readonly I18n:I18nService, readonly apiV3Service:APIV3Service) { diff --git a/frontend/src/app/modules/common/copy-to-clipboard/copy-to-clipboard.directive.ts b/frontend/src/app/modules/common/copy-to-clipboard/copy-to-clipboard.directive.ts index 277c5659208..eeb49ec9ed2 100644 --- a/frontend/src/app/modules/common/copy-to-clipboard/copy-to-clipboard.directive.ts +++ b/frontend/src/app/modules/common/copy-to-clipboard/copy-to-clipboard.directive.ts @@ -27,10 +27,10 @@ //++ -import {Component, ElementRef, OnInit} from "@angular/core"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Component, ElementRef, OnInit } from "@angular/core"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; export const copyToClipboardSelector = 'copy-to-clipboard'; @@ -62,7 +62,7 @@ export class CopyToClipboardDirective implements OnInit { } addNotification(type:'addSuccess'|'addError', message:string) { - let notification = this.NotificationsService[type](message); + const notification = this.NotificationsService[type](message); // Remove the notification some time later setTimeout(() => this.NotificationsService.remove(notification), 5000); diff --git a/frontend/src/app/modules/common/date/op-date-time.component.ts b/frontend/src/app/modules/common/date/op-date-time.component.ts index cd971728811..bda2d591ee2 100644 --- a/frontend/src/app/modules/common/date/op-date-time.component.ts +++ b/frontend/src/app/modules/common/date/op-date-time.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input} from '@angular/core'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; +import { Component, Input } from '@angular/core'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; @Component({ selector: 'op-date-time', diff --git a/frontend/src/app/modules/common/drag-and-drop/dom-autoscroll.service.ts b/frontend/src/app/modules/common/drag-and-drop/dom-autoscroll.service.ts index 4b92c4f58a3..a72f90ca785 100644 --- a/frontend/src/app/modules/common/drag-and-drop/dom-autoscroll.service.ts +++ b/frontend/src/app/modules/common/drag-and-drop/dom-autoscroll.service.ts @@ -1,9 +1,9 @@ -import {createPointCB, getClientRect as getRect, pointInside} from 'dom-plane'; +import { createPointCB, getClientRect as getRect, pointInside } from 'dom-plane'; export class DomAutoscrollService { public elements:Element[]; public scrolling:boolean; - public down:boolean = false; + public down = false; public scrollWhenOutside:boolean; public autoScroll:() => boolean; public maxSpeed:number; @@ -16,7 +16,7 @@ export class DomAutoscrollService { public pointCB:any; constructor(elements:Element[], - params:any) { + params:any) { this.elements = elements; this.scrollWhenOutside = params.scrollWhenOutside || false; this.maxSpeed = params.maxSpeed || 5; @@ -88,7 +88,7 @@ export class DomAutoscrollService { return []; } - let results = []; + const results = []; if (this.elements.includes(target)) { results.push(target); } @@ -104,7 +104,7 @@ export class DomAutoscrollService { } public getElementsUnderPoint():HTMLElement[] { - let underPoint = []; + const underPoint = []; for (var i = 0; i < this.elements.length; i++) { if (this.inside(this.point, this.elements[i])) { @@ -128,7 +128,7 @@ export class DomAutoscrollService { if (event.target !== null) { target.push(event.target as HTMLElement); } - let body = document.body; + const body = document.body; if (target.length > 0 && target[0].parentNode === body) { //The special condition to improve speed. @@ -173,7 +173,7 @@ export class DomAutoscrollService { public scrollAutomatically(el:Element) { - let rect = getRect(el); + const rect = getRect(el); let scrollx:number; let scrolly:number; diff --git a/frontend/src/app/modules/common/drag-and-drop/drag-and-drop.service.ts b/frontend/src/app/modules/common/drag-and-drop/drag-and-drop.service.ts index f8109015954..23ebb0d1dca 100644 --- a/frontend/src/app/modules/common/drag-and-drop/drag-and-drop.service.ts +++ b/frontend/src/app/modules/common/drag-and-drop/drag-and-drop.service.ts @@ -1,7 +1,7 @@ -import {Inject, Injectable, Injector, OnDestroy} from "@angular/core"; -import {DOCUMENT} from "@angular/common"; -import {DomAutoscrollService} from "core-app/modules/common/drag-and-drop/dom-autoscroll.service"; -import {DragAndDropHelpers} from "core-app/modules/common/drag-and-drop/drag-and-drop.helpers"; +import { Inject, Injectable, Injector, OnDestroy } from "@angular/core"; +import { DOCUMENT } from "@angular/common"; +import { DomAutoscrollService } from "core-app/modules/common/drag-and-drop/dom-autoscroll.service"; +import { DragAndDropHelpers } from "core-app/modules/common/drag-and-drop/drag-and-drop.helpers"; export interface DragMember { dragContainer:HTMLElement; diff --git a/frontend/src/app/modules/common/drag-and-drop/reorder-delta-builder.spec.ts b/frontend/src/app/modules/common/drag-and-drop/reorder-delta-builder.spec.ts index 1139a9e5c11..e8575bbb52a 100644 --- a/frontend/src/app/modules/common/drag-and-drop/reorder-delta-builder.spec.ts +++ b/frontend/src/app/modules/common/drag-and-drop/reorder-delta-builder.spec.ts @@ -31,7 +31,7 @@ import { MAX_ORDER, ReorderDeltaBuilder } from "core-app/modules/common/drag-and-drop/reorder-delta-builder"; -import {QueryOrder} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; +import { QueryOrder } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; describe('ReorderDeltaBuilder', () => { const work_packages:string[] = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']; @@ -54,13 +54,13 @@ describe('ReorderDeltaBuilder', () => { } it('Empty, inserting at beginning sets the delta for wpId 1 to the default value', () => { - let delta = buildDelta('1', {}); + const delta = buildDelta('1', {}); expect(Object.keys(delta)).toEqual(['1']); expect(delta['1']).toEqual(DEFAULT_ORDER); }); it('Empty, inserting at end sets the delta for all predecessors', () => { - let delta = buildDelta('10', {}); + const delta = buildDelta('10', {}); expect(Object.keys(delta).length).toEqual(work_packages.length); expect(delta).toEqual({ '1': 0, @@ -77,7 +77,7 @@ describe('ReorderDeltaBuilder', () => { }); it('Empty, inserting at end middle the delta for all predecessors', () => { - let delta = buildDelta('5', {}); + const delta = buildDelta('5', {}); expect(Object.keys(delta).length).toEqual(5); expect(delta).toEqual({ '1': 0, @@ -89,7 +89,7 @@ describe('ReorderDeltaBuilder', () => { }); it('has no problems inserting in the beginning old sort oder (1..n)', () => { - let positions = { + const positions = { '2': 1, '3': 2, '4': 3, @@ -101,7 +101,7 @@ describe('ReorderDeltaBuilder', () => { '10': 9, }; - let delta = buildDelta('1', positions); + const delta = buildDelta('1', positions); expect(Object.keys(delta).length).toEqual(1); // Expected to set to 1(position of 2) - 8192(half default distance) @@ -109,7 +109,7 @@ describe('ReorderDeltaBuilder', () => { }); it('has no problems inserting in the middle of old sort oder (1..n)', () => { - let positions = { + const positions = { '1': 0, '2': 1, '3': 2, @@ -121,7 +121,7 @@ describe('ReorderDeltaBuilder', () => { '10': 9, }; - let delta = buildDelta('5', positions); + const delta = buildDelta('5', positions); expect(Object.keys(delta).length).toEqual(10); expect(delta).toEqual({ @@ -139,13 +139,13 @@ describe('ReorderDeltaBuilder', () => { }); it('will reorder old sort if there is not enough data', () => { - let positions = { + const positions = { '1': 0, '3': 1, '4': 2, }; - let delta = buildDelta('2', positions); + const delta = buildDelta('2', positions); expect(Object.keys(delta).length).toEqual(10); expect(delta).toEqual({ @@ -163,13 +163,13 @@ describe('ReorderDeltaBuilder', () => { }); it('will shift min position when successor is max', () => { - let positions = { + const positions = { '1': DEFAULT_ORDER, '2': MAX_ORDER - 1, '4': MAX_ORDER, }; - let delta = buildDelta('3', positions, ['1', '2', '3', '4']); + const delta = buildDelta('3', positions, ['1', '2', '3', '4']); expect(Object.keys(delta).length).toEqual(4); expect(delta).toEqual({ // 1 remains at DEFAULT_ORDER @@ -185,12 +185,12 @@ describe('ReorderDeltaBuilder', () => { }); it('will shift first position back when predecessor is max', () => { - let positions = { + const positions = { '1': MAX_ORDER - 1, '2': MAX_ORDER, }; - let delta = buildDelta('3', positions, ['1', '2', '3']); + const delta = buildDelta('3', positions, ['1', '2', '3']); expect(Object.keys(delta).length).toEqual(3); expect(delta).toEqual({ '1': MAX_ORDER - 4, @@ -200,8 +200,8 @@ describe('ReorderDeltaBuilder', () => { }); it('with successor position, sets the delta for wpId 1 to the default value', () => { - let positions = { '2': DEFAULT_ORDER }; - let delta = buildDelta('1', positions); + const positions = { '2': DEFAULT_ORDER }; + const delta = buildDelta('1', positions); expect(Object.keys(delta)).toEqual(['1']); // expect position to be ORDER_DISTANCE/2 before successor position @@ -209,8 +209,8 @@ describe('ReorderDeltaBuilder', () => { }); it('fills in all predecessors when inserting at index > 0', () => { - let positions = {}; - let delta = buildDelta('2', positions); + const positions = {}; + const delta = buildDelta('2', positions); expect(Object.keys(delta)).toEqual(['1', '2']); // expect position to be ORDER_DISTANCE/2 before successor position @@ -219,17 +219,17 @@ describe('ReorderDeltaBuilder', () => { }); it('just sets the default when order contains wpId only', () => { - let positions = {}; - let delta = buildDelta('1', positions, ['1']); + const positions = {}; + const delta = buildDelta('1', positions, ['1']); expect(Object.keys(delta)).toEqual(['1']); expect(delta['1']).toEqual(0); }); it('just shifts two values when index <- 1 -> fromIndex', () => { - let positions = { '1': 8192, '2': 0, '3': 16384}; + const positions = { '1': 8192, '2': 0, '3': 16384 }; // From index 1 to 0 - let delta = buildDelta('1', positions, ['1', '2', '3'], 1); + const delta = buildDelta('1', positions, ['1', '2', '3'], 1); expect(Object.keys(delta)).toEqual(['1', '2']); expect(delta['1']).toEqual(0); @@ -237,16 +237,16 @@ describe('ReorderDeltaBuilder', () => { }); it('adds to the predecessor if successor has no position', () => { - let positions = { '1': 0 }; - let delta = buildDelta('2', positions, ['1', '2', '3']); + const positions = { '1': 0 }; + const delta = buildDelta('2', positions, ['1', '2', '3']); expect(Object.keys(delta)).toEqual(['2']); expect(delta['2']).toEqual(8192); }); it('reorders according to positions when not in ascending order', () => { - let positions = { '1': 0, '2': 1234, '3': 981 }; - let delta = buildDelta('1', positions, ['1', '2', '3']); + const positions = { '1': 0, '2': 1234, '3': 981 }; + const delta = buildDelta('1', positions, ['1', '2', '3']); expect(delta).toEqual({ '1': 0, @@ -256,8 +256,8 @@ describe('ReorderDeltaBuilder', () => { }); it('reorders according to positions when not in ascending order with missing position', () => { - let positions = { '1': 1234, '3': 981 }; - let delta = buildDelta('2', positions, ['1', '2', '3']); + const positions = { '1': 1234, '3': 981 }; + const delta = buildDelta('2', positions, ['1', '2', '3']); expect(delta).toEqual({ '1': 981, @@ -269,7 +269,7 @@ describe('ReorderDeltaBuilder', () => { it('reorders on incomplete positions information and moving the first (0 positioned) work package', () => { // This can happen if a query is saved and the filters on it changed later on so that // additional work packages are now present. - let delta = buildDelta('1', { '1': 0, '5': 8196 }, ['2', '3', '4', '1', '5'], 0, 3); + const delta = buildDelta('1', { '1': 0, '5': 8196 }, ['2', '3', '4', '1', '5'], 0, 3); expect(delta).toEqual({ '2': 0, diff --git a/frontend/src/app/modules/common/drag-and-drop/reorder-delta-builder.ts b/frontend/src/app/modules/common/drag-and-drop/reorder-delta-builder.ts index 04b094c7271..81a2ee5a051 100644 --- a/frontend/src/app/modules/common/drag-and-drop/reorder-delta-builder.ts +++ b/frontend/src/app/modules/common/drag-and-drop/reorder-delta-builder.ts @@ -1,5 +1,5 @@ -import {debugLog, timeOutput} from "core-app/helpers/debug_output"; -import {QueryOrder} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; +import { debugLog, timeOutput } from "core-app/helpers/debug_output"; +import { QueryOrder } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; // min allowed position export const MIN_ORDER = -2147483647; @@ -92,7 +92,7 @@ export class ReorderDeltaBuilder { * but try to keep relative positions alive */ private rebuildPositions() { - let [min, max] = this.minMaxPositions; + const [min, max] = this.minMaxPositions; this.redistribute(min, max); } @@ -242,8 +242,8 @@ export class ReorderDeltaBuilder { private reorderedInsert() { // Get the current distance between orders // Both must be set by now due to +buildUpPredecessorPosition+ having run. - let min = this.firstPosition!; - let max = this.lastPosition!; + const min = this.firstPosition!; + const max = this.lastPosition!; this.redistribute(min, max); } @@ -292,11 +292,11 @@ export class ReorderDeltaBuilder { private get minMaxPositions():[number, number] { let min:number = MAX_ORDER; let max:number = MIN_ORDER; - let any:boolean = false; + let any = false; for (let i = this.order.length - 1; i >= 0; i--) { - let wpId = this.order[i]; - let position = this.livePosition(wpId); + const wpId = this.order[i]; + const position = this.livePosition(wpId); if (position !== undefined) { min = Math.min(position, min); @@ -327,8 +327,8 @@ export class ReorderDeltaBuilder { */ private get lastPosition():number|undefined { for (let i = this.order.length - 1; i >= 0; i--) { - let wpId = this.order[i]; - let position = this.livePosition(wpId); + const wpId = this.order[i]; + const position = this.livePosition(wpId); // Return the first set position. if (position !== undefined) { diff --git a/frontend/src/app/modules/common/draggable-autocomplete/draggable-autocomplete.component.ts b/frontend/src/app/modules/common/draggable-autocomplete/draggable-autocomplete.component.ts index 69cd2b0bb8f..0015375478e 100644 --- a/frontend/src/app/modules/common/draggable-autocomplete/draggable-autocomplete.component.ts +++ b/frontend/src/app/modules/common/draggable-autocomplete/draggable-autocomplete.component.ts @@ -8,13 +8,13 @@ import { Output, ViewChild } from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {DragulaService, Group} from "ng2-dragula"; -import {DomAutoscrollService} from "core-app/modules/common/drag-and-drop/dom-autoscroll.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {merge} from "rxjs"; -import {DomHelpers} from "core-app/helpers/dom/set-window-cursor.helper"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { DragulaService, Group } from "ng2-dragula"; +import { DomAutoscrollService } from "core-app/modules/common/drag-and-drop/dom-autoscroll.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { merge } from "rxjs"; +import { DomHelpers } from "core-app/helpers/dom/set-window-cursor.helper"; export interface DraggableOption { name:string; @@ -32,7 +32,7 @@ export class DraggableAutocompleteComponent extends UntilDestroyedMixin implemen @Input() options:DraggableOption[]; /** Should we focus the autocompleter ? */ - @Input() autofocus:boolean = true; + @Input() autofocus = true; /** Order list of selected items */ @Input('selected') _selected:DraggableOption[] = []; diff --git a/frontend/src/app/modules/common/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.spec.ts b/frontend/src/app/modules/common/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.spec.ts index e165ea4205f..28dcb8725c6 100644 --- a/frontend/src/app/modules/common/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.spec.ts +++ b/frontend/src/app/modules/common/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.spec.ts @@ -4,9 +4,9 @@ import { TestBed, tick, } from '@angular/core/testing'; -import {DynamicBootstrapComponent} from './dynamic-bootstrap.component'; -import {ApplicationRef, Component, DebugElement} from '@angular/core'; -import {DynamicBootstrapper} from 'core-app/globals/dynamic-bootstrapper'; +import { DynamicBootstrapComponent } from './dynamic-bootstrap.component'; +import { ApplicationRef, Component, DebugElement } from '@angular/core'; +import { DynamicBootstrapper } from 'core-app/globals/dynamic-bootstrapper'; // Stub component to bootstrap dynamically @Component({ @@ -34,7 +34,7 @@ describe('DynamicBootstrapComponent', () => { TestComponent, ] }) - .compileComponents(); + .compileComponents(); }); beforeEach(() => { diff --git a/frontend/src/app/modules/common/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.ts b/frontend/src/app/modules/common/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.ts index 9f5ae3004a7..d0e18d6cab7 100644 --- a/frontend/src/app/modules/common/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.ts +++ b/frontend/src/app/modules/common/dynamic-bootstrap/component/dynamic-bootstrap/dynamic-bootstrap.component.ts @@ -9,9 +9,9 @@ * @module * @public */ -import {ApplicationRef, Component, ElementRef, Input} from '@angular/core'; -import {DomSanitizer, SafeHtml} from '@angular/platform-browser'; -import {DynamicBootstrapper} from 'core-app/globals/dynamic-bootstrapper'; +import { ApplicationRef, Component, ElementRef, Input } from '@angular/core'; +import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; +import { DynamicBootstrapper } from 'core-app/globals/dynamic-bootstrapper'; @Component({ selector: 'op-dynamic-bootstrap', diff --git a/frontend/src/app/modules/common/edit-actions-bar/wp-edit-actions-bar.component.ts b/frontend/src/app/modules/common/edit-actions-bar/wp-edit-actions-bar.component.ts index f5c2df81ef4..346efee61b7 100644 --- a/frontend/src/app/modules/common/edit-actions-bar/wp-edit-actions-bar.component.ts +++ b/frontend/src/app/modules/common/edit-actions-bar/wp-edit-actions-bar.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Output} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Output } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { EditFormComponent } from "core-app/modules/fields/edit/edit-form/edit-form.component"; @Component({ templateUrl: './wp-edit-actions-bar.html', @@ -38,7 +38,7 @@ import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-for export class WorkPackageEditActionsBarComponent { @Output('onSave') public onSave = new EventEmitter(); @Output('onCancel') public onCancel = new EventEmitter(); - public _saving:boolean = false; + public _saving = false; public text = { save: this.I18n.t('js.button_save'), diff --git a/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts b/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts index 957685c9859..5db2d848e08 100644 --- a/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts +++ b/frontend/src/app/modules/common/editable-toolbar-title/editable-toolbar-title.component.ts @@ -37,9 +37,9 @@ import { SimpleChanges, ViewChild } from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ContainHelpers} from "core-app/modules/common/focus/contain-helpers"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ContainHelpers } from "core-app/modules/common/focus/contain-helpers"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export const triggerEditingEvent = 'op:selectableTitle:trigger'; export const selectableTitleIdentifier = 'editable-toolbar-title'; @@ -48,15 +48,15 @@ export const selectableTitleIdentifier = 'editable-toolbar-title'; selector: 'editable-toolbar-title', templateUrl: './editable-toolbar-title.html', styleUrls: ['./editable-toolbar-title.sass'], - host: {'class': 'title-container'} + host: { 'class': 'title-container' } }) export class EditableToolbarTitleComponent implements OnInit, OnChanges { @Input('title') public inputTitle:string; - @Input() public editable:boolean = true; - @Input() public inFlight:boolean = false; - @Input() public showSaveCondition:boolean = false; - @Input() public initialFocus:boolean = false; - @Input() public smallHeader:boolean = false; + @Input() public editable = true; + @Input() public inFlight = false; + @Input() public showSaveCondition = false; + @Input() public initialFocus = false; + @Input() public smallHeader = false; @Output() public onSave = new EventEmitter(); @Output() public onEmptySubmit = new EventEmitter(); @@ -86,7 +86,7 @@ export class EditableToolbarTitleComponent implements OnInit, OnChanges { ngOnInit() { this.text['input_title'] = `${this.text.click_to_edit} ${this.text.press_enter_to_save}`; - jQuery(this.elementRef.nativeElement).on(triggerEditingEvent, (evt:Event, val:string = '') => { + jQuery(this.elementRef.nativeElement).on(triggerEditingEvent, (evt:Event, val = '') => { // In case we're not editable, ignore request if (!this.inputField) { return; diff --git a/frontend/src/app/modules/common/focus/focus-helper.ts b/frontend/src/app/modules/common/focus/focus-helper.ts index 5e22e0e46c1..09542c940bd 100644 --- a/frontend/src/app/modules/common/focus/focus-helper.ts +++ b/frontend/src/app/modules/common/focus/focus-helper.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; +import { Injectable } from '@angular/core'; @Injectable({ providedIn: 'root' }) export class FocusHelperService { diff --git a/frontend/src/app/modules/common/focus/focus-within.directive.ts b/frontend/src/app/modules/common/focus/focus-within.directive.ts index 743c1f95223..dc9be3f82d6 100644 --- a/frontend/src/app/modules/common/focus/focus-within.directive.ts +++ b/frontend/src/app/modules/common/focus/focus-within.directive.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {BehaviorSubject} from 'rxjs'; -import {auditTime} from 'rxjs/operators'; -import {Directive, ElementRef, Input, OnInit} from "@angular/core"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { BehaviorSubject } from 'rxjs'; +import { auditTime } from 'rxjs/operators'; +import { Directive, ElementRef, Input, OnInit } from "@angular/core"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; // with courtesy of http://stackoverflow.com/a/29722694/3206935 @@ -45,8 +45,8 @@ export class FocusWithinDirective extends UntilDestroyedMixin implements OnInit ngOnInit() { - let element = jQuery(this.elementRef.nativeElement); - let focusedObservable = new BehaviorSubject(false); + const element = jQuery(this.elementRef.nativeElement); + const focusedObservable = new BehaviorSubject(false); focusedObservable .pipe( @@ -58,12 +58,12 @@ export class FocusWithinDirective extends UntilDestroyedMixin implements OnInit }); - let focusListener = function () { + const focusListener = function () { focusedObservable.next(true); }; element[0].addEventListener('focus', focusListener, true); - let blurListener = function () { + const blurListener = function () { focusedObservable.next(false); }; element[0].addEventListener('blur', blurListener, true); diff --git a/frontend/src/app/modules/common/focus/focus.directive.ts b/frontend/src/app/modules/common/focus/focus.directive.ts index 68bb55e1b2c..b11c46def8c 100644 --- a/frontend/src/app/modules/common/focus/focus.directive.ts +++ b/frontend/src/app/modules/common/focus/focus.directive.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, Directive, ElementRef, Input} from "@angular/core"; -import {FocusHelperService} from "core-app/modules/common/focus/focus-helper"; +import { AfterViewInit, Directive, ElementRef, Input } from "@angular/core"; +import { FocusHelperService } from "core-app/modules/common/focus/focus-helper"; @Directive({ selector: '[focus]' diff --git a/frontend/src/app/modules/common/form-field/form-field.component.ts b/frontend/src/app/modules/common/form-field/form-field.component.ts index 1646a1947b3..651b83d4175 100644 --- a/frontend/src/app/modules/common/form-field/form-field.component.ts +++ b/frontend/src/app/modules/common/form-field/form-field.component.ts @@ -19,8 +19,8 @@ export class OpFormFieldComponent { return this.isInvalid; } - @Input() label:string = ''; - @Input() required:boolean = false; + @Input() label = ''; + @Input() required = false; @ContentChild(NgControl) control:NgControl; diff --git a/frontend/src/app/modules/common/gon/gon.service.ts b/frontend/src/app/modules/common/gon/gon.service.ts index f8a1238307a..5ba6eca8f86 100644 --- a/frontend/src/app/modules/common/gon/gon.service.ts +++ b/frontend/src/app/modules/common/gon/gon.service.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; -import {IFCGonDefinition} from "../../bim/ifc_models/pages/viewer/ifc-models-data.service"; +import { Injectable } from "@angular/core"; +import { IFCGonDefinition } from "../../bim/ifc_models/pages/viewer/ifc-models-data.service"; declare global { interface Window { diff --git a/frontend/src/app/modules/common/hide-section/add-section-dropdown/add-section-dropdown.component.ts b/frontend/src/app/modules/common/hide-section/add-section-dropdown/add-section-dropdown.component.ts index 2b648998550..99bb07df534 100644 --- a/frontend/src/app/modules/common/hide-section/add-section-dropdown/add-section-dropdown.component.ts +++ b/frontend/src/app/modules/common/hide-section/add-section-dropdown/add-section-dropdown.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Component, ElementRef, OnInit, ViewChild} from "@angular/core"; -import {HideSectionDefinition, HideSectionService} from "core-app/modules/common/hide-section/hide-section.service"; -import {AngularTrackingHelpers} from "core-components/angular/tracking-functions"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Component, ElementRef, OnInit, ViewChild } from "@angular/core"; +import { HideSectionDefinition, HideSectionService } from "core-app/modules/common/hide-section/hide-section.service"; +import { AngularTrackingHelpers } from "core-components/angular/tracking-functions"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export const addSectionDropdownSelector = 'add-section-dropdown'; @@ -64,12 +64,12 @@ export class AddSectionDropdownComponent extends UntilDestroyedMixin implements .pipe( this.untilDestroyed() ).subscribe(displayed => { - this.selectable = this.hideSectionService.all - .filter(el => displayed.indexOf(el.key) === -1) - .sort((a, b) => a.label.localeCompare(b.label)); + this.selectable = this.hideSectionService.all + .filter(el => displayed.indexOf(el.key) === -1) + .sort((a, b) => a.label.localeCompare(b.label)); - (this.option.nativeElement as HTMLOptionElement).selected = true; - }); + (this.option.nativeElement as HTMLOptionElement).selected = true; + }); } show(value:string) { diff --git a/frontend/src/app/modules/common/hide-section/hide-section-link/hide-section-link.component.ts b/frontend/src/app/modules/common/hide-section/hide-section-link/hide-section-link.component.ts index 9fa6294e16a..2610d91125d 100644 --- a/frontend/src/app/modules/common/hide-section/hide-section-link/hide-section-link.component.ts +++ b/frontend/src/app/modules/common/hide-section/hide-section-link/hide-section-link.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit} from "@angular/core"; -import {HideSectionService} from "core-app/modules/common/hide-section/hide-section.service"; +import { Component, ElementRef, OnInit } from "@angular/core"; +import { HideSectionService } from "core-app/modules/common/hide-section/hide-section.service"; export const hideSectionLinkSelector = 'hide-section-link'; @@ -36,7 +36,7 @@ export const hideSectionLinkSelector = 'hide-section-link'; templateUrl: './hide-section-link.component.html', }) export class HideSectionLinkComponent implements OnInit { - displayed:boolean = true; + displayed = true; public sectionName:string; diff --git a/frontend/src/app/modules/common/hide-section/hide-section.service.ts b/frontend/src/app/modules/common/hide-section/hide-section.service.ts index 97d4f739598..4fd9f92b76c 100644 --- a/frontend/src/app/modules/common/hide-section/hide-section.service.ts +++ b/frontend/src/app/modules/common/hide-section/hide-section.service.ts @@ -27,9 +27,9 @@ //++ -import {GonService} from "core-app/modules/common/gon/gon.service"; -import {Injectable} from "@angular/core"; -import {input} from "reactivestates"; +import { GonService } from "core-app/modules/common/gon/gon.service"; +import { Injectable } from "@angular/core"; +import { input } from "reactivestates"; export interface HideSectionDefinition { key:string; diff --git a/frontend/src/app/modules/common/hide-section/show-section-dropdown.component.ts b/frontend/src/app/modules/common/hide-section/show-section-dropdown.component.ts index 4c611d5b4e0..1ed9c56e932 100644 --- a/frontend/src/app/modules/common/hide-section/show-section-dropdown.component.ts +++ b/frontend/src/app/modules/common/hide-section/show-section-dropdown.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HideSectionService} from "./hide-section.service"; -import {Component, ElementRef, OnInit} from "@angular/core"; +import { HideSectionService } from "./hide-section.service"; +import { Component, ElementRef, OnInit } from "@angular/core"; export const showSectionDropdownSelector = 'show-section-dropdown'; @@ -50,7 +50,7 @@ export class ShowSectionDropdownComponent implements OnInit { const target = jQuery(this.elementRef.nativeElement).prev(); target.on('change', event => { - let selectedOption = jQuery("option:selected", event.target); + const selectedOption = jQuery("option:selected", event.target); if (selectedOption.val() !== this.optValue) { this.HideSectionService.hide(this.hideSecWithName); diff --git a/frontend/src/app/modules/common/highlight-col/highlight-col.directive.ts b/frontend/src/app/modules/common/highlight-col/highlight-col.directive.ts index 39fe43f2d62..f9e00178bfb 100644 --- a/frontend/src/app/modules/common/highlight-col/highlight-col.directive.ts +++ b/frontend/src/app/modules/common/highlight-col/highlight-col.directive.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit, OnDestroy} from '@angular/core'; +import { Component, ElementRef, OnInit, OnDestroy } from '@angular/core'; @Component({ selector: 'col[highlight-col]', diff --git a/frontend/src/app/modules/common/html-sanitize/html-sanitize.service.ts b/frontend/src/app/modules/common/html-sanitize/html-sanitize.service.ts index 3ae75d49fd5..8aaf68cf421 100644 --- a/frontend/src/app/modules/common/html-sanitize/html-sanitize.service.ts +++ b/frontend/src/app/modules/common/html-sanitize/html-sanitize.service.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, SecurityContext} from "@angular/core"; -import {DomSanitizer, SafeHtml} from "@angular/platform-browser"; +import { Injectable, SecurityContext } from "@angular/core"; +import { DomSanitizer, SafeHtml } from "@angular/platform-browser"; @Injectable({ providedIn: 'root' }) export class HTMLSanitizeService { diff --git a/frontend/src/app/modules/common/i18n/i18n.service.ts b/frontend/src/app/modules/common/i18n/i18n.service.ts index e54216d2e2f..8787246964d 100644 --- a/frontend/src/app/modules/common/i18n/i18n.service.ts +++ b/frontend/src/app/modules/common/i18n/i18n.service.ts @@ -1,5 +1,5 @@ -import {Injectable} from "@angular/core"; -import {Observable, combineLatest} from "rxjs"; +import { Injectable } from "@angular/core"; +import { Observable, combineLatest } from "rxjs"; /** * General components diff --git a/frontend/src/app/modules/common/icon/icon.component.ts b/frontend/src/app/modules/common/icon/icon.component.ts index 9f4ab25ffe6..cb40c3fbabd 100644 --- a/frontend/src/app/modules/common/icon/icon.component.ts +++ b/frontend/src/app/modules/common/icon/icon.component.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input} from '@angular/core'; +import { Component, Input } from '@angular/core'; @Component({ selector: 'op-icon', @@ -43,5 +43,5 @@ import {Component, Input} from '@angular/core'; }) export class OpIconComponent { @Input('icon-classes') iconClasses:string; - @Input('icon-title') iconTitle:string = ''; + @Input('icon-title') iconTitle = ''; } diff --git a/frontend/src/app/modules/common/icon/op-icon.spec.ts b/frontend/src/app/modules/common/icon/op-icon.spec.ts index 71ea55a841d..e0a70203afe 100644 --- a/frontend/src/app/modules/common/icon/op-icon.spec.ts +++ b/frontend/src/app/modules/common/icon/op-icon.spec.ts @@ -27,9 +27,9 @@ //++ import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing"; -import {By} from "@angular/platform-browser"; -import {DebugElement} from "@angular/core"; -import {OpIconComponent} from "core-app/modules/common/icon/icon.component"; +import { By } from "@angular/platform-browser"; +import { DebugElement } from "@angular/core"; +import { OpIconComponent } from "core-app/modules/common/icon/icon.component"; describe('opIcon Directive', function() { let app:OpIconComponent; diff --git a/frontend/src/app/modules/common/loading-indicator/loading-indicator.service.ts b/frontend/src/app/modules/common/loading-indicator/loading-indicator.service.ts index d297b01e5de..038607de57c 100644 --- a/frontend/src/app/modules/common/loading-indicator/loading-indicator.service.ts +++ b/frontend/src/app/modules/common/loading-indicator/loading-indicator.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; -import {Observable} from "rxjs"; -import {tap} from "rxjs/operators"; +import { Injectable } from "@angular/core"; +import { Observable } from "rxjs"; +import { tap } from "rxjs/operators"; export const indicatorLocationSelector = '.loading-indicator--location'; export const indicatorBackgroundSelector = '.loading-indicator--background'; @@ -64,7 +64,7 @@ export function withDelayedLoadingIndicator(indicator:() => LoadingIndicator) export class LoadingIndicator { - private indicatorTemplate:string = + private indicatorTemplate = `
    diff --git a/frontend/src/app/modules/common/modal/modal-heading.component.ts b/frontend/src/app/modules/common/modal/modal-heading.component.ts index 02c9083aefd..0f7caa6cb1d 100644 --- a/frontend/src/app/modules/common/modal/modal-heading.component.ts +++ b/frontend/src/app/modules/common/modal/modal-heading.component.ts @@ -4,7 +4,7 @@ import { Output, HostBinding, } from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ selector: 'op-modal-heading', diff --git a/frontend/src/app/modules/common/model-auth/model-auth.service.spec.ts b/frontend/src/app/modules/common/model-auth/model-auth.service.spec.ts index c0ac4955cc1..d40f3b7b12d 100644 --- a/frontend/src/app/modules/common/model-auth/model-auth.service.spec.ts +++ b/frontend/src/app/modules/common/model-auth/model-auth.service.spec.ts @@ -28,10 +28,10 @@ /*jshint expr: true*/ -import {AuthorisationService} from './model-auth.service'; +import { AuthorisationService } from './model-auth.service'; describe('authorisationService', function() { - let authorisationService:AuthorisationService = new AuthorisationService(); + const authorisationService:AuthorisationService = new AuthorisationService(); describe('model action authorisation', function () { beforeEach(function() { diff --git a/frontend/src/app/modules/common/model-auth/model-auth.service.ts b/frontend/src/app/modules/common/model-auth/model-auth.service.ts index a24ac2e507a..273044ea5fd 100644 --- a/frontend/src/app/modules/common/model-auth/model-auth.service.ts +++ b/frontend/src/app/modules/common/model-auth/model-auth.service.ts @@ -27,10 +27,10 @@ //++ -import {Injectable} from "@angular/core"; -import {input} from "reactivestates"; -import {Observable} from "rxjs"; -import {takeUntil} from "rxjs/operators"; +import { Injectable } from "@angular/core"; +import { input } from "reactivestates"; +import { Observable } from "rxjs"; +import { takeUntil } from "rxjs/operators"; export type ModelLinks = {[action:string]:any}; export type ModelLinksHash = { [model:string]:ModelLinks }; @@ -41,7 +41,7 @@ export class AuthorisationService { public initModelAuth(modelName:string, modelLinks:ModelLinks) { this.links.doModify((value:ModelLinksHash) => { - let links = { ...value }; + const links = { ...value }; links[modelName] = modelLinks; return links; }); diff --git a/frontend/src/app/modules/common/no-results/no-results.component.ts b/frontend/src/app/modules/common/no-results/no-results.component.ts index 51349263b47..1080674751f 100644 --- a/frontend/src/app/modules/common/no-results/no-results.component.ts +++ b/frontend/src/app/modules/common/no-results/no-results.component.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, HostBinding} from '@angular/core'; +import { Component, Input, HostBinding } from '@angular/core'; @Component({ templateUrl: './no-results.component.html', diff --git a/frontend/src/app/modules/common/notifications/notification.component.ts b/frontend/src/app/modules/common/notifications/notification.component.ts index 009024eadc1..5ec6278551d 100644 --- a/frontend/src/app/modules/common/notifications/notification.component.ts +++ b/frontend/src/app/modules/common/notifications/notification.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component, Input, OnInit} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; import { INotification, NotificationsService, @@ -95,6 +95,6 @@ export class NotificationComponent implements OnInit { public get uploadText() { return this.I18n.t('js.label_upload_counter', - { done: this.uploadCount, count: this.data.length}); + { done: this.uploadCount, count: this.data.length }); } } diff --git a/frontend/src/app/modules/common/notifications/notifications-container.component.ts b/frontend/src/app/modules/common/notifications/notifications-container.component.ts index b6d4b208414..6512f694306 100644 --- a/frontend/src/app/modules/common/notifications/notifications-container.component.ts +++ b/frontend/src/app/modules/common/notifications/notifications-container.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit} from '@angular/core'; -import {INotification, NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; +import { INotification, NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export const notificationsContainerSelector = 'notifications-container'; diff --git a/frontend/src/app/modules/common/notifications/notifications.service.spec.ts b/frontend/src/app/modules/common/notifications/notifications.service.spec.ts index 8af4f6d3d66..2c30a9413ca 100644 --- a/frontend/src/app/modules/common/notifications/notifications.service.spec.ts +++ b/frontend/src/app/modules/common/notifications/notifications.service.spec.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module'; +import { OpenprojectHalModule } from 'core-app/modules/hal/openproject-hal.module'; import { TestBed, waitForAsync } from '@angular/core/testing'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; describe('NotificationsService', function () { var notificationsService:NotificationsService; @@ -56,7 +56,7 @@ describe('NotificationsService', function () { it('should be able to create warnings', function () { var notification = notificationsService.addWarning('warning!'); - expect(notification).toEqual({message: 'warning!', type: 'warning'}); + expect(notification).toEqual({ message: 'warning!', type: 'warning' }); }); it('should be able to create error messages with errors', function () { diff --git a/frontend/src/app/modules/common/notifications/notifications.service.ts b/frontend/src/app/modules/common/notifications/notifications.service.ts index 1cca01c3c7f..564019bdbb8 100644 --- a/frontend/src/app/modules/common/notifications/notifications.service.ts +++ b/frontend/src/app/modules/common/notifications/notifications.service.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {input, State} from 'reactivestates'; -import {Injectable} from '@angular/core'; -import {UploadInProgress} from "core-components/api/op-file-upload/op-file-upload.service"; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { input, State } from 'reactivestates'; +import { Injectable } from '@angular/core'; +import { UploadInProgress } from "core-components/api/op-file-upload/op-file-upload.service"; export function removeSuccessFlashMessages() { jQuery('.flash.notice').remove(); @@ -71,7 +71,7 @@ export class NotificationsService { removeSuccessFlashMessages(); this.stack.doModify((current) => { - let nextValue = [notification].concat(current); + const nextValue = [notification].concat(current); _.remove(nextValue, (n, i) => i > 0 && (n.type === 'success' || n.type === 'error') ); @@ -91,7 +91,7 @@ export class NotificationsService { errors = [errors]; } - let notification:INotification = this.createNotification(message, 'error'); + const notification:INotification = this.createNotification(message, 'error'); notification.data = errors; return this.add(notification); @@ -139,7 +139,7 @@ export class NotificationsService { throw new Error('Cannot create an upload notification without uploads!'); } - let notification = this.createNotification(message, 'upload'); + const notification = this.createNotification(message, 'upload'); notification.data = uploads; return notification; diff --git a/frontend/src/app/modules/common/notifications/upload-progress.component.ts b/frontend/src/app/modules/common/notifications/upload-progress.component.ts index 699aa599f52..ab84f0c2a9a 100644 --- a/frontend/src/app/modules/common/notifications/upload-progress.component.ts +++ b/frontend/src/app/modules/common/notifications/upload-progress.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core'; -import {UploadFile, UploadHttpEvent, UploadInProgress} from "core-components/api/op-file-upload/op-file-upload.service"; -import {HttpErrorResponse, HttpEventType, HttpProgressEvent} from "@angular/common/http"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {debugLog} from "core-app/helpers/debug_output"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core'; +import { UploadFile, UploadHttpEvent, UploadInProgress } from "core-components/api/op-file-upload/op-file-upload.service"; +import { HttpErrorResponse, HttpEventType, HttpProgressEvent } from "@angular/common/http"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { debugLog } from "core-app/helpers/debug_output"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Component({ selector: 'notifications-upload-progress', @@ -58,7 +58,7 @@ export class UploadProgressComponent extends UntilDestroyedMixin implements OnIn progressPercentage:ElementRef; public file:UploadFile; - public error:boolean = false; + public error = false; public completed = false; set value(value:number) { @@ -85,22 +85,22 @@ export class UploadProgressComponent extends UntilDestroyedMixin implements OnIn .subscribe( (evt:UploadHttpEvent) => { switch (evt.type) { - case HttpEventType.Sent: - this.value = 5; - return debugLog(`Uploading file "${this.file.name}" of size ${this.file.size}.`); + case HttpEventType.Sent: + this.value = 5; + return debugLog(`Uploading file "${this.file.name}" of size ${this.file.size}.`); - case HttpEventType.UploadProgress: - return this.updateProgress(evt); + case HttpEventType.UploadProgress: + return this.updateProgress(evt); - case HttpEventType.Response: - debugLog(`File ${this.fileName} was fully uploaded.`); - this.value = 100; - this.completed = true; - return this.onSuccess.emit(); + case HttpEventType.Response: + debugLog(`File ${this.fileName} was fully uploaded.`); + this.value = 100; + this.completed = true; + return this.onSuccess.emit(); - default: - // Sent or unknown event - return; + default: + // Sent or unknown event + return; } }, (error:HttpErrorResponse) => this.handleError(error) diff --git a/frontend/src/app/modules/common/op-date-picker/datepicker.ts b/frontend/src/app/modules/common/op-date-picker/datepicker.ts index 822ccbb10df..797b4b12db8 100644 --- a/frontend/src/app/modules/common/op-date-picker/datepicker.ts +++ b/frontend/src/app/modules/common/op-date-picker/datepicker.ts @@ -28,9 +28,9 @@ import * as moment from 'moment'; import flatpickr from 'flatpickr'; -import {Instance} from 'flatpickr/dist/types/instance'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; +import { Instance } from 'flatpickr/dist/types/instance'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; import DateOption = flatpickr.Options.DateOption; export class DatePicker { @@ -136,7 +136,7 @@ export class DatePicker { this.datepickerInstance.open(); } }, 50); - } + }; private visibleAndActive() { try { diff --git a/frontend/src/app/modules/common/op-date-picker/op-date-picker.component.ts b/frontend/src/app/modules/common/op-date-picker/op-date-picker.component.ts index 336e0926274..8a57c90d531 100644 --- a/frontend/src/app/modules/common/op-date-picker/op-date-picker.component.ts +++ b/frontend/src/app/modules/common/op-date-picker/op-date-picker.component.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewChild} from '@angular/core'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {TimezoneService} from 'core-components/datetime/timezone.service'; -import {DatePicker} from "core-app/modules/common/op-date-picker/datepicker"; -import {DebouncedEventEmitter} from "core-components/angular/debounced-event-emitter"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {componentDestroyed} from "@w11k/ngx-componentdestroyed"; -import {keyCodes} from "core-app/modules/common/keyCodes.enum"; -import {Instance} from "flatpickr/dist/types/instance"; +import { AfterViewInit, Component, ElementRef, EventEmitter, Input, OnDestroy, Output, ViewChild } from '@angular/core'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; +import { DatePicker } from "core-app/modules/common/op-date-picker/datepicker"; +import { DebouncedEventEmitter } from "core-components/angular/debounced-event-emitter"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { componentDestroyed } from "@w11k/ngx-componentdestroyed"; +import { keyCodes } from "core-app/modules/common/keyCodes.enum"; +import { Instance } from "flatpickr/dist/types/instance"; @Component({ selector: 'op-date-picker', @@ -44,15 +44,15 @@ export class OpDatePickerComponent extends UntilDestroyedMixin implements OnDest @Output() public onChange = new DebouncedEventEmitter(componentDestroyed(this)); @Output() public onCancel = new EventEmitter(); - @Input() public initialDate:string = ''; + @Input() public initialDate = ''; @Input() public appendTo?:HTMLElement = document.body; - @Input() public classes:string = ''; - @Input() public id:string = ''; - @Input() public name:string = ''; - @Input() public required:boolean = false; - @Input() public size:number = 20; - @Input() public focus:boolean = false; - @Input() public disabled:boolean = false; + @Input() public classes = ''; + @Input() public id = ''; + @Input() public name = ''; + @Input() public required = false; + @Input() public size = 20; + @Input() public focus = false; + @Input() public disabled = false; @ViewChild('dateInput') dateInput:ElementRef; @@ -114,11 +114,11 @@ export class OpDatePickerComponent extends UntilDestroyedMixin implements OnDest } private initializeDatepicker() { - let options:any = { + const options:any = { allowInput: true, appendTo: this.appendTo, onChange:(selectedDates:Date[], dateStr:string) => { - let val:string = dateStr; + const val:string = dateStr; if (this.isEmpty()) { return; diff --git a/frontend/src/app/modules/common/option-list/option-list.component.ts b/frontend/src/app/modules/common/option-list/option-list.component.ts index 2cb341c3d7a..0248f5bcd57 100644 --- a/frontend/src/app/modules/common/option-list/option-list.component.ts +++ b/frontend/src/app/modules/common/option-list/option-list.component.ts @@ -34,7 +34,7 @@ export class OpOptionListComponent implements ControlValueAccessor { @HostBinding('class.op-option-list') className = true; @Input() options:IOpOptionListOption[] = []; - @Input() name:string = `op-option-list-${+(new Date())}`; + @Input() name = `op-option-list-${+(new Date())}`; @Output() selectedChange = new EventEmitter(); private _selected:IOpOptionListValue = null; diff --git a/frontend/src/app/modules/common/path-helper/path-helper.service.ts b/frontend/src/app/modules/common/path-helper/path-helper.service.ts index 47e5bd1a593..63eab08d63f 100644 --- a/frontend/src/app/modules/common/path-helper/path-helper.service.ts +++ b/frontend/src/app/modules/common/path-helper/path-helper.service.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; +import { Injectable } from '@angular/core'; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; class Apiv3Paths { readonly apiV3Base:string; @@ -45,7 +45,7 @@ class Apiv3Paths { * @param context */ public previewMarkup(context:string) { - let base = `${this.apiV3Base}/render/markdown`; + const base = `${this.apiV3Base}/render/markdown`; if (context) { return `${base}?context=${context}`; @@ -62,7 +62,7 @@ class Apiv3Paths { * */ public principals(projectId:string|number, term:string|null) { - let filters:ApiV3FilterBuilder = new ApiV3FilterBuilder(); + const filters:ApiV3FilterBuilder = new ApiV3FilterBuilder(); // Only real and activated users: filters.add('status', '!', ['3']); // that are members of that project: @@ -95,7 +95,7 @@ export class PathHelperService { } public attachmentDownloadPath(attachmentIdentifier:string, slug:string|undefined) { - let path = `${this.staticBase}/attachments/${attachmentIdentifier}`; + const path = `${this.staticBase}/attachments/${attachmentIdentifier}`; if (slug) { return `${path}/${slug}`; @@ -211,7 +211,7 @@ export class PathHelperService { } public timeEntriesPath(workPackageId:string|number) { - let suffix = '/time_entries'; + const suffix = '/time_entries'; if (workPackageId) { return this.workPackagePath(workPackageId) + suffix; diff --git a/frontend/src/app/modules/common/persistent-toggle/persistent-toggle.component.ts b/frontend/src/app/modules/common/persistent-toggle/persistent-toggle.component.ts index 4fe1cc61615..d2725773a8b 100644 --- a/frontend/src/app/modules/common/persistent-toggle/persistent-toggle.component.ts +++ b/frontend/src/app/modules/common/persistent-toggle/persistent-toggle.component.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit} from "@angular/core"; +import { Component, ElementRef, OnInit } from "@angular/core"; export const persistentToggleSelector = 'persistent-toggle'; @@ -40,7 +40,7 @@ export class PersistentToggleComponent implements OnInit { private identifier:string; /** Is hidden */ - private isHidden:boolean = false; + private isHidden = false; /** Element reference */ private $element:JQuery; diff --git a/frontend/src/app/modules/common/remote-field-updater/remote-field-updater.component.ts b/frontend/src/app/modules/common/remote-field-updater/remote-field-updater.component.ts index 1e39d08c723..5ee1d55d70b 100644 --- a/frontend/src/app/modules/common/remote-field-updater/remote-field-updater.component.ts +++ b/frontend/src/app/modules/common/remote-field-updater/remote-field-updater.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit} from '@angular/core'; -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {HttpClient} from '@angular/common/http'; +import { Component, ElementRef, OnInit } from '@angular/core'; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { HttpClient } from '@angular/common/http'; export const remoteFieldUpdaterSelector = 'remote-field-updater'; @@ -64,7 +64,7 @@ export class RemoteFieldUpdaterComponent implements OnInit { // tabbing back with shift (16) and // special cases where the tab code is not correctly recognized (undefined). // Thus the focus is kept on the first element of the result list. - let keyCodesArray = [keyCodes.TAB, keyCodes.ENTER, keyCodes.SHIFT]; + const keyCodesArray = [keyCodes.TAB, keyCodes.ENTER, keyCodes.SHIFT]; if (event.type === 'change' || (event.which && keyCodesArray.indexOf(event.which) === -1)) { this.updater(); } @@ -94,7 +94,7 @@ export class RemoteFieldUpdaterComponent implements OnInit { } private updater() { - let params:any = {}; + const params:any = {}; // Gather request keys this.inputs.each((i, el:HTMLInputElement) => { @@ -104,21 +104,21 @@ export class RemoteFieldUpdaterComponent implements OnInit { this .request(params) .subscribe((response:any) => { - if (this.htmlMode) { + if (this.htmlMode) { // Replace the given target - this.target.html(response); - } else { - _.each(response, (val:string, selector:string) => { - let element = document.getElementById(selector) as HTMLElement|HTMLInputElement; + this.target.html(response); + } else { + _.each(response, (val:string, selector:string) => { + const element = document.getElementById(selector) as HTMLElement|HTMLInputElement; - if (element instanceof HTMLInputElement) { - element.value = val; - } else if (element) { - element.textContent = val; - } - }); - } - }); + if (element instanceof HTMLInputElement) { + element.value = val; + } else if (element) { + element.textContent = val; + } + }); + } + }); } } diff --git a/frontend/src/app/modules/common/resizer/resizer.component.ts b/frontend/src/app/modules/common/resizer/resizer.component.ts index ab6801e7a09..a7a3285952f 100644 --- a/frontend/src/app/modules/common/resizer/resizer.component.ts +++ b/frontend/src/app/modules/common/resizer/resizer.component.ts @@ -1,5 +1,5 @@ -import {Component, EventEmitter, HostListener, Input, OnDestroy, Output} from "@angular/core"; -import {DomHelpers} from "core-app/helpers/dom/set-window-cursor.helper"; +import { Component, EventEmitter, HostListener, Input, OnDestroy, Output } from "@angular/core"; +import { DomHelpers } from "core-app/helpers/dom/set-window-cursor.helper"; export interface ResizeDelta { diff --git a/frontend/src/app/modules/common/set-click-position/set-click-position.ts b/frontend/src/app/modules/common/set-click-position/set-click-position.ts index 56cc77b6de7..de668e0e9a8 100644 --- a/frontend/src/app/modules/common/set-click-position/set-click-position.ts +++ b/frontend/src/app/modules/common/set-click-position/set-click-position.ts @@ -1,5 +1,5 @@ -import {debugLog} from '../../../helpers/debug_output'; +import { debugLog } from '../../../helpers/debug_output'; export namespace ClickPositionMapper { /** @@ -31,7 +31,7 @@ export namespace ClickPositionMapper { .caretRangeFromPoint(evt.clientX!, evt.clientY!) .startOffset; } else if (originalEvt.rangeParent) { - let range = document.createRange(); + const range = document.createRange(); range.setStart(originalEvt.rangeParent, originalEvt.rangeOffset); return range.startOffset; } diff --git a/frontend/src/app/modules/common/slide-toggle/slide-toggle.component.spec.ts b/frontend/src/app/modules/common/slide-toggle/slide-toggle.component.spec.ts index eabd94ab5ce..968b9eb4976 100644 --- a/frontend/src/app/modules/common/slide-toggle/slide-toggle.component.spec.ts +++ b/frontend/src/app/modules/common/slide-toggle/slide-toggle.component.spec.ts @@ -1,7 +1,7 @@ -import {ComponentFixture, TestBed} from '@angular/core/testing'; -import {ChangeDetectionStrategy, DebugElement} from '@angular/core'; -import {SlideToggleComponent} from './slide-toggle.component'; -import {FormsModule} from '@angular/forms'; +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { ChangeDetectionStrategy, DebugElement } from '@angular/core'; +import { SlideToggleComponent } from './slide-toggle.component'; +import { FormsModule } from '@angular/forms'; describe('slide toggler', () => { let app:SlideToggleComponent; @@ -27,7 +27,7 @@ describe('slide toggler', () => { app.active = false; fixture.detectChanges(); - let container = document.querySelector('.slide-toggle')!; + const container = document.querySelector('.slide-toggle')!; expect(container.classList.contains('-active')).toBeFalse(); expect(document.contains(container)).toBeTruthy(); })); diff --git a/frontend/src/app/modules/common/tabs/content-tabs/content-tabs.component.ts b/frontend/src/app/modules/common/tabs/content-tabs/content-tabs.component.ts index bd1c2db29fa..e332a738fd2 100644 --- a/frontend/src/app/modules/common/tabs/content-tabs/content-tabs.component.ts +++ b/frontend/src/app/modules/common/tabs/content-tabs/content-tabs.component.ts @@ -31,10 +31,10 @@ import { ElementRef, ChangeDetectionStrategy } from '@angular/core'; -import {GonService} from "core-app/modules/common/gon/gon.service"; -import {StateService} from '@uirouter/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ScrollableTabsComponent} from "core-app/modules/common/tabs/scrollable-tabs/scrollable-tabs.component"; +import { GonService } from "core-app/modules/common/gon/gon.service"; +import { StateService } from '@uirouter/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ScrollableTabsComponent } from "core-app/modules/common/tabs/scrollable-tabs/scrollable-tabs.component"; export const contentTabsSelector = 'content-tabs'; diff --git a/frontend/src/app/modules/common/tabs/scrollable-tabs/scrollable-tabs.component.ts b/frontend/src/app/modules/common/tabs/scrollable-tabs/scrollable-tabs.component.ts index 602a063f335..94c501c80e3 100644 --- a/frontend/src/app/modules/common/tabs/scrollable-tabs/scrollable-tabs.component.ts +++ b/frontend/src/app/modules/common/tabs/scrollable-tabs/scrollable-tabs.component.ts @@ -1,4 +1,4 @@ -import {AfterViewInit, Component, ElementRef, ViewChild} from "@angular/core"; +import { AfterViewInit, Component, ElementRef, ViewChild } from "@angular/core"; export interface Tab { id:string; @@ -16,11 +16,11 @@ export class ScrollableTabsComponent implements AfterViewInit { @ViewChild('scrollRightBtn', { static: true }) scrollRightBtn:ElementRef; @ViewChild('scrollLeftBtn', { static: true }) scrollLeftBtn:ElementRef; - public currentTabId:string = ''; + public currentTabId = ''; public tabs:Tab[] = []; public classes:string[] = ['scrollable-tabs']; - public hideLeftButton:boolean = true; - public hideRightButton:boolean = true; + public hideLeftButton = true; + public hideRightButton = true; private container:Element; private pane:Element; diff --git a/frontend/src/app/modules/common/ui/op-drag-scroll.directive.ts b/frontend/src/app/modules/common/ui/op-drag-scroll.directive.ts index 81302523dd6..7fdd3f0bd96 100644 --- a/frontend/src/app/modules/common/ui/op-drag-scroll.directive.ts +++ b/frontend/src/app/modules/common/ui/op-drag-scroll.directive.ts @@ -25,7 +25,7 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Directive, ElementRef, OnInit} from "@angular/core"; +import { Directive, ElementRef, OnInit } from "@angular/core"; @Directive({ selector: 'op-drag-scroll', diff --git a/frontend/src/app/modules/dashboards/dashboard/dashboard.component.ts b/frontend/src/app/modules/dashboards/dashboard/dashboard.component.ts index d60ca83f489..a5d06da3e8b 100644 --- a/frontend/src/app/modules/dashboards/dashboard/dashboard.component.ts +++ b/frontend/src/app/modules/dashboards/dashboard/dashboard.component.ts @@ -1,6 +1,6 @@ -import {Component} from '@angular/core'; -import {GridPageComponent} from "core-app/modules/grids/grid/page/grid-page.component"; -import {GRID_PROVIDERS} from "core-app/modules/grids/grid/grid.component"; +import { Component } from '@angular/core'; +import { GridPageComponent } from "core-app/modules/grids/grid/page/grid-page.component"; +import { GRID_PROVIDERS } from "core-app/modules/grids/grid/grid.component"; @Component({ selector: 'dashboard', diff --git a/frontend/src/app/modules/dashboards/openproject-dashboards.module.ts b/frontend/src/app/modules/dashboards/openproject-dashboards.module.ts index eae65cee150..17b7b4708a1 100644 --- a/frontend/src/app/modules/dashboards/openproject-dashboards.module.ts +++ b/frontend/src/app/modules/dashboards/openproject-dashboards.module.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {Ng2StateDeclaration, UIRouter, UIRouterModule} from "@uirouter/angular"; -import {DashboardComponent} from "core-app/modules/dashboards/dashboard/dashboard.component"; -import {OpenprojectGridsModule} from "core-app/modules/grids/openproject-grids.module"; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { Ng2StateDeclaration, UIRouter, UIRouterModule } from "@uirouter/angular"; +import { DashboardComponent } from "core-app/modules/dashboards/dashboard/dashboard.component"; +import { OpenprojectGridsModule } from "core-app/modules/grids/openproject-grids.module"; const menuItemClass = 'dashboards-menu-item'; diff --git a/frontend/src/app/modules/editor/openproject-editor.module.ts b/frontend/src/app/modules/editor/openproject-editor.module.ts index 22e8dfd4806..f344c50b4c8 100644 --- a/frontend/src/app/modules/editor/openproject-editor.module.ts +++ b/frontend/src/app/modules/editor/openproject-editor.module.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {FormsModule} from '@angular/forms'; -import {CommonModule} from "@angular/common"; -import {OpenprojectAttachmentsModule} from 'core-app/modules/attachments/openproject-attachments.module'; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {WikiIncludePageMacroModal} from 'core-components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal'; -import {CodeBlockMacroModal} from 'core-components/modals/editor/macro-code-block-modal/code-block-macro.modal'; -import {ChildPagesMacroModal} from 'core-components/modals/editor/macro-child-pages-modal/child-pages-macro.modal'; -import {CkeditorAugmentedTextareaComponent} from 'core-app/ckeditor/ckeditor-augmented-textarea.component'; -import {OpCkeditorComponent} from 'core-app/modules/common/ckeditor/op-ckeditor.component'; -import {EditorMacrosService} from 'core-components/modals/editor/editor-macros.service'; -import {CKEditorSetupService} from 'core-app/modules/common/ckeditor/ckeditor-setup.service'; -import {CKEditorPreviewService} from 'core-app/modules/common/ckeditor/ckeditor-preview.service'; +import { NgModule } from '@angular/core'; +import { FormsModule } from '@angular/forms'; +import { CommonModule } from "@angular/common"; +import { OpenprojectAttachmentsModule } from 'core-app/modules/attachments/openproject-attachments.module'; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { WikiIncludePageMacroModal } from 'core-components/modals/editor/macro-wiki-include-page-modal/wiki-include-page-macro.modal'; +import { CodeBlockMacroModal } from 'core-components/modals/editor/macro-code-block-modal/code-block-macro.modal'; +import { ChildPagesMacroModal } from 'core-components/modals/editor/macro-child-pages-modal/child-pages-macro.modal'; +import { CkeditorAugmentedTextareaComponent } from 'core-app/ckeditor/ckeditor-augmented-textarea.component'; +import { OpCkeditorComponent } from 'core-app/modules/common/ckeditor/op-ckeditor.component'; +import { EditorMacrosService } from 'core-components/modals/editor/editor-macros.service'; +import { CKEditorSetupService } from 'core-app/modules/common/ckeditor/ckeditor-setup.service'; +import { CKEditorPreviewService } from 'core-app/modules/common/ckeditor/ckeditor-preview.service'; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/fields/changeset/resource-changeset.ts b/frontend/src/app/modules/fields/changeset/resource-changeset.ts index 1436fdca088..ae2f8cacdcd 100644 --- a/frontend/src/app/modules/fields/changeset/resource-changeset.ts +++ b/frontend/src/app/modules/fields/changeset/resource-changeset.ts @@ -1,14 +1,14 @@ -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {FormResource} from "core-app/modules/hal/resources/form-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {ChangeItem, ChangeMap, Changeset} from "core-app/modules/fields/changeset/changeset"; -import {input, InputState} from "reactivestates"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {debugLog} from "core-app/helpers/debug_output"; -import {take} from "rxjs/operators"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { FormResource } from "core-app/modules/hal/resources/form-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { ChangeItem, ChangeMap, Changeset } from "core-app/modules/fields/changeset/changeset"; +import { input, InputState } from "reactivestates"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { debugLog } from "core-app/helpers/debug_output"; +import { take } from "rxjs/operators"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; import { Injector } from '@angular/core'; -import {SchemaProxy} from "core-app/modules/hal/schemas/schema-proxy"; +import { SchemaProxy } from "core-app/modules/hal/schemas/schema-proxy"; export const PROXY_IDENTIFIER = '__is_changeset_proxy'; @@ -130,7 +130,7 @@ export class ResourceChangeset { * to get the up to date projected object. */ protected updateForm():Promise { - let payload = this.buildPayloadFromChanges(); + const payload = this.buildPayloadFromChanges(); const promise = this.pristineResource .$links @@ -172,7 +172,7 @@ export class ResourceChangeset { * Returns the changed `to` values of the ChangeMap */ public get changes():{ [key:string]:unknown } { - let changes:{ [key:string]:unknown } = {}; + const changes:{ [key:string]:unknown } = {}; _.each(this.changeset.all, (item, key) => { changes[key] = item.to; @@ -411,7 +411,7 @@ export class ResourceChangeset { // Test if we either have a CollectionResource or a HAL array, // or a single hal value. - let isArrayType = (fieldSchema.type || '').startsWith('[]'); + const isArrayType = (fieldSchema.type || '').startsWith('[]'); let isArray = false; if (val.forEach || val.elements) { @@ -419,10 +419,10 @@ export class ResourceChangeset { } if (isArray && isArrayType) { - let links:{ href:string }[] = []; + const links:{ href:string }[] = []; if (val) { - let elements = (val.forEach && val) || val.elements; + const elements = (val.forEach && val) || val.elements; elements.forEach((link:{ href:string }) => { if (link.href) { diff --git a/frontend/src/app/modules/fields/display/display-field-renderer.ts b/frontend/src/app/modules/fields/display/display-field-renderer.ts index 977bfa660fb..1a05f005d6b 100644 --- a/frontend/src/app/modules/fields/display/display-field-renderer.ts +++ b/frontend/src/app/modules/fields/display/display-field-renderer.ts @@ -1,19 +1,19 @@ -import {Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {DisplayFieldContext, DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {MultipleLinesCustomOptionsDisplayField} from "core-app/modules/fields/display/field-types/multiple-lines-custom-options-display-field.module"; -import {ProgressTextDisplayField} from "core-app/modules/fields/display/field-types/progress-text-display-field.module"; -import {MultipleLinesUserFieldModule} from "core-app/modules/fields/display/field-types/multiple-lines-user-display-field.module"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {ISchemaProxy} from "core-app/modules/hal/schemas/schema-proxy"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {DateDisplayField} from "core-app/modules/fields/display/field-types/date-display-field.module"; +import { Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { DisplayFieldContext, DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { MultipleLinesCustomOptionsDisplayField } from "core-app/modules/fields/display/field-types/multiple-lines-custom-options-display-field.module"; +import { ProgressTextDisplayField } from "core-app/modules/fields/display/field-types/progress-text-display-field.module"; +import { MultipleLinesUserFieldModule } from "core-app/modules/fields/display/field-types/multiple-lines-user-display-field.module"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { ISchemaProxy } from "core-app/modules/hal/schemas/schema-proxy"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { DateDisplayField } from "core-app/modules/fields/display/field-types/date-display-field.module"; export const editableClassName = '-editable'; export const requiredClassName = '-required'; @@ -39,9 +39,9 @@ export class DisplayFieldRenderer { } public render(resource:T, - name:string, - change:ResourceChangeset|null, - placeholder?:string):HTMLSpanElement { + name:string, + change:ResourceChangeset|null, + placeholder?:string):HTMLSpanElement { const [field, span] = this.renderFieldValue(resource, name, change, placeholder); @@ -55,9 +55,9 @@ export class DisplayFieldRenderer { } public renderFieldValue(resource:T, - requestedAttribute:string, - change:ResourceChangeset|null, - placeholder?:string):[DisplayField|null, HTMLSpanElement] { + requestedAttribute:string, + change:ResourceChangeset|null, + placeholder?:string):[DisplayField|null, HTMLSpanElement] { const span = document.createElement('span'); const schema = this.schema(resource, change); const attributeName = this.attributeName(requestedAttribute, schema); @@ -82,9 +82,9 @@ export class DisplayFieldRenderer { } public getField(resource:T, - fieldSchema:IFieldSchema, - attributeName:string, - change:ResourceChangeset|null):DisplayField { + fieldSchema:IFieldSchema, + attributeName:string, + change:ResourceChangeset|null):DisplayField { let field = this.fieldCache[attributeName]; if (!field) { @@ -98,7 +98,7 @@ export class DisplayFieldRenderer { } private getFieldForCurrentContext(resource:T, attributeName:string, fieldSchema:IFieldSchema):DisplayField { - const context:DisplayFieldContext = {container: this.container, injector: this.injector, options: this.options}; + const context:DisplayFieldContext = { container: this.container, injector: this.injector, options: this.options }; // We handle multi value fields differently in the single view context const isCustomMultiLinesField = ['[]CustomOption'].indexOf(fieldSchema.type) >= 0; @@ -167,7 +167,7 @@ export class DisplayFieldRenderer { private getAriaLabel(field:DisplayField, schema:SchemaResource):string { let titleContent; - let labelContent = this.getLabelContent(field); + const labelContent = this.getLabelContent(field); if (field.isFormattable && !field.isEmpty()) { try { @@ -182,7 +182,7 @@ export class DisplayFieldRenderer { } if (field.writable && schema.isAttributeEditable(field.name)) { - return this.I18n.t('js.inplace.button_edit', {attribute: `${field.displayName} ${titleContent}`}); + return this.I18n.t('js.inplace.button_edit', { attribute: `${field.displayName} ${titleContent}` }); } else { return `${field.displayName} ${titleContent}`; } @@ -213,14 +213,14 @@ export class DisplayFieldRenderer { private getDefaultPlaceholder(fieldSchema:IFieldSchema):string { if (fieldSchema.type === 'Formattable') { - return this.I18n.t('js.work_packages.placeholders.formattable', {name: fieldSchema.name}); + return this.I18n.t('js.work_packages.placeholders.formattable', { name: fieldSchema.name }); } return cellEmptyPlaceholder; } private schema(resource:T, change:ResourceChangeset|null) { - if (!!change) { + if (change) { return change.schema; } else if (this.halEditing.typedState(resource).hasValue()) { return this.halEditing.typedState(resource).value!.schema; diff --git a/frontend/src/app/modules/fields/display/display-field.component.ts b/frontend/src/app/modules/fields/display/display-field.component.ts index 884bdb89b74..49d54797b21 100644 --- a/frontend/src/app/modules/fields/display/display-field.component.ts +++ b/frontend/src/app/modules/fields/display/display-field.component.ts @@ -1,10 +1,10 @@ -import {ChangeDetectionStrategy, Component, ElementRef, Injector, Input, OnInit, ViewChild} from '@angular/core'; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {Constructor} from "@angular/cdk/table"; -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { ChangeDetectionStrategy, Component, ElementRef, Injector, Input, OnInit, ViewChild } from '@angular/core'; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { Constructor } from "@angular/cdk/table"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; @Component({ selector: 'display-field', @@ -50,7 +50,7 @@ export class DisplayFieldComponent implements OnInit { private getDisplayFieldInstance(fieldSchema:IFieldSchema) { if (this.displayClass) { - let instance = new this.displayClass(this.fieldName, this.displayFieldContext); + const instance = new this.displayClass(this.fieldName, this.displayFieldContext); instance.apply(this.resource, fieldSchema); return instance; } @@ -64,6 +64,6 @@ export class DisplayFieldComponent implements OnInit { } private get displayFieldContext() { - return { injector: this.injector, container: this.containerType, options: this.displayFieldOptions } + return { injector: this.injector, container: this.containerType, options: this.displayFieldOptions }; } } diff --git a/frontend/src/app/modules/fields/display/display-field.initializer.ts b/frontend/src/app/modules/fields/display/display-field.initializer.ts index bc661e838eb..ff775582a71 100644 --- a/frontend/src/app/modules/fields/display/display-field.initializer.ts +++ b/frontend/src/app/modules/fields/display/display-field.initializer.ts @@ -26,30 +26,30 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {TextDisplayField} from "core-app/modules/fields/display/field-types/text-display-field.module"; -import {FloatDisplayField} from "core-app/modules/fields/display/field-types/float-display-field.module"; -import {IntegerDisplayField} from "core-app/modules/fields/display/field-types/integer-display-field.module"; -import {ResourceDisplayField} from "core-app/modules/fields/display/field-types/resource-display-field.module"; -import {ResourcesDisplayField} from "core-app/modules/fields/display/field-types/resources-display-field.module"; -import {FormattableDisplayField} from "core-app/modules/fields/display/field-types/formattable-display-field.module"; -import {DurationDisplayField} from "core-app/modules/fields/display/field-types/duration-display-field.module"; -import {DateDisplayField} from "core-app/modules/fields/display/field-types/date-display-field.module"; -import {DateTimeDisplayField} from "core-app/modules/fields/display/field-types/datetime-display-field.module"; -import {BooleanDisplayField} from "core-app/modules/fields/display/field-types/boolean-display-field.module"; -import {ProgressDisplayField} from "core-app/modules/fields/display/field-types/progress-display-field.module"; -import {WorkPackageDisplayField} from "core-app/modules/fields/display/field-types/work-package-display-field.module"; -import {WorkPackageSpentTimeDisplayField} from "core-app/modules/fields/display/field-types/wp-spent-time-display-field.module"; -import {IdDisplayField} from "core-app/modules/fields/display/field-types/id-display-field.module"; -import {HighlightedResourceDisplayField} from "core-app/modules/fields/display/field-types/highlighted-resource-display-field.module"; -import {TypeDisplayField} from "core-app/modules/fields/display/field-types/type-display-field.module"; -import {UserDisplayField} from "core-app/modules/fields/display/field-types/user-display-field.module"; -import {MultipleUserFieldModule} from "core-app/modules/fields/display/field-types/multiple-user-display-field.module"; -import {WorkPackageIdDisplayField} from "core-app/modules/fields/display/field-types/wp-id-display-field.module"; -import {ProjectStatusDisplayField} from "core-app/modules/fields/display/field-types/project-status-display-field.module"; -import {PlainFormattableDisplayField} from "core-app/modules/fields/display/field-types/plain-formattable-display-field.module"; -import {LinkedWorkPackageDisplayField} from "core-app/modules/fields/display/field-types/linked-work-package-display-field.module"; -import {CombinedDateDisplayField} from "core-app/modules/fields/display/field-types/combined-date-display.field"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { TextDisplayField } from "core-app/modules/fields/display/field-types/text-display-field.module"; +import { FloatDisplayField } from "core-app/modules/fields/display/field-types/float-display-field.module"; +import { IntegerDisplayField } from "core-app/modules/fields/display/field-types/integer-display-field.module"; +import { ResourceDisplayField } from "core-app/modules/fields/display/field-types/resource-display-field.module"; +import { ResourcesDisplayField } from "core-app/modules/fields/display/field-types/resources-display-field.module"; +import { FormattableDisplayField } from "core-app/modules/fields/display/field-types/formattable-display-field.module"; +import { DurationDisplayField } from "core-app/modules/fields/display/field-types/duration-display-field.module"; +import { DateDisplayField } from "core-app/modules/fields/display/field-types/date-display-field.module"; +import { DateTimeDisplayField } from "core-app/modules/fields/display/field-types/datetime-display-field.module"; +import { BooleanDisplayField } from "core-app/modules/fields/display/field-types/boolean-display-field.module"; +import { ProgressDisplayField } from "core-app/modules/fields/display/field-types/progress-display-field.module"; +import { WorkPackageDisplayField } from "core-app/modules/fields/display/field-types/work-package-display-field.module"; +import { WorkPackageSpentTimeDisplayField } from "core-app/modules/fields/display/field-types/wp-spent-time-display-field.module"; +import { IdDisplayField } from "core-app/modules/fields/display/field-types/id-display-field.module"; +import { HighlightedResourceDisplayField } from "core-app/modules/fields/display/field-types/highlighted-resource-display-field.module"; +import { TypeDisplayField } from "core-app/modules/fields/display/field-types/type-display-field.module"; +import { UserDisplayField } from "core-app/modules/fields/display/field-types/user-display-field.module"; +import { MultipleUserFieldModule } from "core-app/modules/fields/display/field-types/multiple-user-display-field.module"; +import { WorkPackageIdDisplayField } from "core-app/modules/fields/display/field-types/wp-id-display-field.module"; +import { ProjectStatusDisplayField } from "core-app/modules/fields/display/field-types/project-status-display-field.module"; +import { PlainFormattableDisplayField } from "core-app/modules/fields/display/field-types/plain-formattable-display-field.module"; +import { LinkedWorkPackageDisplayField } from "core-app/modules/fields/display/field-types/linked-work-package-display-field.module"; +import { CombinedDateDisplayField } from "core-app/modules/fields/display/field-types/combined-date-display.field"; export function initializeCoreDisplayFields(displayFieldService:DisplayFieldService) { return () => { @@ -83,10 +83,10 @@ export function initializeCoreDisplayFields(displayFieldService:DisplayFieldServ .addFieldType(UserDisplayField, 'user', ['User']); displayFieldService - .addSpecificFieldType('WorkPackage', WorkPackageIdDisplayField, 'id', ['id']) - .addSpecificFieldType('WorkPackage', WorkPackageSpentTimeDisplayField, 'spentTime', ['spentTime']) - .addSpecificFieldType('WorkPackage', CombinedDateDisplayField, 'combinedDate', ['combinedDate']) - .addSpecificFieldType('TimeEntry', PlainFormattableDisplayField, 'comment', ['comment']) - .addSpecificFieldType('TimeEntry', WorkPackageDisplayField, 'work_package', ['workPackage']); + .addSpecificFieldType('WorkPackage', WorkPackageIdDisplayField, 'id', ['id']) + .addSpecificFieldType('WorkPackage', WorkPackageSpentTimeDisplayField, 'spentTime', ['spentTime']) + .addSpecificFieldType('WorkPackage', CombinedDateDisplayField, 'combinedDate', ['combinedDate']) + .addSpecificFieldType('TimeEntry', PlainFormattableDisplayField, 'comment', ['comment']) + .addSpecificFieldType('TimeEntry', WorkPackageDisplayField, 'work_package', ['workPackage']); }; } diff --git a/frontend/src/app/modules/fields/display/display-field.module.ts b/frontend/src/app/modules/fields/display/display-field.module.ts index 0705bc230d4..1c086fbfe98 100644 --- a/frontend/src/app/modules/fields/display/display-field.module.ts +++ b/frontend/src/app/modules/fields/display/display-field.module.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Field, IFieldSchema} from "core-app/modules/fields/field.base"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {DisplayFieldContext} from "core-app/modules/fields/display/display-field.service"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Field, IFieldSchema } from "core-app/modules/fields/field.base"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { DisplayFieldContext } from "core-app/modules/fields/display/display-field.service"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export const cssClassCustomOption = 'custom-option'; @@ -81,8 +81,7 @@ export class DisplayField extends Field { if (this.activeChange) { return this.activeChange.projectedResource[this.name]; - } - else { + } else { return this.attribute; } } diff --git a/frontend/src/app/modules/fields/display/display-field.service.ts b/frontend/src/app/modules/fields/display/display-field.service.ts index 8eb2fdfaf4d..608aed8270c 100644 --- a/frontend/src/app/modules/fields/display/display-field.service.ts +++ b/frontend/src/app/modules/fields/display/display-field.service.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {AbstractFieldService, IFieldType} from "core-app/modules/fields/field.service"; -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; +import { Injectable, Injector } from '@angular/core'; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { AbstractFieldService, IFieldType } from "core-app/modules/fields/field.service"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; export interface IDisplayFieldType extends IFieldType { new(resource:HalResource, attributeType:string, schema:IFieldSchema, context:DisplayFieldContext):DisplayField; @@ -66,7 +66,7 @@ export class DisplayFieldService extends AbstractFieldService { - if (!status.isClosed) { - element.classList.add(Highlighting.overdueDate(diff)); - } - }); + if (!status.isClosed) { + element.classList.add(Highlighting.overdueDate(diff)); + } + }); } } diff --git a/frontend/src/app/modules/fields/display/field-types/datetime-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/datetime-display-field.module.ts index 012be4922e2..92e0251d58e 100644 --- a/frontend/src/app/modules/fields/display/field-types/datetime-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/datetime-display-field.module.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {TimezoneService} from 'core-components/datetime/timezone.service'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { TimezoneService } from 'core-components/datetime/timezone.service'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class DateTimeDisplayField extends DisplayField { @InjectField() timezoneService:TimezoneService; diff --git a/frontend/src/app/modules/fields/display/field-types/duration-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/duration-display-field.module.ts index 1c9bdbb7310..15f896364bb 100644 --- a/frontend/src/app/modules/fields/display/field-types/duration-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/duration-display-field.module.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {TimezoneService} from 'core-components/datetime/timezone.service'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { TimezoneService } from 'core-components/datetime/timezone.service'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class DurationDisplayField extends DisplayField { @InjectField() timezoneService:TimezoneService; @@ -67,14 +67,14 @@ export class DurationDisplayField extends DisplayField { } element.classList.add('split-time-field'); - let value = this.value; - let actual:number = (value && this.timezoneService.toHours(value)) || 0; + const value = this.value; + const actual:number = (value && this.timezoneService.toHours(value)) || 0; if (actual !== 0) { this.renderActual(element, displayText); } - let derived = this.derivedValue; + const derived = this.derivedValue; if (derived && this.timezoneService.toHours(derived) !== 0) { this.renderDerived(element, this.derivedValueString, actual !== 0); } diff --git a/frontend/src/app/modules/fields/display/field-types/float-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/float-display-field.module.ts index baaaba5d6e3..7f6be2a8db5 100644 --- a/frontend/src/app/modules/fields/display/field-types/float-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/float-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class FloatDisplayField extends DisplayField { diff --git a/frontend/src/app/modules/fields/display/field-types/formattable-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/formattable-display-field.module.ts index fb00f26965e..2c33e6d496f 100644 --- a/frontend/src/app/modules/fields/display/field-types/formattable-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/formattable-display-field.module.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {ExpressionService} from "../../../../../../common/expression.service"; -import {ApplicationRef} from "@angular/core"; -import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { ExpressionService } from "../../../../../../common/expression.service"; +import { ApplicationRef } from "@angular/core"; +import { DynamicBootstrapper } from "core-app/globals/dynamic-bootstrapper"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class FormattableDisplayField extends DisplayField { @InjectField() readonly appRef:ApplicationRef; public render(element:HTMLElement, displayText:string, options:any = {}):void { - let div = document.createElement('div'); + const div = document.createElement('div'); div.classList.add( 'read-value--html', diff --git a/frontend/src/app/modules/fields/display/field-types/highlightable-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/highlightable-display-field.module.ts index 7760e603ed8..36a2aa593fd 100644 --- a/frontend/src/app/modules/fields/display/field-types/highlightable-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/highlightable-display-field.module.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { WorkPackageViewHighlightingService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class HighlightableDisplayField extends DisplayField { /** Optionally test if we can inject highlighting service */ diff --git a/frontend/src/app/modules/fields/display/field-types/highlighted-resource-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/highlighted-resource-display-field.module.ts index 73bf662a120..0ca06b231ed 100644 --- a/frontend/src/app/modules/fields/display/field-types/highlighted-resource-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/highlighted-resource-display-field.module.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {HighlightableDisplayField} from "core-app/modules/fields/display/field-types/highlightable-display-field.module"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { HighlightableDisplayField } from "core-app/modules/fields/display/field-types/highlightable-display-field.module"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; export class HighlightedResourceDisplayField extends HighlightableDisplayField { @@ -43,8 +43,7 @@ export class HighlightedResourceDisplayField extends HighlightableDisplayField { public get value() { if (this.schema) { return this.attribute && this.attribute.name; - } - else { + } else { return null; } } diff --git a/frontend/src/app/modules/fields/display/field-types/id-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/id-display-field.module.ts index 81079703cb1..7d3a62f8856 100644 --- a/frontend/src/app/modules/fields/display/field-types/id-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/id-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class IdDisplayField extends DisplayField { public text = { @@ -36,8 +36,7 @@ export class IdDisplayField extends DisplayField { public get value() { if (this.resource.isNew) { return null; - } - else { + } else { return this.resource[this.name]; } } diff --git a/frontend/src/app/modules/fields/display/field-types/integer-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/integer-display-field.module.ts index e5d1a208c38..7c85d10d080 100644 --- a/frontend/src/app/modules/fields/display/field-types/integer-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/integer-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class IntegerDisplayField extends DisplayField { public get value() { diff --git a/frontend/src/app/modules/fields/display/field-types/linked-work-package-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/linked-work-package-display-field.module.ts index 863d4913b5b..6c7ecd78d33 100644 --- a/frontend/src/app/modules/fields/display/field-types/linked-work-package-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/linked-work-package-display-field.module.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {StateService} from '@uirouter/core'; -import {KeepTabService} from 'core-components/wp-single-view-tabs/keep-tab/keep-tab.service'; -import {UiStateLinkBuilder} from "core-components/wp-fast-table/builders/ui-state-link-builder"; -import {WorkPackageDisplayField} from "core-app/modules/fields/display/field-types/work-package-display-field.module"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { StateService } from '@uirouter/core'; +import { KeepTabService } from 'core-components/wp-single-view-tabs/keep-tab/keep-tab.service'; +import { UiStateLinkBuilder } from "core-components/wp-fast-table/builders/ui-state-link-builder"; +import { WorkPackageDisplayField } from "core-app/modules/fields/display/field-types/work-package-display-field.module"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class LinkedWorkPackageDisplayField extends WorkPackageDisplayField { @@ -50,14 +50,14 @@ export class LinkedWorkPackageDisplayField extends WorkPackageDisplayField { return; } - let link = this.uiStateBuilder.linkToShow( + const link = this.uiStateBuilder.linkToShow( this.wpId, this.text.linkTitle, this.valueString ); - let title = document.createElement('span'); - title.textContent = ' ' + _.truncate(this.title, {length: 40}); + const title = document.createElement('span'); + title.textContent = ' ' + _.truncate(this.title, { length: 40 }); element.innerHTML = ''; element.appendChild(link); diff --git a/frontend/src/app/modules/fields/display/field-types/multiple-lines-custom-options-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/multiple-lines-custom-options-display-field.module.ts index e0df953395f..a378b6097cb 100644 --- a/frontend/src/app/modules/fields/display/field-types/multiple-lines-custom-options-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/multiple-lines-custom-options-display-field.module.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ResourcesDisplayField} from "./resources-display-field.module"; -import {cssClassCustomOption} from "core-app/modules/fields/display/display-field.module"; +import { ResourcesDisplayField } from "./resources-display-field.module"; +import { cssClassCustomOption } from "core-app/modules/fields/display/display-field.module"; export class MultipleLinesCustomOptionsDisplayField extends ResourcesDisplayField { diff --git a/frontend/src/app/modules/fields/display/field-types/multiple-lines-user-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/multiple-lines-user-display-field.module.ts index 1f0b59d6375..6bcd408c1a4 100644 --- a/frontend/src/app/modules/fields/display/field-types/multiple-lines-user-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/multiple-lines-user-display-field.module.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ResourcesDisplayField} from "./resources-display-field.module"; -import {UserResource} from "core-app/modules/hal/resources/user-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {UserAvatarRendererService} from "core-components/user/user-avatar/user-avatar-renderer.service"; +import { ResourcesDisplayField } from "./resources-display-field.module"; +import { UserResource } from "core-app/modules/hal/resources/user-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { UserAvatarRendererService } from "core-components/user/user-avatar/user-avatar-renderer.service"; export class MultipleLinesUserFieldModule extends ResourcesDisplayField { @InjectField() avatarRenderer:UserAvatarRendererService; diff --git a/frontend/src/app/modules/fields/display/field-types/multiple-user-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/multiple-user-display-field.module.ts index 783710ca247..3976ed4ec80 100644 --- a/frontend/src/app/modules/fields/display/field-types/multiple-user-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/multiple-user-display-field.module.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ResourcesDisplayField} from "./resources-display-field.module"; -import {UserResource} from "core-app/modules/hal/resources/user-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {UserAvatarRendererService} from "core-components/user/user-avatar/user-avatar-renderer.service"; -import {cssClassCustomOption} from "core-app/modules/fields/display/display-field.module"; +import { ResourcesDisplayField } from "./resources-display-field.module"; +import { UserResource } from "core-app/modules/hal/resources/user-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { UserAvatarRendererService } from "core-components/user/user-avatar/user-avatar-renderer.service"; +import { cssClassCustomOption } from "core-app/modules/fields/display/display-field.module"; export class MultipleUserFieldModule extends ResourcesDisplayField { @InjectField() avatarRenderer:UserAvatarRendererService; diff --git a/frontend/src/app/modules/fields/display/field-types/plain-formattable-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/plain-formattable-display-field.module.ts index 2c3d4a4bc77..df1620896fc 100644 --- a/frontend/src/app/modules/fields/display/field-types/plain-formattable-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/plain-formattable-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class PlainFormattableDisplayField extends DisplayField { public get value() { diff --git a/frontend/src/app/modules/fields/display/field-types/progress-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/progress-display-field.module.ts index 0f7b1f5f262..6a8749078c8 100644 --- a/frontend/src/app/modules/fields/display/field-types/progress-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/progress-display-field.module.ts @@ -26,14 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class ProgressDisplayField extends DisplayField { public get value() { if (this.schema) { return this.resource[this.name] || 0; - } - else { + } else { return null; } } diff --git a/frontend/src/app/modules/fields/display/field-types/progress-text-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/progress-text-display-field.module.ts index 9efc1834308..2a984db4c5d 100644 --- a/frontend/src/app/modules/fields/display/field-types/progress-text-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/progress-text-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ProgressDisplayField} from './progress-display-field.module'; +import { ProgressDisplayField } from './progress-display-field.module'; export class ProgressTextDisplayField extends ProgressDisplayField { public render(element:HTMLElement, displayText:string):void { diff --git a/frontend/src/app/modules/fields/display/field-types/project-status-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/project-status-display-field.module.ts index 22636cf8987..a41b8ef850b 100644 --- a/frontend/src/app/modules/fields/display/field-types/project-status-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/project-status-display-field.module.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {projectStatusCodeCssClass, projectStatusI18n} from "core-app/modules/fields/helpers/project-status-helper"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { projectStatusCodeCssClass, projectStatusI18n } from "core-app/modules/fields/helpers/project-status-helper"; export class ProjectStatusDisplayField extends DisplayField { diff --git a/frontend/src/app/modules/fields/display/field-types/resource-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/resource-display-field.module.ts index e8f73614f06..bc81d46a8ed 100644 --- a/frontend/src/app/modules/fields/display/field-types/resource-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/resource-display-field.module.ts @@ -26,14 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class ResourceDisplayField extends DisplayField { public get value() { if (this.schema) { return this.attribute && this.attribute.name; - } - else { + } else { return null; } } diff --git a/frontend/src/app/modules/fields/display/field-types/resources-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/resources-display-field.module.ts index dac37036414..c08b2b5e621 100644 --- a/frontend/src/app/modules/fields/display/field-types/resources-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/resources-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {cssClassCustomOption, DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { cssClassCustomOption, DisplayField } from "core-app/modules/fields/display/display-field.module"; export class ResourcesDisplayField extends DisplayField { public isEmpty():boolean { @@ -34,7 +34,7 @@ export class ResourcesDisplayField extends DisplayField { } public get value() { - let cf = this.resource[this.name]; + const cf = this.resource[this.name]; if (this.schema && cf) { if (cf.elements) { diff --git a/frontend/src/app/modules/fields/display/field-types/text-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/text-display-field.module.ts index 275d3414dbb..1bedd1f5ece 100644 --- a/frontend/src/app/modules/fields/display/field-types/text-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/text-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class TextDisplayField extends DisplayField { } diff --git a/frontend/src/app/modules/fields/display/field-types/type-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/type-display-field.module.ts index 37f1cf973eb..0a44238fb41 100644 --- a/frontend/src/app/modules/fields/display/field-types/type-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/type-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HighlightedResourceDisplayField} from "core-app/modules/fields/display/field-types/highlighted-resource-display-field.module"; +import { HighlightedResourceDisplayField } from "core-app/modules/fields/display/field-types/highlighted-resource-display-field.module"; export class TypeDisplayField extends HighlightedResourceDisplayField { // Type will always be highlighted diff --git a/frontend/src/app/modules/fields/display/field-types/user-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/user-display-field.module.ts index e5f31c65857..0dfd2809b71 100644 --- a/frontend/src/app/modules/fields/display/field-types/user-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/user-display-field.module.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {UserAvatarRendererService} from "core-components/user/user-avatar/user-avatar-renderer.service"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { UserAvatarRendererService } from "core-components/user/user-avatar/user-avatar-renderer.service"; export class UserDisplayField extends DisplayField { @InjectField() avatarRenderer:UserAvatarRendererService; diff --git a/frontend/src/app/modules/fields/display/field-types/work-package-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/work-package-display-field.module.ts index eec55274447..3e55fd60a60 100644 --- a/frontend/src/app/modules/fields/display/field-types/work-package-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/work-package-display-field.module.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class WorkPackageDisplayField extends DisplayField { diff --git a/frontend/src/app/modules/fields/display/field-types/wp-id-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/wp-id-display-field.module.ts index 6782636144e..c86f0638ebd 100644 --- a/frontend/src/app/modules/fields/display/field-types/wp-id-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/wp-id-display-field.module.ts @@ -26,23 +26,23 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {KeepTabService} from 'core-components/wp-single-view-tabs/keep-tab/keep-tab.service'; -import {StateService} from '@uirouter/core'; -import {UiStateLinkBuilder} from "core-components/wp-fast-table/builders/ui-state-link-builder"; -import {IdDisplayField} from "core-app/modules/fields/display/field-types/id-display-field.module"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { KeepTabService } from 'core-components/wp-single-view-tabs/keep-tab/keep-tab.service'; +import { StateService } from '@uirouter/core'; +import { UiStateLinkBuilder } from "core-components/wp-fast-table/builders/ui-state-link-builder"; +import { IdDisplayField } from "core-app/modules/fields/display/field-types/id-display-field.module"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class WorkPackageIdDisplayField extends IdDisplayField { @InjectField() $state!:StateService; @InjectField() keepTab!:KeepTabService; - + private uiStateBuilder:UiStateLinkBuilder = new UiStateLinkBuilder(this.$state, this.keepTab); public render(element:HTMLElement, displayText:string):void { if (!this.value) { return; } - let link = this.uiStateBuilder.linkToShow( + const link = this.uiStateBuilder.linkToShow( this.value, displayText, this.value diff --git a/frontend/src/app/modules/fields/display/field-types/wp-spent-time-display-field.module.ts b/frontend/src/app/modules/fields/display/field-types/wp-spent-time-display-field.module.ts index 268439c3539..a30cabc95fc 100644 --- a/frontend/src/app/modules/fields/display/field-types/wp-spent-time-display-field.module.ts +++ b/frontend/src/app/modules/fields/display/field-types/wp-spent-time-display-field.module.ts @@ -33,7 +33,7 @@ import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; import * as URI from 'urijs'; import { TimeEntryCreateService } from 'core-app/modules/time_entries/create/create.service'; import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export class WorkPackageSpentTimeDisplayField extends DurationDisplayField { public text = { diff --git a/frontend/src/app/modules/fields/edit/edit-field.component.ts b/frontend/src/app/modules/fields/edit/edit-field.component.ts index 013d81a3854..18dabf5bce1 100644 --- a/frontend/src/app/modules/fields/edit/edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/edit-field.component.ts @@ -36,12 +36,12 @@ import { OnDestroy, OnInit } from "@angular/core"; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Field, IFieldSchema} from "core-app/modules/fields/field.base"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {CurrentProjectService} from 'core-components/projects/current-project.service'; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Field, IFieldSchema } from "core-app/modules/fields/field.base"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { CurrentProjectService } from 'core-components/projects/current-project.service'; export const OpEditingPortalSchemaToken = new InjectionToken('editing-portal--schema'); export const OpEditingPortalHandlerToken = new InjectionToken('editing-portal--handler'); diff --git a/frontend/src/app/modules/fields/edit/edit-field.initializer.ts b/frontend/src/app/modules/fields/edit/edit-field.initializer.ts index 004686d5ac8..1b11070699b 100644 --- a/frontend/src/app/modules/fields/edit/edit-field.initializer.ts +++ b/frontend/src/app/modules/fields/edit/edit-field.initializer.ts @@ -26,25 +26,25 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {EditFieldService} from "core-app/modules/fields/edit/edit-field.service"; -import {TextEditFieldComponent} from "core-app/modules/fields/edit/field-types/text-edit-field.component"; -import {IntegerEditFieldComponent} from "core-app/modules/fields/edit/field-types/integer-edit-field.component"; -import {DurationEditFieldComponent} from "core-app/modules/fields/edit/field-types/duration-edit-field.component"; -import {SelectEditFieldComponent} from "core-app/modules/fields/edit/field-types/select-edit-field.component"; -import {MultiSelectEditFieldComponent} from "core-app/modules/fields/edit/field-types/multi-select-edit-field.component"; -import {FloatEditFieldComponent} from "core-app/modules/fields/edit/field-types/float-edit-field.component"; -import {BooleanEditFieldComponent} from "core-app/modules/fields/edit/field-types/boolean-edit-field.component"; -import {WorkPackageEditFieldComponent} from "core-app/modules/fields/edit/field-types/work-package-edit-field.component"; -import {DateEditFieldComponent} from "core-app/modules/fields/edit/field-types/date-edit-field.component"; -import {FormattableEditFieldComponent} from "core-app/modules/fields/edit/field-types/formattable-edit-field.component"; -import {WorkPackageCommentFieldComponent} from "core-components/work-packages/work-package-comment/wp-comment-field.component"; -import {SelectAutocompleterRegisterService} from "core-app/modules/fields/edit/field-types/select-autocompleter-register.service"; -import {ProjectStatusEditFieldComponent} from "core-app/modules/fields/edit/field-types/project-status-edit-field.component"; -import {PlainFormattableEditFieldComponent} from "core-app/modules/fields/edit/field-types/plain-formattable-edit-field.component"; -import {TimeEntryWorkPackageEditFieldComponent} from "core-app/modules/fields/edit/field-types/te-work-package-edit-field.component"; -import {CombinedDateEditFieldComponent} from "core-app/modules/fields/edit/field-types/combined-date-edit-field.component"; -import {VersionAutocompleterComponent} from "core-app/modules/autocompleter/version-autocompleter/version-autocompleter.component"; -import {WorkPackageAutocompleterComponent} from "core-app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component"; +import { EditFieldService } from "core-app/modules/fields/edit/edit-field.service"; +import { TextEditFieldComponent } from "core-app/modules/fields/edit/field-types/text-edit-field.component"; +import { IntegerEditFieldComponent } from "core-app/modules/fields/edit/field-types/integer-edit-field.component"; +import { DurationEditFieldComponent } from "core-app/modules/fields/edit/field-types/duration-edit-field.component"; +import { SelectEditFieldComponent } from "core-app/modules/fields/edit/field-types/select-edit-field.component"; +import { MultiSelectEditFieldComponent } from "core-app/modules/fields/edit/field-types/multi-select-edit-field.component"; +import { FloatEditFieldComponent } from "core-app/modules/fields/edit/field-types/float-edit-field.component"; +import { BooleanEditFieldComponent } from "core-app/modules/fields/edit/field-types/boolean-edit-field.component"; +import { WorkPackageEditFieldComponent } from "core-app/modules/fields/edit/field-types/work-package-edit-field.component"; +import { DateEditFieldComponent } from "core-app/modules/fields/edit/field-types/date-edit-field.component"; +import { FormattableEditFieldComponent } from "core-app/modules/fields/edit/field-types/formattable-edit-field.component"; +import { WorkPackageCommentFieldComponent } from "core-components/work-packages/work-package-comment/wp-comment-field.component"; +import { SelectAutocompleterRegisterService } from "core-app/modules/fields/edit/field-types/select-autocompleter-register.service"; +import { ProjectStatusEditFieldComponent } from "core-app/modules/fields/edit/field-types/project-status-edit-field.component"; +import { PlainFormattableEditFieldComponent } from "core-app/modules/fields/edit/field-types/plain-formattable-edit-field.component"; +import { TimeEntryWorkPackageEditFieldComponent } from "core-app/modules/fields/edit/field-types/te-work-package-edit-field.component"; +import { CombinedDateEditFieldComponent } from "core-app/modules/fields/edit/field-types/combined-date-edit-field.component"; +import { VersionAutocompleterComponent } from "core-app/modules/autocompleter/version-autocompleter/version-autocompleter.component"; +import { WorkPackageAutocompleterComponent } from "core-app/modules/autocompleter/work-package-autocompleter/wp-autocompleter.component"; export function initializeCoreEditFields(editFieldService:EditFieldService, selectAutocompleterRegisterService:SelectAutocompleterRegisterService) { @@ -77,8 +77,8 @@ export function initializeCoreEditFields(editFieldService:EditFieldService, sele editFieldService .addSpecificFieldType('WorkPackage', CombinedDateEditFieldComponent, - 'date', - ['combinedDate', 'startDate', 'dueDate', 'date']) + 'date', + ['combinedDate', 'startDate', 'dueDate', 'date']) .addSpecificFieldType('TimeEntry', PlainFormattableEditFieldComponent, 'comment', ['comment']) .addSpecificFieldType('TimeEntry', TimeEntryWorkPackageEditFieldComponent, 'workPackage', ['WorkPackage']); diff --git a/frontend/src/app/modules/fields/edit/edit-field.service.ts b/frontend/src/app/modules/fields/edit/edit-field.service.ts index f0504819bcd..ea87f3025f3 100644 --- a/frontend/src/app/modules/fields/edit/edit-field.service.ts +++ b/frontend/src/app/modules/fields/edit/edit-field.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {AbstractFieldService, IFieldType} from "core-app/modules/fields/field.service"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; +import { Injectable } from '@angular/core'; +import { AbstractFieldService, IFieldType } from "core-app/modules/fields/field.service"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; export interface IEditFieldType extends IFieldType { new():EditFieldComponent; diff --git a/frontend/src/app/modules/fields/edit/edit-form/edit-form-routing.service.ts b/frontend/src/app/modules/fields/edit/edit-form/edit-form-routing.service.ts index b67ed79bc29..98482d224df 100644 --- a/frontend/src/app/modules/fields/edit/edit-form/edit-form-routing.service.ts +++ b/frontend/src/app/modules/fields/edit/edit-form/edit-form-routing.service.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Transition} from "@uirouter/core"; -import {Injectable} from "@angular/core"; +import { Transition } from "@uirouter/core"; +import { Injectable } from "@angular/core"; @Injectable() export class EditFormRoutingService { diff --git a/frontend/src/app/modules/fields/edit/edit-form/edit-form.component.ts b/frontend/src/app/modules/fields/edit/edit-form/edit-form.component.ts index 084bb820b81..3bea15afbbd 100644 --- a/frontend/src/app/modules/fields/edit/edit-form/edit-form.component.ts +++ b/frontend/src/app/modules/fields/edit/edit-form/edit-form.component.ts @@ -26,25 +26,25 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, EventEmitter, Injector, Input, OnDestroy, OnInit, Optional, Output} from '@angular/core'; -import {StateService, Transition, TransitionService} from '@uirouter/core'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {EditableAttributeFieldComponent} from 'core-app/modules/fields/edit/field/editable-attribute-field.component'; -import {input} from 'reactivestates'; -import {filter, map, take} from 'rxjs/operators'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Component, ElementRef, EventEmitter, Injector, Input, OnDestroy, OnInit, Optional, Output } from '@angular/core'; +import { StateService, Transition, TransitionService } from '@uirouter/core'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { EditableAttributeFieldComponent } from 'core-app/modules/fields/edit/field/editable-attribute-field.component'; +import { input } from 'reactivestates'; +import { filter, map, take } from 'rxjs/operators'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { activeFieldClassName, activeFieldContainerClassName, EditForm } from "core-app/modules/fields/edit/edit-form/edit-form"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; -import {EditingPortalService} from "core-app/modules/fields/edit/editing-portal/editing-portal-service"; -import {EditFormRoutingService} from "core-app/modules/fields/edit/edit-form/edit-form-routing.service"; -import {ResourceChangesetCommit} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {GlobalEditFormChangesTrackerService} from "core-app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { EditingPortalService } from "core-app/modules/fields/edit/editing-portal/editing-portal-service"; +import { EditFormRoutingService } from "core-app/modules/fields/edit/edit-form/edit-form-routing.service"; +import { ResourceChangesetCommit } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { GlobalEditFormChangesTrackerService } from "core-app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service"; @Component({ selector: 'edit-form,[edit-form]', @@ -52,7 +52,7 @@ import {GlobalEditFormChangesTrackerService} from "core-app/modules/fields/edit/ }) export class EditFormComponent extends EditForm implements OnInit, OnDestroy { @Input('resource') resource:HalResource; - @Input('inEditMode') initializeEditMode:boolean = false; + @Input('inEditMode') initializeEditMode = false; @Input('skippedFields') skippedFields:string[] = []; @Output('onSaved') onSavedEmitter = new EventEmitter<{ savedResource:HalResource, isInitial:boolean }>(); @@ -123,7 +123,7 @@ export class EditFormComponent extends EditForm implements OnInit, }); } - public async reset(fieldName:string, focus:boolean = false) { + public async reset(fieldName:string, focus = false) { const ctrl = await this.waitForField(fieldName); ctrl.reset(); ctrl.deactivate(focus); @@ -131,10 +131,10 @@ export class EditFormComponent extends EditForm implements OnInit, public onSaved(commit:ResourceChangesetCommit) { this.cancel(false); - this.onSavedEmitter.emit({savedResource: commit.resource, isInitial: commit.wasNew }); + this.onSavedEmitter.emit({ savedResource: commit.resource, isInitial: commit.wasNew }); } - public cancel(reset:boolean = false) { + public cancel(reset = false) { this.editMode = false; this.closeEditFields('all', reset); diff --git a/frontend/src/app/modules/fields/edit/edit-form/edit-form.ts b/frontend/src/app/modules/fields/edit/edit-form/edit-form.ts index 3cdd973fcd7..9ab1ef72926 100644 --- a/frontend/src/app/modules/fields/edit/edit-form/edit-form.ts +++ b/frontend/src/app/modules/fields/edit/edit-form/edit-form.ts @@ -26,21 +26,21 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector} from '@angular/core'; -import {ErrorResource} from 'core-app/modules/hal/resources/error-resource'; -import {States} from 'core-components/states.service'; -import {IFieldSchema} from "core-app/modules/fields/field.base"; +import { Injector } from '@angular/core'; +import { ErrorResource } from 'core-app/modules/hal/resources/error-resource'; +import { States } from 'core-components/states.service'; +import { IFieldSchema } from "core-app/modules/fields/field.base"; import { HalResourceEditingService, ResourceChangesetCommit } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export const activeFieldContainerClassName = 'inline-edit--active-field'; export const activeFieldClassName = 'inline-edit--field'; @@ -63,7 +63,7 @@ export abstract class EditForm { public resource:T; // Whether this form exists in edit mode - public editMode:boolean = false; + public editMode = false; protected constructor(public injector:Injector) { } @@ -115,7 +115,7 @@ export abstract class EditForm { * @param fieldName * @param noWarnings Ignore warnings if the field cannot be opened */ - public activate(fieldName:string, noWarnings:boolean = false):Promise { + public activate(fieldName:string, noWarnings = false):Promise { return this.loadFieldSchema(fieldName, noWarnings) .then((schema:IFieldSchema) => { if (!schema.writable && !noWarnings) { @@ -191,7 +191,7 @@ export abstract class EditForm { this.onSaved(result); this.change.inFlight = false; }) - .catch((error:ErrorResource|Object) => { + .catch((error:ErrorResource|unknown) => { this.halNotification.handleRawError(error, this.resource); if (error instanceof ErrorResource) { @@ -212,7 +212,7 @@ export abstract class EditForm { * @param {string[]} fields * @param resetChange whether to undo any changes made */ - public closeEditFields(fields:string[]|'all' = 'all', resetChange:boolean = true) { + public closeEditFields(fields:string[]|'all' = 'all', resetChange = true) { if (fields === 'all') { fields = _.keys(this.activeFields); } @@ -247,7 +247,7 @@ export abstract class EditForm { private setErrorsForFields(erroneousFields:string[]) { // Accumulate errors for the given response - let promises:Promise[] = erroneousFields.map((fieldName:string) => { + const promises:Promise[] = erroneousFields.map((fieldName:string) => { return this.requireVisible(fieldName).then(() => { if (this.activeFields[fieldName]) { this.activeFields[fieldName].setErrors(this.errorsPerAttribute[fieldName] || []); @@ -271,7 +271,7 @@ export abstract class EditForm { * values loaded. * @param fieldName */ - protected loadFieldSchema(fieldName:string, noWarnings:boolean = false):Promise { + protected loadFieldSchema(fieldName:string, noWarnings = false):Promise { return new Promise((resolve, reject) => { this.loadFormAndCheck(fieldName, noWarnings); const fieldSchema:IFieldSchema = this.change.schema.ofProperty(fieldName); @@ -289,7 +289,7 @@ export abstract class EditForm { * @param fieldName * @param noWarnings */ - private loadFormAndCheck(fieldName:string, noWarnings:boolean = false) { + private loadFormAndCheck(fieldName:string, noWarnings = false) { // Ensure the form is being loaded if necessary this.change .getForm() diff --git a/frontend/src/app/modules/fields/edit/editing-portal/edit-field-handler.ts b/frontend/src/app/modules/fields/edit/editing-portal/edit-field-handler.ts index 42f17fcf410..ea99637adc7 100644 --- a/frontend/src/app/modules/fields/edit/editing-portal/edit-field-handler.ts +++ b/frontend/src/app/modules/fields/edit/editing-portal/edit-field-handler.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Subject} from 'rxjs'; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { Subject } from 'rxjs'; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export abstract class EditFieldHandler extends UntilDestroyedMixin { /** diff --git a/frontend/src/app/modules/fields/edit/editing-portal/edit-form-portal.component.ts b/frontend/src/app/modules/fields/edit/editing-portal/edit-form-portal.component.ts index 2463c9574cf..150d03dee76 100644 --- a/frontend/src/app/modules/fields/edit/editing-portal/edit-form-portal.component.ts +++ b/frontend/src/app/modules/fields/edit/editing-portal/edit-form-portal.component.ts @@ -9,16 +9,16 @@ import { OnInit, Output } from "@angular/core"; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; import { OpEditingPortalChangesetToken, OpEditingPortalHandlerToken, OpEditingPortalSchemaToken } from "core-app/modules/fields/edit/edit-field.component"; -import {createLocalInjector} from "core-app/modules/fields/edit/editing-portal/edit-form-portal.injector"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {EditFieldService, IEditFieldType} from "core-app/modules/fields/edit/edit-field.service"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; +import { createLocalInjector } from "core-app/modules/fields/edit/editing-portal/edit-form-portal.injector"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { EditFieldService, IEditFieldType } from "core-app/modules/fields/edit/edit-field.service"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; @Component({ selector: 'edit-form-portal', diff --git a/frontend/src/app/modules/fields/edit/editing-portal/edit-form-portal.injector.ts b/frontend/src/app/modules/fields/edit/editing-portal/edit-form-portal.injector.ts index 4db0eddc083..2c3e2fe29a9 100644 --- a/frontend/src/app/modules/fields/edit/editing-portal/edit-form-portal.injector.ts +++ b/frontend/src/app/modules/fields/edit/editing-portal/edit-form-portal.injector.ts @@ -1,13 +1,13 @@ -import {Injector} from "@angular/core"; +import { Injector } from "@angular/core"; import { OpEditingPortalChangesetToken, OpEditingPortalHandlerToken, OpEditingPortalSchemaToken } from "core-app/modules/fields/edit/edit-field.component"; -import {PortalInjector} from "@angular/cdk/portal"; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; +import { PortalInjector } from "@angular/cdk/portal"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; /** * Creates an injector for the edit field portal to pass data into. diff --git a/frontend/src/app/modules/fields/edit/editing-portal/editing-portal-service.ts b/frontend/src/app/modules/fields/edit/editing-portal/editing-portal-service.ts index dc1d1dd57ec..86db95fcabd 100644 --- a/frontend/src/app/modules/fields/edit/editing-portal/editing-portal-service.ts +++ b/frontend/src/app/modules/fields/edit/editing-portal/editing-portal-service.ts @@ -1,16 +1,16 @@ /** * A CDK portal implementation to wrap edit-fields in non-angular contexts. */ -import {ApplicationRef, ComponentFactoryResolver, Injectable, Injector} from "@angular/core"; -import {ComponentPortal, DomPortalOutlet} from "@angular/cdk/portal"; -import {EditFormPortalComponent} from "core-app/modules/fields/edit/editing-portal/edit-form-portal.component"; -import {createLocalInjector} from "core-app/modules/fields/edit/editing-portal/edit-form-portal.injector"; -import {take} from "rxjs/operators"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {EditForm} from "core-app/modules/fields/edit/edit-form/edit-form"; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; -import {HalResourceEditFieldHandler} from "core-app/modules/fields/edit/field-handler/hal-resource-edit-field-handler"; +import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector } from "@angular/core"; +import { ComponentPortal, DomPortalOutlet } from "@angular/cdk/portal"; +import { EditFormPortalComponent } from "core-app/modules/fields/edit/editing-portal/edit-form-portal.component"; +import { createLocalInjector } from "core-app/modules/fields/edit/editing-portal/edit-form-portal.injector"; +import { take } from "rxjs/operators"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { EditForm } from "core-app/modules/fields/edit/edit-form/edit-form"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { HalResourceEditFieldHandler } from "core-app/modules/fields/edit/field-handler/hal-resource-edit-field-handler"; @Injectable({ providedIn: 'root' }) export class EditingPortalService { @@ -22,11 +22,11 @@ export class EditingPortalService { } public create(container:HTMLElement, - injector:Injector, - form:EditForm, - schema:IFieldSchema, - fieldName:string, - errors:string[]):Promise { + injector:Injector, + form:EditForm, + schema:IFieldSchema, + fieldName:string, + errors:string[]):Promise { // Create the portal outlet const outlet = this.createDomOutlet(container, injector); diff --git a/frontend/src/app/modules/fields/edit/field-controls/edit-field-controls.component.ts b/frontend/src/app/modules/fields/edit/field-controls/edit-field-controls.component.ts index d5e9656acca..bdbc0331482 100644 --- a/frontend/src/app/modules/fields/edit/field-controls/edit-field-controls.component.ts +++ b/frontend/src/app/modules/fields/edit/field-controls/edit-field-controls.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Input, Output, EventEmitter} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; +import { Component, Input, Output, EventEmitter } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; @Component({ selector: 'edit-field-controls', diff --git a/frontend/src/app/modules/fields/edit/field-handler/hal-resource-edit-field-handler.ts b/frontend/src/app/modules/fields/edit/field-handler/hal-resource-edit-field-handler.ts index e6827e09634..95899323103 100644 --- a/frontend/src/app/modules/fields/edit/field-handler/hal-resource-edit-field-handler.ts +++ b/frontend/src/app/modules/fields/edit/field-handler/hal-resource-edit-field-handler.ts @@ -26,20 +26,20 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {Injector} from '@angular/core'; -import {FocusHelperService} from 'core-app/modules/common/focus/focus-helper'; -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; -import {ClickPositionMapper} from "core-app/modules/common/set-click-position/set-click-position"; -import {debugLog} from "core-app/helpers/debug_output"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {Subject} from 'rxjs'; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {EditForm} from "core-app/modules/fields/edit/edit-form/edit-form"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { Injector } from '@angular/core'; +import { FocusHelperService } from 'core-app/modules/common/focus/focus-helper'; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { ClickPositionMapper } from "core-app/modules/common/set-click-position/set-click-position"; +import { debugLog } from "core-app/helpers/debug_output"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { Subject } from 'rxjs'; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { EditForm } from "core-app/modules/fields/edit/edit-form/edit-form"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class HalResourceEditFieldHandler extends EditFieldHandler { // Injections @@ -136,7 +136,7 @@ export class HalResourceEditFieldHandler extends EditFieldHandler { * In an edit mode, we can't derive from a submit event wheteher the user pressed enter * (and on what field he did that). */ - public handleUserKeydown(event:JQuery.TriggeredEvent, onlyCancel:boolean = false) { + public handleUserKeydown(event:JQuery.TriggeredEvent, onlyCancel = false) { // Only handle submission in edit mode if (this.inEditMode && !onlyCancel) { if (event.which === keyCodes.ENTER) { @@ -175,7 +175,7 @@ export class HalResourceEditFieldHandler extends EditFieldHandler { /** * Close the field, resetting it with its display value. */ - public deactivate(focus:boolean = false) { + public deactivate(focus = false) { delete this.form.activeFields[this.fieldName]; this.onDestroy.next(); this.onDestroy.complete(); @@ -215,7 +215,7 @@ export class HalResourceEditFieldHandler extends EditFieldHandler { return ''; } else { return this.I18n.t('js.inplace.errors.messages_on_field', - {messages: this.errors.join(' ')}); + { messages: this.errors.join(' ') }); } } diff --git a/frontend/src/app/modules/fields/edit/field-types/boolean-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/boolean-edit-field.component.ts index dd9a15a78c5..34158f27fbc 100644 --- a/frontend/src/app/modules/fields/edit/field-types/boolean-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/boolean-edit-field.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; +import { Component } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; @Component({ diff --git a/frontend/src/app/modules/fields/edit/field-types/combined-date-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/combined-date-edit-field.component.ts index 8eeda05870c..756ec5e1c97 100644 --- a/frontend/src/app/modules/fields/edit/field-types/combined-date-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/combined-date-edit-field.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, OnDestroy, OnInit} from "@angular/core"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {DatePickerModal} from "core-components/datepicker/datepicker.modal"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {take} from "rxjs/operators"; -import {DateEditFieldComponent} from "core-app/modules/fields/edit/field-types/date-edit-field.component"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; +import { Component, OnDestroy, OnInit } from "@angular/core"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { DatePickerModal } from "core-components/datepicker/datepicker.modal"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { take } from "rxjs/operators"; +import { DateEditFieldComponent } from "core-app/modules/fields/edit/field-types/date-edit-field.component"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; @Component({ template: ` @@ -46,7 +46,7 @@ export class CombinedDateEditFieldComponent extends DateEditFieldComponent imple @InjectField() readonly timezoneService:TimezoneService; @InjectField() opModalService:OpModalService; - dates:string = ''; + dates = ''; text_no_start_date = this.I18n.t('js.label_no_start_date'); text_no_due_date = this.I18n.t('js.label_no_due_date'); diff --git a/frontend/src/app/modules/fields/edit/field-types/date-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/date-edit-field.component.ts index b3045cd813e..98fecb99b3e 100644 --- a/frontend/src/app/modules/fields/edit/field-types/date-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/date-edit-field.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, OnInit} from "@angular/core"; +import { Component, OnInit } from "@angular/core"; import * as moment from "moment"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {OpModalService} from "core-app/modules/modal/modal.service"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { OpModalService } from "core-app/modules/modal/modal.service"; @Component({ template: ` diff --git a/frontend/src/app/modules/fields/edit/field-types/duration-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/duration-edit-field.component.ts index 4d6bb61da28..f810296c3d7 100644 --- a/frontend/src/app/modules/fields/edit/field-types/duration-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/duration-edit-field.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {TimezoneService} from 'core-components/datetime/timezone.service'; +import { TimezoneService } from 'core-components/datetime/timezone.service'; import * as moment from 'moment'; -import {Component} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { Component } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; @Component({ template: ` diff --git a/frontend/src/app/modules/fields/edit/field-types/float-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/float-edit-field.component.ts index 27532aa8850..42a39cfe2ce 100644 --- a/frontend/src/app/modules/fields/edit/field-types/float-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/float-edit-field.component.ts @@ -25,8 +25,8 @@ // See docs/COPYRIGHT.rdoc for more details. // ++ -import {Component} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; +import { Component } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; @Component({ template: ` diff --git a/frontend/src/app/modules/fields/edit/field-types/formattable-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/formattable-edit-field.component.ts index 3aa4c86be63..560d8554d17 100644 --- a/frontend/src/app/modules/fields/edit/field-types/formattable-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/formattable-edit-field.component.ts @@ -25,10 +25,10 @@ // See docs/COPYRIGHT.rdoc for more details. // ++ -import {Component, OnInit, ViewChild, ChangeDetectionStrategy} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; -import {OpCkeditorComponent} from "core-app/modules/common/ckeditor/op-ckeditor.component"; -import {ICKEditorContext, ICKEditorInstance} from "core-app/modules/common/ckeditor/ckeditor-setup.service"; +import { Component, OnInit, ViewChild, ChangeDetectionStrategy } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; +import { OpCkeditorComponent } from "core-app/modules/common/ckeditor/op-ckeditor.component"; +import { ICKEditorContext, ICKEditorInstance } from "core-app/modules/common/ckeditor/ckeditor-setup.service"; export const formattableFieldTemplate = `
    @@ -64,8 +64,8 @@ export class FormattableEditFieldComponent extends EditFieldComponent implements @ViewChild(OpCkeditorComponent, { static: true }) editor:OpCkeditorComponent; // Values used in template - public isPreview:boolean = false; - public previewHtml:string = ''; + public isPreview = false; + public previewHtml = ''; public text:any = {}; public editorType = this.resource.getEditorTypeFor(this.field.name); @@ -76,8 +76,8 @@ export class FormattableEditFieldComponent extends EditFieldComponent implements this.handler.registerOnSubmit(() => this.getCurrentValue()); this.text = { attachmentLabel: this.I18n.t('js.label_formattable_attachment_hint'), - save: this.I18n.t('js.inplace.button_save', {attribute: this.schema.name}), - cancel: this.I18n.t('js.inplace.button_cancel', {attribute: this.schema.name}) + save: this.I18n.t('js.inplace.button_save', { attribute: this.schema.name }), + cancel: this.I18n.t('js.inplace.button_cancel', { attribute: this.schema.name }) }; } @@ -115,7 +115,7 @@ export class FormattableEditFieldComponent extends EditFieldComponent implements public get ckEditorContext():ICKEditorContext { return { resource: this.change.pristineResource, - macros: 'none' as 'none', + macros: 'none' as const, previewContext: this.previewContext, options: { rtl: this.schema.options && this.schema.options.rtl } }; diff --git a/frontend/src/app/modules/fields/edit/field-types/integer-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/integer-edit-field.component.ts index b7fb9e4a429..a6761c672bd 100644 --- a/frontend/src/app/modules/fields/edit/field-types/integer-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/integer-edit-field.component.ts @@ -25,8 +25,8 @@ // See docs/COPYRIGHT.rdoc for more details. // ++ -import {Component} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; +import { Component } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; @Component({ template: ` diff --git a/frontend/src/app/modules/fields/edit/field-types/multi-select-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/multi-select-edit-field.component.ts index 3f2e70e5237..3c0aa8fe535 100644 --- a/frontend/src/app/modules/fields/edit/field-types/multi-select-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/multi-select-edit-field.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {Component, OnInit, ViewChild} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; -import {ValueOption} from "core-app/modules/fields/edit/field-types/select-edit-field.component"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { Component, OnInit, ViewChild } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; +import { ValueOption } from "core-app/modules/fields/edit/field-types/select-edit-field.component"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; @Component({ templateUrl: './multi-select-edit-field.component.html' @@ -54,7 +54,7 @@ export class MultiSelectEditFieldComponent extends EditFieldComponent implements public appendTo:any = null; private hiddenOverflowContainer = '.__hidden_overflow_container'; - public currentValueInvalid:boolean = false; + public currentValueInvalid = false; private nullOption:ValueOption; private _selectedOption:ValueOption[]; @@ -107,8 +107,8 @@ export class MultiSelectEditFieldComponent extends EditFieldComponent implements */ public set selectedOption(val:ValueOption[]) { this._selectedOption = val; - let mapper = (val:ValueOption) => { - let option = _.find(this.availableOptions, o => o.$href === val.$href) || this.nullOption; + const mapper = (val:ValueOption) => { + const option = _.find(this.availableOptions, o => o.$href === val.$href) || this.nullOption; // Special case 'null' value, which angular // only understands in ng-options as an empty string. @@ -141,7 +141,7 @@ export class MultiSelectEditFieldComponent extends EditFieldComponent implements private openAutocompleteSelectField() { // The timeout takes care that the opening is added to the end of the current call stack. // Thus we can be sure that the autocompleter is rendered and ready to be opened. - let that = this; + const that = this; window.setTimeout(function () { that.ngSelectComponent.open(); }, 0); @@ -157,11 +157,11 @@ export class MultiSelectEditFieldComponent extends EditFieldComponent implements return result || this.nullOption; } - private setValues(availableValues:any[], sortValuesByName:boolean = false) { + private setValues(availableValues:any[], sortValuesByName = false) { if (sortValuesByName) { availableValues.sort(function (a:any, b:any) { - let nameA = a.name.toLowerCase(); - let nameB = b.name.toLowerCase(); + const nameA = a.name.toLowerCase(); + const nameB = b.name.toLowerCase(); return nameA < nameB ? -1 : nameA > nameB ? 1 : 0; }); } @@ -185,7 +185,7 @@ export class MultiSelectEditFieldComponent extends EditFieldComponent implements } private loadValues() { - let allowedValues = this.schema.allowedValues; + const allowedValues = this.schema.allowedValues; if (Array.isArray(allowedValues)) { this.setValues(allowedValues); } else if (this.schema.allowedValues) { @@ -209,7 +209,7 @@ export class MultiSelectEditFieldComponent extends EditFieldComponent implements // (If value AND) // MultiSelect AND there is no value which href is not in the options hrefs (!_.some(this.value, (value:HalResource) => { - return _.some(this.availableOptions, (option) => (option.$href === value.$href)) + return _.some(this.availableOptions, (option) => (option.$href === value.$href)); })) ); } else { diff --git a/frontend/src/app/modules/fields/edit/field-types/plain-formattable-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/plain-formattable-edit-field.component.ts index 8f5344708f7..9269961be7f 100644 --- a/frontend/src/app/modules/fields/edit/field-types/plain-formattable-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/plain-formattable-edit-field.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; +import { Component } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; @Component({ templateUrl: './text-edit-field.component.html' diff --git a/frontend/src/app/modules/fields/edit/field-types/project-status-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/project-status-edit-field.component.ts index 47a7692c579..c722dee656e 100644 --- a/frontend/src/app/modules/fields/edit/field-types/project-status-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/project-status-edit-field.component.ts @@ -26,23 +26,23 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {Component, OnInit, ViewChild} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {projectStatusCodeCssClass, projectStatusI18n} from "core-app/modules/fields/helpers/project-status-helper"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { Component, OnInit, ViewChild } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { projectStatusCodeCssClass, projectStatusI18n } from "core-app/modules/fields/helpers/project-status-helper"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; @Component({ templateUrl: './project-status-edit-field.component.html', styleUrls: ['./project-status-edit-field.component.sass'] }) export class ProjectStatusEditFieldComponent extends EditFieldComponent implements OnInit { - @ViewChild(NgSelectComponent, {static: true}) public ngSelectComponent:NgSelectComponent; + @ViewChild(NgSelectComponent, { static: true }) public ngSelectComponent:NgSelectComponent; @InjectField() I18n!:I18nService; private _availableStatusCodes:string[] = ['not set', 'off track', 'at risk', 'on track']; - public currentStatusCode:string = 'not set'; + public currentStatusCode = 'not set'; public availableStatuses:any[] = this._availableStatusCodes.map((code:string):any => { return { @@ -60,7 +60,7 @@ export class ProjectStatusEditFieldComponent extends EditFieldComponent implemen // The timeout takes care that the opening is added to the end of the current call stack. // Thus we can be sure that the select box is rendered and ready to be opened. - let that = this; + const that = this; window.setTimeout(function () { that.ngSelectComponent.open(); }, 0); diff --git a/frontend/src/app/modules/fields/edit/field-types/select-autocompleter-register.service.ts b/frontend/src/app/modules/fields/edit/field-types/select-autocompleter-register.service.ts index 54223919ea1..7d8034dd073 100644 --- a/frontend/src/app/modules/fields/edit/field-types/select-autocompleter-register.service.ts +++ b/frontend/src/app/modules/fields/edit/field-types/select-autocompleter-register.service.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; +import { Injectable } from '@angular/core'; interface SelectAutocompleterAssignment { attribute:string; @@ -42,7 +42,7 @@ export class SelectAutocompleterRegisterService { } public getAutocompleterOfAttribute(attribute:string) { - let assignment = _.find(this._fields, field => field.attribute === attribute); + const assignment = _.find(this._fields, field => field.attribute === attribute); return assignment ? assignment.component : undefined; } } diff --git a/frontend/src/app/modules/fields/edit/field-types/select-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/select-edit-field.component.ts index 230f6aa2506..ec4205c6f3b 100644 --- a/frontend/src/app/modules/fields/edit/field-types/select-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/select-edit-field.component.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, OnInit} from '@angular/core'; -import {HalResourceSortingService} from 'core-app/modules/hal/services/hal-resource-sorting.service'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {EditFieldComponent} from '../edit-field.component'; -import {SelectAutocompleterRegisterService} from 'app/modules/fields/edit/field-types/select-autocompleter-register.service'; -import {from} from 'rxjs'; -import {map, tap} from 'rxjs/operators'; -import {HalResourceNotificationService} from 'core-app/modules/hal/services/hal-resource-notification.service'; -import {InjectField} from 'core-app/helpers/angular/inject-field.decorator'; -import {PermissionsService} from 'core-app/core/services/permissions/permissions.service'; -import {CreateAutocompleterComponent} from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component"; +import { Component, OnInit } from '@angular/core'; +import { HalResourceSortingService } from 'core-app/modules/hal/services/hal-resource-sorting.service'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { EditFieldComponent } from '../edit-field.component'; +import { SelectAutocompleterRegisterService } from 'app/modules/fields/edit/field-types/select-autocompleter-register.service'; +import { from } from 'rxjs'; +import { map, tap } from 'rxjs/operators'; +import { HalResourceNotificationService } from 'core-app/modules/hal/services/hal-resource-notification.service'; +import { InjectField } from 'core-app/helpers/angular/inject-field.decorator'; +import { PermissionsService } from 'core-app/core/services/permissions/permissions.service'; +import { CreateAutocompleterComponent } from "core-app/modules/autocompleter/create-autocompleter/create-autocompleter.component"; export interface ValueOption { name:string; @@ -70,7 +70,7 @@ export class SelectEditFieldComponent extends EditFieldComponent implements OnIn return _.find(this.valueOptions, o => o.$href === href)!; } public set selectedOption(val:ValueOption) { - let option = _.find(this.availableOptions, o => o.$href === val.$href); + const option = _.find(this.availableOptions, o => o.$href === val.$href); // Special case 'null' value, which angular // only understands in ng-options as an empty string. @@ -124,8 +124,8 @@ export class SelectEditFieldComponent extends EditFieldComponent implements OnIn initializeShowAddButton() { if (this.schema.type === 'User') { this.permissionsService - .canInviteUsersToProject() - .subscribe(canInviteUsersToProject => this.showAddNewButton = canInviteUsersToProject); + .canInviteUsersToProject() + .subscribe(canInviteUsersToProject => this.showAddNewButton = canInviteUsersToProject); } } @@ -135,7 +135,7 @@ export class SelectEditFieldComponent extends EditFieldComponent implements OnIn } public autocompleterComponent() { - let type = this.schema.type; + const type = this.schema.type; return this.selectAutocompleterRegister.getAutocompleterOfAttribute(type) || CreateAutocompleterComponent; } @@ -146,7 +146,7 @@ export class SelectEditFieldComponent extends EditFieldComponent implements OnIn } protected loadValues(query?:string) { - let allowedValues = this.schema.allowedValues; + const allowedValues = this.schema.allowedValues; if (Array.isArray(allowedValues)) { this.setValues(allowedValues); diff --git a/frontend/src/app/modules/fields/edit/field-types/te-work-package-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/te-work-package-edit-field.component.ts index e4aa77e2735..45950128077 100644 --- a/frontend/src/app/modules/fields/edit/field-types/te-work-package-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/te-work-package-edit-field.component.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from "@angular/core"; -import {WorkPackageEditFieldComponent} from "core-app/modules/fields/edit/field-types/work-package-edit-field.component"; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component } from "@angular/core"; +import { WorkPackageEditFieldComponent } from "core-app/modules/fields/edit/field-types/work-package-edit-field.component"; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; import { TimeEntryWorkPackageAutocompleterComponent, TimeEntryWorkPackageAutocompleterMode @@ -55,7 +55,7 @@ export class TimeEntryWorkPackageEditFieldComponent extends WorkPackageEditField if (this.referenceOutputs) { this.referenceOutputs['modeSwitch'] = (mode:TimeEntryWorkPackageAutocompleterMode) => { this.valuesLoaded = false; - let lastValue = this.requests.lastRequestedValue!; + const lastValue = this.requests.lastRequestedValue!; // Hack to provide a new value to "reset" the input. // Only the second input is actually processed as the input is debounced. @@ -103,7 +103,7 @@ export class TimeEntryWorkPackageEditFieldComponent extends WorkPackageEditField } protected allowedValuesFilter(query?:string):{} { - let filters:ApiV3FilterBuilder = new ApiV3FilterBuilder(); + const filters:ApiV3FilterBuilder = new ApiV3FilterBuilder(); if ((this._autocompleterComponent as TimeEntryWorkPackageAutocompleterComponent).mode === 'recent') { filters.add('id', '=', this.recentWorkPackageIds); diff --git a/frontend/src/app/modules/fields/edit/field-types/text-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/text-edit-field.component.ts index e0adcbbd002..c061d509b1b 100644 --- a/frontend/src/app/modules/fields/edit/field-types/text-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/text-edit-field.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from "@angular/core"; -import {EditFieldComponent} from "core-app/modules/fields/edit/edit-field.component"; +import { Component } from "@angular/core"; +import { EditFieldComponent } from "core-app/modules/fields/edit/edit-field.component"; @Component({ templateUrl: './text-edit-field.component.html' diff --git a/frontend/src/app/modules/fields/edit/field-types/work-package-edit-field.component.ts b/frontend/src/app/modules/fields/edit/field-types/work-package-edit-field.component.ts index bd2c01afa82..a76a4ecb189 100644 --- a/frontend/src/app/modules/fields/edit/field-types/work-package-edit-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field-types/work-package-edit-field.component.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from "@angular/core"; -import {SelectEditFieldComponent, ValueOption} from './select-edit-field.component'; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {DebouncedRequestSwitchmap, errorNotificationHandler} from "core-app/helpers/rxjs/debounced-input-switchmap"; +import { Component } from "@angular/core"; +import { SelectEditFieldComponent, ValueOption } from './select-edit-field.component'; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { DebouncedRequestSwitchmap, errorNotificationHandler } from "core-app/helpers/rxjs/debounced-input-switchmap"; import { take } from 'rxjs/operators'; @Component({ @@ -69,7 +69,7 @@ export class WorkPackageEditFieldComponent extends SelectEditFieldComponent { let filterParams = super.allowedValuesFilter(query); if (query) { - let filters:ApiV3FilterBuilder = new ApiV3FilterBuilder(); + const filters:ApiV3FilterBuilder = new ApiV3FilterBuilder(); filters.add('subjectOrId', '**', [query]); @@ -82,8 +82,8 @@ export class WorkPackageEditFieldComponent extends SelectEditFieldComponent { protected mapAllowedValue(value:WorkPackageResource|ValueOption):ValueOption { if ((value as WorkPackageResource).id) { - let prefix = (value as WorkPackageResource).type ? `${(value as WorkPackageResource).type.name} ` : ''; - let suffix = (value as WorkPackageResource).subject || value.name; + const prefix = (value as WorkPackageResource).type ? `${(value as WorkPackageResource).type.name} ` : ''; + const suffix = (value as WorkPackageResource).subject || value.name; return { name: `${prefix}#${ (value as WorkPackageResource).id } ${suffix}`, diff --git a/frontend/src/app/modules/fields/edit/field/editable-attribute-field.component.ts b/frontend/src/app/modules/fields/edit/field/editable-attribute-field.component.ts index 46ed639677c..63eb6da5daf 100644 --- a/frontend/src/app/modules/fields/edit/field/editable-attribute-field.component.ts +++ b/frontend/src/app/modules/fields/edit/field/editable-attribute-field.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {States} from 'core-components/states.service'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {SelectionHelpers} from '../../../../helpers/selection-helpers'; -import {debugLog} from '../../../../helpers/debug_output'; +import { States } from 'core-components/states.service'; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { SelectionHelpers } from '../../../../helpers/selection-helpers'; +import { debugLog } from '../../../../helpers/debug_output'; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -41,16 +41,16 @@ import { OnInit, Optional, ViewChild } from '@angular/core'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {ClickPositionMapper} from "core-app/modules/common/set-click-position/set-click-position"; -import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {ISchemaProxy} from "core-app/modules/hal/schemas/schema-proxy"; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { ClickPositionMapper } from "core-app/modules/common/set-click-position/set-click-position"; +import { EditFormComponent } from "core-app/modules/fields/edit/edit-form/edit-form.component"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { ISchemaProxy } from "core-app/modules/hal/schemas/schema-proxy"; import { displayClassName, DisplayFieldRenderer, @@ -78,7 +78,7 @@ export class EditableAttributeFieldComponent extends UntilDestroyedMixin impleme public active = false; private $element:JQuery; - public destroyed:boolean = false; + public destroyed = false; constructor(protected states:States, protected injector:Injector, @@ -95,7 +95,7 @@ export class EditableAttributeFieldComponent extends UntilDestroyedMixin impleme super(); } - public setActive(active:boolean = true) { + public setActive(active = true) { this.active = active; if (!this.componentDestroyed) { this.cdRef.detectChanges(); @@ -138,7 +138,7 @@ export class EditableAttributeFieldComponent extends UntilDestroyedMixin impleme this.displayContainer.nativeElement.appendChild(el); } - public deactivate(focus:boolean = false) { + public deactivate(focus = false) { this.editContainer.nativeElement.innerHTML = ''; this.editContainer.nativeElement.hidden = true; this.setActive(false); @@ -176,7 +176,7 @@ export class EditableAttributeFieldComponent extends UntilDestroyedMixin impleme return false; } - public activateOnForm(noWarnings:boolean = false) { + public activateOnForm(noWarnings = false) { // Activate the field this.setActive(true); diff --git a/frontend/src/app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service.spec.ts b/frontend/src/app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service.spec.ts index d7ab5554b09..d9ea11544d9 100644 --- a/frontend/src/app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service.spec.ts +++ b/frontend/src/app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service.spec.ts @@ -1,6 +1,6 @@ import { TestBed } from '@angular/core/testing'; import { GlobalEditFormChangesTrackerService } from './global-edit-form-changes-tracker.service'; -import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component"; +import { EditFormComponent } from "core-app/modules/fields/edit/edit-form/edit-form.component"; describe('GlobalEditFormChangesTrackerService', () => { let service:GlobalEditFormChangesTrackerService; diff --git a/frontend/src/app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service.ts b/frontend/src/app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service.ts index 402a1edbc9a..c3bc036c670 100644 --- a/frontend/src/app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service.ts +++ b/frontend/src/app/modules/fields/edit/services/global-edit-form-changes-tracker/global-edit-form-changes-tracker.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; -import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { EditFormComponent } from "core-app/modules/fields/edit/edit-form/edit-form.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Injectable({ providedIn: 'root' diff --git a/frontend/src/app/modules/fields/edit/services/hal-resource-editing.service.ts b/frontend/src/app/modules/fields/edit/services/hal-resource-editing.service.ts index 5db14d3e962..bcdceb76342 100644 --- a/frontend/src/app/modules/fields/edit/services/hal-resource-editing.service.ts +++ b/frontend/src/app/modules/fields/edit/services/hal-resource-editing.service.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {combine, deriveRaw, InputState, multiInput, MultiInputState, State, StatesGroup} from 'reactivestates'; -import {filter, map} from 'rxjs/operators'; -import {Injectable, Injector} from '@angular/core'; -import {Subject} from "rxjs"; -import {FormResource} from "core-app/modules/hal/resources/form-resource"; -import {ChangeMap} from "core-app/modules/fields/changeset/changeset"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {HookService} from "core-app/modules/plugins/hook-service"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {StateCacheService} from "core-app/modules/apiv3/cache/state-cache.service"; +import { combine, deriveRaw, InputState, multiInput, MultiInputState, State, StatesGroup } from 'reactivestates'; +import { filter, map } from 'rxjs/operators'; +import { Injectable, Injector } from '@angular/core'; +import { Subject } from "rxjs"; +import { FormResource } from "core-app/modules/hal/resources/form-resource"; +import { ChangeMap } from "core-app/modules/fields/changeset/changeset"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { HookService } from "core-app/modules/plugins/hook-service"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { StateCacheService } from "core-app/modules/apiv3/cache/state-cache.service"; class ChangesetStates extends StatesGroup { name = 'Changesets'; @@ -183,7 +183,7 @@ export class HalResourceEditingService extends StateCacheService { fieldType:string; @@ -62,13 +62,13 @@ export abstract class AbstractFieldService { - this.load(); + this.load(); - return new Promise((resolve, reject) => { - this.helpTexts - .valuesPromise() - .then(() => resolve(this.find(attribute, scope))); - }); + return new Promise((resolve, reject) => { + this.helpTexts + .valuesPromise() + .then(() => resolve(this.find(attribute, scope))); + }); } /** diff --git a/frontend/src/app/modules/fields/helpers/project-status-helper.ts b/frontend/src/app/modules/fields/helpers/project-status-helper.ts index ad1b38e5d7c..24eccb67347 100644 --- a/frontend/src/app/modules/fields/helpers/project-status-helper.ts +++ b/frontend/src/app/modules/fields/helpers/project-status-helper.ts @@ -1,4 +1,4 @@ -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; export function projectStatusCodeCssClass(code:string|null|undefined):string { code = ensureDefaultCode(code); diff --git a/frontend/src/app/modules/fields/macros/attribute-label-macro.component.ts b/frontend/src/app/modules/fields/macros/attribute-label-macro.component.ts index f1f052c8130..28587b56233 100644 --- a/frontend/src/app/modules/fields/macros/attribute-label-macro.component.ts +++ b/frontend/src/app/modules/fields/macros/attribute-label-macro.component.ts @@ -35,20 +35,20 @@ import { Injector, ViewChild } from "@angular/core"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {NEVER, Observable} from "rxjs"; -import {filter, map, take, tap} from "rxjs/operators"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { NEVER, Observable } from "rxjs"; +import { filter, map, take, tap } from "rxjs/operators"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { AttributeModelLoaderService, SupportedAttributeModels } from "core-app/modules/fields/macros/attribute-model-loader.service"; -import {StringHelpers} from "core-app/helpers/string-helpers"; +import { StringHelpers } from "core-app/helpers/string-helpers"; export const attributeLabelMacro = 'macro.macro--attribute-label'; diff --git a/frontend/src/app/modules/fields/macros/attribute-model-loader.service.ts b/frontend/src/app/modules/fields/macros/attribute-model-loader.service.ts index 5c13ba12010..dfff52bec9e 100644 --- a/frontend/src/app/modules/fields/macros/attribute-model-loader.service.ts +++ b/frontend/src/app/modules/fields/macros/attribute-model-loader.service.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ Ng1FieldControlsWrapper, -import {Injectable} from "@angular/core"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {NEVER, Observable, throwError} from "rxjs"; -import {filter, map, take, tap} from "rxjs/operators"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {multiInput} from "reactivestates"; -import {TransitionService} from "@uirouter/core"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; +import { Injectable } from "@angular/core"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { NEVER, Observable, throwError } from "rxjs"; +import { filter, map, take, tap } from "rxjs/operators"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { multiInput } from "reactivestates"; +import { TransitionService } from "@uirouter/core"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; export type SupportedAttributeModels = 'project'|'workPackage'; @@ -97,12 +97,12 @@ export class AttributeModelLoaderService { private load(model:SupportedAttributeModels, id?:string|undefined|null):Observable { switch (model) { - case 'workPackage': - return this.loadWorkPackage(id); - case 'project': - return this.loadProject(id); - default: - return NEVER; + case 'workPackage': + return this.loadWorkPackage(id); + case 'project': + return this.loadProject(id); + default: + return NEVER; } } diff --git a/frontend/src/app/modules/fields/macros/attribute-value-macro.component.ts b/frontend/src/app/modules/fields/macros/attribute-value-macro.component.ts index e1cee56749f..2bba4322eb1 100644 --- a/frontend/src/app/modules/fields/macros/attribute-value-macro.component.ts +++ b/frontend/src/app/modules/fields/macros/attribute-value-macro.component.ts @@ -35,15 +35,15 @@ import { Injector, ViewChild } from "@angular/core"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {NEVER, Observable} from "rxjs"; -import {filter, map, take, tap} from "rxjs/operators"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { NEVER, Observable } from "rxjs"; +import { filter, map, take, tap } from "rxjs/operators"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { AttributeModelLoaderService, SupportedAttributeModels diff --git a/frontend/src/app/modules/fields/macros/work-package-quickinfo-macro.component.ts b/frontend/src/app/modules/fields/macros/work-package-quickinfo-macro.component.ts index 8a343069d80..f74ef8016ef 100644 --- a/frontend/src/app/modules/fields/macros/work-package-quickinfo-macro.component.ts +++ b/frontend/src/app/modules/fields/macros/work-package-quickinfo-macro.component.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ Ng1FieldControlsWrapper, -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostBinding, Injector} from "@angular/core"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Observable} from "rxjs"; -import {tap} from "rxjs/operators"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {DateDisplayField} from "core-app/modules/fields/display/field-types/date-display-field.module"; -import {CombinedDateDisplayField} from "core-app/modules/fields/display/field-types/combined-date-display.field"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostBinding, Injector } from "@angular/core"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Observable } from "rxjs"; +import { tap } from "rxjs/operators"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { DateDisplayField } from "core-app/modules/fields/display/field-types/date-display-field.module"; +import { CombinedDateDisplayField } from "core-app/modules/fields/display/field-types/combined-date-display.field"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; export const quickInfoMacroSelector = 'macro.macro--wp-quickinfo'; @@ -65,7 +65,7 @@ export class WorkPackageQuickinfoMacroComponent { workPackage$:Observable; dateDisplayField = CombinedDateDisplayField; workPackageLink:string; - detailed:boolean = false; + detailed = false; constructor(readonly elementRef:ElementRef, readonly injector:Injector, diff --git a/frontend/src/app/modules/fields/openproject-fields.module.ts b/frontend/src/app/modules/fields/openproject-fields.module.ts index 469eb5ff402..c3caa446a6e 100644 --- a/frontend/src/app/modules/fields/openproject-fields.module.ts +++ b/frontend/src/app/modules/fields/openproject-fields.module.ts @@ -26,41 +26,41 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APP_INITIALIZER, NgModule} from '@angular/core'; -import {OpenprojectAccessibilityModule} from "core-app/modules/a11y/openproject-a11y.module"; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {OpenprojectEditorModule} from 'core-app/modules/editor/openproject-editor.module'; -import {OpenprojectAttachmentsModule} from "core-app/modules/attachments/openproject-attachments.module"; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {EditFieldService} from "core-app/modules/fields/edit/edit-field.service"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {initializeCoreEditFields} from "core-app/modules/fields/edit/edit-field.initializer"; -import {initializeCoreDisplayFields} from "core-app/modules/fields/display/display-field.initializer"; -import {BooleanEditFieldComponent} from "core-app/modules/fields/edit/field-types/boolean-edit-field.component"; -import {DateEditFieldComponent} from "core-app/modules/fields/edit/field-types/date-edit-field.component"; -import {DurationEditFieldComponent} from "core-app/modules/fields/edit/field-types/duration-edit-field.component"; -import {FloatEditFieldComponent} from "core-app/modules/fields/edit/field-types/float-edit-field.component"; -import {IntegerEditFieldComponent} from "core-app/modules/fields/edit/field-types/integer-edit-field.component"; -import {MultiSelectEditFieldComponent} from "core-app/modules/fields/edit/field-types/multi-select-edit-field.component"; -import {SelectEditFieldComponent} from "core-app/modules/fields/edit/field-types/select-edit-field.component"; -import {FormattableEditFieldComponent} from "core-app/modules/fields/edit/field-types/formattable-edit-field.component"; -import {TextEditFieldComponent} from "core-app/modules/fields/edit/field-types/text-edit-field.component"; -import {EditFormPortalComponent} from "core-app/modules/fields/edit/editing-portal/edit-form-portal.component"; -import {EditFieldControlsComponent,} from "core-app/modules/fields/edit/field-controls/edit-field-controls.component"; -import {SelectAutocompleterRegisterService} from "core-app/modules/fields/edit/field-types/select-autocompleter-register.service"; -import {EditFormComponent} from "core-app/modules/fields/edit/edit-form/edit-form.component"; -import {WorkPackageEditFieldComponent} from "core-app/modules/fields/edit/field-types/work-package-edit-field.component"; -import {EditableAttributeFieldComponent} from "core-app/modules/fields/edit/field/editable-attribute-field.component"; -import {ProjectStatusEditFieldComponent} from "core-app/modules/fields/edit/field-types/project-status-edit-field.component"; -import {PlainFormattableEditFieldComponent} from "core-app/modules/fields/edit/field-types/plain-formattable-edit-field.component"; -import {TimeEntryWorkPackageEditFieldComponent} from "core-app/modules/fields/edit/field-types/te-work-package-edit-field.component"; -import {AttributeValueMacroComponent} from "core-app/modules/fields/macros/attribute-value-macro.component"; -import {AttributeLabelMacroComponent} from "core-app/modules/fields/macros/attribute-label-macro.component"; -import {AttributeHelpTextComponent} from "core-app/modules/fields/help-texts/attribute-help-text.component"; -import {AttributeHelpTextModal} from "core-app/modules/fields/help-texts/attribute-help-text.modal"; -import {WorkPackageQuickinfoMacroComponent} from "core-app/modules/fields/macros/work-package-quickinfo-macro.component"; -import {DisplayFieldComponent} from "core-app/modules/fields/display/display-field.component"; -import {OpenprojectAutocompleterModule} from "core-app/modules/autocompleter/openproject-autocompleter.module"; +import { APP_INITIALIZER, NgModule } from '@angular/core'; +import { OpenprojectAccessibilityModule } from "core-app/modules/a11y/openproject-a11y.module"; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { OpenprojectEditorModule } from 'core-app/modules/editor/openproject-editor.module'; +import { OpenprojectAttachmentsModule } from "core-app/modules/attachments/openproject-attachments.module"; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { EditFieldService } from "core-app/modules/fields/edit/edit-field.service"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { initializeCoreEditFields } from "core-app/modules/fields/edit/edit-field.initializer"; +import { initializeCoreDisplayFields } from "core-app/modules/fields/display/display-field.initializer"; +import { BooleanEditFieldComponent } from "core-app/modules/fields/edit/field-types/boolean-edit-field.component"; +import { DateEditFieldComponent } from "core-app/modules/fields/edit/field-types/date-edit-field.component"; +import { DurationEditFieldComponent } from "core-app/modules/fields/edit/field-types/duration-edit-field.component"; +import { FloatEditFieldComponent } from "core-app/modules/fields/edit/field-types/float-edit-field.component"; +import { IntegerEditFieldComponent } from "core-app/modules/fields/edit/field-types/integer-edit-field.component"; +import { MultiSelectEditFieldComponent } from "core-app/modules/fields/edit/field-types/multi-select-edit-field.component"; +import { SelectEditFieldComponent } from "core-app/modules/fields/edit/field-types/select-edit-field.component"; +import { FormattableEditFieldComponent } from "core-app/modules/fields/edit/field-types/formattable-edit-field.component"; +import { TextEditFieldComponent } from "core-app/modules/fields/edit/field-types/text-edit-field.component"; +import { EditFormPortalComponent } from "core-app/modules/fields/edit/editing-portal/edit-form-portal.component"; +import { EditFieldControlsComponent, } from "core-app/modules/fields/edit/field-controls/edit-field-controls.component"; +import { SelectAutocompleterRegisterService } from "core-app/modules/fields/edit/field-types/select-autocompleter-register.service"; +import { EditFormComponent } from "core-app/modules/fields/edit/edit-form/edit-form.component"; +import { WorkPackageEditFieldComponent } from "core-app/modules/fields/edit/field-types/work-package-edit-field.component"; +import { EditableAttributeFieldComponent } from "core-app/modules/fields/edit/field/editable-attribute-field.component"; +import { ProjectStatusEditFieldComponent } from "core-app/modules/fields/edit/field-types/project-status-edit-field.component"; +import { PlainFormattableEditFieldComponent } from "core-app/modules/fields/edit/field-types/plain-formattable-edit-field.component"; +import { TimeEntryWorkPackageEditFieldComponent } from "core-app/modules/fields/edit/field-types/te-work-package-edit-field.component"; +import { AttributeValueMacroComponent } from "core-app/modules/fields/macros/attribute-value-macro.component"; +import { AttributeLabelMacroComponent } from "core-app/modules/fields/macros/attribute-label-macro.component"; +import { AttributeHelpTextComponent } from "core-app/modules/fields/help-texts/attribute-help-text.component"; +import { AttributeHelpTextModal } from "core-app/modules/fields/help-texts/attribute-help-text.modal"; +import { WorkPackageQuickinfoMacroComponent } from "core-app/modules/fields/macros/work-package-quickinfo-macro.component"; +import { DisplayFieldComponent } from "core-app/modules/fields/display/display-field.component"; +import { OpenprojectAutocompleterModule } from "core-app/modules/autocompleter/openproject-autocompleter.module"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/global_search/global-search-work-packages-entry.component.ts b/frontend/src/app/modules/global_search/global-search-work-packages-entry.component.ts index fe348851c64..98a9f68c143 100644 --- a/frontend/src/app/modules/global_search/global-search-work-packages-entry.component.ts +++ b/frontend/src/app/modules/global_search/global-search-work-packages-entry.component.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from '@angular/core'; +import { Component } from '@angular/core'; export const globalSearchWorkPackagesSelectorEntry = 'global-search-work-packages-entry'; diff --git a/frontend/src/app/modules/global_search/global-search-work-packages.component.ts b/frontend/src/app/modules/global_search/global-search-work-packages.component.ts index ceb0e0a4a6f..2f44e7e259d 100644 --- a/frontend/src/app/modules/global_search/global-search-work-packages.component.ts +++ b/frontend/src/app/modules/global_search/global-search-work-packages.component.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, Renderer2} from '@angular/core'; -import {FocusHelperService} from 'app/modules/common/focus/focus-helper'; -import {I18nService} from 'app/modules/common/i18n/i18n.service'; -import {HalResourceService} from "app/modules/hal/services/hal-resource.service"; -import {GlobalSearchService} from "core-app/modules/global_search/services/global-search.service"; -import {WorkPackageFiltersService} from "app/components/filters/wp-filters/wp-filters.service"; -import {UrlParamsHelperService} from "app/components/wp-query/url-params-helper"; -import {WorkPackageTableConfigurationObject} from "core-components/wp-table/wp-table-configuration"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {debounceTime, distinctUntilChanged, skip} from "rxjs/operators"; -import {combineLatest} from "rxjs"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { AfterViewInit, ChangeDetectorRef, Component, ElementRef, OnDestroy, OnInit, Renderer2 } from '@angular/core'; +import { FocusHelperService } from 'app/modules/common/focus/focus-helper'; +import { I18nService } from 'app/modules/common/i18n/i18n.service'; +import { HalResourceService } from "app/modules/hal/services/hal-resource.service"; +import { GlobalSearchService } from "core-app/modules/global_search/services/global-search.service"; +import { WorkPackageFiltersService } from "app/components/filters/wp-filters/wp-filters.service"; +import { UrlParamsHelperService } from "app/components/wp-query/url-params-helper"; +import { WorkPackageTableConfigurationObject } from "core-components/wp-table/wp-table-configuration"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { debounceTime, distinctUntilChanged, skip } from "rxjs/operators"; +import { combineLatest } from "rxjs"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export const globalSearchWorkPackagesSelector = 'global-search-work-packages'; @@ -109,7 +109,7 @@ export class GlobalSearchWorkPackagesComponent extends UntilDestroyedMixin imple } private setQueryProps():void { - let filters:any[] = []; + const filters:any[] = []; let columns = ['id', 'project', 'subject', 'type', 'status', 'updatedAt']; if (this.globalSearchService.searchTerm.length > 0) { diff --git a/frontend/src/app/modules/global_search/input/global-search-input.component.ts b/frontend/src/app/modules/global_search/input/global-search-input.component.ts index 21c0e9ec8c9..0c14eadceed 100644 --- a/frontend/src/app/modules/global_search/input/global-search-input.component.ts +++ b/frontend/src/app/modules/global_search/input/global-search-input.component.ts @@ -37,22 +37,22 @@ import { ViewChild, ViewEncapsulation } from '@angular/core'; -import {ContainHelpers} from 'core-app/modules/common/focus/contain-helpers'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {GlobalSearchService} from "core-app/modules/global_search/services/global-search.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {DeviceService} from "core-app/modules/common/browser/device.service"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {Observable, of} from "rxjs"; -import {Highlighting} from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {DebouncedRequestSwitchmap, errorNotificationHandler} from "core-app/helpers/rxjs/debounced-input-switchmap"; -import {LinkHandling} from "core-app/modules/common/link-handling/link-handling"; -import {filter, map, take, tap} from "rxjs/operators"; -import {APIV3Service} from "../../apiv3/api-v3.service"; +import { ContainHelpers } from 'core-app/modules/common/focus/contain-helpers'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { GlobalSearchService } from "core-app/modules/global_search/services/global-search.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { DeviceService } from "core-app/modules/common/browser/device.service"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { Observable, of } from "rxjs"; +import { Highlighting } from "core-components/wp-fast-table/builders/highlighting/highlighting.functions"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { DebouncedRequestSwitchmap, errorNotificationHandler } from "core-app/helpers/rxjs/debounced-input-switchmap"; +import { LinkHandling } from "core-app/modules/common/link-handling/link-handling"; +import { filter, map, take, tap } from "rxjs/operators"; +import { APIV3Service } from "../../apiv3/api-v3.service"; import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export const globalSearchSelector = 'global-search-input'; @@ -84,7 +84,7 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { @ViewChild('btn', { static: true }) btn:ElementRef; @ViewChild(NgSelectComponent, { static: true }) public ngSelectComponent:NgSelectComponent; - public expanded:boolean = false; + public expanded = false; public markable = false; /** Keep a switchmap for search term and loading state */ @@ -98,7 +98,7 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { ); /** Remember the current value */ - public currentValue:string = ''; + public currentValue = ''; /** Remember the item that best matches the query. * That way, it will be highlighted (as we manually mark the selected item) and we can handle enter. @@ -214,9 +214,9 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { // go to the search in the current scope. public onEnterBeforeResultsLoaded() { this.requests.loading$.pipe( - filter(value => value === false), - take(1) - ) + filter(value => value === false), + take(1) + ) .subscribe(() => { if (this.selectedItem) { this.followSelectedItem(); @@ -267,7 +267,7 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { this.markable = false; - let hashFreeQuery = this.queryWithoutHash(query); + const hashFreeQuery = this.queryWithoutHash(query); return this .fetchSearchResults(hashFreeQuery, hashFreeQuery !== query) @@ -296,8 +296,8 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { } private searchResultsToOptions(results:WorkPackageResource[], query:string) { - let searchItems = results.map((wp) => { - let item = { + const searchItems = results.map((wp) => { + const item = { id: wp.id!, subject: wp.subject, status: wp.status.name, @@ -315,7 +315,7 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { return item; }); - let searchOptions = this.detailedSearchOptions(); + const searchOptions = this.detailedSearchOptions(); if (!this.selectedItem) { this.selectedItem = searchOptions[0]; @@ -326,7 +326,7 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { // set the possible 'search in scope' options for the current project path private detailedSearchOptions() { - let searchOptions = []; + const searchOptions = []; // add all options when searching within a project // otherwise search in 'all projects' if (this.currentProjectService.path) { @@ -378,30 +378,30 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { private searchInScope(scope:string) { switch (scope) { - case 'all_projects': { - let forcePageLoad = false; - if (this.globalSearchService.projectScope !== 'all') { - forcePageLoad = true; - this.globalSearchService.resultsHidden = true; - } - this.globalSearchService.projectScope = 'all'; - this.submitNonEmptySearch(forcePageLoad); - break; - } - case 'current_project': { - this.globalSearchService.projectScope = 'current_project'; - this.submitNonEmptySearch(); - break; - } - case 'current_project_and_all_descendants': { - this.globalSearchService.projectScope = ''; - this.submitNonEmptySearch(); - break; + case 'all_projects': { + let forcePageLoad = false; + if (this.globalSearchService.projectScope !== 'all') { + forcePageLoad = true; + this.globalSearchService.resultsHidden = true; } + this.globalSearchService.projectScope = 'all'; + this.submitNonEmptySearch(forcePageLoad); + break; + } + case 'current_project': { + this.globalSearchService.projectScope = 'current_project'; + this.submitNonEmptySearch(); + break; + } + case 'current_project_and_all_descendants': { + this.globalSearchService.projectScope = ''; + this.submitNonEmptySearch(); + break; + } } } - public submitNonEmptySearch(forcePageLoad:boolean = false) { + public submitNonEmptySearch(forcePageLoad = false) { this.globalSearchService.searchTerm = this.currentValue; if (this.currentValue.length > 0) { this.ngSelectComponent.close(); @@ -426,7 +426,7 @@ export class GlobalSearchInputComponent implements OnInit, OnDestroy { } private get currentScope():string { - let serviceScope = this.globalSearchService.projectScope; + const serviceScope = this.globalSearchService.projectScope; return (serviceScope === '') ? 'current_project_and_all_descendants' : serviceScope; } diff --git a/frontend/src/app/modules/global_search/openproject-global-search.module.ts b/frontend/src/app/modules/global_search/openproject-global-search.module.ts index 1f8496dc720..654332a35a6 100644 --- a/frontend/src/app/modules/global_search/openproject-global-search.module.ts +++ b/frontend/src/app/modules/global_search/openproject-global-search.module.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module"; -import {GlobalSearchInputComponent} from "core-app/modules/global_search/input/global-search-input.component"; -import {GlobalSearchWorkPackagesComponent} from "core-app/modules/global_search/global-search-work-packages.component"; -import {GlobalSearchTabsComponent} from "core-app/modules/global_search/tabs/global-search-tabs.component"; -import {GlobalSearchTitleComponent} from "core-app/modules/global_search/title/global-search-title.component"; -import {GlobalSearchService} from "core-app/modules/global_search/services/global-search.service"; -import {GlobalSearchWorkPackagesEntryComponent} from "core-app/modules/global_search/global-search-work-packages-entry.component"; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { OpenprojectWorkPackagesModule } from "core-app/modules/work_packages/openproject-work-packages.module"; +import { GlobalSearchInputComponent } from "core-app/modules/global_search/input/global-search-input.component"; +import { GlobalSearchWorkPackagesComponent } from "core-app/modules/global_search/global-search-work-packages.component"; +import { GlobalSearchTabsComponent } from "core-app/modules/global_search/tabs/global-search-tabs.component"; +import { GlobalSearchTitleComponent } from "core-app/modules/global_search/title/global-search-title.component"; +import { GlobalSearchService } from "core-app/modules/global_search/services/global-search.service"; +import { GlobalSearchWorkPackagesEntryComponent } from "core-app/modules/global_search/global-search-work-packages-entry.component"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/global_search/services/global-search.service.spec.ts b/frontend/src/app/modules/global_search/services/global-search.service.spec.ts index bb225753591..cde471c4580 100644 --- a/frontend/src/app/modules/global_search/services/global-search.service.spec.ts +++ b/frontend/src/app/modules/global_search/services/global-search.service.spec.ts @@ -28,13 +28,13 @@ /*jshint expr: true*/ -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {GlobalSearchService} from "core-app/modules/global_search/services/global-search.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { GlobalSearchService } from "core-app/modules/global_search/services/global-search.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { TestBed, waitForAsync } from "@angular/core/testing"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {States} from "core-components/states.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { States } from "core-components/states.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; describe('Global search service', function() { let service:GlobalSearchService; @@ -53,11 +53,11 @@ describe('Global search service', function() { GlobalSearchService, ] }) - .compileComponents() - .then(() => { - CurrentProject = TestBed.get(CurrentProjectService); - service = TestBed.get(GlobalSearchService); - }); + .compileComponents() + .then(() => { + CurrentProject = TestBed.get(CurrentProjectService); + service = TestBed.get(GlobalSearchService); + }); })); describe('outside a project', () => { diff --git a/frontend/src/app/modules/global_search/services/global-search.service.ts b/frontend/src/app/modules/global_search/services/global-search.service.ts index 8cc0b7c8dc7..32db8860ebb 100644 --- a/frontend/src/app/modules/global_search/services/global-search.service.ts +++ b/frontend/src/app/modules/global_search/services/global-search.service.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {BehaviorSubject} from 'rxjs'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {Injector} from "@angular/core"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; +import { Injectable , Injector } from '@angular/core'; +import { BehaviorSubject } from 'rxjs'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; + +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; @Injectable() export class GlobalSearchService { @@ -61,7 +61,7 @@ export class GlobalSearchService { } private initialize():void { - let initialData = this.loadGonData(); + const initialData = this.loadGonData(); if (initialData) { if (initialData.available_search_types) { this._tabs.next(initialData.available_search_types); diff --git a/frontend/src/app/modules/global_search/tabs/global-search-tabs.component.ts b/frontend/src/app/modules/global_search/tabs/global-search-tabs.component.ts index 31511e5813c..0bdd5ee79d4 100644 --- a/frontend/src/app/modules/global_search/tabs/global-search-tabs.component.ts +++ b/frontend/src/app/modules/global_search/tabs/global-search-tabs.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, OnDestroy} from '@angular/core'; -import {GlobalSearchService} from "core-app/modules/global_search/services/global-search.service"; -import {Subscription} from "rxjs"; -import {ScrollableTabsComponent} from "core-app/modules/common/tabs/scrollable-tabs/scrollable-tabs.component"; +import { Component, OnDestroy } from '@angular/core'; +import { GlobalSearchService } from "core-app/modules/global_search/services/global-search.service"; +import { Subscription } from "rxjs"; +import { ScrollableTabsComponent } from "core-app/modules/common/tabs/scrollable-tabs/scrollable-tabs.component"; export const globalSearchTabsSelector = 'global-search-tabs'; diff --git a/frontend/src/app/modules/global_search/title/global-search-title.component.ts b/frontend/src/app/modules/global_search/title/global-search-title.component.ts index 1334a7a6850..8310a6042ca 100644 --- a/frontend/src/app/modules/global_search/title/global-search-title.component.ts +++ b/frontend/src/app/modules/global_search/title/global-search-title.component.ts @@ -25,14 +25,14 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Component, ElementRef, Injector, Input, OnDestroy} from '@angular/core'; -import {distinctUntilChanged} from 'rxjs/operators'; -import {combineLatest} from 'rxjs'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {GlobalSearchService} from "core-app/modules/global_search/services/global-search.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { ChangeDetectorRef, Component, ElementRef, Injector, Input, OnDestroy } from '@angular/core'; +import { distinctUntilChanged } from 'rxjs/operators'; +import { combineLatest } from 'rxjs'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { GlobalSearchService } from "core-app/modules/global_search/services/global-search.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; export const globalSearchTitleSelector = 'global-search-title'; @@ -83,20 +83,20 @@ export class GlobalSearchTitleComponent extends UntilDestroyedMixin implements O } private projectText(scope:string):string { - let currentProjectName = this.currentProjectService.name ? this.currentProjectService.name : ''; + const currentProjectName = this.currentProjectService.name ? this.currentProjectService.name : ''; switch (scope) { - case 'all': - return this.text.all_projects; - break; - case 'current_project': - return currentProjectName; - break; - case '': - return currentProjectName + ' ' + this.text.project_and_subprojects; - break; - default: - return ''; + case 'all': + return this.text.all_projects; + break; + case 'current_project': + return currentProjectName; + break; + case '': + return currentProjectName + ' ' + this.text.project_and_subprojects; + break; + default: + return ''; } } } diff --git a/frontend/src/app/modules/grids/areas/grid-gap.ts b/frontend/src/app/modules/grids/areas/grid-gap.ts index f9c5bf6c1a8..dcc8087fb28 100644 --- a/frontend/src/app/modules/grids/areas/grid-gap.ts +++ b/frontend/src/app/modules/grids/areas/grid-gap.ts @@ -1,4 +1,4 @@ -import {GridArea} from "core-app/modules/grids/areas/grid-area"; +import { GridArea } from "core-app/modules/grids/areas/grid-area"; export class GridGap extends GridArea { private type:'row'|'column'; diff --git a/frontend/src/app/modules/grids/areas/grid-widget-area.ts b/frontend/src/app/modules/grids/areas/grid-widget-area.ts index 67e183be173..7f561237ab4 100644 --- a/frontend/src/app/modules/grids/areas/grid-widget-area.ts +++ b/frontend/src/app/modules/grids/areas/grid-widget-area.ts @@ -1,5 +1,5 @@ -import {GridWidgetResource} from "app/modules/hal/resources/grid-widget-resource"; -import {GridArea} from "app/modules/grids/areas/grid-area"; +import { GridWidgetResource } from "app/modules/hal/resources/grid-widget-resource"; +import { GridArea } from "app/modules/grids/areas/grid-area"; export class GridWidgetArea extends GridArea { public widget:GridWidgetResource; diff --git a/frontend/src/app/modules/grids/grid/add-widget.service.ts b/frontend/src/app/modules/grids/grid/add-widget.service.ts index d558241faa0..aa8c2fb2ae8 100644 --- a/frontend/src/app/modules/grids/grid/add-widget.service.ts +++ b/frontend/src/app/modules/grids/grid/add-widget.service.ts @@ -1,16 +1,16 @@ -import {Injectable, Injector} from "@angular/core"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {AddGridWidgetModal} from "app/modules/grids/widgets/add/add.modal"; -import {GridWidgetResource} from "app/modules/hal/resources/grid-widget-resource"; -import {GridArea} from "app/modules/grids/areas/grid-area"; -import {HalResourceService} from "app/modules/hal/services/hal-resource.service"; -import {GridWidgetArea} from "core-app/modules/grids/areas/grid-widget-area"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; -import {GridDragAndDropService} from "core-app/modules/grids/grid/drag-and-drop.service"; -import {GridResizeService} from "core-app/modules/grids/grid/resize.service"; -import {GridMoveService} from "core-app/modules/grids/grid/move.service"; -import {GridGap} from "core-app/modules/grids/areas/grid-gap"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Injectable, Injector } from "@angular/core"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { AddGridWidgetModal } from "app/modules/grids/widgets/add/add.modal"; +import { GridWidgetResource } from "app/modules/hal/resources/grid-widget-resource"; +import { GridArea } from "app/modules/grids/areas/grid-area"; +import { HalResourceService } from "app/modules/hal/services/hal-resource.service"; +import { GridWidgetArea } from "core-app/modules/grids/areas/grid-widget-area"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; +import { GridDragAndDropService } from "core-app/modules/grids/grid/drag-and-drop.service"; +import { GridResizeService } from "core-app/modules/grids/grid/resize.service"; +import { GridMoveService } from "core-app/modules/grids/grid/move.service"; +import { GridGap } from "core-app/modules/grids/areas/grid-gap"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Injectable() export class GridAddWidgetService { @@ -43,7 +43,7 @@ export class GridAddWidgetService { this.addLine(area as GridGap); } - let newArea = new GridWidgetArea(widgetResource); + const newArea = new GridWidgetArea(widgetResource); this.setMaxWidth(newArea); @@ -62,14 +62,14 @@ export class GridAddWidgetService { return new Promise((resolve, reject) => { const modal = this.opModalService.show(AddGridWidgetModal, this.injector, { schema: this.layout.schema }); modal.closingEvent.subscribe((modal:AddGridWidgetModal) => { - let registered = modal.chosenWidget; + const registered = modal.chosenWidget; if (!registered) { reject(); return; } - let source = { + const source = { _type: 'GridWidget', identifier: registered.identifier, startRow: area.startRow, @@ -79,7 +79,7 @@ export class GridAddWidgetService { options: registered.properties || {} }; - let resource = this.halResource.createHalResource(source) as GridWidgetResource; + const resource = this.halResource.createHalResource(source) as GridWidgetResource; resource.grid = this.layout.gridResource; diff --git a/frontend/src/app/modules/grids/grid/area.service.ts b/frontend/src/app/modules/grids/grid/area.service.ts index 3854e8ba8f0..a75a585948b 100644 --- a/frontend/src/app/modules/grids/grid/area.service.ts +++ b/frontend/src/app/modules/grids/grid/area.service.ts @@ -1,17 +1,17 @@ -import {Injectable} from '@angular/core'; -import {GridWidgetArea} from "app/modules/grids/areas/grid-widget-area"; -import {GridArea} from "core-app/modules/grids/areas/grid-area"; -import {GridGap} from "core-app/modules/grids/areas/grid-gap"; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {WidgetChangeset} from "core-app/modules/grids/widgets/widget-changeset"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Injectable } from '@angular/core'; +import { GridWidgetArea } from "app/modules/grids/areas/grid-widget-area"; +import { GridArea } from "core-app/modules/grids/areas/grid-area"; +import { GridGap } from "core-app/modules/grids/areas/grid-gap"; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { WidgetChangeset } from "core-app/modules/grids/widgets/widget-changeset"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { BehaviorSubject } from 'rxjs'; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Apiv3GridForm} from "core-app/modules/apiv3/endpoints/grids/apiv3-grid-form"; -import {map} from "rxjs/operators"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Apiv3GridForm } from "core-app/modules/apiv3/endpoints/grids/apiv3-grid-form"; +import { map } from "rxjs/operators"; @Injectable() export class GridAreaService { @@ -19,8 +19,8 @@ export class GridAreaService { private resource:GridResource; public schema:SchemaResource; - public numColumns:number = 0; - public numRows:number = 0; + public numColumns = 0; + public numRows = 0; public gridAreas:GridArea[]; public gridGaps:GridArea[]; public widgetAreas:GridWidgetArea[]; @@ -104,9 +104,9 @@ export class GridAreaService { } public saveWidgetChangeset(changeset:WidgetChangeset) { - let payload:any = Apiv3GridForm.extractPayload(this.resource, this.schema); + const payload:any = Apiv3GridForm.extractPayload(this.resource, this.schema); - let payloadWidget = payload.widgets.find((w:any) => w.id === changeset.pristineResource.id); + const payloadWidget = payload.widgets.find((w:any) => w.id === changeset.pristineResource.id); Object.assign(payloadWidget, changeset.changes); // Adding the id so that the url can be deduced @@ -136,7 +136,7 @@ export class GridAreaService { // But as scrollIntoView will always readjust the viewport, the result would be an unbearable flicker // which causes e.g. dragging to be impossible. public scrollPlaceholderIntoView() { - let placeholder = jQuery('.grid--area.-placeholder'); + const placeholder = jQuery('.grid--area.-placeholder'); if ((placeholder[0] as any).scrollIntoViewIfNeeded) { setTimeout(() => (placeholder[0] as any).scrollIntoViewIfNeeded()); @@ -158,7 +158,7 @@ export class GridAreaService { private assignAreasWidget(newGrid:GridResource) { this.resource.widgets = newGrid.widgets; - let takenIds = this.widgetAreas.map(a => a.widget.id); + const takenIds = this.widgetAreas.map(a => a.widget.id); this.widgetAreas.forEach(area => { let newWidget:GridWidgetResource; @@ -176,7 +176,7 @@ export class GridAreaService { } private buildGridAreas() { - let cells:GridArea[] = []; + const cells:GridArea[] = []; // the one extra row is added in case the user wants to drag a widget to the very bottom for (let row = 1; row <= this.numRows + 1; row++) { @@ -187,7 +187,7 @@ export class GridAreaService { } private buildGridGaps() { - let cells:GridArea[] = []; + const cells:GridArea[] = []; // special case where we want no gaps if (this.isSingleCell) { @@ -202,10 +202,10 @@ export class GridAreaService { } private buildGridAreasRow(row:number) { - let cells:GridArea[] = []; + const cells:GridArea[] = []; for (let column = 1; column <= this.numColumns; column++) { - let cell = new GridArea(row, + const cell = new GridArea(row, row + 1, column, column + 1); @@ -217,14 +217,14 @@ export class GridAreaService { } private buildGridGapRow(row:number) { - let cells:GridGap[] = []; + const cells:GridGap[] = []; for (let column = 1; column <= this.numColumns; column++) { cells.push(new GridGap(row, - row + 1, - column, - column + 1, - 'row')); + row + 1, + column, + column + 1, + 'row')); } if (row <= this.numRows) { @@ -257,17 +257,17 @@ export class GridAreaService { public addColumn(column:number, excludeRow:number) { this.numColumns++; - let movedWidgets:GridWidgetArea[] = []; + const movedWidgets:GridWidgetArea[] = []; for (let row = 1; row <= this.numRows; row++) { if (row === excludeRow) { continue; } - let widget = this - .rowWidgets(row) - .sort((a, b) => a.startColumn - b.startColumn) - .find(widget => !(widget.startRow < excludeRow && widget.endRow > excludeRow) && + const widget = this + .rowWidgets(row) + .sort((a, b) => a.startColumn - b.startColumn) + .find(widget => !(widget.startRow < excludeRow && widget.endRow > excludeRow) && (widget.startColumn === column + 1 || widget.endColumn === column + 1 || widget.startColumn <= column && widget.endColumn > column)); @@ -279,23 +279,23 @@ export class GridAreaService { } this.moveSubsequentRowWidgets(this.widgetAreas.filter(widget => !movedWidgets.includes(widget)), - column); + column); } public addRow(row:number, excludeColumn:number) { this.numRows++; - let movedWidgets:GridWidgetArea[] = []; + const movedWidgets:GridWidgetArea[] = []; for (let column = 1; column <= this.numColumns; column++) { if (column === excludeColumn) { continue; } - let widget = this - .columnWidgets(column) - .sort((a, b) => a.startRow - b.startRow) - .find(widget => !(widget.startColumn < excludeColumn && widget.endColumn > excludeColumn) && + const widget = this + .columnWidgets(column) + .sort((a, b) => a.startRow - b.startRow) + .find(widget => !(widget.startColumn < excludeColumn && widget.endColumn > excludeColumn) && (widget.startRow === row + 1 || widget.endRow === row + 1 || widget.startRow <= row && widget.endRow > row)); @@ -307,7 +307,7 @@ export class GridAreaService { } this.moveSubsequentColumnWidgets(this.widgetAreas.filter(widget => !movedWidgets.includes(widget)), - row); + row); } public removeColumn(column:number) { diff --git a/frontend/src/app/modules/grids/grid/drag-and-drop.service.ts b/frontend/src/app/modules/grids/grid/drag-and-drop.service.ts index 1fe54e369cc..eb76db4677d 100644 --- a/frontend/src/app/modules/grids/grid/drag-and-drop.service.ts +++ b/frontend/src/app/modules/grids/grid/drag-and-drop.service.ts @@ -1,8 +1,8 @@ -import {Injectable, OnDestroy} from '@angular/core'; -import {GridWidgetArea} from "core-app/modules/grids/areas/grid-widget-area"; -import {GridArea} from "core-app/modules/grids/areas/grid-area"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; -import {GridMoveService} from "core-app/modules/grids/grid/move.service"; +import { Injectable, OnDestroy } from '@angular/core'; +import { GridWidgetArea } from "core-app/modules/grids/areas/grid-widget-area"; +import { GridArea } from "core-app/modules/grids/areas/grid-area"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; +import { GridMoveService } from "core-app/modules/grids/grid/move.service"; import { Subscription } from 'rxjs'; import { filter, distinctUntilChanged, throttleTime } from 'rxjs/operators'; @@ -48,7 +48,7 @@ export class GridDragAndDropService implements OnDestroy { if (!this.placeholderArea) { return; } - let widgetArea = this.draggedArea!; + const widgetArea = this.draggedArea!; // Set the draggedArea's startRow/startColumn properties // to the drop zone ones. @@ -99,7 +99,7 @@ export class GridDragAndDropService implements OnDestroy { return; } - this.placeholderArea!.copyDimensionsTo(this.draggedArea!) + this.placeholderArea!.copyDimensionsTo(this.draggedArea!); if (!this.draggedArea!.unchangedSize) { this.layout.writeAreaChangesToWidgets(); diff --git a/frontend/src/app/modules/grids/grid/grid.component.ts b/frontend/src/app/modules/grids/grid/grid.component.ts index e7f3166934c..e3bfd2655cc 100644 --- a/frontend/src/app/modules/grids/grid/grid.component.ts +++ b/frontend/src/app/modules/grids/grid/grid.component.ts @@ -1,23 +1,23 @@ -import {Component, +import { Component, ComponentRef, OnDestroy, OnInit, Input, - HostListener} from "@angular/core"; -import {GridResource} from "app/modules/hal/resources/grid-resource"; -import {DomSanitizer} from "@angular/platform-browser"; -import {GridWidgetsService} from "app/modules/grids/widgets/widgets.service"; -import {AbstractWidgetComponent} from "app/modules/grids/widgets/abstract-widget.component"; -import {GridArea} from "app/modules/grids/areas/grid-area"; -import {GridMoveService} from "app/modules/grids/grid/move.service"; -import {GridDragAndDropService} from "core-app/modules/grids/grid/drag-and-drop.service"; -import {GridResizeService} from "core-app/modules/grids/grid/resize.service"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; -import {GridAddWidgetService} from "core-app/modules/grids/grid/add-widget.service"; -import {GridRemoveWidgetService} from "core-app/modules/grids/grid/remove-widget.service"; -import {WidgetWpGraphComponent} from "core-app/modules/grids/widgets/wp-graph/wp-graph.component"; -import {GridWidgetArea} from "core-app/modules/grids/areas/grid-widget-area"; -import {BrowserDetector} from "core-app/modules/common/browser/browser-detector.service"; + HostListener } from "@angular/core"; +import { GridResource } from "app/modules/hal/resources/grid-resource"; +import { DomSanitizer } from "@angular/platform-browser"; +import { GridWidgetsService } from "app/modules/grids/widgets/widgets.service"; +import { AbstractWidgetComponent } from "app/modules/grids/widgets/abstract-widget.component"; +import { GridArea } from "app/modules/grids/areas/grid-area"; +import { GridMoveService } from "app/modules/grids/grid/move.service"; +import { GridDragAndDropService } from "core-app/modules/grids/grid/drag-and-drop.service"; +import { GridResizeService } from "core-app/modules/grids/grid/resize.service"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; +import { GridAddWidgetService } from "core-app/modules/grids/grid/add-widget.service"; +import { GridRemoveWidgetService } from "core-app/modules/grids/grid/remove-widget.service"; +import { WidgetWpGraphComponent } from "core-app/modules/grids/widgets/wp-graph/wp-graph.component"; +import { GridWidgetArea } from "core-app/modules/grids/areas/grid-widget-area"; +import { BrowserDetector } from "core-app/modules/common/browser/browser-detector.service"; export interface WidgetRegistration { identifier:string; @@ -78,13 +78,13 @@ export class GridComponent implements OnDestroy, OnInit { } public widgetComponent(area:GridWidgetArea) { - let widget = area.widget; + const widget = area.widget; if (!widget) { return null; } - let registration = this.widgetsService.registered.find((reg) => reg.identifier === widget.identifier); + const registration = this.widgetsService.registered.find((reg) => reg.identifier === widget.identifier); if (!registration) { // debugLog(`No widget registered with identifier ${widget.identifier}`); @@ -105,12 +105,12 @@ export class GridComponent implements OnDestroy, OnInit { public get gridColumnStyle() { return this.gridStyle(this.layout.numColumns, - `calc((100% - ${this.GRID_GAP_DIMENSION} * ${this.layout.numColumns + 1}) / ${this.layout.numColumns})`); + `calc((100% - ${this.GRID_GAP_DIMENSION} * ${this.layout.numColumns + 1}) / ${this.layout.numColumns})`); } public get gridRowStyle() { return this.gridStyle(this.layout.numRows, - this.GRID_AREA_HEIGHT); + this.GRID_AREA_HEIGHT); } public identifyGridArea(index:number, area:GridArea) { diff --git a/frontend/src/app/modules/grids/grid/initialization.service.ts b/frontend/src/app/modules/grids/grid/initialization.service.ts index e35e3dc81f0..5c29f140973 100644 --- a/frontend/src/app/modules/grids/grid/initialization.service.ts +++ b/frontend/src/app/modules/grids/grid/initialization.service.ts @@ -1,8 +1,8 @@ -import {Injectable} from '@angular/core'; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {switchMap} from "rxjs/operators"; +import { Injectable } from '@angular/core'; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { switchMap } from "rxjs/operators"; @Injectable() export class GridInitializationService { @@ -30,7 +30,7 @@ export class GridInitializationService { } private myPageForm(path:string):Promise { - let payload = { + const payload = { '_links': { 'scope': { 'href': path @@ -45,8 +45,8 @@ export class GridInitializationService { .post(payload) .pipe( switchMap(form => { - let source = form.payload.$source; - let resource = this.halResourceService.createHalResource(source) as GridResource; + const source = form.payload.$source; + const resource = this.halResourceService.createHalResource(source) as GridResource; if (resource.widgets.length === 0) { resource.rowCount = 1; diff --git a/frontend/src/app/modules/grids/grid/move.service.ts b/frontend/src/app/modules/grids/grid/move.service.ts index 48b4f2b5aa3..9cc3f57a5d5 100644 --- a/frontend/src/app/modules/grids/grid/move.service.ts +++ b/frontend/src/app/modules/grids/grid/move.service.ts @@ -1,6 +1,6 @@ -import {Injectable} from '@angular/core'; -import {GridWidgetArea} from "app/modules/grids/areas/grid-widget-area"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; +import { Injectable } from '@angular/core'; +import { GridWidgetArea } from "app/modules/grids/areas/grid-widget-area"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; @Injectable() @@ -8,7 +8,7 @@ export class GridMoveService { constructor(private layout:GridAreaService) {} public down(movedArea:GridWidgetArea|null, ignoreArea:GridWidgetArea) { - let movedAreas:GridWidgetArea[] = []; + const movedAreas:GridWidgetArea[] = []; let remainingAreas:GridWidgetArea[] = this.layout.widgetAreas.slice(0); if (ignoreArea) { @@ -33,13 +33,13 @@ export class GridMoveService { } private moveOneDown(anchorAreas:GridWidgetArea[], movableAreas:GridWidgetArea[]) { - let moveSpecification = this.firstAreaToMove(anchorAreas, movableAreas); + const moveSpecification = this.firstAreaToMove(anchorAreas, movableAreas); if (moveSpecification) { - let toMoveArea = moveSpecification[0] as GridWidgetArea; - let anchorArea = moveSpecification[1] as GridWidgetArea; + const toMoveArea = moveSpecification[0] as GridWidgetArea; + const anchorArea = moveSpecification[1] as GridWidgetArea; - let areaHeight = toMoveArea.widget.height; + const areaHeight = toMoveArea.widget.height; toMoveArea.startRow = anchorArea.endRow; toMoveArea.endRow = toMoveArea.startRow + areaHeight; diff --git a/frontend/src/app/modules/grids/grid/page/grid-page.component.ts b/frontend/src/app/modules/grids/grid/page/grid-page.component.ts index dc4efd0a9d5..9165c16e0c4 100644 --- a/frontend/src/app/modules/grids/grid/page/grid-page.component.ts +++ b/frontend/src/app/modules/grids/grid/page/grid-page.component.ts @@ -1,17 +1,17 @@ import { ChangeDetectorRef, OnDestroy, OnInit, Renderer2, Directive } from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {Title} from '@angular/platform-browser'; -import {GridInitializationService} from "core-app/modules/grids/grid/initialization.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {GridAddWidgetService} from "core-app/modules/grids/grid/add-widget.service"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { Title } from '@angular/platform-browser'; +import { GridInitializationService } from "core-app/modules/grids/grid/initialization.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { GridAddWidgetService } from "core-app/modules/grids/grid/add-widget.service"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; @Directive() export abstract class GridPageComponent implements OnInit, OnDestroy { public text = { title: this.i18n.t(`js.${this.i18nNamespace()}.label`), - html_title: this.i18n.t(`js.${this.i18nNamespace()}.label`) }; + html_title: this.i18n.t(`js.${this.i18nNamespace()}.label`) }; constructor(readonly gridInitialization:GridInitializationService, // not used in the base class but will be used throughout the subclasses diff --git a/frontend/src/app/modules/grids/grid/remove-widget.service.ts b/frontend/src/app/modules/grids/grid/remove-widget.service.ts index f0feae154d0..89a72877380 100644 --- a/frontend/src/app/modules/grids/grid/remove-widget.service.ts +++ b/frontend/src/app/modules/grids/grid/remove-widget.service.ts @@ -1,7 +1,7 @@ -import {Injectable} from "@angular/core"; -import {GridWidgetArea} from "core-app/modules/grids/areas/grid-widget-area"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; +import { Injectable } from "@angular/core"; +import { GridWidgetArea } from "core-app/modules/grids/areas/grid-widget-area"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; @Injectable() export class GridRemoveWidgetService { diff --git a/frontend/src/app/modules/grids/grid/resize.service.ts b/frontend/src/app/modules/grids/grid/resize.service.ts index 66d84cef287..d8cb0f3abf7 100644 --- a/frontend/src/app/modules/grids/grid/resize.service.ts +++ b/frontend/src/app/modules/grids/grid/resize.service.ts @@ -1,10 +1,10 @@ -import {Injectable} from '@angular/core'; -import {GridWidgetArea} from "core-app/modules/grids/areas/grid-widget-area"; -import {GridArea} from "core-app/modules/grids/areas/grid-area"; -import {ResizeDelta} from "core-app/modules/common/resizer/resizer.component"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; -import {GridMoveService} from "core-app/modules/grids/grid/move.service"; -import {GridDragAndDropService} from "core-app/modules/grids/grid/drag-and-drop.service"; +import { Injectable } from '@angular/core'; +import { GridWidgetArea } from "core-app/modules/grids/areas/grid-widget-area"; +import { GridArea } from "core-app/modules/grids/areas/grid-area"; +import { ResizeDelta } from "core-app/modules/common/resizer/resizer.component"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; +import { GridMoveService } from "core-app/modules/grids/grid/move.service"; +import { GridDragAndDropService } from "core-app/modules/grids/grid/drag-and-drop.service"; @Injectable() export class GridResizeService { @@ -43,15 +43,15 @@ export class GridResizeService { public start(resizedArea:GridWidgetArea) { this.resizedArea = resizedArea; - let resizeTargets = this.layout.gridAreas.filter((area) => { + const resizeTargets = this.layout.gridAreas.filter((area) => { // All areas on the same row which are after the current column are valid targets. - let sameRow = area.startRow === this.resizedArea!.startRow && + const sameRow = area.startRow === this.resizedArea!.startRow && area.startColumn >= this.resizedArea!.startColumn; // Areas that are on higher (number, they are printed below) rows // are allowed as long as there is guaranteed to always be one widget // before or after the resized to area. - let higherRow = area.startRow > this.resizedArea!.startRow && + const higherRow = area.startRow > this.resizedArea!.startRow && area.startColumn >= this.resizedArea!.startColumn && this.layout.widgetAreas.some((fixedArea) => { return fixedArea.startRow === area.startRow && @@ -60,11 +60,11 @@ export class GridResizeService { // after fixedArea.startColumn >= area.endColumn); }); - return sameRow || higherRow; + return sameRow || higherRow; }); this.targetIds = resizeTargets - .map(area => area.guid); + .map(area => area.guid); } public moving(deltas:ResizeDelta) { @@ -83,7 +83,7 @@ export class GridResizeService { } public isTarget(area:GridArea) { - let areaId = area.guid; + const areaId = area.guid; return this.resizedArea && this.targetIds.includes(areaId); } diff --git a/frontend/src/app/modules/grids/openproject-grids.module.ts b/frontend/src/app/modules/grids/openproject-grids.module.ts index 259938726b3..fa77dab2ee2 100644 --- a/frontend/src/app/modules/grids/openproject-grids.module.ts +++ b/frontend/src/app/modules/grids/openproject-grids.module.ts @@ -26,46 +26,46 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector, NgModule} from '@angular/core'; -import {DynamicModule} from 'ng-dynamic-component'; -import {HookService} from "core-app/modules/plugins/hook-service"; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {OpenprojectCalendarModule} from "core-app/modules/calendar/openproject-calendar.module"; -import {BrowserModule} from '@angular/platform-browser'; -import {FormsModule} from '@angular/forms'; -import {DragDropModule} from '@angular/cdk/drag-drop'; -import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module"; -import {WidgetWpCalendarComponent} from "core-app/modules/grids/widgets/wp-calendar/wp-calendar.component.ts"; -import {WidgetTimeEntriesCurrentUserComponent} from "core-app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component"; -import {GridWidgetsService} from "core-app/modules/grids/widgets/widgets.service"; -import {GridComponent} from "core-app/modules/grids/grid/grid.component"; -import {AddGridWidgetModal} from "core-app/modules/grids/widgets/add/add.modal"; -import {WidgetDocumentsComponent} from "core-app/modules/grids/widgets/documents/documents.component"; -import {WidgetNewsComponent} from "core-app/modules/grids/widgets/news/news.component"; -import {WidgetWpTableComponent} from "core-app/modules/grids/widgets/wp-table/wp-table.component"; -import {WidgetMenuComponent} from "core-app/modules/grids/widgets/menu/widget-menu.component"; -import {WidgetWpTableMenuComponent} from "core-app/modules/grids/widgets/wp-table/wp-table-menu.component"; -import {GridInitializationService} from "core-app/modules/grids/grid/initialization.service"; -import {WidgetWpGraphComponent} from "core-app/modules/grids/widgets/wp-graph/wp-graph.component"; -import {WidgetWpGraphMenuComponent} from "core-app/modules/grids/widgets/wp-graph/wp-graph-menu.component"; -import {WidgetWpTableQuerySpaceComponent} from "core-app/modules/grids/widgets/wp-table/wp-table-qs.component"; -import {OpenprojectWorkPackageGraphsModule} from "core-app/modules/work-package-graphs/openproject-work-package-graphs.module"; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WidgetProjectDescriptionComponent} from "core-app/modules/grids/widgets/project-description/project-description.component"; -import {WidgetHeaderComponent} from "core-app/modules/grids/widgets/header/header.component"; -import {WidgetWpOverviewComponent} from "core-app/modules/grids/widgets/wp-overview/wp-overview.component"; -import {WidgetCustomTextComponent} from "core-app/modules/grids/widgets/custom-text/custom-text.component"; -import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module"; -import {WidgetProjectDetailsComponent} from "core-app/modules/grids/widgets/project-details/project-details.component"; -import {WidgetTimeEntriesProjectComponent} from "core-app/modules/grids/widgets/time-entries/project/time-entries-project.component"; -import {WidgetSubprojectsComponent} from "core-app/modules/grids/widgets/subprojects/subprojects.component"; -import {OpenprojectAttachmentsModule} from "core-app/modules/attachments/openproject-attachments.module"; -import {WidgetMembersComponent} from "core-app/modules/grids/widgets/members/members.component"; -import {WidgetProjectStatusComponent} from "core-app/modules/grids/widgets/project-status/project-status.component"; -import {OpenprojectTimeEntriesModule} from "core-app/modules/time_entries/openproject-time-entries.module"; -import {WidgetTimeEntriesCurrentUserMenuComponent} from "core-app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-menu.component"; +import { Injector, NgModule } from '@angular/core'; +import { DynamicModule } from 'ng-dynamic-component'; +import { HookService } from "core-app/modules/plugins/hook-service"; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { OpenprojectCalendarModule } from "core-app/modules/calendar/openproject-calendar.module"; +import { BrowserModule } from '@angular/platform-browser'; +import { FormsModule } from '@angular/forms'; +import { DragDropModule } from '@angular/cdk/drag-drop'; +import { OpenprojectWorkPackagesModule } from "core-app/modules/work_packages/openproject-work-packages.module"; +import { WidgetWpCalendarComponent } from "core-app/modules/grids/widgets/wp-calendar/wp-calendar.component.ts"; +import { WidgetTimeEntriesCurrentUserComponent } from "core-app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component"; +import { GridWidgetsService } from "core-app/modules/grids/widgets/widgets.service"; +import { GridComponent } from "core-app/modules/grids/grid/grid.component"; +import { AddGridWidgetModal } from "core-app/modules/grids/widgets/add/add.modal"; +import { WidgetDocumentsComponent } from "core-app/modules/grids/widgets/documents/documents.component"; +import { WidgetNewsComponent } from "core-app/modules/grids/widgets/news/news.component"; +import { WidgetWpTableComponent } from "core-app/modules/grids/widgets/wp-table/wp-table.component"; +import { WidgetMenuComponent } from "core-app/modules/grids/widgets/menu/widget-menu.component"; +import { WidgetWpTableMenuComponent } from "core-app/modules/grids/widgets/wp-table/wp-table-menu.component"; +import { GridInitializationService } from "core-app/modules/grids/grid/initialization.service"; +import { WidgetWpGraphComponent } from "core-app/modules/grids/widgets/wp-graph/wp-graph.component"; +import { WidgetWpGraphMenuComponent } from "core-app/modules/grids/widgets/wp-graph/wp-graph-menu.component"; +import { WidgetWpTableQuerySpaceComponent } from "core-app/modules/grids/widgets/wp-table/wp-table-qs.component"; +import { OpenprojectWorkPackageGraphsModule } from "core-app/modules/work-package-graphs/openproject-work-package-graphs.module"; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WidgetProjectDescriptionComponent } from "core-app/modules/grids/widgets/project-description/project-description.component"; +import { WidgetHeaderComponent } from "core-app/modules/grids/widgets/header/header.component"; +import { WidgetWpOverviewComponent } from "core-app/modules/grids/widgets/wp-overview/wp-overview.component"; +import { WidgetCustomTextComponent } from "core-app/modules/grids/widgets/custom-text/custom-text.component"; +import { OpenprojectFieldsModule } from "core-app/modules/fields/openproject-fields.module"; +import { WidgetProjectDetailsComponent } from "core-app/modules/grids/widgets/project-details/project-details.component"; +import { WidgetTimeEntriesProjectComponent } from "core-app/modules/grids/widgets/time-entries/project/time-entries-project.component"; +import { WidgetSubprojectsComponent } from "core-app/modules/grids/widgets/subprojects/subprojects.component"; +import { OpenprojectAttachmentsModule } from "core-app/modules/attachments/openproject-attachments.module"; +import { WidgetMembersComponent } from "core-app/modules/grids/widgets/members/members.component"; +import { WidgetProjectStatusComponent } from "core-app/modules/grids/widgets/project-status/project-status.component"; +import { OpenprojectTimeEntriesModule } from "core-app/modules/time_entries/openproject-time-entries.module"; +import { WidgetTimeEntriesCurrentUserMenuComponent } from "core-app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-menu.component"; import { TimeEntriesCurrentUserConfigurationModalComponent } from './widgets/time-entries/current-user/time-entries-current-user-configuration.modal'; @NgModule({ @@ -154,40 +154,40 @@ export function registerWidgets(injector:Injector) { hookService.register('gridWidgets', () => { - let defaultColumns = ["id", "project", "type", "subject"]; + const defaultColumns = ["id", "project", "type", "subject"]; - let assignedFilters = new ApiV3FilterBuilder(); + const assignedFilters = new ApiV3FilterBuilder(); assignedFilters.add('assignee', '=', ["me"]); assignedFilters.add('status', 'o', []); - let assignedProps = { + const assignedProps = { "columns[]": defaultColumns, "filters": assignedFilters.toJson() }; - let accountableFilters = new ApiV3FilterBuilder(); + const accountableFilters = new ApiV3FilterBuilder(); accountableFilters.add('responsible', '=', ["me"]); accountableFilters.add('status', 'o', []); - let accountableProps = { + const accountableProps = { "columns[]": defaultColumns, "filters": accountableFilters.toJson() }; - let createdFilters = new ApiV3FilterBuilder(); + const createdFilters = new ApiV3FilterBuilder(); createdFilters.add('author', '=', ["me"]); createdFilters.add('status', 'o', []); - let createdProps = { + const createdProps = { "columns[]": defaultColumns, "filters": createdFilters.toJson() }; - let watchedFilters = new ApiV3FilterBuilder(); + const watchedFilters = new ApiV3FilterBuilder(); watchedFilters.add('watcher', '=', ["me"]); watchedFilters.add('status', 'o', []); - let watchedProps = { + const watchedProps = { "columns[]": defaultColumns, "filters": watchedFilters.toJson() }; diff --git a/frontend/src/app/modules/grids/widgets/abstract-widget.component.ts b/frontend/src/app/modules/grids/widgets/abstract-widget.component.ts index 432bbff3ac3..3ef46a2bd11 100644 --- a/frontend/src/app/modules/grids/widgets/abstract-widget.component.ts +++ b/frontend/src/app/modules/grids/widgets/abstract-widget.component.ts @@ -1,8 +1,8 @@ -import {Directive, EventEmitter, HostBinding, Injector, Input, Output} from "@angular/core"; -import {GridWidgetResource} from "app/modules/hal/resources/grid-widget-resource"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WidgetChangeset} from "core-app/modules/grids/widgets/widget-changeset"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { Directive, EventEmitter, HostBinding, Injector, Input, Output } from "@angular/core"; +import { GridWidgetResource } from "app/modules/hal/resources/grid-widget-resource"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WidgetChangeset } from "core-app/modules/grids/widgets/widget-changeset"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Directive() export abstract class AbstractWidgetComponent extends UntilDestroyedMixin { @@ -16,8 +16,8 @@ export abstract class AbstractWidgetComponent extends UntilDestroyedMixin { @Output() resourceChanged = new EventEmitter(); public get widgetName():string { - let editableName = this.resource?.options.name as string; - let widgetIdentifier = this.resource?.identifier; + const editableName = this.resource?.options.name as string; + const widgetIdentifier = this.resource?.identifier; if (this.isEditable) { return editableName; @@ -30,7 +30,7 @@ export abstract class AbstractWidgetComponent extends UntilDestroyedMixin { } public renameWidget(name:string) { - let changeset = this.setChangesetOptions({ name: name }); + const changeset = this.setChangesetOptions({ name: name }); this.resourceChanged.emit(changeset); } @@ -50,7 +50,7 @@ export abstract class AbstractWidgetComponent extends UntilDestroyedMixin { } protected setChangesetOptions(values:{ [key:string]:unknown; }) { - let changeset = new WidgetChangeset(this.resource); + const changeset = new WidgetChangeset(this.resource); changeset.setValue('options', Object.assign({}, this.resource.options, values)); diff --git a/frontend/src/app/modules/grids/widgets/add/add.modal.ts b/frontend/src/app/modules/grids/widgets/add/add.modal.ts index 54a159d0b19..2b96dea75d1 100644 --- a/frontend/src/app/modules/grids/widgets/add/add.modal.ts +++ b/frontend/src/app/modules/grids/widgets/add/add.modal.ts @@ -1,11 +1,11 @@ -import {Component, ElementRef, Inject, ChangeDetectorRef} from "@angular/core"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {WidgetRegistration} from "app/modules/grids/grid/grid.component"; -import {GridWidgetsService} from "app/modules/grids/widgets/widgets.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {BannersService} from "core-app/modules/common/enterprise/banners.service"; +import { Component, ElementRef, Inject, ChangeDetectorRef } from "@angular/core"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { WidgetRegistration } from "app/modules/grids/grid/grid.component"; +import { GridWidgetsService } from "app/modules/grids/widgets/widgets.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { BannersService } from "core-app/modules/common/enterprise/banners.service"; @Component({ templateUrl: './add.modal.html' @@ -52,7 +52,7 @@ export class AddGridWidgetModal extends OpModalComponent { } private get eligibleWidgets() { - let schemaWidgetIdentifiers = this.locals.schema.widgets.allowedValues.map((widget:any) => { + const schemaWidgetIdentifiers = this.locals.schema.widgets.allowedValues.map((widget:any) => { return widget.identifier; }); diff --git a/frontend/src/app/modules/grids/widgets/custom-text/custom-text-edit-field.service.ts b/frontend/src/app/modules/grids/widgets/custom-text/custom-text-edit-field.service.ts index 3aa643033b1..30124cc787c 100644 --- a/frontend/src/app/modules/grids/widgets/custom-text/custom-text-edit-field.service.ts +++ b/frontend/src/app/modules/grids/widgets/custom-text/custom-text-edit-field.service.ts @@ -1,13 +1,13 @@ -import {EditFieldHandler} from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; -import {ElementRef, Injector, Injectable} from "@angular/core"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {BehaviorSubject} from "rxjs"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; -import {UploadFile} from "core-components/api/op-file-upload/op-file-upload.service"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; +import { EditFieldHandler } from "core-app/modules/fields/edit/editing-portal/edit-field-handler"; +import { ElementRef, Injector, Injectable } from "@angular/core"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { BehaviorSubject } from "rxjs"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; +import { UploadFile } from "core-components/api/op-file-upload/op-file-upload.service"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; @Injectable() export class CustomTextEditFieldService extends EditFieldHandler { @@ -45,7 +45,7 @@ export class CustomTextEditFieldService extends EditFieldHandler { return this.update(); } - public reset(withText:string = '') { + public reset(withText = '') { if (withText.length > 0) { withText += '\n'; } @@ -131,8 +131,8 @@ export class CustomTextEditFieldService extends EditFieldHandler { * @param value */ private initializeChangeset(value:GridWidgetResource) { - let schemaHref = 'customtext-schema'; - let resourceSource = { + const schemaHref = 'customtext-schema'; + const resourceSource = { text: value.options.text, getEditorTypeFor: () => 'full', canAddAttachments: value.grid.canAddAttachments, @@ -144,16 +144,16 @@ export class CustomTextEditFieldService extends EditFieldHandler { } }; - let resource = this.halResource.createHalResource(resourceSource, true); + const resource = this.halResource.createHalResource(resourceSource, true); - let schemaSource = { + const schemaSource = { text: this.schema, _links: { self: { href: schemaHref } } }; - let schema = this.halResource.createHalResource(schemaSource, true) as SchemaResource; + const schema = this.halResource.createHalResource(schemaSource, true) as SchemaResource; this.schemaCache.update(resource, schema); diff --git a/frontend/src/app/modules/grids/widgets/custom-text/custom-text.component.ts b/frontend/src/app/modules/grids/widgets/custom-text/custom-text.component.ts index 31306da43f6..abba17f7b2b 100644 --- a/frontend/src/app/modules/grids/widgets/custom-text/custom-text.component.ts +++ b/frontend/src/app/modules/grids/widgets/custom-text/custom-text.component.ts @@ -1,4 +1,4 @@ -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; import { ApplicationRef, ChangeDetectionStrategy, @@ -12,13 +12,13 @@ import { SimpleChanges, ViewChild } from '@angular/core'; -import {CustomTextEditFieldService} from "core-app/modules/grids/widgets/custom-text/custom-text-edit-field.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {filter} from 'rxjs/operators'; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; -import {DomSanitizer, SafeHtml} from '@angular/platform-browser'; -import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; +import { CustomTextEditFieldService } from "core-app/modules/grids/widgets/custom-text/custom-text-edit-field.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { filter } from 'rxjs/operators'; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; +import { DomSanitizer, SafeHtml } from '@angular/platform-browser'; +import { DynamicBootstrapper } from "core-app/globals/dynamic-bootstrapper"; @Component({ templateUrl: './custom-text.component.html', @@ -53,9 +53,9 @@ export class WidgetCustomTextComponent extends AbstractWidgetComponent implement this.untilDestroyed(), filter(value => value !== this.resource.options['text']) ).subscribe(newText => { - let changeset = this.setChangesetOptions({ text: { raw: newText } }); - this.resourceChanged.emit(changeset); - }); + const changeset = this.setChangesetOptions({ text: { raw: newText } }); + this.resourceChanged.emit(changeset); + }); } ngOnChanges(changes:SimpleChanges):void { diff --git a/frontend/src/app/modules/grids/widgets/documents/documents.component.ts b/frontend/src/app/modules/grids/widgets/documents/documents.component.ts index 529167e7fbd..0a6489b8a95 100644 --- a/frontend/src/app/modules/grids/widgets/documents/documents.component.ts +++ b/frontend/src/app/modules/grids/widgets/documents/documents.component.ts @@ -1,14 +1,14 @@ -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; -import {Component, OnInit, SecurityContext, ChangeDetectionStrategy, ChangeDetectorRef, Injector} from '@angular/core'; -import {DocumentResource} from "../../../../../../../modules/documents/frontend/module/hal/resources/document-resource"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {DomSanitizer} from '@angular/platform-browser'; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; +import { Component, OnInit, SecurityContext, ChangeDetectionStrategy, ChangeDetectorRef, Injector } from '@angular/core'; +import { DocumentResource } from "../../../../../../../modules/documents/frontend/module/hal/resources/document-resource"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { DomSanitizer } from '@angular/platform-browser'; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './documents.component.html', @@ -67,12 +67,12 @@ export class WidgetDocumentsComponent extends AbstractWidgetComponent implements } public get documentsUrl() { - let orders = JSON.stringify([['updated_at', 'desc']]); + const orders = JSON.stringify([['updated_at', 'desc']]); let url = this.apiV3Service.documents.toPath() + `?sortBy=${orders}&pageSize=10`; if (this.currentProject.id) { - let filters = JSON.stringify([{project_id: { operator: '=', values: [this.currentProject.id.toString()]}}]); + const filters = JSON.stringify([{ project_id: { operator: '=', values: [this.currentProject.id.toString()] } }]); url = url + `&filters=${filters}`; } diff --git a/frontend/src/app/modules/grids/widgets/header/header.component.ts b/frontend/src/app/modules/grids/widgets/header/header.component.ts index 3c8f957ec79..18f4db52e7c 100644 --- a/frontend/src/app/modules/grids/widgets/header/header.component.ts +++ b/frontend/src/app/modules/grids/widgets/header/header.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ChangeDetectionStrategy, Input, EventEmitter, Output} from '@angular/core'; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; +import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output } from '@angular/core'; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; @Component({ selector: 'widget-header', @@ -37,7 +37,7 @@ import {GridAreaService} from "core-app/modules/grids/grid/area.service"; }) export class WidgetHeaderComponent { @Input() name:string; - @Input() editable:boolean = true; + @Input() editable = true; @Output() onRenamed = new EventEmitter(); constructor(readonly layout:GridAreaService) { diff --git a/frontend/src/app/modules/grids/widgets/menu/widget-abstract-menu.component.ts b/frontend/src/app/modules/grids/widgets/menu/widget-abstract-menu.component.ts index 834172853b9..37c8a2004e2 100644 --- a/frontend/src/app/modules/grids/widgets/menu/widget-abstract-menu.component.ts +++ b/frontend/src/app/modules/grids/widgets/menu/widget-abstract-menu.component.ts @@ -27,11 +27,11 @@ //++ import { Input, Directive } from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {OpContextMenuItem} from "core-components/op-context-menu/op-context-menu.types"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; -import {GridRemoveWidgetService} from "core-app/modules/grids/grid/remove-widget.service"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { OpContextMenuItem } from "core-components/op-context-menu/op-context-menu.types"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; +import { GridRemoveWidgetService } from "core-app/modules/grids/grid/remove-widget.service"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; @Directive() export abstract class WidgetAbstractMenuComponent { diff --git a/frontend/src/app/modules/grids/widgets/menu/widget-menu.component.ts b/frontend/src/app/modules/grids/widgets/menu/widget-menu.component.ts index c147e769604..24c288c7851 100644 --- a/frontend/src/app/modules/grids/widgets/menu/widget-menu.component.ts +++ b/frontend/src/app/modules/grids/widgets/menu/widget-menu.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from '@angular/core'; -import {WidgetAbstractMenuComponent} from "core-app/modules/grids/widgets/menu/widget-abstract-menu.component"; +import { Component } from '@angular/core'; +import { WidgetAbstractMenuComponent } from "core-app/modules/grids/widgets/menu/widget-abstract-menu.component"; @Component({ selector: 'widget-menu', diff --git a/frontend/src/app/modules/grids/widgets/menu/wp-set-menu.component.ts b/frontend/src/app/modules/grids/widgets/menu/wp-set-menu.component.ts index 912fe13f656..e516d503b15 100644 --- a/frontend/src/app/modules/grids/widgets/menu/wp-set-menu.component.ts +++ b/frontend/src/app/modules/grids/widgets/menu/wp-set-menu.component.ts @@ -27,14 +27,14 @@ //++ import { Injector, EventEmitter, Output, Directive } from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {GridRemoveWidgetService} from "core-app/modules/grids/grid/remove-widget.service"; -import {ComponentType} from '@angular/cdk/portal'; -import {WidgetAbstractMenuComponent} from "core-app/modules/grids/widgets/menu/widget-abstract-menu.component"; -import {WpGraphConfigurationModalComponent} from "core-app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { GridRemoveWidgetService } from "core-app/modules/grids/grid/remove-widget.service"; +import { ComponentType } from '@angular/cdk/portal'; +import { WidgetAbstractMenuComponent } from "core-app/modules/grids/widgets/menu/widget-abstract-menu.component"; +import { WpGraphConfigurationModalComponent } from "core-app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; @Directive() export abstract class WidgetWpSetMenuComponent extends WidgetAbstractMenuComponent { @@ -53,9 +53,9 @@ export abstract class WidgetWpSetMenuComponent extends WidgetAbstractMenuCompone readonly i18n:I18nService, protected readonly remove:GridRemoveWidgetService, readonly layout:GridAreaService) { - super(i18n, - remove, - layout); + super(i18n, + remove, + layout); } protected get configureItem() { @@ -65,7 +65,7 @@ export abstract class WidgetWpSetMenuComponent extends WidgetAbstractMenuCompone this.opModalService.show(this.configurationComponent, this.injector, this.locals) .closingEvent.subscribe((modal:WpGraphConfigurationModalComponent) => { this.onConfigured.emit(modal.configuration); - }); + }); return true; } }; diff --git a/frontend/src/app/modules/grids/widgets/news/news.component.spec.ts b/frontend/src/app/modules/grids/widgets/news/news.component.spec.ts index bd47a669d30..5652f71bb78 100644 --- a/frontend/src/app/modules/grids/widgets/news/news.component.spec.ts +++ b/frontend/src/app/modules/grids/widgets/news/news.component.spec.ts @@ -7,15 +7,15 @@ import { States } from 'core-app/components/states.service'; import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; import { HttpClientModule } from "@angular/common/http"; import { By } from '@angular/platform-browser'; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {of} from "rxjs"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { of } from "rxjs"; describe('shows news', () => { let app:WidgetNewsComponent; let fixture:ComponentFixture; let element:DebugElement; - let newsStub = { + const newsStub = { id: 1, title: 'Welcome to your demo project', author: { @@ -32,7 +32,7 @@ describe('shows news', () => { updatedAt: '2020-03-26T10:42:14Z', }; - let apiv3ServiceStub = { + const apiv3ServiceStub = { news: { list: (_params:any) => { return of({ elements: [newsStub] }); @@ -40,7 +40,7 @@ describe('shows news', () => { } }; - let configurationServiceStub = { + const configurationServiceStub = { isTimezoneSet: () => false, dateFormatPresent: () => false, timeFormatPresent: () => false @@ -75,7 +75,7 @@ describe('shows news', () => { it('should render the componenet successfully to show the news', waitForAsync(() => { fixture.detectChanges(); fixture.whenStable().then(() => { - let newsItem = document.querySelector('li'); + const newsItem = document.querySelector('li'); expect(document.contains(newsItem)).toBeTruthy(); }); })); @@ -83,7 +83,7 @@ describe('shows news', () => { it('should Not add the no-results component into DOM', waitForAsync(() => { fixture.detectChanges(); fixture.whenStable().then(() => { - let newsItem = document.querySelector('no-results'); + const newsItem = document.querySelector('no-results'); expect(document.contains(newsItem)).not.toBeTruthy(); }); })); @@ -91,7 +91,7 @@ describe('shows news', () => { it('should add the widget-header component into DOM', waitForAsync(() => { fixture.detectChanges(); fixture.whenStable().then(() => { - let newsItem = document.querySelector('widget-header'); + const newsItem = document.querySelector('widget-header'); expect(document.contains(newsItem)).toBeTruthy(); }); })); @@ -100,7 +100,7 @@ describe('shows news', () => { fixture.detectChanges(); fixture.whenStable().then(() => { - let newsItem:HTMLElement = element.query(By.css('.widget-box--additional-info')).nativeElement; + const newsItem:HTMLElement = element.query(By.css('.widget-box--additional-info')).nativeElement; expect(newsItem.innerText).toContain('We are glad you joined.'); }); @@ -110,7 +110,7 @@ describe('shows news', () => { fixture.detectChanges(); fixture.whenStable().then(() => { - let newsItem = document.querySelector('user-avatar'); + const newsItem = document.querySelector('user-avatar'); expect(document.contains(newsItem)).toBeTruthy(); }); diff --git a/frontend/src/app/modules/grids/widgets/news/news.component.ts b/frontend/src/app/modules/grids/widgets/news/news.component.ts index fc6f5b1e413..ed7ff66956c 100644 --- a/frontend/src/app/modules/grids/widgets/news/news.component.ts +++ b/frontend/src/app/modules/grids/widgets/news/news.component.ts @@ -5,8 +5,8 @@ import { PathHelperService } from "core-app/modules/common/path-helper/path-help import { TimezoneService } from "core-components/datetime/timezone.service"; import { NewsResource } from "core-app/modules/hal/resources/news-resource"; import { CurrentProjectService } from "core-components/projects/current-project.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Apiv3ListParameters} from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Apiv3ListParameters } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; @Component({ templateUrl: './news.component.html', @@ -17,7 +17,7 @@ export class WidgetNewsComponent extends AbstractWidgetComponent implements OnIn at: this.i18n.t('js.grid.widgets.news.at'), noResults: this.i18n.t('js.grid.widgets.news.no_results'), addedBy: (news:NewsResource) => this.i18n.t('js.label_added_time_by', - { author: this.newsAuthorName(news), age: this.newsCreated(news), authorLink: this.newsAuthorPath(news)}) + { author: this.newsAuthorName(news), age: this.newsCreated(news), authorLink: this.newsAuthorPath(news) }) }; public entries:NewsResource[] = []; @@ -86,7 +86,7 @@ export class WidgetNewsComponent extends AbstractWidgetComponent implements OnIn } private get newsDmParams() { - let params:Apiv3ListParameters = { + const params:Apiv3ListParameters = { sortBy: [['created_at', 'desc']], pageSize: 3 }; diff --git a/frontend/src/app/modules/grids/widgets/project-description/project-description.component.ts b/frontend/src/app/modules/grids/widgets/project-description/project-description.component.ts index ddfb4d2b81c..a9ef8a640c6 100644 --- a/frontend/src/app/modules/grids/widgets/project-description/project-description.component.ts +++ b/frontend/src/app/modules/grids/widgets/project-description/project-description.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, Injector} from '@angular/core'; -import {AbstractWidgetComponent} from "app/modules/grids/widgets/abstract-widget.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {Observable} from "rxjs"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Component, OnInit, ChangeDetectionStrategy, ChangeDetectorRef, Injector } from '@angular/core'; +import { AbstractWidgetComponent } from "app/modules/grids/widgets/abstract-widget.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { Observable } from "rxjs"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './project-description.component.html', diff --git a/frontend/src/app/modules/grids/widgets/project-details/project-details.component.ts b/frontend/src/app/modules/grids/widgets/project-details/project-details.component.ts index 743f18041eb..4125e251a64 100644 --- a/frontend/src/app/modules/grids/widgets/project-details/project-details.component.ts +++ b/frontend/src/app/modules/grids/widgets/project-details/project-details.component.ts @@ -35,14 +35,14 @@ import { OnInit, ViewChild } from '@angular/core'; -import {AbstractWidgetComponent} from "app/modules/grids/widgets/abstract-widget.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {Observable} from "rxjs"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { AbstractWidgetComponent } from "app/modules/grids/widgets/abstract-widget.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { Observable } from "rxjs"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './project-details.component.html', @@ -80,8 +80,8 @@ export class WidgetProjectDetailsComponent extends AbstractWidgetComponent imple private loadAndRender() { Promise.all([ - this.loadProjectSchema() - ]) + this.loadProjectSchema() + ]) .then(([schema]) => { this.setCustomFields(schema); }); @@ -99,7 +99,7 @@ export class WidgetProjectDetailsComponent extends AbstractWidgetComponent imple private setCustomFields(schema:SchemaResource) { Object.entries(schema).forEach(([key, keySchema]) => { if (key.match(/customField\d+/)) { - this.customFields.push({key: key, label: keySchema.name }); + this.customFields.push({ key: key, label: keySchema.name }); } }); diff --git a/frontend/src/app/modules/grids/widgets/project-status/project-status.component.ts b/frontend/src/app/modules/grids/widgets/project-status/project-status.component.ts index e3f7e808b5c..92433c87bc6 100644 --- a/frontend/src/app/modules/grids/widgets/project-status/project-status.component.ts +++ b/frontend/src/app/modules/grids/widgets/project-status/project-status.component.ts @@ -35,15 +35,15 @@ import { OnInit, ViewChild } from '@angular/core'; -import {AbstractWidgetComponent} from "app/modules/grids/widgets/abstract-widget.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Observable} from "rxjs"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { AbstractWidgetComponent } from "app/modules/grids/widgets/abstract-widget.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { WorkPackageViewHighlightingService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Observable } from "rxjs"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ templateUrl: './project-status.component.html', @@ -58,8 +58,8 @@ export class WidgetProjectStatusComponent extends AbstractWidgetComponent implem @ViewChild('contentContainer', { static: true }) readonly contentContainer:ElementRef; - public currentStatusCode:string = 'not set'; - public explanation:String = ''; + public currentStatusCode = 'not set'; + public explanation = ''; public project$:Observable; constructor(protected readonly i18n:I18nService, diff --git a/frontend/src/app/modules/grids/widgets/subprojects/subprojects.component.ts b/frontend/src/app/modules/grids/widgets/subprojects/subprojects.component.ts index 400ee376ee3..f28b13553d4 100644 --- a/frontend/src/app/modules/grids/widgets/subprojects/subprojects.component.ts +++ b/frontend/src/app/modules/grids/widgets/subprojects/subprojects.component.ts @@ -1,13 +1,13 @@ -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; -import {Component, OnInit, ChangeDetectorRef, Injector, ChangeDetectionStrategy} from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {Apiv3ListParameters} from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; +import { Component, OnInit, ChangeDetectorRef, Injector, ChangeDetectionStrategy } from '@angular/core'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { Apiv3ListParameters } from "core-app/modules/apiv3/paths/apiv3-list-resource.interface"; @Component({ templateUrl: './subprojects.component.html', @@ -61,6 +61,6 @@ export class WidgetSubprojectsComponent extends AbstractWidgetComponent implemen private get projectListParams():Apiv3ListParameters { return { sortBy: [['name', 'asc']], - filters: [['parent_id', '=', [this.currentProject.id!]]] }; + filters: [['parent_id', '=', [this.currentProject.id!]]] }; } } diff --git a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-configuration.modal.ts b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-configuration.modal.ts index f224beb19fa..23b229246e3 100644 --- a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-configuration.modal.ts +++ b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-configuration.modal.ts @@ -12,22 +12,22 @@ import { Optional, ViewChild } from '@angular/core'; -import {OpModalLocalsMap} from 'core-app/modules/modal/modal.types'; -import {OpModalComponent} from 'core-app/modules/modal/modal.component'; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; +import { OpModalLocalsMap } from 'core-app/modules/modal/modal.types'; +import { OpModalComponent } from 'core-app/modules/modal/modal.component'; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; import { ActiveTabInterface, TabComponent, TabInterface, TabPortalOutlet } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {LoadingIndicatorService} from 'core-app/modules/common/loading-indicator/loading-indicator.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ComponentType} from "@angular/cdk/portal"; -import {WpGraphConfigurationService} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; -import {WpGraphConfiguration} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { LoadingIndicatorService } from 'core-app/modules/common/loading-indicator/loading-indicator.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ComponentType } from "@angular/cdk/portal"; +import { WpGraphConfigurationService } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; +import { WpGraphConfiguration } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Component({ templateUrl: './time-entries-current-user-configuration.modal.html', @@ -74,7 +74,7 @@ export class TimeEntriesCurrentUserConfigurationModalComponent extends OpModalCo ngOnInit() { this.days = this.locals.options.days || Array.from({ length: 7 }, () => true ); - let momentFirstDayOffset = 1 + moment.localeData().firstDayOfWeek() % 7; + const momentFirstDayOffset = 1 + moment.localeData().firstDayOfWeek() % 7; this.text.weekdays = moment.localeData().weekdays().slice(momentFirstDayOffset).concat(moment.localeData().weekdays().slice(0, momentFirstDayOffset)); } diff --git a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-menu.component.ts b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-menu.component.ts index 0354da7c420..aa45a4a257a 100644 --- a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-menu.component.ts +++ b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-menu.component.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Output, EventEmitter, Injector} from '@angular/core'; -import {WpGraphConfigurationModalComponent} from "core-app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal"; -import {WidgetWpSetMenuComponent} from "core-app/modules/grids/widgets/menu/wp-set-menu.component"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {GridRemoveWidgetService} from "core-app/modules/grids/grid/remove-widget.service"; -import {GridAreaService} from "core-app/modules/grids/grid/area.service"; -import {WidgetAbstractMenuComponent} from "core-app/modules/grids/widgets/menu/widget-abstract-menu.component"; -import {TimeEntriesCurrentUserConfigurationModalComponent} from "core-app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-configuration.modal"; +import { Component, Output, EventEmitter, Injector } from '@angular/core'; +import { WpGraphConfigurationModalComponent } from "core-app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal"; +import { WidgetWpSetMenuComponent } from "core-app/modules/grids/widgets/menu/wp-set-menu.component"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { GridRemoveWidgetService } from "core-app/modules/grids/grid/remove-widget.service"; +import { GridAreaService } from "core-app/modules/grids/grid/area.service"; +import { WidgetAbstractMenuComponent } from "core-app/modules/grids/widgets/menu/widget-abstract-menu.component"; +import { TimeEntriesCurrentUserConfigurationModalComponent } from "core-app/modules/grids/widgets/time-entries/current-user/time-entries-current-user-configuration.modal"; @Component({ selector: 'widget-time-entries-current-user-menu', @@ -69,7 +69,7 @@ export class WidgetTimeEntriesCurrentUserMenuComponent extends WidgetAbstractMen if (modal.options) { this.onConfigured.emit(modal.options); } - }); + }); return true; } }; diff --git a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts index eca02dfbda1..f8895241d10 100644 --- a/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts +++ b/frontend/src/app/modules/grids/widgets/time-entries/current-user/time-entries-current-user.component.ts @@ -1,11 +1,11 @@ -import {Component, Injector, ChangeDetectionStrategy, ChangeDetectorRef} from "@angular/core"; +import { Component, Injector, ChangeDetectionStrategy, ChangeDetectorRef } from "@angular/core"; import { TimeEntryResource } from 'core-app/modules/hal/resources/time-entry-resource'; -import {CollectionResource} from "core-app/modules/hal/resources/collection-resource"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; -import {DisplayedDays} from "core-app/modules/calendar/te-calendar/te-calendar.component"; +import { CollectionResource } from "core-app/modules/hal/resources/collection-resource"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; +import { DisplayedDays } from "core-app/modules/calendar/te-calendar/te-calendar.component"; @Component({ templateUrl: './time-entries-current-user.component.html', @@ -34,7 +34,7 @@ export class WidgetTimeEntriesCurrentUserComponent extends AbstractWidgetCompone } public get total() { - let duration = this.entries.reduce((current, entry) => { + const duration = this.entries.reduce((current, entry) => { return current + this.timezone.toHours(entry.hours); }, 0); diff --git a/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts b/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts index b8c22c409de..2141afa4ab0 100644 --- a/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts +++ b/frontend/src/app/modules/grids/widgets/time-entries/list/time-entries-list.component.ts @@ -1,14 +1,14 @@ import { ChangeDetectorRef, Injector, OnInit, Directive } from "@angular/core"; -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {ConfirmDialogService} from "core-components/modals/confirm-dialog/confirm-dialog.service"; -import {FilterOperator} from "core-components/api/api-v3/api-v3-filter-builder"; -import {TimeEntryEditService} from "core-app/modules/time_entries/edit/edit.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { ConfirmDialogService } from "core-components/modals/confirm-dialog/confirm-dialog.service"; +import { FilterOperator } from "core-components/api/api-v3/api-v3-filter-builder"; +import { TimeEntryEditService } from "core-app/modules/time_entries/edit/edit.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Directive() export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetComponent implements OnInit { @@ -55,7 +55,7 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo } public get total() { - let duration = this.entries.reduce((current, entry) => { + const duration = this.entries.reduce((current, entry) => { return current + this.timezone.toHours(entry.hours); }, 0); @@ -105,19 +105,19 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo .id(entry.id!) .get() .subscribe((loadedEntry) => { - this.timeEntryEditService - .edit(loadedEntry) - .then((changedEntry) => { - let oldEntryIndex:number = this.entries.findIndex(el => el.id === changedEntry.entry.id); - let newEntries = this.entries; - newEntries[oldEntryIndex] = changedEntry.entry; + this.timeEntryEditService + .edit(loadedEntry) + .then((changedEntry) => { + const oldEntryIndex:number = this.entries.findIndex(el => el.id === changedEntry.entry.id); + const newEntries = this.entries; + newEntries[oldEntryIndex] = changedEntry.entry; - this.buildEntries(newEntries); - }) - .catch(() => { + this.buildEntries(newEntries); + }) + .catch(() => { // User canceled the modal - }); - }); + }); + }); } public deleteIfConfirmed(event:Event, entry:TimeEntryResource) { @@ -136,7 +136,7 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo dangerHighlighting: true }).then(() => { entry.delete().then(() => { - let newEntries = this.entries.filter((anEntry) => { + const newEntries = this.entries.filter((anEntry) => { return entry.id !== anEntry.id; }); @@ -152,10 +152,10 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo private buildEntries(entries:TimeEntryResource[]) { this.entries = entries; - let sumsByDateSpent:{[key:string]:number} = {}; + const sumsByDateSpent:{[key:string]:number} = {}; entries.forEach((entry) => { - let date = entry.spentOn; + const date = entry.spentOn; if (!sumsByDateSpent[date]) { sumsByDateSpent[date] = 0; @@ -164,7 +164,7 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo sumsByDateSpent[date] = sumsByDateSpent[date] + this.timezone.toHours(entry.hours); }); - let sortedEntries = entries.sort((a, b) => { + const sortedEntries = entries.sort((a, b) => { return b.spentOn.localeCompare(a.spentOn); }); @@ -173,10 +173,10 @@ export abstract class WidgetTimeEntriesListComponent extends AbstractWidgetCompo sortedEntries.forEach((entry) => { if (entry.spentOn !== currentDate) { currentDate = entry.spentOn; - this.rows.push({date: this.timezone.formattedDate(currentDate!), sum: this.formatNumber(sumsByDateSpent[currentDate!])}); + this.rows.push({ date: this.timezone.formattedDate(currentDate!), sum: this.formatNumber(sumsByDateSpent[currentDate!]) }); } - this.rows.push({date: currentDate!, entry: entry}); + this.rows.push({ date: currentDate!, entry: entry }); }); //entries } diff --git a/frontend/src/app/modules/grids/widgets/time-entries/project/time-entries-project.component.ts b/frontend/src/app/modules/grids/widgets/time-entries/project/time-entries-project.component.ts index c35b6b92b2d..20b160cc5e1 100644 --- a/frontend/src/app/modules/grids/widgets/time-entries/project/time-entries-project.component.ts +++ b/frontend/src/app/modules/grids/widgets/time-entries/project/time-entries-project.component.ts @@ -1,11 +1,11 @@ -import {Component, OnInit, Injector, ChangeDetectorRef} from "@angular/core"; -import {FilterOperator} from "core-components/api/api-v3/api-v3-filter-builder"; -import {WidgetTimeEntriesListComponent} from "core-app/modules/grids/widgets/time-entries/list/time-entries-list.component"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {ConfirmDialogService} from "core-components/modals/confirm-dialog/confirm-dialog.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; +import { Component, OnInit, Injector, ChangeDetectorRef } from "@angular/core"; +import { FilterOperator } from "core-components/api/api-v3/api-v3-filter-builder"; +import { WidgetTimeEntriesListComponent } from "core-app/modules/grids/widgets/time-entries/list/time-entries-list.component"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { ConfirmDialogService } from "core-components/modals/confirm-dialog/confirm-dialog.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; @Component({ templateUrl: '../list/time-entries-list.component.html', diff --git a/frontend/src/app/modules/grids/widgets/widget-changeset.ts b/frontend/src/app/modules/grids/widgets/widget-changeset.ts index d8cd57cc709..37905aa59dc 100644 --- a/frontend/src/app/modules/grids/widgets/widget-changeset.ts +++ b/frontend/src/app/modules/grids/widgets/widget-changeset.ts @@ -1,5 +1,5 @@ -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; export class WidgetChangeset extends ResourceChangeset { diff --git a/frontend/src/app/modules/grids/widgets/widgets.service.ts b/frontend/src/app/modules/grids/widgets/widgets.service.ts index fe3303c2dcf..88372417eb6 100644 --- a/frontend/src/app/modules/grids/widgets/widgets.service.ts +++ b/frontend/src/app/modules/grids/widgets/widgets.service.ts @@ -1,6 +1,6 @@ -import {Injectable} from "@angular/core"; -import {WidgetRegistration} from "app/modules/grids/grid/grid.component"; -import {HookService} from "app/modules/plugins/hook-service"; +import { Injectable } from "@angular/core"; +import { WidgetRegistration } from "app/modules/grids/grid/grid.component"; +import { HookService } from "app/modules/plugins/hook-service"; @Injectable() export class GridWidgetsService { diff --git a/frontend/src/app/modules/grids/widgets/wp-calendar/wp-calendar.component.ts b/frontend/src/app/modules/grids/widgets/wp-calendar/wp-calendar.component.ts index 56e960bc718..600951ebd69 100644 --- a/frontend/src/app/modules/grids/widgets/wp-calendar/wp-calendar.component.ts +++ b/frontend/src/app/modules/grids/widgets/wp-calendar/wp-calendar.component.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, Injector} from '@angular/core'; -import {AbstractWidgetComponent} from "app/modules/grids/widgets/abstract-widget.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; +import { Component, Injector } from '@angular/core'; +import { AbstractWidgetComponent } from "app/modules/grids/widgets/abstract-widget.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; @Component({ templateUrl: './wp-calendar.component.html', diff --git a/frontend/src/app/modules/grids/widgets/wp-graph/wp-graph-menu.component.ts b/frontend/src/app/modules/grids/widgets/wp-graph/wp-graph-menu.component.ts index 7d62150dc48..09b938206ed 100644 --- a/frontend/src/app/modules/grids/widgets/wp-graph/wp-graph-menu.component.ts +++ b/frontend/src/app/modules/grids/widgets/wp-graph/wp-graph-menu.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from '@angular/core'; -import {WpGraphConfigurationModalComponent} from "core-app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal"; -import {WidgetWpSetMenuComponent} from "core-app/modules/grids/widgets/menu/wp-set-menu.component"; +import { Component } from '@angular/core'; +import { WpGraphConfigurationModalComponent } from "core-app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal"; +import { WidgetWpSetMenuComponent } from "core-app/modules/grids/widgets/menu/wp-set-menu.component"; @Component({ selector: 'widget-wp-graph-menu', diff --git a/frontend/src/app/modules/grids/widgets/wp-graph/wp-graph.component.ts b/frontend/src/app/modules/grids/widgets/wp-graph/wp-graph.component.ts index f2e43e2803d..80ae9c94f40 100644 --- a/frontend/src/app/modules/grids/widgets/wp-graph/wp-graph.component.ts +++ b/frontend/src/app/modules/grids/widgets/wp-graph/wp-graph.component.ts @@ -1,10 +1,10 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnDestroy, OnInit} from '@angular/core'; -import {WorkPackageEmbeddedGraphDataset} from "core-app/modules/work-package-graphs/embedded/wp-embedded-graph.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; -import {ChartOptions, ChartType} from 'chart.js'; -import {WpGraphConfigurationService} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; -import {WpGraphConfiguration} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Injector, OnDestroy, OnInit } from '@angular/core'; +import { WorkPackageEmbeddedGraphDataset } from "core-app/modules/work-package-graphs/embedded/wp-embedded-graph.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; +import { ChartOptions, ChartType } from 'chart.js'; +import { WpGraphConfigurationService } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; +import { WpGraphConfiguration } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration"; @Component({ selector: 'widget-wp-graph', @@ -38,7 +38,7 @@ export class WidgetWpGraphComponent extends AbstractWidgetComponent implements O this.repaint(); if (this.resource.options.chartType !== this.graphConfiguration.chartType) { - let changeset = this.setChangesetOptions({ chartType: this.graphConfiguration.chartType }); + const changeset = this.setChangesetOptions({ chartType: this.graphConfiguration.chartType }); this.resourceChanged.emit(changeset); } @@ -51,7 +51,7 @@ export class WidgetWpGraphComponent extends AbstractWidgetComponent implements O } protected initializeConfiguration() { - let ids = []; + const ids = []; if (this.resource.options.queryId) { ids.push({ id: this.resource.options.queryId as string }); } @@ -65,7 +65,7 @@ export class WidgetWpGraphComponent extends AbstractWidgetComponent implements O this.graphConfiguration.ensureQueryAndLoad() .then(() => { if (!this.resource.options.queryId) { - let changeset = this.setChangesetOptions({ queryId: this.graphConfiguration.queryParams[0].id }); + const changeset = this.setChangesetOptions({ queryId: this.graphConfiguration.queryParams[0].id }); this.resourceChanged.emit(changeset); } diff --git a/frontend/src/app/modules/grids/widgets/wp-overview/wp-overview.component.ts b/frontend/src/app/modules/grids/widgets/wp-overview/wp-overview.component.ts index c057483e6df..9892f19f319 100644 --- a/frontend/src/app/modules/grids/widgets/wp-overview/wp-overview.component.ts +++ b/frontend/src/app/modules/grids/widgets/wp-overview/wp-overview.component.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ChangeDetectionStrategy} from '@angular/core'; -import {AbstractWidgetComponent} from "app/modules/grids/widgets/abstract-widget.component"; +import { Component, ChangeDetectionStrategy } from '@angular/core'; +import { AbstractWidgetComponent } from "app/modules/grids/widgets/abstract-widget.component"; @Component({ templateUrl: './wp-overview.component.html', diff --git a/frontend/src/app/modules/grids/widgets/wp-table/wp-table-menu.component.ts b/frontend/src/app/modules/grids/widgets/wp-table/wp-table-menu.component.ts index e2baf0d7867..66543112bbe 100644 --- a/frontend/src/app/modules/grids/widgets/wp-table/wp-table-menu.component.ts +++ b/frontend/src/app/modules/grids/widgets/wp-table/wp-table-menu.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from '@angular/core'; -import {WpTableConfigurationModalComponent} from "core-components/wp-table/configuration-modal/wp-table-configuration.modal"; -import {WidgetWpSetMenuComponent} from "core-app/modules/grids/widgets/menu/wp-set-menu.component"; +import { Component } from '@angular/core'; +import { WpTableConfigurationModalComponent } from "core-components/wp-table/configuration-modal/wp-table-configuration.modal"; +import { WidgetWpSetMenuComponent } from "core-app/modules/grids/widgets/menu/wp-set-menu.component"; @Component({ selector: 'widget-wp-table-menu', diff --git a/frontend/src/app/modules/grids/widgets/wp-table/wp-table-qs.component.ts b/frontend/src/app/modules/grids/widgets/wp-table/wp-table-qs.component.ts index 5585741f7c8..ea82b1513b6 100644 --- a/frontend/src/app/modules/grids/widgets/wp-table/wp-table-qs.component.ts +++ b/frontend/src/app/modules/grids/widgets/wp-table/wp-table-qs.component.ts @@ -1,6 +1,6 @@ -import {Component} from '@angular/core'; -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; -import {WidgetChangeset} from "core-app/modules/grids/widgets/widget-changeset"; +import { Component } from '@angular/core'; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; +import { WidgetChangeset } from "core-app/modules/grids/widgets/widget-changeset"; @Component({ templateUrl: './wp-table-qs.component.html', diff --git a/frontend/src/app/modules/grids/widgets/wp-table/wp-table.component.ts b/frontend/src/app/modules/grids/widgets/wp-table/wp-table.component.ts index 857b41436ec..64ee710e53f 100644 --- a/frontend/src/app/modules/grids/widgets/wp-table/wp-table.component.ts +++ b/frontend/src/app/modules/grids/widgets/wp-table/wp-table.component.ts @@ -1,15 +1,15 @@ -import {ChangeDetectionStrategy, Component, Injector} from '@angular/core'; -import {AbstractWidgetComponent} from "core-app/modules/grids/widgets/abstract-widget.component"; -import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {WorkPackageTableConfiguration} from "core-components/wp-table/wp-table-configuration"; -import {Observable} from 'rxjs'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {UrlParamsHelperService} from "core-components/wp-query/url-params-helper"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {StateService} from '@uirouter/core'; -import {finalize, publish, skip} from 'rxjs/operators'; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { ChangeDetectionStrategy, Component, Injector } from '@angular/core'; +import { AbstractWidgetComponent } from "core-app/modules/grids/widgets/abstract-widget.component"; +import { QueryFormResource } from "core-app/modules/hal/resources/query-form-resource"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { WorkPackageTableConfiguration } from "core-components/wp-table/wp-table-configuration"; +import { Observable } from 'rxjs'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { UrlParamsHelperService } from "core-components/wp-query/url-params-helper"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { StateService } from '@uirouter/core'; +import { finalize, publish, skip } from 'rxjs/operators'; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ selector: 'widget-wp-table', @@ -43,7 +43,7 @@ export class WidgetWpTableComponent extends AbstractWidgetComponent { if (!this.resource.options.queryId) { this.createInitial() .then((query) => { - let changeset = this.setChangesetOptions({ queryId: query.id }); + const changeset = this.setChangesetOptions({ queryId: query.id }); this.resourceChanged.emit(changeset); @@ -64,8 +64,8 @@ export class WidgetWpTableComponent extends AbstractWidgetComponent { skip(2), this.untilDestroyed() ).subscribe((query) => { - this.ensureFormAndSaveQuery(query); - }); + this.ensureFormAndSaveQuery(query); + }); } public get widgetName() { @@ -108,8 +108,8 @@ export class WidgetWpTableComponent extends AbstractWidgetComponent { private createInitial():Promise { const projectIdentifier = this.state.params['projectPath']; - let initializationProps = this.resource.options.queryProps; - let queryProps = Object.assign({ pageSize: 0 }, initializationProps); + const initializationProps = this.resource.options.queryProps; + const queryProps = Object.assign({ pageSize: 0 }, initializationProps); return this .apiV3Service diff --git a/frontend/src/app/modules/hal/hal-link/hal-link.ts b/frontend/src/app/modules/hal/hal-link/hal-link.ts index bc327913bb1..77d3569ea9f 100644 --- a/frontend/src/app/modules/hal/hal-link/hal-link.ts +++ b/frontend/src/app/modules/hal/hal-link/hal-link.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {HTTPSupportedMethods} from "core-app/modules/hal/http/http.interfaces"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { HTTPSupportedMethods } from "core-app/modules/hal/http/http.interfaces"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; export interface HalLinkInterface { href:string|null; @@ -98,7 +98,7 @@ export class HalLink implements HalLinkInterface { let href = _.clone(this.href) || ''; _.each(templateValues, (value:string, key:string) => { - let regexp = new RegExp('{' + key + '}'); + const regexp = new RegExp('{' + key + '}'); href = href.replace(regexp, value); }); diff --git a/frontend/src/app/modules/hal/helpers/hal-resource-builder.ts b/frontend/src/app/modules/hal/helpers/hal-resource-builder.ts index f2d3b6437e4..766f096b603 100644 --- a/frontend/src/app/modules/hal/helpers/hal-resource-builder.ts +++ b/frontend/src/app/modules/hal/helpers/hal-resource-builder.ts @@ -1,7 +1,7 @@ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {OpenprojectHalModuleHelpers} from 'core-app/modules/hal/helpers/lazy-accessor'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {HalLink} from 'core-app/modules/hal/hal-link/hal-link'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { OpenprojectHalModuleHelpers } from 'core-app/modules/hal/helpers/lazy-accessor'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { HalLink } from 'core-app/modules/hal/hal-link/hal-link'; import * as ObservableArray from 'observable-array'; @@ -46,7 +46,7 @@ export function initializeHalProperties(halResourceServic } } - function asHalResource(value?:HalSource, loaded:boolean = true):HalResource|HalSource|undefined|null { + function asHalResource(value?:HalSource, loaded = true):HalResource|HalSource|undefined|null { if (_.isNil(value)) { return value; } diff --git a/frontend/src/app/modules/hal/helpers/lazy-accessor.spec.ts b/frontend/src/app/modules/hal/helpers/lazy-accessor.spec.ts index 015f4fc123d..e67f0f50b49 100644 --- a/frontend/src/app/modules/hal/helpers/lazy-accessor.spec.ts +++ b/frontend/src/app/modules/hal/helpers/lazy-accessor.spec.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpenprojectHalModuleHelpers} from "core-app/modules/hal/helpers/lazy-accessor"; +import { OpenprojectHalModuleHelpers } from "core-app/modules/hal/helpers/lazy-accessor"; describe('lazy service', () => { var lazy = OpenprojectHalModuleHelpers.lazy; @@ -37,7 +37,7 @@ describe('lazy service', () => { }); it('should add a property with the given name to the object', () => { - let obj:any = { + const obj:any = { prop: void 0 }; lazy(obj, 'prop', () => ''); @@ -45,7 +45,7 @@ describe('lazy service', () => { }); it('should add an enumerable property', () => { - let obj:any = { + const obj:any = { prop: void 0 }; lazy(obj, 'prop', () => ''); @@ -53,7 +53,7 @@ describe('lazy service', () => { }); it('should add a configurable property', () => { - let obj:any = { + const obj:any = { prop: void 0 }; lazy(obj, 'prop', () => ''); @@ -61,7 +61,7 @@ describe('lazy service', () => { }); it('should set the value of the property provided by the setter', () => { - let obj:any = { + const obj:any = { prop: void 0 }; lazy(obj, 'prop', () => '', (val:any) => val); @@ -70,19 +70,18 @@ describe('lazy service', () => { }); it('should not be settable, if no setter is provided', () => { - let obj:any = { + const obj:any = { prop: void 0 }; lazy(obj, 'prop', () => ''); try { obj.prop = 'hello'; - } - catch (Error) {} + } catch (Error) {} expect(obj.prop).not.toEqual('hello'); }); it('should do nothing if the target is not an object', () => { - let obj:any = null; + const obj:any = null; lazy(obj, 'prop', () => ''); expect(obj).toBeNull(); }); diff --git a/frontend/src/app/modules/hal/helpers/lazy-accessor.ts b/frontend/src/app/modules/hal/helpers/lazy-accessor.ts index ab902af4351..6ee30b0f3bc 100644 --- a/frontend/src/app/modules/hal/helpers/lazy-accessor.ts +++ b/frontend/src/app/modules/hal/helpers/lazy-accessor.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export namespace OpenprojectHalModuleHelpers { export function lazy(obj:HalResource, - property:string, - getter:{ ():any }, - setter?:{ (value:any):void }):void { + property:string, + getter:{ ():any }, + setter?:{ (value:any):void }):void { if (_.isObject(obj)) { let done = false; let value:any; - let config:any = { + const config:any = { get() { if (!done) { value = getter(); diff --git a/frontend/src/app/modules/hal/http/http.interfaces.ts b/frontend/src/app/modules/hal/http/http.interfaces.ts index 4c4bce1b5e9..256238c294e 100644 --- a/frontend/src/app/modules/hal/http/http.interfaces.ts +++ b/frontend/src/app/modules/hal/http/http.interfaces.ts @@ -1,4 +1,4 @@ -import {HttpHeaders, HttpParams} from "@angular/common/http"; +import { HttpHeaders, HttpParams } from "@angular/common/http"; export type HTTPSupportedMethods = 'get'|'post'|'put'|'patch'|'delete'; diff --git a/frontend/src/app/modules/hal/http/openproject-header-interceptor.ts b/frontend/src/app/modules/hal/http/openproject-header-interceptor.ts index ab8bd991ddf..260a05fe263 100644 --- a/frontend/src/app/modules/hal/http/openproject-header-interceptor.ts +++ b/frontend/src/app/modules/hal/http/openproject-header-interceptor.ts @@ -4,7 +4,7 @@ import { HttpHandler, HttpRequest, } from '@angular/common/http'; -import {Observable} from 'rxjs'; +import { Observable } from 'rxjs'; import { Injectable } from "@angular/core"; @Injectable() diff --git a/frontend/src/app/modules/hal/openproject-hal.module.ts b/frontend/src/app/modules/hal/openproject-hal.module.ts index 323331c1dfe..20c4062338b 100644 --- a/frontend/src/app/modules/hal/openproject-hal.module.ts +++ b/frontend/src/app/modules/hal/openproject-hal.module.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {APP_INITIALIZER, ErrorHandler, NgModule} from '@angular/core'; -import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http'; -import {initializeHalResourceConfig} from 'core-app/modules/hal/services/hal-resource.config'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {OpenProjectHeaderInterceptor} from 'core-app/modules/hal/http/openproject-header-interceptor'; -import {CommonModule} from "@angular/common"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {HalAwareErrorHandler} from "core-app/modules/hal/services/hal-aware-error-handler"; +import { APP_INITIALIZER, ErrorHandler, NgModule } from '@angular/core'; +import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http'; +import { initializeHalResourceConfig } from 'core-app/modules/hal/services/hal-resource.config'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { OpenProjectHeaderInterceptor } from 'core-app/modules/hal/http/openproject-header-interceptor'; +import { CommonModule } from "@angular/common"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { HalAwareErrorHandler } from "core-app/modules/hal/services/hal-aware-error-handler"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/hal/resources/attachment-collection-resource.ts b/frontend/src/app/modules/hal/resources/attachment-collection-resource.ts index e0c746b8774..9929ef47b70 100644 --- a/frontend/src/app/modules/hal/resources/attachment-collection-resource.ts +++ b/frontend/src/app/modules/hal/resources/attachment-collection-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; export class AttachmentCollectionResource extends CollectionResource { public $initialize(source:any) { diff --git a/frontend/src/app/modules/hal/resources/collection-resource.ts b/frontend/src/app/modules/hal/resources/collection-resource.ts index 3f93f331e75..78a318d5168 100644 --- a/frontend/src/app/modules/hal/resources/collection-resource.ts +++ b/frontend/src/app/modules/hal/resources/collection-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class CollectionResource extends HalResource { public elements:T[]; diff --git a/frontend/src/app/modules/hal/resources/configuration-resource.ts b/frontend/src/app/modules/hal/resources/configuration-resource.ts index 86037960504..23e43bb6f74 100644 --- a/frontend/src/app/modules/hal/resources/configuration-resource.ts +++ b/frontend/src/app/modules/hal/resources/configuration-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class ConfigurationResource extends HalResource { diff --git a/frontend/src/app/modules/hal/resources/custom-action-resource.ts b/frontend/src/app/modules/hal/resources/custom-action-resource.ts index fa856264233..adda39d15c6 100644 --- a/frontend/src/app/modules/hal/resources/custom-action-resource.ts +++ b/frontend/src/app/modules/hal/resources/custom-action-resource.ts @@ -26,17 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export interface CustomActionResourceLinks { self():Promise; executeImmediately(payload:any):Promise; } -export class CustomActionResource extends HalResource { - public description:string; +export interface CustomActionResourceEmbedded { + description:string; } -export interface CustomActionResource extends CustomActionResourceLinks { +export class CustomActionResource extends HalResource { } + +export interface CustomActionResource extends CustomActionResourceLinks, CustomActionResourceEmbedded {} diff --git a/frontend/src/app/modules/hal/resources/error-resource.ts b/frontend/src/app/modules/hal/resources/error-resource.ts index 9ede6a2f184..f0dfde432f2 100644 --- a/frontend/src/app/modules/hal/resources/error-resource.ts +++ b/frontend/src/app/modules/hal/resources/error-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {HttpErrorResponse} from "@angular/common/http"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { HttpErrorResponse } from "@angular/common/http"; export const v3ErrorIdentifierQueryInvalid = 'urn:openproject-org:api:v3:errors:InvalidQuery'; export const v3ErrorIdentifierMultipleErrors = 'urn:openproject-org:api:v3:errors:MultipleErrors'; @@ -41,7 +41,7 @@ export class ErrorResource extends HalResource { /** We may get a reference to the underlying http error */ public httpError?:HttpErrorResponse; - public isValidationError:boolean = false; + public isValidationError = false; /** * Override toString to ensure the resource can @@ -68,8 +68,7 @@ export class ErrorResource extends HalResource { if (this.details) { columns = [{ details: this.details }]; - } - else if (this.errors) { + } else if (this.errors) { columns = this.errors; } @@ -83,21 +82,19 @@ export class ErrorResource extends HalResource { } public getMessagesPerAttribute():{ [attribute:string]:string[] } { - let perAttribute:any = {}; + const perAttribute:any = {}; if (this.details) { perAttribute[this.details.attribute] = [this.message]; - } - else { + } else { _.forEach(this.errors, (error:any) => { if (error.errorIdentifier === v3ErrorIdentifierMultipleErrors) { const [attribute, messages] = this.extractMultiError(error); - let current = perAttribute[attribute] || []; + const current = perAttribute[attribute] || []; perAttribute[attribute] = current.concat(messages); } else if (perAttribute[error.details.attribute]) { perAttribute[error.details.attribute].push(error.message); - } - else { + } else { perAttribute[error.details.attribute] = [error.message]; } }); @@ -107,8 +104,8 @@ export class ErrorResource extends HalResource { } protected extractMultiError(resource:ErrorResource):[string, string[]] { - let attribute = resource.errors[0].details.attribute; - let messages = resource.errors.map((el:ErrorResource) => el.message); + const attribute = resource.errors[0].details.attribute; + const messages = resource.errors.map((el:ErrorResource) => el.message); return [attribute, messages]; } diff --git a/frontend/src/app/modules/hal/resources/form-resource.ts b/frontend/src/app/modules/hal/resources/form-resource.ts index 7e2961aa4d2..7844f6f34b4 100644 --- a/frontend/src/app/modules/hal/resources/form-resource.ts +++ b/frontend/src/app/modules/hal/resources/form-resource.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; import { ErrorResource, v3ErrorIdentifierMultipleErrors @@ -38,8 +38,12 @@ export interface FormResourceLinks { commit(payload:any):Promise; } -export class FormResource extends HalResource { +export interface FormResourceEmbedded { + schema:SchemaResource; + validationErrors:{ [attribute:string]:ErrorResource }; +} +export class FormResource extends HalResource { public schema:SchemaResource; public validationErrors:{ [attribute:string]:ErrorResource }; @@ -64,4 +68,4 @@ export class FormResource extends HalResource { } } -export interface FormResource extends FormResourceLinks {} +export interface FormResource extends FormResourceEmbedded, FormResourceLinks {} diff --git a/frontend/src/app/modules/hal/resources/grid-resource.ts b/frontend/src/app/modules/hal/resources/grid-resource.ts index 7972a8e937e..d4fe00b02b7 100644 --- a/frontend/src/app/modules/hal/resources/grid-resource.ts +++ b/frontend/src/app/modules/hal/resources/grid-resource.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; -import {Attachable} from "core-app/modules/hal/resources/mixins/attachable-mixin"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; +import { Attachable } from "core-app/modules/hal/resources/mixins/attachable-mixin"; export interface GridResourceLinks { update(payload:unknown):Promise; @@ -48,12 +48,12 @@ export class GridBaseResource extends HalResource { this.widgets = this .widgets .map((widget:Object) => { - let widgetResource = new GridWidgetResource( this.injector, - widget, - true, - this.halInitializer, - 'GridWidget' - ); + const widgetResource = new GridWidgetResource( this.injector, + widget, + true, + this.halInitializer, + 'GridWidget' + ); widgetResource.grid = this; diff --git a/frontend/src/app/modules/hal/resources/grid-widget-resource.ts b/frontend/src/app/modules/hal/resources/grid-widget-resource.ts index bcca8b7ae3e..babd790d203 100644 --- a/frontend/src/app/modules/hal/resources/grid-widget-resource.ts +++ b/frontend/src/app/modules/hal/resources/grid-widget-resource.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; export class GridWidgetResource extends HalResource { @InjectField() protected halResource:HalResourceService; @@ -53,6 +53,6 @@ export class GridWidgetResource extends HalResource { public grid:GridResource; public get schema():SchemaResource { - return this.halResource.createHalResource({'_type': 'Schema' }, true); + return this.halResource.createHalResource({ '_type': 'Schema' }, true); } } diff --git a/frontend/src/app/modules/hal/resources/group-resource.ts b/frontend/src/app/modules/hal/resources/group-resource.ts index 096acf15582..9a28e9b2c09 100644 --- a/frontend/src/app/modules/hal/resources/group-resource.ts +++ b/frontend/src/app/modules/hal/resources/group-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class GroupResource extends HalResource { } diff --git a/frontend/src/app/modules/hal/resources/hal-resource.spec.ts b/frontend/src/app/modules/hal/resources/hal-resource.spec.ts index f554ccc44f3..0ae37249db7 100644 --- a/frontend/src/app/modules/hal/resources/hal-resource.spec.ts +++ b/frontend/src/app/modules/hal/resources/hal-resource.spec.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector} from '@angular/core'; +import { Injector } from '@angular/core'; import { TestBed, waitForAsync } from '@angular/core/testing'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {HalLink, HalLinkInterface} from 'core-app/modules/hal/hal-link/hal-link'; -import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {States} from 'core-components/states.service'; -import {of} from 'rxjs'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { HalLink, HalLinkInterface } from 'core-app/modules/hal/hal-link/hal-link'; +import { OpenprojectHalModule } from 'core-app/modules/hal/openproject-hal.module'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { States } from 'core-components/states.service'; +import { of } from 'rxjs'; import Spy = jasmine.Spy; describe('HalResource', () => { @@ -67,7 +67,7 @@ describe('HalResource', () => { })); it('should be instantiable using a default object', () => { - let resource = halResourceService.createHalResource({}, true); + const resource = halResourceService.createHalResource({}, true); expect(resource.$href).toEqual(null); }); @@ -86,8 +86,7 @@ describe('HalResource', () => { getStub = spyOn(halResourceService, 'request').and.callFake((verb:string, path:string) => { if (verb === 'get' && path === '/api/hello') { return of(halResourceService.createHalResource(source)) as any; - } - else { + } else { return false as any; } }); @@ -103,7 +102,7 @@ describe('HalResource', () => { describe('when creating a resource using the create factory method', () => { describe('when there is no type configuration', () => { beforeEach(() => { - source = {_embedded: {}}; + source = { _embedded: {} }; resource = halResourceService.createHalResource(source, true); }); @@ -125,7 +124,7 @@ describe('HalResource', () => { halResourceService.registerResource( 'Other', - {cls: OtherResource, attrTypes: {someResource: 'Other'}} + { cls: OtherResource, attrTypes: { someResource: 'Other' } } ); resource = halResourceService.createHalResource(source, false); }); @@ -315,7 +314,7 @@ describe('HalResource', () => { beforeEach(() => { source = { - _links: {self: {href: 'bunny'}}, + _links: { self: { href: 'bunny' } }, rabbit: 'fluffy' }; plain = halResourceService.createHalResource(source).$plain(); @@ -413,7 +412,7 @@ describe('HalResource', () => { beforeEach(() => { source = { _embedded: { - resource: {_links: {}}, + resource: { _links: {} }, } }; @@ -568,7 +567,7 @@ describe('HalResource', () => { beforeEach(() => { source = { _embedded: { - elements: [{_links: {}}, {_links: {}}] + elements: [{ _links: {} }, { _links: {} }] } }; @@ -718,7 +717,7 @@ describe('HalResource', () => { let promise:Promise; beforeEach((done) => { - let result = halResourceService.createHalResource({ + const result = halResourceService.createHalResource({ _links: {}, name: 'name', foo: 'bar' @@ -727,8 +726,7 @@ describe('HalResource', () => { getStub = spyOn(halResourceService, 'request').and.callFake((verb:string, path:string) => { if (verb === 'get' && path === '/api/property') { return of(result) as any; - } - else { + } else { return false as any; } }); diff --git a/frontend/src/app/modules/hal/resources/hal-resource.ts b/frontend/src/app/modules/hal/resources/hal-resource.ts index 5d83a0fc49e..5af355173c0 100644 --- a/frontend/src/app/modules/hal/resources/hal-resource.ts +++ b/frontend/src/app/modules/hal/resources/hal-resource.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {InputState} from "reactivestates"; -import {HalLinkInterface} from 'core-app/modules/hal/hal-link/hal-link'; -import {Injector} from '@angular/core'; -import {States} from 'core-components/states.service'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { InputState } from "reactivestates"; +import { HalLinkInterface } from 'core-app/modules/hal/hal-link/hal-link'; +import { Injector } from '@angular/core'; +import { States } from 'core-components/states.service'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export interface HalResourceClass { new(injector:Injector, @@ -64,7 +64,7 @@ export class HalResource { // Internal initialization time for objects // created in the frontend - public __initialized_at:Number; + public __initialized_at:number; // The HalResource that this type maps to // This will almost always be equal to _type, however may be different for dynamic types @@ -98,8 +98,8 @@ export class HalResource { this.$initialize($source); } - public static getEmptyResource(self:{ href:string|null } = {href: null}):any { - return {_links: {self: self}}; + public static getEmptyResource(self:{ href:string|null } = { href: null }):any { + return { _links: { self: self } }; } public $links:any = {}; @@ -187,7 +187,7 @@ export class HalResource { * @returns A HalResource with the identitical copied source of other. */ public $copy(source:Object = {}):T { - let clone:HalResourceClass = this.constructor as any; + const clone:HalResourceClass = this.constructor as any; return new clone(this.injector, _.merge(this.$plain(), source), this.$loaded, this.halInitializer, this.$halType); } diff --git a/frontend/src/app/modules/hal/resources/help-text-resource.ts b/frontend/src/app/modules/hal/resources/help-text-resource.ts index a6be472e0fa..5c825cf0da2 100644 --- a/frontend/src/app/modules/hal/resources/help-text-resource.ts +++ b/frontend/src/app/modules/hal/resources/help-text-resource.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {CallableHalLink} from 'core-app/modules/hal/hal-link/hal-link'; -import {Attachable} from "core-app/modules/hal/resources/mixins/attachable-mixin"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { CallableHalLink } from 'core-app/modules/hal/hal-link/hal-link'; +import { Attachable } from "core-app/modules/hal/resources/mixins/attachable-mixin"; export class HelpTextBaseResource extends HalResource { public attribute:string; diff --git a/frontend/src/app/modules/hal/resources/meeting-content-resource.ts b/frontend/src/app/modules/hal/resources/meeting-content-resource.ts index 31ddc77dbb9..4cbd3cb845b 100644 --- a/frontend/src/app/modules/hal/resources/meeting-content-resource.ts +++ b/frontend/src/app/modules/hal/resources/meeting-content-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {Attachable} from 'core-app/modules/hal/resources/mixins/attachable-mixin'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { Attachable } from 'core-app/modules/hal/resources/mixins/attachable-mixin'; export interface MeetingContentResourceLinks { @@ -42,5 +42,4 @@ class MeetingContentBaseResource extends HalResource { export const MeetingContentResource = Attachable(MeetingContentBaseResource); -export interface MeetingContentResource extends HalResource { -} +export type MeetingContentResource = HalResource; diff --git a/frontend/src/app/modules/hal/resources/membership-resource.ts b/frontend/src/app/modules/hal/resources/membership-resource.ts index 05a3b256735..854c982780d 100644 --- a/frontend/src/app/modules/hal/resources/membership-resource.ts +++ b/frontend/src/app/modules/hal/resources/membership-resource.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {UserResource} from "core-app/modules/hal/resources/user-resource"; -import {RoleResource} from "core-app/modules/hal/resources/role-resource"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { UserResource } from "core-app/modules/hal/resources/user-resource"; +import { RoleResource } from "core-app/modules/hal/resources/role-resource"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; export interface MembershipResourceLinks { update(payload:unknown):Promise; diff --git a/frontend/src/app/modules/hal/resources/mixins/attachable-mixin.ts b/frontend/src/app/modules/hal/resources/mixins/attachable-mixin.ts index 21212f1b8ad..2018f70440e 100644 --- a/frontend/src/app/modules/hal/resources/mixins/attachable-mixin.ts +++ b/frontend/src/app/modules/hal/resources/mixins/attachable-mixin.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {AttachmentCollectionResource} from 'core-app/modules/hal/resources/attachment-collection-resource'; -import {OpenProjectFileUploadService, UploadFile} from 'core-components/api/op-file-upload/op-file-upload.service'; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {HttpErrorResponse} from "@angular/common/http"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { AttachmentCollectionResource } from 'core-app/modules/hal/resources/attachment-collection-resource'; +import { OpenProjectFileUploadService, UploadFile } from 'core-components/api/op-file-upload/op-file-upload.service'; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { HttpErrorResponse } from "@angular/common/http"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; import { OpenProjectDirectFileUploadService } from 'core-app/components/api/op-file-upload/op-direct-file-upload.service'; type Constructor = new (...args:any[]) => T; @@ -100,7 +100,7 @@ export function Attachable>(Base:TBase) { if (attachment.$isHal) { return attachment.delete() .then(() => { - if (!!this.attachmentsBackend) { + if (this.attachmentsBackend) { this.updateAttachments(); } else { this.attachments.count = Math.max(this.attachments.count - 1, 0); @@ -135,7 +135,7 @@ export function Attachable>(Base:TBase) { * Return an updated AttachmentCollectionResource. */ public uploadAttachments(files:UploadFile[]):Promise { - const {uploads, finished} = this.performUpload(files); + const { uploads, finished } = this.performUpload(files); const message = I18n.t('js.label_upload_notification'); const notification = this.NotificationsService.addAttachmentUpload(message, uploads); @@ -158,7 +158,7 @@ export function Attachable>(Base:TBase) { if (error.error instanceof ErrorEvent) { // A client-side or network error occurred. - message = this.I18n.t('js.error_attachment_upload', {error: error}); + message = this.I18n.t('js.error_attachment_upload', { error: error }); } else if (_.get(error, 'error._type') === 'Error') { message = error.error.message; } else { @@ -229,7 +229,7 @@ export function Attachable>(Base:TBase) { super.$initialize(source); - let attachments = this.attachments || {$source: {}, elements: []}; + const attachments = this.attachments || { $source: {}, elements: [] }; this.attachments = new AttachmentCollectionResource( this.injector, attachments, diff --git a/frontend/src/app/modules/hal/resources/news-resource.ts b/frontend/src/app/modules/hal/resources/news-resource.ts index dfbf41e86b5..8e7d2e80e59 100644 --- a/frontend/src/app/modules/hal/resources/news-resource.ts +++ b/frontend/src/app/modules/hal/resources/news-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class NewsResource extends HalResource { } diff --git a/frontend/src/app/modules/hal/resources/placeholder-user-resource.ts b/frontend/src/app/modules/hal/resources/placeholder-user-resource.ts index 2b0549660c6..a0c95320ad6 100644 --- a/frontend/src/app/modules/hal/resources/placeholder-user-resource.ts +++ b/frontend/src/app/modules/hal/resources/placeholder-user-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {InputState} from 'reactivestates'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { InputState } from 'reactivestates'; export class PlaceholderUserResource extends HalResource { // Links diff --git a/frontend/src/app/modules/hal/resources/post-resource.ts b/frontend/src/app/modules/hal/resources/post-resource.ts index 92b80387680..5c73ddb1c86 100644 --- a/frontend/src/app/modules/hal/resources/post-resource.ts +++ b/frontend/src/app/modules/hal/resources/post-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {Attachable} from 'core-app/modules/hal/resources/mixins/attachable-mixin'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { Attachable } from 'core-app/modules/hal/resources/mixins/attachable-mixin'; export interface PostResourceLinks { addAttachment(attachment:HalResource):Promise; @@ -41,5 +41,4 @@ class PostBaseResource extends HalResource { export const PostResource = Attachable(PostBaseResource); -export interface PostResource extends PostResourceLinks { -} +export type PostResource = PostResourceLinks; diff --git a/frontend/src/app/modules/hal/resources/project-resource.ts b/frontend/src/app/modules/hal/resources/project-resource.ts index 0db826b8e9c..892ce30cb01 100644 --- a/frontend/src/app/modules/hal/resources/project-resource.ts +++ b/frontend/src/app/modules/hal/resources/project-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class ProjectResource extends HalResource { public get state() { diff --git a/frontend/src/app/modules/hal/resources/query-filter-instance-resource.ts b/frontend/src/app/modules/hal/resources/query-filter-instance-resource.ts index a7d30441b76..5ade05e9a07 100644 --- a/frontend/src/app/modules/hal/resources/query-filter-instance-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-filter-instance-resource.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterResource} from 'core-app/modules/hal/resources/query-filter-resource'; -import {QueryFilterInstanceSchemaResource} from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; -import {QueryOperatorResource} from 'core-app/modules/hal/resources/query-operator-resource'; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterResource } from 'core-app/modules/hal/resources/query-filter-resource'; +import { QueryFilterInstanceSchemaResource } from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; +import { QueryOperatorResource } from 'core-app/modules/hal/resources/query-operator-resource'; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; export class QueryFilterInstanceResource extends HalResource { public filter:QueryFilterResource; @@ -71,7 +71,7 @@ export class QueryFilterInstanceResource extends HalResource { return null; } - let key = this.operator.href!.toString(); + const key = this.operator.href!.toString(); if (this.memoizedCurrentSchemas[key] === undefined) { try { diff --git a/frontend/src/app/modules/hal/resources/query-filter-instance-schema-resource.ts b/frontend/src/app/modules/hal/resources/query-filter-instance-schema-resource.ts index 6fa04e3540a..b7f0db8e065 100644 --- a/frontend/src/app/modules/hal/resources/query-filter-instance-schema-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-filter-instance-schema-resource.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {QueryFilterResource} from 'core-app/modules/hal/resources/query-filter-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { QueryFilterResource } from 'core-app/modules/hal/resources/query-filter-resource'; import { SchemaAttributeObject, SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; -import {SchemaDependencyResource} from 'core-app/modules/hal/resources/schema-dependency-resource'; -import {QueryOperatorResource} from 'core-app/modules/hal/resources/query-operator-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {HalLink} from "core-app/modules/hal/hal-link/hal-link"; +import { SchemaDependencyResource } from 'core-app/modules/hal/resources/schema-dependency-resource'; +import { QueryOperatorResource } from 'core-app/modules/hal/resources/query-operator-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { HalLink } from "core-app/modules/hal/hal-link/hal-link"; export interface QueryFilterInstanceSchemaResourceLinks { self:HalLink; @@ -74,9 +74,9 @@ export class QueryFilterInstanceSchemaResource extends SchemaResource { } public getFilter():QueryFilterInstanceResource { - let operator = (this.operator.allowedValues as HalResource[])[0]; - let filter = (this.filter.allowedValues as HalResource[])[0]; - let source:any = { + const operator = (this.operator.allowedValues as HalResource[])[0]; + const filter = (this.filter.allowedValues as HalResource[])[0]; + const source:any = { name: filter.name, _links: { filter: filter.$source._links.self, @@ -103,9 +103,9 @@ export class QueryFilterInstanceSchemaResource extends SchemaResource { } public resultingSchema(operator:QueryOperatorResource):QueryFilterInstanceSchemaResource { - let staticSchema = this.$source; - let dependentSchema = this.dependency.forValue(operator.href!.toString()); - let resultingSchema = {}; + const staticSchema = this.$source; + const dependentSchema = this.dependency.forValue(operator.href!.toString()); + const resultingSchema = {}; _.merge(resultingSchema, staticSchema, dependentSchema); diff --git a/frontend/src/app/modules/hal/resources/query-filter-resource.ts b/frontend/src/app/modules/hal/resources/query-filter-resource.ts index 6dcbd7d3b02..97e80d7bdf5 100644 --- a/frontend/src/app/modules/hal/resources/query-filter-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-filter-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {QueryFilterInstanceSchemaResource} from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { QueryFilterInstanceSchemaResource } from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; export interface QueryFilterResourceEmbedded { schema:QueryFilterInstanceSchemaResource; diff --git a/frontend/src/app/modules/hal/resources/query-form-resource.ts b/frontend/src/app/modules/hal/resources/query-form-resource.ts index 574657f3fae..5d0d38bb939 100644 --- a/frontend/src/app/modules/hal/resources/query-form-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-form-resource.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {QueryFilterInstanceSchemaResource} from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; -import {FormResource} from 'core-app/modules/hal/resources/form-resource'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { QueryFilterInstanceSchemaResource } from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; +import { FormResource } from 'core-app/modules/hal/resources/form-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; export interface QueryFormResourceEmbedded { filtersSchemas:CollectionResource; diff --git a/frontend/src/app/modules/hal/resources/query-group-by-resource.ts b/frontend/src/app/modules/hal/resources/query-group-by-resource.ts index 092202f029f..5f878740190 100644 --- a/frontend/src/app/modules/hal/resources/query-group-by-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-group-by-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class QueryGroupByResource extends HalResource { } diff --git a/frontend/src/app/modules/hal/resources/query-operator-resource.ts b/frontend/src/app/modules/hal/resources/query-operator-resource.ts index 508447a7f28..4f142637b6a 100644 --- a/frontend/src/app/modules/hal/resources/query-operator-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-operator-resource.ts @@ -27,7 +27,7 @@ //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class QueryOperatorResource extends HalResource { public get id():string { diff --git a/frontend/src/app/modules/hal/resources/query-resource.ts b/frontend/src/app/modules/hal/resources/query-resource.ts index 52915727a88..cae5c4edde3 100644 --- a/frontend/src/app/modules/hal/resources/query-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-resource.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryColumn} from 'core-components/wp-query/query-column'; -import {QueryGroupByResource} from 'core-app/modules/hal/resources/query-group-by-resource'; -import {ProjectResource} from 'core-app/modules/hal/resources/project-resource'; -import {QuerySortByResource} from 'core-app/modules/hal/resources/query-sort-by-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {HighlightingMode} from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; -import {QueryOrder} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; +import { QueryColumn } from 'core-components/wp-query/query-column'; +import { QueryGroupByResource } from 'core-app/modules/hal/resources/query-group-by-resource'; +import { ProjectResource } from 'core-app/modules/hal/resources/project-resource'; +import { QuerySortByResource } from 'core-app/modules/hal/resources/query-sort-by-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { HighlightingMode } from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; +import { QueryOrder } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; export interface QueryResourceEmbedded { results:WorkPackageCollectionResource; @@ -80,13 +80,13 @@ export class QueryResource extends HalResource { this.filters = this .filters - .map((filter:Object) => new QueryFilterInstanceResource( - this.injector, - filter, - true, - this.halInitializer, - 'QueryFilterInstance' - ) + .map((filter:unknown) => new QueryFilterInstanceResource( + this.injector, + filter, + true, + this.halInitializer, + 'QueryFilterInstance' + ) ); } } @@ -95,6 +95,5 @@ export interface QueryResourceLinks { updateImmediately?(attributes:any):Promise; } -export interface QueryResource extends QueryResourceLinks { -} +export interface QueryResource extends QueryResourceLinks {} diff --git a/frontend/src/app/modules/hal/resources/query-schema-resource.ts b/frontend/src/app/modules/hal/resources/query-schema-resource.ts index d054625b727..0dd25e57b15 100644 --- a/frontend/src/app/modules/hal/resources/query-schema-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-schema-resource.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; -import {QueryColumn} from 'core-components/wp-query/query-column'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {QueryFilterInstanceSchemaResource} from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; -import {QuerySortByResource} from 'core-app/modules/hal/resources/query-sort-by-resource'; -import {QueryGroupByResource} from 'core-app/modules/hal/resources/query-group-by-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; +import { QueryColumn } from 'core-components/wp-query/query-column'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { QueryFilterInstanceSchemaResource } from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; +import { QuerySortByResource } from 'core-app/modules/hal/resources/query-sort-by-resource'; +import { QueryGroupByResource } from 'core-app/modules/hal/resources/query-group-by-resource'; export class QuerySchemaResource extends SchemaResource { columns:{ allowedValues:QueryColumn[] }; diff --git a/frontend/src/app/modules/hal/resources/query-sort-by-resource.ts b/frontend/src/app/modules/hal/resources/query-sort-by-resource.ts index 71621149da1..5ddc751c0da 100644 --- a/frontend/src/app/modules/hal/resources/query-sort-by-resource.ts +++ b/frontend/src/app/modules/hal/resources/query-sort-by-resource.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryColumn} from 'core-components/wp-query/query-column'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { QueryColumn } from 'core-components/wp-query/query-column'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; -export const QUERY_SORT_BY_ASC = "urn:openproject-org:api:v3:queries:directions:asc" -export const QUERY_SORT_BY_DESC = "urn:openproject-org:api:v3:queries:directions:desc" +export const QUERY_SORT_BY_ASC = "urn:openproject-org:api:v3:queries:directions:asc"; +export const QUERY_SORT_BY_DESC = "urn:openproject-org:api:v3:queries:directions:desc"; export interface QuerySortByResourceEmbedded { column:QueryColumn; diff --git a/frontend/src/app/modules/hal/resources/relation-resource.ts b/frontend/src/app/modules/hal/resources/relation-resource.ts index be031d1908e..df7edd93d96 100644 --- a/frontend/src/app/modules/hal/resources/relation-resource.ts +++ b/frontend/src/app/modules/hal/resources/relation-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; export interface RelationResourceLinks { delete():Promise; @@ -37,7 +37,7 @@ export interface RelationResourceLinks { export class RelationResource extends HalResource { - static RELATION_TYPES(includeParentChild:boolean = true):string[] { + static RELATION_TYPES(includeParentChild = true):string[] { const types = [ 'relates', 'duplicates', @@ -59,11 +59,11 @@ export class RelationResource extends HalResource { return types; } - static LOCALIZED_RELATION_TYPES(includeParentchild:boolean = true) { + static LOCALIZED_RELATION_TYPES(includeParentchild = true) { const relationTypes = RelationResource.RELATION_TYPES(includeParentchild); return relationTypes.map((key:string) => { - return {name: key, label: I18n.t('js.relation_labels.' + key)}; + return { name: key, label: I18n.t('js.relation_labels.' + key) }; }); } @@ -122,16 +122,15 @@ export class RelationResource extends HalResource { } public updateDescription(description:string) { - return this.$links.updateImmediately({description: description}); + return this.$links.updateImmediately({ description: description }); } public updateType(type:any) { - return this.$links.updateImmediately({type: type}); + return this.$links.updateImmediately({ type: type }); } } -export interface RelationResource extends RelationResourceLinks { -} +export interface RelationResource extends RelationResourceLinks {} export interface DenormalizedRelationData { target:WorkPackageResource; diff --git a/frontend/src/app/modules/hal/resources/role-resource.ts b/frontend/src/app/modules/hal/resources/role-resource.ts index 9c0cc7caba7..d4c8b017c14 100644 --- a/frontend/src/app/modules/hal/resources/role-resource.ts +++ b/frontend/src/app/modules/hal/resources/role-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class RoleResource extends HalResource { } diff --git a/frontend/src/app/modules/hal/resources/root-resource.ts b/frontend/src/app/modules/hal/resources/root-resource.ts index ba882486830..eb89ad00f3b 100644 --- a/frontend/src/app/modules/hal/resources/root-resource.ts +++ b/frontend/src/app/modules/hal/resources/root-resource.ts @@ -27,8 +27,8 @@ //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; export class RootResource extends HalResource { diff --git a/frontend/src/app/modules/hal/resources/schema-dependency-resource.ts b/frontend/src/app/modules/hal/resources/schema-dependency-resource.ts index 55602cfcb4a..fe0f4e53ee3 100644 --- a/frontend/src/app/modules/hal/resources/schema-dependency-resource.ts +++ b/frontend/src/app/modules/hal/resources/schema-dependency-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class SchemaDependencyResource extends HalResource { diff --git a/frontend/src/app/modules/hal/resources/schema-resource.ts b/frontend/src/app/modules/hal/resources/schema-resource.ts index c7852ba47c7..6c6e007b363 100644 --- a/frontend/src/app/modules/hal/resources/schema-resource.ts +++ b/frontend/src/app/modules/hal/resources/schema-resource.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {InputState} from 'reactivestates'; -import {IFieldSchema} from "core-app/modules/fields/field.base"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { InputState } from 'reactivestates'; +import { IFieldSchema } from "core-app/modules/fields/field.base"; export class SchemaResource extends HalResource { @@ -45,8 +45,8 @@ export class SchemaResource extends HalResource { public attributeFromLocalizedName(name:string):string|null { let match:string|null = null; - for (let attribute of this.availableAttributes) { - let fieldSchema = this[attribute]; + for (const attribute of this.availableAttributes) { + const fieldSchema = this[attribute]; if (fieldSchema?.name === name) { match = attribute; break; diff --git a/frontend/src/app/modules/hal/resources/status-resource.ts b/frontend/src/app/modules/hal/resources/status-resource.ts index 45230b8e2bc..35fe1fa20e9 100644 --- a/frontend/src/app/modules/hal/resources/status-resource.ts +++ b/frontend/src/app/modules/hal/resources/status-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {InputState} from 'reactivestates'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { InputState } from 'reactivestates'; export class StatusResource extends HalResource { diff --git a/frontend/src/app/modules/hal/resources/time-entry-resource.ts b/frontend/src/app/modules/hal/resources/time-entry-resource.ts index 007b97fda25..410ed7b5df6 100644 --- a/frontend/src/app/modules/hal/resources/time-entry-resource.ts +++ b/frontend/src/app/modules/hal/resources/time-entry-resource.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; export class TimeEntryResource extends HalResource { public get state() { diff --git a/frontend/src/app/modules/hal/resources/type-resource.ts b/frontend/src/app/modules/hal/resources/type-resource.ts index 1f89569723d..19bb6046a06 100644 --- a/frontend/src/app/modules/hal/resources/type-resource.ts +++ b/frontend/src/app/modules/hal/resources/type-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {InputState} from 'reactivestates'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { InputState } from 'reactivestates'; export class TypeResource extends HalResource { public color:string; diff --git a/frontend/src/app/modules/hal/resources/user-resource.ts b/frontend/src/app/modules/hal/resources/user-resource.ts index 441e78105ed..8dfe793e773 100644 --- a/frontend/src/app/modules/hal/resources/user-resource.ts +++ b/frontend/src/app/modules/hal/resources/user-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {InputState} from 'reactivestates'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { InputState } from 'reactivestates'; export class UserResource extends HalResource { diff --git a/frontend/src/app/modules/hal/resources/version-resource.ts b/frontend/src/app/modules/hal/resources/version-resource.ts index d1e739a8398..4a64e6c03e5 100644 --- a/frontend/src/app/modules/hal/resources/version-resource.ts +++ b/frontend/src/app/modules/hal/resources/version-resource.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export class VersionResource extends HalResource { status:string; diff --git a/frontend/src/app/modules/hal/resources/wiki-page-resource.ts b/frontend/src/app/modules/hal/resources/wiki-page-resource.ts index de25fe32eed..7c066170e7b 100644 --- a/frontend/src/app/modules/hal/resources/wiki-page-resource.ts +++ b/frontend/src/app/modules/hal/resources/wiki-page-resource.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {Attachable} from 'core-app/modules/hal/resources/mixins/attachable-mixin'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { Attachable } from 'core-app/modules/hal/resources/mixins/attachable-mixin'; export interface WikiPageResourceLinks { @@ -42,5 +42,4 @@ class WikiPageBaseResource extends HalResource { export const WikiPageResource = Attachable(WikiPageBaseResource); -export interface WikiPageResource extends HalResource { -} +export type WikiPageResource = HalResource; diff --git a/frontend/src/app/modules/hal/resources/work-package-resource.spec.ts b/frontend/src/app/modules/hal/resources/work-package-resource.spec.ts index 075a498f3c3..6cb0e23d17b 100644 --- a/frontend/src/app/modules/hal/resources/work-package-resource.spec.ts +++ b/frontend/src/app/modules/hal/resources/work-package-resource.spec.ts @@ -27,27 +27,27 @@ //++ import { TestBed, waitForAsync } from '@angular/core/testing'; -import {OpenprojectHalModule} from 'core-app/modules/hal/openproject-hal.module'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {Injector} from '@angular/core'; -import {States} from 'core-components/states.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {SchemaCacheService} from 'core-components/schemas/schema-cache.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {AttachmentCollectionResource} from 'core-app/modules/hal/resources/attachment-collection-resource'; -import {LoadingIndicatorService} from 'core-app/modules/common/loading-indicator/loading-indicator.service'; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {StateService} from "@uirouter/core"; -import {OpenProjectFileUploadService} from "core-components/api/op-file-upload/op-file-upload.service"; -import {OpenProjectDirectFileUploadService} from "core-components/api/op-file-upload/op-direct-file-upload.service"; -import {WorkPackageCreateService} from 'core-app/components/wp-new/wp-create.service'; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {WorkPackagesActivityService} from "core-components/wp-single-view-tabs/activity-panel/wp-activity.service"; -import {TimezoneService} from "core-components/datetime/timezone.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { OpenprojectHalModule } from 'core-app/modules/hal/openproject-hal.module'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { Injector } from '@angular/core'; +import { States } from 'core-components/states.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { SchemaCacheService } from 'core-components/schemas/schema-cache.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { AttachmentCollectionResource } from 'core-app/modules/hal/resources/attachment-collection-resource'; +import { LoadingIndicatorService } from 'core-app/modules/common/loading-indicator/loading-indicator.service'; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { StateService } from "@uirouter/core"; +import { OpenProjectFileUploadService } from "core-components/api/op-file-upload/op-file-upload.service"; +import { OpenProjectDirectFileUploadService } from "core-components/api/op-file-upload/op-direct-file-upload.service"; +import { WorkPackageCreateService } from 'core-app/components/wp-new/wp-create.service'; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { WorkPackagesActivityService } from "core-components/wp-single-view-tabs/activity-panel/wp-activity.service"; +import { TimezoneService } from "core-components/datetime/timezone.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; describe('WorkPackage', () => { let halResourceService:HalResourceService; @@ -168,7 +168,7 @@ describe('WorkPackage', () => { describe('when the attachment is an attachment resource', () => { beforeEach(() => { - attachment.delete = jasmine.createSpy('delete').and.returnValue(Promise.resolve()) + attachment.delete = jasmine.createSpy('delete').and.returnValue(Promise.resolve()); spyOn(workPackage, 'updateAttachments'); }); @@ -193,7 +193,7 @@ describe('WorkPackage', () => { beforeEach(() => { attachment.delete = jasmine.createSpy('delete') - .and.returnValue(Promise.reject({ foo: 'bar'})); + .and.returnValue(Promise.reject({ foo: 'bar' })); errorStub = spyOn(halResourceNotification, 'handleRawError'); }); diff --git a/frontend/src/app/modules/hal/resources/work-package-resource.ts b/frontend/src/app/modules/hal/resources/work-package-resource.ts index 9b2a81a78e5..23492d0c852 100644 --- a/frontend/src/app/modules/hal/resources/work-package-resource.ts +++ b/frontend/src/app/modules/hal/resources/work-package-resource.ts @@ -26,26 +26,26 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {AttachmentCollectionResource} from 'core-app/modules/hal/resources/attachment-collection-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {TypeResource} from 'core-app/modules/hal/resources/type-resource'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { AttachmentCollectionResource } from 'core-app/modules/hal/resources/attachment-collection-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { TypeResource } from 'core-app/modules/hal/resources/type-resource'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; import { OpenProjectFileUploadService, UploadFile } from 'core-components/api/op-file-upload/op-file-upload.service'; -import {States} from 'core-components/states.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {Attachable} from 'core-app/modules/hal/resources/mixins/attachable-mixin'; -import {FormResource} from "core-app/modules/hal/resources/form-resource"; -import {InputState} from "reactivestates"; -import {WorkPackagesActivityService} from "core-components/wp-single-view-tabs/activity-panel/wp-activity.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { States } from 'core-components/states.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { Attachable } from 'core-app/modules/hal/resources/mixins/attachable-mixin'; +import { FormResource } from "core-app/modules/hal/resources/form-resource"; +import { InputState } from "reactivestates"; +import { WorkPackagesActivityService } from "core-components/wp-single-view-tabs/activity-panel/wp-activity.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export interface WorkPackageResourceEmbedded { activities:CollectionResource; @@ -144,7 +144,7 @@ export class WorkPackageBaseResource extends HalResource { /** * Return ": (#)" if type and id are known. */ - public subjectWithType(truncateSubject:number = 40):string { + public subjectWithType(truncateSubject = 40):string { const type = this.type ? `${this.type.name}: ` : ''; const subject = this.subjectWithId(truncateSubject); @@ -154,15 +154,15 @@ export class WorkPackageBaseResource extends HalResource { /** * Return " (#)" if the id is known. */ - public subjectWithId(truncateSubject:number = 40):string { + public subjectWithId(truncateSubject = 40):string { const id = this.isNew ? '' : ` (#${this.id})`; - const subject = _.truncate(this.subject, {length: truncateSubject}); + const subject = _.truncate(this.subject, { length: truncateSubject }); return `${subject}${id}`; } public get isLeaf():boolean { - let children = this.$links.children; + const children = this.$links.children; return !(children && children.length > 0); } @@ -208,7 +208,7 @@ export class WorkPackageBaseResource extends HalResource { public $initialize(source:any) { super.$initialize(source); - let attachments:any = this.attachments || {$source: {}, elements: []}; + const attachments:any = this.attachments || { $source: {}, elements: [] }; this.attachments = new AttachmentCollectionResource( this.injector, // Attachments MAY be an array if we're building from a form diff --git a/frontend/src/app/modules/hal/resources/wp-collection-resource.ts b/frontend/src/app/modules/hal/resources/wp-collection-resource.ts index 26cd5622ace..a6d0b007ac3 100644 --- a/frontend/src/app/modules/hal/resources/wp-collection-resource.ts +++ b/frontend/src/app/modules/hal/resources/wp-collection-resource.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; export interface WorkPackageCollectionResourceEmbedded { elements:WorkPackageResource[]; @@ -41,13 +41,12 @@ export class WorkPackageCollectionResource extends CollectionResource; } -export interface WorkPackageCollectionResource extends WorkPackageCollectionResourceEmbedded { -} +export interface WorkPackageCollectionResource extends WorkPackageCollectionResourceEmbedded {} /** * A reference to a group object as returned from the API. diff --git a/frontend/src/app/modules/hal/schemas/hal-payload.helper.ts b/frontend/src/app/modules/hal/schemas/hal-payload.helper.ts index 888a7f47603..4b760e350ff 100644 --- a/frontend/src/app/modules/hal/schemas/hal-payload.helper.ts +++ b/frontend/src/app/modules/hal/schemas/hal-payload.helper.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; export class HalPayloadHelper { @@ -58,13 +58,13 @@ export class HalPayloadHelper { * @param schema The associated schema to determine writable state of attributes */ static extractPayloadFromSchema(resource:T, schema:SchemaResource) { - let payload:any = { + const payload:any = { '_links': {} }; - let nonLinkProperties = []; + const nonLinkProperties = []; - for (let key in schema) { + for (const key in schema) { if (schema.hasOwnProperty(key) && schema[key] && schema[key].writable) { if (resource.$links[key]) { if (Array.isArray(resource[key])) { diff --git a/frontend/src/app/modules/hal/schemas/schema-proxy.ts b/frontend/src/app/modules/hal/schemas/schema-proxy.ts index badda8c882f..e9fab9b8b52 100644 --- a/frontend/src/app/modules/hal/schemas/schema-proxy.ts +++ b/frontend/src/app/modules/hal/schemas/schema-proxy.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; export interface ISchemaProxy extends SchemaResource { ofProperty(property:string):IFieldSchema; @@ -50,21 +50,21 @@ export class SchemaProxy implements ProxyHandler { get(schema:SchemaResource, property:PropertyKey, receiver:any):any { switch (property) { - case 'ofProperty': { - return this.proxyMethod(this.ofProperty); - } - case 'isAttributeEditable': { - return this.proxyMethod(this.isAttributeEditable); - } - case 'mappedName': { - return this.proxyMethod(this.mappedName); - } - case 'isEditable': { - return this.isEditable; - } - default: { - return Reflect.get(schema, property, receiver); - } + case 'ofProperty': { + return this.proxyMethod(this.ofProperty); + } + case 'isAttributeEditable': { + return this.proxyMethod(this.isAttributeEditable); + } + case 'mappedName': { + return this.proxyMethod(this.mappedName); + } + case 'isEditable': { + return this.isEditable; + } + default: { + return Reflect.get(schema, property, receiver); + } } } @@ -79,7 +79,7 @@ export class SchemaProxy implements ProxyHandler { * @param property the schema part is desired for */ public ofProperty(property:string):IFieldSchema|null { - let propertySchema = this.schema[this.mappedName(property)]; + const propertySchema = this.schema[this.mappedName(property)]; if (propertySchema) { return Object.assign({}, propertySchema, { writable: this.isEditable && propertySchema && propertySchema.writable }); @@ -97,7 +97,7 @@ export class SchemaProxy implements ProxyHandler { * @param property */ public isAttributeEditable(property:string):boolean { - let propertySchema = this.ofProperty(property); + const propertySchema = this.ofProperty(property); return !!propertySchema && propertySchema.writable; } diff --git a/frontend/src/app/modules/hal/schemas/work-package-schema-proxy.ts b/frontend/src/app/modules/hal/schemas/work-package-schema-proxy.ts index bcc7d6ef8c2..482a6537d3a 100644 --- a/frontend/src/app/modules/hal/schemas/work-package-schema-proxy.ts +++ b/frontend/src/app/modules/hal/schemas/work-package-schema-proxy.ts @@ -26,21 +26,21 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {SchemaProxy} from "core-app/modules/hal/schemas/schema-proxy"; -import {SchemaResource} from "core-app/modules/hal/resources/schema-resource"; +import { SchemaProxy } from "core-app/modules/hal/schemas/schema-proxy"; +import { SchemaResource } from "core-app/modules/hal/resources/schema-resource"; export class WorkPackageSchemaProxy extends SchemaProxy { get(schema:SchemaResource, property:PropertyKey, receiver:any):any { switch (property) { - case 'isMilestone': { - return this.isMilestone; - } - case 'isReadonly': { - return this.isReadonly; - } - default: { - return super.get(schema, property, receiver); - } + case 'isMilestone': { + return this.isMilestone; + } + case 'isReadonly': { + return this.isReadonly; + } + default: { + return super.get(schema, property, receiver); + } } } @@ -56,7 +56,7 @@ export class WorkPackageSchemaProxy extends SchemaProxy { */ public ofProperty(property:string) { if (property === 'combinedDate') { - let propertySchema = super.ofProperty('startDate'); + const propertySchema = super.ofProperty('startDate'); if (!propertySchema) { return null; diff --git a/frontend/src/app/modules/hal/services/hal-aware-error-handler.ts b/frontend/src/app/modules/hal/services/hal-aware-error-handler.ts index ffae4855653..f2ab407c451 100644 --- a/frontend/src/app/modules/hal/services/hal-aware-error-handler.ts +++ b/frontend/src/app/modules/hal/services/hal-aware-error-handler.ts @@ -1,7 +1,7 @@ -import {ErrorHandler, Injectable} from "@angular/core"; -import {ErrorResource} from "core-app/modules/hal/resources/error-resource"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; +import { ErrorHandler, Injectable } from "@angular/core"; +import { ErrorResource } from "core-app/modules/hal/resources/error-resource"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; @Injectable() export class HalAwareErrorHandler extends ErrorHandler { diff --git a/frontend/src/app/modules/hal/services/hal-events.service.ts b/frontend/src/app/modules/hal/services/hal-events.service.ts index 0ec778709b7..bdcb2e0c457 100644 --- a/frontend/src/app/modules/hal/services/hal-events.service.ts +++ b/frontend/src/app/modules/hal/services/hal-events.service.ts @@ -1,8 +1,8 @@ -import {Injectable} from "@angular/core"; -import {Observable, Subject} from "rxjs"; -import {buffer, debounceTime, filter} from "rxjs/operators"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {ResourceChangesetCommit} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { Injectable } from "@angular/core"; +import { Observable, Subject } from "rxjs"; +import { buffer, debounceTime, filter } from "rxjs/operators"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { ResourceChangesetCommit } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; export interface HalEvent { id:string; diff --git a/frontend/src/app/modules/hal/services/hal-resource-notification.service.ts b/frontend/src/app/modules/hal/services/hal-resource-notification.service.ts index 436ccbc2df7..313536f5697 100644 --- a/frontend/src/app/modules/hal/services/hal-resource-notification.service.ts +++ b/frontend/src/app/modules/hal/services/hal-resource-notification.service.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ErrorResource} from 'core-app/modules/hal/resources/error-resource'; -import {StateService} from '@uirouter/core'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {Injectable, Injector} from '@angular/core'; -import {LoadingIndicatorService} from 'core-app/modules/common/loading-indicator/loading-indicator.service'; -import {NotificationsService} from 'core-app/modules/common/notifications/notifications.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HttpErrorResponse} from "@angular/common/http"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; +import { ErrorResource } from 'core-app/modules/hal/resources/error-resource'; +import { StateService } from '@uirouter/core'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { Injectable, Injector } from '@angular/core'; +import { LoadingIndicatorService } from 'core-app/modules/common/loading-indicator/loading-indicator.service'; +import { NotificationsService } from 'core-app/modules/common/notifications/notifications.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HttpErrorResponse } from "@angular/common/http"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; @Injectable() export class HalResourceNotificationService { @@ -51,8 +51,8 @@ export class HalResourceNotificationService { constructor(public injector:Injector) { } - public showSave(resource:HalResource, isCreate:boolean = false) { - let message:any = { + public showSave(resource:HalResource, isCreate = false) { + const message:any = { message: this.I18n.t('js.notice_successful_' + (isCreate ? 'create' : 'update')), }; @@ -166,7 +166,7 @@ export class HalResourceNotificationService { public showEditingBlockedError(attribute:string) { this.NotificationsService.addError(this.I18n.t( 'js.hal.error.edit_prohibited', - {attribute: attribute} + { attribute: attribute } )); } @@ -174,17 +174,17 @@ export class HalResourceNotificationService { if (errorResource.errorIdentifier === 'urn:openproject-org:api:v3:errors:PropertyFormatError') { - let schema = this.schemaCache.of(resource).ofProperty(errorResource.details.attribute); - let attributeName = schema.name; - let attributeType = schema.type.toLowerCase(); - let i18nString = 'js.hal.error.format.' + attributeType; + const schema = this.schemaCache.of(resource).ofProperty(errorResource.details.attribute); + const attributeName = schema.name; + const attributeType = schema.type.toLowerCase(); + const i18nString = 'js.hal.error.format.' + attributeType; if (this.I18n.lookup(i18nString) === undefined) { return false; } this.NotificationsService.addError(this.I18n.t(i18nString, - {attribute: attributeName})); + { attribute: attributeName })); return true; } @@ -192,7 +192,7 @@ export class HalResourceNotificationService { } protected showApiErrorMessages(errorResource:any) { - let messages = errorResource.errorMessages; + const messages = errorResource.errorMessages; if (messages.length > 1) { this.NotificationsService.addError('', messages); diff --git a/frontend/src/app/modules/hal/services/hal-resource-sorting.service.ts b/frontend/src/app/modules/hal/services/hal-resource-sorting.service.ts index 2b5acd8ef76..9e8ff029ab6 100644 --- a/frontend/src/app/modules/hal/services/hal-resource-sorting.service.ts +++ b/frontend/src/app/modules/hal/services/hal-resource-sorting.service.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; +import { Injectable } from '@angular/core'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; @Injectable({ providedIn: 'root' }) export class HalResourceSortingService { diff --git a/frontend/src/app/modules/hal/services/hal-resource.config.ts b/frontend/src/app/modules/hal/services/hal-resource.config.ts index 5451c89d765..114a662e6eb 100644 --- a/frontend/src/app/modules/hal/services/hal-resource.config.ts +++ b/frontend/src/app/modules/hal/services/hal-resource.config.ts @@ -26,43 +26,43 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {SchemaResource} from 'core-app/modules/hal/resources/schema-resource'; -import {TypeResource} from 'core-app/modules/hal/resources/type-resource'; -import {SchemaDependencyResource} from 'core-app/modules/hal/resources/schema-dependency-resource'; -import {ErrorResource} from 'core-app/modules/hal/resources/error-resource'; -import {UserResource} from 'core-app/modules/hal/resources/user-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {FormResource} from 'core-app/modules/hal/resources/form-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {QueryFilterInstanceSchemaResource} from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; -import {QueryFilterResource} from 'core-app/modules/hal/resources/query-filter-resource'; -import {RootResource} from 'core-app/modules/hal/resources/root-resource'; -import {QueryOperatorResource} from 'core-app/modules/hal/resources/query-operator-resource'; -import {HelpTextResource} from 'core-app/modules/hal/resources/help-text-resource'; -import {CustomActionResource} from 'core-app/modules/hal/resources/custom-action-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { SchemaResource } from 'core-app/modules/hal/resources/schema-resource'; +import { TypeResource } from 'core-app/modules/hal/resources/type-resource'; +import { SchemaDependencyResource } from 'core-app/modules/hal/resources/schema-dependency-resource'; +import { ErrorResource } from 'core-app/modules/hal/resources/error-resource'; +import { UserResource } from 'core-app/modules/hal/resources/user-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { FormResource } from 'core-app/modules/hal/resources/form-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { QueryFilterInstanceSchemaResource } from 'core-app/modules/hal/resources/query-filter-instance-schema-resource'; +import { QueryFilterResource } from 'core-app/modules/hal/resources/query-filter-resource'; +import { RootResource } from 'core-app/modules/hal/resources/root-resource'; +import { QueryOperatorResource } from 'core-app/modules/hal/resources/query-operator-resource'; +import { HelpTextResource } from 'core-app/modules/hal/resources/help-text-resource'; +import { CustomActionResource } from 'core-app/modules/hal/resources/custom-action-resource'; import { HalResourceFactoryConfigInterface, HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {WikiPageResource} from "core-app/modules/hal/resources/wiki-page-resource"; -import {MeetingContentResource} from "core-app/modules/hal/resources/meeting-content-resource"; -import {PostResource} from "core-app/modules/hal/resources/post-resource"; -import {StatusResource} from "core-app/modules/hal/resources/status-resource"; -import {AttachmentCollectionResource} from "core-app/modules/hal/resources/attachment-collection-resource"; -import {GridWidgetResource} from "core-app/modules/hal/resources/grid-widget-resource"; -import {GridResource} from "core-app/modules/hal/resources/grid-resource"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {NewsResource} from "core-app/modules/hal/resources/news-resource"; -import {VersionResource} from "core-app/modules/hal/resources/version-resource"; -import {MembershipResource} from "core-app/modules/hal/resources/membership-resource"; -import {RoleResource} from "core-app/modules/hal/resources/role-resource"; -import {ProjectResource} from "core-app/modules/hal/resources/project-resource"; -import {GroupResource} from "core-app/modules/hal/resources/group-resource"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { WikiPageResource } from "core-app/modules/hal/resources/wiki-page-resource"; +import { MeetingContentResource } from "core-app/modules/hal/resources/meeting-content-resource"; +import { PostResource } from "core-app/modules/hal/resources/post-resource"; +import { StatusResource } from "core-app/modules/hal/resources/status-resource"; +import { AttachmentCollectionResource } from "core-app/modules/hal/resources/attachment-collection-resource"; +import { GridWidgetResource } from "core-app/modules/hal/resources/grid-widget-resource"; +import { GridResource } from "core-app/modules/hal/resources/grid-resource"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { NewsResource } from "core-app/modules/hal/resources/news-resource"; +import { VersionResource } from "core-app/modules/hal/resources/version-resource"; +import { MembershipResource } from "core-app/modules/hal/resources/membership-resource"; +import { RoleResource } from "core-app/modules/hal/resources/role-resource"; +import { ProjectResource } from "core-app/modules/hal/resources/project-resource"; +import { GroupResource } from "core-app/modules/hal/resources/group-resource"; const halResourceDefaultConfig:{ [typeName:string]:HalResourceFactoryConfigInterface } = { WorkPackage: { diff --git a/frontend/src/app/modules/hal/services/hal-resource.service.ts b/frontend/src/app/modules/hal/services/hal-resource.service.ts index 371020bf964..39e2de4baa8 100644 --- a/frontend/src/app/modules/hal/services/hal-resource.service.ts +++ b/frontend/src/app/modules/hal/services/hal-resource.service.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {HttpClient, HttpErrorResponse, HttpParams} from '@angular/common/http'; -import {catchError, map} from 'rxjs/operators'; -import {Observable, throwError} from 'rxjs'; -import {HalResource, HalResourceClass} from 'core-app/modules/hal/resources/hal-resource'; -import {CollectionResource} from 'core-app/modules/hal/resources/collection-resource'; -import {HalLink, HalLinkInterface} from 'core-app/modules/hal/hal-link/hal-link'; -import {URLParamsEncoder} from 'core-app/modules/hal/services/url-params-encoder'; -import {ErrorResource} from "core-app/modules/hal/resources/error-resource"; +import { Injectable, Injector } from '@angular/core'; +import { HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http'; +import { catchError, map } from 'rxjs/operators'; +import { Observable, throwError } from 'rxjs'; +import { HalResource, HalResourceClass } from 'core-app/modules/hal/resources/hal-resource'; +import { CollectionResource } from 'core-app/modules/hal/resources/collection-resource'; +import { HalLink, HalLinkInterface } from 'core-app/modules/hal/hal-link/hal-link'; +import { URLParamsEncoder } from 'core-app/modules/hal/services/url-params-encoder'; +import { ErrorResource } from "core-app/modules/hal/resources/error-resource"; import * as Pako from 'pako'; import { HTTPClientHeaders, @@ -42,8 +42,8 @@ import { HTTPClientParamMap, HTTPSupportedMethods } from "core-app/modules/hal/http/http.interfaces"; -import {whenDebugging} from "core-app/helpers/debug_output"; -import {initializeHalProperties} from "../helpers/hal-resource-builder"; +import { whenDebugging } from "core-app/helpers/debug_output"; +import { initializeHalProperties } from "../helpers/hal-resource-builder"; export interface HalResourceFactoryConfigInterface { cls?:any; @@ -217,7 +217,7 @@ export class HalResourceService { * @returns {HalResource} */ public get defaultClass():HalResourceClass { - let defaultCls:HalResourceClass = HalResource; + const defaultCls:HalResourceClass = HalResource; return defaultCls; } @@ -230,7 +230,7 @@ export class HalResourceService { * @param source * @returns {HalResource} */ - public createHalResource(source:any, loaded:boolean = true):T { + public createHalResource(source:any, loaded = true):T { if (_.isNil(source)) { source = HalResource.getEmptyResource(); } @@ -239,10 +239,10 @@ export class HalResourceService { return this.createHalResourceOfType(type, source, loaded); } - public createHalResourceOfType(type:string, source:any, loaded:boolean = false) { + public createHalResourceOfType(type:string, source:any, loaded = false) { const resourceClass:HalResourceClass = this.getResourceClassOfType(type); const initializer = (halResource:T) => initializeHalProperties(this, halResource); - let resource = new resourceClass(this.injector, source, loaded, initializer, type); + const resource = new resourceClass(this.injector, source, loaded, initializer, type); return resource; } @@ -253,10 +253,10 @@ export class HalResourceService { * @param source * @param loaded */ - public createHalResourceOfClass(resourceClass:HalResourceClass, source:any, loaded:boolean = false) { + public createHalResourceOfClass(resourceClass:HalResourceClass, source:any, loaded = false) { const initializer = (halResource:T) => initializeHalProperties(this, halResource); const type = source._type || 'HalResource'; - let resource = new resourceClass(this.injector, source, loaded, initializer, type); + const resource = new resourceClass(this.injector, source, loaded, initializer, type); return resource; } @@ -319,8 +319,8 @@ export class HalResourceService { } protected toEprops(params:{}):{} { - let deflated = Pako.deflate(JSON.stringify(params), { to: 'string' }); - let compressed = btoa(deflated); + const deflated = Pako.deflate(JSON.stringify(params), { to: 'string' }); + const compressed = btoa(deflated); return { eprops: compressed }; } diff --git a/frontend/src/app/modules/hal/services/url-params-encoder.ts b/frontend/src/app/modules/hal/services/url-params-encoder.ts index a7ad01ad75a..0d12bef6b76 100644 --- a/frontend/src/app/modules/hal/services/url-params-encoder.ts +++ b/frontend/src/app/modules/hal/services/url-params-encoder.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HttpParameterCodec} from '@angular/common/http'; +import { HttpParameterCodec } from '@angular/common/http'; export class URLParamsEncoder implements HttpParameterCodec { encodeKey(key:string):string { diff --git a/frontend/src/app/modules/invite-user-modal/button/invite-user-button.component.ts b/frontend/src/app/modules/invite-user-modal/button/invite-user-button.component.ts index 37633ae8567..7fc381c14ad 100644 --- a/frontend/src/app/modules/invite-user-modal/button/invite-user-button.component.ts +++ b/frontend/src/app/modules/invite-user-modal/button/invite-user-button.component.ts @@ -1,15 +1,15 @@ -import {Component, EventEmitter, Inject, OnInit, Optional, Output} from '@angular/core'; -import {OpEditingPortalSchemaToken} from "core-app/modules/fields/edit/edit-field.component"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {NgSelectComponent} from "@ng-select/ng-select"; -import {SelectEditFieldComponent} from "core-app/modules/fields/edit/field-types/select-edit-field.component"; -import {MultiSelectEditFieldComponent} from "core-app/modules/fields/edit/field-types/multi-select-edit-field.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {PermissionsService} from "core-app/core/services/permissions/permissions.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {InviteUserModalComponent} from "core-app/modules/invite-user-modal/invite-user.component"; +import { Component, EventEmitter, Inject, OnInit, Optional, Output } from '@angular/core'; +import { OpEditingPortalSchemaToken } from "core-app/modules/fields/edit/edit-field.component"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { NgSelectComponent } from "@ng-select/ng-select"; +import { SelectEditFieldComponent } from "core-app/modules/fields/edit/field-types/select-edit-field.component"; +import { MultiSelectEditFieldComponent } from "core-app/modules/fields/edit/field-types/multi-select-edit-field.component"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { PermissionsService } from "core-app/core/services/permissions/permissions.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { InviteUserModalComponent } from "core-app/modules/invite-user-modal/invite-user.component"; @Component({ selector: 'op-invite-user-button', diff --git a/frontend/src/app/modules/invite-user-modal/invite-user-modal.module.ts b/frontend/src/app/modules/invite-user-modal/invite-user-modal.module.ts index f386e220adc..7947ed08996 100644 --- a/frontend/src/app/modules/invite-user-modal/invite-user-modal.module.ts +++ b/frontend/src/app/modules/invite-user-modal/invite-user-modal.module.ts @@ -1,19 +1,19 @@ -import {NgModule} from "@angular/core"; -import {ReactiveFormsModule} from "@angular/forms"; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {InviteUserModalComponent} from "./invite-user.component"; -import {ProjectSelectionComponent} from "./project-selection/project-selection.component"; -import {ProjectSearchComponent} from "./project-selection/project-search.component"; -import {PrincipalComponent} from "./principal/principal.component"; -import {PrincipalSearchComponent} from "./principal/principal-search.component"; -import {RoleComponent} from "./role/role.component"; -import {RoleSearchComponent} from "./role/role-search.component"; -import {MessageComponent} from "./message/message.component"; -import {SummaryComponent} from "./summary/summary.component"; -import {SuccessComponent} from "./success/success.component"; -import {NgSelectModule} from "@ng-select/ng-select"; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {InviteUserButtonComponent} from "core-app/modules/invite-user-modal/button/invite-user-button.component"; +import { NgModule } from "@angular/core"; +import { ReactiveFormsModule } from "@angular/forms"; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { InviteUserModalComponent } from "./invite-user.component"; +import { ProjectSelectionComponent } from "./project-selection/project-selection.component"; +import { ProjectSearchComponent } from "./project-selection/project-search.component"; +import { PrincipalComponent } from "./principal/principal.component"; +import { PrincipalSearchComponent } from "./principal/principal-search.component"; +import { RoleComponent } from "./role/role.component"; +import { RoleSearchComponent } from "./role/role-search.component"; +import { MessageComponent } from "./message/message.component"; +import { SummaryComponent } from "./summary/summary.component"; +import { SuccessComponent } from "./success/success.component"; +import { NgSelectModule } from "@ng-select/ng-select"; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { InviteUserButtonComponent } from "core-app/modules/invite-user-modal/button/invite-user-button.component"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/invite-user-modal/project-selection/project-search.component.ts b/frontend/src/app/modules/invite-user-modal/project-selection/project-search.component.ts index e6697e56e0a..d9bfea7f5f1 100644 --- a/frontend/src/app/modules/invite-user-modal/project-selection/project-search.component.ts +++ b/frontend/src/app/modules/invite-user-modal/project-selection/project-search.component.ts @@ -4,13 +4,13 @@ import { OnInit, ElementRef, } from '@angular/core'; -import {FormControl, NgControl} from "@angular/forms"; -import {Observable, Subject} from "rxjs"; -import {debounceTime, distinctUntilChanged, filter, map, switchMap, tap} from "rxjs/operators"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { FormControl, NgControl } from "@angular/forms"; +import { Observable, Subject } from "rxjs"; +import { debounceTime, distinctUntilChanged, filter, map, switchMap, tap } from "rxjs/operators"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Component({ selector: 'op-ium-project-search', diff --git a/frontend/src/app/modules/invite-user-modal/role/role-search.component.ts b/frontend/src/app/modules/invite-user-modal/role/role-search.component.ts index b8d90aacd9d..908ce52ea67 100644 --- a/frontend/src/app/modules/invite-user-modal/role/role-search.component.ts +++ b/frontend/src/app/modules/invite-user-modal/role/role-search.component.ts @@ -4,13 +4,13 @@ import { Input, ElementRef, } from '@angular/core'; -import {FormControl} from "@angular/forms"; -import {Observable, Subject, combineLatest} from "rxjs"; -import {debounceTime, distinctUntilChanged, filter, map, switchMap, tap} from "rxjs/operators"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {ApiV3FilterBuilder} from "core-components/api/api-v3/api-v3-filter-builder"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { FormControl } from "@angular/forms"; +import { Observable, Subject, combineLatest } from "rxjs"; +import { debounceTime, distinctUntilChanged, filter, map, switchMap, tap } from "rxjs/operators"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { ApiV3FilterBuilder } from "core-components/api/api-v3/api-v3-filter-builder"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Component({ selector: 'op-ium-role-search', diff --git a/frontend/src/app/modules/job-status/display-job-page/display-job-page.component.ts b/frontend/src/app/modules/job-status/display-job-page/display-job-page.component.ts index cd3826e9c97..ae8726736fa 100644 --- a/frontend/src/app/modules/job-status/display-job-page/display-job-page.component.ts +++ b/frontend/src/app/modules/job-status/display-job-page/display-job-page.component.ts @@ -1,9 +1,9 @@ -import {AfterViewInit, Component, Injector, OnDestroy} from "@angular/core"; -import {StateService} from "@uirouter/core"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {JobStatusModal} from "core-app/modules/job-status/job-status-modal/job-status.modal"; -import {take} from "rxjs/operators"; +import { AfterViewInit, Component, Injector, OnDestroy } from "@angular/core"; +import { StateService } from "@uirouter/core"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { JobStatusModal } from "core-app/modules/job-status/job-status-modal/job-status.modal"; +import { take } from "rxjs/operators"; @Component({ template: '' @@ -24,7 +24,7 @@ export class DisplayJobPageComponent implements AfterViewInit, OnDestroy { ).subscribe(() => { // Go back in history window.history.back(); - }); + }); } ngOnDestroy() { diff --git a/frontend/src/app/modules/job-status/job-status-modal/job-status.modal.ts b/frontend/src/app/modules/job-status/job-status-modal/job-status.modal.ts index af2e1b53dcd..6e245ee5f77 100644 --- a/frontend/src/app/modules/job-status/job-status-modal/job-status.modal.ts +++ b/frontend/src/app/modules/job-status/job-status-modal/job-status.modal.ts @@ -1,19 +1,19 @@ -import {ChangeDetectorRef, Component, ElementRef, Inject, OnInit, ViewChild} from '@angular/core'; -import {OpModalLocalsMap} from 'core-app/modules/modal/modal.types'; -import {OpModalComponent} from 'core-app/modules/modal/modal.component'; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {HttpClient, HttpErrorResponse, HttpResponse} from '@angular/common/http'; -import {Observable, timer} from "rxjs"; -import {switchMap, takeWhile} from "rxjs/operators"; +import { ChangeDetectorRef, Component, ElementRef, Inject, OnInit, ViewChild } from '@angular/core'; +import { OpModalLocalsMap } from 'core-app/modules/modal/modal.types'; +import { OpModalComponent } from 'core-app/modules/modal/modal.component'; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { HttpClient, HttpErrorResponse, HttpResponse } from '@angular/common/http'; +import { Observable, timer } from "rxjs"; +import { switchMap, takeWhile } from "rxjs/operators"; import { LoadingIndicatorService, withDelayedLoadingIndicator } from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {JobStatusEnum, JobStatusInterface} from "core-app/modules/job-status/job-status.interface"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { JobStatusEnum, JobStatusInterface } from "core-app/modules/job-status/job-status.interface"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Component({ @@ -92,24 +92,24 @@ export class JobStatusModal extends OpModalComponent implements OnInit { this.untilDestroyed(), withDelayedLoadingIndicator(this.loadingIndicator.getter('modal')), ).subscribe( - response => this.onResponse(response), - error => this.handleError(error), - () => this.isLoading = false - ); + response => this.onResponse(response), + error => this.handleError(error), + () => this.isLoading = false + ); } private iconForStatus():string|null { switch (this.status) { - case "cancelled": - case "failure": - case "error": - return 'icon-error'; - break; - case "success": - return "icon-checkmark"; - break; - default: - return null; + case "cancelled": + case "failure": + case "error": + return 'icon-error'; + break; + case "success": + return "icon-checkmark"; + break; + default: + return null; } } @@ -122,13 +122,13 @@ export class JobStatusModal extends OpModalComponent implements OnInit { } private onResponse(response:HttpResponse) { - let body = response.body; + const body = response.body; if (!body) { throw new Error(response as any); } - let status = this.status = body.status; + const status = this.status = body.status; this.message = body.message || this.I18n.t(`js.job_status.generic_messages.${status}`, { defaultValue: status }); diff --git a/frontend/src/app/modules/job-status/openproject-job-status.module.ts b/frontend/src/app/modules/job-status/openproject-job-status.module.ts index 7c596e24fe4..3df258b9996 100644 --- a/frontend/src/app/modules/job-status/openproject-job-status.module.ts +++ b/frontend/src/app/modules/job-status/openproject-job-status.module.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {Ng2StateDeclaration, UIRouterModule} from "@uirouter/angular"; -import {DisplayJobPageComponent} from "core-app/modules/job-status/display-job-page/display-job-page.component"; -import {JobStatusModal} from "core-app/modules/job-status/job-status-modal/job-status.modal"; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from 'core-app/modules/common/openproject-common.module'; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { Ng2StateDeclaration, UIRouterModule } from "@uirouter/angular"; +import { DisplayJobPageComponent } from "core-app/modules/job-status/display-job-page/display-job-page.component"; +import { JobStatusModal } from "core-app/modules/job-status/job-status-modal/job-status.modal"; export const JOB_STATUS_ROUTE:Ng2StateDeclaration[] = [ { diff --git a/frontend/src/app/modules/members/members-autocompleter.component.ts b/frontend/src/app/modules/members/members-autocompleter.component.ts index 1ae1bad99a6..cd184dc9ea0 100644 --- a/frontend/src/app/modules/members/members-autocompleter.component.ts +++ b/frontend/src/app/modules/members/members-autocompleter.component.ts @@ -1,11 +1,11 @@ -import {Observable} from "rxjs"; -import {map} from "rxjs/operators"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {HttpClient, HttpParams} from "@angular/common/http"; -import {Component} from "@angular/core"; -import {URLParamsEncoder} from "core-app/modules/hal/services/url-params-encoder"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {UserAutocompleterComponent} from "core-app/modules/autocompleter/user-autocompleter/user-autocompleter.component"; +import { Observable } from "rxjs"; +import { map } from "rxjs/operators"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { HttpClient, HttpParams } from "@angular/common/http"; +import { Component } from "@angular/core"; +import { URLParamsEncoder } from "core-app/modules/hal/services/url-params-encoder"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { UserAutocompleterComponent } from "core-app/modules/autocompleter/user-autocompleter/user-autocompleter.component"; export const membersAutocompleterSelector = 'members-autocompleter'; diff --git a/frontend/src/app/modules/members/members.module.ts b/frontend/src/app/modules/members/members.module.ts index 203c39a3417..3980e5d5d48 100644 --- a/frontend/src/app/modules/members/members.module.ts +++ b/frontend/src/app/modules/members/members.module.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from "@angular/core"; -import {MembersAutocompleterComponent} from "core-app/modules/members/members-autocompleter.component"; -import {NgSelectModule} from "@ng-select/ng-select"; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; +import { NgModule } from "@angular/core"; +import { MembersAutocompleterComponent } from "core-app/modules/members/members-autocompleter.component"; +import { NgSelectModule } from "@ng-select/ng-select"; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/modal/modal-header.component.ts b/frontend/src/app/modules/modal/modal-header.component.ts index 93f4d373e05..f3fe0118ac8 100644 --- a/frontend/src/app/modules/modal/modal-header.component.ts +++ b/frontend/src/app/modules/modal/modal-header.component.ts @@ -5,7 +5,7 @@ import { Output, HostBinding, } from '@angular/core'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; @Component({ selector: 'op-modal-header', @@ -13,7 +13,7 @@ import {I18nService} from "core-app/modules/common/i18n/i18n.service"; }) export class OpModalHeaderComponent { @HostBinding('class.op-modal--header') className = true; - @Input() icon:string = ''; + @Input() icon = ''; @Output('close') close = new EventEmitter(); public text = { diff --git a/frontend/src/app/modules/modal/modal-wrapper-augment.service.ts b/frontend/src/app/modules/modal/modal-wrapper-augment.service.ts index bfe8a002b2c..997d1799124 100644 --- a/frontend/src/app/modules/modal/modal-wrapper-augment.service.ts +++ b/frontend/src/app/modules/modal/modal-wrapper-augment.service.ts @@ -27,10 +27,10 @@ //++ -import {Inject, Injectable, Injector} from "@angular/core"; -import {DOCUMENT} from "@angular/common"; -import {DynamicContentModal} from "core-components/modals/modal-wrapper/dynamic-content.modal"; -import {OpModalService} from "core-app/modules/modal/modal.service"; +import { Inject, Injectable, Injector } from "@angular/core"; +import { DOCUMENT } from "@angular/common"; +import { DynamicContentModal } from "core-components/modals/modal-wrapper/dynamic-content.modal"; +import { OpModalService } from "core-app/modules/modal/modal.service"; const iframeSelector = '.iframe-target-wrapper'; @@ -101,8 +101,8 @@ export class OpModalWrapperAugmentService { } private appendIframe(body:string, url:string) { - let subdom = jQuery(body); - let iframe = jQuery(''); + const subdom = jQuery(body); + const iframe = jQuery(''); iframe.attr('src', url); subdom.find(iframeSelector).append(iframe); diff --git a/frontend/src/app/modules/modal/modal.component.ts b/frontend/src/app/modules/modal/modal.component.ts index 6717d05f95e..83860acab9c 100644 --- a/frontend/src/app/modules/modal/modal.component.ts +++ b/frontend/src/app/modules/modal/modal.component.ts @@ -1,17 +1,17 @@ import { ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Directive } from '@angular/core'; -import {OpModalLocalsMap} from 'core-app/modules/modal/modal.types'; -import {OpModalService} from 'core-app/modules/modal/modal.service'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { OpModalLocalsMap } from 'core-app/modules/modal/modal.types'; +import { OpModalService } from 'core-app/modules/modal/modal.service'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Directive() export abstract class OpModalComponent extends UntilDestroyedMixin implements OnInit, OnDestroy { /* Close on escape? */ - public closeOnEscape:boolean = true; + public closeOnEscape = true; public closeOnEscapeFunction = this.closeMe; /* Close on outside click */ - public closeOnOutsideClick:boolean = true; + public closeOnOutsideClick = true; /* Reference to service */ protected service:OpModalService = this.locals.service; diff --git a/frontend/src/app/modules/modal/modal.module.ts b/frontend/src/app/modules/modal/modal.module.ts index 8c4f4e08ff0..82cfd6b7e33 100644 --- a/frontend/src/app/modules/modal/modal.module.ts +++ b/frontend/src/app/modules/modal/modal.module.ts @@ -1,8 +1,8 @@ -import {NgModule} from "@angular/core"; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {OpModalService} from "./modal.service"; -import {OpModalWrapperAugmentService} from "./modal-wrapper-augment.service"; -import {OpModalHeaderComponent} from "./modal-header.component"; +import { NgModule } from "@angular/core"; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { OpModalService } from "./modal.service"; +import { OpModalWrapperAugmentService } from "./modal-wrapper-augment.service"; +import { OpModalHeaderComponent } from "./modal-header.component"; @NgModule({ imports: [ OpenprojectCommonModule ], diff --git a/frontend/src/app/modules/modal/modal.service.ts b/frontend/src/app/modules/modal/modal.service.ts index 5102f5fc609..50f3c8c2afd 100644 --- a/frontend/src/app/modules/modal/modal.service.ts +++ b/frontend/src/app/modules/modal/modal.service.ts @@ -6,11 +6,11 @@ import { InjectionToken, Injector } from '@angular/core'; -import {ComponentPortal, ComponentType, DomPortalOutlet, PortalInjector} from '@angular/cdk/portal'; -import {TransitionService} from '@uirouter/core'; -import {OpModalComponent} from 'core-app/modules/modal/modal.component'; -import {keyCodes} from 'core-app/modules/common/keyCodes.enum'; -import {FocusHelperService} from 'core-app/modules/common/focus/focus-helper'; +import { ComponentPortal, ComponentType, DomPortalOutlet, PortalInjector } from '@angular/cdk/portal'; +import { TransitionService } from '@uirouter/core'; +import { OpModalComponent } from 'core-app/modules/modal/modal.component'; +import { keyCodes } from 'core-app/modules/common/keyCodes.enum'; +import { FocusHelperService } from 'core-app/modules/common/focus/focus-helper'; export const OpModalLocalsToken = new InjectionToken('OP_MODAL_LOCALS'); @@ -24,7 +24,7 @@ export class OpModalService { private bodyPortalHost:DomPortalOutlet; // Remember when we're opening a new modal to avoid the outside click bubbling up. - private opening:boolean = false; + private opening = false; constructor(private componentFactoryResolver:ComponentFactoryResolver, readonly FocusHelper:FocusHelperService, @@ -75,7 +75,7 @@ export class OpModalService { modal:ComponentType, injector:Injector|'global', locals:any = {}, - notFullScreen:boolean = false, // TODO: Remove this option once `WpPreviewModal` is not a modal anymore + notFullScreen = false, // TODO: Remove this option once `WpPreviewModal` is not a modal anymore ):T { this.close(); diff --git a/frontend/src/app/modules/modal/modal.types.ts b/frontend/src/app/modules/modal/modal.types.ts index 55796e5e0d1..ea180e5f5f8 100644 --- a/frontend/src/app/modules/modal/modal.types.ts +++ b/frontend/src/app/modules/modal/modal.types.ts @@ -1,7 +1,7 @@ -import {OpModalService} from './modal.service'; +import { OpModalService } from './modal.service'; export interface OpModalLocalsMap { service:OpModalService; [key:string]:any; -}; +} diff --git a/frontend/src/app/modules/my-page/my-page.component.ts b/frontend/src/app/modules/my-page/my-page.component.ts index 459d3c34e3d..d70bdf2edce 100644 --- a/frontend/src/app/modules/my-page/my-page.component.ts +++ b/frontend/src/app/modules/my-page/my-page.component.ts @@ -1,6 +1,6 @@ -import {Component} from "@angular/core"; -import {GRID_PROVIDERS} from "core-app/modules/grids/grid/grid.component"; -import {GridPageComponent} from "core-app/modules/grids/grid/page/grid-page.component"; +import { Component } from "@angular/core"; +import { GRID_PROVIDERS } from "core-app/modules/grids/grid/grid.component"; +import { GridPageComponent } from "core-app/modules/grids/grid/page/grid-page.component"; @Component({ templateUrl: '../grids/grid/page/grid-page.component.html', diff --git a/frontend/src/app/modules/my-page/openproject-my-page.module.ts b/frontend/src/app/modules/my-page/openproject-my-page.module.ts index 2cb4a08fe62..27bde0a7830 100644 --- a/frontend/src/app/modules/my-page/openproject-my-page.module.ts +++ b/frontend/src/app/modules/my-page/openproject-my-page.module.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {Ng2StateDeclaration, UIRouterModule} from "@uirouter/angular"; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {OpenprojectGridsModule} from "core-app/modules/grids/openproject-grids.module"; -import {MyPageComponent} from "core-app/modules/my-page/my-page.component"; +import { NgModule } from '@angular/core'; +import { Ng2StateDeclaration, UIRouterModule } from "@uirouter/angular"; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { OpenprojectGridsModule } from "core-app/modules/grids/openproject-grids.module"; +import { MyPageComponent } from "core-app/modules/my-page/my-page.component"; export const MY_PAGE_ROUTES:Ng2StateDeclaration[] = [ { diff --git a/frontend/src/app/modules/overview/openproject-overview.module.ts b/frontend/src/app/modules/overview/openproject-overview.module.ts index 059d516d3b1..9b51ae8fe89 100644 --- a/frontend/src/app/modules/overview/openproject-overview.module.ts +++ b/frontend/src/app/modules/overview/openproject-overview.module.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from "core-app/modules/common/openproject-common.module"; -import {Ng2StateDeclaration, UIRouter, UIRouterModule} from "@uirouter/angular"; -import {OpenprojectGridsModule} from "core-app/modules/grids/openproject-grids.module"; -import {OverviewComponent} from "core-app/modules/overview/overview.component"; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from "core-app/modules/common/openproject-common.module"; +import { Ng2StateDeclaration, UIRouter, UIRouterModule } from "@uirouter/angular"; +import { OpenprojectGridsModule } from "core-app/modules/grids/openproject-grids.module"; +import { OverviewComponent } from "core-app/modules/overview/overview.component"; const menuItemClass = 'overview-menu-item'; diff --git a/frontend/src/app/modules/overview/overview.component.ts b/frontend/src/app/modules/overview/overview.component.ts index a3a21be1675..a5dc74d70cb 100644 --- a/frontend/src/app/modules/overview/overview.component.ts +++ b/frontend/src/app/modules/overview/overview.component.ts @@ -1,6 +1,6 @@ -import {Component} from '@angular/core'; -import {GridPageComponent} from "core-app/modules/grids/grid/page/grid-page.component"; -import {GRID_PROVIDERS} from "core-app/modules/grids/grid/grid.component"; +import { Component } from '@angular/core'; +import { GridPageComponent } from "core-app/modules/grids/grid/page/grid-page.component"; +import { GRID_PROVIDERS } from "core-app/modules/grids/grid/grid.component"; @Component({ selector: 'overview', diff --git a/frontend/src/app/modules/plugins/hook-service.spec.ts b/frontend/src/app/modules/plugins/hook-service.spec.ts index 39bd91d0164..ea474062d3f 100644 --- a/frontend/src/app/modules/plugins/hook-service.spec.ts +++ b/frontend/src/app/modules/plugins/hook-service.spec.ts @@ -28,7 +28,7 @@ /*jshint expr: true*/ -import {HookService} from "core-app/modules/plugins/hook-service"; +import { HookService } from "core-app/modules/plugins/hook-service"; describe('HookService', function() { let service:HookService = new HookService(); diff --git a/frontend/src/app/modules/plugins/hook-service.ts b/frontend/src/app/modules/plugins/hook-service.ts index afb0e9264db..195855872de 100644 --- a/frontend/src/app/modules/plugins/hook-service.ts +++ b/frontend/src/app/modules/plugins/hook-service.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; +import { Injectable } from "@angular/core"; @Injectable() export class HookService { @@ -45,11 +45,11 @@ export class HookService { } public call(id:string, ...params:any[]):any[] { - let results = []; + const results = []; if (this.hooks[id]) { for (let x = 0; x < this.hooks[id].length; x++) { - let result = this.hooks[id][x](...params); + const result = this.hooks[id][x](...params); if (result) { results.push(result); diff --git a/frontend/src/app/modules/plugins/openproject-plugins.module.ts b/frontend/src/app/modules/plugins/openproject-plugins.module.ts index 2042b04ccbf..a8418d72fef 100644 --- a/frontend/src/app/modules/plugins/openproject-plugins.module.ts +++ b/frontend/src/app/modules/plugins/openproject-plugins.module.ts @@ -27,10 +27,10 @@ //++ Ng1FieldControlsWrapper, -import {Injector, NgModule} from "@angular/core"; -import {HookService} from "core-app/modules/plugins/hook-service"; -import {OpenProjectPluginContext} from "core-app/modules/plugins/plugin-context"; -import {debugLog} from "core-app/helpers/debug_output"; +import { Injector, NgModule } from "@angular/core"; +import { HookService } from "core-app/modules/plugins/hook-service"; +import { OpenProjectPluginContext } from "core-app/modules/plugins/plugin-context"; +import { debugLog } from "core-app/helpers/debug_output"; @NgModule({ diff --git a/frontend/src/app/modules/plugins/plugin-context.ts b/frontend/src/app/modules/plugins/plugin-context.ts index 70eefcb0f01..e622ab222b0 100644 --- a/frontend/src/app/modules/plugins/plugin-context.ts +++ b/frontend/src/app/modules/plugins/plugin-context.ts @@ -1,28 +1,28 @@ -import {ApplicationRef, Injector, NgZone} from "@angular/core"; -import {HookService} from "core-app/modules/plugins/hook-service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {ConfirmDialogService} from "core-components/modals/confirm-dialog/confirm-dialog.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ExternalQueryConfigurationService} from "core-components/wp-table/external-configuration/external-query-configuration.service"; -import {HalResourceService} from "core-app/modules/hal/services/hal-resource.service"; -import {PasswordConfirmationModal} from "../../components/modals/request-for-confirmation/password-confirmation.modal"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {DynamicContentModal} from "../../components/modals/modal-wrapper/dynamic-content.modal"; -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {DisplayFieldService} from "core-app/modules/fields/display/display-field.service"; -import {EditFieldService} from "core-app/modules/fields/edit/edit-field.service"; -import {OpenProjectFileUploadService} from "core-components/api/op-file-upload/op-file-upload.service"; -import {EditorMacrosService} from "core-components/modals/editor/editor-macros.service"; -import {HTMLSanitizeService} from "../common/html-sanitize/html-sanitize.service"; -import {PathHelperService} from "../common/path-helper/path-helper.service"; -import {DynamicBootstrapper} from "core-app/globals/dynamic-bootstrapper"; -import {States} from 'core-components/states.service'; -import {CKEditorPreviewService} from "core-app/modules/common/ckeditor/ckeditor-preview.service"; -import {ExternalRelationQueryConfigurationService} from "core-components/wp-table/external-configuration/external-relation-query-configuration.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {ConfigurationService} from "core-app/modules/common/config/configuration.service"; +import { ApplicationRef, Injector, NgZone } from "@angular/core"; +import { HookService } from "core-app/modules/plugins/hook-service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { ConfirmDialogService } from "core-components/modals/confirm-dialog/confirm-dialog.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ExternalQueryConfigurationService } from "core-components/wp-table/external-configuration/external-query-configuration.service"; +import { HalResourceService } from "core-app/modules/hal/services/hal-resource.service"; +import { PasswordConfirmationModal } from "../../components/modals/request-for-confirmation/password-confirmation.modal"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { DynamicContentModal } from "../../components/modals/modal-wrapper/dynamic-content.modal"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { DisplayFieldService } from "core-app/modules/fields/display/display-field.service"; +import { EditFieldService } from "core-app/modules/fields/edit/edit-field.service"; +import { OpenProjectFileUploadService } from "core-components/api/op-file-upload/op-file-upload.service"; +import { EditorMacrosService } from "core-components/modals/editor/editor-macros.service"; +import { HTMLSanitizeService } from "../common/html-sanitize/html-sanitize.service"; +import { PathHelperService } from "../common/path-helper/path-helper.service"; +import { DynamicBootstrapper } from "core-app/globals/dynamic-bootstrapper"; +import { States } from 'core-components/states.service'; +import { CKEditorPreviewService } from "core-app/modules/common/ckeditor/ckeditor-preview.service"; +import { ExternalRelationQueryConfigurationService } from "core-components/wp-table/external-configuration/external-relation-query-configuration.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { ConfigurationService } from "core-app/modules/common/config/configuration.service"; /** * Plugin context bridge for plugins outside the CLI compiler context diff --git a/frontend/src/app/modules/projects/openproject-projects.module.ts b/frontend/src/app/modules/projects/openproject-projects.module.ts index 886fca5d1c4..32a276d2902 100644 --- a/frontend/src/app/modules/projects/openproject-projects.module.ts +++ b/frontend/src/app/modules/projects/openproject-projects.module.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; -import {OpenprojectFieldsModule} from 'core-app/modules/fields/openproject-fields.module'; -import {NgModule} from '@angular/core'; -import {OpenprojectHalModule} from "core-app/modules/hal/openproject-hal.module"; +import { OpenprojectCommonModule } from 'core-app/modules/common/openproject-common.module'; +import { OpenprojectFieldsModule } from 'core-app/modules/fields/openproject-fields.module'; +import { NgModule } from '@angular/core'; +import { OpenprojectHalModule } from "core-app/modules/hal/openproject-hal.module"; @NgModule({ diff --git a/frontend/src/app/modules/reporting/openproject-reporting.module.ts b/frontend/src/app/modules/reporting/openproject-reporting.module.ts index 76d532f6058..4adeda64fd4 100644 --- a/frontend/src/app/modules/reporting/openproject-reporting.module.ts +++ b/frontend/src/app/modules/reporting/openproject-reporting.module.ts @@ -26,12 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {UIRouterModule} from "@uirouter/angular"; +import { NgModule } from '@angular/core'; +import { UIRouterModule } from "@uirouter/angular"; import { REPORTING_ROUTES, } from "core-app/modules/reporting/openproject-reporting.routes"; -import {ReportingPageComponent} from "core-app/modules/reporting/reporting-page/reporting-page.component"; +import { ReportingPageComponent } from "core-app/modules/reporting/reporting-page/reporting-page.component"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/reporting/openproject-reporting.routes.ts b/frontend/src/app/modules/reporting/openproject-reporting.routes.ts index 65e3f7155e9..5f1d93d71c5 100644 --- a/frontend/src/app/modules/reporting/openproject-reporting.routes.ts +++ b/frontend/src/app/modules/reporting/openproject-reporting.routes.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Ng2StateDeclaration, UIRouter} from "@uirouter/angular"; -import {ReportingPageComponent} from "core-app/modules/reporting/reporting-page/reporting-page.component"; +import { Ng2StateDeclaration, UIRouter } from "@uirouter/angular"; +import { ReportingPageComponent } from "core-app/modules/reporting/reporting-page/reporting-page.component"; export const REPORTING_ROUTES:Ng2StateDeclaration[] = [ { diff --git a/frontend/src/app/modules/reporting/reporting-page/reporting-page.component.ts b/frontend/src/app/modules/reporting/reporting-page/reporting-page.component.ts index 897a745f76d..18f4aebfc29 100644 --- a/frontend/src/app/modules/reporting/reporting-page/reporting-page.component.ts +++ b/frontend/src/app/modules/reporting/reporting-page/reporting-page.component.ts @@ -1,5 +1,5 @@ -import {Component, OnInit, ViewEncapsulation} from "@angular/core"; -import {registerTableSorter} from "core-app/modules/reporting/reporting-page/functionality/tablesorter"; +import { Component, OnInit, ViewEncapsulation } from "@angular/core"; +import { registerTableSorter } from "core-app/modules/reporting/reporting-page/functionality/tablesorter"; export const reportingPageComponentSelector = 'op-reporting-page'; diff --git a/frontend/src/app/modules/router/base/application-base.component.ts b/frontend/src/app/modules/router/base/application-base.component.ts index afd81486b8e..20ba5ae0182 100644 --- a/frontend/src/app/modules/router/base/application-base.component.ts +++ b/frontend/src/app/modules/router/base/application-base.component.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from "@angular/core"; +import { Component } from "@angular/core"; export const appBaseSelector = 'openproject-base'; diff --git a/frontend/src/app/modules/router/first-route-service.ts b/frontend/src/app/modules/router/first-route-service.ts index 6efa6ecf07f..d95d0f9765a 100644 --- a/frontend/src/app/modules/router/first-route-service.ts +++ b/frontend/src/app/modules/router/first-route-service.ts @@ -27,7 +27,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; +import { Injectable } from "@angular/core"; @Injectable() export class FirstRouteService { diff --git a/frontend/src/app/modules/router/openproject-router.module.ts b/frontend/src/app/modules/router/openproject-router.module.ts index 18033623130..1a8761cecc0 100644 --- a/frontend/src/app/modules/router/openproject-router.module.ts +++ b/frontend/src/app/modules/router/openproject-router.module.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector, NgModule} from '@angular/core'; -import {FirstRouteService} from "core-app/modules/router/first-route-service"; -import {UIRouterModule} from "@uirouter/angular"; -import {ApplicationBaseComponent} from "core-app/modules/router/base/application-base.component"; +import { Injector, NgModule } from '@angular/core'; +import { FirstRouteService } from "core-app/modules/router/first-route-service"; +import { UIRouterModule } from "@uirouter/angular"; +import { ApplicationBaseComponent } from "core-app/modules/router/base/application-base.component"; import { initializeUiRouterListeners, OPENPROJECT_ROUTES, diff --git a/frontend/src/app/modules/router/openproject.routes.ts b/frontend/src/app/modules/router/openproject.routes.ts index d4f60c73a53..7af6bdc49c8 100644 --- a/frontend/src/app/modules/router/openproject.routes.ts +++ b/frontend/src/app/modules/router/openproject.routes.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {StateDeclaration, StateService, Transition, TransitionService, UIRouter} from '@uirouter/core'; -import {INotification, NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {Injector} from "@angular/core"; -import {FirstRouteService} from "core-app/modules/router/first-route-service"; -import {Ng2StateDeclaration, StatesModule} from "@uirouter/angular"; -import {appBaseSelector, ApplicationBaseComponent} from "core-app/modules/router/base/application-base.component"; -import {BackRoutingService} from "core-app/modules/common/back-routing/back-routing.service"; +import { StateDeclaration, StateService, Transition, TransitionService, UIRouter } from '@uirouter/core'; +import { INotification, NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { Injector } from "@angular/core"; +import { FirstRouteService } from "core-app/modules/router/first-route-service"; +import { Ng2StateDeclaration, StatesModule } from "@uirouter/angular"; +import { appBaseSelector, ApplicationBaseComponent } from "core-app/modules/router/base/application-base.component"; +import { BackRoutingService } from "core-app/modules/common/back-routing/back-routing.service"; export const OPENPROJECT_ROUTES:Ng2StateDeclaration[] = [ { @@ -112,7 +112,7 @@ export function updateMenuItem(menuItemClass:string|undefined, action:'add'|'rem return; } - let menuItem = jQuery('#main-menu .' + menuItemClass)[0]; + const menuItem = jQuery('#main-menu .' + menuItemClass)[0]; if (!menuItem) { return; @@ -159,7 +159,7 @@ export function initializeUiRouterListeners(injector:Injector) { // Check whether we are running within our complete app, or only within some other bootstrapped // component - let wpBase = document.querySelector(appBaseSelector); + const wpBase = document.querySelector(appBaseSelector); // Uncomment to trace route changes // const uiRouter = injector.get(UIRouter); diff --git a/frontend/src/app/modules/time_entries/create/create.modal.ts b/frontend/src/app/modules/time_entries/create/create.modal.ts index 020d435f175..52d5c06be88 100644 --- a/frontend/src/app/modules/time_entries/create/create.modal.ts +++ b/frontend/src/app/modules/time_entries/create/create.modal.ts @@ -1,7 +1,7 @@ -import {Component, ChangeDetectionStrategy} from "@angular/core"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; +import { Component, ChangeDetectionStrategy } from "@angular/core"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; import { TimeEntryBaseModal } from '../shared/modal/base.modal'; @Component({ diff --git a/frontend/src/app/modules/time_entries/create/create.service.ts b/frontend/src/app/modules/time_entries/create/create.service.ts index cf1e0e4e7a5..02f84f49a88 100644 --- a/frontend/src/app/modules/time_entries/create/create.service.ts +++ b/frontend/src/app/modules/time_entries/create/create.service.ts @@ -10,8 +10,8 @@ import { HalResourceEditingService } from "core-app/modules/fields/edit/services import { Moment } from 'moment'; import { TimeEntryCreateModal } from "core-app/modules/time_entries/create/create.modal"; import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() export class TimeEntryCreateService { @@ -25,7 +25,7 @@ export class TimeEntryCreateService { readonly i18n:I18nService) { } - public create(date:Moment, wp?:WorkPackageResource, showWorkPackageField:boolean = true) { + public create(date:Moment, wp?:WorkPackageResource, showWorkPackageField = true) { return new Promise<{ entry:TimeEntryResource, action:'create' }>((resolve, reject) => { this .createNewTimeEntry(date, wp) @@ -47,7 +47,7 @@ export class TimeEntryCreateService { } public createNewTimeEntry(date:Moment, wp?:WorkPackageResource) { - let payload:any = { + const payload:any = { spentOn: date.format('YYYY-MM-DD') }; @@ -66,18 +66,18 @@ export class TimeEntryCreateService { .post(payload) .toPromise() .then(form => { - return this.fromCreateForm(form); - }); + return this.fromCreateForm(form); + }); } public fromCreateForm(form:FormResource):ResourceChangeset { - let entry = this.initializeNewResource(form); + const entry = this.initializeNewResource(form); return this.halEditing.edit>(entry, form); } private initializeNewResource(form:FormResource) { - let entry = this.halResource.createHalResourceOfType('TimeEntry', form.payload.$plain()); + const entry = this.halResource.createHalResourceOfType('TimeEntry', form.payload.$plain()); entry.$links['schema'] = { href: 'new' }; diff --git a/frontend/src/app/modules/time_entries/edit/edit.modal.ts b/frontend/src/app/modules/time_entries/edit/edit.modal.ts index d0aebf60fac..b8874305580 100644 --- a/frontend/src/app/modules/time_entries/edit/edit.modal.ts +++ b/frontend/src/app/modules/time_entries/edit/edit.modal.ts @@ -1,8 +1,8 @@ -import {Component, ChangeDetectionStrategy} from "@angular/core"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {TimeEntryBaseModal} from "core-app/modules/time_entries/shared/modal/base.modal"; +import { Component, ChangeDetectionStrategy } from "@angular/core"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { TimeEntryBaseModal } from "core-app/modules/time_entries/shared/modal/base.modal"; @Component({ templateUrl: '../shared/modal/base.modal.html', diff --git a/frontend/src/app/modules/time_entries/edit/edit.service.ts b/frontend/src/app/modules/time_entries/edit/edit.service.ts index 34fef01fcb8..2002d89c797 100644 --- a/frontend/src/app/modules/time_entries/edit/edit.service.ts +++ b/frontend/src/app/modules/time_entries/edit/edit.service.ts @@ -1,13 +1,13 @@ -import {Injectable, Injector} from "@angular/core"; -import {OpModalService} from "core-app/modules/modal/modal.service"; -import {HalResourceService} from "app/modules/hal/services/hal-resource.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Injectable, Injector } from "@angular/core"; +import { OpModalService } from "core-app/modules/modal/modal.service"; +import { HalResourceService } from "app/modules/hal/services/hal-resource.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { TimeEntryResource } from 'core-app/modules/hal/resources/time-entry-resource'; import { TimeEntryEditModal } from './edit.modal'; import { take } from 'rxjs/operators'; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() export class TimeEntryEditService { @@ -33,7 +33,7 @@ export class TimeEntryEditService { .subscribe(() => { if (modal.destroyedEntry) { modal.destroyedEntry.delete().then(() => { - resolve({entry: modal.destroyedEntry, action: 'destroy'}); + resolve({ entry: modal.destroyedEntry, action: 'destroy' }); }); } else if (modal.modifiedEntry) { resolve({ entry: modal.modifiedEntry, action: 'update' }); @@ -54,7 +54,7 @@ export class TimeEntryEditService { .post(entry) .toPromise() .then(form => { - return this.halEditing.edit>(entry, form); - }); + return this.halEditing.edit>(entry, form); + }); } } diff --git a/frontend/src/app/modules/time_entries/edit/trigger-actions-entry.component.ts b/frontend/src/app/modules/time_entries/edit/trigger-actions-entry.component.ts index 3c4bc81c84f..f199bc4feef 100644 --- a/frontend/src/app/modules/time_entries/edit/trigger-actions-entry.component.ts +++ b/frontend/src/app/modules/time_entries/edit/trigger-actions-entry.component.ts @@ -1,11 +1,11 @@ -import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Injector, OnInit} from "@angular/core"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {TimeEntryEditService} from "core-app/modules/time_entries/edit/edit.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Injector, OnInit } from "@angular/core"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { TimeEntryEditService } from "core-app/modules/time_entries/edit/edit.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; export const triggerActionsEntryComponentSelector = 'time-entry--trigger-actions-entry'; @@ -81,7 +81,7 @@ export class TriggerActionsEntryComponent { } protected loadEntry():Promise { - let timeEntryId = this.elementRef.nativeElement.dataset['entry']; + const timeEntryId = this.elementRef.nativeElement.dataset['entry']; return this .apiv3Service diff --git a/frontend/src/app/modules/time_entries/form/form.component.ts b/frontend/src/app/modules/time_entries/form/form.component.ts index 7e1cb4bd9b8..6d368376e11 100644 --- a/frontend/src/app/modules/time_entries/form/form.component.ts +++ b/frontend/src/app/modules/time_entries/form/form.component.ts @@ -1,6 +1,6 @@ -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {TimeEntryResource} from "core-app/modules/hal/resources/time-entry-resource"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { TimeEntryResource } from "core-app/modules/hal/resources/time-entry-resource"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; import { ChangeDetectionStrategy, ChangeDetectorRef, @@ -13,10 +13,10 @@ import { ViewChild, ViewEncapsulation } from '@angular/core'; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {EditFormComponent} from 'core-app/modules/fields/edit/edit-form/edit-form.component'; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-changeset"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { EditFormComponent } from 'core-app/modules/fields/edit/edit-form/edit-form.component'; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { ResourceChangeset } from "core-app/modules/fields/changeset/resource-changeset"; @Component({ templateUrl: './form.component.html', @@ -26,7 +26,7 @@ import {ResourceChangeset} from "core-app/modules/fields/changeset/resource-chan }) export class TimeEntryFormComponent extends UntilDestroyedMixin implements OnInit, OnDestroy { @Input() changeset:ResourceChangeset; - @Input() showWorkPackageField:boolean = true; + @Input() showWorkPackageField = true; @Output() modifiedEntry = new EventEmitter<{ savedResource:TimeEntryResource, isInital:boolean }>(); @@ -43,7 +43,7 @@ export class TimeEntryFormComponent extends UntilDestroyedMixin implements OnIni wpRequired: this.i18n.t('js.time_entry.work_package_required') }; - public workPackageSelected:boolean = false; + public workPackageSelected = false; public customFields:{ key:string, label:string }[] = []; constructor(readonly halEditing:HalResourceEditingService, diff --git a/frontend/src/app/modules/time_entries/openproject-time-entries.module.ts b/frontend/src/app/modules/time_entries/openproject-time-entries.module.ts index c994461328c..3df1d951678 100644 --- a/frontend/src/app/modules/time_entries/openproject-time-entries.module.ts +++ b/frontend/src/app/modules/time_entries/openproject-time-entries.module.ts @@ -26,16 +26,16 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {OpenprojectFieldsModule} from "core-app/modules/fields/openproject-fields.module"; -import {TimeEntryCreateModal} from "core-app/modules/time_entries/create/create.modal"; -import {TimeEntryEditModal} from "core-app/modules/time_entries/edit/edit.modal"; -import {TimeEntryFormComponent} from "core-app/modules/time_entries/form/form.component"; -import {TimeEntryEditService} from "core-app/modules/time_entries/edit/edit.service"; -import {TriggerActionsEntryComponent} from "core-app/modules/time_entries/edit/trigger-actions-entry.component"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from 'core-app/modules/common/openproject-common.module'; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { OpenprojectFieldsModule } from "core-app/modules/fields/openproject-fields.module"; +import { TimeEntryCreateModal } from "core-app/modules/time_entries/create/create.modal"; +import { TimeEntryEditModal } from "core-app/modules/time_entries/edit/edit.modal"; +import { TimeEntryFormComponent } from "core-app/modules/time_entries/form/form.component"; +import { TimeEntryEditService } from "core-app/modules/time_entries/edit/edit.service"; +import { TriggerActionsEntryComponent } from "core-app/modules/time_entries/edit/trigger-actions-entry.component"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; @NgModule({ imports: [ diff --git a/frontend/src/app/modules/time_entries/shared/modal/base.modal.ts b/frontend/src/app/modules/time_entries/shared/modal/base.modal.ts index 4c4c63f5635..7ed233d4502 100644 --- a/frontend/src/app/modules/time_entries/shared/modal/base.modal.ts +++ b/frontend/src/app/modules/time_entries/shared/modal/base.modal.ts @@ -1,12 +1,12 @@ import { ElementRef, Inject, ChangeDetectorRef, ViewChild, Directive, Injector } from "@angular/core"; -import {OpModalComponent} from "core-app/modules/modal/modal.component"; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {OpModalLocalsMap} from "core-app/modules/modal/modal.types"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {TimeEntryFormComponent} from "core-app/modules/time_entries/form/form.component"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; +import { OpModalComponent } from "core-app/modules/modal/modal.component"; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { OpModalLocalsMap } from "core-app/modules/modal/modal.types"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { TimeEntryFormComponent } from "core-app/modules/time_entries/form/form.component"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; import { InjectField } from 'core-app/helpers/angular/inject-field.decorator'; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Directive() export abstract class TimeEntryBaseModal extends OpModalComponent { diff --git a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/abstract-query-spaced-tab.component.ts b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/abstract-query-spaced-tab.component.ts index 3a8da87ed03..88547ac9fa3 100644 --- a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/abstract-query-spaced-tab.component.ts +++ b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/abstract-query-spaced-tab.component.ts @@ -1,7 +1,7 @@ -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service"; -import {WpGraphConfigurationService} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageStatesInitializationService } from "core-components/wp-list/wp-states-initialization.service"; +import { WpGraphConfigurationService } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; export abstract class QuerySpacedTabComponent { constructor(readonly I18n:I18nService, @@ -11,12 +11,12 @@ export abstract class QuerySpacedTabComponent { protected initializeQuerySpace() { return this - .wpGraphConfiguration - .formFor(this.query) - .then(form => { - this.wpStatesInitialization.initialize(this.query, this.query.results); - this.wpStatesInitialization.updateStatesFromForm(this.query, form); - }); + .wpGraphConfiguration + .formFor(this.query) + .then(form => { + this.wpStatesInitialization.initialize(this.query, this.query.results); + this.wpStatesInitialization.updateStatesFromForm(this.query, form); + }); } protected abstract get query():QueryResource; diff --git a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component.ts b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component.ts index d0f38633f7b..fdf7306f268 100644 --- a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component.ts +++ b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component.ts @@ -1,12 +1,12 @@ -import {Component} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {WorkPackageFiltersService} from 'core-components/filters/wp-filters/wp-filters.service'; -import {WorkPackageViewFiltersService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service'; -import {QueryFilterInstanceResource} from "core-app/modules/hal/resources/query-filter-instance-resource"; -import {WpGraphConfigurationService} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; -import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service"; -import {QuerySpacedTabComponent} from "core-app/modules/work-package-graphs/configuration-modal/tabs/abstract-query-spaced-tab.component"; +import { Component } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { WorkPackageFiltersService } from 'core-components/filters/wp-filters/wp-filters.service'; +import { WorkPackageViewFiltersService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service'; +import { QueryFilterInstanceResource } from "core-app/modules/hal/resources/query-filter-instance-resource"; +import { WpGraphConfigurationService } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; +import { WorkPackageStatesInitializationService } from "core-components/wp-list/wp-states-initialization.service"; +import { QuerySpacedTabComponent } from "core-app/modules/work-package-graphs/configuration-modal/tabs/abstract-query-spaced-tab.component"; @Component({ selector: 'filters-tab-inner', diff --git a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/filters-tab.component.ts b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/filters-tab.component.ts index 929ada47778..c64be7bc838 100644 --- a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/filters-tab.component.ts +++ b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/filters-tab.component.ts @@ -1,5 +1,5 @@ -import {Component, ViewChild} from '@angular/core'; -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { Component, ViewChild } from '@angular/core'; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; @Component({ templateUrl: './filters-tab.component.html' diff --git a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component.ts b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component.ts index 16b91299d66..d084ee443c6 100644 --- a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component.ts +++ b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component.ts @@ -1,13 +1,13 @@ -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WorkPackageViewGroupByService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service'; -import {QueryGroupByResource} from 'core-app/modules/hal/resources/query-group-by-resource'; -import {Component} from "@angular/core"; -import {ChartType} from 'chart.js'; -import {WpGraphConfigurationService} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; -import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service"; -import {TabComponent} from "core-components/wp-table/configuration-modal/tab-portal-outlet"; -import {QuerySpacedTabComponent} from "core-app/modules/work-package-graphs/configuration-modal/tabs/abstract-query-spaced-tab.component"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WorkPackageViewGroupByService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service'; +import { QueryGroupByResource } from 'core-app/modules/hal/resources/query-group-by-resource'; +import { Component } from "@angular/core"; +import { ChartType } from 'chart.js'; +import { WpGraphConfigurationService } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; +import { WorkPackageStatesInitializationService } from "core-components/wp-list/wp-states-initialization.service"; +import { TabComponent } from "core-components/wp-table/configuration-modal/tab-portal-outlet"; +import { QuerySpacedTabComponent } from "core-app/modules/work-package-graphs/configuration-modal/tabs/abstract-query-spaced-tab.component"; interface OpChartType { identifier:ChartType; @@ -68,7 +68,7 @@ export class WpGraphConfigurationSettingsTabInner extends QuerySpacedTabComponen let available = this.wpTableGroupBy.available; // the object in current is not identical to one in available. We therefore // have to do this by hand to be able to just use ngModel later. - let current = this.wpTableGroupBy.current; + const current = this.wpTableGroupBy.current; if (current) { available = available.filter(group => group.id !== current!.id); @@ -80,13 +80,13 @@ export class WpGraphConfigurationSettingsTabInner extends QuerySpacedTabComponen private initializeAvailableChartType() { this.availableChartTypes = _.sortBy([ - {identifier: 'horizontalBar' as ChartType, label: this.I18n.t('js.chart.types.horizontal_bar')}, - {identifier: 'bar' as ChartType, label: this.I18n.t('js.chart.types.bar')}, - {identifier: 'line' as ChartType, label: this.I18n.t('js.chart.types.line')}, - {identifier: 'pie' as ChartType, label: this.I18n.t('js.chart.types.pie')}, - {identifier: 'doughnut' as ChartType, label: this.I18n.t('js.chart.types.doughnut')}, - {identifier: 'radar' as ChartType, label: this.I18n.t('js.chart.types.radar')}, - {identifier: 'polarArea' as ChartType, label: this.I18n.t('js.chart.types.polar_area')} + { identifier: 'horizontalBar' as ChartType, label: this.I18n.t('js.chart.types.horizontal_bar') }, + { identifier: 'bar' as ChartType, label: this.I18n.t('js.chart.types.bar') }, + { identifier: 'line' as ChartType, label: this.I18n.t('js.chart.types.line') }, + { identifier: 'pie' as ChartType, label: this.I18n.t('js.chart.types.pie') }, + { identifier: 'doughnut' as ChartType, label: this.I18n.t('js.chart.types.doughnut') }, + { identifier: 'radar' as ChartType, label: this.I18n.t('js.chart.types.radar') }, + { identifier: 'polarArea' as ChartType, label: this.I18n.t('js.chart.types.polar_area') } ], 'label'); this.currentChartType = this.availableChartTypes.find(type => type.identifier === this.wpGraphConfiguration.configuration.chartType) || this.availableChartTypes[0]; diff --git a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/settings-tab.component.ts b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/settings-tab.component.ts index 23d6aa36636..e64c35b6294 100644 --- a/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/settings-tab.component.ts +++ b/frontend/src/app/modules/work-package-graphs/configuration-modal/tabs/settings-tab.component.ts @@ -1,5 +1,5 @@ -import {TabComponent} from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {Component, ViewChild} from "@angular/core"; +import { TabComponent } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; +import { Component, ViewChild } from "@angular/core"; @Component({ templateUrl: './settings-tab.component.html' diff --git a/frontend/src/app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts b/frontend/src/app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts index e6b4c919569..dcfc1240ef7 100644 --- a/frontend/src/app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts +++ b/frontend/src/app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal.ts @@ -12,22 +12,22 @@ import { Optional, ViewChild } from '@angular/core'; -import {OpModalLocalsMap} from 'core-app/modules/modal/modal.types'; -import {OpModalComponent} from 'core-app/modules/modal/modal.component'; -import {OpModalLocalsToken} from "core-app/modules/modal/modal.service"; -import {ConfigurationService} from 'core-app/modules/common/config/configuration.service'; +import { OpModalLocalsMap } from 'core-app/modules/modal/modal.types'; +import { OpModalComponent } from 'core-app/modules/modal/modal.component'; +import { OpModalLocalsToken } from "core-app/modules/modal/modal.service"; +import { ConfigurationService } from 'core-app/modules/common/config/configuration.service'; import { ActiveTabInterface, TabComponent, TabInterface, TabPortalOutlet } from 'core-components/wp-table/configuration-modal/tab-portal-outlet'; -import {LoadingIndicatorService} from 'core-app/modules/common/loading-indicator/loading-indicator.service'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ComponentType} from "@angular/cdk/portal"; -import {WpGraphConfigurationService} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; -import {WpGraphConfiguration} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { LoadingIndicatorService } from 'core-app/modules/common/loading-indicator/loading-indicator.service'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ComponentType } from "@angular/cdk/portal"; +import { WpGraphConfigurationService } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; +import { WpGraphConfiguration } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; export const WpTableConfigurationModalPrependToken = new InjectionToken>('WpTableConfigurationModalPrependComponent'); diff --git a/frontend/src/app/modules/work-package-graphs/configuration/wp-graph-configuration.service.ts b/frontend/src/app/modules/work-package-graphs/configuration/wp-graph-configuration.service.ts index e412bc0bf38..0eaaf5e1775 100644 --- a/frontend/src/app/modules/work-package-graphs/configuration/wp-graph-configuration.service.ts +++ b/frontend/src/app/modules/work-package-graphs/configuration/wp-graph-configuration.service.ts @@ -1,18 +1,18 @@ -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {WpGraphConfigurationSettingsTab} from "core-app/modules/work-package-graphs/configuration-modal/tabs/settings-tab.component"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {TabInterface} from "core-components/wp-table/configuration-modal/tab-portal-outlet"; -import {Injectable} from '@angular/core'; -import {WpGraphConfigurationFiltersTab} from "core-app/modules/work-package-graphs/configuration-modal/tabs/filters-tab.component"; -import {ChartType} from 'chart.js'; -import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource"; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { WpGraphConfigurationSettingsTab } from "core-app/modules/work-package-graphs/configuration-modal/tabs/settings-tab.component"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { TabInterface } from "core-components/wp-table/configuration-modal/tab-portal-outlet"; +import { Injectable } from '@angular/core'; +import { WpGraphConfigurationFiltersTab } from "core-app/modules/work-package-graphs/configuration-modal/tabs/filters-tab.component"; +import { ChartType } from 'chart.js'; +import { QueryFormResource } from "core-app/modules/hal/resources/query-form-resource"; import { WpGraphConfiguration, WpGraphQueryParams } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() export class WpGraphConfigurationService { @@ -28,13 +28,13 @@ export class WpGraphConfigurationService { } public persistAndReload() { - return this - .persistChanges() - .then(() => this.reloadQueries()); + return this + .persistChanges() + .then(() => this.reloadQueries()); } public persistChanges() { - let promises = this.queries.map(query => { + const promises = this.queries.map(query => { return this.saveQuery(query); }); @@ -61,7 +61,7 @@ export class WpGraphConfigurationService { if (this.queryParams.length === 0) { return this.createInitial() .then((query) => { - this.queryParams.push({id: query.id!}); + this.queryParams.push({ id: query.id! }); return this.loadQueries(); }); @@ -76,7 +76,7 @@ export class WpGraphConfigurationService { .queries .form .loadWithParams( - {pageSize: 0}, + { pageSize: 0 }, undefined, this.currentProject.identifier, WpGraphConfiguration.queryCreationParams(this.I18n, !!this.currentProject.identifier) @@ -92,7 +92,7 @@ export class WpGraphConfigurationService { } private loadQueries() { - let queryPromises = this.queryParams.map(queryParam => { + const queryPromises = this.queryParams.map(queryParam => { return this.loadQuery(queryParam); }); @@ -104,7 +104,7 @@ export class WpGraphConfigurationService { .apiv3Service .queries .find( - Object.assign({pageSize: 0}, params.props), + Object.assign({ pageSize: 0 }, params.props), params.id, this.currentProject.identifier, ) @@ -147,7 +147,7 @@ export class WpGraphConfigurationService { } public get tabs() { - let tabs:TabInterface[] = [ + const tabs:TabInterface[] = [ { name: 'graph-settings', title: this.I18n.t('js.chart.tabs.graph_settings'), @@ -155,7 +155,7 @@ export class WpGraphConfigurationService { } ]; - let queryTabs = this.configuration.queries.map((query) => { + const queryTabs = this.configuration.queries.map((query) => { return { name: query.id as string, title: this.I18n.t('js.work_packages.query.filters'), @@ -168,7 +168,7 @@ export class WpGraphConfigurationService { public loadForms() { if (!this._formsPromise) { - let formPromises = this.configuration.queries.map((query) => { + const formPromises = this.configuration.queries.map((query) => { return this .apiv3Service .queries diff --git a/frontend/src/app/modules/work-package-graphs/configuration/wp-graph-configuration.ts b/frontend/src/app/modules/work-package-graphs/configuration/wp-graph-configuration.ts index 67a11a0a382..449c65b5f9c 100644 --- a/frontend/src/app/modules/work-package-graphs/configuration/wp-graph-configuration.ts +++ b/frontend/src/app/modules/work-package-graphs/configuration/wp-graph-configuration.ts @@ -1,6 +1,6 @@ -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {ChartType, ChartOptions} from 'chart.js'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { ChartType, ChartOptions } from 'chart.js'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; export interface WpGraphQueryParams { id?:string; diff --git a/frontend/src/app/modules/work-package-graphs/embedded/wp-embedded-graph.component.ts b/frontend/src/app/modules/work-package-graphs/embedded/wp-embedded-graph.component.ts index 52f4252c11c..67acee90a06 100644 --- a/frontend/src/app/modules/work-package-graphs/embedded/wp-embedded-graph.component.ts +++ b/frontend/src/app/modules/work-package-graphs/embedded/wp-embedded-graph.component.ts @@ -1,8 +1,8 @@ -import {Component, Input, SimpleChanges} from '@angular/core'; -import {WorkPackageTableConfiguration} from 'core-components/wp-table/wp-table-configuration'; -import {GroupObject} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {ChartOptions, ChartType} from 'chart.js'; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; +import { Component, Input, SimpleChanges } from '@angular/core'; +import { WorkPackageTableConfiguration } from 'core-components/wp-table/wp-table-configuration'; +import { GroupObject } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { ChartOptions, ChartType } from 'chart.js'; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; export interface WorkPackageEmbeddedGraphDataset { label:string; @@ -56,19 +56,21 @@ export class WorkPackageEmbeddedGraphComponent { private updateChartData() { let uniqLabels = _.uniq(this.datasets.reduce((array, dataset) => { - let groups = (dataset.groups || []).map((group) => group.value) as any; + const groups = (dataset.groups || []).map((group) => group.value) as any; return array.concat(groups); }, [])) as string[]; - let labelCountMaps = this.datasets.map((dataset) => { - let countMap = (dataset.groups || []).reduce((hash, group) => { + const labelCountMaps = this.datasets.map((dataset) => { + const countMap = (dataset.groups || []).reduce((hash, group) => { hash[group.value] = group.count; return hash; }, {} as any); return { label: dataset.label, - data: uniqLabels.map((label) => { return countMap[label] || 0; }) + data: uniqLabels.map((label) => { + return countMap[label] || 0; + }) }; }); @@ -90,7 +92,7 @@ export class WorkPackageEmbeddedGraphComponent { } protected setChartOptions() { - let defaults = { + const defaults = { responsive: true, maintainAspectRatio: false, legend: { @@ -104,9 +106,9 @@ export class WorkPackageEmbeddedGraphComponent { } }; - let chartTypeDefaults:ChartOptions = {scales:{}}; + const chartTypeDefaults:ChartOptions = { scales:{} }; if (this.chartType === 'horizontalBar' || this.chartType === 'bar' ) { - this.setChartAxesValues(chartTypeDefaults); + this.setChartAxesValues(chartTypeDefaults); } this.chartOptions = Object.assign({}, defaults, chartTypeDefaults, this.inputChartOptions); @@ -118,7 +120,7 @@ export class WorkPackageEmbeddedGraphComponent { private setHeight() { if (this.chartType === 'horizontalBar' && this.datasets && this.datasets[0]) { - let labels:string[] = []; + const labels:string[] = []; this.datasets.forEach(d => d.groups!.forEach(g => { if (!labels.includes(g.value)) { labels.push(g.value); @@ -143,7 +145,7 @@ export class WorkPackageEmbeddedGraphComponent { // function to set ticks of axis private setChartAxesValues(chartOptions:ChartOptions) { - let changeableValuesAxis = [{ + const changeableValuesAxis = [{ stacked: true, ticks: { callback: (value:number) => { @@ -156,7 +158,7 @@ export class WorkPackageEmbeddedGraphComponent { } }]; - let constantValuesAxis = [{ + const constantValuesAxis = [{ stacked: true }]; @@ -164,7 +166,7 @@ export class WorkPackageEmbeddedGraphComponent { if (this.chartType === 'bar') { chartOptions.scales.yAxes = changeableValuesAxis; chartOptions.scales.xAxes = constantValuesAxis; - } else if (this.chartType === 'horizontalBar') { + } else if (this.chartType === 'horizontalBar') { chartOptions.scales.xAxes = changeableValuesAxis; chartOptions.scales.yAxes = constantValuesAxis; } diff --git a/frontend/src/app/modules/work-package-graphs/openproject-work-package-graphs.module.ts b/frontend/src/app/modules/work-package-graphs/openproject-work-package-graphs.module.ts index 618b15526c8..00219b83705 100644 --- a/frontend/src/app/modules/work-package-graphs/openproject-work-package-graphs.module.ts +++ b/frontend/src/app/modules/work-package-graphs/openproject-work-package-graphs.module.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; -import {OpenprojectModalModule} from "core-app/modules/modal/modal.module"; -import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module"; -import {WpGraphConfigurationModalComponent} from "core-app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal"; -import {WpGraphConfigurationFiltersTab} from "core-app/modules/work-package-graphs/configuration-modal/tabs/filters-tab.component"; -import {WpGraphConfigurationSettingsTab} from "core-app/modules/work-package-graphs/configuration-modal/tabs/settings-tab.component"; -import {WpGraphConfigurationFiltersTabInner} from "core-app/modules/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component"; -import {WpGraphConfigurationSettingsTabInner} from "core-app/modules/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component"; -import {WorkPackageEmbeddedGraphComponent} from "core-app/modules/work-package-graphs/embedded/wp-embedded-graph.component"; -import {WorkPackageOverviewGraphComponent} from "core-app/modules/work-package-graphs/overview/wp-overview-graph.component"; -import {ChartsModule} from 'ng2-charts'; +import { NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from 'core-app/modules/common/openproject-common.module'; +import { OpenprojectModalModule } from "core-app/modules/modal/modal.module"; +import { OpenprojectWorkPackagesModule } from "core-app/modules/work_packages/openproject-work-packages.module"; +import { WpGraphConfigurationModalComponent } from "core-app/modules/work-package-graphs/configuration-modal/wp-graph-configuration.modal"; +import { WpGraphConfigurationFiltersTab } from "core-app/modules/work-package-graphs/configuration-modal/tabs/filters-tab.component"; +import { WpGraphConfigurationSettingsTab } from "core-app/modules/work-package-graphs/configuration-modal/tabs/settings-tab.component"; +import { WpGraphConfigurationFiltersTabInner } from "core-app/modules/work-package-graphs/configuration-modal/tabs/filters-tab-inner.component"; +import { WpGraphConfigurationSettingsTabInner } from "core-app/modules/work-package-graphs/configuration-modal/tabs/settings-tab-inner.component"; +import { WorkPackageEmbeddedGraphComponent } from "core-app/modules/work-package-graphs/embedded/wp-embedded-graph.component"; +import { WorkPackageOverviewGraphComponent } from "core-app/modules/work-package-graphs/overview/wp-overview-graph.component"; +import { ChartsModule } from 'ng2-charts'; import * as ChartDataLabels from 'chartjs-plugin-datalabels'; @NgModule({ diff --git a/frontend/src/app/modules/work-package-graphs/overview/wp-overview-graph.component.ts b/frontend/src/app/modules/work-package-graphs/overview/wp-overview-graph.component.ts index e9b51d250a3..6ba03dd84bb 100644 --- a/frontend/src/app/modules/work-package-graphs/overview/wp-overview-graph.component.ts +++ b/frontend/src/app/modules/work-package-graphs/overview/wp-overview-graph.component.ts @@ -1,11 +1,11 @@ -import {Component, ElementRef, Input, OnInit, ViewChild, ChangeDetectorRef, ChangeDetectionStrategy} from '@angular/core'; +import { Component, ElementRef, Input, OnInit, ViewChild, ChangeDetectorRef, ChangeDetectionStrategy } from '@angular/core'; import { WorkPackageEmbeddedGraphComponent, WorkPackageEmbeddedGraphDataset } from "core-app/modules/work-package-graphs/embedded/wp-embedded-graph.component"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {ChartOptions} from 'chart.js'; -import {WpGraphConfigurationService} from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { ChartOptions } from 'chart.js'; +import { WpGraphConfigurationService } from "core-app/modules/work-package-graphs/configuration/wp-graph-configuration.service"; import { WpGraphConfiguration, WpGraphQueryParams @@ -27,7 +27,7 @@ export class WorkPackageOverviewGraphComponent implements OnInit { @Input() additionalFilter:any; @ViewChild('wpEmbeddedGraphMulti') private embeddedGraphMulti:WorkPackageEmbeddedGraphComponent; @ViewChild('wpEmbeddedGraphSingle') private embeddedGraphSingle:WorkPackageEmbeddedGraphComponent; - @Input() groupBy:string = 'status'; + @Input() groupBy = 'status'; @Input() chartOptions:ChartOptions = { maintainAspectRatio: false }; public datasets:WorkPackageEmbeddedGraphDataset[] = []; public displayModeSingle = true; @@ -39,12 +39,12 @@ export class WorkPackageOverviewGraphComponent implements OnInit { readonly graphConfigurationService:WpGraphConfigurationService, protected readonly cdr:ChangeDetectorRef) { - this.availableGroupBy = [{label: I18n.t('js.work_packages.properties.category'), key: 'category'}, - {label: I18n.t('js.work_packages.properties.type'), key: 'type'}, - {label: I18n.t('js.work_packages.properties.status'), key: 'status'}, - {label: I18n.t('js.work_packages.properties.priority'), key: 'priority'}, - {label: I18n.t('js.work_packages.properties.author'), key: 'author'}, - {label: I18n.t('js.work_packages.properties.assignee'), key: 'assignee'}]; + this.availableGroupBy = [{ label: I18n.t('js.work_packages.properties.category'), key: 'category' }, + { label: I18n.t('js.work_packages.properties.type'), key: 'type' }, + { label: I18n.t('js.work_packages.properties.status'), key: 'status' }, + { label: I18n.t('js.work_packages.properties.priority'), key: 'priority' }, + { label: I18n.t('js.work_packages.properties.author'), key: 'author' }, + { label: I18n.t('js.work_packages.properties.assignee'), key: 'assignee' }]; } ngOnInit() { @@ -57,7 +57,7 @@ export class WorkPackageOverviewGraphComponent implements OnInit { public setQueryProps() { this.datasets = []; - let params = this.graphParams; + const params = this.graphParams; this.graphConfigurationService.configuration = new WpGraphConfiguration(params, {}, 'horizontalBar'); @@ -78,7 +78,7 @@ export class WorkPackageOverviewGraphComponent implements OnInit { } public get graphParams() { - let params = []; + const params = []; if (this.groupBy === 'status') { this.displayModeSingle = true; @@ -95,7 +95,7 @@ export class WorkPackageOverviewGraphComponent implements OnInit { } public sortedDatasets(datasets:WorkPackageEmbeddedGraphDataset[], params:WpGraphQueryParams[]) { - let sortingArray = params.map((x) => x.name ); + const sortingArray = params.map((x) => x.name ); return datasets.slice().sort((a, b) => { return sortingArray.indexOf(a.label) - sortingArray.indexOf(b.label); @@ -108,15 +108,15 @@ export class WorkPackageOverviewGraphComponent implements OnInit { } public get propsOpen() { - return this.baseProps({status: { operator: 'o', values: []}}); + return this.baseProps({ status: { operator: 'o', values: [] } }); } public get propsClosed() { - return this.baseProps({status: { operator: 'c', values: []}}); + return this.baseProps({ status: { operator: 'c', values: [] } }); } private baseProps(filter?:any) { - let filters = [{subprojectId: {operator: '*', values: []}}]; + const filters = [{ subprojectId: { operator: '*', values: [] } }]; if (filter) { filters.push(filter); diff --git a/frontend/src/app/modules/work_packages/notifications/work-package-notification.service.ts b/frontend/src/app/modules/work_packages/notifications/work-package-notification.service.ts index 0763255506b..ae464df1030 100644 --- a/frontend/src/app/modules/work_packages/notifications/work-package-notification.service.ts +++ b/frontend/src/app/modules/work_packages/notifications/work-package-notification.service.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable, Injector} from '@angular/core'; -import {INotification} from 'core-app/modules/common/notifications/notifications.service'; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injectable, Injector } from '@angular/core'; +import { INotification } from 'core-app/modules/common/notifications/notifications.service'; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() export class WorkPackageNotificationService extends HalResourceNotificationService { @@ -40,8 +40,8 @@ export class WorkPackageNotificationService extends HalResourceNotificationServi super(injector); } - public showSave(resource:WorkPackageResource, isCreate:boolean = false) { - let message:any = { + public showSave(resource:WorkPackageResource, isCreate = false) { + const message:any = { message: this.I18n.t('js.notice_successful_' + (isCreate ? 'create' : 'update')), }; @@ -71,7 +71,7 @@ export class WorkPackageNotificationService extends HalResourceNotificationServi // Don't show the 'Show in full screen' link if we're there already if (!this.$state.includes('work-packages.show')) { message.link = { - target: () => this.$state.go('work-packages.show.activity', {workPackageId: resource.id}), + target: () => this.$state.go('work-packages.show.activity', { workPackageId: resource.id }), text: this.I18n.t('js.work_packages.message_successful_show_in_fullscreen') }; } diff --git a/frontend/src/app/modules/work_packages/openproject-work-package-routes.module.ts b/frontend/src/app/modules/work_packages/openproject-work-package-routes.module.ts index 575b2b26226..8b89c92c25a 100644 --- a/frontend/src/app/modules/work_packages/openproject-work-package-routes.module.ts +++ b/frontend/src/app/modules/work_packages/openproject-work-package-routes.module.ts @@ -26,10 +26,10 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {UIRouterModule} from "@uirouter/angular"; -import {WORK_PACKAGES_ROUTES} from "core-app/modules/work_packages/routing/work-packages-routes"; -import {OpenprojectWorkPackagesModule} from "core-app/modules/work_packages/openproject-work-packages.module"; +import { NgModule } from '@angular/core'; +import { UIRouterModule } from "@uirouter/angular"; +import { WORK_PACKAGES_ROUTES } from "core-app/modules/work_packages/routing/work-packages-routes"; +import { OpenprojectWorkPackagesModule } from "core-app/modules/work_packages/openproject-work-packages.module"; /** * Separate module for work package routes because WP modules diff --git a/frontend/src/app/modules/work_packages/openproject-work-packages.module.ts b/frontend/src/app/modules/work_packages/openproject-work-packages.module.ts index 5d9575fc192..14411237340 100644 --- a/frontend/src/app/modules/work_packages/openproject-work-packages.module.ts +++ b/frontend/src/app/modules/work_packages/openproject-work-packages.module.ts @@ -26,150 +26,150 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injector, NgModule} from '@angular/core'; -import {OpenprojectCommonModule} from 'core-app/modules/common/openproject-common.module'; -import {OpenprojectFieldsModule} from 'core-app/modules/fields/openproject-fields.module'; -import {OpenprojectModalModule} from 'core-app/modules/modal/modal.module'; -import {HookService} from 'core-app/modules/plugins/hook-service'; +import { Injector, NgModule } from '@angular/core'; +import { OpenprojectCommonModule } from 'core-app/modules/common/openproject-common.module'; +import { OpenprojectFieldsModule } from 'core-app/modules/fields/openproject-fields.module'; +import { OpenprojectModalModule } from 'core-app/modules/modal/modal.module'; +import { HookService } from 'core-app/modules/plugins/hook-service'; import { GroupDescriptor, WorkPackageSingleViewComponent } from 'core-components/work-packages/wp-single-view/wp-single-view.component'; -import {WorkPackageFormAttributeGroupComponent} from 'core-components/wp-form-group/wp-attribute-group.component'; -import {WorkPackageEmbeddedTableComponent} from 'core-components/wp-table/embedded/wp-embedded-table.component'; -import {WorkPackageEmbeddedTableEntryComponent} from 'core-components/wp-table/embedded/wp-embedded-table-entry.component'; -import {WorkPackageTablePaginationComponent} from 'core-components/wp-table/table-pagination/wp-table-pagination.component'; -import {WpResizerDirective} from 'core-components/resizer/wp-resizer.component'; -import {WorkPackageTimelineTableController} from 'core-components/wp-table/timeline/container/wp-timeline-container.directive'; -import {WorkPackageInlineCreateComponent} from 'core-components/wp-inline-create/wp-inline-create.component'; -import {OpTypesContextMenuDirective} from 'core-components/op-context-menu/handlers/op-types-context-menu.directive'; -import {OpColumnsContextMenu} from 'core-components/op-context-menu/handlers/op-columns-context-menu.directive'; -import {OpSettingsMenuDirective} from 'core-components/op-context-menu/handlers/op-settings-dropdown-menu.directive'; -import {WorkPackageStatusDropdownDirective} from 'core-components/op-context-menu/handlers/wp-status-dropdown-menu.directive'; -import {WorkPackageCreateSettingsMenuDirective} from 'core-components/op-context-menu/handlers/wp-create-settings-menu.directive'; -import {WorkPackageSingleContextMenuDirective} from 'core-components/op-context-menu/wp-context-menu/wp-single-context-menu'; -import {WorkPackageQuerySelectDropdownComponent} from 'core-components/wp-query-select/wp-query-select-dropdown.component'; -import {WorkPackageTimelineHeaderController} from 'core-components/wp-table/timeline/header/wp-timeline-header.directive'; -import {WorkPackageTableTimelineRelations} from 'core-components/wp-table/timeline/global-elements/wp-timeline-relations.directive'; -import {WorkPackageTableTimelineStaticElements} from 'core-components/wp-table/timeline/global-elements/wp-timeline-static-elements.directive'; -import {WorkPackageTableTimelineGrid} from 'core-components/wp-table/timeline/grid/wp-timeline-grid.directive'; -import {WorkPackageTimelineButtonComponent} from 'core-components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component'; -import {WorkPackageOverviewTabComponent} from 'core-components/wp-single-view-tabs/overview-tab/overview-tab.component'; -import {WorkPackageStatusButtonComponent} from 'core-components/wp-buttons/wp-status-button/wp-status-button.component'; -import {WorkPackageReplacementLabelComponent} from 'core-components/wp-edit/wp-edit-field/wp-replacement-label.component'; -import {NewestActivityOnOverviewComponent} from 'core-components/wp-single-view-tabs/activity-panel/activity-on-overview.component'; -import {UserLinkComponent} from 'core-components/user/user-link/user-link.component'; -import {WorkPackageCommentComponent} from 'core-components/work-packages/work-package-comment/work-package-comment.component'; -import {WorkPackageCommentFieldComponent} from 'core-components/work-packages/work-package-comment/wp-comment-field.component'; -import {ActivityEntryComponent} from 'core-components/wp-activity/activity-entry.component'; -import {UserActivityComponent} from 'core-components/wp-activity/user/user-activity.component'; -import {RevisionActivityComponent} from 'core-components/wp-activity/revision/revision-activity.component'; -import {ActivityLinkComponent} from 'core-components/wp-activity/activity-link.component'; -import {WorkPackageActivityTabComponent} from 'core-components/wp-single-view-tabs/activity-panel/activity-tab.component'; -import {OpenprojectAttachmentsModule} from 'core-app/modules/attachments/openproject-attachments.module'; -import {WpCustomActionComponent} from 'core-components/wp-custom-actions/wp-custom-actions/wp-custom-action.component'; -import {WpCustomActionsComponent} from 'core-components/wp-custom-actions/wp-custom-actions.component'; -import {WorkPackageRelationsCountComponent} from 'core-components/work-packages/wp-relations-count/wp-relations-count.component'; -import {WorkPackageWatchersCountComponent} from 'core-components/work-packages/wp-relations-count/wp-watchers-count.component'; -import {WorkPackageBreadcrumbComponent} from 'core-components/work-packages/wp-breadcrumb/wp-breadcrumb.component'; -import {WorkPackageSplitViewToolbarComponent} from 'core-components/wp-details/wp-details-toolbar.component'; -import {WorkPackageWatcherButtonComponent} from 'core-components/work-packages/wp-watcher-button/wp-watcher-button.component'; -import {WorkPackageSubjectComponent} from 'core-components/work-packages/wp-subject/wp-subject.component'; -import {WorkPackageRelationsTabComponent} from 'core-components/wp-single-view-tabs/relations-tab/relations-tab.component'; -import {WorkPackageRelationsComponent} from 'core-components/wp-relations/wp-relations.component'; -import {WorkPackageRelationsGroupComponent} from 'core-components/wp-relations/wp-relations-group/wp-relations-group.component'; -import {WorkPackageRelationRowComponent} from 'core-components/wp-relations/wp-relation-row/wp-relation-row.component'; -import {WorkPackageRelationsCreateComponent} from 'core-components/wp-relations/wp-relations-create/wp-relations-create.component'; -import {WorkPackageRelationsHierarchyComponent} from 'core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive'; -import {WorkPackageCreateButtonComponent} from 'core-components/wp-buttons/wp-create-button/wp-create-button.component'; -import {WorkPackageBreadcrumbParentComponent} from 'core-components/work-packages/wp-breadcrumb/wp-breadcrumb-parent.component'; -import {WorkPackageFilterButtonComponent} from 'core-components/wp-buttons/wp-filter-button/wp-filter-button.component'; -import {WorkPackageFilterContainerComponent} from 'core-components/filters/filter-container/filter-container.directive'; -import {QueryFiltersComponent} from 'core-components/filters/query-filters/query-filters.component'; -import {QueryFilterComponent} from 'core-components/filters/query-filter/query-filter.component'; -import {FilterBooleanValueComponent} from 'core-components/filters/filter-boolean-value/filter-boolean-value.component'; -import {FilterDateValueComponent} from 'core-components/filters/filter-date-value/filter-date-value.component'; -import {FilterDatesValueComponent} from 'core-components/filters/filter-dates-value/filter-dates-value.component'; -import {FilterDateTimeValueComponent} from 'core-components/filters/filter-date-time-value/filter-date-time-value.component'; -import {FilterDateTimesValueComponent} from 'core-components/filters/filter-date-times-value/filter-date-times-value.component'; -import {FilterIntegerValueComponent} from 'core-components/filters/filter-integer-value/filter-integer-value.component'; -import {FilterStringValueComponent} from 'core-components/filters/filter-string-value/filter-string-value.component'; -import {FilterToggledMultiselectValueComponent} from 'core-components/filters/filter-toggled-multiselect-value/filter-toggled-multiselect-value.component'; -import {FilterSearchableMultiselectValueComponent} from 'core-components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component'; -import {WorkPackageDetailsViewButtonComponent} from 'core-components/wp-buttons/wp-details-view-button/wp-details-view-button.component'; -import {WorkPackageFoldToggleButtonComponent} from 'core-components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component'; -import {WpTableConfigurationModalComponent} from 'core-components/wp-table/configuration-modal/wp-table-configuration.modal'; -import {WpTableConfigurationColumnsTab} from 'core-components/wp-table/configuration-modal/tabs/columns-tab.component'; -import {WpTableConfigurationDisplaySettingsTab} from 'core-components/wp-table/configuration-modal/tabs/display-settings-tab.component'; -import {WpTableConfigurationFiltersTab} from 'core-components/wp-table/configuration-modal/tabs/filters-tab.component'; -import {WpTableConfigurationSortByTab} from 'core-components/wp-table/configuration-modal/tabs/sort-by-tab.component'; -import {WpTableConfigurationTimelinesTab} from 'core-components/wp-table/configuration-modal/tabs/timelines-tab.component'; -import {WpTableConfigurationHighlightingTab} from 'core-components/wp-table/configuration-modal/tabs/highlighting-tab.component'; -import {WpTableConfigurationRelationSelectorComponent} from "core-components/wp-table/configuration-modal/wp-table-configuration-relation-selector"; -import {WorkPackageWatchersTabComponent} from 'core-components/wp-single-view-tabs/watchers-tab/watchers-tab.component'; -import {WorkPackageWatcherEntryComponent} from 'core-components/wp-single-view-tabs/watchers-tab/wp-watcher-entry.component'; -import {WorkPackageCopyFullViewComponent} from 'core-components/wp-copy/wp-copy-full-view.component'; -import {WorkPackageCopySplitViewComponent} from 'core-components/wp-copy/wp-copy-split-view.component'; -import {WorkPackageTypeStatusComponent} from 'core-components/work-packages/wp-type-status/wp-type-status.component'; -import {WorkPackageNewSplitViewComponent} from 'core-components/wp-new/wp-new-split-view.component'; -import {WorkPackageNewFullViewComponent} from 'core-components/wp-new/wp-new-full-view.component'; -import {WpTableExportModal} from 'core-components/modals/export-modal/wp-table-export.modal'; -import {QuerySharingModal} from 'core-components/modals/share-modal/query-sharing.modal'; -import {SaveQueryModal} from 'core-components/modals/save-modal/save-query.modal'; -import {WpDestroyModal} from 'core-components/modals/wp-destroy-modal/wp-destroy.modal'; -import {QuerySharingForm} from 'core-components/modals/share-modal/query-sharing-form.component'; -import {EmbeddedTablesMacroComponent} from 'core-components/wp-table/embedded/embedded-tables-macro.component'; -import {WpButtonMacroModal} from 'core-components/modals/editor/macro-wp-button-modal/wp-button-macro.modal'; -import {OpenprojectEditorModule} from 'core-app/modules/editor/openproject-editor.module'; -import {WorkPackageTableSumsRowController} from 'core-components/wp-table/wp-table-sums-row/wp-table-sums-row.directive'; -import {ExternalQueryConfigurationComponent} from 'core-components/wp-table/external-configuration/external-query-configuration.component'; -import {ExternalQueryConfigurationService} from 'core-components/wp-table/external-configuration/external-query-configuration.service'; -import {ExternalRelationQueryConfigurationComponent} from "core-components/wp-table/external-configuration/external-relation-query-configuration.component"; -import {ExternalRelationQueryConfigurationService} from "core-components/wp-table/external-configuration/external-relation-query-configuration.service"; -import {WorkPackageStaticQueriesService} from 'core-components/wp-query-select/wp-static-queries.service'; -import {WorkPackagesListInvalidQueryService} from 'core-components/wp-list/wp-list-invalid-query.service'; -import {SchemaCacheService} from 'core-components/schemas/schema-cache.service'; -import {WorkPackageWatchersService} from 'core-components/wp-single-view-tabs/watchers-tab/wp-watchers.service'; -import {WorkPackagesActivityService} from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageChildrenQueryComponent} from "core-components/wp-relations/embedded/children/wp-children-query.component"; -import {WpRelationInlineAddExistingComponent} from "core-components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component"; -import {WorkPackageRelationQueryComponent} from "core-components/wp-relations/embedded/relations/wp-relation-query.component"; -import {WorkPackagesBaseComponent} from "core-app/modules/work_packages/routing/wp-base/wp--base.component"; -import {WorkPackageSplitViewComponent} from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; -import {WorkPackagesFullViewComponent} from "core-app/modules/work_packages/routing/wp-full-view/wp-full-view.component"; -import {AttachmentsUploadComponent} from 'core-app/modules/attachments/attachments-upload/attachments-upload.component'; -import {AttachmentListComponent} from 'core-app/modules/attachments/attachment-list/attachment-list.component'; -import {WorkPackageFilterByTextInputComponent} from "core-components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component"; -import {QueryFiltersService} from "core-components/wp-query/query-filters.service"; -import {WorkPackageCardViewComponent} from "core-components/wp-card-view/wp-card-view.component"; -import {WorkPackageIsolatedQuerySpaceDirective} from "core-app/modules/work_packages/query-space/wp-isolated-query-space.directive"; -import {WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; -import {OpenprojectBcfModule} from "core-app/modules/bim/bcf/openproject-bcf.module"; -import {WorkPackageRelationsAutocomplete} from "core-components/wp-relations/wp-relations-create/wp-relations-autocomplete/wp-relations-autocomplete.component"; -import {CustomDateActionAdminComponent} from 'core-components/wp-custom-actions/date-action/custom-date-action-admin.component'; -import {WorkPackagesTableConfigMenu} from "core-components/wp-table/config-menu/config-menu.component"; -import {WorkPackageIsolatedGraphQuerySpaceDirective} from "core-app/modules/work_packages/query-space/wp-isolated-graph-query-space.directive"; -import {WorkPackageViewToggleButton} from "core-components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component"; -import {WorkPackagesGridComponent} from "core-components/wp-grid/wp-grid.component"; -import {WorkPackageViewDropdownMenuDirective} from "core-components/op-context-menu/handlers/wp-view-dropdown-menu.directive"; -import {HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {OpenprojectProjectsModule} from "core-app/modules/projects/openproject-projects.module"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {WorkPackageEditActionsBarComponent} from "core-app/modules/common/edit-actions-bar/wp-edit-actions-bar.component"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {WorkPackageChangeset} from "core-components/wp-edit/work-package-changeset"; -import {WorkPackageSingleCardComponent} from "core-components/wp-card-view/wp-single-card/wp-single-card.component"; -import {TimeEntryChangeset} from 'core-app/components/time-entries/time-entry-changeset'; -import {WorkPackageListViewComponent} from "core-app/modules/work_packages/routing/wp-list-view/wp-list-view.component"; -import {PartitionedQuerySpacePageComponent} from "core-app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component"; -import {WorkPackageViewPageComponent} from "core-app/modules/work_packages/routing/wp-view-page/wp-view-page.component"; -import {WorkPackageSettingsButtonComponent} from "core-components/wp-buttons/wp-settings-button/wp-settings-button.component"; -import {BackButtonComponent} from "core-app/modules/common/back-routing/back-button.component"; -import {DatePickerModal} from "core-components/datepicker/datepicker.modal"; -import {WorkPackagesTableComponent} from "core-components/wp-table/wp-table.component"; -import {WorkPackageGroupToggleDropdownMenuDirective} from "core-components/op-context-menu/handlers/wp-group-toggle-dropdown-menu.directive"; -import {OpenprojectAutocompleterModule} from "core-app/modules/autocompleter/openproject-autocompleter.module"; +import { WorkPackageFormAttributeGroupComponent } from 'core-components/wp-form-group/wp-attribute-group.component'; +import { WorkPackageEmbeddedTableComponent } from 'core-components/wp-table/embedded/wp-embedded-table.component'; +import { WorkPackageEmbeddedTableEntryComponent } from 'core-components/wp-table/embedded/wp-embedded-table-entry.component'; +import { WorkPackageTablePaginationComponent } from 'core-components/wp-table/table-pagination/wp-table-pagination.component'; +import { WpResizerDirective } from 'core-components/resizer/wp-resizer.component'; +import { WorkPackageTimelineTableController } from 'core-components/wp-table/timeline/container/wp-timeline-container.directive'; +import { WorkPackageInlineCreateComponent } from 'core-components/wp-inline-create/wp-inline-create.component'; +import { OpTypesContextMenuDirective } from 'core-components/op-context-menu/handlers/op-types-context-menu.directive'; +import { OpColumnsContextMenu } from 'core-components/op-context-menu/handlers/op-columns-context-menu.directive'; +import { OpSettingsMenuDirective } from 'core-components/op-context-menu/handlers/op-settings-dropdown-menu.directive'; +import { WorkPackageStatusDropdownDirective } from 'core-components/op-context-menu/handlers/wp-status-dropdown-menu.directive'; +import { WorkPackageCreateSettingsMenuDirective } from 'core-components/op-context-menu/handlers/wp-create-settings-menu.directive'; +import { WorkPackageSingleContextMenuDirective } from 'core-components/op-context-menu/wp-context-menu/wp-single-context-menu'; +import { WorkPackageQuerySelectDropdownComponent } from 'core-components/wp-query-select/wp-query-select-dropdown.component'; +import { WorkPackageTimelineHeaderController } from 'core-components/wp-table/timeline/header/wp-timeline-header.directive'; +import { WorkPackageTableTimelineRelations } from 'core-components/wp-table/timeline/global-elements/wp-timeline-relations.directive'; +import { WorkPackageTableTimelineStaticElements } from 'core-components/wp-table/timeline/global-elements/wp-timeline-static-elements.directive'; +import { WorkPackageTableTimelineGrid } from 'core-components/wp-table/timeline/grid/wp-timeline-grid.directive'; +import { WorkPackageTimelineButtonComponent } from 'core-components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component'; +import { WorkPackageOverviewTabComponent } from 'core-components/wp-single-view-tabs/overview-tab/overview-tab.component'; +import { WorkPackageStatusButtonComponent } from 'core-components/wp-buttons/wp-status-button/wp-status-button.component'; +import { WorkPackageReplacementLabelComponent } from 'core-components/wp-edit/wp-edit-field/wp-replacement-label.component'; +import { NewestActivityOnOverviewComponent } from 'core-components/wp-single-view-tabs/activity-panel/activity-on-overview.component'; +import { UserLinkComponent } from 'core-components/user/user-link/user-link.component'; +import { WorkPackageCommentComponent } from 'core-components/work-packages/work-package-comment/work-package-comment.component'; +import { WorkPackageCommentFieldComponent } from 'core-components/work-packages/work-package-comment/wp-comment-field.component'; +import { ActivityEntryComponent } from 'core-components/wp-activity/activity-entry.component'; +import { UserActivityComponent } from 'core-components/wp-activity/user/user-activity.component'; +import { RevisionActivityComponent } from 'core-components/wp-activity/revision/revision-activity.component'; +import { ActivityLinkComponent } from 'core-components/wp-activity/activity-link.component'; +import { WorkPackageActivityTabComponent } from 'core-components/wp-single-view-tabs/activity-panel/activity-tab.component'; +import { OpenprojectAttachmentsModule } from 'core-app/modules/attachments/openproject-attachments.module'; +import { WpCustomActionComponent } from 'core-components/wp-custom-actions/wp-custom-actions/wp-custom-action.component'; +import { WpCustomActionsComponent } from 'core-components/wp-custom-actions/wp-custom-actions.component'; +import { WorkPackageRelationsCountComponent } from 'core-components/work-packages/wp-relations-count/wp-relations-count.component'; +import { WorkPackageWatchersCountComponent } from 'core-components/work-packages/wp-relations-count/wp-watchers-count.component'; +import { WorkPackageBreadcrumbComponent } from 'core-components/work-packages/wp-breadcrumb/wp-breadcrumb.component'; +import { WorkPackageSplitViewToolbarComponent } from 'core-components/wp-details/wp-details-toolbar.component'; +import { WorkPackageWatcherButtonComponent } from 'core-components/work-packages/wp-watcher-button/wp-watcher-button.component'; +import { WorkPackageSubjectComponent } from 'core-components/work-packages/wp-subject/wp-subject.component'; +import { WorkPackageRelationsTabComponent } from 'core-components/wp-single-view-tabs/relations-tab/relations-tab.component'; +import { WorkPackageRelationsComponent } from 'core-components/wp-relations/wp-relations.component'; +import { WorkPackageRelationsGroupComponent } from 'core-components/wp-relations/wp-relations-group/wp-relations-group.component'; +import { WorkPackageRelationRowComponent } from 'core-components/wp-relations/wp-relation-row/wp-relation-row.component'; +import { WorkPackageRelationsCreateComponent } from 'core-components/wp-relations/wp-relations-create/wp-relations-create.component'; +import { WorkPackageRelationsHierarchyComponent } from 'core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.directive'; +import { WorkPackageCreateButtonComponent } from 'core-components/wp-buttons/wp-create-button/wp-create-button.component'; +import { WorkPackageBreadcrumbParentComponent } from 'core-components/work-packages/wp-breadcrumb/wp-breadcrumb-parent.component'; +import { WorkPackageFilterButtonComponent } from 'core-components/wp-buttons/wp-filter-button/wp-filter-button.component'; +import { WorkPackageFilterContainerComponent } from 'core-components/filters/filter-container/filter-container.directive'; +import { QueryFiltersComponent } from 'core-components/filters/query-filters/query-filters.component'; +import { QueryFilterComponent } from 'core-components/filters/query-filter/query-filter.component'; +import { FilterBooleanValueComponent } from 'core-components/filters/filter-boolean-value/filter-boolean-value.component'; +import { FilterDateValueComponent } from 'core-components/filters/filter-date-value/filter-date-value.component'; +import { FilterDatesValueComponent } from 'core-components/filters/filter-dates-value/filter-dates-value.component'; +import { FilterDateTimeValueComponent } from 'core-components/filters/filter-date-time-value/filter-date-time-value.component'; +import { FilterDateTimesValueComponent } from 'core-components/filters/filter-date-times-value/filter-date-times-value.component'; +import { FilterIntegerValueComponent } from 'core-components/filters/filter-integer-value/filter-integer-value.component'; +import { FilterStringValueComponent } from 'core-components/filters/filter-string-value/filter-string-value.component'; +import { FilterToggledMultiselectValueComponent } from 'core-components/filters/filter-toggled-multiselect-value/filter-toggled-multiselect-value.component'; +import { FilterSearchableMultiselectValueComponent } from 'core-components/filters/filter-searchable-multiselect-value/filter-searchable-multiselect-value.component'; +import { WorkPackageDetailsViewButtonComponent } from 'core-components/wp-buttons/wp-details-view-button/wp-details-view-button.component'; +import { WorkPackageFoldToggleButtonComponent } from 'core-components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component'; +import { WpTableConfigurationModalComponent } from 'core-components/wp-table/configuration-modal/wp-table-configuration.modal'; +import { WpTableConfigurationColumnsTab } from 'core-components/wp-table/configuration-modal/tabs/columns-tab.component'; +import { WpTableConfigurationDisplaySettingsTab } from 'core-components/wp-table/configuration-modal/tabs/display-settings-tab.component'; +import { WpTableConfigurationFiltersTab } from 'core-components/wp-table/configuration-modal/tabs/filters-tab.component'; +import { WpTableConfigurationSortByTab } from 'core-components/wp-table/configuration-modal/tabs/sort-by-tab.component'; +import { WpTableConfigurationTimelinesTab } from 'core-components/wp-table/configuration-modal/tabs/timelines-tab.component'; +import { WpTableConfigurationHighlightingTab } from 'core-components/wp-table/configuration-modal/tabs/highlighting-tab.component'; +import { WpTableConfigurationRelationSelectorComponent } from "core-components/wp-table/configuration-modal/wp-table-configuration-relation-selector"; +import { WorkPackageWatchersTabComponent } from 'core-components/wp-single-view-tabs/watchers-tab/watchers-tab.component'; +import { WorkPackageWatcherEntryComponent } from 'core-components/wp-single-view-tabs/watchers-tab/wp-watcher-entry.component'; +import { WorkPackageCopyFullViewComponent } from 'core-components/wp-copy/wp-copy-full-view.component'; +import { WorkPackageCopySplitViewComponent } from 'core-components/wp-copy/wp-copy-split-view.component'; +import { WorkPackageTypeStatusComponent } from 'core-components/work-packages/wp-type-status/wp-type-status.component'; +import { WorkPackageNewSplitViewComponent } from 'core-components/wp-new/wp-new-split-view.component'; +import { WorkPackageNewFullViewComponent } from 'core-components/wp-new/wp-new-full-view.component'; +import { WpTableExportModal } from 'core-components/modals/export-modal/wp-table-export.modal'; +import { QuerySharingModal } from 'core-components/modals/share-modal/query-sharing.modal'; +import { SaveQueryModal } from 'core-components/modals/save-modal/save-query.modal'; +import { WpDestroyModal } from 'core-components/modals/wp-destroy-modal/wp-destroy.modal'; +import { QuerySharingForm } from 'core-components/modals/share-modal/query-sharing-form.component'; +import { EmbeddedTablesMacroComponent } from 'core-components/wp-table/embedded/embedded-tables-macro.component'; +import { WpButtonMacroModal } from 'core-components/modals/editor/macro-wp-button-modal/wp-button-macro.modal'; +import { OpenprojectEditorModule } from 'core-app/modules/editor/openproject-editor.module'; +import { WorkPackageTableSumsRowController } from 'core-components/wp-table/wp-table-sums-row/wp-table-sums-row.directive'; +import { ExternalQueryConfigurationComponent } from 'core-components/wp-table/external-configuration/external-query-configuration.component'; +import { ExternalQueryConfigurationService } from 'core-components/wp-table/external-configuration/external-query-configuration.service'; +import { ExternalRelationQueryConfigurationComponent } from "core-components/wp-table/external-configuration/external-relation-query-configuration.component"; +import { ExternalRelationQueryConfigurationService } from "core-components/wp-table/external-configuration/external-relation-query-configuration.service"; +import { WorkPackageStaticQueriesService } from 'core-components/wp-query-select/wp-static-queries.service'; +import { WorkPackagesListInvalidQueryService } from 'core-components/wp-list/wp-list-invalid-query.service'; +import { SchemaCacheService } from 'core-components/schemas/schema-cache.service'; +import { WorkPackageWatchersService } from 'core-components/wp-single-view-tabs/watchers-tab/wp-watchers.service'; +import { WorkPackagesActivityService } from 'core-components/wp-single-view-tabs/activity-panel/wp-activity.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageChildrenQueryComponent } from "core-components/wp-relations/embedded/children/wp-children-query.component"; +import { WpRelationInlineAddExistingComponent } from "core-components/wp-relations/embedded/inline/add-existing/wp-relation-inline-add-existing.component"; +import { WorkPackageRelationQueryComponent } from "core-components/wp-relations/embedded/relations/wp-relation-query.component"; +import { WorkPackagesBaseComponent } from "core-app/modules/work_packages/routing/wp-base/wp--base.component"; +import { WorkPackageSplitViewComponent } from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; +import { WorkPackagesFullViewComponent } from "core-app/modules/work_packages/routing/wp-full-view/wp-full-view.component"; +import { AttachmentsUploadComponent } from 'core-app/modules/attachments/attachments-upload/attachments-upload.component'; +import { AttachmentListComponent } from 'core-app/modules/attachments/attachment-list/attachment-list.component'; +import { WorkPackageFilterByTextInputComponent } from "core-components/filters/quick-filter-by-text-input/quick-filter-by-text-input.component"; +import { QueryFiltersService } from "core-components/wp-query/query-filters.service"; +import { WorkPackageCardViewComponent } from "core-components/wp-card-view/wp-card-view.component"; +import { WorkPackageIsolatedQuerySpaceDirective } from "core-app/modules/work_packages/query-space/wp-isolated-query-space.directive"; +import { WorkPackageRelationsService } from "core-components/wp-relations/wp-relations.service"; +import { OpenprojectBcfModule } from "core-app/modules/bim/bcf/openproject-bcf.module"; +import { WorkPackageRelationsAutocomplete } from "core-components/wp-relations/wp-relations-create/wp-relations-autocomplete/wp-relations-autocomplete.component"; +import { CustomDateActionAdminComponent } from 'core-components/wp-custom-actions/date-action/custom-date-action-admin.component'; +import { WorkPackagesTableConfigMenu } from "core-components/wp-table/config-menu/config-menu.component"; +import { WorkPackageIsolatedGraphQuerySpaceDirective } from "core-app/modules/work_packages/query-space/wp-isolated-graph-query-space.directive"; +import { WorkPackageViewToggleButton } from "core-components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component"; +import { WorkPackagesGridComponent } from "core-components/wp-grid/wp-grid.component"; +import { WorkPackageViewDropdownMenuDirective } from "core-components/op-context-menu/handlers/wp-view-dropdown-menu.directive"; +import { HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { OpenprojectProjectsModule } from "core-app/modules/projects/openproject-projects.module"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { WorkPackageEditActionsBarComponent } from "core-app/modules/common/edit-actions-bar/wp-edit-actions-bar.component"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { WorkPackageChangeset } from "core-components/wp-edit/work-package-changeset"; +import { WorkPackageSingleCardComponent } from "core-components/wp-card-view/wp-single-card/wp-single-card.component"; +import { TimeEntryChangeset } from 'core-app/components/time-entries/time-entry-changeset'; +import { WorkPackageListViewComponent } from "core-app/modules/work_packages/routing/wp-list-view/wp-list-view.component"; +import { PartitionedQuerySpacePageComponent } from "core-app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component"; +import { WorkPackageViewPageComponent } from "core-app/modules/work_packages/routing/wp-view-page/wp-view-page.component"; +import { WorkPackageSettingsButtonComponent } from "core-components/wp-buttons/wp-settings-button/wp-settings-button.component"; +import { BackButtonComponent } from "core-app/modules/common/back-routing/back-button.component"; +import { DatePickerModal } from "core-components/datepicker/datepicker.modal"; +import { WorkPackagesTableComponent } from "core-components/wp-table/wp-table.component"; +import { WorkPackageGroupToggleDropdownMenuDirective } from "core-components/op-context-menu/handlers/wp-group-toggle-dropdown-menu.directive"; +import { OpenprojectAutocompleterModule } from "core-app/modules/autocompleter/openproject-autocompleter.module"; @NgModule({ imports: [ @@ -463,12 +463,12 @@ export class OpenprojectWorkPackagesModule { /** Return specialized work package changeset for editing service */ hookService.register('halResourceChangesetClass', (resource:HalResource) => { switch (resource._type) { - case 'WorkPackage': - return WorkPackageChangeset; - case 'TimeEntry': - return TimeEntryChangeset; - default: - return null; + case 'WorkPackage': + return WorkPackageChangeset; + case 'TimeEntry': + return TimeEntryChangeset; + default: + return null; } }); } diff --git a/frontend/src/app/modules/work_packages/query-space/isolated-graph-query-space.ts b/frontend/src/app/modules/work_packages/query-space/isolated-graph-query-space.ts index 2840b0f94c3..cb83c00910a 100644 --- a/frontend/src/app/modules/work_packages/query-space/isolated-graph-query-space.ts +++ b/frontend/src/app/modules/work_packages/query-space/isolated-graph-query-space.ts @@ -1,7 +1,7 @@ -import {Injectable} from '@angular/core'; -import {input} from 'reactivestates'; -import {ChartType} from 'chart.js'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable } from '@angular/core'; +import { input } from 'reactivestates'; +import { ChartType } from 'chart.js'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; @Injectable() export class IsolatedGraphQuerySpace extends IsolatedQuerySpace { diff --git a/frontend/src/app/modules/work_packages/query-space/isolated-query-space.ts b/frontend/src/app/modules/work_packages/query-space/isolated-query-space.ts index fc471a6b792..463fd2a4cdd 100644 --- a/frontend/src/app/modules/work_packages/query-space/isolated-query-space.ts +++ b/frontend/src/app/modules/work_packages/query-space/isolated-query-space.ts @@ -1,12 +1,12 @@ -import {derive, input, InputState, State, StatesGroup} from 'reactivestates'; -import {Subject} from 'rxjs'; -import {Injectable} from '@angular/core'; -import {map} from 'rxjs/operators'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {GroupObject, WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {QueryFormResource} from "core-app/modules/hal/resources/query-form-resource"; -import {QueryColumn} from "core-components/wp-query/query-column"; -import {RenderedWorkPackage} from "core-app/modules/work_packages/render-info/rendered-work-package.type"; +import { derive, input, InputState, State, StatesGroup } from 'reactivestates'; +import { Subject } from 'rxjs'; +import { Injectable } from '@angular/core'; +import { map } from 'rxjs/operators'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { GroupObject, WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { QueryFormResource } from "core-app/modules/hal/resources/query-form-resource"; +import { QueryColumn } from "core-components/wp-query/query-column"; +import { RenderedWorkPackage } from "core-app/modules/work_packages/render-info/rendered-work-package.type"; @Injectable() export class IsolatedQuerySpace extends StatesGroup { diff --git a/frontend/src/app/modules/work_packages/query-space/wp-isolated-graph-query-space.directive.ts b/frontend/src/app/modules/work_packages/query-space/wp-isolated-graph-query-space.directive.ts index 09e2bd862e0..2df547b2f19 100644 --- a/frontend/src/app/modules/work_packages/query-space/wp-isolated-graph-query-space.directive.ts +++ b/frontend/src/app/modules/work_packages/query-space/wp-isolated-graph-query-space.directive.ts @@ -26,39 +26,39 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Directive} from '@angular/core'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {OpTableActionsService} from "core-components/wp-table/table-actions/table-actions.service"; -import {WorkPackageViewRelationColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {WorkPackageViewPaginationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; -import {WorkPackageViewGroupByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {WorkPackageViewSumService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; -import {WorkPackageViewAdditionalElementsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service"; -import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; -import {WorkPackageCreateService} from "core-components/wp-new/wp-create.service"; -import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service"; -import {WorkPackageViewFocusService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; +import { Directive } from '@angular/core'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { OpTableActionsService } from "core-components/wp-table/table-actions/table-actions.service"; +import { WorkPackageViewRelationColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; +import { WorkPackageViewPaginationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; +import { WorkPackageViewGroupByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { WorkPackageViewSumService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; +import { WorkPackageViewAdditionalElementsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service"; +import { WorkPackageViewHighlightingService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; +import { WorkPackageCreateService } from "core-components/wp-new/wp-create.service"; +import { WorkPackageStatesInitializationService } from "core-components/wp-list/wp-states-initialization.service"; +import { WorkPackageViewFocusService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; -import {WorkPackageService} from "core-components/work-packages/work-package.service"; -import {WorkPackageRelationsHierarchyService} from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; -import {WorkPackageFiltersService} from "core-components/filters/wp-filters/wp-filters.service"; -import {WorkPackageContextMenuHelperService} from "core-components/wp-table/context-menu-helper/wp-context-menu-helper.service"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {WpChildrenInlineCreateService} from "core-components/wp-relations/embedded/children/wp-children-inline-create.service"; -import {WpRelationInlineCreateService} from "core-components/wp-relations/embedded/relations/wp-relation-inline-create.service"; -import {WorkPackagesListChecksumService} from "core-components/wp-list/wp-list-checksum.service"; -import {TableDragActionsRegistryService} from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service"; -import {IsolatedGraphQuerySpace} from "core-app/modules/work_packages/query-space/isolated-graph-query-space"; -import {WorkPackageIsolatedQuerySpaceDirective} from "core-app/modules/work_packages/query-space/wp-isolated-query-space.directive"; -import {WorkPackageViewHierarchyIdentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackagesListService } from "core-components/wp-list/wp-list.service"; +import { WorkPackageService } from "core-components/work-packages/work-package.service"; +import { WorkPackageRelationsHierarchyService } from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; +import { WorkPackageFiltersService } from "core-components/filters/wp-filters/wp-filters.service"; +import { WorkPackageContextMenuHelperService } from "core-components/wp-table/context-menu-helper/wp-context-menu-helper.service"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { WpChildrenInlineCreateService } from "core-components/wp-relations/embedded/children/wp-children-inline-create.service"; +import { WpRelationInlineCreateService } from "core-components/wp-relations/embedded/relations/wp-relation-inline-create.service"; +import { WorkPackagesListChecksumService } from "core-components/wp-list/wp-list-checksum.service"; +import { TableDragActionsRegistryService } from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service"; +import { IsolatedGraphQuerySpace } from "core-app/modules/work_packages/query-space/isolated-graph-query-space"; +import { WorkPackageIsolatedQuerySpaceDirective } from "core-app/modules/work_packages/query-space/wp-isolated-query-space.directive"; +import { WorkPackageViewHierarchyIdentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; export const WpIsolatedGraphQuerySpaceProviders = [ // Open the isolated space first, order is important here diff --git a/frontend/src/app/modules/work_packages/query-space/wp-isolated-query-space.directive.ts b/frontend/src/app/modules/work_packages/query-space/wp-isolated-query-space.directive.ts index 236b042d8b1..66f6c2de9de 100644 --- a/frontend/src/app/modules/work_packages/query-space/wp-isolated-query-space.directive.ts +++ b/frontend/src/app/modules/work_packages/query-space/wp-isolated-query-space.directive.ts @@ -26,46 +26,46 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Directive, ElementRef, Injector} from '@angular/core'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {OpTableActionsService} from "core-components/wp-table/table-actions/table-actions.service"; -import {WorkPackageViewRelationColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; -import {WorkPackageViewPaginationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; -import {WorkPackageViewGroupByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {WorkPackageViewSumService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; -import {WorkPackageViewAdditionalElementsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service"; -import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; -import {WorkPackageCreateService} from "core-components/wp-new/wp-create.service"; -import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service"; -import {WorkPackageViewFocusService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; +import { Directive, ElementRef, Injector } from '@angular/core'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { OpTableActionsService } from "core-components/wp-table/table-actions/table-actions.service"; +import { WorkPackageViewRelationColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service"; +import { WorkPackageViewPaginationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; +import { WorkPackageViewGroupByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { WorkPackageViewSumService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; +import { WorkPackageViewAdditionalElementsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service"; +import { WorkPackageViewHighlightingService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; +import { WorkPackageCreateService } from "core-components/wp-new/wp-create.service"; +import { WorkPackageStatesInitializationService } from "core-components/wp-list/wp-states-initialization.service"; +import { WorkPackageViewFocusService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; -import {WorkPackageService} from "core-components/work-packages/work-package.service"; -import {WorkPackageRelationsHierarchyService} from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; -import {WorkPackageFiltersService} from "core-components/filters/wp-filters/wp-filters.service"; -import {WorkPackageContextMenuHelperService} from "core-components/wp-table/context-menu-helper/wp-context-menu-helper.service"; -import {WorkPackageInlineCreateService} from "core-components/wp-inline-create/wp-inline-create.service"; -import {WpChildrenInlineCreateService} from "core-components/wp-relations/embedded/children/wp-children-inline-create.service"; -import {WpRelationInlineCreateService} from "core-components/wp-relations/embedded/relations/wp-relation-inline-create.service"; -import {WorkPackagesListChecksumService} from "core-components/wp-list/wp-list-checksum.service"; -import {debugLog} from "core-app/helpers/debug_output"; -import {TableDragActionsRegistryService} from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service"; -import {WorkPackageViewOrderService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; -import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; -import {WorkPackageCardViewService} from "core-components/wp-card-view/services/wp-card-view.service"; -import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {WorkPackageViewHierarchyIdentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {TimeEntryCreateService} from "core-app/modules/time_entries/create/create.service"; -import {WorkPackageViewCollapsedGroupsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackagesListService } from "core-components/wp-list/wp-list.service"; +import { WorkPackageService } from "core-components/work-packages/work-package.service"; +import { WorkPackageRelationsHierarchyService } from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; +import { WorkPackageFiltersService } from "core-components/filters/wp-filters/wp-filters.service"; +import { WorkPackageContextMenuHelperService } from "core-components/wp-table/context-menu-helper/wp-context-menu-helper.service"; +import { WorkPackageInlineCreateService } from "core-components/wp-inline-create/wp-inline-create.service"; +import { WpChildrenInlineCreateService } from "core-components/wp-relations/embedded/children/wp-children-inline-create.service"; +import { WpRelationInlineCreateService } from "core-components/wp-relations/embedded/relations/wp-relation-inline-create.service"; +import { WorkPackagesListChecksumService } from "core-components/wp-list/wp-list-checksum.service"; +import { debugLog } from "core-app/helpers/debug_output"; +import { TableDragActionsRegistryService } from "core-components/wp-table/drag-and-drop/actions/table-drag-actions-registry.service"; +import { WorkPackageViewOrderService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; +import { CausedUpdatesService } from "core-app/modules/boards/board/caused-updates/caused-updates.service"; +import { WorkPackageCardViewService } from "core-components/wp-card-view/services/wp-card-view.service"; +import { WorkPackageViewDisplayRepresentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; +import { WorkPackageViewHierarchyIdentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { TimeEntryCreateService } from "core-app/modules/time_entries/create/create.service"; +import { WorkPackageViewCollapsedGroupsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service"; /** * Directive to open a work package query 'space', an isolated injector hierarchy diff --git a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts index 4881d62895b..6170a7758e9 100644 --- a/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts +++ b/frontend/src/app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.ts @@ -26,21 +26,21 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component, OnDestroy, OnInit} from "@angular/core"; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {OpTitleService} from "core-components/html/op-title.service"; -import {WorkPackagesViewBase} from "core-app/modules/work_packages/routing/wp-view-base/work-packages-view.base"; -import {take} from "rxjs/operators"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {ComponentType} from "@angular/cdk/overlay"; -import {Ng2StateDeclaration} from "@uirouter/angular"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageFilterContainerComponent} from "core-components/filters/filter-container/filter-container.directive"; -import {OpModalService} from 'core-app/modules/modal/modal.service'; -import {InviteUserModalComponent} from 'core-app/modules/invite-user-modal/invite-user.component'; +import { ChangeDetectionStrategy, Component, OnDestroy, OnInit } from "@angular/core"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { OpTitleService } from "core-components/html/op-title.service"; +import { WorkPackagesViewBase } from "core-app/modules/work_packages/routing/wp-view-base/work-packages-view.base"; +import { take } from "rxjs/operators"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { QueryParamListenerService } from "core-components/wp-query/query-param-listener.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { ComponentType } from "@angular/cdk/overlay"; +import { Ng2StateDeclaration } from "@uirouter/angular"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageFilterContainerComponent } from "core-components/filters/filter-container/filter-container.directive"; +import { OpModalService } from 'core-app/modules/modal/modal.service'; +import { InviteUserModalComponent } from 'core-app/modules/invite-user-modal/invite-user.component'; export interface DynamicComponentDefinition { component:ComponentType; @@ -101,7 +101,7 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp toolbarButtonComponents:ToolbarButtonComponentDefinition[] = []; /** Whether filtering is allowed */ - filterAllowed:boolean = true; + filterAllowed = true; /** We need to pass the correct partition state to the view to manage the grid */ currentPartition:ViewPartitionState = '-split'; @@ -141,9 +141,9 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp this.untilDestroyed() ).subscribe(() => { /** Ensure we reload the query from the changed props */ - this.currentQuery = undefined; - this.refresh(true, true); - }); + this.currentQuery = undefined; + this.refresh(true, true); + }); // Update title on entering this state this.unRegisterTitleListener = this.$transitions.onSuccess({}, () => { @@ -235,14 +235,14 @@ export class PartitionedQuerySpacePageComponent extends WorkPackagesViewBase imp } } - refresh(visibly:boolean = false, firstPage:boolean = false):Promise { + refresh(visibly = false, firstPage = false):Promise { let promise:Promise; - let query = this.currentQuery; + const query = this.currentQuery; if (firstPage || !query) { promise = this.loadFirstPage(); } else { - let pagination = this.wpListService.getPaginationInfo(); + const pagination = this.wpListService.getPaginationInfo(); promise = this.wpListService .loadQueryFromExisting(query, pagination, this.projectIdentifier) .toPromise(); diff --git a/frontend/src/app/modules/work_packages/routing/split-view-routes.helper.ts b/frontend/src/app/modules/work_packages/routing/split-view-routes.helper.ts index b2f5d0d8fec..8cc73c3348c 100644 --- a/frontend/src/app/modules/work_packages/routing/split-view-routes.helper.ts +++ b/frontend/src/app/modules/work_packages/routing/split-view-routes.helper.ts @@ -26,7 +26,7 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {StateService} from "@uirouter/angular"; +import { StateService } from "@uirouter/angular"; /** * Returns the path to the split view based on the current route diff --git a/frontend/src/app/modules/work_packages/routing/split-view-routes.template.ts b/frontend/src/app/modules/work_packages/routing/split-view-routes.template.ts index 4012c7b0134..ae4d2d6eaff 100644 --- a/frontend/src/app/modules/work_packages/routing/split-view-routes.template.ts +++ b/frontend/src/app/modules/work_packages/routing/split-view-routes.template.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageOverviewTabComponent} from 'core-components/wp-single-view-tabs/overview-tab/overview-tab.component'; -import {WorkPackageActivityTabComponent} from 'core-components/wp-single-view-tabs/activity-panel/activity-tab.component'; -import {WorkPackageRelationsTabComponent} from 'core-components/wp-single-view-tabs/relations-tab/relations-tab.component'; -import {WorkPackageWatchersTabComponent} from 'core-components/wp-single-view-tabs/watchers-tab/watchers-tab.component'; -import {WorkPackageNewSplitViewComponent} from 'core-components/wp-new/wp-new-split-view.component'; -import {Ng2StateDeclaration} from "@uirouter/angular"; -import {ComponentType} from "@angular/cdk/overlay"; -import {WorkPackageCopySplitViewComponent} from "core-components/wp-copy/wp-copy-split-view.component"; +import { WorkPackageOverviewTabComponent } from 'core-components/wp-single-view-tabs/overview-tab/overview-tab.component'; +import { WorkPackageActivityTabComponent } from 'core-components/wp-single-view-tabs/activity-panel/activity-tab.component'; +import { WorkPackageRelationsTabComponent } from 'core-components/wp-single-view-tabs/relations-tab/relations-tab.component'; +import { WorkPackageWatchersTabComponent } from 'core-components/wp-single-view-tabs/watchers-tab/watchers-tab.component'; +import { WorkPackageNewSplitViewComponent } from 'core-components/wp-new/wp-new-split-view.component'; +import { Ng2StateDeclaration } from "@uirouter/angular"; +import { ComponentType } from "@angular/cdk/overlay"; +import { WorkPackageCopySplitViewComponent } from "core-components/wp-copy/wp-copy-split-view.component"; /** * Return a set of routes for a split view mounted under the given base route, @@ -55,15 +55,15 @@ import {WorkPackageCopySplitViewComponent} from "core-components/wp-copy/wp-copy * @param showComponent The split view component to mount */ export function makeSplitViewRoutes(baseRoute:string, - menuItemClass:string|undefined, - showComponent:ComponentType, - newComponent:ComponentType = WorkPackageNewSplitViewComponent, - makeFullWidth?:boolean, - routeName = baseRoute):Ng2StateDeclaration[] { + menuItemClass:string|undefined, + showComponent:ComponentType, + newComponent:ComponentType = WorkPackageNewSplitViewComponent, + makeFullWidth?:boolean, + routeName = baseRoute):Ng2StateDeclaration[] { // makeFullWidth configuration const views:any = makeFullWidth ? - {'content-left@^.^': { component: showComponent }} : - {'content-right@^.^': { component: showComponent }}; + { 'content-left@^.^': { component: showComponent } } : + { 'content-right@^.^': { component: showComponent } }; const partition = makeFullWidth ? '-left-only' : '-split'; return [ diff --git a/frontend/src/app/modules/work_packages/routing/work-packages-routes.ts b/frontend/src/app/modules/work_packages/routing/work-packages-routes.ts index 46edc703b6d..878f32a435a 100644 --- a/frontend/src/app/modules/work_packages/routing/work-packages-routes.ts +++ b/frontend/src/app/modules/work_packages/routing/work-packages-routes.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageActivityTabComponent} from 'core-components/wp-single-view-tabs/activity-panel/activity-tab.component'; -import {WorkPackageRelationsTabComponent} from 'core-components/wp-single-view-tabs/relations-tab/relations-tab.component'; -import {WorkPackageWatchersTabComponent} from 'core-components/wp-single-view-tabs/watchers-tab/watchers-tab.component'; -import {WorkPackageNewFullViewComponent} from 'core-components/wp-new/wp-new-full-view.component'; -import {WorkPackageCopyFullViewComponent} from 'core-components/wp-copy/wp-copy-full-view.component'; -import {WorkPackagesFullViewComponent} from "core-app/modules/work_packages/routing/wp-full-view/wp-full-view.component"; -import {WorkPackageSplitViewComponent} from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; -import {Ng2StateDeclaration} from "@uirouter/angular"; -import {WorkPackagesBaseComponent} from "core-app/modules/work_packages/routing/wp-base/wp--base.component"; -import {WorkPackageListViewComponent} from "core-app/modules/work_packages/routing/wp-list-view/wp-list-view.component"; -import {WorkPackageViewPageComponent} from "core-app/modules/work_packages/routing/wp-view-page/wp-view-page.component"; -import {makeSplitViewRoutes} from "core-app/modules/work_packages/routing/split-view-routes.template"; +import { WorkPackageActivityTabComponent } from 'core-components/wp-single-view-tabs/activity-panel/activity-tab.component'; +import { WorkPackageRelationsTabComponent } from 'core-components/wp-single-view-tabs/relations-tab/relations-tab.component'; +import { WorkPackageWatchersTabComponent } from 'core-components/wp-single-view-tabs/watchers-tab/watchers-tab.component'; +import { WorkPackageNewFullViewComponent } from 'core-components/wp-new/wp-new-full-view.component'; +import { WorkPackageCopyFullViewComponent } from 'core-components/wp-copy/wp-copy-full-view.component'; +import { WorkPackagesFullViewComponent } from "core-app/modules/work_packages/routing/wp-full-view/wp-full-view.component"; +import { WorkPackageSplitViewComponent } from "core-app/modules/work_packages/routing/wp-split-view/wp-split-view.component"; +import { Ng2StateDeclaration } from "@uirouter/angular"; +import { WorkPackagesBaseComponent } from "core-app/modules/work_packages/routing/wp-base/wp--base.component"; +import { WorkPackageListViewComponent } from "core-app/modules/work_packages/routing/wp-list-view/wp-list-view.component"; +import { WorkPackageViewPageComponent } from "core-app/modules/work_packages/routing/wp-view-page/wp-view-page.component"; +import { makeSplitViewRoutes } from "core-app/modules/work_packages/routing/split-view-routes.template"; export const menuItemClass = 'work-packages-menu-item'; diff --git a/frontend/src/app/modules/work_packages/routing/wp-base/wp--base.component.ts b/frontend/src/app/modules/work_packages/routing/wp-base/wp--base.component.ts index f05ac6a862c..4a57f301a1b 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-base/wp--base.component.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-base/wp--base.component.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component} from "@angular/core"; -import {EditFormRoutingService} from "core-app/modules/fields/edit/edit-form/edit-form-routing.service"; -import {WorkPackageEditFormRoutingService} from "core-app/modules/work_packages/routing/wp-edit-form/wp-edit-form-routing.service"; +import { Component } from "@angular/core"; +import { EditFormRoutingService } from "core-app/modules/fields/edit/edit-form/edit-form-routing.service"; +import { WorkPackageEditFormRoutingService } from "core-app/modules/work_packages/routing/wp-edit-form/wp-edit-form-routing.service"; export const wpBaseSelector = 'work-packages-base'; diff --git a/frontend/src/app/modules/work_packages/routing/wp-edit-form/wp-edit-form-routing.service.ts b/frontend/src/app/modules/work_packages/routing/wp-edit-form/wp-edit-form-routing.service.ts index ba9921552ff..d4275499af8 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-edit-form/wp-edit-form-routing.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-edit-form/wp-edit-form-routing.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Transition} from "@uirouter/core"; -import {Injectable} from "@angular/core"; -import {EditFormRoutingService} from "core-app/modules/fields/edit/edit-form/edit-form-routing.service"; +import { Transition } from "@uirouter/core"; +import { Injectable } from "@angular/core"; +import { EditFormRoutingService } from "core-app/modules/fields/edit/edit-form/edit-form-routing.service"; @Injectable() export class WorkPackageEditFormRoutingService extends EditFormRoutingService { diff --git a/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.component.ts b/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.component.ts index 78c9a9c21f1..3f556ef6e44 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.component.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-full-view/wp-full-view.component.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {StateService} from '@uirouter/core'; -import {Component, Injector, OnInit} from '@angular/core'; -import {WorkPackageViewSelectionService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service'; -import {WorkPackageSingleViewBase} from "core-app/modules/work_packages/routing/wp-view-base/work-package-single-view.base"; -import {of} from "rxjs"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { StateService } from '@uirouter/core'; +import { Component, Injector, OnInit } from '@angular/core'; +import { WorkPackageViewSelectionService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service'; +import { WorkPackageSingleViewBase } from "core-app/modules/work_packages/routing/wp-view-base/work-package-single-view.base"; +import { of } from "rxjs"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; @Component({ templateUrl: './wp-full-view.html', diff --git a/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts b/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts index 2b96eadf2a1..2961b996dd3 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-list-view/wp-list-view.component.ts @@ -35,25 +35,25 @@ import { ElementRef, NgZone } from "@angular/core"; -import {take} from "rxjs/operators"; -import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; -import {DragAndDropService} from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; +import { take } from "rxjs/operators"; +import { CausedUpdatesService } from "core-app/modules/boards/board/caused-updates/caused-updates.service"; +import { DragAndDropService } from "core-app/modules/common/drag-and-drop/drag-and-drop.service"; import { WorkPackageViewDisplayRepresentationService, wpDisplayCardRepresentation } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {WorkPackageTableConfigurationObject} from "core-components/wp-table/wp-table-configuration"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {DeviceService} from "core-app/modules/common/browser/device.service"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {StateService} from "@uirouter/core"; -import {KeepTabService} from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; +import { WorkPackageTableConfigurationObject } from "core-components/wp-table/wp-table-configuration"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { DeviceService } from "core-app/modules/common/browser/device.service"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { StateService } from "@uirouter/core"; +import { KeepTabService } from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; @Component({ selector: 'wp-list-view', @@ -76,13 +76,13 @@ export class WorkPackageListViewComponent extends UntilDestroyedMixin implements }; /** Switch between list and card view */ - showTableView:boolean = true; + showTableView = true; /** Determine when query is initially loaded */ tableInformationLoaded = false; /** If loaded list of work packages is empty */ - noResults:boolean = false; + noResults = false; /** Whether we should render a blocked view */ showResultOverlay$ = this.wpViewFilters.incomplete$; @@ -135,11 +135,11 @@ export class WorkPackageListViewComponent extends UntilDestroyedMixin implements // The header of the table hides the scrolledIntoView element // so we scrollIntoView the previous element, if any if (selectedRow && selectedRow.previousSibling) { - selectedRow.previousSibling.scrollIntoView({block: "start"}); + selectedRow.previousSibling.scrollIntoView({ block: "start" }); } if (selectedCard) { - selectedCard.scrollIntoView({block: "start"}); + selectedCard.scrollIntoView({ block: "start" }); } }, 0); }); diff --git a/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.component.ts b/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.component.ts index 353e54912c2..6a96f7587e3 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.component.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-split-view/wp-split-view.component.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component, Injector, OnInit} from '@angular/core'; -import {StateService} from '@uirouter/core'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {States} from "core-components/states.service"; -import {FirstRouteService} from "core-app/modules/router/first-route-service"; -import {KeepTabService} from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {WorkPackageSingleViewBase} from "core-app/modules/work_packages/routing/wp-view-base/work-package-single-view.base"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {BackRoutingService} from "core-app/modules/common/back-routing/back-routing.service"; +import { ChangeDetectionStrategy, Component, Injector, OnInit } from '@angular/core'; +import { StateService } from '@uirouter/core'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { States } from "core-components/states.service"; +import { FirstRouteService } from "core-app/modules/router/first-route-service"; +import { KeepTabService } from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { WorkPackageSingleViewBase } from "core-app/modules/work_packages/routing/wp-view-base/work-package-single-view.base"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { BackRoutingService } from "core-app/modules/common/back-routing/back-routing.service"; @Component({ templateUrl: './wp-split-view.html', @@ -65,8 +65,8 @@ export class WorkPackageSplitViewComponent extends WorkPackageSingleViewBase imp ngOnInit():void { this.observeWorkPackage(); - let wpId = this.$state.params['workPackageId']; - let focusedWP = this.wpTableFocus.focusedWorkPackage; + const wpId = this.$state.params['workPackageId']; + const focusedWP = this.wpTableFocus.focusedWorkPackage; if (!focusedWP) { // Focus on the work package if we're the first route diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry.ts index 1eb2c692cbb..b66aca1feba 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/event-handling/event-handler-registry.ts @@ -1,4 +1,4 @@ -import {EventEmitter, InjectionToken, Injector} from '@angular/core'; +import { EventEmitter, InjectionToken, Injector } from '@angular/core'; export interface WorkPackageViewEventHandler { /** Event name to register **/ @@ -39,8 +39,8 @@ export abstract class WorkPackageViewHandlerRegistry { attachTo(viewRef:T) { this.eventHandlers.map(factory => { - let handler = factory(viewRef); - let target = handler.eventScope(viewRef); + const handler = factory(viewRef); + const target = handler.eventScope(viewRef); target.on(handler.EVENT, handler.SELECTOR, (evt:JQuery.TriggeredEvent) => { handler.handleEvent(viewRef, evt); diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies.ts index ae633d93e20..8e7adbbee3b 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies.ts @@ -27,7 +27,7 @@ //++ export class WorkPackageViewHierarchies { - public isVisible:boolean = false; + public isVisible = false; public last:string|null = null; public collapsed:{[workPackageId:string]:boolean} = {}; diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-highlight.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-highlight.ts index 72b477908ad..c6437b81beb 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-highlight.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-highlight.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {HighlightingMode} from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; +import { HighlightingMode } from "core-components/wp-fast-table/builders/highlighting/highlighting-mode.const"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; export interface WorkPackageViewHighlight { mode:HighlightingMode; diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination.ts index 3f09c4bcfe5..203abc9ff8c 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination.ts @@ -26,8 +26,8 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {PaginationInstance} from 'core-components/table-pagination/pagination-instance'; +import { WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { PaginationInstance } from 'core-components/table-pagination/pagination-instance'; export class WorkPackageViewPagination { public current:PaginationInstance; diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service.ts index 341f0de7647..d81d4a38178 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-additional-elements.service.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageViewColumnsService} from './wp-view-columns.service'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {WorkPackageViewHierarchiesService} from './wp-view-hierarchy.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Injectable} from '@angular/core'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {RelationsStateValue, WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {SchemaCacheService} from "core-components/schemas/schema-cache.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageViewColumnsService } from './wp-view-columns.service'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { WorkPackageViewHierarchiesService } from './wp-view-hierarchy.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable } from '@angular/core'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { RelationsStateValue, WorkPackageRelationsService } from "core-components/wp-relations/wp-relations.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { SchemaCacheService } from "core-components/schemas/schema-cache.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() export class WorkPackageViewAdditionalElementsService { diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service.ts index 14d7f212432..cb6fc3114a9 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {combine, deriveRaw, input, State} from 'reactivestates'; -import {map, mapTo, take} from 'rxjs/operators'; -import {merge, Observable} from 'rxjs'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {QuerySchemaResource} from 'core-app/modules/hal/resources/query-schema-resource'; -import {WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {Injectable} from "@angular/core"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { combine, deriveRaw, input, State } from 'reactivestates'; +import { map, mapTo, take } from 'rxjs/operators'; +import { merge, Observable } from 'rxjs'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { QuerySchemaResource } from 'core-app/modules/hal/resources/query-schema-resource'; +import { WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { Injectable } from "@angular/core"; @Injectable() export abstract class WorkPackageViewBaseService { diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service.ts index 95b42ab1f88..8e1af2792c5 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-collapsed-groups.service.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageViewBaseService} from './wp-view-base.service'; -import {Injectable} from '@angular/core'; -import {WorkPackageViewGroupByService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service'; -import {IsolatedQuerySpace} from 'core-app/modules/work_packages/query-space/isolated-query-space'; -import {take} from 'rxjs/operators'; -import {GroupObject, WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {QuerySchemaResource} from 'core-app/modules/hal/resources/query-schema-resource'; -import {QueryGroupByResource} from 'core-app/modules/hal/resources/query-group-by-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {SchemaCacheService} from 'core-components/schemas/schema-cache.service'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageViewBaseService } from './wp-view-base.service'; +import { Injectable } from '@angular/core'; +import { WorkPackageViewGroupByService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service'; +import { IsolatedQuerySpace } from 'core-app/modules/work_packages/query-space/isolated-query-space'; +import { take } from 'rxjs/operators'; +import { GroupObject, WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { QuerySchemaResource } from 'core-app/modules/hal/resources/query-schema-resource'; +import { QueryGroupByResource } from 'core-app/modules/hal/resources/query-group-by-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { SchemaCacheService } from 'core-components/schemas/schema-cache.service'; @Injectable() export class WorkPackageViewCollapsedGroupsService extends WorkPackageViewBaseService { @@ -48,7 +48,7 @@ export class WorkPackageViewCollapsedGroupsService extends WorkPackageViewBaseSe } get currentGroups():GroupObject[] { - return this.querySpace.groups.value!; + return this.querySpace.groups.value!; } get allGroupsAreCollapsed():boolean { @@ -85,7 +85,7 @@ export class WorkPackageViewCollapsedGroupsService extends WorkPackageViewBaseSe isMilestone = (workPackage:WorkPackageResource):boolean => { return this.schemaCacheService.of(workPackage)?.isMilestone; - } + }; toggleGroupCollapseState(groupIdentifier:string):void { const newCollapsedState = !this.config.state[groupIdentifier]; @@ -141,7 +141,7 @@ export class WorkPackageViewCollapsedGroupsService extends WorkPackageViewBaseSe allGroupsAreExpanded = allGroupsHaveTheSameCollapseState && !firstGroupCollapsedState; } - return {allGroupsAreCollapsed, allGroupsAreExpanded}; + return { allGroupsAreCollapsed, allGroupsAreExpanded }; } initialize(query:QueryResource, results:WorkPackageCollectionResource, schema?:QuerySchemaResource) { @@ -155,5 +155,7 @@ export class WorkPackageViewCollapsedGroupsService extends WorkPackageViewBaseSe return this.getDefaultState(); } - applyToQuery(query:QueryResource) { return; } + applyToQuery(query:QueryResource) { + return; + } } diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service.ts index d8a758576f1..668ae8a5ff2 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service.ts @@ -26,15 +26,15 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageQueryStateService} from './wp-view-base.service'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {States} from 'core-components/states.service'; -import {Injectable} from '@angular/core'; -import {cloneHalResourceCollection} from 'core-app/modules/hal/helpers/hal-resource-builder'; -import {QueryColumn, queryColumnTypes} from "core-components/wp-query/query-column"; -import {combine} from "reactivestates"; -import {mapTo, take} from "rxjs/operators"; +import { WorkPackageQueryStateService } from './wp-view-base.service'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { States } from 'core-components/states.service'; +import { Injectable } from '@angular/core'; +import { cloneHalResourceCollection } from 'core-app/modules/hal/helpers/hal-resource-builder'; +import { QueryColumn, queryColumnTypes } from "core-components/wp-query/query-column"; +import { combine } from "reactivestates"; +import { mapTo, take } from "rxjs/operators"; @Injectable() export class WorkPackageViewColumnsService extends WorkPackageQueryStateService { @@ -114,7 +114,7 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService< * @param column */ public previous(column:QueryColumn):QueryColumn|null { - let index = this.index(column.id); + const index = this.index(column.id); if (index <= 0) { return null; @@ -128,7 +128,7 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService< * @param column */ public next(column:QueryColumn):QueryColumn|null { - let index = this.index(column.id); + const index = this.index(column.id); if (index === -1 || this.isLast(column)) { return null; @@ -174,7 +174,7 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService< * - If toIndex is less than zero, insert at the start. */ public moveColumn(fromIndex:number, toIndex:number) { - let columns = this.getColumns(); + const columns = this.getColumns(); if (toIndex >= columns.length) { toIndex = columns.length - 1; @@ -184,7 +184,7 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService< toIndex = 0; } - let element = columns[fromIndex]; + const element = columns[fromIndex]; columns.splice(fromIndex, 1); columns.splice(toIndex, 0, element); @@ -196,7 +196,7 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService< * where X is the offset in indices (-1 = shift one to left) */ public shift(column:QueryColumn, offset:number) { - let index = this.index(column.id); + const index = this.index(column.id); if (index === -1) { return; } @@ -208,14 +208,14 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService< * Add a new column to the selection at the given position */ public addColumn(id:string, position?:number) { - let columns = this.getColumns(); + const columns = this.getColumns(); if (position === undefined) { position = columns.length; } if (this.index(id) === -1) { - let newColumn = _.find(this.all, (column) => column.id === id); + const newColumn = _.find(this.all, (column) => column.id === id); if (!newColumn) { throw "Column with provided name is not found"; @@ -230,10 +230,10 @@ export class WorkPackageViewColumnsService extends WorkPackageQueryStateService< * Remove a column from the active list */ public removeColumn(column:QueryColumn) { - let index = this.index(column.id); + const index = this.index(column.id); if (index !== -1) { - let columns = this.getColumns(); + const columns = this.getColumns(); columns.splice(index, 1); this.setColumns(columns); } diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service.ts index 53baeb954eb..fbd6acfe547 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service.ts @@ -26,11 +26,11 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageQueryStateService} from './wp-view-base.service'; -import {States} from 'core-components/states.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Injectable} from '@angular/core'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageQueryStateService } from './wp-view-base.service'; +import { States } from 'core-components/states.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable } from '@angular/core'; export const wpDisplayListRepresentation = 'list'; diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service.ts index d1c21cccf99..59630833b47 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service.ts @@ -26,19 +26,19 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageQueryStateService} from './wp-view-base.service'; -import {Injectable} from '@angular/core'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {QuerySchemaResource} from 'core-app/modules/hal/resources/query-schema-resource'; -import {QueryFilterInstanceResource} from 'core-app/modules/hal/resources/query-filter-instance-resource'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {combine, input, InputState} from 'reactivestates'; -import {cloneHalResourceCollection} from 'core-app/modules/hal/helpers/hal-resource-builder'; -import {QueryFilterResource} from "core-app/modules/hal/resources/query-filter-resource"; -import {QueryFilterInstanceSchemaResource} from "core-app/modules/hal/resources/query-filter-instance-schema-resource"; -import {States} from "core-components/states.service"; -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {mapTo, take} from "rxjs/operators"; +import { WorkPackageQueryStateService } from './wp-view-base.service'; +import { Injectable } from '@angular/core'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { QuerySchemaResource } from 'core-app/modules/hal/resources/query-schema-resource'; +import { QueryFilterInstanceResource } from 'core-app/modules/hal/resources/query-filter-instance-resource'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { combine, input, InputState } from 'reactivestates'; +import { cloneHalResourceCollection } from 'core-app/modules/hal/helpers/hal-resource-builder'; +import { QueryFilterResource } from "core-app/modules/hal/resources/query-filter-resource"; +import { QueryFilterInstanceSchemaResource } from "core-app/modules/hal/resources/query-filter-instance-schema-resource"; +import { States } from "core-components/states.service"; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { mapTo, take } from "rxjs/operators"; @Injectable() export class WorkPackageViewFiltersService extends WorkPackageQueryStateService { @@ -77,7 +77,7 @@ export class WorkPackageViewFiltersService extends WorkPackageQueryStateService< * @param schema */ public initializeFilters(query:QueryResource, schema:QuerySchemaResource) { - let filters = cloneHalResourceCollection(query.filters); + const filters = cloneHalResourceCollection(query.filters); this.availableState.putValue(schema.filtersSchemas.elements); this.pristineState.putValue(filters); @@ -114,9 +114,9 @@ export class WorkPackageViewFiltersService extends WorkPackageQueryStateService< * Replace a filter, or add a new one */ public replace(id:string, modifier:(filter:QueryFilterInstanceResource) => void):void { - let filter:QueryFilterInstanceResource = this.instantiate(id); + const filter:QueryFilterInstanceResource = this.instantiate(id); - let newFilters = [...this.rawFilters]; + const newFilters = [...this.rawFilters]; modifier(filter); const index = this.findIndex(id); @@ -142,7 +142,7 @@ export class WorkPackageViewFiltersService extends WorkPackageQueryStateService< return false; } - let filters = [...this.rawFilters]; + const filters = [...this.rawFilters]; modifier(filters[index]!); this.update(filters); @@ -154,9 +154,9 @@ export class WorkPackageViewFiltersService extends WorkPackageQueryStateService< * @param filterOrId The query filter or id to instantiate */ public instantiate(filterOrId:QueryFilterResource|string):QueryFilterInstanceResource { - let id = (filterOrId instanceof QueryFilterResource) ? filterOrId.id : filterOrId; + const id = (filterOrId instanceof QueryFilterResource) ? filterOrId.id : filterOrId; - let schema = _.find( + const schema = _.find( this.availableSchemas, schema => (schema.filter.allowedValues as HalResource)[0].id === id )!; @@ -169,8 +169,8 @@ export class WorkPackageViewFiltersService extends WorkPackageQueryStateService< * @param filters Filters to be removed */ public remove(...filters:(QueryFilterInstanceResource|string)[]) { - let mapper = (f:QueryFilterInstanceResource|string) => (f instanceof QueryFilterInstanceResource) ? f.id : f; - let set = new Set(filters.map(mapper)); + const mapper = (f:QueryFilterInstanceResource|string) => (f instanceof QueryFilterInstanceResource) ? f.id : f; + const set = new Set(filters.map(mapper)); this.update( this.rawFilters.filter(f => !set.has(mapper(f))) diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service.ts index 402383fc994..d177b309104 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Observable} from 'rxjs'; -import {distinctUntilChanged, map} from 'rxjs/operators'; -import {WorkPackageViewSelectionService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; -import {WorkPackageViewBaseService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; +import { Injectable } from '@angular/core'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Observable } from 'rxjs'; +import { distinctUntilChanged, map } from 'rxjs/operators'; +import { WorkPackageViewSelectionService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service"; +import { WorkPackageViewBaseService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; export interface WPFocusState { workPackageId:string; @@ -86,7 +86,7 @@ export class WorkPackageViewFocusService extends WorkPackageViewBaseService { @@ -70,7 +70,7 @@ export class WorkPackageViewGroupByService extends WorkPackageQueryStateService< } public setBy(column:QueryColumn) { - let groupBy = _.find(this.available, candidate => candidate.id === column.id); + const groupBy = _.find(this.available, candidate => candidate.id === column.id); if (groupBy) { this.update(groupBy); @@ -94,7 +94,7 @@ export class WorkPackageViewGroupByService extends WorkPackageQueryStateService< } public isCurrentlyGroupedBy(column:QueryColumn):boolean { - let cur = this.current; + const cur = this.current; return !!(cur && cur.id === column.id); } } diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service.spec.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service.spec.ts index a878a9b2d87..5c7d1e074a8 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service.spec.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service.spec.ts @@ -29,15 +29,15 @@ /*jshint expr: true*/ import { TestBed, waitForAsync } from "@angular/core/testing"; -import {States} from "core-components/states.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageRelationsHierarchyService} from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; -import {WorkPackageViewHierarchyIdentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; -import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; +import { States } from "core-components/states.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageRelationsHierarchyService } from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; +import { WorkPackageViewHierarchyIdentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service"; +import { WorkPackageViewDisplayRepresentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; import SpyObj = jasmine.SpyObj; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {of} from "rxjs"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { of } from "rxjs"; describe('WorkPackageViewIndentation service', function () { let service:WorkPackageViewHierarchyIdentationService; @@ -93,7 +93,7 @@ describe('WorkPackageViewIndentation service', function () { describe('canIndent', () => { it('Cannot indent without changeParent link', () => { - let workPackage:any = { id: '1234' }; + const workPackage:any = { id: '1234' }; expect(service.canIndent(workPackage)).toBeFalsy(); }); @@ -103,7 +103,7 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '2345', hidden: false, classIdentifier: 'foo' } ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo' }; + const workPackage:any = { id: '1234', changeParent: () => 'foo' }; expect(service.canIndent(workPackage)).toBeFalsy(); }); @@ -113,7 +113,7 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '1234', hidden: false, classIdentifier: 'foo' } ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: [] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: [] }; expect(service.canIndent(workPackage)).toBeTruthy(); }); @@ -126,7 +126,7 @@ describe('WorkPackageViewIndentation service', function () { spyOnProperty(hierarchyServiceStub, 'isEnabled', 'get') .and.returnValue(false); - let workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: [] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: [] }; expect(service.canIndent(workPackage)).toBeFalsy(); }); @@ -136,7 +136,7 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '1234', hidden: false, classIdentifier: 'foo' } ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: ['2345'] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: ['2345'] }; expect(service.canIndent(workPackage)).toBeFalsy(); }); @@ -147,19 +147,19 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '1234', hidden: false, classIdentifier: 'foo' } ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: ['2345'] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: ['2345'] }; expect(service.canIndent(workPackage)).toBeTruthy(); }); }); describe('canOutdent', () => { it('Cannot outdent without changeParent link', () => { - let workPackage:any = { id: '1234' }; + const workPackage:any = { id: '1234' }; expect(service.canOutdent(workPackage)).toBeFalsy(); }); it('Cannot outdent with changeParent link but disabled', () => { - let workPackage:any = { id: '1234', changeParent: () => 'foo', parent: { id: '2345' } }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', parent: { id: '2345' } }; spyOnProperty(hierarchyServiceStub, 'isEnabled', 'get') .and.returnValue(false); @@ -168,7 +168,7 @@ describe('WorkPackageViewIndentation service', function () { }); it('can outdent with changeParent link', () => { - let workPackage:any = { id: '1234', changeParent: () => 'foo', parent: { id: '2345' } }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', parent: { id: '2345' } }; expect(service.canOutdent(workPackage)).toBeTruthy(); }); @@ -182,8 +182,8 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '1234', hidden: false, classIdentifier: 'foo' } ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: [] }; - let predecessor:any = { id: '2345', changeParent: () => 'foo', ancestorIds: [] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: [] }; + const predecessor:any = { id: '2345', changeParent: () => 'foo', ancestorIds: [] }; states.workPackages.get('2345').putValue(predecessor); @@ -200,8 +200,8 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '1234', hidden: false, classIdentifier: 'foo' } ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: [] }; - let predecessor:any = { id: '2345', changeParent: () => 'foo', ancestorIds: ['5555'] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: [] }; + const predecessor:any = { id: '2345', changeParent: () => 'foo', ancestorIds: ['5555'] }; states.workPackages.get('2345').putValue(predecessor); @@ -218,8 +218,8 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '1234', hidden: false, classIdentifier: 'foo' } ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: ['5555'] }; - let predecessor:any = { id: '2345', changeParent: () => 'foo', ancestorIds: ['5555'] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', ancestorIds: ['5555'] }; + const predecessor:any = { id: '2345', changeParent: () => 'foo', ancestorIds: ['5555'] }; states.workPackages.get('2345').putValue(predecessor); @@ -236,7 +236,7 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '1234', hidden: false, classIdentifier: 'foo' }, ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo', parent: '5555', ancestorIds: ['2345', '5555'] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', parent: '5555', ancestorIds: ['2345', '5555'] }; service.outdent(workPackage).then(() => { expect(parentServiceSpy.changeParent).toHaveBeenCalledWith(workPackage, '2345'); @@ -249,7 +249,7 @@ describe('WorkPackageViewIndentation service', function () { { workPackageId: '1234', hidden: false, classIdentifier: 'foo' }, ]); - let workPackage:any = { id: '1234', changeParent: () => 'foo', parent: '2345', ancestorIds: ['2345'] }; + const workPackage:any = { id: '1234', changeParent: () => 'foo', parent: '2345', ancestorIds: ['2345'] }; service.outdent(workPackage).then(() => { expect(parentServiceSpy.changeParent).toHaveBeenCalledWith(workPackage, null); diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service.ts index f3905a92dcf..8e008ea7e74 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy-indentation.service.ts @@ -1,11 +1,11 @@ -import {Injectable} from '@angular/core'; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {WorkPackageRelationsHierarchyService} from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; -import {States} from "core-components/states.service"; -import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { Injectable } from '@angular/core'; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { WorkPackageRelationsHierarchyService } from "core-components/wp-relations/wp-relations-hierarchy/wp-relations-hierarchy.service"; +import { States } from "core-components/states.service"; +import { WorkPackageViewDisplayRepresentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; @Injectable() export class WorkPackageViewHierarchyIdentationService { diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service.ts index 88d6b9513db..0d49a66ce87 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service.ts @@ -1,7 +1,7 @@ -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageQueryStateService} from './wp-view-base.service'; -import {Injectable} from '@angular/core'; -import {WorkPackageViewHierarchies} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageQueryStateService } from './wp-view-base.service'; +import { Injectable } from '@angular/core'; +import { WorkPackageViewHierarchies } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-hierarchies"; @Injectable() export class WorkPackageViewHierarchiesService extends WorkPackageQueryStateService { @@ -37,7 +37,7 @@ export class WorkPackageViewHierarchiesService extends WorkPackageQueryStateServ return !!(this.current && this.current.isVisible); } - public setEnabled(active:boolean = true) { + public setEnabled(active = true) { const state = { ...this.current, isVisible: active, last: null }; this.update(state); } diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service.ts index 089c8b31976..c9a464fa12b 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service.ts @@ -1,13 +1,13 @@ -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageQueryStateService} from './wp-view-base.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Injectable} from '@angular/core'; -import {States} from 'core-components/states.service'; -import {BannersService} from "core-app/modules/common/enterprise/banners.service"; -import {HalResource} from "core-app/modules/hal/resources/hal-resource"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {QuerySchemaResource} from "core-app/modules/hal/resources/query-schema-resource"; -import {WorkPackageViewHighlight} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-highlight"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageQueryStateService } from './wp-view-base.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable } from '@angular/core'; +import { States } from 'core-components/states.service'; +import { BannersService } from "core-app/modules/common/enterprise/banners.service"; +import { HalResource } from "core-app/modules/hal/resources/hal-resource"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { QuerySchemaResource } from "core-app/modules/hal/resources/query-schema-resource"; +import { WorkPackageViewHighlight } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-highlight"; @Injectable() export class WorkPackageViewHighlightingService extends WorkPackageQueryStateService { @@ -42,7 +42,7 @@ export class WorkPackageViewHighlightingService extends WorkPackageQueryStateSer } public get current():WorkPackageViewHighlight { - let value = this.lastUpdatedState.getValueOr({ mode: 'inline' } as WorkPackageViewHighlight); + const value = this.lastUpdatedState.getValueOr({ mode: 'inline' } as WorkPackageViewHighlight); return this.filteredValue(value); } diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service.ts index d1cc2ef692b..7586fa18945 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {Injectable} from '@angular/core'; -import {WorkPackageQueryStateService} from './wp-view-base.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {WorkPackageResource} from "core-app/modules/hal/resources/work-package-resource"; -import {States} from "core-components/states.service"; -import {QuerySchemaResource} from "core-app/modules/hal/resources/query-schema-resource"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; -import {MAX_ORDER, ReorderDeltaBuilder} from "core-app/modules/common/drag-and-drop/reorder-delta-builder"; -import {take} from "rxjs/operators"; -import {InputState} from "reactivestates"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {CausedUpdatesService} from "core-app/modules/boards/board/caused-updates/caused-updates.service"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {QueryOrder} from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { Injectable } from '@angular/core'; +import { WorkPackageQueryStateService } from './wp-view-base.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { WorkPackageResource } from "core-app/modules/hal/resources/work-package-resource"; +import { States } from "core-components/states.service"; +import { QuerySchemaResource } from "core-app/modules/hal/resources/query-schema-resource"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; +import { MAX_ORDER, ReorderDeltaBuilder } from "core-app/modules/common/drag-and-drop/reorder-delta-builder"; +import { take } from "rxjs/operators"; +import { InputState } from "reactivestates"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { CausedUpdatesService } from "core-app/modules/boards/board/caused-updates/caused-updates.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { QueryOrder } from "core-app/modules/apiv3/endpoints/queries/apiv3-query-order"; @Injectable() @@ -75,7 +75,7 @@ export class WorkPackageViewOrderService extends WorkPackageQueryStateService { // Find index of the work package - let fromIndex:number = order.findIndex((id) => id === wpId); + const fromIndex:number = order.findIndex((id) => id === wpId); order.splice(fromIndex, 1); order.splice(toIndex, 0, wpId); @@ -97,7 +97,7 @@ export class WorkPackageViewOrderService extends WorkPackageQueryStateService { + public async add(order:string[], wpId:string, toIndex = -1):Promise { if (toIndex === -1) { order.push(wpId); toIndex = order.length - 1; @@ -139,7 +139,7 @@ export class WorkPackageViewOrderService extends WorkPackageQueryStateService this - .apiV3Service - .queries.id(this.currentQuery) - .order - .get() + .apiV3Service + .queries.id(this.currentQuery) + .order + .get() ); } else if (this.positions.isPristine()) { // Insert an empty fallback in case we have no data yet diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service.ts index 0c49c2f392e..05de303afa3 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageCollectionResource} from 'core-app/modules/hal/resources/wp-collection-resource'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {PaginationObject, PaginationService} from 'core-components/table-pagination/pagination-service'; -import {WorkPackageViewPagination} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination"; -import {WorkPackageViewBaseService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service"; +import { Injectable } from '@angular/core'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageCollectionResource } from 'core-app/modules/hal/resources/wp-collection-resource'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { PaginationObject, PaginationService } from 'core-components/table-pagination/pagination-service'; +import { WorkPackageViewPagination } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-pagination"; +import { WorkPackageViewBaseService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service"; export interface PaginationUpdateObject { page?:number; @@ -68,7 +68,7 @@ export class WorkPackageViewPaginationService extends WorkPackageViewBaseService } public updateFromObject(object:PaginationUpdateObject) { - let currentState = this.current; + const currentState = this.current; if (object.page) { currentState.page = object.page; @@ -84,7 +84,7 @@ export class WorkPackageViewPaginationService extends WorkPackageViewBaseService } public updateFromResults(results:WorkPackageCollectionResource) { - let update = { + const update = { page: results.offset, perPage: results.pageSize, total: results.total, diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service.ts index d5822d8eb10..3f14ed2c109 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-relation-columns.service.ts @@ -26,23 +26,23 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {WorkPackageViewColumnsService} from './wp-view-columns.service'; -import {WorkPackageViewBaseService} from './wp-view-base.service'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {HalResourceService} from 'core-app/modules/hal/services/hal-resource.service'; -import {RelationResource} from 'core-app/modules/hal/resources/relation-resource'; -import {WorkPackageViewRelationColumns} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-relation-columns"; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {RelationsStateValue, WorkPackageRelationsService} from "core-components/wp-relations/wp-relations.service"; -import {Injectable} from "@angular/core"; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { WorkPackageViewColumnsService } from './wp-view-columns.service'; +import { WorkPackageViewBaseService } from './wp-view-base.service'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { HalResourceService } from 'core-app/modules/hal/services/hal-resource.service'; +import { RelationResource } from 'core-app/modules/hal/resources/relation-resource'; +import { WorkPackageViewRelationColumns } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-relation-columns"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { RelationsStateValue, WorkPackageRelationsService } from "core-components/wp-relations/wp-relations.service"; +import { Injectable } from "@angular/core"; import { QueryColumn, queryColumnTypes, RelationQueryColumn, TypeRelationQueryColumn } from "core-components/wp-query/query-column"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; export type RelationColumnType = 'toType'|'ofType'; @@ -69,8 +69,8 @@ export class WorkPackageViewRelationColumnsService extends WorkPackageViewBaseSe * @param relation */ public relationsToExtendFor(workPackage:WorkPackageResource, - relations:RelationsStateValue|undefined, - eachCallback:(relation:RelationResource, column:QueryColumn, type:RelationColumnType) => void) { + relations:RelationsStateValue|undefined, + eachCallback:(relation:RelationResource, column:QueryColumn, type:RelationColumnType) => void) { // Only if any relation columns or stored expansion state exist if (!(this.wpTableColumns.hasRelationColumns() && this.lastUpdatedState.hasValue())) { return; @@ -136,12 +136,12 @@ export class WorkPackageViewRelationColumnsService extends WorkPackageViewBaseSe public relationColumnType(column:QueryColumn):RelationColumnType|null { switch (column._type) { - case queryColumnTypes.RELATION_TO_TYPE: - return 'toType'; - case queryColumnTypes.RELATION_OF_TYPE: - return 'ofType'; - default: - return null; + case queryColumnTypes.RELATION_TO_TYPE: + return 'toType'; + case queryColumnTypes.RELATION_OF_TYPE: + return 'ofType'; + default: + return null; } } diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service.ts index f915eb9537d..b44963df1a9 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-selection.service.ts @@ -1,12 +1,12 @@ -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Injectable, OnDestroy} from '@angular/core'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {States} from 'core-components/states.service'; -import {OPContextMenuService} from "core-components/op-context-menu/op-context-menu.service"; -import {RenderedWorkPackage} from "core-app/modules/work_packages/render-info/rendered-work-package.type"; -import {WorkPackageViewBaseService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service"; -import {QueryResource} from "core-app/modules/hal/resources/query-resource"; -import {WorkPackageCollectionResource} from "core-app/modules/hal/resources/wp-collection-resource"; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable, OnDestroy } from '@angular/core'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { States } from 'core-components/states.service'; +import { OPContextMenuService } from "core-components/op-context-menu/op-context-menu.service"; +import { RenderedWorkPackage } from "core-app/modules/work_packages/render-info/rendered-work-package.type"; +import { WorkPackageViewBaseService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service"; +import { QueryResource } from "core-app/modules/hal/resources/query-resource"; +import { WorkPackageCollectionResource } from "core-app/modules/hal/resources/wp-collection-resource"; export interface WorkPackageViewSelectionState { // Map of selected rows @@ -32,7 +32,7 @@ export class WorkPackageViewSelectionService extends WorkPackageViewBaseService< } public initializeSelection(selectedWorkPackageIds:string[]) { - let state:WorkPackageViewSelectionState = { + const state:WorkPackageViewSelectionState = { selected: {}, activeRowIndex: null }; @@ -66,12 +66,12 @@ export class WorkPackageViewSelectionService extends WorkPackageViewBaseService< * Get the current work package resource form the selection state. */ public getSelectedWorkPackages():WorkPackageResource[] { - let wpState = this.states.workPackages; + const wpState = this.states.workPackages; return this.getSelectedWorkPackageIds().map(id => wpState.get(id).value!); } public getSelectedWorkPackageIds():string[] { - let selected:string[] = []; + const selected:string[] = []; _.each(this.current?.selected, (isSelected:boolean, wpId:string) => { if (isSelected) { @@ -105,7 +105,7 @@ export class WorkPackageViewSelectionService extends WorkPackageViewBaseService< * @param workPackageId */ public toggleRow(workPackageId:string) { - let isSelected = this.current?.selected[workPackageId]; + const isSelected = this.current?.selected[workPackageId]; this.setRowState(workPackageId, !isSelected); } @@ -115,7 +115,7 @@ export class WorkPackageViewSelectionService extends WorkPackageViewBaseService< * @param newState */ public setRowState(workPackageId:string, newState:boolean) { - let state = this.current || this._emptyState; + const state = this.current || this._emptyState; state.selected[workPackageId] = newState; this.update(state); } @@ -137,15 +137,15 @@ export class WorkPackageViewSelectionService extends WorkPackageViewBaseService< * (aka shift click expansion) */ public setMultiSelectionFrom(rows:RenderedWorkPackage[], wpId:string, position:number) { - let state = this.current || this._emptyState; + const state = this.current || this._emptyState; // If there are no other selections, it does not matter what the index is if (this.selectionCount === 0 || state.activeRowIndex === null) { state.selected[wpId] = true; state.activeRowIndex = position; } else { - let start = Math.min(position, state.activeRowIndex); - let end = Math.max(position, state.activeRowIndex); + const start = Math.min(position, state.activeRowIndex); + const end = Math.max(position, state.activeRowIndex); rows.forEach((row, i) => { if (row.workPackageId) { diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service.ts index 725689efbef..9d950275f92 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service.ts @@ -26,17 +26,17 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {States} from 'core-components/states.service'; -import {combine} from 'reactivestates'; -import {mapTo} from 'rxjs/operators'; -import {QueryResource} from 'core-app/modules/hal/resources/query-resource'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {Injectable} from '@angular/core'; -import {WorkPackageQueryStateService} from './wp-view-base.service'; -import {Observable} from 'rxjs'; -import {QuerySortByResource} from 'core-app/modules/hal/resources/query-sort-by-resource'; -import {PathHelperService} from "core-app/modules/common/path-helper/path-helper.service"; -import {QueryColumn} from "core-components/wp-query/query-column"; +import { States } from 'core-components/states.service'; +import { combine } from 'reactivestates'; +import { mapTo } from 'rxjs/operators'; +import { QueryResource } from 'core-app/modules/hal/resources/query-resource'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { Injectable } from '@angular/core'; +import { WorkPackageQueryStateService } from './wp-view-base.service'; +import { Observable } from 'rxjs'; +import { QuerySortByResource } from 'core-app/modules/hal/resources/query-sort-by-resource'; +import { PathHelperService } from "core-app/modules/common/path-helper/path-helper.service"; +import { QueryColumn } from "core-components/wp-query/query-column"; @Injectable() export class WorkPackageViewSortByService extends WorkPackageQueryStateService { @@ -85,7 +85,7 @@ export class WorkPackageViewSortByService extends WorkPackageQueryStateService sortBy.column.$href) .slice(0, 3); @@ -121,7 +121,7 @@ export class WorkPackageViewSortByService extends WorkPackageQueryStateService { diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service.ts index 267216cf348..43d71aadd6e 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from '@angular/core'; -import {QueryResource, TimelineLabels, TimelineZoomLevel} from 'core-app/modules/hal/resources/query-resource'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {input} from 'reactivestates'; -import {WorkPackageQueryStateService} from './wp-view-base.service'; -import {WorkPackageTimelineState} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-timeline"; -import {zoomLevelOrder} from "core-components/wp-table/timeline/wp-timeline"; +import { Injectable } from '@angular/core'; +import { QueryResource, TimelineLabels, TimelineZoomLevel } from 'core-app/modules/hal/resources/query-resource'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { input } from 'reactivestates'; +import { WorkPackageQueryStateService } from './wp-view-base.service'; +import { WorkPackageTimelineState } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-table-timeline"; +import { zoomLevelOrder } from "core-components/wp-table/timeline/wp-timeline"; @Injectable() export class WorkPackageViewTimelineService extends WorkPackageQueryStateService { @@ -79,12 +79,12 @@ export class WorkPackageViewTimelineService extends WorkPackageQueryStateService } public toggle() { - let currentState = this.current; + const currentState = this.current; this.setVisible(!currentState.visible); } public setVisible(value:boolean) { - this.updatesState.putValue({...this.current, visible: value}); + this.updatesState.putValue({ ...this.current, visible: value }); } public get isVisible() { @@ -108,7 +108,7 @@ export class WorkPackageViewTimelineService extends WorkPackageQueryStateService } public getNormalizedLabels(workPackage:WorkPackageResource) { - let labels:TimelineLabels = this.defaultLabels; + const labels:TimelineLabels = this.defaultLabels; _.each(this.current.labels, (attribute:string | null, positionAsString:string) => { // RR: Lodash typings declare the position as string. However, it is save to cast @@ -131,7 +131,7 @@ export class WorkPackageViewTimelineService extends WorkPackageQueryStateService } public updateZoomWithDelta(delta:number):void { - let level = this.current.zoomLevel; + const level = this.current.zoomLevel; if (level !== 'auto') { return this.applyZoomLevel(level, delta); } diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/work-package-single-view.base.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/work-package-single-view.base.ts index 3ba5739b976..71176d19ef2 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/work-package-single-view.base.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/work-package-single-view.base.ts @@ -26,22 +26,22 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Injector} from '@angular/core'; -import {I18nService} from 'core-app/modules/common/i18n/i18n.service'; -import {PathHelperService} from 'core-app/modules/common/path-helper/path-helper.service'; -import {WorkPackageViewFocusService} from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; -import {WorkPackageResource} from 'core-app/modules/hal/resources/work-package-resource'; -import {OpTitleService} from 'core-components/html/op-title.service'; -import {AuthorisationService} from "core-app/modules/common/model-auth/model-auth.service"; -import {States} from "core-components/states.service"; -import {KeepTabService} from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; +import { ChangeDetectorRef, Injector } from '@angular/core'; +import { I18nService } from 'core-app/modules/common/i18n/i18n.service'; +import { PathHelperService } from 'core-app/modules/common/path-helper/path-helper.service'; +import { WorkPackageViewFocusService } from 'core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-focus.service'; +import { WorkPackageResource } from 'core-app/modules/hal/resources/work-package-resource'; +import { OpTitleService } from 'core-components/html/op-title.service'; +import { AuthorisationService } from "core-app/modules/common/model-auth/model-auth.service"; +import { States } from "core-components/states.service"; +import { KeepTabService } from "core-components/wp-single-view-tabs/keep-tab/keep-tab.service"; -import {HalResourceEditingService} from "core-app/modules/fields/edit/services/hal-resource-editing.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; -import {catchError, subscribeOn} from "rxjs/operators"; +import { HalResourceEditingService } from "core-app/modules/fields/edit/services/hal-resource-editing.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; +import { catchError, subscribeOn } from "rxjs/operators"; export class WorkPackageSingleViewBase extends UntilDestroyedMixin { @@ -87,11 +87,11 @@ export class WorkPackageSingleViewBase extends UntilDestroyedMixin { this.untilDestroyed() ) .subscribe((wp:WorkPackageResource) => { - this.workPackage = wp; - this.init(); - this.cdRef.detectChanges(); - }, - (error) => this.notificationService.handleRawError(error) + this.workPackage = wp; + this.init(); + this.cdRef.detectChanges(); + }, + (error) => this.notificationService.handleRawError(error) ); } diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts b/frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts index 98d5c07f800..769aefca913 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-base/work-packages-view.base.ts @@ -26,35 +26,35 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectorRef, Directive, Injector, OnDestroy, OnInit} from '@angular/core'; -import {StateService, TransitionService} from '@uirouter/core'; -import {AuthorisationService} from 'core-app/modules/common/model-auth/model-auth.service'; -import {IsolatedQuerySpace} from "core-app/modules/work_packages/query-space/isolated-query-space"; -import {filter, take, withLatestFrom} from 'rxjs/operators'; -import {LoadingIndicatorService} from "core-app/modules/common/loading-indicator/loading-indicator.service"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {WorkPackageStaticQueriesService} from 'core-components/wp-query-select/wp-static-queries.service'; -import {WorkPackageViewHighlightingService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; -import {States} from "core-components/states.service"; -import {WorkPackageViewColumnsService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; -import {WorkPackageViewSortByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; -import {WorkPackageViewGroupByService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; -import {WorkPackageViewFiltersService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; -import {WorkPackageViewSumService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; -import {WorkPackageViewTimelineService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; -import {WorkPackageViewHierarchiesService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; -import {WorkPackageViewPaginationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; -import {WorkPackagesListService} from "core-components/wp-list/wp-list.service"; -import {WorkPackagesListChecksumService} from "core-components/wp-list/wp-list-checksum.service"; -import {WorkPackageQueryStateService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service"; -import {WorkPackageStatesInitializationService} from "core-components/wp-list/wp-states-initialization.service"; -import {WorkPackageViewOrderService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; -import {WorkPackageViewDisplayRepresentationService} from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; -import {HalEvent, HalEventsService} from "core-app/modules/hal/services/hal-events.service"; -import {DeviceService} from "core-app/modules/common/browser/device.service"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {CurrentProjectService} from "core-components/projects/current-project.service"; -import {UntilDestroyedMixin} from "core-app/helpers/angular/until-destroyed.mixin"; +import { ChangeDetectorRef, Directive, Injector, OnDestroy, OnInit } from '@angular/core'; +import { StateService, TransitionService } from '@uirouter/core'; +import { AuthorisationService } from 'core-app/modules/common/model-auth/model-auth.service'; +import { IsolatedQuerySpace } from "core-app/modules/work_packages/query-space/isolated-query-space"; +import { filter, take, withLatestFrom } from 'rxjs/operators'; +import { LoadingIndicatorService } from "core-app/modules/common/loading-indicator/loading-indicator.service"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { WorkPackageStaticQueriesService } from 'core-components/wp-query-select/wp-static-queries.service'; +import { WorkPackageViewHighlightingService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-highlighting.service"; +import { States } from "core-components/states.service"; +import { WorkPackageViewColumnsService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-columns.service"; +import { WorkPackageViewSortByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sort-by.service"; +import { WorkPackageViewGroupByService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-group-by.service"; +import { WorkPackageViewFiltersService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-filters.service"; +import { WorkPackageViewSumService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-sum.service"; +import { WorkPackageViewTimelineService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-timeline.service"; +import { WorkPackageViewHierarchiesService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-hierarchy.service"; +import { WorkPackageViewPaginationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-pagination.service"; +import { WorkPackagesListService } from "core-components/wp-list/wp-list.service"; +import { WorkPackagesListChecksumService } from "core-components/wp-list/wp-list-checksum.service"; +import { WorkPackageQueryStateService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-base.service"; +import { WorkPackageStatesInitializationService } from "core-components/wp-list/wp-states-initialization.service"; +import { WorkPackageViewOrderService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-order.service"; +import { WorkPackageViewDisplayRepresentationService } from "core-app/modules/work_packages/routing/wp-view-base/view-services/wp-view-display-representation.service"; +import { HalEvent, HalEventsService } from "core-app/modules/hal/services/hal-events.service"; +import { DeviceService } from "core-app/modules/common/browser/device.service"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { CurrentProjectService } from "core-components/projects/current-project.service"; +import { UntilDestroyedMixin } from "core-app/helpers/angular/until-destroyed.mixin"; @Directive() export abstract class WorkPackagesViewBase extends UntilDestroyedMixin implements OnInit, OnDestroy { @@ -114,11 +114,11 @@ export abstract class WorkPackagesViewBase extends UntilDestroyedMixin implement this.untilDestroyed(), withLatestFrom(this.querySpace.query.values$()) ).subscribe(([pagination, query]) => { - if (this.wpListChecksumService.isQueryOutdated(query, pagination)) { - this.wpListChecksumService.update(query, pagination); - this.refresh(true, false); - } - }); + if (this.wpListChecksumService.isQueryOutdated(query, pagination)) { + this.wpListChecksumService.update(query, pagination); + this.refresh(true, false); + } + }); this.setupChangeObserver(this.wpTableFilters, true); this.setupChangeObserver(this.wpTableGroupBy); @@ -139,7 +139,7 @@ export abstract class WorkPackagesViewBase extends UntilDestroyedMixin implement * @param service Work package query state service to listento * @param firstPage If the service requests a change, load the first page */ - protected setupChangeObserver(service:WorkPackageQueryStateService, firstPage:boolean = false) { + protected setupChangeObserver(service:WorkPackageQueryStateService, firstPage = false) { const queryState = this.querySpace.query; service @@ -208,7 +208,7 @@ export abstract class WorkPackagesViewBase extends UntilDestroyedMixin implement * @return {boolean} whether any of these events should trigger the view reloading */ protected filterRefreshEvents(events:HalEvent[]):boolean { - let rendered = new Set(this.querySpace.renderedWorkPackageIds.getValueOr([])); + const rendered = new Set(this.querySpace.renderedWorkPackageIds.getValueOr([])); for (let i = 0; i < events.length; i++) { const item = events[i]; diff --git a/frontend/src/app/modules/work_packages/routing/wp-view-page/wp-view-page.component.ts b/frontend/src/app/modules/work_packages/routing/wp-view-page/wp-view-page.component.ts index 6f64d1d20de..6dbad638848 100644 --- a/frontend/src/app/modules/work_packages/routing/wp-view-page/wp-view-page.component.ts +++ b/frontend/src/app/modules/work_packages/routing/wp-view-page/wp-view-page.component.ts @@ -26,38 +26,38 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {ChangeDetectionStrategy, Component, OnInit} from "@angular/core"; -import {take} from "rxjs/operators"; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; -import {WorkPackageNotificationService} from "core-app/modules/work_packages/notifications/work-package-notification.service"; -import {QueryParamListenerService} from "core-components/wp-query/query-param-listener.service"; +import { ChangeDetectionStrategy, Component, OnInit } from "@angular/core"; +import { take } from "rxjs/operators"; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; +import { WorkPackageNotificationService } from "core-app/modules/work_packages/notifications/work-package-notification.service"; +import { QueryParamListenerService } from "core-components/wp-query/query-param-listener.service"; import { PartitionedQuerySpacePageComponent, - ToolbarButtonComponentDefinition + ToolbarButtonComponentDefinition, } from "core-app/modules/work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component"; -import {WorkPackageCreateButtonComponent} from "core-components/wp-buttons/wp-create-button/wp-create-button.component"; -import {WorkPackageFilterButtonComponent} from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component"; -import {WorkPackageViewToggleButton} from "core-components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component"; -import {WorkPackageDetailsViewButtonComponent} from "core-components/wp-buttons/wp-details-view-button/wp-details-view-button.component"; -import {WorkPackageTimelineButtonComponent} from "core-components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component"; -import {ZenModeButtonComponent} from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component"; -import {WorkPackageSettingsButtonComponent} from "core-components/wp-buttons/wp-settings-button/wp-settings-button.component"; -import {of} from "rxjs"; -import {WorkPackageFoldToggleButtonComponent} from "core-components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component"; +import { WorkPackageCreateButtonComponent } from "core-components/wp-buttons/wp-create-button/wp-create-button.component"; +import { WorkPackageFilterButtonComponent } from "core-components/wp-buttons/wp-filter-button/wp-filter-button.component"; +import { WorkPackageViewToggleButton } from "core-components/wp-buttons/wp-view-toggle-button/work-package-view-toggle-button.component"; +import { WorkPackageDetailsViewButtonComponent } from "core-components/wp-buttons/wp-details-view-button/wp-details-view-button.component"; +import { WorkPackageTimelineButtonComponent } from "core-components/wp-buttons/wp-timeline-toggle-button/wp-timeline-toggle-button.component"; +import { ZenModeButtonComponent } from "core-components/wp-buttons/zen-mode-toggle-button/zen-mode-toggle-button.component"; +import { WorkPackageSettingsButtonComponent } from "core-components/wp-buttons/wp-settings-button/wp-settings-button.component"; +import { of } from "rxjs"; +import { WorkPackageFoldToggleButtonComponent } from "core-components/wp-buttons/wp-fold-toggle-button/wp-fold-toggle-button.component"; @Component({ selector: 'wp-view-page', templateUrl: '../../../work_packages/routing/partitioned-query-space-page/partitioned-query-space-page.component.html', styleUrls: [ // Absolute paths do not work for styleURLs :-( - '../partitioned-query-space-page/partitioned-query-space-page.component.sass' + '../partitioned-query-space-page/partitioned-query-space-page.component.sass', ], changeDetection: ChangeDetectionStrategy.OnPush, providers: [ /** We need to provide the wpNotification service here to get correct save notifications for WP resources */ { provide: HalResourceNotificationService, useClass: WorkPackageNotificationService }, - QueryParamListenerService - ] + QueryParamListenerService, + ], }) export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageComponent implements OnInit { toolbarButtonComponents:ToolbarButtonComponentDefinition[] = [ @@ -65,37 +65,37 @@ export class WorkPackageViewPageComponent extends PartitionedQuerySpacePageCompo component: WorkPackageCreateButtonComponent, inputs: { stateName$: of("work-packages.partitioned.list.new"), - allowed: ['work_packages.createWorkPackage'] - } + allowed: ['work_packages.createWorkPackage'], + }, }, { - component: WorkPackageFilterButtonComponent + component: WorkPackageFilterButtonComponent, }, { component: WorkPackageViewToggleButton, - containerClasses: 'hidden-for-mobile' + containerClasses: 'hidden-for-mobile', }, { component: WorkPackageFoldToggleButtonComponent, show: () => { return !!(this.currentQuery && this.currentQuery.groupBy); - } + }, }, { component: WorkPackageDetailsViewButtonComponent, - containerClasses: 'hidden-for-mobile' + containerClasses: 'hidden-for-mobile', }, { component: WorkPackageTimelineButtonComponent, - containerClasses: 'hidden-for-mobile -no-spacing' + containerClasses: 'hidden-for-mobile -no-spacing', }, { component: ZenModeButtonComponent, - containerClasses: 'hidden-for-mobile' + containerClasses: 'hidden-for-mobile', }, { - component: WorkPackageSettingsButtonComponent - } + component: WorkPackageSettingsButtonComponent, + }, ]; ngOnInit() { diff --git a/frontend/src/app/sentry/sentry-reporter.ts b/frontend/src/app/sentry/sentry-reporter.ts index fc2cbc88b67..a5783f5f5b0 100644 --- a/frontend/src/app/sentry/sentry-reporter.ts +++ b/frontend/src/app/sentry/sentry-reporter.ts @@ -26,13 +26,12 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Scope} from "@sentry/hub"; -import {Severity} from "@sentry/types"; -import {Event as SentryEvent} from "@sentry/types"; -import {environment} from "../../environments/environment"; +import { Scope } from "@sentry/hub"; +import { Severity, Event as SentryEvent } from "@sentry/types"; +import { environment } from "../../environments/environment"; export type ScopeCallback = (scope:Scope) => void; - +export type MessageSeverity = 'fatal'|'error'|'warning'|'log'|'info'|'debug'; export interface CaptureInterface { /** Capture a message */ @@ -44,6 +43,7 @@ export interface CaptureInterface { export interface SentryClient extends CaptureInterface { configureScope(scope:ScopeCallback):void; + withScope(scope:ScopeCallback):void; } @@ -52,8 +52,6 @@ export interface ErrorReporter extends CaptureInterface { addContext(...callbacks:ScopeCallback[]):void; } -export type MessageSeverity = 'fatal'|'error'|'warning'|'log'|'info'|'debug'; - interface QueuedMessage { type:'captureMessage'|'captureException'; args:any[]; @@ -72,20 +70,20 @@ export class SentryReporter implements ErrorReporter { constructor() { const sentryElement = document.querySelector('meta[name=openproject_sentry]') as HTMLElement|null; if (sentryElement) { - import('@sentry/browser').then((Sentry) => { - Sentry.init({ + import('@sentry/browser').then((sentry) => { + sentry.init({ dsn: sentryElement.dataset.dsn!, debug: !environment.production, ignoreErrors: [ // Transition movements, 'The transition has been superseded by a different transition', // Uncaught promise rejections - 'Uncaught (in promise)' + 'Uncaught (in promise)', ], - beforeSend: (event) => this.filterEvent(event) + beforeSend: (event) => this.filterEvent(event), }); - this.sentryLoaded(Sentry); + this.sentryLoaded(sentry); }); } else { this.sentryConfigured = false; @@ -103,9 +101,9 @@ export class SentryReporter implements ErrorReporter { }); } - public captureMessage(msg:string, severity:MessageSeverity = 'info') { + public captureMessage(msg:string, severity:MessageSeverity = 'info'):void { if (!this.client) { - return this.handleOfflineMessage('captureMessage', Array.from(arguments)); + return this.handleOfflineMessage('captureMessage', [msg, severity]); } this.client.withScope((scope:Scope) => { @@ -114,9 +112,9 @@ export class SentryReporter implements ErrorReporter { }); } - public captureException(err:Error|string) { + public captureException(err:Error|string):void { if (!this.client || !err) { - this.handleOfflineMessage('captureException', Array.from(arguments)); + this.handleOfflineMessage('captureException', [err]); throw err; } @@ -157,7 +155,7 @@ export class SentryReporter implements ErrorReporter { * @param scope */ private setupContext(scope:Scope) { - scope.setTag('locale', I18n.locale); + scope.setTag('locale', window.I18n.locale); scope.setTag('domain', window.location.hostname); scope.setTag('url_path', window.location.pathname); scope.setExtra('url_query', window.location.search); @@ -175,7 +173,7 @@ export class SentryReporter implements ErrorReporter { private filterEvent(event:SentryEvent):SentryEvent|null { const unsupportedBrowser = document.body.classList.contains('-unsupported-browser'); if (unsupportedBrowser) { - console.warn("Browser is not supported, skipping sentry reporting completely.") + console.warn("Browser is not supported, skipping sentry reporting completely."); return null; } diff --git a/frontend/src/test.ts b/frontend/src/test.ts index a60ba2a65fd..f1606369857 100644 --- a/frontend/src/test.ts +++ b/frontend/src/test.ts @@ -1,23 +1,23 @@ // This file is required by karma.conf.js and loads recursively all the .spec and framework files // Require the reflect ES7 polyfill for JIT -import 'zone.js/dist/zone'; // Included with Angular CLI. +import 'zone.js/dist/zone'; // Included with Angular CLI. import 'core-js/es/reflect'; import 'zone.js/dist/zone-testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, - platformBrowserDynamicTesting + platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; -import {GlobalI18n} from "core-app/modules/common/i18n/i18n.service"; -import {I18nShim} from "./test/i18n-shim"; +import { GlobalI18n } from "core-app/modules/common/i18n/i18n.service"; +import { I18nShim } from "./test/i18n-shim"; require('expose-loader?_!lodash'); declare const require:any; declare global { - interface Window { + export interface Window { I18n:GlobalI18n; } } @@ -25,11 +25,10 @@ declare global { // Declare global I18n shim window.I18n = new I18nShim(); - // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( BrowserDynamicTestingModule, - platformBrowserDynamicTesting() + platformBrowserDynamicTesting(), ); // Then we find all the tests. diff --git a/frontend/src/typings/shims.d.ts b/frontend/src/typings/shims.d.ts index d3ac5fe0fed..65a5107866d 100644 --- a/frontend/src/typings/shims.d.ts +++ b/frontend/src/typings/shims.d.ts @@ -14,15 +14,15 @@ /// /// -import {ErrorReporter} from "core-app/sentry/sentry-reporter"; -import {Injector} from '@angular/core'; +import { ErrorReporter } from "core-app/sentry/sentry-reporter"; +import { Injector } from '@angular/core'; -import {OpenProject} from 'core-app/globals/openproject'; +import { OpenProject } from 'core-app/globals/openproject'; import * as TLodash from 'lodash'; import * as TMoment from 'moment'; -import {GlobalI18n} from "core-app/modules/common/i18n/i18n.service"; -import {Dragula} from "dragula"; -import {Screenfull} from "screenfull"; +import { GlobalI18n } from "core-app/modules/common/i18n/i18n.service"; +import { Dragula } from "dragula"; +import { Screenfull } from "screenfull"; declare module 'observable-array'; declare module 'dom-autoscroller'; @@ -37,6 +37,7 @@ declare global { declare global { interface Window { + I18n:GlobalI18n; appBasePath:string; ng2Injector:Injector; OpenProject:OpenProject; diff --git a/frontend/tslint.json b/frontend/tslint.json deleted file mode 100644 index 03a9df2db76..00000000000 --- a/frontend/tslint.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "jsRules": { - "class-name": true, - "comment-format": [ - true, - "check-space" - ], - "indent": [ - true, - "spaces" - ], - "no-duplicate-variable": true, - "no-eval": true, - "no-trailing-whitespace": true, - "no-unsafe-finally": true, - "one-line": [ - true, - "check-open-brace", - "check-whitespace" - ], - "quotemark": false, - "semicolon": [ - true, - "always" - ], - "triple-equals": [ - true, - "allow-null-check" - ], - "variable-name": [ - true, - "ban-keywords" - ], - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator" - ] - }, - "rules": { - "class-name": true, - "curly": true, - "eofline": false, - "forin": true, - "indent": [ - true, - 4 - ], - "label-position": true, - "max-line-length": [ - false, - 140 - ], - "no-var-keyword": false, - "no-arg": true, - "no-bitwise": false, - "no-console": [ - true, - "debug", - "info", - "time", - "timeEnd", - "trace" - ], - "no-construct": true, - "no-debugger": true, - "no-duplicate-variable": true, - "no-empty": true, - "no-eval": true, - "no-string-literal": false, - "no-trailing-whitespace": true, - "no-use-before-declare": true, - "one-line": [ - true, - "check-open-brace", - "check-whitespace" - ], - "quotemark": false, - "radix": false, - "semicolon": true, - "triple-equals": [ - true, - "allow-null-check" - ], - "variable-name": false, - "whitespace": [ - true, - "check-branch", - "check-decl", - "check-operator", - "check-separator" - ], - "typedef-whitespace": [ - true, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - }, - { - "call-signature": "nospace", - "index-signature": "nospace", - "parameter": "nospace", - "property-declaration": "nospace", - "variable-declaration": "nospace" - } - ] - } -} diff --git a/frontend/tslint_typechecks.json b/frontend/tslint_typechecks.json deleted file mode 100644 index 6da4c55dbfa..00000000000 --- a/frontend/tslint_typechecks.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "rules": { - "await-promise": [true, "IPromise"], - "no-unnecessary-type-assertion": false, - "promise-function-async": false, - "no-for-in-array": true, - "no-unbound-method": [true, "ignore-static"], - "no-unsafe-any": false, - "no-void-expression": [false, "ignore-arrow-function-shorthand"], - "restrict-plus-operands": false, - "strict-type-predicates": false, - "prefer-readonly": false, - "no-boolean-literal-compare": true, - "no-unnecessary-qualifier": true, - "return-undefined": true - } -} diff --git a/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts b/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts index 4c8291e80b8..91312150d8e 100644 --- a/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts +++ b/modules/avatars/frontend/module/avatar-upload-form/avatar-upload-form.component.ts @@ -25,12 +25,12 @@ // // See docs/COPYRIGHT.rdoc for more details. //++ -import {Component, ElementRef, OnInit, ViewChild} from "@angular/core"; -import {I18nService} from "core-app/modules/common/i18n/i18n.service"; -import {OpenProjectFileUploadService} from "core-components/api/op-file-upload/op-file-upload.service"; -import {NotificationsService} from "core-app/modules/common/notifications/notifications.service"; -import {UploadFile} from "core-components/api/op-file-upload/op-file-upload.service"; -import {ImageHelpers} from "core-app/helpers/images/resizer"; +import { Component, ElementRef, OnInit, ViewChild } from "@angular/core"; +import { I18nService } from "core-app/modules/common/i18n/i18n.service"; +import { OpenProjectFileUploadService , UploadFile } from "core-components/api/op-file-upload/op-file-upload.service"; +import { NotificationsService } from "core-app/modules/common/notifications/notifications.service"; + +import { ImageHelpers } from "core-app/helpers/images/resizer"; @Component({ selector: 'avatar-upload-form', @@ -45,7 +45,7 @@ export class AvatarUploadFormComponent implements OnInit { // File public avatarFile:any; public avatarPreviewUrl:any; - public busy:boolean = false; + public busy = false; public fileInvalid = false; @ViewChild('avatarFilePicker', { static: true }) public avatarFilePicker:ElementRef; @@ -102,18 +102,18 @@ export class AvatarUploadFormComponent implements OnInit { upload[1].subscribe( (evt:any) => { switch (evt.type) { - case 0: // Sent - return; + case 0: // Sent + return; - case 4: - this.avatarFile.progress = 100; - this.busy = false; - window.location.reload(); - return; + case 4: + this.avatarFile.progress = 100; + this.busy = false; + window.location.reload(); + return; - default: - // Sent or unknown event - return; + default: + // Sent or unknown event + return; } }, (error:any) => { diff --git a/modules/avatars/frontend/module/main.ts b/modules/avatars/frontend/module/main.ts index a32ee659315..e964d4526bd 100644 --- a/modules/avatars/frontend/module/main.ts +++ b/modules/avatars/frontend/module/main.ts @@ -24,18 +24,18 @@ // // See docs/COPYRIGHT.rdoc for more details. -import {Injector, NgModule} from '@angular/core'; -import {CommonModule} from "@angular/common"; -import {AvatarUploadFormComponent} from "./avatar-upload-form/avatar-upload-form.component"; -import {HookService} from "../../hook-service"; +import { Injector, NgModule } from '@angular/core'; +import { CommonModule } from "@angular/common"; +import { AvatarUploadFormComponent } from "./avatar-upload-form/avatar-upload-form.component"; +import { HookService } from "../../hook-service"; @NgModule({ - imports: [ - CommonModule, - ], - declarations: [ - AvatarUploadFormComponent - ] + imports: [ + CommonModule, + ], + declarations: [ + AvatarUploadFormComponent + ] }) export class PluginModule { constructor(injector:Injector) { diff --git a/modules/budgets/frontend/module/augment/cost-budget-subform.augment.service.ts b/modules/budgets/frontend/module/augment/cost-budget-subform.augment.service.ts index bcd49cb4a4f..5462cf1c5a7 100644 --- a/modules/budgets/frontend/module/augment/cost-budget-subform.augment.service.ts +++ b/modules/budgets/frontend/module/augment/cost-budget-subform.augment.service.ts @@ -26,9 +26,9 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; -import {HttpClient} from '@angular/common/http'; -import {HalResourceNotificationService} from "core-app/modules/hal/services/hal-resource-notification.service"; +import { Injectable } from "@angular/core"; +import { HttpClient } from '@angular/common/http'; +import { HalResourceNotificationService } from "core-app/modules/hal/services/hal-resource-notification.service"; @Injectable() export class CostBudgetSubformAugmentService { @@ -39,7 +39,7 @@ export class CostBudgetSubformAugmentService { listen() { jQuery('costs-budget-subform').each((i, match) => { - let el = jQuery(match); + const el = jQuery(match); const container = el.find('.budget-item-container'); const templateEl = el.find('.budget-row-template'); @@ -49,7 +49,7 @@ export class CostBudgetSubformAugmentService { // Refresh row on changes el.on('change', '.budget-item-value', (evt) => { - let row = jQuery(evt.target).closest('.cost_entry'); + const row = jQuery(evt.target).closest('.cost_entry'); this.refreshRow(el, row.attr('id') as string); }); @@ -62,7 +62,7 @@ export class CostBudgetSubformAugmentService { // Add new row handler el.find('.budget-add-row').click((evt) => { evt.preventDefault(); - let row = jQuery(template.replace(/INDEX/g, rowIndex.toString())); + const row = jQuery(template.replace(/INDEX/g, rowIndex.toString())); row.show(); row.removeClass('budget-row-template'); container.append(row); @@ -76,8 +76,8 @@ export class CostBudgetSubformAugmentService { * Refreshes the given row after updating values */ public refreshRow(el:JQuery, row_identifier:string) { - let row = el.find('#' + row_identifier); - let request = this.buildRefreshRequest(row, row_identifier); + const row = el.find('#' + row_identifier); + const request = this.buildRefreshRequest(row, row_identifier); this.http .post( @@ -90,7 +90,7 @@ export class CostBudgetSubformAugmentService { .subscribe( (data:any) => { _.each(data, (val:string, selector:string) => { - let element = document.getElementById(selector) as HTMLElement|HTMLInputElement|undefined; + const element = document.getElementById(selector) as HTMLElement|HTMLInputElement|undefined; if (element instanceof HTMLInputElement) { element.value = val; } else if (element) { @@ -106,14 +106,14 @@ export class CostBudgetSubformAugmentService { * Returns the params for the update request */ private buildRefreshRequest(row:JQuery, row_identifier:string) { - let request:any = { + const request:any = { element_id: row_identifier, fixed_date: jQuery('#budget_fixed_date').val() }; // Augment common values with specific values for this type row.find('.budget-item-value').each((_i:number, el:any) => { - let field = jQuery(el); + const field = jQuery(el); request[field.data('requestKey')] = field.val() || '0'; }); diff --git a/modules/budgets/frontend/module/augment/cost-subform.augment.service.ts b/modules/budgets/frontend/module/augment/cost-subform.augment.service.ts index 1a4d83f6e88..08823d1e142 100644 --- a/modules/budgets/frontend/module/augment/cost-subform.augment.service.ts +++ b/modules/budgets/frontend/module/augment/cost-subform.augment.service.ts @@ -26,14 +26,14 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {Injectable} from "@angular/core"; +import { Injectable } from "@angular/core"; @Injectable() export class CostSubformAugmentService { constructor() { jQuery('costs-subform').each((i, match) => { - let el = jQuery(match); + const el = jQuery(match); const container = el.find('.subform-container'); @@ -50,7 +50,7 @@ export class CostSubformAugmentService { // Add new row handler el.find('.add-row-button,.wp-inline-create--add-link').click((evt:any) => { evt.preventDefault(); - let row = jQuery(template.replace(/INDEX/g, rowIndex.toString())); + const row = jQuery(template.replace(/INDEX/g, rowIndex.toString())); row.show(); row.removeClass('subform-row-template'); row.find('input.costs-date-picker').prop('required', true); diff --git a/modules/budgets/frontend/module/augment/planned-costs-form.ts b/modules/budgets/frontend/module/augment/planned-costs-form.ts index ff04ae7be32..4e74a9b913f 100644 --- a/modules/budgets/frontend/module/augment/planned-costs-form.ts +++ b/modules/budgets/frontend/module/augment/planned-costs-form.ts @@ -71,13 +71,13 @@ export class PlannedCostsFormAugment { private edit() { this.obj.hide(); - let id = this.obj[0].id; - let currency = this.getCurrency(); - let value = this.getValue(); - let name = this.objName; - let placeholder = this.placeholder; + const id = this.obj[0].id; + const currency = this.getCurrency(); + const value = this.getValue(); + const name = this.objName; + const placeholder = this.placeholder; - let template = ` + const template = `
    @@ -99,7 +99,7 @@ export class PlannedCostsFormAugment { jQuery(template).insertAfter(this.obj); - let that = this; + const that = this; jQuery('#' + id + '_cancel').on('click', function () { jQuery('#' + id + '_section').remove(); that.obj.show(); diff --git a/modules/budgets/frontend/module/hal/resources/budget-resource.ts b/modules/budgets/frontend/module/hal/resources/budget-resource.ts index 85bc853dc98..679640dedfd 100644 --- a/modules/budgets/frontend/module/hal/resources/budget-resource.ts +++ b/modules/budgets/frontend/module/hal/resources/budget-resource.ts @@ -24,8 +24,8 @@ // // See docs/COPYRIGHT.rdoc for more details. -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {Attachable} from 'core-app/modules/hal/resources/mixins/attachable-mixin'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { Attachable } from 'core-app/modules/hal/resources/mixins/attachable-mixin'; export interface BudgetResourceLinks { addAttachment(attachment:HalResource):Promise; diff --git a/modules/budgets/frontend/module/main.ts b/modules/budgets/frontend/module/main.ts index ea3e083b6a0..4bb43d5a16b 100644 --- a/modules/budgets/frontend/module/main.ts +++ b/modules/budgets/frontend/module/main.ts @@ -24,25 +24,25 @@ // // See docs/COPYRIGHT.rdoc for more details. -import {Injector, NgModule} from '@angular/core'; -import {OpenProjectPluginContext} from 'core-app/modules/plugins/plugin-context'; -import {BudgetResource} from './hal/resources/budget-resource'; -import {multiInput} from 'reactivestates'; -import {CostSubformAugmentService} from "./augment/cost-subform.augment.service"; -import {PlannedCostsFormAugment} from "core-app/modules/plugins/linked/budgets/augment/planned-costs-form"; -import {CostBudgetSubformAugmentService} from "core-app/modules/plugins/linked/budgets/augment/cost-budget-subform.augment.service"; +import { Injector, NgModule } from '@angular/core'; +import { OpenProjectPluginContext } from 'core-app/modules/plugins/plugin-context'; +import { BudgetResource } from './hal/resources/budget-resource'; +import { multiInput } from 'reactivestates'; +import { CostSubformAugmentService } from "./augment/cost-subform.augment.service"; +import { PlannedCostsFormAugment } from "core-app/modules/plugins/linked/budgets/augment/planned-costs-form"; +import { CostBudgetSubformAugmentService } from "core-app/modules/plugins/linked/budgets/augment/cost-budget-subform.augment.service"; export function initializeCostsPlugin(injector:Injector) { window.OpenProject.getPluginContext().then((pluginContext:OpenProjectPluginContext) => { pluginContext.services.editField.extendFieldType('select', ['Budget']); - let displayFieldService = pluginContext.services.displayField; + const displayFieldService = pluginContext.services.displayField; displayFieldService.extendFieldType('resource', ['Budget']); - let halResourceService = pluginContext.services.halResource; - halResourceService.registerResource('Budget', {cls: BudgetResource}); + const halResourceService = pluginContext.services.halResource; + halResourceService.registerResource('Budget', { cls: BudgetResource }); - let states = pluginContext.services.states; + const states = pluginContext.services.states; states.add('budgets', multiInput()); // Augment previous cost-subforms diff --git a/modules/costs/frontend/module/main.ts b/modules/costs/frontend/module/main.ts index 862d7155419..d6ab90df53a 100644 --- a/modules/costs/frontend/module/main.ts +++ b/modules/costs/frontend/module/main.ts @@ -24,14 +24,14 @@ // // See docs/COPYRIGHT.rdoc for more details. -import {Injector, NgModule} from '@angular/core'; -import {OpenProjectPluginContext} from 'core-app/modules/plugins/plugin-context'; -import {CostsByTypeDisplayField} from './wp-display/costs-by-type-display-field.module'; -import {CurrencyDisplayField} from './wp-display/currency-display-field.module'; +import { Injector, NgModule } from '@angular/core'; +import { OpenProjectPluginContext } from 'core-app/modules/plugins/plugin-context'; +import { CostsByTypeDisplayField } from './wp-display/costs-by-type-display-field.module'; +import { CurrencyDisplayField } from './wp-display/currency-display-field.module'; export function initializeCostsPlugin(injector:Injector) { window.OpenProject.getPluginContext().then((pluginContext:OpenProjectPluginContext) => { - let displayFieldService = pluginContext.services.displayField; + const displayFieldService = pluginContext.services.displayField; displayFieldService.addFieldType(CostsByTypeDisplayField, 'costs', ['costsByType']); displayFieldService.addFieldType(CurrencyDisplayField, 'currency', ['laborCosts', 'materialCosts', 'overallCosts']); @@ -40,7 +40,7 @@ export function initializeCostsPlugin(injector:Injector) { key: 'log_costs', icon: 'icon-projects', indexBy: function (actions:any) { - let index = _.findIndex(actions, {key: 'log_time'}); + const index = _.findIndex(actions, { key: 'log_time' }); return index !== -1 ? index + 1 : actions.length; }, resource: 'workPackage', @@ -54,7 +54,7 @@ export function initializeCostsPlugin(injector:Injector) { icon: 'icon-projects', link: 'logCosts', indexBy: function (actions:any) { - let index = _.findIndex(actions, {link: 'logTime'}); + const index = _.findIndex(actions, { link: 'logTime' }); return index !== -1 ? index + 1 : actions.length; }, text: I18n.t('js.button_log_costs'), diff --git a/modules/costs/frontend/module/wp-display/costs-by-type-display-field.module.ts b/modules/costs/frontend/module/wp-display/costs-by-type-display-field.module.ts index 5696f5fed0d..e745ae29627 100644 --- a/modules/costs/frontend/module/wp-display/costs-by-type-display-field.module.ts +++ b/modules/costs/frontend/module/wp-display/costs-by-type-display-field.module.ts @@ -27,10 +27,10 @@ //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; -import {IFieldSchema} from "core-app/modules/fields/field.base"; -import {InjectField} from "core-app/helpers/angular/inject-field.decorator"; -import {APIV3Service} from "core-app/modules/apiv3/api-v3.service"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; +import { IFieldSchema } from "core-app/modules/fields/field.base"; +import { InjectField } from "core-app/helpers/angular/inject-field.decorator"; +import { APIV3Service } from "core-app/modules/apiv3/api-v3.service"; interface ICostsByType { costObjectId:string; @@ -49,84 +49,84 @@ export class CostsByTypeDisplayField extends DisplayField { @InjectField() apiV3Service:APIV3Service; public apply(resource:any, schema:IFieldSchema) { - super.apply(resource, schema); - this.loadIfNecessary(); + super.apply(resource, schema); + this.loadIfNecessary(); } protected loadIfNecessary() { - if (this.value && this.value.$loaded === false) { - this.value.$load().then(() => { + if (this.value && this.value.$loaded === false) { + this.value.$load().then(() => { - if (this.resource.$source._type === 'WorkPackage') { - this - .apiV3Service - .work_packages - .cache - .touch(this.resource.id!); - } - }); - } + if (this.resource.$source._type === 'WorkPackage') { + this + .apiV3Service + .work_packages + .cache + .touch(this.resource.id!); + } + }); + } } public get title() { - return ''; + return ''; } public render(element:HTMLElement, displayText:string):void { - if (this.isEmpty()) { - element.textContent = this.placeholder; - return; - } + if (this.isEmpty()) { + element.textContent = this.placeholder; + return; + } - this.value.elements.forEach((val:ICostsByType, i:number) => { - if (this.resource.showCosts) { - this.renderCostAsLink(val, element, i); - } else { - this.renderCostAsText(val, element, i); - } - }); + this.value.elements.forEach((val:ICostsByType, i:number) => { + if (this.resource.showCosts) { + this.renderCostAsLink(val, element, i); + } else { + this.renderCostAsText(val, element, i); + } + }); } public isEmpty():boolean { - return !this.value || + return !this.value || !this.value.elements || this.value.elements.length === 0; } - /** + /** * Render link to reporting */ - private renderCostAsLink(val:ICostsByType, element:HTMLElement, i:number) { - const showCosts = this.resource.showCosts; - const link = document.createElement('a') as HTMLAnchorElement; + private renderCostAsLink(val:ICostsByType, element:HTMLElement, i:number) { + const showCosts = this.resource.showCosts; + const link = document.createElement('a') as HTMLAnchorElement; - link.href = showCosts.href + '&unit=' + val.costType.id; - link.setAttribute('target', '_blank'); - link.textContent = val.spentUnits + ' ' + val.costType.name; - element.appendChild(link); + link.href = showCosts.href + '&unit=' + val.costType.id; + link.setAttribute('target', '_blank'); + link.textContent = val.spentUnits + ' ' + val.costType.name; + element.appendChild(link); - this.addSeparator(element, i); - } + this.addSeparator(element, i); + } - /** + /** * Render text */ - private renderCostAsText(val:ICostsByType, element:HTMLElement, i:number) { - const span = document.createElement('span'); - span.textContent = val.spentUnits + ' ' + val.costType.name; - element.appendChild(span); - this.addSeparator(element, i); - } - - private addSeparator(element:HTMLElement, i:Number) { - if (i < this.value.elements.length - 1) { - const sep = document.createElement('span'); - sep.textContent = ', '; - - element.appendChild(sep); + private renderCostAsText(val:ICostsByType, element:HTMLElement, i:number) { + const span = document.createElement('span'); + span.textContent = val.spentUnits + ' ' + val.costType.name; + element.appendChild(span); + this.addSeparator(element, i); + } + + private addSeparator(element:HTMLElement, i:number) { + if (i < this.value.elements.length - 1) { + const sep = document.createElement('span'); + sep.textContent = ', '; + + element.appendChild(sep); + } } - } } diff --git a/modules/costs/frontend/module/wp-display/currency-display-field.module.ts b/modules/costs/frontend/module/wp-display/currency-display-field.module.ts index 0020bd9e695..0ed23375c6d 100644 --- a/modules/costs/frontend/module/wp-display/currency-display-field.module.ts +++ b/modules/costs/frontend/module/wp-display/currency-display-field.module.ts @@ -26,13 +26,13 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {DisplayField} from "core-app/modules/fields/display/display-field.module"; +import { DisplayField } from "core-app/modules/fields/display/display-field.module"; export class CurrencyDisplayField extends DisplayField { - public isEmpty():boolean { - return !this.value || + public isEmpty():boolean { + return !this.value || !parseFloat(this.value.match(/\d+/g)[0]); - } + } } diff --git a/modules/documents/frontend/module/hal/resources/document-resource.ts b/modules/documents/frontend/module/hal/resources/document-resource.ts index b64f79c32c7..f164413711a 100644 --- a/modules/documents/frontend/module/hal/resources/document-resource.ts +++ b/modules/documents/frontend/module/hal/resources/document-resource.ts @@ -28,8 +28,8 @@ // This resource exists solely for the purpose of uploading attachments via the // WYSIWYIG editor. -import {HalResource} from 'core-app/modules/hal/resources/hal-resource'; -import {Attachable} from 'core-app/modules/hal/resources/mixins/attachable-mixin'; +import { HalResource } from 'core-app/modules/hal/resources/hal-resource'; +import { Attachable } from 'core-app/modules/hal/resources/mixins/attachable-mixin'; export interface DocumentResourceLinks { addAttachment(attachment:HalResource):Promise; @@ -43,5 +43,4 @@ class DocumentBaseResource extends HalResource { export const DocumentResource = Attachable(DocumentBaseResource); -export interface DocumentResource extends DocumentBaseResource { -} +export type DocumentResource = DocumentBaseResource; diff --git a/modules/documents/frontend/module/main.ts b/modules/documents/frontend/module/main.ts index 068e58646cd..ad796a58324 100644 --- a/modules/documents/frontend/module/main.ts +++ b/modules/documents/frontend/module/main.ts @@ -26,18 +26,18 @@ // See docs/COPYRIGHT.rdoc for more details. //++ -import {NgModule} from '@angular/core'; -import {OpenProjectPluginContext} from "core-app/modules/plugins/plugin-context"; -import {DocumentResource} from './hal/resources/document-resource'; -import {multiInput} from 'reactivestates'; +import { NgModule } from '@angular/core'; +import { OpenProjectPluginContext } from "core-app/modules/plugins/plugin-context"; +import { DocumentResource } from './hal/resources/document-resource'; +import { multiInput } from 'reactivestates'; export function initializeDocumentPlugin() { window.OpenProject.getPluginContext() .then((pluginContext:OpenProjectPluginContext) => { - let halResourceService = pluginContext.services.halResource; - halResourceService.registerResource('Document', {cls: DocumentResource}); + const halResourceService = pluginContext.services.halResource; + halResourceService.registerResource('Document', { cls: DocumentResource }); - let states = pluginContext.services.states; + const states = pluginContext.services.states; states.add('documents', multiInput()); }); }