@ptcwebops/ptcw-design 1.8.0 → 1.8.2

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 (522) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/bundle-example.cjs.entry.js +31 -31
  3. package/dist/cjs/bundle-jumbotron-example.cjs.entry.js +40 -40
  4. package/dist/cjs/{core-332e5461.js → core-1951cc85.js} +91 -29
  5. package/dist/cjs/dropdown-item.cjs.entry.js +11 -11
  6. package/dist/cjs/dynamic-box-bundle.cjs.entry.js +26 -26
  7. package/dist/cjs/icon-asset_5.cjs.entry.js +188 -188
  8. package/dist/cjs/{index-88135a6b.js → index-266d5edd.js} +72 -1
  9. package/dist/cjs/innovator-toggle-container.cjs.entry.js +22 -22
  10. package/dist/cjs/{interfaces-574e6df7.js → interfaces-0ecd8027.js} +9 -9
  11. package/dist/cjs/loader.cjs.js +2 -2
  12. package/dist/cjs/lottie-player.cjs.entry.js +3073 -2826
  13. package/dist/cjs/max-width-container_3.cjs.entry.js +217 -217
  14. package/dist/cjs/my-component.cjs.entry.js +16 -16
  15. package/dist/cjs/{pagination-8d9d474d.js → pagination-d20b7968.js} +24 -6
  16. package/dist/cjs/ptc-accordion-item.cjs.entry.js +84 -84
  17. package/dist/cjs/ptc-accordion.cjs.entry.js +36 -36
  18. package/dist/cjs/ptc-announcement.cjs.entry.js +51 -51
  19. package/dist/cjs/ptc-back-to-top.cjs.entry.js +36 -36
  20. package/dist/cjs/ptc-bio-card.cjs.entry.js +25 -25
  21. package/dist/cjs/ptc-card-bottom_3.cjs.entry.js +123 -123
  22. package/dist/cjs/ptc-card-content.cjs.entry.js +58 -58
  23. package/dist/cjs/ptc-card.cjs.entry.js +67 -67
  24. package/dist/cjs/ptc-case-studies-slider.cjs.entry.js +92 -83
  25. package/dist/cjs/ptc-checkbox.cjs.entry.js +51 -51
  26. package/dist/cjs/ptc-collapse-list.cjs.entry.js +354 -354
  27. package/dist/cjs/ptc-container.cjs.entry.js +34 -34
  28. package/dist/cjs/ptc-date.cjs.entry.js +51 -51
  29. package/dist/cjs/ptc-dropdown.cjs.entry.js +65 -65
  30. package/dist/cjs/ptc-dynamic-card.cjs.entry.js +48 -48
  31. package/dist/cjs/ptc-ellipsis-dropdown.cjs.entry.js +47 -47
  32. package/dist/cjs/ptc-filter-tag.cjs.entry.js +58 -58
  33. package/dist/cjs/ptc-hero-footer-cta.cjs.entry.js +12 -12
  34. package/dist/cjs/ptc-hero.cjs.entry.js +19 -19
  35. package/dist/cjs/ptc-icon-component.cjs.entry.js +63 -63
  36. package/dist/cjs/ptc-icon-list.cjs.entry.js +22 -22
  37. package/dist/cjs/ptc-icon-minimize.cjs.entry.js +44 -44
  38. package/dist/cjs/ptc-image-download-strip.cjs.entry.js +19 -19
  39. package/dist/cjs/ptc-jumbotron.cjs.entry.js +111 -111
  40. package/dist/cjs/ptc-link.cjs.entry.js +34 -34
  41. package/dist/cjs/ptc-list.cjs.entry.js +50 -50
  42. package/dist/cjs/ptc-lottie.cjs.entry.js +11 -11
  43. package/dist/cjs/ptc-media-card.cjs.entry.js +59 -59
  44. package/dist/cjs/ptc-minimized-footer.cjs.entry.js +9 -9
  45. package/dist/cjs/ptc-minimized-header.cjs.entry.js +12 -12
  46. package/dist/cjs/ptc-mobile-select.cjs.entry.js +157 -139
  47. package/dist/cjs/ptc-modal.cjs.entry.js +151 -151
  48. package/dist/cjs/ptc-nav-card.cjs.entry.js +37 -37
  49. package/dist/cjs/ptc-nav-link.cjs.entry.js +37 -37
  50. package/dist/cjs/ptc-nav-slider.cjs.entry.js +84 -84
  51. package/dist/cjs/ptc-nav-submenu.cjs.entry.js +22 -22
  52. package/dist/cjs/ptc-news.cjs.entry.js +18 -18
  53. package/dist/cjs/ptc-overlay.cjs.entry.js +24 -24
  54. package/dist/cjs/ptc-pagenation.cjs.entry.js +307 -307
  55. package/dist/cjs/ptc-para_2.cjs.entry.js +79 -79
  56. package/dist/cjs/ptc-picture.cjs.entry.js +144 -144
  57. package/dist/cjs/ptc-previous-url.cjs.entry.js +12 -12
  58. package/dist/cjs/ptc-pricing-block.cjs.entry.js +21 -21
  59. package/dist/cjs/ptc-pricing-tabs.cjs.entry.js +126 -126
  60. package/dist/cjs/ptc-product-card.cjs.entry.js +23 -23
  61. package/dist/cjs/ptc-product-category.cjs.entry.js +11 -11
  62. package/dist/cjs/ptc-product-dropdown.cjs.entry.js +70 -70
  63. package/dist/cjs/ptc-product-highlight-card.cjs.entry.js +13 -13
  64. package/dist/cjs/ptc-product-list.cjs.entry.js +141 -141
  65. package/dist/cjs/ptc-product-sidebar.cjs.entry.js +131 -131
  66. package/dist/cjs/ptc-progress-bar_2.cjs.entry.js +86 -86
  67. package/dist/cjs/ptc-quote.cjs.entry.js +24 -24
  68. package/dist/cjs/ptc-readmore.cjs.entry.js +74 -74
  69. package/dist/cjs/ptc-responsive-wrapper.cjs.entry.js +55 -55
  70. package/dist/cjs/ptc-search-field.cjs.entry.js +72 -72
  71. package/dist/cjs/ptc-shopping-cart.cjs.entry.js +51 -51
  72. package/dist/cjs/ptc-slit-card.cjs.entry.js +26 -26
  73. package/dist/cjs/ptc-span.cjs.entry.js +21 -21
  74. package/dist/cjs/ptc-sticky-icons.cjs.entry.js +33 -33
  75. package/dist/cjs/ptc-sticky-section.cjs.entry.js +31 -28
  76. package/dist/cjs/ptc-sticky-title.cjs.entry.js +24 -24
  77. package/dist/cjs/ptc-subnav-card.cjs.entry.js +16 -16
  78. package/dist/cjs/ptc-subnav.cjs.entry.js +24 -24
  79. package/dist/cjs/ptc-svg-btn.cjs.entry.js +96 -96
  80. package/dist/cjs/ptc-tab-list.cjs.entry.js +142 -142
  81. package/dist/cjs/ptc-tab.cjs.entry.js +21 -21
  82. package/dist/cjs/ptc-tabs.cjs.entry.js +48 -48
  83. package/dist/cjs/ptc-text-copy-with-background.cjs.entry.js +43 -43
  84. package/dist/cjs/ptc-tooltip.cjs.entry.js +96 -96
  85. package/dist/cjs/ptc-two-column-media.cjs.entry.js +16 -16
  86. package/dist/cjs/ptcw-design.cjs.js +2 -2
  87. package/dist/cjs/sequential-bundle-example.cjs.entry.js +110 -110
  88. package/dist/cjs/sequential-bundle.cjs.entry.js +90 -90
  89. package/dist/cjs/tab-content.cjs.entry.js +28 -28
  90. package/dist/cjs/tab-header.cjs.entry.js +65 -65
  91. package/dist/cjs/{utils-9eb22041.js → utils-416c94fe.js} +90 -90
  92. package/dist/collection/collection-manifest.json +1 -1
  93. package/dist/collection/components/dropdown-item/dropdown-item.js +61 -61
  94. package/dist/collection/components/dynamic-box-bundle/dynamic-box-bundle.js +114 -114
  95. package/dist/collection/components/icon-asset/icon-asset.css +4 -4
  96. package/dist/collection/components/icon-asset/icon-asset.js +199 -199
  97. package/dist/collection/components/icon-asset/media/brands.svg +1381 -1381
  98. package/dist/collection/components/icon-asset/media/designer.svg +464 -464
  99. package/dist/collection/components/icon-asset/media/regular.svg +463 -463
  100. package/dist/collection/components/icon-asset/media/solid.svg +3013 -3013
  101. package/dist/collection/components/icon-asset/media/svg-with-js.min.css +4 -4
  102. package/dist/collection/components/innovator-toggle-container/innovator-toggle-container.js +89 -89
  103. package/dist/collection/components/list-item/list-item.js +144 -144
  104. package/dist/collection/components/max-width-container/max-width-container.css +11 -11
  105. package/dist/collection/components/max-width-container/max-width-container.js +123 -123
  106. package/dist/collection/components/my-component/my-component.css +3 -3
  107. package/dist/collection/components/my-component/my-component.js +82 -82
  108. package/dist/collection/components/organism-bundles/bundle-example/bundle-example.css +25 -25
  109. package/dist/collection/components/organism-bundles/bundle-example/bundle-example.js +58 -58
  110. package/dist/collection/components/organism-bundles/bundle-jumbotron-example/bundle-jumbotron-example.css +3 -3
  111. package/dist/collection/components/organism-bundles/bundle-jumbotron-example/bundle-jumbotron-example.js +91 -91
  112. package/dist/collection/components/organism-bundles/sequential-bundle/sequential-bundle.js +116 -116
  113. package/dist/collection/components/organism-bundles/sequential-bundle-example/sequential-bundle-example.css +92 -92
  114. package/dist/collection/components/organism-bundles/sequential-bundle-example/sequential-bundle-example.js +160 -160
  115. package/dist/collection/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.js +287 -287
  116. package/dist/collection/components/ptc-accordion/ptc-accordion.js +78 -78
  117. package/dist/collection/components/ptc-announcement/ptc-announcement.js +237 -237
  118. package/dist/collection/components/ptc-back-to-top/ptc-back-to-top.js +61 -61
  119. package/dist/collection/components/ptc-background-video/ptc-background-video.js +200 -200
  120. package/dist/collection/components/ptc-bio-card/ptc-bio-card.js +130 -130
  121. package/dist/collection/components/ptc-breadcrumb/ptc-breadcrumb.js +105 -105
  122. package/dist/collection/components/ptc-button/ptc-button.js +302 -302
  123. package/dist/collection/components/ptc-card/ptc-card.js +362 -362
  124. package/dist/collection/components/ptc-card-bottom/ptc-card-bottom.js +116 -116
  125. package/dist/collection/components/ptc-card-content/ptc-card-content.js +212 -212
  126. package/dist/collection/components/ptc-card-wrapper/ptc-card-wrapper.js +214 -214
  127. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.css +2 -2
  128. package/dist/collection/components/ptc-case-studies-slider/ptc-case-studies-slider.js +91 -91
  129. package/dist/collection/components/ptc-checkbox/ptc-checkbox.js +152 -152
  130. package/dist/collection/components/ptc-collapse-list/ptc-collapse-list.js +593 -593
  131. package/dist/collection/components/ptc-container/ptc-container.js +138 -138
  132. package/dist/collection/components/ptc-date/ptc-date.js +224 -224
  133. package/dist/collection/components/ptc-dropdown/ptc-dropdown.js +162 -162
  134. package/dist/collection/components/ptc-dynamic-card/media/nav-active-dotslick.svg +15 -15
  135. package/dist/collection/components/ptc-dynamic-card/ptc-dynamic-card.js +174 -174
  136. package/dist/collection/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.js +137 -137
  137. package/dist/collection/components/ptc-filter-tag/ptc-filter-tag.js +113 -113
  138. package/dist/collection/components/ptc-hero/ptc-hero.js +86 -86
  139. package/dist/collection/components/ptc-hero-footer-cta/ptc-hero-footer-cta.js +78 -78
  140. package/dist/collection/components/ptc-icon-component/ptc-icon-component.css +2 -2
  141. package/dist/collection/components/ptc-icon-component/ptc-icon-component.js +87 -87
  142. package/dist/collection/components/ptc-icon-list/ptc-icon-list.js +127 -127
  143. package/dist/collection/components/ptc-icon-minimize/ptc-icon-minimize.js +119 -119
  144. package/dist/collection/components/ptc-image-download-strip/ptc-image-download-strip.js +51 -51
  145. package/dist/collection/components/ptc-img/ptc-img.js +311 -311
  146. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.css +2 -2
  147. package/dist/collection/components/ptc-jumbotron/ptc-jumbotron.js +334 -334
  148. package/dist/collection/components/ptc-link/ptc-link.js +207 -207
  149. package/dist/collection/components/ptc-list/ptc-list.js +99 -99
  150. package/dist/collection/components/ptc-lottie/ptc-lottie.css +5 -5
  151. package/dist/collection/components/ptc-lottie/ptc-lottie.js +62 -62
  152. package/dist/collection/components/ptc-media-card/ptc-media-card.js +240 -240
  153. package/dist/collection/components/ptc-minimized-footer/ptc-minimized-footer.js +18 -18
  154. package/dist/collection/components/ptc-minimized-header/ptc-minimized-header.js +81 -81
  155. package/dist/collection/components/ptc-mobile-select/ptc-mobile-select.css +7 -2
  156. package/dist/collection/components/ptc-mobile-select/ptc-mobile-select.js +190 -190
  157. package/dist/collection/components/ptc-modal/ptc-modal.js +407 -407
  158. package/dist/collection/components/ptc-nav-card/ptc-nav-card.js +224 -224
  159. package/dist/collection/components/ptc-news/ptc-news.js +169 -169
  160. package/dist/collection/components/ptc-overlay/ptc-overlay.js +131 -131
  161. package/dist/collection/components/ptc-pagenation/ptc-pagenation.js +573 -573
  162. package/dist/collection/components/ptc-para/ptc-para.js +242 -242
  163. package/dist/collection/components/ptc-picture/ptc-picture.js +473 -473
  164. package/dist/collection/components/ptc-previous-url/ptc-previous-url.js +78 -78
  165. package/dist/collection/components/ptc-pricing-block/ptc-pricing-block.js +70 -70
  166. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.css +2 -2
  167. package/dist/collection/components/ptc-pricing-tabs/ptc-pricing-tabs.js +272 -272
  168. package/dist/collection/components/ptc-product-card/ptc-product-card.js +162 -162
  169. package/dist/collection/components/ptc-product-category/ptc-product-category.js +60 -60
  170. package/dist/collection/components/ptc-product-dropdown/ptc-product-dropdown.js +185 -185
  171. package/dist/collection/components/ptc-product-highlight-card/ptc-product-highlight-card.js +96 -96
  172. package/dist/collection/components/ptc-product-list/ptc-product-list.js +194 -194
  173. package/dist/collection/components/ptc-product-sidebar/ptc-product-sidebar.js +254 -254
  174. package/dist/collection/components/ptc-progress-bar/ptc-progress-bar.js +42 -42
  175. package/dist/collection/components/ptc-quote/ptc-quote.js +144 -144
  176. package/dist/collection/components/ptc-readmore/ptc-readmore.js +298 -298
  177. package/dist/collection/components/ptc-responsive-wrapper/ptc-responsive-wrapper.css +3 -3
  178. package/dist/collection/components/ptc-responsive-wrapper/ptc-responsive-wrapper.js +65 -65
  179. package/dist/collection/components/ptc-search-field/ptc-search-field.js +247 -247
  180. package/dist/collection/components/ptc-shopping-cart/ptc-shopping-cart.js +97 -97
  181. package/dist/collection/components/ptc-skeleton/ptc-skeleton.js +139 -139
  182. package/dist/collection/components/ptc-slit-card/ptc-slit-card.js +181 -181
  183. package/dist/collection/components/ptc-social-share/ptc-social-share.js +267 -267
  184. package/dist/collection/components/ptc-spacer/ptc-spacer.css +332 -332
  185. package/dist/collection/components/ptc-spacer/ptc-spacer.js +97 -97
  186. package/dist/collection/components/ptc-span/ptc-span.js +107 -107
  187. package/dist/collection/components/ptc-sticky-icons/ptc-sticky-icons.js +51 -51
  188. package/dist/collection/components/ptc-sticky-section/ptc-sticky-section.js +49 -46
  189. package/dist/collection/components/ptc-sticky-title/ptc-sticky-title.js +89 -89
  190. package/dist/collection/components/ptc-svg-btn/ptc-svg-btn.js +109 -109
  191. package/dist/collection/components/ptc-tab-list/ptc-tab-list.js +195 -195
  192. package/dist/collection/components/ptc-tabs/ptc-tab.js +121 -121
  193. package/dist/collection/components/ptc-tabs/ptc-tabs.js +104 -104
  194. package/dist/collection/components/ptc-text-copy-with-background/ptc-text-copy-with-background.js +181 -181
  195. package/dist/collection/components/ptc-title/ptc-title.js +310 -310
  196. package/dist/collection/components/ptc-tooltip/ptc-tooltip.js +342 -342
  197. package/dist/collection/components/ptc-two-column-media/ptc-two-column-media.js +48 -48
  198. package/dist/collection/components/subnav/ptc-nav-link/ptc-nav-link.js +114 -114
  199. package/dist/collection/components/subnav/ptc-nav-slider/ptc-nav-slider.js +126 -126
  200. package/dist/collection/components/subnav/ptc-nav-submenu/ptc-nav-submenu.js +105 -105
  201. package/dist/collection/components/subnav/ptc-subnav/ptc-subnav.css +1 -1
  202. package/dist/collection/components/subnav/ptc-subnav/ptc-subnav.js +70 -70
  203. package/dist/collection/components/subnav/ptc-subnav-card/ptc-subnav-card.js +133 -133
  204. package/dist/collection/components/tab-content/tab-content.js +84 -84
  205. package/dist/collection/components/tab-header/tab-header.js +182 -182
  206. package/dist/collection/index.js +1 -1
  207. package/dist/collection/media/svg-imgs/Back-arrow.svg +11 -11
  208. package/dist/collection/media/svg-imgs/close.svg +10 -10
  209. package/dist/collection/media/svg-imgs/nav-active-dotslick.svg +15 -15
  210. package/dist/collection/media/svg-imgs/play-button-dark.svg +20 -20
  211. package/dist/collection/media/svg-imgs/ptc-shopping-cart-black.svg +3 -3
  212. package/dist/collection/media/svg-imgs/ptc-shopping-cart-white.svg +3 -3
  213. package/dist/collection/media/svg-imgs/slider-arrow-left.svg +18 -18
  214. package/dist/collection/media/svg-imgs/slider-arrow-right.svg +18 -18
  215. package/dist/collection/media/svg-imgs/union.svg +3 -3
  216. package/dist/collection/stories/Button.stories.js +43 -43
  217. package/dist/collection/stories/MaxWidthContainer.stories.js +32 -32
  218. package/dist/collection/stories/ReadMore.stories.js +100 -100
  219. package/dist/collection/stories/Title.stories.js +115 -115
  220. package/dist/collection/stories/Tooltip.stories.js +112 -112
  221. package/dist/collection/utils/component.js +3 -3
  222. package/dist/collection/utils/interfaces.js +11 -11
  223. package/dist/collection/utils/utils.js +92 -92
  224. package/dist/custom-elements/index.js +8565 -8208
  225. package/dist/esm/bundle-example.entry.js +31 -31
  226. package/dist/esm/bundle-jumbotron-example.entry.js +40 -40
  227. package/dist/esm/{core-73ab4867.js → core-209a2c67.js} +91 -29
  228. package/dist/esm/dropdown-item.entry.js +11 -11
  229. package/dist/esm/dynamic-box-bundle.entry.js +26 -26
  230. package/dist/esm/icon-asset_5.entry.js +188 -188
  231. package/dist/esm/{index-8e63c32d.js → index-521c9253.js} +72 -1
  232. package/dist/esm/innovator-toggle-container.entry.js +22 -22
  233. package/dist/esm/{interfaces-4caedd26.js → interfaces-3cb94654.js} +9 -9
  234. package/dist/esm/loader.js +3 -3
  235. package/dist/esm/lottie-player.entry.js +3073 -2826
  236. package/dist/esm/max-width-container_3.entry.js +217 -217
  237. package/dist/esm/my-component.entry.js +16 -16
  238. package/dist/esm/{pagination-902de0b2.js → pagination-3ddf3057.js} +24 -6
  239. package/dist/esm/polyfills/core-js.js +0 -0
  240. package/dist/esm/polyfills/dom.js +0 -0
  241. package/dist/esm/polyfills/es5-html-element.js +0 -0
  242. package/dist/esm/polyfills/index.js +0 -0
  243. package/dist/esm/polyfills/system.js +0 -0
  244. package/dist/esm/ptc-accordion-item.entry.js +84 -84
  245. package/dist/esm/ptc-accordion.entry.js +36 -36
  246. package/dist/esm/ptc-announcement.entry.js +51 -51
  247. package/dist/esm/ptc-back-to-top.entry.js +36 -36
  248. package/dist/esm/ptc-bio-card.entry.js +25 -25
  249. package/dist/esm/ptc-card-bottom_3.entry.js +123 -123
  250. package/dist/esm/ptc-card-content.entry.js +58 -58
  251. package/dist/esm/ptc-card.entry.js +67 -67
  252. package/dist/esm/ptc-case-studies-slider.entry.js +92 -83
  253. package/dist/esm/ptc-checkbox.entry.js +51 -51
  254. package/dist/esm/ptc-collapse-list.entry.js +354 -354
  255. package/dist/esm/ptc-container.entry.js +34 -34
  256. package/dist/esm/ptc-date.entry.js +51 -51
  257. package/dist/esm/ptc-dropdown.entry.js +65 -65
  258. package/dist/esm/ptc-dynamic-card.entry.js +48 -48
  259. package/dist/esm/ptc-ellipsis-dropdown.entry.js +47 -47
  260. package/dist/esm/ptc-filter-tag.entry.js +58 -58
  261. package/dist/esm/ptc-hero-footer-cta.entry.js +12 -12
  262. package/dist/esm/ptc-hero.entry.js +19 -19
  263. package/dist/esm/ptc-icon-component.entry.js +63 -63
  264. package/dist/esm/ptc-icon-list.entry.js +22 -22
  265. package/dist/esm/ptc-icon-minimize.entry.js +44 -44
  266. package/dist/esm/ptc-image-download-strip.entry.js +19 -19
  267. package/dist/esm/ptc-jumbotron.entry.js +111 -111
  268. package/dist/esm/ptc-link.entry.js +34 -34
  269. package/dist/esm/ptc-list.entry.js +50 -50
  270. package/dist/esm/ptc-lottie.entry.js +11 -11
  271. package/dist/esm/ptc-media-card.entry.js +59 -59
  272. package/dist/esm/ptc-minimized-footer.entry.js +9 -9
  273. package/dist/esm/ptc-minimized-header.entry.js +12 -12
  274. package/dist/esm/ptc-mobile-select.entry.js +157 -139
  275. package/dist/esm/ptc-modal.entry.js +151 -151
  276. package/dist/esm/ptc-nav-card.entry.js +37 -37
  277. package/dist/esm/ptc-nav-link.entry.js +37 -37
  278. package/dist/esm/ptc-nav-slider.entry.js +84 -84
  279. package/dist/esm/ptc-nav-submenu.entry.js +22 -22
  280. package/dist/esm/ptc-news.entry.js +18 -18
  281. package/dist/esm/ptc-overlay.entry.js +24 -24
  282. package/dist/esm/ptc-pagenation.entry.js +307 -307
  283. package/dist/esm/ptc-para_2.entry.js +79 -79
  284. package/dist/esm/ptc-picture.entry.js +144 -144
  285. package/dist/esm/ptc-previous-url.entry.js +12 -12
  286. package/dist/esm/ptc-pricing-block.entry.js +21 -21
  287. package/dist/esm/ptc-pricing-tabs.entry.js +126 -126
  288. package/dist/esm/ptc-product-card.entry.js +23 -23
  289. package/dist/esm/ptc-product-category.entry.js +11 -11
  290. package/dist/esm/ptc-product-dropdown.entry.js +70 -70
  291. package/dist/esm/ptc-product-highlight-card.entry.js +13 -13
  292. package/dist/esm/ptc-product-list.entry.js +141 -141
  293. package/dist/esm/ptc-product-sidebar.entry.js +131 -131
  294. package/dist/esm/ptc-progress-bar_2.entry.js +86 -86
  295. package/dist/esm/ptc-quote.entry.js +24 -24
  296. package/dist/esm/ptc-readmore.entry.js +74 -74
  297. package/dist/esm/ptc-responsive-wrapper.entry.js +55 -55
  298. package/dist/esm/ptc-search-field.entry.js +72 -72
  299. package/dist/esm/ptc-shopping-cart.entry.js +51 -51
  300. package/dist/esm/ptc-slit-card.entry.js +26 -26
  301. package/dist/esm/ptc-span.entry.js +21 -21
  302. package/dist/esm/ptc-sticky-icons.entry.js +33 -33
  303. package/dist/esm/ptc-sticky-section.entry.js +31 -28
  304. package/dist/esm/ptc-sticky-title.entry.js +24 -24
  305. package/dist/esm/ptc-subnav-card.entry.js +16 -16
  306. package/dist/esm/ptc-subnav.entry.js +24 -24
  307. package/dist/esm/ptc-svg-btn.entry.js +96 -96
  308. package/dist/esm/ptc-tab-list.entry.js +142 -142
  309. package/dist/esm/ptc-tab.entry.js +21 -21
  310. package/dist/esm/ptc-tabs.entry.js +48 -48
  311. package/dist/esm/ptc-text-copy-with-background.entry.js +43 -43
  312. package/dist/esm/ptc-tooltip.entry.js +96 -96
  313. package/dist/esm/ptc-two-column-media.entry.js +16 -16
  314. package/dist/esm/ptcw-design.js +3 -3
  315. package/dist/esm/sequential-bundle-example.entry.js +110 -110
  316. package/dist/esm/sequential-bundle.entry.js +90 -90
  317. package/dist/esm/tab-content.entry.js +28 -28
  318. package/dist/esm/tab-header.entry.js +65 -65
  319. package/dist/esm/{utils-38decc43.js → utils-f937097d.js} +90 -90
  320. package/dist/ptcw-design/media/brands.svg +1381 -1381
  321. package/dist/ptcw-design/media/designer.svg +464 -464
  322. package/dist/ptcw-design/media/nav-active-dotslick.svg +15 -15
  323. package/dist/ptcw-design/media/regular.svg +463 -463
  324. package/dist/ptcw-design/media/solid.svg +3013 -3013
  325. package/dist/ptcw-design/media/svg-with-js.min.css +4 -4
  326. package/dist/ptcw-design/{p-49dc9b68.entry.js → p-037436f9.entry.js} +1 -1
  327. package/dist/ptcw-design/{p-73ea7065.entry.js → p-04d4bfc4.entry.js} +1 -1
  328. package/dist/ptcw-design/{p-baabdb8a.entry.js → p-0a400bd4.entry.js} +1 -1
  329. package/dist/ptcw-design/{p-ba213813.entry.js → p-0e630350.entry.js} +1 -1
  330. package/dist/ptcw-design/p-0fc282f5.js +1 -0
  331. package/dist/ptcw-design/{p-15af7aee.entry.js → p-142cdd0c.entry.js} +1 -1
  332. package/dist/ptcw-design/{p-55d298f5.entry.js → p-14d31733.entry.js} +1 -1
  333. package/dist/ptcw-design/{p-6e9eccfc.entry.js → p-1523d508.entry.js} +1 -1
  334. package/dist/ptcw-design/{p-2d69f408.entry.js → p-24ca90e7.entry.js} +1 -1
  335. package/dist/ptcw-design/{p-c3b7c168.entry.js → p-2763af9e.entry.js} +1 -1
  336. package/dist/ptcw-design/{p-12780f09.entry.js → p-2af2c990.entry.js} +1 -1
  337. package/dist/ptcw-design/{p-57fa9836.entry.js → p-2e0d9d7f.entry.js} +1 -1
  338. package/dist/ptcw-design/p-31e0ed8e.entry.js +1 -0
  339. package/dist/ptcw-design/{p-4977dc6d.entry.js → p-34aef911.entry.js} +1 -1
  340. package/dist/ptcw-design/{p-366528df.entry.js → p-356a8a49.entry.js} +1 -1
  341. package/dist/ptcw-design/{p-54ca3d2a.entry.js → p-387068d6.entry.js} +1 -1
  342. package/dist/ptcw-design/{p-d49d8875.entry.js → p-3cddd372.entry.js} +1 -1
  343. package/dist/ptcw-design/{p-462567d1.entry.js → p-3f5ad479.entry.js} +1 -1
  344. package/dist/ptcw-design/{p-c005febf.entry.js → p-4206b5f8.entry.js} +1 -1
  345. package/dist/ptcw-design/{p-06e361ac.entry.js → p-4e8250d1.entry.js} +1 -1
  346. package/dist/ptcw-design/{p-250b3ea1.entry.js → p-50ec5021.entry.js} +1 -1
  347. package/dist/ptcw-design/{p-af3a4142.entry.js → p-5355df5f.entry.js} +1 -1
  348. package/dist/ptcw-design/p-58785be1.entry.js +1 -0
  349. package/dist/ptcw-design/{p-306d6394.entry.js → p-5a914ce0.entry.js} +1 -1
  350. package/dist/ptcw-design/{p-ba3372d4.entry.js → p-5bdb4d6b.entry.js} +1 -1
  351. package/dist/ptcw-design/{p-5cab985d.entry.js → p-5f2198b2.entry.js} +1 -1
  352. package/dist/ptcw-design/{p-26880c78.entry.js → p-6107436a.entry.js} +1 -1
  353. package/dist/ptcw-design/{p-9a5ee2d5.entry.js → p-62bacdde.entry.js} +1 -1
  354. package/dist/ptcw-design/{p-00c9ae79.entry.js → p-63dd30ad.entry.js} +1 -1
  355. package/dist/ptcw-design/{p-4f465dd3.entry.js → p-661ca851.entry.js} +1 -1
  356. package/dist/ptcw-design/{p-fe0928c0.entry.js → p-6763bb12.entry.js} +1 -1
  357. package/dist/ptcw-design/{p-60fe097e.entry.js → p-6b2cb63f.entry.js} +1 -1
  358. package/dist/ptcw-design/p-6b8f2a2a.entry.js +1 -0
  359. package/dist/ptcw-design/{p-65513c45.entry.js → p-6d0d90ac.entry.js} +1 -1
  360. package/dist/ptcw-design/{p-dd6501a8.entry.js → p-6eaeb9d0.entry.js} +1 -1
  361. package/dist/ptcw-design/p-6ec5167f.entry.js +1 -0
  362. package/dist/ptcw-design/{p-f24c57cf.entry.js → p-6f564063.entry.js} +1 -1
  363. package/dist/ptcw-design/{p-8030db10.entry.js → p-70f3caa1.entry.js} +1 -1
  364. package/dist/ptcw-design/{p-fa58bf5f.entry.js → p-73b54b2b.entry.js} +1 -1
  365. package/dist/ptcw-design/{p-564f58cf.entry.js → p-785edd90.entry.js} +1 -1
  366. package/dist/ptcw-design/{p-2bd3fd74.entry.js → p-7dd6c76c.entry.js} +1 -1
  367. package/dist/ptcw-design/{p-8bf9e0af.entry.js → p-842ee53f.entry.js} +1 -1
  368. package/dist/ptcw-design/{p-d7d6eff1.entry.js → p-8896e8e8.entry.js} +1 -1
  369. package/dist/ptcw-design/{p-4702f4e4.entry.js → p-88d78c75.entry.js} +1 -1
  370. package/dist/ptcw-design/{p-e71c4b6b.entry.js → p-89bdbdb0.entry.js} +1 -1
  371. package/dist/ptcw-design/{p-fe1ff7d2.entry.js → p-8a5c6d19.entry.js} +1 -1
  372. package/dist/ptcw-design/{p-99b10f83.entry.js → p-8ec1379c.entry.js} +1 -1
  373. package/dist/ptcw-design/{p-3cf1f951.entry.js → p-90f5ddf3.entry.js} +1 -1
  374. package/dist/ptcw-design/{p-a9eaabae.entry.js → p-92ca1c90.entry.js} +1 -1
  375. package/dist/ptcw-design/{p-469482ba.entry.js → p-9a2e1d68.entry.js} +1 -1
  376. package/dist/ptcw-design/{p-aa942e3b.entry.js → p-9da7f322.entry.js} +1 -1
  377. package/dist/ptcw-design/{p-3bb54c51.entry.js → p-9e710bd9.entry.js} +1 -1
  378. package/dist/ptcw-design/{p-4983e571.entry.js → p-9f86b7c0.entry.js} +1 -1
  379. package/dist/ptcw-design/{p-fb4779ce.entry.js → p-a21e700b.entry.js} +1 -1
  380. package/dist/ptcw-design/{p-d8ade68d.entry.js → p-a71ec11d.entry.js} +1 -1
  381. package/dist/ptcw-design/{p-c2c85e61.entry.js → p-a9e8d6ae.entry.js} +1 -1
  382. package/dist/ptcw-design/{p-b922e3a5.entry.js → p-aa9e455f.entry.js} +1 -1
  383. package/dist/ptcw-design/{p-d7232d12.entry.js → p-aebf5905.entry.js} +1 -1
  384. package/dist/ptcw-design/{p-c1fd430d.entry.js → p-b48e8b60.entry.js} +1 -1
  385. package/dist/ptcw-design/{p-c6f151df.entry.js → p-baaf60f7.entry.js} +1 -1
  386. package/dist/ptcw-design/{p-cdff68d4.entry.js → p-baf37894.entry.js} +1 -1
  387. package/dist/ptcw-design/{p-5e08dc82.entry.js → p-bee618f0.entry.js} +1 -1
  388. package/dist/ptcw-design/{p-99e80637.entry.js → p-c085ea09.entry.js} +1 -1
  389. package/dist/ptcw-design/{p-8c6b069b.entry.js → p-c24ba553.entry.js} +1 -1
  390. package/dist/ptcw-design/{p-f86b2262.entry.js → p-c54bc7d0.entry.js} +1 -1
  391. package/dist/ptcw-design/{p-2bcb85cb.entry.js → p-c758ea47.entry.js} +1 -1
  392. package/dist/ptcw-design/{p-4783fc15.entry.js → p-c7a7c315.entry.js} +1 -1
  393. package/dist/ptcw-design/{p-e66e3791.entry.js → p-c8cd200f.entry.js} +1 -1
  394. package/dist/ptcw-design/{p-eed3687b.entry.js → p-ca846daf.entry.js} +1 -1
  395. package/dist/ptcw-design/{p-cd6b8c27.entry.js → p-cbcdde15.entry.js} +1 -1
  396. package/dist/ptcw-design/{p-46afd828.entry.js → p-cff4b6f8.entry.js} +1 -1
  397. package/dist/ptcw-design/{p-c5ede527.entry.js → p-d459e4e8.entry.js} +1 -1
  398. package/dist/ptcw-design/{p-a24ecd75.entry.js → p-d8be1ada.entry.js} +1 -1
  399. package/dist/ptcw-design/{p-4f540f7c.entry.js → p-d9085ab8.entry.js} +1 -1
  400. package/dist/ptcw-design/{p-2318d652.entry.js → p-dbc3591d.entry.js} +1 -1
  401. package/dist/ptcw-design/{p-341a4c39.entry.js → p-e35c26f9.entry.js} +1 -1
  402. package/dist/ptcw-design/p-e428e6d9.js +1 -0
  403. package/dist/ptcw-design/{p-af3d5be7.entry.js → p-ea2f7967.entry.js} +1 -1
  404. package/dist/ptcw-design/{p-c5fadad0.entry.js → p-f152aa1a.entry.js} +1 -1
  405. package/dist/ptcw-design/{p-5507ef4b.entry.js → p-f3c1d0f7.entry.js} +1 -1
  406. package/dist/ptcw-design/{p-574680c3.entry.js → p-f4bfdb6c.entry.js} +1 -1
  407. package/dist/ptcw-design/{p-2181c8c7.entry.js → p-f77048a0.entry.js} +1 -1
  408. package/dist/ptcw-design/{p-59058faa.entry.js → p-f7d9d8d6.entry.js} +1 -1
  409. package/dist/ptcw-design/{p-9379f3b6.entry.js → p-fbd20db7.entry.js} +1 -1
  410. package/dist/ptcw-design/{p-718d6ae8.entry.js → p-fef6f882.entry.js} +1 -1
  411. package/dist/ptcw-design/ptcw-design.css +2 -2
  412. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  413. package/dist/types/components/dropdown-item/dropdown-item.d.ts +5 -5
  414. package/dist/types/components/dynamic-box-bundle/dynamic-box-bundle.d.ts +10 -10
  415. package/dist/types/components/icon-asset/icon-asset.d.ts +40 -40
  416. package/dist/types/components/innovator-toggle-container/innovator-toggle-container.d.ts +17 -17
  417. package/dist/types/components/list-item/list-item.d.ts +16 -16
  418. package/dist/types/components/max-width-container/max-width-container.d.ts +15 -15
  419. package/dist/types/components/my-component/my-component.d.ts +16 -16
  420. package/dist/types/components/organism-bundles/bundle-example/bundle-example.d.ts +10 -10
  421. package/dist/types/components/organism-bundles/bundle-jumbotron-example/bundle-jumbotron-example.d.ts +5 -5
  422. package/dist/types/components/organism-bundles/sequential-bundle/sequential-bundle.d.ts +12 -12
  423. package/dist/types/components/organism-bundles/sequential-bundle-example/sequential-bundle-example.d.ts +16 -16
  424. package/dist/types/components/ptc-accordion/ptc-accordion-item/ptc-accordion-item.d.ts +59 -59
  425. package/dist/types/components/ptc-accordion/ptc-accordion.d.ts +13 -13
  426. package/dist/types/components/ptc-announcement/ptc-announcement.d.ts +51 -51
  427. package/dist/types/components/ptc-back-to-top/ptc-back-to-top.d.ts +9 -9
  428. package/dist/types/components/ptc-background-video/ptc-background-video.d.ts +45 -45
  429. package/dist/types/components/ptc-bio-card/ptc-bio-card.d.ts +27 -27
  430. package/dist/types/components/ptc-breadcrumb/ptc-breadcrumb.d.ts +20 -20
  431. package/dist/types/components/ptc-button/ptc-button.d.ts +64 -64
  432. package/dist/types/components/ptc-card/ptc-card.d.ts +71 -71
  433. package/dist/types/components/ptc-card-bottom/ptc-card-bottom.d.ts +15 -15
  434. package/dist/types/components/ptc-card-content/ptc-card-content.d.ts +19 -19
  435. package/dist/types/components/ptc-card-wrapper/ptc-card-wrapper.d.ts +24 -24
  436. package/dist/types/components/ptc-case-studies-slider/ptc-case-studies-slider.d.ts +14 -14
  437. package/dist/types/components/ptc-checkbox/ptc-checkbox.d.ts +14 -14
  438. package/dist/types/components/ptc-collapse-list/ptc-collapse-list.d.ts +56 -56
  439. package/dist/types/components/ptc-container/ptc-container.d.ts +13 -13
  440. package/dist/types/components/ptc-date/ptc-date.d.ts +46 -46
  441. package/dist/types/components/ptc-dropdown/ptc-dropdown.d.ts +19 -19
  442. package/dist/types/components/ptc-dynamic-card/ptc-dynamic-card.d.ts +23 -23
  443. package/dist/types/components/ptc-ellipsis-dropdown/ptc-ellipsis-dropdown.d.ts +15 -15
  444. package/dist/types/components/ptc-filter-tag/ptc-filter-tag.d.ts +17 -17
  445. package/dist/types/components/ptc-hero/ptc-hero.d.ts +16 -16
  446. package/dist/types/components/ptc-hero-footer-cta/ptc-hero-footer-cta.d.ts +6 -6
  447. package/dist/types/components/ptc-icon-component/ptc-icon-component.d.ts +17 -17
  448. package/dist/types/components/ptc-icon-list/ptc-icon-list.d.ts +21 -21
  449. package/dist/types/components/ptc-icon-minimize/ptc-icon-minimize.d.ts +12 -12
  450. package/dist/types/components/ptc-image-download-strip/ptc-image-download-strip.d.ts +9 -9
  451. package/dist/types/components/ptc-img/ptc-img.d.ts +55 -55
  452. package/dist/types/components/ptc-jumbotron/ptc-jumbotron.d.ts +25 -25
  453. package/dist/types/components/ptc-link/ptc-link.d.ts +40 -40
  454. package/dist/types/components/ptc-list/ptc-list.d.ts +8 -8
  455. package/dist/types/components/ptc-lottie/ptc-lottie.d.ts +12 -12
  456. package/dist/types/components/ptc-media-card/ptc-media-card.d.ts +52 -52
  457. package/dist/types/components/ptc-minimized-footer/ptc-minimized-footer.d.ts +3 -3
  458. package/dist/types/components/ptc-minimized-header/ptc-minimized-header.d.ts +6 -6
  459. package/dist/types/components/ptc-mobile-select/ptc-mobile-select.d.ts +36 -36
  460. package/dist/types/components/ptc-modal/ptc-modal.d.ts +71 -71
  461. package/dist/types/components/ptc-nav-card/ptc-nav-card.d.ts +46 -46
  462. package/dist/types/components/ptc-news/ptc-news.d.ts +35 -35
  463. package/dist/types/components/ptc-overlay/ptc-overlay.d.ts +21 -21
  464. package/dist/types/components/ptc-pagenation/ptc-pagenation.d.ts +40 -40
  465. package/dist/types/components/ptc-para/ptc-para.d.ts +47 -47
  466. package/dist/types/components/ptc-picture/ptc-picture.d.ts +97 -97
  467. package/dist/types/components/ptc-previous-url/ptc-previous-url.d.ts +9 -9
  468. package/dist/types/components/ptc-pricing-block/ptc-pricing-block.d.ts +7 -7
  469. package/dist/types/components/ptc-pricing-tabs/ptc-pricing-tabs.d.ts +52 -52
  470. package/dist/types/components/ptc-product-card/ptc-product-card.d.ts +37 -37
  471. package/dist/types/components/ptc-product-category/ptc-product-category.d.ts +5 -5
  472. package/dist/types/components/ptc-product-dropdown/ptc-product-dropdown.d.ts +18 -18
  473. package/dist/types/components/ptc-product-highlight-card/ptc-product-highlight-card.d.ts +23 -23
  474. package/dist/types/components/ptc-product-list/ptc-product-list.d.ts +18 -18
  475. package/dist/types/components/ptc-product-sidebar/ptc-product-sidebar.d.ts +31 -31
  476. package/dist/types/components/ptc-progress-bar/ptc-progress-bar.d.ts +5 -5
  477. package/dist/types/components/ptc-quote/ptc-quote.d.ts +29 -29
  478. package/dist/types/components/ptc-readmore/ptc-readmore.d.ts +57 -57
  479. package/dist/types/components/ptc-responsive-wrapper/ptc-responsive-wrapper.d.ts +8 -8
  480. package/dist/types/components/ptc-search-field/ptc-search-field.d.ts +23 -23
  481. package/dist/types/components/ptc-shopping-cart/ptc-shopping-cart.d.ts +6 -6
  482. package/dist/types/components/ptc-skeleton/ptc-skeleton.d.ts +10 -10
  483. package/dist/types/components/ptc-slit-card/ptc-slit-card.d.ts +36 -36
  484. package/dist/types/components/ptc-social-share/ptc-social-share.d.ts +37 -37
  485. package/dist/types/components/ptc-spacer/ptc-spacer.d.ts +16 -16
  486. package/dist/types/components/ptc-span/ptc-span.d.ts +20 -20
  487. package/dist/types/components/ptc-sticky-icons/ptc-sticky-icons.d.ts +7 -7
  488. package/dist/types/components/ptc-sticky-section/ptc-sticky-section.d.ts +9 -9
  489. package/dist/types/components/ptc-sticky-title/ptc-sticky-title.d.ts +8 -8
  490. package/dist/types/components/ptc-svg-btn/ptc-svg-btn.d.ts +20 -20
  491. package/dist/types/components/ptc-tab-list/ptc-tab-list.d.ts +21 -21
  492. package/dist/types/components/ptc-tabs/ptc-tab.d.ts +9 -9
  493. package/dist/types/components/ptc-tabs/ptc-tabs.d.ts +10 -10
  494. package/dist/types/components/ptc-text-copy-with-background/ptc-text-copy-with-background.d.ts +34 -34
  495. package/dist/types/components/ptc-title/ptc-title.d.ts +54 -54
  496. package/dist/types/components/ptc-tooltip/ptc-tooltip.d.ts +59 -59
  497. package/dist/types/components/ptc-two-column-media/ptc-two-column-media.d.ts +9 -9
  498. package/dist/types/components/subnav/ptc-nav-link/ptc-nav-link.d.ts +21 -21
  499. package/dist/types/components/subnav/ptc-nav-slider/ptc-nav-slider.d.ts +11 -11
  500. package/dist/types/components/subnav/ptc-nav-submenu/ptc-nav-submenu.d.ts +22 -22
  501. package/dist/types/components/subnav/ptc-subnav/ptc-subnav.d.ts +8 -8
  502. package/dist/types/components/subnav/ptc-subnav-card/ptc-subnav-card.d.ts +27 -27
  503. package/dist/types/components/tab-content/tab-content.d.ts +12 -12
  504. package/dist/types/components/tab-header/tab-header.d.ts +22 -22
  505. package/dist/types/components.d.ts +130 -130
  506. package/dist/types/global.d.ts +1072 -1072
  507. package/dist/types/index.d.ts +1 -1
  508. package/dist/types/stencil-public-runtime.d.ts +11 -0
  509. package/dist/types/utils/component.d.ts +1 -1
  510. package/dist/types/utils/interfaces.d.ts +31 -31
  511. package/dist/types/utils/utils.d.ts +5 -5
  512. package/package.json +80 -80
  513. package/readme.md +18 -18
  514. package/dist/ptcw-design/p-2c543cd2.entry.js +0 -1
  515. package/dist/ptcw-design/p-553d840a.js +0 -1
  516. package/dist/ptcw-design/p-6b1b68d5.entry.js +0 -1
  517. package/dist/ptcw-design/p-8a1c2577.entry.js +0 -1
  518. package/dist/ptcw-design/p-c7bd4d99.entry.js +0 -1
  519. package/dist/ptcw-design/p-d100f115.js +0 -1
  520. /package/dist/ptcw-design/{p-711bcdad.js → p-240733ce.js} +0 -0
  521. /package/dist/ptcw-design/{p-63c06667.js → p-92141eb1.js} +0 -0
  522. /package/dist/ptcw-design/{p-36665caa.js → p-ea875d9e.js} +0 -0
@@ -1,1072 +1,1072 @@
1
- /**
2
- * FormValidation (https://formvalidation.io)
3
- * The best validation library for JavaScript
4
- * (c) 2013 - 2021 Nguyen Huu Phuoc <me@phuoc.ng>
5
- */
6
-
7
- // This should be used with FormValidation UMD package
8
- declare namespace FormValidation {
9
- // Core
10
- // ----
11
-
12
- namespace core {
13
- interface ValidatorOptions {
14
- enabled?: boolean;
15
- message?: string;
16
- [option: string]: unknown;
17
- }
18
- interface FieldOptions {
19
- selector?: string;
20
- validators: {
21
- [validatorName: string]: ValidatorOptions,
22
- };
23
- }
24
- interface FieldsOptions {
25
- [field: string]: FieldOptions;
26
- }
27
- interface Localization {
28
- [validator: string]: {
29
- default?: string,
30
- };
31
- }
32
- interface LocalizationMessage {
33
- [locale: string]: string;
34
- }
35
- type LocalizationMessageType = LocalizationMessage | string;
36
- interface ValidateOptions {
37
- message?: string;
38
- }
39
- interface ValidateInput<T extends ValidateOptions, L extends Localization> {
40
- element?: HTMLElement;
41
- elements?: HTMLElement[];
42
- field?: string;
43
- options?: T;
44
- l10n?: L;
45
- value: string;
46
- }
47
- interface ValidateResult {
48
- message?: LocalizationMessageType;
49
- meta?: unknown;
50
- valid: boolean;
51
- }
52
-
53
- interface ValidateFunctionInterface<K extends ValidateOptions, T> {
54
- validate(input: ValidateInput<K, Localization>): T;
55
- }
56
- type ValidateFunction<K extends ValidateOptions> = ValidateFunctionInterface<K, ValidateResult | Promise<ValidateResult>>;
57
-
58
- class Core {
59
- constructor(form: HTMLElement, fields?: FieldsOptions);
60
-
61
- on(event: string, func: (...arg: unknown[]) => unknown): Core;
62
- off(event: string, func: (...arg: unknown[]) => unknown): Core;
63
- emit(event: string, ...args: unknown[]): Core;
64
-
65
- registerPlugin(name: string, plugin: Plugin<unknown>): Core;
66
- deregisterPlugin(name: string): Core;
67
-
68
- registerValidator(name: string, func: () => ValidateFunction<ValidateOptions>): Core;
69
- registerValidator<K extends ValidateOptions>(name: string, func: () => ValidateFunction<K>): Core;
70
- registerFilter(name: string, func: (...arg: unknown[]) => unknown): Core;
71
- deregisterFilter(name: string, func: (...arg: unknown[]) => unknown): Core;
72
- executeFilter<T>(name: string, defaultValue: T, args: unknown[]): T;
73
-
74
- addField(field: string, options?: FieldOptions): Core;
75
- removeField(field: string): Core;
76
-
77
- revalidateField(field: string): Promise<string>;
78
- validate(): Promise<string>;
79
- validateField(field: string): Promise<string>;
80
- validateElement(field: string, ele: HTMLElement): Promise<string>;
81
- executeValidator(field: string, ele: HTMLElement, v: string, opts: ValidatorOptions): Promise<string>;
82
-
83
- getElementValue(field: string, ele: HTMLElement, validator?: string): string;
84
- getElements(field: string): HTMLElement[];
85
- getFields(): FieldsOptions;
86
- getFormElement(): HTMLElement;
87
- getLocale(): string;
88
- getPlugin(name: string): Plugin<unknown>;
89
-
90
- updateFieldStatus(field: string, status: string, validator?: string): Core;
91
- updateElementStatus(field: string, ele: HTMLElement, status: string, validator?: string): Core;
92
-
93
- resetForm(reset?: boolean): Core;
94
- resetField(field: string, reset?: boolean): Core;
95
-
96
- disableValidator(field: string, validator?: string): Core;
97
- enableValidator(field: string, validator?: string): Core;
98
- updateValidatorOption(field: string, validator: string, name: string, value: unknown): Core;
99
- setFieldOptions(field: string, options: FieldOptions): Core;
100
-
101
- destroy(): Core;
102
-
103
- setLocale(locale: string, localization: Localization): Core;
104
- }
105
-
106
- class Plugin<T> {
107
- constructor(opts?: T);
108
- setCore(core: core.Core): Plugin<T>;
109
- install(): void;
110
- uninstall(): void;
111
- }
112
- }
113
-
114
- type Plugin<T> = core.Plugin<T>;
115
-
116
- // Algorithms
117
- // ----------
118
-
119
- namespace algorithms {
120
- function luhn(value: string): boolean;
121
- function mod11And10(value: string): boolean;
122
- function mod37And36(value: string, alphabet?: string): boolean;
123
- function verhoeff(value: number[]): boolean;
124
- }
125
-
126
- // formValidation
127
- // --------------
128
-
129
- interface Options {
130
- fields?: core.FieldsOptions;
131
- locale?: string;
132
- localization?: core.Localization;
133
- plugins?: {
134
- [name: string]: core.Plugin<unknown>,
135
- };
136
- init?(core: core.Core): void;
137
- }
138
- function formValidation(form: HTMLElement, options?: Options): core.Core;
139
-
140
- // Locales
141
- // -------
142
-
143
- let locales: {};
144
-
145
- // Plugins
146
- // -------
147
- namespace plugins {
148
- interface AliasOptions {
149
- // Map the alias with defined validator name
150
- [alias: string]: string;
151
- }
152
- class Alias extends core.Plugin<AliasOptions> {
153
- constructor(opts?: AliasOptions);
154
- }
155
-
156
- class Aria extends core.Plugin<{}> {
157
- constructor();
158
- }
159
-
160
- interface AutoFocusOptions {
161
- onPrefocus: (AutoFocusPrefocusEvent) => void;
162
- }
163
- interface AutoFocusPrefocusEvent {
164
- field: string;
165
- firstElement: HTMLElement;
166
- }
167
- class AutoFocus extends core.Plugin<AutoFocusOptions> {
168
- constructor(opts?: AutoFocusOptions);
169
- }
170
-
171
- interface DeclarativeOptions {
172
- // Set it to `true` to enable the validators automatically based on the input type or particular HTML 5 attributes:
173
- // -----------------+---------------------
174
- // HTML 5 attribute | Equivalent validator
175
- // -----------------+---------------------
176
- // max="..." | lessThan
177
- // min="..." | greaterThan
178
- // maxlength="..." | stringLength
179
- // minlength="..." | stringLength
180
- // pattern="..." | regexp
181
- // required | notEmpty
182
- // type="color" | color
183
- // type="email" | emailAddress
184
- // type="range" | between
185
- // type="url" | uri
186
- // -----------------+---------------------
187
- // It's not enabled by default
188
- html5Input?: boolean;
189
- // The prefix of plugin declaration attributes. By default, it is set to `data-fvp-`
190
- pluginPrefix?: string;
191
- // The prefix of attributes. By default, it is set to `data-fv-`
192
- prefix?: string;
193
- }
194
- class Declarative extends core.Plugin<DeclarativeOptions> {
195
- constructor(opts?: DeclarativeOptions);
196
- }
197
-
198
- class DefaultSubmit extends core.Plugin<{}> {
199
- constructor();
200
- }
201
-
202
- interface DependencyOptions {
203
- [field: string]: string;
204
- }
205
- class Dependency extends core.Plugin<DependencyOptions> {
206
- constructor(opts: DependencyOptions);
207
- }
208
-
209
- type ExcludedCallback = (field: string, element: HTMLElement, elements: HTMLElement[]) => boolean;
210
- interface ExcludedOptions {
211
- excluded: ExcludedCallback;
212
- }
213
- class Excluded extends core.Plugin<ExcludedOptions> {
214
- constructor(opts?: ExcludedOptions);
215
- }
216
-
217
- interface FieldStatusOptions {
218
- onStatusChanged?: (areFieldsValid: boolean) => void;
219
- }
220
- class FieldStatus extends core.Plugin<FieldStatusOptions> {
221
- constructor(opts?: FieldStatusOptions);
222
- }
223
-
224
- interface IconOptions {
225
- invalid?: string;
226
- valid?: string;
227
- validating?: string;
228
- onPlaced?: (IconPlacedEvent) => void;
229
- onSet?: (IconSetEvent) => void;
230
- }
231
- interface IconPlacedEvent {
232
- element: HTMLElement;
233
- field: string;
234
- iconElement: HTMLElement;
235
- classes: IconOptions;
236
- }
237
- interface IconSetEvent {
238
- element: HTMLElement;
239
- field: string;
240
- status: string;
241
- iconElement: HTMLElement;
242
- }
243
- class Icon extends core.Plugin<IconOptions> {
244
- constructor(opts?: IconOptions);
245
- }
246
-
247
- interface InternationalTelephoneInputOptions {
248
- autoPlaceholder?: string;
249
- field: string | string[];
250
- message: string;
251
- utilsScript?: string;
252
- }
253
- class InternationalTelephoneInput extends core.Plugin<InternationalTelephoneInputOptions> {
254
- constructor(opts?: InternationalTelephoneInputOptions);
255
- static INT_TEL_VALIDATOR: string;
256
- }
257
-
258
- interface LiteralMessage {
259
- [locale: string]: string;
260
- }
261
- type CallbackMessage = (field: string, validator: string) => LiteralMessage;
262
- interface L10nOptions {
263
- [field: string]: {
264
- [validator: string]: LiteralMessage | CallbackMessage,
265
- };
266
- }
267
- class L10n extends core.Plugin<L10nOptions> {
268
- constructor(opts?: L10nOptions);
269
- }
270
-
271
- interface MailgunOptions {
272
- // The API key provided by Mailgun
273
- apiKey: string;
274
- // The field name that will be validated
275
- field: string;
276
- // Error message indicates the input is not valid
277
- message: string;
278
- // Show suggestion if the email is not valid
279
- suggestion?: boolean;
280
- }
281
- class Mailgun extends core.Plugin<MailgunOptions> {
282
- constructor(opts?: MailgunOptions);
283
- }
284
-
285
- interface MandatoryIconOptions {
286
- icon: string;
287
- }
288
- class MandatoryIcon extends core.Plugin<MandatoryIconOptions> {
289
- constructor(opts?: MandatoryIconOptions);
290
- }
291
-
292
- interface PasswordStrengthOptions {
293
- field: string;
294
- message: string;
295
- minimalScore: number;
296
- onValidated?: (valid: boolean, message: string, score: number) => void;
297
- }
298
- class PasswordStrength extends core.Plugin<PasswordStrengthOptions> {
299
- constructor(opts?: PasswordStrengthOptions);
300
- static PASSWORD_STRENGTH_VALIDATOR: string;
301
- }
302
-
303
- type ContainerCallback = (field: string, element: HTMLElement) => HTMLElement;
304
- interface MessageOptions {
305
- clazz?: string;
306
- container?: string | ContainerCallback;
307
- }
308
- class Message extends core.Plugin<MessageOptions> {
309
- constructor(opts?: MessageOptions);
310
- static getClosestContainer(element: HTMLElement, upper: HTMLElement, pattern: RegExp): HTMLElement;
311
- }
312
-
313
- interface RecaptchaOptions {
314
- // The ID of element showing the captcha
315
- element: string;
316
- // The language code defined by reCAPTCHA
317
- // See https://developers.google.com/recaptcha/docs/language
318
- language?: string;
319
- // The invalid message that will be shown in case the captcha is not valid
320
- // You don't need to define it if the back-end URL above returns the message
321
- message: string;
322
- // The site key provided by Google
323
- siteKey: string;
324
- backendVerificationUrl?: string;
325
-
326
- // The size of widget. It can be 'compact', 'normal' (default), or 'invisible'
327
- size?: string;
328
-
329
- // reCAPTCHA widget option (size can be 'compact' or 'normal')
330
- // See https://developers.google.com/recaptcha/docs/display
331
-
332
- // The theme name provided by Google. It can be light (default), dark
333
- theme?: string;
334
-
335
- // Invisible reCAPTCHA
336
- // See https://developers.google.com/recaptcha/docs/invisible
337
- // The position of reCAPTCHA. Can be 'bottomright' (default), 'bottomleft', 'inline'
338
- badge?: string;
339
- }
340
- class Recaptcha extends core.Plugin<RecaptchaOptions> {
341
- constructor(opts?: RecaptchaOptions);
342
- static CAPTCHA_FIELD: string;
343
- }
344
-
345
- interface Recaptcha3Options {
346
- // The ID of element showing the captcha error
347
- element: string;
348
- // The language code defined by reCAPTCHA
349
- // See https://developers.google.com/recaptcha/docs/language
350
- language?: string;
351
- // Minimum score, between 0 and 1
352
- minimumScore?: number;
353
- // The invalid message that will be shown in case the captcha is not valid
354
- // You don't need to define it if the back-end URL above returns the message
355
- message: string;
356
- // The site key provided by Google
357
- siteKey: string;
358
- backendVerificationUrl: string;
359
- action: string;
360
- }
361
- class Recaptcha3 extends core.Plugin<Recaptcha3Options> {
362
- constructor(opts?: Recaptcha3Options);
363
- static CAPTCHA_FIELD: string;
364
- }
365
-
366
- interface Recaptcha3TokenOptions {
367
- action: string;
368
- hiddenTokenName: string;
369
- language?: string;
370
- siteKey: string;
371
- }
372
- class Recaptcha3Token extends core.Plugin<Recaptcha3TokenOptions> {
373
- constructor(opts?: Recaptcha3TokenOptions);
374
- }
375
-
376
- interface SequenceOptions {
377
- enabled: boolean | { [field: string]: boolean };
378
- }
379
- class Sequence extends core.Plugin<SequenceOptions> {
380
- constructor(opts?: SequenceOptions);
381
- }
382
-
383
- interface StartEndDateOptions {
384
- format: string;
385
- startDate: {
386
- field: string;
387
- message: string;
388
- };
389
- endDate: {
390
- field: string;
391
- message: string;
392
- };
393
- }
394
- class StartEndDate extends core.Plugin<StartEndDateOptions> {
395
- constructor(opts?: StartEndDateOptions);
396
- }
397
-
398
- interface SubmitButtonOptions {
399
- aspNetButton?: boolean;
400
- // Allow to query the submit button(s)
401
- // It's useful in case the submit button is outside of form
402
- buttons?: (form: HTMLFormElement) => Element[];
403
- }
404
- class SubmitButton extends core.Plugin<SubmitButtonOptions> {
405
- constructor(opts?: SubmitButtonOptions);
406
- }
407
-
408
- interface TooltipOptions {
409
- placement: string;
410
- trigger: string;
411
- }
412
- class Tooltip extends core.Plugin<TooltipOptions> {
413
- constructor(opts?: TooltipOptions);
414
- }
415
-
416
- interface TransformerOptions {
417
- [field: string]: {
418
- [validator: string]: (field: string, element: HTMLElement, validator: string) => string,
419
- };
420
- }
421
- class Transformer extends core.Plugin<TransformerOptions> {
422
- constructor(opts?: TransformerOptions);
423
- }
424
-
425
- interface TriggerOptions {
426
- delay?: number | {
427
- [field: string]: number,
428
- };
429
- event: string | {
430
- [field: string]: boolean | string,
431
- };
432
- // Only perform the validation if the field value exceed this number of characters
433
- threshold?: number | {
434
- [field: string]: number,
435
- };
436
- }
437
- class Trigger extends core.Plugin<TriggerOptions> {
438
- constructor(opts?: TriggerOptions);
439
- }
440
-
441
- interface WizardOptions {
442
- stepSelector: string;
443
- prevButton: string;
444
- nextButton: string;
445
- onStepActive?: (WizardStepEvent) => void;
446
- onStepInvalid?: (WizardStepEvent) => void;
447
- onStepValid?: (WizardStepEvent) => void;
448
- onValid?: (WizardValidEvent) => void;
449
- activeStepClass?: string;
450
- isFieldExcluded?: (field: string, element: HTMLElement, elements: HTMLElement[]) => boolean;
451
- isStepSkipped?:(WizardIsStepSkipped) => boolean;
452
- stepClass?: string;
453
- }
454
- interface WizardStepEvent {
455
- step: number;
456
- numSteps: number;
457
- }
458
- interface WizardValidEvent {
459
- numSteps: number;
460
- }
461
- interface WizardIsStepSkipped {
462
- currentStep: number;
463
- numSteps: number;
464
- targetStep: number;
465
- }
466
- class Wizard extends core.Plugin<WizardOptions> {
467
- constructor(opts?: WizardOptions);
468
- static EXCLUDED_PLUGIN: string;
469
- }
470
-
471
- // Plugins that supports popular CSS frameworks
472
-
473
- type RowSelector = (field: string, element: HTMLElement) => string;
474
- interface FrameworkOptions {
475
- defaultMessageContainer?: boolean;
476
- formClass: string;
477
- messageClass?: string;
478
- rowInvalidClass: string;
479
- // A list of CSS classes (separated by a space) that will be added to the row
480
- rowClasses?: string;
481
- rowPattern: RegExp;
482
- rowSelector: string | RowSelector;
483
- rowValidatingClass?: string;
484
- rowValidClass: string;
485
- // A CSS class added to valid element
486
- eleValidClass?: string;
487
- // A CSS class added to invalid element
488
- eleInvalidClass?: string;
489
- }
490
- class Framework extends core.Plugin<FrameworkOptions> {
491
- constructor(opts?: FrameworkOptions);
492
- }
493
-
494
- class Bootstrap extends plugins.Framework {
495
- constructor(opts?: plugins.FrameworkOptions);
496
- }
497
- class Bootstrap3 extends plugins.Framework {
498
- constructor(opts?: plugins.FrameworkOptions);
499
- }
500
- class Bootstrap5 extends plugins.Framework {
501
- constructor(opts?: plugins.FrameworkOptions);
502
- }
503
- class Bulma extends plugins.Framework {
504
- constructor(opts?: plugins.FrameworkOptions);
505
- }
506
- class Foundation extends plugins.Framework {
507
- constructor(opts?: plugins.FrameworkOptions);
508
- }
509
- class Materialize extends plugins.Framework {
510
- constructor(opts?: plugins.FrameworkOptions);
511
- }
512
- class Milligram extends plugins.Framework {
513
- constructor(opts?: plugins.FrameworkOptions);
514
- }
515
- class Mini extends plugins.Framework {
516
- constructor(opts?: plugins.FrameworkOptions);
517
- }
518
- class Mui extends plugins.Framework {
519
- constructor(opts?: plugins.FrameworkOptions);
520
- }
521
- class Pure extends plugins.Framework {
522
- constructor(opts?: plugins.FrameworkOptions);
523
- }
524
- class Semantic extends plugins.Framework {
525
- constructor(opts?: plugins.FrameworkOptions);
526
- }
527
- class Shoelace extends plugins.Framework {
528
- constructor(opts?: plugins.FrameworkOptions);
529
- }
530
- class Spectre extends plugins.Framework {
531
- constructor(opts?: plugins.FrameworkOptions);
532
- }
533
- class Tachyons extends plugins.Framework {
534
- constructor(opts?: plugins.FrameworkOptions);
535
- }
536
- class Turret extends plugins.Framework {
537
- constructor(opts?: plugins.FrameworkOptions);
538
- }
539
- class Uikit extends plugins.Framework {
540
- constructor(opts?: plugins.FrameworkOptions);
541
- }
542
- }
543
-
544
- // Utils
545
- // -----
546
- namespace utils {
547
- function call(functionName: ((...arg: unknown[]) => unknown) | string, args: unknown[]): unknown;
548
- function classSet(element: HTMLElement, classes: { [clazz: string]: boolean }): void;
549
- function closest(element: HTMLElement, selector: string): HTMLElement;
550
-
551
- interface FetchOptions {
552
- // Does it request to other domain? Default value is `false`
553
- crossDomain?: boolean;
554
- // Additional headers
555
- headers?: {
556
- [name: string]: string,
557
- };
558
- // The request method. For example, `GET` (default), `POST`
559
- method?: string;
560
- params: {
561
- [name: string]: unknown,
562
- };
563
- }
564
- function fetch(url: string, options: FetchOptions): Promise<unknown>;
565
-
566
- function format(message: string, parameters: string | string[]): string;
567
- function hasClass(element: HTMLElement, clazz: string): boolean;
568
- function isValidDate(year: number, month: number, day: number, notInFuture?: boolean): boolean;
569
- }
570
-
571
- // Validators
572
- // ----------
573
- namespace validators {
574
- function base64(): {
575
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
576
- };
577
-
578
- interface BetweenOptions extends core.ValidateOptions {
579
- // Default is true
580
- inclusive: boolean;
581
- max?: number;
582
- min?: number;
583
- }
584
- interface BetweenLocalization extends core.Localization {
585
- between: {
586
- default: string,
587
- notInclusive: string,
588
- };
589
- }
590
- function between(): {
591
- validate(input: core.ValidateInput<BetweenOptions, BetweenLocalization>): core.ValidateResult,
592
- };
593
-
594
- function bic(): {
595
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
596
- };
597
- function blank(): {
598
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
599
- };
600
-
601
- interface CallbackOptions extends core.ValidateOptions {
602
- callback: ((...arg: unknown[]) => unknown) | string;
603
- }
604
- function callback(): {
605
- validate(input: core.ValidateInput<CallbackOptions, core.Localization>): core.ValidateResult,
606
- };
607
-
608
- interface ChoiceOptions extends core.ValidateOptions {
609
- max?: number;
610
- min?: number;
611
- }
612
- interface ChoiceLocalization extends core.Localization {
613
- choice: {
614
- between: string,
615
- default: string,
616
- less: string,
617
- more: string,
618
- };
619
- }
620
- function choice(): {
621
- validate(input: core.ValidateInput<ChoiceOptions, ChoiceLocalization>): core.ValidateResult,
622
- };
623
-
624
- interface ColorOptions extends core.ValidateOptions {
625
- // The array of valid color types
626
- // For example: 'hex', 'hex rgb', ['hex', 'rgb']
627
- type: string | string[];
628
- }
629
- function color(): {
630
- validate(input: core.ValidateInput<ColorOptions, core.Localization>): core.ValidateResult,
631
- };
632
-
633
- function creditCard(): {
634
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
635
- };
636
- function cusip(): {
637
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
638
- };
639
-
640
- type CompareDateCallback = () => (string | Date);
641
- interface DateOptions extends core.ValidateOptions {
642
- // The date format. Default is MM/DD/YYYY
643
- // The format can be:
644
- // - date: Consist of DD, MM, YYYY parts which are separated by the separator option
645
- // - date and time: The time can consist of h, m, s parts which are separated by :
646
- // - date, time and A (indicating AM or PM)
647
- format: string;
648
- // The maximum date
649
- max?: string | Date | CompareDateCallback;
650
- // The minimum date
651
- min?: string | Date | CompareDateCallback;
652
- // Use to separate the date, month, and year. By default, it is /
653
- separator?: string;
654
- }
655
- interface DateLocalization extends core.Localization {
656
- date: {
657
- default: string,
658
- max: string,
659
- min: string,
660
- range: string,
661
- };
662
- }
663
- function date(): {
664
- validate(input: core.ValidateInput<DateOptions, DateLocalization>): core.ValidateResult,
665
- };
666
-
667
- type CompareDifferentCallback = () => string;
668
- interface DifferentOptions extends core.ValidateOptions {
669
- compare: string | CompareDifferentCallback;
670
- }
671
- function different(): {
672
- validate(input: core.ValidateInput<DifferentOptions, core.Localization>): core.ValidateResult,
673
- };
674
-
675
- function digits(): {
676
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
677
- };
678
- function ean(): {
679
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
680
- };
681
- function ein(): {
682
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
683
- };
684
-
685
- interface EmailAddressOptions extends core.ValidateOptions {
686
- // Allow multiple email addresses, separated by a comma or semicolon; default is false.
687
- multiple?: boolean | string;
688
- // Regex for character or characters expected as separator between addresses
689
- // default is comma /[,;]/, i.e. comma or semicolon.
690
- separator?: string | RegExp;
691
- }
692
- function emailAddress(): {
693
- validate(input: core.ValidateInput<EmailAddressOptions, core.Localization>): core.ValidateResult,
694
- };
695
-
696
- interface FileOptions extends core.ValidateOptions {
697
- // The allowed extensions, separated by a comma
698
- extension: string;
699
- // The maximum number of files
700
- maxFiles: number;
701
- // The maximum size in bytes
702
- maxSize: number;
703
- // The maximum size in bytes for all files
704
- maxTotalSize: number;
705
- // The minimum number of files
706
- minFiles: number;
707
- // The minimum size in bytes
708
- minSize: number;
709
- // The minimum size in bytes for all files
710
- minTotalSize: number;
711
- // The allowed MIME type, separated by a comma
712
- type: string;
713
- }
714
- function file(): {
715
- validate(input: core.ValidateInput<FileOptions, core.Localization>): core.ValidateResult,
716
- };
717
-
718
- interface GreaterThanOptions extends core.ValidateOptions {
719
- // Default is true
720
- inclusive: boolean;
721
- message: string;
722
- min?: number;
723
- }
724
- interface GreaterThanLocalization extends core.Localization {
725
- greaterThan: {
726
- default: string,
727
- notInclusive: string,
728
- };
729
- }
730
- function greaterThan(): {
731
- validate(input: core.ValidateInput<GreaterThanOptions, GreaterThanLocalization>): core.ValidateResult,
732
- };
733
-
734
- function grid(): {
735
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
736
- };
737
- function hex(): {
738
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
739
- };
740
-
741
- interface IbanOptions extends core.ValidateOptions {
742
- // The ISO 3166-1 country code. It can be
743
- // - A country code
744
- // - Name of field which its value defines the country code
745
- // - Name of callback function that returns the country code
746
- // - A callback function that returns the country code
747
- country?: string;
748
- // Set it to true (false) to indicate that the IBAN number must be (not be) from SEPA countries
749
- sepa?: boolean | string;
750
- }
751
- interface IbanLocalization extends core.Localization {
752
- iban: {
753
- countries: {
754
- [countryCode: string]: string,
755
- },
756
- country: string,
757
- default: string,
758
- };
759
- }
760
- function iban(): {
761
- validate(input: core.ValidateInput<IbanOptions, IbanLocalization>): core.ValidateResult,
762
- };
763
-
764
- interface IdOptions extends core.ValidateOptions {
765
- // The ISO 3166-1 country code. It can be
766
- // - A country code
767
- // - A callback function that returns the country code
768
- country: string | (() => string);
769
- }
770
- interface IdLocalization extends core.Localization {
771
- id: {
772
- countries: {
773
- [countryCode: string]: string,
774
- },
775
- country: string,
776
- default: string,
777
- };
778
- }
779
- function id(): {
780
- validate(input: core.ValidateInput<IdOptions, IdLocalization>): core.ValidateResult,
781
- };
782
-
783
- type CompareIdenticalCallback = () => string;
784
- interface IdenticalOptions extends core.ValidateOptions {
785
- compare: string | CompareIdenticalCallback;
786
- }
787
- function identical(): {
788
- validate(input: core.ValidateInput<IdenticalOptions, core.Localization>): core.ValidateResult,
789
- };
790
-
791
- function imei(): {
792
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
793
- };
794
- function imo(): {
795
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
796
- };
797
-
798
- interface IntegerOptions extends core.ValidateOptions {
799
- // The decimal separator. It's '.' by default
800
- decimalSeparator: string;
801
- // The thousands separator. It's empty by default
802
- thousandsSeparator: string;
803
- }
804
- function integer(): {
805
- validate(input: core.ValidateInput<IntegerOptions, core.Localization>): core.ValidateResult,
806
- };
807
-
808
- interface IpOptions extends core.ValidateOptions {
809
- // Enable IPv4 validator, default to true
810
- ipv4?: boolean;
811
- // Enable IPv6 validator, default to true
812
- ipv6?: boolean;
813
- }
814
- interface IpLocalization extends core.Localization {
815
- ip: {
816
- default: string,
817
- ipv4: string,
818
- ipv6: string,
819
- };
820
- }
821
- function ip(): {
822
- validate(input: core.ValidateInput<IpOptions, IpLocalization>): core.ValidateResult,
823
- };
824
-
825
- function isbn(): {
826
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
827
- };
828
- function isin(): {
829
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
830
- };
831
- function ismn(): {
832
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
833
- };
834
- function issn(): {
835
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
836
- };
837
-
838
- interface LessThanOptions extends core.ValidateOptions {
839
- // Default is true
840
- inclusive: boolean;
841
- max?: number;
842
- }
843
- interface LessThanLocalization extends core.Localization {
844
- lessThan: {
845
- default: string,
846
- notInclusive: string,
847
- };
848
- }
849
- function lessThan(): {
850
- validate(input: core.ValidateInput<LessThanOptions, LessThanLocalization>): core.ValidateResult,
851
- };
852
-
853
- function mac(): {
854
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
855
- };
856
- function meid(): {
857
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
858
- };
859
-
860
- interface NotEmptyOptions extends core.ValidateOptions {
861
- trim?: boolean;
862
- }
863
- function notEmpty(): {
864
- validate(input: core.ValidateInput<NotEmptyOptions, core.Localization>): core.ValidateResult,
865
- };
866
-
867
- interface NumericOptions extends core.ValidateOptions {
868
- // The decimal separator. It's '.' by default
869
- decimalSeparator: string;
870
- // The thousands separator. It's empty by default
871
- thousandsSeparator: string;
872
- }
873
- function numeric(): {
874
- validate(input: core.ValidateInput<NumericOptions, core.Localization>): core.ValidateResult,
875
- };
876
-
877
- interface PhoneOptions extends core.ValidateOptions {
878
- // The ISO 3166-1 country code. It can be
879
- // - A country code
880
- // - A callback function that returns the country code
881
- country: string | (() => string);
882
- }
883
- interface PhoneLocalization extends core.Localization {
884
- phone: {
885
- countries: {
886
- [countryCode: string]: string,
887
- },
888
- country: string,
889
- default: string,
890
- };
891
- }
892
- function phone(): {
893
- validate(input: core.ValidateInput<PhoneOptions, PhoneLocalization>): core.ValidateResult,
894
- };
895
-
896
- interface PromiseOptions extends core.ValidateOptions {
897
- promise: (...arg: unknown[]) => unknown | string;
898
- }
899
- function promise(): {
900
- validate(input: core.ValidateInput<PromiseOptions, core.Localization>): core.ValidateResult,
901
- };
902
-
903
- interface RegexpOptions extends core.ValidateOptions {
904
- // If specified, flags can have any combination of JavaScript regular expression flags such as:
905
- // g: global match
906
- // i: ignore case
907
- // m: multiple line
908
- flags?: string;
909
- // The regular expression you need to check
910
- regexp: string | RegExp;
911
- }
912
- function regexp(): {
913
- validate(input: core.ValidateInput<RegexpOptions, core.Localization>): core.ValidateResult,
914
- };
915
-
916
- interface RemoteOptions extends core.ValidateOptions {
917
- url: string;
918
- // Does it request to other domain? Default value is `false`
919
- crossDomain?: boolean;
920
- // By default, it will take the value `{ <fieldName>: <fieldValue> }`
921
- data?: Record<string, unknown> | ((...arg: unknown[]) => unknown);
922
- // Additional headers
923
- headers?: {
924
- [name: string]: string,
925
- };
926
- // Override the field name for the request
927
- name?: string;
928
- // Can be GET or POST (default)
929
- method?: string;
930
- // The valid key. It's `valid` by default
931
- // This is useful when connecting to external remote server or APIs provided by 3rd parties
932
- validKey?: string;
933
- }
934
- function remote(): {
935
- validate(input: core.ValidateInput<RemoteOptions, core.Localization>): core.ValidateResult,
936
- };
937
-
938
- function rtn(): {
939
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
940
- };
941
- function sedol(): {
942
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
943
- };
944
- function siren(): {
945
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
946
- };
947
- function siret(): {
948
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
949
- };
950
-
951
- interface StepOptions extends core.ValidateOptions {
952
- baseValue: number;
953
- step: number;
954
- }
955
- interface StepLocalization extends core.Localization {
956
- step: {
957
- default: string,
958
- };
959
- }
960
- function step(): {
961
- validate(input: core.ValidateInput<StepOptions, StepLocalization>): core.ValidateResult,
962
- };
963
-
964
- interface StringCaseOptions extends core.ValidateOptions {
965
- // Can be 'lower' (default) or 'upper'
966
- case: string;
967
- }
968
- interface StringCaseLocalization extends core.Localization {
969
- stringCase: {
970
- default: string,
971
- upper: string,
972
- };
973
- }
974
- function stringCase(): {
975
- validate(input: core.ValidateInput<StringCaseOptions, StringCaseLocalization>): core.ValidateResult,
976
- };
977
-
978
- interface StringLengthOptions extends core.ValidateOptions {
979
- // At least one of two options is required
980
- // The min, max keys define the number which the field value compares to. min, max can be
981
- // - A number
982
- // - Name of field which its value defines the number
983
- // - Name of callback function that returns the number
984
- // - A callback function that returns the number
985
- max?: number | string;
986
- min?: number | string;
987
- // Indicate the length will be calculated after trimming the value or not. It is false, by default
988
- trim?: boolean | string;
989
- // Evaluate string length in UTF-8 bytes, default to false
990
- utf8Bytes?: boolean | string;
991
- }
992
- interface StringLengthLocalization extends core.Localization {
993
- stringLength: {
994
- between: string,
995
- default: string,
996
- less: string,
997
- more: string,
998
- };
999
- }
1000
- function stringLength(): {
1001
- validate(input: core.ValidateInput<StringLengthOptions, StringLengthLocalization>): core.ValidateResult,
1002
- };
1003
-
1004
- interface UriOptions extends core.ValidateOptions {
1005
- // Allow the URI without protocol. Default to false
1006
- allowEmptyProtocol?: boolean | string;
1007
- // Allow the private and local network IP. Default to false
1008
- allowLocal?: boolean | string;
1009
- // The protocols, separated by a comma. Default to "http, https, ftp"
1010
- protocol?: string;
1011
- }
1012
- function uri(): {
1013
- validate(input: core.ValidateInput<UriOptions, core.Localization>): core.ValidateResult,
1014
- };
1015
-
1016
- interface UuidOptions extends core.ValidateOptions {
1017
- // Can be 3, 4, 5, null
1018
- version?: string;
1019
- }
1020
- interface UuidLocalization extends core.Localization {
1021
- uuid: {
1022
- default: string,
1023
- version: string,
1024
- };
1025
- }
1026
- function uuid(): {
1027
- validate(input: core.ValidateInput<UuidOptions, UuidLocalization>): core.ValidateResult,
1028
- };
1029
-
1030
- interface VatOptions extends core.ValidateOptions {
1031
- // The ISO 3166-1 country code. It can be
1032
- // - A country code
1033
- // - A callback function that returns the country code
1034
- country: string | (() => string);
1035
- }
1036
- interface VatLocalization extends core.Localization {
1037
- vat: {
1038
- countries: {
1039
- [countryCode: string]: string,
1040
- },
1041
- country: string,
1042
- default: string,
1043
- };
1044
- }
1045
- function vat(): {
1046
- validate(input: core.ValidateInput<VatOptions, VatLocalization>): core.ValidateResult,
1047
- };
1048
-
1049
- function vin(): {
1050
- validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
1051
- };
1052
-
1053
- interface ZipCodeOptions extends core.ValidateOptions {
1054
- // The ISO 3166-1 country code. It can be
1055
- // - A country code
1056
- // - A callback function that returns the country code
1057
- country: string | (() => string);
1058
- }
1059
- interface ZipCodeLocalization extends core.Localization {
1060
- zipCode: {
1061
- countries: {
1062
- [countryCode: string]: string,
1063
- },
1064
- country: string,
1065
- default: string,
1066
- };
1067
- }
1068
- function zipCode(): {
1069
- validate(input: core.ValidateInput<ZipCodeOptions, ZipCodeLocalization>): core.ValidateResult,
1070
- };
1071
- }
1072
- }
1
+ /**
2
+ * FormValidation (https://formvalidation.io)
3
+ * The best validation library for JavaScript
4
+ * (c) 2013 - 2021 Nguyen Huu Phuoc <me@phuoc.ng>
5
+ */
6
+
7
+ // This should be used with FormValidation UMD package
8
+ declare namespace FormValidation {
9
+ // Core
10
+ // ----
11
+
12
+ namespace core {
13
+ interface ValidatorOptions {
14
+ enabled?: boolean;
15
+ message?: string;
16
+ [option: string]: unknown;
17
+ }
18
+ interface FieldOptions {
19
+ selector?: string;
20
+ validators: {
21
+ [validatorName: string]: ValidatorOptions,
22
+ };
23
+ }
24
+ interface FieldsOptions {
25
+ [field: string]: FieldOptions;
26
+ }
27
+ interface Localization {
28
+ [validator: string]: {
29
+ default?: string,
30
+ };
31
+ }
32
+ interface LocalizationMessage {
33
+ [locale: string]: string;
34
+ }
35
+ type LocalizationMessageType = LocalizationMessage | string;
36
+ interface ValidateOptions {
37
+ message?: string;
38
+ }
39
+ interface ValidateInput<T extends ValidateOptions, L extends Localization> {
40
+ element?: HTMLElement;
41
+ elements?: HTMLElement[];
42
+ field?: string;
43
+ options?: T;
44
+ l10n?: L;
45
+ value: string;
46
+ }
47
+ interface ValidateResult {
48
+ message?: LocalizationMessageType;
49
+ meta?: unknown;
50
+ valid: boolean;
51
+ }
52
+
53
+ interface ValidateFunctionInterface<K extends ValidateOptions, T> {
54
+ validate(input: ValidateInput<K, Localization>): T;
55
+ }
56
+ type ValidateFunction<K extends ValidateOptions> = ValidateFunctionInterface<K, ValidateResult | Promise<ValidateResult>>;
57
+
58
+ class Core {
59
+ constructor(form: HTMLElement, fields?: FieldsOptions);
60
+
61
+ on(event: string, func: (...arg: unknown[]) => unknown): Core;
62
+ off(event: string, func: (...arg: unknown[]) => unknown): Core;
63
+ emit(event: string, ...args: unknown[]): Core;
64
+
65
+ registerPlugin(name: string, plugin: Plugin<unknown>): Core;
66
+ deregisterPlugin(name: string): Core;
67
+
68
+ registerValidator(name: string, func: () => ValidateFunction<ValidateOptions>): Core;
69
+ registerValidator<K extends ValidateOptions>(name: string, func: () => ValidateFunction<K>): Core;
70
+ registerFilter(name: string, func: (...arg: unknown[]) => unknown): Core;
71
+ deregisterFilter(name: string, func: (...arg: unknown[]) => unknown): Core;
72
+ executeFilter<T>(name: string, defaultValue: T, args: unknown[]): T;
73
+
74
+ addField(field: string, options?: FieldOptions): Core;
75
+ removeField(field: string): Core;
76
+
77
+ revalidateField(field: string): Promise<string>;
78
+ validate(): Promise<string>;
79
+ validateField(field: string): Promise<string>;
80
+ validateElement(field: string, ele: HTMLElement): Promise<string>;
81
+ executeValidator(field: string, ele: HTMLElement, v: string, opts: ValidatorOptions): Promise<string>;
82
+
83
+ getElementValue(field: string, ele: HTMLElement, validator?: string): string;
84
+ getElements(field: string): HTMLElement[];
85
+ getFields(): FieldsOptions;
86
+ getFormElement(): HTMLElement;
87
+ getLocale(): string;
88
+ getPlugin(name: string): Plugin<unknown>;
89
+
90
+ updateFieldStatus(field: string, status: string, validator?: string): Core;
91
+ updateElementStatus(field: string, ele: HTMLElement, status: string, validator?: string): Core;
92
+
93
+ resetForm(reset?: boolean): Core;
94
+ resetField(field: string, reset?: boolean): Core;
95
+
96
+ disableValidator(field: string, validator?: string): Core;
97
+ enableValidator(field: string, validator?: string): Core;
98
+ updateValidatorOption(field: string, validator: string, name: string, value: unknown): Core;
99
+ setFieldOptions(field: string, options: FieldOptions): Core;
100
+
101
+ destroy(): Core;
102
+
103
+ setLocale(locale: string, localization: Localization): Core;
104
+ }
105
+
106
+ class Plugin<T> {
107
+ constructor(opts?: T);
108
+ setCore(core: core.Core): Plugin<T>;
109
+ install(): void;
110
+ uninstall(): void;
111
+ }
112
+ }
113
+
114
+ type Plugin<T> = core.Plugin<T>;
115
+
116
+ // Algorithms
117
+ // ----------
118
+
119
+ namespace algorithms {
120
+ function luhn(value: string): boolean;
121
+ function mod11And10(value: string): boolean;
122
+ function mod37And36(value: string, alphabet?: string): boolean;
123
+ function verhoeff(value: number[]): boolean;
124
+ }
125
+
126
+ // formValidation
127
+ // --------------
128
+
129
+ interface Options {
130
+ fields?: core.FieldsOptions;
131
+ locale?: string;
132
+ localization?: core.Localization;
133
+ plugins?: {
134
+ [name: string]: core.Plugin<unknown>,
135
+ };
136
+ init?(core: core.Core): void;
137
+ }
138
+ function formValidation(form: HTMLElement, options?: Options): core.Core;
139
+
140
+ // Locales
141
+ // -------
142
+
143
+ let locales: {};
144
+
145
+ // Plugins
146
+ // -------
147
+ namespace plugins {
148
+ interface AliasOptions {
149
+ // Map the alias with defined validator name
150
+ [alias: string]: string;
151
+ }
152
+ class Alias extends core.Plugin<AliasOptions> {
153
+ constructor(opts?: AliasOptions);
154
+ }
155
+
156
+ class Aria extends core.Plugin<{}> {
157
+ constructor();
158
+ }
159
+
160
+ interface AutoFocusOptions {
161
+ onPrefocus: (AutoFocusPrefocusEvent) => void;
162
+ }
163
+ interface AutoFocusPrefocusEvent {
164
+ field: string;
165
+ firstElement: HTMLElement;
166
+ }
167
+ class AutoFocus extends core.Plugin<AutoFocusOptions> {
168
+ constructor(opts?: AutoFocusOptions);
169
+ }
170
+
171
+ interface DeclarativeOptions {
172
+ // Set it to `true` to enable the validators automatically based on the input type or particular HTML 5 attributes:
173
+ // -----------------+---------------------
174
+ // HTML 5 attribute | Equivalent validator
175
+ // -----------------+---------------------
176
+ // max="..." | lessThan
177
+ // min="..." | greaterThan
178
+ // maxlength="..." | stringLength
179
+ // minlength="..." | stringLength
180
+ // pattern="..." | regexp
181
+ // required | notEmpty
182
+ // type="color" | color
183
+ // type="email" | emailAddress
184
+ // type="range" | between
185
+ // type="url" | uri
186
+ // -----------------+---------------------
187
+ // It's not enabled by default
188
+ html5Input?: boolean;
189
+ // The prefix of plugin declaration attributes. By default, it is set to `data-fvp-`
190
+ pluginPrefix?: string;
191
+ // The prefix of attributes. By default, it is set to `data-fv-`
192
+ prefix?: string;
193
+ }
194
+ class Declarative extends core.Plugin<DeclarativeOptions> {
195
+ constructor(opts?: DeclarativeOptions);
196
+ }
197
+
198
+ class DefaultSubmit extends core.Plugin<{}> {
199
+ constructor();
200
+ }
201
+
202
+ interface DependencyOptions {
203
+ [field: string]: string;
204
+ }
205
+ class Dependency extends core.Plugin<DependencyOptions> {
206
+ constructor(opts: DependencyOptions);
207
+ }
208
+
209
+ type ExcludedCallback = (field: string, element: HTMLElement, elements: HTMLElement[]) => boolean;
210
+ interface ExcludedOptions {
211
+ excluded: ExcludedCallback;
212
+ }
213
+ class Excluded extends core.Plugin<ExcludedOptions> {
214
+ constructor(opts?: ExcludedOptions);
215
+ }
216
+
217
+ interface FieldStatusOptions {
218
+ onStatusChanged?: (areFieldsValid: boolean) => void;
219
+ }
220
+ class FieldStatus extends core.Plugin<FieldStatusOptions> {
221
+ constructor(opts?: FieldStatusOptions);
222
+ }
223
+
224
+ interface IconOptions {
225
+ invalid?: string;
226
+ valid?: string;
227
+ validating?: string;
228
+ onPlaced?: (IconPlacedEvent) => void;
229
+ onSet?: (IconSetEvent) => void;
230
+ }
231
+ interface IconPlacedEvent {
232
+ element: HTMLElement;
233
+ field: string;
234
+ iconElement: HTMLElement;
235
+ classes: IconOptions;
236
+ }
237
+ interface IconSetEvent {
238
+ element: HTMLElement;
239
+ field: string;
240
+ status: string;
241
+ iconElement: HTMLElement;
242
+ }
243
+ class Icon extends core.Plugin<IconOptions> {
244
+ constructor(opts?: IconOptions);
245
+ }
246
+
247
+ interface InternationalTelephoneInputOptions {
248
+ autoPlaceholder?: string;
249
+ field: string | string[];
250
+ message: string;
251
+ utilsScript?: string;
252
+ }
253
+ class InternationalTelephoneInput extends core.Plugin<InternationalTelephoneInputOptions> {
254
+ constructor(opts?: InternationalTelephoneInputOptions);
255
+ static INT_TEL_VALIDATOR: string;
256
+ }
257
+
258
+ interface LiteralMessage {
259
+ [locale: string]: string;
260
+ }
261
+ type CallbackMessage = (field: string, validator: string) => LiteralMessage;
262
+ interface L10nOptions {
263
+ [field: string]: {
264
+ [validator: string]: LiteralMessage | CallbackMessage,
265
+ };
266
+ }
267
+ class L10n extends core.Plugin<L10nOptions> {
268
+ constructor(opts?: L10nOptions);
269
+ }
270
+
271
+ interface MailgunOptions {
272
+ // The API key provided by Mailgun
273
+ apiKey: string;
274
+ // The field name that will be validated
275
+ field: string;
276
+ // Error message indicates the input is not valid
277
+ message: string;
278
+ // Show suggestion if the email is not valid
279
+ suggestion?: boolean;
280
+ }
281
+ class Mailgun extends core.Plugin<MailgunOptions> {
282
+ constructor(opts?: MailgunOptions);
283
+ }
284
+
285
+ interface MandatoryIconOptions {
286
+ icon: string;
287
+ }
288
+ class MandatoryIcon extends core.Plugin<MandatoryIconOptions> {
289
+ constructor(opts?: MandatoryIconOptions);
290
+ }
291
+
292
+ interface PasswordStrengthOptions {
293
+ field: string;
294
+ message: string;
295
+ minimalScore: number;
296
+ onValidated?: (valid: boolean, message: string, score: number) => void;
297
+ }
298
+ class PasswordStrength extends core.Plugin<PasswordStrengthOptions> {
299
+ constructor(opts?: PasswordStrengthOptions);
300
+ static PASSWORD_STRENGTH_VALIDATOR: string;
301
+ }
302
+
303
+ type ContainerCallback = (field: string, element: HTMLElement) => HTMLElement;
304
+ interface MessageOptions {
305
+ clazz?: string;
306
+ container?: string | ContainerCallback;
307
+ }
308
+ class Message extends core.Plugin<MessageOptions> {
309
+ constructor(opts?: MessageOptions);
310
+ static getClosestContainer(element: HTMLElement, upper: HTMLElement, pattern: RegExp): HTMLElement;
311
+ }
312
+
313
+ interface RecaptchaOptions {
314
+ // The ID of element showing the captcha
315
+ element: string;
316
+ // The language code defined by reCAPTCHA
317
+ // See https://developers.google.com/recaptcha/docs/language
318
+ language?: string;
319
+ // The invalid message that will be shown in case the captcha is not valid
320
+ // You don't need to define it if the back-end URL above returns the message
321
+ message: string;
322
+ // The site key provided by Google
323
+ siteKey: string;
324
+ backendVerificationUrl?: string;
325
+
326
+ // The size of widget. It can be 'compact', 'normal' (default), or 'invisible'
327
+ size?: string;
328
+
329
+ // reCAPTCHA widget option (size can be 'compact' or 'normal')
330
+ // See https://developers.google.com/recaptcha/docs/display
331
+
332
+ // The theme name provided by Google. It can be light (default), dark
333
+ theme?: string;
334
+
335
+ // Invisible reCAPTCHA
336
+ // See https://developers.google.com/recaptcha/docs/invisible
337
+ // The position of reCAPTCHA. Can be 'bottomright' (default), 'bottomleft', 'inline'
338
+ badge?: string;
339
+ }
340
+ class Recaptcha extends core.Plugin<RecaptchaOptions> {
341
+ constructor(opts?: RecaptchaOptions);
342
+ static CAPTCHA_FIELD: string;
343
+ }
344
+
345
+ interface Recaptcha3Options {
346
+ // The ID of element showing the captcha error
347
+ element: string;
348
+ // The language code defined by reCAPTCHA
349
+ // See https://developers.google.com/recaptcha/docs/language
350
+ language?: string;
351
+ // Minimum score, between 0 and 1
352
+ minimumScore?: number;
353
+ // The invalid message that will be shown in case the captcha is not valid
354
+ // You don't need to define it if the back-end URL above returns the message
355
+ message: string;
356
+ // The site key provided by Google
357
+ siteKey: string;
358
+ backendVerificationUrl: string;
359
+ action: string;
360
+ }
361
+ class Recaptcha3 extends core.Plugin<Recaptcha3Options> {
362
+ constructor(opts?: Recaptcha3Options);
363
+ static CAPTCHA_FIELD: string;
364
+ }
365
+
366
+ interface Recaptcha3TokenOptions {
367
+ action: string;
368
+ hiddenTokenName: string;
369
+ language?: string;
370
+ siteKey: string;
371
+ }
372
+ class Recaptcha3Token extends core.Plugin<Recaptcha3TokenOptions> {
373
+ constructor(opts?: Recaptcha3TokenOptions);
374
+ }
375
+
376
+ interface SequenceOptions {
377
+ enabled: boolean | { [field: string]: boolean };
378
+ }
379
+ class Sequence extends core.Plugin<SequenceOptions> {
380
+ constructor(opts?: SequenceOptions);
381
+ }
382
+
383
+ interface StartEndDateOptions {
384
+ format: string;
385
+ startDate: {
386
+ field: string;
387
+ message: string;
388
+ };
389
+ endDate: {
390
+ field: string;
391
+ message: string;
392
+ };
393
+ }
394
+ class StartEndDate extends core.Plugin<StartEndDateOptions> {
395
+ constructor(opts?: StartEndDateOptions);
396
+ }
397
+
398
+ interface SubmitButtonOptions {
399
+ aspNetButton?: boolean;
400
+ // Allow to query the submit button(s)
401
+ // It's useful in case the submit button is outside of form
402
+ buttons?: (form: HTMLFormElement) => Element[];
403
+ }
404
+ class SubmitButton extends core.Plugin<SubmitButtonOptions> {
405
+ constructor(opts?: SubmitButtonOptions);
406
+ }
407
+
408
+ interface TooltipOptions {
409
+ placement: string;
410
+ trigger: string;
411
+ }
412
+ class Tooltip extends core.Plugin<TooltipOptions> {
413
+ constructor(opts?: TooltipOptions);
414
+ }
415
+
416
+ interface TransformerOptions {
417
+ [field: string]: {
418
+ [validator: string]: (field: string, element: HTMLElement, validator: string) => string,
419
+ };
420
+ }
421
+ class Transformer extends core.Plugin<TransformerOptions> {
422
+ constructor(opts?: TransformerOptions);
423
+ }
424
+
425
+ interface TriggerOptions {
426
+ delay?: number | {
427
+ [field: string]: number,
428
+ };
429
+ event: string | {
430
+ [field: string]: boolean | string,
431
+ };
432
+ // Only perform the validation if the field value exceed this number of characters
433
+ threshold?: number | {
434
+ [field: string]: number,
435
+ };
436
+ }
437
+ class Trigger extends core.Plugin<TriggerOptions> {
438
+ constructor(opts?: TriggerOptions);
439
+ }
440
+
441
+ interface WizardOptions {
442
+ stepSelector: string;
443
+ prevButton: string;
444
+ nextButton: string;
445
+ onStepActive?: (WizardStepEvent) => void;
446
+ onStepInvalid?: (WizardStepEvent) => void;
447
+ onStepValid?: (WizardStepEvent) => void;
448
+ onValid?: (WizardValidEvent) => void;
449
+ activeStepClass?: string;
450
+ isFieldExcluded?: (field: string, element: HTMLElement, elements: HTMLElement[]) => boolean;
451
+ isStepSkipped?:(WizardIsStepSkipped) => boolean;
452
+ stepClass?: string;
453
+ }
454
+ interface WizardStepEvent {
455
+ step: number;
456
+ numSteps: number;
457
+ }
458
+ interface WizardValidEvent {
459
+ numSteps: number;
460
+ }
461
+ interface WizardIsStepSkipped {
462
+ currentStep: number;
463
+ numSteps: number;
464
+ targetStep: number;
465
+ }
466
+ class Wizard extends core.Plugin<WizardOptions> {
467
+ constructor(opts?: WizardOptions);
468
+ static EXCLUDED_PLUGIN: string;
469
+ }
470
+
471
+ // Plugins that supports popular CSS frameworks
472
+
473
+ type RowSelector = (field: string, element: HTMLElement) => string;
474
+ interface FrameworkOptions {
475
+ defaultMessageContainer?: boolean;
476
+ formClass: string;
477
+ messageClass?: string;
478
+ rowInvalidClass: string;
479
+ // A list of CSS classes (separated by a space) that will be added to the row
480
+ rowClasses?: string;
481
+ rowPattern: RegExp;
482
+ rowSelector: string | RowSelector;
483
+ rowValidatingClass?: string;
484
+ rowValidClass: string;
485
+ // A CSS class added to valid element
486
+ eleValidClass?: string;
487
+ // A CSS class added to invalid element
488
+ eleInvalidClass?: string;
489
+ }
490
+ class Framework extends core.Plugin<FrameworkOptions> {
491
+ constructor(opts?: FrameworkOptions);
492
+ }
493
+
494
+ class Bootstrap extends plugins.Framework {
495
+ constructor(opts?: plugins.FrameworkOptions);
496
+ }
497
+ class Bootstrap3 extends plugins.Framework {
498
+ constructor(opts?: plugins.FrameworkOptions);
499
+ }
500
+ class Bootstrap5 extends plugins.Framework {
501
+ constructor(opts?: plugins.FrameworkOptions);
502
+ }
503
+ class Bulma extends plugins.Framework {
504
+ constructor(opts?: plugins.FrameworkOptions);
505
+ }
506
+ class Foundation extends plugins.Framework {
507
+ constructor(opts?: plugins.FrameworkOptions);
508
+ }
509
+ class Materialize extends plugins.Framework {
510
+ constructor(opts?: plugins.FrameworkOptions);
511
+ }
512
+ class Milligram extends plugins.Framework {
513
+ constructor(opts?: plugins.FrameworkOptions);
514
+ }
515
+ class Mini extends plugins.Framework {
516
+ constructor(opts?: plugins.FrameworkOptions);
517
+ }
518
+ class Mui extends plugins.Framework {
519
+ constructor(opts?: plugins.FrameworkOptions);
520
+ }
521
+ class Pure extends plugins.Framework {
522
+ constructor(opts?: plugins.FrameworkOptions);
523
+ }
524
+ class Semantic extends plugins.Framework {
525
+ constructor(opts?: plugins.FrameworkOptions);
526
+ }
527
+ class Shoelace extends plugins.Framework {
528
+ constructor(opts?: plugins.FrameworkOptions);
529
+ }
530
+ class Spectre extends plugins.Framework {
531
+ constructor(opts?: plugins.FrameworkOptions);
532
+ }
533
+ class Tachyons extends plugins.Framework {
534
+ constructor(opts?: plugins.FrameworkOptions);
535
+ }
536
+ class Turret extends plugins.Framework {
537
+ constructor(opts?: plugins.FrameworkOptions);
538
+ }
539
+ class Uikit extends plugins.Framework {
540
+ constructor(opts?: plugins.FrameworkOptions);
541
+ }
542
+ }
543
+
544
+ // Utils
545
+ // -----
546
+ namespace utils {
547
+ function call(functionName: ((...arg: unknown[]) => unknown) | string, args: unknown[]): unknown;
548
+ function classSet(element: HTMLElement, classes: { [clazz: string]: boolean }): void;
549
+ function closest(element: HTMLElement, selector: string): HTMLElement;
550
+
551
+ interface FetchOptions {
552
+ // Does it request to other domain? Default value is `false`
553
+ crossDomain?: boolean;
554
+ // Additional headers
555
+ headers?: {
556
+ [name: string]: string,
557
+ };
558
+ // The request method. For example, `GET` (default), `POST`
559
+ method?: string;
560
+ params: {
561
+ [name: string]: unknown,
562
+ };
563
+ }
564
+ function fetch(url: string, options: FetchOptions): Promise<unknown>;
565
+
566
+ function format(message: string, parameters: string | string[]): string;
567
+ function hasClass(element: HTMLElement, clazz: string): boolean;
568
+ function isValidDate(year: number, month: number, day: number, notInFuture?: boolean): boolean;
569
+ }
570
+
571
+ // Validators
572
+ // ----------
573
+ namespace validators {
574
+ function base64(): {
575
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
576
+ };
577
+
578
+ interface BetweenOptions extends core.ValidateOptions {
579
+ // Default is true
580
+ inclusive: boolean;
581
+ max?: number;
582
+ min?: number;
583
+ }
584
+ interface BetweenLocalization extends core.Localization {
585
+ between: {
586
+ default: string,
587
+ notInclusive: string,
588
+ };
589
+ }
590
+ function between(): {
591
+ validate(input: core.ValidateInput<BetweenOptions, BetweenLocalization>): core.ValidateResult,
592
+ };
593
+
594
+ function bic(): {
595
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
596
+ };
597
+ function blank(): {
598
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
599
+ };
600
+
601
+ interface CallbackOptions extends core.ValidateOptions {
602
+ callback: ((...arg: unknown[]) => unknown) | string;
603
+ }
604
+ function callback(): {
605
+ validate(input: core.ValidateInput<CallbackOptions, core.Localization>): core.ValidateResult,
606
+ };
607
+
608
+ interface ChoiceOptions extends core.ValidateOptions {
609
+ max?: number;
610
+ min?: number;
611
+ }
612
+ interface ChoiceLocalization extends core.Localization {
613
+ choice: {
614
+ between: string,
615
+ default: string,
616
+ less: string,
617
+ more: string,
618
+ };
619
+ }
620
+ function choice(): {
621
+ validate(input: core.ValidateInput<ChoiceOptions, ChoiceLocalization>): core.ValidateResult,
622
+ };
623
+
624
+ interface ColorOptions extends core.ValidateOptions {
625
+ // The array of valid color types
626
+ // For example: 'hex', 'hex rgb', ['hex', 'rgb']
627
+ type: string | string[];
628
+ }
629
+ function color(): {
630
+ validate(input: core.ValidateInput<ColorOptions, core.Localization>): core.ValidateResult,
631
+ };
632
+
633
+ function creditCard(): {
634
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
635
+ };
636
+ function cusip(): {
637
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
638
+ };
639
+
640
+ type CompareDateCallback = () => (string | Date);
641
+ interface DateOptions extends core.ValidateOptions {
642
+ // The date format. Default is MM/DD/YYYY
643
+ // The format can be:
644
+ // - date: Consist of DD, MM, YYYY parts which are separated by the separator option
645
+ // - date and time: The time can consist of h, m, s parts which are separated by :
646
+ // - date, time and A (indicating AM or PM)
647
+ format: string;
648
+ // The maximum date
649
+ max?: string | Date | CompareDateCallback;
650
+ // The minimum date
651
+ min?: string | Date | CompareDateCallback;
652
+ // Use to separate the date, month, and year. By default, it is /
653
+ separator?: string;
654
+ }
655
+ interface DateLocalization extends core.Localization {
656
+ date: {
657
+ default: string,
658
+ max: string,
659
+ min: string,
660
+ range: string,
661
+ };
662
+ }
663
+ function date(): {
664
+ validate(input: core.ValidateInput<DateOptions, DateLocalization>): core.ValidateResult,
665
+ };
666
+
667
+ type CompareDifferentCallback = () => string;
668
+ interface DifferentOptions extends core.ValidateOptions {
669
+ compare: string | CompareDifferentCallback;
670
+ }
671
+ function different(): {
672
+ validate(input: core.ValidateInput<DifferentOptions, core.Localization>): core.ValidateResult,
673
+ };
674
+
675
+ function digits(): {
676
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
677
+ };
678
+ function ean(): {
679
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
680
+ };
681
+ function ein(): {
682
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
683
+ };
684
+
685
+ interface EmailAddressOptions extends core.ValidateOptions {
686
+ // Allow multiple email addresses, separated by a comma or semicolon; default is false.
687
+ multiple?: boolean | string;
688
+ // Regex for character or characters expected as separator between addresses
689
+ // default is comma /[,;]/, i.e. comma or semicolon.
690
+ separator?: string | RegExp;
691
+ }
692
+ function emailAddress(): {
693
+ validate(input: core.ValidateInput<EmailAddressOptions, core.Localization>): core.ValidateResult,
694
+ };
695
+
696
+ interface FileOptions extends core.ValidateOptions {
697
+ // The allowed extensions, separated by a comma
698
+ extension: string;
699
+ // The maximum number of files
700
+ maxFiles: number;
701
+ // The maximum size in bytes
702
+ maxSize: number;
703
+ // The maximum size in bytes for all files
704
+ maxTotalSize: number;
705
+ // The minimum number of files
706
+ minFiles: number;
707
+ // The minimum size in bytes
708
+ minSize: number;
709
+ // The minimum size in bytes for all files
710
+ minTotalSize: number;
711
+ // The allowed MIME type, separated by a comma
712
+ type: string;
713
+ }
714
+ function file(): {
715
+ validate(input: core.ValidateInput<FileOptions, core.Localization>): core.ValidateResult,
716
+ };
717
+
718
+ interface GreaterThanOptions extends core.ValidateOptions {
719
+ // Default is true
720
+ inclusive: boolean;
721
+ message: string;
722
+ min?: number;
723
+ }
724
+ interface GreaterThanLocalization extends core.Localization {
725
+ greaterThan: {
726
+ default: string,
727
+ notInclusive: string,
728
+ };
729
+ }
730
+ function greaterThan(): {
731
+ validate(input: core.ValidateInput<GreaterThanOptions, GreaterThanLocalization>): core.ValidateResult,
732
+ };
733
+
734
+ function grid(): {
735
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
736
+ };
737
+ function hex(): {
738
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
739
+ };
740
+
741
+ interface IbanOptions extends core.ValidateOptions {
742
+ // The ISO 3166-1 country code. It can be
743
+ // - A country code
744
+ // - Name of field which its value defines the country code
745
+ // - Name of callback function that returns the country code
746
+ // - A callback function that returns the country code
747
+ country?: string;
748
+ // Set it to true (false) to indicate that the IBAN number must be (not be) from SEPA countries
749
+ sepa?: boolean | string;
750
+ }
751
+ interface IbanLocalization extends core.Localization {
752
+ iban: {
753
+ countries: {
754
+ [countryCode: string]: string,
755
+ },
756
+ country: string,
757
+ default: string,
758
+ };
759
+ }
760
+ function iban(): {
761
+ validate(input: core.ValidateInput<IbanOptions, IbanLocalization>): core.ValidateResult,
762
+ };
763
+
764
+ interface IdOptions extends core.ValidateOptions {
765
+ // The ISO 3166-1 country code. It can be
766
+ // - A country code
767
+ // - A callback function that returns the country code
768
+ country: string | (() => string);
769
+ }
770
+ interface IdLocalization extends core.Localization {
771
+ id: {
772
+ countries: {
773
+ [countryCode: string]: string,
774
+ },
775
+ country: string,
776
+ default: string,
777
+ };
778
+ }
779
+ function id(): {
780
+ validate(input: core.ValidateInput<IdOptions, IdLocalization>): core.ValidateResult,
781
+ };
782
+
783
+ type CompareIdenticalCallback = () => string;
784
+ interface IdenticalOptions extends core.ValidateOptions {
785
+ compare: string | CompareIdenticalCallback;
786
+ }
787
+ function identical(): {
788
+ validate(input: core.ValidateInput<IdenticalOptions, core.Localization>): core.ValidateResult,
789
+ };
790
+
791
+ function imei(): {
792
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
793
+ };
794
+ function imo(): {
795
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
796
+ };
797
+
798
+ interface IntegerOptions extends core.ValidateOptions {
799
+ // The decimal separator. It's '.' by default
800
+ decimalSeparator: string;
801
+ // The thousands separator. It's empty by default
802
+ thousandsSeparator: string;
803
+ }
804
+ function integer(): {
805
+ validate(input: core.ValidateInput<IntegerOptions, core.Localization>): core.ValidateResult,
806
+ };
807
+
808
+ interface IpOptions extends core.ValidateOptions {
809
+ // Enable IPv4 validator, default to true
810
+ ipv4?: boolean;
811
+ // Enable IPv6 validator, default to true
812
+ ipv6?: boolean;
813
+ }
814
+ interface IpLocalization extends core.Localization {
815
+ ip: {
816
+ default: string,
817
+ ipv4: string,
818
+ ipv6: string,
819
+ };
820
+ }
821
+ function ip(): {
822
+ validate(input: core.ValidateInput<IpOptions, IpLocalization>): core.ValidateResult,
823
+ };
824
+
825
+ function isbn(): {
826
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
827
+ };
828
+ function isin(): {
829
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
830
+ };
831
+ function ismn(): {
832
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
833
+ };
834
+ function issn(): {
835
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
836
+ };
837
+
838
+ interface LessThanOptions extends core.ValidateOptions {
839
+ // Default is true
840
+ inclusive: boolean;
841
+ max?: number;
842
+ }
843
+ interface LessThanLocalization extends core.Localization {
844
+ lessThan: {
845
+ default: string,
846
+ notInclusive: string,
847
+ };
848
+ }
849
+ function lessThan(): {
850
+ validate(input: core.ValidateInput<LessThanOptions, LessThanLocalization>): core.ValidateResult,
851
+ };
852
+
853
+ function mac(): {
854
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
855
+ };
856
+ function meid(): {
857
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
858
+ };
859
+
860
+ interface NotEmptyOptions extends core.ValidateOptions {
861
+ trim?: boolean;
862
+ }
863
+ function notEmpty(): {
864
+ validate(input: core.ValidateInput<NotEmptyOptions, core.Localization>): core.ValidateResult,
865
+ };
866
+
867
+ interface NumericOptions extends core.ValidateOptions {
868
+ // The decimal separator. It's '.' by default
869
+ decimalSeparator: string;
870
+ // The thousands separator. It's empty by default
871
+ thousandsSeparator: string;
872
+ }
873
+ function numeric(): {
874
+ validate(input: core.ValidateInput<NumericOptions, core.Localization>): core.ValidateResult,
875
+ };
876
+
877
+ interface PhoneOptions extends core.ValidateOptions {
878
+ // The ISO 3166-1 country code. It can be
879
+ // - A country code
880
+ // - A callback function that returns the country code
881
+ country: string | (() => string);
882
+ }
883
+ interface PhoneLocalization extends core.Localization {
884
+ phone: {
885
+ countries: {
886
+ [countryCode: string]: string,
887
+ },
888
+ country: string,
889
+ default: string,
890
+ };
891
+ }
892
+ function phone(): {
893
+ validate(input: core.ValidateInput<PhoneOptions, PhoneLocalization>): core.ValidateResult,
894
+ };
895
+
896
+ interface PromiseOptions extends core.ValidateOptions {
897
+ promise: (...arg: unknown[]) => unknown | string;
898
+ }
899
+ function promise(): {
900
+ validate(input: core.ValidateInput<PromiseOptions, core.Localization>): core.ValidateResult,
901
+ };
902
+
903
+ interface RegexpOptions extends core.ValidateOptions {
904
+ // If specified, flags can have any combination of JavaScript regular expression flags such as:
905
+ // g: global match
906
+ // i: ignore case
907
+ // m: multiple line
908
+ flags?: string;
909
+ // The regular expression you need to check
910
+ regexp: string | RegExp;
911
+ }
912
+ function regexp(): {
913
+ validate(input: core.ValidateInput<RegexpOptions, core.Localization>): core.ValidateResult,
914
+ };
915
+
916
+ interface RemoteOptions extends core.ValidateOptions {
917
+ url: string;
918
+ // Does it request to other domain? Default value is `false`
919
+ crossDomain?: boolean;
920
+ // By default, it will take the value `{ <fieldName>: <fieldValue> }`
921
+ data?: Record<string, unknown> | ((...arg: unknown[]) => unknown);
922
+ // Additional headers
923
+ headers?: {
924
+ [name: string]: string,
925
+ };
926
+ // Override the field name for the request
927
+ name?: string;
928
+ // Can be GET or POST (default)
929
+ method?: string;
930
+ // The valid key. It's `valid` by default
931
+ // This is useful when connecting to external remote server or APIs provided by 3rd parties
932
+ validKey?: string;
933
+ }
934
+ function remote(): {
935
+ validate(input: core.ValidateInput<RemoteOptions, core.Localization>): core.ValidateResult,
936
+ };
937
+
938
+ function rtn(): {
939
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
940
+ };
941
+ function sedol(): {
942
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
943
+ };
944
+ function siren(): {
945
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
946
+ };
947
+ function siret(): {
948
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
949
+ };
950
+
951
+ interface StepOptions extends core.ValidateOptions {
952
+ baseValue: number;
953
+ step: number;
954
+ }
955
+ interface StepLocalization extends core.Localization {
956
+ step: {
957
+ default: string,
958
+ };
959
+ }
960
+ function step(): {
961
+ validate(input: core.ValidateInput<StepOptions, StepLocalization>): core.ValidateResult,
962
+ };
963
+
964
+ interface StringCaseOptions extends core.ValidateOptions {
965
+ // Can be 'lower' (default) or 'upper'
966
+ case: string;
967
+ }
968
+ interface StringCaseLocalization extends core.Localization {
969
+ stringCase: {
970
+ default: string,
971
+ upper: string,
972
+ };
973
+ }
974
+ function stringCase(): {
975
+ validate(input: core.ValidateInput<StringCaseOptions, StringCaseLocalization>): core.ValidateResult,
976
+ };
977
+
978
+ interface StringLengthOptions extends core.ValidateOptions {
979
+ // At least one of two options is required
980
+ // The min, max keys define the number which the field value compares to. min, max can be
981
+ // - A number
982
+ // - Name of field which its value defines the number
983
+ // - Name of callback function that returns the number
984
+ // - A callback function that returns the number
985
+ max?: number | string;
986
+ min?: number | string;
987
+ // Indicate the length will be calculated after trimming the value or not. It is false, by default
988
+ trim?: boolean | string;
989
+ // Evaluate string length in UTF-8 bytes, default to false
990
+ utf8Bytes?: boolean | string;
991
+ }
992
+ interface StringLengthLocalization extends core.Localization {
993
+ stringLength: {
994
+ between: string,
995
+ default: string,
996
+ less: string,
997
+ more: string,
998
+ };
999
+ }
1000
+ function stringLength(): {
1001
+ validate(input: core.ValidateInput<StringLengthOptions, StringLengthLocalization>): core.ValidateResult,
1002
+ };
1003
+
1004
+ interface UriOptions extends core.ValidateOptions {
1005
+ // Allow the URI without protocol. Default to false
1006
+ allowEmptyProtocol?: boolean | string;
1007
+ // Allow the private and local network IP. Default to false
1008
+ allowLocal?: boolean | string;
1009
+ // The protocols, separated by a comma. Default to "http, https, ftp"
1010
+ protocol?: string;
1011
+ }
1012
+ function uri(): {
1013
+ validate(input: core.ValidateInput<UriOptions, core.Localization>): core.ValidateResult,
1014
+ };
1015
+
1016
+ interface UuidOptions extends core.ValidateOptions {
1017
+ // Can be 3, 4, 5, null
1018
+ version?: string;
1019
+ }
1020
+ interface UuidLocalization extends core.Localization {
1021
+ uuid: {
1022
+ default: string,
1023
+ version: string,
1024
+ };
1025
+ }
1026
+ function uuid(): {
1027
+ validate(input: core.ValidateInput<UuidOptions, UuidLocalization>): core.ValidateResult,
1028
+ };
1029
+
1030
+ interface VatOptions extends core.ValidateOptions {
1031
+ // The ISO 3166-1 country code. It can be
1032
+ // - A country code
1033
+ // - A callback function that returns the country code
1034
+ country: string | (() => string);
1035
+ }
1036
+ interface VatLocalization extends core.Localization {
1037
+ vat: {
1038
+ countries: {
1039
+ [countryCode: string]: string,
1040
+ },
1041
+ country: string,
1042
+ default: string,
1043
+ };
1044
+ }
1045
+ function vat(): {
1046
+ validate(input: core.ValidateInput<VatOptions, VatLocalization>): core.ValidateResult,
1047
+ };
1048
+
1049
+ function vin(): {
1050
+ validate(input: core.ValidateInput<core.ValidateOptions, core.Localization>): core.ValidateResult,
1051
+ };
1052
+
1053
+ interface ZipCodeOptions extends core.ValidateOptions {
1054
+ // The ISO 3166-1 country code. It can be
1055
+ // - A country code
1056
+ // - A callback function that returns the country code
1057
+ country: string | (() => string);
1058
+ }
1059
+ interface ZipCodeLocalization extends core.Localization {
1060
+ zipCode: {
1061
+ countries: {
1062
+ [countryCode: string]: string,
1063
+ },
1064
+ country: string,
1065
+ default: string,
1066
+ };
1067
+ }
1068
+ function zipCode(): {
1069
+ validate(input: core.ValidateInput<ZipCodeOptions, ZipCodeLocalization>): core.ValidateResult,
1070
+ };
1071
+ }
1072
+ }