ngx-edu-sharing-ui 0.7.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/scss/mixins.scss +4 -1
- package/assets/scss/variables.scss +3 -0
- package/esm2022/lib/actionbar/actionbar.component.mjs +188 -0
- package/esm2022/lib/common/edu-sharing-ui-common.module.mjs +134 -0
- package/esm2022/lib/directives/border-box-observer.directive.mjs +71 -0
- package/esm2022/lib/directives/check-text-overflow.directive.mjs +65 -0
- package/esm2022/lib/directives/drag-nodes/drag-nodes.mjs +14 -0
- package/esm2022/lib/directives/drag-nodes/nodes-drag-source.directive.mjs +79 -0
- package/esm2022/lib/directives/drag-nodes/nodes-drag.directive.mjs +49 -0
- package/esm2022/lib/directives/drag-nodes/nodes-drop-target.directive.mjs +105 -0
- package/esm2022/lib/directives/focus-state.directive.mjs +44 -0
- package/esm2022/lib/directives/icon.directive.mjs +139 -0
- package/esm2022/lib/dropdown/dropdown.component.mjs +70 -0
- package/esm2022/lib/edu-sharing-ui-configuration.mjs +41 -0
- package/esm2022/lib/edu-sharing-ui.module.mjs +78 -0
- package/esm2022/lib/list-items/available-widgets.mjs +27 -0
- package/esm2022/lib/list-items/format-duration.pipe.mjs +20 -0
- package/esm2022/lib/list-items/list-base/list-base.component.mjs +46 -0
- package/esm2022/lib/list-items/list-collection-info/list-collection-info.component.mjs +29 -0
- package/esm2022/lib/list-items/list-counts/list-counts.component.mjs +54 -0
- package/esm2022/lib/list-items/list-items.module.mjs +50 -0
- package/esm2022/lib/list-items/list-node-license/list-node-license.component.mjs +41 -0
- package/esm2022/lib/list-items/list-node-replication-source/list-node-replication-source.component.mjs +47 -0
- package/esm2022/lib/list-items/list-node-workflow/list-node-workflow.component.mjs +24 -0
- package/esm2022/lib/list-items/list-text/list-text.component.mjs +106 -0
- package/esm2022/lib/list-items/list-widget.mjs +49 -0
- package/esm2022/lib/list-items/node-row/node-row.component.mjs +24 -0
- package/esm2022/lib/list-items/node-source.pipe.mjs +49 -0
- package/esm2022/lib/node-entries/combined-data-source.mjs +41 -0
- package/esm2022/lib/node-entries/custom-templates-data-source.mjs +7 -0
- package/esm2022/lib/node-entries/drag-preview/drag-preview.component.mjs +21 -0
- package/esm2022/lib/node-entries/entries-model.mjs +23 -0
- package/esm2022/lib/node-entries/items-cap.mjs +47 -0
- package/esm2022/lib/node-entries/list-item-label.pipe.mjs +34 -0
- package/esm2022/lib/node-entries/node-cache.mjs +65 -0
- package/esm2022/lib/node-entries/node-data-source-remote.mjs +4 -0
- package/esm2022/lib/node-entries/node-data-source.mjs +115 -0
- package/esm2022/lib/node-entries/node-entries-card/node-entries-card.component.mjs +131 -0
- package/esm2022/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.mjs +307 -0
- package/esm2022/lib/node-entries/node-entries-card-small/node-entries-card-small.component.mjs +45 -0
- package/esm2022/lib/node-entries/node-entries-global-options/node-entries-global-options.component.mjs +23 -0
- package/esm2022/lib/node-entries/node-entries-global.service.mjs +58 -0
- package/esm2022/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.mjs +42 -0
- package/esm2022/lib/node-entries/node-entries-table/node-entries-table.component.mjs +290 -0
- package/esm2022/lib/node-entries/node-entries-templates.service.mjs +11 -0
- package/esm2022/lib/node-entries/node-entries-wrapper.component.mjs +324 -0
- package/esm2022/lib/node-entries/node-entries.component.mjs +131 -0
- package/esm2022/lib/node-entries/node-entries.module.mjs +161 -0
- package/esm2022/lib/node-entries/node-rating/node-rating.component.mjs +102 -0
- package/esm2022/lib/node-entries/node-stats-badges/node-stats-badges.component.mjs +48 -0
- package/esm2022/lib/node-entries/node-type-badge/node-type-badge.component.mjs +36 -0
- package/esm2022/lib/node-entries/option-button/option-button.component.mjs +62 -0
- package/esm2022/lib/node-entries/preview-image/preview-image.component.mjs +53 -0
- package/esm2022/lib/node-entries/sort-select-panel/sort-select-panel.component.mjs +41 -0
- package/esm2022/lib/node-url/node-url.component.mjs +128 -0
- package/esm2022/lib/pipes/file-size.pipe.mjs +31 -0
- package/esm2022/lib/pipes/format-date.pipe.mjs +38 -0
- package/esm2022/lib/pipes/node-icon.pipe.mjs +18 -0
- package/esm2022/lib/pipes/node-image-size.pipe.mjs +24 -0
- package/esm2022/lib/pipes/node-image.pipe.mjs +55 -0
- package/esm2022/lib/pipes/node-person-name.pipe.mjs +50 -0
- package/esm2022/lib/pipes/node-title.pipe.mjs +19 -0
- package/esm2022/lib/pipes/option-tooltip.pipe.mjs +33 -0
- package/esm2022/lib/pipes/replace-chars.pipe.mjs +29 -0
- package/esm2022/lib/pipes/vcard-name.pipe.mjs +19 -0
- package/esm2022/lib/services/abstract/app.service.mjs +3 -0
- package/esm2022/lib/services/abstract/keyboard-shortcuts.service.mjs +10 -0
- package/esm2022/lib/services/abstract/options-helper.service.mjs +3 -0
- package/esm2022/lib/services/abstract/toast.service.mjs +3 -0
- package/esm2022/lib/services/accessibility.service.mjs +73 -0
- package/esm2022/lib/services/local-events.service.mjs +36 -0
- package/esm2022/lib/services/node-entries.service.mjs +137 -0
- package/esm2022/lib/services/node-helper.service.mjs +234 -0
- package/esm2022/lib/services/nodes-drag-drop.service.mjs +155 -0
- package/esm2022/lib/services/options-helper-data.service.mjs +134 -0
- package/esm2022/lib/services/repo-url.service.mjs +49 -0
- package/esm2022/lib/services/temporary-storage.service.mjs +48 -0
- package/esm2022/lib/services/ui.service.mjs +162 -0
- package/esm2022/lib/sort-dropdown/sort-dropdown.component.mjs +50 -0
- package/esm2022/lib/spinner/spinner.component.mjs +18 -0
- package/esm2022/lib/translations/fallback-translation-handler.mjs +6 -0
- package/esm2022/lib/translations/languages.mjs +5 -0
- package/esm2022/lib/translations/translation-loader.mjs +149 -0
- package/esm2022/lib/translations/translation-source.mjs +11 -0
- package/esm2022/lib/translations/translations.module.mjs +67 -0
- package/esm2022/lib/translations/translations.service.mjs +171 -0
- package/esm2022/lib/types/accessibillity.mjs +19 -0
- package/esm2022/lib/types/api-models.mjs +2 -0
- package/esm2022/lib/types/drag-drop.mjs +2 -0
- package/esm2022/lib/types/keyboard-shortcuts.mjs +11 -0
- package/esm2022/lib/types/list-item.mjs +41 -0
- package/esm2022/lib/types/option-item.mjs +174 -0
- package/esm2022/lib/types/workflow.mjs +25 -0
- package/esm2022/lib/util/DateHelper.mjs +200 -0
- package/esm2022/lib/util/VCard.mjs +278 -0
- package/esm2022/lib/util/color-helper.mjs +124 -0
- package/esm2022/lib/util/duration-helper.mjs +102 -0
- package/esm2022/lib/util/functions.mjs +13 -0
- package/esm2022/lib/util/helper.mjs +64 -0
- package/esm2022/lib/util/isNumeric.mjs +11 -0
- package/esm2022/lib/util/rest-helper.mjs +33 -0
- package/esm2022/lib/util/ui-animation.mjs +146 -0
- package/esm2022/lib/util/ui-constants.mjs +21 -0
- package/esm2022/module.mjs +76 -0
- package/esm2022/ngx-edu-sharing-ui.mjs +5 -0
- package/fesm2022/ngx-edu-sharing-ui.mjs +6509 -0
- package/fesm2022/ngx-edu-sharing-ui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/actionbar/actionbar.component.d.ts +74 -0
- package/lib/common/edu-sharing-ui-common.module.d.ts +32 -0
- package/lib/directives/border-box-observer.directive.d.ts +31 -0
- package/lib/directives/check-text-overflow.directive.d.ts +20 -0
- package/lib/directives/drag-nodes/drag-nodes.d.ts +16 -0
- package/lib/directives/drag-nodes/nodes-drag-source.directive.d.ts +37 -0
- package/lib/directives/drag-nodes/nodes-drag.directive.d.ts +17 -0
- package/lib/directives/drag-nodes/nodes-drop-target.directive.d.ts +22 -0
- package/lib/directives/focus-state.directive.d.ts +14 -0
- package/lib/directives/icon.directive.d.ts +46 -0
- package/lib/dropdown/dropdown.component.d.ts +40 -0
- package/lib/edu-sharing-ui-configuration.d.ts +11 -0
- package/lib/edu-sharing-ui.module.d.ts +19 -0
- package/lib/list-items/available-widgets.d.ts +13 -0
- package/lib/list-items/format-duration.pipe.d.ts +10 -0
- package/lib/list-items/list-base/list-base.component.d.ts +18 -0
- package/lib/list-items/list-collection-info/list-collection-info.component.d.ts +14 -0
- package/lib/list-items/list-counts/list-counts.component.d.ts +13 -0
- package/lib/list-items/list-items.module.d.ts +20 -0
- package/lib/list-items/list-node-license/list-node-license.component.d.ts +20 -0
- package/lib/list-items/list-node-replication-source/list-node-replication-source.component.d.ts +22 -0
- package/lib/list-items/list-node-workflow/list-node-workflow.component.d.ts +12 -0
- package/lib/list-items/list-text/list-text.component.d.ts +28 -0
- package/lib/list-items/list-widget.d.ts +32 -0
- package/lib/list-items/node-row/node-row.component.d.ts +12 -0
- package/lib/list-items/node-source.pipe.d.ts +16 -0
- package/lib/node-entries/combined-data-source.d.ts +19 -0
- package/{src/lib/node-entries/custom-templates-data-source.ts → lib/node-entries/custom-templates-data-source.d.ts} +2 -2
- package/lib/node-entries/drag-preview/drag-preview.component.d.ts +11 -0
- package/{src/lib/node-entries/entries-model.ts → lib/node-entries/entries-model.d.ts} +19 -47
- package/lib/node-entries/items-cap.d.ts +17 -0
- package/lib/node-entries/list-item-label.pipe.d.ts +14 -0
- package/lib/node-entries/node-cache.d.ts +17 -0
- package/{src/lib/node-entries/node-data-source-remote.ts → lib/node-entries/node-data-source-remote.d.ts} +2 -12
- package/lib/node-entries/node-data-source.d.ts +42 -0
- package/lib/node-entries/node-entries-card/node-entries-card.component.d.ts +45 -0
- package/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.d.ts +92 -0
- package/lib/node-entries/node-entries-card-small/node-entries-card-small.component.d.ts +23 -0
- package/lib/node-entries/node-entries-global-options/node-entries-global-options.component.d.ts +12 -0
- package/lib/node-entries/node-entries-global.service.d.ts +50 -0
- package/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.d.ts +17 -0
- package/lib/node-entries/node-entries-table/node-entries-table.component.d.ts +76 -0
- package/{src/lib/node-entries/node-entries-templates.service.ts → lib/node-entries/node-entries-templates.service.d.ts} +6 -9
- package/lib/node-entries/node-entries-wrapper.component.d.ts +129 -0
- package/lib/node-entries/node-entries.component.d.ts +32 -0
- package/lib/node-entries/node-entries.module.d.ts +43 -0
- package/lib/node-entries/node-rating/node-rating.component.d.ts +26 -0
- package/lib/node-entries/node-stats-badges/node-stats-badges.component.d.ts +17 -0
- package/lib/node-entries/node-type-badge/node-type-badge.component.d.ts +21 -0
- package/lib/node-entries/option-button/option-button.component.d.ts +11 -0
- package/lib/node-entries/preview-image/preview-image.component.d.ts +22 -0
- package/lib/node-entries/sort-select-panel/sort-select-panel.component.d.ts +16 -0
- package/lib/node-url/node-url.component.d.ts +51 -0
- package/lib/pipes/file-size.pipe.d.ts +10 -0
- package/lib/pipes/format-date.pipe.d.ts +21 -0
- package/lib/pipes/node-icon.pipe.d.ts +11 -0
- package/lib/pipes/node-image-size.pipe.d.ts +8 -0
- package/lib/pipes/node-image.pipe.d.ts +28 -0
- package/lib/pipes/node-person-name.pipe.d.ts +10 -0
- package/lib/pipes/node-title.pipe.d.ts +11 -0
- package/lib/pipes/option-tooltip.pipe.d.ts +12 -0
- package/lib/pipes/replace-chars.pipe.d.ts +10 -0
- package/lib/pipes/vcard-name.pipe.d.ts +10 -0
- package/{src/lib/services/abstract/app.service.ts → lib/services/abstract/app.service.d.ts} +1 -1
- package/lib/services/abstract/keyboard-shortcuts.service.d.ts +11 -0
- package/lib/services/abstract/options-helper.service.d.ts +10 -0
- package/{src/lib/services/abstract/toast.service.ts → lib/services/abstract/toast.service.d.ts} +1 -2
- package/lib/services/accessibility.service.d.ts +18 -0
- package/{src/lib/services/local-events.service.ts → lib/services/local-events.service.d.ts} +7 -10
- package/lib/services/node-entries.service.d.ts +69 -0
- package/lib/services/node-helper.service.d.ts +56 -0
- package/lib/services/nodes-drag-drop.service.d.ts +41 -0
- package/lib/services/options-helper-data.service.d.ts +75 -0
- package/lib/services/repo-url.service.d.ts +25 -0
- package/lib/services/temporary-storage.service.d.ts +35 -0
- package/lib/services/ui.service.d.ts +41 -0
- package/lib/sort-dropdown/sort-dropdown.component.d.ts +15 -0
- package/lib/spinner/spinner.component.d.ts +7 -0
- package/lib/translations/fallback-translation-handler.d.ts +4 -0
- package/lib/translations/languages.d.ts +4 -0
- package/lib/translations/translation-loader.d.ts +51 -0
- package/{src/lib/translations/translation-source.ts → lib/translations/translation-source.d.ts} +4 -4
- package/lib/translations/translations.module.d.ts +15 -0
- package/lib/translations/translations.service.d.ts +30 -0
- package/lib/types/accessibillity.d.ts +15 -0
- package/{src/lib/types/drag-drop.ts → lib/types/drag-drop.d.ts} +0 -3
- package/lib/types/keyboard-shortcuts.d.ts +10 -0
- package/lib/types/list-item.d.ts +55 -0
- package/lib/types/option-item.d.ts +236 -0
- package/lib/types/workflow.d.ts +14 -0
- package/lib/util/DateHelper.d.ts +44 -0
- package/lib/util/VCard.d.ts +66 -0
- package/lib/util/color-helper.d.ts +25 -0
- package/lib/util/duration-helper.d.ts +14 -0
- package/lib/util/functions.d.ts +4 -0
- package/lib/util/helper.d.ts +20 -0
- package/lib/util/isNumeric.d.ts +5 -0
- package/lib/util/rest-helper.d.ts +10 -0
- package/lib/util/ui-animation.d.ts +39 -0
- package/lib/util/ui-constants.d.ts +18 -0
- package/{src/module.ts → module.d.ts} +0 -4
- package/package.json +23 -9
- package/.browserslistrc +0 -16
- package/.eslintrc.json +0 -44
- package/karma.conf.js +0 -42
- package/ng-package.json +0 -10
- package/src/lib/actionbar/actionbar.component.html +0 -59
- package/src/lib/actionbar/actionbar.component.scss +0 -123
- package/src/lib/actionbar/actionbar.component.ts +0 -174
- package/src/lib/common/edu-sharing-ui-common.module.ts +0 -80
- package/src/lib/directives/border-box-observer.directive.ts +0 -75
- package/src/lib/directives/check-text-overflow.directive.ts +0 -61
- package/src/lib/directives/drag-nodes/drag-nodes.ts +0 -32
- package/src/lib/directives/drag-nodes/nodes-drag-source.directive.ts +0 -79
- package/src/lib/directives/drag-nodes/nodes-drag.directive.ts +0 -43
- package/src/lib/directives/drag-nodes/nodes-drop-target.directive.ts +0 -116
- package/src/lib/directives/focus-state.directive.ts +0 -34
- package/src/lib/directives/icon.directive.ts +0 -142
- package/src/lib/directives/nodes-drop-target-legacy.directive.ts +0 -155
- package/src/lib/dropdown/dropdown.component.html +0 -32
- package/src/lib/dropdown/dropdown.component.scss +0 -67
- package/src/lib/dropdown/dropdown.component.ts +0 -71
- package/src/lib/edu-sharing-ui-configuration.ts +0 -47
- package/src/lib/edu-sharing-ui.module.ts +0 -49
- package/src/lib/list-items/available-widgets.ts +0 -30
- package/src/lib/list-items/format-duration.pipe.ts +0 -17
- package/src/lib/list-items/list-base/list-base.component.html +0 -52
- package/src/lib/list-items/list-base/list-base.component.ts +0 -44
- package/src/lib/list-items/list-collection-info/list-collection-info.component.html +0 -48
- package/src/lib/list-items/list-collection-info/list-collection-info.component.scss +0 -8
- package/src/lib/list-items/list-collection-info/list-collection-info.component.ts +0 -24
- package/src/lib/list-items/list-counts/list-counts.component.html +0 -1
- package/src/lib/list-items/list-counts/list-counts.component.scss +0 -3
- package/src/lib/list-items/list-counts/list-counts.component.ts +0 -59
- package/src/lib/list-items/list-items.module.ts +0 -33
- package/src/lib/list-items/list-node-license/list-node-license.component.html +0 -8
- package/src/lib/list-items/list-node-license/list-node-license.component.ts +0 -47
- package/src/lib/list-items/list-node-replication-source/list-node-replication-source.component.html +0 -11
- package/src/lib/list-items/list-node-replication-source/list-node-replication-source.component.ts +0 -60
- package/src/lib/list-items/list-node-workflow/list-node-workflow.component.html +0 -3
- package/src/lib/list-items/list-node-workflow/list-node-workflow.component.ts +0 -21
- package/src/lib/list-items/list-text/list-text.component.html +0 -176
- package/src/lib/list-items/list-text/list-text.component.scss +0 -3
- package/src/lib/list-items/list-text/list-text.component.ts +0 -107
- package/src/lib/list-items/list-widget.ts +0 -52
- package/src/lib/list-items/node-row/node-row.component.html +0 -31
- package/src/lib/list-items/node-row/node-row.component.scss +0 -50
- package/src/lib/list-items/node-row/node-row.component.ts +0 -16
- package/src/lib/list-items/node-source.pipe.ts +0 -48
- package/src/lib/node-entries/combined-data-source.ts +0 -51
- package/src/lib/node-entries/drag-preview/drag-preview.component.html +0 -6
- package/src/lib/node-entries/drag-preview/drag-preview.component.scss +0 -35
- package/src/lib/node-entries/drag-preview/drag-preview.component.ts +0 -15
- package/src/lib/node-entries/items-cap.ts +0 -54
- package/src/lib/node-entries/list-item-label.pipe.ts +0 -28
- package/src/lib/node-entries/mixins.scss +0 -23
- package/src/lib/node-entries/node-cache.spec.ts +0 -199
- package/src/lib/node-entries/node-cache.ts +0 -81
- package/src/lib/node-entries/node-data-source.ts +0 -148
- package/src/lib/node-entries/node-entries-card/node-entries-card.component.html +0 -167
- package/src/lib/node-entries/node-entries-card/node-entries-card.component.scss +0 -28
- package/src/lib/node-entries/node-entries-card/node-entries-card.component.ts +0 -132
- package/src/lib/node-entries/node-entries-card/node-entries-card.main.scss +0 -261
- package/src/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.html +0 -205
- package/src/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.scss +0 -181
- package/src/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.ts +0 -361
- package/src/lib/node-entries/node-entries-card-small/node-entries-card-small.component.html +0 -100
- package/src/lib/node-entries/node-entries-card-small/node-entries-card-small.component.scss +0 -46
- package/src/lib/node-entries/node-entries-card-small/node-entries-card-small.component.ts +0 -40
- package/src/lib/node-entries/node-entries-global-options/node-entries-global-options.component.html +0 -23
- package/src/lib/node-entries/node-entries-global-options/node-entries-global-options.component.scss +0 -58
- package/src/lib/node-entries/node-entries-global-options/node-entries-global-options.component.ts +0 -16
- package/src/lib/node-entries/node-entries-global.service.ts +0 -79
- package/src/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.html +0 -25
- package/src/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.scss +0 -32
- package/src/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.ts +0 -31
- package/src/lib/node-entries/node-entries-table/node-entries-table.component.html +0 -270
- package/src/lib/node-entries/node-entries-table/node-entries-table.component.scss +0 -169
- package/src/lib/node-entries/node-entries-table/node-entries-table.component.ts +0 -333
- package/src/lib/node-entries/node-entries-wrapper.component.ts +0 -363
- package/src/lib/node-entries/node-entries.component.html +0 -33
- package/src/lib/node-entries/node-entries.component.scss +0 -13
- package/src/lib/node-entries/node-entries.component.ts +0 -151
- package/src/lib/node-entries/node-entries.module.ts +0 -93
- package/src/lib/node-entries/node-rating/node-rating.component.html +0 -53
- package/src/lib/node-entries/node-rating/node-rating.component.scss +0 -31
- package/src/lib/node-entries/node-rating/node-rating.component.ts +0 -105
- package/src/lib/node-entries/node-stats-badges/node-stats-badges.component.html +0 -39
- package/src/lib/node-entries/node-stats-badges/node-stats-badges.component.scss +0 -44
- package/src/lib/node-entries/node-stats-badges/node-stats-badges.component.ts +0 -43
- package/src/lib/node-entries/node-type-badge/node-type-badge.component.html +0 -31
- package/src/lib/node-entries/node-type-badge/node-type-badge.component.scss +0 -5
- package/src/lib/node-entries/node-type-badge/node-type-badge.component.ts +0 -36
- package/src/lib/node-entries/option-button/option-button.component.ts +0 -42
- package/src/lib/node-entries/preview-image/preview-image.component.html +0 -19
- package/src/lib/node-entries/preview-image/preview-image.component.scss +0 -31
- package/src/lib/node-entries/preview-image/preview-image.component.ts +0 -47
- package/src/lib/node-entries/sort-select-panel/sort-select-panel.component.html +0 -27
- package/src/lib/node-entries/sort-select-panel/sort-select-panel.component.scss +0 -9
- package/src/lib/node-entries/sort-select-panel/sort-select-panel.component.ts +0 -26
- package/src/lib/node-url/node-url.component.html +0 -66
- package/src/lib/node-url/node-url.component.scss +0 -32
- package/src/lib/node-url/node-url.component.ts +0 -136
- package/src/lib/pipes/file-size.pipe.ts +0 -24
- package/src/lib/pipes/format-date.pipe.ts +0 -39
- package/src/lib/pipes/node-icon.pipe.ts +0 -11
- package/src/lib/pipes/node-image-size.pipe.ts +0 -18
- package/src/lib/pipes/node-image.pipe.ts +0 -71
- package/src/lib/pipes/node-person-name.pipe.ts +0 -41
- package/src/lib/pipes/node-title.pipe.ts +0 -12
- package/src/lib/pipes/option-tooltip.pipe.ts +0 -32
- package/src/lib/pipes/replace-chars.pipe.ts +0 -21
- package/src/lib/pipes/vcard-name.pipe.ts +0 -11
- package/src/lib/services/abstract/keyboard-shortcuts.service.ts +0 -10
- package/src/lib/services/abstract/options-helper.service.ts +0 -29
- package/src/lib/services/accessibility.service.ts +0 -101
- package/src/lib/services/node-entries.service.ts +0 -172
- package/src/lib/services/node-helper.service.ts +0 -239
- package/src/lib/services/nodes-drag-drop.service.ts +0 -165
- package/src/lib/services/options-helper-data.service.ts +0 -186
- package/src/lib/services/repo-url.service.ts +0 -46
- package/src/lib/services/temporary-storage.service.ts +0 -58
- package/src/lib/services/ui.service.ts +0 -182
- package/src/lib/sort-dropdown/sort-dropdown.component.html +0 -22
- package/src/lib/sort-dropdown/sort-dropdown.component.scss +0 -47
- package/src/lib/sort-dropdown/sort-dropdown.component.ts +0 -42
- package/src/lib/spinner/spinner.component.html +0 -14
- package/src/lib/spinner/spinner.component.scss +0 -141
- package/src/lib/spinner/spinner.component.ts +0 -12
- package/src/lib/translations/README.md +0 -44
- package/src/lib/translations/fallback-translation-handler.ts +0 -7
- package/src/lib/translations/languages.ts +0 -6
- package/src/lib/translations/translation-loader.spec.ts +0 -352
- package/src/lib/translations/translation-loader.ts +0 -189
- package/src/lib/translations/translations.module.ts +0 -49
- package/src/lib/translations/translations.service.spec.ts +0 -152
- package/src/lib/translations/translations.service.ts +0 -188
- package/src/lib/types/accessibillity.ts +0 -15
- package/src/lib/types/keyboard-shortcuts.ts +0 -29
- package/src/lib/types/list-item.ts +0 -67
- package/src/lib/types/option-item.ts +0 -247
- package/src/lib/types/workflow.ts +0 -35
- package/src/lib/util/DateHelper.spec.ts +0 -112
- package/src/lib/util/DateHelper.ts +0 -197
- package/src/lib/util/VCard.ts +0 -277
- package/src/lib/util/color-helper.ts +0 -125
- package/src/lib/util/duration-helper.spec.ts +0 -35
- package/src/lib/util/duration-helper.ts +0 -98
- package/src/lib/util/functions.ts +0 -15
- package/src/lib/util/helper.ts +0 -60
- package/src/lib/util/isNumeric.ts +0 -13
- package/src/lib/util/rest-helper.ts +0 -28
- package/src/lib/util/ui-animation.ts +0 -154
- package/src/lib/util/ui-constants.ts +0 -20
- package/src/test.ts +0 -28
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -17
- /package/{src/lib/types/api-models.ts → lib/types/api-models.d.ts} +0 -0
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Injectable, InjectionToken, Provider } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { AccessibilitySettings } from './types/accessibillity';
|
|
4
|
-
import { KeyboardShortcut } from './types/keyboard-shortcuts';
|
|
5
|
-
|
|
6
|
-
export const EDU_SHARING_UI_CONFIG = new InjectionToken<EduSharingUiConfigurationParams>(
|
|
7
|
-
'EDU_SHARING_API_CONFIG',
|
|
8
|
-
);
|
|
9
|
-
|
|
10
|
-
@Injectable({
|
|
11
|
-
providedIn: 'root',
|
|
12
|
-
})
|
|
13
|
-
export class EduSharingUiConfiguration {
|
|
14
|
-
production: boolean;
|
|
15
|
-
static create(params: EduSharingUiConfigurationParams = {}): EduSharingUiConfiguration {
|
|
16
|
-
return { ...new EduSharingUiConfiguration(), ...params };
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export type EduSharingUiConfigurationParams = Partial<EduSharingUiConfiguration>;
|
|
21
|
-
|
|
22
|
-
export function getConfigProvider(params?: EduSharingUiConfigurationParams): Provider[] {
|
|
23
|
-
return [
|
|
24
|
-
// Provide the params given to `forRoot()`. These can be overridden by the application by
|
|
25
|
-
// providing `EDU_SHARING_API_CONFIG` itself.
|
|
26
|
-
{
|
|
27
|
-
provide: EDU_SHARING_UI_CONFIG,
|
|
28
|
-
useValue: params,
|
|
29
|
-
},
|
|
30
|
-
// Inject `configuration` as both, `ApiConfiguration` and `EduSharingApiConfiguration`, to pass
|
|
31
|
-
// `rootUrl` on to `ApiModule` while also adding our custom configuration.
|
|
32
|
-
{
|
|
33
|
-
provide: EduSharingUiConfiguration,
|
|
34
|
-
deps: [EDU_SHARING_UI_CONFIG],
|
|
35
|
-
// deps: [[new Optional(), EDU_SHARING_API_CONFIG]],
|
|
36
|
-
useFactory: (configParams: EduSharingUiConfigurationParams) =>
|
|
37
|
-
EduSharingUiConfiguration.create(configParams),
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
provide: EduSharingUiConfiguration,
|
|
41
|
-
deps: [EDU_SHARING_UI_CONFIG],
|
|
42
|
-
// deps: [[new Optional(), EDU_SHARING_API_CONFIG]],
|
|
43
|
-
useFactory: (configParams: EduSharingUiConfigurationParams) =>
|
|
44
|
-
EduSharingUiConfiguration.create(configParams),
|
|
45
|
-
},
|
|
46
|
-
];
|
|
47
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders, NgModule } from '@angular/core';
|
|
2
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
3
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { EduSharingUiConfigurationParams, getConfigProvider } from './edu-sharing-ui-configuration';
|
|
6
|
-
import { ListItemsModule } from './list-items/list-items.module';
|
|
7
|
-
import { NodeEntriesModule } from './node-entries/node-entries.module';
|
|
8
|
-
import { EduSharingUiCommonModule } from './common/edu-sharing-ui-common.module';
|
|
9
|
-
import { NodeImageSizePipe } from './pipes/node-image-size.pipe';
|
|
10
|
-
import { FormatDatePipe } from './pipes/format-date.pipe';
|
|
11
|
-
import { ListItemLabelPipe } from './node-entries/list-item-label.pipe';
|
|
12
|
-
import { SortDropdownComponent } from './sort-dropdown/sort-dropdown.component';
|
|
13
|
-
|
|
14
|
-
@NgModule({
|
|
15
|
-
declarations: [],
|
|
16
|
-
imports: [
|
|
17
|
-
CommonModule,
|
|
18
|
-
TranslateModule,
|
|
19
|
-
EduSharingUiCommonModule,
|
|
20
|
-
ListItemsModule,
|
|
21
|
-
NodeEntriesModule,
|
|
22
|
-
// Loading the TranslationsModule here causes errors for lazy-loaded pages like the search
|
|
23
|
-
// page. For usage outside the context of edu-sharing, we probably need to import the
|
|
24
|
-
// TranslationsModule at the main module that packages or uses this library.
|
|
25
|
-
],
|
|
26
|
-
exports: [
|
|
27
|
-
CommonModule,
|
|
28
|
-
MatTooltipModule,
|
|
29
|
-
TranslateModule,
|
|
30
|
-
EduSharingUiCommonModule,
|
|
31
|
-
ListItemsModule,
|
|
32
|
-
NodeEntriesModule,
|
|
33
|
-
NodeImageSizePipe,
|
|
34
|
-
FormatDatePipe,
|
|
35
|
-
ListItemsModule,
|
|
36
|
-
ListItemLabelPipe,
|
|
37
|
-
SortDropdownComponent,
|
|
38
|
-
],
|
|
39
|
-
})
|
|
40
|
-
export class EduSharingUiModule {
|
|
41
|
-
public static forRoot(
|
|
42
|
-
config: EduSharingUiConfigurationParams,
|
|
43
|
-
): ModuleWithProviders<EduSharingUiModule> {
|
|
44
|
-
return {
|
|
45
|
-
ngModule: EduSharingUiModule,
|
|
46
|
-
providers: [getConfigProvider(config)],
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ListCollectionInfoComponent } from './list-collection-info/list-collection-info.component';
|
|
2
|
-
import { ListCountsComponent } from './list-counts/list-counts.component';
|
|
3
|
-
import { ListNodeLicenseComponent } from './list-node-license/list-node-license.component';
|
|
4
|
-
import { ListNodeReplicationSourceComponent } from './list-node-replication-source/list-node-replication-source.component';
|
|
5
|
-
import { ListNodeWorkflowComponent } from './list-node-workflow/list-node-workflow.component';
|
|
6
|
-
import { ListTextComponent } from './list-text/list-text.component';
|
|
7
|
-
import { ListWidgetClass } from './list-widget';
|
|
8
|
-
|
|
9
|
-
export enum ListWidgetType {
|
|
10
|
-
CollectionInfo = 'CollectionInfo',
|
|
11
|
-
Text = 'Text',
|
|
12
|
-
Custom = 'Custom',
|
|
13
|
-
NodeLicense = 'NodeLicense',
|
|
14
|
-
NodeReplicationSource = 'NodeReplicationSource',
|
|
15
|
-
NodeWorkflow = 'NodeWorkflow',
|
|
16
|
-
NodeCounts = 'NodeCounts',
|
|
17
|
-
}
|
|
18
|
-
export const AVAILABLE_LIST_WIDGETS: {
|
|
19
|
-
[widgetType in ListWidgetType]: ListWidgetClass;
|
|
20
|
-
} = {
|
|
21
|
-
CollectionInfo: ListCollectionInfoComponent,
|
|
22
|
-
NodeLicense: ListNodeLicenseComponent,
|
|
23
|
-
NodeReplicationSource: ListNodeReplicationSourceComponent,
|
|
24
|
-
NodeWorkflow: ListNodeWorkflowComponent,
|
|
25
|
-
NodeCounts: ListCountsComponent,
|
|
26
|
-
Custom: null,
|
|
27
|
-
|
|
28
|
-
// use the widgets with wildcards as last ones
|
|
29
|
-
Text: ListTextComponent,
|
|
30
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
import { DurationFormat } from '../util/duration-helper';
|
|
3
|
-
import { DurationHelper } from '../util/duration-helper';
|
|
4
|
-
|
|
5
|
-
@Pipe({
|
|
6
|
-
name: 'formatDuration',
|
|
7
|
-
})
|
|
8
|
-
export class FormatDurationPipe implements PipeTransform {
|
|
9
|
-
transform(
|
|
10
|
-
value: string,
|
|
11
|
-
args = {
|
|
12
|
-
format: DurationFormat.Hms,
|
|
13
|
-
},
|
|
14
|
-
): string {
|
|
15
|
-
return DurationHelper.getDurationFormatted(value, args.format);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<ng-container [ngSwitch]="widgetType">
|
|
2
|
-
<ng-container *ngSwitchCase="'Custom'">
|
|
3
|
-
<ng-container
|
|
4
|
-
*ngTemplateOutlet="
|
|
5
|
-
customTemplate;
|
|
6
|
-
context: {
|
|
7
|
-
item: this.item,
|
|
8
|
-
node: this.node,
|
|
9
|
-
provideLabel: this.provideLabel,
|
|
10
|
-
forceText: this.forceText
|
|
11
|
-
}
|
|
12
|
-
"
|
|
13
|
-
>
|
|
14
|
-
</ng-container>
|
|
15
|
-
</ng-container>
|
|
16
|
-
<es-list-collection-info
|
|
17
|
-
*ngSwitchCase="'CollectionInfo'"
|
|
18
|
-
[item]="item"
|
|
19
|
-
[node]="node"
|
|
20
|
-
[provideLabel]="provideLabel"
|
|
21
|
-
></es-list-collection-info>
|
|
22
|
-
<es-list-text
|
|
23
|
-
*ngSwitchCase="'Text'"
|
|
24
|
-
[item]="item"
|
|
25
|
-
[node]="node"
|
|
26
|
-
[provideLabel]="provideLabel"
|
|
27
|
-
></es-list-text>
|
|
28
|
-
<es-list-counts
|
|
29
|
-
*ngSwitchCase="'NodeCounts'"
|
|
30
|
-
[item]="item"
|
|
31
|
-
[node]="node"
|
|
32
|
-
[provideLabel]="provideLabel"
|
|
33
|
-
></es-list-counts>
|
|
34
|
-
<es-list-node-license
|
|
35
|
-
*ngSwitchCase="'NodeLicense'"
|
|
36
|
-
[item]="item"
|
|
37
|
-
[node]="node"
|
|
38
|
-
[provideLabel]="provideLabel"
|
|
39
|
-
></es-list-node-license>
|
|
40
|
-
<es-list-node-replication-source
|
|
41
|
-
*ngSwitchCase="'NodeReplicationSource'"
|
|
42
|
-
[item]="item"
|
|
43
|
-
[node]="node"
|
|
44
|
-
[provideLabel]="provideLabel"
|
|
45
|
-
></es-list-node-replication-source>
|
|
46
|
-
<es-list-node-workflow
|
|
47
|
-
*ngSwitchCase="'NodeWorkflow'"
|
|
48
|
-
[item]="item"
|
|
49
|
-
[node]="node"
|
|
50
|
-
[provideLabel]="provideLabel"
|
|
51
|
-
></es-list-node-workflow>
|
|
52
|
-
</ng-container>
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Component, Input, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
-
import { AVAILABLE_LIST_WIDGETS, ListWidgetType } from '../available-widgets';
|
|
3
|
-
import { ListWidget } from '../list-widget';
|
|
4
|
-
import { NodeEntriesGlobalService } from '../../node-entries/node-entries-global.service';
|
|
5
|
-
import { Node } from 'ngx-edu-sharing-api';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'es-list-base',
|
|
9
|
-
templateUrl: './list-base.component.html',
|
|
10
|
-
})
|
|
11
|
-
export class ListBaseComponent extends ListWidget implements OnChanges {
|
|
12
|
-
/**
|
|
13
|
-
* use text only widgets (for table)
|
|
14
|
-
*/
|
|
15
|
-
@Input() forceText = false;
|
|
16
|
-
widgetType: ListWidgetType;
|
|
17
|
-
customTemplate: TemplateRef<unknown>;
|
|
18
|
-
constructor(private nodeEntriesGlobalService: NodeEntriesGlobalService) {
|
|
19
|
-
super();
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
23
|
-
if (this.node && this.item) {
|
|
24
|
-
this.customTemplate = this.nodeEntriesGlobalService.getCustomFieldTemplate(
|
|
25
|
-
this.item,
|
|
26
|
-
this.node as Node,
|
|
27
|
-
);
|
|
28
|
-
if (this.customTemplate) {
|
|
29
|
-
this.widgetType = ListWidgetType.Custom;
|
|
30
|
-
} else if (this.forceText) {
|
|
31
|
-
this.widgetType = ListWidgetType.Text;
|
|
32
|
-
} else {
|
|
33
|
-
this.widgetType = Object.entries(AVAILABLE_LIST_WIDGETS).find(
|
|
34
|
-
([id, w]) =>
|
|
35
|
-
w?.supportedItems?.filter(
|
|
36
|
-
(i) =>
|
|
37
|
-
i.type === this.item.type &&
|
|
38
|
-
(i.name === this.item.name || i.name === '*'),
|
|
39
|
-
).length > 0,
|
|
40
|
-
)?.[0] as ListWidgetType;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<ng-container [ngSwitch]="item.name">
|
|
2
|
-
<ng-container *ngSwitchCase="'info'">
|
|
3
|
-
<ng-container *ngIf="indicatorIcons$ | async; else textRepresentation">
|
|
4
|
-
<i
|
|
5
|
-
esIcon="layers"
|
|
6
|
-
[altText]="'COLLECTION.INFO_REFERENCES_MULTI' | translate"
|
|
7
|
-
[matTooltip]="'COLLECTION.INFO_REFERENCES_MULTI' | translate"
|
|
8
|
-
></i>
|
|
9
|
-
{{ $any(node).collection?.childCollectionsCount }}
|
|
10
|
-
<i
|
|
11
|
-
esIcon="insert_drive_file"
|
|
12
|
-
[altText]="'collections_content' | translate"
|
|
13
|
-
[matTooltip]="'collections_content' | translate"
|
|
14
|
-
></i>
|
|
15
|
-
{{ $any(node).collection?.childReferencesCount }}
|
|
16
|
-
</ng-container>
|
|
17
|
-
<ng-template #textRepresentation>
|
|
18
|
-
<div class="rows">
|
|
19
|
-
<p>
|
|
20
|
-
{{ 'COLLECTION.INFO_REFERENCES_MULTI' | translate }}:
|
|
21
|
-
{{ $any(node).collection?.childCollectionsCount }}
|
|
22
|
-
</p>
|
|
23
|
-
<p>
|
|
24
|
-
{{ 'collections_content' | translate }}:
|
|
25
|
-
{{ $any(node).collection?.childReferencesCount }}
|
|
26
|
-
</p>
|
|
27
|
-
</div>
|
|
28
|
-
</ng-template>
|
|
29
|
-
</ng-container>
|
|
30
|
-
<ng-container *ngSwitchCase="'scope'">
|
|
31
|
-
<i
|
|
32
|
-
*ngIf="indicatorIcons$ | async; else textRepresentation"
|
|
33
|
-
class="collectionScope"
|
|
34
|
-
[esIcon]="nodeHelper.getCollectionScopeInfo($any(node)).icon"
|
|
35
|
-
[matTooltip]="
|
|
36
|
-
'COLLECTION.SCOPE.' + nodeHelper.getCollectionScopeInfo($any(node)).scopeName | translate
|
|
37
|
-
"
|
|
38
|
-
[altText]="
|
|
39
|
-
'COLLECTION.SCOPE.' + nodeHelper.getCollectionScopeInfo($any(node)).scopeName | translate
|
|
40
|
-
"
|
|
41
|
-
></i>
|
|
42
|
-
<ng-template #textRepresentation>
|
|
43
|
-
{{
|
|
44
|
-
'COLLECTION.SCOPE.' + nodeHelper.getCollectionScopeInfo($any(node)).scopeName | translate
|
|
45
|
-
}}
|
|
46
|
-
</ng-template>
|
|
47
|
-
</ng-container>
|
|
48
|
-
</ng-container>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { ListItem } from '../../types/list-item';
|
|
3
|
-
import { ListWidget } from '../list-widget';
|
|
4
|
-
import { NodeHelperService } from '../../services/node-helper.service';
|
|
5
|
-
import { AccessibilityService } from '../../services/accessibility.service';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'es-list-collection-info',
|
|
9
|
-
templateUrl: './list-collection-info.component.html',
|
|
10
|
-
styleUrls: ['./list-collection-info.component.scss'],
|
|
11
|
-
})
|
|
12
|
-
export class ListCollectionInfoComponent extends ListWidget {
|
|
13
|
-
static supportedItems = [
|
|
14
|
-
new ListItem('COLLECTION', 'info'),
|
|
15
|
-
new ListItem('COLLECTION', 'scope'),
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
readonly indicatorIcons$;
|
|
19
|
-
|
|
20
|
-
constructor(private accessibility: AccessibilityService, public nodeHelper: NodeHelperService) {
|
|
21
|
-
super();
|
|
22
|
-
this.indicatorIcons$ = this.accessibility.observe('indicatorIcons');
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{{ getCount() }}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { ListWidget } from '../list-widget';
|
|
3
|
-
import { ListItem } from '../../types/list-item';
|
|
4
|
-
import { StatisticsGroup } from 'ngx-edu-sharing-api';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'es-list-counts',
|
|
8
|
-
templateUrl: './list-counts.component.html',
|
|
9
|
-
styleUrls: ['./list-counts.component.scss'],
|
|
10
|
-
})
|
|
11
|
-
export class ListCountsComponent extends ListWidget {
|
|
12
|
-
static supportedItems = [
|
|
13
|
-
new ListItem('NODE', 'counts.OVERALL'),
|
|
14
|
-
new ListItem('NODE', 'counts.VIEW_MATERIAL'),
|
|
15
|
-
new ListItem('NODE', 'counts.VIEW_MATERIAL_EMBEDDED'),
|
|
16
|
-
new ListItem('NODE', 'counts.VIEW_MATERIAL_PLAY_MEDIA'),
|
|
17
|
-
new ListItem('NODE', 'counts.DOWNLOAD_MATERIAL'),
|
|
18
|
-
];
|
|
19
|
-
|
|
20
|
-
static getCountSingle(node: StatisticsGroup, id: string, group: number = null) {
|
|
21
|
-
const counts = (node as any).counts;
|
|
22
|
-
if (id === 'OVERALL') {
|
|
23
|
-
return Object.keys(counts.counts)
|
|
24
|
-
.map((c) => (group ? group : counts.counts[c]))
|
|
25
|
-
.reduce((a, b) => a + b);
|
|
26
|
-
}
|
|
27
|
-
return (group ? group : counts.counts[id]) || 0;
|
|
28
|
-
}
|
|
29
|
-
static getCount(node: StatisticsGroup, id: string) {
|
|
30
|
-
const counts = (node as any).counts;
|
|
31
|
-
let result = this.getCountSingle(node, id);
|
|
32
|
-
if (Object.keys(counts.groups)?.length > 0) {
|
|
33
|
-
const i1 = id;
|
|
34
|
-
if (counts.groups[i1]) {
|
|
35
|
-
const i2 = Object.keys(counts.groups[i1])[0];
|
|
36
|
-
if (counts.groups?.[i1]?.[i2]) {
|
|
37
|
-
result = Object.keys(counts.groups?.[i1]?.[i2])
|
|
38
|
-
.map(
|
|
39
|
-
(group) =>
|
|
40
|
-
(group || '-') +
|
|
41
|
-
': ' +
|
|
42
|
-
this.getCountSingle(node, id, counts.groups?.[i1]?.[i2][group]),
|
|
43
|
-
)
|
|
44
|
-
.join('\n')
|
|
45
|
-
.trim();
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return result;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
getId() {
|
|
53
|
-
return this.item.name.split('.')[1];
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
getCount() {
|
|
57
|
-
return ListCountsComponent.getCount(this.node as StatisticsGroup, this.getId());
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { FormatDurationPipe } from './format-duration.pipe';
|
|
3
|
-
import { ListBaseComponent } from './list-base/list-base.component';
|
|
4
|
-
import { ListCollectionInfoComponent } from './list-collection-info/list-collection-info.component';
|
|
5
|
-
import { ListCountsComponent } from './list-counts/list-counts.component';
|
|
6
|
-
import { ListNodeLicenseComponent } from './list-node-license/list-node-license.component';
|
|
7
|
-
import { ListNodeReplicationSourceComponent } from './list-node-replication-source/list-node-replication-source.component';
|
|
8
|
-
import { ListNodeWorkflowComponent } from './list-node-workflow/list-node-workflow.component';
|
|
9
|
-
import { ListTextComponent } from './list-text/list-text.component';
|
|
10
|
-
import { NodeRowComponent } from './node-row/node-row.component';
|
|
11
|
-
import { NodeSourcePipe } from './node-source.pipe';
|
|
12
|
-
import { CommonModule } from '@angular/common';
|
|
13
|
-
import { EduSharingUiCommonModule } from '../common/edu-sharing-ui-common.module';
|
|
14
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
15
|
-
import { TranslateModule } from '@ngx-translate/core';
|
|
16
|
-
|
|
17
|
-
@NgModule({
|
|
18
|
-
declarations: [
|
|
19
|
-
ListBaseComponent,
|
|
20
|
-
ListCollectionInfoComponent,
|
|
21
|
-
ListNodeLicenseComponent,
|
|
22
|
-
ListNodeReplicationSourceComponent,
|
|
23
|
-
ListNodeWorkflowComponent,
|
|
24
|
-
ListTextComponent,
|
|
25
|
-
ListCountsComponent,
|
|
26
|
-
NodeSourcePipe,
|
|
27
|
-
FormatDurationPipe,
|
|
28
|
-
NodeRowComponent,
|
|
29
|
-
],
|
|
30
|
-
imports: [CommonModule, EduSharingUiCommonModule, MatTooltipModule, TranslateModule],
|
|
31
|
-
exports: [ListBaseComponent, ListTextComponent, FormatDurationPipe, NodeRowComponent],
|
|
32
|
-
})
|
|
33
|
-
export class ListItemsModule {}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
<ng-container *ngIf="licenseIcon$ | async as licenseIcon">
|
|
2
|
-
<span *ngIf="indicatorIcons$ | async; else textRepresentation" [matTooltip]="tooltip$ | async"
|
|
3
|
-
><img [alt]="tooltip$ | async" [src]="licenseIcon"
|
|
4
|
-
/></span>
|
|
5
|
-
<ng-template #textRepresentation>
|
|
6
|
-
<span>{{ tooltip$ | async }}</span>
|
|
7
|
-
</ng-template>
|
|
8
|
-
</ng-container>
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { ListWidget } from '../list-widget';
|
|
3
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
4
|
-
import * as rxjs from 'rxjs';
|
|
5
|
-
import { map, switchMap } from 'rxjs/operators';
|
|
6
|
-
import { ListItem } from '../../types/list-item';
|
|
7
|
-
import { NodeHelperService } from '../../services/node-helper.service';
|
|
8
|
-
import { Node, RestConstants } from 'ngx-edu-sharing-api';
|
|
9
|
-
import { AccessibilityService } from '../../services/accessibility.service';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'es-list-node-license',
|
|
13
|
-
templateUrl: './list-node-license.component.html',
|
|
14
|
-
})
|
|
15
|
-
export class ListNodeLicenseComponent extends ListWidget {
|
|
16
|
-
static supportedItems = [new ListItem('NODE', RestConstants.CCM_PROP_LICENSE)];
|
|
17
|
-
|
|
18
|
-
readonly licenseName$ = this.nodeSubject.pipe(
|
|
19
|
-
map((node) => this.nodeHelper.getLicenseName(node as Node)),
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
readonly licenseIcon$ = this.nodeSubject.pipe(
|
|
23
|
-
switchMap((node) => this.nodeHelper.getLicenseIcon(node as Node)),
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
readonly tooltip$ = rxjs.combineLatest([this.licenseName$, this.provideLabelSubject]).pipe(
|
|
27
|
-
switchMap(([licenseName, provideLabel]) => {
|
|
28
|
-
if (provideLabel) {
|
|
29
|
-
return this.translate
|
|
30
|
-
.get('NODE.ccm:commonlicense_key')
|
|
31
|
-
.pipe(map((commonLicenseKey) => `${commonLicenseKey}: ${licenseName}`));
|
|
32
|
-
} else {
|
|
33
|
-
return rxjs.of(licenseName);
|
|
34
|
-
}
|
|
35
|
-
}),
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
readonly indicatorIcons$ = this.accessibility.observe('indicatorIcons');
|
|
39
|
-
|
|
40
|
-
constructor(
|
|
41
|
-
private accessibility: AccessibilityService,
|
|
42
|
-
private nodeHelper: NodeHelperService,
|
|
43
|
-
private translate: TranslateService,
|
|
44
|
-
) {
|
|
45
|
-
super();
|
|
46
|
-
}
|
|
47
|
-
}
|
package/src/lib/list-items/list-node-replication-source/list-node-replication-source.component.html
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
<span *ngIf="indicatorIcons$ | async; else textRepresentation" [matTooltip]="tooltip$ | async">
|
|
2
|
-
<img
|
|
3
|
-
[src]="replicationSource$ | async | appNodeSource : { mode: 'url' }"
|
|
4
|
-
(error)="$any($event.target).style.display = 'none'"
|
|
5
|
-
[alt]="tooltip$ | async"
|
|
6
|
-
/>
|
|
7
|
-
</span>
|
|
8
|
-
|
|
9
|
-
<ng-template #textRepresentation>
|
|
10
|
-
<span>{{ tooltip$ | async }}</span>
|
|
11
|
-
</ng-template>
|
package/src/lib/list-items/list-node-replication-source/list-node-replication-source.component.ts
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import * as rxjs from 'rxjs';
|
|
4
|
-
import { map, switchMap } from 'rxjs/operators';
|
|
5
|
-
import { ListWidget } from '../list-widget';
|
|
6
|
-
import { NodeSourcePipe } from '../node-source.pipe';
|
|
7
|
-
import { AccessibilityService } from '../../services/accessibility.service';
|
|
8
|
-
import { NetworkService, Node, RestConstants } from 'ngx-edu-sharing-api';
|
|
9
|
-
import { ListItem } from '../../types/list-item';
|
|
10
|
-
|
|
11
|
-
@Component({
|
|
12
|
-
selector: 'es-list-node-replication-source',
|
|
13
|
-
templateUrl: './list-node-replication-source.component.html',
|
|
14
|
-
providers: [NodeSourcePipe],
|
|
15
|
-
})
|
|
16
|
-
export class ListNodeReplicationSourceComponent extends ListWidget {
|
|
17
|
-
static supportedItems = [new ListItem('NODE', RestConstants.CCM_PROP_REPLICATIONSOURCE)];
|
|
18
|
-
|
|
19
|
-
readonly replicationSource$ = this.nodeSubject.pipe(
|
|
20
|
-
map((node) => (node as Node).properties['ccm:replicationsource']?.[0]),
|
|
21
|
-
);
|
|
22
|
-
|
|
23
|
-
readonly text$ = this.replicationSource$.pipe(
|
|
24
|
-
// Wait for repositories to be available to `restNetwork` since `nodeSource.transform` fails
|
|
25
|
-
// if it isn't.
|
|
26
|
-
switchMap((replicationSource) =>
|
|
27
|
-
this.networkService.getRepositories().pipe(map(() => replicationSource)),
|
|
28
|
-
),
|
|
29
|
-
switchMap((replicationSource) =>
|
|
30
|
-
this.translate.get(
|
|
31
|
-
'REPOSITORIES.' + this.nodeSource.transform(replicationSource, { mode: 'escaped' }),
|
|
32
|
-
{ fallback: this.nodeSource.transform(replicationSource, { mode: 'text' }) },
|
|
33
|
-
),
|
|
34
|
-
),
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
readonly tooltip$ = rxjs.combineLatest([this.text$, this.provideLabelSubject]).pipe(
|
|
38
|
-
switchMap(([text, provideLabel]) => {
|
|
39
|
-
if (provideLabel) {
|
|
40
|
-
return this.translate
|
|
41
|
-
.get('NODE.ccm:replicationsource')
|
|
42
|
-
.pipe(map((replicationSource) => `${replicationSource}: ${text}`));
|
|
43
|
-
} else {
|
|
44
|
-
return rxjs.of(text);
|
|
45
|
-
}
|
|
46
|
-
}),
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
readonly indicatorIcons$ = this.accessibility.observe('indicatorIcons');
|
|
50
|
-
|
|
51
|
-
constructor(
|
|
52
|
-
private accessibility: AccessibilityService,
|
|
53
|
-
|
|
54
|
-
private nodeSource: NodeSourcePipe,
|
|
55
|
-
private translate: TranslateService,
|
|
56
|
-
private networkService: NetworkService,
|
|
57
|
-
) {
|
|
58
|
-
super();
|
|
59
|
-
}
|
|
60
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import { ListWidget } from '../list-widget';
|
|
3
|
-
import { ListItem } from '../../types/list-item';
|
|
4
|
-
import { NodeHelperService } from '../../services/node-helper.service';
|
|
5
|
-
import { Node, RestConstants } from 'ngx-edu-sharing-api';
|
|
6
|
-
|
|
7
|
-
@Component({
|
|
8
|
-
selector: 'es-list-node-workflow',
|
|
9
|
-
templateUrl: './list-node-workflow.component.html',
|
|
10
|
-
})
|
|
11
|
-
export class ListNodeWorkflowComponent extends ListWidget {
|
|
12
|
-
static supportedItems = [new ListItem('NODE', RestConstants.CCM_PROP_WF_STATUS)];
|
|
13
|
-
|
|
14
|
-
constructor(private nodeHelper: NodeHelperService) {
|
|
15
|
-
super();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
getWorkflowStatus() {
|
|
19
|
-
return this.nodeHelper.getWorkflowStatus(this.node as Node).current;
|
|
20
|
-
}
|
|
21
|
-
}
|