@zanichelli/albe-web-components 5.5.1 → 5.5.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 (705) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/{index-438f76bc.js → index-3dd0f9bd.js} +10 -0
  3. package/dist/cjs/index.cjs.js +14 -2
  4. package/dist/cjs/loader.cjs.js +2 -18
  5. package/dist/cjs/{utils-69e42a14.js → utils-29f9ccf5.js} +4 -26
  6. package/dist/cjs/{utils-8cc414c9.js → utils-4a419726.js} +1 -1
  7. package/dist/cjs/web-components-library.cjs.js +4 -116
  8. package/dist/cjs/z-alert.cjs.entry.js +1 -1
  9. package/dist/cjs/z-app-header.cjs.entry.js +1 -1
  10. package/dist/cjs/{z-range-picker.cjs.entry.js → z-app-switcher_9.cjs.entry.js} +443 -14
  11. package/dist/cjs/z-aria-alert.cjs.entry.js +2 -2
  12. package/dist/cjs/z-avatar.cjs.entry.js +2 -2
  13. package/dist/cjs/z-button-deprecated.cjs.entry.js +4 -4
  14. package/dist/cjs/z-button-filter.cjs.entry.js +1 -1
  15. package/dist/cjs/z-button-sort.cjs.entry.js +1 -1
  16. package/dist/cjs/z-button.cjs.entry.js +2 -2
  17. package/dist/cjs/z-candybar.cjs.entry.js +1 -1
  18. package/dist/cjs/z-card.cjs.entry.js +2 -2
  19. package/dist/cjs/z-carousel.cjs.entry.js +1 -1
  20. package/dist/cjs/z-chip-deprecated.cjs.entry.js +1 -1
  21. package/dist/cjs/z-chip.cjs.entry.js +5 -5
  22. package/dist/cjs/z-combobox.cjs.entry.js +4 -4
  23. package/dist/cjs/z-contextual-menu.cjs.entry.js +2 -2
  24. package/dist/cjs/z-cookiebar.cjs.entry.js +2 -2
  25. package/dist/cjs/z-cover-hero.cjs.entry.js +39 -0
  26. package/dist/cjs/z-date-picker.cjs.entry.js +8 -14
  27. package/dist/cjs/z-file-upload.cjs.entry.js +26 -12
  28. package/dist/cjs/z-file.cjs.entry.js +4 -4
  29. package/dist/cjs/z-footer.cjs.entry.js +2 -2
  30. package/dist/cjs/z-ghost-loading.cjs.entry.js +1 -1
  31. package/dist/cjs/z-icon-package.cjs.entry.js +1 -1
  32. package/dist/cjs/z-info-box.cjs.entry.js +1 -1
  33. package/dist/cjs/z-info-reveal.cjs.entry.js +3 -3
  34. package/dist/cjs/z-input-deprecated.cjs.entry.js +3 -3
  35. package/dist/cjs/z-input-label_2.cjs.entry.js +2 -2
  36. package/dist/cjs/z-list-group.cjs.entry.js +2 -2
  37. package/dist/cjs/z-list_2.cjs.entry.js +1 -1
  38. package/dist/cjs/z-menu-dropdown_2.cjs.entry.js +2 -2
  39. package/dist/cjs/z-menu-section.cjs.entry.js +1 -1
  40. package/dist/cjs/z-menu.cjs.entry.js +1 -1
  41. package/dist/cjs/z-messages-pocket.cjs.entry.js +2 -2
  42. package/dist/cjs/z-modal-login.cjs.entry.js +2 -2
  43. package/dist/cjs/z-modal.cjs.entry.js +1 -1
  44. package/dist/cjs/z-myz-card-alert.cjs.entry.js +2 -2
  45. package/dist/cjs/z-myz-card-dictionary.cjs.entry.js +2 -2
  46. package/dist/cjs/z-myz-card-footer-sections.cjs.entry.js +1 -1
  47. package/dist/cjs/z-myz-card-footer.cjs.entry.js +2 -2
  48. package/dist/cjs/z-myz-card-icon.cjs.entry.js +1 -1
  49. package/dist/cjs/z-myz-card-info.cjs.entry.js +3 -3
  50. package/dist/cjs/z-myz-card-list.cjs.entry.js +1 -1
  51. package/dist/cjs/z-myz-card_4.cjs.entry.js +1 -1
  52. package/dist/cjs/z-myz-list-item.cjs.entry.js +3 -3
  53. package/dist/cjs/z-myz-topbar.cjs.entry.js +2 -2
  54. package/dist/cjs/z-navigation-tab-link.cjs.entry.js +2 -2
  55. package/dist/cjs/z-navigation-tab.cjs.entry.js +2 -2
  56. package/dist/cjs/z-navigation-tabs.cjs.entry.js +2 -2
  57. package/dist/cjs/z-notification.cjs.entry.js +1 -1
  58. package/dist/cjs/z-offcanvas.cjs.entry.js +2 -2
  59. package/dist/cjs/z-otp.cjs.entry.js +2 -2
  60. package/dist/cjs/z-pagination-bar.cjs.entry.js +5 -7
  61. package/dist/cjs/z-pagination-page.cjs.entry.js +1 -1
  62. package/dist/cjs/z-pagination.cjs.entry.js +1 -1
  63. package/dist/cjs/z-panel-elem.cjs.entry.js +1 -1
  64. package/dist/cjs/z-pocket-message.cjs.entry.js +1 -1
  65. package/dist/cjs/z-pocket_3.cjs.entry.js +2 -2
  66. package/dist/cjs/z-popover-deprecated.cjs.entry.js +5 -5
  67. package/dist/cjs/z-popover.cjs.entry.js +2 -2
  68. package/dist/cjs/z-section-title.cjs.entry.js +2 -2
  69. package/dist/cjs/z-skip-to-content.cjs.entry.js +3 -3
  70. package/dist/cjs/z-slideshow.cjs.entry.js +3 -3
  71. package/dist/cjs/z-status-tag.cjs.entry.js +4 -4
  72. package/dist/cjs/z-stepper-item.cjs.entry.js +1 -1
  73. package/dist/cjs/z-stepper.cjs.entry.js +1 -1
  74. package/dist/cjs/z-table-body.cjs.entry.js +1 -1
  75. package/dist/cjs/z-table-cell.cjs.entry.js +4 -4
  76. package/dist/cjs/z-table-empty-box.cjs.entry.js +3 -3
  77. package/dist/cjs/z-table-expanded-row.cjs.entry.js +1 -1
  78. package/dist/cjs/z-table-footer.cjs.entry.js +1 -1
  79. package/dist/cjs/z-table-head.cjs.entry.js +1 -1
  80. package/dist/cjs/z-table-header-row.cjs.entry.js +1 -1
  81. package/dist/cjs/z-table-header.cjs.entry.js +5 -5
  82. package/dist/cjs/z-table-row.cjs.entry.js +2 -2
  83. package/dist/cjs/z-table-sticky-footer.cjs.entry.js +1 -1
  84. package/dist/cjs/z-table.cjs.entry.js +2 -2
  85. package/dist/cjs/z-tag.cjs.entry.js +1 -1
  86. package/dist/cjs/z-toast-notification-list.cjs.entry.js +2 -2
  87. package/dist/cjs/z-toast-notification.cjs.entry.js +4 -4
  88. package/dist/cjs/z-toggle-button.cjs.entry.js +1 -1
  89. package/dist/cjs/z-toggle-switch.cjs.entry.js +3 -3
  90. package/dist/cjs/z-tooltip-deprecated.cjs.entry.js +2 -2
  91. package/dist/cjs/z-tooltip.cjs.entry.js +2 -2
  92. package/dist/cjs/z-user-dropdown.cjs.entry.js +1 -1
  93. package/dist/cjs/z-visually-hidden.cjs.entry.js +1 -1
  94. package/dist/collection/beans/index.js +10 -0
  95. package/dist/collection/collection-manifest.json +1 -0
  96. package/dist/collection/components/buttons/z-chip/index.js +1 -1
  97. package/dist/collection/components/buttons/z-chip/styles.css +2 -9
  98. package/dist/collection/components/file-upload/z-file/index.js +19 -3
  99. package/dist/collection/components/file-upload/z-file-upload/index.js +46 -11
  100. package/dist/collection/components/inputs/z-combobox/styles.css +1 -2
  101. package/dist/collection/components/z-cover-hero/index.js +103 -0
  102. package/dist/collection/components/z-cover-hero/styles.css +77 -0
  103. package/dist/collection/components/z-info-reveal/styles.css +5 -0
  104. package/dist/{web-components-library/index-3ee81524.js → esm/index-3c2d757b.js} +11 -1
  105. package/dist/esm/index.js +2 -2
  106. package/dist/esm/loader.js +2 -18
  107. package/dist/esm/{utils-5d5963ef.js → utils-57be09c8.js} +2 -2
  108. package/dist/esm/{utils-1e801ac0.js → utils-729724da.js} +4 -26
  109. package/dist/esm/web-components-library.js +4 -116
  110. package/dist/esm/z-alert.entry.js +1 -1
  111. package/dist/esm/z-app-header.entry.js +1 -1
  112. package/dist/{web-components-library/z-range-picker.entry.js → esm/z-app-switcher_9.entry.js} +426 -5
  113. package/dist/esm/z-aria-alert.entry.js +2 -2
  114. package/dist/esm/z-avatar.entry.js +2 -2
  115. package/dist/esm/z-button-deprecated.entry.js +4 -4
  116. package/dist/esm/z-button-filter.entry.js +1 -1
  117. package/dist/esm/z-button-sort.entry.js +1 -1
  118. package/dist/esm/z-button.entry.js +2 -2
  119. package/dist/esm/z-candybar.entry.js +1 -1
  120. package/dist/esm/z-card.entry.js +2 -2
  121. package/dist/esm/z-carousel.entry.js +1 -1
  122. package/dist/esm/z-chip-deprecated.entry.js +1 -1
  123. package/dist/esm/z-chip.entry.js +5 -5
  124. package/dist/esm/z-combobox.entry.js +4 -4
  125. package/dist/esm/z-contextual-menu.entry.js +2 -2
  126. package/dist/esm/z-cookiebar.entry.js +2 -2
  127. package/dist/esm/z-cover-hero.entry.js +35 -0
  128. package/dist/esm/z-date-picker.entry.js +8 -14
  129. package/dist/esm/z-file-upload.entry.js +26 -12
  130. package/dist/esm/z-file.entry.js +4 -4
  131. package/dist/esm/z-footer.entry.js +2 -2
  132. package/dist/esm/z-ghost-loading.entry.js +1 -1
  133. package/dist/esm/z-icon-package.entry.js +1 -1
  134. package/dist/esm/z-info-box.entry.js +1 -1
  135. package/dist/esm/z-info-reveal.entry.js +3 -3
  136. package/dist/esm/z-input-deprecated.entry.js +3 -3
  137. package/dist/esm/z-input-label_2.entry.js +2 -2
  138. package/dist/esm/z-list-group.entry.js +2 -2
  139. package/dist/esm/z-list_2.entry.js +1 -1
  140. package/dist/esm/z-menu-dropdown_2.entry.js +2 -2
  141. package/dist/esm/z-menu-section.entry.js +1 -1
  142. package/dist/esm/z-menu.entry.js +1 -1
  143. package/dist/esm/z-messages-pocket.entry.js +2 -2
  144. package/dist/esm/z-modal-login.entry.js +2 -2
  145. package/dist/esm/z-modal.entry.js +1 -1
  146. package/dist/esm/z-myz-card-alert.entry.js +2 -2
  147. package/dist/esm/z-myz-card-dictionary.entry.js +2 -2
  148. package/dist/esm/z-myz-card-footer-sections.entry.js +1 -1
  149. package/dist/esm/z-myz-card-footer.entry.js +2 -2
  150. package/dist/esm/z-myz-card-icon.entry.js +1 -1
  151. package/dist/esm/z-myz-card-info.entry.js +3 -3
  152. package/dist/esm/z-myz-card-list.entry.js +1 -1
  153. package/dist/esm/z-myz-card_4.entry.js +1 -1
  154. package/dist/esm/z-myz-list-item.entry.js +3 -3
  155. package/dist/esm/z-myz-topbar.entry.js +2 -2
  156. package/dist/esm/z-navigation-tab-link.entry.js +2 -2
  157. package/dist/esm/z-navigation-tab.entry.js +2 -2
  158. package/dist/esm/z-navigation-tabs.entry.js +2 -2
  159. package/dist/esm/z-notification.entry.js +1 -1
  160. package/dist/esm/z-offcanvas.entry.js +2 -2
  161. package/dist/esm/z-otp.entry.js +2 -2
  162. package/dist/esm/z-pagination-bar.entry.js +5 -7
  163. package/dist/esm/z-pagination-page.entry.js +1 -1
  164. package/dist/esm/z-pagination.entry.js +1 -1
  165. package/dist/esm/z-panel-elem.entry.js +1 -1
  166. package/dist/esm/z-pocket-message.entry.js +1 -1
  167. package/dist/esm/z-pocket_3.entry.js +2 -2
  168. package/dist/esm/z-popover-deprecated.entry.js +5 -5
  169. package/dist/esm/z-popover.entry.js +2 -2
  170. package/dist/esm/z-section-title.entry.js +2 -2
  171. package/dist/esm/z-skip-to-content.entry.js +3 -3
  172. package/dist/esm/z-slideshow.entry.js +3 -3
  173. package/dist/esm/z-status-tag.entry.js +4 -4
  174. package/dist/esm/z-stepper-item.entry.js +1 -1
  175. package/dist/esm/z-stepper.entry.js +1 -1
  176. package/dist/esm/z-table-body.entry.js +1 -1
  177. package/dist/esm/z-table-cell.entry.js +4 -4
  178. package/dist/esm/z-table-empty-box.entry.js +3 -3
  179. package/dist/esm/z-table-expanded-row.entry.js +1 -1
  180. package/dist/esm/z-table-footer.entry.js +1 -1
  181. package/dist/esm/z-table-head.entry.js +1 -1
  182. package/dist/esm/z-table-header-row.entry.js +1 -1
  183. package/dist/esm/z-table-header.entry.js +5 -5
  184. package/dist/esm/z-table-row.entry.js +2 -2
  185. package/dist/esm/z-table-sticky-footer.entry.js +1 -1
  186. package/dist/esm/z-table.entry.js +2 -2
  187. package/dist/esm/z-tag.entry.js +1 -1
  188. package/dist/esm/z-toast-notification-list.entry.js +2 -2
  189. package/dist/esm/z-toast-notification.entry.js +4 -4
  190. package/dist/esm/z-toggle-button.entry.js +1 -1
  191. package/dist/esm/z-toggle-switch.entry.js +3 -3
  192. package/dist/esm/z-tooltip-deprecated.entry.js +2 -2
  193. package/dist/esm/z-tooltip.entry.js +2 -2
  194. package/dist/esm/z-user-dropdown.entry.js +1 -1
  195. package/dist/esm/z-visually-hidden.entry.js +1 -1
  196. package/dist/types/beans/index.d.ts +8 -0
  197. package/dist/types/components/file-upload/z-file/index.d.ts +2 -0
  198. package/dist/types/components/file-upload/z-file-upload/index.d.ts +5 -3
  199. package/dist/types/components/z-cover-hero/index.d.ts +29 -0
  200. package/dist/types/components.d.ts +42 -1
  201. package/dist/web-components-library/index.esm.js +1 -9
  202. package/dist/web-components-library/{p-b15efba3.entry.js → p-02681c05.entry.js} +1 -1
  203. package/dist/web-components-library/{p-d33fea26.entry.js → p-03ef960c.entry.js} +1 -1
  204. package/dist/web-components-library/{p-69ef6ddc.entry.js → p-0aa9746a.entry.js} +1 -1
  205. package/dist/web-components-library/p-0ab1b40f.entry.js +1 -0
  206. package/dist/web-components-library/{p-63ccb013.entry.js → p-1196b959.entry.js} +1 -1
  207. package/dist/web-components-library/p-1906915c.entry.js +1 -0
  208. package/dist/web-components-library/{p-d97a2db9.entry.js → p-1c413074.entry.js} +1 -1
  209. package/dist/web-components-library/{p-1727c1c8.entry.js → p-1e6aff0f.entry.js} +1 -1
  210. package/dist/web-components-library/p-1ff7bde5.entry.js +1 -0
  211. package/dist/web-components-library/p-223566d6.entry.js +1 -0
  212. package/dist/web-components-library/{p-de25c7f0.entry.js → p-29e8a12c.entry.js} +1 -1
  213. package/{www/build/p-9074e1a5.entry.js → dist/web-components-library/p-46a6341a.entry.js} +1 -1
  214. package/dist/web-components-library/p-51130281.entry.js +1 -0
  215. package/dist/web-components-library/p-5789bbe7.entry.js +1 -0
  216. package/{www/build/p-7c6d4440.entry.js → dist/web-components-library/p-596da333.entry.js} +1 -1
  217. package/{www/build/p-0a0aee35.entry.js → dist/web-components-library/p-71034a6f.entry.js} +1 -1
  218. package/dist/web-components-library/p-710cec6d.entry.js +1 -0
  219. package/dist/web-components-library/p-7171717f.entry.js +1 -0
  220. package/dist/web-components-library/p-79408b00.entry.js +1 -0
  221. package/dist/web-components-library/p-7b054eb2.entry.js +1 -0
  222. package/dist/web-components-library/p-7d37e4a8.entry.js +16 -0
  223. package/{www/build/p-dffdf60a.entry.js → dist/web-components-library/p-8468d87e.entry.js} +1 -1
  224. package/dist/web-components-library/p-8cf3798f.entry.js +1 -0
  225. package/{www/build/p-43329b81.entry.js → dist/web-components-library/p-8e4d7f5d.entry.js} +1 -1
  226. package/dist/web-components-library/p-8f030e78.entry.js +1 -0
  227. package/dist/web-components-library/{p-ccdebe3f.entry.js → p-92cc171f.entry.js} +1 -1
  228. package/{www/build/p-5be162d5.entry.js → dist/web-components-library/p-953a07d5.entry.js} +1 -1
  229. package/dist/web-components-library/{p-0f17db30.entry.js → p-9fb79d74.entry.js} +1 -1
  230. package/{www/build/p-57d1acdc.entry.js → dist/web-components-library/p-a5232d04.entry.js} +1 -1
  231. package/dist/web-components-library/p-a54ef821.entry.js +1 -0
  232. package/{www/build/p-8fbc2ce9.entry.js → dist/web-components-library/p-a93d5b8c.entry.js} +1 -1
  233. package/dist/web-components-library/{p-51cdabeb.entry.js → p-a94f78b4.entry.js} +1 -1
  234. package/dist/web-components-library/p-ae784c71.entry.js +1 -0
  235. package/dist/web-components-library/{p-9f9e4266.entry.js → p-ae79ab08.entry.js} +1 -1
  236. package/{www/build/p-e2102da3.entry.js → dist/web-components-library/p-aed2a8cf.entry.js} +1 -1
  237. package/{www/build/p-3edbd35c.entry.js → dist/web-components-library/p-b543005a.entry.js} +1 -1
  238. package/dist/web-components-library/p-bb20020b.entry.js +1 -0
  239. package/dist/web-components-library/p-bbeb6b3c.entry.js +1 -0
  240. package/dist/web-components-library/p-bd772b8a.entry.js +1 -0
  241. package/dist/web-components-library/{p-b9da171f.js → p-bfa3593e.js} +1 -1
  242. package/{www/build/p-9a5ee6c2.entry.js → dist/web-components-library/p-c066ddf1.entry.js} +1 -1
  243. package/dist/web-components-library/{p-ba29bc12.entry.js → p-c6124ee4.entry.js} +1 -1
  244. package/dist/web-components-library/p-c730a93d.entry.js +1 -0
  245. package/dist/web-components-library/{p-fe927bf4.entry.js → p-c9348925.entry.js} +1 -1
  246. package/dist/web-components-library/{p-02ea7e49.entry.js → p-cc6a5872.entry.js} +1 -1
  247. package/dist/web-components-library/p-cf35d3cd.entry.js +1 -0
  248. package/dist/web-components-library/p-cf73af9a.entry.js +1 -0
  249. package/dist/web-components-library/{p-292bc0c4.entry.js → p-d0d75b41.entry.js} +1 -1
  250. package/dist/web-components-library/{p-0e256fdc.entry.js → p-d34eccf8.entry.js} +1 -1
  251. package/dist/web-components-library/p-d79f69f2.js +1 -0
  252. package/dist/web-components-library/p-e293f91e.entry.js +1 -0
  253. package/{www/build/p-55ddbfe9.entry.js → dist/web-components-library/p-e6ac4dc4.entry.js} +1 -1
  254. package/dist/web-components-library/{p-6c6b4e80.entry.js → p-e6ddee24.entry.js} +1 -1
  255. package/dist/web-components-library/p-ed05dc6b.entry.js +1 -0
  256. package/dist/web-components-library/p-f0d90cc2.entry.js +1 -0
  257. package/dist/web-components-library/p-f31b8e83.js +1 -0
  258. package/{www/build/p-df4e963b.entry.js → dist/web-components-library/p-f6da32c4.entry.js} +1 -1
  259. package/{www/build/p-bfe5693d.entry.js → dist/web-components-library/p-fd2338b2.entry.js} +1 -1
  260. package/{www/build/p-4af112a7.entry.js → dist/web-components-library/p-fea2c39a.entry.js} +1 -1
  261. package/dist/web-components-library/web-components-library.css +1 -812
  262. package/dist/web-components-library/web-components-library.esm.js +1 -129
  263. package/package.json +1 -1
  264. package/react/components.d.ts +5 -0
  265. package/react/components.js +8 -3
  266. package/react/components.js.map +1 -1
  267. package/readme.md +8 -0
  268. package/www/build/index.esm.js +1 -9
  269. package/www/build/{p-b15efba3.entry.js → p-02681c05.entry.js} +1 -1
  270. package/www/build/{p-d33fea26.entry.js → p-03ef960c.entry.js} +1 -1
  271. package/www/build/{p-69ef6ddc.entry.js → p-0aa9746a.entry.js} +1 -1
  272. package/www/build/p-0ab1b40f.entry.js +1 -0
  273. package/www/build/{p-63ccb013.entry.js → p-1196b959.entry.js} +1 -1
  274. package/www/build/p-1906915c.entry.js +1 -0
  275. package/www/build/{p-d97a2db9.entry.js → p-1c413074.entry.js} +1 -1
  276. package/www/build/{p-1727c1c8.entry.js → p-1e6aff0f.entry.js} +1 -1
  277. package/www/build/p-1ff7bde5.entry.js +1 -0
  278. package/www/build/p-223566d6.entry.js +1 -0
  279. package/www/build/{p-de25c7f0.entry.js → p-29e8a12c.entry.js} +1 -1
  280. package/www/build/p-36091078.js +1 -0
  281. package/{dist/web-components-library/p-9074e1a5.entry.js → www/build/p-46a6341a.entry.js} +1 -1
  282. package/www/build/{p-88b56b6e.css → p-4c9c83c0.css} +1 -1
  283. package/www/build/p-51130281.entry.js +1 -0
  284. package/www/build/p-5789bbe7.entry.js +1 -0
  285. package/{dist/web-components-library/p-7c6d4440.entry.js → www/build/p-596da333.entry.js} +1 -1
  286. package/{dist/web-components-library/p-0a0aee35.entry.js → www/build/p-71034a6f.entry.js} +1 -1
  287. package/www/build/p-710cec6d.entry.js +1 -0
  288. package/www/build/p-7171717f.entry.js +1 -0
  289. package/www/build/p-79408b00.entry.js +1 -0
  290. package/www/build/p-7b054eb2.entry.js +1 -0
  291. package/www/build/p-7d37e4a8.entry.js +16 -0
  292. package/{dist/web-components-library/p-dffdf60a.entry.js → www/build/p-8468d87e.entry.js} +1 -1
  293. package/www/build/p-8cf3798f.entry.js +1 -0
  294. package/{dist/web-components-library/p-43329b81.entry.js → www/build/p-8e4d7f5d.entry.js} +1 -1
  295. package/www/build/p-8f030e78.entry.js +1 -0
  296. package/www/build/{p-ccdebe3f.entry.js → p-92cc171f.entry.js} +1 -1
  297. package/{dist/web-components-library/p-5be162d5.entry.js → www/build/p-953a07d5.entry.js} +1 -1
  298. package/www/build/{p-0f17db30.entry.js → p-9fb79d74.entry.js} +1 -1
  299. package/{dist/web-components-library/p-57d1acdc.entry.js → www/build/p-a5232d04.entry.js} +1 -1
  300. package/www/build/p-a54ef821.entry.js +1 -0
  301. package/{dist/web-components-library/p-8fbc2ce9.entry.js → www/build/p-a93d5b8c.entry.js} +1 -1
  302. package/www/build/{p-51cdabeb.entry.js → p-a94f78b4.entry.js} +1 -1
  303. package/www/build/p-ae784c71.entry.js +1 -0
  304. package/www/build/{p-9f9e4266.entry.js → p-ae79ab08.entry.js} +1 -1
  305. package/{dist/web-components-library/p-e2102da3.entry.js → www/build/p-aed2a8cf.entry.js} +1 -1
  306. package/{dist/web-components-library/p-3edbd35c.entry.js → www/build/p-b543005a.entry.js} +1 -1
  307. package/www/build/p-bb20020b.entry.js +1 -0
  308. package/www/build/p-bbeb6b3c.entry.js +1 -0
  309. package/www/build/p-bd772b8a.entry.js +1 -0
  310. package/www/build/{p-b9da171f.js → p-bfa3593e.js} +1 -1
  311. package/{dist/web-components-library/p-9a5ee6c2.entry.js → www/build/p-c066ddf1.entry.js} +1 -1
  312. package/www/build/{p-ba29bc12.entry.js → p-c6124ee4.entry.js} +1 -1
  313. package/www/build/p-c730a93d.entry.js +1 -0
  314. package/www/build/{p-fe927bf4.entry.js → p-c9348925.entry.js} +1 -1
  315. package/www/build/{p-02ea7e49.entry.js → p-cc6a5872.entry.js} +1 -1
  316. package/www/build/p-cf35d3cd.entry.js +1 -0
  317. package/www/build/p-cf73af9a.entry.js +1 -0
  318. package/www/build/{p-292bc0c4.entry.js → p-d0d75b41.entry.js} +1 -1
  319. package/www/build/{p-0e256fdc.entry.js → p-d34eccf8.entry.js} +1 -1
  320. package/www/build/p-d79f69f2.js +1 -0
  321. package/www/build/p-e293f91e.entry.js +1 -0
  322. package/{dist/web-components-library/p-55ddbfe9.entry.js → www/build/p-e6ac4dc4.entry.js} +1 -1
  323. package/www/build/{p-6c6b4e80.entry.js → p-e6ddee24.entry.js} +1 -1
  324. package/www/build/p-ed05dc6b.entry.js +1 -0
  325. package/www/build/p-f0d90cc2.entry.js +1 -0
  326. package/www/build/p-f31b8e83.js +1 -0
  327. package/{dist/web-components-library/p-df4e963b.entry.js → www/build/p-f6da32c4.entry.js} +1 -1
  328. package/{dist/web-components-library/p-bfe5693d.entry.js → www/build/p-fd2338b2.entry.js} +1 -1
  329. package/{dist/web-components-library/p-4af112a7.entry.js → www/build/p-fea2c39a.entry.js} +1 -1
  330. package/www/build/web-components-library.css +1 -812
  331. package/www/build/web-components-library.esm.js +1 -129
  332. package/www/index.html +2 -11
  333. package/www/pages/file-upload.html +97 -54
  334. package/dist/cjs/_commonjsHelpers-10109b76.js +0 -48
  335. package/dist/cjs/app-globals-3a1e7e63.js +0 -5
  336. package/dist/cjs/css-shim-f1391d35.js +0 -6
  337. package/dist/cjs/dom-5345ed9a.js +0 -75
  338. package/dist/cjs/hammer-0741ba49.js +0 -2651
  339. package/dist/cjs/index-545547ad.js +0 -66
  340. package/dist/cjs/index-6b6a3299.js +0 -315
  341. package/dist/cjs/index-a8bdcb9c.js +0 -334
  342. package/dist/cjs/index-fcbe2d6e.js +0 -3093
  343. package/dist/cjs/shadow-css-42acdd0e.js +0 -390
  344. package/dist/cjs/utils-0a978fe0.js +0 -118
  345. package/dist/cjs/utils-56c20ead.js +0 -118
  346. package/dist/cjs/utils-aca0a0b6.js +0 -2742
  347. package/dist/cjs/z-app-switcher.cjs.entry.js +0 -29
  348. package/dist/cjs/z-app-switcher_11.cjs.entry.js +0 -377
  349. package/dist/cjs/z-app-topbar.cjs.entry.js +0 -41
  350. package/dist/cjs/z-body.cjs.entry.js +0 -17
  351. package/dist/cjs/z-divider.cjs.entry.js +0 -26
  352. package/dist/cjs/z-dragdrop-area.cjs.entry.js +0 -37
  353. package/dist/cjs/z-footer-link.cjs.entry.js +0 -19
  354. package/dist/cjs/z-footer-section.cjs.entry.js +0 -23
  355. package/dist/cjs/z-footer-social.cjs.entry.js +0 -19
  356. package/dist/cjs/z-heading.cjs.entry.js +0 -17
  357. package/dist/cjs/z-icon.cjs.entry.js +0 -28
  358. package/dist/cjs/z-input-label.cjs.entry.js +0 -21
  359. package/dist/cjs/z-input-message.cjs.entry.js +0 -24
  360. package/dist/cjs/z-input.cjs.entry.js +0 -235
  361. package/dist/cjs/z-input_2.cjs.entry.js +0 -228
  362. package/dist/cjs/z-link.cjs.entry.js +0 -71
  363. package/dist/cjs/z-list-element.cjs.entry.js +0 -154
  364. package/dist/cjs/z-list.cjs.entry.js +0 -34
  365. package/dist/cjs/z-logo.cjs.entry.js +0 -28
  366. package/dist/cjs/z-menu-dropdown.cjs.entry.js +0 -60
  367. package/dist/cjs/z-myz-card-body.cjs.entry.js +0 -19
  368. package/dist/cjs/z-myz-card-cover.cjs.entry.js +0 -22
  369. package/dist/cjs/z-myz-card-header.cjs.entry.js +0 -39
  370. package/dist/cjs/z-myz-card.cjs.entry.js +0 -43
  371. package/dist/cjs/z-myz-list.cjs.entry.js +0 -35
  372. package/dist/cjs/z-pocket-body.cjs.entry.js +0 -27
  373. package/dist/cjs/z-pocket-header.cjs.entry.js +0 -40
  374. package/dist/cjs/z-pocket.cjs.entry.js +0 -72
  375. package/dist/cjs/z-select.cjs.entry.js +0 -257
  376. package/dist/cjs/z-typography.cjs.entry.js +0 -29
  377. package/dist/collection/components/z-date-picker/index.js +0 -284
  378. package/dist/collection/components/z-date-picker/styles.css +0 -525
  379. package/dist/esm/_commonjsHelpers-8fe71198.js +0 -44
  380. package/dist/esm/app-globals-0f993ce5.js +0 -3
  381. package/dist/esm/css-shim-10e6e2ae.js +0 -4
  382. package/dist/esm/dom-7cd9cf71.js +0 -73
  383. package/dist/esm/hammer-782a2043.js +0 -2649
  384. package/dist/esm/index-3b53c63e.js +0 -334
  385. package/dist/esm/index-3ee81524.js +0 -334
  386. package/dist/esm/index-46ca649a.js +0 -315
  387. package/dist/esm/index-51f075dd.js +0 -64
  388. package/dist/esm/index-81176684.js +0 -3057
  389. package/dist/esm/shadow-css-38a1326b.js +0 -388
  390. package/dist/esm/utils-43f2cad8.js +0 -2736
  391. package/dist/esm/utils-a3134cfb.js +0 -109
  392. package/dist/esm/utils-e5940345.js +0 -109
  393. package/dist/esm/z-app-switcher.entry.js +0 -25
  394. package/dist/esm/z-app-switcher_11.entry.js +0 -363
  395. package/dist/esm/z-app-topbar.entry.js +0 -37
  396. package/dist/esm/z-body.entry.js +0 -13
  397. package/dist/esm/z-divider.entry.js +0 -22
  398. package/dist/esm/z-dragdrop-area.entry.js +0 -33
  399. package/dist/esm/z-footer-link.entry.js +0 -15
  400. package/dist/esm/z-footer-section.entry.js +0 -19
  401. package/dist/esm/z-footer-social.entry.js +0 -15
  402. package/dist/esm/z-heading.entry.js +0 -13
  403. package/dist/esm/z-icon.entry.js +0 -24
  404. package/dist/esm/z-input-label.entry.js +0 -17
  405. package/dist/esm/z-input-message.entry.js +0 -20
  406. package/dist/esm/z-input.entry.js +0 -231
  407. package/dist/esm/z-input_2.entry.js +0 -223
  408. package/dist/esm/z-link.entry.js +0 -67
  409. package/dist/esm/z-list-element.entry.js +0 -150
  410. package/dist/esm/z-list.entry.js +0 -30
  411. package/dist/esm/z-logo.entry.js +0 -24
  412. package/dist/esm/z-menu-dropdown.entry.js +0 -56
  413. package/dist/esm/z-myz-card-body.entry.js +0 -15
  414. package/dist/esm/z-myz-card-cover.entry.js +0 -18
  415. package/dist/esm/z-myz-card-header.entry.js +0 -35
  416. package/dist/esm/z-myz-card.entry.js +0 -39
  417. package/dist/esm/z-myz-list.entry.js +0 -31
  418. package/dist/esm/z-pocket-body.entry.js +0 -23
  419. package/dist/esm/z-pocket-header.entry.js +0 -36
  420. package/dist/esm/z-pocket.entry.js +0 -68
  421. package/dist/esm/z-range-picker.entry.js +0 -354
  422. package/dist/esm/z-select.entry.js +0 -253
  423. package/dist/esm/z-typography.entry.js +0 -25
  424. package/dist/types/components/z-date-picker/index.d.ts +0 -30
  425. package/dist/web-components-library/_commonjsHelpers-8fe71198.js +0 -44
  426. package/dist/web-components-library/app-globals-0f993ce5.js +0 -3
  427. package/dist/web-components-library/breakpoints-c386984e.js +0 -4
  428. package/dist/web-components-library/css-shim-10e6e2ae.js +0 -4
  429. package/dist/web-components-library/dom-7cd9cf71.js +0 -73
  430. package/dist/web-components-library/hammer-782a2043.js +0 -2649
  431. package/dist/web-components-library/icons-92a7dcde.js +0 -511
  432. package/dist/web-components-library/index-3b53c63e.js +0 -334
  433. package/dist/web-components-library/index-51f075dd.js +0 -64
  434. package/dist/web-components-library/index-81176684.js +0 -3057
  435. package/dist/web-components-library/p-0d29d851.entry.js +0 -1
  436. package/dist/web-components-library/p-0e408871.entry.js +0 -1
  437. package/dist/web-components-library/p-0ef6c549.entry.js +0 -1
  438. package/dist/web-components-library/p-1f73a6d8.entry.js +0 -1
  439. package/dist/web-components-library/p-20d62443.entry.js +0 -1
  440. package/dist/web-components-library/p-3c111c2a.entry.js +0 -1
  441. package/dist/web-components-library/p-562e2d52.entry.js +0 -1
  442. package/dist/web-components-library/p-5eacbfc7.entry.js +0 -1
  443. package/dist/web-components-library/p-6218514a.entry.js +0 -1
  444. package/dist/web-components-library/p-71accd8e.entry.js +0 -1
  445. package/dist/web-components-library/p-99d7ab2f.entry.js +0 -1
  446. package/dist/web-components-library/p-9f5d707a.js +0 -1
  447. package/dist/web-components-library/p-a8875b97.entry.js +0 -16
  448. package/dist/web-components-library/p-d39c0372.entry.js +0 -1
  449. package/dist/web-components-library/p-d995d9dc.entry.js +0 -1
  450. package/dist/web-components-library/p-e2431b92.entry.js +0 -1
  451. package/dist/web-components-library/p-edb8d2ab.entry.js +0 -1
  452. package/dist/web-components-library/shadow-css-38a1326b.js +0 -388
  453. package/dist/web-components-library/utils-1e801ac0.js +0 -2736
  454. package/dist/web-components-library/utils-43f2cad8.js +0 -2736
  455. package/dist/web-components-library/utils-a3134cfb.js +0 -109
  456. package/dist/web-components-library/utils-e5940345.js +0 -109
  457. package/dist/web-components-library/z-alert.entry.js +0 -15
  458. package/dist/web-components-library/z-app-header.entry.js +0 -127
  459. package/dist/web-components-library/z-app-switcher.entry.js +0 -25
  460. package/dist/web-components-library/z-app-topbar.entry.js +0 -37
  461. package/dist/web-components-library/z-aria-alert.entry.js +0 -14
  462. package/dist/web-components-library/z-avatar.entry.js +0 -39
  463. package/dist/web-components-library/z-body.entry.js +0 -13
  464. package/dist/web-components-library/z-button-deprecated.entry.js +0 -34
  465. package/dist/web-components-library/z-button-filter.entry.js +0 -45
  466. package/dist/web-components-library/z-button-sort.entry.js +0 -50
  467. package/dist/web-components-library/z-button.entry.js +0 -38
  468. package/dist/web-components-library/z-candybar.entry.js +0 -15
  469. package/dist/web-components-library/z-card.entry.js +0 -65
  470. package/dist/web-components-library/z-carousel.entry.js +0 -20
  471. package/dist/web-components-library/z-chip-deprecated.entry.js +0 -20
  472. package/dist/web-components-library/z-chip.entry.js +0 -33
  473. package/dist/web-components-library/z-combobox.entry.js +0 -166
  474. package/dist/web-components-library/z-contextual-menu.entry.js +0 -47
  475. package/dist/web-components-library/z-cookiebar.entry.js +0 -38
  476. package/dist/web-components-library/z-date-picker.entry.js +0 -484
  477. package/dist/web-components-library/z-divider.entry.js +0 -22
  478. package/dist/web-components-library/z-dragdrop-area.entry.js +0 -33
  479. package/dist/web-components-library/z-file-upload.entry.js +0 -168
  480. package/dist/web-components-library/z-file.entry.js +0 -44
  481. package/dist/web-components-library/z-footer-link.entry.js +0 -15
  482. package/dist/web-components-library/z-footer-section.entry.js +0 -19
  483. package/dist/web-components-library/z-footer-social.entry.js +0 -15
  484. package/dist/web-components-library/z-footer.entry.js +0 -103
  485. package/dist/web-components-library/z-ghost-loading.entry.js +0 -15
  486. package/dist/web-components-library/z-heading.entry.js +0 -13
  487. package/dist/web-components-library/z-icon-package.entry.js +0 -19
  488. package/dist/web-components-library/z-icon.entry.js +0 -24
  489. package/dist/web-components-library/z-info-box.entry.js +0 -21
  490. package/dist/web-components-library/z-info-reveal.entry.js +0 -60
  491. package/dist/web-components-library/z-input-deprecated.entry.js +0 -267
  492. package/dist/web-components-library/z-input-label.entry.js +0 -17
  493. package/dist/web-components-library/z-input-message.entry.js +0 -20
  494. package/dist/web-components-library/z-input.entry.js +0 -231
  495. package/dist/web-components-library/z-link.entry.js +0 -67
  496. package/dist/web-components-library/z-list-element.entry.js +0 -150
  497. package/dist/web-components-library/z-list-group.entry.js +0 -50
  498. package/dist/web-components-library/z-list.entry.js +0 -30
  499. package/dist/web-components-library/z-logo.entry.js +0 -24
  500. package/dist/web-components-library/z-menu-dropdown.entry.js +0 -56
  501. package/dist/web-components-library/z-menu-section.entry.js +0 -42
  502. package/dist/web-components-library/z-menu.entry.js +0 -106
  503. package/dist/web-components-library/z-messages-pocket.entry.js +0 -42
  504. package/dist/web-components-library/z-modal-login.entry.js +0 -78
  505. package/dist/web-components-library/z-modal.entry.js +0 -32
  506. package/dist/web-components-library/z-myz-card-alert.entry.js +0 -59
  507. package/dist/web-components-library/z-myz-card-body.entry.js +0 -15
  508. package/dist/web-components-library/z-myz-card-cover.entry.js +0 -18
  509. package/dist/web-components-library/z-myz-card-dictionary.entry.js +0 -32
  510. package/dist/web-components-library/z-myz-card-footer-sections.entry.js +0 -15
  511. package/dist/web-components-library/z-myz-card-footer.entry.js +0 -52
  512. package/dist/web-components-library/z-myz-card-header.entry.js +0 -35
  513. package/dist/web-components-library/z-myz-card-icon.entry.js +0 -17
  514. package/dist/web-components-library/z-myz-card-info.entry.js +0 -115
  515. package/dist/web-components-library/z-myz-card-list.entry.js +0 -33
  516. package/dist/web-components-library/z-myz-card.entry.js +0 -39
  517. package/dist/web-components-library/z-myz-list-item.entry.js +0 -33
  518. package/dist/web-components-library/z-myz-list.entry.js +0 -31
  519. package/dist/web-components-library/z-myz-topbar.entry.js +0 -190
  520. package/dist/web-components-library/z-navigation-tab-link.entry.js +0 -67
  521. package/dist/web-components-library/z-navigation-tab.entry.js +0 -69
  522. package/dist/web-components-library/z-navigation-tabs.entry.js +0 -122
  523. package/dist/web-components-library/z-notification.entry.js +0 -42
  524. package/dist/web-components-library/z-offcanvas.entry.js +0 -59
  525. package/dist/web-components-library/z-otp.entry.js +0 -37
  526. package/dist/web-components-library/z-pagination-bar.entry.js +0 -126
  527. package/dist/web-components-library/z-pagination-page.entry.js +0 -21
  528. package/dist/web-components-library/z-pagination.entry.js +0 -228
  529. package/dist/web-components-library/z-panel-elem.entry.js +0 -26
  530. package/dist/web-components-library/z-pocket-body.entry.js +0 -23
  531. package/dist/web-components-library/z-pocket-header.entry.js +0 -36
  532. package/dist/web-components-library/z-pocket-message.entry.js +0 -15
  533. package/dist/web-components-library/z-pocket.entry.js +0 -68
  534. package/dist/web-components-library/z-popover-deprecated.entry.js +0 -128
  535. package/dist/web-components-library/z-popover.entry.js +0 -332
  536. package/dist/web-components-library/z-section-title.entry.js +0 -38
  537. package/dist/web-components-library/z-select.entry.js +0 -253
  538. package/dist/web-components-library/z-skip-to-content.entry.js +0 -64
  539. package/dist/web-components-library/z-slideshow.entry.js +0 -108
  540. package/dist/web-components-library/z-status-tag.entry.js +0 -25
  541. package/dist/web-components-library/z-stepper-item.entry.js +0 -18
  542. package/dist/web-components-library/z-stepper.entry.js +0 -15
  543. package/dist/web-components-library/z-table-body.entry.js +0 -20
  544. package/dist/web-components-library/z-table-cell.entry.js +0 -32
  545. package/dist/web-components-library/z-table-empty-box.entry.js +0 -28
  546. package/dist/web-components-library/z-table-expanded-row.entry.js +0 -15
  547. package/dist/web-components-library/z-table-footer.entry.js +0 -19
  548. package/dist/web-components-library/z-table-head.entry.js +0 -19
  549. package/dist/web-components-library/z-table-header-row.entry.js +0 -18
  550. package/dist/web-components-library/z-table-header.entry.js +0 -81
  551. package/dist/web-components-library/z-table-row.entry.js +0 -39
  552. package/dist/web-components-library/z-table-sticky-footer.entry.js +0 -15
  553. package/dist/web-components-library/z-table.entry.js +0 -78
  554. package/dist/web-components-library/z-tag.entry.js +0 -18
  555. package/dist/web-components-library/z-toast-notification-list.entry.js +0 -52
  556. package/dist/web-components-library/z-toast-notification.entry.js +0 -199
  557. package/dist/web-components-library/z-toggle-button.entry.js +0 -32
  558. package/dist/web-components-library/z-toggle-switch.entry.js +0 -45
  559. package/dist/web-components-library/z-tooltip-deprecated.entry.js +0 -270
  560. package/dist/web-components-library/z-tooltip.entry.js +0 -27
  561. package/dist/web-components-library/z-typography.entry.js +0 -25
  562. package/dist/web-components-library/z-user-dropdown.entry.js +0 -91
  563. package/dist/web-components-library/z-visually-hidden.entry.js +0 -15
  564. package/www/build/_commonjsHelpers-8fe71198.js +0 -44
  565. package/www/build/app-globals-0f993ce5.js +0 -3
  566. package/www/build/breakpoints-c386984e.js +0 -4
  567. package/www/build/css-shim-10e6e2ae.js +0 -4
  568. package/www/build/dom-7cd9cf71.js +0 -73
  569. package/www/build/hammer-782a2043.js +0 -2649
  570. package/www/build/icons-92a7dcde.js +0 -511
  571. package/www/build/index-3b53c63e.js +0 -334
  572. package/www/build/index-3ee81524.js +0 -334
  573. package/www/build/index-51f075dd.js +0 -64
  574. package/www/build/index-81176684.js +0 -3057
  575. package/www/build/p-0d29d851.entry.js +0 -1
  576. package/www/build/p-0e408871.entry.js +0 -1
  577. package/www/build/p-0ef6c549.entry.js +0 -1
  578. package/www/build/p-1f73a6d8.entry.js +0 -1
  579. package/www/build/p-20d62443.entry.js +0 -1
  580. package/www/build/p-3c111c2a.entry.js +0 -1
  581. package/www/build/p-562e2d52.entry.js +0 -1
  582. package/www/build/p-5eacbfc7.entry.js +0 -1
  583. package/www/build/p-6218514a.entry.js +0 -1
  584. package/www/build/p-71accd8e.entry.js +0 -1
  585. package/www/build/p-7a92487a.js +0 -1
  586. package/www/build/p-99d7ab2f.entry.js +0 -1
  587. package/www/build/p-9f5d707a.js +0 -1
  588. package/www/build/p-a8875b97.entry.js +0 -16
  589. package/www/build/p-d39c0372.entry.js +0 -1
  590. package/www/build/p-d995d9dc.entry.js +0 -1
  591. package/www/build/p-e2431b92.entry.js +0 -1
  592. package/www/build/p-edb8d2ab.entry.js +0 -1
  593. package/www/build/shadow-css-38a1326b.js +0 -388
  594. package/www/build/utils-1e801ac0.js +0 -2736
  595. package/www/build/utils-43f2cad8.js +0 -2736
  596. package/www/build/utils-a3134cfb.js +0 -109
  597. package/www/build/utils-e5940345.js +0 -109
  598. package/www/build/z-alert.entry.js +0 -15
  599. package/www/build/z-app-header.entry.js +0 -127
  600. package/www/build/z-app-switcher.entry.js +0 -25
  601. package/www/build/z-app-topbar.entry.js +0 -37
  602. package/www/build/z-aria-alert.entry.js +0 -14
  603. package/www/build/z-avatar.entry.js +0 -39
  604. package/www/build/z-body.entry.js +0 -13
  605. package/www/build/z-button-deprecated.entry.js +0 -34
  606. package/www/build/z-button-filter.entry.js +0 -45
  607. package/www/build/z-button-sort.entry.js +0 -50
  608. package/www/build/z-button.entry.js +0 -38
  609. package/www/build/z-candybar.entry.js +0 -15
  610. package/www/build/z-card.entry.js +0 -65
  611. package/www/build/z-carousel.entry.js +0 -20
  612. package/www/build/z-chip-deprecated.entry.js +0 -20
  613. package/www/build/z-chip.entry.js +0 -33
  614. package/www/build/z-combobox.entry.js +0 -166
  615. package/www/build/z-contextual-menu.entry.js +0 -47
  616. package/www/build/z-cookiebar.entry.js +0 -38
  617. package/www/build/z-date-picker.entry.js +0 -484
  618. package/www/build/z-divider.entry.js +0 -22
  619. package/www/build/z-dragdrop-area.entry.js +0 -33
  620. package/www/build/z-file-upload.entry.js +0 -168
  621. package/www/build/z-file.entry.js +0 -44
  622. package/www/build/z-footer-link.entry.js +0 -15
  623. package/www/build/z-footer-section.entry.js +0 -19
  624. package/www/build/z-footer-social.entry.js +0 -15
  625. package/www/build/z-footer.entry.js +0 -103
  626. package/www/build/z-ghost-loading.entry.js +0 -15
  627. package/www/build/z-heading.entry.js +0 -13
  628. package/www/build/z-icon-package.entry.js +0 -19
  629. package/www/build/z-icon.entry.js +0 -24
  630. package/www/build/z-info-box.entry.js +0 -21
  631. package/www/build/z-info-reveal.entry.js +0 -60
  632. package/www/build/z-input-deprecated.entry.js +0 -267
  633. package/www/build/z-input-label.entry.js +0 -17
  634. package/www/build/z-input-message.entry.js +0 -20
  635. package/www/build/z-input.entry.js +0 -231
  636. package/www/build/z-link.entry.js +0 -67
  637. package/www/build/z-list-element.entry.js +0 -150
  638. package/www/build/z-list-group.entry.js +0 -50
  639. package/www/build/z-list.entry.js +0 -30
  640. package/www/build/z-logo.entry.js +0 -24
  641. package/www/build/z-menu-dropdown.entry.js +0 -56
  642. package/www/build/z-menu-section.entry.js +0 -42
  643. package/www/build/z-menu.entry.js +0 -106
  644. package/www/build/z-messages-pocket.entry.js +0 -42
  645. package/www/build/z-modal-login.entry.js +0 -78
  646. package/www/build/z-modal.entry.js +0 -32
  647. package/www/build/z-myz-card-alert.entry.js +0 -59
  648. package/www/build/z-myz-card-body.entry.js +0 -15
  649. package/www/build/z-myz-card-cover.entry.js +0 -18
  650. package/www/build/z-myz-card-dictionary.entry.js +0 -32
  651. package/www/build/z-myz-card-footer-sections.entry.js +0 -15
  652. package/www/build/z-myz-card-footer.entry.js +0 -52
  653. package/www/build/z-myz-card-header.entry.js +0 -35
  654. package/www/build/z-myz-card-icon.entry.js +0 -17
  655. package/www/build/z-myz-card-info.entry.js +0 -115
  656. package/www/build/z-myz-card-list.entry.js +0 -33
  657. package/www/build/z-myz-card.entry.js +0 -39
  658. package/www/build/z-myz-list-item.entry.js +0 -33
  659. package/www/build/z-myz-list.entry.js +0 -31
  660. package/www/build/z-myz-topbar.entry.js +0 -190
  661. package/www/build/z-navigation-tab-link.entry.js +0 -67
  662. package/www/build/z-navigation-tab.entry.js +0 -69
  663. package/www/build/z-navigation-tabs.entry.js +0 -122
  664. package/www/build/z-notification.entry.js +0 -42
  665. package/www/build/z-offcanvas.entry.js +0 -59
  666. package/www/build/z-otp.entry.js +0 -37
  667. package/www/build/z-pagination-bar.entry.js +0 -126
  668. package/www/build/z-pagination-page.entry.js +0 -21
  669. package/www/build/z-pagination.entry.js +0 -228
  670. package/www/build/z-panel-elem.entry.js +0 -26
  671. package/www/build/z-pocket-body.entry.js +0 -23
  672. package/www/build/z-pocket-header.entry.js +0 -36
  673. package/www/build/z-pocket-message.entry.js +0 -15
  674. package/www/build/z-pocket.entry.js +0 -68
  675. package/www/build/z-popover-deprecated.entry.js +0 -128
  676. package/www/build/z-popover.entry.js +0 -332
  677. package/www/build/z-range-picker.entry.js +0 -354
  678. package/www/build/z-section-title.entry.js +0 -38
  679. package/www/build/z-select.entry.js +0 -253
  680. package/www/build/z-skip-to-content.entry.js +0 -64
  681. package/www/build/z-slideshow.entry.js +0 -108
  682. package/www/build/z-status-tag.entry.js +0 -25
  683. package/www/build/z-stepper-item.entry.js +0 -18
  684. package/www/build/z-stepper.entry.js +0 -15
  685. package/www/build/z-table-body.entry.js +0 -20
  686. package/www/build/z-table-cell.entry.js +0 -32
  687. package/www/build/z-table-empty-box.entry.js +0 -28
  688. package/www/build/z-table-expanded-row.entry.js +0 -15
  689. package/www/build/z-table-footer.entry.js +0 -19
  690. package/www/build/z-table-head.entry.js +0 -19
  691. package/www/build/z-table-header-row.entry.js +0 -18
  692. package/www/build/z-table-header.entry.js +0 -81
  693. package/www/build/z-table-row.entry.js +0 -39
  694. package/www/build/z-table-sticky-footer.entry.js +0 -15
  695. package/www/build/z-table.entry.js +0 -78
  696. package/www/build/z-tag.entry.js +0 -18
  697. package/www/build/z-toast-notification-list.entry.js +0 -52
  698. package/www/build/z-toast-notification.entry.js +0 -199
  699. package/www/build/z-toggle-button.entry.js +0 -32
  700. package/www/build/z-toggle-switch.entry.js +0 -45
  701. package/www/build/z-tooltip-deprecated.entry.js +0 -270
  702. package/www/build/z-tooltip.entry.js +0 -27
  703. package/www/build/z-typography.entry.js +0 -25
  704. package/www/build/z-user-dropdown.entry.js +0 -91
  705. package/www/build/z-visually-hidden.entry.js +0 -15
@@ -1,2649 +0,0 @@
1
- import { c as createCommonjsModule } from './_commonjsHelpers-8fe71198.js';
2
-
3
- var hammer = createCommonjsModule(function (module) {
4
- /*! Hammer.JS - v2.0.7 - 2016-04-22
5
- * http://hammerjs.github.io/
6
- *
7
- * Copyright (c) 2016 Jorik Tangelder;
8
- * Licensed under the MIT license */
9
- (function(window, document, exportName, undefined$1) {
10
- 'use strict';
11
-
12
- var VENDOR_PREFIXES = ['', 'webkit', 'Moz', 'MS', 'ms', 'o'];
13
- var TEST_ELEMENT = document.createElement('div');
14
-
15
- var TYPE_FUNCTION = 'function';
16
-
17
- var round = Math.round;
18
- var abs = Math.abs;
19
- var now = Date.now;
20
-
21
- /**
22
- * set a timeout with a given scope
23
- * @param {Function} fn
24
- * @param {Number} timeout
25
- * @param {Object} context
26
- * @returns {number}
27
- */
28
- function setTimeoutContext(fn, timeout, context) {
29
- return setTimeout(bindFn(fn, context), timeout);
30
- }
31
-
32
- /**
33
- * if the argument is an array, we want to execute the fn on each entry
34
- * if it aint an array we don't want to do a thing.
35
- * this is used by all the methods that accept a single and array argument.
36
- * @param {*|Array} arg
37
- * @param {String} fn
38
- * @param {Object} [context]
39
- * @returns {Boolean}
40
- */
41
- function invokeArrayArg(arg, fn, context) {
42
- if (Array.isArray(arg)) {
43
- each(arg, context[fn], context);
44
- return true;
45
- }
46
- return false;
47
- }
48
-
49
- /**
50
- * walk objects and arrays
51
- * @param {Object} obj
52
- * @param {Function} iterator
53
- * @param {Object} context
54
- */
55
- function each(obj, iterator, context) {
56
- var i;
57
-
58
- if (!obj) {
59
- return;
60
- }
61
-
62
- if (obj.forEach) {
63
- obj.forEach(iterator, context);
64
- } else if (obj.length !== undefined$1) {
65
- i = 0;
66
- while (i < obj.length) {
67
- iterator.call(context, obj[i], i, obj);
68
- i++;
69
- }
70
- } else {
71
- for (i in obj) {
72
- obj.hasOwnProperty(i) && iterator.call(context, obj[i], i, obj);
73
- }
74
- }
75
- }
76
-
77
- /**
78
- * wrap a method with a deprecation warning and stack trace
79
- * @param {Function} method
80
- * @param {String} name
81
- * @param {String} message
82
- * @returns {Function} A new function wrapping the supplied method.
83
- */
84
- function deprecate(method, name, message) {
85
- var deprecationMessage = 'DEPRECATED METHOD: ' + name + '\n' + message + ' AT \n';
86
- return function() {
87
- var e = new Error('get-stack-trace');
88
- var stack = e && e.stack ? e.stack.replace(/^[^\(]+?[\n$]/gm, '')
89
- .replace(/^\s+at\s+/gm, '')
90
- .replace(/^Object.<anonymous>\s*\(/gm, '{anonymous}()@') : 'Unknown Stack Trace';
91
-
92
- var log = window.console && (window.console.warn || window.console.log);
93
- if (log) {
94
- log.call(window.console, deprecationMessage, stack);
95
- }
96
- return method.apply(this, arguments);
97
- };
98
- }
99
-
100
- /**
101
- * extend object.
102
- * means that properties in dest will be overwritten by the ones in src.
103
- * @param {Object} target
104
- * @param {...Object} objects_to_assign
105
- * @returns {Object} target
106
- */
107
- var assign;
108
- if (typeof Object.assign !== 'function') {
109
- assign = function assign(target) {
110
- if (target === undefined$1 || target === null) {
111
- throw new TypeError('Cannot convert undefined or null to object');
112
- }
113
-
114
- var output = Object(target);
115
- for (var index = 1; index < arguments.length; index++) {
116
- var source = arguments[index];
117
- if (source !== undefined$1 && source !== null) {
118
- for (var nextKey in source) {
119
- if (source.hasOwnProperty(nextKey)) {
120
- output[nextKey] = source[nextKey];
121
- }
122
- }
123
- }
124
- }
125
- return output;
126
- };
127
- } else {
128
- assign = Object.assign;
129
- }
130
-
131
- /**
132
- * extend object.
133
- * means that properties in dest will be overwritten by the ones in src.
134
- * @param {Object} dest
135
- * @param {Object} src
136
- * @param {Boolean} [merge=false]
137
- * @returns {Object} dest
138
- */
139
- var extend = deprecate(function extend(dest, src, merge) {
140
- var keys = Object.keys(src);
141
- var i = 0;
142
- while (i < keys.length) {
143
- if (!merge || (merge && dest[keys[i]] === undefined$1)) {
144
- dest[keys[i]] = src[keys[i]];
145
- }
146
- i++;
147
- }
148
- return dest;
149
- }, 'extend', 'Use `assign`.');
150
-
151
- /**
152
- * merge the values from src in the dest.
153
- * means that properties that exist in dest will not be overwritten by src
154
- * @param {Object} dest
155
- * @param {Object} src
156
- * @returns {Object} dest
157
- */
158
- var merge = deprecate(function merge(dest, src) {
159
- return extend(dest, src, true);
160
- }, 'merge', 'Use `assign`.');
161
-
162
- /**
163
- * simple class inheritance
164
- * @param {Function} child
165
- * @param {Function} base
166
- * @param {Object} [properties]
167
- */
168
- function inherit(child, base, properties) {
169
- var baseP = base.prototype,
170
- childP;
171
-
172
- childP = child.prototype = Object.create(baseP);
173
- childP.constructor = child;
174
- childP._super = baseP;
175
-
176
- if (properties) {
177
- assign(childP, properties);
178
- }
179
- }
180
-
181
- /**
182
- * simple function bind
183
- * @param {Function} fn
184
- * @param {Object} context
185
- * @returns {Function}
186
- */
187
- function bindFn(fn, context) {
188
- return function boundFn() {
189
- return fn.apply(context, arguments);
190
- };
191
- }
192
-
193
- /**
194
- * let a boolean value also be a function that must return a boolean
195
- * this first item in args will be used as the context
196
- * @param {Boolean|Function} val
197
- * @param {Array} [args]
198
- * @returns {Boolean}
199
- */
200
- function boolOrFn(val, args) {
201
- if (typeof val == TYPE_FUNCTION) {
202
- return val.apply(args ? args[0] || undefined$1 : undefined$1, args);
203
- }
204
- return val;
205
- }
206
-
207
- /**
208
- * use the val2 when val1 is undefined
209
- * @param {*} val1
210
- * @param {*} val2
211
- * @returns {*}
212
- */
213
- function ifUndefined(val1, val2) {
214
- return (val1 === undefined$1) ? val2 : val1;
215
- }
216
-
217
- /**
218
- * addEventListener with multiple events at once
219
- * @param {EventTarget} target
220
- * @param {String} types
221
- * @param {Function} handler
222
- */
223
- function addEventListeners(target, types, handler) {
224
- each(splitStr(types), function(type) {
225
- target.addEventListener(type, handler, false);
226
- });
227
- }
228
-
229
- /**
230
- * removeEventListener with multiple events at once
231
- * @param {EventTarget} target
232
- * @param {String} types
233
- * @param {Function} handler
234
- */
235
- function removeEventListeners(target, types, handler) {
236
- each(splitStr(types), function(type) {
237
- target.removeEventListener(type, handler, false);
238
- });
239
- }
240
-
241
- /**
242
- * find if a node is in the given parent
243
- * @method hasParent
244
- * @param {HTMLElement} node
245
- * @param {HTMLElement} parent
246
- * @return {Boolean} found
247
- */
248
- function hasParent(node, parent) {
249
- while (node) {
250
- if (node == parent) {
251
- return true;
252
- }
253
- node = node.parentNode;
254
- }
255
- return false;
256
- }
257
-
258
- /**
259
- * small indexOf wrapper
260
- * @param {String} str
261
- * @param {String} find
262
- * @returns {Boolean} found
263
- */
264
- function inStr(str, find) {
265
- return str.indexOf(find) > -1;
266
- }
267
-
268
- /**
269
- * split string on whitespace
270
- * @param {String} str
271
- * @returns {Array} words
272
- */
273
- function splitStr(str) {
274
- return str.trim().split(/\s+/g);
275
- }
276
-
277
- /**
278
- * find if a array contains the object using indexOf or a simple polyFill
279
- * @param {Array} src
280
- * @param {String} find
281
- * @param {String} [findByKey]
282
- * @return {Boolean|Number} false when not found, or the index
283
- */
284
- function inArray(src, find, findByKey) {
285
- if (src.indexOf && !findByKey) {
286
- return src.indexOf(find);
287
- } else {
288
- var i = 0;
289
- while (i < src.length) {
290
- if ((findByKey && src[i][findByKey] == find) || (!findByKey && src[i] === find)) {
291
- return i;
292
- }
293
- i++;
294
- }
295
- return -1;
296
- }
297
- }
298
-
299
- /**
300
- * convert array-like objects to real arrays
301
- * @param {Object} obj
302
- * @returns {Array}
303
- */
304
- function toArray(obj) {
305
- return Array.prototype.slice.call(obj, 0);
306
- }
307
-
308
- /**
309
- * unique array with objects based on a key (like 'id') or just by the array's value
310
- * @param {Array} src [{id:1},{id:2},{id:1}]
311
- * @param {String} [key]
312
- * @param {Boolean} [sort=False]
313
- * @returns {Array} [{id:1},{id:2}]
314
- */
315
- function uniqueArray(src, key, sort) {
316
- var results = [];
317
- var values = [];
318
- var i = 0;
319
-
320
- while (i < src.length) {
321
- var val = key ? src[i][key] : src[i];
322
- if (inArray(values, val) < 0) {
323
- results.push(src[i]);
324
- }
325
- values[i] = val;
326
- i++;
327
- }
328
-
329
- if (sort) {
330
- if (!key) {
331
- results = results.sort();
332
- } else {
333
- results = results.sort(function sortUniqueArray(a, b) {
334
- return a[key] > b[key];
335
- });
336
- }
337
- }
338
-
339
- return results;
340
- }
341
-
342
- /**
343
- * get the prefixed property
344
- * @param {Object} obj
345
- * @param {String} property
346
- * @returns {String|Undefined} prefixed
347
- */
348
- function prefixed(obj, property) {
349
- var prefix, prop;
350
- var camelProp = property[0].toUpperCase() + property.slice(1);
351
-
352
- var i = 0;
353
- while (i < VENDOR_PREFIXES.length) {
354
- prefix = VENDOR_PREFIXES[i];
355
- prop = (prefix) ? prefix + camelProp : property;
356
-
357
- if (prop in obj) {
358
- return prop;
359
- }
360
- i++;
361
- }
362
- return undefined$1;
363
- }
364
-
365
- /**
366
- * get a unique id
367
- * @returns {number} uniqueId
368
- */
369
- var _uniqueId = 1;
370
- function uniqueId() {
371
- return _uniqueId++;
372
- }
373
-
374
- /**
375
- * get the window object of an element
376
- * @param {HTMLElement} element
377
- * @returns {DocumentView|Window}
378
- */
379
- function getWindowForElement(element) {
380
- var doc = element.ownerDocument || element;
381
- return (doc.defaultView || doc.parentWindow || window);
382
- }
383
-
384
- var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i;
385
-
386
- var SUPPORT_TOUCH = ('ontouchstart' in window);
387
- var SUPPORT_POINTER_EVENTS = prefixed(window, 'PointerEvent') !== undefined$1;
388
- var SUPPORT_ONLY_TOUCH = SUPPORT_TOUCH && MOBILE_REGEX.test(navigator.userAgent);
389
-
390
- var INPUT_TYPE_TOUCH = 'touch';
391
- var INPUT_TYPE_PEN = 'pen';
392
- var INPUT_TYPE_MOUSE = 'mouse';
393
- var INPUT_TYPE_KINECT = 'kinect';
394
-
395
- var COMPUTE_INTERVAL = 25;
396
-
397
- var INPUT_START = 1;
398
- var INPUT_MOVE = 2;
399
- var INPUT_END = 4;
400
- var INPUT_CANCEL = 8;
401
-
402
- var DIRECTION_NONE = 1;
403
- var DIRECTION_LEFT = 2;
404
- var DIRECTION_RIGHT = 4;
405
- var DIRECTION_UP = 8;
406
- var DIRECTION_DOWN = 16;
407
-
408
- var DIRECTION_HORIZONTAL = DIRECTION_LEFT | DIRECTION_RIGHT;
409
- var DIRECTION_VERTICAL = DIRECTION_UP | DIRECTION_DOWN;
410
- var DIRECTION_ALL = DIRECTION_HORIZONTAL | DIRECTION_VERTICAL;
411
-
412
- var PROPS_XY = ['x', 'y'];
413
- var PROPS_CLIENT_XY = ['clientX', 'clientY'];
414
-
415
- /**
416
- * create new input type manager
417
- * @param {Manager} manager
418
- * @param {Function} callback
419
- * @returns {Input}
420
- * @constructor
421
- */
422
- function Input(manager, callback) {
423
- var self = this;
424
- this.manager = manager;
425
- this.callback = callback;
426
- this.element = manager.element;
427
- this.target = manager.options.inputTarget;
428
-
429
- // smaller wrapper around the handler, for the scope and the enabled state of the manager,
430
- // so when disabled the input events are completely bypassed.
431
- this.domHandler = function(ev) {
432
- if (boolOrFn(manager.options.enable, [manager])) {
433
- self.handler(ev);
434
- }
435
- };
436
-
437
- this.init();
438
-
439
- }
440
-
441
- Input.prototype = {
442
- /**
443
- * should handle the inputEvent data and trigger the callback
444
- * @virtual
445
- */
446
- handler: function() { },
447
-
448
- /**
449
- * bind the events
450
- */
451
- init: function() {
452
- this.evEl && addEventListeners(this.element, this.evEl, this.domHandler);
453
- this.evTarget && addEventListeners(this.target, this.evTarget, this.domHandler);
454
- this.evWin && addEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
455
- },
456
-
457
- /**
458
- * unbind the events
459
- */
460
- destroy: function() {
461
- this.evEl && removeEventListeners(this.element, this.evEl, this.domHandler);
462
- this.evTarget && removeEventListeners(this.target, this.evTarget, this.domHandler);
463
- this.evWin && removeEventListeners(getWindowForElement(this.element), this.evWin, this.domHandler);
464
- }
465
- };
466
-
467
- /**
468
- * create new input type manager
469
- * called by the Manager constructor
470
- * @param {Hammer} manager
471
- * @returns {Input}
472
- */
473
- function createInputInstance(manager) {
474
- var Type;
475
- var inputClass = manager.options.inputClass;
476
-
477
- if (inputClass) {
478
- Type = inputClass;
479
- } else if (SUPPORT_POINTER_EVENTS) {
480
- Type = PointerEventInput;
481
- } else if (SUPPORT_ONLY_TOUCH) {
482
- Type = TouchInput;
483
- } else if (!SUPPORT_TOUCH) {
484
- Type = MouseInput;
485
- } else {
486
- Type = TouchMouseInput;
487
- }
488
- return new (Type)(manager, inputHandler);
489
- }
490
-
491
- /**
492
- * handle input events
493
- * @param {Manager} manager
494
- * @param {String} eventType
495
- * @param {Object} input
496
- */
497
- function inputHandler(manager, eventType, input) {
498
- var pointersLen = input.pointers.length;
499
- var changedPointersLen = input.changedPointers.length;
500
- var isFirst = (eventType & INPUT_START && (pointersLen - changedPointersLen === 0));
501
- var isFinal = (eventType & (INPUT_END | INPUT_CANCEL) && (pointersLen - changedPointersLen === 0));
502
-
503
- input.isFirst = !!isFirst;
504
- input.isFinal = !!isFinal;
505
-
506
- if (isFirst) {
507
- manager.session = {};
508
- }
509
-
510
- // source event is the normalized value of the domEvents
511
- // like 'touchstart, mouseup, pointerdown'
512
- input.eventType = eventType;
513
-
514
- // compute scale, rotation etc
515
- computeInputData(manager, input);
516
-
517
- // emit secret event
518
- manager.emit('hammer.input', input);
519
-
520
- manager.recognize(input);
521
- manager.session.prevInput = input;
522
- }
523
-
524
- /**
525
- * extend the data with some usable properties like scale, rotate, velocity etc
526
- * @param {Object} manager
527
- * @param {Object} input
528
- */
529
- function computeInputData(manager, input) {
530
- var session = manager.session;
531
- var pointers = input.pointers;
532
- var pointersLength = pointers.length;
533
-
534
- // store the first input to calculate the distance and direction
535
- if (!session.firstInput) {
536
- session.firstInput = simpleCloneInputData(input);
537
- }
538
-
539
- // to compute scale and rotation we need to store the multiple touches
540
- if (pointersLength > 1 && !session.firstMultiple) {
541
- session.firstMultiple = simpleCloneInputData(input);
542
- } else if (pointersLength === 1) {
543
- session.firstMultiple = false;
544
- }
545
-
546
- var firstInput = session.firstInput;
547
- var firstMultiple = session.firstMultiple;
548
- var offsetCenter = firstMultiple ? firstMultiple.center : firstInput.center;
549
-
550
- var center = input.center = getCenter(pointers);
551
- input.timeStamp = now();
552
- input.deltaTime = input.timeStamp - firstInput.timeStamp;
553
-
554
- input.angle = getAngle(offsetCenter, center);
555
- input.distance = getDistance(offsetCenter, center);
556
-
557
- computeDeltaXY(session, input);
558
- input.offsetDirection = getDirection(input.deltaX, input.deltaY);
559
-
560
- var overallVelocity = getVelocity(input.deltaTime, input.deltaX, input.deltaY);
561
- input.overallVelocityX = overallVelocity.x;
562
- input.overallVelocityY = overallVelocity.y;
563
- input.overallVelocity = (abs(overallVelocity.x) > abs(overallVelocity.y)) ? overallVelocity.x : overallVelocity.y;
564
-
565
- input.scale = firstMultiple ? getScale(firstMultiple.pointers, pointers) : 1;
566
- input.rotation = firstMultiple ? getRotation(firstMultiple.pointers, pointers) : 0;
567
-
568
- input.maxPointers = !session.prevInput ? input.pointers.length : ((input.pointers.length >
569
- session.prevInput.maxPointers) ? input.pointers.length : session.prevInput.maxPointers);
570
-
571
- computeIntervalInputData(session, input);
572
-
573
- // find the correct target
574
- var target = manager.element;
575
- if (hasParent(input.srcEvent.target, target)) {
576
- target = input.srcEvent.target;
577
- }
578
- input.target = target;
579
- }
580
-
581
- function computeDeltaXY(session, input) {
582
- var center = input.center;
583
- var offset = session.offsetDelta || {};
584
- var prevDelta = session.prevDelta || {};
585
- var prevInput = session.prevInput || {};
586
-
587
- if (input.eventType === INPUT_START || prevInput.eventType === INPUT_END) {
588
- prevDelta = session.prevDelta = {
589
- x: prevInput.deltaX || 0,
590
- y: prevInput.deltaY || 0
591
- };
592
-
593
- offset = session.offsetDelta = {
594
- x: center.x,
595
- y: center.y
596
- };
597
- }
598
-
599
- input.deltaX = prevDelta.x + (center.x - offset.x);
600
- input.deltaY = prevDelta.y + (center.y - offset.y);
601
- }
602
-
603
- /**
604
- * velocity is calculated every x ms
605
- * @param {Object} session
606
- * @param {Object} input
607
- */
608
- function computeIntervalInputData(session, input) {
609
- var last = session.lastInterval || input,
610
- deltaTime = input.timeStamp - last.timeStamp,
611
- velocity, velocityX, velocityY, direction;
612
-
613
- if (input.eventType != INPUT_CANCEL && (deltaTime > COMPUTE_INTERVAL || last.velocity === undefined$1)) {
614
- var deltaX = input.deltaX - last.deltaX;
615
- var deltaY = input.deltaY - last.deltaY;
616
-
617
- var v = getVelocity(deltaTime, deltaX, deltaY);
618
- velocityX = v.x;
619
- velocityY = v.y;
620
- velocity = (abs(v.x) > abs(v.y)) ? v.x : v.y;
621
- direction = getDirection(deltaX, deltaY);
622
-
623
- session.lastInterval = input;
624
- } else {
625
- // use latest velocity info if it doesn't overtake a minimum period
626
- velocity = last.velocity;
627
- velocityX = last.velocityX;
628
- velocityY = last.velocityY;
629
- direction = last.direction;
630
- }
631
-
632
- input.velocity = velocity;
633
- input.velocityX = velocityX;
634
- input.velocityY = velocityY;
635
- input.direction = direction;
636
- }
637
-
638
- /**
639
- * create a simple clone from the input used for storage of firstInput and firstMultiple
640
- * @param {Object} input
641
- * @returns {Object} clonedInputData
642
- */
643
- function simpleCloneInputData(input) {
644
- // make a simple copy of the pointers because we will get a reference if we don't
645
- // we only need clientXY for the calculations
646
- var pointers = [];
647
- var i = 0;
648
- while (i < input.pointers.length) {
649
- pointers[i] = {
650
- clientX: round(input.pointers[i].clientX),
651
- clientY: round(input.pointers[i].clientY)
652
- };
653
- i++;
654
- }
655
-
656
- return {
657
- timeStamp: now(),
658
- pointers: pointers,
659
- center: getCenter(pointers),
660
- deltaX: input.deltaX,
661
- deltaY: input.deltaY
662
- };
663
- }
664
-
665
- /**
666
- * get the center of all the pointers
667
- * @param {Array} pointers
668
- * @return {Object} center contains `x` and `y` properties
669
- */
670
- function getCenter(pointers) {
671
- var pointersLength = pointers.length;
672
-
673
- // no need to loop when only one touch
674
- if (pointersLength === 1) {
675
- return {
676
- x: round(pointers[0].clientX),
677
- y: round(pointers[0].clientY)
678
- };
679
- }
680
-
681
- var x = 0, y = 0, i = 0;
682
- while (i < pointersLength) {
683
- x += pointers[i].clientX;
684
- y += pointers[i].clientY;
685
- i++;
686
- }
687
-
688
- return {
689
- x: round(x / pointersLength),
690
- y: round(y / pointersLength)
691
- };
692
- }
693
-
694
- /**
695
- * calculate the velocity between two points. unit is in px per ms.
696
- * @param {Number} deltaTime
697
- * @param {Number} x
698
- * @param {Number} y
699
- * @return {Object} velocity `x` and `y`
700
- */
701
- function getVelocity(deltaTime, x, y) {
702
- return {
703
- x: x / deltaTime || 0,
704
- y: y / deltaTime || 0
705
- };
706
- }
707
-
708
- /**
709
- * get the direction between two points
710
- * @param {Number} x
711
- * @param {Number} y
712
- * @return {Number} direction
713
- */
714
- function getDirection(x, y) {
715
- if (x === y) {
716
- return DIRECTION_NONE;
717
- }
718
-
719
- if (abs(x) >= abs(y)) {
720
- return x < 0 ? DIRECTION_LEFT : DIRECTION_RIGHT;
721
- }
722
- return y < 0 ? DIRECTION_UP : DIRECTION_DOWN;
723
- }
724
-
725
- /**
726
- * calculate the absolute distance between two points
727
- * @param {Object} p1 {x, y}
728
- * @param {Object} p2 {x, y}
729
- * @param {Array} [props] containing x and y keys
730
- * @return {Number} distance
731
- */
732
- function getDistance(p1, p2, props) {
733
- if (!props) {
734
- props = PROPS_XY;
735
- }
736
- var x = p2[props[0]] - p1[props[0]],
737
- y = p2[props[1]] - p1[props[1]];
738
-
739
- return Math.sqrt((x * x) + (y * y));
740
- }
741
-
742
- /**
743
- * calculate the angle between two coordinates
744
- * @param {Object} p1
745
- * @param {Object} p2
746
- * @param {Array} [props] containing x and y keys
747
- * @return {Number} angle
748
- */
749
- function getAngle(p1, p2, props) {
750
- if (!props) {
751
- props = PROPS_XY;
752
- }
753
- var x = p2[props[0]] - p1[props[0]],
754
- y = p2[props[1]] - p1[props[1]];
755
- return Math.atan2(y, x) * 180 / Math.PI;
756
- }
757
-
758
- /**
759
- * calculate the rotation degrees between two pointersets
760
- * @param {Array} start array of pointers
761
- * @param {Array} end array of pointers
762
- * @return {Number} rotation
763
- */
764
- function getRotation(start, end) {
765
- return getAngle(end[1], end[0], PROPS_CLIENT_XY) + getAngle(start[1], start[0], PROPS_CLIENT_XY);
766
- }
767
-
768
- /**
769
- * calculate the scale factor between two pointersets
770
- * no scale is 1, and goes down to 0 when pinched together, and bigger when pinched out
771
- * @param {Array} start array of pointers
772
- * @param {Array} end array of pointers
773
- * @return {Number} scale
774
- */
775
- function getScale(start, end) {
776
- return getDistance(end[0], end[1], PROPS_CLIENT_XY) / getDistance(start[0], start[1], PROPS_CLIENT_XY);
777
- }
778
-
779
- var MOUSE_INPUT_MAP = {
780
- mousedown: INPUT_START,
781
- mousemove: INPUT_MOVE,
782
- mouseup: INPUT_END
783
- };
784
-
785
- var MOUSE_ELEMENT_EVENTS = 'mousedown';
786
- var MOUSE_WINDOW_EVENTS = 'mousemove mouseup';
787
-
788
- /**
789
- * Mouse events input
790
- * @constructor
791
- * @extends Input
792
- */
793
- function MouseInput() {
794
- this.evEl = MOUSE_ELEMENT_EVENTS;
795
- this.evWin = MOUSE_WINDOW_EVENTS;
796
-
797
- this.pressed = false; // mousedown state
798
-
799
- Input.apply(this, arguments);
800
- }
801
-
802
- inherit(MouseInput, Input, {
803
- /**
804
- * handle mouse events
805
- * @param {Object} ev
806
- */
807
- handler: function MEhandler(ev) {
808
- var eventType = MOUSE_INPUT_MAP[ev.type];
809
-
810
- // on start we want to have the left mouse button down
811
- if (eventType & INPUT_START && ev.button === 0) {
812
- this.pressed = true;
813
- }
814
-
815
- if (eventType & INPUT_MOVE && ev.which !== 1) {
816
- eventType = INPUT_END;
817
- }
818
-
819
- // mouse must be down
820
- if (!this.pressed) {
821
- return;
822
- }
823
-
824
- if (eventType & INPUT_END) {
825
- this.pressed = false;
826
- }
827
-
828
- this.callback(this.manager, eventType, {
829
- pointers: [ev],
830
- changedPointers: [ev],
831
- pointerType: INPUT_TYPE_MOUSE,
832
- srcEvent: ev
833
- });
834
- }
835
- });
836
-
837
- var POINTER_INPUT_MAP = {
838
- pointerdown: INPUT_START,
839
- pointermove: INPUT_MOVE,
840
- pointerup: INPUT_END,
841
- pointercancel: INPUT_CANCEL,
842
- pointerout: INPUT_CANCEL
843
- };
844
-
845
- // in IE10 the pointer types is defined as an enum
846
- var IE10_POINTER_TYPE_ENUM = {
847
- 2: INPUT_TYPE_TOUCH,
848
- 3: INPUT_TYPE_PEN,
849
- 4: INPUT_TYPE_MOUSE,
850
- 5: INPUT_TYPE_KINECT // see https://twitter.com/jacobrossi/status/480596438489890816
851
- };
852
-
853
- var POINTER_ELEMENT_EVENTS = 'pointerdown';
854
- var POINTER_WINDOW_EVENTS = 'pointermove pointerup pointercancel';
855
-
856
- // IE10 has prefixed support, and case-sensitive
857
- if (window.MSPointerEvent && !window.PointerEvent) {
858
- POINTER_ELEMENT_EVENTS = 'MSPointerDown';
859
- POINTER_WINDOW_EVENTS = 'MSPointerMove MSPointerUp MSPointerCancel';
860
- }
861
-
862
- /**
863
- * Pointer events input
864
- * @constructor
865
- * @extends Input
866
- */
867
- function PointerEventInput() {
868
- this.evEl = POINTER_ELEMENT_EVENTS;
869
- this.evWin = POINTER_WINDOW_EVENTS;
870
-
871
- Input.apply(this, arguments);
872
-
873
- this.store = (this.manager.session.pointerEvents = []);
874
- }
875
-
876
- inherit(PointerEventInput, Input, {
877
- /**
878
- * handle mouse events
879
- * @param {Object} ev
880
- */
881
- handler: function PEhandler(ev) {
882
- var store = this.store;
883
- var removePointer = false;
884
-
885
- var eventTypeNormalized = ev.type.toLowerCase().replace('ms', '');
886
- var eventType = POINTER_INPUT_MAP[eventTypeNormalized];
887
- var pointerType = IE10_POINTER_TYPE_ENUM[ev.pointerType] || ev.pointerType;
888
-
889
- var isTouch = (pointerType == INPUT_TYPE_TOUCH);
890
-
891
- // get index of the event in the store
892
- var storeIndex = inArray(store, ev.pointerId, 'pointerId');
893
-
894
- // start and mouse must be down
895
- if (eventType & INPUT_START && (ev.button === 0 || isTouch)) {
896
- if (storeIndex < 0) {
897
- store.push(ev);
898
- storeIndex = store.length - 1;
899
- }
900
- } else if (eventType & (INPUT_END | INPUT_CANCEL)) {
901
- removePointer = true;
902
- }
903
-
904
- // it not found, so the pointer hasn't been down (so it's probably a hover)
905
- if (storeIndex < 0) {
906
- return;
907
- }
908
-
909
- // update the event in the store
910
- store[storeIndex] = ev;
911
-
912
- this.callback(this.manager, eventType, {
913
- pointers: store,
914
- changedPointers: [ev],
915
- pointerType: pointerType,
916
- srcEvent: ev
917
- });
918
-
919
- if (removePointer) {
920
- // remove from the store
921
- store.splice(storeIndex, 1);
922
- }
923
- }
924
- });
925
-
926
- var SINGLE_TOUCH_INPUT_MAP = {
927
- touchstart: INPUT_START,
928
- touchmove: INPUT_MOVE,
929
- touchend: INPUT_END,
930
- touchcancel: INPUT_CANCEL
931
- };
932
-
933
- var SINGLE_TOUCH_TARGET_EVENTS = 'touchstart';
934
- var SINGLE_TOUCH_WINDOW_EVENTS = 'touchstart touchmove touchend touchcancel';
935
-
936
- /**
937
- * Touch events input
938
- * @constructor
939
- * @extends Input
940
- */
941
- function SingleTouchInput() {
942
- this.evTarget = SINGLE_TOUCH_TARGET_EVENTS;
943
- this.evWin = SINGLE_TOUCH_WINDOW_EVENTS;
944
- this.started = false;
945
-
946
- Input.apply(this, arguments);
947
- }
948
-
949
- inherit(SingleTouchInput, Input, {
950
- handler: function TEhandler(ev) {
951
- var type = SINGLE_TOUCH_INPUT_MAP[ev.type];
952
-
953
- // should we handle the touch events?
954
- if (type === INPUT_START) {
955
- this.started = true;
956
- }
957
-
958
- if (!this.started) {
959
- return;
960
- }
961
-
962
- var touches = normalizeSingleTouches.call(this, ev, type);
963
-
964
- // when done, reset the started state
965
- if (type & (INPUT_END | INPUT_CANCEL) && touches[0].length - touches[1].length === 0) {
966
- this.started = false;
967
- }
968
-
969
- this.callback(this.manager, type, {
970
- pointers: touches[0],
971
- changedPointers: touches[1],
972
- pointerType: INPUT_TYPE_TOUCH,
973
- srcEvent: ev
974
- });
975
- }
976
- });
977
-
978
- /**
979
- * @this {TouchInput}
980
- * @param {Object} ev
981
- * @param {Number} type flag
982
- * @returns {undefined|Array} [all, changed]
983
- */
984
- function normalizeSingleTouches(ev, type) {
985
- var all = toArray(ev.touches);
986
- var changed = toArray(ev.changedTouches);
987
-
988
- if (type & (INPUT_END | INPUT_CANCEL)) {
989
- all = uniqueArray(all.concat(changed), 'identifier', true);
990
- }
991
-
992
- return [all, changed];
993
- }
994
-
995
- var TOUCH_INPUT_MAP = {
996
- touchstart: INPUT_START,
997
- touchmove: INPUT_MOVE,
998
- touchend: INPUT_END,
999
- touchcancel: INPUT_CANCEL
1000
- };
1001
-
1002
- var TOUCH_TARGET_EVENTS = 'touchstart touchmove touchend touchcancel';
1003
-
1004
- /**
1005
- * Multi-user touch events input
1006
- * @constructor
1007
- * @extends Input
1008
- */
1009
- function TouchInput() {
1010
- this.evTarget = TOUCH_TARGET_EVENTS;
1011
- this.targetIds = {};
1012
-
1013
- Input.apply(this, arguments);
1014
- }
1015
-
1016
- inherit(TouchInput, Input, {
1017
- handler: function MTEhandler(ev) {
1018
- var type = TOUCH_INPUT_MAP[ev.type];
1019
- var touches = getTouches.call(this, ev, type);
1020
- if (!touches) {
1021
- return;
1022
- }
1023
-
1024
- this.callback(this.manager, type, {
1025
- pointers: touches[0],
1026
- changedPointers: touches[1],
1027
- pointerType: INPUT_TYPE_TOUCH,
1028
- srcEvent: ev
1029
- });
1030
- }
1031
- });
1032
-
1033
- /**
1034
- * @this {TouchInput}
1035
- * @param {Object} ev
1036
- * @param {Number} type flag
1037
- * @returns {undefined|Array} [all, changed]
1038
- */
1039
- function getTouches(ev, type) {
1040
- var allTouches = toArray(ev.touches);
1041
- var targetIds = this.targetIds;
1042
-
1043
- // when there is only one touch, the process can be simplified
1044
- if (type & (INPUT_START | INPUT_MOVE) && allTouches.length === 1) {
1045
- targetIds[allTouches[0].identifier] = true;
1046
- return [allTouches, allTouches];
1047
- }
1048
-
1049
- var i,
1050
- targetTouches,
1051
- changedTouches = toArray(ev.changedTouches),
1052
- changedTargetTouches = [],
1053
- target = this.target;
1054
-
1055
- // get target touches from touches
1056
- targetTouches = allTouches.filter(function(touch) {
1057
- return hasParent(touch.target, target);
1058
- });
1059
-
1060
- // collect touches
1061
- if (type === INPUT_START) {
1062
- i = 0;
1063
- while (i < targetTouches.length) {
1064
- targetIds[targetTouches[i].identifier] = true;
1065
- i++;
1066
- }
1067
- }
1068
-
1069
- // filter changed touches to only contain touches that exist in the collected target ids
1070
- i = 0;
1071
- while (i < changedTouches.length) {
1072
- if (targetIds[changedTouches[i].identifier]) {
1073
- changedTargetTouches.push(changedTouches[i]);
1074
- }
1075
-
1076
- // cleanup removed touches
1077
- if (type & (INPUT_END | INPUT_CANCEL)) {
1078
- delete targetIds[changedTouches[i].identifier];
1079
- }
1080
- i++;
1081
- }
1082
-
1083
- if (!changedTargetTouches.length) {
1084
- return;
1085
- }
1086
-
1087
- return [
1088
- // merge targetTouches with changedTargetTouches so it contains ALL touches, including 'end' and 'cancel'
1089
- uniqueArray(targetTouches.concat(changedTargetTouches), 'identifier', true),
1090
- changedTargetTouches
1091
- ];
1092
- }
1093
-
1094
- /**
1095
- * Combined touch and mouse input
1096
- *
1097
- * Touch has a higher priority then mouse, and while touching no mouse events are allowed.
1098
- * This because touch devices also emit mouse events while doing a touch.
1099
- *
1100
- * @constructor
1101
- * @extends Input
1102
- */
1103
-
1104
- var DEDUP_TIMEOUT = 2500;
1105
- var DEDUP_DISTANCE = 25;
1106
-
1107
- function TouchMouseInput() {
1108
- Input.apply(this, arguments);
1109
-
1110
- var handler = bindFn(this.handler, this);
1111
- this.touch = new TouchInput(this.manager, handler);
1112
- this.mouse = new MouseInput(this.manager, handler);
1113
-
1114
- this.primaryTouch = null;
1115
- this.lastTouches = [];
1116
- }
1117
-
1118
- inherit(TouchMouseInput, Input, {
1119
- /**
1120
- * handle mouse and touch events
1121
- * @param {Hammer} manager
1122
- * @param {String} inputEvent
1123
- * @param {Object} inputData
1124
- */
1125
- handler: function TMEhandler(manager, inputEvent, inputData) {
1126
- var isTouch = (inputData.pointerType == INPUT_TYPE_TOUCH),
1127
- isMouse = (inputData.pointerType == INPUT_TYPE_MOUSE);
1128
-
1129
- if (isMouse && inputData.sourceCapabilities && inputData.sourceCapabilities.firesTouchEvents) {
1130
- return;
1131
- }
1132
-
1133
- // when we're in a touch event, record touches to de-dupe synthetic mouse event
1134
- if (isTouch) {
1135
- recordTouches.call(this, inputEvent, inputData);
1136
- } else if (isMouse && isSyntheticEvent.call(this, inputData)) {
1137
- return;
1138
- }
1139
-
1140
- this.callback(manager, inputEvent, inputData);
1141
- },
1142
-
1143
- /**
1144
- * remove the event listeners
1145
- */
1146
- destroy: function destroy() {
1147
- this.touch.destroy();
1148
- this.mouse.destroy();
1149
- }
1150
- });
1151
-
1152
- function recordTouches(eventType, eventData) {
1153
- if (eventType & INPUT_START) {
1154
- this.primaryTouch = eventData.changedPointers[0].identifier;
1155
- setLastTouch.call(this, eventData);
1156
- } else if (eventType & (INPUT_END | INPUT_CANCEL)) {
1157
- setLastTouch.call(this, eventData);
1158
- }
1159
- }
1160
-
1161
- function setLastTouch(eventData) {
1162
- var touch = eventData.changedPointers[0];
1163
-
1164
- if (touch.identifier === this.primaryTouch) {
1165
- var lastTouch = {x: touch.clientX, y: touch.clientY};
1166
- this.lastTouches.push(lastTouch);
1167
- var lts = this.lastTouches;
1168
- var removeLastTouch = function() {
1169
- var i = lts.indexOf(lastTouch);
1170
- if (i > -1) {
1171
- lts.splice(i, 1);
1172
- }
1173
- };
1174
- setTimeout(removeLastTouch, DEDUP_TIMEOUT);
1175
- }
1176
- }
1177
-
1178
- function isSyntheticEvent(eventData) {
1179
- var x = eventData.srcEvent.clientX, y = eventData.srcEvent.clientY;
1180
- for (var i = 0; i < this.lastTouches.length; i++) {
1181
- var t = this.lastTouches[i];
1182
- var dx = Math.abs(x - t.x), dy = Math.abs(y - t.y);
1183
- if (dx <= DEDUP_DISTANCE && dy <= DEDUP_DISTANCE) {
1184
- return true;
1185
- }
1186
- }
1187
- return false;
1188
- }
1189
-
1190
- var PREFIXED_TOUCH_ACTION = prefixed(TEST_ELEMENT.style, 'touchAction');
1191
- var NATIVE_TOUCH_ACTION = PREFIXED_TOUCH_ACTION !== undefined$1;
1192
-
1193
- // magical touchAction value
1194
- var TOUCH_ACTION_COMPUTE = 'compute';
1195
- var TOUCH_ACTION_AUTO = 'auto';
1196
- var TOUCH_ACTION_MANIPULATION = 'manipulation'; // not implemented
1197
- var TOUCH_ACTION_NONE = 'none';
1198
- var TOUCH_ACTION_PAN_X = 'pan-x';
1199
- var TOUCH_ACTION_PAN_Y = 'pan-y';
1200
- var TOUCH_ACTION_MAP = getTouchActionProps();
1201
-
1202
- /**
1203
- * Touch Action
1204
- * sets the touchAction property or uses the js alternative
1205
- * @param {Manager} manager
1206
- * @param {String} value
1207
- * @constructor
1208
- */
1209
- function TouchAction(manager, value) {
1210
- this.manager = manager;
1211
- this.set(value);
1212
- }
1213
-
1214
- TouchAction.prototype = {
1215
- /**
1216
- * set the touchAction value on the element or enable the polyfill
1217
- * @param {String} value
1218
- */
1219
- set: function(value) {
1220
- // find out the touch-action by the event handlers
1221
- if (value == TOUCH_ACTION_COMPUTE) {
1222
- value = this.compute();
1223
- }
1224
-
1225
- if (NATIVE_TOUCH_ACTION && this.manager.element.style && TOUCH_ACTION_MAP[value]) {
1226
- this.manager.element.style[PREFIXED_TOUCH_ACTION] = value;
1227
- }
1228
- this.actions = value.toLowerCase().trim();
1229
- },
1230
-
1231
- /**
1232
- * just re-set the touchAction value
1233
- */
1234
- update: function() {
1235
- this.set(this.manager.options.touchAction);
1236
- },
1237
-
1238
- /**
1239
- * compute the value for the touchAction property based on the recognizer's settings
1240
- * @returns {String} value
1241
- */
1242
- compute: function() {
1243
- var actions = [];
1244
- each(this.manager.recognizers, function(recognizer) {
1245
- if (boolOrFn(recognizer.options.enable, [recognizer])) {
1246
- actions = actions.concat(recognizer.getTouchAction());
1247
- }
1248
- });
1249
- return cleanTouchActions(actions.join(' '));
1250
- },
1251
-
1252
- /**
1253
- * this method is called on each input cycle and provides the preventing of the browser behavior
1254
- * @param {Object} input
1255
- */
1256
- preventDefaults: function(input) {
1257
- var srcEvent = input.srcEvent;
1258
- var direction = input.offsetDirection;
1259
-
1260
- // if the touch action did prevented once this session
1261
- if (this.manager.session.prevented) {
1262
- srcEvent.preventDefault();
1263
- return;
1264
- }
1265
-
1266
- var actions = this.actions;
1267
- var hasNone = inStr(actions, TOUCH_ACTION_NONE) && !TOUCH_ACTION_MAP[TOUCH_ACTION_NONE];
1268
- var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_Y];
1269
- var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X) && !TOUCH_ACTION_MAP[TOUCH_ACTION_PAN_X];
1270
-
1271
- if (hasNone) {
1272
- //do not prevent defaults if this is a tap gesture
1273
-
1274
- var isTapPointer = input.pointers.length === 1;
1275
- var isTapMovement = input.distance < 2;
1276
- var isTapTouchTime = input.deltaTime < 250;
1277
-
1278
- if (isTapPointer && isTapMovement && isTapTouchTime) {
1279
- return;
1280
- }
1281
- }
1282
-
1283
- if (hasPanX && hasPanY) {
1284
- // `pan-x pan-y` means browser handles all scrolling/panning, do not prevent
1285
- return;
1286
- }
1287
-
1288
- if (hasNone ||
1289
- (hasPanY && direction & DIRECTION_HORIZONTAL) ||
1290
- (hasPanX && direction & DIRECTION_VERTICAL)) {
1291
- return this.preventSrc(srcEvent);
1292
- }
1293
- },
1294
-
1295
- /**
1296
- * call preventDefault to prevent the browser's default behavior (scrolling in most cases)
1297
- * @param {Object} srcEvent
1298
- */
1299
- preventSrc: function(srcEvent) {
1300
- this.manager.session.prevented = true;
1301
- srcEvent.preventDefault();
1302
- }
1303
- };
1304
-
1305
- /**
1306
- * when the touchActions are collected they are not a valid value, so we need to clean things up. *
1307
- * @param {String} actions
1308
- * @returns {*}
1309
- */
1310
- function cleanTouchActions(actions) {
1311
- // none
1312
- if (inStr(actions, TOUCH_ACTION_NONE)) {
1313
- return TOUCH_ACTION_NONE;
1314
- }
1315
-
1316
- var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);
1317
- var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
1318
-
1319
- // if both pan-x and pan-y are set (different recognizers
1320
- // for different directions, e.g. horizontal pan but vertical swipe?)
1321
- // we need none (as otherwise with pan-x pan-y combined none of these
1322
- // recognizers will work, since the browser would handle all panning
1323
- if (hasPanX && hasPanY) {
1324
- return TOUCH_ACTION_NONE;
1325
- }
1326
-
1327
- // pan-x OR pan-y
1328
- if (hasPanX || hasPanY) {
1329
- return hasPanX ? TOUCH_ACTION_PAN_X : TOUCH_ACTION_PAN_Y;
1330
- }
1331
-
1332
- // manipulation
1333
- if (inStr(actions, TOUCH_ACTION_MANIPULATION)) {
1334
- return TOUCH_ACTION_MANIPULATION;
1335
- }
1336
-
1337
- return TOUCH_ACTION_AUTO;
1338
- }
1339
-
1340
- function getTouchActionProps() {
1341
- if (!NATIVE_TOUCH_ACTION) {
1342
- return false;
1343
- }
1344
- var touchMap = {};
1345
- var cssSupports = window.CSS && window.CSS.supports;
1346
- ['auto', 'manipulation', 'pan-y', 'pan-x', 'pan-x pan-y', 'none'].forEach(function(val) {
1347
-
1348
- // If css.supports is not supported but there is native touch-action assume it supports
1349
- // all values. This is the case for IE 10 and 11.
1350
- touchMap[val] = cssSupports ? window.CSS.supports('touch-action', val) : true;
1351
- });
1352
- return touchMap;
1353
- }
1354
-
1355
- /**
1356
- * Recognizer flow explained; *
1357
- * All recognizers have the initial state of POSSIBLE when a input session starts.
1358
- * The definition of a input session is from the first input until the last input, with all it's movement in it. *
1359
- * Example session for mouse-input: mousedown -> mousemove -> mouseup
1360
- *
1361
- * On each recognizing cycle (see Manager.recognize) the .recognize() method is executed
1362
- * which determines with state it should be.
1363
- *
1364
- * If the recognizer has the state FAILED, CANCELLED or RECOGNIZED (equals ENDED), it is reset to
1365
- * POSSIBLE to give it another change on the next cycle.
1366
- *
1367
- * Possible
1368
- * |
1369
- * +-----+---------------+
1370
- * | |
1371
- * +-----+-----+ |
1372
- * | | |
1373
- * Failed Cancelled |
1374
- * +-------+------+
1375
- * | |
1376
- * Recognized Began
1377
- * |
1378
- * Changed
1379
- * |
1380
- * Ended/Recognized
1381
- */
1382
- var STATE_POSSIBLE = 1;
1383
- var STATE_BEGAN = 2;
1384
- var STATE_CHANGED = 4;
1385
- var STATE_ENDED = 8;
1386
- var STATE_RECOGNIZED = STATE_ENDED;
1387
- var STATE_CANCELLED = 16;
1388
- var STATE_FAILED = 32;
1389
-
1390
- /**
1391
- * Recognizer
1392
- * Every recognizer needs to extend from this class.
1393
- * @constructor
1394
- * @param {Object} options
1395
- */
1396
- function Recognizer(options) {
1397
- this.options = assign({}, this.defaults, options || {});
1398
-
1399
- this.id = uniqueId();
1400
-
1401
- this.manager = null;
1402
-
1403
- // default is enable true
1404
- this.options.enable = ifUndefined(this.options.enable, true);
1405
-
1406
- this.state = STATE_POSSIBLE;
1407
-
1408
- this.simultaneous = {};
1409
- this.requireFail = [];
1410
- }
1411
-
1412
- Recognizer.prototype = {
1413
- /**
1414
- * @virtual
1415
- * @type {Object}
1416
- */
1417
- defaults: {},
1418
-
1419
- /**
1420
- * set options
1421
- * @param {Object} options
1422
- * @return {Recognizer}
1423
- */
1424
- set: function(options) {
1425
- assign(this.options, options);
1426
-
1427
- // also update the touchAction, in case something changed about the directions/enabled state
1428
- this.manager && this.manager.touchAction.update();
1429
- return this;
1430
- },
1431
-
1432
- /**
1433
- * recognize simultaneous with an other recognizer.
1434
- * @param {Recognizer} otherRecognizer
1435
- * @returns {Recognizer} this
1436
- */
1437
- recognizeWith: function(otherRecognizer) {
1438
- if (invokeArrayArg(otherRecognizer, 'recognizeWith', this)) {
1439
- return this;
1440
- }
1441
-
1442
- var simultaneous = this.simultaneous;
1443
- otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
1444
- if (!simultaneous[otherRecognizer.id]) {
1445
- simultaneous[otherRecognizer.id] = otherRecognizer;
1446
- otherRecognizer.recognizeWith(this);
1447
- }
1448
- return this;
1449
- },
1450
-
1451
- /**
1452
- * drop the simultaneous link. it doesnt remove the link on the other recognizer.
1453
- * @param {Recognizer} otherRecognizer
1454
- * @returns {Recognizer} this
1455
- */
1456
- dropRecognizeWith: function(otherRecognizer) {
1457
- if (invokeArrayArg(otherRecognizer, 'dropRecognizeWith', this)) {
1458
- return this;
1459
- }
1460
-
1461
- otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
1462
- delete this.simultaneous[otherRecognizer.id];
1463
- return this;
1464
- },
1465
-
1466
- /**
1467
- * recognizer can only run when an other is failing
1468
- * @param {Recognizer} otherRecognizer
1469
- * @returns {Recognizer} this
1470
- */
1471
- requireFailure: function(otherRecognizer) {
1472
- if (invokeArrayArg(otherRecognizer, 'requireFailure', this)) {
1473
- return this;
1474
- }
1475
-
1476
- var requireFail = this.requireFail;
1477
- otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
1478
- if (inArray(requireFail, otherRecognizer) === -1) {
1479
- requireFail.push(otherRecognizer);
1480
- otherRecognizer.requireFailure(this);
1481
- }
1482
- return this;
1483
- },
1484
-
1485
- /**
1486
- * drop the requireFailure link. it does not remove the link on the other recognizer.
1487
- * @param {Recognizer} otherRecognizer
1488
- * @returns {Recognizer} this
1489
- */
1490
- dropRequireFailure: function(otherRecognizer) {
1491
- if (invokeArrayArg(otherRecognizer, 'dropRequireFailure', this)) {
1492
- return this;
1493
- }
1494
-
1495
- otherRecognizer = getRecognizerByNameIfManager(otherRecognizer, this);
1496
- var index = inArray(this.requireFail, otherRecognizer);
1497
- if (index > -1) {
1498
- this.requireFail.splice(index, 1);
1499
- }
1500
- return this;
1501
- },
1502
-
1503
- /**
1504
- * has require failures boolean
1505
- * @returns {boolean}
1506
- */
1507
- hasRequireFailures: function() {
1508
- return this.requireFail.length > 0;
1509
- },
1510
-
1511
- /**
1512
- * if the recognizer can recognize simultaneous with an other recognizer
1513
- * @param {Recognizer} otherRecognizer
1514
- * @returns {Boolean}
1515
- */
1516
- canRecognizeWith: function(otherRecognizer) {
1517
- return !!this.simultaneous[otherRecognizer.id];
1518
- },
1519
-
1520
- /**
1521
- * You should use `tryEmit` instead of `emit` directly to check
1522
- * that all the needed recognizers has failed before emitting.
1523
- * @param {Object} input
1524
- */
1525
- emit: function(input) {
1526
- var self = this;
1527
- var state = this.state;
1528
-
1529
- function emit(event) {
1530
- self.manager.emit(event, input);
1531
- }
1532
-
1533
- // 'panstart' and 'panmove'
1534
- if (state < STATE_ENDED) {
1535
- emit(self.options.event + stateStr(state));
1536
- }
1537
-
1538
- emit(self.options.event); // simple 'eventName' events
1539
-
1540
- if (input.additionalEvent) { // additional event(panleft, panright, pinchin, pinchout...)
1541
- emit(input.additionalEvent);
1542
- }
1543
-
1544
- // panend and pancancel
1545
- if (state >= STATE_ENDED) {
1546
- emit(self.options.event + stateStr(state));
1547
- }
1548
- },
1549
-
1550
- /**
1551
- * Check that all the require failure recognizers has failed,
1552
- * if true, it emits a gesture event,
1553
- * otherwise, setup the state to FAILED.
1554
- * @param {Object} input
1555
- */
1556
- tryEmit: function(input) {
1557
- if (this.canEmit()) {
1558
- return this.emit(input);
1559
- }
1560
- // it's failing anyway
1561
- this.state = STATE_FAILED;
1562
- },
1563
-
1564
- /**
1565
- * can we emit?
1566
- * @returns {boolean}
1567
- */
1568
- canEmit: function() {
1569
- var i = 0;
1570
- while (i < this.requireFail.length) {
1571
- if (!(this.requireFail[i].state & (STATE_FAILED | STATE_POSSIBLE))) {
1572
- return false;
1573
- }
1574
- i++;
1575
- }
1576
- return true;
1577
- },
1578
-
1579
- /**
1580
- * update the recognizer
1581
- * @param {Object} inputData
1582
- */
1583
- recognize: function(inputData) {
1584
- // make a new copy of the inputData
1585
- // so we can change the inputData without messing up the other recognizers
1586
- var inputDataClone = assign({}, inputData);
1587
-
1588
- // is is enabled and allow recognizing?
1589
- if (!boolOrFn(this.options.enable, [this, inputDataClone])) {
1590
- this.reset();
1591
- this.state = STATE_FAILED;
1592
- return;
1593
- }
1594
-
1595
- // reset when we've reached the end
1596
- if (this.state & (STATE_RECOGNIZED | STATE_CANCELLED | STATE_FAILED)) {
1597
- this.state = STATE_POSSIBLE;
1598
- }
1599
-
1600
- this.state = this.process(inputDataClone);
1601
-
1602
- // the recognizer has recognized a gesture
1603
- // so trigger an event
1604
- if (this.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED | STATE_CANCELLED)) {
1605
- this.tryEmit(inputDataClone);
1606
- }
1607
- },
1608
-
1609
- /**
1610
- * return the state of the recognizer
1611
- * the actual recognizing happens in this method
1612
- * @virtual
1613
- * @param {Object} inputData
1614
- * @returns {Const} STATE
1615
- */
1616
- process: function(inputData) { }, // jshint ignore:line
1617
-
1618
- /**
1619
- * return the preferred touch-action
1620
- * @virtual
1621
- * @returns {Array}
1622
- */
1623
- getTouchAction: function() { },
1624
-
1625
- /**
1626
- * called when the gesture isn't allowed to recognize
1627
- * like when another is being recognized or it is disabled
1628
- * @virtual
1629
- */
1630
- reset: function() { }
1631
- };
1632
-
1633
- /**
1634
- * get a usable string, used as event postfix
1635
- * @param {Const} state
1636
- * @returns {String} state
1637
- */
1638
- function stateStr(state) {
1639
- if (state & STATE_CANCELLED) {
1640
- return 'cancel';
1641
- } else if (state & STATE_ENDED) {
1642
- return 'end';
1643
- } else if (state & STATE_CHANGED) {
1644
- return 'move';
1645
- } else if (state & STATE_BEGAN) {
1646
- return 'start';
1647
- }
1648
- return '';
1649
- }
1650
-
1651
- /**
1652
- * direction cons to string
1653
- * @param {Const} direction
1654
- * @returns {String}
1655
- */
1656
- function directionStr(direction) {
1657
- if (direction == DIRECTION_DOWN) {
1658
- return 'down';
1659
- } else if (direction == DIRECTION_UP) {
1660
- return 'up';
1661
- } else if (direction == DIRECTION_LEFT) {
1662
- return 'left';
1663
- } else if (direction == DIRECTION_RIGHT) {
1664
- return 'right';
1665
- }
1666
- return '';
1667
- }
1668
-
1669
- /**
1670
- * get a recognizer by name if it is bound to a manager
1671
- * @param {Recognizer|String} otherRecognizer
1672
- * @param {Recognizer} recognizer
1673
- * @returns {Recognizer}
1674
- */
1675
- function getRecognizerByNameIfManager(otherRecognizer, recognizer) {
1676
- var manager = recognizer.manager;
1677
- if (manager) {
1678
- return manager.get(otherRecognizer);
1679
- }
1680
- return otherRecognizer;
1681
- }
1682
-
1683
- /**
1684
- * This recognizer is just used as a base for the simple attribute recognizers.
1685
- * @constructor
1686
- * @extends Recognizer
1687
- */
1688
- function AttrRecognizer() {
1689
- Recognizer.apply(this, arguments);
1690
- }
1691
-
1692
- inherit(AttrRecognizer, Recognizer, {
1693
- /**
1694
- * @namespace
1695
- * @memberof AttrRecognizer
1696
- */
1697
- defaults: {
1698
- /**
1699
- * @type {Number}
1700
- * @default 1
1701
- */
1702
- pointers: 1
1703
- },
1704
-
1705
- /**
1706
- * Used to check if it the recognizer receives valid input, like input.distance > 10.
1707
- * @memberof AttrRecognizer
1708
- * @param {Object} input
1709
- * @returns {Boolean} recognized
1710
- */
1711
- attrTest: function(input) {
1712
- var optionPointers = this.options.pointers;
1713
- return optionPointers === 0 || input.pointers.length === optionPointers;
1714
- },
1715
-
1716
- /**
1717
- * Process the input and return the state for the recognizer
1718
- * @memberof AttrRecognizer
1719
- * @param {Object} input
1720
- * @returns {*} State
1721
- */
1722
- process: function(input) {
1723
- var state = this.state;
1724
- var eventType = input.eventType;
1725
-
1726
- var isRecognized = state & (STATE_BEGAN | STATE_CHANGED);
1727
- var isValid = this.attrTest(input);
1728
-
1729
- // on cancel input and we've recognized before, return STATE_CANCELLED
1730
- if (isRecognized && (eventType & INPUT_CANCEL || !isValid)) {
1731
- return state | STATE_CANCELLED;
1732
- } else if (isRecognized || isValid) {
1733
- if (eventType & INPUT_END) {
1734
- return state | STATE_ENDED;
1735
- } else if (!(state & STATE_BEGAN)) {
1736
- return STATE_BEGAN;
1737
- }
1738
- return state | STATE_CHANGED;
1739
- }
1740
- return STATE_FAILED;
1741
- }
1742
- });
1743
-
1744
- /**
1745
- * Pan
1746
- * Recognized when the pointer is down and moved in the allowed direction.
1747
- * @constructor
1748
- * @extends AttrRecognizer
1749
- */
1750
- function PanRecognizer() {
1751
- AttrRecognizer.apply(this, arguments);
1752
-
1753
- this.pX = null;
1754
- this.pY = null;
1755
- }
1756
-
1757
- inherit(PanRecognizer, AttrRecognizer, {
1758
- /**
1759
- * @namespace
1760
- * @memberof PanRecognizer
1761
- */
1762
- defaults: {
1763
- event: 'pan',
1764
- threshold: 10,
1765
- pointers: 1,
1766
- direction: DIRECTION_ALL
1767
- },
1768
-
1769
- getTouchAction: function() {
1770
- var direction = this.options.direction;
1771
- var actions = [];
1772
- if (direction & DIRECTION_HORIZONTAL) {
1773
- actions.push(TOUCH_ACTION_PAN_Y);
1774
- }
1775
- if (direction & DIRECTION_VERTICAL) {
1776
- actions.push(TOUCH_ACTION_PAN_X);
1777
- }
1778
- return actions;
1779
- },
1780
-
1781
- directionTest: function(input) {
1782
- var options = this.options;
1783
- var hasMoved = true;
1784
- var distance = input.distance;
1785
- var direction = input.direction;
1786
- var x = input.deltaX;
1787
- var y = input.deltaY;
1788
-
1789
- // lock to axis?
1790
- if (!(direction & options.direction)) {
1791
- if (options.direction & DIRECTION_HORIZONTAL) {
1792
- direction = (x === 0) ? DIRECTION_NONE : (x < 0) ? DIRECTION_LEFT : DIRECTION_RIGHT;
1793
- hasMoved = x != this.pX;
1794
- distance = Math.abs(input.deltaX);
1795
- } else {
1796
- direction = (y === 0) ? DIRECTION_NONE : (y < 0) ? DIRECTION_UP : DIRECTION_DOWN;
1797
- hasMoved = y != this.pY;
1798
- distance = Math.abs(input.deltaY);
1799
- }
1800
- }
1801
- input.direction = direction;
1802
- return hasMoved && distance > options.threshold && direction & options.direction;
1803
- },
1804
-
1805
- attrTest: function(input) {
1806
- return AttrRecognizer.prototype.attrTest.call(this, input) &&
1807
- (this.state & STATE_BEGAN || (!(this.state & STATE_BEGAN) && this.directionTest(input)));
1808
- },
1809
-
1810
- emit: function(input) {
1811
-
1812
- this.pX = input.deltaX;
1813
- this.pY = input.deltaY;
1814
-
1815
- var direction = directionStr(input.direction);
1816
-
1817
- if (direction) {
1818
- input.additionalEvent = this.options.event + direction;
1819
- }
1820
- this._super.emit.call(this, input);
1821
- }
1822
- });
1823
-
1824
- /**
1825
- * Pinch
1826
- * Recognized when two or more pointers are moving toward (zoom-in) or away from each other (zoom-out).
1827
- * @constructor
1828
- * @extends AttrRecognizer
1829
- */
1830
- function PinchRecognizer() {
1831
- AttrRecognizer.apply(this, arguments);
1832
- }
1833
-
1834
- inherit(PinchRecognizer, AttrRecognizer, {
1835
- /**
1836
- * @namespace
1837
- * @memberof PinchRecognizer
1838
- */
1839
- defaults: {
1840
- event: 'pinch',
1841
- threshold: 0,
1842
- pointers: 2
1843
- },
1844
-
1845
- getTouchAction: function() {
1846
- return [TOUCH_ACTION_NONE];
1847
- },
1848
-
1849
- attrTest: function(input) {
1850
- return this._super.attrTest.call(this, input) &&
1851
- (Math.abs(input.scale - 1) > this.options.threshold || this.state & STATE_BEGAN);
1852
- },
1853
-
1854
- emit: function(input) {
1855
- if (input.scale !== 1) {
1856
- var inOut = input.scale < 1 ? 'in' : 'out';
1857
- input.additionalEvent = this.options.event + inOut;
1858
- }
1859
- this._super.emit.call(this, input);
1860
- }
1861
- });
1862
-
1863
- /**
1864
- * Press
1865
- * Recognized when the pointer is down for x ms without any movement.
1866
- * @constructor
1867
- * @extends Recognizer
1868
- */
1869
- function PressRecognizer() {
1870
- Recognizer.apply(this, arguments);
1871
-
1872
- this._timer = null;
1873
- this._input = null;
1874
- }
1875
-
1876
- inherit(PressRecognizer, Recognizer, {
1877
- /**
1878
- * @namespace
1879
- * @memberof PressRecognizer
1880
- */
1881
- defaults: {
1882
- event: 'press',
1883
- pointers: 1,
1884
- time: 251, // minimal time of the pointer to be pressed
1885
- threshold: 9 // a minimal movement is ok, but keep it low
1886
- },
1887
-
1888
- getTouchAction: function() {
1889
- return [TOUCH_ACTION_AUTO];
1890
- },
1891
-
1892
- process: function(input) {
1893
- var options = this.options;
1894
- var validPointers = input.pointers.length === options.pointers;
1895
- var validMovement = input.distance < options.threshold;
1896
- var validTime = input.deltaTime > options.time;
1897
-
1898
- this._input = input;
1899
-
1900
- // we only allow little movement
1901
- // and we've reached an end event, so a tap is possible
1902
- if (!validMovement || !validPointers || (input.eventType & (INPUT_END | INPUT_CANCEL) && !validTime)) {
1903
- this.reset();
1904
- } else if (input.eventType & INPUT_START) {
1905
- this.reset();
1906
- this._timer = setTimeoutContext(function() {
1907
- this.state = STATE_RECOGNIZED;
1908
- this.tryEmit();
1909
- }, options.time, this);
1910
- } else if (input.eventType & INPUT_END) {
1911
- return STATE_RECOGNIZED;
1912
- }
1913
- return STATE_FAILED;
1914
- },
1915
-
1916
- reset: function() {
1917
- clearTimeout(this._timer);
1918
- },
1919
-
1920
- emit: function(input) {
1921
- if (this.state !== STATE_RECOGNIZED) {
1922
- return;
1923
- }
1924
-
1925
- if (input && (input.eventType & INPUT_END)) {
1926
- this.manager.emit(this.options.event + 'up', input);
1927
- } else {
1928
- this._input.timeStamp = now();
1929
- this.manager.emit(this.options.event, this._input);
1930
- }
1931
- }
1932
- });
1933
-
1934
- /**
1935
- * Rotate
1936
- * Recognized when two or more pointer are moving in a circular motion.
1937
- * @constructor
1938
- * @extends AttrRecognizer
1939
- */
1940
- function RotateRecognizer() {
1941
- AttrRecognizer.apply(this, arguments);
1942
- }
1943
-
1944
- inherit(RotateRecognizer, AttrRecognizer, {
1945
- /**
1946
- * @namespace
1947
- * @memberof RotateRecognizer
1948
- */
1949
- defaults: {
1950
- event: 'rotate',
1951
- threshold: 0,
1952
- pointers: 2
1953
- },
1954
-
1955
- getTouchAction: function() {
1956
- return [TOUCH_ACTION_NONE];
1957
- },
1958
-
1959
- attrTest: function(input) {
1960
- return this._super.attrTest.call(this, input) &&
1961
- (Math.abs(input.rotation) > this.options.threshold || this.state & STATE_BEGAN);
1962
- }
1963
- });
1964
-
1965
- /**
1966
- * Swipe
1967
- * Recognized when the pointer is moving fast (velocity), with enough distance in the allowed direction.
1968
- * @constructor
1969
- * @extends AttrRecognizer
1970
- */
1971
- function SwipeRecognizer() {
1972
- AttrRecognizer.apply(this, arguments);
1973
- }
1974
-
1975
- inherit(SwipeRecognizer, AttrRecognizer, {
1976
- /**
1977
- * @namespace
1978
- * @memberof SwipeRecognizer
1979
- */
1980
- defaults: {
1981
- event: 'swipe',
1982
- threshold: 10,
1983
- velocity: 0.3,
1984
- direction: DIRECTION_HORIZONTAL | DIRECTION_VERTICAL,
1985
- pointers: 1
1986
- },
1987
-
1988
- getTouchAction: function() {
1989
- return PanRecognizer.prototype.getTouchAction.call(this);
1990
- },
1991
-
1992
- attrTest: function(input) {
1993
- var direction = this.options.direction;
1994
- var velocity;
1995
-
1996
- if (direction & (DIRECTION_HORIZONTAL | DIRECTION_VERTICAL)) {
1997
- velocity = input.overallVelocity;
1998
- } else if (direction & DIRECTION_HORIZONTAL) {
1999
- velocity = input.overallVelocityX;
2000
- } else if (direction & DIRECTION_VERTICAL) {
2001
- velocity = input.overallVelocityY;
2002
- }
2003
-
2004
- return this._super.attrTest.call(this, input) &&
2005
- direction & input.offsetDirection &&
2006
- input.distance > this.options.threshold &&
2007
- input.maxPointers == this.options.pointers &&
2008
- abs(velocity) > this.options.velocity && input.eventType & INPUT_END;
2009
- },
2010
-
2011
- emit: function(input) {
2012
- var direction = directionStr(input.offsetDirection);
2013
- if (direction) {
2014
- this.manager.emit(this.options.event + direction, input);
2015
- }
2016
-
2017
- this.manager.emit(this.options.event, input);
2018
- }
2019
- });
2020
-
2021
- /**
2022
- * A tap is ecognized when the pointer is doing a small tap/click. Multiple taps are recognized if they occur
2023
- * between the given interval and position. The delay option can be used to recognize multi-taps without firing
2024
- * a single tap.
2025
- *
2026
- * The eventData from the emitted event contains the property `tapCount`, which contains the amount of
2027
- * multi-taps being recognized.
2028
- * @constructor
2029
- * @extends Recognizer
2030
- */
2031
- function TapRecognizer() {
2032
- Recognizer.apply(this, arguments);
2033
-
2034
- // previous time and center,
2035
- // used for tap counting
2036
- this.pTime = false;
2037
- this.pCenter = false;
2038
-
2039
- this._timer = null;
2040
- this._input = null;
2041
- this.count = 0;
2042
- }
2043
-
2044
- inherit(TapRecognizer, Recognizer, {
2045
- /**
2046
- * @namespace
2047
- * @memberof PinchRecognizer
2048
- */
2049
- defaults: {
2050
- event: 'tap',
2051
- pointers: 1,
2052
- taps: 1,
2053
- interval: 300, // max time between the multi-tap taps
2054
- time: 250, // max time of the pointer to be down (like finger on the screen)
2055
- threshold: 9, // a minimal movement is ok, but keep it low
2056
- posThreshold: 10 // a multi-tap can be a bit off the initial position
2057
- },
2058
-
2059
- getTouchAction: function() {
2060
- return [TOUCH_ACTION_MANIPULATION];
2061
- },
2062
-
2063
- process: function(input) {
2064
- var options = this.options;
2065
-
2066
- var validPointers = input.pointers.length === options.pointers;
2067
- var validMovement = input.distance < options.threshold;
2068
- var validTouchTime = input.deltaTime < options.time;
2069
-
2070
- this.reset();
2071
-
2072
- if ((input.eventType & INPUT_START) && (this.count === 0)) {
2073
- return this.failTimeout();
2074
- }
2075
-
2076
- // we only allow little movement
2077
- // and we've reached an end event, so a tap is possible
2078
- if (validMovement && validTouchTime && validPointers) {
2079
- if (input.eventType != INPUT_END) {
2080
- return this.failTimeout();
2081
- }
2082
-
2083
- var validInterval = this.pTime ? (input.timeStamp - this.pTime < options.interval) : true;
2084
- var validMultiTap = !this.pCenter || getDistance(this.pCenter, input.center) < options.posThreshold;
2085
-
2086
- this.pTime = input.timeStamp;
2087
- this.pCenter = input.center;
2088
-
2089
- if (!validMultiTap || !validInterval) {
2090
- this.count = 1;
2091
- } else {
2092
- this.count += 1;
2093
- }
2094
-
2095
- this._input = input;
2096
-
2097
- // if tap count matches we have recognized it,
2098
- // else it has began recognizing...
2099
- var tapCount = this.count % options.taps;
2100
- if (tapCount === 0) {
2101
- // no failing requirements, immediately trigger the tap event
2102
- // or wait as long as the multitap interval to trigger
2103
- if (!this.hasRequireFailures()) {
2104
- return STATE_RECOGNIZED;
2105
- } else {
2106
- this._timer = setTimeoutContext(function() {
2107
- this.state = STATE_RECOGNIZED;
2108
- this.tryEmit();
2109
- }, options.interval, this);
2110
- return STATE_BEGAN;
2111
- }
2112
- }
2113
- }
2114
- return STATE_FAILED;
2115
- },
2116
-
2117
- failTimeout: function() {
2118
- this._timer = setTimeoutContext(function() {
2119
- this.state = STATE_FAILED;
2120
- }, this.options.interval, this);
2121
- return STATE_FAILED;
2122
- },
2123
-
2124
- reset: function() {
2125
- clearTimeout(this._timer);
2126
- },
2127
-
2128
- emit: function() {
2129
- if (this.state == STATE_RECOGNIZED) {
2130
- this._input.tapCount = this.count;
2131
- this.manager.emit(this.options.event, this._input);
2132
- }
2133
- }
2134
- });
2135
-
2136
- /**
2137
- * Simple way to create a manager with a default set of recognizers.
2138
- * @param {HTMLElement} element
2139
- * @param {Object} [options]
2140
- * @constructor
2141
- */
2142
- function Hammer(element, options) {
2143
- options = options || {};
2144
- options.recognizers = ifUndefined(options.recognizers, Hammer.defaults.preset);
2145
- return new Manager(element, options);
2146
- }
2147
-
2148
- /**
2149
- * @const {string}
2150
- */
2151
- Hammer.VERSION = '2.0.7';
2152
-
2153
- /**
2154
- * default settings
2155
- * @namespace
2156
- */
2157
- Hammer.defaults = {
2158
- /**
2159
- * set if DOM events are being triggered.
2160
- * But this is slower and unused by simple implementations, so disabled by default.
2161
- * @type {Boolean}
2162
- * @default false
2163
- */
2164
- domEvents: false,
2165
-
2166
- /**
2167
- * The value for the touchAction property/fallback.
2168
- * When set to `compute` it will magically set the correct value based on the added recognizers.
2169
- * @type {String}
2170
- * @default compute
2171
- */
2172
- touchAction: TOUCH_ACTION_COMPUTE,
2173
-
2174
- /**
2175
- * @type {Boolean}
2176
- * @default true
2177
- */
2178
- enable: true,
2179
-
2180
- /**
2181
- * EXPERIMENTAL FEATURE -- can be removed/changed
2182
- * Change the parent input target element.
2183
- * If Null, then it is being set the to main element.
2184
- * @type {Null|EventTarget}
2185
- * @default null
2186
- */
2187
- inputTarget: null,
2188
-
2189
- /**
2190
- * force an input class
2191
- * @type {Null|Function}
2192
- * @default null
2193
- */
2194
- inputClass: null,
2195
-
2196
- /**
2197
- * Default recognizer setup when calling `Hammer()`
2198
- * When creating a new Manager these will be skipped.
2199
- * @type {Array}
2200
- */
2201
- preset: [
2202
- // RecognizerClass, options, [recognizeWith, ...], [requireFailure, ...]
2203
- [RotateRecognizer, {enable: false}],
2204
- [PinchRecognizer, {enable: false}, ['rotate']],
2205
- [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],
2206
- [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],
2207
- [TapRecognizer],
2208
- [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],
2209
- [PressRecognizer]
2210
- ],
2211
-
2212
- /**
2213
- * Some CSS properties can be used to improve the working of Hammer.
2214
- * Add them to this method and they will be set when creating a new Manager.
2215
- * @namespace
2216
- */
2217
- cssProps: {
2218
- /**
2219
- * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
2220
- * @type {String}
2221
- * @default 'none'
2222
- */
2223
- userSelect: 'none',
2224
-
2225
- /**
2226
- * Disable the Windows Phone grippers when pressing an element.
2227
- * @type {String}
2228
- * @default 'none'
2229
- */
2230
- touchSelect: 'none',
2231
-
2232
- /**
2233
- * Disables the default callout shown when you touch and hold a touch target.
2234
- * On iOS, when you touch and hold a touch target such as a link, Safari displays
2235
- * a callout containing information about the link. This property allows you to disable that callout.
2236
- * @type {String}
2237
- * @default 'none'
2238
- */
2239
- touchCallout: 'none',
2240
-
2241
- /**
2242
- * Specifies whether zooming is enabled. Used by IE10>
2243
- * @type {String}
2244
- * @default 'none'
2245
- */
2246
- contentZooming: 'none',
2247
-
2248
- /**
2249
- * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
2250
- * @type {String}
2251
- * @default 'none'
2252
- */
2253
- userDrag: 'none',
2254
-
2255
- /**
2256
- * Overrides the highlight color shown when the user taps a link or a JavaScript
2257
- * clickable element in iOS. This property obeys the alpha value, if specified.
2258
- * @type {String}
2259
- * @default 'rgba(0,0,0,0)'
2260
- */
2261
- tapHighlightColor: 'rgba(0,0,0,0)'
2262
- }
2263
- };
2264
-
2265
- var STOP = 1;
2266
- var FORCED_STOP = 2;
2267
-
2268
- /**
2269
- * Manager
2270
- * @param {HTMLElement} element
2271
- * @param {Object} [options]
2272
- * @constructor
2273
- */
2274
- function Manager(element, options) {
2275
- this.options = assign({}, Hammer.defaults, options || {});
2276
-
2277
- this.options.inputTarget = this.options.inputTarget || element;
2278
-
2279
- this.handlers = {};
2280
- this.session = {};
2281
- this.recognizers = [];
2282
- this.oldCssProps = {};
2283
-
2284
- this.element = element;
2285
- this.input = createInputInstance(this);
2286
- this.touchAction = new TouchAction(this, this.options.touchAction);
2287
-
2288
- toggleCssProps(this, true);
2289
-
2290
- each(this.options.recognizers, function(item) {
2291
- var recognizer = this.add(new (item[0])(item[1]));
2292
- item[2] && recognizer.recognizeWith(item[2]);
2293
- item[3] && recognizer.requireFailure(item[3]);
2294
- }, this);
2295
- }
2296
-
2297
- Manager.prototype = {
2298
- /**
2299
- * set options
2300
- * @param {Object} options
2301
- * @returns {Manager}
2302
- */
2303
- set: function(options) {
2304
- assign(this.options, options);
2305
-
2306
- // Options that need a little more setup
2307
- if (options.touchAction) {
2308
- this.touchAction.update();
2309
- }
2310
- if (options.inputTarget) {
2311
- // Clean up existing event listeners and reinitialize
2312
- this.input.destroy();
2313
- this.input.target = options.inputTarget;
2314
- this.input.init();
2315
- }
2316
- return this;
2317
- },
2318
-
2319
- /**
2320
- * stop recognizing for this session.
2321
- * This session will be discarded, when a new [input]start event is fired.
2322
- * When forced, the recognizer cycle is stopped immediately.
2323
- * @param {Boolean} [force]
2324
- */
2325
- stop: function(force) {
2326
- this.session.stopped = force ? FORCED_STOP : STOP;
2327
- },
2328
-
2329
- /**
2330
- * run the recognizers!
2331
- * called by the inputHandler function on every movement of the pointers (touches)
2332
- * it walks through all the recognizers and tries to detect the gesture that is being made
2333
- * @param {Object} inputData
2334
- */
2335
- recognize: function(inputData) {
2336
- var session = this.session;
2337
- if (session.stopped) {
2338
- return;
2339
- }
2340
-
2341
- // run the touch-action polyfill
2342
- this.touchAction.preventDefaults(inputData);
2343
-
2344
- var recognizer;
2345
- var recognizers = this.recognizers;
2346
-
2347
- // this holds the recognizer that is being recognized.
2348
- // so the recognizer's state needs to be BEGAN, CHANGED, ENDED or RECOGNIZED
2349
- // if no recognizer is detecting a thing, it is set to `null`
2350
- var curRecognizer = session.curRecognizer;
2351
-
2352
- // reset when the last recognizer is recognized
2353
- // or when we're in a new session
2354
- if (!curRecognizer || (curRecognizer && curRecognizer.state & STATE_RECOGNIZED)) {
2355
- curRecognizer = session.curRecognizer = null;
2356
- }
2357
-
2358
- var i = 0;
2359
- while (i < recognizers.length) {
2360
- recognizer = recognizers[i];
2361
-
2362
- // find out if we are allowed try to recognize the input for this one.
2363
- // 1. allow if the session is NOT forced stopped (see the .stop() method)
2364
- // 2. allow if we still haven't recognized a gesture in this session, or the this recognizer is the one
2365
- // that is being recognized.
2366
- // 3. allow if the recognizer is allowed to run simultaneous with the current recognized recognizer.
2367
- // this can be setup with the `recognizeWith()` method on the recognizer.
2368
- if (session.stopped !== FORCED_STOP && ( // 1
2369
- !curRecognizer || recognizer == curRecognizer || // 2
2370
- recognizer.canRecognizeWith(curRecognizer))) { // 3
2371
- recognizer.recognize(inputData);
2372
- } else {
2373
- recognizer.reset();
2374
- }
2375
-
2376
- // if the recognizer has been recognizing the input as a valid gesture, we want to store this one as the
2377
- // current active recognizer. but only if we don't already have an active recognizer
2378
- if (!curRecognizer && recognizer.state & (STATE_BEGAN | STATE_CHANGED | STATE_ENDED)) {
2379
- curRecognizer = session.curRecognizer = recognizer;
2380
- }
2381
- i++;
2382
- }
2383
- },
2384
-
2385
- /**
2386
- * get a recognizer by its event name.
2387
- * @param {Recognizer|String} recognizer
2388
- * @returns {Recognizer|Null}
2389
- */
2390
- get: function(recognizer) {
2391
- if (recognizer instanceof Recognizer) {
2392
- return recognizer;
2393
- }
2394
-
2395
- var recognizers = this.recognizers;
2396
- for (var i = 0; i < recognizers.length; i++) {
2397
- if (recognizers[i].options.event == recognizer) {
2398
- return recognizers[i];
2399
- }
2400
- }
2401
- return null;
2402
- },
2403
-
2404
- /**
2405
- * add a recognizer to the manager
2406
- * existing recognizers with the same event name will be removed
2407
- * @param {Recognizer} recognizer
2408
- * @returns {Recognizer|Manager}
2409
- */
2410
- add: function(recognizer) {
2411
- if (invokeArrayArg(recognizer, 'add', this)) {
2412
- return this;
2413
- }
2414
-
2415
- // remove existing
2416
- var existing = this.get(recognizer.options.event);
2417
- if (existing) {
2418
- this.remove(existing);
2419
- }
2420
-
2421
- this.recognizers.push(recognizer);
2422
- recognizer.manager = this;
2423
-
2424
- this.touchAction.update();
2425
- return recognizer;
2426
- },
2427
-
2428
- /**
2429
- * remove a recognizer by name or instance
2430
- * @param {Recognizer|String} recognizer
2431
- * @returns {Manager}
2432
- */
2433
- remove: function(recognizer) {
2434
- if (invokeArrayArg(recognizer, 'remove', this)) {
2435
- return this;
2436
- }
2437
-
2438
- recognizer = this.get(recognizer);
2439
-
2440
- // let's make sure this recognizer exists
2441
- if (recognizer) {
2442
- var recognizers = this.recognizers;
2443
- var index = inArray(recognizers, recognizer);
2444
-
2445
- if (index !== -1) {
2446
- recognizers.splice(index, 1);
2447
- this.touchAction.update();
2448
- }
2449
- }
2450
-
2451
- return this;
2452
- },
2453
-
2454
- /**
2455
- * bind event
2456
- * @param {String} events
2457
- * @param {Function} handler
2458
- * @returns {EventEmitter} this
2459
- */
2460
- on: function(events, handler) {
2461
- if (events === undefined$1) {
2462
- return;
2463
- }
2464
- if (handler === undefined$1) {
2465
- return;
2466
- }
2467
-
2468
- var handlers = this.handlers;
2469
- each(splitStr(events), function(event) {
2470
- handlers[event] = handlers[event] || [];
2471
- handlers[event].push(handler);
2472
- });
2473
- return this;
2474
- },
2475
-
2476
- /**
2477
- * unbind event, leave emit blank to remove all handlers
2478
- * @param {String} events
2479
- * @param {Function} [handler]
2480
- * @returns {EventEmitter} this
2481
- */
2482
- off: function(events, handler) {
2483
- if (events === undefined$1) {
2484
- return;
2485
- }
2486
-
2487
- var handlers = this.handlers;
2488
- each(splitStr(events), function(event) {
2489
- if (!handler) {
2490
- delete handlers[event];
2491
- } else {
2492
- handlers[event] && handlers[event].splice(inArray(handlers[event], handler), 1);
2493
- }
2494
- });
2495
- return this;
2496
- },
2497
-
2498
- /**
2499
- * emit event to the listeners
2500
- * @param {String} event
2501
- * @param {Object} data
2502
- */
2503
- emit: function(event, data) {
2504
- // we also want to trigger dom events
2505
- if (this.options.domEvents) {
2506
- triggerDomEvent(event, data);
2507
- }
2508
-
2509
- // no handlers, so skip it all
2510
- var handlers = this.handlers[event] && this.handlers[event].slice();
2511
- if (!handlers || !handlers.length) {
2512
- return;
2513
- }
2514
-
2515
- data.type = event;
2516
- data.preventDefault = function() {
2517
- data.srcEvent.preventDefault();
2518
- };
2519
-
2520
- var i = 0;
2521
- while (i < handlers.length) {
2522
- handlers[i](data);
2523
- i++;
2524
- }
2525
- },
2526
-
2527
- /**
2528
- * destroy the manager and unbinds all events
2529
- * it doesn't unbind dom events, that is the user own responsibility
2530
- */
2531
- destroy: function() {
2532
- this.element && toggleCssProps(this, false);
2533
-
2534
- this.handlers = {};
2535
- this.session = {};
2536
- this.input.destroy();
2537
- this.element = null;
2538
- }
2539
- };
2540
-
2541
- /**
2542
- * add/remove the css properties as defined in manager.options.cssProps
2543
- * @param {Manager} manager
2544
- * @param {Boolean} add
2545
- */
2546
- function toggleCssProps(manager, add) {
2547
- var element = manager.element;
2548
- if (!element.style) {
2549
- return;
2550
- }
2551
- var prop;
2552
- each(manager.options.cssProps, function(value, name) {
2553
- prop = prefixed(element.style, name);
2554
- if (add) {
2555
- manager.oldCssProps[prop] = element.style[prop];
2556
- element.style[prop] = value;
2557
- } else {
2558
- element.style[prop] = manager.oldCssProps[prop] || '';
2559
- }
2560
- });
2561
- if (!add) {
2562
- manager.oldCssProps = {};
2563
- }
2564
- }
2565
-
2566
- /**
2567
- * trigger dom event
2568
- * @param {String} event
2569
- * @param {Object} data
2570
- */
2571
- function triggerDomEvent(event, data) {
2572
- var gestureEvent = document.createEvent('Event');
2573
- gestureEvent.initEvent(event, true, true);
2574
- gestureEvent.gesture = data;
2575
- data.target.dispatchEvent(gestureEvent);
2576
- }
2577
-
2578
- assign(Hammer, {
2579
- INPUT_START: INPUT_START,
2580
- INPUT_MOVE: INPUT_MOVE,
2581
- INPUT_END: INPUT_END,
2582
- INPUT_CANCEL: INPUT_CANCEL,
2583
-
2584
- STATE_POSSIBLE: STATE_POSSIBLE,
2585
- STATE_BEGAN: STATE_BEGAN,
2586
- STATE_CHANGED: STATE_CHANGED,
2587
- STATE_ENDED: STATE_ENDED,
2588
- STATE_RECOGNIZED: STATE_RECOGNIZED,
2589
- STATE_CANCELLED: STATE_CANCELLED,
2590
- STATE_FAILED: STATE_FAILED,
2591
-
2592
- DIRECTION_NONE: DIRECTION_NONE,
2593
- DIRECTION_LEFT: DIRECTION_LEFT,
2594
- DIRECTION_RIGHT: DIRECTION_RIGHT,
2595
- DIRECTION_UP: DIRECTION_UP,
2596
- DIRECTION_DOWN: DIRECTION_DOWN,
2597
- DIRECTION_HORIZONTAL: DIRECTION_HORIZONTAL,
2598
- DIRECTION_VERTICAL: DIRECTION_VERTICAL,
2599
- DIRECTION_ALL: DIRECTION_ALL,
2600
-
2601
- Manager: Manager,
2602
- Input: Input,
2603
- TouchAction: TouchAction,
2604
-
2605
- TouchInput: TouchInput,
2606
- MouseInput: MouseInput,
2607
- PointerEventInput: PointerEventInput,
2608
- TouchMouseInput: TouchMouseInput,
2609
- SingleTouchInput: SingleTouchInput,
2610
-
2611
- Recognizer: Recognizer,
2612
- AttrRecognizer: AttrRecognizer,
2613
- Tap: TapRecognizer,
2614
- Pan: PanRecognizer,
2615
- Swipe: SwipeRecognizer,
2616
- Pinch: PinchRecognizer,
2617
- Rotate: RotateRecognizer,
2618
- Press: PressRecognizer,
2619
-
2620
- on: addEventListeners,
2621
- off: removeEventListeners,
2622
- each: each,
2623
- merge: merge,
2624
- extend: extend,
2625
- assign: assign,
2626
- inherit: inherit,
2627
- bindFn: bindFn,
2628
- prefixed: prefixed
2629
- });
2630
-
2631
- // this prevents errors when Hammer is loaded in the presence of an AMD
2632
- // style loader but by script tag, not by the loader.
2633
- var freeGlobal = (typeof window !== 'undefined' ? window : (typeof self !== 'undefined' ? self : {})); // jshint ignore:line
2634
- freeGlobal.Hammer = Hammer;
2635
-
2636
- if (typeof undefined$1 === 'function' && undefined$1.amd) {
2637
- undefined$1(function() {
2638
- return Hammer;
2639
- });
2640
- } else if ('object' != 'undefined' && module.exports) {
2641
- module.exports = Hammer;
2642
- } else {
2643
- window[exportName] = Hammer;
2644
- }
2645
-
2646
- })(window, document, 'Hammer');
2647
- });
2648
-
2649
- export { hammer as h };