smoothly 1.0.0-alpha.99 → 1.0.0

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 (456) hide show
  1. package/dist/cjs/Data-50d47740.js +589 -0
  2. package/dist/cjs/Data-50d47740.js.map +1 -0
  3. package/dist/cjs/Observers-6450f075.js +25 -0
  4. package/dist/cjs/Observers-6450f075.js.map +1 -0
  5. package/dist/cjs/TimeZone-016ac7b0.js +6181 -0
  6. package/dist/cjs/TimeZone-016ac7b0.js.map +1 -0
  7. package/dist/cjs/{getLanguage-7e53766b.js → getLanguage-49a534df.js} +1 -5993
  8. package/dist/cjs/getLanguage-49a534df.js.map +1 -0
  9. package/dist/cjs/{index-6ae370b4.js → index-43af753b.js} +1 -4
  10. package/dist/cjs/index-43af753b.js.map +1 -0
  11. package/dist/cjs/index.cjs.js +3 -14
  12. package/dist/cjs/index.cjs.js.map +1 -1
  13. package/dist/cjs/loader.cjs.js +4 -3
  14. package/dist/cjs/loader.cjs.js.map +1 -1
  15. package/dist/cjs/smoothly-accordion-item.cjs.entry.js +61 -0
  16. package/dist/cjs/smoothly-accordion-item.cjs.entry.js.map +1 -0
  17. package/dist/cjs/smoothly-accordion.cjs.entry.js +58 -0
  18. package/dist/cjs/smoothly-accordion.cjs.entry.js.map +1 -0
  19. package/dist/cjs/smoothly-address-display.cjs.entry.js +1 -1
  20. package/dist/cjs/smoothly-address.cjs.entry.js +1 -1
  21. package/dist/cjs/smoothly-addresses.cjs.entry.js +1 -1
  22. package/dist/cjs/smoothly-app_80.cjs.entry.js +11148 -0
  23. package/dist/cjs/smoothly-app_80.cjs.entry.js.map +1 -0
  24. package/dist/cjs/smoothly-checkbox.cjs.entry.js +102 -0
  25. package/dist/cjs/smoothly-checkbox.cjs.entry.js.map +1 -0
  26. package/dist/cjs/smoothly-color.cjs.entry.js +1 -1
  27. package/dist/cjs/smoothly-country.cjs.entry.js +56 -55
  28. package/dist/cjs/smoothly-country.cjs.entry.js.map +1 -1
  29. package/dist/cjs/smoothly-display-date-time.cjs.entry.js +1 -1
  30. package/dist/cjs/smoothly-google-font.cjs.entry.js +1 -1
  31. package/dist/cjs/smoothly-reorder.cjs.entry.js +4 -4
  32. package/dist/cjs/smoothly-reorder.cjs.entry.js.map +1 -1
  33. package/dist/cjs/smoothly-trigger-sink.cjs.entry.js +2 -2
  34. package/dist/cjs/smoothly-trigger-source.cjs.entry.js +2 -2
  35. package/dist/cjs/smoothly.cjs.js +4 -3
  36. package/dist/cjs/smoothly.cjs.js.map +1 -1
  37. package/dist/collection/collection-manifest.json +24 -7
  38. package/dist/collection/components/Button.js +16 -2
  39. package/dist/collection/components/Button.js.map +1 -1
  40. package/dist/collection/components/app/index.js +53 -1
  41. package/dist/collection/components/app/index.js.map +1 -1
  42. package/dist/collection/components/app/room/index.js +45 -2
  43. package/dist/collection/components/app/room/index.js.map +1 -1
  44. package/dist/collection/components/app/room/style.css +23 -9
  45. package/dist/collection/components/app/style.css +57 -32
  46. package/dist/collection/components/app-demo/index.js +1 -2
  47. package/dist/collection/components/app-demo/index.js.map +1 -1
  48. package/dist/collection/components/burger/index.js +9 -9
  49. package/dist/collection/components/burger/index.js.map +1 -1
  50. package/dist/collection/components/button/index.js +9 -22
  51. package/dist/collection/components/button/index.js.map +1 -1
  52. package/dist/collection/components/button/style.css +23 -20
  53. package/dist/collection/components/button-demo/index.js +3 -1
  54. package/dist/collection/components/button-demo/index.js.map +1 -1
  55. package/dist/collection/components/button-demo/style.css +1 -0
  56. package/dist/collection/components/calendar/generate.js +1 -1
  57. package/dist/collection/components/calendar/generate.js.map +1 -1
  58. package/dist/collection/components/calendar/index.js +16 -16
  59. package/dist/collection/components/calendar/index.js.map +1 -1
  60. package/dist/collection/components/checkbox/index.js +60 -29
  61. package/dist/collection/components/checkbox/index.js.map +1 -1
  62. package/dist/collection/components/checkbox/style.css +39 -42
  63. package/dist/collection/components/confirm/index.js +261 -0
  64. package/dist/collection/components/confirm/index.js.map +1 -0
  65. package/dist/collection/components/confirm/style.css +15 -0
  66. package/dist/collection/components/display/index.js +4 -1
  67. package/dist/collection/components/display/index.js.map +1 -1
  68. package/dist/collection/components/display-demo/index.js +16 -1
  69. package/dist/collection/components/display-demo/index.js.map +1 -1
  70. package/dist/collection/components/filter/Filter.js +17 -0
  71. package/dist/collection/components/filter/Filter.js.map +1 -0
  72. package/dist/collection/components/filter/field/index.js +105 -0
  73. package/dist/collection/components/filter/field/index.js.map +1 -0
  74. package/dist/collection/components/filter/field/style.css +4 -0
  75. package/dist/collection/components/filter/index.js +55 -132
  76. package/dist/collection/components/filter/index.js.map +1 -1
  77. package/dist/collection/components/filter/input/index.js +84 -301
  78. package/dist/collection/components/filter/input/index.js.map +1 -1
  79. package/dist/collection/components/filter/picker/index.js +229 -0
  80. package/dist/collection/components/filter/picker/index.js.map +1 -0
  81. package/dist/collection/components/filter/picker/style.css +8 -0
  82. package/dist/collection/components/filter/style.css +56 -71
  83. package/dist/collection/components/filter/toggle/index.js +248 -0
  84. package/dist/collection/components/filter/toggle/index.js.map +1 -0
  85. package/dist/collection/components/filter/toggle/style.css +8 -0
  86. package/dist/collection/components/form/index.js +234 -66
  87. package/dist/collection/components/form/index.js.map +1 -1
  88. package/dist/collection/components/form/style.css +3 -1
  89. package/dist/collection/components/icon/index.js +60 -32
  90. package/dist/collection/components/icon/index.js.map +1 -1
  91. package/dist/collection/components/icon/style.css +15 -0
  92. package/dist/collection/components/icon-demo/index.js +3 -1
  93. package/dist/collection/components/icon-demo/index.js.map +1 -1
  94. package/dist/collection/components/icon-demo/style.css +5 -6
  95. package/dist/collection/components/input/Editable.js +19 -0
  96. package/dist/collection/components/input/Editable.js.map +1 -0
  97. package/dist/collection/components/input/Input.js +22 -1
  98. package/dist/collection/components/input/Input.js.map +1 -1
  99. package/dist/collection/components/input/Looks.js +7 -1
  100. package/dist/collection/components/input/Looks.js.map +1 -1
  101. package/dist/collection/components/input/Submittable.js.map +1 -1
  102. package/dist/collection/components/input/checkbox/index.js +382 -0
  103. package/dist/collection/components/input/checkbox/index.js.map +1 -0
  104. package/dist/collection/components/input/checkbox/style.css +75 -0
  105. package/dist/collection/components/input/clear/index.js +12 -7
  106. package/dist/collection/components/input/clear/index.js.map +1 -1
  107. package/dist/collection/components/input/clear/style.css +23 -20
  108. package/dist/collection/components/input/color/index.js +226 -0
  109. package/dist/collection/components/input/color/index.js.map +1 -0
  110. package/dist/collection/components/input/color/style.css +15 -0
  111. package/dist/collection/components/input/date/index.js +8 -8
  112. package/dist/collection/components/input/date/index.js.map +1 -1
  113. package/dist/collection/components/input/date/range/index.js +13 -17
  114. package/dist/collection/components/input/date/range/index.js.map +1 -1
  115. package/dist/collection/components/input/date/range/style.css +25 -0
  116. package/dist/collection/components/input/date/style.css +25 -0
  117. package/dist/collection/components/input/demo/index.js +28 -72
  118. package/dist/collection/components/input/demo/index.js.map +1 -1
  119. package/dist/collection/components/input/demo/style.css +15 -0
  120. package/dist/collection/components/input/edit/index.js +249 -0
  121. package/dist/collection/components/input/edit/index.js.map +1 -0
  122. package/dist/collection/components/input/edit/style.css +238 -0
  123. package/dist/collection/components/input/file/index.js +3 -3
  124. package/dist/collection/components/input/file/index.js.map +1 -1
  125. package/dist/collection/components/input/file/style.css +22 -0
  126. package/dist/collection/components/input/index.js +245 -110
  127. package/dist/collection/components/input/index.js.map +1 -1
  128. package/dist/collection/components/input/month/index.js +5 -5
  129. package/dist/collection/components/input/month/index.js.map +1 -1
  130. package/dist/collection/components/input/radio/Selected.js +11 -0
  131. package/dist/collection/components/input/radio/Selected.js.map +1 -0
  132. package/dist/collection/components/input/radio/index.js +426 -0
  133. package/dist/collection/components/input/radio/index.js.map +1 -0
  134. package/dist/collection/components/{radio-button → input/radio/item}/index.js +60 -72
  135. package/dist/collection/components/input/radio/item/index.js.map +1 -0
  136. package/dist/collection/components/input/radio/item/style.css +28 -0
  137. package/dist/collection/components/input/radio/style.css +66 -0
  138. package/dist/collection/components/input/range/index.js +440 -0
  139. package/dist/collection/components/input/range/index.js.map +1 -0
  140. package/dist/collection/components/input/range/style.css +154 -0
  141. package/dist/collection/components/input/reset/index.js +260 -0
  142. package/dist/collection/components/input/reset/index.js.map +1 -0
  143. package/dist/collection/components/input/reset/style.css +255 -0
  144. package/dist/collection/components/input/select/index.js +443 -95
  145. package/dist/collection/components/input/select/index.js.map +1 -1
  146. package/dist/collection/components/input/select/style.css +111 -23
  147. package/dist/collection/components/input/style.css +24 -2
  148. package/dist/collection/components/input/submit/index.js +269 -0
  149. package/dist/collection/components/input/submit/index.js.map +1 -0
  150. package/dist/collection/components/input/submit/style.css +11 -0
  151. package/dist/collection/components/item/Item.js +11 -0
  152. package/dist/collection/components/item/Item.js.map +1 -0
  153. package/dist/collection/components/item/index.js +69 -29
  154. package/dist/collection/components/item/index.js.map +1 -1
  155. package/dist/collection/components/item/style.css +1 -3
  156. package/dist/collection/components/label/index.js +81 -0
  157. package/dist/collection/components/label/index.js.map +1 -0
  158. package/dist/collection/components/label/style.css +15 -0
  159. package/dist/collection/components/lazy/index.js +73 -0
  160. package/dist/collection/components/lazy/index.js.map +1 -0
  161. package/dist/collection/components/{radio → load-more}/index.js +35 -46
  162. package/dist/collection/components/load-more/index.js.map +1 -0
  163. package/dist/collection/components/load-more/style.css +5 -0
  164. package/dist/collection/components/notification/index.js.map +1 -1
  165. package/dist/collection/components/picker/demo/index.js +17 -15
  166. package/dist/collection/components/picker/demo/index.js.map +1 -1
  167. package/dist/collection/components/picker/demo/style.css +24 -1
  168. package/dist/collection/components/picker/index.js +172 -7
  169. package/dist/collection/components/picker/index.js.map +1 -1
  170. package/dist/collection/components/picker/menu/index.js +74 -3
  171. package/dist/collection/components/picker/menu/index.js.map +1 -1
  172. package/dist/collection/components/picker/menu/style.css +16 -6
  173. package/dist/collection/components/picker/option/index.js +51 -3
  174. package/dist/collection/components/picker/option/index.js.map +1 -1
  175. package/dist/collection/components/picker/option/style.css +9 -4
  176. package/dist/collection/components/picker/style.css +28 -3
  177. package/dist/collection/components/popup/index.js +5 -5
  178. package/dist/collection/components/popup/index.js.map +1 -1
  179. package/dist/collection/components/popup/style.css +4 -4
  180. package/dist/collection/components/submit/index.js +0 -15
  181. package/dist/collection/components/submit/index.js.map +1 -1
  182. package/dist/collection/components/submit/style.css +23 -20
  183. package/dist/collection/components/summary/index.js +2 -3
  184. package/dist/collection/components/summary/index.js.map +1 -1
  185. package/dist/collection/components/summary/style.css +25 -16
  186. package/dist/collection/components/table/cell/style.css +3 -3
  187. package/dist/collection/components/table/demo/filtered/Root.js.map +1 -1
  188. package/dist/collection/components/table/demo/filtered/index.js +30 -15
  189. package/dist/collection/components/table/demo/filtered/index.js.map +1 -1
  190. package/dist/collection/components/table/demo/filtered/style.css +9 -0
  191. package/dist/collection/components/table/demo/index.js +2 -14
  192. package/dist/collection/components/table/demo/index.js.map +1 -1
  193. package/dist/collection/components/table/demo/style.css +5 -0
  194. package/dist/collection/components/table/demo/testing/data.js.map +1 -0
  195. package/dist/collection/components/table/demo/testing/index.js +28 -0
  196. package/dist/collection/components/table/demo/testing/index.js.map +1 -0
  197. package/dist/collection/components/table/demo/testing/style.css +32 -0
  198. package/dist/collection/components/table/expandable/cell/index.js +1 -20
  199. package/dist/collection/components/table/expandable/cell/index.js.map +1 -1
  200. package/dist/collection/components/table/expandable/cell/style.css +13 -13
  201. package/dist/collection/components/table/expandable/row/index.js +1 -20
  202. package/dist/collection/components/table/expandable/row/index.js.map +1 -1
  203. package/dist/collection/components/table/expandable/row/style.css +11 -11
  204. package/dist/collection/components/table/footer/index.js +19 -0
  205. package/dist/collection/components/table/footer/index.js.map +1 -0
  206. package/dist/collection/components/table/footer/style.css +10 -0
  207. package/dist/collection/components/table/header/style.css +2 -3
  208. package/dist/collection/components/table/index.js +24 -1
  209. package/dist/collection/components/table/index.js.map +1 -1
  210. package/dist/collection/components/theme/color/index.js +48 -0
  211. package/dist/collection/components/theme/color/index.js.map +1 -0
  212. package/dist/collection/components/theme/color/style.css +8 -0
  213. package/dist/collection/components/theme/color/variant/index.js +66 -0
  214. package/dist/collection/components/theme/color/variant/index.js.map +1 -0
  215. package/dist/collection/components/theme/color/variant/style.css +18 -0
  216. package/dist/collection/components/theme/colors/index.js +30 -0
  217. package/dist/collection/components/theme/colors/index.js.map +1 -0
  218. package/dist/collection/components/theme/colors/style.css +7 -0
  219. package/dist/collection/components/theme/picker/index.js +48 -0
  220. package/dist/collection/components/theme/picker/index.js.map +1 -0
  221. package/dist/collection/components/theme/picker/style.css +0 -0
  222. package/dist/collection/components/toggle-switch/index.js +69 -17
  223. package/dist/collection/components/toggle-switch/index.js.map +1 -1
  224. package/dist/collection/components/toggle-switch/style.css +19 -12
  225. package/dist/collection/global/Observers.js +22 -0
  226. package/dist/collection/global/Observers.js.map +1 -0
  227. package/dist/collection/global/index.js +5 -0
  228. package/dist/collection/global/index.js.map +1 -0
  229. package/dist/collection/model/Color.js +18 -1
  230. package/dist/collection/model/Color.js.map +1 -1
  231. package/dist/collection/model/Data.js +8 -1
  232. package/dist/collection/model/Data.js.map +1 -1
  233. package/dist/collection/model/Icon.js +23 -0
  234. package/dist/collection/model/Icon.js.map +1 -0
  235. package/dist/collection/model/Listenable.js +16 -3
  236. package/dist/collection/model/Listenable.js.map +1 -1
  237. package/dist/collection/model/Option.js.map +1 -1
  238. package/dist/collection/model/index.js +2 -1
  239. package/dist/collection/model/index.js.map +1 -1
  240. package/dist/collection/smoothly.js +1 -1
  241. package/dist/collection/smoothly.js.map +1 -1
  242. package/dist/custom-elements/index.d.ts +120 -24
  243. package/dist/custom-elements/index.js +15445 -33845
  244. package/dist/custom-elements/index.js.map +1 -1
  245. package/dist/esm/Data-c8093b5a.js +579 -0
  246. package/dist/esm/Data-c8093b5a.js.map +1 -0
  247. package/dist/esm/Observers-5f08e828.js +25 -0
  248. package/dist/esm/Observers-5f08e828.js.map +1 -0
  249. package/dist/esm/TimeZone-c8df4905.js +6181 -0
  250. package/dist/esm/TimeZone-c8df4905.js.map +1 -0
  251. package/dist/esm/{getLanguage-9c833eef.js → getLanguage-1e9ec036.js} +2 -5994
  252. package/dist/esm/getLanguage-1e9ec036.js.map +1 -0
  253. package/dist/esm/{index-c196715a.js → index-258984d3.js} +2 -4
  254. package/dist/esm/index-258984d3.js.map +1 -0
  255. package/dist/esm/index.js +3 -14
  256. package/dist/esm/index.js.map +1 -1
  257. package/dist/esm/loader.js +5 -4
  258. package/dist/esm/loader.js.map +1 -1
  259. package/dist/esm/smoothly-accordion-item.entry.js +57 -0
  260. package/dist/esm/smoothly-accordion-item.entry.js.map +1 -0
  261. package/dist/esm/smoothly-accordion.entry.js +54 -0
  262. package/dist/esm/smoothly-accordion.entry.js.map +1 -0
  263. package/dist/esm/smoothly-address-display.entry.js +1 -1
  264. package/dist/esm/smoothly-address.entry.js +1 -1
  265. package/dist/esm/smoothly-addresses.entry.js +1 -1
  266. package/dist/esm/smoothly-app_80.entry.js +11065 -0
  267. package/dist/esm/smoothly-app_80.entry.js.map +1 -0
  268. package/dist/esm/smoothly-checkbox.entry.js +98 -0
  269. package/dist/esm/smoothly-checkbox.entry.js.map +1 -0
  270. package/dist/esm/smoothly-color.entry.js +1 -1
  271. package/dist/esm/smoothly-country.entry.js +10 -9
  272. package/dist/esm/smoothly-country.entry.js.map +1 -1
  273. package/dist/esm/smoothly-display-date-time.entry.js +1 -1
  274. package/dist/esm/smoothly-google-font.entry.js +1 -1
  275. package/dist/esm/smoothly-reorder.entry.js +2 -2
  276. package/dist/esm/smoothly-reorder.entry.js.map +1 -1
  277. package/dist/esm/smoothly-trigger-sink.entry.js +2 -2
  278. package/dist/esm/smoothly-trigger-source.entry.js +2 -2
  279. package/dist/esm/smoothly.js +5 -4
  280. package/dist/esm/smoothly.js.map +1 -1
  281. package/dist/smoothly/index.esm.js +1 -1
  282. package/dist/smoothly/index.esm.js.map +1 -1
  283. package/dist/smoothly/{p-663ccbd0.entry.js → p-12182a73.entry.js} +2 -2
  284. package/dist/smoothly/p-21905b32.entry.js +2 -0
  285. package/dist/smoothly/p-21905b32.entry.js.map +1 -0
  286. package/dist/smoothly/p-2e986022.js +2 -0
  287. package/dist/smoothly/p-2e986022.js.map +1 -0
  288. package/dist/smoothly/p-303520d1.entry.js +2 -0
  289. package/dist/smoothly/p-303520d1.entry.js.map +1 -0
  290. package/dist/smoothly/p-312ef066.js +2 -0
  291. package/dist/smoothly/p-312ef066.js.map +1 -0
  292. package/dist/smoothly/{p-9992c8c4.entry.js → p-47151a53.entry.js} +2 -2
  293. package/dist/smoothly/{p-d0b8061e.js → p-5e387578.js} +3 -3
  294. package/dist/smoothly/p-5e387578.js.map +1 -0
  295. package/dist/smoothly/{p-b82ef190.entry.js → p-635c813e.entry.js} +2 -2
  296. package/dist/smoothly/{p-dbd1afa9.entry.js → p-6aebb818.entry.js} +2 -2
  297. package/dist/smoothly/p-6e9aca2e.entry.js +2 -0
  298. package/dist/smoothly/p-6e9aca2e.entry.js.map +1 -0
  299. package/dist/smoothly/{p-c4ffc15d.entry.js → p-7a69b43f.entry.js} +2 -2
  300. package/dist/smoothly/{p-4d743f07.entry.js → p-7bf147bf.entry.js} +2 -2
  301. package/dist/smoothly/p-823e02b0.entry.js +2 -0
  302. package/dist/smoothly/p-823e02b0.entry.js.map +1 -0
  303. package/dist/smoothly/p-b3eac6af.entry.js +2 -0
  304. package/dist/smoothly/{p-4ff439dd.entry.js.map → p-b3eac6af.entry.js.map} +1 -1
  305. package/dist/smoothly/{p-f96e41aa.entry.js → p-cb493516.entry.js} +2 -2
  306. package/dist/smoothly/p-ede93d69.js +2 -0
  307. package/dist/smoothly/p-ede93d69.js.map +1 -0
  308. package/dist/smoothly/{p-ce4e6f44.entry.js → p-eef1c80b.entry.js} +2 -2
  309. package/dist/smoothly/p-f125610c.entry.js +2 -0
  310. package/dist/smoothly/p-f125610c.entry.js.map +1 -0
  311. package/dist/smoothly/p-fa664317.js +2 -0
  312. package/dist/smoothly/p-fa664317.js.map +1 -0
  313. package/dist/smoothly/smoothly.esm.js +1 -1
  314. package/dist/smoothly/smoothly.esm.js.map +1 -1
  315. package/dist/types/components/Button.d.ts +1 -2
  316. package/dist/types/components/app/index.d.ts +3 -0
  317. package/dist/types/components/app/room/index.d.ts +4 -2
  318. package/dist/types/components/app-demo/index.d.ts +1 -0
  319. package/dist/types/components/burger/index.d.ts +2 -2
  320. package/dist/types/components/button/index.d.ts +2 -2
  321. package/dist/types/components/calendar/index.d.ts +5 -5
  322. package/dist/types/components/checkbox/index.d.ts +4 -2
  323. package/dist/types/components/confirm/index.d.ts +19 -0
  324. package/dist/types/components/filter/Filter.d.ts +21 -0
  325. package/dist/types/components/filter/field/index.d.ts +10 -0
  326. package/dist/types/components/filter/index.d.ts +13 -12
  327. package/dist/types/components/filter/input/index.d.ts +17 -23
  328. package/dist/types/components/filter/picker/index.d.ts +25 -0
  329. package/dist/types/components/filter/toggle/index.d.ts +22 -0
  330. package/dist/types/components/form/index.d.ts +22 -15
  331. package/dist/types/components/icon/index.d.ts +4 -6
  332. package/dist/types/components/input/Editable.d.ts +21 -0
  333. package/dist/types/components/input/Input.d.ts +19 -7
  334. package/dist/types/components/input/Looks.d.ts +7 -1
  335. package/dist/types/components/input/Submittable.d.ts +1 -1
  336. package/dist/types/components/input/checkbox/index.d.ts +30 -0
  337. package/dist/types/components/input/color/index.d.ts +24 -0
  338. package/dist/types/components/input/date/index.d.ts +1 -1
  339. package/dist/types/components/input/date/range/index.d.ts +2 -2
  340. package/dist/types/components/input/demo/index.d.ts +3 -6
  341. package/dist/types/components/input/edit/index.d.ts +18 -0
  342. package/dist/types/components/input/index.d.ts +30 -21
  343. package/dist/types/components/input/month/index.d.ts +1 -1
  344. package/dist/types/components/input/radio/Selected.d.ts +10 -0
  345. package/dist/types/components/input/radio/index.d.ts +36 -0
  346. package/dist/types/components/input/radio/item/index.d.ts +15 -0
  347. package/dist/types/components/input/range/index.d.ts +33 -0
  348. package/dist/types/components/input/reset/index.d.ts +19 -0
  349. package/dist/types/components/input/select/index.d.ts +41 -18
  350. package/dist/types/components/input/submit/index.d.ts +19 -0
  351. package/dist/types/components/item/Item.d.ts +10 -0
  352. package/dist/types/components/item/index.d.ts +8 -5
  353. package/dist/types/components/label/index.d.ts +6 -0
  354. package/dist/types/components/lazy/index.d.ts +7 -0
  355. package/dist/types/components/load-more/index.d.ts +11 -0
  356. package/dist/types/components/picker/demo/index.d.ts +7 -2
  357. package/dist/types/components/picker/index.d.ts +20 -6
  358. package/dist/types/components/picker/menu/index.d.ts +8 -0
  359. package/dist/types/components/picker/option/index.d.ts +2 -0
  360. package/dist/types/components/popup/index.d.ts +1 -1
  361. package/dist/types/components/submit/index.d.ts +0 -1
  362. package/dist/types/components/table/demo/filtered/Root.d.ts +2 -0
  363. package/dist/types/components/table/demo/filtered/index.d.ts +6 -6
  364. package/dist/types/components/table/demo/index.d.ts +1 -1
  365. package/dist/types/components/table/expandable/cell/index.d.ts +0 -1
  366. package/dist/types/components/table/expandable/row/index.d.ts +0 -1
  367. package/dist/types/components/table/footer/index.d.ts +3 -0
  368. package/dist/types/components/table/index.d.ts +2 -0
  369. package/dist/types/components/theme/color/index.d.ts +5 -0
  370. package/dist/types/components/theme/color/variant/index.d.ts +6 -0
  371. package/dist/types/components/theme/colors/index.d.ts +3 -0
  372. package/dist/types/components/theme/picker/index.d.ts +4 -0
  373. package/dist/types/components/toggle-switch/index.d.ts +7 -2
  374. package/dist/types/components.d.ts +658 -182
  375. package/dist/types/global/Observers.d.ts +8 -0
  376. package/dist/types/global/index.d.ts +4 -0
  377. package/dist/types/model/Color.d.ts +7 -1
  378. package/dist/types/model/Data.d.ts +4 -0
  379. package/dist/types/model/Icon.d.ts +8 -0
  380. package/dist/types/model/Listenable.d.ts +10 -1
  381. package/dist/types/model/Option.d.ts +2 -0
  382. package/dist/types/model/index.d.ts +1 -1
  383. package/dist/types/smoothly.d.ts +1 -1
  384. package/package.json +7 -11
  385. package/dist/cjs/Data-afbe461d.js +0 -807
  386. package/dist/cjs/Data-afbe461d.js.map +0 -1
  387. package/dist/cjs/getLanguage-7e53766b.js.map +0 -1
  388. package/dist/cjs/index-6ae370b4.js.map +0 -1
  389. package/dist/cjs/smoothly-accordion_66.cjs.entry.js +0 -29732
  390. package/dist/cjs/smoothly-accordion_66.cjs.entry.js.map +0 -1
  391. package/dist/cjs/smoothly-radio-group.cjs.entry.js +0 -22
  392. package/dist/cjs/smoothly-radio-group.cjs.entry.js.map +0 -1
  393. package/dist/collection/components/filter/Clearable.js +0 -8
  394. package/dist/collection/components/filter/Clearable.js.map +0 -1
  395. package/dist/collection/components/icon/Icon.js +0 -2
  396. package/dist/collection/components/icon/Icon.js.map +0 -1
  397. package/dist/collection/components/input/Changeable.js +0 -8
  398. package/dist/collection/components/input/Changeable.js.map +0 -1
  399. package/dist/collection/components/radio/index.js.map +0 -1
  400. package/dist/collection/components/radio/style.css +0 -31
  401. package/dist/collection/components/radio-button/Selected.js +0 -2
  402. package/dist/collection/components/radio-button/Selected.js.map +0 -1
  403. package/dist/collection/components/radio-button/index.js.map +0 -1
  404. package/dist/collection/components/radio-button/item/index.js +0 -117
  405. package/dist/collection/components/radio-button/item/index.js.map +0 -1
  406. package/dist/collection/components/radio-button/item/style.css +0 -85
  407. package/dist/collection/components/radio-group/index.js +0 -43
  408. package/dist/collection/components/radio-group/index.js.map +0 -1
  409. package/dist/collection/components/radio-group/style.css +0 -36
  410. package/dist/collection/components/table/testing/data.js.map +0 -1
  411. package/dist/collection/components/table/testing/index.js +0 -28
  412. package/dist/collection/components/table/testing/index.js.map +0 -1
  413. package/dist/collection/components/table/testing/style.css +0 -8
  414. package/dist/collection/model/ClientIdentifier.js +0 -13
  415. package/dist/collection/model/ClientIdentifier.js.map +0 -1
  416. package/dist/esm/Data-77d2bdbe.js +0 -803
  417. package/dist/esm/Data-77d2bdbe.js.map +0 -1
  418. package/dist/esm/getLanguage-9c833eef.js.map +0 -1
  419. package/dist/esm/index-c196715a.js.map +0 -1
  420. package/dist/esm/smoothly-accordion_66.entry.js +0 -29663
  421. package/dist/esm/smoothly-accordion_66.entry.js.map +0 -1
  422. package/dist/esm/smoothly-radio-group.entry.js +0 -18
  423. package/dist/esm/smoothly-radio-group.entry.js.map +0 -1
  424. package/dist/smoothly/p-1b714a63.js +0 -2
  425. package/dist/smoothly/p-1b714a63.js.map +0 -1
  426. package/dist/smoothly/p-1efa3261.entry.js +0 -2
  427. package/dist/smoothly/p-1efa3261.entry.js.map +0 -1
  428. package/dist/smoothly/p-4ff439dd.entry.js +0 -2
  429. package/dist/smoothly/p-74a3586c.js +0 -2
  430. package/dist/smoothly/p-74a3586c.js.map +0 -1
  431. package/dist/smoothly/p-8a45ae84.entry.js +0 -2
  432. package/dist/smoothly/p-8a45ae84.entry.js.map +0 -1
  433. package/dist/smoothly/p-90b340b4.entry.js +0 -2
  434. package/dist/smoothly/p-90b340b4.entry.js.map +0 -1
  435. package/dist/smoothly/p-d0b8061e.js.map +0 -1
  436. package/dist/types/components/filter/Clearable.d.ts +0 -6
  437. package/dist/types/components/icon/Icon.d.ts +0 -4
  438. package/dist/types/components/input/Changeable.d.ts +0 -7
  439. package/dist/types/components/radio/index.d.ts +0 -13
  440. package/dist/types/components/radio-button/Selected.d.ts +0 -5
  441. package/dist/types/components/radio-button/index.d.ts +0 -13
  442. package/dist/types/components/radio-button/item/index.d.ts +0 -12
  443. package/dist/types/components/radio-group/index.d.ts +0 -4
  444. package/dist/types/model/ClientIdentifier.d.ts +0 -5
  445. /package/dist/collection/components/{radio-button → lazy}/style.css +0 -0
  446. /package/dist/collection/components/table/{testing → demo/testing}/data.js +0 -0
  447. /package/dist/smoothly/{p-663ccbd0.entry.js.map → p-12182a73.entry.js.map} +0 -0
  448. /package/dist/smoothly/{p-9992c8c4.entry.js.map → p-47151a53.entry.js.map} +0 -0
  449. /package/dist/smoothly/{p-b82ef190.entry.js.map → p-635c813e.entry.js.map} +0 -0
  450. /package/dist/smoothly/{p-dbd1afa9.entry.js.map → p-6aebb818.entry.js.map} +0 -0
  451. /package/dist/smoothly/{p-c4ffc15d.entry.js.map → p-7a69b43f.entry.js.map} +0 -0
  452. /package/dist/smoothly/{p-4d743f07.entry.js.map → p-7bf147bf.entry.js.map} +0 -0
  453. /package/dist/smoothly/{p-f96e41aa.entry.js.map → p-cb493516.entry.js.map} +0 -0
  454. /package/dist/smoothly/{p-ce4e6f44.entry.js.map → p-eef1c80b.entry.js.map} +0 -0
  455. /package/dist/types/components/table/{testing → demo/testing}/data.d.ts +0 -0
  456. /package/dist/types/components/table/{testing → demo/testing}/index.d.ts +0 -0
@@ -1,67 +1,71 @@
1
1
  import { h } from "@stencil/core";
2
- import * as selectively from "selectively";
2
+ import { selectively } from "selectively";
3
3
  export class SmoothlyFilterInput {
4
4
  constructor() {
5
- this.name = undefined;
6
- this.value = "";
7
5
  this.type = "text";
8
- this.required = false;
9
- this.minLength = 0;
10
- this.showLabel = true;
11
- this.maxLength = Number.POSITIVE_INFINITY;
12
- this.autocomplete = true;
13
- this.pattern = undefined;
6
+ this.needle = "";
7
+ this.property = undefined;
14
8
  this.placeholder = undefined;
15
- this.disabled = false;
16
- this.readonly = false;
17
- this.currency = undefined;
18
- this.comparison = "includes";
19
- this.criteria = undefined;
20
9
  }
21
- onFilter() {
22
- this.value = this.smoothlyInput.value;
23
- let result = "";
24
- let criteria;
25
- switch (this.comparison) {
26
- case "equals":
27
- criteria = this.value;
28
- break;
29
- case "less":
30
- criteria = selectively.lesserThan(this.value);
31
- break;
32
- case "greater":
33
- criteria = selectively.greaterThan(this.value);
34
- break;
35
- case "starts":
36
- criteria = selectively.startsWith(this.value);
37
- break;
38
- case "ends":
39
- criteria = selectively.endsWith(this.value);
40
- break;
41
- default:
42
- case "includes":
43
- criteria = selectively.includes(this.value);
44
- break;
45
- }
46
- result = this.name
10
+ componentDidLoad() {
11
+ this.smoothlyFilterUpdate.emit(this.update.bind(this));
12
+ }
13
+ update(expression) {
14
+ var _a;
15
+ if (expression instanceof selectively.And && expression.rules.length > 0)
16
+ for (const rule of expression.rules) {
17
+ const criteria = this.isCriteria(rule, this.property);
18
+ if (criteria) {
19
+ this.needle = (_a = criteria.needle) !== null && _a !== void 0 ? _a : "";
20
+ break;
21
+ }
22
+ }
23
+ else
24
+ this.needle = "";
25
+ }
26
+ isCriteria(criteria, key) {
27
+ const [property, ...rest] = key.split(".");
28
+ return ((criteria instanceof selectively.Property &&
29
+ criteria.name == property &&
30
+ ((criteria.criteria instanceof selectively.Includes && criteria.criteria) ||
31
+ (criteria.criteria instanceof selectively.Property && this.isCriteria(criteria.criteria, rest.join("."))))) ||
32
+ undefined);
33
+ }
34
+ inputHandler(event) {
35
+ event.stopPropagation();
36
+ const needle = event.detail[this.property];
37
+ const manipulate = (criteria) => {
38
+ let result = criteria;
39
+ const newCriteria = needle ? this.getCriteria(needle) : undefined;
40
+ if (result instanceof selectively.And) {
41
+ const index = result.rules.findIndex(r => this.findInstanceOf(r, this.property));
42
+ !newCriteria
43
+ ? index != -1 && result.rules.splice(index, 1)
44
+ : index == -1
45
+ ? result.rules.push(newCriteria)
46
+ : (result.rules[index] = newCriteria);
47
+ result = selectively.and(...result.rules);
48
+ }
49
+ return result;
50
+ };
51
+ this.smoothlyFilterManipulate.emit(manipulate.bind(this));
52
+ }
53
+ getCriteria(needle) {
54
+ return this.property
47
55
  .split(".")
48
- .reverse()
49
- .reduce((previousValue, currentValue) => ({ [currentValue]: previousValue }), criteria);
50
- this.filter.emit(result);
56
+ .reduceRight((r, e) => selectively.property(e, r), selectively.includes(needle));
51
57
  }
52
- async clear() {
53
- this.value = "";
58
+ findInstanceOf(criteria, property) {
59
+ const [key, ...rest] = property.split(".");
60
+ return (criteria instanceof selectively.Property &&
61
+ criteria.name == key &&
62
+ (rest.length == 0 || (!!criteria.criteria && this.findInstanceOf(criteria.criteria, rest.join(".")))));
54
63
  }
55
64
  render() {
56
- return [
57
- h("smoothly-input", { name: this.name, ref: (element) => (this.smoothlyInput = element), value: this.value, onKeyDown: () => this.onFilter(), onSmoothlyInput: e => {
58
- var _a;
59
- this.value = (_a = e.detail.value) !== null && _a !== void 0 ? _a : "";
60
- }, placeholder: this.placeholder }, h("div", { slot: "start" }, h("slot", { name: "start" })), h("slot", null)),
61
- ];
65
+ return (h("smoothly-input", { name: this.property, value: this.needle, type: this.type, placeholder: this.placeholder, onSmoothlyInputLooks: e => e.stopPropagation(), onSmoothlyBlur: e => e.stopPropagation(), onSmoothlyFormDisable: e => e.stopPropagation(), onSmoothlyInputLoad: e => e.stopPropagation(), onSmoothlyChange: e => e.stopPropagation(), onSmoothlyInput: e => this.inputHandler(e) }, h("slot", null)));
62
66
  }
63
67
  static get is() { return "smoothly-filter-input"; }
64
- static get encapsulation() { return "shadow"; }
68
+ static get encapsulation() { return "scoped"; }
65
69
  static get originalStyleUrls() {
66
70
  return {
67
71
  "$": ["style.css"]
@@ -74,7 +78,7 @@ export class SmoothlyFilterInput {
74
78
  }
75
79
  static get properties() {
76
80
  return {
77
- "name": {
81
+ "property": {
78
82
  "type": "string",
79
83
  "mutable": false,
80
84
  "complexType": {
@@ -88,28 +92,10 @@ export class SmoothlyFilterInput {
88
92
  "tags": [],
89
93
  "text": ""
90
94
  },
91
- "attribute": "name",
92
- "reflect": true
93
- },
94
- "value": {
95
- "type": "string",
96
- "mutable": true,
97
- "complexType": {
98
- "original": "string",
99
- "resolved": "string",
100
- "references": {}
101
- },
102
- "required": false,
103
- "optional": false,
104
- "docs": {
105
- "tags": [],
106
- "text": ""
107
- },
108
- "attribute": "value",
109
- "reflect": false,
110
- "defaultValue": "\"\""
95
+ "attribute": "property",
96
+ "reflect": false
111
97
  },
112
- "type": {
98
+ "placeholder": {
113
99
  "type": "string",
114
100
  "mutable": false,
115
101
  "complexType": {
@@ -123,223 +109,20 @@ export class SmoothlyFilterInput {
123
109
  "tags": [],
124
110
  "text": ""
125
111
  },
126
- "attribute": "type",
127
- "reflect": true,
128
- "defaultValue": "\"text\""
129
- },
130
- "required": {
131
- "type": "boolean",
132
- "mutable": true,
133
- "complexType": {
134
- "original": "boolean",
135
- "resolved": "boolean",
136
- "references": {}
137
- },
138
- "required": false,
139
- "optional": false,
140
- "docs": {
141
- "tags": [],
142
- "text": ""
143
- },
144
- "attribute": "required",
145
- "reflect": true,
146
- "defaultValue": "false"
147
- },
148
- "minLength": {
149
- "type": "number",
150
- "mutable": false,
151
- "complexType": {
152
- "original": "number",
153
- "resolved": "number",
154
- "references": {}
155
- },
156
- "required": false,
157
- "optional": false,
158
- "docs": {
159
- "tags": [],
160
- "text": ""
161
- },
162
- "attribute": "min-length",
163
- "reflect": false,
164
- "defaultValue": "0"
165
- },
166
- "showLabel": {
167
- "type": "boolean",
168
- "mutable": false,
169
- "complexType": {
170
- "original": "boolean",
171
- "resolved": "boolean",
172
- "references": {}
173
- },
174
- "required": false,
175
- "optional": false,
176
- "docs": {
177
- "tags": [],
178
- "text": ""
179
- },
180
- "attribute": "show-label",
181
- "reflect": true,
182
- "defaultValue": "true"
183
- },
184
- "maxLength": {
185
- "type": "number",
186
- "mutable": false,
187
- "complexType": {
188
- "original": "number",
189
- "resolved": "number",
190
- "references": {}
191
- },
192
- "required": false,
193
- "optional": false,
194
- "docs": {
195
- "tags": [],
196
- "text": ""
197
- },
198
- "attribute": "max-length",
199
- "reflect": false,
200
- "defaultValue": "Number.POSITIVE_INFINITY"
201
- },
202
- "autocomplete": {
203
- "type": "boolean",
204
- "mutable": false,
205
- "complexType": {
206
- "original": "boolean",
207
- "resolved": "boolean",
208
- "references": {}
209
- },
210
- "required": false,
211
- "optional": false,
212
- "docs": {
213
- "tags": [],
214
- "text": ""
215
- },
216
- "attribute": "autocomplete",
217
- "reflect": false,
218
- "defaultValue": "true"
219
- },
220
- "pattern": {
221
- "type": "unknown",
222
- "mutable": false,
223
- "complexType": {
224
- "original": "RegExp",
225
- "resolved": "RegExp | undefined",
226
- "references": {
227
- "RegExp": {
228
- "location": "global"
229
- }
230
- }
231
- },
232
- "required": false,
233
- "optional": true,
234
- "docs": {
235
- "tags": [],
236
- "text": ""
237
- }
238
- },
239
- "placeholder": {
240
- "type": "string",
241
- "mutable": false,
242
- "complexType": {
243
- "original": "string",
244
- "resolved": "string | undefined",
245
- "references": {}
246
- },
247
- "required": false,
248
- "optional": true,
249
- "docs": {
250
- "tags": [],
251
- "text": ""
252
- },
253
112
  "attribute": "placeholder",
254
113
  "reflect": false
255
- },
256
- "disabled": {
257
- "type": "boolean",
258
- "mutable": false,
259
- "complexType": {
260
- "original": "boolean",
261
- "resolved": "boolean",
262
- "references": {}
263
- },
264
- "required": false,
265
- "optional": false,
266
- "docs": {
267
- "tags": [],
268
- "text": ""
269
- },
270
- "attribute": "disabled",
271
- "reflect": false,
272
- "defaultValue": "false"
273
- },
274
- "readonly": {
275
- "type": "boolean",
276
- "mutable": false,
277
- "complexType": {
278
- "original": "boolean",
279
- "resolved": "boolean",
280
- "references": {}
281
- },
282
- "required": false,
283
- "optional": false,
284
- "docs": {
285
- "tags": [],
286
- "text": ""
287
- },
288
- "attribute": "readonly",
289
- "reflect": true,
290
- "defaultValue": "false"
291
- },
292
- "currency": {
293
- "type": "string",
294
- "mutable": false,
295
- "complexType": {
296
- "original": "Currency",
297
- "resolved": "\"BTN\" | \"CHE\" | \"MKD\" | \"AED\" | \"AFN\" | \"ALL\" | \"AMD\" | \"ANG\" | \"AOA\" | \"ARS\" | \"AUD\" | \"AWG\" | \"AZN\" | \"BAM\" | \"BBD\" | \"BDT\" | \"BGN\" | \"BHD\" | \"BIF\" | \"BMD\" | \"BND\" | \"BOB\" | \"BOV\" | \"BRL\" | \"BSD\" | \"BWP\" | \"BYN\" | \"BZD\" | \"CAD\" | \"CDF\" | \"CHF\" | \"CHW\" | \"CLF\" | \"CLP\" | \"CNY\" | \"COP\" | \"COU\" | \"CRC\" | \"CUC\" | \"CUP\" | \"CVE\" | \"CZK\" | \"DJF\" | \"DKK\" | \"DOP\" | \"DZD\" | \"EGP\" | \"ERN\" | \"ETB\" | \"EUR\" | \"FJD\" | \"FKP\" | \"GBP\" | \"GEL\" | \"GHS\" | \"GIP\" | \"GMD\" | \"GNF\" | \"GTQ\" | \"GYD\" | \"HKD\" | \"HNL\" | \"HRK\" | \"HTG\" | \"HUF\" | \"IDR\" | \"ILS\" | \"INR\" | \"IQD\" | \"IRR\" | \"ISK\" | \"JMD\" | \"JOD\" | \"JPY\" | \"KES\" | \"KGS\" | \"KHR\" | \"KMF\" | \"KPW\" | \"KRW\" | \"KWD\" | \"KYD\" | \"KZT\" | \"LAK\" | \"LBP\" | \"LKR\" | \"LRD\" | \"LSL\" | \"LYD\" | \"MAD\" | \"MDL\" | \"MGA\" | \"MMK\" | \"MNT\" | \"MOP\" | \"MRU\" | \"MUR\" | \"MVR\" | \"MWK\" | \"MXN\" | \"MXV\" | \"MYR\" | \"MZN\" | \"NAD\" | \"NGN\" | \"NIO\" | \"NOK\" | \"NPR\" | \"NZD\" | \"OMR\" | \"PAB\" | \"PEN\" | \"PGK\" | \"PHP\" | \"PKR\" | \"PLN\" | \"PYG\" | \"QAR\" | \"RON\" | \"RSD\" | \"RUB\" | \"RWF\" | \"SAR\" | \"SBD\" | \"SCR\" | \"SDG\" | \"SEK\" | \"SGD\" | \"SHP\" | \"SLL\" | \"SOS\" | \"SRD\" | \"SSP\" | \"STN\" | \"SVC\" | \"SYP\" | \"SZL\" | \"THB\" | \"TJS\" | \"TMT\" | \"TND\" | \"TOP\" | \"TRY\" | \"TTD\" | \"TWD\" | \"TZS\" | \"UAH\" | \"UGX\" | \"USD\" | \"USN\" | \"UYI\" | \"UYU\" | \"UYW\" | \"UZS\" | \"VES\" | \"VND\" | \"VUV\" | \"WST\" | \"XAF\" | \"XAG\" | \"XAU\" | \"XBA\" | \"XBB\" | \"XBC\" | \"XBD\" | \"XCD\" | \"XDR\" | \"XOF\" | \"XPD\" | \"XPF\" | \"XPT\" | \"XSU\" | \"XTS\" | \"XUA\" | \"XXX\" | \"YER\" | \"ZAR\" | \"ZMW\" | \"ZWL\" | undefined",
298
- "references": {
299
- "Currency": {
300
- "location": "import",
301
- "path": "isoly"
302
- }
303
- }
304
- },
305
- "required": false,
306
- "optional": true,
307
- "docs": {
308
- "tags": [],
309
- "text": ""
310
- },
311
- "attribute": "currency",
312
- "reflect": true
313
- },
314
- "comparison": {
315
- "type": "string",
316
- "mutable": false,
317
- "complexType": {
318
- "original": "\"equals\" | \"less\" | \"greater\" | \"starts\" | \"ends\" | \"includes\"",
319
- "resolved": "\"ends\" | \"equals\" | \"greater\" | \"includes\" | \"less\" | \"starts\"",
320
- "references": {}
321
- },
322
- "required": false,
323
- "optional": false,
324
- "docs": {
325
- "tags": [],
326
- "text": ""
327
- },
328
- "attribute": "comparison",
329
- "reflect": false,
330
- "defaultValue": "\"includes\""
331
114
  }
332
115
  };
333
116
  }
334
117
  static get states() {
335
118
  return {
336
- "criteria": {}
119
+ "needle": {}
337
120
  };
338
121
  }
339
122
  static get events() {
340
123
  return [{
341
- "method": "filter",
342
- "name": "filter",
124
+ "method": "smoothlyFilterUpdate",
125
+ "name": "smoothlyFilterUpdate",
343
126
  "bubbles": true,
344
127
  "cancelable": true,
345
128
  "composed": true,
@@ -348,36 +131,36 @@ export class SmoothlyFilterInput {
348
131
  "text": ""
349
132
  },
350
133
  "complexType": {
351
- "original": "Criteria",
352
- "resolved": "Helper[] | Rule | number | string | { [property: string]: Helper | Helper[]; }",
134
+ "original": "Filter.Update",
135
+ "resolved": "(expression: Criteria) => void",
353
136
  "references": {
354
- "Criteria": {
137
+ "Filter": {
355
138
  "location": "import",
356
- "path": "selectively"
139
+ "path": "../Filter"
357
140
  }
358
141
  }
359
142
  }
360
- }];
361
- }
362
- static get methods() {
363
- return {
364
- "clear": {
143
+ }, {
144
+ "method": "smoothlyFilterManipulate",
145
+ "name": "smoothlyFilterManipulate",
146
+ "bubbles": true,
147
+ "cancelable": true,
148
+ "composed": true,
149
+ "docs": {
150
+ "tags": [],
151
+ "text": ""
152
+ },
365
153
  "complexType": {
366
- "signature": "() => Promise<void>",
367
- "parameters": [],
154
+ "original": "Filter.Manipulate",
155
+ "resolved": "(criteria: Criteria) => Criteria",
368
156
  "references": {
369
- "Promise": {
370
- "location": "global"
157
+ "Filter": {
158
+ "location": "import",
159
+ "path": "../Filter"
371
160
  }
372
- },
373
- "return": "Promise<void>"
374
- },
375
- "docs": {
376
- "text": "",
377
- "tags": []
161
+ }
378
162
  }
379
- }
380
- };
163
+ }];
381
164
  }
382
165
  }
383
166
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/filter/input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAEtF,OAAO,KAAK,WAAW,MAAM,aAAa,CAAA;AAQ1C,MAAM,OAAO,mBAAmB;;;iBAIE,EAAE;gBACH,MAAM;oBACa,KAAK;qBACpC,CAAC;qBACgB,IAAI;qBACb,MAAM,CAAC,iBAAiB;wBAC7B,IAAI;;;oBAGR,KAAK;oBACY,KAAK;;sBAE4C,UAAU;;;EAIvF,QAAQ;IACf,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAA;IACrC,IAAI,MAAM,GAAa,EAAE,CAAA;IACzB,IAAI,QAAkB,CAAA;IAEtB,QAAQ,IAAI,CAAC,UAAU,EAAE;MACxB,KAAK,QAAQ;QACZ,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAA;QACrB,MAAK;MACN,KAAK,MAAM;QACV,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC7C,MAAK;MACN,KAAK,SAAS;QACb,QAAQ,GAAG,WAAW,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC9C,MAAK;MACN,KAAK,QAAQ;QACZ,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QAC7C,MAAK;MACN,KAAK,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Method, Prop, State } from \"@stencil/core\"\nimport { Currency } from \"isoly\"\nimport * as selectively from \"selectively\"\nimport { Criteria } from \"selectively\"\n\n@Component({\n\ttag: \"smoothly-filter-input\",\n\tstyleUrl: \"style.css\",\n\tshadow: true,\n})\nexport class SmoothlyFilterInput {\n\tsmoothlyInput: HTMLSmoothlyInputElement\n\n\t@Prop({ reflect: true }) name: string\n\t@Prop({ mutable: true }) value = \"\"\n\t@Prop({ reflect: true }) type = \"text\"\n\t@Prop({ mutable: true, reflect: true }) required = false\n\t@Prop() minLength = 0\n\t@Prop({ reflect: true }) showLabel = true\n\t@Prop() maxLength: number = Number.POSITIVE_INFINITY\n\t@Prop() autocomplete = true\n\t@Prop() pattern?: RegExp\n\t@Prop() placeholder?: string\n\t@Prop() disabled = false\n\t@Prop({ reflect: true }) readonly = false\n\t@Prop({ reflect: true }) currency?: Currency\n\t@Prop() comparison: \"equals\" | \"less\" | \"greater\" | \"starts\" | \"ends\" | \"includes\" = \"includes\"\n\t@State() criteria: Criteria\n\n\t@Event() filter: EventEmitter<Criteria>\n\tprivate onFilter() {\n\t\tthis.value = this.smoothlyInput.value\n\t\tlet result: Criteria = \"\"\n\t\tlet criteria: Criteria\n\n\t\tswitch (this.comparison) {\n\t\t\tcase \"equals\":\n\t\t\t\tcriteria = this.value\n\t\t\t\tbreak\n\t\t\tcase \"less\":\n\t\t\t\tcriteria = selectively.lesserThan(this.value)\n\t\t\t\tbreak\n\t\t\tcase \"greater\":\n\t\t\t\tcriteria = selectively.greaterThan(this.value)\n\t\t\t\tbreak\n\t\t\tcase \"starts\":\n\t\t\t\tcriteria = selectively.startsWith(this.value)\n\t\t\t\tbreak\n\t\t\tcase \"ends\":\n\t\t\t\tcriteria = selectively.endsWith(this.value)\n\t\t\t\tbreak\n\t\t\tdefault:\n\t\t\tcase \"includes\":\n\t\t\t\tcriteria = selectively.includes(this.value)\n\t\t\t\tbreak\n\t\t}\n\n\t\tresult = this.name\n\t\t\t.split(\".\")\n\t\t\t.reverse()\n\t\t\t.reduce<Criteria>((previousValue, currentValue) => ({ [currentValue]: previousValue }), criteria)\n\t\tthis.filter.emit(result)\n\t}\n\n\t@Method()\n\tasync clear() {\n\t\tthis.value = \"\"\n\t}\n\n\trender() {\n\t\treturn [\n\t\t\t<smoothly-input\n\t\t\t\tname={this.name}\n\t\t\t\tref={(element: HTMLSmoothlyInputElement) => (this.smoothlyInput = element)}\n\t\t\t\tvalue={this.value}\n\t\t\t\tonKeyDown={() => this.onFilter()}\n\t\t\t\tonSmoothlyInput={e => {\n\t\t\t\t\tthis.value = e.detail.value ?? \"\"\n\t\t\t\t}}\n\t\t\t\tplaceholder={this.placeholder}>\n\t\t\t\t<div slot=\"start\">\n\t\t\t\t\t<slot name=\"start\" />\n\t\t\t\t</div>\n\t\t\t\t<slot />\n\t\t\t</smoothly-input>,\n\t\t]\n\t}\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/filter/input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AASzC,MAAM,OAAO,mBAAmB;;IAC/B,SAAI,GAAgB,MAAM,CAAA;kBACc,EAAE;;;;EAK1C,gBAAgB;IACf,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAA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CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAC1C,OAAO,CACN,QAAQ,YAAY,WAAW,CAAC,QAAQ;MACxC,QAAQ,CAAC,IAAI,IAAI,GAAG;MACpB,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACrG,CAAA;EACF,CAAC;EAED,MAAM;IACL,OAAO,CACN,sBACC,IAAI,EAAE,IAAI,CAAC,QAAQ,EACnB,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,oBAAoB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EAC9C,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EACxC,qBAAqB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EAC/C,mBAAmB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EAC7C,gBAAgB,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,EAC1C,eAAe,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;MAC1C,eAAQ,CACQ,CACjB,CAAA;EACF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACD","sourcesContent":["import { Component, Event, EventEmitter, h, Prop, State } from \"@stencil/core\"\nimport { selectively } from \"selectively\"\nimport { tidily } from \"tidily\"\nimport { Filter } from \"../Filter\"\n\n@Component({\n\ttag: \"smoothly-filter-input\",\n\tstyleUrl: \"style.css\",\n\tscoped: true,\n})\nexport class SmoothlyFilterInput implements Filter {\n\ttype: tidily.Type = \"text\"\n\t@State() needle: selectively.Criteria = \"\"\n\t@Prop() property: string\n\t@Prop() placeholder: string\n\t@Event() smoothlyFilterUpdate: EventEmitter<Filter.Update>\n\t@Event() smoothlyFilterManipulate: EventEmitter<Filter.Manipulate>\n\tcomponentDidLoad() {\n\t\tthis.smoothlyFilterUpdate.emit(this.update.bind(this))\n\t}\n\tupdate(expression: selectively.Criteria): void {\n\t\tif (expression instanceof selectively.And && expression.rules.length > 0)\n\t\t\tfor (const rule of expression.rules) {\n\t\t\t\tconst criteria = this.isCriteria(rule, this.property)\n\t\t\t\tif (criteria) {\n\t\t\t\t\tthis.needle = criteria.needle ?? \"\"\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\tthis.needle = \"\"\n\t}\n\tprivate isCriteria(criteria: selectively.Rule | undefined, key: string): selectively.Includes | undefined {\n\t\tconst [property, ...rest] = key.split(\".\")\n\t\treturn (\n\t\t\t(criteria instanceof selectively.Property &&\n\t\t\t\tcriteria.name == property &&\n\t\t\t\t((criteria.criteria instanceof selectively.Includes && criteria.criteria) ||\n\t\t\t\t\t(criteria.criteria instanceof selectively.Property && this.isCriteria(criteria.criteria, rest.join(\".\"))))) ||\n\t\t\tundefined\n\t\t)\n\t}\n\tinputHandler(event: CustomEvent<Record<string, string>>) {\n\t\tevent.stopPropagation()\n\t\tconst needle = event.detail[this.property]\n\t\tconst manipulate: Filter.Manipulate = (criteria: selectively.Criteria): selectively.Criteria => {\n\t\t\tlet result: selectively.Criteria = criteria\n\t\t\tconst newCriteria = needle ? this.getCriteria(needle) : undefined\n\t\t\tif (result instanceof selectively.And) {\n\t\t\t\tconst index = result.rules.findIndex(r => this.findInstanceOf(r, this.property))\n\t\t\t\t!newCriteria\n\t\t\t\t\t? index != -1 && result.rules.splice(index, 1)\n\t\t\t\t\t: index == -1\n\t\t\t\t\t? result.rules.push(newCriteria)\n\t\t\t\t\t: (result.rules[index] = newCriteria)\n\t\t\t\tresult = selectively.and(...result.rules)\n\t\t\t}\n\t\t\treturn result\n\t\t}\n\t\tthis.smoothlyFilterManipulate.emit(manipulate.bind(this))\n\t}\n\tprivate getCriteria(needle: string): selectively.Rule | undefined {\n\t\treturn this.property\n\t\t\t.split(\".\")\n\t\t\t.reduceRight((r: selectively.Rule, e) => selectively.property(e, r), selectively.includes(needle))\n\t}\n\tfindInstanceOf(criteria: selectively.Criteria, property: string): boolean {\n\t\tconst [key, ...rest] = property.split(\".\")\n\t\treturn (\n\t\t\tcriteria instanceof selectively.Property &&\n\t\t\tcriteria.name == key &&\n\t\t\t(rest.length == 0 || (!!criteria.criteria && this.findInstanceOf(criteria.criteria, rest.join(\".\"))))\n\t\t)\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<smoothly-input\n\t\t\t\tname={this.property}\n\t\t\t\tvalue={this.needle}\n\t\t\t\ttype={this.type}\n\t\t\t\tplaceholder={this.placeholder}\n\t\t\t\tonSmoothlyInputLooks={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyBlur={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyFormDisable={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInputLoad={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyChange={e => e.stopPropagation()}\n\t\t\t\tonSmoothlyInput={e => this.inputHandler(e)}>\n\t\t\t\t<slot />\n\t\t\t</smoothly-input>\n\t\t)\n\t}\n}\n"]}