@paperless/core 0.1.0-alpha.335 → 0.1.0-alpha.337

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 (448) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/build/p-004340ec.entry.js +2 -0
  3. package/dist/build/{p-60b6c14b.entry.js.map → p-004340ec.entry.js.map} +1 -1
  4. package/dist/build/p-08483032.entry.js +2 -0
  5. package/dist/{paperless/p-3a1fa184.entry.js.map → build/p-08483032.entry.js.map} +1 -1
  6. package/dist/build/p-0b9838ca.entry.js +2 -0
  7. package/dist/build/{p-bf38e363.entry.js.map → p-0b9838ca.entry.js.map} +1 -1
  8. package/dist/build/p-0df2e4ba.entry.js +2 -0
  9. package/dist/build/{p-963d2b2a.entry.js.map → p-0df2e4ba.entry.js.map} +1 -1
  10. package/dist/build/p-0f3bd28b.entry.js +2 -0
  11. package/dist/build/{p-d774205e.entry.js.map → p-0f3bd28b.entry.js.map} +1 -1
  12. package/dist/build/p-11929d70.entry.js +2 -0
  13. package/dist/build/{p-7e654e16.entry.js.map → p-11929d70.entry.js.map} +1 -1
  14. package/dist/build/p-14012dc0.entry.js +2 -0
  15. package/dist/{paperless/p-b4616ed4.entry.js.map → build/p-14012dc0.entry.js.map} +1 -1
  16. package/dist/build/p-1bec22c6.entry.js +2 -0
  17. package/dist/build/{p-9f88e06d.entry.js.map → p-1bec22c6.entry.js.map} +1 -1
  18. package/dist/build/p-1c2cc466.entry.js +2 -0
  19. package/dist/build/{p-6a65767e.entry.js.map → p-1c2cc466.entry.js.map} +1 -1
  20. package/dist/build/{p-c1e7b677.entry.js → p-268227ff.entry.js} +2 -2
  21. package/dist/build/{p-c1e7b677.entry.js.map → p-268227ff.entry.js.map} +0 -0
  22. package/dist/build/{p-9066d04f.entry.js → p-2e81ae6a.entry.js} +2 -2
  23. package/dist/build/{p-9066d04f.entry.js.map → p-2e81ae6a.entry.js.map} +1 -1
  24. package/dist/build/p-3e858d20.entry.js +2 -0
  25. package/dist/build/{p-a5eb1757.entry.js.map → p-3e858d20.entry.js.map} +1 -1
  26. package/dist/build/{p-06c0c17c.entry.js → p-4c3d6a7f.entry.js} +2 -2
  27. package/dist/build/{p-06c0c17c.entry.js.map → p-4c3d6a7f.entry.js.map} +0 -0
  28. package/dist/build/p-53569897.entry.js +2 -0
  29. package/dist/{paperless/p-ad5ba47b.entry.js.map → build/p-53569897.entry.js.map} +1 -1
  30. package/dist/build/p-594d1cf6.entry.js +2 -0
  31. package/dist/build/{p-a6576739.entry.js.map → p-594d1cf6.entry.js.map} +1 -1
  32. package/dist/build/p-5dfab26d.entry.js +2 -0
  33. package/dist/build/{p-a206e4cd.entry.js.map → p-5dfab26d.entry.js.map} +1 -1
  34. package/dist/build/p-8120c40f.entry.js +2 -0
  35. package/dist/build/{p-0065fc80.entry.js.map → p-8120c40f.entry.js.map} +1 -1
  36. package/dist/build/{p-eba0b0a5.entry.js → p-a0a27d24.entry.js} +2 -2
  37. package/dist/build/{p-eba0b0a5.entry.js.map → p-a0a27d24.entry.js.map} +0 -0
  38. package/dist/build/p-a0d40482.entry.js +2 -0
  39. package/dist/build/{p-649b1a0a.entry.js.map → p-a0d40482.entry.js.map} +1 -1
  40. package/dist/build/p-a134db32.entry.js +2 -0
  41. package/dist/build/{p-745b9852.entry.js.map → p-a134db32.entry.js.map} +1 -1
  42. package/dist/build/p-a46af8b4.entry.js +2 -0
  43. package/dist/{paperless/p-04fe2be7.entry.js.map → build/p-a46af8b4.entry.js.map} +1 -1
  44. package/dist/build/p-a6313ca8.entry.js +2 -0
  45. package/dist/build/{p-11e2e81c.entry.js.map → p-a6313ca8.entry.js.map} +1 -1
  46. package/dist/build/p-b131d8d5.entry.js +2 -0
  47. package/dist/build/{p-c770eac3.entry.js.map → p-b131d8d5.entry.js.map} +1 -1
  48. package/dist/build/p-b2af2dd2.entry.js +2 -0
  49. package/dist/build/{p-ba02ea5b.entry.js.map → p-b2af2dd2.entry.js.map} +1 -1
  50. package/dist/build/p-bd13aa1f.entry.js +2 -0
  51. package/dist/{paperless/p-97ea9ebe.entry.js.map → build/p-bd13aa1f.entry.js.map} +1 -1
  52. package/dist/{paperless/p-94cf7d35.entry.js → build/p-beb1c18f.entry.js} +2 -2
  53. package/dist/{paperless/p-94cf7d35.entry.js.map → build/p-beb1c18f.entry.js.map} +1 -1
  54. package/dist/build/p-bff2caf8.entry.js +2 -0
  55. package/dist/build/{p-9dc6f147.entry.js.map → p-bff2caf8.entry.js.map} +1 -1
  56. package/dist/{paperless/p-da62f3c0.entry.js → build/p-d3485dca.entry.js} +2 -2
  57. package/dist/build/{p-da62f3c0.entry.js.map → p-d3485dca.entry.js.map} +1 -1
  58. package/dist/build/p-e35b3886.entry.js +2 -0
  59. package/dist/build/{p-eee779b4.entry.js.map → p-e35b3886.entry.js.map} +1 -1
  60. package/dist/build/p-e6227583.entry.js +2 -0
  61. package/dist/build/{p-b4121a02.entry.js.map → p-e6227583.entry.js.map} +1 -1
  62. package/dist/build/p-f518e8b6.entry.js +2 -0
  63. package/dist/build/{p-32ce71f9.entry.js.map → p-f518e8b6.entry.js.map} +1 -1
  64. package/dist/build/paperless.css +1 -1
  65. package/dist/build/paperless.esm.js +1 -1
  66. package/dist/cjs/p-accordion.cjs.entry.js +1 -1
  67. package/dist/cjs/p-accordion.cjs.entry.js.map +1 -1
  68. package/dist/cjs/p-avatar.cjs.entry.js +1 -1
  69. package/dist/cjs/p-backdrop.cjs.entry.js +1 -1
  70. package/dist/cjs/p-backdrop.cjs.entry.js.map +1 -1
  71. package/dist/cjs/p-button_3.cjs.entry.js +3 -3
  72. package/dist/cjs/p-button_3.cjs.entry.js.map +1 -1
  73. package/dist/cjs/p-calendar.cjs.entry.js +1 -1
  74. package/dist/cjs/p-calendar.cjs.entry.js.map +1 -1
  75. package/dist/cjs/p-card-header.cjs.entry.js +1 -1
  76. package/dist/cjs/p-card-header.cjs.entry.js.map +1 -1
  77. package/dist/cjs/p-content-slider.cjs.entry.js +1 -1
  78. package/dist/cjs/p-counter.cjs.entry.js +1 -1
  79. package/dist/cjs/p-counter.cjs.entry.js.map +1 -1
  80. package/dist/cjs/p-datepicker.cjs.entry.js +1 -1
  81. package/dist/cjs/p-datepicker.cjs.entry.js.map +1 -1
  82. package/dist/cjs/p-divider.cjs.entry.js +1 -1
  83. package/dist/cjs/p-divider.cjs.entry.js.map +1 -1
  84. package/dist/cjs/p-drawer-body_3.cjs.entry.js +3 -3
  85. package/dist/cjs/p-drawer-body_3.cjs.entry.js.map +1 -1
  86. package/dist/cjs/p-drawer.cjs.entry.js +1 -1
  87. package/dist/cjs/p-drawer.cjs.entry.js.map +1 -1
  88. package/dist/cjs/p-dropdown-menu-container.cjs.entry.js +1 -1
  89. package/dist/cjs/p-dropdown-menu-container.cjs.entry.js.map +1 -1
  90. package/dist/cjs/p-dropdown_2.cjs.entry.js +2 -2
  91. package/dist/cjs/p-dropdown_2.cjs.entry.js.map +1 -1
  92. package/dist/cjs/p-helper_3.cjs.entry.js +3 -3
  93. package/dist/cjs/p-helper_3.cjs.entry.js.map +1 -1
  94. package/dist/cjs/p-illustration_6.cjs.entry.js +5 -5
  95. package/dist/cjs/p-illustration_6.cjs.entry.js.map +1 -1
  96. package/dist/cjs/p-info-panel.cjs.entry.js +1 -1
  97. package/dist/cjs/p-info-panel.cjs.entry.js.map +1 -1
  98. package/dist/cjs/p-label_3.cjs.entry.js +3 -3
  99. package/dist/cjs/p-label_3.cjs.entry.js.map +1 -1
  100. package/dist/cjs/p-layout.cjs.entry.js +1 -1
  101. package/dist/cjs/p-layout.cjs.entry.js.map +1 -1
  102. package/dist/cjs/p-modal-body_4.cjs.entry.js +4 -4
  103. package/dist/cjs/p-modal-body_4.cjs.entry.js.map +1 -1
  104. package/dist/cjs/p-navbar.cjs.entry.js +1 -1
  105. package/dist/cjs/p-navbar.cjs.entry.js.map +1 -1
  106. package/dist/cjs/p-navigation-item.cjs.entry.js +1 -1
  107. package/dist/cjs/p-navigation-item.cjs.entry.js.map +1 -1
  108. package/dist/cjs/p-page-size-select_3.cjs.entry.js +2 -2
  109. package/dist/cjs/p-page-size-select_3.cjs.entry.js.map +1 -1
  110. package/dist/cjs/p-profile.cjs.entry.js +1 -1
  111. package/dist/cjs/p-profile.cjs.entry.js.map +1 -1
  112. package/dist/cjs/p-select.cjs.entry.js +1 -1
  113. package/dist/cjs/p-select.cjs.entry.js.map +1 -1
  114. package/dist/cjs/p-status.cjs.entry.js +1 -1
  115. package/dist/cjs/p-status.cjs.entry.js.map +1 -1
  116. package/dist/cjs/p-stepper-item_2.cjs.entry.js +2 -2
  117. package/dist/cjs/p-stepper-item_2.cjs.entry.js.map +1 -1
  118. package/dist/cjs/p-stepper.cjs.entry.js +1 -1
  119. package/dist/cjs/p-stepper.cjs.entry.js.map +1 -1
  120. package/dist/cjs/p-tab-item.cjs.entry.js +1 -1
  121. package/dist/cjs/p-table.cjs.entry.js +1 -1
  122. package/dist/cjs/p-table.cjs.entry.js.map +1 -1
  123. package/dist/cjs/p-toast.cjs.entry.js +1 -1
  124. package/dist/cjs/p-toast.cjs.entry.js.map +1 -1
  125. package/dist/collection/components/atoms/avatar/avatar.component.css +1 -1
  126. package/dist/collection/components/atoms/backdrop/backdrop.component.css +1 -1
  127. package/dist/collection/components/atoms/button/button.component.css +1 -1
  128. package/dist/collection/components/atoms/card-header/card-header.component.css +1 -1
  129. package/dist/collection/components/atoms/counter/counter.component.css +1 -1
  130. package/dist/collection/components/atoms/divider/divider.component.css +1 -1
  131. package/dist/collection/components/atoms/drawer-body/drawer-body.component.css +1 -1
  132. package/dist/collection/components/atoms/drawer-container/drawer-container.component.css +1 -1
  133. package/dist/collection/components/atoms/drawer-header/drawer-header.component.css +1 -1
  134. package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.css +1 -1
  135. package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +1 -1
  136. package/dist/collection/components/atoms/helper/helper.component.css +1 -1
  137. package/dist/collection/components/atoms/icon/icon.component.css +1 -1
  138. package/dist/collection/components/atoms/info-panel/info-panel.component.css +1 -1
  139. package/dist/collection/components/atoms/label/label.component.css +1 -1
  140. package/dist/collection/components/atoms/layout/layout.component.css +1 -1
  141. package/dist/collection/components/atoms/loader/loader.component.css +1 -1
  142. package/dist/collection/components/atoms/modal-body/modal-body.component.css +1 -1
  143. package/dist/collection/components/atoms/modal-container/modal-container.component.css +1 -1
  144. package/dist/collection/components/atoms/modal-footer/modal-footer.component.css +1 -1
  145. package/dist/collection/components/atoms/modal-header/modal-header.component.css +1 -1
  146. package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +1 -1
  147. package/dist/collection/components/atoms/segment-container/segment-container.component.css +1 -1
  148. package/dist/collection/components/atoms/segment-item/segment-item.component.css +1 -1
  149. package/dist/collection/components/atoms/status/status.component.css +1 -1
  150. package/dist/collection/components/atoms/stepper-item/stepper-item.component.css +1 -1
  151. package/dist/collection/components/atoms/stepper-line/stepper-line.component.css +1 -1
  152. package/dist/collection/components/atoms/tab-item/tab-item.component.css +1 -1
  153. package/dist/collection/components/atoms/table-container/table-container.component.css +1 -1
  154. package/dist/collection/components/atoms/tooltip/tooltip.component.css +1 -1
  155. package/dist/collection/components/molecules/accordion/accordion.component.css +1 -1
  156. package/dist/collection/components/molecules/calendar/calendar.component.css +1 -1
  157. package/dist/collection/components/molecules/content-slider/content-slider.component.css +1 -1
  158. package/dist/collection/components/molecules/datepicker/datepicker.component.css +1 -1
  159. package/dist/collection/components/molecules/dropdown/dropdown.component.css +1 -1
  160. package/dist/collection/components/molecules/input-group/input-group.component.css +1 -1
  161. package/dist/collection/components/molecules/navigation-item/navigation-item.component.css +1 -1
  162. package/dist/collection/components/molecules/pagination/pagination.component.css +1 -1
  163. package/dist/collection/components/molecules/profile/profile.component.css +1 -1
  164. package/dist/collection/components/molecules/select/select.component.css +1 -1
  165. package/dist/collection/components/molecules/stepper/stepper.component.css +1 -1
  166. package/dist/collection/components/molecules/table-cell/table-cell.component.css +1 -1
  167. package/dist/collection/components/molecules/table-footer/table-footer.component.css +1 -1
  168. package/dist/collection/components/molecules/table-header/table-header.component.css +1 -1
  169. package/dist/collection/components/molecules/table-row/table-row.component.css +1 -1
  170. package/dist/collection/components/molecules/toast/toast.component.css +1 -1
  171. package/dist/collection/components/organisms/drawer/drawer.component.css +1 -1
  172. package/dist/collection/components/organisms/navbar/navbar.component.css +1 -1
  173. package/dist/collection/components/organisms/table/table.component.css +1 -1
  174. package/dist/components/backdrop.component.js +1 -1
  175. package/dist/components/backdrop.component.js.map +1 -1
  176. package/dist/components/button.component.js +1 -1
  177. package/dist/components/button.component.js.map +1 -1
  178. package/dist/components/calendar.component.js +1 -1
  179. package/dist/components/calendar.component.js.map +1 -1
  180. package/dist/components/counter.component.js +1 -1
  181. package/dist/components/counter.component.js.map +1 -1
  182. package/dist/components/divider.component.js +1 -1
  183. package/dist/components/divider.component.js.map +1 -1
  184. package/dist/components/drawer-body.component.js +1 -1
  185. package/dist/components/drawer-body.component.js.map +1 -1
  186. package/dist/components/drawer-container.component.js +1 -1
  187. package/dist/components/drawer-container.component.js.map +1 -1
  188. package/dist/components/drawer-header.component.js +1 -1
  189. package/dist/components/drawer-header.component.js.map +1 -1
  190. package/dist/components/dropdown-menu-container.component.js +1 -1
  191. package/dist/components/dropdown-menu-container.component.js.map +1 -1
  192. package/dist/components/dropdown-menu-item.component.js +1 -1
  193. package/dist/components/dropdown-menu-item.component.js.map +1 -1
  194. package/dist/components/dropdown.component.js +1 -1
  195. package/dist/components/dropdown.component.js.map +1 -1
  196. package/dist/components/helper.component.js +1 -1
  197. package/dist/components/helper.component.js.map +1 -1
  198. package/dist/components/icon.component.js +1 -1
  199. package/dist/components/icon.component.js.map +1 -1
  200. package/dist/components/input-group.component.js +1 -1
  201. package/dist/components/input-group.component.js.map +1 -1
  202. package/dist/components/label.component.js +1 -1
  203. package/dist/components/label.component.js.map +1 -1
  204. package/dist/components/loader.component.js +1 -1
  205. package/dist/components/loader.component.js.map +1 -1
  206. package/dist/components/modal-body.component.js +1 -1
  207. package/dist/components/modal-body.component.js.map +1 -1
  208. package/dist/components/modal-container.component.js +1 -1
  209. package/dist/components/modal-container.component.js.map +1 -1
  210. package/dist/components/modal-footer.component.js +1 -1
  211. package/dist/components/modal-footer.component.js.map +1 -1
  212. package/dist/components/modal-header.component.js +1 -1
  213. package/dist/components/modal-header.component.js.map +1 -1
  214. package/dist/components/p-accordion.js +1 -1
  215. package/dist/components/p-accordion.js.map +1 -1
  216. package/dist/components/p-avatar.js +1 -1
  217. package/dist/components/p-card-header.js +1 -1
  218. package/dist/components/p-card-header.js.map +1 -1
  219. package/dist/components/p-content-slider.js +1 -1
  220. package/dist/components/p-datepicker.js +1 -1
  221. package/dist/components/p-datepicker.js.map +1 -1
  222. package/dist/components/p-drawer.js +1 -1
  223. package/dist/components/p-drawer.js.map +1 -1
  224. package/dist/components/p-info-panel.js +1 -1
  225. package/dist/components/p-info-panel.js.map +1 -1
  226. package/dist/components/p-layout.js +1 -1
  227. package/dist/components/p-layout.js.map +1 -1
  228. package/dist/components/p-navbar.js +1 -1
  229. package/dist/components/p-navbar.js.map +1 -1
  230. package/dist/components/p-navigation-item.js +1 -1
  231. package/dist/components/p-navigation-item.js.map +1 -1
  232. package/dist/components/p-profile.js +1 -1
  233. package/dist/components/p-profile.js.map +1 -1
  234. package/dist/components/p-select.js +1 -1
  235. package/dist/components/p-select.js.map +1 -1
  236. package/dist/components/p-status.js +1 -1
  237. package/dist/components/p-status.js.map +1 -1
  238. package/dist/components/p-stepper.js +1 -1
  239. package/dist/components/p-stepper.js.map +1 -1
  240. package/dist/components/p-tab-item.js +1 -1
  241. package/dist/components/p-table.js +1 -1
  242. package/dist/components/p-table.js.map +1 -1
  243. package/dist/components/p-toast.js +1 -1
  244. package/dist/components/p-toast.js.map +1 -1
  245. package/dist/components/pagination-item.component.js +1 -1
  246. package/dist/components/pagination-item.component.js.map +1 -1
  247. package/dist/components/pagination.component.js +1 -1
  248. package/dist/components/pagination.component.js.map +1 -1
  249. package/dist/components/segment-container.component.js +1 -1
  250. package/dist/components/segment-container.component.js.map +1 -1
  251. package/dist/components/segment-item.component.js +1 -1
  252. package/dist/components/segment-item.component.js.map +1 -1
  253. package/dist/components/stepper-item.component.js +1 -1
  254. package/dist/components/stepper-item.component.js.map +1 -1
  255. package/dist/components/stepper-line.component.js +1 -1
  256. package/dist/components/stepper-line.component.js.map +1 -1
  257. package/dist/components/table-cell.component.js +1 -1
  258. package/dist/components/table-cell.component.js.map +1 -1
  259. package/dist/components/table-container.component.js +1 -1
  260. package/dist/components/table-container.component.js.map +1 -1
  261. package/dist/components/table-footer.component.js +1 -1
  262. package/dist/components/table-footer.component.js.map +1 -1
  263. package/dist/components/table-header.component.js +1 -1
  264. package/dist/components/table-header.component.js.map +1 -1
  265. package/dist/components/table-row.component.js +1 -1
  266. package/dist/components/table-row.component.js.map +1 -1
  267. package/dist/components/tooltip.component.js +1 -1
  268. package/dist/components/tooltip.component.js.map +1 -1
  269. package/dist/esm/p-accordion.entry.js +1 -1
  270. package/dist/esm/p-accordion.entry.js.map +1 -1
  271. package/dist/esm/p-avatar.entry.js +1 -1
  272. package/dist/esm/p-backdrop.entry.js +1 -1
  273. package/dist/esm/p-backdrop.entry.js.map +1 -1
  274. package/dist/esm/p-button_3.entry.js +3 -3
  275. package/dist/esm/p-button_3.entry.js.map +1 -1
  276. package/dist/esm/p-calendar.entry.js +1 -1
  277. package/dist/esm/p-calendar.entry.js.map +1 -1
  278. package/dist/esm/p-card-header.entry.js +1 -1
  279. package/dist/esm/p-card-header.entry.js.map +1 -1
  280. package/dist/esm/p-content-slider.entry.js +1 -1
  281. package/dist/esm/p-counter.entry.js +1 -1
  282. package/dist/esm/p-counter.entry.js.map +1 -1
  283. package/dist/esm/p-datepicker.entry.js +1 -1
  284. package/dist/esm/p-datepicker.entry.js.map +1 -1
  285. package/dist/esm/p-divider.entry.js +1 -1
  286. package/dist/esm/p-divider.entry.js.map +1 -1
  287. package/dist/esm/p-drawer-body_3.entry.js +3 -3
  288. package/dist/esm/p-drawer-body_3.entry.js.map +1 -1
  289. package/dist/esm/p-drawer.entry.js +1 -1
  290. package/dist/esm/p-drawer.entry.js.map +1 -1
  291. package/dist/esm/p-dropdown-menu-container.entry.js +1 -1
  292. package/dist/esm/p-dropdown-menu-container.entry.js.map +1 -1
  293. package/dist/esm/p-dropdown_2.entry.js +2 -2
  294. package/dist/esm/p-dropdown_2.entry.js.map +1 -1
  295. package/dist/esm/p-helper_3.entry.js +3 -3
  296. package/dist/esm/p-helper_3.entry.js.map +1 -1
  297. package/dist/esm/p-illustration_6.entry.js +5 -5
  298. package/dist/esm/p-illustration_6.entry.js.map +1 -1
  299. package/dist/esm/p-info-panel.entry.js +1 -1
  300. package/dist/esm/p-info-panel.entry.js.map +1 -1
  301. package/dist/esm/p-label_3.entry.js +3 -3
  302. package/dist/esm/p-label_3.entry.js.map +1 -1
  303. package/dist/esm/p-layout.entry.js +1 -1
  304. package/dist/esm/p-layout.entry.js.map +1 -1
  305. package/dist/esm/p-modal-body_4.entry.js +4 -4
  306. package/dist/esm/p-modal-body_4.entry.js.map +1 -1
  307. package/dist/esm/p-navbar.entry.js +1 -1
  308. package/dist/esm/p-navbar.entry.js.map +1 -1
  309. package/dist/esm/p-navigation-item.entry.js +1 -1
  310. package/dist/esm/p-navigation-item.entry.js.map +1 -1
  311. package/dist/esm/p-page-size-select_3.entry.js +2 -2
  312. package/dist/esm/p-page-size-select_3.entry.js.map +1 -1
  313. package/dist/esm/p-profile.entry.js +1 -1
  314. package/dist/esm/p-profile.entry.js.map +1 -1
  315. package/dist/esm/p-select.entry.js +1 -1
  316. package/dist/esm/p-select.entry.js.map +1 -1
  317. package/dist/esm/p-status.entry.js +1 -1
  318. package/dist/esm/p-status.entry.js.map +1 -1
  319. package/dist/esm/p-stepper-item_2.entry.js +2 -2
  320. package/dist/esm/p-stepper-item_2.entry.js.map +1 -1
  321. package/dist/esm/p-stepper.entry.js +1 -1
  322. package/dist/esm/p-stepper.entry.js.map +1 -1
  323. package/dist/esm/p-tab-item.entry.js +1 -1
  324. package/dist/esm/p-table.entry.js +1 -1
  325. package/dist/esm/p-table.entry.js.map +1 -1
  326. package/dist/esm/p-toast.entry.js +1 -1
  327. package/dist/esm/p-toast.entry.js.map +1 -1
  328. package/dist/index.html +1 -1
  329. package/dist/paperless/p-004340ec.entry.js +2 -0
  330. package/dist/paperless/{p-60b6c14b.entry.js.map → p-004340ec.entry.js.map} +1 -1
  331. package/dist/paperless/p-08483032.entry.js +2 -0
  332. package/dist/{build/p-3a1fa184.entry.js.map → paperless/p-08483032.entry.js.map} +1 -1
  333. package/dist/paperless/p-0b9838ca.entry.js +2 -0
  334. package/dist/paperless/{p-bf38e363.entry.js.map → p-0b9838ca.entry.js.map} +1 -1
  335. package/dist/paperless/p-0df2e4ba.entry.js +2 -0
  336. package/dist/paperless/{p-963d2b2a.entry.js.map → p-0df2e4ba.entry.js.map} +1 -1
  337. package/dist/paperless/p-0f3bd28b.entry.js +2 -0
  338. package/dist/paperless/{p-d774205e.entry.js.map → p-0f3bd28b.entry.js.map} +1 -1
  339. package/dist/paperless/p-11929d70.entry.js +2 -0
  340. package/dist/paperless/{p-7e654e16.entry.js.map → p-11929d70.entry.js.map} +1 -1
  341. package/dist/paperless/p-14012dc0.entry.js +2 -0
  342. package/dist/{build/p-b4616ed4.entry.js.map → paperless/p-14012dc0.entry.js.map} +1 -1
  343. package/dist/paperless/p-1bec22c6.entry.js +2 -0
  344. package/dist/paperless/{p-9f88e06d.entry.js.map → p-1bec22c6.entry.js.map} +1 -1
  345. package/dist/paperless/p-1c2cc466.entry.js +2 -0
  346. package/dist/paperless/{p-6a65767e.entry.js.map → p-1c2cc466.entry.js.map} +1 -1
  347. package/dist/paperless/{p-c1e7b677.entry.js → p-268227ff.entry.js} +2 -2
  348. package/dist/paperless/{p-c1e7b677.entry.js.map → p-268227ff.entry.js.map} +0 -0
  349. package/dist/paperless/{p-9066d04f.entry.js → p-2e81ae6a.entry.js} +2 -2
  350. package/dist/paperless/{p-9066d04f.entry.js.map → p-2e81ae6a.entry.js.map} +1 -1
  351. package/dist/paperless/p-3e858d20.entry.js +2 -0
  352. package/dist/paperless/{p-a5eb1757.entry.js.map → p-3e858d20.entry.js.map} +1 -1
  353. package/dist/paperless/{p-06c0c17c.entry.js → p-4c3d6a7f.entry.js} +2 -2
  354. package/dist/paperless/{p-06c0c17c.entry.js.map → p-4c3d6a7f.entry.js.map} +0 -0
  355. package/dist/paperless/p-53569897.entry.js +2 -0
  356. package/dist/{build/p-ad5ba47b.entry.js.map → paperless/p-53569897.entry.js.map} +1 -1
  357. package/dist/paperless/p-594d1cf6.entry.js +2 -0
  358. package/dist/paperless/{p-a6576739.entry.js.map → p-594d1cf6.entry.js.map} +1 -1
  359. package/dist/paperless/p-5dfab26d.entry.js +2 -0
  360. package/dist/paperless/{p-a206e4cd.entry.js.map → p-5dfab26d.entry.js.map} +1 -1
  361. package/dist/paperless/p-8120c40f.entry.js +2 -0
  362. package/dist/paperless/{p-0065fc80.entry.js.map → p-8120c40f.entry.js.map} +1 -1
  363. package/dist/paperless/{p-eba0b0a5.entry.js → p-a0a27d24.entry.js} +2 -2
  364. package/dist/paperless/{p-eba0b0a5.entry.js.map → p-a0a27d24.entry.js.map} +0 -0
  365. package/dist/paperless/p-a0d40482.entry.js +2 -0
  366. package/dist/paperless/{p-649b1a0a.entry.js.map → p-a0d40482.entry.js.map} +1 -1
  367. package/dist/paperless/p-a134db32.entry.js +2 -0
  368. package/dist/paperless/{p-745b9852.entry.js.map → p-a134db32.entry.js.map} +1 -1
  369. package/dist/paperless/p-a46af8b4.entry.js +2 -0
  370. package/dist/{build/p-04fe2be7.entry.js.map → paperless/p-a46af8b4.entry.js.map} +1 -1
  371. package/dist/paperless/p-a6313ca8.entry.js +2 -0
  372. package/dist/paperless/{p-11e2e81c.entry.js.map → p-a6313ca8.entry.js.map} +1 -1
  373. package/dist/paperless/p-b131d8d5.entry.js +2 -0
  374. package/dist/paperless/{p-c770eac3.entry.js.map → p-b131d8d5.entry.js.map} +1 -1
  375. package/dist/paperless/p-b2af2dd2.entry.js +2 -0
  376. package/dist/paperless/{p-ba02ea5b.entry.js.map → p-b2af2dd2.entry.js.map} +1 -1
  377. package/dist/paperless/p-bd13aa1f.entry.js +2 -0
  378. package/dist/{build/p-97ea9ebe.entry.js.map → paperless/p-bd13aa1f.entry.js.map} +1 -1
  379. package/dist/{build/p-94cf7d35.entry.js → paperless/p-beb1c18f.entry.js} +2 -2
  380. package/dist/{build/p-94cf7d35.entry.js.map → paperless/p-beb1c18f.entry.js.map} +1 -1
  381. package/dist/paperless/p-bff2caf8.entry.js +2 -0
  382. package/dist/paperless/{p-9dc6f147.entry.js.map → p-bff2caf8.entry.js.map} +1 -1
  383. package/dist/{build/p-da62f3c0.entry.js → paperless/p-d3485dca.entry.js} +2 -2
  384. package/dist/paperless/{p-da62f3c0.entry.js.map → p-d3485dca.entry.js.map} +1 -1
  385. package/dist/paperless/p-e35b3886.entry.js +2 -0
  386. package/dist/paperless/{p-eee779b4.entry.js.map → p-e35b3886.entry.js.map} +1 -1
  387. package/dist/paperless/p-e6227583.entry.js +2 -0
  388. package/dist/paperless/{p-b4121a02.entry.js.map → p-e6227583.entry.js.map} +1 -1
  389. package/dist/paperless/p-f518e8b6.entry.js +2 -0
  390. package/dist/paperless/{p-32ce71f9.entry.js.map → p-f518e8b6.entry.js.map} +1 -1
  391. package/dist/paperless/paperless.css +43 -43
  392. package/dist/paperless/paperless.esm.js +1 -1
  393. package/dist/sw.js +1 -1
  394. package/dist/sw.js.map +1 -1
  395. package/hydrate/index.d.ts +218 -0
  396. package/hydrate/index.js +22443 -0
  397. package/hydrate/package.json +6 -0
  398. package/package.json +4 -3
  399. package/dist/build/p-0065fc80.entry.js +0 -2
  400. package/dist/build/p-04fe2be7.entry.js +0 -2
  401. package/dist/build/p-11e2e81c.entry.js +0 -2
  402. package/dist/build/p-32ce71f9.entry.js +0 -2
  403. package/dist/build/p-3a1fa184.entry.js +0 -2
  404. package/dist/build/p-60b6c14b.entry.js +0 -2
  405. package/dist/build/p-649b1a0a.entry.js +0 -2
  406. package/dist/build/p-6a65767e.entry.js +0 -2
  407. package/dist/build/p-745b9852.entry.js +0 -2
  408. package/dist/build/p-7e654e16.entry.js +0 -2
  409. package/dist/build/p-963d2b2a.entry.js +0 -2
  410. package/dist/build/p-97ea9ebe.entry.js +0 -2
  411. package/dist/build/p-9dc6f147.entry.js +0 -2
  412. package/dist/build/p-9f88e06d.entry.js +0 -2
  413. package/dist/build/p-a206e4cd.entry.js +0 -2
  414. package/dist/build/p-a5eb1757.entry.js +0 -2
  415. package/dist/build/p-a6576739.entry.js +0 -2
  416. package/dist/build/p-ad5ba47b.entry.js +0 -2
  417. package/dist/build/p-b4121a02.entry.js +0 -2
  418. package/dist/build/p-b4616ed4.entry.js +0 -2
  419. package/dist/build/p-ba02ea5b.entry.js +0 -2
  420. package/dist/build/p-bf38e363.entry.js +0 -2
  421. package/dist/build/p-c770eac3.entry.js +0 -2
  422. package/dist/build/p-d774205e.entry.js +0 -2
  423. package/dist/build/p-eee779b4.entry.js +0 -2
  424. package/dist/paperless/p-0065fc80.entry.js +0 -2
  425. package/dist/paperless/p-04fe2be7.entry.js +0 -2
  426. package/dist/paperless/p-11e2e81c.entry.js +0 -2
  427. package/dist/paperless/p-32ce71f9.entry.js +0 -2
  428. package/dist/paperless/p-3a1fa184.entry.js +0 -2
  429. package/dist/paperless/p-60b6c14b.entry.js +0 -2
  430. package/dist/paperless/p-649b1a0a.entry.js +0 -2
  431. package/dist/paperless/p-6a65767e.entry.js +0 -2
  432. package/dist/paperless/p-745b9852.entry.js +0 -2
  433. package/dist/paperless/p-7e654e16.entry.js +0 -2
  434. package/dist/paperless/p-963d2b2a.entry.js +0 -2
  435. package/dist/paperless/p-97ea9ebe.entry.js +0 -2
  436. package/dist/paperless/p-9dc6f147.entry.js +0 -2
  437. package/dist/paperless/p-9f88e06d.entry.js +0 -2
  438. package/dist/paperless/p-a206e4cd.entry.js +0 -2
  439. package/dist/paperless/p-a5eb1757.entry.js +0 -2
  440. package/dist/paperless/p-a6576739.entry.js +0 -2
  441. package/dist/paperless/p-ad5ba47b.entry.js +0 -2
  442. package/dist/paperless/p-b4121a02.entry.js +0 -2
  443. package/dist/paperless/p-b4616ed4.entry.js +0 -2
  444. package/dist/paperless/p-ba02ea5b.entry.js +0 -2
  445. package/dist/paperless/p-bf38e363.entry.js +0 -2
  446. package/dist/paperless/p-c770eac3.entry.js +0 -2
  447. package/dist/paperless/p-d774205e.entry.js +0 -2
  448. package/dist/paperless/p-eee779b4.entry.js +0 -2
@@ -0,0 +1,2 @@
1
+ import{r as t,h as a,H as r,g as e}from"./p-69d43b9d.js";const o='.visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.mt-0{margin-top:0!important}.mt-6{margin-top:1.5rem!important}.block{display:block!important}.inline{display:inline!important}.flex{display:flex!important}.table{display:table!important}.table-cell{display:table-cell!important}.table-row{display:table-row!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-px{height:1px!important}.w-1{width:.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-auto{width:auto!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-3{gap:.75rem!important}.gap-4{gap:1rem!important}.self-center{align-self:center!important}.justify-self-end{justify-self:end!important}.whitespace-nowrap{white-space:nowrap!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-mystic-medium{background-color:rgb(227 236 243/var(--tw-bg-opacity))!important}.bg-mystic-medium,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-xxs{font-size:.6875rem!important}.font-medium{font-weight:500!important}.font-semibold{font-weight:600!important}.text-negative{color:rgb(185 30 40/var(--tw-text-opacity))!important}.text-negative,.text-negative-light{--tw-text-opacity:1!important}.text-negative-light{color:rgb(255 204 211/var(--tw-text-opacity))!important}.text-storm-dark{color:rgb(39 40 56/var(--tw-text-opacity))!important}.text-storm-dark,.text-storm-medium{--tw-text-opacity:1!important}.text-storm-medium{color:rgb(128 130 158/var(--tw-text-opacity))!important}.text-storm-vague{--tw-text-opacity:1!important;color:rgb(152 154 183/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}:host{display:block;margin-bottom:.5rem;margin-top:.5rem;width:100%}:host .content{align-items:center;display:flex;width:100%}:host .content:after,:host .content:before{--tw-bg-opacity:1;background-color:rgb(227 236 243/var(--tw-bg-opacity));content:"";flex:1 1 0%;height:1px}.-rotate-0,.-rotate-135,.-rotate-180,.-rotate-225,.-rotate-25,.-rotate-270,.-rotate-315,.-rotate-45,.-rotate-90,.rotate-0,.rotate-135,.rotate-180,.rotate-225,.rotate-25,.rotate-270,.rotate-315,.rotate-45,.rotate-90,.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}@media (min-width:40rem){.tablet\\:w-80{width:20rem!important}.tablet\\:w-\\[33\\.5rem\\]{width:33.5rem!important}.tablet\\:w-\\[38rem\\]{width:38rem!important}.tablet\\:w-\\[47\\.5rem\\]{width:47.5rem!important}.tablet\\:w-\\[57\\.5rem\\]{width:57.5rem!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}}.max-w-\\[20rem\\]{max-width:20rem!important}.w-1\\/12{width:8.333333%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}}.w-3\\/4{width:75%!important}@media (min-width:64rem){.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!important}}.hover\\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}';const i=class{constructor(a){t(this,a)}render(){var t;const e=!!((t=this._el.innerHTML)===null||t===void 0?void 0:t.length);return a(r,{class:"p-divider"},a("div",{class:"content"},a("div",{class:`flex items-center ${e&&"px-2"}`},a("slot",null))))}get _el(){return e(this)}};i.style=o;export{i as p_divider};
2
+ //# sourceMappingURL=p-e35b3886.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["dividerComponentCss","Divider","render","hasSlotted","_a","this","_el","innerHTML","length","h","Host","class"],"sources":["./src/components/atoms/divider/divider.component.scss?tag=p-divider&encapsulation=shadow","./src/components/atoms/divider/divider.component.tsx"],"sourcesContent":[":host {\n @apply block my-2 w-full;\n\n .content {\n @apply flex w-full items-center;\n\n &::before,\n &::after {\n content: '';\n @apply h-px bg-mystic-medium flex-1;\n }\n }\n}\n","import { Component, Element, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'p-divider',\n styleUrl: 'divider.component.scss',\n shadow: true,\n})\nexport class Divider {\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n render() {\n const hasSlotted = !!this._el.innerHTML?.length;\n return (\n <Host class=\"p-divider\">\n <div class=\"content\">\n <div class={`flex items-center ${hasSlotted && 'px-2'}`}>\n <slot />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAsB,ozY,MCOfC,EAAO,M,yBAMhBC,S,MACI,MAAMC,MAAeC,EAAAC,KAAKC,IAAIC,aAAS,MAAAH,SAAA,SAAAA,EAAEI,QACzC,OACIC,EAACC,EAAI,CAACC,MAAM,aACRF,EAAA,OAAKE,MAAM,WACPF,EAAA,OAAKE,MAAO,qBAAqBR,GAAc,UAC3CM,EAAA,e"}
1
+ {"version":3,"names":["dividerComponentCss","Divider","render","hasSlotted","_a","this","_el","innerHTML","length","h","Host","class"],"sources":["./src/components/atoms/divider/divider.component.scss?tag=p-divider&encapsulation=shadow","./src/components/atoms/divider/divider.component.tsx"],"sourcesContent":[":host {\n @apply block my-2 w-full;\n\n .content {\n @apply flex w-full items-center;\n\n &::before,\n &::after {\n content: '';\n @apply h-px bg-mystic-medium flex-1;\n }\n }\n}\n","import { Component, Element, h, Host } from '@stencil/core';\n\n@Component({\n tag: 'p-divider',\n styleUrl: 'divider.component.scss',\n shadow: true,\n})\nexport class Divider {\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n render() {\n const hasSlotted = !!this._el.innerHTML?.length;\n return (\n <Host class=\"p-divider\">\n <div class=\"content\">\n <div class={`flex items-center ${hasSlotted && 'px-2'}`}>\n <slot />\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"yDAAA,MAAMA,EAAsB,uwY,MCOfC,EAAO,M,yBAMhBC,S,MACI,MAAMC,MAAeC,EAAAC,KAAKC,IAAIC,aAAS,MAAAH,SAAA,SAAAA,EAAEI,QACzC,OACIC,EAACC,EAAI,CAACC,MAAM,aACRF,EAAA,OAAKE,MAAM,WACPF,EAAA,OAAKE,MAAO,qBAAqBR,GAAc,UAC3CM,EAAA,e"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as i,H as r,g as a}from"./p-69d43b9d.js";import{f as o,g as s}from"./p-4e650fe4.js";import{d as n,a as l}from"./p-6c60fd3d.js";const w=".visible{visibility:visible!important}.static{position:static!important}.fixed{position:fixed!important}.absolute{position:absolute!important}.bottom-0{bottom:0!important}.left-0{left:0!important}.m-0{margin:0!important}.mb-14{margin-bottom:3.5rem!important}.mb-6{margin-bottom:1.5rem!important}.ml-1{margin-left:.25rem!important}.ml-2{margin-left:.5rem!important}.block{display:block!important}.inline{display:inline!important}.flex{display:flex!important}.table{display:table!important}.table-cell{display:table-cell!important}.table-row{display:table-row!important}.hidden{display:none!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.w-1{width:.25rem!important}.w-10{width:2.5rem!important}.w-11{width:2.75rem!important}.w-2{width:.5rem!important}.w-3{width:.75rem!important}.w-4{width:1rem!important}.w-5{width:1.25rem!important}.w-6{width:1.5rem!important}.w-7{width:1.75rem!important}.w-8{width:2rem!important}.w-9{width:2.25rem!important}.w-auto{width:auto!important}.w-full{width:100%!important}.flex-1{flex:1 1 0%!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-start{justify-content:flex-start!important}.justify-end{justify-content:flex-end!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-4{gap:1rem!important}.self-center{align-self:center!important}.justify-self-end{justify-self:end!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-transparent{border-color:transparent!important}.border-t-mystic-dark{--tw-border-opacity:1!important;border-top-color:rgb(218 230 240/var(--tw-border-opacity))!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.py-24{padding-bottom:6rem!important;padding-top:6rem!important}.text-center{text-align:center!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-xxs{font-size:.6875rem!important}.font-semibold{font-weight:600!important}.text-negative{color:rgb(185 30 40/var(--tw-text-opacity))!important}.text-negative,.text-negative-light{--tw-text-opacity:1!important}.text-negative-light{color:rgb(255 204 211/var(--tw-text-opacity))!important}.text-storm-dark{color:rgb(39 40 56/var(--tw-text-opacity))!important}.text-storm-dark,.text-storm-medium{--tw-text-opacity:1!important}.text-storm-medium{color:rgb(128 130 158/var(--tw-text-opacity))!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}p-table{display:flex;flex-direction:column}.max-w-\\[20rem\\]{max-width:20rem!important}.w-1\\/12{width:8.333333%!important}.w-10\\/12{width:83.333333%!important}.w-11\\/12{width:91.666667%!important}.w-2\\/12{width:16.666667%!important}.w-3\\/12{width:25%!important}.w-4\\/12{width:33.333333%!important}.w-5\\/12{width:41.666667%!important}.w-6\\/12{width:50%!important}.w-7\\/12{width:58.333333%!important}.w-8\\/12{width:66.666667%!important}.w-9\\/12{width:75%!important}@media (min-width:40rem){.tablet\\:w-1\\/12{width:8.333333%!important}.tablet\\:w-10\\/12{width:83.333333%!important}.tablet\\:w-11\\/12{width:91.666667%!important}.tablet\\:w-2\\/12{width:16.666667%!important}.tablet\\:w-3\\/12{width:25%!important}.tablet\\:w-4\\/12{width:33.333333%!important}.tablet\\:w-5\\/12{width:41.666667%!important}.tablet\\:w-6\\/12{width:50%!important}.tablet\\:w-7\\/12{width:58.333333%!important}.tablet\\:w-8\\/12{width:66.666667%!important}.tablet\\:w-9\\/12{width:75%!important}}@media (min-width:64rem){.desktop-xs\\:w-1\\/12{width:8.333333%!important}.desktop-xs\\:w-10\\/12{width:83.333333%!important}.desktop-xs\\:w-11\\/12{width:91.666667%!important}.desktop-xs\\:w-2\\/12{width:16.666667%!important}.desktop-xs\\:w-3\\/12{width:25%!important}.desktop-xs\\:w-4\\/12{width:33.333333%!important}.desktop-xs\\:w-5\\/12{width:41.666667%!important}.desktop-xs\\:w-6\\/12{width:50%!important}.desktop-xs\\:w-7\\/12{width:58.333333%!important}.desktop-xs\\:w-8\\/12{width:66.666667%!important}.desktop-xs\\:w-9\\/12{width:75%!important}}@media (min-width:80rem){.desktop-sm\\:w-1\\/12{width:8.333333%!important}.desktop-sm\\:w-10\\/12{width:83.333333%!important}.desktop-sm\\:w-11\\/12{width:91.666667%!important}.desktop-sm\\:w-2\\/12{width:16.666667%!important}.desktop-sm\\:w-3\\/12{width:25%!important}.desktop-sm\\:w-4\\/12{width:33.333333%!important}.desktop-sm\\:w-5\\/12{width:41.666667%!important}.desktop-sm\\:w-6\\/12{width:50%!important}.desktop-sm\\:w-7\\/12{width:58.333333%!important}.desktop-sm\\:w-8\\/12{width:66.666667%!important}.desktop-sm\\:w-9\\/12{width:75%!important}}@media (min-width:85.375rem){.desktop\\:w-1\\/12{width:8.333333%!important}.desktop\\:w-10\\/12{width:83.333333%!important}.desktop\\:w-11\\/12{width:91.666667%!important}.desktop\\:w-2\\/12{width:16.666667%!important}.desktop\\:w-3\\/12{width:25%!important}.desktop\\:w-4\\/12{width:33.333333%!important}.desktop\\:w-5\\/12{width:41.666667%!important}.desktop\\:w-6\\/12{width:50%!important}.desktop\\:w-7\\/12{width:58.333333%!important}.desktop\\:w-8\\/12{width:66.666667%!important}.desktop\\:w-9\\/12{width:75%!important}}@media (min-width:90rem){.desktop-lg\\:w-1\\/12{width:8.333333%!important}.desktop-lg\\:w-10\\/12{width:83.333333%!important}.desktop-lg\\:w-11\\/12{width:91.666667%!important}.desktop-lg\\:w-2\\/12{width:16.666667%!important}.desktop-lg\\:w-3\\/12{width:25%!important}.desktop-lg\\:w-4\\/12{width:33.333333%!important}.desktop-lg\\:w-5\\/12{width:41.666667%!important}.desktop-lg\\:w-6\\/12{width:50%!important}.desktop-lg\\:w-7\\/12{width:58.333333%!important}.desktop-lg\\:w-8\\/12{width:66.666667%!important}.desktop-lg\\:w-9\\/12{width:75%!important}}@media (min-width:120rem){.desktop-xl\\:w-1\\/12{width:8.333333%!important}.desktop-xl\\:w-10\\/12{width:83.333333%!important}.desktop-xl\\:w-11\\/12{width:91.666667%!important}.desktop-xl\\:w-2\\/12{width:16.666667%!important}.desktop-xl\\:w-3\\/12{width:25%!important}.desktop-xl\\:w-4\\/12{width:33.333333%!important}.desktop-xl\\:w-5\\/12{width:41.666667%!important}.desktop-xl\\:w-6\\/12{width:50%!important}.desktop-xl\\:w-7\\/12{width:58.333333%!important}.desktop-xl\\:w-8\\/12{width:66.666667%!important}.desktop-xl\\:w-9\\/12{width:75%!important}}@media (min-width:64rem){.desktop-xs\\:flex{display:flex!important}}.w-3\\/4{width:75%!important}@media (min-width:64rem){.desktop-xs\\:hidden{display:none!important}.desktop-xs\\:w-auto{width:auto!important}.desktop-xs\\:flex-row{flex-direction:row!important}}.-rotate-0,.-rotate-135,.-rotate-180,.-rotate-225,.-rotate-25,.-rotate-270,.-rotate-315,.-rotate-45,.-rotate-90,.rotate-0,.rotate-135,.rotate-180,.rotate-225,.rotate-25,.rotate-270,.rotate-315,.rotate-45,.rotate-90,.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-lg,.text-xl{line-height:1.75rem!important}.hover\\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";const h=class{constructor(i){t(this,i);this.selectedRowsChange=e(this,"selectedRowsChange",7);this.rowClick=e(this,"rowClick",7);this.rowSelected=e(this,"rowSelected",7);this.rowDeselected=e(this,"rowDeselected",7);this.hasRendered=e(this,"hasRendered",7);this.quickFilter=e(this,"quickFilter",7);this.queryChange=e(this,"queryChange",7);this.filter=e(this,"filter",7);this.edit=e(this,"edit",7);this.pageChange=e(this,"pageChange",7);this.pageSizeChange=e(this,"pageSizeChange",7);this.export=e(this,"export",7);this.emptyStateActionClick=e(this,"emptyStateActionClick",7);this._ctrlDown=false;this.items=undefined;this.loading=false;this.headerLoading=false;this.footerLoading=false;this.amountOfLoadingRows=6;this.enableRowSelection=true;this.enableRowClick=true;this.selectedRows=[];this.selectionKey=undefined;this.canSelectKey=undefined;this.quickFilters=[];this.activeQuickFilterIdentifier=undefined;this.enableSearch=true;this.query=undefined;this.enableFilter=true;this.selectedFiltersAmount=undefined;this.filterButtonTemplate=undefined;this.enableEdit=true;this.editButtonTemplate=undefined;this.enablePageSize=true;this.enablePagination=true;this.enableExport=true;this.page=1;this.total=undefined;this.pageSize=n;this.pageSizeOptions=l;this.hideOnSinglePage=true;this.emptyStateHeader=()=>{var t;return o((t=this._locales.empty_state)===null||t===void 0?void 0:t.no_filter.header)};this.emptyStateContent=()=>{var t;return o((t=this._locales.empty_state)===null||t===void 0?void 0:t.no_filter.content)};this.emptyStateAction=()=>{var t;return o((t=this._locales.empty_state)===null||t===void 0?void 0:t.no_filter.action)};this.emptyStateFilteredHeader=()=>o(this._locales.empty_state.filtered.header);this.emptyStateFilteredContent=()=>o(this._locales.empty_state.filtered.content);this._locales={};this._columns=[];this._items=[]}componentWillLoad(){this._setLocales();this._parseItems(this.items);this._generateColumns()}componentDidRender(){this.hasRendered.emit()}render(){var t,e;return i(r,{class:"p-table"},i("p-table-container",null,i("p-table-header",{quickFilters:this.quickFilters,activeQuickFilterIdentifier:this.activeQuickFilterIdentifier,onQuickFilter:({detail:t})=>this.quickFilter.emit(t),enableSearch:this.enableSearch,query:this.query,onQueryChange:({detail:t})=>this.queryChange.emit(t),enableFilter:this.enableFilter,selectedFiltersAmount:this.selectedFiltersAmount,filterButtonTemplate:this.filterButtonTemplate,onFilter:()=>this.filter.emit(),enableEdit:this.enableEdit,canEdit:!!((t=this.selectedRows)===null||t===void 0?void 0:t.length),editButtonTemplate:this.editButtonTemplate,onEdit:()=>this.edit.emit(),itemsSelectedAmount:(e=this.selectedRows)===null||e===void 0?void 0:e.length,loading:this.headerLoading}),this._getHeader(),i("div",{class:"flex flex-col"},this._getRows()),i("p-table-footer",{hideOnSinglePage:this.hideOnSinglePage,enablePageSize:this.enablePageSize,pageSize:this.pageSize,pageSizeOptions:this.pageSizeOptions,onPageSizeChange:({detail:t})=>this.pageSizeChange.emit(t),enablePagination:this.enablePagination,page:this.page,total:this.total,onPageChange:({detail:t})=>this.pageChange.emit(t),enableExport:this.enableExport,onExport:()=>this.export.emit(),loading:this.footerLoading})))}async _setLocales(){this._locales=await s(this._el)}onTableDefinitionUpdated(){this._generateColumns()}keyDown({key:t}){if(t!=="Control"||this._ctrlDown===true){return}this._ctrlDown=true}keyUp({key:t}){if(t!=="Control"||this._ctrlDown===false){return}this._ctrlDown=false}visibilityChange(){if(document.visibilityState!=="hidden"||this._ctrlDown===false){return}this._ctrlDown=false}_parseItems(t){if(!t){this._items=[];return}if(Array.isArray(t)){this._items=t;return}this._items=JSON.parse(t)}_generateColumns(){const t=this._el.querySelectorAll("p-table-column");this._columns=Array.from(t)}_getHeader(){return i("p-table-row",{variant:"header"},this._columns.map(((t,e)=>i("p-table-cell",{definition:t,value:t.name,variant:"header",checkbox:this._getCheckbox(e,null,"header"),index:e}))))}_getRows(){if(this.loading){return Array.from({length:this.amountOfLoadingRows},((t,e)=>i("p-table-row",{enableHover:this.enableRowSelection||this.enableRowClick},this._getLoadingColumns(e))))}if(!this._items.length){return this._getEmptyState()}return this._items.map(((t,e)=>i("p-table-row",{enableHover:this.enableRowSelection||this.enableRowClick,onClick:t=>this._rowClick(t,e)},this._getRowColumns(t,e))))}_getRowColumns(t,e){return this._columns.map(((r,a)=>i("p-table-cell",{definition:r,item:t,checkbox:this._getCheckbox(a,e),index:a,rowIndex:e})))}_getLoadingColumns(t){return this._columns.map(((e,r)=>i("p-table-cell",{definition:e,variant:"loading",checkbox:this._getCheckbox(r,t,"loading"),index:r,rowIndex:t})))}_getCheckbox(t,e,r="default"){if(!this.enableRowSelection||!this.selectionKey||t!==0){return}if(r==="loading"){return i("p-loader",{variant:"ghost",class:"rounded w-6 h-6"})}if(r==="header"){return i("input",{class:"p-input",type:"checkbox",onChange:t=>this._selectAllChange(t),checked:this._selectionContainsAll(),indeterminate:this._selectionIndeterminate()})}const a=this._items[e];return i("input",{class:"p-input",type:"checkbox",onChange:t=>this._checkboxChange(t===null||t===void 0?void 0:t.target,e),disabled:this.canSelectKey&&!a[this.canSelectKey],checked:this._selectionContains(a,e)})}_getEmptyState(){var t;if(((t=this.query)===null||t===void 0?void 0:t.length)||this.selectedFiltersAmount){return i("div",{class:"flex flex-col items-center text-center py-24 max-w-[20rem] self-center"},i("p-illustration",{variant:"empty-state-search",class:"mb-6"}),i("p",{class:"font-semibold text-storm-default"},this.emptyStateFilteredHeader()),i("p",{class:"text-sm text-storm-medium mb-14"},this.emptyStateFilteredContent()))}return i("div",{class:"flex flex-col items-center text-center py-24 max-w-[20rem] self-center"},i("p-illustration",{variant:"empty-state-overview",class:"cursor-pointer mb-6",onClick:()=>this.emptyStateActionClick.emit(null)}),i("p",{class:"font-semibold text-storm-default"},this.emptyStateHeader()),i("p",{class:"text-sm text-storm-medium mb-6"},this.emptyStateContent()),i("p-button",{variant:"secondary",icon:"plus",size:"small",onClick:()=>this.emptyStateActionClick.emit(null)},this.emptyStateAction()))}_selectAllChange(t){if(!this.enableRowSelection){return}const e=this._getCheckedValue(t.target);if(e){const t=[];for(let e=0;e<this._items.length;e++){const i=this._items[e];if(this.canSelectKey&&!i[this.canSelectKey]){continue}if(this._selectionContains(i,e)){continue}t.push(i);this.rowSelected.emit(i)}this.selectedRows=[...this.selectedRows,...t];this.selectedRowsChange.emit(this.selectedRows);return}for(let t=0;t<this.selectedRows.length;t++){const e=this.selectedRows[t];const i=this._items.find((i=>this._getSelectionValue(i,t)===this._getSelectionValue(e,t)));if(!i){continue}this.rowDeselected.emit(i)}this.selectedRows=[];this.selectedRowsChange.emit(this.selectedRows)}_checkboxChange(t,e){if(!this.enableRowSelection){return}const i=this._items[e];if(this.canSelectKey&&!i[this.canSelectKey]){t.checked=false;return}const r=this._getCheckedValue(t);if(r){this.selectedRows=[...this.selectedRows,i];this.selectedRowsChange.emit(this.selectedRows);this.rowSelected.emit(i);return}const a=this._selectionContains(i,e,true);const o=[...this.selectedRows];o.splice(a,1);this.selectedRows=o;this.selectedRowsChange.emit(this.selectedRows);this.rowDeselected.emit(i)}_getCheckedValue(t){return t===null||t===void 0?void 0:t.checked}_getSelectionValue(t,e){return this.selectionKey?(t===null||t===void 0?void 0:t[this.selectionKey])||e:e}_selectionContains(t,e,i=false){const r=this.selectedRows.findIndex((i=>this._getSelectionValue(t,e)===this._getSelectionValue(i,e)));return!i?r>=0:r}_selectionContainsAll(){var t,e;let i=true;if(!((t=this._items)===null||t===void 0?void 0:t.length)){return false}for(let t=0;t<((e=this._items)===null||e===void 0?void 0:e.length);t++){const e=this._items[t];const r=this._selectionContains(e,t);if(!r){i=false;break}}return i}_selectionIndeterminate(){var t,e,i;if(!((t=this._items)===null||t===void 0?void 0:t.length)||!((e=this.selectedRows)===null||e===void 0?void 0:e.length)){return false}let r=0;for(let t=0;t<((i=this._items)===null||i===void 0?void 0:i.length);t++){const e=this._items[t];const i=this._selectionContains(e,t);if(i){r++}}return r>0&&r!==this._items.length}_rowClick(t,e){const i=t.target;if(i.tagName.toLowerCase()==="input"||i.type==="checkbox"){return}const r=this._findRow(t.target);if(this.enableRowClick){const i=this._findRowAction(t.target);if(i){return}const r=this._items[e];this.rowClick.emit({item:r,ctrlDown:this._ctrlDown});return}if(!this.enableRowSelection){return}const a=r===null||r===void 0?void 0:r.querySelector('input[type="checkbox"]');if(!a){return}a.checked=!a.checked;this._checkboxChange(a,e)}_findRow(t){var e;if(!t){return t}if(((e=t===null||t===void 0?void 0:t.tagName)===null||e===void 0?void 0:e.toLowerCase())==="p-table-row"){return t}return this._findRow(t===null||t===void 0?void 0:t.parentElement)}_findRowAction(t){var e;if(!t){return null}if(t.getAttribute("data-is-action")!==null&&t.getAttribute("data-is-action")!=="false"){return t}if(((e=t===null||t===void 0?void 0:t.tagName)===null||e===void 0?void 0:e.toLowerCase())==="p-table-row"){return null}return this._findRowAction(t===null||t===void 0?void 0:t.parentElement)}get _el(){return a(this)}static get watchers(){return{items:["_parseItems"]}}};h.style=w;export{h as p_table};
2
+ //# sourceMappingURL=p-e6227583.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["tableComponentCss","Table","this","_ctrlDown","defaultSize","defaultSizeOptions","_a","formatTranslation","_locales","empty_state","no_filter","header","content","action","filtered","componentWillLoad","_setLocales","_parseItems","items","_generateColumns","componentDidRender","hasRendered","emit","render","h","Host","class","quickFilters","activeQuickFilterIdentifier","onQuickFilter","detail","quickFilter","enableSearch","query","onQueryChange","queryChange","enableFilter","selectedFiltersAmount","filterButtonTemplate","onFilter","filter","enableEdit","canEdit","selectedRows","length","editButtonTemplate","onEdit","edit","itemsSelectedAmount","_b","loading","headerLoading","_getHeader","_getRows","hideOnSinglePage","enablePageSize","pageSize","pageSizeOptions","onPageSizeChange","pageSizeChange","enablePagination","page","total","onPageChange","pageChange","enableExport","onExport","export","footerLoading","async","getLocaleComponentStrings","_el","onTableDefinitionUpdated","keyDown","key","keyUp","visibilityChange","document","visibilityState","_items","Array","isArray","JSON","parse","definitions","querySelectorAll","_columns","from","variant","map","col","index","definition","value","name","checkbox","_getCheckbox","amountOfLoadingRows","_","i","enableHover","enableRowSelection","enableRowClick","_getLoadingColumns","_getEmptyState","item","onClick","ev","_rowClick","_getRowColumns","colIndex","rowIndex","selectionKey","type","onChange","_selectAllChange","checked","_selectionContainsAll","indeterminate","_selectionIndeterminate","_checkboxChange","target","disabled","canSelectKey","_selectionContains","emptyStateFilteredHeader","emptyStateFilteredContent","emptyStateActionClick","emptyStateHeader","emptyStateContent","icon","size","emptyStateAction","$event","_getCheckedValue","toAdd","row","push","rowSelected","selectedRowsChange","find","d","_getSelectionValue","rowDeselected","indexOfToRemove","selection","splice","returnIndex","returnValue","findIndex","contains","containsCount","_c","tagName","toLowerCase","_findRow","_findRowAction","rowClick","ctrlDown","querySelector","el","parentElement","getAttribute"],"sources":["./src/components/organisms/table/table.component.scss?tag=p-table","./src/components/organisms/table/table.component.tsx"],"sourcesContent":["p-table {\n @apply flex flex-col;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { QuickFilter, RowClickEvent } from '../../../types/table';\nimport { formatTranslation, getLocaleComponentStrings } from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\nimport {\n defaultSize,\n defaultSizeOptions,\n} from '../../molecules/page-size-select/constants';\nimport { buttonTemplateFunc } from '../../molecules/table-header/table-header.component';\n\nexport type templateFunc = () => string;\n\n@Component({\n tag: 'p-table',\n styleUrl: 'table.component.scss',\n})\nexport class Table {\n /**\n * The items to be fed to the table\n */\n @Prop() items: string;\n\n /**\n * Wether data is loading\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether the header should show loading state\n */\n @Prop() headerLoading: boolean = false;\n\n /**\n * Wether the footer should show loading state\n */\n @Prop() footerLoading: boolean = false;\n\n /**\n * The amount of loading rows to show\n */\n @Prop() amountOfLoadingRows: number = 6;\n\n /**\n * Wether to enable selection\n */\n @Prop() enableRowSelection: boolean = true;\n\n /**\n * Wether to enable row clicking\n */\n @Prop() enableRowClick: boolean = true;\n\n /**\n * The current selection of items\n */\n @Prop() selectedRows: any[] = [];\n\n /**\n * Event whenever the current selection changes\n */\n @Event() selectedRowsChange: EventEmitter<any>;\n\n /**\n * The key to determine if a row is selected\n */\n @Prop() selectionKey: string;\n\n /**\n * A key to determine if a row can be selected\n */\n @Prop() canSelectKey: string;\n\n /**\n * Event whenever a row is clicked\n */\n @Event() rowClick: EventEmitter<RowClickEvent>;\n\n /**\n * Event whenever a row is selected\n */\n @Event() rowSelected: EventEmitter<any>;\n\n /**\n * Event whenever a row is deselected\n */\n @Event() rowDeselected: EventEmitter<any>;\n\n /**\n * Event when the table has rendered\n */\n @Event() hasRendered: EventEmitter<number>;\n\n /** START HEADER */\n /**\n * Quick filters to show\n */\n @Prop() quickFilters: QuickFilter[] = [];\n\n /**\n * Active quick filter identifier\n */\n @Prop() activeQuickFilterIdentifier: string;\n\n /**\n * Wether to show the search input\n */\n @Prop() enableSearch: boolean = true;\n\n /**\n * The query to show in the search bar\n */\n @Prop({ mutable: true }) query: string;\n\n /**\n * Wether to show the filter button\n */\n @Prop() enableFilter: boolean = true;\n\n /**\n * The amount of filters being selected\n */\n @Prop() selectedFiltersAmount: number;\n\n /**\n * The template for the filter button text\n */\n @Prop() filterButtonTemplate: templateFunc;\n\n /**\n * Wether to show the edit button\n */\n @Prop() enableEdit: boolean = true;\n\n /**\n * The template for the edit button text\n */\n @Prop() editButtonTemplate: buttonTemplateFunc;\n\n /**\n * Event when one of the quick filters is clicked\n */\n @Event() quickFilter: EventEmitter<QuickFilter>;\n\n /**\n * Event when the query changes\n */\n @Event() queryChange: EventEmitter<string>;\n\n /**\n * Event when the filter button is clicked\n */\n @Event() filter: EventEmitter<null>;\n\n /**\n * Event when the edit button is clicked\n */\n @Event() edit: EventEmitter<null>;\n\n /** START FOOTER */\n\n /**\n * Wether to enable page size select\n */\n @Prop() enablePageSize: boolean = true;\n\n /**\n * Wether to enable pagination\n */\n @Prop() enablePagination: boolean = true;\n\n /**\n * Wether to enable export\n */\n @Prop() enableExport: boolean = true;\n\n /**\n * The current page\n */\n @Prop({ mutable: true, reflect: true }) page: number = 1;\n\n /**\n * The total amount of items\n */\n @Prop() total!: number;\n\n /**\n * Event whenever the page changes\n */\n @Event() pageChange: EventEmitter<number>;\n\n /**\n * The amount of items per page\n */\n @Prop() pageSize: number = defaultSize;\n\n /**\n * The options for the page size\n */\n @Prop() pageSizeOptions: number[] = defaultSizeOptions;\n\n /**\n * Event whenever the page changes\n */\n @Event() pageSizeChange: EventEmitter<number>;\n\n /**\n * Event whenever the page changes\n */\n @Event() export: EventEmitter<number>;\n\n /**\n * Wether to hide when there is only 1 page available\n */\n @Prop() hideOnSinglePage: boolean = true;\n\n /* Empty state start */\n\n @Prop() emptyStateHeader: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.header);\n @Prop() emptyStateContent: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.content);\n @Prop() emptyStateAction: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.action);\n\n @Prop() emptyStateFilteredHeader: templateFunc = () =>\n formatTranslation(this._locales.empty_state.filtered.header);\n @Prop() emptyStateFilteredContent: templateFunc = () =>\n formatTranslation(this._locales.empty_state.filtered.content);\n\n /**\n * Event whenever the empty state is clicked\n */\n @Event() emptyStateActionClick: EventEmitter<null>;\n\n /* Empty state end */\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n /**\n * Locales used for this component\n */\n @State() private _locales: any = {};\n\n @State() private _columns: any[] = [];\n @State() private _items: any[] = [];\n\n private _ctrlDown = false;\n\n componentWillLoad() {\n this._setLocales();\n this._parseItems(this.items);\n this._generateColumns();\n }\n\n componentDidRender() {\n this.hasRendered.emit();\n }\n\n render() {\n return (\n <Host class=\"p-table\">\n <p-table-container>\n <p-table-header\n // quick filters\n quickFilters={this.quickFilters}\n activeQuickFilterIdentifier={\n this.activeQuickFilterIdentifier\n }\n onQuickFilter={({ detail }) =>\n this.quickFilter.emit(detail)\n }\n // search\n enableSearch={this.enableSearch}\n query={this.query}\n onQueryChange={({ detail }) =>\n this.queryChange.emit(detail)\n }\n // filter button\n enableFilter={this.enableFilter}\n selectedFiltersAmount={this.selectedFiltersAmount}\n filterButtonTemplate={this.filterButtonTemplate}\n onFilter={() => this.filter.emit()}\n // edit button\n enableEdit={this.enableEdit}\n canEdit={!!this.selectedRows?.length}\n editButtonTemplate={this.editButtonTemplate}\n onEdit={() => this.edit.emit()}\n itemsSelectedAmount={this.selectedRows?.length}\n //loading\n loading={this.headerLoading}\n ></p-table-header>\n\n {this._getHeader()}\n <div class=\"flex flex-col\">{this._getRows()}</div>\n\n <p-table-footer\n // overall\n hideOnSinglePage={this.hideOnSinglePage}\n // page size select\n enablePageSize={this.enablePageSize}\n pageSize={this.pageSize}\n pageSizeOptions={this.pageSizeOptions}\n onPageSizeChange={({ detail }) =>\n this.pageSizeChange.emit(detail)\n }\n // pagination\n enablePagination={this.enablePagination}\n page={this.page}\n total={this.total}\n onPageChange={({ detail }) =>\n this.pageChange.emit(detail)\n }\n // export\n enableExport={this.enableExport}\n onExport={() => this.export.emit()}\n //loading\n loading={this.footerLoading}\n ></p-table-footer>\n </p-table-container>\n </Host>\n );\n }\n\n @Listen('localeChanged', { target: 'body' })\n private async _setLocales(): Promise<void> {\n this._locales = await getLocaleComponentStrings(this._el);\n }\n\n @Listen('tableDefinitionChanged', { target: 'body' })\n onTableDefinitionUpdated() {\n this._generateColumns();\n }\n\n @Listen('keydown', { target: 'document' })\n keyDown({ key }) {\n if (key !== 'Control' || this._ctrlDown === true) {\n return;\n }\n\n this._ctrlDown = true;\n }\n\n @Listen('keyup', { target: 'document' })\n keyUp({ key }) {\n if (key !== 'Control' || this._ctrlDown === false) {\n return;\n }\n\n this._ctrlDown = false;\n }\n\n @Listen('visibilitychange', { target: 'document' })\n visibilityChange() {\n if (document.visibilityState !== 'hidden' || this._ctrlDown === false) {\n return;\n }\n\n this._ctrlDown = false;\n }\n\n @Watch('items')\n private _parseItems(items: string) {\n if (!items) {\n this._items = [];\n return;\n }\n\n if (Array.isArray(items)) {\n this._items = items;\n return;\n }\n\n this._items = JSON.parse(items);\n }\n\n private _generateColumns() {\n const definitions = this._el.querySelectorAll('p-table-column');\n this._columns = Array.from(definitions);\n }\n\n private _getHeader() {\n return (\n <p-table-row variant=\"header\">\n {this._columns.map((col: TableColumn, index) => (\n <p-table-cell\n definition={col}\n value={col.name}\n variant=\"header\"\n checkbox={this._getCheckbox(index, null, 'header')}\n index={index}\n ></p-table-cell>\n ))}\n </p-table-row>\n );\n }\n\n private _getRows() {\n if (this.loading) {\n return Array.from(\n {\n length: this.amountOfLoadingRows,\n },\n (_, i) => (\n <p-table-row\n enableHover={\n this.enableRowSelection || this.enableRowClick\n }\n >\n {this._getLoadingColumns(i)}\n </p-table-row>\n )\n );\n }\n\n if (!this._items.length) {\n return this._getEmptyState();\n }\n\n return this._items.map((item, index) => (\n <p-table-row\n enableHover={this.enableRowSelection || this.enableRowClick}\n onClick={(ev) => this._rowClick(ev, index)}\n >\n {this._getRowColumns(item, index)}\n </p-table-row>\n ));\n }\n\n private _getRowColumns(item, index) {\n return this._columns.map((col: TableColumn, colIndex) => {\n return (\n <p-table-cell\n definition={col}\n item={item}\n checkbox={this._getCheckbox(colIndex, index)}\n index={colIndex}\n rowIndex={index}\n ></p-table-cell>\n );\n });\n }\n\n private _getLoadingColumns(index) {\n return this._columns.map((col: TableColumn, colIndex) => {\n return (\n <p-table-cell\n definition={col}\n variant=\"loading\"\n checkbox={this._getCheckbox(colIndex, index, 'loading')}\n index={colIndex}\n rowIndex={index}\n ></p-table-cell>\n );\n });\n }\n\n private _getCheckbox(\n index,\n rowIndex,\n variant: 'header' | 'default' | 'loading' = 'default'\n ) {\n if (!this.enableRowSelection || !this.selectionKey || index !== 0) {\n return;\n }\n\n if (variant === 'loading') {\n return <p-loader variant=\"ghost\" class=\"rounded w-6 h-6\" />;\n }\n\n if (variant === 'header') {\n return (\n <input\n class=\"p-input\"\n type=\"checkbox\"\n onChange={(ev) => this._selectAllChange(ev)}\n checked={this._selectionContainsAll()}\n indeterminate={this._selectionIndeterminate()}\n />\n );\n }\n\n const item = this._items[rowIndex];\n\n return (\n <input\n class=\"p-input\"\n type=\"checkbox\"\n onChange={(ev) => this._checkboxChange(ev?.target, rowIndex)}\n disabled={this.canSelectKey && !item[this.canSelectKey]}\n checked={this._selectionContains(item, rowIndex)}\n />\n );\n }\n\n private _getEmptyState() {\n if (this.query?.length || this.selectedFiltersAmount) {\n return (\n <div class=\"flex flex-col items-center text-center py-24 max-w-[20rem] self-center\">\n <p-illustration variant=\"empty-state-search\" class=\"mb-6\" />\n <p class=\"font-semibold text-storm-default\">\n {this.emptyStateFilteredHeader()}\n </p>\n <p class=\"text-sm text-storm-medium mb-14\">\n {this.emptyStateFilteredContent()}\n </p>\n </div>\n );\n }\n\n return (\n <div class=\"flex flex-col items-center text-center py-24 max-w-[20rem] self-center\">\n <p-illustration\n variant=\"empty-state-overview\"\n class=\"cursor-pointer mb-6\"\n onClick={() => this.emptyStateActionClick.emit(null)}\n />\n <p class=\"font-semibold text-storm-default\">\n {this.emptyStateHeader()}\n </p>\n <p class=\"text-sm text-storm-medium mb-6\">\n {this.emptyStateContent()}\n </p>\n <p-button\n variant=\"secondary\"\n icon=\"plus\"\n size=\"small\"\n onClick={() => this.emptyStateActionClick.emit(null)}\n >\n {this.emptyStateAction()}\n </p-button>\n </div>\n );\n }\n\n private _selectAllChange($event: any) {\n if (!this.enableRowSelection) {\n return;\n }\n\n const value = this._getCheckedValue($event.target);\n if (value) {\n const toAdd = [];\n for (let i = 0; i < this._items.length; i++) {\n const row = this._items[i];\n if (this.canSelectKey && !row[this.canSelectKey]) {\n continue;\n }\n\n if (this._selectionContains(row, i)) {\n continue;\n }\n\n toAdd.push(row);\n this.rowSelected.emit(row);\n }\n\n this.selectedRows = [...this.selectedRows, ...toAdd];\n this.selectedRowsChange.emit(this.selectedRows);\n return;\n }\n\n for (let i = 0; i < this.selectedRows.length; i++) {\n const value = this.selectedRows[i];\n const row = this._items.find(\n (d) =>\n this._getSelectionValue(d, i) ===\n this._getSelectionValue(value, i)\n );\n\n if (!row) {\n continue;\n }\n\n this.rowDeselected.emit(row);\n }\n\n this.selectedRows = [];\n this.selectedRowsChange.emit(this.selectedRows);\n }\n\n private _checkboxChange(target: any, index: number) {\n if (!this.enableRowSelection) {\n return;\n }\n\n const row = this._items[index];\n\n if (this.canSelectKey && !row[this.canSelectKey]) {\n target.checked = false;\n return;\n }\n\n const value = this._getCheckedValue(target);\n if (value) {\n this.selectedRows = [...this.selectedRows, row];\n this.selectedRowsChange.emit(this.selectedRows);\n this.rowSelected.emit(row);\n return;\n }\n\n const indexOfToRemove = this._selectionContains(row, index, true);\n\n // we need to do this, because splice does not trigger the selection setter.\n const selection = [...this.selectedRows];\n selection.splice(indexOfToRemove, 1);\n this.selectedRows = selection;\n this.selectedRowsChange.emit(this.selectedRows);\n this.rowDeselected.emit(row);\n }\n\n private _getCheckedValue(target: any) {\n return target?.checked;\n }\n\n private _getSelectionValue(row: any, index: number) {\n return this.selectionKey ? row?.[this.selectionKey] || index : index;\n }\n\n private _selectionContains(row, index, returnIndex = false): any {\n const returnValue = this.selectedRows.findIndex(\n (item) =>\n this._getSelectionValue(row, index) ===\n this._getSelectionValue(item, index)\n );\n return !returnIndex ? returnValue >= 0 : returnValue;\n }\n\n private _selectionContainsAll() {\n let returnValue = true;\n if (!this._items?.length) {\n return false;\n }\n\n for (let i = 0; i < this._items?.length; i++) {\n const item = this._items[i];\n const contains = this._selectionContains(item, i);\n\n if (!contains) {\n returnValue = false;\n break;\n }\n }\n\n return returnValue;\n }\n\n private _selectionIndeterminate() {\n if (!this._items?.length || !this.selectedRows?.length) {\n return false;\n }\n\n let containsCount = 0;\n for (let i = 0; i < this._items?.length; i++) {\n const item = this._items[i];\n const contains = this._selectionContains(item, i);\n\n if (contains) {\n containsCount++;\n }\n }\n\n return containsCount > 0 && containsCount !== this._items.length;\n }\n\n private _rowClick($event, index) {\n const target = $event.target;\n\n if (\n target.tagName.toLowerCase() === 'input' ||\n target.type === 'checkbox'\n ) {\n return;\n }\n\n const row = this._findRow($event.target);\n\n if (this.enableRowClick) {\n const action = this._findRowAction($event.target);\n\n if (action) {\n return;\n }\n\n const item = this._items[index];\n this.rowClick.emit({\n item,\n ctrlDown: this._ctrlDown,\n });\n return;\n }\n\n if (!this.enableRowSelection) {\n return;\n }\n\n const checkbox = row?.querySelector('input[type=\"checkbox\"]');\n\n if (!checkbox) {\n return;\n }\n\n checkbox.checked = !checkbox.checked;\n this._checkboxChange(checkbox, index);\n }\n\n private _findRow(el: HTMLElement) {\n if (!el) {\n return el;\n }\n\n if (el?.tagName?.toLowerCase() === 'p-table-row') {\n return el;\n }\n\n return this._findRow(el?.parentElement);\n }\n\n private _findRowAction(el: HTMLElement) {\n if (!el) {\n return null;\n }\n\n if (\n el.getAttribute('data-is-action') !== null &&\n el.getAttribute('data-is-action') !== 'false'\n ) {\n return el;\n }\n\n if (el?.tagName?.toLowerCase() === 'p-table-row') {\n return null;\n }\n\n return this._findRowAction(el?.parentElement);\n }\n}\n"],"mappings":"sJAAA,MAAMA,EAAoB,syW,MC2BbC,EAAK,M,gjBAyONC,KAAAC,UAAY,M,kCAhOO,M,mBAKM,M,mBAKA,M,yBAKK,E,wBAKA,K,oBAKJ,K,kBAKJ,G,0EAyCQ,G,6DAUN,K,uCAUA,K,yFAeF,K,sDAgCI,K,sBAKE,K,kBAKJ,K,UAKuB,E,mCAe5BC,E,qBAKSC,E,sBAeA,K,sBAIK,SAAAC,EACrC,OAAAC,GAAkBD,EAAAJ,KAAKM,SAASC,eAAW,M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QAAQC,gBAAkB,SACjCjC,EAAOR,OAAS,WAClB,CACE,M,CAGJ,MAAMuB,EAAMtI,KAAKyJ,SAAStB,EAAOZ,QAEjC,GAAIvH,KAAKoG,eAAgB,CACrB,MAAMzF,EAASX,KAAK0J,eAAevB,EAAOZ,QAE1C,GAAI5G,EAAQ,CACR,M,CAGJ,MAAM4F,EAAOvG,KAAK6E,OAAOY,GACzBzF,KAAK2J,SAASvI,KAAK,CACfmF,OACAqD,SAAU5J,KAAKC,YAEnB,M,CAGJ,IAAKD,KAAKmG,mBAAoB,CAC1B,M,CAGJ,MAAMN,EAAWyC,IAAG,MAAHA,SAAG,SAAHA,EAAKuB,cAAc,0BAEpC,IAAKhE,EAAU,CACX,M,CAGJA,EAASqB,SAAWrB,EAASqB,QAC7BlH,KAAKsH,gBAAgBzB,EAAUJ,E,CAG3BgE,SAASK,G,MACb,IAAKA,EAAI,CACL,OAAOA,C,CAGX,KAAI1J,EAAA0J,IAAE,MAAFA,SAAE,SAAFA,EAAIP,WAAO,MAAAnJ,SAAA,SAAAA,EAAEoJ,iBAAkB,cAAe,CAC9C,OAAOM,C,CAGX,OAAO9J,KAAKyJ,SAASK,IAAE,MAAFA,SAAE,SAAFA,EAAIC,c,CAGrBL,eAAeI,G,MACnB,IAAKA,EAAI,CACL,OAAO,I,CAGX,GACIA,EAAGE,aAAa,oBAAsB,MACtCF,EAAGE,aAAa,oBAAsB,QACxC,CACE,OAAOF,C,CAGX,KAAI1J,EAAA0J,IAAE,MAAFA,SAAE,SAAFA,EAAIP,WAAO,MAAAnJ,SAAA,SAAAA,EAAEoJ,iBAAkB,cAAe,CAC9C,OAAO,I,CAGX,OAAOxJ,KAAK0J,eAAeI,IAAE,MAAFA,SAAE,SAAFA,EAAIC,c"}
1
+ {"version":3,"names":["tableComponentCss","Table","this","_ctrlDown","defaultSize","defaultSizeOptions","_a","formatTranslation","_locales","empty_state","no_filter","header","content","action","filtered","componentWillLoad","_setLocales","_parseItems","items","_generateColumns","componentDidRender","hasRendered","emit","render","h","Host","class","quickFilters","activeQuickFilterIdentifier","onQuickFilter","detail","quickFilter","enableSearch","query","onQueryChange","queryChange","enableFilter","selectedFiltersAmount","filterButtonTemplate","onFilter","filter","enableEdit","canEdit","selectedRows","length","editButtonTemplate","onEdit","edit","itemsSelectedAmount","_b","loading","headerLoading","_getHeader","_getRows","hideOnSinglePage","enablePageSize","pageSize","pageSizeOptions","onPageSizeChange","pageSizeChange","enablePagination","page","total","onPageChange","pageChange","enableExport","onExport","export","footerLoading","async","getLocaleComponentStrings","_el","onTableDefinitionUpdated","keyDown","key","keyUp","visibilityChange","document","visibilityState","_items","Array","isArray","JSON","parse","definitions","querySelectorAll","_columns","from","variant","map","col","index","definition","value","name","checkbox","_getCheckbox","amountOfLoadingRows","_","i","enableHover","enableRowSelection","enableRowClick","_getLoadingColumns","_getEmptyState","item","onClick","ev","_rowClick","_getRowColumns","colIndex","rowIndex","selectionKey","type","onChange","_selectAllChange","checked","_selectionContainsAll","indeterminate","_selectionIndeterminate","_checkboxChange","target","disabled","canSelectKey","_selectionContains","emptyStateFilteredHeader","emptyStateFilteredContent","emptyStateActionClick","emptyStateHeader","emptyStateContent","icon","size","emptyStateAction","$event","_getCheckedValue","toAdd","row","push","rowSelected","selectedRowsChange","find","d","_getSelectionValue","rowDeselected","indexOfToRemove","selection","splice","returnIndex","returnValue","findIndex","contains","containsCount","_c","tagName","toLowerCase","_findRow","_findRowAction","rowClick","ctrlDown","querySelector","el","parentElement","getAttribute"],"sources":["./src/components/organisms/table/table.component.scss?tag=p-table","./src/components/organisms/table/table.component.tsx"],"sourcesContent":["p-table {\n @apply flex flex-col;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport { QuickFilter, RowClickEvent } from '../../../types/table';\nimport { formatTranslation, getLocaleComponentStrings } from '../../../utils';\nimport { TableColumn } from '../../helpers/table-column/table-column.component';\nimport {\n defaultSize,\n defaultSizeOptions,\n} from '../../molecules/page-size-select/constants';\nimport { buttonTemplateFunc } from '../../molecules/table-header/table-header.component';\n\nexport type templateFunc = () => string;\n\n@Component({\n tag: 'p-table',\n styleUrl: 'table.component.scss',\n})\nexport class Table {\n /**\n * The items to be fed to the table\n */\n @Prop() items: string;\n\n /**\n * Wether data is loading\n */\n @Prop() loading: boolean = false;\n\n /**\n * Wether the header should show loading state\n */\n @Prop() headerLoading: boolean = false;\n\n /**\n * Wether the footer should show loading state\n */\n @Prop() footerLoading: boolean = false;\n\n /**\n * The amount of loading rows to show\n */\n @Prop() amountOfLoadingRows: number = 6;\n\n /**\n * Wether to enable selection\n */\n @Prop() enableRowSelection: boolean = true;\n\n /**\n * Wether to enable row clicking\n */\n @Prop() enableRowClick: boolean = true;\n\n /**\n * The current selection of items\n */\n @Prop() selectedRows: any[] = [];\n\n /**\n * Event whenever the current selection changes\n */\n @Event() selectedRowsChange: EventEmitter<any>;\n\n /**\n * The key to determine if a row is selected\n */\n @Prop() selectionKey: string;\n\n /**\n * A key to determine if a row can be selected\n */\n @Prop() canSelectKey: string;\n\n /**\n * Event whenever a row is clicked\n */\n @Event() rowClick: EventEmitter<RowClickEvent>;\n\n /**\n * Event whenever a row is selected\n */\n @Event() rowSelected: EventEmitter<any>;\n\n /**\n * Event whenever a row is deselected\n */\n @Event() rowDeselected: EventEmitter<any>;\n\n /**\n * Event when the table has rendered\n */\n @Event() hasRendered: EventEmitter<number>;\n\n /** START HEADER */\n /**\n * Quick filters to show\n */\n @Prop() quickFilters: QuickFilter[] = [];\n\n /**\n * Active quick filter identifier\n */\n @Prop() activeQuickFilterIdentifier: string;\n\n /**\n * Wether to show the search input\n */\n @Prop() enableSearch: boolean = true;\n\n /**\n * The query to show in the search bar\n */\n @Prop({ mutable: true }) query: string;\n\n /**\n * Wether to show the filter button\n */\n @Prop() enableFilter: boolean = true;\n\n /**\n * The amount of filters being selected\n */\n @Prop() selectedFiltersAmount: number;\n\n /**\n * The template for the filter button text\n */\n @Prop() filterButtonTemplate: templateFunc;\n\n /**\n * Wether to show the edit button\n */\n @Prop() enableEdit: boolean = true;\n\n /**\n * The template for the edit button text\n */\n @Prop() editButtonTemplate: buttonTemplateFunc;\n\n /**\n * Event when one of the quick filters is clicked\n */\n @Event() quickFilter: EventEmitter<QuickFilter>;\n\n /**\n * Event when the query changes\n */\n @Event() queryChange: EventEmitter<string>;\n\n /**\n * Event when the filter button is clicked\n */\n @Event() filter: EventEmitter<null>;\n\n /**\n * Event when the edit button is clicked\n */\n @Event() edit: EventEmitter<null>;\n\n /** START FOOTER */\n\n /**\n * Wether to enable page size select\n */\n @Prop() enablePageSize: boolean = true;\n\n /**\n * Wether to enable pagination\n */\n @Prop() enablePagination: boolean = true;\n\n /**\n * Wether to enable export\n */\n @Prop() enableExport: boolean = true;\n\n /**\n * The current page\n */\n @Prop({ mutable: true, reflect: true }) page: number = 1;\n\n /**\n * The total amount of items\n */\n @Prop() total!: number;\n\n /**\n * Event whenever the page changes\n */\n @Event() pageChange: EventEmitter<number>;\n\n /**\n * The amount of items per page\n */\n @Prop() pageSize: number = defaultSize;\n\n /**\n * The options for the page size\n */\n @Prop() pageSizeOptions: number[] = defaultSizeOptions;\n\n /**\n * Event whenever the page changes\n */\n @Event() pageSizeChange: EventEmitter<number>;\n\n /**\n * Event whenever the page changes\n */\n @Event() export: EventEmitter<number>;\n\n /**\n * Wether to hide when there is only 1 page available\n */\n @Prop() hideOnSinglePage: boolean = true;\n\n /* Empty state start */\n\n @Prop() emptyStateHeader: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.header);\n @Prop() emptyStateContent: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.content);\n @Prop() emptyStateAction: templateFunc = () =>\n formatTranslation(this._locales.empty_state?.no_filter.action);\n\n @Prop() emptyStateFilteredHeader: templateFunc = () =>\n formatTranslation(this._locales.empty_state.filtered.header);\n @Prop() emptyStateFilteredContent: templateFunc = () =>\n formatTranslation(this._locales.empty_state.filtered.content);\n\n /**\n * Event whenever the empty state is clicked\n */\n @Event() emptyStateActionClick: EventEmitter<null>;\n\n /* Empty state end */\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n /**\n * Locales used for this component\n */\n @State() private _locales: any = {};\n\n @State() private _columns: any[] = [];\n @State() private _items: any[] = [];\n\n private _ctrlDown = false;\n\n componentWillLoad() {\n this._setLocales();\n this._parseItems(this.items);\n this._generateColumns();\n }\n\n componentDidRender() {\n this.hasRendered.emit();\n }\n\n render() {\n return (\n <Host class=\"p-table\">\n <p-table-container>\n <p-table-header\n // quick filters\n quickFilters={this.quickFilters}\n activeQuickFilterIdentifier={\n this.activeQuickFilterIdentifier\n }\n onQuickFilter={({ detail }) =>\n this.quickFilter.emit(detail)\n }\n // search\n enableSearch={this.enableSearch}\n query={this.query}\n onQueryChange={({ detail }) =>\n this.queryChange.emit(detail)\n }\n // filter button\n enableFilter={this.enableFilter}\n selectedFiltersAmount={this.selectedFiltersAmount}\n filterButtonTemplate={this.filterButtonTemplate}\n onFilter={() => this.filter.emit()}\n // edit button\n enableEdit={this.enableEdit}\n canEdit={!!this.selectedRows?.length}\n editButtonTemplate={this.editButtonTemplate}\n onEdit={() => this.edit.emit()}\n itemsSelectedAmount={this.selectedRows?.length}\n //loading\n loading={this.headerLoading}\n ></p-table-header>\n\n {this._getHeader()}\n <div class=\"flex flex-col\">{this._getRows()}</div>\n\n <p-table-footer\n // overall\n hideOnSinglePage={this.hideOnSinglePage}\n // page size select\n enablePageSize={this.enablePageSize}\n pageSize={this.pageSize}\n pageSizeOptions={this.pageSizeOptions}\n onPageSizeChange={({ detail }) =>\n this.pageSizeChange.emit(detail)\n }\n // pagination\n enablePagination={this.enablePagination}\n page={this.page}\n total={this.total}\n onPageChange={({ detail }) =>\n this.pageChange.emit(detail)\n }\n // export\n enableExport={this.enableExport}\n onExport={() => this.export.emit()}\n //loading\n loading={this.footerLoading}\n ></p-table-footer>\n </p-table-container>\n </Host>\n );\n }\n\n @Listen('localeChanged', { target: 'body' })\n private async _setLocales(): Promise<void> {\n this._locales = await getLocaleComponentStrings(this._el);\n }\n\n @Listen('tableDefinitionChanged', { target: 'body' })\n onTableDefinitionUpdated() {\n this._generateColumns();\n }\n\n @Listen('keydown', { target: 'document' })\n keyDown({ key }) {\n if (key !== 'Control' || this._ctrlDown === true) {\n return;\n }\n\n this._ctrlDown = true;\n }\n\n @Listen('keyup', { target: 'document' })\n keyUp({ key }) {\n if (key !== 'Control' || this._ctrlDown === false) {\n return;\n }\n\n this._ctrlDown = false;\n }\n\n @Listen('visibilitychange', { target: 'document' })\n visibilityChange() {\n if (document.visibilityState !== 'hidden' || this._ctrlDown === false) {\n return;\n }\n\n this._ctrlDown = false;\n }\n\n @Watch('items')\n private _parseItems(items: string) {\n if (!items) {\n this._items = [];\n return;\n }\n\n if (Array.isArray(items)) {\n this._items = items;\n return;\n }\n\n this._items = JSON.parse(items);\n }\n\n private _generateColumns() {\n const definitions = this._el.querySelectorAll('p-table-column');\n this._columns = Array.from(definitions);\n }\n\n private _getHeader() {\n return (\n <p-table-row variant=\"header\">\n {this._columns.map((col: TableColumn, index) => (\n <p-table-cell\n definition={col}\n value={col.name}\n variant=\"header\"\n checkbox={this._getCheckbox(index, null, 'header')}\n index={index}\n ></p-table-cell>\n ))}\n </p-table-row>\n );\n }\n\n private _getRows() {\n if (this.loading) {\n return Array.from(\n {\n length: this.amountOfLoadingRows,\n },\n (_, i) => (\n <p-table-row\n enableHover={\n this.enableRowSelection || this.enableRowClick\n }\n >\n {this._getLoadingColumns(i)}\n </p-table-row>\n )\n );\n }\n\n if (!this._items.length) {\n return this._getEmptyState();\n }\n\n return this._items.map((item, index) => (\n <p-table-row\n enableHover={this.enableRowSelection || this.enableRowClick}\n onClick={(ev) => this._rowClick(ev, index)}\n >\n {this._getRowColumns(item, index)}\n </p-table-row>\n ));\n }\n\n private _getRowColumns(item, index) {\n return this._columns.map((col: TableColumn, colIndex) => {\n return (\n <p-table-cell\n definition={col}\n item={item}\n checkbox={this._getCheckbox(colIndex, index)}\n index={colIndex}\n rowIndex={index}\n ></p-table-cell>\n );\n });\n }\n\n private _getLoadingColumns(index) {\n return this._columns.map((col: TableColumn, colIndex) => {\n return (\n <p-table-cell\n definition={col}\n variant=\"loading\"\n checkbox={this._getCheckbox(colIndex, index, 'loading')}\n index={colIndex}\n rowIndex={index}\n ></p-table-cell>\n );\n });\n }\n\n private _getCheckbox(\n index,\n rowIndex,\n variant: 'header' | 'default' | 'loading' = 'default'\n ) {\n if (!this.enableRowSelection || !this.selectionKey || index !== 0) {\n return;\n }\n\n if (variant === 'loading') {\n return <p-loader variant=\"ghost\" class=\"rounded w-6 h-6\" />;\n }\n\n if (variant === 'header') {\n return (\n <input\n class=\"p-input\"\n type=\"checkbox\"\n onChange={(ev) => this._selectAllChange(ev)}\n checked={this._selectionContainsAll()}\n indeterminate={this._selectionIndeterminate()}\n />\n );\n }\n\n const item = this._items[rowIndex];\n\n return (\n <input\n class=\"p-input\"\n type=\"checkbox\"\n onChange={(ev) => this._checkboxChange(ev?.target, rowIndex)}\n disabled={this.canSelectKey && !item[this.canSelectKey]}\n checked={this._selectionContains(item, rowIndex)}\n />\n );\n }\n\n private _getEmptyState() {\n if (this.query?.length || this.selectedFiltersAmount) {\n return (\n <div class=\"flex flex-col items-center text-center py-24 max-w-[20rem] self-center\">\n <p-illustration variant=\"empty-state-search\" class=\"mb-6\" />\n <p class=\"font-semibold text-storm-default\">\n {this.emptyStateFilteredHeader()}\n </p>\n <p class=\"text-sm text-storm-medium mb-14\">\n {this.emptyStateFilteredContent()}\n </p>\n </div>\n );\n }\n\n return (\n <div class=\"flex flex-col items-center text-center py-24 max-w-[20rem] self-center\">\n <p-illustration\n variant=\"empty-state-overview\"\n class=\"cursor-pointer mb-6\"\n onClick={() => this.emptyStateActionClick.emit(null)}\n />\n <p class=\"font-semibold text-storm-default\">\n {this.emptyStateHeader()}\n </p>\n <p class=\"text-sm text-storm-medium mb-6\">\n {this.emptyStateContent()}\n </p>\n <p-button\n variant=\"secondary\"\n icon=\"plus\"\n size=\"small\"\n onClick={() => this.emptyStateActionClick.emit(null)}\n >\n {this.emptyStateAction()}\n </p-button>\n </div>\n );\n }\n\n private _selectAllChange($event: any) {\n if (!this.enableRowSelection) {\n return;\n }\n\n const value = this._getCheckedValue($event.target);\n if (value) {\n const toAdd = [];\n for (let i = 0; i < this._items.length; i++) {\n const row = this._items[i];\n if (this.canSelectKey && !row[this.canSelectKey]) {\n continue;\n }\n\n if (this._selectionContains(row, i)) {\n continue;\n }\n\n toAdd.push(row);\n this.rowSelected.emit(row);\n }\n\n this.selectedRows = [...this.selectedRows, ...toAdd];\n this.selectedRowsChange.emit(this.selectedRows);\n return;\n }\n\n for (let i = 0; i < this.selectedRows.length; i++) {\n const value = this.selectedRows[i];\n const row = this._items.find(\n (d) =>\n this._getSelectionValue(d, i) ===\n this._getSelectionValue(value, i)\n );\n\n if (!row) {\n continue;\n }\n\n this.rowDeselected.emit(row);\n }\n\n this.selectedRows = [];\n this.selectedRowsChange.emit(this.selectedRows);\n }\n\n private _checkboxChange(target: any, index: number) {\n if (!this.enableRowSelection) {\n return;\n }\n\n const row = this._items[index];\n\n if (this.canSelectKey && !row[this.canSelectKey]) {\n target.checked = false;\n return;\n }\n\n const value = this._getCheckedValue(target);\n if (value) {\n this.selectedRows = [...this.selectedRows, row];\n this.selectedRowsChange.emit(this.selectedRows);\n this.rowSelected.emit(row);\n return;\n }\n\n const indexOfToRemove = this._selectionContains(row, index, true);\n\n // we need to do this, because splice does not trigger the selection setter.\n const selection = [...this.selectedRows];\n selection.splice(indexOfToRemove, 1);\n this.selectedRows = selection;\n this.selectedRowsChange.emit(this.selectedRows);\n this.rowDeselected.emit(row);\n }\n\n private _getCheckedValue(target: any) {\n return target?.checked;\n }\n\n private _getSelectionValue(row: any, index: number) {\n return this.selectionKey ? row?.[this.selectionKey] || index : index;\n }\n\n private _selectionContains(row, index, returnIndex = false): any {\n const returnValue = this.selectedRows.findIndex(\n (item) =>\n this._getSelectionValue(row, index) ===\n this._getSelectionValue(item, index)\n );\n return !returnIndex ? returnValue >= 0 : returnValue;\n }\n\n private _selectionContainsAll() {\n let returnValue = true;\n if (!this._items?.length) {\n return false;\n }\n\n for (let i = 0; i < this._items?.length; i++) {\n const item = this._items[i];\n const contains = this._selectionContains(item, i);\n\n if (!contains) {\n returnValue = false;\n break;\n }\n }\n\n return returnValue;\n }\n\n private _selectionIndeterminate() {\n if (!this._items?.length || !this.selectedRows?.length) {\n return false;\n }\n\n let containsCount = 0;\n for (let i = 0; i < this._items?.length; i++) {\n const item = this._items[i];\n const contains = this._selectionContains(item, i);\n\n if (contains) {\n containsCount++;\n }\n }\n\n return containsCount > 0 && containsCount !== this._items.length;\n }\n\n private _rowClick($event, index) {\n const target = $event.target;\n\n if (\n target.tagName.toLowerCase() === 'input' ||\n target.type === 'checkbox'\n ) {\n return;\n }\n\n const row = this._findRow($event.target);\n\n if (this.enableRowClick) {\n const action = this._findRowAction($event.target);\n\n if (action) {\n return;\n }\n\n const item = this._items[index];\n this.rowClick.emit({\n item,\n ctrlDown: this._ctrlDown,\n });\n return;\n }\n\n if (!this.enableRowSelection) {\n return;\n }\n\n const checkbox = row?.querySelector('input[type=\"checkbox\"]');\n\n if (!checkbox) {\n return;\n }\n\n checkbox.checked = !checkbox.checked;\n this._checkboxChange(checkbox, index);\n }\n\n private _findRow(el: HTMLElement) {\n if (!el) {\n return el;\n }\n\n if (el?.tagName?.toLowerCase() === 'p-table-row') {\n return el;\n }\n\n return this._findRow(el?.parentElement);\n }\n\n private _findRowAction(el: HTMLElement) {\n if (!el) {\n return null;\n }\n\n if (\n el.getAttribute('data-is-action') !== null &&\n el.getAttribute('data-is-action') !== 'false'\n ) {\n return el;\n }\n\n if (el?.tagName?.toLowerCase() === 'p-table-row') {\n return null;\n }\n\n return this._findRowAction(el?.parentElement);\n }\n}\n"],"mappings":"sJAAA,MAAMA,EAAoB,k2W,MC2BbC,EAAK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WAAO,MAAAnJ,SAAA,SAAAA,EAAEoJ,iBAAkB,cAAe,CAC9C,OAAO,I,CAGX,OAAOxJ,KAAK0J,eAAeI,IAAE,MAAFA,SAAE,SAAFA,EAAIC,c"}
@@ -0,0 +1,2 @@
1
+ import{r as t,c as e,h as r,H as a,g as i}from"./p-69d43b9d.js";import{r as o,t as s,c as n,o as l,v as c,n as h,u as w,p as d,q as m}from"./p-b273ac6d.js";function v(t,e){o(2,arguments);var r=s(t);var a=n(e);if(isNaN(a)){return new Date(NaN)}if(!a){return r}r.setDate(r.getDate()+a);return r}function p(t,e){o(2,arguments);var r=s(t);var a=n(e);if(isNaN(a)){return new Date(NaN)}if(!a){return r}var i=r.getDate();var l=new Date(r.getTime());l.setMonth(r.getMonth()+a+1,0);var c=l.getDate();if(i>=c){return l}else{r.setFullYear(l.getFullYear(),l.getMonth(),i);return r}}function g(t,e){o(2,arguments);var r=n(e);return p(t,r*12)}function y(t){o(1,arguments);var e=s(t);var r=e.getMonth();e.setFullYear(e.getFullYear(),r+1,0);e.setHours(23,59,59,999);return e}function u(t){o(1,arguments);var e=s(t);e.setDate(1);e.setHours(0,0,0,0);return e}function f(t){o(1,arguments);var e=s(t);var r=e.getDay();return r}function b(t){o(1,arguments);var e=s(t);var r=e.getFullYear();var a=e.getMonth();var i=new Date(0);i.setFullYear(r,a+1,0);i.setHours(0,0,0,0);return i.getDate()}function x(t){o(1,arguments);return s(t).getFullYear()}function k(t,e){o(2,arguments);var r=s(t);var a=s(e);return r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()}function D(t,e){o(2,arguments);var r=s(t);var a=s(e);return r.getFullYear()===a.getFullYear()}function Y(t,e){o(2,arguments);var r=s(t);var a=n(e);var i=r.getFullYear();var l=r.getDate();var c=new Date(0);c.setFullYear(i,a,15);c.setHours(0,0,0,0);var h=b(c);r.setMonth(a,Math.min(l,h));return r}function _(t,e){o(2,arguments);var r=s(t);var a=n(e);r.setDate(a);return r}function X(t,e){o(2,arguments);var r=s(t);var a=n(e);if(isNaN(r.getTime())){return new Date(NaN)}r.setFullYear(a);return r}const M=".visible{visibility:visible!important}.static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.col-start-1{grid-column-start:1!important}.col-start-2{grid-column-start:2!important}.col-start-3{grid-column-start:3!important}.col-start-4{grid-column-start:4!important}.col-start-5{grid-column-start:5!important}.col-start-6{grid-column-start:6!important}.col-start-7{grid-column-start:7!important}.ml-2{margin-left:.5rem!important}.block{display:block!important}.flex{display:flex!important}.grid{display:grid!important}.h-6{height:1.5rem!important}.h-8{height:2rem!important}.h-auto{height:auto!important}.h-full{height:100%!important}.w-6{width:1.5rem!important}.w-full{width:100%!important}.-rotate-0{--tw-rotate:-0deg!important}.-rotate-0,.-rotate-135{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-135{--tw-rotate:-135deg!important}.-rotate-180{--tw-rotate:-180deg!important}.-rotate-180,.-rotate-225{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-225{--tw-rotate:-225deg!important}.-rotate-25{--tw-rotate:-25deg!important}.-rotate-25,.-rotate-270{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-270{--tw-rotate:-270deg!important}.-rotate-315{--tw-rotate:-315deg!important}.-rotate-315,.-rotate-45{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.-rotate-45{--tw-rotate:-45deg!important}.-rotate-90{--tw-rotate:-90deg!important}.-rotate-90,.rotate-0{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-0{--tw-rotate:0deg!important}.rotate-135{--tw-rotate:135deg!important}.rotate-135,.rotate-180{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-180{--tw-rotate:180deg!important}.rotate-225{--tw-rotate:225deg!important}.rotate-225,.rotate-25{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-25{--tw-rotate:25deg!important}.rotate-270{--tw-rotate:270deg!important}.rotate-270,.rotate-315{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-315{--tw-rotate:315deg!important}.rotate-45{--tw-rotate:45deg!important}.rotate-45,.rotate-90{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.rotate-90{--tw-rotate:90deg!important}.scale-x-flip{--tw-scale-x:-1!important}.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.scale-y-flip{--tw-scale-y:-1!important}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.items-end{align-items:flex-end!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.justify-between{justify-content:space-between!important}.gap-1{gap:.25rem!important}.self-center{align-self:center!important}.justify-self-center{justify-self:center!important}.overflow-y-auto{overflow-y:auto!important}.rounded{border-radius:.25rem!important}.border{border-width:1px!important}.border-solid{border-style:solid!important}.border-indigo-light{--tw-border-opacity:1!important;border-color:rgb(241 246 255/var(--tw-border-opacity))!important}.bg-indigo-light{background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.bg-indigo-light,.bg-white{--tw-bg-opacity:1!important}.bg-white{background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-2xl{font-size:1.5rem!important;line-height:2rem!important}.text-3xl{font-size:1.875rem!important;line-height:2.25rem!important}.text-4xl{font-size:2.25rem!important;line-height:2.5rem!important}.text-5xl{font-size:3rem!important}.text-5xl,.text-6xl{line-height:1!important}.text-6xl{font-size:3.75rem!important}.text-base{font-size:1rem!important;line-height:1.5rem!important}.text-lg{font-size:1.125rem!important;line-height:1.75rem!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-xl{font-size:1.25rem!important;line-height:1.75rem!important}.text-xs{font-size:.75rem!important;line-height:1rem!important}.text-xxs{font-size:.6875rem!important}.font-semibold{font-weight:600!important}.text-indigo{color:rgb(82 138 250/var(--tw-text-opacity))!important}.text-indigo,.text-negative{--tw-text-opacity:1!important}.text-negative{color:rgb(185 30 40/var(--tw-text-opacity))!important}.text-negative,.text-negative-light{--tw-text-opacity:1!important}.text-negative-light{color:rgb(255 204 211/var(--tw-text-opacity))!important}.text-storm{color:rgb(81 83 107/var(--tw-text-opacity))!important}.text-storm,.text-storm-medium{--tw-text-opacity:1!important}.text-storm-medium{color:rgb(128 130 158/var(--tw-text-opacity))!important}.opacity-40{opacity:.4!important}.blur{--tw-blur:blur(8px)!important}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}*{box-sizing:border-box}.h-\\[12rem\\]{height:12rem!important}.min-h-\\[12rem\\]{min-height:12rem!important}.w-\\[14rem\\]{width:14rem!important}.text-indigo,.text-storm{--tw-text-opacity:1!important}:host{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity));display:block;padding:.5rem;width:14rem}:host .view-day,:host .view-month,:host .view-year{display:flex;flex-direction:column;gap:.5rem;height:12rem;width:100%}:host .header{align-items:center;display:flex;font-size:1rem;gap:.25rem;justify-content:space-between;line-height:1.5rem;width:100%}:host .header span{--tw-text-opacity:1;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;height:2rem;padding-left:.5rem;padding-right:.5rem}:host .header span.disabled{cursor:default}:host .header span:hover:not(.disabled){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host .header span.year{font-weight:600}:host .header .nav{--tw-text-opacity:1;align-items:center;border-radius:100%;color:rgb(82 138 250/var(--tw-text-opacity));cursor:pointer;display:flex;height:1.5rem;justify-content:center;position:relative;text-decoration-line:none;transition-duration:.2s;width:1.5rem}:host .header .nav:hover:not(.disabled){--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity))}:host .header .nav.disabled{opacity:0}:host .view-day{height:auto;min-height:12rem}:host .view-day .dates{display:grid;gap:.25rem;grid-template-columns:repeat(7,1fr)}:host .view-day .dates>span{--tw-text-opacity:1;align-self:center;color:rgb(128 130 158/var(--tw-text-opacity));font-size:.75rem;font-weight:600;justify-self:center;line-height:1rem;text-align:center;width:1.5rem}:host .view-day .dates>time{--tw-text-opacity:1;align-items:center;align-self:center;border:1px solid transparent;border-radius:100%;box-sizing:border-box;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;height:1.5rem;justify-content:center;justify-self:center;line-height:1.25rem;transition-duration:.2s;width:1.5rem}:host .view-day .dates>time.current{--tw-border-opacity:1;border-color:rgb(176 178 203/var(--tw-border-opacity))}:host .view-day .dates>time.active{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-color:rgb(241 246 255/var(--tw-border-opacity));color:rgb(82 138 250/var(--tw-text-opacity));font-weight:600}:host .view-day .dates>time.disabled,:host .view-day .dates>time.other-month{cursor:default;opacity:.4}:host .view-day .dates>time.disabled{text-decoration-line:line-through}:host .view-day .dates>time:hover:not(.disabled):not(.active):not(.other-month){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(81 83 107/var(--tw-text-opacity))}:host .view-month .items,:host .view-year .items{align-items:center;display:grid;gap:.25rem;grid-template-columns:repeat(3,1fr);height:100%;overflow-y:auto;position:relative;width:100%}:host .view-month .items>div,:host .view-year .items>div{--tw-text-opacity:1;align-items:center;border:1px solid transparent;border-radius:.25rem;color:rgb(81 83 107/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;height:2rem;justify-content:center;line-height:1.25rem;padding-left:.5rem;padding-right:.5rem}:host .view-month .items>div.current,:host .view-year .items>div.current{--tw-border-opacity:1;border-color:rgb(176 178 203/var(--tw-border-opacity))}:host .view-month .items>div.active,:host .view-year .items>div.active{--tw-border-opacity:1;--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-color:rgb(241 246 255/var(--tw-border-opacity));color:rgb(82 138 250/var(--tw-text-opacity));font-weight:600}:host .view-month .items>div.disabled,:host .view-year .items>div.disabled{cursor:default;opacity:.4;text-decoration-line:line-through}:host .view-month .items>div:hover:not(.disabled):not(.active),:host .view-year .items>div:hover:not(.disabled):not(.active){--tw-bg-opacity:1;background-color:rgb(247 250 252/var(--tw-bg-opacity))}:host .view-month .items{grid-template-columns:repeat(2,1fr)}:host .view-year .header{justify-content:center}:host(.variant-default){--tw-shadow:0px 0.3125rem 1rem rgba(0,24,98,.08),0px 0.0625rem 0.1875rem rgba(0,24,98,.13);--tw-shadow-colored:0px 0.3125rem 1rem var(--tw-shadow-color),0px 0.0625rem 0.1875rem var(--tw-shadow-color);border-radius:.25rem;box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}:host(.variant-embedded){padding:0}.-rotate-0,.-rotate-135,.-rotate-180,.-rotate-225,.-rotate-25,.-rotate-270,.-rotate-315,.-rotate-45,.-rotate-90,.rotate-0,.rotate-135,.rotate-180,.rotate-225,.rotate-25,.rotate-270,.rotate-315,.rotate-45,.rotate-90,.scale-x-flip,.scale-y-flip{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}.text-lg,.text-xl{line-height:1.75rem!important}.hover\\:text-negative:hover{--tw-text-opacity:1!important;color:rgb(185 30 40/var(--tw-text-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}";const z=class{constructor(r){t(this,r);this.valueChange=e(this,"valueChange",7);this._today=new Date;this._weekDays=Array.from(Array(7).keys());this.variant="default";this.value=undefined;this.preselectToday=false;this.disabledDates=undefined;this.minDate=new Date(1970,0,1);this.maxDate=this._getAutomaticMax();this.disableWeekends=false;this.mode="day";this._view=this.mode;this._viewDate=this._today;this._value=undefined;this._minDate=undefined;this._maxDate=undefined;this._disabledDates=[]}componentWillLoad(){if(this.disabledDates){this._parseDisabledDates(this.disabledDates)}if(this.minDate){this._parseMinDate(this.minDate)}if(this.maxDate){this._parseMaxDate(this.maxDate)}this._parseValue(this.value);if(this._value){this._viewDate=this._value}}componentDidRender(){if(this._view==="year"){this._scrollYearIntoView()}}_parseValue(t){if(!t&&this.preselectToday){t=new Date}if(typeof t==="string"){t=new Date(t)}if(!l(t)){return}if(this._isDisabledDay(t)){return}if(c(this._value,t)){return}this._setValue(t)}_parseMinDate(t){if(typeof t==="string"){t=new Date(t)}if(!l(t)){return}this._minDate=t}_parseMaxDate(t){if(typeof t==="string"){t=new Date(t)}if(!l(t)){return}this._maxDate=t}_parseDisabledDates(t){if(typeof t==="string"){t=JSON.parse(t)}if(!t||!Array.isArray(t)){return}this._disabledDates=t.map((t=>{if(typeof t==="string"){return new Date(t)}return t})).filter((t=>l(t)))}render(){return r(a,{class:`p-calendar variant-${this.variant}`},this._getView())}_getView(){if(this._view==="year"){return this._getYearView()}if(this._view==="month"){return this._getMonthView()}return this._getDayView()}_getDayView(){const t=this._generateDaysInMonth();return r("div",{class:"view-day"},r("div",{class:"header"},r("div",{class:`nav ${!this._canSetAmount("month",-1)&&"disabled"}`,onClick:()=>this._changeMonth(-1)},r("p-icon",{variant:"chevron",rotate:90})),r("div",null,r("span",{onClick:()=>this._changeView("month"),class:!this._canChangeView("month")&&"disabled"},h(this._viewDate,"MMMM")),r("span",{onClick:()=>this._changeView("year"),class:`year ${!this._canChangeView("year")&&"disabled"}`},x(this._viewDate))),r("div",{class:`nav ${!this._canSetAmount("month",1)&&"disabled"}`,onClick:()=>this._changeMonth(1)},r("p-icon",{variant:"chevron",rotate:-90}))),r("div",{class:"dates"},this._weekDays.map((t=>r("span",null,h(v(new Date(2022,7,1),t),"eee")))),t.map((t=>r("time",{class:`day ${t.active&&"active"} ${t.disabled&&"disabled"} ${t.current&&"current"} ${t.offset!==false&&`col-start-${t.offset}`}`,onClick:()=>this._setValue(t.date)},t.day)))))}_getMonthView(){const t=this._generateMonths();return r("div",{class:"view-month"},r("div",{class:"header"},r("div",{class:`nav ${!this._canSetAmount("year",-1)&&"disabled"}`,onClick:()=>this._changeYear(-1)},r("p-icon",{variant:"chevron",rotate:90})),r("div",null,r("span",{onClick:()=>this._changeView("year"),class:`year ${!this._canChangeView("year")&&"disabled"}`},x(this._viewDate))),r("div",{class:`nav ${!this._canSetAmount("year",1)&&"disabled"}`,onClick:()=>this._changeYear(1)},r("p-icon",{variant:"chevron",rotate:-90}))),r("div",{class:"items"},t.map((t=>r("div",{onClick:()=>this._setMonth(t.month),class:`month ${t.active&&"active"} ${t.disabled&&"disabled"} ${t.current&&"current"}`},h(Y(new Date,t.month),"MMMM"))))))}_getYearView(){const t=this._generateYears();return r("div",{class:"view-year"},r("div",{class:"header"},r("div",null,r("span",{class:"year disabled"},t===null||t===void 0?void 0:t[0].year," - ",t===null||t===void 0?void 0:t[t.length-1].year))),r("div",{class:"items"},t.map((t=>r("div",{onClick:()=>this._setYear(t.year),class:`year ${t.active&&"active"} ${t.current&&"current"}`},t.year)))))}_setYear(t){const e=X(this._viewDate,t);if(this.mode==="year"){return this._setValue(Y(_(e,1),0))}this._viewDate=X(this._viewDate,t);this._view="month"}_setMonth(t){const e=Y(this._viewDate,t);if(this.mode==="month"){return this._setValue(_(e,1))}this._viewDate=e;this._view="day"}_changeMonth(t=1){const e=this._canSetAmount("month",t);if(!e){return}const r=p(this._viewDate,t);this._viewDate=r}_changeYear(t=1){const e=this._canSetAmount("year",t);if(!e){return}let r=g(this._viewDate,t);this._viewDate=r}_setValue(t){if(this._isDisabledDay(t)){return}t=w(t);const e=c(t,this._value);if(e){return}this._value=t;this.valueChange.emit(t)}_generateDaysInMonth(){const t=Array.from(Array(b(this._viewDate)).keys());return t.map((t=>{t=t+1;const e=_(this._viewDate,t);const r=f(e);return{day:t,date:e,offset:t===1?r===0?7:r:false,current:c(e,this._today),active:c(e,this._value),disabled:this._isDisabledDay(e)}}))}_isDisabledDay(t){return d(t,this._minDate)||m(t,this._maxDate)&&!c(t,this._maxDate)||(f(t)===0||f(t)===6)&&this.disableWeekends||this._disabledDates.findIndex((e=>c(e,t)))>=0}_generateMonths(){const t=x(this._viewDate);const e=Array.from(Array(12).keys());return e.map((e=>{const r=new Date(t,e,1);return{month:e,current:k(this._today,r),active:k(this._value,r),disabled:m(r,this._maxDate)||d(y(r),this._minDate)}}))}_generateYears(){const t=x(this._maxDate)+1;const e=x(this._minDate);return Array.from(Array(t-e).keys()).map((t=>{const r=e+t;return{year:r,current:x(this._today)===r,active:x(this._value)===r}}))}_scrollYearIntoView(){const t=this._el.shadowRoot.querySelector(".view-year .items");if(!t){return}const e=t.querySelector(".year.active");if(e){return t.scrollTo({top:e.offsetTop})}const r=t.querySelector(".year.current");if(r){return t.scrollTo({top:r.offsetTop})}}_changeView(t){if(!this._canChangeView(t)){return}this._view=t}_canChangeView(t){if(t==="year"){if(D(this._minDate,this._maxDate)){return false}return true}if(k(this._minDate,this._maxDate)){return false}return true}_canSetAmount(t,e=1){if(t==="month"){const t=p(this._viewDate,e);const r=u(t);if(d(r,this._minDate)&&!c(r,this._minDate)||m(r,y(this._maxDate))){return false}}if(t==="year"){let t=g(this._viewDate,e);const r=x(t);if(r<x(this._minDate)||r>x(this._maxDate)){return false}}return true}_getAutomaticMax(){const t=g(new Date,50);let e=x(t);e=Math.ceil(e/10)*10;return X(t,e)}get _el(){return i(this)}static get watchers(){return{value:["_parseValue"],minDate:["_parseMinDate"],maxDate:["_parseMaxDate"],disabledDates:["_parseDisabledDates"]}}};z.style=M;export{z as p_calendar};
2
+ //# sourceMappingURL=p-f518e8b6.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["addDays","dirtyDate","dirtyAmount","requiredArgs","arguments","date","toDate","amount","toInteger","isNaN","Date","NaN","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","addYears","endOfMonth","month","setHours","startOfMonth","getDay","day","getDaysInMonth","year","monthIndex","lastDayOfMonth","getYear","isSameMonth","dirtyDateLeft","dirtyDateRight","dateLeft","dateRight","isSameYear","dirtyMonth","dateWithDesiredMonth","Math","min","dirtyDayOfMonth","setYear","dirtyYear","calendarComponentCss","Calendar","this","_today","_weekDays","Array","from","keys","_getAutomaticMax","mode","componentWillLoad","disabledDates","_parseDisabledDates","minDate","_parseMinDate","maxDate","_parseMaxDate","_parseValue","value","_value","_viewDate","componentDidRender","_view","_scrollYearIntoView","preselectToday","isValid","_isDisabledDay","isSameDay","_setValue","_minDate","_maxDate","JSON","parse","isArray","_disabledDates","map","filter","render","h","Host","class","variant","_getView","_getYearView","_getMonthView","_getDayView","_generateDaysInMonth","_canSetAmount","onClick","_changeMonth","rotate","_changeView","_canChangeView","format","weekday","active","disabled","current","offset","months","_generateMonths","_changeYear","_setMonth","years","_generateYears","length","_setYear","allowed","newDate","startOfDay","isSameValue","valueChange","emit","days","dayOfWeek","isBefore","isAfter","disableWeekends","findIndex","maxYear","minYear","index","items","_el","shadowRoot","querySelector","scrollTo","top","offsetTop","view","type","startNewDate","ceil"],"sources":["../../node_modules/date-fns/esm/addDays/index.js","../../node_modules/date-fns/esm/addMonths/index.js","../../node_modules/date-fns/esm/addYears/index.js","../../node_modules/date-fns/esm/endOfMonth/index.js","../../node_modules/date-fns/esm/startOfMonth/index.js","../../node_modules/date-fns/esm/getDay/index.js","../../node_modules/date-fns/esm/getDaysInMonth/index.js","../../node_modules/date-fns/esm/getYear/index.js","../../node_modules/date-fns/esm/isSameMonth/index.js","../../node_modules/date-fns/esm/isSameYear/index.js","../../node_modules/date-fns/esm/setMonth/index.js","../../node_modules/date-fns/esm/setDate/index.js","../../node_modules/date-fns/esm/setYear/index.js","./src/components/molecules/calendar/calendar.component.scss?tag=p-calendar&encapsulation=shadow","./src/components/molecules/calendar/calendar.component.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\n\nexport default function getDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\n\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\n\nexport default function setDate(dirtyDate, dirtyDayOfMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = toInteger(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n date.setFullYear(year);\n return date;\n}",":host {\n @apply block bg-white p-2;\n @apply w-[14rem];\n\n .view-day,\n .view-month,\n .view-year {\n @apply flex flex-col gap-2;\n @apply w-full h-[12rem];\n }\n\n .header {\n @apply flex justify-between items-center gap-1;\n @apply text-base;\n @apply w-full;\n\n span {\n @apply cursor-pointer h-8 px-2 rounded text-storm;\n\n &.disabled {\n @apply cursor-default;\n }\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.year {\n @apply font-semibold;\n }\n }\n\n .nav {\n @apply relative flex justify-center items-center cursor-pointer;\n @apply no-underline;\n @apply text-indigo;\n @apply w-6 h-6 rounded-round;\n transition-duration: 0.2s;\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.disabled {\n @apply opacity-0;\n }\n }\n }\n\n .view-day {\n @apply h-auto min-h-[12rem];\n\n .dates {\n @apply grid gap-1;\n grid-template-columns: repeat(7, 1fr);\n\n > span {\n @apply text-storm-medium font-semibold text-xs;\n @apply w-6;\n @apply self-center justify-self-center text-center;\n }\n\n > time {\n @apply flex justify-center items-center;\n @apply cursor-pointer;\n @apply w-6 h-6 box-border;\n @apply justify-self-center self-center;\n @apply rounded-round;\n\n @apply text-storm text-sm;\n @apply border border-solid border-transparent;\n\n transition-duration: 0.2s;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.other-month,\n &.disabled {\n @apply opacity-40 cursor-default;\n }\n\n &.disabled {\n @apply line-through;\n }\n\n &:hover:not(.disabled):not(.active):not(.other-month) {\n @apply bg-indigo-light text-storm;\n }\n }\n }\n }\n\n .view-month,\n .view-year {\n .items {\n @apply relative grid overflow-y-auto gap-1 w-full;\n @apply h-full items-center;\n grid-template-columns: repeat(3, 1fr);\n\n > div {\n @apply cursor-pointer;\n @apply flex justify-center items-center;\n @apply text-sm h-8 px-2 rounded;\n @apply text-storm;\n @apply border border-solid border-transparent;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.disabled {\n @apply line-through;\n @apply opacity-40 cursor-default;\n }\n\n &:hover:not(.disabled):not(.active) {\n @apply bg-mystic;\n }\n }\n }\n }\n\n .view-month {\n .items {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n .view-year {\n .header {\n @apply justify-center;\n }\n }\n}\n\n:host(.variant-default) {\n @apply rounded shadow-4;\n}\n\n:host(.variant-embedded) {\n @apply p-0;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n addDays,\n addMonths,\n addYears,\n endOfMonth,\n format,\n getDay,\n getDaysInMonth,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n isSameYear,\n isValid,\n setDate,\n setMonth,\n setYear,\n startOfDay,\n startOfMonth,\n} from 'date-fns';\n\n@Component({\n tag: 'p-calendar',\n styleUrl: 'calendar.component.scss',\n shadow: true,\n})\nexport class Calendar {\n /**\n * The variant of the button\n */\n @Prop() variant: 'default' | 'embedded' = 'default';\n\n /**\n * The current value\n */\n @Prop() value?: Date | 'string';\n\n /**\n * Wether to automatically preselect today\n */\n @Prop() preselectToday: boolean = false;\n\n /**\n * Disabled dates\n */\n @Prop() disabledDates?: Array<Date | 'string'> | string;\n\n /**\n * Min date\n */\n @Prop() minDate: Date | 'string' = new Date(1970, 0, 1);\n\n /**\n * Max date\n */\n @Prop() maxDate: Date | 'string' = this._getAutomaticMax();\n\n /**\n * Wether to disable the weekends\n */\n @Prop() disableWeekends: boolean = false;\n\n /**\n * The mode of the datepicker\n */\n @Prop() mode: 'year' | 'month' | 'day' = 'day';\n\n /**\n * Event when the value changes\n */\n @Event() valueChange: EventEmitter<any>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n private _today = new Date();\n @State() private _view: 'year' | 'month' | 'day' = this.mode;\n @State() private _viewDate = this._today;\n\n @State() private _value: Date;\n @State() private _minDate: Date;\n @State() private _maxDate: Date;\n @State() private _disabledDates: Date[] = [];\n\n private _weekDays = Array.from(Array(7).keys());\n\n componentWillLoad() {\n if (this.disabledDates) {\n this._parseDisabledDates(this.disabledDates);\n }\n\n if (this.minDate) {\n this._parseMinDate(this.minDate);\n }\n\n if (this.maxDate) {\n this._parseMaxDate(this.maxDate);\n }\n\n this._parseValue(this.value);\n\n if (this._value) {\n this._viewDate = this._value;\n }\n }\n\n componentDidRender() {\n if (this._view === 'year') {\n this._scrollYearIntoView();\n }\n }\n\n @Watch('value')\n private _parseValue(value: string | Date) {\n if (!value && this.preselectToday) {\n value = new Date();\n }\n\n if (typeof value === 'string') {\n value = new Date(value);\n }\n\n if (!isValid(value)) {\n return;\n }\n\n if (this._isDisabledDay(value)) {\n return;\n }\n\n if (isSameDay(this._value, value)) {\n return;\n }\n\n this._setValue(value);\n }\n\n @Watch('minDate')\n private _parseMinDate(minDate: string | Date) {\n if (typeof minDate === 'string') {\n minDate = new Date(minDate);\n }\n\n if (!isValid(minDate)) {\n return;\n }\n\n this._minDate = minDate;\n }\n\n @Watch('maxDate')\n private _parseMaxDate(maxDate: string | Date) {\n if (typeof maxDate === 'string') {\n maxDate = new Date(maxDate);\n }\n\n if (!isValid(maxDate)) {\n return;\n }\n\n this._maxDate = maxDate;\n }\n\n @Watch('disabledDates')\n private _parseDisabledDates(disabledDates: Array<string | Date> | string) {\n if (typeof disabledDates === 'string') {\n disabledDates = JSON.parse(disabledDates);\n }\n\n if (!disabledDates || !Array.isArray(disabledDates)) {\n return;\n }\n\n // normalize all to date\n this._disabledDates = disabledDates\n .map((date) => {\n if (typeof date === 'string') {\n return new Date(date);\n }\n\n return date;\n })\n .filter((date) => isValid(date));\n }\n\n render() {\n return (\n <Host class={`p-calendar variant-${this.variant}`}>\n {this._getView()}\n </Host>\n );\n }\n\n private _getView() {\n if (this._view === 'year') {\n return this._getYearView();\n }\n\n if (this._view === 'month') {\n return this._getMonthView();\n }\n\n return this._getDayView();\n }\n\n /* With this, we shall hack the system in ways no one would ever have thought.\n <div class=\"col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7\"></div>\n */\n private _getDayView() {\n const daysInMonth = this._generateDaysInMonth();\n return (\n <div class=\"view-day\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('month', -1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('month')}\n class={!this._canChangeView('month') && 'disabled'}\n >\n {format(this._viewDate, 'MMMM')}\n </span>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('month', 1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"dates\">\n {this._weekDays.map((weekday) => (\n <span>\n {format(\n addDays(new Date(2022, 7, 1), weekday),\n 'eee'\n )}\n </span>\n ))}\n {daysInMonth.map((day) => {\n return (\n <time\n class={`day ${day.active && 'active'} ${\n day.disabled && 'disabled'\n } ${day.current && 'current'} ${\n day.offset !== false &&\n `col-start-${day.offset}`\n }`}\n onClick={() => this._setValue(day.date)}\n >\n {day.day}\n </time>\n );\n })}\n </div>\n </div>\n );\n }\n\n private _getMonthView() {\n const months = this._generateMonths();\n return (\n <div class=\"view-month\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('year', -1) && 'disabled'\n }`}\n onClick={() => this._changeYear(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('year', 1) && 'disabled'\n }`}\n onClick={() => this._changeYear(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"items\">\n {months.map((month) => (\n <div\n onClick={() => this._setMonth(month.month)}\n class={`month ${month.active && 'active'} ${\n month.disabled && 'disabled'\n } ${month.current && 'current'}`}\n >\n {format(setMonth(new Date(), month.month), 'MMMM')}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _getYearView() {\n const years = this._generateYears();\n return (\n <div class=\"view-year\">\n <div class=\"header\">\n <div>\n <span class=\"year disabled\">\n {years?.[0].year} - {years?.[years.length - 1].year}\n </span>\n </div>\n </div>\n <div class=\"items\">\n {years.map((year) => (\n <div\n onClick={() => this._setYear(year.year)}\n class={`year ${year.active && 'active'} ${\n year.current && 'current'\n }`}\n >\n {year.year}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _setYear(year: number) {\n const date = setYear(this._viewDate, year);\n if (this.mode === 'year') {\n return this._setValue(setMonth(setDate(date, 1), 0));\n }\n\n this._viewDate = setYear(this._viewDate, year);\n this._view = 'month';\n }\n\n private _setMonth(month: number) {\n const date = setMonth(this._viewDate, month);\n if (this.mode === 'month') {\n return this._setValue(setDate(date, 1));\n }\n\n this._viewDate = date;\n this._view = 'day';\n }\n\n private _changeMonth(amount = 1) {\n const allowed = this._canSetAmount('month', amount);\n if (!allowed) {\n return;\n }\n\n const newDate = addMonths(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _changeYear(amount = 1) {\n const allowed = this._canSetAmount('year', amount);\n if (!allowed) {\n return;\n }\n\n let newDate = addYears(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _setValue(value: Date) {\n if (this._isDisabledDay(value)) {\n return;\n }\n\n value = startOfDay(value);\n const isSameValue = isSameDay(value, this._value);\n\n if (isSameValue) {\n return;\n }\n\n this._value = value;\n this.valueChange.emit(value);\n }\n\n private _generateDaysInMonth() {\n const days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());\n\n return days.map((day) => {\n day = day + 1;\n const date = setDate(this._viewDate, day);\n\n const dayOfWeek = getDay(date);\n return {\n day,\n date,\n offset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,\n current: isSameDay(date, this._today),\n active: isSameDay(date, this._value),\n disabled: this._isDisabledDay(date),\n };\n });\n }\n\n private _isDisabledDay(day: Date) {\n return (\n isBefore(day, this._minDate) ||\n (isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||\n ((getDay(day) === 0 || getDay(day) === 6) &&\n this.disableWeekends) ||\n this._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0\n );\n }\n\n private _generateMonths() {\n const year = getYear(this._viewDate);\n const months = Array.from(Array(12).keys());\n\n return months.map((month) => {\n const date = new Date(year, month, 1);\n return {\n month,\n current: isSameMonth(this._today, date),\n active: isSameMonth(this._value, date),\n disabled:\n isAfter(date, this._maxDate) ||\n isBefore(endOfMonth(date), this._minDate),\n };\n });\n }\n\n private _generateYears() {\n const maxYear = getYear(this._maxDate) + 1;\n const minYear = getYear(this._minDate);\n\n return Array.from(Array(maxYear - minYear).keys()).map((index) => {\n const year = minYear + index;\n return {\n year,\n current: getYear(this._today) === year,\n active: getYear(this._value) === year,\n };\n });\n }\n\n private _scrollYearIntoView() {\n const items = this._el.shadowRoot.querySelector('.view-year .items');\n if (!items) {\n return;\n }\n\n const active = items.querySelector('.year.active') as HTMLElement;\n if (active) {\n return items.scrollTo({\n top: active.offsetTop,\n });\n }\n\n const current = items.querySelector('.year.current') as HTMLElement;\n if (current) {\n return items.scrollTo({\n top: current.offsetTop,\n });\n }\n }\n\n private _changeView(view: 'year' | 'month') {\n if (!this._canChangeView(view)) {\n return;\n }\n\n this._view = view;\n }\n\n private _canChangeView(view: 'year' | 'month') {\n if (view === 'year') {\n if (isSameYear(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n if (isSameMonth(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n private _canSetAmount(type: 'month' | 'year', amount = 1) {\n if (type === 'month') {\n const newDate = addMonths(this._viewDate, amount);\n const startNewDate = startOfMonth(newDate);\n if (\n (isBefore(startNewDate, this._minDate) &&\n !isSameDay(startNewDate, this._minDate)) ||\n isAfter(startNewDate, endOfMonth(this._maxDate))\n ) {\n return false;\n }\n }\n\n if (type === 'year') {\n let newDate = addYears(this._viewDate, amount);\n const year = getYear(newDate);\n if (\n year < getYear(this._minDate) ||\n year > getYear(this._maxDate)\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n private _getAutomaticMax() {\n const date = addYears(new Date(), 50);\n\n let year = getYear(date);\n year = Math.ceil(year / 10) * 10;\n\n return setYear(date, year);\n }\n}\n"],"mappings":"4JAsBe,SAASA,EAAQC,EAAWC,GACzCC,EAAa,EAAGC,WAChB,IAAIC,EAAOC,EAAOL,GAClB,IAAIM,EAASC,EAAUN,GAEvB,GAAIO,MAAMF,GAAS,CACjB,OAAO,IAAIG,KAAKC,IACpB,CAEE,IAAKJ,EAAQ,CAEX,OAAOF,CACX,CAEEA,EAAKO,QAAQP,EAAKQ,UAAYN,GAC9B,OAAOF,CACT,CChBe,SAASS,EAAUb,EAAWC,GAC3CC,EAAa,EAAGC,WAChB,IAAIC,EAAOC,EAAOL,GAClB,IAAIM,EAASC,EAAUN,GAEvB,GAAIO,MAAMF,GAAS,CACjB,OAAO,IAAIG,KAAKC,IACpB,CAEE,IAAKJ,EAAQ,CAEX,OAAOF,CACX,CAEE,IAAIU,EAAaV,EAAKQ,UAStB,IAAIG,EAAoB,IAAIN,KAAKL,EAAKY,WACtCD,EAAkBE,SAASb,EAAKc,WAAaZ,EAAS,EAAG,GACzD,IAAIa,EAAcJ,EAAkBH,UAEpC,GAAIE,GAAcK,EAAa,CAG7B,OAAOJ,CACX,KAAS,CAQLX,EAAKgB,YAAYL,EAAkBM,cAAeN,EAAkBG,WAAY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9B,EAAQ+B,W,EAKjBrC,YAAYsC,GAChB,IAAKvF,KAAKkD,eAAeqC,GAAO,CAC5B,M,CAGJvF,KAAKoB,MAAQmE,C,CAGTrC,eAAeqC,GACnB,GAAIA,IAAS,OAAQ,CACjB,GAAIjG,EAAWU,KAAK2B,SAAU3B,KAAK4B,UAAW,CAC1C,OAAO,K,CAGX,OAAO,I,CAGX,GAAI3C,EAAYe,KAAK2B,SAAU3B,KAAK4B,UAAW,CAC3C,OAAO,K,CAGX,OAAO,I,CAGHiB,cAAc2C,EAAwBnI,EAAS,GACnD,GAAImI,IAAS,QAAS,CAClB,MAAMtB,EAAUtG,EAAUoC,KAAKkB,UAAW7D,GAC1C,MAAMoI,EAAehH,EAAayF,GAClC,GACKO,EAASgB,EAAczF,KAAK2B,YACxBF,EAAUgE,EAAczF,KAAK2B,WAClC+C,EAAQe,EAAcnH,EAAW0B,KAAK4B,WACxC,CACE,OAAO,K,EAIf,GAAI4D,IAAS,OAAQ,CACjB,IAAItB,EAAU7F,EAAS2B,KAAKkB,UAAW7D,GACvC,MAAMwB,EAAOG,EAAQkF,GACrB,GACIrF,EAAOG,EAAQgB,KAAK2B,WACpB9C,EAAOG,EAAQgB,KAAK4B,UACtB,CACE,OAAO,K,EAIf,OAAO,I,CAGHtB,mBACJ,MAAMnD,EAAOkB,EAAS,IAAIb,KAAQ,IAElC,IAAIqB,EAAOG,EAAQ7B,GACnB0B,EAAOY,KAAKiG,KAAK7G,EAAO,IAAM,GAE9B,OAAOe,EAAQzC,EAAM0B,E"}
1
+ {"version":3,"names":["addDays","dirtyDate","dirtyAmount","requiredArgs","arguments","date","toDate","amount","toInteger","isNaN","Date","NaN","setDate","getDate","addMonths","dayOfMonth","endOfDesiredMonth","getTime","setMonth","getMonth","daysInMonth","setFullYear","getFullYear","addYears","endOfMonth","month","setHours","startOfMonth","getDay","day","getDaysInMonth","year","monthIndex","lastDayOfMonth","getYear","isSameMonth","dirtyDateLeft","dirtyDateRight","dateLeft","dateRight","isSameYear","dirtyMonth","dateWithDesiredMonth","Math","min","dirtyDayOfMonth","setYear","dirtyYear","calendarComponentCss","Calendar","this","_today","_weekDays","Array","from","keys","_getAutomaticMax","mode","componentWillLoad","disabledDates","_parseDisabledDates","minDate","_parseMinDate","maxDate","_parseMaxDate","_parseValue","value","_value","_viewDate","componentDidRender","_view","_scrollYearIntoView","preselectToday","isValid","_isDisabledDay","isSameDay","_setValue","_minDate","_maxDate","JSON","parse","isArray","_disabledDates","map","filter","render","h","Host","class","variant","_getView","_getYearView","_getMonthView","_getDayView","_generateDaysInMonth","_canSetAmount","onClick","_changeMonth","rotate","_changeView","_canChangeView","format","weekday","active","disabled","current","offset","months","_generateMonths","_changeYear","_setMonth","years","_generateYears","length","_setYear","allowed","newDate","startOfDay","isSameValue","valueChange","emit","days","dayOfWeek","isBefore","isAfter","disableWeekends","findIndex","maxYear","minYear","index","items","_el","shadowRoot","querySelector","scrollTo","top","offsetTop","view","type","startNewDate","ceil"],"sources":["../../node_modules/date-fns/esm/addDays/index.js","../../node_modules/date-fns/esm/addMonths/index.js","../../node_modules/date-fns/esm/addYears/index.js","../../node_modules/date-fns/esm/endOfMonth/index.js","../../node_modules/date-fns/esm/startOfMonth/index.js","../../node_modules/date-fns/esm/getDay/index.js","../../node_modules/date-fns/esm/getDaysInMonth/index.js","../../node_modules/date-fns/esm/getYear/index.js","../../node_modules/date-fns/esm/isSameMonth/index.js","../../node_modules/date-fns/esm/isSameYear/index.js","../../node_modules/date-fns/esm/setMonth/index.js","../../node_modules/date-fns/esm/setDate/index.js","../../node_modules/date-fns/esm/setYear/index.js","./src/components/molecules/calendar/calendar.component.scss?tag=p-calendar&encapsulation=shadow","./src/components/molecules/calendar/calendar.component.tsx"],"sourcesContent":["import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addDays\n * @category Day Helpers\n * @summary Add the specified number of days to the given date.\n *\n * @description\n * Add the specified number of days to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of days to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} - the new date with the days added\n * @throws {TypeError} - 2 arguments required\n *\n * @example\n * // Add 10 days to 1 September 2014:\n * const result = addDays(new Date(2014, 8, 1), 10)\n * //=> Thu Sep 11 2014 00:00:00\n */\n\nexport default function addDays(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 days, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n date.setDate(date.getDate() + amount);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addMonths\n * @category Month Helpers\n * @summary Add the specified number of months to the given date.\n *\n * @description\n * Add the specified number of months to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of months to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the months added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 months to 1 September 2014:\n * const result = addMonths(new Date(2014, 8, 1), 5)\n * //=> Sun Feb 01 2015 00:00:00\n */\n\nexport default function addMonths(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var amount = toInteger(dirtyAmount);\n\n if (isNaN(amount)) {\n return new Date(NaN);\n }\n\n if (!amount) {\n // If 0 months, no-op to avoid changing times in the hour before end of DST\n return date;\n }\n\n var dayOfMonth = date.getDate(); // The JS Date object supports date math by accepting out-of-bounds values for\n // month, day, etc. For example, new Date(2020, 0, 0) returns 31 Dec 2019 and\n // new Date(2020, 13, 1) returns 1 Feb 2021. This is *almost* the behavior we\n // want except that dates will wrap around the end of a month, meaning that\n // new Date(2020, 13, 31) will return 3 Mar 2021 not 28 Feb 2021 as desired. So\n // we'll default to the end of the desired month by adding 1 to the desired\n // month and using a date of 0 to back up one day to the end of the desired\n // month.\n\n var endOfDesiredMonth = new Date(date.getTime());\n endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);\n var daysInMonth = endOfDesiredMonth.getDate();\n\n if (dayOfMonth >= daysInMonth) {\n // If we're already at the end of the month, then this is the correct date\n // and we're done.\n return endOfDesiredMonth;\n } else {\n // Otherwise, we now know that setting the original day-of-month value won't\n // cause an overflow, so set the desired day-of-month. Note that we can't\n // just set the date of `endOfDesiredMonth` because that object may have had\n // its time changed in the unusual case where where a DST transition was on\n // the last day of the month and its local time was in the hour skipped or\n // repeated next to a DST transition. So we use `date` instead which is\n // guaranteed to still have the original time.\n date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);\n return date;\n }\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport addMonths from \"../addMonths/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name addYears\n * @category Year Helpers\n * @summary Add the specified number of years to the given date.\n *\n * @description\n * Add the specified number of years to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} amount - the amount of years to be added. Positive decimals will be rounded using `Math.floor`, decimals less than zero will be rounded using `Math.ceil`.\n * @returns {Date} the new date with the years added\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Add 5 years to 1 September 2014:\n * const result = addYears(new Date(2014, 8, 1), 5)\n * //=> Sun Sep 01 2019 00:00:00\n */\n\nexport default function addYears(dirtyDate, dirtyAmount) {\n requiredArgs(2, arguments);\n var amount = toInteger(dirtyAmount);\n return addMonths(dirtyDate, amount * 12);\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the end of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\n\nexport default function endOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var month = date.getMonth();\n date.setFullYear(date.getFullYear(), month + 1, 0);\n date.setHours(23, 59, 59, 999);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name startOfMonth\n * @category Month Helpers\n * @summary Return the start of a month for the given date.\n *\n * @description\n * Return the start of a month for the given date.\n * The result will be in the local timezone.\n *\n * @param {Date|Number} date - the original date\n * @returns {Date} the start of a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // The start of a month for 2 September 2014 11:55:00:\n * const result = startOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\n\nexport default function startOfMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n return date;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDay\n * @category Weekday Helpers\n * @summary Get the day of the week of the given date.\n *\n * @description\n * Get the day of the week of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {0|1|2|3|4|5|6} the day of week, 0 represents Sunday\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which day of the week is 29 February 2012?\n * const result = getDay(new Date(2012, 1, 29))\n * //=> 3\n */\n\nexport default function getDay(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var day = date.getDay();\n return day;\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getDaysInMonth\n * @category Month Helpers\n * @summary Get the number of days in a month of the given date.\n *\n * @description\n * Get the number of days in a month of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the number of days in a month\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // How many days are in February 2000?\n * const result = getDaysInMonth(new Date(2000, 1))\n * //=> 29\n */\n\nexport default function getDaysInMonth(dirtyDate) {\n requiredArgs(1, arguments);\n var date = toDate(dirtyDate);\n var year = date.getFullYear();\n var monthIndex = date.getMonth();\n var lastDayOfMonth = new Date(0);\n lastDayOfMonth.setFullYear(year, monthIndex + 1, 0);\n lastDayOfMonth.setHours(0, 0, 0, 0);\n return lastDayOfMonth.getDate();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name getYear\n * @category Year Helpers\n * @summary Get the year of the given date.\n *\n * @description\n * Get the year of the given date.\n *\n * @param {Date|Number} date - the given date\n * @returns {Number} the year\n * @throws {TypeError} 1 argument required\n *\n * @example\n * // Which year is 2 July 2014?\n * const result = getYear(new Date(2014, 6, 2))\n * //=> 2014\n */\n\nexport default function getYear(dirtyDate) {\n requiredArgs(1, arguments);\n return toDate(dirtyDate).getFullYear();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameMonth\n * @category Month Helpers\n * @summary Are the given dates in the same month (and year)?\n *\n * @description\n * Are the given dates in the same month (and year)?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same month (and year)\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n *\n * @example\n * // Are 2 September 2014 and 25 September 2015 in the same month?\n * const result = isSameMonth(new Date(2014, 8, 2), new Date(2015, 8, 25))\n * //=> false\n */\n\nexport default function isSameMonth(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear() && dateLeft.getMonth() === dateRight.getMonth();\n}","import toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name isSameYear\n * @category Year Helpers\n * @summary Are the given dates in the same year?\n *\n * @description\n * Are the given dates in the same year?\n *\n * @param {Date|Number} dateLeft - the first date to check\n * @param {Date|Number} dateRight - the second date to check\n * @returns {Boolean} the dates are in the same year\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Are 2 September 2014 and 25 September 2014 in the same year?\n * const result = isSameYear(new Date(2014, 8, 2), new Date(2014, 8, 25))\n * //=> true\n */\n\nexport default function isSameYear(dirtyDateLeft, dirtyDateRight) {\n requiredArgs(2, arguments);\n var dateLeft = toDate(dirtyDateLeft);\n var dateRight = toDate(dirtyDateRight);\n return dateLeft.getFullYear() === dateRight.getFullYear();\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport getDaysInMonth from \"../getDaysInMonth/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setMonth\n * @category Month Helpers\n * @summary Set the month to the given date.\n *\n * @description\n * Set the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} month - the month of the new date\n * @returns {Date} the new date with the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set February to 1 September 2014:\n * const result = setMonth(new Date(2014, 8, 1), 1)\n * //=> Sat Feb 01 2014 00:00:00\n */\n\nexport default function setMonth(dirtyDate, dirtyMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var month = toInteger(dirtyMonth);\n var year = date.getFullYear();\n var day = date.getDate();\n var dateWithDesiredMonth = new Date(0);\n dateWithDesiredMonth.setFullYear(year, month, 15);\n dateWithDesiredMonth.setHours(0, 0, 0, 0);\n var daysInMonth = getDaysInMonth(dateWithDesiredMonth); // Set the last day of the new month\n // if the original date was the last day of the longer month\n\n date.setMonth(month, Math.min(day, daysInMonth));\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setDate\n * @category Day Helpers\n * @summary Set the day of the month to the given date.\n *\n * @description\n * Set the day of the month to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} dayOfMonth - the day of the month of the new date\n * @returns {Date} the new date with the day of the month set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set the 30th day of the month to 1 September 2014:\n * const result = setDate(new Date(2014, 8, 1), 30)\n * //=> Tue Sep 30 2014 00:00:00\n */\n\nexport default function setDate(dirtyDate, dirtyDayOfMonth) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var dayOfMonth = toInteger(dirtyDayOfMonth);\n date.setDate(dayOfMonth);\n return date;\n}","import toInteger from \"../_lib/toInteger/index.js\";\nimport toDate from \"../toDate/index.js\";\nimport requiredArgs from \"../_lib/requiredArgs/index.js\";\n/**\n * @name setYear\n * @category Year Helpers\n * @summary Set the year to the given date.\n *\n * @description\n * Set the year to the given date.\n *\n * @param {Date|Number} date - the date to be changed\n * @param {Number} year - the year of the new date\n * @returns {Date} the new date with the year set\n * @throws {TypeError} 2 arguments required\n *\n * @example\n * // Set year 2013 to 1 September 2014:\n * const result = setYear(new Date(2014, 8, 1), 2013)\n * //=> Sun Sep 01 2013 00:00:00\n */\n\nexport default function setYear(dirtyDate, dirtyYear) {\n requiredArgs(2, arguments);\n var date = toDate(dirtyDate);\n var year = toInteger(dirtyYear); // Check if date is Invalid Date because Date.prototype.setFullYear ignores the value of Invalid Date\n\n if (isNaN(date.getTime())) {\n return new Date(NaN);\n }\n\n date.setFullYear(year);\n return date;\n}",":host {\n @apply block bg-white p-2;\n @apply w-[14rem];\n\n .view-day,\n .view-month,\n .view-year {\n @apply flex flex-col gap-2;\n @apply w-full h-[12rem];\n }\n\n .header {\n @apply flex justify-between items-center gap-1;\n @apply text-base;\n @apply w-full;\n\n span {\n @apply cursor-pointer h-8 px-2 rounded text-storm;\n\n &.disabled {\n @apply cursor-default;\n }\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.year {\n @apply font-semibold;\n }\n }\n\n .nav {\n @apply relative flex justify-center items-center cursor-pointer;\n @apply no-underline;\n @apply text-indigo;\n @apply w-6 h-6 rounded-round;\n transition-duration: 0.2s;\n\n &:hover:not(.disabled) {\n @apply bg-indigo-light;\n }\n\n &.disabled {\n @apply opacity-0;\n }\n }\n }\n\n .view-day {\n @apply h-auto min-h-[12rem];\n\n .dates {\n @apply grid gap-1;\n grid-template-columns: repeat(7, 1fr);\n\n > span {\n @apply text-storm-medium font-semibold text-xs;\n @apply w-6;\n @apply self-center justify-self-center text-center;\n }\n\n > time {\n @apply flex justify-center items-center;\n @apply cursor-pointer;\n @apply w-6 h-6 box-border;\n @apply justify-self-center self-center;\n @apply rounded-round;\n\n @apply text-storm text-sm;\n @apply border border-solid border-transparent;\n\n transition-duration: 0.2s;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.other-month,\n &.disabled {\n @apply opacity-40 cursor-default;\n }\n\n &.disabled {\n @apply line-through;\n }\n\n &:hover:not(.disabled):not(.active):not(.other-month) {\n @apply bg-indigo-light text-storm;\n }\n }\n }\n }\n\n .view-month,\n .view-year {\n .items {\n @apply relative grid overflow-y-auto gap-1 w-full;\n @apply h-full items-center;\n grid-template-columns: repeat(3, 1fr);\n\n > div {\n @apply cursor-pointer;\n @apply flex justify-center items-center;\n @apply text-sm h-8 px-2 rounded;\n @apply text-storm;\n @apply border border-solid border-transparent;\n\n &.current {\n @apply border-storm-light;\n }\n\n &.active {\n @apply bg-indigo-light border-indigo-light text-indigo font-semibold;\n }\n\n &.disabled {\n @apply line-through;\n @apply opacity-40 cursor-default;\n }\n\n &:hover:not(.disabled):not(.active) {\n @apply bg-mystic;\n }\n }\n }\n }\n\n .view-month {\n .items {\n grid-template-columns: repeat(2, 1fr);\n }\n }\n\n .view-year {\n .header {\n @apply justify-center;\n }\n }\n}\n\n:host(.variant-default) {\n @apply rounded shadow-4;\n}\n\n:host(.variant-embedded) {\n @apply p-0;\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Prop,\n State,\n Watch,\n} from '@stencil/core';\nimport {\n addDays,\n addMonths,\n addYears,\n endOfMonth,\n format,\n getDay,\n getDaysInMonth,\n getYear,\n isAfter,\n isBefore,\n isSameDay,\n isSameMonth,\n isSameYear,\n isValid,\n setDate,\n setMonth,\n setYear,\n startOfDay,\n startOfMonth,\n} from 'date-fns';\n\n@Component({\n tag: 'p-calendar',\n styleUrl: 'calendar.component.scss',\n shadow: true,\n})\nexport class Calendar {\n /**\n * The variant of the button\n */\n @Prop() variant: 'default' | 'embedded' = 'default';\n\n /**\n * The current value\n */\n @Prop() value?: Date | 'string';\n\n /**\n * Wether to automatically preselect today\n */\n @Prop() preselectToday: boolean = false;\n\n /**\n * Disabled dates\n */\n @Prop() disabledDates?: Array<Date | 'string'> | string;\n\n /**\n * Min date\n */\n @Prop() minDate: Date | 'string' = new Date(1970, 0, 1);\n\n /**\n * Max date\n */\n @Prop() maxDate: Date | 'string' = this._getAutomaticMax();\n\n /**\n * Wether to disable the weekends\n */\n @Prop() disableWeekends: boolean = false;\n\n /**\n * The mode of the datepicker\n */\n @Prop() mode: 'year' | 'month' | 'day' = 'day';\n\n /**\n * Event when the value changes\n */\n @Event() valueChange: EventEmitter<any>;\n\n /**\n * The host element\n */\n @Element() private _el: HTMLElement;\n\n private _today = new Date();\n @State() private _view: 'year' | 'month' | 'day' = this.mode;\n @State() private _viewDate = this._today;\n\n @State() private _value: Date;\n @State() private _minDate: Date;\n @State() private _maxDate: Date;\n @State() private _disabledDates: Date[] = [];\n\n private _weekDays = Array.from(Array(7).keys());\n\n componentWillLoad() {\n if (this.disabledDates) {\n this._parseDisabledDates(this.disabledDates);\n }\n\n if (this.minDate) {\n this._parseMinDate(this.minDate);\n }\n\n if (this.maxDate) {\n this._parseMaxDate(this.maxDate);\n }\n\n this._parseValue(this.value);\n\n if (this._value) {\n this._viewDate = this._value;\n }\n }\n\n componentDidRender() {\n if (this._view === 'year') {\n this._scrollYearIntoView();\n }\n }\n\n @Watch('value')\n private _parseValue(value: string | Date) {\n if (!value && this.preselectToday) {\n value = new Date();\n }\n\n if (typeof value === 'string') {\n value = new Date(value);\n }\n\n if (!isValid(value)) {\n return;\n }\n\n if (this._isDisabledDay(value)) {\n return;\n }\n\n if (isSameDay(this._value, value)) {\n return;\n }\n\n this._setValue(value);\n }\n\n @Watch('minDate')\n private _parseMinDate(minDate: string | Date) {\n if (typeof minDate === 'string') {\n minDate = new Date(minDate);\n }\n\n if (!isValid(minDate)) {\n return;\n }\n\n this._minDate = minDate;\n }\n\n @Watch('maxDate')\n private _parseMaxDate(maxDate: string | Date) {\n if (typeof maxDate === 'string') {\n maxDate = new Date(maxDate);\n }\n\n if (!isValid(maxDate)) {\n return;\n }\n\n this._maxDate = maxDate;\n }\n\n @Watch('disabledDates')\n private _parseDisabledDates(disabledDates: Array<string | Date> | string) {\n if (typeof disabledDates === 'string') {\n disabledDates = JSON.parse(disabledDates);\n }\n\n if (!disabledDates || !Array.isArray(disabledDates)) {\n return;\n }\n\n // normalize all to date\n this._disabledDates = disabledDates\n .map((date) => {\n if (typeof date === 'string') {\n return new Date(date);\n }\n\n return date;\n })\n .filter((date) => isValid(date));\n }\n\n render() {\n return (\n <Host class={`p-calendar variant-${this.variant}`}>\n {this._getView()}\n </Host>\n );\n }\n\n private _getView() {\n if (this._view === 'year') {\n return this._getYearView();\n }\n\n if (this._view === 'month') {\n return this._getMonthView();\n }\n\n return this._getDayView();\n }\n\n /* With this, we shall hack the system in ways no one would ever have thought.\n <div class=\"col-start-1 col-start-2 col-start-3 col-start-4 col-start-5 col-start-6 col-start-7\"></div>\n */\n private _getDayView() {\n const daysInMonth = this._generateDaysInMonth();\n return (\n <div class=\"view-day\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('month', -1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('month')}\n class={!this._canChangeView('month') && 'disabled'}\n >\n {format(this._viewDate, 'MMMM')}\n </span>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('month', 1) && 'disabled'\n }`}\n onClick={() => this._changeMonth(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"dates\">\n {this._weekDays.map((weekday) => (\n <span>\n {format(\n addDays(new Date(2022, 7, 1), weekday),\n 'eee'\n )}\n </span>\n ))}\n {daysInMonth.map((day) => {\n return (\n <time\n class={`day ${day.active && 'active'} ${\n day.disabled && 'disabled'\n } ${day.current && 'current'} ${\n day.offset !== false &&\n `col-start-${day.offset}`\n }`}\n onClick={() => this._setValue(day.date)}\n >\n {day.day}\n </time>\n );\n })}\n </div>\n </div>\n );\n }\n\n private _getMonthView() {\n const months = this._generateMonths();\n return (\n <div class=\"view-month\">\n <div class=\"header\">\n <div\n class={`nav ${\n !this._canSetAmount('year', -1) && 'disabled'\n }`}\n onClick={() => this._changeYear(-1)}\n >\n <p-icon variant=\"chevron\" rotate={90} />\n </div>\n <div>\n <span\n onClick={() => this._changeView('year')}\n class={`year ${\n !this._canChangeView('year') && 'disabled'\n }`}\n >\n {getYear(this._viewDate)}\n </span>\n </div>\n <div\n class={`nav ${\n !this._canSetAmount('year', 1) && 'disabled'\n }`}\n onClick={() => this._changeYear(1)}\n >\n <p-icon variant=\"chevron\" rotate={-90} />\n </div>\n </div>\n <div class=\"items\">\n {months.map((month) => (\n <div\n onClick={() => this._setMonth(month.month)}\n class={`month ${month.active && 'active'} ${\n month.disabled && 'disabled'\n } ${month.current && 'current'}`}\n >\n {format(setMonth(new Date(), month.month), 'MMMM')}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _getYearView() {\n const years = this._generateYears();\n return (\n <div class=\"view-year\">\n <div class=\"header\">\n <div>\n <span class=\"year disabled\">\n {years?.[0].year} - {years?.[years.length - 1].year}\n </span>\n </div>\n </div>\n <div class=\"items\">\n {years.map((year) => (\n <div\n onClick={() => this._setYear(year.year)}\n class={`year ${year.active && 'active'} ${\n year.current && 'current'\n }`}\n >\n {year.year}\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n private _setYear(year: number) {\n const date = setYear(this._viewDate, year);\n if (this.mode === 'year') {\n return this._setValue(setMonth(setDate(date, 1), 0));\n }\n\n this._viewDate = setYear(this._viewDate, year);\n this._view = 'month';\n }\n\n private _setMonth(month: number) {\n const date = setMonth(this._viewDate, month);\n if (this.mode === 'month') {\n return this._setValue(setDate(date, 1));\n }\n\n this._viewDate = date;\n this._view = 'day';\n }\n\n private _changeMonth(amount = 1) {\n const allowed = this._canSetAmount('month', amount);\n if (!allowed) {\n return;\n }\n\n const newDate = addMonths(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _changeYear(amount = 1) {\n const allowed = this._canSetAmount('year', amount);\n if (!allowed) {\n return;\n }\n\n let newDate = addYears(this._viewDate, amount);\n this._viewDate = newDate;\n }\n\n private _setValue(value: Date) {\n if (this._isDisabledDay(value)) {\n return;\n }\n\n value = startOfDay(value);\n const isSameValue = isSameDay(value, this._value);\n\n if (isSameValue) {\n return;\n }\n\n this._value = value;\n this.valueChange.emit(value);\n }\n\n private _generateDaysInMonth() {\n const days = Array.from(Array(getDaysInMonth(this._viewDate)).keys());\n\n return days.map((day) => {\n day = day + 1;\n const date = setDate(this._viewDate, day);\n\n const dayOfWeek = getDay(date);\n return {\n day,\n date,\n offset: day === 1 ? (dayOfWeek === 0 ? 7 : dayOfWeek) : false,\n current: isSameDay(date, this._today),\n active: isSameDay(date, this._value),\n disabled: this._isDisabledDay(date),\n };\n });\n }\n\n private _isDisabledDay(day: Date) {\n return (\n isBefore(day, this._minDate) ||\n (isAfter(day, this._maxDate) && !isSameDay(day, this._maxDate)) ||\n ((getDay(day) === 0 || getDay(day) === 6) &&\n this.disableWeekends) ||\n this._disabledDates.findIndex((date) => isSameDay(date, day)) >= 0\n );\n }\n\n private _generateMonths() {\n const year = getYear(this._viewDate);\n const months = Array.from(Array(12).keys());\n\n return months.map((month) => {\n const date = new Date(year, month, 1);\n return {\n month,\n current: isSameMonth(this._today, date),\n active: isSameMonth(this._value, date),\n disabled:\n isAfter(date, this._maxDate) ||\n isBefore(endOfMonth(date), this._minDate),\n };\n });\n }\n\n private _generateYears() {\n const maxYear = getYear(this._maxDate) + 1;\n const minYear = getYear(this._minDate);\n\n return Array.from(Array(maxYear - minYear).keys()).map((index) => {\n const year = minYear + index;\n return {\n year,\n current: getYear(this._today) === year,\n active: getYear(this._value) === year,\n };\n });\n }\n\n private _scrollYearIntoView() {\n const items = this._el.shadowRoot.querySelector('.view-year .items');\n if (!items) {\n return;\n }\n\n const active = items.querySelector('.year.active') as HTMLElement;\n if (active) {\n return items.scrollTo({\n top: active.offsetTop,\n });\n }\n\n const current = items.querySelector('.year.current') as HTMLElement;\n if (current) {\n return items.scrollTo({\n top: current.offsetTop,\n });\n }\n }\n\n private _changeView(view: 'year' | 'month') {\n if (!this._canChangeView(view)) {\n return;\n }\n\n this._view = view;\n }\n\n private _canChangeView(view: 'year' | 'month') {\n if (view === 'year') {\n if (isSameYear(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n if (isSameMonth(this._minDate, this._maxDate)) {\n return false;\n }\n\n return true;\n }\n\n private _canSetAmount(type: 'month' | 'year', amount = 1) {\n if (type === 'month') {\n const newDate = addMonths(this._viewDate, amount);\n const startNewDate = startOfMonth(newDate);\n if (\n (isBefore(startNewDate, this._minDate) &&\n !isSameDay(startNewDate, this._minDate)) ||\n isAfter(startNewDate, endOfMonth(this._maxDate))\n ) {\n return false;\n }\n }\n\n if (type === 'year') {\n let newDate = addYears(this._viewDate, amount);\n const year = getYear(newDate);\n if (\n year < getYear(this._minDate) ||\n year > getYear(this._maxDate)\n ) {\n return false;\n }\n }\n\n return true;\n }\n\n private _getAutomaticMax() {\n const date = addYears(new Date(), 50);\n\n let year = getYear(date);\n year = Math.ceil(year / 10) * 10;\n\n return setYear(date, year);\n }\n}\n"],"mappings":"4JAsBe,SAASA,EAAQC,EAAWC,GACzCC,EAAa,EAAGC,WAChB,IAAIC,EAAOC,EAAOL,GAClB,IAAIM,EAASC,EAAUN,GAEvB,GAAIO,MAAMF,GAAS,CACjB,OAAO,IAAIG,KAAKC,IACpB,CAEE,IAAKJ,EAAQ,CAEX,OAAOF,CACX,CAEEA,EAAKO,QAAQP,EAAKQ,UAAYN,GAC9B,OAAOF,CACT,CChBe,SAASS,EAAUb,EAAWC,GAC3CC,EAAa,EAAGC,WAChB,IAAIC,EAAOC,EAAOL,GAClB,IAAIM,EAASC,EAAUN,GAEvB,GAAIO,MAAMF,GAAS,CACjB,OAAO,IAAIG,KAAKC,IACpB,CAEE,IAAKJ,EAAQ,CAEX,OAAOF,CACX,CAEE,IAAIU,EAAaV,EAAKQ,UAStB,IAAIG,EAAoB,IAAIN,KAAKL,EAAKY,WACtCD,EAAkBE,SAASb,EAAKc,WAAaZ,EAAS,EAAG,GACzD,IAAIa,EAAcJ,EAAkBH,UAEpC,GAAIE,GAAcK,EAAa,CAG7B,OAAOJ,CACX,KAAS,CAQLX,EAAKgB,YAAYL,EAAkBM,cAAeN,EAAkBG,WAAYJ,GAChF,OAAOV,CACX,CACA,CC1Ce,SAASkB,EAAStB,EAAWC,GAC1CC,EAAa,EAAGC,WAChB,IAAIG,EAASC,EAAUN,GACv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