linear-react-components-ui 1.1.26-beta.2 → 1.1.26-beta.21

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 (1026) hide show
  1. package/lib/@types/ColorStyles.d.ts +1 -0
  2. package/lib/@types/Position.d.ts +1 -0
  3. package/lib/_virtual/_commonjsHelpers.js +9 -0
  4. package/lib/_virtual/_commonjsHelpers.js.map +1 -0
  5. package/lib/_virtual/compiler-runtime.js +6 -0
  6. package/lib/_virtual/compiler-runtime.js.map +1 -0
  7. package/lib/_virtual/compiler-runtime2.js +5 -0
  8. package/lib/_virtual/compiler-runtime2.js.map +1 -0
  9. package/lib/_virtual/index.js +8 -0
  10. package/lib/_virtual/index.js.map +1 -0
  11. package/lib/_virtual/index2.js +5 -0
  12. package/lib/_virtual/index2.js.map +1 -0
  13. package/lib/_virtual/index3.js +5 -0
  14. package/lib/_virtual/index3.js.map +1 -0
  15. package/lib/_virtual/lodash.js +9 -0
  16. package/lib/_virtual/lodash.js.map +1 -0
  17. package/lib/_virtual/lodash2.js +5 -0
  18. package/lib/_virtual/lodash2.js.map +1 -0
  19. package/lib/_virtual/memoize.js +8 -0
  20. package/lib/_virtual/memoize.js.map +1 -0
  21. package/lib/_virtual/react-compiler-runtime.development.js +5 -0
  22. package/lib/_virtual/react-compiler-runtime.development.js.map +1 -0
  23. package/lib/_virtual/react-compiler-runtime.production.js +5 -0
  24. package/lib/_virtual/react-compiler-runtime.production.js.map +1 -0
  25. package/lib/_virtual/react-is.development.js +5 -0
  26. package/lib/_virtual/react-is.development.js.map +1 -0
  27. package/lib/_virtual/react-is.production.min.js +5 -0
  28. package/lib/_virtual/react-is.production.min.js.map +1 -0
  29. package/lib/alerts/AlertContainer.js +9 -2
  30. package/lib/alerts/AlertContainer.js.map +1 -0
  31. package/lib/alerts/AlertProvider.js +28 -21
  32. package/lib/alerts/AlertProvider.js.map +1 -0
  33. package/lib/alerts/BaseAlert.js +13 -9
  34. package/lib/alerts/BaseAlert.js.map +1 -0
  35. package/lib/alerts/Message.js +92 -64
  36. package/lib/alerts/Message.js.map +1 -0
  37. package/lib/alerts/helpers.js +1 -0
  38. package/lib/alerts/helpers.js.map +1 -0
  39. package/lib/alerts/index.d.ts +3 -3
  40. package/lib/alerts/index.js +3 -1
  41. package/lib/alerts/index.js.map +1 -0
  42. package/lib/alerts/withAlert.d.ts +2 -2
  43. package/lib/alerts/withAlert.js +12 -7
  44. package/lib/alerts/withAlert.js.map +1 -0
  45. package/lib/assets/styles/alerts.css +1 -0
  46. package/lib/assets/styles/badge.css +1 -0
  47. package/lib/assets/{button.css → styles/button.css} +1 -1
  48. package/lib/assets/styles/calendar.css +1 -0
  49. package/lib/assets/styles/checkbox.css +1 -0
  50. package/lib/assets/styles/checkbox2.css +1 -0
  51. package/lib/assets/styles/colorpicker.css +1 -0
  52. package/lib/assets/styles/datepicker.css +1 -0
  53. package/lib/assets/styles/datepicker2.css +1 -0
  54. package/lib/assets/styles/dialog.css +1 -0
  55. package/lib/assets/styles/drawers.css +1 -0
  56. package/lib/assets/styles/dropdown.css +1 -0
  57. package/lib/assets/{index12.css → styles/fieldset.css} +1 -1
  58. package/lib/assets/styles/file.css +1 -0
  59. package/lib/assets/styles/filefield.css +1 -0
  60. package/lib/assets/styles/floatMenu.css +1 -0
  61. package/lib/assets/styles/gridlayout.css +1 -0
  62. package/lib/assets/{InputTextBase.css → styles/input.css} +1 -1
  63. package/lib/assets/{label.css → styles/label.css} +1 -1
  64. package/lib/assets/styles/list.css +1 -0
  65. package/lib/assets/styles/multiSelect.css +1 -0
  66. package/lib/assets/styles/numberfield.css +1 -0
  67. package/lib/assets/styles/panel.css +1 -0
  68. package/lib/assets/styles/periodpicker.css +1 -0
  69. package/lib/assets/styles/progress.css +1 -0
  70. package/lib/assets/{radio.css → styles/radio.css} +1 -1
  71. package/lib/assets/styles/radiofield.css +1 -0
  72. package/lib/assets/styles/select.css +1 -0
  73. package/lib/assets/styles/selectfield.css +1 -0
  74. package/lib/assets/styles/shortcuts.css +1 -0
  75. package/lib/assets/styles/sidenav.css +1 -0
  76. package/lib/assets/styles/skeleton.css +1 -0
  77. package/lib/assets/styles/slot.css +1 -0
  78. package/lib/assets/styles/table.css +1 -0
  79. package/lib/assets/styles/tabs.css +1 -0
  80. package/lib/assets/styles/textfield.css +1 -0
  81. package/lib/assets/styles/toolbar.css +1 -0
  82. package/lib/assets/styles/tooltip.css +1 -0
  83. package/lib/assets/styles/treetable.css +1 -0
  84. package/lib/assets/styles/treeview.css +1 -0
  85. package/lib/assets/styles/uitour.css +1 -0
  86. package/lib/assets/styles/wizard.css +1 -0
  87. package/lib/avatar/index.js +48 -68
  88. package/lib/avatar/index.js.map +1 -0
  89. package/lib/badge/index.js +27 -23
  90. package/lib/badge/index.js.map +1 -0
  91. package/lib/buttons/ActivateButton.js +10 -4
  92. package/lib/buttons/ActivateButton.js.map +1 -0
  93. package/lib/buttons/AddButton.js +13 -5
  94. package/lib/buttons/AddButton.js.map +1 -0
  95. package/lib/buttons/Button.js +18 -6
  96. package/lib/buttons/Button.js.map +1 -0
  97. package/lib/buttons/CancelButton.js +15 -4
  98. package/lib/buttons/CancelButton.js.map +1 -0
  99. package/lib/buttons/DangerButton.js +16 -4
  100. package/lib/buttons/DangerButton.js.map +1 -0
  101. package/lib/buttons/DefaultButton.js +90 -120
  102. package/lib/buttons/DefaultButton.js.map +1 -0
  103. package/lib/buttons/DestroyButton.d.ts +1 -1
  104. package/lib/buttons/DestroyButton.js +17 -5
  105. package/lib/buttons/DestroyButton.js.map +1 -0
  106. package/lib/buttons/EditButton.js +10 -4
  107. package/lib/buttons/EditButton.js.map +1 -0
  108. package/lib/buttons/InactivateButton.js +10 -4
  109. package/lib/buttons/InactivateButton.js.map +1 -0
  110. package/lib/buttons/InfoButton.js +16 -4
  111. package/lib/buttons/InfoButton.js.map +1 -0
  112. package/lib/buttons/PrimaryButton.js +16 -4
  113. package/lib/buttons/PrimaryButton.js.map +1 -0
  114. package/lib/buttons/RestoreButton.js +10 -4
  115. package/lib/buttons/RestoreButton.js.map +1 -0
  116. package/lib/buttons/SaveButton.js +15 -4
  117. package/lib/buttons/SaveButton.js.map +1 -0
  118. package/lib/buttons/SuccessButton.js +15 -3
  119. package/lib/buttons/SuccessButton.js.map +1 -0
  120. package/lib/buttons/WarningButton.js +16 -4
  121. package/lib/buttons/WarningButton.js.map +1 -0
  122. package/lib/buttons/button_container/index.js +22 -16
  123. package/lib/buttons/button_container/index.js.map +1 -0
  124. package/lib/buttons/index.d.ts +1 -1
  125. package/lib/buttons/index.js +3 -1
  126. package/lib/buttons/index.js.map +1 -0
  127. package/lib/buttons/split_button/index.d.ts +2 -2
  128. package/lib/buttons/split_button/index.js +57 -57
  129. package/lib/buttons/split_button/index.js.map +1 -0
  130. package/lib/buttons/types.d.ts +6 -6
  131. package/lib/calendar/DangerCalendar.d.ts +1 -1
  132. package/lib/calendar/DangerCalendar.js +14 -4
  133. package/lib/calendar/DangerCalendar.js.map +1 -0
  134. package/lib/calendar/InfoCalendar.d.ts +1 -1
  135. package/lib/calendar/InfoCalendar.js +13 -3
  136. package/lib/calendar/InfoCalendar.js.map +1 -0
  137. package/lib/calendar/PrimaryCalendar.d.ts +1 -1
  138. package/lib/calendar/PrimaryCalendar.js +13 -3
  139. package/lib/calendar/PrimaryCalendar.js.map +1 -0
  140. package/lib/calendar/SuccessCalendar.d.ts +1 -1
  141. package/lib/calendar/SuccessCalendar.js +14 -4
  142. package/lib/calendar/SuccessCalendar.js.map +1 -0
  143. package/lib/calendar/WarningCalendar.d.ts +1 -1
  144. package/lib/calendar/WarningCalendar.js +14 -4
  145. package/lib/calendar/WarningCalendar.js.map +1 -0
  146. package/lib/calendar/base/helpers.d.ts +1 -2
  147. package/lib/calendar/base/helpers.js +30 -94
  148. package/lib/calendar/base/helpers.js.map +1 -0
  149. package/lib/calendar/base/index.js +167 -102
  150. package/lib/calendar/base/index.js.map +1 -0
  151. package/lib/calendar/index.js +1 -0
  152. package/lib/calendar/index.js.map +1 -0
  153. package/lib/checkbox/index.d.ts +1 -2
  154. package/lib/checkbox/index.js +97 -27
  155. package/lib/checkbox/index.js.map +1 -0
  156. package/lib/checkbox/types.d.ts +1 -0
  157. package/lib/dialog/Alert.js +20 -20
  158. package/lib/dialog/Alert.js.map +1 -0
  159. package/lib/dialog/Custom.js +44 -30
  160. package/lib/dialog/Custom.js.map +1 -0
  161. package/lib/dialog/Error.js +20 -20
  162. package/lib/dialog/Error.js.map +1 -0
  163. package/lib/dialog/Information.js +20 -20
  164. package/lib/dialog/Information.js.map +1 -0
  165. package/lib/dialog/Question.js +45 -60
  166. package/lib/dialog/Question.js.map +1 -0
  167. package/lib/dialog/Warning.js +20 -20
  168. package/lib/dialog/Warning.js.map +1 -0
  169. package/lib/dialog/base/Content.js +14 -4
  170. package/lib/dialog/base/Content.js.map +1 -0
  171. package/lib/dialog/base/Footer.js +9 -3
  172. package/lib/dialog/base/Footer.js.map +1 -0
  173. package/lib/dialog/base/Header.js +39 -5
  174. package/lib/dialog/base/Header.js.map +1 -0
  175. package/lib/dialog/base/index.d.ts +5 -2
  176. package/lib/dialog/base/index.js +180 -7
  177. package/lib/dialog/base/index.js.map +1 -0
  178. package/lib/dialog/base/style.js +10 -0
  179. package/lib/dialog/base/style.js.map +1 -0
  180. package/lib/dialog/form/index.d.ts +1 -2
  181. package/lib/dialog/form/index.js +109 -13
  182. package/lib/dialog/form/index.js.map +1 -0
  183. package/lib/dialog/index.js +4 -3
  184. package/lib/dialog/index.js.map +1 -0
  185. package/lib/dialog/types.d.ts +10 -5
  186. package/lib/dialog/wizard/index.d.ts +1 -2
  187. package/lib/dialog/wizard/index.js +65 -12
  188. package/lib/dialog/wizard/index.js.map +1 -0
  189. package/lib/dialog/wizard/progressbar.js +29 -3
  190. package/lib/dialog/wizard/progressbar.js.map +1 -0
  191. package/lib/dialog/wizard/step.js +17 -3
  192. package/lib/dialog/wizard/step.js.map +1 -0
  193. package/lib/dialog/wizard/useWizard.js +41 -27
  194. package/lib/dialog/wizard/useWizard.js.map +1 -0
  195. package/lib/drawer/Content.js +16 -8
  196. package/lib/drawer/Content.js.map +1 -0
  197. package/lib/drawer/Drawer.d.ts +1 -2
  198. package/lib/drawer/Drawer.js +63 -58
  199. package/lib/drawer/Drawer.js.map +1 -0
  200. package/lib/drawer/Header.js +54 -40
  201. package/lib/drawer/Header.js.map +1 -0
  202. package/lib/drawer/helpers.d.ts +1 -2
  203. package/lib/drawer/helpers.js +4 -3
  204. package/lib/drawer/helpers.js.map +1 -0
  205. package/lib/drawer/index.js +6 -4
  206. package/lib/drawer/index.js.map +1 -0
  207. package/lib/drawer/types.d.ts +4 -3
  208. package/lib/dropdown/Popup.js +19 -16
  209. package/lib/dropdown/Popup.js.map +1 -0
  210. package/lib/dropdown/index.d.ts +3 -0
  211. package/lib/dropdown/index.js +6 -0
  212. package/lib/dropdown/index.js.map +1 -0
  213. package/lib/dropdown/withDropdown.d.ts +3 -3
  214. package/lib/dropdown/withDropdown.js +77 -50
  215. package/lib/dropdown/withDropdown.js.map +1 -0
  216. package/lib/fieldset/index.js +67 -47
  217. package/lib/fieldset/index.js.map +1 -0
  218. package/lib/form/Field.js +107 -62
  219. package/lib/form/Field.js.map +1 -0
  220. package/lib/form/FieldArray.js +44 -69
  221. package/lib/form/FieldArray.js.map +1 -0
  222. package/lib/form/FieldNumber.js +52 -37
  223. package/lib/form/FieldNumber.js.map +1 -0
  224. package/lib/form/FieldPeriod.js +88 -59
  225. package/lib/form/FieldPeriod.js.map +1 -0
  226. package/lib/form/helpers.d.ts +2 -3
  227. package/lib/form/helpers.js +22 -19
  228. package/lib/form/helpers.js.map +1 -0
  229. package/lib/form/index.d.ts +1 -1
  230. package/lib/form/index.js +141 -137
  231. package/lib/form/index.js.map +1 -0
  232. package/lib/form/types.d.ts +14 -2
  233. package/lib/form/withFieldHOC.d.ts +2 -2
  234. package/lib/form/withFieldHOC.js +59 -48
  235. package/lib/form/withFieldHOC.js.map +1 -0
  236. package/lib/form/withFormSecurity.d.ts +3 -3
  237. package/lib/form/withFormSecurity.js +19 -21
  238. package/lib/form/withFormSecurity.js.map +1 -0
  239. package/lib/form2/helpers.d.ts +5 -0
  240. package/lib/form2/helpers.js +24 -0
  241. package/lib/form2/helpers.js.map +1 -0
  242. package/lib/form2/index.d.ts +7 -0
  243. package/lib/form2/index.js +23 -0
  244. package/lib/form2/index.js.map +1 -0
  245. package/lib/form2/types.d.ts +128 -0
  246. package/lib/form2/useForm/index.d.ts +3 -0
  247. package/lib/form2/useForm/index.js +117 -0
  248. package/lib/form2/useForm/index.js.map +1 -0
  249. package/lib/gridlayout/GridCol.js +22 -20
  250. package/lib/gridlayout/GridCol.js.map +1 -0
  251. package/lib/gridlayout/GridRow.js +24 -21
  252. package/lib/gridlayout/GridRow.js.map +1 -0
  253. package/lib/gridlayout/index.js +1 -0
  254. package/lib/gridlayout/index.js.map +1 -0
  255. package/lib/hint/helpers.js +10 -5
  256. package/lib/hint/helpers.js.map +1 -0
  257. package/lib/hint/index.js +29 -25
  258. package/lib/hint/index.js.map +1 -0
  259. package/lib/icons/helper.d.ts +20 -0
  260. package/lib/icons/helper.js +163 -569
  261. package/lib/icons/helper.js.map +1 -0
  262. package/lib/icons/index.d.ts +2 -5
  263. package/lib/icons/index.js +72 -57
  264. package/lib/icons/index.js.map +1 -0
  265. package/lib/icons/types.d.ts +2 -6
  266. package/lib/index.js +24 -25
  267. package/lib/index.js.map +1 -0
  268. package/lib/inputs/base/InputTextBase.js +142 -223
  269. package/lib/inputs/base/InputTextBase.js.map +1 -0
  270. package/lib/inputs/base/helpers.d.ts +3 -3
  271. package/lib/inputs/base/helpers.js +8 -5
  272. package/lib/inputs/base/helpers.js.map +1 -0
  273. package/lib/inputs/base/types.d.ts +6 -16
  274. package/lib/inputs/color/index.js +55 -75
  275. package/lib/inputs/color/index.js.map +1 -0
  276. package/lib/inputs/color/types.d.ts +1 -1
  277. package/lib/inputs/date/Dialog.js +16 -16
  278. package/lib/inputs/date/Dialog.js.map +1 -0
  279. package/lib/inputs/date/Dropdown.js +17 -14
  280. package/lib/inputs/date/Dropdown.js.map +1 -0
  281. package/lib/inputs/date/helpers.d.ts +30 -1
  282. package/lib/inputs/date/helpers.js +49 -7
  283. package/lib/inputs/date/helpers.js.map +1 -0
  284. package/lib/inputs/date/index.js +111 -156
  285. package/lib/inputs/date/index.js.map +1 -0
  286. package/lib/inputs/date/types.d.ts +3 -2
  287. package/lib/inputs/errorMessage/index.d.ts +1 -2
  288. package/lib/inputs/errorMessage/index.js +23 -13
  289. package/lib/inputs/errorMessage/index.js.map +1 -0
  290. package/lib/inputs/file/DefaultFile.js +66 -68
  291. package/lib/inputs/file/DefaultFile.js.map +1 -0
  292. package/lib/inputs/file/DragDropFile.js +99 -155
  293. package/lib/inputs/file/DragDropFile.js.map +1 -0
  294. package/lib/inputs/file/File.d.ts +1 -1
  295. package/lib/inputs/file/File.js +24 -40
  296. package/lib/inputs/file/File.js.map +1 -0
  297. package/lib/inputs/file/FileButtonSettings.js +22 -18
  298. package/lib/inputs/file/FileButtonSettings.js.map +1 -0
  299. package/lib/inputs/file/helpers.js +1 -0
  300. package/lib/inputs/file/helpers.js.map +1 -0
  301. package/lib/inputs/file/index.js +1 -0
  302. package/lib/inputs/file/index.js.map +1 -0
  303. package/lib/inputs/index.d.ts +14 -0
  304. package/lib/inputs/index.js +40 -0
  305. package/lib/inputs/index.js.map +1 -0
  306. package/lib/inputs/inputHOC.d.ts +2 -2
  307. package/lib/inputs/inputHOC.js +39 -21
  308. package/lib/inputs/inputHOC.js.map +1 -0
  309. package/lib/inputs/mask/BaseMask.d.ts +1 -1
  310. package/lib/inputs/mask/BaseMask.js +113 -2620
  311. package/lib/inputs/mask/BaseMask.js.map +1 -0
  312. package/lib/inputs/mask/Cnpj.js +43 -36
  313. package/lib/inputs/mask/Cnpj.js.map +1 -0
  314. package/lib/inputs/mask/Cpf.js +46 -33
  315. package/lib/inputs/mask/Cpf.js.map +1 -0
  316. package/lib/inputs/mask/Phone.js +11 -6
  317. package/lib/inputs/mask/Phone.js.map +1 -0
  318. package/lib/inputs/mask/ZipCode.js +10 -4
  319. package/lib/inputs/mask/ZipCode.js.map +1 -0
  320. package/lib/inputs/mask/helpers.d.ts +2 -49
  321. package/lib/inputs/mask/helpers.js +60 -54
  322. package/lib/inputs/mask/helpers.js.map +1 -0
  323. package/lib/inputs/mask/index.js +1 -0
  324. package/lib/inputs/mask/index.js.map +1 -0
  325. package/lib/inputs/mask/types.d.ts +2 -1
  326. package/lib/inputs/multiSelect/ActionButtons.js +37 -48
  327. package/lib/inputs/multiSelect/ActionButtons.js.map +1 -0
  328. package/lib/inputs/multiSelect/Dropdown.js +96 -133
  329. package/lib/inputs/multiSelect/Dropdown.js.map +1 -0
  330. package/lib/inputs/multiSelect/helper.js +5 -7
  331. package/lib/inputs/multiSelect/helper.js.map +1 -0
  332. package/lib/inputs/multiSelect/index.js +183 -127
  333. package/lib/inputs/multiSelect/index.js.map +1 -0
  334. package/lib/inputs/multiSelect/types.d.ts +3 -1
  335. package/lib/inputs/number/BaseNumber.js +49 -36
  336. package/lib/inputs/number/BaseNumber.js.map +1 -0
  337. package/lib/inputs/number/Currency.js +20 -12
  338. package/lib/inputs/number/Currency.js.map +1 -0
  339. package/lib/inputs/number/Decimal.js +10 -4
  340. package/lib/inputs/number/Decimal.js.map +1 -0
  341. package/lib/inputs/number/format_number.d.ts +1 -1
  342. package/lib/inputs/number/format_number.js +5 -5
  343. package/lib/inputs/number/format_number.js.map +1 -0
  344. package/lib/inputs/number/index.js +33 -35
  345. package/lib/inputs/number/index.js.map +1 -0
  346. package/lib/inputs/number/types.d.ts +3 -3
  347. package/lib/inputs/period/Dialog.js +17 -16
  348. package/lib/inputs/period/Dialog.js.map +1 -0
  349. package/lib/inputs/period/Dropdown.js +16 -15
  350. package/lib/inputs/period/Dropdown.js.map +1 -0
  351. package/lib/inputs/period/PeriodList.js +42 -27
  352. package/lib/inputs/period/PeriodList.js.map +1 -0
  353. package/lib/inputs/period/helper.js +20 -23
  354. package/lib/inputs/period/helper.js.map +1 -0
  355. package/lib/inputs/period/index.js +185 -337
  356. package/lib/inputs/period/index.js.map +1 -0
  357. package/lib/inputs/period/types.d.ts +4 -1
  358. package/lib/inputs/search/index.js +103 -72
  359. package/lib/inputs/search/index.js.map +1 -0
  360. package/lib/inputs/select/ActionButtons.js +25 -45
  361. package/lib/inputs/select/ActionButtons.js.map +1 -0
  362. package/lib/inputs/select/Dropdown.js +53 -101
  363. package/lib/inputs/select/Dropdown.js.map +1 -0
  364. package/lib/inputs/select/helper.d.ts +1 -1
  365. package/lib/inputs/select/helper.js +43 -45
  366. package/lib/inputs/select/helper.js.map +1 -0
  367. package/lib/inputs/select/index.js +25 -26
  368. package/lib/inputs/select/index.js.map +1 -0
  369. package/lib/inputs/select/multiple/Selecteds.d.ts +1 -1
  370. package/lib/inputs/select/multiple/Selecteds.js +25 -19
  371. package/lib/inputs/select/multiple/Selecteds.js.map +1 -0
  372. package/lib/inputs/select/multiple/index.js +104 -171
  373. package/lib/inputs/select/multiple/index.js.map +1 -0
  374. package/lib/inputs/select/simple/index.js +126 -193
  375. package/lib/inputs/select/simple/index.js.map +1 -0
  376. package/lib/inputs/select/types.d.ts +2 -0
  377. package/lib/inputs/text/index.js +10 -4
  378. package/lib/inputs/text/index.js.map +1 -0
  379. package/lib/inputs/text/types.d.ts +1 -4
  380. package/lib/inputs/textarea/index.js +13 -14
  381. package/lib/inputs/textarea/index.js.map +1 -0
  382. package/lib/inputs/types.d.ts +3 -2
  383. package/lib/inputs2/checkboxfield/index.d.ts +32 -0
  384. package/lib/inputs2/checkboxfield/index.js +114 -0
  385. package/lib/inputs2/checkboxfield/index.js.map +1 -0
  386. package/lib/inputs2/colorfield/index.d.ts +8 -0
  387. package/lib/inputs2/colorfield/index.js +89 -0
  388. package/lib/inputs2/colorfield/index.js.map +1 -0
  389. package/lib/inputs2/date/base/constants.d.ts +4 -0
  390. package/lib/inputs2/date/base/constants.js +39 -0
  391. package/lib/inputs2/date/base/constants.js.map +1 -0
  392. package/lib/inputs2/date/base/index.d.ts +6 -0
  393. package/lib/inputs2/date/base/index.js +134 -0
  394. package/lib/inputs2/date/base/index.js.map +1 -0
  395. package/lib/inputs2/date/datefield/calendarbox.d.ts +6 -0
  396. package/lib/inputs2/date/datefield/calendarbox.js +74 -0
  397. package/lib/inputs2/date/datefield/calendarbox.js.map +1 -0
  398. package/lib/inputs2/date/datefield/context.d.ts +4 -0
  399. package/lib/inputs2/date/datefield/context.js +12 -0
  400. package/lib/inputs2/date/datefield/context.js.map +1 -0
  401. package/lib/inputs2/date/datefield/index.d.ts +4 -0
  402. package/lib/inputs2/date/datefield/index.js +317 -0
  403. package/lib/inputs2/date/datefield/index.js.map +1 -0
  404. package/lib/inputs2/date/datefield/triggers.d.ts +8 -0
  405. package/lib/inputs2/date/datefield/triggers.js +30 -0
  406. package/lib/inputs2/date/datefield/triggers.js.map +1 -0
  407. package/lib/inputs2/date/datefield/types.d.ts +61 -0
  408. package/lib/inputs2/date/dateperiodfield/calendarbox.d.ts +6 -0
  409. package/lib/inputs2/date/dateperiodfield/calendarbox.js +94 -0
  410. package/lib/inputs2/date/dateperiodfield/calendarbox.js.map +1 -0
  411. package/lib/inputs2/date/dateperiodfield/context.d.ts +4 -0
  412. package/lib/inputs2/date/dateperiodfield/context.js +12 -0
  413. package/lib/inputs2/date/dateperiodfield/context.js.map +1 -0
  414. package/lib/inputs2/date/dateperiodfield/index.d.ts +4 -0
  415. package/lib/inputs2/date/dateperiodfield/index.js +522 -0
  416. package/lib/inputs2/date/dateperiodfield/index.js.map +1 -0
  417. package/lib/inputs2/date/dateperiodfield/triggers.d.ts +5 -0
  418. package/lib/inputs2/date/dateperiodfield/triggers.js +61 -0
  419. package/lib/inputs2/date/dateperiodfield/triggers.js.map +1 -0
  420. package/lib/inputs2/date/dateperiodfield/types.d.ts +99 -0
  421. package/lib/inputs2/date/helpers.d.ts +10 -0
  422. package/lib/inputs2/date/helpers.js +42 -0
  423. package/lib/inputs2/date/helpers.js.map +1 -0
  424. package/lib/inputs2/date/types.d.ts +59 -0
  425. package/lib/inputs2/date/types.js +5 -0
  426. package/lib/inputs2/date/types.js.map +1 -0
  427. package/lib/inputs2/filefield/index.d.ts +11 -0
  428. package/lib/inputs2/filefield/index.js +120 -0
  429. package/lib/inputs2/filefield/index.js.map +1 -0
  430. package/lib/inputs2/index.d.ts +16 -0
  431. package/lib/inputs2/index.js +33 -0
  432. package/lib/inputs2/index.js.map +1 -0
  433. package/lib/inputs2/mask/BaseMask.d.ts +13 -0
  434. package/lib/inputs2/mask/BaseMask.js +79 -0
  435. package/lib/inputs2/mask/BaseMask.js.map +1 -0
  436. package/lib/inputs2/mask/Cnpj.d.ts +8 -0
  437. package/lib/inputs2/mask/Cnpj.js +54 -0
  438. package/lib/inputs2/mask/Cnpj.js.map +1 -0
  439. package/lib/inputs2/mask/Cpf.d.ts +7 -0
  440. package/lib/inputs2/mask/Cpf.js +54 -0
  441. package/lib/inputs2/mask/Cpf.js.map +1 -0
  442. package/lib/inputs2/mask/Phone.d.ts +6 -0
  443. package/lib/inputs2/mask/Phone.js +22 -0
  444. package/lib/inputs2/mask/Phone.js.map +1 -0
  445. package/lib/inputs2/mask/ZipCode.d.ts +3 -0
  446. package/lib/inputs2/mask/ZipCode.js +20 -0
  447. package/lib/inputs2/mask/ZipCode.js.map +1 -0
  448. package/lib/inputs2/mask/helpers.d.ts +2 -0
  449. package/lib/inputs2/mask/helpers.js +34 -0
  450. package/lib/inputs2/mask/helpers.js.map +1 -0
  451. package/lib/inputs2/numberfield/currency.d.ts +3 -0
  452. package/lib/inputs2/numberfield/currency.js +111 -0
  453. package/lib/inputs2/numberfield/currency.js.map +1 -0
  454. package/lib/inputs2/numberfield/decimal.d.ts +3 -0
  455. package/lib/inputs2/numberfield/decimal.js +103 -0
  456. package/lib/inputs2/numberfield/decimal.js.map +1 -0
  457. package/lib/inputs2/numberfield/helpers.d.ts +28 -0
  458. package/lib/inputs2/numberfield/helpers.js +19 -0
  459. package/lib/inputs2/numberfield/helpers.js.map +1 -0
  460. package/lib/inputs2/numberfield/index.d.ts +7 -0
  461. package/lib/inputs2/numberfield/index.js +100 -0
  462. package/lib/inputs2/numberfield/index.js.map +1 -0
  463. package/lib/inputs2/numberfield/types.d.ts +26 -0
  464. package/lib/inputs2/radiofield/index.d.ts +4 -0
  465. package/lib/inputs2/radiofield/index.js +114 -0
  466. package/lib/inputs2/radiofield/index.js.map +1 -0
  467. package/lib/inputs2/radiofield/types.d.ts +31 -0
  468. package/lib/inputs2/selectfield/context.d.ts +38 -0
  469. package/lib/inputs2/selectfield/context.js +12 -0
  470. package/lib/inputs2/selectfield/context.js.map +1 -0
  471. package/lib/inputs2/selectfield/helpers.d.ts +5 -0
  472. package/lib/inputs2/selectfield/helpers.js +17 -0
  473. package/lib/inputs2/selectfield/helpers.js.map +1 -0
  474. package/lib/inputs2/selectfield/index.d.ts +8 -0
  475. package/lib/inputs2/selectfield/index.js +410 -0
  476. package/lib/inputs2/selectfield/index.js.map +1 -0
  477. package/lib/inputs2/selectfield/item.d.ts +11 -0
  478. package/lib/inputs2/selectfield/item.js +57 -0
  479. package/lib/inputs2/selectfield/item.js.map +1 -0
  480. package/lib/inputs2/selectfield/listbox.d.ts +7 -0
  481. package/lib/inputs2/selectfield/listbox.js +73 -0
  482. package/lib/inputs2/selectfield/listbox.js.map +1 -0
  483. package/lib/inputs2/selectfield/options.d.ts +8 -0
  484. package/lib/inputs2/selectfield/options.js +20 -0
  485. package/lib/inputs2/selectfield/options.js.map +1 -0
  486. package/lib/inputs2/selectfield/search.d.ts +6 -0
  487. package/lib/inputs2/selectfield/search.js +58 -0
  488. package/lib/inputs2/selectfield/search.js.map +1 -0
  489. package/lib/inputs2/selectfield/selections.d.ts +9 -0
  490. package/lib/inputs2/selectfield/selections.js +66 -0
  491. package/lib/inputs2/selectfield/selections.js.map +1 -0
  492. package/lib/inputs2/selectfield/simple.d.ts +9 -0
  493. package/lib/inputs2/selectfield/simple.js +24 -0
  494. package/lib/inputs2/selectfield/simple.js.map +1 -0
  495. package/lib/inputs2/selectfield/triggers.d.ts +8 -0
  496. package/lib/inputs2/selectfield/triggers.js +82 -0
  497. package/lib/inputs2/selectfield/triggers.js.map +1 -0
  498. package/lib/inputs2/selectfield/types.d.ts +53 -0
  499. package/lib/inputs2/selectfield/types.js +6 -0
  500. package/lib/inputs2/selectfield/types.js.map +1 -0
  501. package/lib/inputs2/slot/index.d.ts +17 -0
  502. package/lib/inputs2/slot/index.js +50 -0
  503. package/lib/inputs2/slot/index.js.map +1 -0
  504. package/lib/inputs2/textareafield/index.d.ts +30 -0
  505. package/lib/inputs2/textareafield/index.js +136 -0
  506. package/lib/inputs2/textareafield/index.js.map +1 -0
  507. package/lib/inputs2/textfield/index.d.ts +30 -0
  508. package/lib/inputs2/textfield/index.js +109 -0
  509. package/lib/inputs2/textfield/index.js.map +1 -0
  510. package/lib/internals/colorStyles.js +1 -0
  511. package/lib/internals/colorStyles.js.map +1 -0
  512. package/lib/internals/constants.d.ts +3 -0
  513. package/lib/internals/constants.js +6 -3
  514. package/lib/internals/constants.js.map +1 -0
  515. package/lib/internals/types.d.ts +0 -15
  516. package/lib/labelMessages/index.js +52 -45
  517. package/lib/labelMessages/index.js.map +1 -0
  518. package/lib/labels/DangerLabel.d.ts +1 -1
  519. package/lib/labels/DangerLabel.js +14 -4
  520. package/lib/labels/DangerLabel.js.map +1 -0
  521. package/lib/labels/DefaultLabel.d.ts +2 -5
  522. package/lib/labels/DefaultLabel.js +61 -39
  523. package/lib/labels/DefaultLabel.js.map +1 -0
  524. package/lib/labels/InfoLabel.d.ts +1 -1
  525. package/lib/labels/InfoLabel.js +14 -4
  526. package/lib/labels/InfoLabel.js.map +1 -0
  527. package/lib/labels/PrimaryLabel.d.ts +1 -1
  528. package/lib/labels/PrimaryLabel.js +14 -4
  529. package/lib/labels/PrimaryLabel.js.map +1 -0
  530. package/lib/labels/SuccessLabel.d.ts +1 -1
  531. package/lib/labels/SuccessLabel.js +14 -4
  532. package/lib/labels/SuccessLabel.js.map +1 -0
  533. package/lib/labels/WarningLabel.d.ts +1 -1
  534. package/lib/labels/WarningLabel.js +14 -4
  535. package/lib/labels/WarningLabel.js.map +1 -0
  536. package/lib/labels/index.d.ts +1 -1
  537. package/lib/labels/index.js +7 -5
  538. package/lib/labels/index.js.map +1 -0
  539. package/lib/labels/label_container/index.js +16 -9
  540. package/lib/labels/label_container/index.js.map +1 -0
  541. package/lib/labels/types.d.ts +4 -7
  542. package/lib/list/Header.js +19 -6
  543. package/lib/list/Header.js.map +1 -0
  544. package/lib/list/Item.d.ts +2 -5
  545. package/lib/list/Item.js +149 -11
  546. package/lib/list/Item.js.map +1 -0
  547. package/lib/list/Separator.js +9 -3
  548. package/lib/list/Separator.js.map +1 -0
  549. package/lib/list/helpers.d.ts +1 -2
  550. package/lib/list/helpers.js +6 -7
  551. package/lib/list/helpers.js.map +1 -0
  552. package/lib/list/index.js +70 -65
  553. package/lib/list/index.js.map +1 -0
  554. package/lib/list/types.d.ts +5 -8
  555. package/lib/menus/float/MenuItem.js +51 -53
  556. package/lib/menus/float/MenuItem.js.map +1 -0
  557. package/lib/menus/float/SubMenuContainer.d.ts +10 -10
  558. package/lib/menus/float/SubMenuContainer.js +78 -0
  559. package/lib/menus/float/SubMenuContainer.js.map +1 -0
  560. package/lib/menus/float/helpers.d.ts +1 -2
  561. package/lib/menus/float/helpers.js +3 -2
  562. package/lib/menus/float/helpers.js.map +1 -0
  563. package/lib/menus/float/index.js +41 -88
  564. package/lib/menus/float/index.js.map +1 -0
  565. package/lib/menus/index.js +1 -0
  566. package/lib/menus/index.js.map +1 -0
  567. package/lib/menus/sidenav/ExpandMenu.js +18 -15
  568. package/lib/menus/sidenav/ExpandMenu.js.map +1 -0
  569. package/lib/menus/sidenav/MenuLink.d.ts +2 -5
  570. package/lib/menus/sidenav/MenuLink.js +29 -14
  571. package/lib/menus/sidenav/MenuLink.js.map +1 -0
  572. package/lib/menus/sidenav/NavMenuGroup.js +20 -14
  573. package/lib/menus/sidenav/NavMenuGroup.js.map +1 -0
  574. package/lib/menus/sidenav/NavMenuItem.d.ts +2 -5
  575. package/lib/menus/sidenav/NavMenuItem.js +136 -111
  576. package/lib/menus/sidenav/NavMenuItem.js.map +1 -0
  577. package/lib/menus/sidenav/NavSubMenuItem.js +37 -20
  578. package/lib/menus/sidenav/NavSubMenuItem.js.map +1 -0
  579. package/lib/menus/sidenav/helpers.d.ts +2 -3
  580. package/lib/menus/sidenav/helpers.js +8 -7
  581. package/lib/menus/sidenav/helpers.js.map +1 -0
  582. package/lib/menus/sidenav/index.js +145 -121
  583. package/lib/menus/sidenav/index.js.map +1 -0
  584. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +22 -17
  585. package/lib/menus/sidenav/popup_menu_search/EmptyList.js.map +1 -0
  586. package/lib/menus/sidenav/popup_menu_search/index.d.ts +1 -2
  587. package/lib/menus/sidenav/popup_menu_search/index.js +35 -68
  588. package/lib/menus/sidenav/popup_menu_search/index.js.map +1 -0
  589. package/lib/menus/sidenav/types.d.ts +5 -5
  590. package/lib/noPermission/index.js +15 -9
  591. package/lib/noPermission/index.js.map +1 -0
  592. package/lib/node_modules/imask/esm/controls/html-contenteditable-mask-element.js +35 -0
  593. package/lib/node_modules/imask/esm/controls/html-contenteditable-mask-element.js.map +1 -0
  594. package/lib/node_modules/imask/esm/controls/html-input-mask-element.js +32 -0
  595. package/lib/node_modules/imask/esm/controls/html-input-mask-element.js.map +1 -0
  596. package/lib/node_modules/imask/esm/controls/html-mask-element.js +49 -0
  597. package/lib/node_modules/imask/esm/controls/html-mask-element.js.map +1 -0
  598. package/lib/node_modules/imask/esm/controls/input-history.js +31 -0
  599. package/lib/node_modules/imask/esm/controls/input-history.js.map +1 -0
  600. package/lib/node_modules/imask/esm/controls/input.js +223 -0
  601. package/lib/node_modules/imask/esm/controls/input.js.map +1 -0
  602. package/lib/node_modules/imask/esm/controls/mask-element.js +44 -0
  603. package/lib/node_modules/imask/esm/controls/mask-element.js.map +1 -0
  604. package/lib/node_modules/imask/esm/core/action-details.js +52 -0
  605. package/lib/node_modules/imask/esm/core/action-details.js.map +1 -0
  606. package/lib/node_modules/imask/esm/core/change-details.js +37 -0
  607. package/lib/node_modules/imask/esm/core/change-details.js.map +1 -0
  608. package/lib/node_modules/imask/esm/core/continuous-tail-details.js +43 -0
  609. package/lib/node_modules/imask/esm/core/continuous-tail-details.js.map +1 -0
  610. package/lib/node_modules/imask/esm/core/holder.js +7 -0
  611. package/lib/node_modules/imask/esm/core/holder.js.map +1 -0
  612. package/lib/node_modules/imask/esm/core/utils.js +68 -0
  613. package/lib/node_modules/imask/esm/core/utils.js.map +1 -0
  614. package/lib/node_modules/imask/esm/index.js +51 -0
  615. package/lib/node_modules/imask/esm/index.js.map +1 -0
  616. package/lib/node_modules/imask/esm/masked/base.js +253 -0
  617. package/lib/node_modules/imask/esm/masked/base.js.map +1 -0
  618. package/lib/node_modules/imask/esm/masked/date.js +118 -0
  619. package/lib/node_modules/imask/esm/masked/date.js.map +1 -0
  620. package/lib/node_modules/imask/esm/masked/dynamic.js +223 -0
  621. package/lib/node_modules/imask/esm/masked/dynamic.js.map +1 -0
  622. package/lib/node_modules/imask/esm/masked/enum.js +70 -0
  623. package/lib/node_modules/imask/esm/masked/enum.js.map +1 -0
  624. package/lib/node_modules/imask/esm/masked/factory.js +47 -0
  625. package/lib/node_modules/imask/esm/masked/factory.js.map +1 -0
  626. package/lib/node_modules/imask/esm/masked/function.js +24 -0
  627. package/lib/node_modules/imask/esm/masked/function.js.map +1 -0
  628. package/lib/node_modules/imask/esm/masked/number.js +213 -0
  629. package/lib/node_modules/imask/esm/masked/number.js.map +1 -0
  630. package/lib/node_modules/imask/esm/masked/pattern/chunk-tail-details.js +104 -0
  631. package/lib/node_modules/imask/esm/masked/pattern/chunk-tail-details.js.map +1 -0
  632. package/lib/node_modules/imask/esm/masked/pattern/cursor.js +101 -0
  633. package/lib/node_modules/imask/esm/masked/pattern/cursor.js.map +1 -0
  634. package/lib/node_modules/imask/esm/masked/pattern/fixed-definition.js +103 -0
  635. package/lib/node_modules/imask/esm/masked/pattern/fixed-definition.js.map +1 -0
  636. package/lib/node_modules/imask/esm/masked/pattern/input-definition.js +134 -0
  637. package/lib/node_modules/imask/esm/masked/pattern/input-definition.js.map +1 -0
  638. package/lib/node_modules/imask/esm/masked/pattern.js +323 -0
  639. package/lib/node_modules/imask/esm/masked/pattern.js.map +1 -0
  640. package/lib/node_modules/imask/esm/masked/pipe.js +24 -0
  641. package/lib/node_modules/imask/esm/masked/pipe.js.map +1 -0
  642. package/lib/node_modules/imask/esm/masked/range.js +79 -0
  643. package/lib/node_modules/imask/esm/masked/range.js.map +1 -0
  644. package/lib/node_modules/imask/esm/masked/regexp.js +22 -0
  645. package/lib/node_modules/imask/esm/masked/regexp.js.map +1 -0
  646. package/lib/node_modules/imask/esm/masked/repeat.js +105 -0
  647. package/lib/node_modules/imask/esm/masked/repeat.js.map +1 -0
  648. package/lib/node_modules/lodash/_Hash.js +23 -0
  649. package/lib/node_modules/lodash/_Hash.js.map +1 -0
  650. package/lib/node_modules/lodash/_ListCache.js +23 -0
  651. package/lib/node_modules/lodash/_ListCache.js.map +1 -0
  652. package/lib/node_modules/lodash/_Map.js +13 -0
  653. package/lib/node_modules/lodash/_Map.js.map +1 -0
  654. package/lib/node_modules/lodash/_MapCache.js +23 -0
  655. package/lib/node_modules/lodash/_MapCache.js.map +1 -0
  656. package/lib/node_modules/lodash/_Symbol.js +12 -0
  657. package/lib/node_modules/lodash/_Symbol.js.map +1 -0
  658. package/lib/node_modules/lodash/_assocIndexOf.js +18 -0
  659. package/lib/node_modules/lodash/_assocIndexOf.js.map +1 -0
  660. package/lib/node_modules/lodash/_baseGetTag.js +17 -0
  661. package/lib/node_modules/lodash/_baseGetTag.js.map +1 -0
  662. package/lib/node_modules/lodash/_baseIsNative.js +23 -0
  663. package/lib/node_modules/lodash/_baseIsNative.js.map +1 -0
  664. package/lib/node_modules/lodash/_coreJsData.js +12 -0
  665. package/lib/node_modules/lodash/_coreJsData.js.map +1 -0
  666. package/lib/node_modules/lodash/_freeGlobal.js +12 -0
  667. package/lib/node_modules/lodash/_freeGlobal.js.map +1 -0
  668. package/lib/node_modules/lodash/_getMapData.js +16 -0
  669. package/lib/node_modules/lodash/_getMapData.js.map +1 -0
  670. package/lib/node_modules/lodash/_getNative.js +17 -0
  671. package/lib/node_modules/lodash/_getNative.js.map +1 -0
  672. package/lib/node_modules/lodash/_getRawTag.js +22 -0
  673. package/lib/node_modules/lodash/_getRawTag.js.map +1 -0
  674. package/lib/node_modules/lodash/_getValue.js +13 -0
  675. package/lib/node_modules/lodash/_getValue.js.map +1 -0
  676. package/lib/node_modules/lodash/_hashClear.js +15 -0
  677. package/lib/node_modules/lodash/_hashClear.js.map +1 -0
  678. package/lib/node_modules/lodash/_hashDelete.js +14 -0
  679. package/lib/node_modules/lodash/_hashDelete.js.map +1 -0
  680. package/lib/node_modules/lodash/_hashGet.js +20 -0
  681. package/lib/node_modules/lodash/_hashGet.js.map +1 -0
  682. package/lib/node_modules/lodash/_hashHas.js +16 -0
  683. package/lib/node_modules/lodash/_hashHas.js.map +1 -0
  684. package/lib/node_modules/lodash/_hashSet.js +16 -0
  685. package/lib/node_modules/lodash/_hashSet.js.map +1 -0
  686. package/lib/node_modules/lodash/_isKeyable.js +14 -0
  687. package/lib/node_modules/lodash/_isKeyable.js.map +1 -0
  688. package/lib/node_modules/lodash/_isMasked.js +18 -0
  689. package/lib/node_modules/lodash/_isMasked.js.map +1 -0
  690. package/lib/node_modules/lodash/_listCacheClear.js +13 -0
  691. package/lib/node_modules/lodash/_listCacheClear.js.map +1 -0
  692. package/lib/node_modules/lodash/_listCacheDelete.js +19 -0
  693. package/lib/node_modules/lodash/_listCacheDelete.js.map +1 -0
  694. package/lib/node_modules/lodash/_listCacheGet.js +16 -0
  695. package/lib/node_modules/lodash/_listCacheGet.js.map +1 -0
  696. package/lib/node_modules/lodash/_listCacheHas.js +15 -0
  697. package/lib/node_modules/lodash/_listCacheHas.js.map +1 -0
  698. package/lib/node_modules/lodash/_listCacheSet.js +16 -0
  699. package/lib/node_modules/lodash/_listCacheSet.js.map +1 -0
  700. package/lib/node_modules/lodash/_mapCacheClear.js +21 -0
  701. package/lib/node_modules/lodash/_mapCacheClear.js.map +1 -0
  702. package/lib/node_modules/lodash/_mapCacheDelete.js +16 -0
  703. package/lib/node_modules/lodash/_mapCacheDelete.js.map +1 -0
  704. package/lib/node_modules/lodash/_mapCacheGet.js +15 -0
  705. package/lib/node_modules/lodash/_mapCacheGet.js.map +1 -0
  706. package/lib/node_modules/lodash/_mapCacheHas.js +15 -0
  707. package/lib/node_modules/lodash/_mapCacheHas.js.map +1 -0
  708. package/lib/node_modules/lodash/_mapCacheSet.js +16 -0
  709. package/lib/node_modules/lodash/_mapCacheSet.js.map +1 -0
  710. package/lib/node_modules/lodash/_nativeCreate.js +12 -0
  711. package/lib/node_modules/lodash/_nativeCreate.js.map +1 -0
  712. package/lib/node_modules/lodash/_objectToString.js +14 -0
  713. package/lib/node_modules/lodash/_objectToString.js.map +1 -0
  714. package/lib/node_modules/lodash/_root.js +12 -0
  715. package/lib/node_modules/lodash/_root.js.map +1 -0
  716. package/lib/node_modules/lodash/_toSource.js +24 -0
  717. package/lib/node_modules/lodash/_toSource.js.map +1 -0
  718. package/lib/node_modules/lodash/eq.js +13 -0
  719. package/lib/node_modules/lodash/eq.js.map +1 -0
  720. package/lib/node_modules/lodash/isFunction.js +19 -0
  721. package/lib/node_modules/lodash/isFunction.js.map +1 -0
  722. package/lib/node_modules/lodash/isObject.js +14 -0
  723. package/lib/node_modules/lodash/isObject.js.map +1 -0
  724. package/lib/node_modules/lodash/lodash.js +3678 -0
  725. package/lib/node_modules/lodash/lodash.js.map +1 -0
  726. package/lib/node_modules/lodash/memoize.js +24 -0
  727. package/lib/node_modules/lodash/memoize.js.map +1 -0
  728. package/lib/node_modules/moment/dist/moment.js +2590 -0
  729. package/lib/node_modules/moment/dist/moment.js.map +1 -0
  730. package/lib/node_modules/object-assign/index.js +55 -0
  731. package/lib/node_modules/object-assign/index.js.map +1 -0
  732. package/lib/node_modules/prop-types/checkPropTypes.js +55 -0
  733. package/lib/node_modules/prop-types/checkPropTypes.js.map +1 -0
  734. package/lib/node_modules/prop-types/factoryWithThrowingShims.js +53 -0
  735. package/lib/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -0
  736. package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +330 -0
  737. package/lib/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -0
  738. package/lib/node_modules/prop-types/index.js +18 -0
  739. package/lib/node_modules/prop-types/index.js.map +1 -0
  740. package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js +11 -0
  741. package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -0
  742. package/lib/node_modules/prop-types/lib/has.js +8 -0
  743. package/lib/node_modules/prop-types/lib/has.js.map +1 -0
  744. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +96 -0
  745. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -0
  746. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +79 -0
  747. package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -0
  748. package/lib/node_modules/prop-types/node_modules/react-is/index.js +11 -0
  749. package/lib/node_modules/prop-types/node_modules/react-is/index.js.map +1 -0
  750. package/lib/node_modules/react/cjs/react-compiler-runtime.development.js +31 -0
  751. package/lib/node_modules/react/cjs/react-compiler-runtime.development.js.map +1 -0
  752. package/lib/node_modules/react/cjs/react-compiler-runtime.production.js +24 -0
  753. package/lib/node_modules/react/cjs/react-compiler-runtime.production.js.map +1 -0
  754. package/lib/node_modules/react/compiler-runtime.js +11 -0
  755. package/lib/node_modules/react/compiler-runtime.js.map +1 -0
  756. package/lib/node_modules/react-imask/esm/hook.js +76 -0
  757. package/lib/node_modules/react-imask/esm/hook.js.map +1 -0
  758. package/lib/node_modules/react-imask/esm/input.js +24 -0
  759. package/lib/node_modules/react-imask/esm/input.js.map +1 -0
  760. package/lib/node_modules/react-imask/esm/mixin.js +132 -0
  761. package/lib/node_modules/react-imask/esm/mixin.js.map +1 -0
  762. package/lib/node_modules/uuid/dist/native.js +5 -0
  763. package/lib/node_modules/uuid/dist/native.js.map +1 -0
  764. package/lib/node_modules/uuid/dist/rng.js +14 -0
  765. package/lib/node_modules/uuid/dist/rng.js.map +1 -0
  766. package/lib/node_modules/uuid/dist/stringify.js +10 -0
  767. package/lib/node_modules/uuid/dist/stringify.js.map +1 -0
  768. package/lib/node_modules/uuid/dist/v1.js +35 -0
  769. package/lib/node_modules/uuid/dist/v1.js.map +1 -0
  770. package/lib/node_modules/uuid/dist/v4.js +17 -0
  771. package/lib/node_modules/uuid/dist/v4.js.map +1 -0
  772. package/lib/panel/Content.js +51 -38
  773. package/lib/panel/Content.js.map +1 -0
  774. package/lib/panel/DangerPanel.js +10 -4
  775. package/lib/panel/DangerPanel.js.map +1 -0
  776. package/lib/panel/Default.js +63 -37
  777. package/lib/panel/Default.js.map +1 -0
  778. package/lib/panel/Header.js +48 -37
  779. package/lib/panel/Header.js.map +1 -0
  780. package/lib/panel/InfoPanel.js +11 -5
  781. package/lib/panel/InfoPanel.js.map +1 -0
  782. package/lib/panel/PrimaryPanel.js +10 -4
  783. package/lib/panel/PrimaryPanel.js.map +1 -0
  784. package/lib/panel/SuccessPanel.js +11 -5
  785. package/lib/panel/SuccessPanel.js.map +1 -0
  786. package/lib/panel/WarningPanel.js +10 -4
  787. package/lib/panel/WarningPanel.js.map +1 -0
  788. package/lib/panel/helpers.d.ts +1 -2
  789. package/lib/panel/helpers.js +10 -6
  790. package/lib/panel/helpers.js.map +1 -0
  791. package/lib/panel/index.js +2 -1
  792. package/lib/panel/index.js.map +1 -0
  793. package/lib/permissionValidations.js +16 -11
  794. package/lib/permissionValidations.js.map +1 -0
  795. package/lib/popover/PopoverText.d.ts +1 -2
  796. package/lib/popover/PopoverText.js +14 -5
  797. package/lib/popover/PopoverText.js.map +1 -0
  798. package/lib/popover/PopoverTitle.js +11 -3
  799. package/lib/popover/PopoverTitle.js.map +1 -0
  800. package/lib/popover/index.js +39 -57
  801. package/lib/popover/index.js.map +1 -0
  802. package/lib/popover/types.d.ts +1 -0
  803. package/lib/progress/Bar.js +46 -36
  804. package/lib/progress/Bar.js.map +1 -0
  805. package/lib/progress/index.js +25 -18
  806. package/lib/progress/index.js.map +1 -0
  807. package/lib/radio/index.d.ts +4 -1
  808. package/lib/radio/index.js +108 -90
  809. package/lib/radio/index.js.map +1 -0
  810. package/lib/shortcuts/index.js +22 -7
  811. package/lib/shortcuts/index.js.map +1 -0
  812. package/lib/skeleton/SkeletonContainer.js +17 -6
  813. package/lib/skeleton/SkeletonContainer.js.map +1 -0
  814. package/lib/skeleton/index.js +43 -19
  815. package/lib/skeleton/index.js.map +1 -0
  816. package/lib/spinner/SpinnerLoading.js +54 -16
  817. package/lib/spinner/SpinnerLoading.js.map +1 -0
  818. package/lib/spinner/index.d.ts +2 -0
  819. package/lib/spinner/index.js +49 -36
  820. package/lib/spinner/index.js.map +1 -0
  821. package/lib/spinner/types.d.ts +2 -2
  822. package/lib/split/Split.js +66 -61
  823. package/lib/split/Split.js.map +1 -0
  824. package/lib/split/SplitSide.js +25 -16
  825. package/lib/split/SplitSide.js.map +1 -0
  826. package/lib/split/helpers.d.ts +1 -2
  827. package/lib/split/helpers.js +3 -2
  828. package/lib/split/helpers.js.map +1 -0
  829. package/lib/split/index.js +6 -4
  830. package/lib/split/index.js.map +1 -0
  831. package/lib/table/Body.js +41 -54
  832. package/lib/table/Body.js.map +1 -0
  833. package/lib/table/Header.js +46 -35
  834. package/lib/table/Header.js.map +1 -0
  835. package/lib/table/HeaderColumn.js +41 -27
  836. package/lib/table/HeaderColumn.js.map +1 -0
  837. package/lib/table/Row.js +48 -48
  838. package/lib/table/Row.js.map +1 -0
  839. package/lib/table/RowColumn.js +51 -38
  840. package/lib/table/RowColumn.js.map +1 -0
  841. package/lib/table/helpers.d.ts +2 -3
  842. package/lib/table/helpers.js +8 -5
  843. package/lib/table/helpers.js.map +1 -0
  844. package/lib/table/index.js +101 -105
  845. package/lib/table/index.js.map +1 -0
  846. package/lib/table/types.d.ts +1 -0
  847. package/lib/tabs/DropdownTabs.js +70 -76
  848. package/lib/tabs/DropdownTabs.js.map +1 -0
  849. package/lib/tabs/Menu.d.ts +1 -1
  850. package/lib/tabs/Menu.js +37 -49
  851. package/lib/tabs/Menu.js.map +1 -0
  852. package/lib/tabs/MenuTabs.d.ts +1 -2
  853. package/lib/tabs/MenuTabs.js +69 -86
  854. package/lib/tabs/MenuTabs.js.map +1 -0
  855. package/lib/tabs/Panel.js +58 -47
  856. package/lib/tabs/Panel.js.map +1 -0
  857. package/lib/tabs/context.d.ts +2 -3
  858. package/lib/tabs/context.js +45 -46
  859. package/lib/tabs/context.js.map +1 -0
  860. package/lib/tabs/index.d.ts +1 -1
  861. package/lib/tabs/index.js +80 -64
  862. package/lib/tabs/index.js.map +1 -0
  863. package/lib/tabs/tabHelpers.d.ts +20 -2
  864. package/lib/tabs/tabHelpers.js +25 -23
  865. package/lib/tabs/tabHelpers.js.map +1 -0
  866. package/lib/tabs/types.d.ts +10 -3
  867. package/lib/tabs/useTabs.js +1 -0
  868. package/lib/tabs/useTabs.js.map +1 -0
  869. package/lib/textContent/index.d.ts +7 -11
  870. package/lib/textContent/index.js +41 -32
  871. package/lib/textContent/index.js.map +1 -0
  872. package/lib/toolbar/ButtonBar.js +64 -59
  873. package/lib/toolbar/ButtonBar.js.map +1 -0
  874. package/lib/toolbar/LabelBar.js +48 -39
  875. package/lib/toolbar/LabelBar.js.map +1 -0
  876. package/lib/toolbar/Separator.js +9 -3
  877. package/lib/toolbar/Separator.js.map +1 -0
  878. package/lib/toolbar/ToolBarGroup.js +15 -3
  879. package/lib/toolbar/ToolBarGroup.js.map +1 -0
  880. package/lib/toolbar/helpers.js +1 -0
  881. package/lib/toolbar/helpers.js.map +1 -0
  882. package/lib/toolbar/index.js +37 -30
  883. package/lib/toolbar/index.js.map +1 -0
  884. package/lib/toolbar/types.d.ts +1 -1
  885. package/lib/tooltip/TooltipContent.d.ts +3 -0
  886. package/lib/tooltip/TooltipContent.js +40 -0
  887. package/lib/tooltip/TooltipContent.js.map +1 -0
  888. package/lib/tooltip/index.d.ts +2 -3
  889. package/lib/tooltip/index.js +39 -37
  890. package/lib/tooltip/index.js.map +1 -0
  891. package/lib/tooltip/types.d.ts +25 -3
  892. package/lib/tooltip/useTooltip.d.ts +27 -0
  893. package/lib/tooltip/useTooltip.js +96 -0
  894. package/lib/tooltip/useTooltip.js.map +1 -0
  895. package/lib/treetable/Body.js +27 -31
  896. package/lib/treetable/Body.js.map +1 -0
  897. package/lib/treetable/Header.js +25 -23
  898. package/lib/treetable/Header.js.map +1 -0
  899. package/lib/treetable/Row.js +212 -151
  900. package/lib/treetable/Row.js.map +1 -0
  901. package/lib/treetable/helpers.d.ts +9 -9
  902. package/lib/treetable/helpers.js +7 -14
  903. package/lib/treetable/helpers.js.map +1 -0
  904. package/lib/treetable/index.js +27 -15
  905. package/lib/treetable/index.js.map +1 -0
  906. package/lib/treeview/Header.js +14 -5
  907. package/lib/treeview/Header.js.map +1 -0
  908. package/lib/treeview/Node.js +201 -176
  909. package/lib/treeview/Node.js.map +1 -0
  910. package/lib/treeview/constants.d.ts +1 -2
  911. package/lib/treeview/constants.js +3 -2
  912. package/lib/treeview/constants.js.map +1 -0
  913. package/lib/treeview/index.js +259 -174
  914. package/lib/treeview/index.js.map +1 -0
  915. package/lib/uitour/helpers.js +1 -0
  916. package/lib/uitour/helpers.js.map +1 -0
  917. package/lib/uitour/index.d.ts +1 -2
  918. package/lib/uitour/index.js +169 -167
  919. package/lib/uitour/index.js.map +1 -0
  920. package/package.json +327 -48
  921. package/lib/alerts/alert.spec.d.ts +0 -0
  922. package/lib/assets/BaseAlert.css +0 -1
  923. package/lib/assets/Content.css +0 -1
  924. package/lib/assets/DefaultFile.css +0 -1
  925. package/lib/assets/Drawer.css +0 -1
  926. package/lib/assets/gridlayout.css +0 -1
  927. package/lib/assets/index.css +0 -1
  928. package/lib/assets/index11.css +0 -1
  929. package/lib/assets/index15.css +0 -1
  930. package/lib/assets/index17.css +0 -1
  931. package/lib/assets/index18.css +0 -1
  932. package/lib/assets/index19.css +0 -1
  933. package/lib/assets/index20.css +0 -1
  934. package/lib/assets/index21.css +0 -1
  935. package/lib/assets/index22.css +0 -1
  936. package/lib/assets/index24.css +0 -1
  937. package/lib/assets/index26.css +0 -1
  938. package/lib/assets/index27.css +0 -1
  939. package/lib/assets/index28.css +0 -1
  940. package/lib/assets/index29.css +0 -1
  941. package/lib/assets/index5.css +0 -1
  942. package/lib/assets/index9.css +0 -1
  943. package/lib/assets/panel.css +0 -1
  944. package/lib/assets/skeleton.css +0 -1
  945. package/lib/assets/table.css +0 -1
  946. package/lib/assets/tabs.css +0 -1
  947. package/lib/assets/toolbar.css +0 -1
  948. package/lib/assets/withDropdown.css +0 -1
  949. package/lib/avatar/avatar.spec.d.ts +0 -1
  950. package/lib/badge/badge.spec.d.ts +0 -1
  951. package/lib/buttons/ButtonGroups.js +0 -5
  952. package/lib/buttons/buttons.spec.d.ts +0 -0
  953. package/lib/calendar/base/Day.d.ts +0 -3
  954. package/lib/calendar/base/Day.js +0 -27
  955. package/lib/calendar/base/Month.d.ts +0 -3
  956. package/lib/calendar/base/Month.js +0 -25
  957. package/lib/calendar/base/Week.d.ts +0 -3
  958. package/lib/calendar/base/Week.js +0 -23
  959. package/lib/calendar/calendar.spec.d.ts +0 -0
  960. package/lib/checkbox/checkbox.spec.d.ts +0 -1
  961. package/lib/chunks/index.CmrLK9Qe.js +0 -675
  962. package/lib/chunks/index.D5f6Ow9V.js +0 -89
  963. package/lib/chunks/index.Da--18GT.js +0 -669
  964. package/lib/chunks/index.yztgndLc.js +0 -206
  965. package/lib/chunks/jsx-runtime.CYK1ROHF.js +0 -445
  966. package/lib/chunks/tabs.Cvj2MJH6.js +0 -246
  967. package/lib/chunks/v1.CDXKvGzE.js +0 -41
  968. package/lib/dialog/dialog.spec.d.ts +0 -0
  969. package/lib/dialog/wizard/wizard.spec.d.ts +0 -0
  970. package/lib/drawer/Drawer.spec.d.ts +0 -1
  971. package/lib/dropdown/dropdown.spec.d.ts +0 -1
  972. package/lib/dropdown/helper.js +0 -8
  973. package/lib/fieldset/fieldset.spec.d.ts +0 -1
  974. package/lib/form/form.spec.d.ts +0 -0
  975. package/lib/gridlayout/gridLayout.spec.d.ts +0 -1
  976. package/lib/hint/hint.spec.d.ts +0 -1
  977. package/lib/icons/icons.spec.d.ts +0 -1
  978. package/lib/inputs/base/Label.d.ts +0 -6
  979. package/lib/inputs/base/Label.js +0 -32
  980. package/lib/inputs/base/base.spec.d.ts +0 -1
  981. package/lib/inputs/color/color_input.spec.d.ts +0 -0
  982. package/lib/inputs/date/date.spec.d.ts +0 -1
  983. package/lib/inputs/errorMessage/error.spec.d.ts +0 -1
  984. package/lib/inputs/file/filefield.spec.d.ts +0 -1
  985. package/lib/inputs/mask/input_mask.spec.d.ts +0 -0
  986. package/lib/inputs/multiSelect/multiSelect.spec.d.ts +0 -1
  987. package/lib/inputs/number/numberfield.spec.d.ts +0 -1
  988. package/lib/inputs/search/search_input.spec.d.ts +0 -1
  989. package/lib/inputs/select/select.spec.d.ts +0 -1
  990. package/lib/inputs/text/textfield.spec.d.ts +0 -1
  991. package/lib/inputs/textarea/textarea.spec.d.ts +0 -1
  992. package/lib/internals/withTooltip.d.ts +0 -8
  993. package/lib/internals/withTooltip.js +0 -75
  994. package/lib/labelMessages/labelMessages.spec.d.ts +0 -1
  995. package/lib/labels/label.spec.d.ts +0 -1
  996. package/lib/list/list.spec.d.ts +0 -1
  997. package/lib/menus/float/float-menu.spec.d.ts +0 -0
  998. package/lib/menus/sidenav/sidenav.spec.d.ts +0 -1
  999. package/lib/panel/ToolBar.js +0 -6
  1000. package/lib/panel/panel.spec.d.ts +0 -0
  1001. package/lib/popover/popover.spec.d.ts +0 -1
  1002. package/lib/progress/progress.spec.d.ts +0 -1
  1003. package/lib/radio/radio.spec.d.ts +0 -1
  1004. package/lib/shortcuts/shortcuts.spec.d.ts +0 -0
  1005. package/lib/spinner/spinner.spec.d.ts +0 -1
  1006. package/lib/split/split.spec.d.ts +0 -0
  1007. package/lib/table/table.spec.d.ts +0 -1
  1008. package/lib/tabs/tabs.spec.d.ts +0 -0
  1009. package/lib/textContent/textContent.spec.d.ts +0 -1
  1010. package/lib/toolbar/toolbar.spec.d.ts +0 -1
  1011. package/lib/tooltip/tooltip.spec.d.ts +0 -1
  1012. package/lib/treeview/treeview.spec.d.ts +0 -0
  1013. package/lib/uitour/uitour.spec.d.ts +0 -0
  1014. /package/lib/assets/{index10.css → styles/avatar.css} +0 -0
  1015. /package/lib/assets/{index7.css → styles/error.css} +0 -0
  1016. /package/lib/assets/{index13.css → styles/form.css} +0 -0
  1017. /package/lib/assets/{index8.css → styles/hint.css} +0 -0
  1018. /package/lib/assets/{index2.css → styles/icon.css} +0 -0
  1019. /package/lib/assets/{index14.css → styles/labelMessages.css} +0 -0
  1020. /package/lib/assets/{noPermission.css → styles/noPermission.css} +0 -0
  1021. /package/lib/assets/{index23.css → styles/numbers.css} +0 -0
  1022. /package/lib/assets/{index3.css → styles/popover.css} +0 -0
  1023. /package/lib/assets/{index25.css → styles/search.css} +0 -0
  1024. /package/lib/assets/{index6.css → styles/spinner.css} +0 -0
  1025. /package/lib/assets/{index16.css → styles/split.css} +0 -0
  1026. /package/lib/assets/{index4.css → styles/textContent.css} +0 -0
@@ -1,2651 +1,144 @@
1
- import { j as pt } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import R, { useRef as J, useState as N, useCallback as U, useEffect as w } from "react";
3
- import { P as h } from "../../chunks/index.Da--18GT.js";
4
- import dt from "../base/InputTextBase.js";
5
- import { numberToPtBR as ct, formatOnlyNumbers as Q, numberToEnUS as ft } from "../number/format_number.js";
6
- import { actionsOnPermissionDenied as kt, OPTIONS_ON_DENIED as P } from "../../permissionValidations.js";
7
- import { getMaskOptions as mt } from "./helpers.js";
8
- function T(u) {
9
- return typeof u == "string" || u instanceof String;
10
- }
11
- function tt(u) {
12
- var t;
13
- return typeof u == "object" && u != null && (u == null || (t = u.constructor) == null ? void 0 : t.name) === "Object";
14
- }
15
- function it(u, t) {
16
- return Array.isArray(t) ? it(u, (e, s) => t.includes(s)) : Object.entries(u).reduce((e, s) => {
17
- let [i, n] = s;
18
- return t(n, i) && (e[i] = n), e;
19
- }, {});
20
- }
21
- const o = {
22
- NONE: "NONE",
23
- LEFT: "LEFT",
24
- FORCE_LEFT: "FORCE_LEFT",
25
- RIGHT: "RIGHT",
26
- FORCE_RIGHT: "FORCE_RIGHT"
27
- };
28
- function gt(u) {
29
- switch (u) {
30
- case o.LEFT:
31
- return o.FORCE_LEFT;
32
- case o.RIGHT:
33
- return o.FORCE_RIGHT;
34
- default:
35
- return u;
36
- }
37
- }
38
- function $(u) {
39
- return u.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
40
- }
41
- function H(u, t) {
42
- if (t === u) return !0;
43
- const e = Array.isArray(t), s = Array.isArray(u);
44
- let i;
45
- if (e && s) {
46
- if (t.length != u.length) return !1;
47
- for (i = 0; i < t.length; i++) if (!H(t[i], u[i])) return !1;
48
- return !0;
49
- }
50
- if (e != s) return !1;
51
- if (t && u && typeof t == "object" && typeof u == "object") {
52
- const n = t instanceof Date, a = u instanceof Date;
53
- if (n && a) return t.getTime() == u.getTime();
54
- if (n != a) return !1;
55
- const r = t instanceof RegExp, l = u instanceof RegExp;
56
- if (r && l) return t.toString() == u.toString();
57
- if (r != l) return !1;
58
- const p = Object.keys(t);
59
- for (i = 0; i < p.length; i++) if (!Object.prototype.hasOwnProperty.call(u, p[i])) return !1;
60
- for (i = 0; i < p.length; i++) if (!H(u[p[i]], t[p[i]])) return !1;
61
- return !0;
62
- } else if (t && u && typeof t == "function" && typeof u == "function")
63
- return t.toString() === u.toString();
64
- return !1;
65
- }
66
- class _t {
67
- /** Current input value */
68
- /** Current cursor position */
69
- /** Old input value */
70
- /** Old selection */
71
- constructor(t) {
72
- for (Object.assign(this, t); this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos); )
73
- --this.oldSelection.start;
74
- if (this.insertedCount)
75
- for (; this.value.slice(this.cursorPos) !== this.oldValue.slice(this.oldSelection.end); )
76
- this.value.length - this.cursorPos < this.oldValue.length - this.oldSelection.end ? ++this.oldSelection.end : ++this.cursorPos;
77
- }
78
- /** Start changing position */
79
- get startChangePos() {
80
- return Math.min(this.cursorPos, this.oldSelection.start);
81
- }
82
- /** Inserted symbols count */
83
- get insertedCount() {
84
- return this.cursorPos - this.startChangePos;
85
- }
86
- /** Inserted symbols */
87
- get inserted() {
88
- return this.value.substr(this.startChangePos, this.insertedCount);
89
- }
90
- /** Removed symbols count */
91
- get removedCount() {
92
- return Math.max(this.oldSelection.end - this.startChangePos || // for Delete
93
- this.oldValue.length - this.value.length, 0);
94
- }
95
- /** Removed symbols */
96
- get removed() {
97
- return this.oldValue.substr(this.startChangePos, this.removedCount);
98
- }
99
- /** Unchanged head symbols */
100
- get head() {
101
- return this.value.substring(0, this.startChangePos);
102
- }
103
- /** Unchanged tail symbols */
104
- get tail() {
105
- return this.value.substring(this.startChangePos + this.insertedCount);
106
- }
107
- /** Remove direction */
108
- get removeDirection() {
109
- return !this.removedCount || this.insertedCount ? o.NONE : (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) && // if not range removed (event with backspace)
110
- this.oldSelection.end === this.oldSelection.start ? o.RIGHT : o.LEFT;
111
- }
112
- }
113
- function d(u, t) {
114
- return new d.InputMask(u, t);
115
- }
116
- function nt(u) {
117
- if (u == null) throw new Error("mask property should be defined");
118
- return u instanceof RegExp ? d.MaskedRegExp : T(u) ? d.MaskedPattern : u === Date ? d.MaskedDate : u === Number ? d.MaskedNumber : Array.isArray(u) || u === Array ? d.MaskedDynamic : d.Masked && u.prototype instanceof d.Masked ? u : d.Masked && u instanceof d.Masked ? u.constructor : u instanceof Function ? d.MaskedFunction : (console.warn("Mask not found for mask", u), d.Masked);
119
- }
120
- function L(u) {
121
- if (!u) throw new Error("Options in not defined");
122
- if (d.Masked) {
123
- if (u.prototype instanceof d.Masked) return {
124
- mask: u
125
- };
126
- const {
127
- mask: t = void 0,
128
- ...e
129
- } = u instanceof d.Masked ? {
130
- mask: u
131
- } : tt(u) && u.mask instanceof d.Masked ? u : {};
132
- if (t) {
133
- const s = t.mask;
134
- return {
135
- ...it(t, (i, n) => !n.startsWith("_")),
136
- mask: t.constructor,
137
- _mask: s,
138
- ...e
139
- };
140
- }
141
- }
142
- return tt(u) ? {
143
- ...u
144
- } : {
145
- mask: u
146
- };
147
- }
148
- function D(u) {
149
- if (d.Masked && u instanceof d.Masked) return u;
150
- const t = L(u), e = nt(t.mask);
151
- if (!e) throw new Error("Masked class is not found for provided mask " + t.mask + ", appropriate module needs to be imported manually before creating mask.");
152
- return t.mask === e && delete t.mask, t._mask && (t.mask = t._mask, delete t._mask), new e(t);
153
- }
154
- d.createMask = D;
155
- class W {
156
- /** */
157
- /** */
158
- /** */
159
- /** Safely returns selection start */
160
- get selectionStart() {
161
- let t;
162
- try {
163
- t = this._unsafeSelectionStart;
164
- } catch {
165
- }
166
- return t ?? this.value.length;
167
- }
168
- /** Safely returns selection end */
169
- get selectionEnd() {
170
- let t;
171
- try {
172
- t = this._unsafeSelectionEnd;
173
- } catch {
174
- }
175
- return t ?? this.value.length;
176
- }
177
- /** Safely sets element selection */
178
- select(t, e) {
179
- if (!(t == null || e == null || t === this.selectionStart && e === this.selectionEnd))
180
- try {
181
- this._unsafeSelect(t, e);
182
- } catch {
183
- }
184
- }
185
- /** */
186
- get isActive() {
187
- return !1;
188
- }
189
- /** */
190
- /** */
191
- /** */
192
- }
193
- d.MaskElement = W;
194
- const et = 90, vt = 89;
195
- class z extends W {
196
- /** HTMLElement to use mask on */
197
- constructor(t) {
198
- super(), this.input = t, this._onKeydown = this._onKeydown.bind(this), this._onInput = this._onInput.bind(this), this._onBeforeinput = this._onBeforeinput.bind(this), this._onCompositionEnd = this._onCompositionEnd.bind(this);
199
- }
200
- get rootElement() {
201
- var t, e, s;
202
- return (t = (e = (s = this.input).getRootNode) == null ? void 0 : e.call(s)) != null ? t : document;
203
- }
204
- /** Is element in focus */
205
- get isActive() {
206
- return this.input === this.rootElement.activeElement;
207
- }
208
- /** Binds HTMLElement events to mask internal events */
209
- bindEvents(t) {
210
- this.input.addEventListener("keydown", this._onKeydown), this.input.addEventListener("input", this._onInput), this.input.addEventListener("beforeinput", this._onBeforeinput), this.input.addEventListener("compositionend", this._onCompositionEnd), this.input.addEventListener("drop", t.drop), this.input.addEventListener("click", t.click), this.input.addEventListener("focus", t.focus), this.input.addEventListener("blur", t.commit), this._handlers = t;
211
- }
212
- _onKeydown(t) {
213
- if (this._handlers.redo && (t.keyCode === et && t.shiftKey && (t.metaKey || t.ctrlKey) || t.keyCode === vt && t.ctrlKey))
214
- return t.preventDefault(), this._handlers.redo(t);
215
- if (this._handlers.undo && t.keyCode === et && (t.metaKey || t.ctrlKey))
216
- return t.preventDefault(), this._handlers.undo(t);
217
- t.isComposing || this._handlers.selectionChange(t);
218
- }
219
- _onBeforeinput(t) {
220
- if (t.inputType === "historyUndo" && this._handlers.undo)
221
- return t.preventDefault(), this._handlers.undo(t);
222
- if (t.inputType === "historyRedo" && this._handlers.redo)
223
- return t.preventDefault(), this._handlers.redo(t);
224
- }
225
- _onCompositionEnd(t) {
226
- this._handlers.input(t);
227
- }
228
- _onInput(t) {
229
- t.isComposing || this._handlers.input(t);
230
- }
231
- /** Unbinds HTMLElement events to mask internal events */
232
- unbindEvents() {
233
- this.input.removeEventListener("keydown", this._onKeydown), this.input.removeEventListener("input", this._onInput), this.input.removeEventListener("beforeinput", this._onBeforeinput), this.input.removeEventListener("compositionend", this._onCompositionEnd), this.input.removeEventListener("drop", this._handlers.drop), this.input.removeEventListener("click", this._handlers.click), this.input.removeEventListener("focus", this._handlers.focus), this.input.removeEventListener("blur", this._handlers.commit), this._handlers = {};
234
- }
235
- }
236
- d.HTMLMaskElement = z;
237
- class Et extends z {
238
- /** InputElement to use mask on */
239
- constructor(t) {
240
- super(t), this.input = t;
241
- }
242
- /** Returns InputElement selection start */
243
- get _unsafeSelectionStart() {
244
- return this.input.selectionStart != null ? this.input.selectionStart : this.value.length;
245
- }
246
- /** Returns InputElement selection end */
247
- get _unsafeSelectionEnd() {
248
- return this.input.selectionEnd;
249
- }
250
- /** Sets InputElement selection */
251
- _unsafeSelect(t, e) {
252
- this.input.setSelectionRange(t, e);
253
- }
254
- get value() {
255
- return this.input.value;
256
- }
257
- set value(t) {
258
- this.input.value = t;
259
- }
260
- }
261
- d.HTMLMaskElement = z;
262
- class at extends z {
263
- /** Returns HTMLElement selection start */
264
- get _unsafeSelectionStart() {
265
- const t = this.rootElement, e = t.getSelection && t.getSelection(), s = e && e.anchorOffset, i = e && e.focusOffset;
266
- return i == null || s == null || s < i ? s : i;
267
- }
268
- /** Returns HTMLElement selection end */
269
- get _unsafeSelectionEnd() {
270
- const t = this.rootElement, e = t.getSelection && t.getSelection(), s = e && e.anchorOffset, i = e && e.focusOffset;
271
- return i == null || s == null || s > i ? s : i;
272
- }
273
- /** Sets HTMLElement selection */
274
- _unsafeSelect(t, e) {
275
- if (!this.rootElement.createRange) return;
276
- const s = this.rootElement.createRange();
277
- s.setStart(this.input.firstChild || this.input, t), s.setEnd(this.input.lastChild || this.input, e);
278
- const i = this.rootElement, n = i.getSelection && i.getSelection();
279
- n && (n.removeAllRanges(), n.addRange(s));
280
- }
281
- /** HTMLElement value */
282
- get value() {
283
- return this.input.textContent || "";
284
- }
285
- set value(t) {
286
- this.input.textContent = t;
287
- }
288
- }
289
- d.HTMLContenteditableMaskElement = at;
290
- class G {
291
- constructor() {
292
- this.states = [], this.currentIndex = 0;
293
- }
294
- get currentState() {
295
- return this.states[this.currentIndex];
296
- }
297
- get isEmpty() {
298
- return this.states.length === 0;
299
- }
300
- push(t) {
301
- this.currentIndex < this.states.length - 1 && (this.states.length = this.currentIndex + 1), this.states.push(t), this.states.length > G.MAX_LENGTH && this.states.shift(), this.currentIndex = this.states.length - 1;
302
- }
303
- go(t) {
304
- return this.currentIndex = Math.min(Math.max(this.currentIndex + t, 0), this.states.length - 1), this.currentState;
305
- }
306
- undo() {
307
- return this.go(-1);
308
- }
309
- redo() {
310
- return this.go(1);
311
- }
312
- clear() {
313
- this.states.length = 0, this.currentIndex = 0;
314
- }
315
- }
316
- G.MAX_LENGTH = 100;
317
- class Ct {
318
- /**
319
- View element
320
- */
321
- /** Internal {@link Masked} model */
322
- constructor(t, e) {
323
- this.el = t instanceof W ? t : t.isContentEditable && t.tagName !== "INPUT" && t.tagName !== "TEXTAREA" ? new at(t) : new Et(t), this.masked = D(e), this._listeners = {}, this._value = "", this._unmaskedValue = "", this._rawInputValue = "", this.history = new G(), this._saveSelection = this._saveSelection.bind(this), this._onInput = this._onInput.bind(this), this._onChange = this._onChange.bind(this), this._onDrop = this._onDrop.bind(this), this._onFocus = this._onFocus.bind(this), this._onClick = this._onClick.bind(this), this._onUndo = this._onUndo.bind(this), this._onRedo = this._onRedo.bind(this), this.alignCursor = this.alignCursor.bind(this), this.alignCursorFriendly = this.alignCursorFriendly.bind(this), this._bindEvents(), this.updateValue(), this._onChange();
324
- }
325
- maskEquals(t) {
326
- var e;
327
- return t == null || ((e = this.masked) == null ? void 0 : e.maskEquals(t));
328
- }
329
- /** Masked */
330
- get mask() {
331
- return this.masked.mask;
332
- }
333
- set mask(t) {
334
- if (this.maskEquals(t)) return;
335
- if (!(t instanceof d.Masked) && this.masked.constructor === nt(t)) {
336
- this.masked.updateOptions({
337
- mask: t
338
- });
339
- return;
340
- }
341
- const e = t instanceof d.Masked ? t : D({
342
- mask: t
343
- });
344
- e.unmaskedValue = this.masked.unmaskedValue, this.masked = e;
345
- }
346
- /** Raw value */
347
- get value() {
348
- return this._value;
349
- }
350
- set value(t) {
351
- this.value !== t && (this.masked.value = t, this.updateControl("auto"));
352
- }
353
- /** Unmasked value */
354
- get unmaskedValue() {
355
- return this._unmaskedValue;
356
- }
357
- set unmaskedValue(t) {
358
- this.unmaskedValue !== t && (this.masked.unmaskedValue = t, this.updateControl("auto"));
359
- }
360
- /** Raw input value */
361
- get rawInputValue() {
362
- return this._rawInputValue;
363
- }
364
- set rawInputValue(t) {
365
- this.rawInputValue !== t && (this.masked.rawInputValue = t, this.updateControl(), this.alignCursor());
366
- }
367
- /** Typed unmasked value */
368
- get typedValue() {
369
- return this.masked.typedValue;
370
- }
371
- set typedValue(t) {
372
- this.masked.typedValueEquals(t) || (this.masked.typedValue = t, this.updateControl("auto"));
373
- }
374
- /** Display value */
375
- get displayValue() {
376
- return this.masked.displayValue;
377
- }
378
- /** Starts listening to element events */
379
- _bindEvents() {
380
- this.el.bindEvents({
381
- selectionChange: this._saveSelection,
382
- input: this._onInput,
383
- drop: this._onDrop,
384
- click: this._onClick,
385
- focus: this._onFocus,
386
- commit: this._onChange,
387
- undo: this._onUndo,
388
- redo: this._onRedo
389
- });
390
- }
391
- /** Stops listening to element events */
392
- _unbindEvents() {
393
- this.el && this.el.unbindEvents();
394
- }
395
- /** Fires custom event */
396
- _fireEvent(t, e) {
397
- const s = this._listeners[t];
398
- s && s.forEach((i) => i(e));
399
- }
400
- /** Current selection start */
401
- get selectionStart() {
402
- return this._cursorChanging ? this._changingCursorPos : this.el.selectionStart;
403
- }
404
- /** Current cursor position */
405
- get cursorPos() {
406
- return this._cursorChanging ? this._changingCursorPos : this.el.selectionEnd;
407
- }
408
- set cursorPos(t) {
409
- !this.el || !this.el.isActive || (this.el.select(t, t), this._saveSelection());
410
- }
411
- /** Stores current selection */
412
- _saveSelection() {
413
- this.displayValue !== this.el.value && console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."), this._selection = {
414
- start: this.selectionStart,
415
- end: this.cursorPos
416
- };
417
- }
418
- /** Syncronizes model value from view */
419
- updateValue() {
420
- this.masked.value = this.el.value, this._value = this.masked.value, this._unmaskedValue = this.masked.unmaskedValue, this._rawInputValue = this.masked.rawInputValue;
421
- }
422
- /** Syncronizes view from model value, fires change events */
423
- updateControl(t) {
424
- const e = this.masked.unmaskedValue, s = this.masked.value, i = this.masked.rawInputValue, n = this.displayValue, a = this.unmaskedValue !== e || this.value !== s || this._rawInputValue !== i;
425
- this._unmaskedValue = e, this._value = s, this._rawInputValue = i, this.el.value !== n && (this.el.value = n), t === "auto" ? this.alignCursor() : t != null && (this.cursorPos = t), a && this._fireChangeEvents(), !this._historyChanging && (a || this.history.isEmpty) && this.history.push({
426
- unmaskedValue: e,
427
- selection: {
428
- start: this.selectionStart,
429
- end: this.cursorPos
430
- }
431
- });
432
- }
433
- /** Updates options with deep equal check, recreates {@link Masked} model if mask type changes */
434
- updateOptions(t) {
435
- const {
436
- mask: e,
437
- ...s
438
- } = t, i = !this.maskEquals(e), n = this.masked.optionsIsChanged(s);
439
- i && (this.mask = e), n && this.masked.updateOptions(s), (i || n) && this.updateControl();
440
- }
441
- /** Updates cursor */
442
- updateCursor(t) {
443
- t != null && (this.cursorPos = t, this._delayUpdateCursor(t));
444
- }
445
- /** Delays cursor update to support mobile browsers */
446
- _delayUpdateCursor(t) {
447
- this._abortUpdateCursor(), this._changingCursorPos = t, this._cursorChanging = setTimeout(() => {
448
- this.el && (this.cursorPos = this._changingCursorPos, this._abortUpdateCursor());
449
- }, 10);
450
- }
451
- /** Fires custom events */
452
- _fireChangeEvents() {
453
- this._fireEvent("accept", this._inputEvent), this.masked.isComplete && this._fireEvent("complete", this._inputEvent);
454
- }
455
- /** Aborts delayed cursor update */
456
- _abortUpdateCursor() {
457
- this._cursorChanging && (clearTimeout(this._cursorChanging), delete this._cursorChanging);
458
- }
459
- /** Aligns cursor to nearest available position */
460
- alignCursor() {
461
- this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, o.LEFT));
462
- }
463
- /** Aligns cursor only if selection is empty */
464
- alignCursorFriendly() {
465
- this.selectionStart === this.cursorPos && this.alignCursor();
466
- }
467
- /** Adds listener on custom event */
468
- on(t, e) {
469
- return this._listeners[t] || (this._listeners[t] = []), this._listeners[t].push(e), this;
470
- }
471
- /** Removes custom event listener */
472
- off(t, e) {
473
- if (!this._listeners[t]) return this;
474
- if (!e)
475
- return delete this._listeners[t], this;
476
- const s = this._listeners[t].indexOf(e);
477
- return s >= 0 && this._listeners[t].splice(s, 1), this;
478
- }
479
- /** Handles view input event */
480
- _onInput(t) {
481
- this._inputEvent = t, this._abortUpdateCursor();
482
- const e = new _t({
483
- // new state
484
- value: this.el.value,
485
- cursorPos: this.cursorPos,
486
- // old state
487
- oldValue: this.displayValue,
488
- oldSelection: this._selection
489
- }), s = this.masked.rawInputValue, i = this.masked.splice(e.startChangePos, e.removed.length, e.inserted, e.removeDirection, {
490
- input: !0,
491
- raw: !0
492
- }).offset, n = s === this.masked.rawInputValue ? e.removeDirection : o.NONE;
493
- let a = this.masked.nearestInputPos(e.startChangePos + i, n);
494
- n !== o.NONE && (a = this.masked.nearestInputPos(a, o.NONE)), this.updateControl(a), delete this._inputEvent;
495
- }
496
- /** Handles view change event and commits model value */
497
- _onChange() {
498
- this.displayValue !== this.el.value && this.updateValue(), this.masked.doCommit(), this.updateControl(), this._saveSelection();
499
- }
500
- /** Handles view drop event, prevents by default */
501
- _onDrop(t) {
502
- t.preventDefault(), t.stopPropagation();
503
- }
504
- /** Restore last selection on focus */
505
- _onFocus(t) {
506
- this.alignCursorFriendly();
507
- }
508
- /** Restore last selection on focus */
509
- _onClick(t) {
510
- this.alignCursorFriendly();
511
- }
512
- _onUndo() {
513
- this._applyHistoryState(this.history.undo());
514
- }
515
- _onRedo() {
516
- this._applyHistoryState(this.history.redo());
517
- }
518
- _applyHistoryState(t) {
519
- t && (this._historyChanging = !0, this.unmaskedValue = t.unmaskedValue, this.el.select(t.selection.start, t.selection.end), this._saveSelection(), this._historyChanging = !1);
520
- }
521
- /** Unbind view events and removes element reference */
522
- destroy() {
523
- this._unbindEvents(), this._listeners.length = 0, delete this.el;
524
- }
525
- }
526
- d.InputMask = Ct;
527
- class c {
528
- /** Inserted symbols */
529
- /** Additional offset if any changes occurred before tail */
530
- /** Raw inserted is used by dynamic mask */
531
- /** Can skip chars */
532
- static normalize(t) {
533
- return Array.isArray(t) ? t : [t, new c()];
534
- }
535
- constructor(t) {
536
- Object.assign(this, {
537
- inserted: "",
538
- rawInserted: "",
539
- tailShift: 0,
540
- skip: !1
541
- }, t);
542
- }
543
- /** Aggregate changes */
544
- aggregate(t) {
545
- return this.inserted += t.inserted, this.rawInserted += t.rawInserted, this.tailShift += t.tailShift, this.skip = this.skip || t.skip, this;
546
- }
547
- /** Total offset considering all changes */
548
- get offset() {
549
- return this.tailShift + this.inserted.length;
550
- }
551
- get consumed() {
552
- return !!this.rawInserted || this.skip;
553
- }
554
- equals(t) {
555
- return this.inserted === t.inserted && this.tailShift === t.tailShift && this.rawInserted === t.rawInserted && this.skip === t.skip;
556
- }
557
- }
558
- d.ChangeDetails = c;
559
- class B {
560
- /** Tail value as string */
561
- /** Tail start position */
562
- /** Start position */
563
- constructor(t, e, s) {
564
- t === void 0 && (t = ""), e === void 0 && (e = 0), this.value = t, this.from = e, this.stop = s;
565
- }
566
- toString() {
567
- return this.value;
568
- }
569
- extend(t) {
570
- this.value += String(t);
571
- }
572
- appendTo(t) {
573
- return t.append(this.toString(), {
574
- tail: !0
575
- }).aggregate(t._appendPlaceholder());
576
- }
577
- get state() {
578
- return {
579
- value: this.value,
580
- from: this.from,
581
- stop: this.stop
582
- };
583
- }
584
- set state(t) {
585
- Object.assign(this, t);
586
- }
587
- unshift(t) {
588
- if (!this.value.length || t != null && this.from >= t) return "";
589
- const e = this.value[0];
590
- return this.value = this.value.slice(1), e;
591
- }
592
- shift() {
593
- if (!this.value.length) return "";
594
- const t = this.value[this.value.length - 1];
595
- return this.value = this.value.slice(0, -1), t;
596
- }
597
- }
598
- class _ {
599
- /** */
600
- /** */
601
- /** Transforms value before mask processing */
602
- /** Transforms each char before mask processing */
603
- /** Validates if value is acceptable */
604
- /** Does additional processing at the end of editing */
605
- /** Format typed value to string */
606
- /** Parse string to get typed value */
607
- /** Enable characters overwriting */
608
- /** */
609
- /** */
610
- /** */
611
- /** */
612
- constructor(t) {
613
- this._value = "", this._update({
614
- ..._.DEFAULTS,
615
- ...t
616
- }), this._initialized = !0;
617
- }
618
- /** Sets and applies new options */
619
- updateOptions(t) {
620
- this.optionsIsChanged(t) && this.withValueRefresh(this._update.bind(this, t));
621
- }
622
- /** Sets new options */
623
- _update(t) {
624
- Object.assign(this, t);
625
- }
626
- /** Mask state */
627
- get state() {
628
- return {
629
- _value: this.value,
630
- _rawInputValue: this.rawInputValue
631
- };
632
- }
633
- set state(t) {
634
- this._value = t._value;
635
- }
636
- /** Resets value */
637
- reset() {
638
- this._value = "";
639
- }
640
- get value() {
641
- return this._value;
642
- }
643
- set value(t) {
644
- this.resolve(t, {
645
- input: !0
646
- });
647
- }
648
- /** Resolve new value */
649
- resolve(t, e) {
650
- e === void 0 && (e = {
651
- input: !0
652
- }), this.reset(), this.append(t, e, ""), this.doCommit();
653
- }
654
- get unmaskedValue() {
655
- return this.value;
656
- }
657
- set unmaskedValue(t) {
658
- this.resolve(t, {});
659
- }
660
- get typedValue() {
661
- return this.parse ? this.parse(this.value, this) : this.unmaskedValue;
662
- }
663
- set typedValue(t) {
664
- this.format ? this.value = this.format(t, this) : this.unmaskedValue = String(t);
665
- }
666
- /** Value that includes raw user input */
667
- get rawInputValue() {
668
- return this.extractInput(0, this.displayValue.length, {
669
- raw: !0
670
- });
671
- }
672
- set rawInputValue(t) {
673
- this.resolve(t, {
674
- raw: !0
675
- });
676
- }
677
- get displayValue() {
678
- return this.value;
679
- }
680
- get isComplete() {
681
- return !0;
682
- }
683
- get isFilled() {
684
- return this.isComplete;
685
- }
686
- /** Finds nearest input position in direction */
687
- nearestInputPos(t, e) {
688
- return t;
689
- }
690
- totalInputPositions(t, e) {
691
- return t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), Math.min(this.displayValue.length, e - t);
692
- }
693
- /** Extracts value in range considering flags */
694
- extractInput(t, e, s) {
695
- return t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), this.displayValue.slice(t, e);
696
- }
697
- /** Extracts tail in range */
698
- extractTail(t, e) {
699
- return t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), new B(this.extractInput(t, e), t);
700
- }
701
- /** Appends tail */
702
- appendTail(t) {
703
- return T(t) && (t = new B(String(t))), t.appendTo(this);
704
- }
705
- /** Appends char */
706
- _appendCharRaw(t, e) {
707
- return t ? (this._value += t, new c({
708
- inserted: t,
709
- rawInserted: t
710
- })) : new c();
711
- }
712
- /** Appends char */
713
- _appendChar(t, e, s) {
714
- e === void 0 && (e = {});
715
- const i = this.state;
716
- let n;
717
- if ([t, n] = this.doPrepareChar(t, e), t && (n = n.aggregate(this._appendCharRaw(t, e)), !n.rawInserted && this.autofix === "pad")) {
718
- const a = this.state;
719
- this.state = i;
720
- let r = this.pad(e);
721
- const l = this._appendCharRaw(t, e);
722
- r = r.aggregate(l), l.rawInserted || r.equals(n) ? n = r : this.state = a;
723
- }
724
- if (n.inserted) {
725
- let a, r = this.doValidate(e) !== !1;
726
- if (r && s != null) {
727
- const l = this.state;
728
- if (this.overwrite === !0) {
729
- a = s.state;
730
- for (let k = 0; k < n.rawInserted.length; ++k)
731
- s.unshift(this.displayValue.length - n.tailShift);
732
- }
733
- let p = this.appendTail(s);
734
- if (r = p.rawInserted.length === s.toString().length, !(r && p.inserted) && this.overwrite === "shift") {
735
- this.state = l, a = s.state;
736
- for (let k = 0; k < n.rawInserted.length; ++k)
737
- s.shift();
738
- p = this.appendTail(s), r = p.rawInserted.length === s.toString().length;
739
- }
740
- r && p.inserted && (this.state = l);
741
- }
742
- r || (n = new c(), this.state = i, s && a && (s.state = a));
743
- }
744
- return n;
745
- }
746
- /** Appends optional placeholder at the end */
747
- _appendPlaceholder() {
748
- return new c();
749
- }
750
- /** Appends optional eager placeholder at the end */
751
- _appendEager() {
752
- return new c();
753
- }
754
- /** Appends symbols considering flags */
755
- append(t, e, s) {
756
- if (!T(t)) throw new Error("value should be string");
757
- const i = T(s) ? new B(String(s)) : s;
758
- e != null && e.tail && (e._beforeTailState = this.state);
759
- let n;
760
- [t, n] = this.doPrepare(t, e);
761
- for (let a = 0; a < t.length; ++a) {
762
- const r = this._appendChar(t[a], e, i);
763
- if (!r.rawInserted && !this.doSkipInvalid(t[a], e, i)) break;
764
- n.aggregate(r);
765
- }
766
- return (this.eager === !0 || this.eager === "append") && e != null && e.input && t && n.aggregate(this._appendEager()), i != null && (n.tailShift += this.appendTail(i).tailShift), n;
767
- }
768
- remove(t, e) {
769
- return t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), this._value = this.displayValue.slice(0, t) + this.displayValue.slice(e), new c();
770
- }
771
- /** Calls function and reapplies current value */
772
- withValueRefresh(t) {
773
- if (this._refreshing || !this._initialized) return t();
774
- this._refreshing = !0;
775
- const e = this.rawInputValue, s = this.value, i = t();
776
- return this.rawInputValue = e, this.value && this.value !== s && s.indexOf(this.value) === 0 && (this.append(s.slice(this.displayValue.length), {}, ""), this.doCommit()), delete this._refreshing, i;
777
- }
778
- runIsolated(t) {
779
- if (this._isolated || !this._initialized) return t(this);
780
- this._isolated = !0;
781
- const e = this.state, s = t(this);
782
- return this.state = e, delete this._isolated, s;
783
- }
784
- doSkipInvalid(t, e, s) {
785
- return !!this.skipInvalid;
786
- }
787
- /** Prepares string before mask processing */
788
- doPrepare(t, e) {
789
- return e === void 0 && (e = {}), c.normalize(this.prepare ? this.prepare(t, this, e) : t);
790
- }
791
- /** Prepares each char before mask processing */
792
- doPrepareChar(t, e) {
793
- return e === void 0 && (e = {}), c.normalize(this.prepareChar ? this.prepareChar(t, this, e) : t);
794
- }
795
- /** Validates if value is acceptable */
796
- doValidate(t) {
797
- return (!this.validate || this.validate(this.value, this, t)) && (!this.parent || this.parent.doValidate(t));
798
- }
799
- /** Does additional processing at the end of editing */
800
- doCommit() {
801
- this.commit && this.commit(this.value, this);
802
- }
803
- splice(t, e, s, i, n) {
804
- s === void 0 && (s = ""), i === void 0 && (i = o.NONE), n === void 0 && (n = {
805
- input: !0
806
- });
807
- const a = t + e, r = this.extractTail(a), l = this.eager === !0 || this.eager === "remove";
808
- let p;
809
- l && (i = gt(i), p = this.extractInput(0, a, {
810
- raw: !0
811
- }));
812
- let k = t;
813
- const m = new c();
814
- if (i !== o.NONE && (k = this.nearestInputPos(t, e > 1 && t !== 0 && !l ? o.NONE : i), m.tailShift = k - t), m.aggregate(this.remove(k)), l && i !== o.NONE && p === this.rawInputValue)
815
- if (i === o.FORCE_LEFT) {
816
- let g;
817
- for (; p === this.rawInputValue && (g = this.displayValue.length); )
818
- m.aggregate(new c({
819
- tailShift: -1
820
- })).aggregate(this.remove(g - 1));
821
- } else i === o.FORCE_RIGHT && r.unshift();
822
- return m.aggregate(this.append(s, n, r));
823
- }
824
- maskEquals(t) {
825
- return this.mask === t;
826
- }
827
- optionsIsChanged(t) {
828
- return !H(this, t);
829
- }
830
- typedValueEquals(t) {
831
- const e = this.typedValue;
832
- return t === e || _.EMPTY_VALUES.includes(t) && _.EMPTY_VALUES.includes(e) || (this.format ? this.format(t, this) === this.format(this.typedValue, this) : !1);
833
- }
834
- pad(t) {
835
- return new c();
836
- }
837
- }
838
- _.DEFAULTS = {
839
- skipInvalid: !0
840
- };
841
- _.EMPTY_VALUES = [void 0, null, ""];
842
- d.Masked = _;
843
- class O {
844
- /** */
845
- constructor(t, e) {
846
- t === void 0 && (t = []), e === void 0 && (e = 0), this.chunks = t, this.from = e;
847
- }
848
- toString() {
849
- return this.chunks.map(String).join("");
850
- }
851
- extend(t) {
852
- if (!String(t)) return;
853
- t = T(t) ? new B(String(t)) : t;
854
- const e = this.chunks[this.chunks.length - 1], s = e && // if stops are same or tail has no stop
855
- (e.stop === t.stop || t.stop == null) && // if tail chunk goes just after last chunk
856
- t.from === e.from + e.toString().length;
857
- if (t instanceof B)
858
- s ? e.extend(t.toString()) : this.chunks.push(t);
859
- else if (t instanceof O) {
860
- if (t.stop == null) {
861
- let i;
862
- for (; t.chunks.length && t.chunks[0].stop == null; )
863
- i = t.chunks.shift(), i.from += t.from, this.extend(i);
864
- }
865
- t.toString() && (t.stop = t.blockIndex, this.chunks.push(t));
866
- }
867
- }
868
- appendTo(t) {
869
- if (!(t instanceof d.MaskedPattern))
870
- return new B(this.toString()).appendTo(t);
871
- const e = new c();
872
- for (let s = 0; s < this.chunks.length; ++s) {
873
- const i = this.chunks[s], n = t._mapPosToBlock(t.displayValue.length), a = i.stop;
874
- let r;
875
- if (a != null && // if block not found or stop is behind lastBlock
876
- (!n || n.index <= a) && ((i instanceof O || // for continuous block also check if stop is exist
877
- t._stops.indexOf(a) >= 0) && e.aggregate(t._appendPlaceholder(a)), r = i instanceof O && t._blocks[a]), r) {
878
- const l = r.appendTail(i);
879
- e.aggregate(l);
880
- const p = i.toString().slice(l.rawInserted.length);
881
- p && e.aggregate(t.append(p, {
882
- tail: !0
883
- }));
884
- } else
885
- e.aggregate(t.append(i.toString(), {
886
- tail: !0
887
- }));
888
- }
889
- return e;
890
- }
891
- get state() {
892
- return {
893
- chunks: this.chunks.map((t) => t.state),
894
- from: this.from,
895
- stop: this.stop,
896
- blockIndex: this.blockIndex
897
- };
898
- }
899
- set state(t) {
900
- const {
901
- chunks: e,
902
- ...s
903
- } = t;
904
- Object.assign(this, s), this.chunks = e.map((i) => {
905
- const n = "chunks" in i ? new O() : new B();
906
- return n.state = i, n;
907
- });
908
- }
909
- unshift(t) {
910
- if (!this.chunks.length || t != null && this.from >= t) return "";
911
- const e = t != null ? t - this.from : t;
912
- let s = 0;
913
- for (; s < this.chunks.length; ) {
914
- const i = this.chunks[s], n = i.unshift(e);
915
- if (i.toString()) {
916
- if (!n) break;
917
- ++s;
918
- } else
919
- this.chunks.splice(s, 1);
920
- if (n) return n;
921
- }
922
- return "";
923
- }
924
- shift() {
925
- if (!this.chunks.length) return "";
926
- let t = this.chunks.length - 1;
927
- for (; 0 <= t; ) {
928
- const e = this.chunks[t], s = e.shift();
929
- if (e.toString()) {
930
- if (!s) break;
931
- --t;
932
- } else
933
- this.chunks.splice(t, 1);
934
- if (s) return s;
935
- }
936
- return "";
937
- }
938
- }
939
- class At {
940
- constructor(t, e) {
941
- this.masked = t, this._log = [];
942
- const {
943
- offset: s,
944
- index: i
945
- } = t._mapPosToBlock(e) || (e < 0 ? (
946
- // first
947
- {
948
- index: 0,
949
- offset: 0
950
- }
951
- ) : (
952
- // last
953
- {
954
- index: this.masked._blocks.length,
955
- offset: 0
956
- }
957
- ));
958
- this.offset = s, this.index = i, this.ok = !1;
959
- }
960
- get block() {
961
- return this.masked._blocks[this.index];
962
- }
963
- get pos() {
964
- return this.masked._blockStartPos(this.index) + this.offset;
965
- }
966
- get state() {
967
- return {
968
- index: this.index,
969
- offset: this.offset,
970
- ok: this.ok
971
- };
972
- }
973
- set state(t) {
974
- Object.assign(this, t);
975
- }
976
- pushState() {
977
- this._log.push(this.state);
978
- }
979
- popState() {
980
- const t = this._log.pop();
981
- return t && (this.state = t), t;
982
- }
983
- bindBlock() {
984
- this.block || (this.index < 0 && (this.index = 0, this.offset = 0), this.index >= this.masked._blocks.length && (this.index = this.masked._blocks.length - 1, this.offset = this.block.displayValue.length));
985
- }
986
- _pushLeft(t) {
987
- for (this.pushState(), this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((e = this.block) == null ? void 0 : e.displayValue.length) || 0) {
988
- var e;
989
- if (t()) return this.ok = !0;
990
- }
991
- return this.ok = !1;
992
- }
993
- _pushRight(t) {
994
- for (this.pushState(), this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0)
995
- if (t()) return this.ok = !0;
996
- return this.ok = !1;
997
- }
998
- pushLeftBeforeFilled() {
999
- return this._pushLeft(() => {
1000
- if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, o.FORCE_LEFT), this.offset !== 0))
1001
- return !0;
1002
- });
1003
- }
1004
- pushLeftBeforeInput() {
1005
- return this._pushLeft(() => {
1006
- if (!this.block.isFixed)
1007
- return this.offset = this.block.nearestInputPos(this.offset, o.LEFT), !0;
1008
- });
1009
- }
1010
- pushLeftBeforeRequired() {
1011
- return this._pushLeft(() => {
1012
- if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
1013
- return this.offset = this.block.nearestInputPos(this.offset, o.LEFT), !0;
1014
- });
1015
- }
1016
- pushRightBeforeFilled() {
1017
- return this._pushRight(() => {
1018
- if (!(this.block.isFixed || !this.block.value) && (this.offset = this.block.nearestInputPos(this.offset, o.FORCE_RIGHT), this.offset !== this.block.value.length))
1019
- return !0;
1020
- });
1021
- }
1022
- pushRightBeforeInput() {
1023
- return this._pushRight(() => {
1024
- if (!this.block.isFixed)
1025
- return this.offset = this.block.nearestInputPos(this.offset, o.NONE), !0;
1026
- });
1027
- }
1028
- pushRightBeforeRequired() {
1029
- return this._pushRight(() => {
1030
- if (!(this.block.isFixed || this.block.isOptional && !this.block.value))
1031
- return this.offset = this.block.nearestInputPos(this.offset, o.NONE), !0;
1032
- });
1033
- }
1034
- }
1035
- class ut {
1036
- /** */
1037
- /** */
1038
- /** */
1039
- /** */
1040
- /** */
1041
- /** */
1042
- constructor(t) {
1043
- Object.assign(this, t), this._value = "", this.isFixed = !0;
1044
- }
1045
- get value() {
1046
- return this._value;
1047
- }
1048
- get unmaskedValue() {
1049
- return this.isUnmasking ? this.value : "";
1050
- }
1051
- get rawInputValue() {
1052
- return this._isRawInput ? this.value : "";
1053
- }
1054
- get displayValue() {
1055
- return this.value;
1056
- }
1057
- reset() {
1058
- this._isRawInput = !1, this._value = "";
1059
- }
1060
- remove(t, e) {
1061
- return t === void 0 && (t = 0), e === void 0 && (e = this._value.length), this._value = this._value.slice(0, t) + this._value.slice(e), this._value || (this._isRawInput = !1), new c();
1062
- }
1063
- nearestInputPos(t, e) {
1064
- e === void 0 && (e = o.NONE);
1065
- const s = 0, i = this._value.length;
1066
- switch (e) {
1067
- case o.LEFT:
1068
- case o.FORCE_LEFT:
1069
- return s;
1070
- case o.NONE:
1071
- case o.RIGHT:
1072
- case o.FORCE_RIGHT:
1073
- default:
1074
- return i;
1075
- }
1076
- }
1077
- totalInputPositions(t, e) {
1078
- return t === void 0 && (t = 0), e === void 0 && (e = this._value.length), this._isRawInput ? e - t : 0;
1079
- }
1080
- extractInput(t, e, s) {
1081
- return t === void 0 && (t = 0), e === void 0 && (e = this._value.length), s === void 0 && (s = {}), s.raw && this._isRawInput && this._value.slice(t, e) || "";
1082
- }
1083
- get isComplete() {
1084
- return !0;
1085
- }
1086
- get isFilled() {
1087
- return !!this._value;
1088
- }
1089
- _appendChar(t, e) {
1090
- if (e === void 0 && (e = {}), this.isFilled) return new c();
1091
- const s = this.eager === !0 || this.eager === "append", n = this.char === t && (this.isUnmasking || e.input || e.raw) && (!e.raw || !s) && !e.tail, a = new c({
1092
- inserted: this.char,
1093
- rawInserted: n ? this.char : ""
1094
- });
1095
- return this._value = this.char, this._isRawInput = n && (e.raw || e.input), a;
1096
- }
1097
- _appendEager() {
1098
- return this._appendChar(this.char, {
1099
- tail: !0
1100
- });
1101
- }
1102
- _appendPlaceholder() {
1103
- const t = new c();
1104
- return this.isFilled || (this._value = t.inserted = this.char), t;
1105
- }
1106
- extractTail() {
1107
- return new B("");
1108
- }
1109
- appendTail(t) {
1110
- return T(t) && (t = new B(String(t))), t.appendTo(this);
1111
- }
1112
- append(t, e, s) {
1113
- const i = this._appendChar(t[0], e);
1114
- return s != null && (i.tailShift += this.appendTail(s).tailShift), i;
1115
- }
1116
- doCommit() {
1117
- }
1118
- get state() {
1119
- return {
1120
- _value: this._value,
1121
- _rawInputValue: this.rawInputValue
1122
- };
1123
- }
1124
- set state(t) {
1125
- this._value = t._value, this._isRawInput = !!t._rawInputValue;
1126
- }
1127
- pad(t) {
1128
- return this._appendPlaceholder();
1129
- }
1130
- }
1131
- class K {
1132
- /** */
1133
- /** */
1134
- /** */
1135
- /** */
1136
- /** */
1137
- /** */
1138
- /** */
1139
- /** */
1140
- constructor(t) {
1141
- const {
1142
- parent: e,
1143
- isOptional: s,
1144
- placeholderChar: i,
1145
- displayChar: n,
1146
- lazy: a,
1147
- eager: r,
1148
- ...l
1149
- } = t;
1150
- this.masked = D(l), Object.assign(this, {
1151
- parent: e,
1152
- isOptional: s,
1153
- placeholderChar: i,
1154
- displayChar: n,
1155
- lazy: a,
1156
- eager: r
1157
- });
1158
- }
1159
- reset() {
1160
- this.isFilled = !1, this.masked.reset();
1161
- }
1162
- remove(t, e) {
1163
- return t === void 0 && (t = 0), e === void 0 && (e = this.value.length), t === 0 && e >= 1 ? (this.isFilled = !1, this.masked.remove(t, e)) : new c();
1164
- }
1165
- get value() {
1166
- return this.masked.value || (this.isFilled && !this.isOptional ? this.placeholderChar : "");
1167
- }
1168
- get unmaskedValue() {
1169
- return this.masked.unmaskedValue;
1170
- }
1171
- get rawInputValue() {
1172
- return this.masked.rawInputValue;
1173
- }
1174
- get displayValue() {
1175
- return this.masked.value && this.displayChar || this.value;
1176
- }
1177
- get isComplete() {
1178
- return !!this.masked.value || this.isOptional;
1179
- }
1180
- _appendChar(t, e) {
1181
- if (e === void 0 && (e = {}), this.isFilled) return new c();
1182
- const s = this.masked.state;
1183
- let i = this.masked._appendChar(t, this.currentMaskFlags(e));
1184
- return i.inserted && this.doValidate(e) === !1 && (i = new c(), this.masked.state = s), !i.inserted && !this.isOptional && !this.lazy && !e.input && (i.inserted = this.placeholderChar), i.skip = !i.inserted && !this.isOptional, this.isFilled = !!i.inserted, i;
1185
- }
1186
- append(t, e, s) {
1187
- return this.masked.append(t, this.currentMaskFlags(e), s);
1188
- }
1189
- _appendPlaceholder() {
1190
- return this.isFilled || this.isOptional ? new c() : (this.isFilled = !0, new c({
1191
- inserted: this.placeholderChar
1192
- }));
1193
- }
1194
- _appendEager() {
1195
- return new c();
1196
- }
1197
- extractTail(t, e) {
1198
- return this.masked.extractTail(t, e);
1199
- }
1200
- appendTail(t) {
1201
- return this.masked.appendTail(t);
1202
- }
1203
- extractInput(t, e, s) {
1204
- return t === void 0 && (t = 0), e === void 0 && (e = this.value.length), this.masked.extractInput(t, e, s);
1205
- }
1206
- nearestInputPos(t, e) {
1207
- e === void 0 && (e = o.NONE);
1208
- const s = 0, i = this.value.length, n = Math.min(Math.max(t, s), i);
1209
- switch (e) {
1210
- case o.LEFT:
1211
- case o.FORCE_LEFT:
1212
- return this.isComplete ? n : s;
1213
- case o.RIGHT:
1214
- case o.FORCE_RIGHT:
1215
- return this.isComplete ? n : i;
1216
- case o.NONE:
1217
- default:
1218
- return n;
1219
- }
1220
- }
1221
- totalInputPositions(t, e) {
1222
- return t === void 0 && (t = 0), e === void 0 && (e = this.value.length), this.value.slice(t, e).length;
1223
- }
1224
- doValidate(t) {
1225
- return this.masked.doValidate(this.currentMaskFlags(t)) && (!this.parent || this.parent.doValidate(this.currentMaskFlags(t)));
1226
- }
1227
- doCommit() {
1228
- this.masked.doCommit();
1229
- }
1230
- get state() {
1231
- return {
1232
- _value: this.value,
1233
- _rawInputValue: this.rawInputValue,
1234
- masked: this.masked.state,
1235
- isFilled: this.isFilled
1236
- };
1237
- }
1238
- set state(t) {
1239
- this.masked.state = t.masked, this.isFilled = t.isFilled;
1240
- }
1241
- currentMaskFlags(t) {
1242
- var e;
1243
- return {
1244
- ...t,
1245
- _beforeTailState: (t == null || (e = t._beforeTailState) == null ? void 0 : e.masked) || (t == null ? void 0 : t._beforeTailState)
1246
- };
1247
- }
1248
- pad(t) {
1249
- return new c();
1250
- }
1251
- }
1252
- K.DEFAULT_DEFINITIONS = {
1253
- 0: /\d/,
1254
- a: /[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
1255
- // http://stackoverflow.com/a/22075070
1256
- "*": /./
1257
- };
1258
- class Ft extends _ {
1259
- /** */
1260
- /** Enable characters overwriting */
1261
- /** */
1262
- /** */
1263
- /** */
1264
- updateOptions(t) {
1265
- super.updateOptions(t);
1266
- }
1267
- _update(t) {
1268
- const e = t.mask;
1269
- e && (t.validate = (s) => s.search(e) >= 0), super._update(t);
1270
- }
1271
- }
1272
- d.MaskedRegExp = Ft;
1273
- class v extends _ {
1274
- /** */
1275
- /** */
1276
- /** Single char for empty input */
1277
- /** Single char for filled input */
1278
- /** Show placeholder only when needed */
1279
- /** Enable characters overwriting */
1280
- /** */
1281
- /** */
1282
- /** */
1283
- constructor(t) {
1284
- super({
1285
- ...v.DEFAULTS,
1286
- ...t,
1287
- definitions: Object.assign({}, K.DEFAULT_DEFINITIONS, t == null ? void 0 : t.definitions)
1288
- });
1289
- }
1290
- updateOptions(t) {
1291
- super.updateOptions(t);
1292
- }
1293
- _update(t) {
1294
- t.definitions = Object.assign({}, this.definitions, t.definitions), super._update(t), this._rebuildMask();
1295
- }
1296
- _rebuildMask() {
1297
- const t = this.definitions;
1298
- this._blocks = [], this.exposeBlock = void 0, this._stops = [], this._maskedBlocks = {};
1299
- const e = this.mask;
1300
- if (!e || !t) return;
1301
- let s = !1, i = !1;
1302
- for (let n = 0; n < e.length; ++n) {
1303
- if (this.blocks) {
1304
- const p = e.slice(n), k = Object.keys(this.blocks).filter((g) => p.indexOf(g) === 0);
1305
- k.sort((g, E) => E.length - g.length);
1306
- const m = k[0];
1307
- if (m) {
1308
- const {
1309
- expose: g,
1310
- repeat: E,
1311
- ...M
1312
- } = L(this.blocks[m]), F = {
1313
- lazy: this.lazy,
1314
- eager: this.eager,
1315
- placeholderChar: this.placeholderChar,
1316
- displayChar: this.displayChar,
1317
- overwrite: this.overwrite,
1318
- autofix: this.autofix,
1319
- ...M,
1320
- repeat: E,
1321
- parent: this
1322
- }, b = E != null ? new d.RepeatBlock(
1323
- F
1324
- /* TODO */
1325
- ) : D(F);
1326
- b && (this._blocks.push(b), g && (this.exposeBlock = b), this._maskedBlocks[m] || (this._maskedBlocks[m] = []), this._maskedBlocks[m].push(this._blocks.length - 1)), n += m.length - 1;
1327
- continue;
1328
- }
1329
- }
1330
- let a = e[n], r = a in t;
1331
- if (a === v.STOP_CHAR) {
1332
- this._stops.push(this._blocks.length);
1333
- continue;
1334
- }
1335
- if (a === "{" || a === "}") {
1336
- s = !s;
1337
- continue;
1338
- }
1339
- if (a === "[" || a === "]") {
1340
- i = !i;
1341
- continue;
1342
- }
1343
- if (a === v.ESCAPE_CHAR) {
1344
- if (++n, a = e[n], !a) break;
1345
- r = !1;
1346
- }
1347
- const l = r ? new K({
1348
- isOptional: i,
1349
- lazy: this.lazy,
1350
- eager: this.eager,
1351
- placeholderChar: this.placeholderChar,
1352
- displayChar: this.displayChar,
1353
- ...L(t[a]),
1354
- parent: this
1355
- }) : new ut({
1356
- char: a,
1357
- eager: this.eager,
1358
- isUnmasking: s
1359
- });
1360
- this._blocks.push(l);
1361
- }
1362
- }
1363
- get state() {
1364
- return {
1365
- ...super.state,
1366
- _blocks: this._blocks.map((t) => t.state)
1367
- };
1368
- }
1369
- set state(t) {
1370
- if (!t) {
1371
- this.reset();
1372
- return;
1373
- }
1374
- const {
1375
- _blocks: e,
1376
- ...s
1377
- } = t;
1378
- this._blocks.forEach((i, n) => i.state = e[n]), super.state = s;
1379
- }
1380
- reset() {
1381
- super.reset(), this._blocks.forEach((t) => t.reset());
1382
- }
1383
- get isComplete() {
1384
- return this.exposeBlock ? this.exposeBlock.isComplete : this._blocks.every((t) => t.isComplete);
1385
- }
1386
- get isFilled() {
1387
- return this._blocks.every((t) => t.isFilled);
1388
- }
1389
- get isFixed() {
1390
- return this._blocks.every((t) => t.isFixed);
1391
- }
1392
- get isOptional() {
1393
- return this._blocks.every((t) => t.isOptional);
1394
- }
1395
- doCommit() {
1396
- this._blocks.forEach((t) => t.doCommit()), super.doCommit();
1397
- }
1398
- get unmaskedValue() {
1399
- return this.exposeBlock ? this.exposeBlock.unmaskedValue : this._blocks.reduce((t, e) => t += e.unmaskedValue, "");
1400
- }
1401
- set unmaskedValue(t) {
1402
- if (this.exposeBlock) {
1403
- const e = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
1404
- this.exposeBlock.unmaskedValue = t, this.appendTail(e), this.doCommit();
1405
- } else super.unmaskedValue = t;
1406
- }
1407
- get value() {
1408
- return this.exposeBlock ? this.exposeBlock.value : (
1409
- // TODO return _value when not in change?
1410
- this._blocks.reduce((t, e) => t += e.value, "")
1411
- );
1412
- }
1413
- set value(t) {
1414
- if (this.exposeBlock) {
1415
- const e = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
1416
- this.exposeBlock.value = t, this.appendTail(e), this.doCommit();
1417
- } else super.value = t;
1418
- }
1419
- get typedValue() {
1420
- return this.exposeBlock ? this.exposeBlock.typedValue : super.typedValue;
1421
- }
1422
- set typedValue(t) {
1423
- if (this.exposeBlock) {
1424
- const e = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
1425
- this.exposeBlock.typedValue = t, this.appendTail(e), this.doCommit();
1426
- } else super.typedValue = t;
1427
- }
1428
- get displayValue() {
1429
- return this._blocks.reduce((t, e) => t += e.displayValue, "");
1430
- }
1431
- appendTail(t) {
1432
- return super.appendTail(t).aggregate(this._appendPlaceholder());
1433
- }
1434
- _appendEager() {
1435
- var t;
1436
- const e = new c();
1437
- let s = (t = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : t.index;
1438
- if (s == null) return e;
1439
- this._blocks[s].isFilled && ++s;
1440
- for (let i = s; i < this._blocks.length; ++i) {
1441
- const n = this._blocks[i]._appendEager();
1442
- if (!n.inserted) break;
1443
- e.aggregate(n);
1444
- }
1445
- return e;
1446
- }
1447
- _appendCharRaw(t, e) {
1448
- e === void 0 && (e = {});
1449
- const s = this._mapPosToBlock(this.displayValue.length), i = new c();
1450
- if (!s) return i;
1451
- for (let a = s.index, r; r = this._blocks[a]; ++a) {
1452
- var n;
1453
- const l = r._appendChar(t, {
1454
- ...e,
1455
- _beforeTailState: (n = e._beforeTailState) == null || (n = n._blocks) == null ? void 0 : n[a]
1456
- });
1457
- if (i.aggregate(l), l.consumed) break;
1458
- }
1459
- return i;
1460
- }
1461
- extractTail(t, e) {
1462
- t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length);
1463
- const s = new O();
1464
- return t === e || this._forEachBlocksInRange(t, e, (i, n, a, r) => {
1465
- const l = i.extractTail(a, r);
1466
- l.stop = this._findStopBefore(n), l.from = this._blockStartPos(n), l instanceof O && (l.blockIndex = n), s.extend(l);
1467
- }), s;
1468
- }
1469
- extractInput(t, e, s) {
1470
- if (t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), s === void 0 && (s = {}), t === e) return "";
1471
- let i = "";
1472
- return this._forEachBlocksInRange(t, e, (n, a, r, l) => {
1473
- i += n.extractInput(r, l, s);
1474
- }), i;
1475
- }
1476
- _findStopBefore(t) {
1477
- let e;
1478
- for (let s = 0; s < this._stops.length; ++s) {
1479
- const i = this._stops[s];
1480
- if (i <= t) e = i;
1481
- else break;
1482
- }
1483
- return e;
1484
- }
1485
- /** Appends placeholder depending on laziness */
1486
- _appendPlaceholder(t) {
1487
- const e = new c();
1488
- if (this.lazy && t == null) return e;
1489
- const s = this._mapPosToBlock(this.displayValue.length);
1490
- if (!s) return e;
1491
- const i = s.index, n = t ?? this._blocks.length;
1492
- return this._blocks.slice(i, n).forEach((a) => {
1493
- if (!a.lazy || t != null) {
1494
- var r;
1495
- e.aggregate(a._appendPlaceholder((r = a._blocks) == null ? void 0 : r.length));
1496
- }
1497
- }), e;
1498
- }
1499
- /** Finds block in pos */
1500
- _mapPosToBlock(t) {
1501
- let e = "";
1502
- for (let s = 0; s < this._blocks.length; ++s) {
1503
- const i = this._blocks[s], n = e.length;
1504
- if (e += i.displayValue, t <= e.length)
1505
- return {
1506
- index: s,
1507
- offset: t - n
1508
- };
1509
- }
1510
- }
1511
- _blockStartPos(t) {
1512
- return this._blocks.slice(0, t).reduce((e, s) => e += s.displayValue.length, 0);
1513
- }
1514
- _forEachBlocksInRange(t, e, s) {
1515
- e === void 0 && (e = this.displayValue.length);
1516
- const i = this._mapPosToBlock(t);
1517
- if (i) {
1518
- const n = this._mapPosToBlock(e), a = n && i.index === n.index, r = i.offset, l = n && a ? n.offset : this._blocks[i.index].displayValue.length;
1519
- if (s(this._blocks[i.index], i.index, r, l), n && !a) {
1520
- for (let p = i.index + 1; p < n.index; ++p)
1521
- s(this._blocks[p], p, 0, this._blocks[p].displayValue.length);
1522
- s(this._blocks[n.index], n.index, 0, n.offset);
1523
- }
1524
- }
1525
- }
1526
- remove(t, e) {
1527
- t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length);
1528
- const s = super.remove(t, e);
1529
- return this._forEachBlocksInRange(t, e, (i, n, a, r) => {
1530
- s.aggregate(i.remove(a, r));
1531
- }), s;
1532
- }
1533
- nearestInputPos(t, e) {
1534
- if (e === void 0 && (e = o.NONE), !this._blocks.length) return 0;
1535
- const s = new At(this, t);
1536
- if (e === o.NONE)
1537
- return s.pushRightBeforeInput() || (s.popState(), s.pushLeftBeforeInput()) ? s.pos : this.displayValue.length;
1538
- if (e === o.LEFT || e === o.FORCE_LEFT) {
1539
- if (e === o.LEFT) {
1540
- if (s.pushRightBeforeFilled(), s.ok && s.pos === t) return t;
1541
- s.popState();
1542
- }
1543
- if (s.pushLeftBeforeInput(), s.pushLeftBeforeRequired(), s.pushLeftBeforeFilled(), e === o.LEFT) {
1544
- if (s.pushRightBeforeInput(), s.pushRightBeforeRequired(), s.ok && s.pos <= t || (s.popState(), s.ok && s.pos <= t)) return s.pos;
1545
- s.popState();
1546
- }
1547
- return s.ok ? s.pos : e === o.FORCE_LEFT ? 0 : (s.popState(), s.ok || (s.popState(), s.ok) ? s.pos : 0);
1548
- }
1549
- return e === o.RIGHT || e === o.FORCE_RIGHT ? (s.pushRightBeforeInput(), s.pushRightBeforeRequired(), s.pushRightBeforeFilled() ? s.pos : e === o.FORCE_RIGHT ? this.displayValue.length : (s.popState(), s.ok || (s.popState(), s.ok) ? s.pos : this.nearestInputPos(t, o.LEFT))) : t;
1550
- }
1551
- totalInputPositions(t, e) {
1552
- t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length);
1553
- let s = 0;
1554
- return this._forEachBlocksInRange(t, e, (i, n, a, r) => {
1555
- s += i.totalInputPositions(a, r);
1556
- }), s;
1557
- }
1558
- /** Get block by name */
1559
- maskedBlock(t) {
1560
- return this.maskedBlocks(t)[0];
1561
- }
1562
- /** Get all blocks by name */
1563
- maskedBlocks(t) {
1564
- const e = this._maskedBlocks[t];
1565
- return e ? e.map((s) => this._blocks[s]) : [];
1566
- }
1567
- pad(t) {
1568
- const e = new c();
1569
- return this._forEachBlocksInRange(0, this.displayValue.length, (s) => e.aggregate(s.pad(t))), e;
1570
- }
1571
- }
1572
- v.DEFAULTS = {
1573
- ..._.DEFAULTS,
1574
- lazy: !0,
1575
- placeholderChar: "_"
1576
- };
1577
- v.STOP_CHAR = "`";
1578
- v.ESCAPE_CHAR = "\\";
1579
- v.InputDefinition = K;
1580
- v.FixedDefinition = ut;
1581
- d.MaskedPattern = v;
1582
- class j extends v {
1583
- /**
1584
- Optionally sets max length of pattern.
1585
- Used when pattern length is longer then `to` param length. Pads zeros at start in this case.
1586
- */
1587
- /** Min bound */
1588
- /** Max bound */
1589
- get _matchFrom() {
1590
- return this.maxLength - String(this.from).length;
1591
- }
1592
- constructor(t) {
1593
- super(t);
1594
- }
1595
- updateOptions(t) {
1596
- super.updateOptions(t);
1597
- }
1598
- _update(t) {
1
+ import { jsx as S } from "react/jsx-runtime";
2
+ import { useEffect as h } from "react";
3
+ import "../../node_modules/imask/esm/index.js";
4
+ import "../../node_modules/imask/esm/controls/input.js";
5
+ import "../../node_modules/imask/esm/masked/factory.js";
6
+ import "../../node_modules/imask/esm/controls/mask-element.js";
7
+ import "../../node_modules/imask/esm/controls/html-input-mask-element.js";
8
+ import "../../node_modules/imask/esm/controls/html-mask-element.js";
9
+ import "../../node_modules/imask/esm/controls/html-contenteditable-mask-element.js";
10
+ import "../../node_modules/imask/esm/controls/input-history.js";
11
+ import "../../node_modules/react-imask/esm/input.js";
12
+ import B from "../../node_modules/react-imask/esm/hook.js";
13
+ import "../../node_modules/react-imask/esm/mixin.js";
14
+ import M from "../base/InputTextBase.js";
15
+ import { numberToEnUS as b, formatOnlyNumbers as g } from "../number/format_number.js";
16
+ import { actionsOnPermissionDenied as w, OPTIONS_ON_DENIED as s } from "../../permissionValidations.js";
17
+ import { getMaskOptions as F } from "./helpers.js";
18
+ const k = (e, u) => {
19
+ if (e.returnFormattedValueOnBlur || e.returnFormattedValueOnKeyDown) {
1599
20
  const {
1600
- to: e = this.to || 0,
1601
- from: s = this.from || 0,
1602
- maxLength: i = this.maxLength || 0,
1603
- autofix: n = this.autofix,
1604
- ...a
1605
- } = t;
1606
- this.to = e, this.from = s, this.maxLength = Math.max(String(e).length, i), this.autofix = n;
1607
- const r = String(this.from).padStart(this.maxLength, "0"), l = String(this.to).padStart(this.maxLength, "0");
1608
- let p = 0;
1609
- for (; p < l.length && l[p] === r[p]; ) ++p;
1610
- a.mask = l.slice(0, p).replace(/0/g, "\\0") + "0".repeat(this.maxLength - p), super._update(a);
1611
- }
1612
- get isComplete() {
1613
- return super.isComplete && !!this.value;
1614
- }
1615
- boundaries(t) {
1616
- let e = "", s = "";
1617
- const [, i, n] = t.match(/^(\D*)(\d*)(\D*)/) || [];
1618
- return n && (e = "0".repeat(i.length) + n, s = "9".repeat(i.length) + n), e = e.padEnd(this.maxLength, "0"), s = s.padEnd(this.maxLength, "9"), [e, s];
1619
- }
1620
- doPrepareChar(t, e) {
1621
- e === void 0 && (e = {});
1622
- let s;
1623
- return [t, s] = super.doPrepareChar(t.replace(/\D/g, ""), e), t || (s.skip = !this.isComplete), [t, s];
1624
- }
1625
- _appendCharRaw(t, e) {
1626
- if (e === void 0 && (e = {}), !this.autofix || this.value.length + 1 > this.maxLength) return super._appendCharRaw(t, e);
1627
- const s = String(this.from).padStart(this.maxLength, "0"), i = String(this.to).padStart(this.maxLength, "0"), [n, a] = this.boundaries(this.value + t);
1628
- return Number(a) < this.from ? super._appendCharRaw(s[this.value.length], e) : Number(n) > this.to ? !e.tail && this.autofix === "pad" && this.value.length + 1 < this.maxLength ? super._appendCharRaw(s[this.value.length], e).aggregate(this._appendCharRaw(t, e)) : super._appendCharRaw(i[this.value.length], e) : super._appendCharRaw(t, e);
1629
- }
1630
- doValidate(t) {
1631
- const e = this.value;
1632
- if (e.search(/[^0]/) === -1 && e.length <= this._matchFrom) return !0;
1633
- const [i, n] = this.boundaries(e);
1634
- return this.from <= Number(n) && Number(i) <= this.to && super.doValidate(t);
1635
- }
1636
- pad(t) {
1637
- const e = new c();
1638
- if (this.value.length === this.maxLength) return e;
1639
- const s = this.value, i = this.maxLength - this.value.length;
1640
- if (i) {
1641
- this.reset();
1642
- for (let n = 0; n < i; ++n)
1643
- e.aggregate(super._appendCharRaw("0", t));
1644
- s.split("").forEach((n) => this._appendCharRaw(n));
1645
- }
1646
- return e;
1647
- }
1648
- }
1649
- d.MaskedRange = j;
1650
- const xt = "d{.}`m{.}`Y";
1651
- class I extends v {
1652
- static extractPatternOptions(t) {
1653
- const {
1654
- mask: e,
1655
- pattern: s,
1656
- ...i
1657
- } = t;
1658
- return {
1659
- ...i,
1660
- mask: T(e) ? e : s
1661
- };
1662
- }
1663
- /** Pattern mask for date according to {@link MaskedDate#format} */
1664
- /** Start date */
1665
- /** End date */
1666
- /** Format typed value to string */
1667
- /** Parse string to get typed value */
1668
- constructor(t) {
1669
- super(I.extractPatternOptions({
1670
- ...I.DEFAULTS,
1671
- ...t
1672
- }));
1673
- }
1674
- updateOptions(t) {
1675
- super.updateOptions(t);
1676
- }
1677
- _update(t) {
1678
- const {
1679
- mask: e,
1680
- pattern: s,
1681
- blocks: i,
1682
- ...n
1683
- } = {
1684
- ...I.DEFAULTS,
1685
- ...t
1686
- }, a = Object.assign({}, I.GET_DEFAULT_BLOCKS());
1687
- t.min && (a.Y.from = t.min.getFullYear()), t.max && (a.Y.to = t.max.getFullYear()), t.min && t.max && a.Y.from === a.Y.to && (a.m.from = t.min.getMonth() + 1, a.m.to = t.max.getMonth() + 1, a.m.from === a.m.to && (a.d.from = t.min.getDate(), a.d.to = t.max.getDate())), Object.assign(a, this.blocks, i), super._update({
1688
- ...n,
1689
- mask: T(e) ? e : s,
1690
- blocks: a
1691
- });
1692
- }
1693
- doValidate(t) {
1694
- const e = this.date;
1695
- return super.doValidate(t) && (!this.isComplete || this.isDateExist(this.value) && e != null && (this.min == null || this.min <= e) && (this.max == null || e <= this.max));
1696
- }
1697
- /** Checks if date is exists */
1698
- isDateExist(t) {
1699
- return this.format(this.parse(t, this), this).indexOf(t) >= 0;
1700
- }
1701
- /** Parsed Date */
1702
- get date() {
1703
- return this.typedValue;
1704
- }
1705
- set date(t) {
1706
- this.typedValue = t;
1707
- }
1708
- get typedValue() {
1709
- return this.isComplete ? super.typedValue : null;
1710
- }
1711
- set typedValue(t) {
1712
- super.typedValue = t;
1713
- }
1714
- maskEquals(t) {
1715
- return t === Date || super.maskEquals(t);
1716
- }
1717
- optionsIsChanged(t) {
1718
- return super.optionsIsChanged(I.extractPatternOptions(t));
1719
- }
1720
- }
1721
- I.GET_DEFAULT_BLOCKS = () => ({
1722
- d: {
1723
- mask: j,
1724
- from: 1,
1725
- to: 31,
1726
- maxLength: 2
1727
- },
1728
- m: {
1729
- mask: j,
1730
- from: 1,
1731
- to: 12,
1732
- maxLength: 2
1733
- },
1734
- Y: {
1735
- mask: j,
1736
- from: 1900,
1737
- to: 9999
1738
- }
1739
- });
1740
- I.DEFAULTS = {
1741
- ...v.DEFAULTS,
1742
- mask: Date,
1743
- pattern: xt,
1744
- format: (u, t) => {
1745
- if (!u) return "";
1746
- const e = String(u.getDate()).padStart(2, "0"), s = String(u.getMonth() + 1).padStart(2, "0"), i = u.getFullYear();
1747
- return [e, s, i].join(".");
1748
- },
1749
- parse: (u, t) => {
1750
- const [e, s, i] = u.split(".").map(Number);
1751
- return new Date(i, s - 1, e);
1752
- }
1753
- };
1754
- d.MaskedDate = I;
1755
- class q extends _ {
1756
- constructor(t) {
1757
- super({
1758
- ...q.DEFAULTS,
1759
- ...t
1760
- }), this.currentMask = void 0;
1761
- }
1762
- updateOptions(t) {
1763
- super.updateOptions(t);
1764
- }
1765
- _update(t) {
1766
- super._update(t), "mask" in t && (this.exposeMask = void 0, this.compiledMasks = Array.isArray(t.mask) ? t.mask.map((e) => {
1767
- const {
1768
- expose: s,
1769
- ...i
1770
- } = L(e), n = D({
1771
- overwrite: this._overwrite,
1772
- eager: this._eager,
1773
- skipInvalid: this._skipInvalid,
1774
- ...i
1775
- });
1776
- return s && (this.exposeMask = n), n;
1777
- }) : []);
1778
- }
1779
- _appendCharRaw(t, e) {
1780
- e === void 0 && (e = {});
1781
- const s = this._applyDispatch(t, e);
1782
- return this.currentMask && s.aggregate(this.currentMask._appendChar(t, this.currentMaskFlags(e))), s;
1783
- }
1784
- _applyDispatch(t, e, s) {
1785
- t === void 0 && (t = ""), e === void 0 && (e = {}), s === void 0 && (s = "");
1786
- const i = e.tail && e._beforeTailState != null ? e._beforeTailState._value : this.value, n = this.rawInputValue, a = e.tail && e._beforeTailState != null ? e._beforeTailState._rawInputValue : n, r = n.slice(a.length), l = this.currentMask, p = new c(), k = l == null ? void 0 : l.state;
1787
- return this.currentMask = this.doDispatch(t, {
1788
- ...e
1789
- }, s), this.currentMask && (this.currentMask !== l ? (this.currentMask.reset(), a && (this.currentMask.append(a, {
1790
- raw: !0
1791
- }), p.tailShift = this.currentMask.value.length - i.length), r && (p.tailShift += this.currentMask.append(r, {
1792
- raw: !0,
1793
- tail: !0
1794
- }).tailShift)) : k && (this.currentMask.state = k)), p;
1795
- }
1796
- _appendPlaceholder() {
1797
- const t = this._applyDispatch();
1798
- return this.currentMask && t.aggregate(this.currentMask._appendPlaceholder()), t;
1799
- }
1800
- _appendEager() {
1801
- const t = this._applyDispatch();
1802
- return this.currentMask && t.aggregate(this.currentMask._appendEager()), t;
1803
- }
1804
- appendTail(t) {
1805
- const e = new c();
1806
- return t && e.aggregate(this._applyDispatch("", {}, t)), e.aggregate(this.currentMask ? this.currentMask.appendTail(t) : super.appendTail(t));
1807
- }
1808
- currentMaskFlags(t) {
1809
- var e, s;
21
+ name: o
22
+ } = u.target, a = e.defaultValue || "";
1810
23
  return {
1811
- ...t,
1812
- _beforeTailState: ((e = t._beforeTailState) == null ? void 0 : e.currentMaskRef) === this.currentMask && ((s = t._beforeTailState) == null ? void 0 : s.currentMask) || t._beforeTailState
1813
- };
1814
- }
1815
- doDispatch(t, e, s) {
1816
- return e === void 0 && (e = {}), s === void 0 && (s = ""), this.dispatch(t, this, e, s);
1817
- }
1818
- doValidate(t) {
1819
- return super.doValidate(t) && (!this.currentMask || this.currentMask.doValidate(this.currentMaskFlags(t)));
1820
- }
1821
- doPrepare(t, e) {
1822
- e === void 0 && (e = {});
1823
- let [s, i] = super.doPrepare(t, e);
1824
- if (this.currentMask) {
1825
- let n;
1826
- [s, n] = super.doPrepare(s, this.currentMaskFlags(e)), i = i.aggregate(n);
1827
- }
1828
- return [s, i];
1829
- }
1830
- doPrepareChar(t, e) {
1831
- e === void 0 && (e = {});
1832
- let [s, i] = super.doPrepareChar(t, e);
1833
- if (this.currentMask) {
1834
- let n;
1835
- [s, n] = super.doPrepareChar(s, this.currentMaskFlags(e)), i = i.aggregate(n);
1836
- }
1837
- return [s, i];
1838
- }
1839
- reset() {
1840
- var t;
1841
- (t = this.currentMask) == null || t.reset(), this.compiledMasks.forEach((e) => e.reset());
1842
- }
1843
- get value() {
1844
- return this.exposeMask ? this.exposeMask.value : this.currentMask ? this.currentMask.value : "";
1845
- }
1846
- set value(t) {
1847
- this.exposeMask ? (this.exposeMask.value = t, this.currentMask = this.exposeMask, this._applyDispatch()) : super.value = t;
1848
- }
1849
- get unmaskedValue() {
1850
- return this.exposeMask ? this.exposeMask.unmaskedValue : this.currentMask ? this.currentMask.unmaskedValue : "";
1851
- }
1852
- set unmaskedValue(t) {
1853
- this.exposeMask ? (this.exposeMask.unmaskedValue = t, this.currentMask = this.exposeMask, this._applyDispatch()) : super.unmaskedValue = t;
1854
- }
1855
- get typedValue() {
1856
- return this.exposeMask ? this.exposeMask.typedValue : this.currentMask ? this.currentMask.typedValue : "";
1857
- }
1858
- set typedValue(t) {
1859
- if (this.exposeMask) {
1860
- this.exposeMask.typedValue = t, this.currentMask = this.exposeMask, this._applyDispatch();
1861
- return;
1862
- }
1863
- let e = String(t);
1864
- this.currentMask && (this.currentMask.typedValue = t, e = this.currentMask.unmaskedValue), this.unmaskedValue = e;
1865
- }
1866
- get displayValue() {
1867
- return this.currentMask ? this.currentMask.displayValue : "";
1868
- }
1869
- get isComplete() {
1870
- var t;
1871
- return !!((t = this.currentMask) != null && t.isComplete);
1872
- }
1873
- get isFilled() {
1874
- var t;
1875
- return !!((t = this.currentMask) != null && t.isFilled);
1876
- }
1877
- remove(t, e) {
1878
- const s = new c();
1879
- return this.currentMask && s.aggregate(this.currentMask.remove(t, e)).aggregate(this._applyDispatch()), s;
1880
- }
1881
- get state() {
1882
- var t;
1883
- return {
1884
- ...super.state,
1885
- _rawInputValue: this.rawInputValue,
1886
- compiledMasks: this.compiledMasks.map((e) => e.state),
1887
- currentMaskRef: this.currentMask,
1888
- currentMask: (t = this.currentMask) == null ? void 0 : t.state
1889
- };
1890
- }
1891
- set state(t) {
1892
- const {
1893
- compiledMasks: e,
1894
- currentMaskRef: s,
1895
- currentMask: i,
1896
- ...n
1897
- } = t;
1898
- e && this.compiledMasks.forEach((a, r) => a.state = e[r]), s != null && (this.currentMask = s, this.currentMask.state = i), super.state = n;
1899
- }
1900
- extractInput(t, e, s) {
1901
- return this.currentMask ? this.currentMask.extractInput(t, e, s) : "";
1902
- }
1903
- extractTail(t, e) {
1904
- return this.currentMask ? this.currentMask.extractTail(t, e) : super.extractTail(t, e);
1905
- }
1906
- doCommit() {
1907
- this.currentMask && this.currentMask.doCommit(), super.doCommit();
1908
- }
1909
- nearestInputPos(t, e) {
1910
- return this.currentMask ? this.currentMask.nearestInputPos(t, e) : super.nearestInputPos(t, e);
1911
- }
1912
- get overwrite() {
1913
- return this.currentMask ? this.currentMask.overwrite : this._overwrite;
1914
- }
1915
- set overwrite(t) {
1916
- this._overwrite = t;
1917
- }
1918
- get eager() {
1919
- return this.currentMask ? this.currentMask.eager : this._eager;
1920
- }
1921
- set eager(t) {
1922
- this._eager = t;
1923
- }
1924
- get skipInvalid() {
1925
- return this.currentMask ? this.currentMask.skipInvalid : this._skipInvalid;
1926
- }
1927
- set skipInvalid(t) {
1928
- this._skipInvalid = t;
1929
- }
1930
- get autofix() {
1931
- return this.currentMask ? this.currentMask.autofix : this._autofix;
1932
- }
1933
- set autofix(t) {
1934
- this._autofix = t;
1935
- }
1936
- maskEquals(t) {
1937
- return Array.isArray(t) ? this.compiledMasks.every((e, s) => {
1938
- if (!t[s]) return;
1939
- const {
1940
- mask: i,
1941
- ...n
1942
- } = t[s];
1943
- return H(e, n) && e.maskEquals(i);
1944
- }) : super.maskEquals(t);
1945
- }
1946
- typedValueEquals(t) {
1947
- var e;
1948
- return !!((e = this.currentMask) != null && e.typedValueEquals(t));
1949
- }
1950
- }
1951
- q.DEFAULTS = {
1952
- ..._.DEFAULTS,
1953
- dispatch: (u, t, e, s) => {
1954
- if (!t.compiledMasks.length) return;
1955
- const i = t.rawInputValue, n = t.compiledMasks.map((a, r) => {
1956
- const l = t.currentMask === a, p = l ? a.displayValue.length : a.nearestInputPos(a.displayValue.length, o.FORCE_LEFT);
1957
- return a.rawInputValue !== i ? (a.reset(), a.append(i, {
1958
- raw: !0
1959
- })) : l || a.remove(p), a.append(u, t.currentMaskFlags(e)), a.appendTail(s), {
1960
- index: r,
1961
- weight: a.rawInputValue.length,
1962
- totalInputPositions: a.totalInputPositions(0, Math.max(p, a.nearestInputPos(a.displayValue.length, o.FORCE_LEFT)))
1963
- };
1964
- });
1965
- return n.sort((a, r) => r.weight - a.weight || r.totalInputPositions - a.totalInputPositions), t.compiledMasks[n[0].index];
1966
- }
1967
- };
1968
- d.MaskedDynamic = q;
1969
- class Y extends v {
1970
- constructor(t) {
1971
- super({
1972
- ...Y.DEFAULTS,
1973
- ...t
1974
- });
1975
- }
1976
- updateOptions(t) {
1977
- super.updateOptions(t);
1978
- }
1979
- _update(t) {
1980
- const {
1981
- enum: e,
1982
- ...s
1983
- } = t;
1984
- if (e) {
1985
- const i = e.map((r) => r.length), n = Math.min(...i), a = Math.max(...i) - n;
1986
- s.mask = "*".repeat(n), a && (s.mask += "[" + "*".repeat(a) + "]"), this.enum = e;
1987
- }
1988
- super._update(s);
1989
- }
1990
- _appendCharRaw(t, e) {
1991
- e === void 0 && (e = {});
1992
- const s = Math.min(this.nearestInputPos(0, o.FORCE_RIGHT), this.value.length), i = this.enum.filter((n) => this.matchValue(n, this.unmaskedValue + t, s));
1993
- if (i.length) {
1994
- i.length === 1 && this._forEachBlocksInRange(0, this.value.length, (a, r) => {
1995
- const l = i[0][r];
1996
- r >= this.value.length || l === a.value || (a.reset(), a._appendChar(l, e));
1997
- });
1998
- const n = super._appendCharRaw(i[0][this.value.length], e);
1999
- return i.length === 1 && i[0].slice(this.unmaskedValue.length).split("").forEach((a) => n.aggregate(super._appendCharRaw(a))), n;
2000
- }
2001
- return new c({
2002
- skip: !this.isComplete
2003
- });
2004
- }
2005
- extractTail(t, e) {
2006
- return t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), new B("", t);
2007
- }
2008
- remove(t, e) {
2009
- if (t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), t === e) return new c();
2010
- const s = Math.min(super.nearestInputPos(0, o.FORCE_RIGHT), this.value.length);
2011
- let i;
2012
- for (i = t; i >= 0 && !(this.enum.filter((r) => this.matchValue(r, this.value.slice(s, i), s)).length > 1); --i)
2013
- ;
2014
- const n = super.remove(i, e);
2015
- return n.tailShift += i - t, n;
2016
- }
2017
- get isComplete() {
2018
- return this.enum.indexOf(this.value) >= 0;
2019
- }
2020
- }
2021
- Y.DEFAULTS = {
2022
- ...v.DEFAULTS,
2023
- matchValue: (u, t, e) => u.indexOf(t, e) === e
2024
- };
2025
- d.MaskedEnum = Y;
2026
- class yt extends _ {
2027
- /** */
2028
- /** Enable characters overwriting */
2029
- /** */
2030
- /** */
2031
- /** */
2032
- updateOptions(t) {
2033
- super.updateOptions(t);
2034
- }
2035
- _update(t) {
2036
- super._update({
2037
- ...t,
2038
- validate: t.mask
2039
- });
2040
- }
2041
- }
2042
- d.MaskedFunction = yt;
2043
- var rt;
2044
- class A extends _ {
2045
- /** Single char */
2046
- /** Single char */
2047
- /** Array of single chars */
2048
- /** */
2049
- /** */
2050
- /** Digits after point */
2051
- /** Flag to remove leading and trailing zeros in the end of editing */
2052
- /** Flag to pad trailing zeros after point in the end of editing */
2053
- /** Enable characters overwriting */
2054
- /** */
2055
- /** */
2056
- /** */
2057
- /** Format typed value to string */
2058
- /** Parse string to get typed value */
2059
- constructor(t) {
2060
- super({
2061
- ...A.DEFAULTS,
2062
- ...t
2063
- });
2064
- }
2065
- updateOptions(t) {
2066
- super.updateOptions(t);
2067
- }
2068
- _update(t) {
2069
- super._update(t), this._updateRegExps();
2070
- }
2071
- _updateRegExps() {
2072
- const t = "^" + (this.allowNegative ? "[+|\\-]?" : ""), e = "\\d*", s = (this.scale ? "(" + $(this.radix) + "\\d{0," + this.scale + "})?" : "") + "$";
2073
- this._numberRegExp = new RegExp(t + e + s), this._mapToRadixRegExp = new RegExp("[" + this.mapToRadix.map($).join("") + "]", "g"), this._thousandsSeparatorRegExp = new RegExp($(this.thousandsSeparator), "g");
2074
- }
2075
- _removeThousandsSeparators(t) {
2076
- return t.replace(this._thousandsSeparatorRegExp, "");
2077
- }
2078
- _insertThousandsSeparators(t) {
2079
- const e = t.split(this.radix);
2080
- return e[0] = e[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandsSeparator), e.join(this.radix);
2081
- }
2082
- doPrepareChar(t, e) {
2083
- e === void 0 && (e = {});
2084
- const [s, i] = super.doPrepareChar(this._removeThousandsSeparators(this.scale && this.mapToRadix.length && /*
2085
- radix should be mapped when
2086
- 1) input is done from keyboard = flags.input && flags.raw
2087
- 2) unmasked value is set = !flags.input && !flags.raw
2088
- and should not be mapped when
2089
- 1) value is set = flags.input && !flags.raw
2090
- 2) raw value is set = !flags.input && flags.raw
2091
- */
2092
- (e.input && e.raw || !e.input && !e.raw) ? t.replace(this._mapToRadixRegExp, this.radix) : t), e);
2093
- return t && !s && (i.skip = !0), s && !this.allowPositive && !this.value && s !== "-" && i.aggregate(this._appendChar("-")), [s, i];
2094
- }
2095
- _separatorsCount(t, e) {
2096
- e === void 0 && (e = !1);
2097
- let s = 0;
2098
- for (let i = 0; i < t; ++i)
2099
- this._value.indexOf(this.thousandsSeparator, i) === i && (++s, e && (t += this.thousandsSeparator.length));
2100
- return s;
2101
- }
2102
- _separatorsCountFromSlice(t) {
2103
- return t === void 0 && (t = this._value), this._separatorsCount(this._removeThousandsSeparators(t).length, !0);
2104
- }
2105
- extractInput(t, e, s) {
2106
- return t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), [t, e] = this._adjustRangeWithSeparators(t, e), this._removeThousandsSeparators(super.extractInput(t, e, s));
2107
- }
2108
- _appendCharRaw(t, e) {
2109
- e === void 0 && (e = {});
2110
- const s = e.tail && e._beforeTailState ? e._beforeTailState._value : this._value, i = this._separatorsCountFromSlice(s);
2111
- this._value = this._removeThousandsSeparators(this.value);
2112
- const n = this._value;
2113
- this._value += t;
2114
- const a = this.number;
2115
- let r = !isNaN(a), l = !1;
2116
- if (r) {
2117
- let g;
2118
- this.min != null && this.min < 0 && this.number < this.min && (g = this.min), this.max != null && this.max > 0 && this.number > this.max && (g = this.max), g != null && (this.autofix ? (this._value = this.format(g, this).replace(A.UNMASKED_RADIX, this.radix), l || (l = n === this._value && !e.tail)) : r = !1), r && (r = !!this._value.match(this._numberRegExp));
2119
- }
2120
- let p;
2121
- r ? p = new c({
2122
- inserted: this._value.slice(n.length),
2123
- rawInserted: l ? "" : t,
2124
- skip: l
2125
- }) : (this._value = n, p = new c()), this._value = this._insertThousandsSeparators(this._value);
2126
- const k = e.tail && e._beforeTailState ? e._beforeTailState._value : this._value, m = this._separatorsCountFromSlice(k);
2127
- return p.tailShift += (m - i) * this.thousandsSeparator.length, p;
2128
- }
2129
- _findSeparatorAround(t) {
2130
- if (this.thousandsSeparator) {
2131
- const e = t - this.thousandsSeparator.length + 1, s = this.value.indexOf(this.thousandsSeparator, e);
2132
- if (s <= t) return s;
2133
- }
2134
- return -1;
2135
- }
2136
- _adjustRangeWithSeparators(t, e) {
2137
- const s = this._findSeparatorAround(t);
2138
- s >= 0 && (t = s);
2139
- const i = this._findSeparatorAround(e);
2140
- return i >= 0 && (e = i + this.thousandsSeparator.length), [t, e];
2141
- }
2142
- remove(t, e) {
2143
- t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length), [t, e] = this._adjustRangeWithSeparators(t, e);
2144
- const s = this.value.slice(0, t), i = this.value.slice(e), n = this._separatorsCount(s.length);
2145
- this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(s + i));
2146
- const a = this._separatorsCountFromSlice(s);
2147
- return new c({
2148
- tailShift: (a - n) * this.thousandsSeparator.length
2149
- });
2150
- }
2151
- nearestInputPos(t, e) {
2152
- if (!this.thousandsSeparator) return t;
2153
- switch (e) {
2154
- case o.NONE:
2155
- case o.LEFT:
2156
- case o.FORCE_LEFT: {
2157
- const s = this._findSeparatorAround(t - 1);
2158
- if (s >= 0) {
2159
- const i = s + this.thousandsSeparator.length;
2160
- if (t < i || this.value.length <= i || e === o.FORCE_LEFT)
2161
- return s;
2162
- }
2163
- break;
2164
- }
2165
- case o.RIGHT:
2166
- case o.FORCE_RIGHT: {
2167
- const s = this._findSeparatorAround(t);
2168
- if (s >= 0)
2169
- return s + this.thousandsSeparator.length;
24
+ ...u,
25
+ target: {
26
+ value: String(b(a)),
27
+ name: o
2170
28
  }
2171
- }
2172
- return t;
2173
- }
2174
- doCommit() {
2175
- if (this.value) {
2176
- const t = this.number;
2177
- let e = t;
2178
- this.min != null && (e = Math.max(e, this.min)), this.max != null && (e = Math.min(e, this.max)), e !== t && (this.unmaskedValue = this.format(e, this));
2179
- let s = this.value;
2180
- this.normalizeZeros && (s = this._normalizeZeros(s)), this.padFractionalZeros && this.scale > 0 && (s = this._padFractionalZeros(s)), this._value = s;
2181
- }
2182
- super.doCommit();
2183
- }
2184
- _normalizeZeros(t) {
2185
- const e = this._removeThousandsSeparators(t).split(this.radix);
2186
- return e[0] = e[0].replace(/^(\D*)(0*)(\d*)/, (s, i, n, a) => i + a), t.length && !/\d$/.test(e[0]) && (e[0] = e[0] + "0"), e.length > 1 && (e[1] = e[1].replace(/0*$/, ""), e[1].length || (e.length = 1)), this._insertThousandsSeparators(e.join(this.radix));
2187
- }
2188
- _padFractionalZeros(t) {
2189
- if (!t) return t;
2190
- const e = t.split(this.radix);
2191
- return e.length < 2 && e.push(""), e[1] = e[1].padEnd(this.scale, "0"), e.join(this.radix);
2192
- }
2193
- doSkipInvalid(t, e, s) {
2194
- e === void 0 && (e = {});
2195
- const i = this.scale === 0 && t !== this.thousandsSeparator && (t === this.radix || t === A.UNMASKED_RADIX || this.mapToRadix.includes(t));
2196
- return super.doSkipInvalid(t, e, s) && !i;
2197
- }
2198
- get unmaskedValue() {
2199
- return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, A.UNMASKED_RADIX);
2200
- }
2201
- set unmaskedValue(t) {
2202
- super.unmaskedValue = t;
2203
- }
2204
- get typedValue() {
2205
- return this.parse(this.unmaskedValue, this);
2206
- }
2207
- set typedValue(t) {
2208
- this.rawInputValue = this.format(t, this).replace(A.UNMASKED_RADIX, this.radix);
2209
- }
2210
- /** Parsed Number */
2211
- get number() {
2212
- return this.typedValue;
2213
- }
2214
- set number(t) {
2215
- this.typedValue = t;
2216
- }
2217
- get allowNegative() {
2218
- return this.min != null && this.min < 0 || this.max != null && this.max < 0;
2219
- }
2220
- get allowPositive() {
2221
- return this.min != null && this.min > 0 || this.max != null && this.max > 0;
2222
- }
2223
- typedValueEquals(t) {
2224
- return (super.typedValueEquals(t) || A.EMPTY_VALUES.includes(t) && A.EMPTY_VALUES.includes(this.typedValue)) && !(t === 0 && this.value === "");
2225
- }
2226
- }
2227
- rt = A;
2228
- A.UNMASKED_RADIX = ".";
2229
- A.EMPTY_VALUES = [..._.EMPTY_VALUES, 0];
2230
- A.DEFAULTS = {
2231
- ..._.DEFAULTS,
2232
- mask: Number,
2233
- radix: ",",
2234
- thousandsSeparator: "",
2235
- mapToRadix: [rt.UNMASKED_RADIX],
2236
- min: Number.MIN_SAFE_INTEGER,
2237
- max: Number.MAX_SAFE_INTEGER,
2238
- scale: 2,
2239
- normalizeZeros: !0,
2240
- padFractionalZeros: !1,
2241
- parse: Number,
2242
- format: (u) => u.toLocaleString("en-US", {
2243
- useGrouping: !1,
2244
- maximumFractionDigits: 20
2245
- })
2246
- };
2247
- d.MaskedNumber = A;
2248
- const X = {
2249
- MASKED: "value",
2250
- UNMASKED: "unmaskedValue",
2251
- TYPED: "typedValue"
2252
- };
2253
- function lt(u, t, e) {
2254
- t === void 0 && (t = X.MASKED), e === void 0 && (e = X.MASKED);
2255
- const s = D(u);
2256
- return (i) => s.runIsolated((n) => (n[t] = i, n[e]));
2257
- }
2258
- function St(u, t, e, s) {
2259
- return lt(t, e, s)(u);
2260
- }
2261
- d.PIPE_TYPE = X;
2262
- d.createPipe = lt;
2263
- d.pipe = St;
2264
- class Vt extends v {
2265
- get repeatFrom() {
2266
- var t;
2267
- return (t = Array.isArray(this.repeat) ? this.repeat[0] : this.repeat === 1 / 0 ? 0 : this.repeat) != null ? t : 0;
2268
- }
2269
- get repeatTo() {
2270
- var t;
2271
- return (t = Array.isArray(this.repeat) ? this.repeat[1] : this.repeat) != null ? t : 1 / 0;
2272
- }
2273
- constructor(t) {
2274
- super(t);
2275
- }
2276
- updateOptions(t) {
2277
- super.updateOptions(t);
2278
- }
2279
- _update(t) {
2280
- var e, s, i;
2281
- const {
2282
- repeat: n,
2283
- ...a
2284
- } = L(t);
2285
- this._blockOpts = Object.assign({}, this._blockOpts, a);
2286
- const r = D(this._blockOpts);
2287
- this.repeat = (e = (s = n ?? r.repeat) != null ? s : this.repeat) != null ? e : 1 / 0, super._update({
2288
- mask: "m".repeat(Math.max(this.repeatTo === 1 / 0 && ((i = this._blocks) == null ? void 0 : i.length) || 0, this.repeatFrom)),
2289
- blocks: {
2290
- m: r
2291
- },
2292
- eager: r.eager,
2293
- overwrite: r.overwrite,
2294
- skipInvalid: r.skipInvalid,
2295
- lazy: r.lazy,
2296
- placeholderChar: r.placeholderChar,
2297
- displayChar: r.displayChar
2298
- });
2299
- }
2300
- _allocateBlock(t) {
2301
- if (t < this._blocks.length) return this._blocks[t];
2302
- if (this.repeatTo === 1 / 0 || this._blocks.length < this.repeatTo)
2303
- return this._blocks.push(D(this._blockOpts)), this.mask += "m", this._blocks[this._blocks.length - 1];
2304
- }
2305
- _appendCharRaw(t, e) {
2306
- e === void 0 && (e = {});
2307
- const s = new c();
2308
- for (
2309
- let l = (i = (n = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : n.index) != null ? i : Math.max(this._blocks.length - 1, 0), p, k;
2310
- // try to get a block or
2311
- // try to allocate a new block if not allocated already
2312
- p = (a = this._blocks[l]) != null ? a : k = !k && this._allocateBlock(l);
2313
- ++l
2314
- ) {
2315
- var i, n, a, r;
2316
- const m = p._appendChar(t, {
2317
- ...e,
2318
- _beforeTailState: (r = e._beforeTailState) == null || (r = r._blocks) == null ? void 0 : r[l]
2319
- });
2320
- if (m.skip && k) {
2321
- this._blocks.pop(), this.mask = this.mask.slice(1);
2322
- break;
2323
- }
2324
- if (s.aggregate(m), m.consumed) break;
2325
- }
2326
- return s;
2327
- }
2328
- _trimEmptyTail(t, e) {
2329
- var s, i;
2330
- t === void 0 && (t = 0);
2331
- const n = Math.max(((s = this._mapPosToBlock(t)) == null ? void 0 : s.index) || 0, this.repeatFrom, 0);
2332
- let a;
2333
- e != null && (a = (i = this._mapPosToBlock(e)) == null ? void 0 : i.index), a == null && (a = this._blocks.length - 1);
2334
- let r = 0;
2335
- for (let l = a; n <= l && !this._blocks[l].unmaskedValue; --l, ++r)
2336
- ;
2337
- r && (this._blocks.splice(a - r + 1, r), this.mask = this.mask.slice(r));
2338
- }
2339
- reset() {
2340
- super.reset(), this._trimEmptyTail();
2341
- }
2342
- remove(t, e) {
2343
- t === void 0 && (t = 0), e === void 0 && (e = this.displayValue.length);
2344
- const s = super.remove(t, e);
2345
- return this._trimEmptyTail(t, e), s;
2346
- }
2347
- totalInputPositions(t, e) {
2348
- return t === void 0 && (t = 0), e == null && this.repeatTo === 1 / 0 ? 1 / 0 : super.totalInputPositions(t, e);
2349
- }
2350
- get state() {
2351
- return super.state;
2352
- }
2353
- set state(t) {
2354
- this._blocks.length = t._blocks.length, this.mask = this.mask.slice(0, this._blocks.length), super.state = t;
2355
- }
2356
- }
2357
- d.RepeatBlock = Vt;
2358
- try {
2359
- globalThis.IMask = d;
2360
- } catch {
2361
- }
2362
- const ht = {
2363
- // common
2364
- mask: h.oneOfType([h.array, h.func, h.string, h.instanceOf(RegExp), h.oneOf([Date, Number, d.Masked]), h.instanceOf(d.Masked)]),
2365
- value: h.any,
2366
- unmask: h.oneOfType([h.bool, h.oneOf(["typed"])]),
2367
- prepare: h.func,
2368
- prepareChar: h.func,
2369
- validate: h.func,
2370
- commit: h.func,
2371
- overwrite: h.oneOfType([h.bool, h.oneOf(["shift"])]),
2372
- eager: h.oneOfType([h.bool, h.oneOf(["append", "remove"])]),
2373
- skipInvalid: h.bool,
2374
- // events
2375
- onAccept: h.func,
2376
- onComplete: h.func,
2377
- // pattern
2378
- placeholderChar: h.string,
2379
- displayChar: h.string,
2380
- lazy: h.bool,
2381
- definitions: h.object,
2382
- blocks: h.object,
2383
- // enum
2384
- enum: h.arrayOf(h.string),
2385
- // range
2386
- maxLength: h.number,
2387
- from: h.number,
2388
- to: h.number,
2389
- // date
2390
- pattern: h.string,
2391
- format: h.func,
2392
- parse: h.func,
2393
- autofix: h.oneOfType([h.bool, h.oneOf(["pad"])]),
2394
- // number
2395
- radix: h.string,
2396
- thousandsSeparator: h.string,
2397
- mapToRadix: h.arrayOf(h.string),
2398
- scale: h.number,
2399
- normalizeZeros: h.bool,
2400
- padFractionalZeros: h.bool,
2401
- min: h.oneOfType([h.number, h.instanceOf(Date)]),
2402
- max: h.oneOfType([h.number, h.instanceOf(Date)]),
2403
- // dynamic
2404
- dispatch: h.func,
2405
- // ref
2406
- inputRef: h.oneOfType([h.func, h.shape({
2407
- current: h.object
2408
- })])
2409
- }, ot = Object.keys(ht).filter((u) => u !== "value"), Bt = ["value", "unmask", "onAccept", "onComplete", "inputRef"], bt = ot.filter((u) => Bt.indexOf(u) < 0);
2410
- function It(u) {
2411
- var t;
2412
- const e = (t = class extends R.Component {
2413
- constructor(n) {
2414
- super(n), this._inputRef = this._inputRef.bind(this);
2415
- }
2416
- componentDidMount() {
2417
- this.props.mask && this.initMask();
2418
- }
2419
- componentDidUpdate() {
2420
- const n = this.props, a = this._extractMaskOptionsFromProps(n);
2421
- if (a.mask)
2422
- this.maskRef ? (this.maskRef.updateOptions(a), "value" in n && n.value !== void 0 && (this.maskValue = n.value)) : this.initMask(a);
2423
- else if (this.destroyMask(), "value" in n && n.value !== void 0) {
2424
- var r;
2425
- (r = this.element) != null && r.isContentEditable && this.element.tagName !== "INPUT" && this.element.tagName !== "TEXTAREA" ? this.element.textContent = n.value : this.element.value = n.value;
2426
- }
2427
- }
2428
- componentWillUnmount() {
2429
- this.destroyMask();
2430
- }
2431
- _inputRef(n) {
2432
- this.element = n, this.props.inputRef && (Object.prototype.hasOwnProperty.call(this.props.inputRef, "current") ? this.props.inputRef.current = n : this.props.inputRef(n));
2433
- }
2434
- initMask(n) {
2435
- n === void 0 && (n = this._extractMaskOptionsFromProps(this.props)), this.maskRef = d(this.element, n).on("accept", this._onAccept.bind(this)).on("complete", this._onComplete.bind(this)), "value" in this.props && this.props.value !== void 0 && (this.maskValue = this.props.value);
2436
- }
2437
- destroyMask() {
2438
- this.maskRef && (this.maskRef.destroy(), delete this.maskRef);
2439
- }
2440
- _extractMaskOptionsFromProps(n) {
2441
- const {
2442
- ...a
2443
- } = n;
2444
- return Object.keys(a).filter((r) => bt.indexOf(r) < 0).forEach((r) => {
2445
- delete a[r];
2446
- }), a;
2447
- }
2448
- _extractNonMaskProps(n) {
2449
- const {
2450
- ...a
2451
- } = n;
2452
- return ot.forEach((r) => {
2453
- r !== "maxLength" && delete a[r];
2454
- }), "defaultValue" in a || (a.defaultValue = n.mask ? "" : a.value), delete a.value, a;
2455
- }
2456
- get maskValue() {
2457
- return this.maskRef ? this.props.unmask === "typed" ? this.maskRef.typedValue : this.props.unmask ? this.maskRef.unmaskedValue : this.maskRef.value : "";
2458
- }
2459
- set maskValue(n) {
2460
- this.maskRef && (n = n == null && this.props.unmask !== "typed" ? "" : n, this.props.unmask === "typed" ? this.maskRef.typedValue = n : this.props.unmask ? this.maskRef.unmaskedValue = n : this.maskRef.value = n);
2461
- }
2462
- _onAccept(n) {
2463
- this.props.onAccept && this.maskRef && this.props.onAccept(this.maskValue, this.maskRef, n);
2464
- }
2465
- _onComplete(n) {
2466
- this.props.onComplete && this.maskRef && this.props.onComplete(this.maskValue, this.maskRef, n);
2467
- }
2468
- render() {
2469
- return R.createElement(u, {
2470
- ...this._extractNonMaskProps(this.props),
2471
- inputRef: this._inputRef
2472
- });
2473
- }
2474
- }, t.displayName = void 0, t.propTypes = void 0, t), s = u.displayName || u.name || "Component";
2475
- return e.displayName = "IMask(" + s + ")", e.propTypes = ht, R.forwardRef((i, n) => R.createElement(e, {
2476
- ...i,
2477
- ref: n
2478
- }));
2479
- }
2480
- const Dt = It((u) => {
2481
- let {
2482
- inputRef: t,
2483
- ...e
2484
- } = u;
2485
- return R.createElement("input", {
2486
- ...e,
2487
- ref: t
2488
- });
2489
- }), Mt = (u, t) => R.createElement(Dt, {
2490
- ...u,
2491
- ref: t
2492
- });
2493
- R.forwardRef(Mt);
2494
- function Tt(u, t) {
2495
- let {
2496
- onAccept: e,
2497
- onComplete: s,
2498
- ref: i = J(null),
2499
- defaultValue: n,
2500
- defaultUnmaskedValue: a,
2501
- defaultTypedValue: r
2502
- } = t === void 0 ? {} : t;
2503
- const l = J(null), [p, k] = N({}), [m, g] = N(""), [E, M] = N(""), [F, b] = N(), V = U(() => {
2504
- var f;
2505
- (f = l.current) == null || f.destroy(), l.current = null;
2506
- }, []), x = U(() => {
2507
- const f = l.current;
2508
- f && (k({
2509
- value: f.value,
2510
- unmaskedValue: f.unmaskedValue,
2511
- typedValue: f.typedValue
2512
- }), b(f.typedValue), M(f.unmaskedValue), g(f.value));
2513
- }, []), y = U((f) => {
2514
- const C = l.current;
2515
- C && (x(), e == null || e(C.value, C, f));
2516
- }, [e]), Z = U((f) => l.current && (s == null ? void 0 : s(l.current.value, l.current, f)), [s]);
2517
- return w(() => {
2518
- const {
2519
- value: f,
2520
- ...C
2521
- } = p, S = l.current;
2522
- !S || m === void 0 || (f !== m && (S.value = m, S.value !== m && y()), k(C));
2523
- }, [m]), w(() => {
2524
- const {
2525
- unmaskedValue: f,
2526
- ...C
2527
- } = p, S = l.current;
2528
- !S || E === void 0 || (f !== E && (S.unmaskedValue = E, S.unmaskedValue !== E && y()), k(C));
2529
- }, [E]), w(() => {
2530
- const {
2531
- typedValue: f,
2532
- ...C
2533
- } = p, S = l.current;
2534
- !S || F === void 0 || (f !== F && (S.typedValue = F, S.masked.typedValueEquals(F) || y()), k(C));
2535
- }, [F]), w(() => {
2536
- const f = i.current;
2537
- if (!f || !(u != null && u.mask)) return V();
2538
- const C = l.current;
2539
- C ? C == null || C.updateOptions(u) : f && u != null && u.mask && (l.current = d(f, u), x(), n !== void 0 && g(n), a !== void 0 && M(a), r !== void 0 && b(r));
2540
- }, [u, V, y]), w(() => {
2541
- if (!l.current) return;
2542
- const f = l.current;
2543
- return f.on("accept", y), f.on("complete", Z), () => {
2544
- f.off("accept", y), f.off("complete", Z);
2545
29
  };
2546
- }, [y, Z]), w(() => V, [V]), {
2547
- ref: i,
2548
- maskRef: l,
2549
- value: m,
2550
- setValue: g,
2551
- unmaskedValue: E,
2552
- setUnmaskedValue: M,
2553
- typedValue: F,
2554
- setTypedValue: b
2555
- };
2556
- }
2557
- const st = (u, t) => {
2558
- if (u.returnFormattedValueOnBlur || u.returnFormattedValueOnKeyDown) {
2559
- const { name: e } = t.target, s = u.defaultValue || "";
2560
- return { ...t, target: { value: ft(s), name: e } };
2561
30
  }
2562
- return t;
2563
- }, wt = (u, t, e) => u.isNumeric ? {} : {
2564
- onBlur: (s) => {
2565
- if (e.unmaskedValue.trim().length && u.autoCompleteMask) {
2566
- const i = e.unmaskedValue, n = e.mask.toString().replace(/\D+/g, "").length;
2567
- if (n > i.length)
2568
- switch (u.autoCompleteMask) {
31
+ return u;
32
+ }, I = (e, u, o) => e.isNumeric ? {} : {
33
+ onBlur: (a) => {
34
+ if (o.unmaskedValue.trim().length && e.autoCompleteMask) {
35
+ const n = o.unmaskedValue, r = o.mask.toString().replace(/\D+/g, "").length;
36
+ if (r > n.length)
37
+ switch (e.autoCompleteMask) {
2569
38
  case "left":
2570
- t(i.padStart(n, "0"));
39
+ u(n.padStart(r, "0"));
2571
40
  break;
2572
41
  case "right":
2573
- t(i.padEnd(n, "0"));
42
+ u(n.padEnd(r, "0"));
2574
43
  break;
2575
44
  default:
2576
- t(i);
45
+ u(n);
2577
46
  break;
2578
47
  }
2579
48
  }
2580
- if (u.onBlur) {
2581
- const { value: i } = s.target, n = Q(i), a = { ...s, target: { ...s.target, value: n } }, r = st(u, a);
2582
- u.onBlur(r);
49
+ if (e.onBlur) {
50
+ const {
51
+ value: n
52
+ } = a.target, r = g(n), i = {
53
+ ...a,
54
+ target: {
55
+ ...a.target,
56
+ value: r
57
+ }
58
+ }, l = k(e, i);
59
+ e.onBlur(l);
2583
60
  }
2584
61
  },
2585
- onKeyDown: (s) => {
2586
- if (u.onKeyDown) {
2587
- const { value: i } = s.target, n = Q(i), a = { ...s, target: { value: n } }, r = st(u, a);
2588
- u.onKeyDown(r);
2589
- }
2590
- }
2591
- }, Rt = [
2592
- P.disabled,
2593
- P.unvisible,
2594
- P.readOnly,
2595
- P.hideContent
2596
- ], zt = ({
2597
- value: u,
2598
- defaultValue: t,
2599
- inputRef: e,
2600
- onChange: s,
2601
- onComplete: i,
2602
- permissionAttr: n,
2603
- mask: a,
2604
- ...r
62
+ onKeyDown: (a) => {
63
+ if (e.onKeyDown) {
64
+ const {
65
+ value: n
66
+ } = a.target, r = g(n), i = {
67
+ ...a,
68
+ target: {
69
+ value: r
70
+ }
71
+ }, l = k(e, i);
72
+ e.onKeyDown(l);
73
+ }
74
+ }
75
+ }, K = [s.disabled, s.unvisible, s.readOnly, s.hideContent], Z = ({
76
+ value: e,
77
+ defaultValue: u,
78
+ inputRef: o,
79
+ onChange: a,
80
+ onComplete: n,
81
+ permissionAttr: r,
82
+ mask: i,
83
+ isDateTimeField: l,
84
+ ...d
2605
85
  }) => {
2606
- const l = kt(Rt, n), { disabled: p, readOnly: k } = l, m = p || k, g = mt({ mask: a, ...r }), { ref: E, setValue: M, setTypedValue: F, maskRef: b } = Tt(g, {
2607
- defaultValue: t,
2608
- onAccept: (V, x) => {
2609
- if (!m && s) {
2610
- const y = {
86
+ const v = w(K, r), {
87
+ disabled: y,
88
+ readOnly: p
89
+ } = v, f = y || p, O = F({
90
+ mask: i,
91
+ isDateTimeField: l,
92
+ ...d
93
+ }), {
94
+ ref: D,
95
+ setValue: V,
96
+ setUnmaskedValue: E,
97
+ maskRef: N
98
+ } = B({
99
+ ...O
100
+ }, {
101
+ defaultValue: u,
102
+ onAccept: (m, t) => {
103
+ if (!f && a) {
104
+ const c = {
2611
105
  target: {
2612
- name: x.el.input.name,
2613
- value: x.unmaskedValue,
2614
- maskedValue: x.value,
2615
- typedValue: x.typedValue
106
+ name: t.el.input.name,
107
+ value: t.unmaskedValue,
108
+ maskedValue: t.value,
109
+ typedValue: t.typedValue
2616
110
  }
2617
111
  };
2618
- s(y);
112
+ a(c);
2619
113
  }
2620
114
  },
2621
- onComplete: (V, x) => {
2622
- if (!m && i) {
2623
- const y = {
115
+ onComplete: (m, t) => {
116
+ if (!f && n) {
117
+ const c = {
2624
118
  target: {
2625
- name: x.el.input.name,
2626
- value: x.unmaskedValue,
2627
- maskedValue: x.value,
2628
- typedValue: x.typedValue
119
+ name: t.el.input.name,
120
+ value: t.unmaskedValue,
121
+ maskedValue: t.value,
122
+ typedValue: t.typedValue
2629
123
  }
2630
124
  };
2631
- i(y);
125
+ n(c);
2632
126
  }
2633
127
  }
2634
128
  });
2635
- return w(() => {
2636
- typeof u == "number" && (String(u).trim().length > 0 ? F(u) : F(0)), M(ct(u) ?? "");
2637
- }, [u]), /* @__PURE__ */ pt.jsx(
2638
- dt,
2639
- {
2640
- inputRef: (V) => {
2641
- E.current = V, e && (typeof e == "object" ? e.current = V : e(V));
2642
- },
2643
- permissionAttr: n,
2644
- ...r,
2645
- ...wt(r, M, b.current)
129
+ return h(() => {
130
+ if (i === Number || typeof e == "number") {
131
+ const t = b(String(e));
132
+ Number.isNaN(t) || E(String(t));
133
+ return;
2646
134
  }
2647
- );
135
+ const m = e ? String(e) : "";
136
+ V(m);
137
+ }, [e]), /* @__PURE__ */ S(M, { inputRef: (m) => {
138
+ D.current = m, o && (typeof o == "object" ? o.current = m : o(m));
139
+ }, permissionAttr: r, ...d, ...I(d, V, N.current) });
2648
140
  };
2649
141
  export {
2650
- zt as default
142
+ Z as default
2651
143
  };
144
+ //# sourceMappingURL=BaseMask.js.map