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,176 +0,0 @@
|
|
|
1
|
-
<label *ngIf="item.config?.showLabel">
|
|
2
|
-
{{ getI18n(item) | translate }}
|
|
3
|
-
</label>
|
|
4
|
-
<ng-container *ngIf="item.type === 'ORG' || item.type === 'GROUP'">
|
|
5
|
-
<ng-container [ngSwitch]="item.name">
|
|
6
|
-
<span *ngSwitchCase="'displayName'" [class.type-danger]="isDangerousGroup()">
|
|
7
|
-
{{ $any(getNode()).profile.displayName }}
|
|
8
|
-
</span>
|
|
9
|
-
<span *ngSwitchCase="'groupType'">
|
|
10
|
-
{{ 'PERMISSIONS.GROUP_TYPE.' + $any(getNode()).profile.groupType | translate }}
|
|
11
|
-
</span>
|
|
12
|
-
<span *ngSwitchDefault>
|
|
13
|
-
{{ $any(getNode())[item.name] }}
|
|
14
|
-
</span>
|
|
15
|
-
</ng-container>
|
|
16
|
-
</ng-container>
|
|
17
|
-
<ng-container *ngIf="item.type === 'USER'">
|
|
18
|
-
<span *ngIf="isUserProfileAttribute(item.name)">
|
|
19
|
-
{{ $any(getNode()).profile[item.name] }}
|
|
20
|
-
</span>
|
|
21
|
-
<span *ngIf="item.name === 'status'">
|
|
22
|
-
{{ 'PERMISSIONS.USER_STATUS.' + $any(getNode()).status.status | translate }}
|
|
23
|
-
</span>
|
|
24
|
-
<span *ngIf="!isUserProfileAttribute(item.name) && item.name !== 'status'">
|
|
25
|
-
{{ $any(getNode())[item.name] }}
|
|
26
|
-
</span>
|
|
27
|
-
</ng-container>
|
|
28
|
-
<ng-container
|
|
29
|
-
[ngSwitch]="item.name"
|
|
30
|
-
*ngIf="item.type === 'NODE' || item.type === 'NODE_PROPOSAL' || item.type === 'COLLECTION'"
|
|
31
|
-
>
|
|
32
|
-
<span *ngSwitchCase="'name'">
|
|
33
|
-
{{ $any(getNode()).name }}
|
|
34
|
-
</span>
|
|
35
|
-
<span
|
|
36
|
-
*ngSwitchCase="'title'"
|
|
37
|
-
[matTooltip]="provideLabel ? $any(getNode()).title || $any(getNode()).name : null"
|
|
38
|
-
>
|
|
39
|
-
{{ $any(getNode()).title || $any(getNode()).name }}
|
|
40
|
-
</span>
|
|
41
|
-
<span
|
|
42
|
-
*ngSwitchCase="'cm:title'"
|
|
43
|
-
[matTooltip]="provideLabel ? $any(getNode()).title || $any(getNode()).name : null"
|
|
44
|
-
>
|
|
45
|
-
{{ $any(getNode()).title || $any(getNode()).name }}
|
|
46
|
-
</span>
|
|
47
|
-
<span
|
|
48
|
-
*ngSwitchCase="'cclom:title'"
|
|
49
|
-
[matTooltip]="provideLabel ? $any(getNode()).title || $any(getNode()).name : null"
|
|
50
|
-
>
|
|
51
|
-
{{ $any(getNode()).title || $any(getNode()).name }}
|
|
52
|
-
</span>
|
|
53
|
-
<span
|
|
54
|
-
*ngSwitchCase="'mediatype'"
|
|
55
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
56
|
-
>
|
|
57
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden">{{ getI18n(item) | translate }}:</span>
|
|
58
|
-
{{ 'MEDIATYPE.' + $any(getNode()).mediatype | translate }}
|
|
59
|
-
</span>
|
|
60
|
-
<span *ngSwitchCase="'size'" [matTooltip]="provideLabel ? (getI18n(item) | translate) : null">
|
|
61
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden">{{ getI18n(item) | translate }}:</span>
|
|
62
|
-
{{ $any(getNode()).size | formatSize }}
|
|
63
|
-
</span>
|
|
64
|
-
<span
|
|
65
|
-
*ngSwitchCase="'dimensions'"
|
|
66
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
67
|
-
>
|
|
68
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden">{{ getI18n(item) | translate }}:</span>
|
|
69
|
-
{{ $any(getNode()) | NodeImageSize }}
|
|
70
|
-
</span>
|
|
71
|
-
<span
|
|
72
|
-
*ngSwitchCase="'ccm:wf_status'"
|
|
73
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
74
|
-
>
|
|
75
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden">{{ getI18n(item) | translate }}:</span>
|
|
76
|
-
{{ 'WORKFLOW.' + getWorkflowStatus().id | translate }}
|
|
77
|
-
</span>
|
|
78
|
-
<span
|
|
79
|
-
*ngSwitchCase="'cm:creator'"
|
|
80
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
81
|
-
>
|
|
82
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden">{{ getI18n(item) | translate }}:</span>
|
|
83
|
-
{{ $any(getNode()).createdBy | nodePersonName }}
|
|
84
|
-
</span>
|
|
85
|
-
<span
|
|
86
|
-
*ngSwitchCase="'cm:modifier'"
|
|
87
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
88
|
-
>
|
|
89
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden"
|
|
90
|
-
>{{ 'NODE.cm:modifier' | translate }}:</span
|
|
91
|
-
>
|
|
92
|
-
{{ $any(getNode()).modifiedBy | nodePersonName }}
|
|
93
|
-
</span>
|
|
94
|
-
<span
|
|
95
|
-
*ngSwitchCase="'ccm:replicationsource'"
|
|
96
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
97
|
-
>
|
|
98
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden"
|
|
99
|
-
>{{ 'NODE.ccm:replicationsource' | translate }}:</span
|
|
100
|
-
>
|
|
101
|
-
{{ $any(getNode()).properties['ccm:replicationsource'] | appNodeSource : { mode: 'text' } }}
|
|
102
|
-
</span>
|
|
103
|
-
<span
|
|
104
|
-
*ngSwitchCase="'ccm:commonlicense_key'"
|
|
105
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
106
|
-
>
|
|
107
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden"
|
|
108
|
-
>{{ 'NODE.ccm:commonlicense_key' | translate }}:</span
|
|
109
|
-
>
|
|
110
|
-
<ng-container *ngIf="$any(getNode()).properties['ccm:commonlicense_key'] as license">
|
|
111
|
-
{{
|
|
112
|
-
license[0] === 'CUSTOM'
|
|
113
|
-
? $any(getNode()).properties['cclom:rights_description']
|
|
114
|
-
: ('LICENSE.NAMES.' + $any(getNode()).properties['ccm:commonlicense_key']
|
|
115
|
-
| translate : { fallback: $any(getNode()).properties['ccm:commonlicense_key'] })
|
|
116
|
-
}}
|
|
117
|
-
</ng-container>
|
|
118
|
-
<ng-container *ngIf="!$any(getNode()).properties['ccm:commonlicense_key']">
|
|
119
|
-
{{ 'LICENSE.NAMES.NONE' | translate }}
|
|
120
|
-
</ng-container>
|
|
121
|
-
</span>
|
|
122
|
-
<span
|
|
123
|
-
*ngSwitchCase="'ccm:educationaltypicalagerange'"
|
|
124
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
125
|
-
>
|
|
126
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden"
|
|
127
|
-
>{{ 'NODE.ccm:educationaltypicalagerange' | translate }}:</span
|
|
128
|
-
>
|
|
129
|
-
<ng-container
|
|
130
|
-
*ngIf="
|
|
131
|
-
$any(getNode()).properties['ccm:educationaltypicalagerange_from'] ||
|
|
132
|
-
$any(getNode()).properties['ccm:educationaltypicalagerange_to']
|
|
133
|
-
"
|
|
134
|
-
>
|
|
135
|
-
{{ $any(getNode()).properties['ccm:educationaltypicalagerange_from'] }} -
|
|
136
|
-
{{ $any(getNode()).properties['ccm:educationaltypicalagerange_to'] }}
|
|
137
|
-
</ng-container>
|
|
138
|
-
</span>
|
|
139
|
-
<span
|
|
140
|
-
*ngSwitchCase="'cclom:duration'"
|
|
141
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
142
|
-
>
|
|
143
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden"
|
|
144
|
-
>{{ 'NODE.cclom:duration' | translate }}:</span
|
|
145
|
-
>
|
|
146
|
-
{{ $any(getNode()).properties['cclom:duration']?.[0] | formatDuration }}
|
|
147
|
-
</span>
|
|
148
|
-
<span
|
|
149
|
-
*ngSwitchCase="'ccm:collection_proposal_status'"
|
|
150
|
-
[matTooltip]="provideLabel ? (getI18n(item) | translate) : null"
|
|
151
|
-
>
|
|
152
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden"
|
|
153
|
-
>{{ 'NODE.ccm:collection_proposal_status' | translate }}:</span
|
|
154
|
-
>
|
|
155
|
-
<!-- use node instead of getNode() to access the raw proposal data! -->
|
|
156
|
-
{{ ('PROPOSAL_STATUS.' + $any(node).properties['ccm:collection_proposal_status']?.[0]) | translate:{fallback: ''} }}
|
|
157
|
-
</span>
|
|
158
|
-
<span *ngSwitchDefault [matTooltip]="provideLabel ? (getI18n(item) | translate) : null">
|
|
159
|
-
<span *ngIf="provideLabel" class="cdk-visually-hidden">{{ getI18n(item) | translate }}:</span>
|
|
160
|
-
<ng-container
|
|
161
|
-
*ngIf="DATE_FIELDS.indexOf(item.name) === -1 && VCARD_FIELDS.indexOf(item.name) === -1"
|
|
162
|
-
>
|
|
163
|
-
{{ displayName$ | async }}
|
|
164
|
-
</ng-container>
|
|
165
|
-
<ng-container *ngIf="DATE_FIELDS.includes(item.name)">
|
|
166
|
-
{{ $any(getNode()).properties[item.name]?.[0] | formatDate: { async: true } | async }}
|
|
167
|
-
</ng-container>
|
|
168
|
-
<ng-container *ngIf="VCARD_FIELDS.includes(item.name)">
|
|
169
|
-
{{
|
|
170
|
-
$any(getNode()).properties[item.name]
|
|
171
|
-
? ($any(getNode()).properties[item.name][0] | vcardName)
|
|
172
|
-
: ''
|
|
173
|
-
}}
|
|
174
|
-
</ng-container>
|
|
175
|
-
</span>
|
|
176
|
-
</ng-container>
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, Component, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import { MdsService, Node, Organization, RestConstants, ProposalNode } from 'ngx-edu-sharing-api';
|
|
3
|
-
import { BehaviorSubject, merge } from 'rxjs';
|
|
4
|
-
import { switchMap } from 'rxjs/operators';
|
|
5
|
-
import { ListItem } from '../../types/list-item';
|
|
6
|
-
import { ListWidget } from '../list-widget';
|
|
7
|
-
import { NodeHelperService } from '../../services/node-helper.service';
|
|
8
|
-
import * as Constants from 'ngx-edu-sharing-api';
|
|
9
|
-
|
|
10
|
-
@Component({
|
|
11
|
-
selector: 'es-list-text',
|
|
12
|
-
templateUrl: './list-text.component.html',
|
|
13
|
-
styleUrls: ['./list-text.component.scss'],
|
|
14
|
-
})
|
|
15
|
-
export class ListTextComponent extends ListWidget implements OnInit {
|
|
16
|
-
static supportedItems = [
|
|
17
|
-
new ListItem('NODE', '*'),
|
|
18
|
-
new ListItem('NODE_PROPOSAL', '*'),
|
|
19
|
-
new ListItem('COLLECTION', '*'),
|
|
20
|
-
new ListItem('ORG', '*'),
|
|
21
|
-
new ListItem('GROUP', '*'),
|
|
22
|
-
new ListItem('USER', '*'),
|
|
23
|
-
];
|
|
24
|
-
readonly DATE_FIELDS = RestConstants.DATE_FIELDS;
|
|
25
|
-
readonly VCARD_FIELDS = RestConstants.getAllVCardFields();
|
|
26
|
-
displayName$ = new BehaviorSubject<string>(null);
|
|
27
|
-
|
|
28
|
-
constructor(
|
|
29
|
-
private nodeHelper: NodeHelperService,
|
|
30
|
-
private mds: MdsService,
|
|
31
|
-
private changeDetectorRef: ChangeDetectorRef,
|
|
32
|
-
) {
|
|
33
|
-
super();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
async ngOnChanges(changes: SimpleChanges) {}
|
|
37
|
-
|
|
38
|
-
async ngOnInit() {
|
|
39
|
-
merge([this.nodeSubject, this.itemSubject])
|
|
40
|
-
.pipe(switchMap(() => this.updateDisplayname()))
|
|
41
|
-
.subscribe((displayName) => {});
|
|
42
|
-
}
|
|
43
|
-
getNode() {
|
|
44
|
-
if (this.item.type === 'NODE_PROPOSAL') {
|
|
45
|
-
return (this.node as ProposalNode).proposal || this.node;
|
|
46
|
-
} else if ((this.node as Node).type === RestConstants.CCM_TYPE_COLLECTION_PROPOSAL) {
|
|
47
|
-
return (this.node as Node).relations?.Original ?? this.node;
|
|
48
|
-
}
|
|
49
|
-
return this.node;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
isUserProfileAttribute(attribute: string) {
|
|
53
|
-
return (
|
|
54
|
-
[
|
|
55
|
-
RestConstants.AUTHORITY_FIRSTNAME,
|
|
56
|
-
RestConstants.AUTHORITY_LASTNAME,
|
|
57
|
-
RestConstants.AUTHORITY_EMAIL,
|
|
58
|
-
].indexOf(attribute) !== -1
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
getWorkflowStatus() {
|
|
62
|
-
return this.nodeHelper.getWorkflowStatus(this.node as Node).current;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
getI18n(item: ListItem) {
|
|
66
|
-
return (item.type === 'NODE_PROPOSAL' ? 'NODE_PROPOSAL' : 'NODE') + '.' + item.name;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
isDangerousGroup() {
|
|
70
|
-
return (
|
|
71
|
-
(this.node as Organization).authorityName ===
|
|
72
|
-
RestConstants.GROUP_ALFRESCO_ADMINISTRATORS
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
private async updateDisplayname() {
|
|
77
|
-
const node = this.getNode() as Node;
|
|
78
|
-
if (!node.properties) {
|
|
79
|
-
this.displayName$.next('');
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
this.displayName$.next(
|
|
83
|
-
node.properties[this.item.name + '_DISPLAYNAME']?.length > 0
|
|
84
|
-
? node.properties[this.item.name + '_DISPLAYNAME'].join(', ')
|
|
85
|
-
: node.properties[this.item.name]?.join(', '),
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
const mds = await this.mds
|
|
89
|
-
.getMetadataSet({
|
|
90
|
-
repository: node.ref?.repo,
|
|
91
|
-
metadataSet: node.metadataset || Constants.DEFAULT,
|
|
92
|
-
})
|
|
93
|
-
.toPromise();
|
|
94
|
-
// @TODO
|
|
95
|
-
/*
|
|
96
|
-
const widget = MdsHelper.getWidget(this.item.name, null, mds.widgets);
|
|
97
|
-
if (widget?.values) {
|
|
98
|
-
const i18n = node.properties[this.item.name]
|
|
99
|
-
?.map((prop) => widget.values.filter((v) => v.id === prop)?.[0]?.caption)
|
|
100
|
-
.filter((cap) => !!cap);
|
|
101
|
-
if (i18n) {
|
|
102
|
-
this.displayName$.next(i18n.join(', '));
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
*/
|
|
106
|
-
}
|
|
107
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { Input, Type, Directive } from '@angular/core';
|
|
2
|
-
import { Person } from 'ngx-edu-sharing-api';
|
|
3
|
-
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import { Node, ProposalNode, Group, Statistics } from 'ngx-edu-sharing-api';
|
|
5
|
-
import { ListItem } from '../types/list-item';
|
|
6
|
-
|
|
7
|
-
@Directive()
|
|
8
|
-
export class ListWidget {
|
|
9
|
-
@Input()
|
|
10
|
-
get node(): Node | ProposalNode | Group | Person | Statistics {
|
|
11
|
-
return this.nodeSubject.value;
|
|
12
|
-
}
|
|
13
|
-
set node(value: Node | ProposalNode | Group | Person | Statistics) {
|
|
14
|
-
this.nodeSubject.next(value);
|
|
15
|
-
}
|
|
16
|
-
protected readonly nodeSubject = new BehaviorSubject<
|
|
17
|
-
Node | ProposalNode | Group | Person | Statistics
|
|
18
|
-
>(null); // node (or group/user)
|
|
19
|
-
|
|
20
|
-
@Input()
|
|
21
|
-
get item(): ListItem {
|
|
22
|
-
return this.itemSubject.value;
|
|
23
|
-
}
|
|
24
|
-
set item(value: ListItem) {
|
|
25
|
-
this.itemSubject.next(value);
|
|
26
|
-
}
|
|
27
|
-
protected readonly itemSubject = new BehaviorSubject<ListItem>(null);
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Provide a label for non-obvious fields that describes the field the given value belongs to.
|
|
31
|
-
*
|
|
32
|
-
* The label is included in a tooltip and made available for a11y technologies.
|
|
33
|
-
*
|
|
34
|
-
* Useful when the value is displayed without context.
|
|
35
|
-
*
|
|
36
|
-
* Other tooltips might be added even with this input set to `false`.
|
|
37
|
-
*/
|
|
38
|
-
@Input()
|
|
39
|
-
get provideLabel() {
|
|
40
|
-
return this.provideLabelSubject.value;
|
|
41
|
-
}
|
|
42
|
-
set provideLabel(value) {
|
|
43
|
-
this.provideLabelSubject.next(value);
|
|
44
|
-
}
|
|
45
|
-
protected readonly provideLabelSubject = new BehaviorSubject(false);
|
|
46
|
-
|
|
47
|
-
constructor() {}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type ListWidgetClass = {
|
|
51
|
-
supportedItems: ListItem[];
|
|
52
|
-
} & Type<ListWidget>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<div class="node-row" *ngIf="node">
|
|
2
|
-
<div class="icon-bg">
|
|
3
|
-
<img
|
|
4
|
-
[src]="node | esNodeIcon | async"
|
|
5
|
-
[alt]="
|
|
6
|
-
node.mediatype
|
|
7
|
-
? ('NODE.mediatype' | translate) + ': ' + ('MEDIATYPE.' + node.mediatype | translate)
|
|
8
|
-
: ''
|
|
9
|
-
"
|
|
10
|
-
[matTooltip]="
|
|
11
|
-
node.mediatype
|
|
12
|
-
? ('NODE.mediatype' | translate) + ': ' + ('MEDIATYPE.' + node.mediatype | translate)
|
|
13
|
-
: ''
|
|
14
|
-
"
|
|
15
|
-
/>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="node-data">
|
|
18
|
-
<div class="node-data-primary">
|
|
19
|
-
<es-list-text [node]="node" [item]="columns[0]"> </es-list-text>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="node-data-secondary">
|
|
22
|
-
<es-list-text
|
|
23
|
-
*ngFor="let column of columns.slice(1)"
|
|
24
|
-
[node]="node"
|
|
25
|
-
[item]="column"
|
|
26
|
-
[provideLabel]="true"
|
|
27
|
-
></es-list-text>
|
|
28
|
-
<ng-container *ngTemplateOutlet="customMetadataRef; context: { node: node }"></ng-container>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
@import '../../../../assets/scss/mixins';
|
|
2
|
-
|
|
3
|
-
.node-row {
|
|
4
|
-
width: 100%;
|
|
5
|
-
display: grid;
|
|
6
|
-
grid-template-columns: var(--tableIconSize) auto;
|
|
7
|
-
grid-gap: 10px;
|
|
8
|
-
align-items: center;
|
|
9
|
-
padding: 10px;
|
|
10
|
-
white-space: normal;
|
|
11
|
-
.node-data {
|
|
12
|
-
flex-grow: 1;
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
|
-
|
|
16
|
-
.node-data-primary {
|
|
17
|
-
font-weight: bold;
|
|
18
|
-
padding-bottom: 5px;
|
|
19
|
-
@include limitLineCount(1, 1.25);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.node-data-secondary {
|
|
23
|
-
color: var(--textLight);
|
|
24
|
-
display: flex;
|
|
25
|
-
justify-content: space-between;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.icon-bg {
|
|
30
|
-
background-color: rgb(var(--palette-foreground-text-dark));
|
|
31
|
-
border-radius: 50%;
|
|
32
|
-
width: var(--tableIconSize);
|
|
33
|
-
height: var(--tableIconSize) !important;
|
|
34
|
-
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
@include materialShadowBottom();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.icon-bg img,
|
|
41
|
-
.icon-bg i {
|
|
42
|
-
width: 50%;
|
|
43
|
-
z-index: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.icon-bg i {
|
|
47
|
-
color: rgb(var(--palette-foreground-text));
|
|
48
|
-
font-size: 20px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Component, ContentChild, Input, TemplateRef } from '@angular/core';
|
|
2
|
-
import { Node } from 'ngx-edu-sharing-api';
|
|
3
|
-
import { ListItem } from '../../types/list-item';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'es-node-row',
|
|
7
|
-
templateUrl: 'node-row.component.html',
|
|
8
|
-
styleUrls: ['node-row.component.scss'],
|
|
9
|
-
})
|
|
10
|
-
export class NodeRowComponent {
|
|
11
|
-
@ContentChild('customMetadata') customMetadataRef: TemplateRef<any>;
|
|
12
|
-
@Input() node: Node;
|
|
13
|
-
@Input() columns: ListItem[];
|
|
14
|
-
|
|
15
|
-
constructor() {}
|
|
16
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
import { NetworkService, Repository } from 'ngx-edu-sharing-api';
|
|
3
|
-
import { NodeHelperService } from '../services/node-helper.service';
|
|
4
|
-
|
|
5
|
-
@Pipe({ name: 'appNodeSource' })
|
|
6
|
-
export class NodeSourcePipe implements PipeTransform {
|
|
7
|
-
private homeRepository: Repository;
|
|
8
|
-
|
|
9
|
-
constructor(private nodeHelper: NodeHelperService, private networkApi: NetworkService) {
|
|
10
|
-
this.networkApi.getHomeRepository().subscribe((homeRepository) => {
|
|
11
|
-
this.homeRepository = homeRepository;
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
transform(
|
|
16
|
-
replicationSource: string,
|
|
17
|
-
args: {
|
|
18
|
-
mode: 'text' | 'url' | 'escaped';
|
|
19
|
-
},
|
|
20
|
-
): string {
|
|
21
|
-
const rawSrc = replicationSource ? replicationSource.toString().trim() : 'home';
|
|
22
|
-
if (args.mode === 'text') {
|
|
23
|
-
if (rawSrc === 'home') {
|
|
24
|
-
// FIXME: This will fix the pipe's return value to 'home' for calls before
|
|
25
|
-
// `this.homeRepository` was populated (although that doesn't seem to happen).
|
|
26
|
-
return this.homeRepository?.title || 'home';
|
|
27
|
-
}
|
|
28
|
-
return rawSrc;
|
|
29
|
-
} else if (args.mode === 'url') {
|
|
30
|
-
const src = this.escape(rawSrc);
|
|
31
|
-
return this.nodeHelper.getSourceIconPath(src);
|
|
32
|
-
} else if (args.mode === 'escaped') {
|
|
33
|
-
return this.escape(rawSrc);
|
|
34
|
-
}
|
|
35
|
-
return null;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
private escape(src: string) {
|
|
39
|
-
if (!src) {
|
|
40
|
-
return src;
|
|
41
|
-
}
|
|
42
|
-
src = src.substring(src.lastIndexOf(':') + 1).toLowerCase();
|
|
43
|
-
src = src.replace(/\s/g, '_');
|
|
44
|
-
src = src.replace(/\./g, '_');
|
|
45
|
-
src = src.replace(/\//g, '_');
|
|
46
|
-
return src;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { Observable, of } from 'rxjs';
|
|
2
|
-
import { NodeDataSource } from './node-data-source';
|
|
3
|
-
import { Node, GenericAuthority } from 'ngx-edu-sharing-api';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* data source which joins multiple underlying data sources
|
|
7
|
-
* used for the "all" search
|
|
8
|
-
*/
|
|
9
|
-
export class CombinedDataSource<T extends Node | GenericAuthority> extends NodeDataSource<T> {
|
|
10
|
-
constructor(private dataSources: NodeDataSource<T>[]) {
|
|
11
|
-
super();
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
connect(): Observable<T[]> {
|
|
15
|
-
// @TODO: Using a forkJoin and real connect would be better
|
|
16
|
-
return of(this.getData());
|
|
17
|
-
/*
|
|
18
|
-
return forkJoin(this.dataSources.map(ds => ds.connect())).pipe(
|
|
19
|
-
switchMap(d => d)
|
|
20
|
-
) as Observable<T[]>;
|
|
21
|
-
*/
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
disconnect() {}
|
|
25
|
-
hasMore() {
|
|
26
|
-
return this.dataSources.filter((ds) => ds.hasMore()).length > 0;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
getData() {
|
|
30
|
-
return [].concat.apply(
|
|
31
|
-
[],
|
|
32
|
-
this.dataSources.map((ds) => ds.getData()),
|
|
33
|
-
);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
isEmpty(): boolean {
|
|
37
|
-
return this.getData()?.length === 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
getTotal() {
|
|
41
|
-
return this.dataSources.map((ds) => ds.getTotal()).reduce((a, b) => a + b);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
isFullyLoaded() {
|
|
45
|
-
return this.getTotal() <= this.getData()?.length;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
getDatasource(position: number) {
|
|
49
|
-
return this.dataSources[position];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
<div class="drag-preview" [matBadge]="selected.length > 1 ? selected.length : null">
|
|
2
|
-
<div class="drag-preview-icon">
|
|
3
|
-
<img *ngIf="node.iconURL" [src]="node | esNodeIcon" />
|
|
4
|
-
</div>
|
|
5
|
-
<es-list-text class="drag-preview-text" [node]="node" [item]="item"></es-list-text>
|
|
6
|
-
</div>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
@use 'sass:color';
|
|
2
|
-
@import '../../../../assets/scss/mixins';
|
|
3
|
-
|
|
4
|
-
.drag-preview {
|
|
5
|
-
display: flex;
|
|
6
|
-
align-items: center;
|
|
7
|
-
gap: 16px;
|
|
8
|
-
height: 48px;
|
|
9
|
-
padding: 0 12px;
|
|
10
|
-
background-color: var(--palette-primary-50);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.drag-preview-icon {
|
|
14
|
-
width: 30px;
|
|
15
|
-
height: 30px;
|
|
16
|
-
padding: 3px;
|
|
17
|
-
margin: 1px 0;
|
|
18
|
-
background-color: #fff;
|
|
19
|
-
border-radius: 50%;
|
|
20
|
-
display: flex;
|
|
21
|
-
justify-content: center;
|
|
22
|
-
align-items: center;
|
|
23
|
-
@include materialShadowSmall();
|
|
24
|
-
> img {
|
|
25
|
-
width: 18px;
|
|
26
|
-
height: auto;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.drag-preview-text {
|
|
31
|
-
max-width: 300px;
|
|
32
|
-
white-space: nowrap;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
text-overflow: ellipsis;
|
|
35
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { ListItem } from '../../types/list-item';
|
|
3
|
-
import { Node } from 'ngx-edu-sharing-api';
|
|
4
|
-
import { NodeEntriesDataType } from '../entries-model';
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'es-drag-preview',
|
|
8
|
-
templateUrl: './drag-preview.component.html',
|
|
9
|
-
styleUrls: ['./drag-preview.component.scss'],
|
|
10
|
-
})
|
|
11
|
-
export class DragPreviewComponent<T extends NodeEntriesDataType> {
|
|
12
|
-
@Input() node: Node;
|
|
13
|
-
@Input() selected: T[];
|
|
14
|
-
@Input() item: ListItem;
|
|
15
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as rxjs from 'rxjs';
|
|
2
|
-
import { BehaviorSubject, Observable } from 'rxjs';
|
|
3
|
-
import { distinctUntilChanged, map } from 'rxjs/operators';
|
|
4
|
-
|
|
5
|
-
export class ItemsCap<T> {
|
|
6
|
-
/** The number of items to which the data should be capped. */
|
|
7
|
-
get cap(): number | null {
|
|
8
|
-
return this._cap.value;
|
|
9
|
-
}
|
|
10
|
-
set cap(value: number | null) {
|
|
11
|
-
this._cap.next(value ?? null);
|
|
12
|
-
}
|
|
13
|
-
private _cap = new BehaviorSubject<number | null>(null);
|
|
14
|
-
|
|
15
|
-
/** Whether to temporarily disable capping. */
|
|
16
|
-
get disabled(): boolean {
|
|
17
|
-
return this._disabled.value;
|
|
18
|
-
}
|
|
19
|
-
set disabled(value: boolean) {
|
|
20
|
-
this._disabled.next(value);
|
|
21
|
-
}
|
|
22
|
-
private _disabled = new BehaviorSubject(false);
|
|
23
|
-
|
|
24
|
-
/** Whether there is more data available that is currently being capped. */
|
|
25
|
-
get isActivelyCapping(): boolean {
|
|
26
|
-
return this._isActivelyCapping;
|
|
27
|
-
}
|
|
28
|
-
private _isActivelyCapping = false;
|
|
29
|
-
|
|
30
|
-
private _effectiveCap: Observable<number | null> = rxjs
|
|
31
|
-
.combineLatest([this._cap, this._disabled])
|
|
32
|
-
.pipe(
|
|
33
|
-
map(([cap, disabled]) => (disabled ? null : cap)),
|
|
34
|
-
distinctUntilChanged(),
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
connect(dataStream: Observable<T[]>): Observable<T[]> {
|
|
38
|
-
return rxjs.combineLatest([this._effectiveCap, dataStream]).pipe(
|
|
39
|
-
map(([effectiveCap, originalData]) => {
|
|
40
|
-
const needToCap = this._needToCap(effectiveCap, originalData);
|
|
41
|
-
this._isActivelyCapping = needToCap;
|
|
42
|
-
if (needToCap) {
|
|
43
|
-
return originalData.slice(0, effectiveCap);
|
|
44
|
-
} else {
|
|
45
|
-
return originalData;
|
|
46
|
-
}
|
|
47
|
-
}),
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
private _needToCap(effectiveCap: number | null, originalData: T[]): boolean {
|
|
52
|
-
return effectiveCap && originalData?.length > effectiveCap;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
-
import { TranslateService } from '@ngx-translate/core';
|
|
3
|
-
import * as rxjs from 'rxjs';
|
|
4
|
-
import { Observable } from 'rxjs';
|
|
5
|
-
import { ListItem } from '../types/list-item';
|
|
6
|
-
|
|
7
|
-
@Pipe({ name: 'esListItemLabel' })
|
|
8
|
-
export class ListItemLabelPipe implements PipeTransform {
|
|
9
|
-
constructor(private translate: TranslateService) {}
|
|
10
|
-
|
|
11
|
-
transform(item: ListItem, args = { fallback: item.name }): Observable<string> {
|
|
12
|
-
const mapping = {
|
|
13
|
-
NODE: 'NODE',
|
|
14
|
-
COLLECTION: 'NODE',
|
|
15
|
-
NODE_PROPOSAL: 'NODE_PROPOSAL',
|
|
16
|
-
ORG: 'ORG',
|
|
17
|
-
GROUP: 'GROUP',
|
|
18
|
-
USER: 'USER',
|
|
19
|
-
};
|
|
20
|
-
if (item.label) {
|
|
21
|
-
return rxjs.of(item.label);
|
|
22
|
-
} else {
|
|
23
|
-
return this.translate.get(mapping[item.type] + '.' + item.name, {
|
|
24
|
-
fallback: args.fallback,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|