ngx-wapp-components 1.0.49 → 1.0.51

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 (349) hide show
  1. package/ng-package.json +7 -0
  2. package/package.json +42 -51
  3. package/src/lib/button/w-button/w-button.component.html +85 -0
  4. package/src/lib/button/w-button/w-button.component.scss +218 -0
  5. package/src/lib/button/w-button/w-button.component.spec.ts +23 -0
  6. package/src/lib/button/w-button/w-button.component.ts +40 -0
  7. package/src/lib/button/w-buttons-footer/w-buttons-footer.component.html +3 -0
  8. package/src/lib/button/w-buttons-footer/w-buttons-footer.component.scss +11 -0
  9. package/src/lib/button/w-buttons-footer/w-buttons-footer.component.spec.ts +23 -0
  10. package/src/lib/button/w-buttons-footer/w-buttons-footer.component.ts +10 -0
  11. package/src/lib/button/w-select-button/w-select-button.component.html +29 -0
  12. package/src/lib/button/w-select-button/w-select-button.component.scss +65 -0
  13. package/src/lib/button/w-select-button/w-select-button.component.spec.ts +23 -0
  14. package/src/lib/button/w-select-button/w-select-button.component.ts +65 -0
  15. package/src/lib/button/w-toggle-button/w-toggle-button.component.html +33 -0
  16. package/src/lib/button/w-toggle-button/w-toggle-button.component.scss +112 -0
  17. package/src/lib/button/w-toggle-button/w-toggle-button.component.spec.ts +23 -0
  18. package/src/lib/button/w-toggle-button/w-toggle-button.component.ts +75 -0
  19. package/src/lib/edit/w-edit-calendar/w-edit-calendar.component.html +37 -0
  20. package/src/lib/edit/w-edit-calendar/w-edit-calendar.component.scss +59 -0
  21. package/src/lib/edit/w-edit-calendar/w-edit-calendar.component.spec.ts +23 -0
  22. package/src/lib/edit/w-edit-calendar/w-edit-calendar.component.ts +75 -0
  23. package/src/lib/edit/w-edit-checkbox/w-edit-checkbox.component.html +55 -0
  24. package/src/lib/edit/w-edit-checkbox/w-edit-checkbox.component.scss +72 -0
  25. package/src/lib/edit/w-edit-checkbox/w-edit-checkbox.component.spec.ts +23 -0
  26. package/src/lib/edit/w-edit-checkbox/w-edit-checkbox.component.ts +70 -0
  27. package/src/lib/edit/w-edit-input-number/w-edit-input-number.component.html +60 -0
  28. package/src/lib/edit/w-edit-input-number/w-edit-input-number.component.scss +260 -0
  29. package/src/lib/edit/w-edit-input-number/w-edit-input-number.component.spec.ts +23 -0
  30. package/src/lib/edit/w-edit-input-number/w-edit-input-number.component.ts +85 -0
  31. package/src/lib/edit/w-edit-input-text/w-edit-input-text.component.html +59 -0
  32. package/src/lib/edit/w-edit-input-text/w-edit-input-text.component.scss +247 -0
  33. package/src/lib/edit/w-edit-input-text/w-edit-input-text.component.spec.ts +23 -0
  34. package/src/lib/edit/w-edit-input-text/w-edit-input-text.component.ts +90 -0
  35. package/src/lib/edit/w-edit-input-textarea/w-edit-input-textarea.component.html +92 -0
  36. package/src/lib/edit/w-edit-input-textarea/w-edit-input-textarea.component.scss +234 -0
  37. package/src/lib/edit/w-edit-input-textarea/w-edit-input-textarea.component.spec.ts +23 -0
  38. package/src/lib/edit/w-edit-input-textarea/w-edit-input-textarea.component.ts +71 -0
  39. package/src/lib/edit/w-edit-multiselect/w-edit-multiselect.component.html +59 -0
  40. package/src/lib/edit/w-edit-multiselect/w-edit-multiselect.component.scss +227 -0
  41. package/src/lib/edit/w-edit-multiselect/w-edit-multiselect.component.spec.ts +23 -0
  42. package/src/lib/edit/w-edit-multiselect/w-edit-multiselect.component.ts +81 -0
  43. package/src/lib/edit/w-edit-select/w-edit-select.component.html +56 -0
  44. package/src/lib/edit/w-edit-select/w-edit-select.component.scss +166 -0
  45. package/src/lib/edit/w-edit-select/w-edit-select.component.spec.ts +23 -0
  46. package/src/lib/edit/w-edit-select/w-edit-select.component.ts +83 -0
  47. package/src/lib/edit/w-edit-toggle/w-edit-toggle.component.html +55 -0
  48. package/src/lib/edit/w-edit-toggle/w-edit-toggle.component.scss +55 -0
  49. package/src/lib/edit/w-edit-toggle/w-edit-toggle.component.spec.ts +23 -0
  50. package/src/lib/edit/w-edit-toggle/w-edit-toggle.component.ts +71 -0
  51. package/src/lib/edit/w-edit-treeselect/w-edit-treeselect.component.html +58 -0
  52. package/src/lib/edit/w-edit-treeselect/w-edit-treeselect.component.scss +176 -0
  53. package/src/lib/edit/w-edit-treeselect/w-edit-treeselect.component.spec.ts +23 -0
  54. package/src/lib/edit/w-edit-treeselect/w-edit-treeselect.component.ts +80 -0
  55. package/src/lib/file/w-image-cropper/w-image-cropper.component.html +150 -0
  56. package/src/lib/file/w-image-cropper/w-image-cropper.component.scss +59 -0
  57. package/src/lib/file/w-image-cropper/w-image-cropper.component.spec.ts +23 -0
  58. package/src/lib/file/w-image-cropper/w-image-cropper.component.ts +259 -0
  59. package/src/lib/file/w-image-file-uploader/w-image-file-uploader.component.html +100 -0
  60. package/src/lib/file/w-image-file-uploader/w-image-file-uploader.component.scss +77 -0
  61. package/src/lib/file/w-image-file-uploader/w-image-file-uploader.component.spec.ts +23 -0
  62. package/src/lib/file/w-image-file-uploader/w-image-file-uploader.component.ts +388 -0
  63. package/src/lib/file/w-preview-image/w-preview-image.component.css +0 -0
  64. package/src/lib/file/w-preview-image/w-preview-image.component.html +5 -0
  65. package/src/lib/file/w-preview-image/w-preview-image.component.spec.ts +23 -0
  66. package/src/lib/file/w-preview-image/w-preview-image.component.ts +17 -0
  67. package/src/lib/icons/icons.ts +116 -0
  68. package/src/lib/icons/wapping-icons/w-icons.component.ts +52 -0
  69. package/src/lib/layout/w-body/w-body.component.html +3 -0
  70. package/src/lib/layout/w-body/w-body.component.scss +13 -0
  71. package/src/lib/layout/w-body/w-body.component.spec.ts +23 -0
  72. package/src/lib/layout/w-body/w-body.component.ts +10 -0
  73. package/src/lib/layout/w-body-container/w-body-container.component.html +3 -0
  74. package/src/lib/layout/w-body-container/w-body-container.component.scss +58 -0
  75. package/src/lib/layout/w-body-container/w-body-container.component.spec.ts +23 -0
  76. package/src/lib/layout/w-body-container/w-body-container.component.ts +10 -0
  77. package/src/lib/layout/w-body-grid/w-body-grid.component.html +3 -0
  78. package/src/lib/layout/w-body-grid/w-body-grid.component.scss +59 -0
  79. package/src/lib/layout/w-body-grid/w-body-grid.component.spec.ts +23 -0
  80. package/src/lib/layout/w-body-grid/w-body-grid.component.ts +10 -0
  81. package/src/lib/layout/w-container/w-container.component.scss +9 -0
  82. package/src/lib/layout/w-container/w-container.component.ts +14 -0
  83. package/src/lib/layout/w-footer/w-footer.component.html +11 -0
  84. package/src/lib/layout/w-footer/w-footer.component.scss +17 -0
  85. package/src/lib/layout/w-footer/w-footer.component.spec.ts +23 -0
  86. package/src/lib/layout/w-footer/w-footer.component.ts +19 -0
  87. package/src/lib/layout/w-header-panel/w-header-panel.component.html +9 -0
  88. package/src/lib/layout/w-header-panel/w-header-panel.component.scss +29 -0
  89. package/src/lib/layout/w-header-panel/w-header-panel.component.spec.ts +23 -0
  90. package/src/lib/layout/w-header-panel/w-header-panel.component.ts +27 -0
  91. package/src/lib/layout/w-navbar/w-navbar.component.html +26 -0
  92. package/src/lib/layout/w-navbar/w-navbar.component.scss +26 -0
  93. package/src/lib/layout/w-navbar/w-navbar.component.spec.ts +23 -0
  94. package/src/lib/layout/w-navbar/w-navbar.component.ts +48 -0
  95. package/src/lib/layout/w-panel/w-panel.component.html +6 -0
  96. package/src/lib/layout/w-panel/w-panel.component.scss +72 -0
  97. package/src/lib/layout/w-panel/w-panel.component.spec.ts +23 -0
  98. package/src/lib/layout/w-panel/w-panel.component.ts +13 -0
  99. package/src/lib/layout/w-panel-grid/w-panel-grid.component.html +3 -0
  100. package/src/lib/layout/w-panel-grid/w-panel-grid.component.scss +58 -0
  101. package/src/lib/layout/w-panel-grid/w-panel-grid.component.spec.ts +23 -0
  102. package/src/lib/layout/w-panel-grid/w-panel-grid.component.ts +10 -0
  103. package/src/lib/layout/w-panel-title/w-panel-title.component.html +1 -0
  104. package/src/lib/layout/w-panel-title/w-panel-title.component.scss +6 -0
  105. package/src/lib/layout/w-panel-title/w-panel-title.component.spec.ts +23 -0
  106. package/src/lib/layout/w-panel-title/w-panel-title.component.ts +10 -0
  107. package/src/lib/logos/logos.ts +7 -0
  108. package/src/lib/logos/wapping-logos/w-logos.component.ts +47 -0
  109. package/src/lib/misc/w-filter-panel/w-filter-panel.component.html +303 -0
  110. package/src/lib/misc/w-filter-panel/w-filter-panel.component.scss +391 -0
  111. package/src/lib/misc/w-filter-panel/w-filter-panel.component.spec.ts +23 -0
  112. package/src/lib/misc/w-filter-panel/w-filter-panel.component.ts +388 -0
  113. package/src/lib/misc/w-filter-panel/w-list-field/w-list-field.component.html +21 -0
  114. package/src/lib/misc/w-filter-panel/w-list-field/w-list-field.component.scss +65 -0
  115. package/src/lib/misc/w-filter-panel/w-list-field/w-list-field.component.spec.ts +23 -0
  116. package/src/lib/misc/w-filter-panel/w-list-field/w-list-field.component.ts +73 -0
  117. package/src/lib/report/w-powerbi-report/w-powerbi-report.component.css +24 -0
  118. package/src/lib/report/w-powerbi-report/w-powerbi-report.component.html +52 -0
  119. package/src/lib/report/w-powerbi-report/w-powerbi-report.component.spec.ts +23 -0
  120. package/src/lib/report/w-powerbi-report/w-powerbi-report.component.ts +170 -0
  121. package/src/lib/search/w-autocomplete-search/w-autocomplete-search.component.html +92 -0
  122. package/src/lib/search/w-autocomplete-search/w-autocomplete-search.component.scss +142 -0
  123. package/src/lib/search/w-autocomplete-search/w-autocomplete-search.component.spec.ts +23 -0
  124. package/src/lib/search/w-autocomplete-search/w-autocomplete-search.component.ts +94 -0
  125. package/src/lib/search/w-input-search/w-input-search.component.html +130 -0
  126. package/src/lib/search/w-input-search/w-input-search.component.scss +158 -0
  127. package/src/lib/search/w-input-search/w-input-search.component.spec.ts +23 -0
  128. package/src/lib/search/w-input-search/w-input-search.component.ts +85 -0
  129. package/src/lib/shared/enums/enum.ts +12 -0
  130. package/src/lib/shared/models/back-button-config.model.ts +5 -0
  131. package/src/lib/shared/models/custom-button-config.model.ts +4 -0
  132. package/{lib/shared/models/embed-config.model.d.ts → src/lib/shared/models/embed-config.model.ts} +2 -2
  133. package/{lib/shared/models/enums.model.d.ts → src/lib/shared/models/enums.model.ts} +22 -18
  134. package/{lib/shared/models/filter-panel/field.model.d.ts → src/lib/shared/models/filter-panel/field.model.ts} +20 -2
  135. package/src/lib/shared/models/filter-panel/filter-field.models.ts +15 -0
  136. package/src/lib/shared/models/filter-panel/filter-panel-translations.model.ts +29 -0
  137. package/src/lib/shared/models/filter-panel/qb-filter-entity.model.ts +8 -0
  138. package/src/lib/shared/models/filter-panel/qb-filter-field.model.ts +12 -0
  139. package/src/lib/shared/models/filter-panel/qb-operators.model.ts +4 -0
  140. package/src/lib/shared/models/filter-panel/qb-panel-filter.model.ts +14 -0
  141. package/src/lib/shared/models/filter-panel/qb-panel-to-fields.model.ts +12 -0
  142. package/src/lib/shared/models/filter-panel/query-results.model.ts +17 -0
  143. package/src/lib/shared/models/filter.model.ts +5 -0
  144. package/src/lib/shared/models/image-b64.model.ts +5 -0
  145. package/src/lib/shared/models/lazy-element-query-request.model.ts +9 -0
  146. package/src/lib/shared/models/w-file-b64.model.ts +6 -0
  147. package/src/lib/shared/models/w-image-cropper-data.model.ts +7 -0
  148. package/src/lib/shared/models/w-image-file-uploader-config.model.ts +23 -0
  149. package/src/lib/shared/models/w-select-button-state.model.ts +4 -0
  150. package/src/lib/shared/models/w-tree-table.model.ts +30 -0
  151. package/src/lib/shared/models/wapp-table-lazy-loading.model.ts +53 -0
  152. package/src/lib/shared/models/wapp-table.model.ts +56 -0
  153. package/src/lib/shared/pipes/color-text.pipe.ts +20 -0
  154. package/src/lib/shared/service/api/api.service.ts +58 -0
  155. package/src/lib/shared/services/form-control.service.spec.ts +16 -0
  156. package/src/lib/shared/services/form-control.service.ts +15 -0
  157. package/src/lib/shared/services/modal.service.spec.ts +16 -0
  158. package/src/lib/shared/services/modal.service.ts +71 -0
  159. package/src/lib/shared/services/tree.service.ts +30 -0
  160. package/src/lib/sidebar/w-sidebar/w-sidebar.component.html +11 -0
  161. package/src/lib/sidebar/w-sidebar/w-sidebar.component.scss +69 -0
  162. package/src/lib/sidebar/w-sidebar/w-sidebar.component.spec.ts +23 -0
  163. package/src/lib/sidebar/w-sidebar/w-sidebar.component.ts +36 -0
  164. package/src/lib/tables/w-table/w-table.component.html +230 -0
  165. package/src/lib/tables/w-table/w-table.component.scss +225 -0
  166. package/src/lib/tables/w-table/w-table.component.spec.ts +23 -0
  167. package/src/lib/tables/w-table/w-table.component.ts +188 -0
  168. package/src/lib/tables/w-table-lazy/w-table-lazy.component.html +198 -0
  169. package/src/lib/tables/w-table-lazy/w-table-lazy.component.scss +226 -0
  170. package/src/lib/tables/w-table-lazy/w-table-lazy.component.spec.ts +23 -0
  171. package/src/lib/tables/w-table-lazy/w-table-lazy.component.ts +217 -0
  172. package/src/lib/tables/w-tree-table/w-tree-table.component.html +170 -0
  173. package/src/lib/tables/w-tree-table/w-tree-table.component.scss +221 -0
  174. package/src/lib/tables/w-tree-table/w-tree-table.component.spec.ts +23 -0
  175. package/src/lib/tables/w-tree-table/w-tree-table.component.ts +125 -0
  176. package/src/lib/tabview/w-tabview/w-tabview.component.html +72 -0
  177. package/src/lib/tabview/w-tabview/w-tabview.component.scss +34 -0
  178. package/src/lib/tabview/w-tabview/w-tabview.component.spec.ts +23 -0
  179. package/src/lib/tabview/w-tabview/w-tabview.component.ts +14 -0
  180. package/src/lib/theme/theme.component.css +0 -0
  181. package/src/lib/theme/theme.component.html +1 -0
  182. package/src/lib/theme/theme.component.spec.ts +23 -0
  183. package/src/lib/theme/theme.component.ts +10 -0
  184. package/src/lib/view/wapp-view-card-title-text/wapp-view-card-title-text.component.css +0 -0
  185. package/src/lib/view/wapp-view-card-title-text/wapp-view-card-title-text.component.html +1 -0
  186. package/src/lib/view/wapp-view-card-title-text/wapp-view-card-title-text.component.spec.ts +23 -0
  187. package/src/lib/view/wapp-view-card-title-text/wapp-view-card-title-text.component.ts +16 -0
  188. package/src/lib/w-clipboard/w-clipboard.component.css +13 -0
  189. package/src/lib/w-clipboard/w-clipboard.component.html +10 -0
  190. package/src/lib/w-clipboard/w-clipboard.component.spec.ts +23 -0
  191. package/src/lib/w-clipboard/w-clipboard.component.ts +32 -0
  192. package/src/lib/wapp-components.component.spec.ts +23 -0
  193. package/src/lib/wapp-components.component.ts +15 -0
  194. package/src/lib/wapp-components.module.ts +241 -0
  195. package/src/lib/wapp-components.service.spec.ts +16 -0
  196. package/src/lib/wapp-components.service.ts +9 -0
  197. package/{public-api.d.ts → src/public-api.ts} +15 -3
  198. package/src/styles/_variables.scss +427 -0
  199. package/tsconfig.lib.json +14 -0
  200. package/tsconfig.lib.prod.json +10 -0
  201. package/tsconfig.spec.json +14 -0
  202. package/esm2020/lib/button/w-button/w-button.component.mjs +0 -67
  203. package/esm2020/lib/button/w-buttons-footer/w-buttons-footer.component.mjs +0 -11
  204. package/esm2020/lib/button/w-select-button/w-select-button.component.mjs +0 -84
  205. package/esm2020/lib/button/w-toggle-button/w-toggle-button.component.mjs +0 -102
  206. package/esm2020/lib/edit/w-edit-calendar/w-edit-calendar.component.mjs +0 -104
  207. package/esm2020/lib/edit/w-edit-checkbox/w-edit-checkbox.component.mjs +0 -89
  208. package/esm2020/lib/edit/w-edit-input-number/w-edit-input-number.component.mjs +0 -130
  209. package/esm2020/lib/edit/w-edit-input-text/w-edit-input-text.component.mjs +0 -125
  210. package/esm2020/lib/edit/w-edit-input-textarea/w-edit-input-textarea.component.mjs +0 -108
  211. package/esm2020/lib/edit/w-edit-multiselect/w-edit-multiselect.component.mjs +0 -110
  212. package/esm2020/lib/edit/w-edit-select/w-edit-select.component.mjs +0 -115
  213. package/esm2020/lib/edit/w-edit-toggle/w-edit-toggle.component.mjs +0 -93
  214. package/esm2020/lib/edit/w-edit-treeselect/w-edit-treeselect.component.mjs +0 -107
  215. package/esm2020/lib/file/w-image-cropper/w-image-cropper.component.mjs +0 -236
  216. package/esm2020/lib/file/w-image-file-uploader/w-image-file-uploader.component.mjs +0 -409
  217. package/esm2020/lib/file/w-preview-image/w-preview-image.component.mjs +0 -20
  218. package/esm2020/lib/icons/icons.mjs +0 -115
  219. package/esm2020/lib/icons/wapping-icons/w-icons.component.mjs +0 -53
  220. package/esm2020/lib/layout/w-body/w-body.component.mjs +0 -18
  221. package/esm2020/lib/layout/w-body-container/w-body-container.component.mjs +0 -11
  222. package/esm2020/lib/layout/w-container/w-container.component.mjs +0 -19
  223. package/esm2020/lib/layout/w-content-grid/w-content-grid.component.mjs +0 -11
  224. package/esm2020/lib/layout/w-footer/w-footer.component.mjs +0 -27
  225. package/esm2020/lib/layout/w-grid/w-grid.component.mjs +0 -11
  226. package/esm2020/lib/layout/w-header-panel/w-header-panel.component.mjs +0 -36
  227. package/esm2020/lib/layout/w-navbar/w-navbar.component.mjs +0 -44
  228. package/esm2020/lib/layout/w-panel/w-panel.component.mjs +0 -29
  229. package/esm2020/lib/layout/w-panel-title/w-panel-title.component.mjs +0 -14
  230. package/esm2020/lib/logos/logos.mjs +0 -8
  231. package/esm2020/lib/logos/wapping-logos/w-logos.component.mjs +0 -53
  232. package/esm2020/lib/misc/w-filter-panel/w-filter-panel.component.mjs +0 -378
  233. package/esm2020/lib/misc/w-filter-panel/w-list-field/w-list-field.component.mjs +0 -82
  234. package/esm2020/lib/report/w-powerbi-report/w-powerbi-report.component.mjs +0 -203
  235. package/esm2020/lib/search/w-autocomplete-search/w-autocomplete-search.component.mjs +0 -106
  236. package/esm2020/lib/search/w-input-search/w-input-search.component.mjs +0 -109
  237. package/esm2020/lib/shared/enums/enum.mjs +0 -14
  238. package/esm2020/lib/shared/models/custom-button-config.model.mjs +0 -2
  239. package/esm2020/lib/shared/models/embed-config.model.mjs +0 -2
  240. package/esm2020/lib/shared/models/enums.model.mjs +0 -64
  241. package/esm2020/lib/shared/models/filter-panel/field.model.mjs +0 -2
  242. package/esm2020/lib/shared/models/filter-panel/filter-field.models.mjs +0 -2
  243. package/esm2020/lib/shared/models/filter-panel/filter-panel-translations.model.mjs +0 -2
  244. package/esm2020/lib/shared/models/filter-panel/qb-filter-entity.model.mjs +0 -2
  245. package/esm2020/lib/shared/models/filter-panel/qb-operators.model.mjs +0 -2
  246. package/esm2020/lib/shared/models/filter-panel/qb-panel-filter.model.mjs +0 -2
  247. package/esm2020/lib/shared/models/filter-panel/qb-panel-to-fields.model.mjs +0 -2
  248. package/esm2020/lib/shared/models/filter-panel/query-results.model.mjs +0 -8
  249. package/esm2020/lib/shared/models/filter.model.mjs +0 -2
  250. package/esm2020/lib/shared/models/image-b64.model.mjs +0 -2
  251. package/esm2020/lib/shared/models/lazy-element-query-request.model.mjs +0 -2
  252. package/esm2020/lib/shared/models/w-file-b64.model.mjs +0 -2
  253. package/esm2020/lib/shared/models/w-image-cropper-data.model.mjs +0 -2
  254. package/esm2020/lib/shared/models/w-image-file-uploader-config.model.mjs +0 -2
  255. package/esm2020/lib/shared/models/w-select-button-state.model.mjs +0 -2
  256. package/esm2020/lib/shared/models/w-tree-table.model.mjs +0 -2
  257. package/esm2020/lib/shared/models/wapp-table-lazy-loading.model.mjs +0 -2
  258. package/esm2020/lib/shared/models/wapp-table.model.mjs +0 -2
  259. package/esm2020/lib/shared/pipes/color-text.pipe.mjs +0 -25
  260. package/esm2020/lib/shared/service/api/api.service.mjs +0 -52
  261. package/esm2020/lib/shared/services/form-control.service.mjs +0 -18
  262. package/esm2020/lib/shared/services/modal.service.mjs +0 -62
  263. package/esm2020/lib/shared/services/tree.service.mjs +0 -30
  264. package/esm2020/lib/sidebar/w-sidebar/w-sidebar.component.mjs +0 -50
  265. package/esm2020/lib/tables/w-table/w-table.component.mjs +0 -197
  266. package/esm2020/lib/tables/w-table-lazy/w-table-lazy.component.mjs +0 -237
  267. package/esm2020/lib/tables/w-tree-table/w-tree-table.component.mjs +0 -136
  268. package/esm2020/lib/tabview/w-tabview/w-tabview.component.mjs +0 -27
  269. package/esm2020/lib/view/wapp-view-card-title-text/wapp-view-card-title-text.component.mjs +0 -17
  270. package/esm2020/lib/w-clipboard/w-clipboard.component.mjs +0 -39
  271. package/esm2020/lib/wapp-components.component.mjs +0 -19
  272. package/esm2020/lib/wapp-components.module.mjs +0 -430
  273. package/esm2020/lib/wapp-components.service.mjs +0 -14
  274. package/esm2020/ngx-wapp-components.mjs +0 -5
  275. package/esm2020/public-api.mjs +0 -63
  276. package/fesm2015/ngx-wapp-components.mjs +0 -4355
  277. package/fesm2015/ngx-wapp-components.mjs.map +0 -1
  278. package/fesm2020/ngx-wapp-components.mjs +0 -4389
  279. package/fesm2020/ngx-wapp-components.mjs.map +0 -1
  280. package/index.d.ts +0 -5
  281. package/lib/button/w-button/w-button.component.d.ts +0 -23
  282. package/lib/button/w-buttons-footer/w-buttons-footer.component.d.ts +0 -5
  283. package/lib/button/w-select-button/w-select-button.component.d.ts +0 -27
  284. package/lib/button/w-toggle-button/w-toggle-button.component.d.ts +0 -32
  285. package/lib/edit/w-edit-calendar/w-edit-calendar.component.d.ts +0 -34
  286. package/lib/edit/w-edit-checkbox/w-edit-checkbox.component.d.ts +0 -27
  287. package/lib/edit/w-edit-input-number/w-edit-input-number.component.d.ts +0 -37
  288. package/lib/edit/w-edit-input-text/w-edit-input-text.component.d.ts +0 -36
  289. package/lib/edit/w-edit-input-textarea/w-edit-input-textarea.component.d.ts +0 -32
  290. package/lib/edit/w-edit-multiselect/w-edit-multiselect.component.d.ts +0 -35
  291. package/lib/edit/w-edit-select/w-edit-select.component.d.ts +0 -35
  292. package/lib/edit/w-edit-toggle/w-edit-toggle.component.d.ts +0 -28
  293. package/lib/edit/w-edit-treeselect/w-edit-treeselect.component.d.ts +0 -34
  294. package/lib/file/w-image-cropper/w-image-cropper.component.d.ts +0 -69
  295. package/lib/file/w-image-file-uploader/w-image-file-uploader.component.d.ts +0 -70
  296. package/lib/file/w-preview-image/w-preview-image.component.d.ts +0 -10
  297. package/lib/icons/icons.d.ts +0 -1
  298. package/lib/icons/wapping-icons/w-icons.component.d.ts +0 -15
  299. package/lib/layout/w-body/w-body.component.d.ts +0 -6
  300. package/lib/layout/w-body-container/w-body-container.component.d.ts +0 -5
  301. package/lib/layout/w-container/w-container.component.d.ts +0 -5
  302. package/lib/layout/w-content-grid/w-content-grid.component.d.ts +0 -5
  303. package/lib/layout/w-footer/w-footer.component.d.ts +0 -10
  304. package/lib/layout/w-grid/w-grid.component.d.ts +0 -5
  305. package/lib/layout/w-header-panel/w-header-panel.component.d.ts +0 -15
  306. package/lib/layout/w-navbar/w-navbar.component.d.ts +0 -16
  307. package/lib/layout/w-panel/w-panel.component.d.ts +0 -9
  308. package/lib/layout/w-panel-title/w-panel-title.component.d.ts +0 -6
  309. package/lib/logos/logos.d.ts +0 -1
  310. package/lib/logos/wapping-logos/w-logos.component.d.ts +0 -15
  311. package/lib/misc/w-filter-panel/w-filter-panel.component.d.ts +0 -63
  312. package/lib/misc/w-filter-panel/w-list-field/w-list-field.component.d.ts +0 -25
  313. package/lib/report/w-powerbi-report/w-powerbi-report.component.d.ts +0 -42
  314. package/lib/search/w-autocomplete-search/w-autocomplete-search.component.d.ts +0 -29
  315. package/lib/search/w-input-search/w-input-search.component.d.ts +0 -33
  316. package/lib/shared/enums/enum.d.ts +0 -11
  317. package/lib/shared/models/custom-button-config.model.d.ts +0 -4
  318. package/lib/shared/models/filter-panel/filter-field.models.d.ts +0 -17
  319. package/lib/shared/models/filter-panel/filter-panel-translations.model.d.ts +0 -28
  320. package/lib/shared/models/filter-panel/qb-filter-entity.model.d.ts +0 -7
  321. package/lib/shared/models/filter-panel/qb-operators.model.d.ts +0 -4
  322. package/lib/shared/models/filter-panel/qb-panel-filter.model.d.ts +0 -13
  323. package/lib/shared/models/filter-panel/qb-panel-to-fields.model.d.ts +0 -11
  324. package/lib/shared/models/filter-panel/query-results.model.d.ts +0 -15
  325. package/lib/shared/models/filter.model.d.ts +0 -5
  326. package/lib/shared/models/image-b64.model.d.ts +0 -5
  327. package/lib/shared/models/lazy-element-query-request.model.d.ts +0 -8
  328. package/lib/shared/models/w-file-b64.model.d.ts +0 -6
  329. package/lib/shared/models/w-image-cropper-data.model.d.ts +0 -7
  330. package/lib/shared/models/w-image-file-uploader-config.model.d.ts +0 -23
  331. package/lib/shared/models/w-select-button-state.model.d.ts +0 -4
  332. package/lib/shared/models/w-tree-table.model.d.ts +0 -27
  333. package/lib/shared/models/wapp-table-lazy-loading.model.d.ts +0 -51
  334. package/lib/shared/models/wapp-table.model.d.ts +0 -54
  335. package/lib/shared/pipes/color-text.pipe.d.ts +0 -7
  336. package/lib/shared/service/api/api.service.d.ts +0 -12
  337. package/lib/shared/services/form-control.service.d.ts +0 -8
  338. package/lib/shared/services/modal.service.d.ts +0 -22
  339. package/lib/shared/services/tree.service.d.ts +0 -8
  340. package/lib/sidebar/w-sidebar/w-sidebar.component.d.ts +0 -17
  341. package/lib/tables/w-table/w-table.component.d.ts +0 -58
  342. package/lib/tables/w-table-lazy/w-table-lazy.component.d.ts +0 -58
  343. package/lib/tables/w-tree-table/w-tree-table.component.d.ts +0 -41
  344. package/lib/tabview/w-tabview/w-tabview.component.d.ts +0 -8
  345. package/lib/view/wapp-view-card-title-text/wapp-view-card-title-text.component.d.ts +0 -9
  346. package/lib/w-clipboard/w-clipboard.component.d.ts +0 -12
  347. package/lib/wapp-components.component.d.ts +0 -5
  348. package/lib/wapp-components.module.d.ts +0 -88
  349. package/lib/wapp-components.service.d.ts +0 -6
@@ -0,0 +1,150 @@
1
+ <div class="flex flex-column align-content-center justify-content-center wapp-card-cropper">
2
+ <div class="flex flex-1" ></div>
3
+ <div class="flex justify-content-center align-content-center" *ngIf="!blob; else imageCropper">
4
+ <span class="flex align-content-center surface-border justify-content-between flex-wrap">
5
+ <p-fileUpload #fileUploader
6
+ class="w-file-button bg-white"
7
+ chooseIcon="pi pi-image"
8
+ chooseLabel="Choose"
9
+ (onSelect)="myUploader($event)"
10
+ name="filesToUpload[]"
11
+ [auto]="true"
12
+ [multiple]="false"
13
+ accept="image/*"
14
+ mode="basic"
15
+ accept="image/*"
16
+ [maxFileSize]="maxFileSize">
17
+ </p-fileUpload>
18
+ </span>
19
+ </div>
20
+ <ng-template #imageCropper>
21
+ <div class="flex flex-column w-full">
22
+ <div class="flex flex-row align-content-center">
23
+ <div class="w-3"></div>
24
+ <div class="flex align-content-center align-items-center justify-content-between wapp-image-cropper-wrapper flex-1">
25
+ <image-cropper
26
+ [imageFile]="blob"
27
+ [imageURL]="imageURL"
28
+ [maintainAspectRatio]="true"
29
+ [containWithinAspectRatio]="containWithinAspectRatio"
30
+ [aspectRatio]="aspectRatio"
31
+ [resizeToWidth]= "dimensions.width"
32
+ [resizeToHeight]="dimensions.height"
33
+ [cropperMinWidth]="128"
34
+ [onlyScaleDown]="true"
35
+ [roundCropper]="false"
36
+ [canvasRotation]="canvasRotation"
37
+ [(transform)]="transform"
38
+ [alignImage]="'center'"
39
+ [style.display]="showCropper ? null : 'none'"
40
+ [allowMoveImage]="allowMoveImage"
41
+ [hidden]="hidden"
42
+ backgroundColor="blue"
43
+ format="png"
44
+ [roundCropper]="roundedCropper"
45
+ (imageCropped)="imageCropped($event)"
46
+ (imageLoaded)="imageLoaded()"
47
+ (cropperReady)="cropperReady($event)"
48
+ (loadImageFailed)="loadImageFailed()"
49
+ ></image-cropper>
50
+ </div>
51
+ <div class="flex flex-column justify-content-center align-content-center align-items-center">
52
+ <w-button
53
+ class="flex align-items-center align-content-center justify-content-start px-3 py-3"
54
+ [pTooltip]="translationsImageCropper.zoomIn"
55
+ icon="pi pi-search-plus" (click)="zoomIn()"
56
+ type="text"></w-button>
57
+ <w-button
58
+ class="flex align-items-center align-content-center justify-content-start px-3 py-3"
59
+ [pTooltip]="translationsImageCropper.zoomOut"
60
+ icon="pi pi-search-minus"
61
+ (click)="zoomOut()"
62
+ type="text"></w-button>
63
+ </div>
64
+ <div class="flex flex-1"></div>
65
+ </div>
66
+
67
+ <div class="flex flex-1">
68
+ <div class="w-3"></div>
69
+ <div class="flex flex-1 flex-column wapp-image-cropper-tools py-4">
70
+ <p-slider [(ngModel)]="rotation" [min]="-360" [max]="360"
71
+ (ngModelChange)="updateRotation()" class="w-full align-content-center"
72
+ [pTooltip]="translationsImageCropper.rotation"></p-slider>
73
+ </div>
74
+ <div class="w-3 align-items-end"></div>
75
+ </div>
76
+
77
+ <div class="flex flex-1">
78
+ <div class="w-3"></div>
79
+ <div class="flex flex-1 wapp-image-cropper-tools flex-row justify-content-center align-items-center align-content-center">
80
+ <w-button
81
+ type="text"
82
+ icon="pi pi-replay"
83
+ tooltipPosition="bottom"
84
+ [pTooltip]="translationsImageCropper.rotateLeft"
85
+ (click)="rotateLeft()"></w-button>
86
+ <w-button
87
+ type="text"
88
+ icon="pi pi-refresh"
89
+ tooltipPosition="bottom"
90
+ [pTooltip]="translationsImageCropper.rotateRight"
91
+ (click)="rotateRight()"></w-button>
92
+ <w-button
93
+ type="text"
94
+ icon="pi pi-arrows-h"
95
+ tooltipPosition="bottom"
96
+ [pTooltip]="translationsImageCropper.flipHorizontal"
97
+ (click)="flipHorizontal()"></w-button>
98
+ <w-button
99
+ type="text"
100
+ [pTooltip]="translationsImageCropper.flipVertical"
101
+ icon="pi pi-arrows-v"
102
+ tooltipPosition="bottom"
103
+ (click)="flipVertical()"></w-button>
104
+ <w-button
105
+ type="text"
106
+ [pTooltip]="translationsImageCropper.restore"
107
+ icon="pi pi-history"
108
+ tooltipPosition="bottom"
109
+ (click)="resetImage()"></w-button>
110
+ <w-button
111
+ type="text"
112
+ [pTooltip]="translationsImageCropper.preview"
113
+ icon="pi pi-eye"
114
+ tooltipPosition="bottom"
115
+ (click)="viewCrop()"></w-button>
116
+ </div>
117
+ <div class="w-3 align-items-end"></div>
118
+ </div>
119
+ </div>
120
+
121
+ </ng-template>
122
+ <div class="flex flex-1" ></div>
123
+ <div class="wapp-image-cropper-dialog-buttons flex justify-content-end align-content-center align-items-center w-full h-2">
124
+ <w-button *ngIf="blob"
125
+ (onClick)="deleteBlob()"
126
+ class="flex align-content-center align-items-center "
127
+ icon="pi-trash"
128
+ [label]="translationsImageCropper.delete"
129
+ type="text">
130
+ </w-button>
131
+ <w-button
132
+ *ngIf="fromModal"
133
+ (onClick)="cancelDialog()"
134
+ class="flex align-content-center align-items-center "
135
+ icon="pi-times"
136
+ [label]="translationsImageCropper.cancel"
137
+ type="text">
138
+ </w-button>
139
+ <w-button
140
+ icon="pi-save"
141
+ (click)="saveImageCropped()"
142
+ [disabled]="!blob"
143
+ [label]="translationsImageCropper.save"
144
+ class="flex align-content-center align-items-center"
145
+ type="text">
146
+ </w-button>
147
+ </div>
148
+ </div>
149
+
150
+
@@ -0,0 +1,59 @@
1
+ @import './../../../styles/_variables.scss';
2
+
3
+ .wapp-image-cropper-wrapper {
4
+ min-height: 20rem;
5
+ max-height: 25rem;
6
+ min-width: 30rem;
7
+ max-width: 35rem;
8
+ }
9
+
10
+ .wapp-image-cropper-tools {
11
+ min-width: 30rem;
12
+ max-width: 35rem;
13
+ }
14
+
15
+ .wapp-card-cropper {
16
+ min-height: 35rem;
17
+ max-height: 45rem;
18
+ }
19
+
20
+ /* :host ::ng-deep .p-dialog .p-dialog-header{
21
+ padding: 3px;;
22
+ } */
23
+
24
+ :host ::ng-deep .p-dialog .p-dialog-header span.p-dialog-title{
25
+ background-color: aqua;
26
+ @extend .subtitle2;
27
+ }
28
+
29
+ :host ::ng-deep .w-file-button .p-fileupload .p-button.p-fileupload-choose{
30
+ height: 40px;
31
+ padding: $spacingS $spacingL;
32
+ border-radius: $borderRadius;
33
+ border-width: $borderWidth;
34
+
35
+ .p-button-icon{
36
+ margin: $spacingZero;
37
+ padding-right: $spacingS;
38
+ @extend .icon-medium-size;
39
+ }
40
+
41
+ .p-button-label{
42
+ @extend .button-medium-typography;
43
+ }
44
+ }
45
+
46
+ :host ::ng-deep .w-file-button .p-fileupload .p-button:focus {
47
+ @extend .focus;
48
+ outline: $borderWidth solid $primary50;
49
+ background-color: $primary700;
50
+ }
51
+
52
+ :host ::ng-deep .w-file-button .p-fileupload .p-button:not(.p-disabled):hover {
53
+ background-color: $primary400;
54
+ border-color: $primary400;
55
+ }
56
+
57
+ .wapp-image-cropper-dialog-buttons{
58
+ gap: 16px;
59
+ }
@@ -0,0 +1,23 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { WImageCropperComponent } from './w-image-cropper.component';
4
+
5
+ describe('WImageCropperComponent', () => {
6
+ let component: WImageCropperComponent;
7
+ let fixture: ComponentFixture<WImageCropperComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ WImageCropperComponent ]
12
+ })
13
+ .compileComponents();
14
+
15
+ fixture = TestBed.createComponent(WImageCropperComponent);
16
+ component = fixture.componentInstance;
17
+ fixture.detectChanges();
18
+ });
19
+
20
+ it('should create', () => {
21
+ expect(component).toBeTruthy();
22
+ });
23
+ });
@@ -0,0 +1,259 @@
1
+ import { Component, EventEmitter, Input, Output } from '@angular/core';
2
+ import { WImageCropperData } from '../../shared/models/w-image-cropper-data.model';
3
+ import { WFileB64 } from '../../shared/models/w-file-b64.model';
4
+ import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
5
+ import { ModalService } from '../../shared/services/modal.service';
6
+ import { WPreviewImageComponent } from '../w-preview-image/w-preview-image.component';
7
+ import { Dimensions, ImageCroppedEvent, ImageTransform } from 'ngx-image-cropper';
8
+
9
+ @Component({
10
+ selector: 'w-image-cropper',
11
+ templateUrl: './w-image-cropper.component.html',
12
+ styleUrls: ['./w-image-cropper.component.scss']
13
+ })
14
+ export class WImageCropperComponent {
15
+ @Input() dimensionsInput!: WImageCropperData;
16
+ @Input() translationsImageCropper: any;
17
+ @Output() imageCroppedFinal = new EventEmitter<any>();
18
+ @Output() imageB64 = new EventEmitter<any>();
19
+ @Input() blob: any;
20
+
21
+ imageChangedEvent: any = '';
22
+ croppedImage: any = '';
23
+ canvasRotation = 0;
24
+ rotation: number = 0;
25
+ translateH = 0;
26
+ translateV = 0;
27
+ scale = 1;
28
+ aspectRatio = 4 / 3;
29
+ showCropper = false;
30
+ containWithinAspectRatio = false;
31
+ transform: ImageTransform = {
32
+ translateUnit: 'px'
33
+ };
34
+ imageURL?: string;
35
+ loading = false;
36
+ allowMoveImage = true;
37
+ hidden = false;
38
+
39
+ croppedImageFile: WFileB64 = {name: "", type: "", fileBase64: "", base64: ""};
40
+
41
+ dimensions: any;
42
+ maxFileSize!: number;
43
+ roundedCropper!: boolean;
44
+ fromModal: boolean = true;
45
+ dialogPreview!: DynamicDialogRef;
46
+ constructor(
47
+ private ref: DynamicDialogRef,
48
+ private dialogService: ModalService,
49
+ public dynamicDialogConfig: DynamicDialogConfig){
50
+
51
+ }
52
+
53
+ ngOnInit(): void {
54
+ if(this.dynamicDialogConfig.data == undefined){
55
+ this.fromModal = false;
56
+ this.aspectRatio = this.dimensionsInput.configuredAspectRatio;
57
+ this.roundedCropper = this.dimensionsInput.roundedCropper;
58
+ this.dimensions = {
59
+ width: this.dimensionsInput.viewPortWidthPx,
60
+ height: this.dimensionsInput.viewPortHeihtPx
61
+ }
62
+ this.maxFileSize = this.dimensions.maxFileSize;
63
+ }else{
64
+ this.aspectRatio = this.dynamicDialogConfig.data.dataModal.configuredAspectRatio;
65
+ this.roundedCropper = this.dynamicDialogConfig.data.dataModal.roundedCropper;
66
+ this.dimensions = {
67
+ width: this.dynamicDialogConfig.data.dataModal.viewPortWidthPx,
68
+ height: this.dynamicDialogConfig.data.dataModal.viewPortHeihtPx
69
+ }
70
+ this.maxFileSize = this.dynamicDialogConfig.data.dataModal.maxFileSize
71
+ this.translationsImageCropper = this.dynamicDialogConfig.data.translations;
72
+ this.blob = this.dynamicDialogConfig.data.blob;
73
+ if(this.blob)
74
+ this.setCroppeImageFileObject();
75
+ }
76
+ }
77
+
78
+ myUploader(event: any) {
79
+ this.resetImage()
80
+ this.loading = true;
81
+ this.blob = event.files[0];
82
+ this.setCroppeImageFileObject();
83
+ }
84
+
85
+ setCroppeImageFileObject(){
86
+ this.croppedImageFile.name = this.blob.name;
87
+ this.croppedImageFile.type = this.blob.type;
88
+ }
89
+
90
+ imageCropped(event: ImageCroppedEvent) {
91
+ this.croppedImage = event.base64;
92
+ }
93
+
94
+ imageLoaded() {
95
+ this.showCropper = true;
96
+ }
97
+
98
+ cropperReady(sourceImageDimensions: Dimensions) {
99
+ this.loading = false;
100
+ }
101
+
102
+ loadImageFailed() {
103
+ console.error('Load image failed');
104
+ }
105
+
106
+ rotateLeft() {
107
+ this.loading = true;
108
+ setTimeout(() => { // Use timeout because rotating image is a heavy operation and will block the ui thread
109
+ this.canvasRotation--;
110
+ this.flipAfterRotate();
111
+ });
112
+ }
113
+
114
+ rotateRight() {
115
+ this.loading = true;
116
+ setTimeout(() => {
117
+ this.canvasRotation++;
118
+ this.flipAfterRotate();
119
+ });
120
+ }
121
+
122
+ moveLeft() {
123
+ this.transform = {
124
+ ...this.transform,
125
+ translateH: ++this.translateH
126
+ };
127
+ }
128
+
129
+ moveRight() {
130
+ this.transform = {
131
+ ...this.transform,
132
+ translateH: --this.translateH
133
+ };
134
+ }
135
+
136
+ moveTop() {
137
+ this.transform = {
138
+ ...this.transform,
139
+ translateV: ++this.translateV
140
+ };
141
+ }
142
+
143
+ moveBottom() {
144
+ this.transform = {
145
+ ...this.transform,
146
+ translateV: --this.translateV
147
+ };
148
+ }
149
+
150
+ flipHorizontal() {
151
+ this.transform = {
152
+ ...this.transform,
153
+ flipH: !this.transform.flipH
154
+ };
155
+ }
156
+
157
+ flipVertical() {
158
+ this.transform = {
159
+ ...this.transform,
160
+ flipV: !this.transform.flipV
161
+ };
162
+ }
163
+
164
+ resetImage() {
165
+ this.scale = 1;
166
+ this.rotation = 0;
167
+ this.canvasRotation = 0;
168
+ this.transform = {
169
+ translateUnit: 'px'
170
+ };
171
+ }
172
+
173
+ zoomOut() {
174
+ this.scale -= .1;
175
+ this.transform = {
176
+ ...this.transform,
177
+ scale: this.scale
178
+ };
179
+ }
180
+
181
+ zoomIn() {
182
+ this.scale += .1;
183
+ this.transform = {
184
+ ...this.transform,
185
+ scale: this.scale
186
+ };
187
+ }
188
+
189
+ toggleContainWithinAspectRatio() {
190
+ this.containWithinAspectRatio = !this.containWithinAspectRatio;
191
+ }
192
+
193
+ updateRotation() {
194
+ this.transform = {
195
+ ...this.transform,
196
+ rotate: this.rotation
197
+ };
198
+ }
199
+
200
+ toggleAspectRatio() {
201
+ this.aspectRatio = this.aspectRatio === 4 / 3 ? 16 / 5 : 4 / 3;
202
+ }
203
+
204
+ toggleAspectRatio1() {
205
+ this.aspectRatio = this.aspectRatio = 1;
206
+ }
207
+
208
+ viewCrop(){
209
+ this.dialogPreview = this.dialogService.open(WPreviewImageComponent, {
210
+ header: this.translationsImageCropper.modal.preview,
211
+ width:'35rem',
212
+ contentStyle: {"overflow": "auto", "height": "35rem", "padding-bottom": "8px"},
213
+ data: {imageEdited: this.croppedImage}
214
+ })
215
+ }
216
+
217
+ deleteBlob(){
218
+ this.blob = null
219
+ this.croppedImage = null
220
+ }
221
+
222
+ cancelDialog(){
223
+ this.blob = null
224
+ this.croppedImage = null
225
+ this.ref.close();
226
+ }
227
+
228
+ saveImageCropped(){
229
+ this.croppedImageFile.fileBase64 = this.croppedImage;
230
+ this.croppedImageFile.base64 = this.imageCroppedToBase64(this.croppedImage, this.croppedImageFile.name);
231
+
232
+ if(this.fromModal){
233
+ this.ref.close(this.croppedImageFile)
234
+ }else{
235
+ this.imageCroppedFinal.emit(this.croppedImageFile);
236
+ }
237
+ }
238
+
239
+ private flipAfterRotate() {
240
+ const flippedH = this.transform.flipH;
241
+ const flippedV = this.transform.flipV;
242
+ this.transform = {
243
+ ...this.transform,
244
+ flipH: flippedV,
245
+ flipV: flippedH
246
+ };
247
+ this.translateH = 0;
248
+ this.translateV = 0;
249
+ }
250
+
251
+ imageCroppedToBase64(imageData: string, imageName: string){
252
+ const base64Parts = imageData?.split(',');
253
+ if (base64Parts.length === 2) {
254
+ const base64Content = base64Parts[1];
255
+ return base64Content;
256
+ }
257
+ return '';
258
+ }
259
+ }
@@ -0,0 +1,100 @@
1
+ <div *ngIf="allowMultipleImages == false; else withCarousel" class="relative flex align-items-center mr-3 p-4 w-max">
2
+ <div class="relative flex align-items-center mr-3 p-4 w-max">
3
+ <img *ngIf="viewSingleMode == true; else editMode"
4
+ [src]="imageUploadConfig.singleModeImageDefault ? imageUploadConfig.singleModeImageDefault : (imageSingleMode ? imageSingleMode : 'https://wappingstoragedev.blob.core.windows.net/wapping/appresources/ic_image_blue.png')"
5
+ alt="Add an image here"
6
+ class="{{imageUploadConfig.singleModeImageWidth ?? defaultWidth}} {{imageUploadConfig.singleModeImageHeight ?? defaultHeight}} shadow-4">
7
+ <ng-template #editMode>
8
+ <div *ngIf="onlyCroppedImageSelected !== null" class="h-full relative w-ll border-3 border-transparent border-round hover:bg-primary transition-duration-100 cursor-auto" (mouseenter)="onImageMouseOver(onlyImageSelected)" (mouseleave)="onImageMouseLeave(onlyImageSelected)" style="padding: 1px;">
9
+ <img [src]="onlyCroppedImageSelected.fileBase64" [alt]="onlyImageSelected.name" class="{{imageUploadConfig.singleModeImageWidth ?? defaultWidth}} {{imageUploadConfig.singleModeImageHeight ?? defaultHeight}} shadow-4 border-round">
10
+ <button [id]="onlyImageSelected.name" #buttonRemoveOnlyImage pButton pRipple
11
+ type="button"
12
+ icon="pi pi-times"
13
+ class="wapp-file-upload-button-remove p-button-rounded p-button-primary text-sm absolute justify-content-center align-items-center cursor-pointer"
14
+ (click)="removeImageSingleMode($event, onlyImageSelected)">
15
+ </button>
16
+ </div>
17
+ <img *ngIf="onlyCroppedImageSelected == null"
18
+ [src]="imageUploadConfig.singleModeImageDefault ? imageUploadConfig.singleModeImageDefault : (imageSingleMode ? imageSingleMode : 'https://wappingstoragedev.blob.core.windows.net/wapping/appresources/ic_image_blue.png')"
19
+ alt="Add an image here"
20
+ class="{{imageUploadConfig.singleModeImageWidth ?? defaultWidth}} {{imageUploadConfig.singleModeImageHeight ?? defaultHeight}} shadow-4">
21
+ <p-fileUpload #fileUploadOnlyImage [ngClass]="{'wapp-file-upload-button': onlyImageSelected}"
22
+ styleClass="p-button-rounded absolute bottom-0 right-0"
23
+ mode="basic"
24
+ accept="image/*"
25
+ [multiple]="false"
26
+ (onSelect)="onCustomUploadSingleMode($event)"
27
+ [uploadLabel]="onlyCroppedImageSelected ? (onlyCroppedImageSelected.name.length>6)? (onlyCroppedImageSelected.name | slice:0:6)+'...':(onlyCroppedImageSelected.name) : ''"
28
+ [customUpload]="true"
29
+ (uploadHandler)="onCustomizeUploadFunctionSingleMode($event)"
30
+ [maxFileSize]="imageUploadConfig.maxImageSize"
31
+ class="w-image-file-button-rounded">
32
+ </p-fileUpload>
33
+ </ng-template>
34
+ </div>
35
+ </div>
36
+ <ng-template #withCarousel>
37
+ <p-fileUpload *ngIf="imageUploadConfig" #fileUpload class="w-image-file-button col-12 pt-3"
38
+ name="mediaImages[]"
39
+ accept="image/*"
40
+ mode="advanced"
41
+ [customUpload]="true"
42
+ (onSelect)="onCustomUploadMultiMode($event)"
43
+ (uploadHandler)="onCustomizeUploadFunctionMultiMode($event)"
44
+ [uploadLabel]="imageUploadConfig.uploadButtonLabel ?? ''"
45
+ [chooseLabel]="imageUploadConfig.chooseButtonLabel ?? ''"
46
+ [cancelLabel]="imageUploadConfig.cancelButtonLabel ?? ''"
47
+ [showUploadButton]="activeImageUpload"
48
+ [showCancelButton]="activeImageUpload"
49
+ [auto]="imageUploadConfig.allowAuto"
50
+ [multiple]="true"
51
+ [maxFileSize]="imageUploadConfig.maxImageSize"
52
+ [chooseStyleClass]="'p-button-icon p-button-icon-right'">
53
+ <ng-template let-file let-i="index" pTemplate='file'>
54
+ <div *ngIf="activeImageUpload && cropperImages.length > 0" class="p-fileupload-row">
55
+ <div><img [src]="cropperImages[i]?.fileBase64" width="50"/></div>
56
+ <div class="p-fileupload-filename">{{file.name}}</div>
57
+ <div> <w-button icon="pi pi-times" (onClick)="onDeleteFileMultiMode($event, file, fileUpload)"></w-button> </div>
58
+ </div>
59
+ </ng-template>
60
+ <ng-template pTemplate="content">
61
+ <p-progressBar *ngIf="isUploadingMultiMode" class="p-element ng-star-inserted" [mode]="'indeterminate'">
62
+ <div role="progressbar" aria-valuemin="0" aria-valuenow="0" aria-valuemax="100" data-pc-name="progressbar" data-pc-section="root" class="p-progressbar p-component p-progressbar-determinate">
63
+ <div class="p-progressbar-value p-progressbar-value-animate ng-star-inserted" style="display: flex; width: 0%;" data-pc-section="value"></div>
64
+ </div>
65
+ </p-progressBar>
66
+ <div *ngIf="imagesAlreadyUploaded.length > 0">
67
+ <p-carousel [value]="imagesAlreadyUploaded" [numVisible]="3" [numScroll]="3" [circular]="false" [responsiveOptions]="carouselImagesResponsiveOptions" [showIndicators]="false">
68
+ <ng-template let-image pTemplate="item">
69
+ <div class="border-round m-2 text-center p-2" >
70
+ <div class="mt-5 mb-2 h-8rem">
71
+ <img [src]="readProperty(image, imageUploadConfig.imagePropertyNames[0]) ?? image.fileBase64" class="shadow-4 max-w-max h-full"/>
72
+ </div>
73
+ <div *ngIf="activePositionProperty == true">
74
+ <w-button icon="pi-arrow-left" type="text" style="font-size: 0.5rem" [disabled]="findIndex(image) == 0 || disableMoveButtons" (onClick)="moveImageToLeft(image)"></w-button>
75
+ <w-button icon="pi-arrow-right" type="text" style="font-size: 0.5rem" [disabled]="(findIndex(image) == imagesAlreadyUploaded.length-1) || disableMoveButtons" (onClick)="moveImageToRight(image)"></w-button>
76
+ </div>
77
+ <div class="my-5">
78
+ <w-button icon="pi pi-trash" type="tertiary" label="{{imageUploadConfig.deleteImageButtonLabel}}"
79
+ (click)="confirmDeleteImageMultiMode($event, image)" [loading]="isDeletingMultiMode">
80
+ </w-button>
81
+ </div>
82
+ </div>
83
+ </ng-template>
84
+ </p-carousel>
85
+ <p-divider></p-divider>
86
+ </div>
87
+ <div class="h-full flex flex-column justify-content-center align-items-center pt-3">
88
+ <i class="pi pi-upload text-900 text-2xl mb-3"></i>
89
+ <span class="font-bold text-900 text-xl mb-3">
90
+ {{imageUploadConfig.contentHeaderLabel}}
91
+ </span>
92
+ <span class="font-medium text-600 text-md text-center">
93
+ {{imageUploadConfig.contentSubheaderLabel}}
94
+ </span>
95
+ </div>
96
+ </ng-template>
97
+ </p-fileUpload>
98
+ </ng-template>
99
+
100
+ <p-confirmPopup></p-confirmPopup>
@@ -0,0 +1,77 @@
1
+ @import './../../../styles/_variables.scss';
2
+ @import 'primeflex/primeflex.scss';
3
+
4
+ :host ::ng-deep .w-image-file-button .p-fileupload .p-fileupload-buttonbar .p-button{
5
+ height: 40px;
6
+ padding: $spacingS $spacingL;
7
+ border-radius: $borderRadius;
8
+ border-width: $borderWidth;
9
+
10
+ .p-button-icon{
11
+ margin: $spacingZero;
12
+ padding-right: $spacingS;
13
+ @extend .icon-medium-size;
14
+ }
15
+
16
+ .p-button-label{
17
+ @extend .button-medium-typography;
18
+ }
19
+ }
20
+
21
+ :host ::ng-deep .w-image-file-button .p-fileupload .p-fileupload-buttonbar .p-button:focus {
22
+ @extend .focus;
23
+ outline: $borderWidth solid $primary50;
24
+ background-color: $primary700;
25
+ }
26
+
27
+ :host ::ng-deep .w-image-file-button .p-fileupload .p-fileupload-buttonbar .p-button:not(.p-disabled):hover {
28
+ background-color: $secondary400;
29
+ border-color: $secondary400;
30
+ }
31
+
32
+ .wapp-file-upload-button-remove{
33
+ top: -10px;
34
+ right: -10px;
35
+ display: none;
36
+ }
37
+
38
+ .wapp-file-upload-button {
39
+ visibility: hidden;
40
+ }
41
+
42
+ .img-test{
43
+ width:auto;
44
+ min-width: 50px;
45
+ height: auto;
46
+ }
47
+
48
+ :host ::ng-deep .w-image-file-button-rounded.p-button.p-button-icon-only.p-button-rounded{
49
+ height: 40px;
50
+ padding: $spacingS $spacingL;
51
+ border-radius: $borderRadius;
52
+ border-width: $borderWidth;
53
+
54
+ .p-button-icon{
55
+ margin: $spacingZero;
56
+ @extend .icon-medium-size;
57
+ }
58
+
59
+ .p-button-label{
60
+ @extend .button-medium-typography;
61
+ }
62
+ }
63
+
64
+ :host ::ng-deep .w-image-file-button-rounded .p-button:focus{
65
+ @extend .focus;
66
+ outline: $borderWidth solid $primary50;
67
+ background-color: $primary700;
68
+ }
69
+
70
+ :host ::ng-deep .w-image-file-button-rounded .p-button:hover {
71
+ background-color: $secondary400;
72
+ border-color: $secondary400;
73
+ }
74
+
75
+ :host ::ng-deep .pi .pi-plus .p-button-icon{
76
+ @include styleclass('p-button-icon-right');
77
+ }