@zanichelli/albe-web-components 5.5.1 → 5.5.3

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