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.
Files changed (367) hide show
  1. package/assets/scss/mixins.scss +4 -1
  2. package/assets/scss/variables.scss +3 -0
  3. package/esm2022/lib/actionbar/actionbar.component.mjs +188 -0
  4. package/esm2022/lib/common/edu-sharing-ui-common.module.mjs +134 -0
  5. package/esm2022/lib/directives/border-box-observer.directive.mjs +71 -0
  6. package/esm2022/lib/directives/check-text-overflow.directive.mjs +65 -0
  7. package/esm2022/lib/directives/drag-nodes/drag-nodes.mjs +14 -0
  8. package/esm2022/lib/directives/drag-nodes/nodes-drag-source.directive.mjs +79 -0
  9. package/esm2022/lib/directives/drag-nodes/nodes-drag.directive.mjs +49 -0
  10. package/esm2022/lib/directives/drag-nodes/nodes-drop-target.directive.mjs +105 -0
  11. package/esm2022/lib/directives/focus-state.directive.mjs +44 -0
  12. package/esm2022/lib/directives/icon.directive.mjs +139 -0
  13. package/esm2022/lib/dropdown/dropdown.component.mjs +70 -0
  14. package/esm2022/lib/edu-sharing-ui-configuration.mjs +41 -0
  15. package/esm2022/lib/edu-sharing-ui.module.mjs +78 -0
  16. package/esm2022/lib/list-items/available-widgets.mjs +27 -0
  17. package/esm2022/lib/list-items/format-duration.pipe.mjs +20 -0
  18. package/esm2022/lib/list-items/list-base/list-base.component.mjs +46 -0
  19. package/esm2022/lib/list-items/list-collection-info/list-collection-info.component.mjs +29 -0
  20. package/esm2022/lib/list-items/list-counts/list-counts.component.mjs +54 -0
  21. package/esm2022/lib/list-items/list-items.module.mjs +50 -0
  22. package/esm2022/lib/list-items/list-node-license/list-node-license.component.mjs +41 -0
  23. package/esm2022/lib/list-items/list-node-replication-source/list-node-replication-source.component.mjs +47 -0
  24. package/esm2022/lib/list-items/list-node-workflow/list-node-workflow.component.mjs +24 -0
  25. package/esm2022/lib/list-items/list-text/list-text.component.mjs +106 -0
  26. package/esm2022/lib/list-items/list-widget.mjs +49 -0
  27. package/esm2022/lib/list-items/node-row/node-row.component.mjs +24 -0
  28. package/esm2022/lib/list-items/node-source.pipe.mjs +49 -0
  29. package/esm2022/lib/node-entries/combined-data-source.mjs +41 -0
  30. package/esm2022/lib/node-entries/custom-templates-data-source.mjs +7 -0
  31. package/esm2022/lib/node-entries/drag-preview/drag-preview.component.mjs +21 -0
  32. package/esm2022/lib/node-entries/entries-model.mjs +23 -0
  33. package/esm2022/lib/node-entries/items-cap.mjs +47 -0
  34. package/esm2022/lib/node-entries/list-item-label.pipe.mjs +34 -0
  35. package/esm2022/lib/node-entries/node-cache.mjs +65 -0
  36. package/esm2022/lib/node-entries/node-data-source-remote.mjs +4 -0
  37. package/esm2022/lib/node-entries/node-data-source.mjs +115 -0
  38. package/esm2022/lib/node-entries/node-entries-card/node-entries-card.component.mjs +131 -0
  39. package/esm2022/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.mjs +307 -0
  40. package/esm2022/lib/node-entries/node-entries-card-small/node-entries-card-small.component.mjs +45 -0
  41. package/esm2022/lib/node-entries/node-entries-global-options/node-entries-global-options.component.mjs +23 -0
  42. package/esm2022/lib/node-entries/node-entries-global.service.mjs +58 -0
  43. package/esm2022/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.mjs +42 -0
  44. package/esm2022/lib/node-entries/node-entries-table/node-entries-table.component.mjs +290 -0
  45. package/esm2022/lib/node-entries/node-entries-templates.service.mjs +11 -0
  46. package/esm2022/lib/node-entries/node-entries-wrapper.component.mjs +324 -0
  47. package/esm2022/lib/node-entries/node-entries.component.mjs +131 -0
  48. package/esm2022/lib/node-entries/node-entries.module.mjs +161 -0
  49. package/esm2022/lib/node-entries/node-rating/node-rating.component.mjs +102 -0
  50. package/esm2022/lib/node-entries/node-stats-badges/node-stats-badges.component.mjs +48 -0
  51. package/esm2022/lib/node-entries/node-type-badge/node-type-badge.component.mjs +36 -0
  52. package/esm2022/lib/node-entries/option-button/option-button.component.mjs +62 -0
  53. package/esm2022/lib/node-entries/preview-image/preview-image.component.mjs +53 -0
  54. package/esm2022/lib/node-entries/sort-select-panel/sort-select-panel.component.mjs +41 -0
  55. package/esm2022/lib/node-url/node-url.component.mjs +128 -0
  56. package/esm2022/lib/pipes/file-size.pipe.mjs +31 -0
  57. package/esm2022/lib/pipes/format-date.pipe.mjs +38 -0
  58. package/esm2022/lib/pipes/node-icon.pipe.mjs +18 -0
  59. package/esm2022/lib/pipes/node-image-size.pipe.mjs +24 -0
  60. package/esm2022/lib/pipes/node-image.pipe.mjs +55 -0
  61. package/esm2022/lib/pipes/node-person-name.pipe.mjs +50 -0
  62. package/esm2022/lib/pipes/node-title.pipe.mjs +19 -0
  63. package/esm2022/lib/pipes/option-tooltip.pipe.mjs +33 -0
  64. package/esm2022/lib/pipes/replace-chars.pipe.mjs +29 -0
  65. package/esm2022/lib/pipes/vcard-name.pipe.mjs +19 -0
  66. package/esm2022/lib/services/abstract/app.service.mjs +3 -0
  67. package/esm2022/lib/services/abstract/keyboard-shortcuts.service.mjs +10 -0
  68. package/esm2022/lib/services/abstract/options-helper.service.mjs +3 -0
  69. package/esm2022/lib/services/abstract/toast.service.mjs +3 -0
  70. package/esm2022/lib/services/accessibility.service.mjs +73 -0
  71. package/esm2022/lib/services/local-events.service.mjs +36 -0
  72. package/esm2022/lib/services/node-entries.service.mjs +137 -0
  73. package/esm2022/lib/services/node-helper.service.mjs +234 -0
  74. package/esm2022/lib/services/nodes-drag-drop.service.mjs +155 -0
  75. package/esm2022/lib/services/options-helper-data.service.mjs +134 -0
  76. package/esm2022/lib/services/repo-url.service.mjs +49 -0
  77. package/esm2022/lib/services/temporary-storage.service.mjs +48 -0
  78. package/esm2022/lib/services/ui.service.mjs +162 -0
  79. package/esm2022/lib/sort-dropdown/sort-dropdown.component.mjs +50 -0
  80. package/esm2022/lib/spinner/spinner.component.mjs +18 -0
  81. package/esm2022/lib/translations/fallback-translation-handler.mjs +6 -0
  82. package/esm2022/lib/translations/languages.mjs +5 -0
  83. package/esm2022/lib/translations/translation-loader.mjs +149 -0
  84. package/esm2022/lib/translations/translation-source.mjs +11 -0
  85. package/esm2022/lib/translations/translations.module.mjs +67 -0
  86. package/esm2022/lib/translations/translations.service.mjs +171 -0
  87. package/esm2022/lib/types/accessibillity.mjs +19 -0
  88. package/esm2022/lib/types/api-models.mjs +2 -0
  89. package/esm2022/lib/types/drag-drop.mjs +2 -0
  90. package/esm2022/lib/types/keyboard-shortcuts.mjs +11 -0
  91. package/esm2022/lib/types/list-item.mjs +41 -0
  92. package/esm2022/lib/types/option-item.mjs +174 -0
  93. package/esm2022/lib/types/workflow.mjs +25 -0
  94. package/esm2022/lib/util/DateHelper.mjs +200 -0
  95. package/esm2022/lib/util/VCard.mjs +278 -0
  96. package/esm2022/lib/util/color-helper.mjs +124 -0
  97. package/esm2022/lib/util/duration-helper.mjs +102 -0
  98. package/esm2022/lib/util/functions.mjs +13 -0
  99. package/esm2022/lib/util/helper.mjs +64 -0
  100. package/esm2022/lib/util/isNumeric.mjs +11 -0
  101. package/esm2022/lib/util/rest-helper.mjs +33 -0
  102. package/esm2022/lib/util/ui-animation.mjs +146 -0
  103. package/esm2022/lib/util/ui-constants.mjs +21 -0
  104. package/esm2022/module.mjs +76 -0
  105. package/esm2022/ngx-edu-sharing-ui.mjs +5 -0
  106. package/fesm2022/ngx-edu-sharing-ui.mjs +6509 -0
  107. package/fesm2022/ngx-edu-sharing-ui.mjs.map +1 -0
  108. package/index.d.ts +5 -0
  109. package/lib/actionbar/actionbar.component.d.ts +74 -0
  110. package/lib/common/edu-sharing-ui-common.module.d.ts +32 -0
  111. package/lib/directives/border-box-observer.directive.d.ts +31 -0
  112. package/lib/directives/check-text-overflow.directive.d.ts +20 -0
  113. package/lib/directives/drag-nodes/drag-nodes.d.ts +16 -0
  114. package/lib/directives/drag-nodes/nodes-drag-source.directive.d.ts +37 -0
  115. package/lib/directives/drag-nodes/nodes-drag.directive.d.ts +17 -0
  116. package/lib/directives/drag-nodes/nodes-drop-target.directive.d.ts +22 -0
  117. package/lib/directives/focus-state.directive.d.ts +14 -0
  118. package/lib/directives/icon.directive.d.ts +46 -0
  119. package/lib/dropdown/dropdown.component.d.ts +40 -0
  120. package/lib/edu-sharing-ui-configuration.d.ts +11 -0
  121. package/lib/edu-sharing-ui.module.d.ts +19 -0
  122. package/lib/list-items/available-widgets.d.ts +13 -0
  123. package/lib/list-items/format-duration.pipe.d.ts +10 -0
  124. package/lib/list-items/list-base/list-base.component.d.ts +18 -0
  125. package/lib/list-items/list-collection-info/list-collection-info.component.d.ts +14 -0
  126. package/lib/list-items/list-counts/list-counts.component.d.ts +13 -0
  127. package/lib/list-items/list-items.module.d.ts +20 -0
  128. package/lib/list-items/list-node-license/list-node-license.component.d.ts +20 -0
  129. package/lib/list-items/list-node-replication-source/list-node-replication-source.component.d.ts +22 -0
  130. package/lib/list-items/list-node-workflow/list-node-workflow.component.d.ts +12 -0
  131. package/lib/list-items/list-text/list-text.component.d.ts +28 -0
  132. package/lib/list-items/list-widget.d.ts +32 -0
  133. package/lib/list-items/node-row/node-row.component.d.ts +12 -0
  134. package/lib/list-items/node-source.pipe.d.ts +16 -0
  135. package/lib/node-entries/combined-data-source.d.ts +19 -0
  136. package/{src/lib/node-entries/custom-templates-data-source.ts → lib/node-entries/custom-templates-data-source.d.ts} +2 -2
  137. package/lib/node-entries/drag-preview/drag-preview.component.d.ts +11 -0
  138. package/{src/lib/node-entries/entries-model.ts → lib/node-entries/entries-model.d.ts} +19 -47
  139. package/lib/node-entries/items-cap.d.ts +17 -0
  140. package/lib/node-entries/list-item-label.pipe.d.ts +14 -0
  141. package/lib/node-entries/node-cache.d.ts +17 -0
  142. package/{src/lib/node-entries/node-data-source-remote.ts → lib/node-entries/node-data-source-remote.d.ts} +2 -12
  143. package/lib/node-entries/node-data-source.d.ts +42 -0
  144. package/lib/node-entries/node-entries-card/node-entries-card.component.d.ts +45 -0
  145. package/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.d.ts +92 -0
  146. package/lib/node-entries/node-entries-card-small/node-entries-card-small.component.d.ts +23 -0
  147. package/lib/node-entries/node-entries-global-options/node-entries-global-options.component.d.ts +12 -0
  148. package/lib/node-entries/node-entries-global.service.d.ts +50 -0
  149. package/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.d.ts +17 -0
  150. package/lib/node-entries/node-entries-table/node-entries-table.component.d.ts +76 -0
  151. package/{src/lib/node-entries/node-entries-templates.service.ts → lib/node-entries/node-entries-templates.service.d.ts} +6 -9
  152. package/lib/node-entries/node-entries-wrapper.component.d.ts +129 -0
  153. package/lib/node-entries/node-entries.component.d.ts +32 -0
  154. package/lib/node-entries/node-entries.module.d.ts +43 -0
  155. package/lib/node-entries/node-rating/node-rating.component.d.ts +26 -0
  156. package/lib/node-entries/node-stats-badges/node-stats-badges.component.d.ts +17 -0
  157. package/lib/node-entries/node-type-badge/node-type-badge.component.d.ts +21 -0
  158. package/lib/node-entries/option-button/option-button.component.d.ts +11 -0
  159. package/lib/node-entries/preview-image/preview-image.component.d.ts +22 -0
  160. package/lib/node-entries/sort-select-panel/sort-select-panel.component.d.ts +16 -0
  161. package/lib/node-url/node-url.component.d.ts +51 -0
  162. package/lib/pipes/file-size.pipe.d.ts +10 -0
  163. package/lib/pipes/format-date.pipe.d.ts +21 -0
  164. package/lib/pipes/node-icon.pipe.d.ts +11 -0
  165. package/lib/pipes/node-image-size.pipe.d.ts +8 -0
  166. package/lib/pipes/node-image.pipe.d.ts +28 -0
  167. package/lib/pipes/node-person-name.pipe.d.ts +10 -0
  168. package/lib/pipes/node-title.pipe.d.ts +11 -0
  169. package/lib/pipes/option-tooltip.pipe.d.ts +12 -0
  170. package/lib/pipes/replace-chars.pipe.d.ts +10 -0
  171. package/lib/pipes/vcard-name.pipe.d.ts +10 -0
  172. package/{src/lib/services/abstract/app.service.ts → lib/services/abstract/app.service.d.ts} +1 -1
  173. package/lib/services/abstract/keyboard-shortcuts.service.d.ts +11 -0
  174. package/lib/services/abstract/options-helper.service.d.ts +10 -0
  175. package/{src/lib/services/abstract/toast.service.ts → lib/services/abstract/toast.service.d.ts} +1 -2
  176. package/lib/services/accessibility.service.d.ts +18 -0
  177. package/{src/lib/services/local-events.service.ts → lib/services/local-events.service.d.ts} +7 -10
  178. package/lib/services/node-entries.service.d.ts +69 -0
  179. package/lib/services/node-helper.service.d.ts +56 -0
  180. package/lib/services/nodes-drag-drop.service.d.ts +41 -0
  181. package/lib/services/options-helper-data.service.d.ts +75 -0
  182. package/lib/services/repo-url.service.d.ts +25 -0
  183. package/lib/services/temporary-storage.service.d.ts +35 -0
  184. package/lib/services/ui.service.d.ts +41 -0
  185. package/lib/sort-dropdown/sort-dropdown.component.d.ts +15 -0
  186. package/lib/spinner/spinner.component.d.ts +7 -0
  187. package/lib/translations/fallback-translation-handler.d.ts +4 -0
  188. package/lib/translations/languages.d.ts +4 -0
  189. package/lib/translations/translation-loader.d.ts +51 -0
  190. package/{src/lib/translations/translation-source.ts → lib/translations/translation-source.d.ts} +4 -4
  191. package/lib/translations/translations.module.d.ts +15 -0
  192. package/lib/translations/translations.service.d.ts +30 -0
  193. package/lib/types/accessibillity.d.ts +15 -0
  194. package/{src/lib/types/drag-drop.ts → lib/types/drag-drop.d.ts} +0 -3
  195. package/lib/types/keyboard-shortcuts.d.ts +10 -0
  196. package/lib/types/list-item.d.ts +55 -0
  197. package/lib/types/option-item.d.ts +236 -0
  198. package/lib/types/workflow.d.ts +14 -0
  199. package/lib/util/DateHelper.d.ts +44 -0
  200. package/lib/util/VCard.d.ts +66 -0
  201. package/lib/util/color-helper.d.ts +25 -0
  202. package/lib/util/duration-helper.d.ts +14 -0
  203. package/lib/util/functions.d.ts +4 -0
  204. package/lib/util/helper.d.ts +20 -0
  205. package/lib/util/isNumeric.d.ts +5 -0
  206. package/lib/util/rest-helper.d.ts +10 -0
  207. package/lib/util/ui-animation.d.ts +39 -0
  208. package/lib/util/ui-constants.d.ts +18 -0
  209. package/{src/module.ts → module.d.ts} +0 -4
  210. package/package.json +23 -9
  211. package/.browserslistrc +0 -16
  212. package/.eslintrc.json +0 -44
  213. package/karma.conf.js +0 -42
  214. package/ng-package.json +0 -10
  215. package/src/lib/actionbar/actionbar.component.html +0 -59
  216. package/src/lib/actionbar/actionbar.component.scss +0 -123
  217. package/src/lib/actionbar/actionbar.component.ts +0 -174
  218. package/src/lib/common/edu-sharing-ui-common.module.ts +0 -80
  219. package/src/lib/directives/border-box-observer.directive.ts +0 -75
  220. package/src/lib/directives/check-text-overflow.directive.ts +0 -61
  221. package/src/lib/directives/drag-nodes/drag-nodes.ts +0 -32
  222. package/src/lib/directives/drag-nodes/nodes-drag-source.directive.ts +0 -79
  223. package/src/lib/directives/drag-nodes/nodes-drag.directive.ts +0 -43
  224. package/src/lib/directives/drag-nodes/nodes-drop-target.directive.ts +0 -116
  225. package/src/lib/directives/focus-state.directive.ts +0 -34
  226. package/src/lib/directives/icon.directive.ts +0 -142
  227. package/src/lib/directives/nodes-drop-target-legacy.directive.ts +0 -155
  228. package/src/lib/dropdown/dropdown.component.html +0 -32
  229. package/src/lib/dropdown/dropdown.component.scss +0 -67
  230. package/src/lib/dropdown/dropdown.component.ts +0 -71
  231. package/src/lib/edu-sharing-ui-configuration.ts +0 -47
  232. package/src/lib/edu-sharing-ui.module.ts +0 -49
  233. package/src/lib/list-items/available-widgets.ts +0 -30
  234. package/src/lib/list-items/format-duration.pipe.ts +0 -17
  235. package/src/lib/list-items/list-base/list-base.component.html +0 -52
  236. package/src/lib/list-items/list-base/list-base.component.ts +0 -44
  237. package/src/lib/list-items/list-collection-info/list-collection-info.component.html +0 -48
  238. package/src/lib/list-items/list-collection-info/list-collection-info.component.scss +0 -8
  239. package/src/lib/list-items/list-collection-info/list-collection-info.component.ts +0 -24
  240. package/src/lib/list-items/list-counts/list-counts.component.html +0 -1
  241. package/src/lib/list-items/list-counts/list-counts.component.scss +0 -3
  242. package/src/lib/list-items/list-counts/list-counts.component.ts +0 -59
  243. package/src/lib/list-items/list-items.module.ts +0 -33
  244. package/src/lib/list-items/list-node-license/list-node-license.component.html +0 -8
  245. package/src/lib/list-items/list-node-license/list-node-license.component.ts +0 -47
  246. package/src/lib/list-items/list-node-replication-source/list-node-replication-source.component.html +0 -11
  247. package/src/lib/list-items/list-node-replication-source/list-node-replication-source.component.ts +0 -60
  248. package/src/lib/list-items/list-node-workflow/list-node-workflow.component.html +0 -3
  249. package/src/lib/list-items/list-node-workflow/list-node-workflow.component.ts +0 -21
  250. package/src/lib/list-items/list-text/list-text.component.html +0 -176
  251. package/src/lib/list-items/list-text/list-text.component.scss +0 -3
  252. package/src/lib/list-items/list-text/list-text.component.ts +0 -107
  253. package/src/lib/list-items/list-widget.ts +0 -52
  254. package/src/lib/list-items/node-row/node-row.component.html +0 -31
  255. package/src/lib/list-items/node-row/node-row.component.scss +0 -50
  256. package/src/lib/list-items/node-row/node-row.component.ts +0 -16
  257. package/src/lib/list-items/node-source.pipe.ts +0 -48
  258. package/src/lib/node-entries/combined-data-source.ts +0 -51
  259. package/src/lib/node-entries/drag-preview/drag-preview.component.html +0 -6
  260. package/src/lib/node-entries/drag-preview/drag-preview.component.scss +0 -35
  261. package/src/lib/node-entries/drag-preview/drag-preview.component.ts +0 -15
  262. package/src/lib/node-entries/items-cap.ts +0 -54
  263. package/src/lib/node-entries/list-item-label.pipe.ts +0 -28
  264. package/src/lib/node-entries/mixins.scss +0 -23
  265. package/src/lib/node-entries/node-cache.spec.ts +0 -199
  266. package/src/lib/node-entries/node-cache.ts +0 -81
  267. package/src/lib/node-entries/node-data-source.ts +0 -148
  268. package/src/lib/node-entries/node-entries-card/node-entries-card.component.html +0 -167
  269. package/src/lib/node-entries/node-entries-card/node-entries-card.component.scss +0 -28
  270. package/src/lib/node-entries/node-entries-card/node-entries-card.component.ts +0 -132
  271. package/src/lib/node-entries/node-entries-card/node-entries-card.main.scss +0 -261
  272. package/src/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.html +0 -205
  273. package/src/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.scss +0 -181
  274. package/src/lib/node-entries/node-entries-card-grid/node-entries-card-grid.component.ts +0 -361
  275. package/src/lib/node-entries/node-entries-card-small/node-entries-card-small.component.html +0 -100
  276. package/src/lib/node-entries/node-entries-card-small/node-entries-card-small.component.scss +0 -46
  277. package/src/lib/node-entries/node-entries-card-small/node-entries-card-small.component.ts +0 -40
  278. package/src/lib/node-entries/node-entries-global-options/node-entries-global-options.component.html +0 -23
  279. package/src/lib/node-entries/node-entries-global-options/node-entries-global-options.component.scss +0 -58
  280. package/src/lib/node-entries/node-entries-global-options/node-entries-global-options.component.ts +0 -16
  281. package/src/lib/node-entries/node-entries-global.service.ts +0 -79
  282. package/src/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.html +0 -25
  283. package/src/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.scss +0 -32
  284. package/src/lib/node-entries/node-entries-table/column-chooser/column-chooser.component.ts +0 -31
  285. package/src/lib/node-entries/node-entries-table/node-entries-table.component.html +0 -270
  286. package/src/lib/node-entries/node-entries-table/node-entries-table.component.scss +0 -169
  287. package/src/lib/node-entries/node-entries-table/node-entries-table.component.ts +0 -333
  288. package/src/lib/node-entries/node-entries-wrapper.component.ts +0 -363
  289. package/src/lib/node-entries/node-entries.component.html +0 -33
  290. package/src/lib/node-entries/node-entries.component.scss +0 -13
  291. package/src/lib/node-entries/node-entries.component.ts +0 -151
  292. package/src/lib/node-entries/node-entries.module.ts +0 -93
  293. package/src/lib/node-entries/node-rating/node-rating.component.html +0 -53
  294. package/src/lib/node-entries/node-rating/node-rating.component.scss +0 -31
  295. package/src/lib/node-entries/node-rating/node-rating.component.ts +0 -105
  296. package/src/lib/node-entries/node-stats-badges/node-stats-badges.component.html +0 -39
  297. package/src/lib/node-entries/node-stats-badges/node-stats-badges.component.scss +0 -44
  298. package/src/lib/node-entries/node-stats-badges/node-stats-badges.component.ts +0 -43
  299. package/src/lib/node-entries/node-type-badge/node-type-badge.component.html +0 -31
  300. package/src/lib/node-entries/node-type-badge/node-type-badge.component.scss +0 -5
  301. package/src/lib/node-entries/node-type-badge/node-type-badge.component.ts +0 -36
  302. package/src/lib/node-entries/option-button/option-button.component.ts +0 -42
  303. package/src/lib/node-entries/preview-image/preview-image.component.html +0 -19
  304. package/src/lib/node-entries/preview-image/preview-image.component.scss +0 -31
  305. package/src/lib/node-entries/preview-image/preview-image.component.ts +0 -47
  306. package/src/lib/node-entries/sort-select-panel/sort-select-panel.component.html +0 -27
  307. package/src/lib/node-entries/sort-select-panel/sort-select-panel.component.scss +0 -9
  308. package/src/lib/node-entries/sort-select-panel/sort-select-panel.component.ts +0 -26
  309. package/src/lib/node-url/node-url.component.html +0 -66
  310. package/src/lib/node-url/node-url.component.scss +0 -32
  311. package/src/lib/node-url/node-url.component.ts +0 -136
  312. package/src/lib/pipes/file-size.pipe.ts +0 -24
  313. package/src/lib/pipes/format-date.pipe.ts +0 -39
  314. package/src/lib/pipes/node-icon.pipe.ts +0 -11
  315. package/src/lib/pipes/node-image-size.pipe.ts +0 -18
  316. package/src/lib/pipes/node-image.pipe.ts +0 -71
  317. package/src/lib/pipes/node-person-name.pipe.ts +0 -41
  318. package/src/lib/pipes/node-title.pipe.ts +0 -12
  319. package/src/lib/pipes/option-tooltip.pipe.ts +0 -32
  320. package/src/lib/pipes/replace-chars.pipe.ts +0 -21
  321. package/src/lib/pipes/vcard-name.pipe.ts +0 -11
  322. package/src/lib/services/abstract/keyboard-shortcuts.service.ts +0 -10
  323. package/src/lib/services/abstract/options-helper.service.ts +0 -29
  324. package/src/lib/services/accessibility.service.ts +0 -101
  325. package/src/lib/services/node-entries.service.ts +0 -172
  326. package/src/lib/services/node-helper.service.ts +0 -239
  327. package/src/lib/services/nodes-drag-drop.service.ts +0 -165
  328. package/src/lib/services/options-helper-data.service.ts +0 -186
  329. package/src/lib/services/repo-url.service.ts +0 -46
  330. package/src/lib/services/temporary-storage.service.ts +0 -58
  331. package/src/lib/services/ui.service.ts +0 -182
  332. package/src/lib/sort-dropdown/sort-dropdown.component.html +0 -22
  333. package/src/lib/sort-dropdown/sort-dropdown.component.scss +0 -47
  334. package/src/lib/sort-dropdown/sort-dropdown.component.ts +0 -42
  335. package/src/lib/spinner/spinner.component.html +0 -14
  336. package/src/lib/spinner/spinner.component.scss +0 -141
  337. package/src/lib/spinner/spinner.component.ts +0 -12
  338. package/src/lib/translations/README.md +0 -44
  339. package/src/lib/translations/fallback-translation-handler.ts +0 -7
  340. package/src/lib/translations/languages.ts +0 -6
  341. package/src/lib/translations/translation-loader.spec.ts +0 -352
  342. package/src/lib/translations/translation-loader.ts +0 -189
  343. package/src/lib/translations/translations.module.ts +0 -49
  344. package/src/lib/translations/translations.service.spec.ts +0 -152
  345. package/src/lib/translations/translations.service.ts +0 -188
  346. package/src/lib/types/accessibillity.ts +0 -15
  347. package/src/lib/types/keyboard-shortcuts.ts +0 -29
  348. package/src/lib/types/list-item.ts +0 -67
  349. package/src/lib/types/option-item.ts +0 -247
  350. package/src/lib/types/workflow.ts +0 -35
  351. package/src/lib/util/DateHelper.spec.ts +0 -112
  352. package/src/lib/util/DateHelper.ts +0 -197
  353. package/src/lib/util/VCard.ts +0 -277
  354. package/src/lib/util/color-helper.ts +0 -125
  355. package/src/lib/util/duration-helper.spec.ts +0 -35
  356. package/src/lib/util/duration-helper.ts +0 -98
  357. package/src/lib/util/functions.ts +0 -15
  358. package/src/lib/util/helper.ts +0 -60
  359. package/src/lib/util/isNumeric.ts +0 -13
  360. package/src/lib/util/rest-helper.ts +0 -28
  361. package/src/lib/util/ui-animation.ts +0 -154
  362. package/src/lib/util/ui-constants.ts +0 -20
  363. package/src/test.ts +0 -28
  364. package/tsconfig.lib.json +0 -15
  365. package/tsconfig.lib.prod.json +0 -10
  366. package/tsconfig.spec.json +0 -17
  367. /package/{src/lib/types/api-models.ts → lib/types/api-models.d.ts} +0 -0
@@ -1,181 +0,0 @@
1
- @use 'sass:math';
2
- @import '../../../../assets/scss/mixins';
3
-
4
- $horizontalScrollPadding: 1.5em;
5
-
6
- @keyframes OrderAnimationCards {
7
- 0% {
8
- transform: rotate(-0.25deg);
9
- }
10
- 50% {
11
- transform: rotate(0.25deg);
12
- }
13
- 100% {
14
- transform: rotate(-0.25deg);
15
- }
16
- }
17
-
18
- .order-panel {
19
- margin-left: auto;
20
- }
21
-
22
- .load-more {
23
- display: flex;
24
- justify-content: center;
25
- }
26
- .card-grid-wrapper {
27
- position: relative;
28
- z-index: 0;
29
- .scroll-helper-left,
30
- .scroll-helper-right {
31
- position: absolute;
32
- width: 15%;
33
- min-width: 60px;
34
- max-width: calc(var(--cardWidth) * 0.4);
35
- display: flex;
36
- align-items: center;
37
- // do not overlay scrollbar
38
- height: calc(100% - 10px);
39
- z-index: 5;
40
- @include clickable();
41
- > button {
42
- background-color: #fff;
43
- color: var(--primary);
44
- @include materialShadowMediumLarge(false, 0.25);
45
- }
46
- }
47
- .scroll-helper-left {
48
- left: -$horizontalScrollPadding;
49
- justify-content: flex-start;
50
- background: linear-gradient(
51
- to left,
52
- rgba(255, 255, 255, 0.000001) 0,
53
- rgb(255, 255, 255) calc(100% - $horizontalScrollPadding)
54
- );
55
- > button {
56
- margin-left: calc($horizontalScrollPadding - 8px);
57
- }
58
- }
59
- .scroll-helper-right {
60
- right: -$horizontalScrollPadding;
61
- justify-content: flex-end;
62
- background: linear-gradient(
63
- to right,
64
- rgba(255, 255, 255, 0.000001) 0,
65
- rgb(255, 255, 255) calc(100% - $horizontalScrollPadding)
66
- );
67
- > button {
68
- margin-right: calc($horizontalScrollPadding - 8px);
69
- }
70
- }
71
- }
72
- .card-grid {
73
- display: grid;
74
- grid-template-columns: repeat(auto-fill, minmax(var(--cardWidth), 1fr));
75
- grid-column-gap: 20px;
76
- grid-row-gap: 20px;
77
- grid-template-rows: auto;
78
- padding-block-start: 1em;
79
- padding-block-end: 1em;
80
- &.card-grid-layout-scroll {
81
- position: relative;
82
- overflow-x: auto;
83
- overflow-y: hidden;
84
- scroll-snap-type: x mandatory;
85
- grid-auto-flow: column;
86
- grid-template-columns: repeat(auto-fit, var(--cardWidth));
87
- grid-auto-columns: minmax(var(--cardWidth), 1fr);
88
- // slightly more padding to prevent shadow clipping
89
- padding: $horizontalScrollPadding;
90
- // compensate for larger padding
91
- margin: calc(1em - $horizontalScrollPadding) (-$horizontalScrollPadding) 0;
92
- &::-webkit-scrollbar-track {
93
- margin: 0 $horizontalScrollPadding;
94
- }
95
- @include materialScrollbar();
96
- > .card-grid-drag-wrapper {
97
- scroll-snap-align: center;
98
- scroll-snap-stop: always;
99
- }
100
- }
101
- > .card-grid-drag-wrapper {
102
- position: relative;
103
- // .cdk-drag-placeholder ~ .card-grid-drop-blocked-container {
104
- // display: none;
105
- // }
106
- .card-grid-drop-allowed-container,
107
- .card-grid-drop-blocked-container {
108
- position: absolute;
109
- z-index: 1;
110
- left: 0;
111
- right: 0;
112
- top: 0;
113
- bottom: 0;
114
- display: flex;
115
- justify-content: center;
116
- align-items: center;
117
- > i {
118
- background: radial-gradient(circle, #fff 30%, rgba(255, 255, 255, 0.0001) 70%);
119
- width: 200px;
120
- height: 200px;
121
- font-size: 80px;
122
- display: flex;
123
- align-items: center;
124
- justify-content: center;
125
- }
126
- }
127
- .card-grid-drop-allowed-container {
128
- > i {
129
- color: var(--colorStatusPositive);
130
- }
131
- }
132
- .card-grid-drop-blocked-container {
133
- backdrop-filter: blur(5px);
134
- > i {
135
- color: var(--colorStatusNegative);
136
- }
137
- }
138
- .selected-when-dragging {
139
- opacity: 0.5; // Same as .cdk-drag-placeholder
140
- }
141
- &.cdk-drop-list-dragging {
142
- > *:first-child {
143
- display: none;
144
- }
145
- }
146
- }
147
- &.card-grid-reorder {
148
- > .card-grid-order-wrapper {
149
- $orderAnimationTime: 0.5s;
150
- animation-iteration-count: infinite;
151
- animation-duration: $orderAnimationTime;
152
- animation-name: OrderAnimationCards;
153
- &:nth-of-type(2n) {
154
- animation-delay: 0s;
155
- }
156
- &:nth-of-type(2n + 1) {
157
- animation-delay: math.div(-$orderAnimationTime, 2);
158
- }
159
- &:nth-of-type(3n) {
160
- animation-delay: math.div(-$orderAnimationTime, 4);
161
- }
162
- &:nth-of-type(5n) {
163
- animation-delay: math.div(-$orderAnimationTime, 8);
164
- }
165
- .cdk-drag-placeholder {
166
- display: none;
167
- }
168
- }
169
- }
170
- }
171
-
172
- .card-drag-preview {
173
- width: 250px;
174
- }
175
-
176
- // Disable animations for rearranging. We misuse `entered` events for doing the rearranging, so the
177
- // preview animation would go to the wrong position (see
178
- // https://stackblitz.com/edit/drag-drop-dashboard).
179
- ::ng-deep .es-card-grid-rearrange-drag-preview.cdk-drag-animating {
180
- transition: none;
181
- }
@@ -1,361 +0,0 @@
1
- import { CdkDragEnter, CdkDropList, moveItemInArray } from '@angular/cdk/drag-drop';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- ElementRef,
6
- Input,
7
- NgZone,
8
- OnDestroy,
9
- OnInit,
10
- QueryList,
11
- TemplateRef,
12
- ViewChild,
13
- ViewChildren,
14
- } from '@angular/core';
15
- import { Sort } from '@angular/material/sort';
16
- import { Node, RestConstants } from 'ngx-edu-sharing-api';
17
- import * as rxjs from 'rxjs';
18
- import { BehaviorSubject, Subject } from 'rxjs';
19
- import { distinctUntilChanged, map, switchMap, take, takeUntil } from 'rxjs/operators';
20
- import { GridLayout, NodeEntriesDisplayType } from '../entries-model';
21
- import { ItemsCap } from '../items-cap';
22
- import { NodeEntriesGlobalService } from '../node-entries-global.service';
23
- import { NodeEntriesTemplatesService } from '../node-entries-templates.service';
24
- import { SortSelectPanelComponent } from '../sort-select-panel/sort-select-panel.component';
25
- import { CustomTemplatesDataSource } from '../custom-templates-data-source';
26
- import { Target } from '../../types/option-item';
27
- import { NodeEntriesService } from '../../services/node-entries.service';
28
- import { UIService } from '../../services/ui.service';
29
- import { ListItemSort } from '../../types/list-item';
30
- import { DragData } from '../../types/drag-drop';
31
-
32
- let displayedWarnings: string[] = [];
33
-
34
- @Component({
35
- selector: 'es-node-entries-card-grid',
36
- templateUrl: 'node-entries-card-grid.component.html',
37
- styleUrls: ['node-entries-card-grid.component.scss'],
38
- changeDetection: ChangeDetectionStrategy.OnPush,
39
- })
40
- export class NodeEntriesCardGridComponent<T extends Node> implements OnInit, OnDestroy {
41
- readonly NodeEntriesDisplayType = NodeEntriesDisplayType;
42
- readonly Target = Target;
43
- /**
44
- * relative scrolling when a scrolling arrow (left or right) is used
45
- * a value of 1 would mean to scroll the full width of the entire content
46
- */
47
- readonly ScrollingOffsetPercentage = 0.4;
48
-
49
- @ViewChild('gridTop', { static: true }) set gridTop(value: TemplateRef<unknown>) {
50
- this.registerGridTop(value);
51
- }
52
- @ViewChild(SortSelectPanelComponent)
53
- set sortPanel(value: SortSelectPanelComponent) {
54
- // if (this.entriesService.dataSource instanceof NodeDataSourceRemote) {
55
- setTimeout(() => {
56
- (this.entriesService.dataSource as any).sortPanel = value;
57
- });
58
- // }
59
- }
60
- @ViewChildren(CdkDropList) dropListsQuery: QueryList<CdkDropList>;
61
- @ViewChild('grid') gridRef: ElementRef;
62
- @ViewChildren('item', { read: ElementRef }) itemRefs: QueryList<ElementRef<HTMLElement>>;
63
- @Input() displayType: NodeEntriesDisplayType;
64
-
65
- isDragging = false; // Drag-and-drop, not rearrange
66
- dropLists: CdkDropList[];
67
- /**
68
- * Whether the number of shown items is limited by `gridConfig.maxRows`.
69
- *
70
- * A value of `true` does not mean, that there would be more items available.
71
- */
72
- visibleItemsLimited = false;
73
- layout: GridLayout;
74
- /**
75
- * updates via boxObserver
76
- * and holds the information if scrolling in the direction is currently feasible
77
- */
78
- scroll = {
79
- left: false,
80
- right: false,
81
- };
82
-
83
- readonly nodes$;
84
- private readonly maxRows$;
85
- private readonly layout$;
86
- private readonly itemsPerRowSubject = new BehaviorSubject<number | null>(null);
87
- readonly itemsCap = new ItemsCap<T>();
88
- private globalCursorStyle: HTMLStyleElement;
89
- private destroyed = new Subject<void>();
90
-
91
- constructor(
92
- public entriesService: NodeEntriesService<T>,
93
- public entriesGlobalService: NodeEntriesGlobalService,
94
- public templatesService: NodeEntriesTemplatesService,
95
- public ui: UIService,
96
- private ngZone: NgZone,
97
- ) {
98
- this.nodes$ = this.entriesService.dataSource$.pipe(
99
- switchMap((dataSource) => dataSource?.connect()),
100
- );
101
- this.maxRows$ = this.entriesService.gridConfig$.pipe(
102
- map((gridConfig) => gridConfig?.maxRows || null),
103
- distinctUntilChanged(),
104
- );
105
- this.layout$ = this.entriesService.gridConfig$.pipe(
106
- map((gridConfig) => gridConfig?.layout || 'grid'),
107
- distinctUntilChanged(),
108
- );
109
- this.entriesService.dataSource$.pipe(takeUntil(this.destroyed)).subscribe(() => {
110
- this.updateScrollState();
111
- });
112
- }
113
-
114
- ngOnInit(): void {
115
- this.registerItemsCap();
116
- this.registerLayout();
117
- this.registerVisibleItemsLimited();
118
- }
119
-
120
- ngOnDestroy(): void {
121
- this.destroyed.next();
122
- this.destroyed.complete();
123
- }
124
-
125
- private registerGridTop(gridTop: TemplateRef<unknown>): void {
126
- setTimeout(() => {
127
- this.templatesService.entriesTopMatter = gridTop;
128
- });
129
- this.destroyed.subscribe(() => {
130
- if (this.templatesService.entriesTopMatter === gridTop) {
131
- setTimeout(() => {
132
- this.templatesService.entriesTopMatter = null;
133
- });
134
- }
135
- });
136
- }
137
-
138
- private registerItemsCap() {
139
- this.entriesService.dataSource$
140
- .pipe(takeUntil(this.destroyed))
141
- .subscribe((dataSource) => (dataSource.itemsCap = this.itemsCap));
142
- rxjs.combineLatest([this.itemsPerRowSubject.pipe(distinctUntilChanged()), this.maxRows$])
143
- .pipe(
144
- map(([itemsPerRow, maxRows]) =>
145
- maxRows > 0 && itemsPerRow !== null ? itemsPerRow * maxRows : null,
146
- ),
147
- )
148
- .subscribe((cap) => (this.itemsCap.cap = cap));
149
- }
150
-
151
- private registerLayout() {
152
- this.layout$.subscribe((layout) => (this.layout = layout));
153
- }
154
-
155
- onSortChange(sort: Sort) {
156
- this.entriesService.sort.active = sort.active;
157
- this.entriesService.sort.direction = sort.direction;
158
- this.entriesService.sortChange.emit(this.entriesService.sort);
159
- }
160
-
161
- loadData(source: 'scroll' | 'button') {
162
- // @TODO: Maybe this is better handled in a more centraled service
163
- if (source === 'scroll') {
164
- // check if there is a footer
165
- const elements = document.getElementsByTagName('footer');
166
- if (elements.length && elements.item(0).innerHTML.trim()) {
167
- return;
168
- }
169
- }
170
- const couldLoadMore = this.entriesService.loadMore(source);
171
- if (couldLoadMore && source === 'button') {
172
- this.focusFirstNewItemWhenLoaded();
173
- }
174
- }
175
-
176
- onCustomSortingInProgressChange() {
177
- this.entriesService.sortChange.emit(this.entriesService.sort);
178
- setTimeout(() => {
179
- this.refreshDropLists();
180
- });
181
- }
182
-
183
- onRearrangeDragEntered($event: CdkDragEnter) {
184
- moveItemInArray(
185
- this.entriesService.dataSource.getData(),
186
- $event.item.data,
187
- $event.container.data,
188
- );
189
- // `CdkDrag` doesn't really want us to rearrange the items while dragging. Its cached
190
- // element positions get out of sync unless we update them manually.
191
- this.ngZone.runOutsideAngular(() =>
192
- setTimeout(() =>
193
- this.dropLists?.forEach((list) => (list._dropListRef as any)['_cacheItems']()),
194
- ),
195
- );
196
- }
197
-
198
- onRearrangeDragStarted() {
199
- this.globalCursorStyle = document.createElement('style');
200
- document.body.appendChild(this.globalCursorStyle);
201
- this.globalCursorStyle.innerHTML = `* {cursor: grabbing !important; }`;
202
- }
203
-
204
- onRearrangeDragEnded() {
205
- document.body.removeChild(this.globalCursorStyle);
206
- this.globalCursorStyle = null;
207
- }
208
-
209
- getDragStartDelay(): number {
210
- if (this.ui.isMobile()) {
211
- return 500;
212
- } else {
213
- return null;
214
- }
215
- }
216
-
217
- private registerVisibleItemsLimited() {
218
- this.maxRows$.subscribe((maxRows) => {
219
- this.visibleItemsLimited = maxRows > 0;
220
- });
221
- }
222
-
223
- private refreshDropLists() {
224
- this.dropLists = this.dropListsQuery.toArray();
225
- }
226
-
227
- private focusFirstNewItemWhenLoaded() {
228
- const oldLength = this.itemRefs.length;
229
- this.itemRefs.changes
230
- .pipe(take(1))
231
- .subscribe((items: NodeEntriesCardGridComponent<T>['itemRefs']) => {
232
- if (items.length > oldLength) {
233
- this.focusOnce(items.get(oldLength).nativeElement);
234
- }
235
- });
236
- }
237
-
238
- private focusOnce(element: HTMLElement): void {
239
- element.setAttribute('tabindex', '-1');
240
- element.focus();
241
- element.addEventListener('blur', () => element.removeAttribute('tabindex'), { once: true });
242
- }
243
-
244
- onGridSizeChanges(): void {
245
- const itemsPerRow = this.getItemsPerRow();
246
- this.itemsPerRowSubject.next(itemsPerRow);
247
- this.updateScrollState();
248
- }
249
-
250
- private getItemsPerRow(): number | null {
251
- if (!this.gridRef?.nativeElement) {
252
- return null;
253
- }
254
- return getComputedStyle(this.gridRef.nativeElement)
255
- .getPropertyValue('grid-template-columns')
256
- .split(' ').length;
257
- }
258
-
259
- getSortColumns() {
260
- return this.entriesService.sort?.columns?.filter((c) => {
261
- const result = this.entriesService.columns
262
- .concat(
263
- new ListItemSort('NODE', 'score'),
264
- new ListItemSort('NODE', RestConstants.CCM_PROP_COLLECTION_ORDERED_POSITION),
265
- new ListItemSort('NODE', RestConstants.CM_PROP_TITLE),
266
- new ListItemSort('NODE', RestConstants.CM_NAME),
267
- new ListItemSort('NODE', RestConstants.CM_MODIFIED_DATE),
268
- new ListItemSort('NODE', RestConstants.CCM_PROP_REPLICATIONMODIFIED),
269
- new ListItemSort('NODE', RestConstants.CCM_PROP_REPLICATIONSOURCETIMESTAMP),
270
- )
271
- .some((c2) => c2.name === c.name);
272
- if (!result) {
273
- const warning =
274
- 'Sort field ' +
275
- c.name +
276
- ' was specified but is not present as a column. ' +
277
- 'It will be ignored. Please also configure this field in the <lists> section';
278
- if (!displayedWarnings.includes(warning)) {
279
- console.warn(warning);
280
- displayedWarnings.push(warning);
281
- }
282
- }
283
- return result;
284
- });
285
- }
286
-
287
- canDropNodes = (dragData: DragData<T>) => this.entriesService.dragDrop.dropAllowed?.(dragData);
288
-
289
- onNodesDropped(dragData: DragData<Node>) {
290
- this.entriesService.dragDrop.dropped(dragData.target, {
291
- element: dragData.draggedNodes,
292
- mode: dragData.action,
293
- });
294
- }
295
-
296
- getDragEnabled(): boolean {
297
- return this.entriesService.dragDrop?.dragAllowed && !this.ui.isMobile();
298
- }
299
-
300
- getDragData(node: T): T[] {
301
- const selection = this.entriesService.selection;
302
- if (selection.isSelected(node)) {
303
- return selection.selected;
304
- } else {
305
- return [node];
306
- }
307
- }
308
-
309
- onDragStarted(node: T) {
310
- if (!this.entriesService.selection.isSelected(node)) {
311
- this.entriesService.selection.clear();
312
- this.entriesService.selection.select(node);
313
- }
314
- this.isDragging = true;
315
- }
316
-
317
- onDragEnded() {
318
- this.isDragging = false;
319
- }
320
-
321
- private canScroll(direction: 'left' | 'right') {
322
- const element = this.gridRef?.nativeElement;
323
- if (element) {
324
- if (direction === 'left') {
325
- return element.scrollLeft > 0;
326
- } else if (direction === 'right') {
327
- /*
328
- use a small pixel buffer (10px) because scrolling aligns with the start of each card and
329
- it can cause slight alignment issues on the end of the container
330
- */
331
- return element.scrollLeft < element.scrollWidth - element.clientWidth - 10;
332
- }
333
- }
334
- return false;
335
- }
336
-
337
- updateScrollState() {
338
- if (this.layout === 'scroll') {
339
- this.scroll.left = this.canScroll('left');
340
- this.scroll.right = this.canScroll('right');
341
- }
342
- }
343
-
344
- doScroll(direction: 'left' | 'right') {
345
- // 1 is enough because the browser will handle it via css snapping
346
- const leftScroll = this.gridRef?.nativeElement.scrollLeft;
347
- const rect = this.gridRef?.nativeElement.getBoundingClientRect();
348
- // using scroll because it works more reliable than scrollBy
349
- this.gridRef?.nativeElement.scroll({
350
- left:
351
- leftScroll +
352
- Math.max(250, rect.width * this.ScrollingOffsetPercentage) *
353
- (direction === 'right' ? 1 : -1),
354
- behavior: 'smooth',
355
- });
356
- }
357
-
358
- isCustomTemplate() {
359
- return this.entriesService.dataSource instanceof CustomTemplatesDataSource;
360
- }
361
- }
@@ -1,100 +0,0 @@
1
- <div
2
- class="grid-card"
3
- [class.grid-card-collection]="nodeHelper.isNodeCollection(node)"
4
- [class.dynamic-single-click]="entriesService.singleClickHint === 'dynamic'"
5
- [style.background-color]="nodeHelper.isNodeCollection(node) ? node.collection.color : null"
6
- (contextmenu)="openContextmenu($event)"
7
- (keydown.ContextMenu)="openContextmenu($event)"
8
- >
9
- <div
10
- *ngIf="templatesService.overlay"
11
- class="card-overlay"
12
- (click)="
13
- entriesService.clickItem.emit({
14
- element: node,
15
- source: ClickSource.Overlay
16
- })
17
- "
18
- >
19
- <ng-container
20
- *ngTemplateOutlet="templatesService.overlay; context: { element: node }"
21
- ></ng-container>
22
- </div>
23
- <es-node-url
24
- *ngIf="entriesService.elementInteractionType === InteractionType.DefaultActionLink"
25
- mode="wrapper"
26
- [node]="node"
27
- esFocusState
28
- #cardFocusState="esFocusState"
29
- >
30
- <ng-container
31
- *ngTemplateOutlet="
32
- image;
33
- context: { playAnimation: cardFocusState.hovering || cardFocusState.hasFocus }
34
- "
35
- ></ng-container>
36
- <ng-container *ngTemplateOutlet="meta"></ng-container>
37
- </es-node-url>
38
- <ng-container *ngIf="entriesService.elementInteractionType !== InteractionType.DefaultActionLink">
39
- <ng-container *ngTemplateOutlet="image"></ng-container>
40
- <ng-container *ngTemplateOutlet="meta"></ng-container>
41
- </ng-container>
42
- </div>
43
- <ng-template #image let-playAnimation="playAnimation">
44
- <div
45
- class="card-image-area"
46
- (click)="
47
- entriesService.clickItem.emit({
48
- element: node,
49
- source: ClickSource.Preview
50
- })
51
- "
52
- >
53
- <es-preview-image
54
- *ngIf="!(nodeHelper.isNodeCollection(node) && node.preview.isIcon)"
55
- [node]="node"
56
- [playAnimation]="playAnimation"
57
- ></es-preview-image>
58
- <div
59
- *ngIf="nodeHelper.isNodeCollection(node) && node.preview.isIcon"
60
- class="card-collection-image"
61
- >
62
- <i esIcon="layers"></i>
63
- </div>
64
- </div>
65
- </ng-template>
66
- <ng-template #meta>
67
- <div
68
- class="card-meta"
69
- (click)="
70
- entriesService.clickItem.emit({
71
- element: node,
72
- source: ClickSource.Metadata
73
- })
74
- "
75
- >
76
- <div
77
- *ngFor="let displayPart of entriesService.columns; let first = first"
78
- class="card-meta-row"
79
- >
80
- <ng-container *ngIf="first">
81
- <es-node-url
82
- *ngIf="entriesService.elementInteractionType === InteractionType.DefaultActionLink"
83
- [node]="node"
84
- #link
85
- >
86
- <es-list-base [item]="displayPart" [node]="node" [provideLabel]="false"> </es-list-base>
87
- </es-node-url>
88
- <div *ngIf="entriesService.elementInteractionType !== InteractionType.DefaultActionLink">
89
- <es-list-base [item]="displayPart" [node]="node" [provideLabel]="false"> </es-list-base>
90
- </div>
91
- </ng-container>
92
- <ng-container *ngIf="!first">
93
- <es-list-base [item]="displayPart" [node]="node" [provideLabel]="false"> </es-list-base>
94
- </ng-container>
95
- </div>
96
- </div>
97
- <ng-container
98
- *ngTemplateOutlet="templatesService.actionArea; context: { element: node }"
99
- ></ng-container>
100
- </ng-template>
@@ -1,46 +0,0 @@
1
- $imageHeight: 100px;
2
- $entriesCardPaddingHorizontal: 15px;
3
- $entriesCardPaddingVertical: 8px;
4
- $topBarHeight: 40px;
5
- $collectionIconPadding: 25px;
6
- $collectionIconSize: 25px;
7
-
8
- @import '../node-entries-card/node-entries-card.main';
9
-
10
- .grid-card .card-meta-row ::ng-deep es-node-url {
11
- a {
12
- &.cdk-keyboard-focused {
13
- // Normal focusColor might have insufficient contrast on color-matching background.
14
- outline-color: var(--palette-primary-400);
15
- }
16
- }
17
- }
18
-
19
- .grid-card {
20
- cursor: pointer;
21
- &.grid-card-collection {
22
- // default fallback color
23
- background-color: rgb(var(--palette-primary-200));
24
- }
25
- .card-meta {
26
- background-color: rgba(255, 255, 255, 0.8);
27
- // grid-template-columns: 50%;
28
- padding-bottom: $entriesCardPaddingVertical;
29
-
30
- .card-meta-row {
31
- &:nth-child(1) {
32
- grid-column: 1/3;
33
- }
34
-
35
- &:nth-child(2) {
36
- justify-self: flex-start;
37
- }
38
-
39
- &:nth-child(2),
40
- &:nth-child(3) {
41
- grid-row: 2;
42
- font-size: var(--fontSizeXSmall);
43
- }
44
- }
45
- }
46
- }