@tectra-ng/ui 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -2
  3. package/amount/README.md +28 -0
  4. package/autocomplete/README.md +82 -0
  5. package/avatar/README.md +43 -0
  6. package/badge/README.md +19 -0
  7. package/button/README.md +46 -0
  8. package/button-group/README.md +8 -0
  9. package/card/README.md +30 -0
  10. package/cascade-select/README.md +49 -0
  11. package/checkbox/README.md +64 -0
  12. package/chip/README.md +38 -0
  13. package/chips-input/README.md +47 -0
  14. package/color-picker/README.md +43 -0
  15. package/confirm/README.md +46 -0
  16. package/country/README.md +23 -0
  17. package/country-select/README.md +39 -0
  18. package/dialog/README.md +84 -0
  19. package/divider/README.md +24 -0
  20. package/drawer/README.md +54 -0
  21. package/email-suggestion/README.md +20 -0
  22. package/fesm2022/tectra-ng-ui-amount.mjs +415 -0
  23. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -0
  24. package/fesm2022/tectra-ng-ui-autocomplete.mjs +730 -0
  25. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-ui-avatar.mjs +670 -0
  27. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-badge.mjs +191 -0
  29. package/fesm2022/tectra-ng-ui-badge.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-ui-button-group.mjs +50 -0
  31. package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-ui-button.mjs +725 -0
  33. package/fesm2022/tectra-ng-ui-button.mjs.map +1 -0
  34. package/fesm2022/tectra-ng-ui-card.mjs +210 -0
  35. package/fesm2022/tectra-ng-ui-card.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-ui-cascade-select.mjs +887 -0
  37. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -0
  38. package/fesm2022/tectra-ng-ui-checkbox.mjs +1150 -0
  39. package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -0
  40. package/fesm2022/tectra-ng-ui-chip.mjs +344 -0
  41. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -0
  42. package/fesm2022/tectra-ng-ui-chips-input.mjs +649 -0
  43. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -0
  44. package/fesm2022/tectra-ng-ui-color-picker.mjs +828 -0
  45. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-ui-confirm.mjs +489 -0
  47. package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-ui-country-select.mjs +545 -0
  49. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -0
  50. package/fesm2022/tectra-ng-ui-country.mjs +313 -0
  51. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -0
  52. package/fesm2022/tectra-ng-ui-dialog.mjs +1539 -0
  53. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -0
  54. package/fesm2022/tectra-ng-ui-divider.mjs +194 -0
  55. package/fesm2022/tectra-ng-ui-divider.mjs.map +1 -0
  56. package/fesm2022/tectra-ng-ui-drawer.mjs +540 -0
  57. package/fesm2022/tectra-ng-ui-drawer.mjs.map +1 -0
  58. package/fesm2022/tectra-ng-ui-email-suggestion.mjs +341 -0
  59. package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -0
  60. package/fesm2022/tectra-ng-ui-field.mjs +492 -0
  61. package/fesm2022/tectra-ng-ui-field.mjs.map +1 -0
  62. package/fesm2022/tectra-ng-ui-fieldset.mjs +258 -0
  63. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -0
  64. package/fesm2022/tectra-ng-ui-highlight-text.mjs +246 -0
  65. package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -0
  66. package/fesm2022/tectra-ng-ui-icon-field.mjs +478 -0
  67. package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -0
  68. package/fesm2022/tectra-ng-ui-input-group.mjs +113 -0
  69. package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -0
  70. package/fesm2022/tectra-ng-ui-input-mask.mjs +413 -0
  71. package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -0
  72. package/fesm2022/tectra-ng-ui-input-number.mjs +1045 -0
  73. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -0
  74. package/fesm2022/tectra-ng-ui-input-otp.mjs +553 -0
  75. package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -0
  76. package/fesm2022/tectra-ng-ui-input.mjs +260 -0
  77. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -0
  78. package/fesm2022/tectra-ng-ui-key-filter.mjs +185 -0
  79. package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -0
  80. package/fesm2022/tectra-ng-ui-knob.mjs +630 -0
  81. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -0
  82. package/fesm2022/tectra-ng-ui-label.mjs +271 -0
  83. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -0
  84. package/fesm2022/tectra-ng-ui-link.mjs +699 -0
  85. package/fesm2022/tectra-ng-ui-link.mjs.map +1 -0
  86. package/fesm2022/tectra-ng-ui-listbox.mjs +484 -0
  87. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -0
  88. package/fesm2022/tectra-ng-ui-mention-textarea.mjs +717 -0
  89. package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -0
  90. package/fesm2022/tectra-ng-ui-menu.mjs +1484 -0
  91. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -0
  92. package/fesm2022/tectra-ng-ui-message.mjs +975 -0
  93. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -0
  94. package/fesm2022/tectra-ng-ui-multiselect.mjs +569 -0
  95. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -0
  96. package/fesm2022/tectra-ng-ui-overlay-badge.mjs +345 -0
  97. package/fesm2022/tectra-ng-ui-overlay-badge.mjs.map +1 -0
  98. package/fesm2022/tectra-ng-ui-paginator.mjs +849 -0
  99. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -0
  100. package/fesm2022/tectra-ng-ui-panel.mjs +317 -0
  101. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -0
  102. package/fesm2022/tectra-ng-ui-password-generator.mjs +292 -0
  103. package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -0
  104. package/fesm2022/tectra-ng-ui-password.mjs +871 -0
  105. package/fesm2022/tectra-ng-ui-password.mjs.map +1 -0
  106. package/fesm2022/tectra-ng-ui-pill.mjs +361 -0
  107. package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -0
  108. package/fesm2022/tectra-ng-ui-popover.mjs +742 -0
  109. package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -0
  110. package/fesm2022/tectra-ng-ui-progress-bar.mjs +440 -0
  111. package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -0
  112. package/fesm2022/tectra-ng-ui-progress-spinner.mjs +265 -0
  113. package/fesm2022/tectra-ng-ui-progress-spinner.mjs.map +1 -0
  114. package/fesm2022/tectra-ng-ui-radio-button.mjs +817 -0
  115. package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -0
  116. package/fesm2022/tectra-ng-ui-rating.mjs +584 -0
  117. package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -0
  118. package/fesm2022/tectra-ng-ui-select.mjs +2478 -0
  119. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -0
  120. package/fesm2022/tectra-ng-ui-skeleton.mjs +548 -0
  121. package/fesm2022/tectra-ng-ui-skeleton.mjs.map +1 -0
  122. package/fesm2022/tectra-ng-ui-slider.mjs +630 -0
  123. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -0
  124. package/fesm2022/tectra-ng-ui-speed-dial.mjs +669 -0
  125. package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -0
  126. package/fesm2022/tectra-ng-ui-split-button.mjs +614 -0
  127. package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -0
  128. package/fesm2022/tectra-ng-ui-status-icon.mjs +295 -0
  129. package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -0
  130. package/fesm2022/tectra-ng-ui-table.mjs +5997 -0
  131. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -0
  132. package/fesm2022/tectra-ng-ui-tag.mjs +422 -0
  133. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -0
  134. package/fesm2022/tectra-ng-ui-textarea.mjs +482 -0
  135. package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -0
  136. package/fesm2022/tectra-ng-ui-toast.mjs +668 -0
  137. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -0
  138. package/fesm2022/tectra-ng-ui-toggle-button.mjs +416 -0
  139. package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -0
  140. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +560 -0
  141. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -0
  142. package/fesm2022/tectra-ng-ui-tooltip.mjs +835 -0
  143. package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -0
  144. package/fesm2022/tectra-ng-ui-tree-select.mjs +986 -0
  145. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -0
  146. package/fesm2022/tectra-ng-ui.mjs +4 -0
  147. package/fesm2022/tectra-ng-ui.mjs.map +1 -0
  148. package/field/README.md +43 -0
  149. package/fieldset/README.md +36 -0
  150. package/highlight-text/README.md +20 -0
  151. package/icon-field/README.md +30 -0
  152. package/input/README.md +22 -0
  153. package/input-group/README.md +21 -0
  154. package/input-mask/README.md +30 -0
  155. package/input-number/README.md +61 -0
  156. package/input-otp/README.md +44 -0
  157. package/key-filter/README.md +31 -0
  158. package/knob/README.md +50 -0
  159. package/label/README.md +29 -0
  160. package/link/README.md +47 -0
  161. package/listbox/README.md +68 -0
  162. package/mention-textarea/README.md +47 -0
  163. package/menu/README.md +65 -0
  164. package/message/README.md +58 -0
  165. package/multiselect/README.md +85 -0
  166. package/overlay-badge/README.md +30 -0
  167. package/package.json +301 -3
  168. package/paginator/README.md +60 -0
  169. package/panel/README.md +45 -0
  170. package/password/README.md +60 -0
  171. package/password-generator/README.md +34 -0
  172. package/pill/README.md +42 -0
  173. package/popover/README.md +67 -0
  174. package/progress-bar/README.md +32 -0
  175. package/progress-spinner/README.md +22 -0
  176. package/radio-button/README.md +54 -0
  177. package/rating/README.md +49 -0
  178. package/select/README.md +78 -0
  179. package/skeleton/README.md +27 -0
  180. package/slider/README.md +48 -0
  181. package/speed-dial/README.md +49 -0
  182. package/split-button/README.md +45 -0
  183. package/status-icon/README.md +22 -0
  184. package/table/README.md +178 -0
  185. package/tag/README.md +42 -0
  186. package/textarea/README.md +37 -0
  187. package/toast/README.md +52 -0
  188. package/toggle-button/README.md +34 -0
  189. package/toggle-switch/README.md +49 -0
  190. package/tooltip/README.md +60 -0
  191. package/tree-select/README.md +49 -0
  192. package/types/tectra-ng-ui-amount.d.ts +135 -0
  193. package/types/tectra-ng-ui-amount.d.ts.map +1 -0
  194. package/types/tectra-ng-ui-autocomplete.d.ts +250 -0
  195. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -0
  196. package/types/tectra-ng-ui-avatar.d.ts +289 -0
  197. package/types/tectra-ng-ui-avatar.d.ts.map +1 -0
  198. package/types/tectra-ng-ui-badge.d.ts +119 -0
  199. package/types/tectra-ng-ui-badge.d.ts.map +1 -0
  200. package/types/tectra-ng-ui-button-group.d.ts +6 -0
  201. package/types/tectra-ng-ui-button-group.d.ts.map +1 -0
  202. package/types/tectra-ng-ui-button.d.ts +466 -0
  203. package/types/tectra-ng-ui-button.d.ts.map +1 -0
  204. package/types/tectra-ng-ui-card.d.ts +71 -0
  205. package/types/tectra-ng-ui-card.d.ts.map +1 -0
  206. package/types/tectra-ng-ui-cascade-select.d.ts +244 -0
  207. package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -0
  208. package/types/tectra-ng-ui-checkbox.d.ts +450 -0
  209. package/types/tectra-ng-ui-checkbox.d.ts.map +1 -0
  210. package/types/tectra-ng-ui-chip.d.ts +106 -0
  211. package/types/tectra-ng-ui-chip.d.ts.map +1 -0
  212. package/types/tectra-ng-ui-chips-input.d.ts +187 -0
  213. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -0
  214. package/types/tectra-ng-ui-color-picker.d.ts +237 -0
  215. package/types/tectra-ng-ui-color-picker.d.ts.map +1 -0
  216. package/types/tectra-ng-ui-confirm.d.ts +80 -0
  217. package/types/tectra-ng-ui-confirm.d.ts.map +1 -0
  218. package/types/tectra-ng-ui-country-select.d.ts +235 -0
  219. package/types/tectra-ng-ui-country-select.d.ts.map +1 -0
  220. package/types/tectra-ng-ui-country.d.ts +105 -0
  221. package/types/tectra-ng-ui-country.d.ts.map +1 -0
  222. package/types/tectra-ng-ui-dialog.d.ts +453 -0
  223. package/types/tectra-ng-ui-dialog.d.ts.map +1 -0
  224. package/types/tectra-ng-ui-divider.d.ts +70 -0
  225. package/types/tectra-ng-ui-divider.d.ts.map +1 -0
  226. package/types/tectra-ng-ui-drawer.d.ts +188 -0
  227. package/types/tectra-ng-ui-drawer.d.ts.map +1 -0
  228. package/types/tectra-ng-ui-email-suggestion.d.ts +84 -0
  229. package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -0
  230. package/types/tectra-ng-ui-field.d.ts +139 -0
  231. package/types/tectra-ng-ui-field.d.ts.map +1 -0
  232. package/types/tectra-ng-ui-fieldset.d.ts +74 -0
  233. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -0
  234. package/types/tectra-ng-ui-highlight-text.d.ts +75 -0
  235. package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -0
  236. package/types/tectra-ng-ui-icon-field.d.ts +77 -0
  237. package/types/tectra-ng-ui-icon-field.d.ts.map +1 -0
  238. package/types/tectra-ng-ui-input-group.d.ts +18 -0
  239. package/types/tectra-ng-ui-input-group.d.ts.map +1 -0
  240. package/types/tectra-ng-ui-input-mask.d.ts +91 -0
  241. package/types/tectra-ng-ui-input-mask.d.ts.map +1 -0
  242. package/types/tectra-ng-ui-input-number.d.ts +326 -0
  243. package/types/tectra-ng-ui-input-number.d.ts.map +1 -0
  244. package/types/tectra-ng-ui-input-otp.d.ts +173 -0
  245. package/types/tectra-ng-ui-input-otp.d.ts.map +1 -0
  246. package/types/tectra-ng-ui-input.d.ts +113 -0
  247. package/types/tectra-ng-ui-input.d.ts.map +1 -0
  248. package/types/tectra-ng-ui-key-filter.d.ts +43 -0
  249. package/types/tectra-ng-ui-key-filter.d.ts.map +1 -0
  250. package/types/tectra-ng-ui-knob.d.ts +207 -0
  251. package/types/tectra-ng-ui-knob.d.ts.map +1 -0
  252. package/types/tectra-ng-ui-label.d.ts +53 -0
  253. package/types/tectra-ng-ui-label.d.ts.map +1 -0
  254. package/types/tectra-ng-ui-link.d.ts +223 -0
  255. package/types/tectra-ng-ui-link.d.ts.map +1 -0
  256. package/types/tectra-ng-ui-listbox.d.ts +131 -0
  257. package/types/tectra-ng-ui-listbox.d.ts.map +1 -0
  258. package/types/tectra-ng-ui-mention-textarea.d.ts +169 -0
  259. package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -0
  260. package/types/tectra-ng-ui-menu.d.ts +512 -0
  261. package/types/tectra-ng-ui-menu.d.ts.map +1 -0
  262. package/types/tectra-ng-ui-message.d.ts +390 -0
  263. package/types/tectra-ng-ui-message.d.ts.map +1 -0
  264. package/types/tectra-ng-ui-multiselect.d.ts +216 -0
  265. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -0
  266. package/types/tectra-ng-ui-overlay-badge.d.ts +104 -0
  267. package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -0
  268. package/types/tectra-ng-ui-paginator.d.ts +293 -0
  269. package/types/tectra-ng-ui-paginator.d.ts.map +1 -0
  270. package/types/tectra-ng-ui-panel.d.ts +133 -0
  271. package/types/tectra-ng-ui-panel.d.ts.map +1 -0
  272. package/types/tectra-ng-ui-password-generator.d.ts +80 -0
  273. package/types/tectra-ng-ui-password-generator.d.ts.map +1 -0
  274. package/types/tectra-ng-ui-password.d.ts +271 -0
  275. package/types/tectra-ng-ui-password.d.ts.map +1 -0
  276. package/types/tectra-ng-ui-pill.d.ts +167 -0
  277. package/types/tectra-ng-ui-pill.d.ts.map +1 -0
  278. package/types/tectra-ng-ui-popover.d.ts +244 -0
  279. package/types/tectra-ng-ui-popover.d.ts.map +1 -0
  280. package/types/tectra-ng-ui-progress-bar.d.ts +151 -0
  281. package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -0
  282. package/types/tectra-ng-ui-progress-spinner.d.ts +95 -0
  283. package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -0
  284. package/types/tectra-ng-ui-radio-button.d.ts +380 -0
  285. package/types/tectra-ng-ui-radio-button.d.ts.map +1 -0
  286. package/types/tectra-ng-ui-rating.d.ts +195 -0
  287. package/types/tectra-ng-ui-rating.d.ts.map +1 -0
  288. package/types/tectra-ng-ui-select.d.ts +761 -0
  289. package/types/tectra-ng-ui-select.d.ts.map +1 -0
  290. package/types/tectra-ng-ui-skeleton.d.ts +182 -0
  291. package/types/tectra-ng-ui-skeleton.d.ts.map +1 -0
  292. package/types/tectra-ng-ui-slider.d.ts +220 -0
  293. package/types/tectra-ng-ui-slider.d.ts.map +1 -0
  294. package/types/tectra-ng-ui-speed-dial.d.ts +175 -0
  295. package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -0
  296. package/types/tectra-ng-ui-split-button.d.ts +139 -0
  297. package/types/tectra-ng-ui-split-button.d.ts.map +1 -0
  298. package/types/tectra-ng-ui-status-icon.d.ts +105 -0
  299. package/types/tectra-ng-ui-status-icon.d.ts.map +1 -0
  300. package/types/tectra-ng-ui-table.d.ts +1301 -0
  301. package/types/tectra-ng-ui-table.d.ts.map +1 -0
  302. package/types/tectra-ng-ui-tag.d.ts +157 -0
  303. package/types/tectra-ng-ui-tag.d.ts.map +1 -0
  304. package/types/tectra-ng-ui-textarea.d.ts +146 -0
  305. package/types/tectra-ng-ui-textarea.d.ts.map +1 -0
  306. package/types/tectra-ng-ui-toast.d.ts +268 -0
  307. package/types/tectra-ng-ui-toast.d.ts.map +1 -0
  308. package/types/tectra-ng-ui-toggle-button.d.ts +184 -0
  309. package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -0
  310. package/types/tectra-ng-ui-toggle-switch.d.ts +226 -0
  311. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -0
  312. package/types/tectra-ng-ui-tooltip.d.ts +275 -0
  313. package/types/tectra-ng-ui-tooltip.d.ts.map +1 -0
  314. package/types/tectra-ng-ui-tree-select.d.ts +339 -0
  315. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -0
  316. package/types/tectra-ng-ui.d.ts +2 -0
  317. package/types/tectra-ng-ui.d.ts.map +1 -0
@@ -0,0 +1,545 @@
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, booleanAttribute, computed, forwardRef, inject, input, output } from "@angular/core";
4
+ import * as i1 from "@angular/forms";
5
+ import { FormsModule, NG_VALUE_ACCESSOR } from "@angular/forms";
6
+ import { TxFormControlBase } from "@tectra-ng/core/forms";
7
+ import { TxLocaleService } from "@tectra-ng/core/i18n";
8
+ import { optionalBoolean } from "@tectra-ng/core/utils";
9
+ import { TX_COUNTRY_CODES, TxCountry, countryName } from "@tectra-ng/ui/country";
10
+ import { TxMultiselect } from "@tectra-ng/ui/multiselect";
11
+ import { TxSelect, TxSelectOptionTemplate, TxSelectValueTemplate } from "@tectra-ng/ui/select";
12
+ var TxCountrySelect = class TxCountrySelect extends TxFormControlBase {
13
+ locale = inject(TxLocaleService);
14
+ options = input(void 0, ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
15
+ multiple = input(false, {
16
+ ...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
17
+ transform: booleanAttribute
18
+ });
19
+ filter = input(true, {
20
+ ...ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {},
21
+ transform: booleanAttribute
22
+ });
23
+ sort = input("name", ...ngDevMode ? [{ debugName: "sort" }] : /* istanbul ignore next */ []);
24
+ shape = input("rectangle", ...ngDevMode ? [{ debugName: "shape" }] : /* istanbul ignore next */ []);
25
+ maxFlags = input(3, ...ngDevMode ? [{ debugName: "maxFlags" }] : /* istanbul ignore next */ []);
26
+ virtualScrollThreshold = input(50, ...ngDevMode ? [{ debugName: "virtualScrollThreshold" }] : /* istanbul ignore next */ []);
27
+ placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
28
+ showClear = input(false, {
29
+ ...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
30
+ transform: booleanAttribute
31
+ });
32
+ loading = input(false, {
33
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
34
+ transform: booleanAttribute
35
+ });
36
+ inputId = input(void 0, ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
37
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
38
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
39
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
40
+ variant = input("outlined", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
41
+ invalid = input(void 0, {
42
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
43
+ transform: optionalBoolean
44
+ });
45
+ readonly = input(false, {
46
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
47
+ transform: booleanAttribute
48
+ });
49
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
50
+ unstyled = input(void 0, {
51
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
52
+ transform: optionalBoolean
53
+ });
54
+ changed = output();
55
+ items = computed(() => {
56
+ const locale = this.locale.locale().intl;
57
+ const items = (this.options() ?? TX_COUNTRY_CODES).map((option) => {
58
+ const entry = typeof option === "string" ? { code: option } : option;
59
+ const code = entry.code.trim().toUpperCase();
60
+ return {
61
+ code,
62
+ value: entry.value ?? code,
63
+ label: entry.label ?? countryName(code, locale),
64
+ count: entry.count ?? null,
65
+ hint: entry.hint ?? "",
66
+ disabled: !!entry.disabled
67
+ };
68
+ });
69
+ if (this.sort() === "name") {
70
+ const collator = new Intl.Collator(locale);
71
+ items.sort((a, b) => collator.compare(a.label, b.label));
72
+ }
73
+ return items;
74
+ }, ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
75
+ virtual = computed(() => this.items().length > this.virtualScrollThreshold(), ...ngDevMode ? [{ debugName: "virtual" }] : /* istanbul ignore next */ []);
76
+ extraCount(items) {
77
+ return Math.max(0, items.length - this.maxFlags());
78
+ }
79
+ firstFlags(items) {
80
+ return items.slice(0, this.maxFlags()).map((item) => item.option);
81
+ }
82
+ onModelChange(value) {
83
+ this.updateValue(value);
84
+ this.changed.emit(value);
85
+ }
86
+ onClosed() {
87
+ this.markTouched();
88
+ }
89
+ static ɵfac = i0.ɵɵngDeclareFactory({
90
+ minVersion: "12.0.0",
91
+ version: "22.2.3",
92
+ ngImport: i0,
93
+ type: TxCountrySelect,
94
+ deps: null,
95
+ target: i0.ɵɵFactoryTarget.Component
96
+ });
97
+ static ɵcmp = i0.ɵɵngDeclareComponent({
98
+ minVersion: "17.0.0",
99
+ version: "22.2.3",
100
+ type: TxCountrySelect,
101
+ isStandalone: true,
102
+ selector: "tx-country-select",
103
+ inputs: {
104
+ options: {
105
+ classPropertyName: "options",
106
+ publicName: "options",
107
+ isSignal: true,
108
+ isRequired: false,
109
+ transformFunction: null
110
+ },
111
+ multiple: {
112
+ classPropertyName: "multiple",
113
+ publicName: "multiple",
114
+ isSignal: true,
115
+ isRequired: false,
116
+ transformFunction: null
117
+ },
118
+ filter: {
119
+ classPropertyName: "filter",
120
+ publicName: "filter",
121
+ isSignal: true,
122
+ isRequired: false,
123
+ transformFunction: null
124
+ },
125
+ sort: {
126
+ classPropertyName: "sort",
127
+ publicName: "sort",
128
+ isSignal: true,
129
+ isRequired: false,
130
+ transformFunction: null
131
+ },
132
+ shape: {
133
+ classPropertyName: "shape",
134
+ publicName: "shape",
135
+ isSignal: true,
136
+ isRequired: false,
137
+ transformFunction: null
138
+ },
139
+ maxFlags: {
140
+ classPropertyName: "maxFlags",
141
+ publicName: "maxFlags",
142
+ isSignal: true,
143
+ isRequired: false,
144
+ transformFunction: null
145
+ },
146
+ virtualScrollThreshold: {
147
+ classPropertyName: "virtualScrollThreshold",
148
+ publicName: "virtualScrollThreshold",
149
+ isSignal: true,
150
+ isRequired: false,
151
+ transformFunction: null
152
+ },
153
+ placeholder: {
154
+ classPropertyName: "placeholder",
155
+ publicName: "placeholder",
156
+ isSignal: true,
157
+ isRequired: false,
158
+ transformFunction: null
159
+ },
160
+ showClear: {
161
+ classPropertyName: "showClear",
162
+ publicName: "showClear",
163
+ isSignal: true,
164
+ isRequired: false,
165
+ transformFunction: null
166
+ },
167
+ loading: {
168
+ classPropertyName: "loading",
169
+ publicName: "loading",
170
+ isSignal: true,
171
+ isRequired: false,
172
+ transformFunction: null
173
+ },
174
+ inputId: {
175
+ classPropertyName: "inputId",
176
+ publicName: "inputId",
177
+ isSignal: true,
178
+ isRequired: false,
179
+ transformFunction: null
180
+ },
181
+ ariaLabel: {
182
+ classPropertyName: "ariaLabel",
183
+ publicName: "ariaLabel",
184
+ isSignal: true,
185
+ isRequired: false,
186
+ transformFunction: null
187
+ },
188
+ ariaLabelledBy: {
189
+ classPropertyName: "ariaLabelledBy",
190
+ publicName: "ariaLabelledBy",
191
+ isSignal: true,
192
+ isRequired: false,
193
+ transformFunction: null
194
+ },
195
+ size: {
196
+ classPropertyName: "size",
197
+ publicName: "size",
198
+ isSignal: true,
199
+ isRequired: false,
200
+ transformFunction: null
201
+ },
202
+ variant: {
203
+ classPropertyName: "variant",
204
+ publicName: "variant",
205
+ isSignal: true,
206
+ isRequired: false,
207
+ transformFunction: null
208
+ },
209
+ invalid: {
210
+ classPropertyName: "invalid",
211
+ publicName: "invalid",
212
+ isSignal: true,
213
+ isRequired: false,
214
+ transformFunction: null
215
+ },
216
+ readonly: {
217
+ classPropertyName: "readonly",
218
+ publicName: "readonly",
219
+ isSignal: true,
220
+ isRequired: false,
221
+ transformFunction: null
222
+ },
223
+ dt: {
224
+ classPropertyName: "dt",
225
+ publicName: "dt",
226
+ isSignal: true,
227
+ isRequired: false,
228
+ transformFunction: null
229
+ },
230
+ unstyled: {
231
+ classPropertyName: "unstyled",
232
+ publicName: "unstyled",
233
+ isSignal: true,
234
+ isRequired: false,
235
+ transformFunction: null
236
+ }
237
+ },
238
+ outputs: { changed: "changed" },
239
+ host: {
240
+ properties: { "attr.data-styled": "unstyled() ? null : true" },
241
+ classAttribute: "tx-country-select"
242
+ },
243
+ providers: [{
244
+ provide: NG_VALUE_ACCESSOR,
245
+ useExisting: forwardRef(() => TxCountrySelect),
246
+ multi: true
247
+ }],
248
+ usesInheritance: true,
249
+ ngImport: i0,
250
+ template: "@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n",
251
+ styles: [":host{display:block;width:100%}.tx-country-select__option{display:flex;align-items:center;min-width:0}.tx-country-select__country{flex:0 1 auto}.tx-country-select__flags{display:inline-flex;align-items:center;vertical-align:middle}.tx-country-select__option--styled,.tx-country-select__flags--styled{gap:var(--tx-country-gap)}.tx-country-select__option--styled .tx-country-select__hint{overflow:hidden;color:var(--tx-country-hint-color);font-size:var(--tx-country-count-font-size);text-overflow:ellipsis;white-space:nowrap}.tx-country-select__option--styled .tx-country-select__count{margin-inline-start:auto;color:var(--tx-country-count-color);font-size:var(--tx-country-count-font-size);font-variant-numeric:tabular-nums}.tx-country-select__flags--styled .tx-country-select__more{color:var(--tx-country-hint-color);font-size:var(--tx-country-count-font-size)}\n"],
252
+ dependencies: [
253
+ {
254
+ kind: "ngmodule",
255
+ type: FormsModule
256
+ },
257
+ {
258
+ kind: "directive",
259
+ type: i1.NgControlStatus,
260
+ selector: "[formControlName],[ngModel],[formControl]"
261
+ },
262
+ {
263
+ kind: "directive",
264
+ type: i1.NgModel,
265
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
266
+ inputs: [
267
+ "name",
268
+ "disabled",
269
+ "ngModel",
270
+ "ngModelOptions"
271
+ ],
272
+ outputs: ["ngModelChange"],
273
+ exportAs: ["ngModel"]
274
+ },
275
+ {
276
+ kind: "directive",
277
+ type: NgTemplateOutlet,
278
+ selector: "[ngTemplateOutlet]",
279
+ inputs: [
280
+ "ngTemplateOutletContext",
281
+ "ngTemplateOutlet",
282
+ "ngTemplateOutletInjector"
283
+ ]
284
+ },
285
+ {
286
+ kind: "component",
287
+ type: TxSelect,
288
+ selector: "tx-select",
289
+ inputs: [
290
+ "options",
291
+ "editable",
292
+ "checkmark",
293
+ "dropdownIcon",
294
+ "dt",
295
+ "pt",
296
+ "ptOptions",
297
+ "unstyled"
298
+ ],
299
+ outputs: ["changed"]
300
+ },
301
+ {
302
+ kind: "component",
303
+ type: TxMultiselect,
304
+ selector: "tx-multiselect",
305
+ inputs: [
306
+ "options",
307
+ "display",
308
+ "maxSelectedLabels",
309
+ "selectedItemsLabel",
310
+ "selectAllLabel",
311
+ "countLabel",
312
+ "selectionLimit",
313
+ "showToggleAll",
314
+ "dropdownIcon",
315
+ "dt",
316
+ "pt",
317
+ "ptOptions",
318
+ "unstyled"
319
+ ],
320
+ outputs: ["changed"]
321
+ },
322
+ {
323
+ kind: "directive",
324
+ type: TxSelectOptionTemplate,
325
+ selector: "ng-template[txSelectOption]"
326
+ },
327
+ {
328
+ kind: "directive",
329
+ type: TxSelectValueTemplate,
330
+ selector: "ng-template[txSelectValue]"
331
+ },
332
+ {
333
+ kind: "component",
334
+ type: TxCountry,
335
+ selector: "tx-country",
336
+ inputs: [
337
+ "country",
338
+ "name",
339
+ "showName",
340
+ "size",
341
+ "shape",
342
+ "dt",
343
+ "pt",
344
+ "ptOptions",
345
+ "unstyled"
346
+ ]
347
+ }
348
+ ],
349
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
350
+ });
351
+ };
352
+ i0.ɵɵngDeclareClassMetadata({
353
+ minVersion: "12.0.0",
354
+ version: "22.2.3",
355
+ ngImport: i0,
356
+ type: TxCountrySelect,
357
+ decorators: [{
358
+ type: Component,
359
+ args: [{
360
+ selector: "tx-country-select",
361
+ imports: [
362
+ FormsModule,
363
+ NgTemplateOutlet,
364
+ TxSelect,
365
+ TxMultiselect,
366
+ TxSelectOptionTemplate,
367
+ TxSelectValueTemplate,
368
+ TxCountry
369
+ ],
370
+ changeDetection: ChangeDetectionStrategy.OnPush,
371
+ providers: [{
372
+ provide: NG_VALUE_ACCESSOR,
373
+ useExisting: forwardRef(() => TxCountrySelect),
374
+ multi: true
375
+ }],
376
+ host: {
377
+ class: "tx-country-select",
378
+ "[attr.data-styled]": "unstyled() ? null : true"
379
+ },
380
+ template: "@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n",
381
+ styles: [":host{display:block;width:100%}.tx-country-select__option{display:flex;align-items:center;min-width:0}.tx-country-select__country{flex:0 1 auto}.tx-country-select__flags{display:inline-flex;align-items:center;vertical-align:middle}.tx-country-select__option--styled,.tx-country-select__flags--styled{gap:var(--tx-country-gap)}.tx-country-select__option--styled .tx-country-select__hint{overflow:hidden;color:var(--tx-country-hint-color);font-size:var(--tx-country-count-font-size);text-overflow:ellipsis;white-space:nowrap}.tx-country-select__option--styled .tx-country-select__count{margin-inline-start:auto;color:var(--tx-country-count-color);font-size:var(--tx-country-count-font-size);font-variant-numeric:tabular-nums}.tx-country-select__flags--styled .tx-country-select__more{color:var(--tx-country-hint-color);font-size:var(--tx-country-count-font-size)}\n"]
382
+ }]
383
+ }],
384
+ propDecorators: {
385
+ options: [{
386
+ type: i0.Input,
387
+ args: [{
388
+ isSignal: true,
389
+ alias: "options",
390
+ required: false
391
+ }]
392
+ }],
393
+ multiple: [{
394
+ type: i0.Input,
395
+ args: [{
396
+ isSignal: true,
397
+ alias: "multiple",
398
+ required: false
399
+ }]
400
+ }],
401
+ filter: [{
402
+ type: i0.Input,
403
+ args: [{
404
+ isSignal: true,
405
+ alias: "filter",
406
+ required: false
407
+ }]
408
+ }],
409
+ sort: [{
410
+ type: i0.Input,
411
+ args: [{
412
+ isSignal: true,
413
+ alias: "sort",
414
+ required: false
415
+ }]
416
+ }],
417
+ shape: [{
418
+ type: i0.Input,
419
+ args: [{
420
+ isSignal: true,
421
+ alias: "shape",
422
+ required: false
423
+ }]
424
+ }],
425
+ maxFlags: [{
426
+ type: i0.Input,
427
+ args: [{
428
+ isSignal: true,
429
+ alias: "maxFlags",
430
+ required: false
431
+ }]
432
+ }],
433
+ virtualScrollThreshold: [{
434
+ type: i0.Input,
435
+ args: [{
436
+ isSignal: true,
437
+ alias: "virtualScrollThreshold",
438
+ required: false
439
+ }]
440
+ }],
441
+ placeholder: [{
442
+ type: i0.Input,
443
+ args: [{
444
+ isSignal: true,
445
+ alias: "placeholder",
446
+ required: false
447
+ }]
448
+ }],
449
+ showClear: [{
450
+ type: i0.Input,
451
+ args: [{
452
+ isSignal: true,
453
+ alias: "showClear",
454
+ required: false
455
+ }]
456
+ }],
457
+ loading: [{
458
+ type: i0.Input,
459
+ args: [{
460
+ isSignal: true,
461
+ alias: "loading",
462
+ required: false
463
+ }]
464
+ }],
465
+ inputId: [{
466
+ type: i0.Input,
467
+ args: [{
468
+ isSignal: true,
469
+ alias: "inputId",
470
+ required: false
471
+ }]
472
+ }],
473
+ ariaLabel: [{
474
+ type: i0.Input,
475
+ args: [{
476
+ isSignal: true,
477
+ alias: "ariaLabel",
478
+ required: false
479
+ }]
480
+ }],
481
+ ariaLabelledBy: [{
482
+ type: i0.Input,
483
+ args: [{
484
+ isSignal: true,
485
+ alias: "ariaLabelledBy",
486
+ required: false
487
+ }]
488
+ }],
489
+ size: [{
490
+ type: i0.Input,
491
+ args: [{
492
+ isSignal: true,
493
+ alias: "size",
494
+ required: false
495
+ }]
496
+ }],
497
+ variant: [{
498
+ type: i0.Input,
499
+ args: [{
500
+ isSignal: true,
501
+ alias: "variant",
502
+ required: false
503
+ }]
504
+ }],
505
+ invalid: [{
506
+ type: i0.Input,
507
+ args: [{
508
+ isSignal: true,
509
+ alias: "invalid",
510
+ required: false
511
+ }]
512
+ }],
513
+ readonly: [{
514
+ type: i0.Input,
515
+ args: [{
516
+ isSignal: true,
517
+ alias: "readonly",
518
+ required: false
519
+ }]
520
+ }],
521
+ dt: [{
522
+ type: i0.Input,
523
+ args: [{
524
+ isSignal: true,
525
+ alias: "dt",
526
+ required: false
527
+ }]
528
+ }],
529
+ unstyled: [{
530
+ type: i0.Input,
531
+ args: [{
532
+ isSignal: true,
533
+ alias: "unstyled",
534
+ required: false
535
+ }]
536
+ }],
537
+ changed: [{
538
+ type: i0.Output,
539
+ args: ["changed"]
540
+ }]
541
+ }
542
+ });
543
+ export { TxCountrySelect };
544
+
545
+ //# sourceMappingURL=tectra-ng-ui-country-select.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-ui-country-select.mjs","names":[],"sources":["../../../../packages/ui/country-select/src/country-select.component.ts","../../../../packages/ui/country-select/src/country-select.component.html"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, computed, forwardRef, inject, input, output } from '@angular/core';\nimport { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { TxFormControlBase } from '@tectra-ng/core/forms';\nimport { TxLocaleService } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TectraDeepPartial, TectraSelectTokens } from '@tectra-ng/themes';\nimport { TX_COUNTRY_CODES, TxCountry, TxFlagShape, countryName } from '@tectra-ng/ui/country';\nimport { TxMultiselect } from '@tectra-ng/ui/multiselect';\nimport { TxFieldVariant, TxSelect, TxSelectItem, TxSelectOptionTemplate, TxSelectSize, TxSelectValueTemplate } from '@tectra-ng/ui/select';\nimport { TxCountryItem, TxCountryOption, TxCountrySort } from './country-select.types';\n\n@Component({\n selector: 'tx-country-select',\n imports: [FormsModule, NgTemplateOutlet, TxSelect, TxMultiselect, TxSelectOptionTemplate, TxSelectValueTemplate, TxCountry],\n templateUrl: './country-select.component.html',\n styleUrl: './country-select.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TxCountrySelect), multi: true }],\n host: {\n class: 'tx-country-select',\n '[attr.data-styled]': 'unstyled() ? null : true',\n },\n})\nexport class TxCountrySelect extends TxFormControlBase<string | string[]> {\n private locale = inject(TxLocaleService);\n\n readonly options = input<readonly (string | TxCountryOption)[] | undefined>(undefined);\n readonly multiple = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly filter = input<boolean, unknown>(true, { transform: booleanAttribute });\n readonly sort = input<TxCountrySort>('name');\n readonly shape = input<TxFlagShape>('rectangle');\n readonly maxFlags = input<number>(3);\n readonly virtualScrollThreshold = input<number>(50);\n readonly placeholder = input<string>('');\n readonly showClear = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly loading = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly inputId = input<string | undefined>(undefined);\n readonly ariaLabel = input<string | undefined>(undefined);\n readonly ariaLabelledBy = input<string | undefined>(undefined);\n readonly size = input<TxSelectSize>('medium');\n readonly variant = input<TxFieldVariant>('outlined');\n readonly invalid = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly readonly = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly dt = input<TectraDeepPartial<TectraSelectTokens> | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly changed = output<string | string[] | null>();\n\n readonly items = computed<TxCountryItem[]>(() => {\n const locale = this.locale.locale().intl;\n const items = (this.options() ?? TX_COUNTRY_CODES).map((option) => {\n const entry: TxCountryOption = typeof option === 'string' ? { code: option } : option;\n const code = entry.code.trim().toUpperCase();\n return {\n code,\n value: entry.value ?? code,\n label: entry.label ?? countryName(code, locale),\n count: entry.count ?? null,\n hint: entry.hint ?? '',\n disabled: !!entry.disabled,\n };\n });\n if (this.sort() === 'name') {\n const collator = new Intl.Collator(locale);\n items.sort((a, b) => collator.compare(a.label, b.label));\n }\n return items;\n });\n readonly virtual = computed(() => this.items().length > this.virtualScrollThreshold());\n\n extraCount(items: TxSelectItem[]): number {\n return Math.max(0, items.length - this.maxFlags());\n }\n\n firstFlags(items: TxSelectItem[]): TxCountryItem[] {\n return items.slice(0, this.maxFlags()).map((item) => item.option as TxCountryItem);\n }\n\n onModelChange(value: string | string[] | null): void {\n this.updateValue(value);\n this.changed.emit(value);\n }\n\n onClosed(): void {\n this.markTouched();\n }\n}\n","@if (multiple()) {\n <tx-multiselect\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-selected>\n <span class=\"tx-country-select__flags\" [class.tx-country-select__flags--styled]=\"!unstyled()\">\n @for (item of firstFlags(selected); track item.value) {\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [showName]=\"selected.length === 1\" [shape]=\"shape()\" />\n }\n @if (extraCount(selected); as extra) {\n <span class=\"tx-country-select__more\">+{{ extra }}</span>\n }\n </span>\n </ng-template>\n </tx-multiselect>\n} @else {\n <tx-select\n [options]=\"items()\"\n [optionLabel]=\"'label'\"\n [optionValue]=\"'value'\"\n [optionDisabled]=\"'disabled'\"\n [filter]=\"filter()\"\n [filterBy]=\"'label,code'\"\n [virtualScroll]=\"virtual()\"\n [placeholder]=\"placeholder()\"\n [showClear]=\"showClear()\"\n [loading]=\"loading()\"\n [inputId]=\"inputId()\"\n [ariaLabel]=\"ariaLabel()\"\n [ariaLabelledBy]=\"ariaLabelledBy()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [invalid]=\"invalid()\"\n [readonly]=\"readonly()\"\n [dt]=\"dt()\"\n [unstyled]=\"unstyled()\"\n [ngModel]=\"value()\"\n [disabled]=\"disabled()\"\n (ngModelChange)=\"onModelChange($event)\"\n (closed)=\"onClosed()\"\n >\n <ng-template txSelectOption let-item>\n <ng-container [ngTemplateOutlet]=\"option\" [ngTemplateOutletContext]=\"{ $implicit: item }\" />\n </ng-template>\n <ng-template txSelectValue let-item>\n <tx-country [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n </ng-template>\n </tx-select>\n}\n\n<ng-template #option let-item>\n <span class=\"tx-country-select__option\" [class.tx-country-select__option--styled]=\"!unstyled()\">\n <tx-country class=\"tx-country-select__country\" [country]=\"item.code\" [name]=\"item.label\" [shape]=\"shape()\" />\n @if (item.hint) {\n <span class=\"tx-country-select__hint\">{{ item.hint }}</span>\n }\n @if (item.count !== null) {\n <span class=\"tx-country-select__count\">{{ item.count }}</span>\n }\n </span>\n</ng-template>\n"],"mappings":";;;;;;;;;;;AAwBA,IAAa,kBAAb,MAAa,wBAAwB,kBAAoC;CAC/D,SAAS,OAAO,eAAe;CAE9B,UAAU,MAAyD,QAAU,GAAA,YAAA,CAAA,EAAA,W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