@sd-angular/core 0.0.1005 → 0.0.1009

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 (369) hide show
  1. package/api/sd-angular-core-api.metadata.json +1 -1
  2. package/api/src/lib/token.service.d.ts +1 -2
  3. package/autocomplete/sd-angular-core-autocomplete.metadata.json +1 -1
  4. package/autocomplete/src/lib/autocomplete.component.d.ts +14 -9
  5. package/autocomplete/src/lib/autocomplete.module.d.ts +0 -1
  6. package/bundles/sd-angular-core-api.umd.js +29 -12
  7. package/bundles/sd-angular-core-api.umd.js.map +1 -1
  8. package/bundles/sd-angular-core-api.umd.min.js +1 -1
  9. package/bundles/sd-angular-core-api.umd.min.js.map +1 -1
  10. package/bundles/sd-angular-core-autocomplete.umd.js +150 -129
  11. package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
  12. package/bundles/sd-angular-core-autocomplete.umd.min.js +2 -2
  13. package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
  14. package/bundles/sd-angular-core-button.umd.js +29 -12
  15. package/bundles/sd-angular-core-button.umd.js.map +1 -1
  16. package/bundles/sd-angular-core-button.umd.min.js +1 -1
  17. package/bundles/sd-angular-core-button.umd.min.js.map +1 -1
  18. package/bundles/sd-angular-core-cache.umd.js +33 -16
  19. package/bundles/sd-angular-core-cache.umd.js.map +1 -1
  20. package/bundles/sd-angular-core-cache.umd.min.js +2 -2
  21. package/bundles/sd-angular-core-cache.umd.min.js.map +1 -1
  22. package/bundles/sd-angular-core-chart.umd.js +33 -20
  23. package/bundles/sd-angular-core-chart.umd.js.map +1 -1
  24. package/bundles/sd-angular-core-chart.umd.min.js +1 -1
  25. package/bundles/sd-angular-core-chart.umd.min.js.map +1 -1
  26. package/bundles/sd-angular-core-checkbox.umd.js +29 -12
  27. package/bundles/sd-angular-core-checkbox.umd.js.map +1 -1
  28. package/bundles/sd-angular-core-checkbox.umd.min.js +1 -1
  29. package/bundles/sd-angular-core-checkbox.umd.min.js.map +1 -1
  30. package/bundles/sd-angular-core-chip.umd.js +29 -12
  31. package/bundles/sd-angular-core-chip.umd.js.map +1 -1
  32. package/bundles/sd-angular-core-chip.umd.min.js +1 -1
  33. package/bundles/sd-angular-core-chip.umd.min.js.map +1 -1
  34. package/bundles/sd-angular-core-comment.umd.js +446 -0
  35. package/bundles/sd-angular-core-comment.umd.js.map +1 -0
  36. package/bundles/sd-angular-core-comment.umd.min.js +16 -0
  37. package/bundles/sd-angular-core-comment.umd.min.js.map +1 -0
  38. package/bundles/sd-angular-core-common.umd.js +407 -16
  39. package/bundles/sd-angular-core-common.umd.js.map +1 -1
  40. package/bundles/sd-angular-core-common.umd.min.js +2 -2
  41. package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
  42. package/bundles/sd-angular-core-date-range.umd.js +33 -16
  43. package/bundles/sd-angular-core-date-range.umd.js.map +1 -1
  44. package/bundles/sd-angular-core-date-range.umd.min.js +2 -2
  45. package/bundles/sd-angular-core-date-range.umd.min.js.map +1 -1
  46. package/bundles/sd-angular-core-date-time.umd.js +86 -47
  47. package/bundles/sd-angular-core-date-time.umd.js.map +1 -1
  48. package/bundles/sd-angular-core-date-time.umd.min.js +2 -2
  49. package/bundles/sd-angular-core-date-time.umd.min.js.map +1 -1
  50. package/bundles/sd-angular-core-editor.umd.js +29 -12
  51. package/bundles/sd-angular-core-editor.umd.js.map +1 -1
  52. package/bundles/sd-angular-core-editor.umd.min.js +1 -1
  53. package/bundles/sd-angular-core-editor.umd.min.js.map +1 -1
  54. package/bundles/sd-angular-core-excel.umd.js +29 -12
  55. package/bundles/sd-angular-core-excel.umd.js.map +1 -1
  56. package/bundles/sd-angular-core-excel.umd.min.js.map +1 -1
  57. package/bundles/sd-angular-core-export.umd.js +33 -16
  58. package/bundles/sd-angular-core-export.umd.js.map +1 -1
  59. package/bundles/sd-angular-core-export.umd.min.js +1 -1
  60. package/bundles/sd-angular-core-export.umd.min.js.map +1 -1
  61. package/bundles/sd-angular-core-form.umd.js +4 -4
  62. package/bundles/sd-angular-core-form.umd.min.js +1 -1
  63. package/bundles/sd-angular-core-form.umd.min.js.map +1 -1
  64. package/bundles/sd-angular-core-grid-material.umd.js +61 -82
  65. package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
  66. package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
  67. package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
  68. package/bundles/sd-angular-core-grid.umd.js +34 -16
  69. package/bundles/sd-angular-core-grid.umd.js.map +1 -1
  70. package/bundles/sd-angular-core-grid.umd.min.js +1 -1
  71. package/bundles/sd-angular-core-grid.umd.min.js.map +1 -1
  72. package/bundles/sd-angular-core-input-currency.umd.js +29 -12
  73. package/bundles/sd-angular-core-input-currency.umd.js.map +1 -1
  74. package/bundles/sd-angular-core-input-currency.umd.min.js +2 -2
  75. package/bundles/sd-angular-core-input-currency.umd.min.js.map +1 -1
  76. package/bundles/sd-angular-core-input-dropdown.umd.js +29 -12
  77. package/bundles/sd-angular-core-input-dropdown.umd.js.map +1 -1
  78. package/bundles/sd-angular-core-input-dropdown.umd.min.js +1 -1
  79. package/bundles/sd-angular-core-input-dropdown.umd.min.js.map +1 -1
  80. package/bundles/sd-angular-core-input-upload-file.umd.js +33 -16
  81. package/bundles/sd-angular-core-input-upload-file.umd.js.map +1 -1
  82. package/bundles/sd-angular-core-input-upload-file.umd.min.js +2 -2
  83. package/bundles/sd-angular-core-input-upload-file.umd.min.js.map +1 -1
  84. package/bundles/sd-angular-core-input.umd.js +64 -29
  85. package/bundles/sd-angular-core-input.umd.js.map +1 -1
  86. package/bundles/sd-angular-core-input.umd.min.js +2 -2
  87. package/bundles/sd-angular-core-input.umd.min.js.map +1 -1
  88. package/bundles/sd-angular-core-konva.umd.js +29 -12
  89. package/bundles/sd-angular-core-konva.umd.js.map +1 -1
  90. package/bundles/sd-angular-core-konva.umd.min.js +1 -1
  91. package/bundles/sd-angular-core-konva.umd.min.js.map +1 -1
  92. package/bundles/sd-angular-core-modal.umd.js +4 -4
  93. package/bundles/sd-angular-core-modal.umd.js.map +1 -1
  94. package/bundles/sd-angular-core-modal.umd.min.js +1 -1
  95. package/bundles/sd-angular-core-modal.umd.min.js.map +1 -1
  96. package/bundles/sd-angular-core-radio.umd.js +33 -20
  97. package/bundles/sd-angular-core-radio.umd.js.map +1 -1
  98. package/bundles/sd-angular-core-radio.umd.min.js +2 -2
  99. package/bundles/sd-angular-core-radio.umd.min.js.map +1 -1
  100. package/bundles/sd-angular-core-select-editor.umd.js +33 -16
  101. package/bundles/sd-angular-core-select-editor.umd.js.map +1 -1
  102. package/bundles/sd-angular-core-select-editor.umd.min.js +2 -2
  103. package/bundles/sd-angular-core-select-editor.umd.min.js.map +1 -1
  104. package/bundles/sd-angular-core-select.umd.js +165 -140
  105. package/bundles/sd-angular-core-select.umd.js.map +1 -1
  106. package/bundles/sd-angular-core-select.umd.min.js +2 -2
  107. package/bundles/sd-angular-core-select.umd.min.js.map +1 -1
  108. package/bundles/sd-angular-core-service.umd.js +8 -202
  109. package/bundles/sd-angular-core-service.umd.js.map +1 -1
  110. package/bundles/sd-angular-core-service.umd.min.js +1 -1
  111. package/bundles/sd-angular-core-service.umd.min.js.map +1 -1
  112. package/bundles/sd-angular-core-setting.umd.js +29 -12
  113. package/bundles/sd-angular-core-setting.umd.js.map +1 -1
  114. package/bundles/sd-angular-core-setting.umd.min.js +1 -1
  115. package/bundles/sd-angular-core-setting.umd.min.js.map +1 -1
  116. package/bundles/sd-angular-core-side-drawer.umd.js +33 -16
  117. package/bundles/sd-angular-core-side-drawer.umd.js.map +1 -1
  118. package/bundles/sd-angular-core-side-drawer.umd.min.js +2 -2
  119. package/bundles/sd-angular-core-side-drawer.umd.min.js.map +1 -1
  120. package/bundles/sd-angular-core-switch.umd.js +29 -12
  121. package/bundles/sd-angular-core-switch.umd.js.map +1 -1
  122. package/bundles/sd-angular-core-switch.umd.min.js +2 -2
  123. package/bundles/sd-angular-core-switch.umd.min.js.map +1 -1
  124. package/bundles/sd-angular-core-tab-router.umd.js +29 -12
  125. package/bundles/sd-angular-core-tab-router.umd.js.map +1 -1
  126. package/bundles/sd-angular-core-tab-router.umd.min.js +2 -2
  127. package/bundles/sd-angular-core-tab-router.umd.min.js.map +1 -1
  128. package/bundles/sd-angular-core-textarea.umd.js +29 -12
  129. package/bundles/sd-angular-core-textarea.umd.js.map +1 -1
  130. package/bundles/sd-angular-core-textarea.umd.min.js +2 -2
  131. package/bundles/sd-angular-core-textarea.umd.min.js.map +1 -1
  132. package/bundles/sd-angular-core-time.umd.js +33 -16
  133. package/bundles/sd-angular-core-time.umd.js.map +1 -1
  134. package/bundles/sd-angular-core-time.umd.min.js +2 -2
  135. package/bundles/sd-angular-core-time.umd.min.js.map +1 -1
  136. package/bundles/sd-angular-core-upload-excel.umd.js +33 -16
  137. package/bundles/sd-angular-core-upload-excel.umd.js.map +1 -1
  138. package/bundles/sd-angular-core-upload-excel.umd.min.js +1 -1
  139. package/bundles/sd-angular-core-upload-excel.umd.min.js.map +1 -1
  140. package/bundles/sd-angular-core-upload-file.umd.js +33 -16
  141. package/bundles/sd-angular-core-upload-file.umd.js.map +1 -1
  142. package/bundles/sd-angular-core-upload-file.umd.min.js +2 -2
  143. package/bundles/sd-angular-core-upload-file.umd.min.js.map +1 -1
  144. package/bundles/sd-angular-core-utility.umd.js +33 -16
  145. package/bundles/sd-angular-core-utility.umd.js.map +1 -1
  146. package/bundles/sd-angular-core-utility.umd.min.js +1 -1
  147. package/bundles/sd-angular-core-utility.umd.min.js.map +1 -1
  148. package/bundles/sd-angular-core.umd.js +33 -20
  149. package/bundles/sd-angular-core.umd.js.map +1 -1
  150. package/bundles/sd-angular-core.umd.min.js +1 -1
  151. package/bundles/sd-angular-core.umd.min.js.map +1 -1
  152. package/cache/sd-angular-core-cache.metadata.json +1 -1
  153. package/cache/src/lib/cache.service.d.ts +0 -1
  154. package/cache/src/public-api.d.ts +1 -0
  155. package/chart/sd-angular-core-chart.metadata.json +1 -1
  156. package/chart/src/lib/chart.component.d.ts +0 -1
  157. package/chart/src/public-api.d.ts +1 -0
  158. package/{typing → comment}/index.d.ts +0 -0
  159. package/comment/package.json +12 -0
  160. package/{typing/sd-angular-core-typing.d.ts → comment/sd-angular-core-comment.d.ts} +0 -0
  161. package/comment/sd-angular-core-comment.metadata.json +1 -0
  162. package/comment/src/lib/comment.component.d.ts +17 -0
  163. package/comment/src/lib/comment.model.d.ts +21 -0
  164. package/comment/src/lib/comment.module.d.ts +2 -0
  165. package/comment/src/public-api.d.ts +3 -0
  166. package/common/sd-angular-core-common.metadata.json +1 -1
  167. package/common/src/lib/common.module.d.ts +2 -0
  168. package/{grid-material → common}/src/lib/directives/sd-let.directive.d.ts +0 -0
  169. package/common/src/lib/directives/view-def.directive.d.ts +5 -0
  170. package/common/src/lib/typings/array.extension.d.ts +20 -0
  171. package/{service → common}/src/lib/typings/date.extension.d.ts +0 -0
  172. package/{service → common}/src/lib/typings/number.extension.d.ts +0 -0
  173. package/{typing/src/lib/typing → common/src/lib/typings}/string.extension.d.ts +2 -0
  174. package/common/src/public-api.d.ts +7 -0
  175. package/date-range/index.d.ts +0 -1
  176. package/date-range/sd-angular-core-date-range.metadata.json +1 -1
  177. package/date-range/src/lib/date-range.component.d.ts +0 -1
  178. package/date-range/src/lib/date-range.module.d.ts +0 -1
  179. package/date-range/src/public-api.d.ts +1 -1
  180. package/date-time/sd-angular-core-date-time.metadata.json +1 -1
  181. package/date-time/src/lib/date-time.component.d.ts +14 -7
  182. package/date-time/src/lib/date-time.module.d.ts +0 -1
  183. package/date-time/src/public-api.d.ts +0 -1
  184. package/esm2015/api/src/lib/token.service.js +1 -1
  185. package/esm2015/autocomplete/src/lib/autocomplete.component.js +111 -89
  186. package/esm2015/autocomplete/src/lib/autocomplete.module.js +6 -4
  187. package/esm2015/cache/src/lib/cache.service.js +1 -2
  188. package/esm2015/cache/src/public-api.js +2 -1
  189. package/esm2015/chart/src/lib/chart.component.js +1 -2
  190. package/esm2015/chart/src/public-api.js +2 -4
  191. package/esm2015/{typing → comment}/index.js +1 -1
  192. package/esm2015/comment/sd-angular-core-comment.js +5 -0
  193. package/esm2015/comment/src/lib/comment.component.js +60 -0
  194. package/esm2015/comment/src/lib/comment.model.js +2 -0
  195. package/esm2015/comment/src/lib/comment.module.js +37 -0
  196. package/esm2015/comment/src/public-api.js +7 -0
  197. package/esm2015/common/src/lib/common.module.js +24 -0
  198. package/esm2015/common/src/lib/directives/sd-let.directive.js +29 -0
  199. package/esm2015/common/src/lib/directives/view-def.directive.js +16 -0
  200. package/esm2015/common/src/lib/typings/array.extension.js +65 -0
  201. package/esm2015/common/src/lib/typings/date.extension.js +143 -0
  202. package/esm2015/common/src/lib/typings/number.extension.js +33 -0
  203. package/esm2015/common/src/lib/typings/string.extension.js +42 -0
  204. package/esm2015/common/src/public-api.js +8 -1
  205. package/esm2015/date-range/index.js +1 -2
  206. package/esm2015/date-range/src/lib/date-range.component.js +1 -2
  207. package/esm2015/date-range/src/lib/date-range.module.js +1 -2
  208. package/esm2015/date-range/src/public-api.js +2 -2
  209. package/esm2015/date-time/src/lib/date-time.component.js +55 -35
  210. package/esm2015/date-time/src/lib/date-time.module.js +5 -3
  211. package/esm2015/date-time/src/public-api.js +1 -2
  212. package/esm2015/export/src/lib/export.service.js +1 -2
  213. package/esm2015/form/src/public-api.js +2 -1
  214. package/esm2015/grid/src/lib/components/grid-date-picker-control/grid-date-picker-control.component.js +1 -2
  215. package/esm2015/grid/src/lib/grid.module.js +1 -2
  216. package/esm2015/grid/src/lib/models/handler-dotnet.js +1 -2
  217. package/esm2015/grid-material/sd-angular-core-grid-material.js +27 -28
  218. package/esm2015/grid-material/src/lib/grid-material.module.js +4 -5
  219. package/esm2015/grid-material/src/public-api.js +2 -4
  220. package/esm2015/input/src/lib/input.component.js +26 -6
  221. package/esm2015/input/src/lib/input.module.js +6 -3
  222. package/esm2015/input-upload-file/src/lib/input-upload-file.component.js +2 -2
  223. package/esm2015/input-upload-file/src/lib/input-upload-file.module.js +1 -2
  224. package/esm2015/lib/controls/date-picker-control/date-picker-control.component.js +1 -2
  225. package/esm2015/lib/pipes/sd-date.pipe.js +1 -2
  226. package/esm2015/modal/src/lib/modal.module.js +1 -2
  227. package/esm2015/public-api.js +12 -14
  228. package/esm2015/radio/src/lib/radio.module.js +1 -2
  229. package/esm2015/radio/src/public-api.js +2 -4
  230. package/esm2015/select/src/lib/select.component.js +74 -76
  231. package/esm2015/select/src/lib/select.module.js +6 -4
  232. package/esm2015/select-editor/src/lib/select-editor.module.js +1 -2
  233. package/esm2015/service/src/lib/service.module.js +6 -4
  234. package/esm2015/service/src/public-api.js +2 -2
  235. package/esm2015/side-drawer/src/lib/side-drawer.module.js +1 -2
  236. package/esm2015/time/src/lib/time.component.js +1 -2
  237. package/esm2015/time/src/public-api.js +2 -1
  238. package/esm2015/upload-excel/src/lib/upload-excel.component.js +1 -2
  239. package/esm2015/upload-excel/src/lib/upload-excel.module.js +1 -2
  240. package/esm2015/upload-file/src/lib/upload-file.module.js +1 -2
  241. package/esm2015/utility/src/lib/pipes/currency.pipe.js +1 -2
  242. package/esm2015/utility/src/lib/pipes/time-different.pipe.js +1 -2
  243. package/esm2015/utility/src/lib/utility.service.js +1 -2
  244. package/esm2015/utility/src/public-api.js +2 -1
  245. package/export/sd-angular-core-export.metadata.json +1 -1
  246. package/export/src/lib/export.service.d.ts +0 -1
  247. package/fesm2015/sd-angular-core-api.js.map +1 -1
  248. package/fesm2015/sd-angular-core-autocomplete.js +114 -91
  249. package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
  250. package/fesm2015/sd-angular-core-cache.js +1 -1
  251. package/fesm2015/sd-angular-core-cache.js.map +1 -1
  252. package/fesm2015/sd-angular-core-chart.js +1 -5
  253. package/fesm2015/sd-angular-core-chart.js.map +1 -1
  254. package/fesm2015/sd-angular-core-comment.js +106 -0
  255. package/fesm2015/sd-angular-core-comment.js.map +1 -0
  256. package/fesm2015/sd-angular-core-common.js +346 -2
  257. package/fesm2015/sd-angular-core-common.js.map +1 -1
  258. package/fesm2015/sd-angular-core-date-range.js +1 -1
  259. package/fesm2015/sd-angular-core-date-range.js.map +1 -1
  260. package/fesm2015/sd-angular-core-date-time.js +57 -36
  261. package/fesm2015/sd-angular-core-date-time.js.map +1 -1
  262. package/fesm2015/sd-angular-core-export.js +0 -1
  263. package/fesm2015/sd-angular-core-export.js.map +1 -1
  264. package/fesm2015/sd-angular-core-form.js +1 -0
  265. package/fesm2015/sd-angular-core-form.js.map +1 -1
  266. package/fesm2015/sd-angular-core-grid-material.js +5 -37
  267. package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
  268. package/fesm2015/sd-angular-core-grid.js +1 -1
  269. package/fesm2015/sd-angular-core-grid.js.map +1 -1
  270. package/fesm2015/sd-angular-core-input-upload-file.js +0 -1
  271. package/fesm2015/sd-angular-core-input-upload-file.js.map +1 -1
  272. package/fesm2015/sd-angular-core-input.js +29 -8
  273. package/fesm2015/sd-angular-core-input.js.map +1 -1
  274. package/fesm2015/sd-angular-core-modal.js +0 -1
  275. package/fesm2015/sd-angular-core-modal.js.map +1 -1
  276. package/fesm2015/sd-angular-core-radio.js +1 -5
  277. package/fesm2015/sd-angular-core-radio.js.map +1 -1
  278. package/fesm2015/sd-angular-core-select-editor.js +0 -1
  279. package/fesm2015/sd-angular-core-select-editor.js.map +1 -1
  280. package/fesm2015/sd-angular-core-select.js +77 -78
  281. package/fesm2015/sd-angular-core-select.js.map +1 -1
  282. package/fesm2015/sd-angular-core-service.js +5 -198
  283. package/fesm2015/sd-angular-core-service.js.map +1 -1
  284. package/fesm2015/sd-angular-core-side-drawer.js +0 -1
  285. package/fesm2015/sd-angular-core-side-drawer.js.map +1 -1
  286. package/fesm2015/sd-angular-core-time.js +1 -1
  287. package/fesm2015/sd-angular-core-time.js.map +1 -1
  288. package/fesm2015/sd-angular-core-upload-excel.js +0 -1
  289. package/fesm2015/sd-angular-core-upload-excel.js.map +1 -1
  290. package/fesm2015/sd-angular-core-upload-file.js +0 -1
  291. package/fesm2015/sd-angular-core-upload-file.js.map +1 -1
  292. package/fesm2015/sd-angular-core-utility.js +1 -1
  293. package/fesm2015/sd-angular-core-utility.js.map +1 -1
  294. package/fesm2015/sd-angular-core.js +15 -19
  295. package/fesm2015/sd-angular-core.js.map +1 -1
  296. package/form/src/public-api.d.ts +1 -0
  297. package/grid/sd-angular-core-grid.metadata.json +1 -1
  298. package/grid/src/lib/components/grid-date-picker-control/grid-date-picker-control.component.d.ts +0 -1
  299. package/grid/src/lib/grid.module.d.ts +0 -1
  300. package/grid/src/lib/models/handler-dotnet.d.ts +0 -1
  301. package/grid-material/sd-angular-core-grid-material.d.ts +26 -27
  302. package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
  303. package/grid-material/src/lib/grid-material.module.d.ts +0 -1
  304. package/grid-material/src/public-api.d.ts +1 -0
  305. package/input/sd-angular-core-input.metadata.json +1 -1
  306. package/input/src/lib/input.component.d.ts +5 -0
  307. package/input-upload-file/sd-angular-core-input-upload-file.metadata.json +1 -1
  308. package/input-upload-file/src/lib/input-upload-file.module.d.ts +0 -1
  309. package/lib/controls/date-picker-control/date-picker-control.component.d.ts +0 -1
  310. package/lib/pipes/sd-date.pipe.d.ts +0 -1
  311. package/modal/sd-angular-core-modal.metadata.json +1 -1
  312. package/modal/src/lib/modal.module.d.ts +0 -1
  313. package/package.json +1 -1
  314. package/public-api.d.ts +11 -10
  315. package/radio/sd-angular-core-radio.metadata.json +1 -1
  316. package/radio/src/lib/radio.module.d.ts +0 -1
  317. package/radio/src/public-api.d.ts +1 -0
  318. package/{sd-angular-core-0.0.1005.tgz → sd-angular-core-0.0.1009.tgz} +0 -0
  319. package/sd-angular-core.metadata.json +1 -1
  320. package/select/sd-angular-core-select.metadata.json +1 -1
  321. package/select/src/lib/select.component.d.ts +12 -5
  322. package/select/src/lib/select.module.d.ts +0 -1
  323. package/select-editor/sd-angular-core-select-editor.metadata.json +1 -1
  324. package/select-editor/src/lib/select-editor.module.d.ts +0 -1
  325. package/service/sd-angular-core-service.metadata.json +1 -1
  326. package/service/src/lib/service.module.d.ts +0 -1
  327. package/service/src/public-api.d.ts +1 -1
  328. package/side-drawer/sd-angular-core-side-drawer.metadata.json +1 -1
  329. package/side-drawer/src/lib/side-drawer.module.d.ts +0 -1
  330. package/time/sd-angular-core-time.metadata.json +1 -1
  331. package/time/src/lib/time.component.d.ts +0 -1
  332. package/time/src/public-api.d.ts +1 -0
  333. package/upload-excel/sd-angular-core-upload-excel.metadata.json +1 -1
  334. package/upload-excel/src/lib/upload-excel.component.d.ts +0 -1
  335. package/upload-excel/src/lib/upload-excel.module.d.ts +0 -1
  336. package/upload-file/sd-angular-core-upload-file.metadata.json +1 -1
  337. package/upload-file/src/lib/upload-file.module.d.ts +0 -1
  338. package/utility/sd-angular-core-utility.metadata.json +1 -1
  339. package/utility/src/lib/pipes/currency.pipe.d.ts +0 -1
  340. package/utility/src/lib/pipes/time-different.pipe.d.ts +0 -1
  341. package/utility/src/lib/utility.service.d.ts +0 -1
  342. package/utility/src/public-api.d.ts +1 -0
  343. package/bundles/sd-angular-core-typing.umd.js +0 -226
  344. package/bundles/sd-angular-core-typing.umd.js.map +0 -1
  345. package/bundles/sd-angular-core-typing.umd.min.js +0 -2
  346. package/bundles/sd-angular-core-typing.umd.min.js.map +0 -1
  347. package/esm2015/grid-material/src/lib/directives/sd-let.directive.js +0 -29
  348. package/esm2015/service/src/lib/typings/date.extension.js +0 -143
  349. package/esm2015/service/src/lib/typings/index.js +0 -4
  350. package/esm2015/service/src/lib/typings/number.extension.js +0 -33
  351. package/esm2015/service/src/lib/typings/string.extension.js +0 -23
  352. package/esm2015/typing/sd-angular-core-typing.js +0 -5
  353. package/esm2015/typing/src/lib/typing/date.extension.js +0 -143
  354. package/esm2015/typing/src/lib/typing/index.js +0 -4
  355. package/esm2015/typing/src/lib/typing/number.extension.js +0 -33
  356. package/esm2015/typing/src/lib/typing/string.extension.js +0 -23
  357. package/esm2015/typing/src/lib/typing.service.js +0 -13
  358. package/esm2015/typing/src/public-api.js +0 -3
  359. package/fesm2015/sd-angular-core-typing.js +0 -215
  360. package/fesm2015/sd-angular-core-typing.js.map +0 -1
  361. package/service/src/lib/typings/index.d.ts +0 -3
  362. package/service/src/lib/typings/string.extension.d.ts +0 -8
  363. package/typing/package.json +0 -12
  364. package/typing/sd-angular-core-typing.metadata.json +0 -1
  365. package/typing/src/lib/typing/date.extension.d.ts +0 -24
  366. package/typing/src/lib/typing/index.d.ts +0 -3
  367. package/typing/src/lib/typing/number.extension.d.ts +0 -9
  368. package/typing/src/lib/typing.service.d.ts +0 -3
  369. package/typing/src/public-api.d.ts +0 -2
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@sd-angular/core/typing'), require('@angular/material/icon'), require('@angular/material/tooltip'), require('@angular/material/progress-spinner'), require('uuid'), require('rxjs'), require('rxjs/operators'), require('@sd-angular/core/utility'), require('@sd-angular/core/common'), require('@angular/material/select'), require('@sd-angular/core/translate'), require('@angular/material/checkbox')) :
3
- typeof define === 'function' && define.amd ? define('@sd-angular/core/select', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@sd-angular/core/typing', '@angular/material/icon', '@angular/material/tooltip', '@angular/material/progress-spinner', 'uuid', 'rxjs', 'rxjs/operators', '@sd-angular/core/utility', '@sd-angular/core/common', '@angular/material/select', '@sd-angular/core/translate', '@angular/material/checkbox'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.select = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.formField, global.ng.material.input, global['sd-angular'].core.typing, global.ng.material.icon, global.ng.material.tooltip, global.ng.material.progressSpinner, global.uuid, global.rxjs, global.rxjs.operators, global['sd-angular'].core.utility, global['sd-angular'].core.common, global.ng.material.select, global['sd-angular'].core.translate, global.ng.material.checkbox));
5
- }(this, (function (exports, core, common$1, forms, formField, input, typing, icon, tooltip, progressSpinner, uuid, rxjs, operators, utility, common, select, translate, checkbox) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/icon'), require('@angular/material/tooltip'), require('@angular/material/progress-spinner'), require('uuid'), require('rxjs'), require('rxjs/operators'), require('@sd-angular/core/utility'), require('@sd-angular/core/common'), require('@angular/material/select'), require('@sd-angular/core/translate'), require('@angular/material/checkbox')) :
3
+ typeof define === 'function' && define.amd ? define('@sd-angular/core/select', ['exports', '@angular/core', '@angular/common', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/icon', '@angular/material/tooltip', '@angular/material/progress-spinner', 'uuid', 'rxjs', 'rxjs/operators', '@sd-angular/core/utility', '@sd-angular/core/common', '@angular/material/select', '@sd-angular/core/translate', '@angular/material/checkbox'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['sd-angular'] = global['sd-angular'] || {}, global['sd-angular'].core = global['sd-angular'].core || {}, global['sd-angular'].core.select = {}), global.ng.core, global.ng.common, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.icon, global.ng.material.tooltip, global.ng.material.progressSpinner, global.uuid, global.rxjs, global.rxjs.operators, global['sd-angular'].core.utility, global['sd-angular'].core.common, global.ng.material.select, global['sd-angular'].core.translate, global.ng.material.checkbox));
5
+ }(this, (function (exports, core, common$1, forms, formField, input, icon, tooltip, progressSpinner, uuid, rxjs, operators, utility, common, select, translate, checkbox) { 'use strict';
6
6
 
7
7
  /*! *****************************************************************************
8
8
  Copyright (c) Microsoft Corporation.
@@ -28,6 +28,8 @@
28
28
  return extendStatics(d, b);
29
29
  };
30
30
  function __extends(d, b) {
31
+ if (typeof b !== "function" && b !== null)
32
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
31
33
  extendStatics(d, b);
32
34
  function __() { this.constructor = d; }
33
35
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
@@ -213,11 +215,13 @@
213
215
  }
214
216
  return ar;
215
217
  }
218
+ /** @deprecated */
216
219
  function __spread() {
217
220
  for (var ar = [], i = 0; i < arguments.length; i++)
218
221
  ar = ar.concat(__read(arguments[i]));
219
222
  return ar;
220
223
  }
224
+ /** @deprecated */
221
225
  function __spreadArrays() {
222
226
  for (var s = 0, i = 0, il = arguments.length; i < il; i++)
223
227
  s += arguments[i].length;
@@ -226,7 +230,17 @@
226
230
  r[k] = a[j];
227
231
  return r;
228
232
  }
229
- ;
233
+ function __spreadArray(to, from, pack) {
234
+ if (pack || arguments.length === 2)
235
+ for (var i = 0, l = from.length, ar; i < l; i++) {
236
+ if (ar || !(i in from)) {
237
+ if (!ar)
238
+ ar = Array.prototype.slice.call(from, 0, i);
239
+ ar[i] = from[i];
240
+ }
241
+ }
242
+ return to.concat(ar || Array.prototype.slice.call(from));
243
+ }
230
244
  function __await(v) {
231
245
  return this instanceof __await ? (this.v = v, this) : new __await(v);
232
246
  }
@@ -291,18 +305,21 @@
291
305
  function __importDefault(mod) {
292
306
  return (mod && mod.__esModule) ? mod : { default: mod };
293
307
  }
294
- function __classPrivateFieldGet(receiver, privateMap) {
295
- if (!privateMap.has(receiver)) {
296
- throw new TypeError("attempted to get private field on non-instance");
297
- }
298
- return privateMap.get(receiver);
308
+ function __classPrivateFieldGet(receiver, state, kind, f) {
309
+ if (kind === "a" && !f)
310
+ throw new TypeError("Private accessor was defined without a getter");
311
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
312
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
313
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
299
314
  }
300
- function __classPrivateFieldSet(receiver, privateMap, value) {
301
- if (!privateMap.has(receiver)) {
302
- throw new TypeError("attempted to set private field on non-instance");
303
- }
304
- privateMap.set(receiver, value);
305
- return value;
315
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
316
+ if (kind === "m")
317
+ throw new TypeError("Private method is not writable");
318
+ if (kind === "a" && !f)
319
+ throw new TypeError("Private accessor was defined without a setter");
320
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
321
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
322
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
306
323
  }
307
324
 
308
325
  var SdSelectDisplayDefDirective = /** @class */ (function () {
@@ -320,7 +337,7 @@
320
337
  { type: core.TemplateRef }
321
338
  ]; };
322
339
 
323
- var _input, _name, _form, _items, _currentItems, _allItem, _delay, _validator, _allItems, _subscription, _updateValidator, _search, _loadItems, _onChange, _customValidator;
340
+ var _input, _name, _form, _items, _delay, _validator, _subscription, _selectedItems, _allItems, _allItem, _updateValidator, _loadSelectedItems, _loadItems, _onChange, _customValidator;
324
341
  var SdSelect = /** @class */ (function () {
325
342
  function SdSelect(ref, utilityService) {
326
343
  var _this = this;
@@ -334,8 +351,6 @@
334
351
  _form.set(this, void 0);
335
352
  // Items
336
353
  _items.set(this, []);
337
- _currentItems.set(this, []);
338
- _allItem.set(this, {});
339
354
  // Server search
340
355
  this.loading = false;
341
356
  _delay.set(this, 500); // Sau khoảng thời gian delay nếu không có thay đổi thì thì mới bắt đầu thực hiện gọi hàm
@@ -346,12 +361,15 @@
346
361
  this.limit = 100;
347
362
  this.filtered = false;
348
363
  this.selectAll = false;
349
- _allItems.set(this, void 0);
350
- this.allSelected = false;
351
364
  this.modelChange = new core.EventEmitter();
352
365
  this.sdChange = new core.EventEmitter();
353
366
  this.sdSelection = new core.EventEmitter();
354
367
  _subscription.set(this, new rxjs.Subscription());
368
+ _selectedItems.set(this, void 0);
369
+ _allItems.set(this, void 0);
370
+ _allItem.set(this, {});
371
+ this.allSelected = false;
372
+ this.isFocused = false;
355
373
  _updateValidator.set(this, function () {
356
374
  _this.formControl.clearValidators();
357
375
  _this.formControl.clearAsyncValidators();
@@ -367,23 +385,36 @@
367
385
  _this.formControl.setAsyncValidators(asyncValidators);
368
386
  _this.formControl.updateValueAndValidity();
369
387
  });
370
- _search.set(this, function (value, items) { return __awaiter(_this, void 0, void 0, function () {
371
- var results;
388
+ _loadSelectedItems.set(this, function (value, items) { return __awaiter(_this, void 0, void 0, function () {
389
+ var values, results, objItem;
372
390
  var _this = this;
373
391
  return __generator(this, function (_c) {
374
392
  switch (_c.label) {
375
- case 0: return [4 /*yield*/, items(value).catch(function () { return []; })];
393
+ case 0:
394
+ if (!(value === null || value === void 0 ? void 0 : value.toString())) {
395
+ return [2 /*return*/, []];
396
+ }
397
+ values = Array.isArray(value) ? value : [value];
398
+ if (!this.valueField && !this.displayField) {
399
+ return [2 /*return*/, values];
400
+ }
401
+ this.loading = true;
402
+ if (!values.some(function (val) { return __classPrivateFieldGet(_this, _allItem)[val] === undefined; })) return [3 /*break*/, 2];
403
+ return [4 /*yield*/, items(value, true).finally(function () { return _this.loading = false; })];
376
404
  case 1:
377
405
  results = _c.sent();
378
- if (Array.isArray(value)) {
379
- return [2 /*return*/, results.filter(function (e) { return !!e && (value.includes(e) || value.includes(e[_this.valueField])); })];
380
- }
381
- return [2 /*return*/, results.filter(function (e) { return !!e && (e === value || e[_this.valueField] === value); })];
406
+ objItem = Array.toObject(results, this.valueField);
407
+ __classPrivateFieldSet(this, _allItem, Object.assign(Object.assign(Object.assign({}, values.map(function (val) {
408
+ var _c, _d;
409
+ return (_c = {}, _c[val] = (_d = {}, _d[_this.valueField] = val, _d[_this.displayField] = val, _d), _c);
410
+ })), __classPrivateFieldGet(this, _allItem)), objItem));
411
+ _c.label = 2;
412
+ case 2: return [2 /*return*/, values.map(function (val) { return __classPrivateFieldGet(_this, _allItem)[val]; })];
382
413
  }
383
414
  });
384
415
  }); });
385
416
  _loadItems.set(this, function (searchText, items) { return __awaiter(_this, void 0, void 0, function () {
386
- var _a, results, objItem, values;
417
+ var results, objItem, selectedItems;
387
418
  var _this = this;
388
419
  return __generator(this, function (_c) {
389
420
  switch (_c.label) {
@@ -392,32 +423,12 @@
392
423
  return [4 /*yield*/, items(searchText).finally(function () { return _this.loading = false; })];
393
424
  case 1:
394
425
  results = _c.sent();
395
- objItem = this.valueField ? this.utilityService.arrayToObject(results, this.valueField) : results.forEach(function (item) { return objItem[item === null || item === void 0 ? void 0 : item.toString()] = item; });
396
- Object.assign(__classPrivateFieldGet(this, _allItem), objItem);
397
- if (!((_a = this.formControl.value) === null || _a === void 0 ? void 0 : _a.toString())) {
398
- return [2 /*return*/, results];
399
- }
400
- values = Array.isArray(this.formControl.value) ? this.formControl.value : [this.formControl.value];
401
- values.map(function (val) { return val === null || val === void 0 ? void 0 : val.toString(); }).forEach(function (val) {
402
- var _c;
403
- if (!objItem[val]) {
404
- if (__classPrivateFieldGet(_this, _allItem)[val]) {
405
- results.push(__classPrivateFieldGet(_this, _allItem)[val]);
406
- }
407
- else {
408
- if (_this.valueField && _this.displayField) {
409
- results.push((_c = {},
410
- _c[_this.valueField] = val,
411
- _c[_this.displayField] = val,
412
- _c));
413
- }
414
- else {
415
- results.push(val);
416
- }
417
- }
418
- }
419
- });
420
- return [2 /*return*/, results];
426
+ objItem = Array.toObject(results, this.valueField);
427
+ __classPrivateFieldSet(this, _allItem, Object.assign(Object.assign({}, __classPrivateFieldGet(this, _allItem)), objItem));
428
+ return [4 /*yield*/, __classPrivateFieldGet(this, _loadSelectedItems).call(this, this.formControl.value, items)];
429
+ case 2:
430
+ selectedItems = _c.sent();
431
+ return [2 /*return*/, __spread(selectedItems, results).union(this.valueField)];
421
432
  }
422
433
  });
423
434
  }); });
@@ -437,13 +448,12 @@
437
448
  _this.formControl.updateValueAndValidity({ emitEvent: true });
438
449
  };
439
450
  _onChange.set(this, function (value) {
440
- var _a, _b;
441
451
  if (Array.isArray(value)) {
442
452
  _this.modelChange.emit(value);
443
453
  _this.sdChange.emit(value);
444
454
  _this.sdSelection.emit({
445
455
  value: value,
446
- items: (_a = __classPrivateFieldGet(_this, _currentItems)) === null || _a === void 0 ? void 0 : _a.filter(function (e) { return value.some(function (e1) { return e1 === (e === null || e === void 0 ? void 0 : e[_this.valueField]); }); })
456
+ items: _this.selectedItems
447
457
  });
448
458
  }
449
459
  else {
@@ -451,7 +461,7 @@
451
461
  _this.sdChange.emit(value);
452
462
  _this.sdSelection.emit({
453
463
  value: value,
454
- item: (_b = __classPrivateFieldGet(_this, _currentItems)) === null || _b === void 0 ? void 0 : _b.find(function (e) { return value === (e === null || e === void 0 ? void 0 : e[_this.valueField]); })
464
+ item: _this.selectedItems[0]
455
465
  });
456
466
  }
457
467
  });
@@ -476,6 +486,22 @@
476
486
  });
477
487
  }
478
488
  };
489
+ this.onClick = function () {
490
+ var _a;
491
+ if ((_a = _this.sdView) === null || _a === void 0 ? void 0 : _a.templateRef) {
492
+ if (!_this.formControl.disabled && !_this.isFocused) {
493
+ _this.focus();
494
+ }
495
+ }
496
+ };
497
+ this.focus = function () {
498
+ _this.isFocused = true;
499
+ setTimeout(function () {
500
+ var _a, _b;
501
+ (_a = _this.select) === null || _a === void 0 ? void 0 : _a.focus();
502
+ (_b = _this.select) === null || _b === void 0 ? void 0 : _b.open();
503
+ }, 100);
504
+ };
479
505
  _customValidator.set(this, function (func) {
480
506
  return function (c) { return __awaiter(_this, void 0, void 0, function () {
481
507
  var value, result, message;
@@ -509,11 +535,15 @@
509
535
  });
510
536
  this.onOpenChange = function (isOpened) {
511
537
  if (isOpened) {
538
+ _this.isFocused = true;
512
539
  if (__classPrivateFieldGet(_this, _input)) {
513
540
  __classPrivateFieldGet(_this, _input).value = null;
514
541
  }
515
542
  _this.searchTerm$.next('');
516
543
  }
544
+ else {
545
+ _this.isFocused = false;
546
+ }
517
547
  };
518
548
  }
519
549
  Object.defineProperty(SdSelect.prototype, "input", {
@@ -559,20 +589,7 @@
559
589
  });
560
590
  Object.defineProperty(SdSelect.prototype, "model", {
561
591
  set: function (value) {
562
- // this.#model = value;
563
- // if (Array.isArray(value)) {
564
- // this.formControl.setValue(value.map(val => (val ?? '') + ''));
565
- // } else {
566
- // this.formControl.setValue((value ?? '') + '');
567
- // }
568
- // this.ref.detectChanges();
569
- // this.#model = value;
570
- if (Array.isArray(value)) {
571
- this.formControl.setValue(value);
572
- }
573
- else {
574
- this.formControl.setValue(value);
575
- }
592
+ this.formControl.setValue(value);
576
593
  },
577
594
  enumerable: false,
578
595
  configurable: true
@@ -649,75 +666,80 @@
649
666
  __classPrivateFieldGet(this, _subscription).add(this.formControl.touchedChanges.subscribe(function () {
650
667
  _this.ref.markForCheck();
651
668
  }));
652
- __classPrivateFieldSet(this, _allItems, this.searchTerm$.asObservable().pipe(operators.startWith(''), operators.debounceTime(typeof (__classPrivateFieldGet(this, _items)) === 'function' ? __classPrivateFieldGet(this, _delay) : 0), operators.switchMap(function (val) { return __awaiter(_this, void 0, void 0, function () {
653
- var changeAliasLowerCase, searchText, formValue, isArray, hasFields;
654
- var _this = this;
655
- return __generator(this, function (_c) {
656
- switch (_c.label) {
657
- case 0:
658
- if (!(typeof (__classPrivateFieldGet(this, _items)) === 'function')) return [3 /*break*/, 2];
659
- return [4 /*yield*/, __classPrivateFieldGet(this, _loadItems).call(this, val, __classPrivateFieldGet(this, _items))];
660
- case 1: return [2 /*return*/, _c.sent()];
661
- case 2:
662
- changeAliasLowerCase = this.utilityService.changeAliasLowerCase;
663
- searchText = changeAliasLowerCase(val);
664
- formValue = this.formControl.value;
665
- isArray = Array.isArray(formValue);
666
- hasFields = !!this.valueField && !!this.displayField;
667
- return [2 /*return*/, __classPrivateFieldGet(this, _items).filter(function (item) {
668
- var value = hasFields ? item[_this.valueField] : item;
669
- var display = hasFields ? item[_this.displayField] : item;
670
- if (changeAliasLowerCase(value).includes(searchText) || changeAliasLowerCase(display).includes(searchText)) {
671
- return true;
672
- }
673
- if (isArray) {
674
- return formValue.some(function (e) { return e === value; });
675
- }
676
- return formValue === value;
677
- }).sort(function (a, b) {
678
- if (!_this.multiple) {
679
- return 0;
680
- }
681
- var value1 = hasFields ? a[_this.valueField] : a;
682
- var value2 = hasFields ? b[_this.valueField] : b;
683
- if (isArray) {
684
- var t1_1 = formValue.some(function (e) { return e === value1; });
685
- var t2_1 = formValue.some(function (e) { return e === value2; });
686
- if (t1_1 && !t2_1) {
669
+ __classPrivateFieldSet(this, _allItems, rxjs.combineLatest([
670
+ this.searchTerm$.asObservable().pipe(operators.startWith(''), operators.debounceTime(typeof (__classPrivateFieldGet(this, _items)) === 'function' ? __classPrivateFieldGet(this, _delay) : 0)),
671
+ this.formControl.valueChanges.pipe(operators.startWith(this.formControl.value))
672
+ ]).pipe(operators.switchMap(function (_c) {
673
+ var _d = __read(_c, 2), val = _d[0], formValue = _d[1];
674
+ return __awaiter(_this, void 0, void 0, function () {
675
+ var isArray, hasFields;
676
+ var _this = this;
677
+ return __generator(this, function (_c) {
678
+ switch (_c.label) {
679
+ case 0:
680
+ if (!(typeof (__classPrivateFieldGet(this, _items)) === 'function')) return [3 /*break*/, 2];
681
+ return [4 /*yield*/, __classPrivateFieldGet(this, _loadItems).call(this, val, __classPrivateFieldGet(this, _items))];
682
+ case 1: return [2 /*return*/, _c.sent()];
683
+ case 2:
684
+ isArray = Array.isArray(formValue);
685
+ hasFields = !!this.valueField && !!this.displayField;
686
+ return [2 /*return*/, __classPrivateFieldGet(this, _items).filter(function (item) {
687
+ var value = hasFields ? item[_this.valueField] : item;
688
+ var display = hasFields ? item[_this.displayField] : item;
689
+ if (String.aliasIncludes(value, val) || String.aliasIncludes(display, val)) {
690
+ return true;
691
+ }
692
+ if (isArray) {
693
+ return formValue.some(function (e) { return e === value; });
694
+ }
695
+ return formValue === value;
696
+ }).sort(function (a, b) {
697
+ if (!_this.multiple) {
698
+ return 0;
699
+ }
700
+ var value1 = hasFields ? a[_this.valueField] : a;
701
+ var value2 = hasFields ? b[_this.valueField] : b;
702
+ if (isArray) {
703
+ var t1_1 = formValue.some(function (e) { return e === value1; });
704
+ var t2_1 = formValue.some(function (e) { return e === value2; });
705
+ if (t1_1 && !t2_1) {
706
+ return -1;
707
+ }
708
+ if (!t1_1 && t2_1) {
709
+ return 1;
710
+ }
711
+ return 0;
712
+ }
713
+ var t1 = formValue === value1;
714
+ var t2 = formValue === value2;
715
+ if (t1 && !t2) {
687
716
  return -1;
688
717
  }
689
- if (!t1_1 && t2_1) {
718
+ if (!t1 && t2) {
690
719
  return 1;
691
720
  }
692
721
  return 0;
693
- }
694
- var t1 = formValue === value1;
695
- var t2 = formValue === value2;
696
- if (t1 && !t2) {
697
- return -1;
698
- }
699
- if (!t1 && t2) {
700
- return 1;
701
- }
702
- return 0;
703
- })];
704
- }
722
+ })];
723
+ }
724
+ });
705
725
  });
706
- }); })));
707
- this.filteredItems = __classPrivateFieldGet(this, _allItems).pipe(operators.map(function (allItems) {
708
- __classPrivateFieldSet(_this, _currentItems, allItems);
709
- return allItems.filter(function (item, index) { return index < _this.limit; });
710
- }));
711
- this.display = rxjs.combineLatest([__classPrivateFieldGet(this, _allItems), this.formControl.valueChanges.pipe(operators.startWith(this.formControl.value))]).pipe(operators.map(function (_c) {
712
- var _d = __read(_c, 2), items = _d[0], formValue = _d[1];
713
- var isArray = Array.isArray(formValue);
714
- if (!_this.valueField || !_this.displayField) {
715
- return isArray ? formValue === null || formValue === void 0 ? void 0 : formValue.join(', ') : formValue;
726
+ })));
727
+ __classPrivateFieldSet(this, _selectedItems, __classPrivateFieldGet(this, _allItems).pipe(operators.map(function (items) {
728
+ var formValue = _this.formControl.value;
729
+ if (!(formValue === null || formValue === void 0 ? void 0 : formValue.toString())) {
730
+ return [];
716
731
  }
717
- return items.filter(function (e) { return isArray ? formValue.includes(e[_this.valueField]) : formValue === e[_this.valueField]; })
718
- .map(function (e) { var _a; return (_a = e[_this.displayField]) === null || _a === void 0 ? void 0 : _a.toString(); })
719
- .join(', ');
720
- }));
732
+ var values = Array.isArray(formValue) ? formValue : [formValue];
733
+ _this.selectedItems = values.map(function (val) {
734
+ if (_this.valueField) {
735
+ return items === null || items === void 0 ? void 0 : items.find(function (item) { return item[_this.valueField] === val; });
736
+ }
737
+ return val;
738
+ });
739
+ return _this.selectedItems;
740
+ })));
741
+ this.filteredItems = __classPrivateFieldGet(this, _allItems).pipe(operators.map(function (allItems) { return allItems.paging(_this.limit); }));
742
+ this.display = __classPrivateFieldGet(this, _selectedItems).pipe(operators.map(function (selectedItems) { var _a; return (_a = selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.map(function (item) { return _this.displayField ? item[_this.displayField] : item; })) === null || _a === void 0 ? void 0 : _a.join(', '); }));
721
743
  };
722
744
  SdSelect.prototype.ngAfterViewInit = function () {
723
745
  var _a;
@@ -739,13 +761,13 @@
739
761
  };
740
762
  return SdSelect;
741
763
  }());
742
- _input = new WeakMap(), _name = new WeakMap(), _form = new WeakMap(), _items = new WeakMap(), _currentItems = new WeakMap(), _allItem = new WeakMap(), _delay = new WeakMap(), _validator = new WeakMap(), _allItems = new WeakMap(), _subscription = new WeakMap(), _updateValidator = new WeakMap(), _search = new WeakMap(), _loadItems = new WeakMap(), _onChange = new WeakMap(), _customValidator = new WeakMap();
764
+ _input = new WeakMap(), _name = new WeakMap(), _form = new WeakMap(), _items = new WeakMap(), _delay = new WeakMap(), _validator = new WeakMap(), _subscription = new WeakMap(), _selectedItems = new WeakMap(), _allItems = new WeakMap(), _allItem = new WeakMap(), _updateValidator = new WeakMap(), _loadSelectedItems = new WeakMap(), _loadItems = new WeakMap(), _onChange = new WeakMap(), _customValidator = new WeakMap();
743
765
  SdSelect.decorators = [
744
766
  { type: core.Component, args: [{
745
767
  selector: 'sd-select',
746
- template: "<div class=\"d-flex align-items-center\">\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n appearance=\"outline\">\r\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\r\n <mat-select #select [formControl]=\"formControl\" placeholder=\"{{placeholder || label}}\" multiple\r\n (selectionChange)=\"onSelectionChange($event)\" disableOptionCentering=\"true\" panelClass=\"sd-select-panel\"\r\n [ngClass]=\"{'sd-selected': !isRequired && (multiple ? formControl?.value?.length : formControl?.value)}\"\r\n [required]=\"isRequired\" (openedChange)=\"onOpenChange($event)\" *ngIf=\"multiple\">\r\n <mat-select-trigger>\r\n {{display | async }}\r\n </mat-select-trigger>\r\n <mat-option *ngIf=\"filtered\" class=\"sd-filtered-input\" (keyup.Space)=\"$event.stopPropagation()\" disabled=\"true\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\">\r\n <mat-icon matPrefix>search</mat-icon>\r\n <input #input placeholder=\"{{'Search' | sdTranslate}}\" matInput autocomplete=\"off\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"searchTerm$.next($event.target.value)\">\r\n </mat-form-field>\r\n </mat-option>\r\n <ng-container *ngIf=\"multiple && selectAll\">\r\n <mat-checkbox class=\"mat-option\" [(ngModel)]=\"allSelected\" [ngModelOptions]=\"{standalone: true}\"\r\n (change)=\"onSelectAll()\">\r\n T\u1EA5t c\u1EA3</mat-checkbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"valueField && displayField\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item[valueField]\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"item[displayField]\">\r\n <ng-container *ngIf=\"selectDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"selectDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!selectDisplayDef?.templateRef\">\r\n {{ item[displayField] }}\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n <ng-container *ngIf=\"!valueField && !displayField\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"item\">\r\n <ng-container *ngIf=\"selectDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"selectDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!selectDisplayDef?.templateRef\">\r\n {{ item }}\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-select #select [formControl]=\"formControl\" placeholder=\"{{placeholder || label}}\"\r\n (selectionChange)=\"onSelectionChange($event)\" disableOptionCentering=\"true\" panelClass=\"sd-select-panel\"\r\n [ngClass]=\"{'sd-selected': !isRequired && formControl?.value}\" [required]=\"isRequired\"\r\n (openedChange)=\"onOpenChange($event)\" *ngIf=\"!multiple\">\r\n <mat-select-trigger>\r\n {{display | async }}\r\n </mat-select-trigger>\r\n <mat-option *ngIf=\"filtered\" class=\"sd-filtered-input\" (keyup.Space)=\"$event.stopPropagation()\" disabled=\"true\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\">\r\n <mat-icon matPrefix>search</mat-icon>\r\n <input #input placeholder=\"{{'Search' | sdTranslate}}\" matInput autocomplete=\"off\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"searchTerm$.next($event.target.value)\">\r\n </mat-form-field>\r\n </mat-option>\r\n <ng-container *ngIf=\"valueField && displayField\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item[valueField]\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"item[displayField]\">\r\n <ng-container *ngIf=\"selectDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"selectDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!selectDisplayDef?.templateRef\">\r\n {{ item[displayField] }}\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n <ng-container *ngIf=\"!valueField && !displayField\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"item\">\r\n <ng-container *ngIf=\"selectDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"selectDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!selectDisplayDef?.templateRef\">\r\n {{ item }}\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-icon\r\n *ngIf=\"(multiple ? formControl?.value?.length : formControl?.value) && !isRequired && !formControl.disabled\"\r\n class=\"pointer sd-suffix-icon\" (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n <mat-error *ngIf=\"formControl.errors?.required && !disableErrorMessage\">\r\n {{'This field is required' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && !disableErrorMessage\">\r\n {{formControl?.errors?.customValidator}}\r\n </mat-error>\r\n </mat-form-field>\r\n</div>",
768
+ template: "<div class=\"d-flex align-items-center\" [class.sd-view]=\"sdView?.templateRef\" [class.c-focused]=\"isFocused\"\r\n [class.c-disabled]=\"formControl.disabled\" (click)=\"onClick()\">\r\n <ng-container *ngIf=\"sdView?.templateRef && !isFocused; else default\">\r\n <ng-container\r\n *ngTemplateOutlet=\"sdView.templateRef;context: { value: formControl.value, selectedItems: selectedItems }\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-template #default>\r\n <mat-form-field class=\"sd-md\" [ngClass]=\"{'sd-sm': size === 'sm', 'no-padding-wrapper': disableErrorMessage}\"\r\n appearance=\"outline\">\r\n <mat-label *ngIf=\"label\">{{label}}</mat-label>\r\n <mat-select #select [formControl]=\"formControl\" placeholder=\"{{placeholder || label}}\" multiple\r\n (selectionChange)=\"onSelectionChange($event)\" disableOptionCentering=\"true\" panelClass=\"sd-select-panel\"\r\n [ngClass]=\"{'sd-selected': !isRequired && (multiple ? formControl?.value?.length : formControl?.value)}\"\r\n [required]=\"isRequired\" (openedChange)=\"onOpenChange($event)\" *ngIf=\"multiple\">\r\n <mat-select-trigger>\r\n {{display | async }}\r\n </mat-select-trigger>\r\n <mat-option *ngIf=\"filtered\" class=\"sd-filtered-input\" (keyup.Space)=\"$event.stopPropagation()\" disabled=\"true\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\">\r\n <mat-icon matPrefix>search</mat-icon>\r\n <input #input placeholder=\"{{'Search' | sdTranslate}}\" matInput autocomplete=\"off\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"searchTerm$.next($event.target.value)\">\r\n </mat-form-field>\r\n </mat-option>\r\n <ng-container *ngIf=\"multiple && selectAll\">\r\n <mat-checkbox class=\"mat-option\" [(ngModel)]=\"allSelected\" [ngModelOptions]=\"{standalone: true}\"\r\n (change)=\"onSelectAll()\">\r\n T\u1EA5t c\u1EA3</mat-checkbox>\r\n </ng-container>\r\n <ng-container *ngIf=\"valueField && displayField\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item[valueField]\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"item[displayField]\">\r\n <ng-container *ngIf=\"selectDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"selectDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!selectDisplayDef?.templateRef\">\r\n {{ item[displayField] }}\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n <ng-container *ngIf=\"!valueField && !displayField\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"item\">\r\n <ng-container *ngIf=\"selectDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"selectDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!selectDisplayDef?.templateRef\">\r\n {{ item }}\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-select #select [formControl]=\"formControl\" placeholder=\"{{placeholder || label}}\"\r\n (selectionChange)=\"onSelectionChange($event)\" disableOptionCentering=\"true\" panelClass=\"sd-select-panel\"\r\n [ngClass]=\"{'sd-selected': !isRequired && formControl?.value}\" [required]=\"isRequired\"\r\n (openedChange)=\"onOpenChange($event)\" *ngIf=\"!multiple\">\r\n <mat-select-trigger>\r\n {{display | async }}\r\n </mat-select-trigger>\r\n <mat-option *ngIf=\"filtered\" class=\"sd-filtered-input\" (keyup.Space)=\"$event.stopPropagation()\" disabled=\"true\">\r\n <mat-form-field class=\"sd-md\" appearance=\"outline\">\r\n <mat-icon matPrefix>search</mat-icon>\r\n <input #input placeholder=\"{{'Search' | sdTranslate}}\" matInput autocomplete=\"off\"\r\n (keydown)=\"$event.stopPropagation()\" (keyup)=\"searchTerm$.next($event.target.value)\">\r\n </mat-form-field>\r\n </mat-option>\r\n <ng-container *ngIf=\"valueField && displayField\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item[valueField]\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"item[displayField]\">\r\n <ng-container *ngIf=\"selectDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"selectDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!selectDisplayDef?.templateRef\">\r\n {{ item[displayField] }}\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n <ng-container *ngIf=\"!valueField && !displayField\">\r\n <mat-option *ngFor=\"let item of filteredItems | async\" [value]=\"item\" matTooltipPosition=\"above\"\r\n [matTooltip]=\"item\">\r\n <ng-container *ngIf=\"selectDisplayDef?.templateRef\">\r\n <ng-container *ngTemplateOutlet=\"selectDisplayDef.templateRef;context:{item: item}\">\r\n </ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"!selectDisplayDef?.templateRef\">\r\n {{ item }}\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-icon\r\n *ngIf=\"(multiple ? formControl?.value?.length : formControl?.value) && !isRequired && !formControl.disabled\"\r\n class=\"pointer sd-suffix-icon\" (click)=\"clear($event)\" matSuffix>cancel\r\n </mat-icon>\r\n <mat-error *ngIf=\"formControl.errors?.required && !disableErrorMessage\">\r\n {{'This field is required' | sdTranslate}}\r\n </mat-error>\r\n <mat-error *ngIf=\"formControl?.errors?.customValidator && !disableErrorMessage\">\r\n {{formControl?.errors?.customValidator}}\r\n </mat-error>\r\n </mat-form-field>\r\n </ng-template>\r\n</div>",
747
769
  changeDetection: core.ChangeDetectionStrategy.OnPush,
748
- styles: [":host{display:block;padding-top:5px}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:none}:host ::ng-deep .sd-selected .mat-select-arrow{border:none}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field mat-select.mat-select-disabled .mat-select-value{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}::ng-deep .sd-select-panel .mat-option.sd-filtered-input{background-color:#fff;position:-webkit-sticky;position:sticky;top:0;z-index:10}::ng-deep .sd-select-panel .mat-option.sd-filtered-input .mat-form-field.mat-form-field-appearance-outline{width:100%}::ng-deep .sd-select-panel .mat-option.sd-filtered-input mat-pseudo-checkbox{display:none}::ng-deep .mat-select-panel .mat-option.sd-filtered-input{height:auto}::ng-deep .sd-select-panel .mat-option.sd-filtered-input input{color:#000}::ng-deep .sd-select-panel .mat-option.sd-filtered-input .mat-form-field-prefix .mat-icon{margin-right:0}::ng-deep .sd-select-panel .mat-option.sd-filtered-input .mat-form-field.mat-form-field-appearance-outline .mat-form-field-wrapper{padding:10px 0}::ng-deep .sd-select-panel .mat-option.sd-filtered-input .mat-form-field.mat-form-field-appearance-outline .mat-form-field-wrapper .mat-form-field-outline{background-color:rgba(0,0,0,.04)}"]
770
+ styles: [":host{display:block;padding-top:5px}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline .mat-select-arrow-wrapper{transform:none}:host ::ng-deep .sd-selected .mat-select-arrow{border:none}:host ::ng-deep .mat-form-field.no-padding-wrapper .mat-form-field-wrapper{padding-bottom:0}:host ::ng-deep .mat-form-field.mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{background:#f6f6f6;color:#e9e9e9}:host ::ng-deep .mat-form-field mat-select.mat-select-disabled .mat-select-value{color:#4d4d4d!important}:host ::ng-deep .mat-form-field .mat-placeholder-required{color:#f82c13}.sd-view:not(.c-focused):not(.c-disabled):hover{background-color:#ebecf0}::ng-deep .sd-select-panel .mat-option.sd-filtered-input{background-color:#fff;position:-webkit-sticky;position:sticky;top:0;z-index:10}::ng-deep .sd-select-panel .mat-option.sd-filtered-input .mat-form-field.mat-form-field-appearance-outline{width:100%}::ng-deep .sd-select-panel .mat-option.sd-filtered-input mat-pseudo-checkbox{display:none}::ng-deep .mat-select-panel .mat-option.sd-filtered-input{height:auto}::ng-deep .sd-select-panel .mat-option.sd-filtered-input input{color:#000}::ng-deep .sd-select-panel .mat-option.sd-filtered-input .mat-form-field-prefix .mat-icon{margin-right:0}::ng-deep .sd-select-panel .mat-option.sd-filtered-input .mat-form-field.mat-form-field-appearance-outline .mat-form-field-wrapper{padding:10px 0}::ng-deep .sd-select-panel .mat-option.sd-filtered-input .mat-form-field.mat-form-field-appearance-outline .mat-form-field-wrapper .mat-form-field-outline{background-color:rgba(0,0,0,.04)}"]
749
771
  },] }
750
772
  ];
751
773
  SdSelect.ctorParameters = function () { return [
@@ -775,7 +797,8 @@
775
797
  _selectAll: [{ type: core.Input, args: ['selectAll',] }],
776
798
  modelChange: [{ type: core.Output }],
777
799
  sdChange: [{ type: core.Output }],
778
- sdSelection: [{ type: core.Output }]
800
+ sdSelection: [{ type: core.Output }],
801
+ sdView: [{ type: core.ContentChild, args: [common.SdViewDefDirective,] }]
779
802
  };
780
803
 
781
804
  var SdSelectModule = /** @class */ (function () {
@@ -796,7 +819,8 @@
796
819
  select.MatSelectModule,
797
820
  progressSpinner.MatProgressSpinnerModule,
798
821
  checkbox.MatCheckboxModule,
799
- translate.SdTranslateModule
822
+ translate.SdTranslateModule,
823
+ common.SdCommonModule
800
824
  ],
801
825
  declarations: [
802
826
  SdSelect,
@@ -804,7 +828,8 @@
804
828
  ],
805
829
  exports: [
806
830
  SdSelect,
807
- SdSelectDisplayDefDirective
831
+ SdSelectDisplayDefDirective,
832
+ common.SdCommonModule
808
833
  ],
809
834
  providers: []
810
835
  },] }