kitunga-web 0.1.78

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 (402) hide show
  1. package/dist/features/buttons/components/Btns/Button.d.ts +32 -0
  2. package/dist/features/buttons/components/Btns/Button.d.ts.map +1 -0
  3. package/dist/features/buttons/components/Btns/Button.js +50 -0
  4. package/dist/features/buttons/components/Btns/Button.js.map +1 -0
  5. package/dist/features/buttons/components/Btns/Button.module.css +205 -0
  6. package/dist/features/data-display/components/Cards/ChartCard.d.ts +9 -0
  7. package/dist/features/data-display/components/Cards/ChartCard.d.ts.map +1 -0
  8. package/dist/features/data-display/components/Cards/ChartCard.js +7 -0
  9. package/dist/features/data-display/components/Cards/ChartCard.js.map +1 -0
  10. package/dist/features/data-display/components/Cards/ChartCard.module.css +27 -0
  11. package/dist/features/data-display/components/Cards/MetricCard.d.ts +11 -0
  12. package/dist/features/data-display/components/Cards/MetricCard.d.ts.map +1 -0
  13. package/dist/features/data-display/components/Cards/MetricCard.js +10 -0
  14. package/dist/features/data-display/components/Cards/MetricCard.js.map +1 -0
  15. package/dist/features/data-display/components/Cards/MetricCard.module.css +86 -0
  16. package/dist/features/data-display/components/Cards/StatCard.d.ts +15 -0
  17. package/dist/features/data-display/components/Cards/StatCard.d.ts.map +1 -0
  18. package/dist/features/data-display/components/Cards/StatCard.js +23 -0
  19. package/dist/features/data-display/components/Cards/StatCard.js.map +1 -0
  20. package/dist/features/data-display/components/Cards/StatCard.module.css +98 -0
  21. package/dist/features/data-display/components/Table/LineItemsTable.d.ts +4 -0
  22. package/dist/features/data-display/components/Table/LineItemsTable.d.ts.map +1 -0
  23. package/dist/features/data-display/components/Table/LineItemsTable.js +216 -0
  24. package/dist/features/data-display/components/Table/LineItemsTable.js.map +1 -0
  25. package/dist/features/data-display/components/Table/LineItemsTable.module.css +223 -0
  26. package/dist/features/data-display/components/Table/Table.d.ts +4 -0
  27. package/dist/features/data-display/components/Table/Table.d.ts.map +1 -0
  28. package/dist/features/data-display/components/Table/Table.js +181 -0
  29. package/dist/features/data-display/components/Table/Table.js.map +1 -0
  30. package/dist/features/data-display/components/Table/Table.module.css +305 -0
  31. package/dist/features/data-display/components/Table/types/LineItemsTable.d.ts +83 -0
  32. package/dist/features/data-display/components/Table/types/LineItemsTable.d.ts.map +1 -0
  33. package/dist/features/data-display/components/Table/types/LineItemsTable.js +2 -0
  34. package/dist/features/data-display/components/Table/types/LineItemsTable.js.map +1 -0
  35. package/dist/features/data-display/components/Table/types/Table.d.ts +78 -0
  36. package/dist/features/data-display/components/Table/types/Table.d.ts.map +1 -0
  37. package/dist/features/data-display/components/Table/types/Table.js +2 -0
  38. package/dist/features/data-display/components/Table/types/Table.js.map +1 -0
  39. package/dist/features/data-display/components/Tabs/PillTabs/PillTabs.d.ts +12 -0
  40. package/dist/features/data-display/components/Tabs/PillTabs/PillTabs.d.ts.map +1 -0
  41. package/dist/features/data-display/components/Tabs/PillTabs/PillTabs.js +7 -0
  42. package/dist/features/data-display/components/Tabs/PillTabs/PillTabs.js.map +1 -0
  43. package/dist/features/data-display/components/Tabs/PillTabs/PillTabs.module.css +36 -0
  44. package/dist/features/feedback/components/ChangedDataSummary/ChangedDataSummary.d.ts +18 -0
  45. package/dist/features/feedback/components/ChangedDataSummary/ChangedDataSummary.d.ts.map +1 -0
  46. package/dist/features/feedback/components/ChangedDataSummary/ChangedDataSummary.js +52 -0
  47. package/dist/features/feedback/components/ChangedDataSummary/ChangedDataSummary.js.map +1 -0
  48. package/dist/features/feedback/components/ChangedDataSummary/ChangedDataSummary.module.css +90 -0
  49. package/dist/features/feedback/components/ChangedDataSummary/getFormDataChanges.d.ts +21 -0
  50. package/dist/features/feedback/components/ChangedDataSummary/getFormDataChanges.d.ts.map +1 -0
  51. package/dist/features/feedback/components/ChangedDataSummary/getFormDataChanges.js +37 -0
  52. package/dist/features/feedback/components/ChangedDataSummary/getFormDataChanges.js.map +1 -0
  53. package/dist/features/feedback/components/CreatedDataSummary/CreatedDataSummary.d.ts +15 -0
  54. package/dist/features/feedback/components/CreatedDataSummary/CreatedDataSummary.d.ts.map +1 -0
  55. package/dist/features/feedback/components/CreatedDataSummary/CreatedDataSummary.js +56 -0
  56. package/dist/features/feedback/components/CreatedDataSummary/CreatedDataSummary.js.map +1 -0
  57. package/dist/features/feedback/components/CreatedDataSummary/CreatedDataSummary.module.css +90 -0
  58. package/dist/features/feedback/components/EmptyStates/SearchEmptyState/SearchEmptyState.d.ts +9 -0
  59. package/dist/features/feedback/components/EmptyStates/SearchEmptyState/SearchEmptyState.d.ts.map +1 -0
  60. package/dist/features/feedback/components/EmptyStates/SearchEmptyState/SearchEmptyState.js +9 -0
  61. package/dist/features/feedback/components/EmptyStates/SearchEmptyState/SearchEmptyState.js.map +1 -0
  62. package/dist/features/feedback/components/EmptyStates/SearchEmptyState/SearchEmptyState.module.css +36 -0
  63. package/dist/features/feedback/components/FlowNotice/FlowNotice.d.ts +8 -0
  64. package/dist/features/feedback/components/FlowNotice/FlowNotice.d.ts.map +1 -0
  65. package/dist/features/feedback/components/FlowNotice/FlowNotice.js +52 -0
  66. package/dist/features/feedback/components/FlowNotice/FlowNotice.js.map +1 -0
  67. package/dist/features/feedback/components/FlowNotice/FlowNotice.module.css +122 -0
  68. package/dist/features/feedback/components/Loading/AppLoading.d.ts +14 -0
  69. package/dist/features/feedback/components/Loading/AppLoading.d.ts.map +1 -0
  70. package/dist/features/feedback/components/Loading/AppLoading.js +17 -0
  71. package/dist/features/feedback/components/Loading/AppLoading.js.map +1 -0
  72. package/dist/features/feedback/components/Loading/AppLoading.module.css +95 -0
  73. package/dist/features/feedback/components/SuccesModal/ModalSuccess.d.ts +24 -0
  74. package/dist/features/feedback/components/SuccesModal/ModalSuccess.d.ts.map +1 -0
  75. package/dist/features/feedback/components/SuccesModal/ModalSuccess.js +11 -0
  76. package/dist/features/feedback/components/SuccesModal/ModalSuccess.js.map +1 -0
  77. package/dist/features/feedback/components/SuccesModal/ModalSuccess.module.css +141 -0
  78. package/dist/features/feedback/components/Tooltips/InfoTooltip.d.ts +10 -0
  79. package/dist/features/feedback/components/Tooltips/InfoTooltip.d.ts.map +1 -0
  80. package/dist/features/feedback/components/Tooltips/InfoTooltip.js +48 -0
  81. package/dist/features/feedback/components/Tooltips/InfoTooltip.js.map +1 -0
  82. package/dist/features/feedback/components/Tooltips/InfoTooltip.module.css +123 -0
  83. package/dist/features/feedback/components/Tooltips/InfoTooltipContent.d.ts +11 -0
  84. package/dist/features/feedback/components/Tooltips/InfoTooltipContent.d.ts.map +1 -0
  85. package/dist/features/feedback/components/Tooltips/InfoTooltipContent.js +8 -0
  86. package/dist/features/feedback/components/Tooltips/InfoTooltipContent.js.map +1 -0
  87. package/dist/features/feedback/components/Tooltips/InfoTooltipContent.module.css +58 -0
  88. package/dist/features/feedback/components/Tooltips/ProgressChecklistTooltip.d.ts +27 -0
  89. package/dist/features/feedback/components/Tooltips/ProgressChecklistTooltip.d.ts.map +1 -0
  90. package/dist/features/feedback/components/Tooltips/ProgressChecklistTooltip.js +56 -0
  91. package/dist/features/feedback/components/Tooltips/ProgressChecklistTooltip.js.map +1 -0
  92. package/dist/features/feedback/components/Tooltips/ProgressChecklistTooltip.module.css +200 -0
  93. package/dist/features/inputs/components/DatePicker/DatePicker.d.ts +13 -0
  94. package/dist/features/inputs/components/DatePicker/DatePicker.d.ts.map +1 -0
  95. package/dist/features/inputs/components/DatePicker/DatePicker.js +97 -0
  96. package/dist/features/inputs/components/DatePicker/DatePicker.js.map +1 -0
  97. package/dist/features/inputs/components/DatePicker/DatePicker.module.css +186 -0
  98. package/dist/features/inputs/components/Inputs/DateInput.d.ts +27 -0
  99. package/dist/features/inputs/components/Inputs/DateInput.d.ts.map +1 -0
  100. package/dist/features/inputs/components/Inputs/DateInput.js +236 -0
  101. package/dist/features/inputs/components/Inputs/DateInput.js.map +1 -0
  102. package/dist/features/inputs/components/Inputs/DateInput.module.css +301 -0
  103. package/dist/features/inputs/components/Inputs/DateRangeInput.d.ts +24 -0
  104. package/dist/features/inputs/components/Inputs/DateRangeInput.d.ts.map +1 -0
  105. package/dist/features/inputs/components/Inputs/DateRangeInput.js +10 -0
  106. package/dist/features/inputs/components/Inputs/DateRangeInput.js.map +1 -0
  107. package/dist/features/inputs/components/Inputs/DateRangeInput.module.css +24 -0
  108. package/dist/features/inputs/components/Inputs/NumberInput.d.ts +21 -0
  109. package/dist/features/inputs/components/Inputs/NumberInput.d.ts.map +1 -0
  110. package/dist/features/inputs/components/Inputs/NumberInput.js +82 -0
  111. package/dist/features/inputs/components/Inputs/NumberInput.js.map +1 -0
  112. package/dist/features/inputs/components/Inputs/NumberInput.module.css +148 -0
  113. package/dist/features/inputs/components/Inputs/PhoneInput/PhoneInput.d.ts +9 -0
  114. package/dist/features/inputs/components/Inputs/PhoneInput/PhoneInput.d.ts.map +1 -0
  115. package/dist/features/inputs/components/Inputs/PhoneInput/PhoneInput.js +187 -0
  116. package/dist/features/inputs/components/Inputs/PhoneInput/PhoneInput.js.map +1 -0
  117. package/dist/features/inputs/components/Inputs/PhoneInput/PhoneInput.module.css +259 -0
  118. package/dist/features/inputs/components/Inputs/PhoneInput/countries/ao.d.ts +3 -0
  119. package/dist/features/inputs/components/Inputs/PhoneInput/countries/ao.d.ts.map +1 -0
  120. package/dist/features/inputs/components/Inputs/PhoneInput/countries/ao.js +20 -0
  121. package/dist/features/inputs/components/Inputs/PhoneInput/countries/ao.js.map +1 -0
  122. package/dist/features/inputs/components/Inputs/PhoneInput/countries/br.d.ts +3 -0
  123. package/dist/features/inputs/components/Inputs/PhoneInput/countries/br.d.ts.map +1 -0
  124. package/dist/features/inputs/components/Inputs/PhoneInput/countries/br.js +9 -0
  125. package/dist/features/inputs/components/Inputs/PhoneInput/countries/br.js.map +1 -0
  126. package/dist/features/inputs/components/Inputs/PhoneInput/countries/index.d.ts +5 -0
  127. package/dist/features/inputs/components/Inputs/PhoneInput/countries/index.d.ts.map +1 -0
  128. package/dist/features/inputs/components/Inputs/PhoneInput/countries/index.js +48 -0
  129. package/dist/features/inputs/components/Inputs/PhoneInput/countries/index.js.map +1 -0
  130. package/dist/features/inputs/components/Inputs/PhoneInput/countries/pt.d.ts +3 -0
  131. package/dist/features/inputs/components/Inputs/PhoneInput/countries/pt.d.ts.map +1 -0
  132. package/dist/features/inputs/components/Inputs/PhoneInput/countries/pt.js +9 -0
  133. package/dist/features/inputs/components/Inputs/PhoneInput/countries/pt.js.map +1 -0
  134. package/dist/features/inputs/components/Inputs/PhoneInput/countries/us.d.ts +3 -0
  135. package/dist/features/inputs/components/Inputs/PhoneInput/countries/us.d.ts.map +1 -0
  136. package/dist/features/inputs/components/Inputs/PhoneInput/countries/us.js +17 -0
  137. package/dist/features/inputs/components/Inputs/PhoneInput/countries/us.js.map +1 -0
  138. package/dist/features/inputs/components/Inputs/PhoneInput/types/phone.types.d.ts +10 -0
  139. package/dist/features/inputs/components/Inputs/PhoneInput/types/phone.types.d.ts.map +1 -0
  140. package/dist/features/inputs/components/Inputs/PhoneInput/types/phone.types.js +2 -0
  141. package/dist/features/inputs/components/Inputs/PhoneInput/types/phone.types.js.map +1 -0
  142. package/dist/features/inputs/components/Inputs/SearchInput.d.ts +13 -0
  143. package/dist/features/inputs/components/Inputs/SearchInput.d.ts.map +1 -0
  144. package/dist/features/inputs/components/Inputs/SearchInput.js +12 -0
  145. package/dist/features/inputs/components/Inputs/SearchInput.js.map +1 -0
  146. package/dist/features/inputs/components/Inputs/SearchInput.module.css +107 -0
  147. package/dist/features/inputs/components/Inputs/StepperInput.d.ts +14 -0
  148. package/dist/features/inputs/components/Inputs/StepperInput.d.ts.map +1 -0
  149. package/dist/features/inputs/components/Inputs/StepperInput.js +44 -0
  150. package/dist/features/inputs/components/Inputs/StepperInput.js.map +1 -0
  151. package/dist/features/inputs/components/Inputs/StepperInput.module.css +96 -0
  152. package/dist/features/inputs/components/Inputs/TaxIdInput/TaxIdInput.d.ts +15 -0
  153. package/dist/features/inputs/components/Inputs/TaxIdInput/TaxIdInput.d.ts.map +1 -0
  154. package/dist/features/inputs/components/Inputs/TaxIdInput/TaxIdInput.js +102 -0
  155. package/dist/features/inputs/components/Inputs/TaxIdInput/TaxIdInput.js.map +1 -0
  156. package/dist/features/inputs/components/Inputs/TaxIdInput/TaxIdInput.module.css +259 -0
  157. package/dist/features/inputs/components/Inputs/TaxIdInput/index.d.ts +5 -0
  158. package/dist/features/inputs/components/Inputs/TaxIdInput/index.d.ts.map +1 -0
  159. package/dist/features/inputs/components/Inputs/TaxIdInput/index.js +3 -0
  160. package/dist/features/inputs/components/Inputs/TaxIdInput/index.js.map +1 -0
  161. package/dist/features/inputs/components/Inputs/TextInput.d.ts +4 -0
  162. package/dist/features/inputs/components/Inputs/TextInput.d.ts.map +1 -0
  163. package/dist/features/inputs/components/Inputs/TextInput.js +61 -0
  164. package/dist/features/inputs/components/Inputs/TextInput.js.map +1 -0
  165. package/dist/features/inputs/components/Inputs/TextInput.module.css +174 -0
  166. package/dist/features/inputs/components/Inputs/TextareaInput.d.ts +4 -0
  167. package/dist/features/inputs/components/Inputs/TextareaInput.d.ts.map +1 -0
  168. package/dist/features/inputs/components/Inputs/TextareaInput.js +45 -0
  169. package/dist/features/inputs/components/Inputs/TextareaInput.js.map +1 -0
  170. package/dist/features/inputs/components/Inputs/TextareaInput.module.css +144 -0
  171. package/dist/features/inputs/components/Inputs/types/input.types.d.ts +28 -0
  172. package/dist/features/inputs/components/Inputs/types/input.types.d.ts.map +1 -0
  173. package/dist/features/inputs/components/Inputs/types/input.types.js +2 -0
  174. package/dist/features/inputs/components/Inputs/types/input.types.js.map +1 -0
  175. package/dist/features/navigation/components/Menu/SharedMenuItem.d.ts +25 -0
  176. package/dist/features/navigation/components/Menu/SharedMenuItem.d.ts.map +1 -0
  177. package/dist/features/navigation/components/Menu/SharedMenuItem.js +40 -0
  178. package/dist/features/navigation/components/Menu/SharedMenuItem.js.map +1 -0
  179. package/dist/features/navigation/components/Menu/SharedMenuItem.module.css +219 -0
  180. package/dist/features/navigation/components/PageFooter/PageFooter.d.ts +13 -0
  181. package/dist/features/navigation/components/PageFooter/PageFooter.d.ts.map +1 -0
  182. package/dist/features/navigation/components/PageFooter/PageFooter.js +52 -0
  183. package/dist/features/navigation/components/PageFooter/PageFooter.js.map +1 -0
  184. package/dist/features/navigation/components/PageFooter/PageFooter.module.css +24 -0
  185. package/dist/features/navigation/components/PageHeader/PageHeader.d.ts +14 -0
  186. package/dist/features/navigation/components/PageHeader/PageHeader.d.ts.map +1 -0
  187. package/dist/features/navigation/components/PageHeader/PageHeader.js +22 -0
  188. package/dist/features/navigation/components/PageHeader/PageHeader.js.map +1 -0
  189. package/dist/features/navigation/components/PageHeader/PageHeader.module.css +41 -0
  190. package/dist/features/navigation/components/Sidebar/Sidebar.d.ts +24 -0
  191. package/dist/features/navigation/components/Sidebar/Sidebar.d.ts.map +1 -0
  192. package/dist/features/navigation/components/Sidebar/Sidebar.js +131 -0
  193. package/dist/features/navigation/components/Sidebar/Sidebar.js.map +1 -0
  194. package/dist/features/navigation/components/Sidebar/Sidebar.module.css +139 -0
  195. package/dist/features/overlays/components/DeleteModal/ComprehensiveDeleteModal.d.ts +66 -0
  196. package/dist/features/overlays/components/DeleteModal/ComprehensiveDeleteModal.d.ts.map +1 -0
  197. package/dist/features/overlays/components/DeleteModal/ComprehensiveDeleteModal.js +89 -0
  198. package/dist/features/overlays/components/DeleteModal/ComprehensiveDeleteModal.js.map +1 -0
  199. package/dist/features/overlays/components/DeleteModal/ComprehensiveDeleteModal.module.css +269 -0
  200. package/dist/features/overlays/components/Popup/Popup.d.ts +8 -0
  201. package/dist/features/overlays/components/Popup/Popup.d.ts.map +1 -0
  202. package/dist/features/overlays/components/Popup/Popup.js +23 -0
  203. package/dist/features/overlays/components/Popup/Popup.js.map +1 -0
  204. package/dist/features/overlays/components/Popup/Popup.module.css +64 -0
  205. package/dist/features/overlays/components/Popup/index.d.ts +3 -0
  206. package/dist/features/overlays/components/Popup/index.d.ts.map +1 -0
  207. package/dist/features/overlays/components/Popup/index.js +2 -0
  208. package/dist/features/overlays/components/Popup/index.js.map +1 -0
  209. package/dist/features/overlays/components/PrerequisiteGuardModal/PrerequisiteGuardModal.d.ts +36 -0
  210. package/dist/features/overlays/components/PrerequisiteGuardModal/PrerequisiteGuardModal.d.ts.map +1 -0
  211. package/dist/features/overlays/components/PrerequisiteGuardModal/PrerequisiteGuardModal.js +38 -0
  212. package/dist/features/overlays/components/PrerequisiteGuardModal/PrerequisiteGuardModal.js.map +1 -0
  213. package/dist/features/overlays/components/PrerequisiteGuardModal/PrerequisiteGuardModal.module.css +339 -0
  214. package/dist/features/overlays/components/dropdowns/DropdownMenu.d.ts +18 -0
  215. package/dist/features/overlays/components/dropdowns/DropdownMenu.d.ts.map +1 -0
  216. package/dist/features/overlays/components/dropdowns/DropdownMenu.js +34 -0
  217. package/dist/features/overlays/components/dropdowns/DropdownMenu.js.map +1 -0
  218. package/dist/features/overlays/components/dropdowns/DropdownMenu.module.css +23 -0
  219. package/dist/features/patterns/components/Form/MultiStepForm/components/FormActions.d.ts +36 -0
  220. package/dist/features/patterns/components/Form/MultiStepForm/components/FormActions.d.ts.map +1 -0
  221. package/dist/features/patterns/components/Form/MultiStepForm/components/FormActions.js +19 -0
  222. package/dist/features/patterns/components/Form/MultiStepForm/components/FormActions.js.map +1 -0
  223. package/dist/features/patterns/components/Form/MultiStepForm/components/FormActions.module.css +88 -0
  224. package/dist/features/patterns/components/Form/MultiStepForm/components/GenericStepRenderer.d.ts +14 -0
  225. package/dist/features/patterns/components/Form/MultiStepForm/components/GenericStepRenderer.d.ts.map +1 -0
  226. package/dist/features/patterns/components/Form/MultiStepForm/components/GenericStepRenderer.js +119 -0
  227. package/dist/features/patterns/components/Form/MultiStepForm/components/GenericStepRenderer.js.map +1 -0
  228. package/dist/features/patterns/components/Form/MultiStepForm/components/GenericStepRenderer.module.css +76 -0
  229. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepForm.d.ts +3 -0
  230. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepForm.d.ts.map +1 -0
  231. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepForm.js +486 -0
  232. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepForm.js.map +1 -0
  233. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepForm.module.css +55 -0
  234. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepHeader.d.ts +16 -0
  235. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepHeader.d.ts.map +1 -0
  236. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepHeader.js +8 -0
  237. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepHeader.js.map +1 -0
  238. package/dist/features/patterns/components/Form/MultiStepForm/components/MultiStepHeader.module.css +77 -0
  239. package/dist/features/patterns/components/Form/MultiStepForm/components/StepIndicator.d.ts +10 -0
  240. package/dist/features/patterns/components/Form/MultiStepForm/components/StepIndicator.d.ts.map +1 -0
  241. package/dist/features/patterns/components/Form/MultiStepForm/components/StepIndicator.js +9 -0
  242. package/dist/features/patterns/components/Form/MultiStepForm/components/StepIndicator.js.map +1 -0
  243. package/dist/features/patterns/components/Form/MultiStepForm/components/StepIndicator.module.css +86 -0
  244. package/dist/features/patterns/components/Form/MultiStepForm/components/StepsContainer.d.ts +13 -0
  245. package/dist/features/patterns/components/Form/MultiStepForm/components/StepsContainer.d.ts.map +1 -0
  246. package/dist/features/patterns/components/Form/MultiStepForm/components/StepsContainer.js +9 -0
  247. package/dist/features/patterns/components/Form/MultiStepForm/components/StepsContainer.js.map +1 -0
  248. package/dist/features/patterns/components/Form/MultiStepForm/components/StepsContainer.module.css +8 -0
  249. package/dist/features/patterns/components/Form/MultiStepForm/components/SuccessScreen.d.ts +20 -0
  250. package/dist/features/patterns/components/Form/MultiStepForm/components/SuccessScreen.d.ts.map +1 -0
  251. package/dist/features/patterns/components/Form/MultiStepForm/components/SuccessScreen.js +7 -0
  252. package/dist/features/patterns/components/Form/MultiStepForm/components/SuccessScreen.js.map +1 -0
  253. package/dist/features/patterns/components/Form/MultiStepForm/components/SuccessScreen.module.css +13 -0
  254. package/dist/features/patterns/components/Form/MultiStepForm/types/types.d.ts +216 -0
  255. package/dist/features/patterns/components/Form/MultiStepForm/types/types.d.ts.map +1 -0
  256. package/dist/features/patterns/components/Form/MultiStepForm/types/types.js +2 -0
  257. package/dist/features/patterns/components/Form/MultiStepForm/types/types.js.map +1 -0
  258. package/dist/features/patterns/components/Form/MultiStepForm/utils/constants.d.ts +6 -0
  259. package/dist/features/patterns/components/Form/MultiStepForm/utils/constants.d.ts.map +1 -0
  260. package/dist/features/patterns/components/Form/MultiStepForm/utils/constants.js +22 -0
  261. package/dist/features/patterns/components/Form/MultiStepForm/utils/constants.js.map +1 -0
  262. package/dist/features/patterns/components/Form/MultiStepForm/utils/utils.d.ts +10 -0
  263. package/dist/features/patterns/components/Form/MultiStepForm/utils/utils.d.ts.map +1 -0
  264. package/dist/features/patterns/components/Form/MultiStepForm/utils/utils.js +31 -0
  265. package/dist/features/patterns/components/Form/MultiStepForm/utils/utils.js.map +1 -0
  266. package/dist/features/patterns/components/Form/VerificationCodeStep/VerificationCodeStep.d.ts +19 -0
  267. package/dist/features/patterns/components/Form/VerificationCodeStep/VerificationCodeStep.d.ts.map +1 -0
  268. package/dist/features/patterns/components/Form/VerificationCodeStep/VerificationCodeStep.js +104 -0
  269. package/dist/features/patterns/components/Form/VerificationCodeStep/VerificationCodeStep.js.map +1 -0
  270. package/dist/features/patterns/components/Form/VerificationCodeStep/VerificationCodeStep.module.css +55 -0
  271. package/dist/features/selects/components/Selects/CustomSelect.d.ts +27 -0
  272. package/dist/features/selects/components/Selects/CustomSelect.d.ts.map +1 -0
  273. package/dist/features/selects/components/Selects/CustomSelect.js +53 -0
  274. package/dist/features/selects/components/Selects/CustomSelect.js.map +1 -0
  275. package/dist/features/selects/components/Selects/CustomSelect.module.css +307 -0
  276. package/dist/features/uploads/components/ImageUpload/ImageUpload.d.ts +12 -0
  277. package/dist/features/uploads/components/ImageUpload/ImageUpload.d.ts.map +1 -0
  278. package/dist/features/uploads/components/ImageUpload/ImageUpload.js +178 -0
  279. package/dist/features/uploads/components/ImageUpload/ImageUpload.js.map +1 -0
  280. package/dist/features/uploads/components/ImageUpload/ImageUpload.module.css +254 -0
  281. package/dist/features/uploads/components/VideoUpload/VideoUpload.d.ts +12 -0
  282. package/dist/features/uploads/components/VideoUpload/VideoUpload.d.ts.map +1 -0
  283. package/dist/features/uploads/components/VideoUpload/VideoUpload.js +183 -0
  284. package/dist/features/uploads/components/VideoUpload/VideoUpload.js.map +1 -0
  285. package/dist/features/uploads/components/VideoUpload/VideoUpload.module.css +277 -0
  286. package/dist/features/uploads/components/VideoUpload/index.d.ts +2 -0
  287. package/dist/features/uploads/components/VideoUpload/index.d.ts.map +1 -0
  288. package/dist/features/uploads/components/VideoUpload/index.js +2 -0
  289. package/dist/features/uploads/components/VideoUpload/index.js.map +1 -0
  290. package/dist/index.d.ts +5 -0
  291. package/dist/index.d.ts.map +1 -0
  292. package/dist/index.js +5 -0
  293. package/dist/index.js.map +1 -0
  294. package/dist/shared/styles/globals.css +80 -0
  295. package/dist/shared/styles/tokens.css +138 -0
  296. package/dist/shared/utils/devDelay.d.ts +8 -0
  297. package/dist/shared/utils/devDelay.d.ts.map +1 -0
  298. package/dist/shared/utils/devDelay.js +11 -0
  299. package/dist/shared/utils/devDelay.js.map +1 -0
  300. package/dist/shared/utils/files.d.ts +9 -0
  301. package/dist/shared/utils/files.d.ts.map +1 -0
  302. package/dist/shared/utils/files.js +26 -0
  303. package/dist/shared/utils/files.js.map +1 -0
  304. package/dist/shared/utils/formatCurrency.d.ts +24 -0
  305. package/dist/shared/utils/formatCurrency.d.ts.map +1 -0
  306. package/dist/shared/utils/formatCurrency.js +96 -0
  307. package/dist/shared/utils/formatCurrency.js.map +1 -0
  308. package/dist/shared/utils/location/countries/ao.d.ts +3 -0
  309. package/dist/shared/utils/location/countries/ao.d.ts.map +1 -0
  310. package/dist/shared/utils/location/countries/ao.js +52 -0
  311. package/dist/shared/utils/location/countries/ao.js.map +1 -0
  312. package/dist/shared/utils/location/countries/ao.json +254 -0
  313. package/dist/shared/utils/location/countries/ao.official-2026.json +254 -0
  314. package/dist/shared/utils/location/countries/br.d.ts +3 -0
  315. package/dist/shared/utils/location/countries/br.d.ts.map +1 -0
  316. package/dist/shared/utils/location/countries/br.js +33 -0
  317. package/dist/shared/utils/location/countries/br.js.map +1 -0
  318. package/dist/shared/utils/location/countries/mz.d.ts +3 -0
  319. package/dist/shared/utils/location/countries/mz.d.ts.map +1 -0
  320. package/dist/shared/utils/location/countries/mz.js +17 -0
  321. package/dist/shared/utils/location/countries/mz.js.map +1 -0
  322. package/dist/shared/utils/location/countries/ng.d.ts +3 -0
  323. package/dist/shared/utils/location/countries/ng.d.ts.map +1 -0
  324. package/dist/shared/utils/location/countries/ng.js +43 -0
  325. package/dist/shared/utils/location/countries/ng.js.map +1 -0
  326. package/dist/shared/utils/location/countries/pt.d.ts +3 -0
  327. package/dist/shared/utils/location/countries/pt.d.ts.map +1 -0
  328. package/dist/shared/utils/location/countries/pt.js +26 -0
  329. package/dist/shared/utils/location/countries/pt.js.map +1 -0
  330. package/dist/shared/utils/location/countries/us.d.ts +3 -0
  331. package/dist/shared/utils/location/countries/us.d.ts.map +1 -0
  332. package/dist/shared/utils/location/countries/us.js +57 -0
  333. package/dist/shared/utils/location/countries/us.js.map +1 -0
  334. package/dist/shared/utils/location/countries/za.d.ts +3 -0
  335. package/dist/shared/utils/location/countries/za.d.ts.map +1 -0
  336. package/dist/shared/utils/location/countries/za.js +15 -0
  337. package/dist/shared/utils/location/countries/za.js.map +1 -0
  338. package/dist/shared/utils/location/index.d.ts +14 -0
  339. package/dist/shared/utils/location/index.d.ts.map +1 -0
  340. package/dist/shared/utils/location/index.js +131 -0
  341. package/dist/shared/utils/location/index.js.map +1 -0
  342. package/dist/shared/utils/location/types.d.ts +24 -0
  343. package/dist/shared/utils/location/types.d.ts.map +1 -0
  344. package/dist/shared/utils/location/types.js +2 -0
  345. package/dist/shared/utils/location/types.js.map +1 -0
  346. package/dist/shared/utils/logger.d.ts +43 -0
  347. package/dist/shared/utils/logger.d.ts.map +1 -0
  348. package/dist/shared/utils/logger.js +139 -0
  349. package/dist/shared/utils/logger.js.map +1 -0
  350. package/dist/shared/utils/maskedDecimal.d.ts +8 -0
  351. package/dist/shared/utils/maskedDecimal.d.ts.map +1 -0
  352. package/dist/shared/utils/maskedDecimal.js +42 -0
  353. package/dist/shared/utils/maskedDecimal.js.map +1 -0
  354. package/dist/shared/utils/slug.d.ts +12 -0
  355. package/dist/shared/utils/slug.d.ts.map +1 -0
  356. package/dist/shared/utils/slug.js +31 -0
  357. package/dist/shared/utils/slug.js.map +1 -0
  358. package/dist/shared/utils/tax-id/countries/ao.d.ts +11 -0
  359. package/dist/shared/utils/tax-id/countries/ao.d.ts.map +1 -0
  360. package/dist/shared/utils/tax-id/countries/ao.js +115 -0
  361. package/dist/shared/utils/tax-id/countries/ao.js.map +1 -0
  362. package/dist/shared/utils/tax-id/countries/br.d.ts +3 -0
  363. package/dist/shared/utils/tax-id/countries/br.d.ts.map +1 -0
  364. package/dist/shared/utils/tax-id/countries/br.js +24 -0
  365. package/dist/shared/utils/tax-id/countries/br.js.map +1 -0
  366. package/dist/shared/utils/tax-id/countries/index.d.ts +8 -0
  367. package/dist/shared/utils/tax-id/countries/index.d.ts.map +1 -0
  368. package/dist/shared/utils/tax-id/countries/index.js +12 -0
  369. package/dist/shared/utils/tax-id/countries/index.js.map +1 -0
  370. package/dist/shared/utils/tax-id/countries/pt.d.ts +3 -0
  371. package/dist/shared/utils/tax-id/countries/pt.d.ts.map +1 -0
  372. package/dist/shared/utils/tax-id/countries/pt.js +24 -0
  373. package/dist/shared/utils/tax-id/countries/pt.js.map +1 -0
  374. package/dist/shared/utils/tax-id/countries/us.d.ts +3 -0
  375. package/dist/shared/utils/tax-id/countries/us.d.ts.map +1 -0
  376. package/dist/shared/utils/tax-id/countries/us.js +24 -0
  377. package/dist/shared/utils/tax-id/countries/us.js.map +1 -0
  378. package/dist/shared/utils/tax-id/index.d.ts +14 -0
  379. package/dist/shared/utils/tax-id/index.d.ts.map +1 -0
  380. package/dist/shared/utils/tax-id/index.js +140 -0
  381. package/dist/shared/utils/tax-id/index.js.map +1 -0
  382. package/dist/shared/utils/tax-id/types.d.ts +21 -0
  383. package/dist/shared/utils/tax-id/types.d.ts.map +1 -0
  384. package/dist/shared/utils/tax-id/types.js +2 -0
  385. package/dist/shared/utils/tax-id/types.js.map +1 -0
  386. package/dist/styles.d.ts +2 -0
  387. package/dist/styles.d.ts.map +1 -0
  388. package/dist/styles.js +2 -0
  389. package/dist/styles.js.map +1 -0
  390. package/dist/tokens.d.ts +2 -0
  391. package/dist/tokens.d.ts.map +1 -0
  392. package/dist/tokens.js +2 -0
  393. package/dist/tokens.js.map +1 -0
  394. package/dist/ui.d.ts +67 -0
  395. package/dist/ui.d.ts.map +1 -0
  396. package/dist/ui.js +39 -0
  397. package/dist/ui.js.map +1 -0
  398. package/dist/utils.d.ts +7 -0
  399. package/dist/utils.d.ts.map +1 -0
  400. package/dist/utils.js +4 -0
  401. package/dist/utils.js.map +1 -0
  402. package/package.json +80 -0
@@ -0,0 +1,15 @@
1
+ export const zaLocationData = {
2
+ countryCode: "ZA",
3
+ provinces: [
4
+ { value: "EASTERN_CAPE", label: "Eastern Cape", municipalities: [{ value: "NELSON_MANDELA_BAY", label: "Nelson Mandela Bay", cities: [{ value: "GQEBERHA", label: "Gqeberha" }] }] },
5
+ { value: "FREE_STATE", label: "Free State", municipalities: [{ value: "MANGAUNG", label: "Mangaung", cities: [{ value: "BLOEMFONTEIN", label: "Bloemfontein" }] }] },
6
+ { value: "GAUTENG", label: "Gauteng", municipalities: [{ value: "CITY_OF_JOHANNESBURG", label: "City of Johannesburg", cities: [{ value: "JOHANNESBURG", label: "Johannesburg" }] }] },
7
+ { value: "KWAZULU_NATAL", label: "KwaZulu-Natal", municipalities: [{ value: "ETHEKWINI", label: "eThekwini", cities: [{ value: "DURBAN", label: "Durban" }] }] },
8
+ { value: "LIMPOPO", label: "Limpopo", municipalities: [{ value: "POLOKWANE", label: "Polokwane", cities: [{ value: "POLOKWANE", label: "Polokwane" }] }] },
9
+ { value: "MPUMALANGA", label: "Mpumalanga", municipalities: [{ value: "MBOMBELA", label: "Mbombela", cities: [{ value: "MBOMBELA", label: "Mbombela" }] }] },
10
+ { value: "NORTH_WEST", label: "North West", municipalities: [{ value: "RUSTENBURG", label: "Rustenburg", cities: [{ value: "RUSTENBURG", label: "Rustenburg" }] }] },
11
+ { value: "NORTHERN_CAPE", label: "Northern Cape", municipalities: [{ value: "SOL_PLAATJE", label: "Sol Plaatje", cities: [{ value: "KIMBERLEY", label: "Kimberley" }] }] },
12
+ { value: "WESTERN_CAPE", label: "Western Cape", municipalities: [{ value: "CITY_OF_CAPE_TOWN", label: "City of Cape Town", cities: [{ value: "CAPE_TOWN", label: "Cape Town" }] }] },
13
+ ],
14
+ };
15
+ //# sourceMappingURL=za.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"za.js","sourceRoot":"","sources":["../../../../../src/shared/utils/location/countries/za.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE;QACT,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC,EAAE;QACpL,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,C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AE;QACpK,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE;QAC1K,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE;KACrL;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { FieldDefinition } from "@/features/patterns/components/Form/MultiStepForm/types/types";
2
+ import type { LocationOption } from "./types";
3
+ export declare const normalizeCountryCode: (country?: string) => string;
4
+ export declare const getDefaultLanguageByCountry: (country?: string) => string;
5
+ export declare const getProvinceOptions: (country?: string) => LocationOption[];
6
+ export declare const getMunicipalityOptions: (country?: string, province?: string) => LocationOption[];
7
+ export declare const getCityOptions: (country?: string, province?: string, municipality?: string) => LocationOption[];
8
+ export declare const applyLocationOptionsToFields: (fields: FieldDefinition[], values: {
9
+ country?: string;
10
+ province?: string;
11
+ municipality?: string;
12
+ city?: string;
13
+ }) => FieldDefinition[];
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/utils/location/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+DAA+D,CAAC;AACrG,OAAO,KAAK,EAAuB,cAAc,EAAE,MAAM,SAAS,CAAC;AA6BnE,eAAO,MAAM,oBAAoB,GAAI,UAAU,MAAM,KAAG,MAuBvD,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,KAAG,MAG9D,CAAC;AAQF,eAAO,MAAM,kBAAkB,GAAI,UAAU,MAAM,KAAG,cAAc,EAKnE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,EAAE,WAAW,MAAM,KAAG,cAAc,EAW1F,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,WAAW,MAAM,EAAE,eAAe,MAAM,KAAG,cAAc,EAUzG,CAAC;AAEF,eAAO,MAAM,4BAA4B,GACvC,QAAQ,eAAe,EAAE,EACzB,QAAQ;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,KACpF,eAAe,EAqEjB,CAAC"}
@@ -0,0 +1,131 @@
1
+ import { aoLocationData } from "./countries/ao";
2
+ import { brLocationData } from "./countries/br";
3
+ import { mzLocationData } from "./countries/mz";
4
+ import { ngLocationData } from "./countries/ng";
5
+ import { ptLocationData } from "./countries/pt";
6
+ import { usLocationData } from "./countries/us";
7
+ import { zaLocationData } from "./countries/za";
8
+ const COUNTRY_DATA = {
9
+ AO: aoLocationData,
10
+ BR: brLocationData,
11
+ MZ: mzLocationData,
12
+ NG: ngLocationData,
13
+ PT: ptLocationData,
14
+ US: usLocationData,
15
+ ZA: zaLocationData,
16
+ };
17
+ const DEFAULT_LANGUAGE_BY_COUNTRY = {
18
+ AO: "pt",
19
+ BR: "pt",
20
+ MZ: "pt",
21
+ PT: "pt",
22
+ NG: "en",
23
+ US: "en",
24
+ ZA: "en",
25
+ };
26
+ export const normalizeCountryCode = (country) => {
27
+ var _a;
28
+ if (!country)
29
+ return "";
30
+ const upper = country.toUpperCase().trim();
31
+ const legacyToIso2 = {
32
+ AOA: "AO",
33
+ EUR: "PT",
34
+ BRL: "BR",
35
+ MZN: "MZ",
36
+ ZAR: "ZA",
37
+ NGN: "NG",
38
+ USD: "US",
39
+ USA: "US",
40
+ ANGOLA: "AO",
41
+ PORTUGAL: "PT",
42
+ BRASIL: "BR",
43
+ MOZAMBIQUE: "MZ",
44
+ "MOÇAMBIQUE": "MZ",
45
+ NIGERIA: "NG",
46
+ "AFRICA DO SUL": "ZA",
47
+ "ÁFRICA DO SUL": "ZA",
48
+ "ESTADOS UNIDOS": "US",
49
+ };
50
+ return (_a = legacyToIso2[upper]) !== null && _a !== void 0 ? _a : upper;
51
+ };
52
+ export const getDefaultLanguageByCountry = (country) => {
53
+ var _a;
54
+ const normalized = normalizeCountryCode(country);
55
+ return (_a = DEFAULT_LANGUAGE_BY_COUNTRY[normalized]) !== null && _a !== void 0 ? _a : "";
56
+ };
57
+ const withCurrentValueOption = (options, currentValue) => {
58
+ if (!currentValue)
59
+ return options;
60
+ if (options.some((opt) => opt.value === currentValue))
61
+ return options;
62
+ return [...options, { value: currentValue, label: currentValue }];
63
+ };
64
+ export const getProvinceOptions = (country) => {
65
+ const normalizedCountry = normalizeCountryCode(country);
66
+ const data = COUNTRY_DATA[normalizedCountry];
67
+ if (!data)
68
+ return [];
69
+ return data.provinces.map((province) => ({ value: province.value, label: province.label }));
70
+ };
71
+ export const getMunicipalityOptions = (country, province) => {
72
+ if (!province)
73
+ return [];
74
+ const normalizedCountry = normalizeCountryCode(country);
75
+ const data = COUNTRY_DATA[normalizedCountry];
76
+ if (!data)
77
+ return [];
78
+ const provinceData = data.provinces.find((item) => item.value === province);
79
+ if (!provinceData)
80
+ return [];
81
+ return provinceData.municipalities.map((municipality) => ({
82
+ value: municipality.value,
83
+ label: municipality.label,
84
+ }));
85
+ };
86
+ export const getCityOptions = (country, province, municipality) => {
87
+ if (!province || !municipality)
88
+ return [];
89
+ const normalizedCountry = normalizeCountryCode(country);
90
+ const data = COUNTRY_DATA[normalizedCountry];
91
+ if (!data)
92
+ return [];
93
+ const provinceData = data.provinces.find((item) => item.value === province);
94
+ if (!provinceData)
95
+ return [];
96
+ const municipalityData = provinceData.municipalities.find((item) => item.value === municipality);
97
+ if (!municipalityData)
98
+ return [];
99
+ return municipalityData.cities;
100
+ };
101
+ export const applyLocationOptionsToFields = (fields, values) => {
102
+ const normalizedCountry = normalizeCountryCode(values.country);
103
+ const provinceOptions = withCurrentValueOption(getProvinceOptions(normalizedCountry), values.province);
104
+ const municipalityOptions = withCurrentValueOption(getMunicipalityOptions(normalizedCountry, values.province), values.municipality);
105
+ // Quando o formulário NÃO tiver um campo explícito de "municipality",
106
+ // tratamos o campo "city" como "Cidade / Município" (nível único após província).
107
+ const hasMunicipalityField = fields.some((field) => field.key === "municipality");
108
+ const cityOptions = hasMunicipalityField
109
+ ? withCurrentValueOption(getCityOptions(normalizedCountry, values.province, values.municipality), values.city)
110
+ : withCurrentValueOption(getMunicipalityOptions(normalizedCountry, values.province), values.city);
111
+ return fields.map((field) => {
112
+ if (field.key === "province") {
113
+ return Object.assign(Object.assign({}, field), { type: "select", options: provinceOptions, placeholder: normalizedCountry ? "Selecione a província" : "Selecione primeiro o país", readOnly: !normalizedCountry });
114
+ }
115
+ if (field.key === "municipality") {
116
+ return Object.assign(Object.assign({}, field), { type: "select", options: municipalityOptions, placeholder: values.province ? "Selecione o município" : "Selecione primeiro a província", readOnly: !normalizedCountry || !values.province });
117
+ }
118
+ if (field.key === "city") {
119
+ // Caso clássico com município e cidade separados (ex: formulários da empresa)
120
+ if (hasMunicipalityField) {
121
+ return Object.assign(Object.assign({}, field), { type: "select", options: cityOptions, placeholder: values.municipality ? "Selecione a cidade" : "Selecione primeiro o município", readOnly: !normalizedCountry || !values.province || !values.municipality });
122
+ }
123
+ // Caso de "Cidade / Município" unificado (ex: CompleteUserForm)
124
+ return Object.assign(Object.assign({}, field), { type: "select", options: cityOptions, placeholder: normalizedCountry && values.province
125
+ ? "Selecione a cidade ou município"
126
+ : "Selecione primeiro a província", readOnly: !normalizedCountry || !values.province });
127
+ }
128
+ return field;
129
+ });
130
+ };
131
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared/utils/location/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,YAAY,GAAwC;IACxD,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,cAAc;IAClB,EAAE,EAAE,cAAc;CACnB,CAAC;AAEF,MAAM,2BAA2B,GAA2B;IAC1D,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAgB,EAAU,EAAE;;IAC/D,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IAC3C,MAAM,YAAY,GAA2B;QAC3C,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,IAAI;QACT,GAAG,EAAE,IAAI;QACT,GAAG,E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
1
+ export type LocationOption = {
2
+ value: string;
3
+ label: string;
4
+ };
5
+ export interface LocationMunicipality {
6
+ value: string;
7
+ label: string;
8
+ cities: LocationOption[];
9
+ }
10
+ export interface LocationProvince {
11
+ value: string;
12
+ label: string;
13
+ municipalities: LocationMunicipality[];
14
+ }
15
+ export interface CountryLocationResolver {
16
+ getProvinceOptions: () => LocationOption[];
17
+ getMunicipalityOptions: (provinceCode?: string) => LocationOption[];
18
+ getCityOptions: (provinceCode?: string, municipalityCode?: string) => LocationOption[];
19
+ }
20
+ export interface CountryLocationData {
21
+ countryCode: string;
22
+ provinces: LocationProvince[];
23
+ }
24
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/shared/utils/location/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9D,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,oBAAoB,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,uBAAuB;IACtC,kBAAkB,EAAE,MAAM,cAAc,EAAE,CAAC;IAC3C,sBAAsB,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,KAAK,cAAc,EAAE,CAAC;IACpE,cAAc,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAAE,MAAM,KAAK,cAAc,EAAE,CAAC;CACxF;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,gBAAgB,EAAE,CAAC;CAC/B"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/shared/utils/location/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Logger profissional para o frontend, inspirado no AppLogger do backend.
3
+ * Os logs só são visíveis em ambiente de desenvolvimento e exclusivamente no cliente.
4
+ */
5
+ declare class LoggerService {
6
+ private context;
7
+ private static readonly BLOCK_WIDTH;
8
+ constructor(context?: string);
9
+ private formatTime;
10
+ private getLevelStyles;
11
+ private print;
12
+ log(message: string, meta?: Record<string, unknown>): void;
13
+ warn(message: string, meta?: Record<string, unknown>): void;
14
+ debug(message: string, meta?: Record<string, unknown>): void;
15
+ error(message: string, error?: unknown, meta?: Record<string, unknown>): void;
16
+ /**
17
+ * Cria um bloco visual estruturado como no backend AppLogger.
18
+ */
19
+ block(level: 'log' | 'warn' | 'error' | 'debug', title: string, meta?: Record<string, unknown>): void;
20
+ /**
21
+ * Atalho para um bloco de sucesso (Verde).
22
+ */
23
+ success(title: string, meta?: Record<string, unknown>): void;
24
+ /**
25
+ * Atalho para um bloco de informação (Ciano/Azul).
26
+ */
27
+ info(title: string, meta?: Record<string, unknown>): void;
28
+ private format;
29
+ private decorateTitle;
30
+ private formatKeyValues;
31
+ private stringifyValue;
32
+ private safeJson;
33
+ }
34
+ /**
35
+ * Cria uma nova instância do Logger com um contexto específico.
36
+ */
37
+ export declare const createLogger: (context: string) => LoggerService;
38
+ /**
39
+ * Logger padrão da aplicação.
40
+ */
41
+ export declare const Logger: LoggerService;
42
+ export {};
43
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,cAAM,aAAa;IACf,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,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ger profissional para o frontend, inspirado no AppLogger do backend.
3
+ * Os logs só são visíveis em ambiente de desenvolvimento e exclusivamente no cliente.
4
+ */
5
+ const isDev = process.env.NODE_ENV !== 'production';
6
+ class LoggerService {
7
+ constructor(context = 'App') {
8
+ this.context = context;
9
+ }
10
+ formatTime() {
11
+ return new Date().toLocaleString('pt-PT', {
12
+ day: '2-digit',
13
+ month: '2-digit',
14
+ year: 'numeric',
15
+ hour: '2-digit',
16
+ minute: '2-digit',
17
+ second: '2-digit',
18
+ });
19
+ }
20
+ getLevelStyles(level) {
21
+ switch (level) {
22
+ case 'LOG': return 'color: #1aae35; font-weight: bold;'; // Verde
23
+ case 'ERROR': return 'color: #ff0000; font-weight: bold;'; // Vermelho
24
+ case 'WARN': return 'color: #dfc010; font-weight: bold;'; // Amarelo
25
+ case 'DEBUG': return 'color: #dc1dcb; font-weight: bold;'; // Magenta
26
+ case 'VERBOSE': return 'color: #1da1dc; font-weight: bold;'; // Cyan
27
+ default: return 'color: #ffffff;';
28
+ }
29
+ }
30
+ print(level, message, ...optionalParams) {
31
+ // Garantir que não corre durante a hidratação no servidor (SSR)
32
+ // e que só aparece em ambiente de desenvolvimento.
33
+ if (!isDev || typeof window === 'undefined')
34
+ return;
35
+ const time = this.formatTime();
36
+ // Gerar PID aleatório apenas no momento do log para evitar hydration mismatch
37
+ const pid = Math.floor(Math.random() * 9000) + 1000;
38
+ const pidStr = `[Next] ${pid} - `;
39
+ const baseStyle = 'color: #8c8c8c;'; // Cinzento para metadados
40
+ const levelStyle = this.getLevelStyles(level);
41
+ const contextStyle = 'color: #dfc010;'; // Amarelo para contexto
42
+ const prefix = `%c${pidStr}%c${time} %c${level.padStart(7)} %c[${this.context}] %c`;
43
+ console.log(prefix, baseStyle, baseStyle, levelStyle, contextStyle, 'color: inherit;', message, ...optionalParams);
44
+ }
45
+ log(message, meta) {
46
+ this.print('LOG', this.format(message, meta));
47
+ }
48
+ warn(message, meta) {
49
+ this.print('WARN', this.format(message, meta));
50
+ }
51
+ debug(message, meta) {
52
+ this.print('DEBUG', this.format(message, meta));
53
+ }
54
+ error(message, error, meta) {
55
+ if (error) {
56
+ this.print('ERROR', this.format(message, meta), error);
57
+ return;
58
+ }
59
+ this.print('ERROR', this.format(message, meta));
60
+ }
61
+ /**
62
+ * Cria um bloco visual estruturado como no backend AppLogger.
63
+ */
64
+ block(level, title, meta) {
65
+ const header = '='.repeat(LoggerService.BLOCK_WIDTH);
66
+ const titleLine = this.decorateTitle(title);
67
+ const details = meta && Object.keys(meta).length > 0 ? this.formatKeyValues(meta) : null;
68
+ const levelUpper = level.toUpperCase();
69
+ this.print(levelUpper, header);
70
+ this.print(levelUpper, titleLine);
71
+ this.print(levelUpper, header);
72
+ if (details) {
73
+ details.split('\n').forEach(line => this.print(levelUpper, line));
74
+ }
75
+ this.print(levelUpper, header);
76
+ }
77
+ /**
78
+ * Atalho para um bloco de sucesso (Verde).
79
+ */
80
+ success(title, meta) {
81
+ this.block('log', `✅ ${title}`, meta);
82
+ }
83
+ /**
84
+ * Atalho para um bloco de informação (Ciano/Azul).
85
+ */
86
+ info(title, meta) {
87
+ this.block('log', `ℹ️ ${title}`, meta);
88
+ }
89
+ format(message, meta) {
90
+ if (!meta || Object.keys(meta).length === 0)
91
+ return message;
92
+ return `${message} | ${this.safeJson(meta)}`;
93
+ }
94
+ decorateTitle(title) {
95
+ const cleanTitle = title.trim().toUpperCase();
96
+ const prefix = '*** ';
97
+ const suffix = ' ***';
98
+ const core = `${prefix}${cleanTitle}${suffix}`;
99
+ const remaining = Math.max(LoggerService.BLOCK_WIDTH - core.length, 0);
100
+ const leftPad = Math.floor(remaining / 2);
101
+ const rightPad = remaining - leftPad;
102
+ return `${'*'.repeat(leftPad)}${core}${'*'.repeat(rightPad)}`;
103
+ }
104
+ formatKeyValues(meta) {
105
+ const entries = Object.entries(meta);
106
+ const maxKeyLength = entries.reduce((max, [key]) => Math.max(max, key.length), 0);
107
+ return entries
108
+ .map(([key, value]) => {
109
+ const paddedKey = key.padEnd(maxKeyLength, ' ');
110
+ return `${paddedKey}: ${this.stringifyValue(value)}`;
111
+ })
112
+ .join('\n');
113
+ }
114
+ stringifyValue(value) {
115
+ if (value === null || value === undefined)
116
+ return '-';
117
+ if (typeof value === 'object')
118
+ return this.safeJson(value);
119
+ return String(value);
120
+ }
121
+ safeJson(value) {
122
+ try {
123
+ return JSON.stringify(value);
124
+ }
125
+ catch (_a) {
126
+ return '[unserializable]';
127
+ }
128
+ }
129
+ }
130
+ LoggerService.BLOCK_WIDTH = 70;
131
+ /**
132
+ * Cria uma nova instância do Logger com um contexto específico.
133
+ */
134
+ export const createLogger = (context) => new LoggerService(context);
135
+ /**
136
+ * Logger padrão da aplicação.
137
+ */
138
+ export const Logger = createLogger('AdminERP');
139
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../../src/shared/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,CAAC;AAIpD,MAAM,aAAa;IAIf,YAAY,UAAkB,KAAK;QAC/B,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAEO,UAAU;QACd,OAAO,IAAI,IAAI,EAAE,CAAC,cAAc,CAAC,OAAO,EAAE;YACtC,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;SACpB,CAAC,CAAC;IACP,CAAC;IAEO,cAAc,CAAC,KAAe;QAClC,QAAQ,KAAK,EAAE,CAAC;YACZ,KAAK,KAAK,CAAC,CAAC,OAAO,oCAAoC,CAAC,CAAC,QAAQ;YACjE,KAAK,OAAO,CAAC,CAAC,OAAO,oCAAoC,CAAC,CAAC,WAAW;YACtE,KAAK,MAAM,CAAC,CAAC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7C;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAe,EAAE,EAAE,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,CAAC;AAE5E;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ export interface MaskedDecimalOptions {
2
+ decimals?: number;
3
+ showThousandsSeparator?: boolean;
4
+ }
5
+ export declare function maskDecimalCommaFromInput(raw: string, options?: MaskedDecimalOptions): string;
6
+ export declare function formatDecimalCommaFromNumber(value: unknown, options?: MaskedDecimalOptions): string;
7
+ export declare function parseDecimalCommaToNumber(input: string): number;
8
+ //# sourceMappingURL=maskedDecimal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maskedDecimal.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/maskedDecimal.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,oBAAyB,UAkBxF;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,GAAE,oBAAyB,UAkB9F;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,UAItD"}
@@ -0,0 +1,42 @@
1
+ export function maskDecimalCommaFromInput(raw, options = {}) {
2
+ var _a, _b;
3
+ const decimals = (_a = options.decimals) !== null && _a !== void 0 ? _a : 2;
4
+ const showThousands = (_b = options.showThousandsSeparator) !== null && _b !== void 0 ? _b : true;
5
+ const digits = (raw !== null && raw !== void 0 ? raw : '').replace(/\D/g, '');
6
+ if (decimals === 0)
7
+ return digits || '0';
8
+ const padded = digits.padStart(decimals + 1, '0');
9
+ const intPartRaw = padded.slice(0, -decimals);
10
+ const decPart = padded.slice(-decimals);
11
+ const intPart = intPartRaw.replace(/^0+(?=\d)/, '') || '0';
12
+ if (!showThousands)
13
+ return `${intPart},${decPart}`;
14
+ // Add thousands separator (dot)
15
+ const withSeparator = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
16
+ return `${withSeparator},${decPart}`;
17
+ }
18
+ export function formatDecimalCommaFromNumber(value, options = {}) {
19
+ var _a, _b;
20
+ const decimals = (_a = options.decimals) !== null && _a !== void 0 ? _a : 2;
21
+ const showThousands = (_b = options.showThousandsSeparator) !== null && _b !== void 0 ? _b : true;
22
+ const n = Number(value !== null && value !== void 0 ? value : 0);
23
+ if (!Number.isFinite(n))
24
+ return maskDecimalCommaFromInput('', { decimals, showThousandsSeparator: showThousands });
25
+ const fixed = n.toFixed(decimals);
26
+ const [intPart, decPart = ''] = fixed.split('.');
27
+ if (decimals === 0) {
28
+ if (!showThousands)
29
+ return intPart;
30
+ return intPart.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
31
+ }
32
+ if (!showThousands)
33
+ return `${intPart},${decPart}`;
34
+ const intWithSeparator = intPart.replace(/\B(?=(\d{3})+(?!\d))/g, '.');
35
+ return `${intWithSeparator},${decPart}`;
36
+ }
37
+ export function parseDecimalCommaToNumber(input) {
38
+ const normalized = (input !== null && input !== void 0 ? input : '').replace(/\s/g, '').replace(/\./g, '').replace(',', '.');
39
+ const parsed = Number(normalized);
40
+ return Number.isFinite(parsed) ? parsed : NaN;
41
+ }
42
+ //# sourceMappingURL=maskedDecimal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"maskedDecimal.js","sourceRoot":"","sources":["../../../src/shared/utils/maskedDecimal.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,yBAAyB,CAAC,GAAW,EAAE,UAAgC,EAAE;;IACvF,MAAM,QAAQ,GAAG,MAAA,OAAO,CAAC,QAAQ,mCAAI,CAAC,CAAC;IACvC,MAAM,aAAa,GAAG,MAAA,OAAO,CAAC,sBAAsB,mCAAI,IAAI,CAA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K,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClC,MAAM,CAAC,OAAO,EAAE,OAAO,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAEjD,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;QACnB,IAAI,CAAC,aAAa;YAAE,OAAO,OAAO,CAAC;QACnC,OAAO,OAAO,CAAC,OAAO,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,CAAC,aAAa;QAAE,OAAO,GAAG,OAAO,IAAI,OAAO,EAAE,CAAC;IAEnD,MAAM,gBAAgB,GAAG,OAAO,CAAC,OAAO,CAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;IACvE,OAAO,GAAG,gBAAgB,IAAI,OAAO,EAAE,CAAC;AAC1C,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,KAAa;IACrD,MAAM,UAAU,GAAG,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACzF,MAAM,MAAM,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;AAChD,CAAC"}
@@ -0,0 +1,12 @@
1
+ export declare const normalizeSlugText: (text?: string, fallback?: string) => string;
2
+ interface BuildSlugParams {
3
+ name?: string;
4
+ id: string;
5
+ delimiter?: string;
6
+ prefix?: string;
7
+ fallbackName?: string;
8
+ }
9
+ export declare const buildSlug: ({ name, id, delimiter, prefix, fallbackName, }: BuildSlugParams) => string;
10
+ export declare const extractIdFromSlug: (slug: string, delimiter?: string) => string | null;
11
+ export {};
12
+ //# sourceMappingURL=slug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slug.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/slug.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,GAAI,OAAO,MAAM,EAAE,iBAA2B,WAY3E,CAAC;AAEF,UAAU,eAAe;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,SAAS,GAAI,gDAMvB,eAAe,WAIjB,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,MAAM,MAAM,EAAE,kBAA6B,kBAO5E,CAAC"}
@@ -0,0 +1,31 @@
1
+ const DEFAULT_FALLBACK = 'item';
2
+ const DEFAULT_DELIMITER = '__';
3
+ export const normalizeSlugText = (text, fallback = DEFAULT_FALLBACK) => {
4
+ const base = text === null || text === void 0 ? void 0 : text.trim();
5
+ if (!base)
6
+ return fallback;
7
+ return base
8
+ .toLowerCase()
9
+ .normalize('NFD')
10
+ .replace(/[\u0300-\u036f]/g, '')
11
+ .replace(/[^a-z0-9\s-]/g, '')
12
+ .replace(/\s+/g, '-')
13
+ .replace(/-+/g, '-')
14
+ .trim();
15
+ };
16
+ export const buildSlug = ({ name, id, delimiter = DEFAULT_DELIMITER, prefix = '', fallbackName = DEFAULT_FALLBACK, }) => {
17
+ if (!id)
18
+ throw new Error('buildSlug: id é obrigatório');
19
+ const safeName = normalizeSlugText(name, fallbackName);
20
+ return `${prefix}${safeName}${delimiter}${id}`;
21
+ };
22
+ export const extractIdFromSlug = (slug, delimiter = DEFAULT_DELIMITER) => {
23
+ if (!slug)
24
+ return null;
25
+ const index = slug.lastIndexOf(delimiter);
26
+ if (index === -1)
27
+ return null;
28
+ const id = slug.substring(index + delimiter.length).trim();
29
+ return id || null;
30
+ };
31
+ //# sourceMappingURL=slug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slug.js","sourceRoot":"","sources":["../../../src/shared/utils/slug.ts"],"names":[],"mappings":"AAAA,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAa,EAAE,QAAQ,GAAG,gBAAgB,EAAE,EAAE;IAC9E,MAAM,IAAI,GAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,EAAE,CAAC;IAC1B,IAAI,CAAC,IAAI;QAAE,OAAO,QAAQ,CAAC;IAE3B,OAAO,IAAI;SACR,WAAW,EAAE;SACb,SAAS,CAAC,KAAK,CAAC;SAChB,OAAO,CAAC,kBAAkB,EAAE,EAAE,CAAC;SAC/B,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC5B,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,IAAI,EAAE,CAAC;AACZ,CAAC,CAAC;AAUF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,IAAI,EACJ,EAAE,EACF,SAAS,GAAG,iBAAiB,EAC7B,MAAM,GAAG,EAAE,EACX,YAAY,GAAG,gBAAgB,GACf,EAAE,EAAE;IACpB,IAAI,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACvD,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,EAAE,EAAE,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,SAAS,GAAG,iBAAiB,EAAE,EAAE;IAC/E,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IACvB,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;IAC1C,IAAI,KAAK,KAAK,CAAC,CAAC;QAAE,OAAO,IAAI,CAAC;IAE9B,MAAM,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;IAC3D,OAAO,EAAE,IAAI,IAAI,CAAC;AACpB,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { TaxIdCountryConfig } from '../types';
2
+ export declare const ANGOLA_COMPANY_NIF_REGEX: RegExp;
3
+ export declare const ANGOLA_IDENTITY_DOCUMENT_REGEX: RegExp;
4
+ export declare const normalizeAngolaCompanyNif: (value?: string | null) => string;
5
+ export declare const isValidAngolaCompanyNif: (value?: string | null) => boolean;
6
+ export declare const getAngolaCompanyNifError: (value?: string | null) => "NIF empresarial deve começar por 5 e ter 10 dígitos numéricos" | "NIF empresarial é obrigatório" | "NIF empresarial deve conter apenas números" | undefined;
7
+ export declare const normalizeAngolaIdentityDocument: (value?: string | null) => string;
8
+ export declare const isValidAngolaIdentityDocument: (value?: string | null) => boolean;
9
+ export declare const getAngolaIdentityDocumentError: (value?: string | null) => string | undefined;
10
+ export declare const aoTaxIdConfig: TaxIdCountryConfig;
11
+ //# sourceMappingURL=ao.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ao.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/tax-id/countries/ao.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,eAAO,MAAM,wBAAwB,QAAa,CAAC;AACnD,eAAO,MAAM,8BAA8B,QAA0B,CAAC;AAsDtE,eAAO,MAAM,yBAAyB,GAAI,QAAQ,MAAM,GAAG,IAAI,WAAwB,CAAC;AAExF,eAAO,MAAM,uBAAuB,GAAI,QAAQ,MAAM,GAAG,IAAI,YACI,CAAC;AAElE,eAAO,MAAM,wBAAwB,GAAI,QAAQ,MAAM,GAAG,IAAI,iKAM7D,CAAC;AAEF,eAAO,MAAM,+BAA+B,GAAI,QAAQ,MAAM,GAAG,IAAI,WAAsC,CAAC;AAE5G,eAAO,MAAM,6BAA6B,GAAI,QAAQ,MAAM,GAAG,IAAI,YACU,CAAC;AAE9E,eAAO,MAAM,8BAA8B,GAAI,QAAQ,MAAM,GAAG,IAAI,uBAkBnE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,kBAwB3B,CAAC"}