@sd-angular/core 0.0.1006 → 0.0.1010

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 (303) 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.map +1 -1
  7. package/bundles/sd-angular-core-api.umd.min.js.map +1 -1
  8. package/bundles/sd-angular-core-autocomplete.umd.js +121 -117
  9. package/bundles/sd-angular-core-autocomplete.umd.js.map +1 -1
  10. package/bundles/sd-angular-core-autocomplete.umd.min.js +2 -2
  11. package/bundles/sd-angular-core-autocomplete.umd.min.js.map +1 -1
  12. package/bundles/sd-angular-core-cache.umd.js +4 -4
  13. package/bundles/sd-angular-core-cache.umd.js.map +1 -1
  14. package/bundles/sd-angular-core-cache.umd.min.js +2 -2
  15. package/bundles/sd-angular-core-cache.umd.min.js.map +1 -1
  16. package/bundles/sd-angular-core-chart.umd.js +4 -8
  17. package/bundles/sd-angular-core-chart.umd.js.map +1 -1
  18. package/bundles/sd-angular-core-chart.umd.min.js +1 -1
  19. package/bundles/sd-angular-core-chart.umd.min.js.map +1 -1
  20. package/bundles/sd-angular-core-common.umd.js +378 -4
  21. package/bundles/sd-angular-core-common.umd.js.map +1 -1
  22. package/bundles/sd-angular-core-common.umd.min.js +2 -2
  23. package/bundles/sd-angular-core-common.umd.min.js.map +1 -1
  24. package/bundles/sd-angular-core-date-range.umd.js +4 -4
  25. package/bundles/sd-angular-core-date-range.umd.js.map +1 -1
  26. package/bundles/sd-angular-core-date-range.umd.min.js +2 -2
  27. package/bundles/sd-angular-core-date-range.umd.min.js.map +1 -1
  28. package/bundles/sd-angular-core-date-time.umd.js +57 -35
  29. package/bundles/sd-angular-core-date-time.umd.js.map +1 -1
  30. package/bundles/sd-angular-core-date-time.umd.min.js +2 -2
  31. package/bundles/sd-angular-core-date-time.umd.min.js.map +1 -1
  32. package/bundles/sd-angular-core-export.umd.js +4 -4
  33. package/bundles/sd-angular-core-export.umd.js.map +1 -1
  34. package/bundles/sd-angular-core-export.umd.min.js +1 -1
  35. package/bundles/sd-angular-core-export.umd.min.js.map +1 -1
  36. package/bundles/sd-angular-core-form.umd.js +4 -4
  37. package/bundles/sd-angular-core-form.umd.min.js +1 -1
  38. package/bundles/sd-angular-core-form.umd.min.js.map +1 -1
  39. package/bundles/sd-angular-core-grid-material.umd.js +32 -70
  40. package/bundles/sd-angular-core-grid-material.umd.js.map +1 -1
  41. package/bundles/sd-angular-core-grid-material.umd.min.js +2 -2
  42. package/bundles/sd-angular-core-grid-material.umd.min.js.map +1 -1
  43. package/bundles/sd-angular-core-grid.umd.js +5 -4
  44. package/bundles/sd-angular-core-grid.umd.js.map +1 -1
  45. package/bundles/sd-angular-core-grid.umd.min.js +1 -1
  46. package/bundles/sd-angular-core-grid.umd.min.js.map +1 -1
  47. package/bundles/sd-angular-core-input-upload-file.umd.js +4 -4
  48. package/bundles/sd-angular-core-input-upload-file.umd.js.map +1 -1
  49. package/bundles/sd-angular-core-input-upload-file.umd.min.js +2 -2
  50. package/bundles/sd-angular-core-input-upload-file.umd.min.js.map +1 -1
  51. package/bundles/sd-angular-core-input.umd.js +35 -17
  52. package/bundles/sd-angular-core-input.umd.js.map +1 -1
  53. package/bundles/sd-angular-core-input.umd.min.js +2 -2
  54. package/bundles/sd-angular-core-input.umd.min.js.map +1 -1
  55. package/bundles/sd-angular-core-modal.umd.js +4 -4
  56. package/bundles/sd-angular-core-modal.umd.js.map +1 -1
  57. package/bundles/sd-angular-core-modal.umd.min.js +1 -1
  58. package/bundles/sd-angular-core-modal.umd.min.js.map +1 -1
  59. package/bundles/sd-angular-core-radio.umd.js +4 -8
  60. package/bundles/sd-angular-core-radio.umd.js.map +1 -1
  61. package/bundles/sd-angular-core-radio.umd.min.js +2 -2
  62. package/bundles/sd-angular-core-radio.umd.min.js.map +1 -1
  63. package/bundles/sd-angular-core-select-editor.umd.js +4 -4
  64. package/bundles/sd-angular-core-select-editor.umd.js.map +1 -1
  65. package/bundles/sd-angular-core-select-editor.umd.min.js +2 -2
  66. package/bundles/sd-angular-core-select-editor.umd.min.js.map +1 -1
  67. package/bundles/sd-angular-core-select.umd.js +116 -129
  68. package/bundles/sd-angular-core-select.umd.js.map +1 -1
  69. package/bundles/sd-angular-core-select.umd.min.js +2 -2
  70. package/bundles/sd-angular-core-select.umd.min.js.map +1 -1
  71. package/bundles/sd-angular-core-service.umd.js +8 -202
  72. package/bundles/sd-angular-core-service.umd.js.map +1 -1
  73. package/bundles/sd-angular-core-service.umd.min.js +1 -1
  74. package/bundles/sd-angular-core-service.umd.min.js.map +1 -1
  75. package/bundles/sd-angular-core-side-drawer.umd.js +4 -4
  76. package/bundles/sd-angular-core-side-drawer.umd.js.map +1 -1
  77. package/bundles/sd-angular-core-side-drawer.umd.min.js +2 -2
  78. package/bundles/sd-angular-core-side-drawer.umd.min.js.map +1 -1
  79. package/bundles/sd-angular-core-time.umd.js +4 -4
  80. package/bundles/sd-angular-core-time.umd.js.map +1 -1
  81. package/bundles/sd-angular-core-time.umd.min.js +2 -2
  82. package/bundles/sd-angular-core-time.umd.min.js.map +1 -1
  83. package/bundles/sd-angular-core-upload-excel.umd.js +4 -4
  84. package/bundles/sd-angular-core-upload-excel.umd.js.map +1 -1
  85. package/bundles/sd-angular-core-upload-excel.umd.min.js +1 -1
  86. package/bundles/sd-angular-core-upload-excel.umd.min.js.map +1 -1
  87. package/bundles/sd-angular-core-upload-file.umd.js +4 -4
  88. package/bundles/sd-angular-core-upload-file.umd.js.map +1 -1
  89. package/bundles/sd-angular-core-upload-file.umd.min.js +2 -2
  90. package/bundles/sd-angular-core-upload-file.umd.min.js.map +1 -1
  91. package/bundles/sd-angular-core-utility.umd.js +4 -4
  92. package/bundles/sd-angular-core-utility.umd.js.map +1 -1
  93. package/bundles/sd-angular-core-utility.umd.min.js +1 -1
  94. package/bundles/sd-angular-core-utility.umd.min.js.map +1 -1
  95. package/bundles/sd-angular-core.umd.js +4 -8
  96. package/bundles/sd-angular-core.umd.js.map +1 -1
  97. package/bundles/sd-angular-core.umd.min.js +1 -1
  98. package/bundles/sd-angular-core.umd.min.js.map +1 -1
  99. package/cache/sd-angular-core-cache.metadata.json +1 -1
  100. package/cache/src/lib/cache.service.d.ts +0 -1
  101. package/cache/src/public-api.d.ts +1 -0
  102. package/chart/sd-angular-core-chart.metadata.json +1 -1
  103. package/chart/src/lib/chart.component.d.ts +0 -1
  104. package/chart/src/public-api.d.ts +1 -0
  105. package/common/sd-angular-core-common.metadata.json +1 -1
  106. package/common/src/lib/common.module.d.ts +2 -0
  107. package/{grid-material → common}/src/lib/directives/sd-let.directive.d.ts +0 -0
  108. package/common/src/lib/directives/view-def.directive.d.ts +5 -0
  109. package/common/src/lib/typings/array.extension.d.ts +20 -0
  110. package/{service → common}/src/lib/typings/date.extension.d.ts +0 -0
  111. package/{service → common}/src/lib/typings/number.extension.d.ts +0 -0
  112. package/{typing/src/lib/typing → common/src/lib/typings}/string.extension.d.ts +2 -0
  113. package/common/src/public-api.d.ts +7 -0
  114. package/date-range/index.d.ts +0 -1
  115. package/date-range/sd-angular-core-date-range.metadata.json +1 -1
  116. package/date-range/src/lib/date-range.component.d.ts +0 -1
  117. package/date-range/src/lib/date-range.module.d.ts +0 -1
  118. package/date-range/src/public-api.d.ts +1 -1
  119. package/date-time/sd-angular-core-date-time.metadata.json +1 -1
  120. package/date-time/src/lib/date-time.component.d.ts +14 -7
  121. package/date-time/src/lib/date-time.module.d.ts +0 -1
  122. package/date-time/src/public-api.d.ts +0 -1
  123. package/esm2015/api/src/lib/token.service.js +1 -1
  124. package/esm2015/autocomplete/src/lib/autocomplete.component.js +111 -89
  125. package/esm2015/autocomplete/src/lib/autocomplete.module.js +6 -4
  126. package/esm2015/cache/src/lib/cache.service.js +1 -2
  127. package/esm2015/cache/src/public-api.js +2 -1
  128. package/esm2015/chart/src/lib/chart.component.js +1 -2
  129. package/esm2015/chart/src/public-api.js +2 -4
  130. package/esm2015/common/src/lib/common.module.js +24 -0
  131. package/esm2015/common/src/lib/directives/sd-let.directive.js +29 -0
  132. package/esm2015/common/src/lib/directives/view-def.directive.js +16 -0
  133. package/esm2015/common/src/lib/typings/array.extension.js +65 -0
  134. package/esm2015/common/src/lib/typings/date.extension.js +143 -0
  135. package/esm2015/common/src/lib/typings/number.extension.js +33 -0
  136. package/esm2015/common/src/lib/typings/string.extension.js +42 -0
  137. package/esm2015/common/src/public-api.js +8 -1
  138. package/esm2015/date-range/index.js +1 -2
  139. package/esm2015/date-range/src/lib/date-range.component.js +1 -2
  140. package/esm2015/date-range/src/lib/date-range.module.js +1 -2
  141. package/esm2015/date-range/src/public-api.js +2 -2
  142. package/esm2015/date-time/src/lib/date-time.component.js +55 -35
  143. package/esm2015/date-time/src/lib/date-time.module.js +5 -3
  144. package/esm2015/date-time/src/public-api.js +1 -2
  145. package/esm2015/export/src/lib/export.service.js +1 -2
  146. package/esm2015/form/src/public-api.js +2 -1
  147. package/esm2015/grid/src/lib/components/grid-date-picker-control/grid-date-picker-control.component.js +1 -2
  148. package/esm2015/grid/src/lib/grid.module.js +1 -2
  149. package/esm2015/grid/src/lib/models/handler-dotnet.js +1 -2
  150. package/esm2015/grid-material/sd-angular-core-grid-material.js +27 -28
  151. package/esm2015/grid-material/src/lib/grid-material.module.js +4 -5
  152. package/esm2015/grid-material/src/public-api.js +2 -4
  153. package/esm2015/input/src/lib/input.component.js +26 -6
  154. package/esm2015/input/src/lib/input.module.js +6 -3
  155. package/esm2015/input-upload-file/src/lib/input-upload-file.component.js +2 -2
  156. package/esm2015/input-upload-file/src/lib/input-upload-file.module.js +1 -2
  157. package/esm2015/lib/controls/date-picker-control/date-picker-control.component.js +1 -2
  158. package/esm2015/lib/pipes/sd-date.pipe.js +1 -2
  159. package/esm2015/modal/src/lib/modal.module.js +1 -2
  160. package/esm2015/public-api.js +11 -14
  161. package/esm2015/radio/src/lib/radio.module.js +1 -2
  162. package/esm2015/radio/src/public-api.js +2 -4
  163. package/esm2015/select/src/lib/select.component.js +78 -100
  164. package/esm2015/select/src/lib/select.module.js +6 -4
  165. package/esm2015/select-editor/src/lib/select-editor.module.js +1 -2
  166. package/esm2015/service/src/lib/service.module.js +6 -4
  167. package/esm2015/service/src/public-api.js +2 -2
  168. package/esm2015/side-drawer/src/lib/side-drawer.module.js +1 -2
  169. package/esm2015/time/src/lib/time.component.js +1 -2
  170. package/esm2015/time/src/public-api.js +2 -1
  171. package/esm2015/upload-excel/src/lib/upload-excel.component.js +1 -2
  172. package/esm2015/upload-excel/src/lib/upload-excel.module.js +1 -2
  173. package/esm2015/upload-file/src/lib/upload-file.module.js +1 -2
  174. package/esm2015/utility/src/lib/pipes/currency.pipe.js +1 -2
  175. package/esm2015/utility/src/lib/pipes/time-different.pipe.js +1 -2
  176. package/esm2015/utility/src/lib/utility.service.js +1 -2
  177. package/esm2015/utility/src/public-api.js +2 -1
  178. package/export/sd-angular-core-export.metadata.json +1 -1
  179. package/export/src/lib/export.service.d.ts +0 -1
  180. package/fesm2015/sd-angular-core-api.js.map +1 -1
  181. package/fesm2015/sd-angular-core-autocomplete.js +114 -91
  182. package/fesm2015/sd-angular-core-autocomplete.js.map +1 -1
  183. package/fesm2015/sd-angular-core-cache.js +1 -1
  184. package/fesm2015/sd-angular-core-cache.js.map +1 -1
  185. package/fesm2015/sd-angular-core-chart.js +1 -5
  186. package/fesm2015/sd-angular-core-chart.js.map +1 -1
  187. package/fesm2015/sd-angular-core-common.js +346 -2
  188. package/fesm2015/sd-angular-core-common.js.map +1 -1
  189. package/fesm2015/sd-angular-core-date-range.js +1 -1
  190. package/fesm2015/sd-angular-core-date-range.js.map +1 -1
  191. package/fesm2015/sd-angular-core-date-time.js +57 -36
  192. package/fesm2015/sd-angular-core-date-time.js.map +1 -1
  193. package/fesm2015/sd-angular-core-export.js +0 -1
  194. package/fesm2015/sd-angular-core-export.js.map +1 -1
  195. package/fesm2015/sd-angular-core-form.js +1 -0
  196. package/fesm2015/sd-angular-core-form.js.map +1 -1
  197. package/fesm2015/sd-angular-core-grid-material.js +5 -37
  198. package/fesm2015/sd-angular-core-grid-material.js.map +1 -1
  199. package/fesm2015/sd-angular-core-grid.js +1 -1
  200. package/fesm2015/sd-angular-core-grid.js.map +1 -1
  201. package/fesm2015/sd-angular-core-input-upload-file.js +0 -1
  202. package/fesm2015/sd-angular-core-input-upload-file.js.map +1 -1
  203. package/fesm2015/sd-angular-core-input.js +29 -8
  204. package/fesm2015/sd-angular-core-input.js.map +1 -1
  205. package/fesm2015/sd-angular-core-modal.js +0 -1
  206. package/fesm2015/sd-angular-core-modal.js.map +1 -1
  207. package/fesm2015/sd-angular-core-radio.js +1 -5
  208. package/fesm2015/sd-angular-core-radio.js.map +1 -1
  209. package/fesm2015/sd-angular-core-select-editor.js +0 -1
  210. package/fesm2015/sd-angular-core-select-editor.js.map +1 -1
  211. package/fesm2015/sd-angular-core-select.js +81 -102
  212. package/fesm2015/sd-angular-core-select.js.map +1 -1
  213. package/fesm2015/sd-angular-core-service.js +5 -198
  214. package/fesm2015/sd-angular-core-service.js.map +1 -1
  215. package/fesm2015/sd-angular-core-side-drawer.js +0 -1
  216. package/fesm2015/sd-angular-core-side-drawer.js.map +1 -1
  217. package/fesm2015/sd-angular-core-time.js +1 -1
  218. package/fesm2015/sd-angular-core-time.js.map +1 -1
  219. package/fesm2015/sd-angular-core-upload-excel.js +0 -1
  220. package/fesm2015/sd-angular-core-upload-excel.js.map +1 -1
  221. package/fesm2015/sd-angular-core-upload-file.js +0 -1
  222. package/fesm2015/sd-angular-core-upload-file.js.map +1 -1
  223. package/fesm2015/sd-angular-core-utility.js +1 -1
  224. package/fesm2015/sd-angular-core-utility.js.map +1 -1
  225. package/fesm2015/sd-angular-core.js +15 -20
  226. package/fesm2015/sd-angular-core.js.map +1 -1
  227. package/form/src/public-api.d.ts +1 -0
  228. package/grid/sd-angular-core-grid.metadata.json +1 -1
  229. package/grid/src/lib/components/grid-date-picker-control/grid-date-picker-control.component.d.ts +0 -1
  230. package/grid/src/lib/grid.module.d.ts +0 -1
  231. package/grid/src/lib/models/handler-dotnet.d.ts +0 -1
  232. package/grid-material/sd-angular-core-grid-material.d.ts +26 -27
  233. package/grid-material/sd-angular-core-grid-material.metadata.json +1 -1
  234. package/grid-material/src/lib/grid-material.module.d.ts +0 -1
  235. package/grid-material/src/public-api.d.ts +1 -0
  236. package/input/sd-angular-core-input.metadata.json +1 -1
  237. package/input/src/lib/input.component.d.ts +5 -0
  238. package/input-upload-file/sd-angular-core-input-upload-file.metadata.json +1 -1
  239. package/input-upload-file/src/lib/input-upload-file.module.d.ts +0 -1
  240. package/lib/controls/date-picker-control/date-picker-control.component.d.ts +0 -1
  241. package/lib/pipes/sd-date.pipe.d.ts +0 -1
  242. package/modal/sd-angular-core-modal.metadata.json +1 -1
  243. package/modal/src/lib/modal.module.d.ts +0 -1
  244. package/package.json +1 -1
  245. package/public-api.d.ts +10 -10
  246. package/radio/sd-angular-core-radio.metadata.json +1 -1
  247. package/radio/src/lib/radio.module.d.ts +0 -1
  248. package/radio/src/public-api.d.ts +1 -0
  249. package/{sd-angular-core-0.0.1006.tgz → sd-angular-core-0.0.1010.tgz} +0 -0
  250. package/sd-angular-core.metadata.json +1 -1
  251. package/select/sd-angular-core-select.metadata.json +1 -1
  252. package/select/src/lib/select.component.d.ts +12 -5
  253. package/select/src/lib/select.module.d.ts +0 -1
  254. package/select-editor/sd-angular-core-select-editor.metadata.json +1 -1
  255. package/select-editor/src/lib/select-editor.module.d.ts +0 -1
  256. package/service/sd-angular-core-service.metadata.json +1 -1
  257. package/service/src/lib/service.module.d.ts +0 -1
  258. package/service/src/public-api.d.ts +1 -1
  259. package/side-drawer/sd-angular-core-side-drawer.metadata.json +1 -1
  260. package/side-drawer/src/lib/side-drawer.module.d.ts +0 -1
  261. package/time/sd-angular-core-time.metadata.json +1 -1
  262. package/time/src/lib/time.component.d.ts +0 -1
  263. package/time/src/public-api.d.ts +1 -0
  264. package/upload-excel/sd-angular-core-upload-excel.metadata.json +1 -1
  265. package/upload-excel/src/lib/upload-excel.component.d.ts +0 -1
  266. package/upload-excel/src/lib/upload-excel.module.d.ts +0 -1
  267. package/upload-file/sd-angular-core-upload-file.metadata.json +1 -1
  268. package/upload-file/src/lib/upload-file.module.d.ts +0 -1
  269. package/utility/sd-angular-core-utility.metadata.json +1 -1
  270. package/utility/src/lib/pipes/currency.pipe.d.ts +0 -1
  271. package/utility/src/lib/pipes/time-different.pipe.d.ts +0 -1
  272. package/utility/src/lib/utility.service.d.ts +0 -1
  273. package/utility/src/public-api.d.ts +1 -0
  274. package/bundles/sd-angular-core-typing.umd.js +0 -226
  275. package/bundles/sd-angular-core-typing.umd.js.map +0 -1
  276. package/bundles/sd-angular-core-typing.umd.min.js +0 -2
  277. package/bundles/sd-angular-core-typing.umd.min.js.map +0 -1
  278. package/esm2015/grid-material/src/lib/directives/sd-let.directive.js +0 -29
  279. package/esm2015/service/src/lib/typings/date.extension.js +0 -143
  280. package/esm2015/service/src/lib/typings/index.js +0 -4
  281. package/esm2015/service/src/lib/typings/number.extension.js +0 -33
  282. package/esm2015/service/src/lib/typings/string.extension.js +0 -23
  283. package/esm2015/typing/index.js +0 -2
  284. package/esm2015/typing/sd-angular-core-typing.js +0 -5
  285. package/esm2015/typing/src/lib/typing/date.extension.js +0 -143
  286. package/esm2015/typing/src/lib/typing/index.js +0 -4
  287. package/esm2015/typing/src/lib/typing/number.extension.js +0 -33
  288. package/esm2015/typing/src/lib/typing/string.extension.js +0 -23
  289. package/esm2015/typing/src/lib/typing.service.js +0 -13
  290. package/esm2015/typing/src/public-api.js +0 -3
  291. package/fesm2015/sd-angular-core-typing.js +0 -215
  292. package/fesm2015/sd-angular-core-typing.js.map +0 -1
  293. package/service/src/lib/typings/index.d.ts +0 -3
  294. package/service/src/lib/typings/string.extension.d.ts +0 -8
  295. package/typing/index.d.ts +0 -1
  296. package/typing/package.json +0 -12
  297. package/typing/sd-angular-core-typing.d.ts +0 -4
  298. package/typing/sd-angular-core-typing.metadata.json +0 -1
  299. package/typing/src/lib/typing/date.extension.d.ts +0 -24
  300. package/typing/src/lib/typing/index.d.ts +0 -3
  301. package/typing/src/lib/typing/number.extension.d.ts +0 -9
  302. package/typing/src/lib/typing.service.d.ts +0 -3
  303. 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.
@@ -337,7 +337,7 @@
337
337
  { type: core.TemplateRef }
338
338
  ]; };
339
339
 
340
- 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;
341
341
  var SdSelect = /** @class */ (function () {
342
342
  function SdSelect(ref, utilityService) {
343
343
  var _this = this;
@@ -351,8 +351,6 @@
351
351
  _form.set(this, void 0);
352
352
  // Items
353
353
  _items.set(this, []);
354
- _currentItems.set(this, []);
355
- _allItem.set(this, {});
356
354
  // Server search
357
355
  this.loading = false;
358
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
@@ -363,12 +361,15 @@
363
361
  this.limit = 100;
364
362
  this.filtered = false;
365
363
  this.selectAll = false;
366
- _allItems.set(this, void 0);
367
- this.allSelected = false;
368
364
  this.modelChange = new core.EventEmitter();
369
365
  this.sdChange = new core.EventEmitter();
370
366
  this.sdSelection = new core.EventEmitter();
371
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;
372
373
  _updateValidator.set(this, function () {
373
374
  _this.formControl.clearValidators();
374
375
  _this.formControl.clearAsyncValidators();
@@ -384,23 +385,36 @@
384
385
  _this.formControl.setAsyncValidators(asyncValidators);
385
386
  _this.formControl.updateValueAndValidity();
386
387
  });
387
- _search.set(this, function (value, items) { return __awaiter(_this, void 0, void 0, function () {
388
- var results;
388
+ _loadSelectedItems.set(this, function (value, items) { return __awaiter(_this, void 0, void 0, function () {
389
+ var values, results, objItem;
389
390
  var _this = this;
390
391
  return __generator(this, function (_c) {
391
392
  switch (_c.label) {
392
- 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; })];
393
404
  case 1:
394
405
  results = _c.sent();
395
- if (Array.isArray(value)) {
396
- return [2 /*return*/, results.filter(function (e) { return !!e && (value.includes(e) || value.includes(e[_this.valueField])); })];
397
- }
398
- 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]; })];
399
413
  }
400
414
  });
401
415
  }); });
402
416
  _loadItems.set(this, function (searchText, items) { return __awaiter(_this, void 0, void 0, function () {
403
- var _a, results, objItem, values;
417
+ var results, objItem, selectedItems;
404
418
  var _this = this;
405
419
  return __generator(this, function (_c) {
406
420
  switch (_c.label) {
@@ -409,32 +423,14 @@
409
423
  return [4 /*yield*/, items(searchText).finally(function () { return _this.loading = false; })];
410
424
  case 1:
411
425
  results = _c.sent();
412
- 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; });
413
- Object.assign(__classPrivateFieldGet(this, _allItem), objItem);
414
- if (!((_a = this.formControl.value) === null || _a === void 0 ? void 0 : _a.toString())) {
415
- return [2 /*return*/, results];
416
- }
417
- values = Array.isArray(this.formControl.value) ? this.formControl.value : [this.formControl.value];
418
- values.map(function (val) { return val === null || val === void 0 ? void 0 : val.toString(); }).forEach(function (val) {
419
- var _c;
420
- if (!objItem[val]) {
421
- if (__classPrivateFieldGet(_this, _allItem)[val]) {
422
- results.push(__classPrivateFieldGet(_this, _allItem)[val]);
423
- }
424
- else {
425
- if (_this.valueField && _this.displayField) {
426
- results.push((_c = {},
427
- _c[_this.valueField] = val,
428
- _c[_this.displayField] = val,
429
- _c));
430
- }
431
- else {
432
- results.push(val);
433
- }
434
- }
435
- }
436
- });
437
- return [2 /*return*/, results];
426
+ objItem = Array.toObject(results, this.valueField);
427
+ __classPrivateFieldSet(this, _allItem, Object.assign(Object.assign({}, __classPrivateFieldGet(this, _allItem)), objItem));
428
+ if (!this.multiple) return [3 /*break*/, 3];
429
+ return [4 /*yield*/, __classPrivateFieldGet(this, _loadSelectedItems).call(this, this.formControl.value, items)];
430
+ case 2:
431
+ selectedItems = _c.sent();
432
+ return [2 /*return*/, __spread(selectedItems, results).union(this.valueField)];
433
+ case 3: return [2 /*return*/, results.union(this.valueField)];
438
434
  }
439
435
  });
440
436
  }); });
@@ -454,13 +450,12 @@
454
450
  _this.formControl.updateValueAndValidity({ emitEvent: true });
455
451
  };
456
452
  _onChange.set(this, function (value) {
457
- var _a, _b;
458
453
  if (Array.isArray(value)) {
459
454
  _this.modelChange.emit(value);
460
455
  _this.sdChange.emit(value);
461
456
  _this.sdSelection.emit({
462
457
  value: value,
463
- 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]); }); })
458
+ items: _this.selectedItems
464
459
  });
465
460
  }
466
461
  else {
@@ -468,7 +463,7 @@
468
463
  _this.sdChange.emit(value);
469
464
  _this.sdSelection.emit({
470
465
  value: value,
471
- 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]); })
466
+ item: _this.selectedItems[0]
472
467
  });
473
468
  }
474
469
  });
@@ -493,6 +488,22 @@
493
488
  });
494
489
  }
495
490
  };
491
+ this.onClick = function () {
492
+ var _a;
493
+ if ((_a = _this.sdView) === null || _a === void 0 ? void 0 : _a.templateRef) {
494
+ if (!_this.formControl.disabled && !_this.isFocused) {
495
+ _this.focus();
496
+ }
497
+ }
498
+ };
499
+ this.focus = function () {
500
+ _this.isFocused = true;
501
+ setTimeout(function () {
502
+ var _a, _b;
503
+ (_a = _this.select) === null || _a === void 0 ? void 0 : _a.focus();
504
+ (_b = _this.select) === null || _b === void 0 ? void 0 : _b.open();
505
+ }, 100);
506
+ };
496
507
  _customValidator.set(this, function (func) {
497
508
  return function (c) { return __awaiter(_this, void 0, void 0, function () {
498
509
  var value, result, message;
@@ -526,11 +537,15 @@
526
537
  });
527
538
  this.onOpenChange = function (isOpened) {
528
539
  if (isOpened) {
540
+ _this.isFocused = true;
529
541
  if (__classPrivateFieldGet(_this, _input)) {
530
542
  __classPrivateFieldGet(_this, _input).value = null;
531
543
  }
532
544
  _this.searchTerm$.next('');
533
545
  }
546
+ else {
547
+ _this.isFocused = false;
548
+ }
534
549
  };
535
550
  }
536
551
  Object.defineProperty(SdSelect.prototype, "input", {
@@ -576,20 +591,7 @@
576
591
  });
577
592
  Object.defineProperty(SdSelect.prototype, "model", {
578
593
  set: function (value) {
579
- // this.#model = value;
580
- // if (Array.isArray(value)) {
581
- // this.formControl.setValue(value.map(val => (val ?? '') + ''));
582
- // } else {
583
- // this.formControl.setValue((value ?? '') + '');
584
- // }
585
- // this.ref.detectChanges();
586
- // this.#model = value;
587
- if (Array.isArray(value)) {
588
- this.formControl.setValue(value);
589
- }
590
- else {
591
- this.formControl.setValue(value);
592
- }
594
+ this.formControl.setValue(value);
593
595
  },
594
596
  enumerable: false,
595
597
  configurable: true
@@ -666,75 +668,57 @@
666
668
  __classPrivateFieldGet(this, _subscription).add(this.formControl.touchedChanges.subscribe(function () {
667
669
  _this.ref.markForCheck();
668
670
  }));
669
- __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 () {
670
- var changeAliasLowerCase, searchText, formValue, isArray, hasFields;
671
- var _this = this;
672
- return __generator(this, function (_c) {
673
- switch (_c.label) {
674
- case 0:
675
- if (!(typeof (__classPrivateFieldGet(this, _items)) === 'function')) return [3 /*break*/, 2];
676
- return [4 /*yield*/, __classPrivateFieldGet(this, _loadItems).call(this, val, __classPrivateFieldGet(this, _items))];
677
- case 1: return [2 /*return*/, _c.sent()];
678
- case 2:
679
- changeAliasLowerCase = this.utilityService.changeAliasLowerCase;
680
- searchText = changeAliasLowerCase(val);
681
- formValue = this.formControl.value;
682
- isArray = Array.isArray(formValue);
683
- hasFields = !!this.valueField && !!this.displayField;
684
- return [2 /*return*/, __classPrivateFieldGet(this, _items).filter(function (item) {
685
- var value = hasFields ? item[_this.valueField] : item;
686
- var display = hasFields ? item[_this.displayField] : item;
687
- if (changeAliasLowerCase(value).includes(searchText) || changeAliasLowerCase(display).includes(searchText)) {
688
- return true;
689
- }
690
- if (isArray) {
691
- return formValue.some(function (e) { return e === value; });
692
- }
693
- return formValue === value;
694
- }).sort(function (a, b) {
695
- if (!_this.multiple) {
696
- return 0;
697
- }
698
- var value1 = hasFields ? a[_this.valueField] : a;
699
- var value2 = hasFields ? b[_this.valueField] : b;
700
- if (isArray) {
701
- var t1_1 = formValue.some(function (e) { return e === value1; });
702
- var t2_1 = formValue.some(function (e) { return e === value2; });
703
- if (t1_1 && !t2_1) {
704
- return -1;
671
+ __classPrivateFieldSet(this, _allItems, rxjs.combineLatest([
672
+ this.searchTerm$.asObservable().pipe(operators.startWith(''), operators.debounceTime(typeof (__classPrivateFieldGet(this, _items)) === 'function' ? __classPrivateFieldGet(this, _delay) : 0)),
673
+ this.formControl.valueChanges.pipe(operators.startWith(this.formControl.value))
674
+ ]).pipe(operators.switchMap(function (_c) {
675
+ var _d = __read(_c, 2), val = _d[0], formValue = _d[1];
676
+ return __awaiter(_this, void 0, void 0, function () {
677
+ var isArray, hasFields;
678
+ var _this = this;
679
+ return __generator(this, function (_c) {
680
+ switch (_c.label) {
681
+ case 0:
682
+ if (!(typeof (__classPrivateFieldGet(this, _items)) === 'function')) return [3 /*break*/, 2];
683
+ return [4 /*yield*/, __classPrivateFieldGet(this, _loadItems).call(this, val, __classPrivateFieldGet(this, _items))];
684
+ case 1: return [2 /*return*/, _c.sent()];
685
+ case 2:
686
+ isArray = Array.isArray(formValue);
687
+ hasFields = !!this.valueField && !!this.displayField;
688
+ return [2 /*return*/, __classPrivateFieldGet(this, _items).filter(function (item) {
689
+ var value = hasFields ? item[_this.valueField] : item;
690
+ var display = hasFields ? item[_this.displayField] : item;
691
+ if (String.aliasIncludes(value, val) || String.aliasIncludes(display, val)) {
692
+ return true;
705
693
  }
706
- if (!t1_1 && t2_1) {
707
- return 1;
694
+ if (isArray) {
695
+ return formValue.some(function (e) { return e === value; });
708
696
  }
709
- return 0;
710
- }
711
- var t1 = formValue === value1;
712
- var t2 = formValue === value2;
713
- if (t1 && !t2) {
714
- return -1;
715
- }
716
- if (!t1 && t2) {
717
- return 1;
718
- }
719
- return 0;
720
- })];
697
+ return formValue === value;
698
+ })];
699
+ }
700
+ });
701
+ });
702
+ })));
703
+ __classPrivateFieldSet(this, _selectedItems, __classPrivateFieldGet(this, _allItems).pipe(operators.map(function (items) {
704
+ var formValue = _this.formControl.value;
705
+ if (!(formValue === null || formValue === void 0 ? void 0 : formValue.toString())) {
706
+ return [];
707
+ }
708
+ var values = Array.isArray(formValue) ? formValue : [formValue];
709
+ _this.selectedItems = values.map(function (val) {
710
+ if (_this.valueField) {
711
+ return items === null || items === void 0 ? void 0 : items.find(function (item) { return item[_this.valueField] === val; });
721
712
  }
713
+ return val;
722
714
  });
723
- }); })));
715
+ return _this.selectedItems;
716
+ })));
724
717
  this.filteredItems = __classPrivateFieldGet(this, _allItems).pipe(operators.map(function (allItems) {
725
- __classPrivateFieldSet(_this, _currentItems, allItems);
726
- return allItems.filter(function (item, index) { return index < _this.limit; });
727
- }));
728
- this.display = rxjs.combineLatest([__classPrivateFieldGet(this, _allItems), this.formControl.valueChanges.pipe(operators.startWith(this.formControl.value))]).pipe(operators.map(function (_c) {
729
- var _d = __read(_c, 2), items = _d[0], formValue = _d[1];
730
- var isArray = Array.isArray(formValue);
731
- if (!_this.valueField || !_this.displayField) {
732
- return isArray ? formValue === null || formValue === void 0 ? void 0 : formValue.join(', ') : formValue;
733
- }
734
- return items.filter(function (e) { return isArray ? formValue.includes(e[_this.valueField]) : formValue === e[_this.valueField]; })
735
- .map(function (e) { var _a; return (_a = e[_this.displayField]) === null || _a === void 0 ? void 0 : _a.toString(); })
736
- .join(', ');
718
+ console.log(allItems);
719
+ return allItems.paging(_this.limit);
737
720
  }));
721
+ 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(', '); }));
738
722
  };
739
723
  SdSelect.prototype.ngAfterViewInit = function () {
740
724
  var _a;
@@ -756,13 +740,13 @@
756
740
  };
757
741
  return SdSelect;
758
742
  }());
759
- _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();
743
+ _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();
760
744
  SdSelect.decorators = [
761
745
  { type: core.Component, args: [{
762
746
  selector: 'sd-select',
763
- 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>",
747
+ 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>",
764
748
  changeDetection: core.ChangeDetectionStrategy.OnPush,
765
- 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)}"]
749
+ 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)}"]
766
750
  },] }
767
751
  ];
768
752
  SdSelect.ctorParameters = function () { return [
@@ -792,7 +776,8 @@
792
776
  _selectAll: [{ type: core.Input, args: ['selectAll',] }],
793
777
  modelChange: [{ type: core.Output }],
794
778
  sdChange: [{ type: core.Output }],
795
- sdSelection: [{ type: core.Output }]
779
+ sdSelection: [{ type: core.Output }],
780
+ sdView: [{ type: core.ContentChild, args: [common.SdViewDefDirective,] }]
796
781
  };
797
782
 
798
783
  var SdSelectModule = /** @class */ (function () {
@@ -813,7 +798,8 @@
813
798
  select.MatSelectModule,
814
799
  progressSpinner.MatProgressSpinnerModule,
815
800
  checkbox.MatCheckboxModule,
816
- translate.SdTranslateModule
801
+ translate.SdTranslateModule,
802
+ common.SdCommonModule
817
803
  ],
818
804
  declarations: [
819
805
  SdSelect,
@@ -821,7 +807,8 @@
821
807
  ],
822
808
  exports: [
823
809
  SdSelect,
824
- SdSelectDisplayDefDirective
810
+ SdSelectDisplayDefDirective,
811
+ common.SdCommonModule
825
812
  ],
826
813
  providers: []
827
814
  },] }