apex-grid 1.0.1 → 1.1.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 (337) hide show
  1. package/{dist/src/components → components}/cell.d.ts +2 -3
  2. package/{dist/src/components → components}/cell.js +5 -13
  3. package/components/cell.js.map +1 -0
  4. package/{dist/src/components → components}/filter-row.d.ts +7 -8
  5. package/{dist/src/components → components}/filter-row.js +113 -116
  6. package/components/filter-row.js.map +1 -0
  7. package/{dist/src/components → components}/grid.d.ts +8 -8
  8. package/{dist/src/components → components}/grid.js +72 -151
  9. package/components/grid.js.map +1 -0
  10. package/{dist/src/components → components}/header-row.d.ts +5 -6
  11. package/{dist/src/components → components}/header-row.js +21 -27
  12. package/components/header-row.js.map +1 -0
  13. package/{dist/src/components → components}/header.d.ts +4 -5
  14. package/components/header.js +137 -0
  15. package/components/header.js.map +1 -0
  16. package/{dist/src/components → components}/row.d.ts +2 -3
  17. package/{dist/src/components → components}/row.js +8 -12
  18. package/components/row.js.map +1 -0
  19. package/{dist/src/components → components}/virtualizer.d.ts +2 -3
  20. package/{dist/src/components → components}/virtualizer.js +2 -2
  21. package/components/virtualizer.js.map +1 -0
  22. package/{dist/src/controllers → controllers}/data-operation.d.ts +5 -6
  23. package/{dist/src/controllers → controllers}/data-operation.js +10 -11
  24. package/controllers/data-operation.js.map +1 -0
  25. package/{dist/src/controllers → controllers}/dom.d.ts +4 -5
  26. package/controllers/dom.js +54 -0
  27. package/controllers/dom.js.map +1 -0
  28. package/{dist/src/controllers → controllers}/filter.d.ts +2 -3
  29. package/controllers/filter.js +105 -0
  30. package/controllers/filter.js.map +1 -0
  31. package/{dist/src/controllers → controllers}/navigation.d.ts +2 -3
  32. package/{dist/src/controllers → controllers}/navigation.js +9 -14
  33. package/controllers/navigation.js.map +1 -0
  34. package/{dist/src/controllers → controllers}/resize.d.ts +2 -3
  35. package/controllers/resize.js +52 -0
  36. package/controllers/resize.js.map +1 -0
  37. package/{dist/src/controllers → controllers}/sort.d.ts +1 -2
  38. package/controllers/sort.js +94 -0
  39. package/controllers/sort.js.map +1 -0
  40. package/{dist/src/controllers → controllers}/state.d.ts +3 -4
  41. package/{dist/src/controllers → controllers}/state.js +4 -7
  42. package/controllers/state.js.map +1 -0
  43. package/custom-elements.json +320 -123
  44. package/{dist/src/define.d.ts → define.d.ts} +0 -1
  45. package/define.js.map +1 -0
  46. package/docs/assets/hierarchy.js +1 -0
  47. package/{dist/docs → docs}/assets/highlight.css +28 -0
  48. package/docs/assets/icons.js +18 -0
  49. package/docs/assets/icons.svg +1 -0
  50. package/docs/assets/main.js +60 -0
  51. package/docs/assets/navigation.js +1 -0
  52. package/docs/assets/search.js +1 -0
  53. package/docs/assets/style.css +1633 -0
  54. package/docs/classes/ApexGrid.html +74 -0
  55. package/docs/hierarchy.html +1 -0
  56. package/docs/index.html +10 -0
  57. package/docs/interfaces/ApexFilteredEvent.html +6 -0
  58. package/docs/interfaces/ApexFilteringEvent.html +12 -0
  59. package/docs/interfaces/ApexGridEventMap.html +17 -0
  60. package/docs/interfaces/ApexHeaderContext.html +6 -0
  61. package/docs/interfaces/BaseApexCellContext.html +10 -0
  62. package/docs/interfaces/BaseColumnConfiguration.html +28 -0
  63. package/docs/interfaces/BaseColumnSortConfiguration.html +6 -0
  64. package/docs/interfaces/BaseFilterExpression.html +15 -0
  65. package/docs/interfaces/BaseSortExpression.html +12 -0
  66. package/docs/interfaces/ColumnFilterConfiguration.html +4 -0
  67. package/docs/interfaces/DataPipelineConfiguration.html +6 -0
  68. package/docs/interfaces/GridSortConfiguration.html +6 -0
  69. package/docs/modules.html +1 -0
  70. package/docs/types/ApexCellContext.html +2 -0
  71. package/docs/types/BasePropertyType.html +2 -0
  72. package/docs/types/BaseSortComparer.html +2 -0
  73. package/docs/types/ColumnConfiguration.html +2 -0
  74. package/docs/types/ColumnSortConfiguration.html +2 -0
  75. package/docs/types/DataPipelineHook.html +2 -0
  76. package/docs/types/DataPipelineParams.html +8 -0
  77. package/docs/types/DataType.html +2 -0
  78. package/docs/types/FilterCriteria.html +6 -0
  79. package/docs/types/FilterExpression.html +2 -0
  80. package/docs/types/Keys.html +2 -0
  81. package/docs/types/PropertyType.html +2 -0
  82. package/docs/types/SortComparer.html +2 -0
  83. package/docs/types/SortExpression.html +2 -0
  84. package/docs/types/SortState.html +2 -0
  85. package/docs/types/SortingDirection.html +3 -0
  86. package/{dist/src/index.d.ts → index.d.ts} +4 -5
  87. package/index.js.map +1 -0
  88. package/{dist/src/internal → internal}/constants.d.ts +0 -1
  89. package/internal/constants.js.map +1 -0
  90. package/{dist/src/internal → internal}/icon-registry.d.ts +0 -1
  91. package/internal/icon-registry.js.map +1 -0
  92. package/{dist/src/internal → internal}/is-defined.d.ts +0 -1
  93. package/internal/is-defined.js.map +1 -0
  94. package/{dist/src/internal → internal}/mixins/event-emitter.d.ts +0 -1
  95. package/internal/mixins/event-emitter.js.map +1 -0
  96. package/{dist/src/internal → internal}/normalize-case.d.ts +0 -1
  97. package/internal/normalize-case.js.map +1 -0
  98. package/{dist/src/internal → internal}/part-map.d.ts +0 -1
  99. package/{dist/src/internal → internal}/part-map.js +1 -1
  100. package/internal/part-map.js.map +1 -0
  101. package/{dist/src/internal → internal}/register.d.ts +3 -4
  102. package/internal/register.js +9 -0
  103. package/internal/register.js.map +1 -0
  104. package/{dist/src/internal → internal}/tags.d.ts +0 -1
  105. package/internal/tags.js.map +1 -0
  106. package/internal/theming.d.ts +34 -0
  107. package/internal/theming.js +123 -0
  108. package/internal/theming.js.map +1 -0
  109. package/{dist/src/internal → internal}/types.d.ts +3 -4
  110. package/internal/types.js.map +1 -0
  111. package/{dist/src/internal → internal}/utils.d.ts +0 -1
  112. package/{dist/src/internal → internal}/utils.js +3 -6
  113. package/internal/utils.js.map +1 -0
  114. package/{dist/src/internal → internal}/watch.d.ts +0 -1
  115. package/{dist/src/internal → internal}/watch.js +2 -2
  116. package/internal/watch.js.map +1 -0
  117. package/{dist/src/operations → operations}/base.d.ts +0 -1
  118. package/operations/base.js.map +1 -0
  119. package/{dist/src/operations → operations}/filter/operands/boolean.d.ts +0 -1
  120. package/{dist/src/operations → operations}/filter/operands/boolean.js +5 -5
  121. package/operations/filter/operands/boolean.js.map +1 -0
  122. package/{dist/src/operations → operations}/filter/operands/number.d.ts +0 -1
  123. package/{dist/src/operations → operations}/filter/operands/number.js +2 -2
  124. package/operations/filter/operands/number.js.map +1 -0
  125. package/{dist/src/operations → operations}/filter/operands/string.d.ts +0 -1
  126. package/{dist/src/operations → operations}/filter/operands/string.js +2 -2
  127. package/operations/filter/operands/string.js.map +1 -0
  128. package/{dist/src/operations → operations}/filter/state.d.ts +1 -2
  129. package/{dist/src/operations → operations}/filter/state.js +3 -4
  130. package/operations/filter/state.js.map +1 -0
  131. package/{dist/src/operations → operations}/filter/tree.d.ts +1 -2
  132. package/{dist/src/operations → operations}/filter/tree.js +5 -6
  133. package/operations/filter/tree.js.map +1 -0
  134. package/{dist/src/operations → operations}/filter/types.d.ts +0 -1
  135. package/operations/filter/types.js.map +1 -0
  136. package/{dist/src/operations → operations}/filter.d.ts +0 -1
  137. package/{dist/src/operations → operations}/filter.js +4 -7
  138. package/operations/filter.js.map +1 -0
  139. package/{dist/src/operations → operations}/sort/types.d.ts +0 -1
  140. package/operations/sort/types.js.map +1 -0
  141. package/{dist/src/operations → operations}/sort.d.ts +0 -1
  142. package/{dist/src/operations → operations}/sort.js +5 -5
  143. package/operations/sort.js.map +1 -0
  144. package/package.json +23 -82
  145. package/{dist/src/styles/body-row/body-row-styles.css.d.ts → styles/_common.css.d.ts} +0 -1
  146. package/styles/_common.css.js +3 -0
  147. package/styles/_common.css.js.map +1 -0
  148. package/{dist/src/styles/body-cell/body-cell-styles.css.d.ts → styles/body-cell/body-cell.css.d.ts} +0 -1
  149. package/styles/body-cell/body-cell.css.js +3 -0
  150. package/styles/body-cell/body-cell.css.js.map +1 -0
  151. package/{dist/src/styles/filter-row/filter-row-styles.css.d.ts → styles/body-row/body-row.css.d.ts} +0 -1
  152. package/styles/body-row/body-row.css.js +3 -0
  153. package/styles/body-row/body-row.css.js.map +1 -0
  154. package/{dist/src/styles/grid/themes/light/grid.fluent-styles.css.d.ts → styles/filter-row/filter-row.css.d.ts} +0 -1
  155. package/styles/filter-row/filter-row.css.js +3 -0
  156. package/styles/filter-row/filter-row.css.js.map +1 -0
  157. package/styles/grid/_grid.base.css.d.ts +1 -0
  158. package/styles/grid/_grid.base.css.js +3 -0
  159. package/styles/grid/_grid.base.css.js.map +1 -0
  160. package/styles/grid/themes/light/grid.bootstrap.css.d.ts +1 -0
  161. package/styles/grid/themes/light/grid.bootstrap.css.js +3 -0
  162. package/styles/grid/themes/light/grid.bootstrap.css.js.map +1 -0
  163. package/styles/grid/themes/light/grid.fluent.css.d.ts +1 -0
  164. package/styles/grid/themes/light/grid.fluent.css.js +3 -0
  165. package/styles/grid/themes/light/grid.fluent.css.js.map +1 -0
  166. package/styles/grid/themes/light/grid.indigo.css.d.ts +1 -0
  167. package/styles/grid/themes/light/grid.indigo.css.js +3 -0
  168. package/styles/grid/themes/light/grid.indigo.css.js.map +1 -0
  169. package/styles/grid/themes/light/grid.material.css.d.ts +1 -0
  170. package/styles/grid/themes/light/grid.material.css.js +3 -0
  171. package/styles/grid/themes/light/grid.material.css.js.map +1 -0
  172. package/styles/header-cell/header-cell.css.d.ts +1 -0
  173. package/styles/header-cell/header-cell.css.js +3 -0
  174. package/styles/header-cell/header-cell.css.js.map +1 -0
  175. package/styles/header-row/header-row.base.css.d.ts +1 -0
  176. package/styles/header-row/header-row.base.css.js +3 -0
  177. package/styles/header-row/header-row.base.css.js.map +1 -0
  178. package/dist/bundle.js +0 -2194
  179. package/dist/docs/assets/main.js +0 -58
  180. package/dist/docs/assets/search.js +0 -1
  181. package/dist/docs/assets/style.css +0 -1365
  182. package/dist/docs/classes/ApexGrid.html +0 -327
  183. package/dist/docs/index.html +0 -82
  184. package/dist/docs/interfaces/ApexFilteredEvent.html +0 -104
  185. package/dist/docs/interfaces/ApexFilteringEvent.html +0 -116
  186. package/dist/docs/interfaces/ApexGridEventMap.html +0 -127
  187. package/dist/docs/interfaces/ApexHeaderContext.html +0 -104
  188. package/dist/docs/interfaces/BaseApexCellContext.html +0 -120
  189. package/dist/docs/interfaces/BaseColumnConfiguration.html +0 -196
  190. package/dist/docs/interfaces/BaseColumnSortConfiguration.html +0 -106
  191. package/dist/docs/interfaces/BaseFilterExpression.html +0 -132
  192. package/dist/docs/interfaces/BaseSortExpression.html +0 -124
  193. package/dist/docs/interfaces/ColumnFilterConfiguration.html +0 -92
  194. package/dist/docs/interfaces/DataPipelineConfiguration.html +0 -104
  195. package/dist/docs/interfaces/GridSortConfiguration.html +0 -99
  196. package/dist/docs/modules.html +0 -102
  197. package/dist/docs/types/ApexCellContext.html +0 -74
  198. package/dist/docs/types/BasePropertyType.html +0 -74
  199. package/dist/docs/types/BaseSortComparer.html +0 -89
  200. package/dist/docs/types/ColumnConfiguration.html +0 -74
  201. package/dist/docs/types/ColumnSortConfiguration.html +0 -74
  202. package/dist/docs/types/DataPipelineHook.html +0 -85
  203. package/dist/docs/types/DataPipelineParams.html +0 -87
  204. package/dist/docs/types/DataType.html +0 -67
  205. package/dist/docs/types/FilterCriteria.html +0 -71
  206. package/dist/docs/types/FilterExpression.html +0 -74
  207. package/dist/docs/types/Keys.html +0 -72
  208. package/dist/docs/types/PropertyType.html +0 -74
  209. package/dist/docs/types/SortComparer.html +0 -74
  210. package/dist/docs/types/SortExpression.html +0 -74
  211. package/dist/docs/types/SortState.html +0 -72
  212. package/dist/docs/types/SortingDirection.html +0 -69
  213. package/dist/src/components/cell.d.ts.map +0 -1
  214. package/dist/src/components/cell.js.map +0 -1
  215. package/dist/src/components/filter-row.d.ts.map +0 -1
  216. package/dist/src/components/filter-row.js.map +0 -1
  217. package/dist/src/components/grid.d.ts.map +0 -1
  218. package/dist/src/components/grid.js.map +0 -1
  219. package/dist/src/components/header-row.d.ts.map +0 -1
  220. package/dist/src/components/header-row.js.map +0 -1
  221. package/dist/src/components/header.d.ts.map +0 -1
  222. package/dist/src/components/header.js +0 -144
  223. package/dist/src/components/header.js.map +0 -1
  224. package/dist/src/components/row.d.ts.map +0 -1
  225. package/dist/src/components/row.js.map +0 -1
  226. package/dist/src/components/virtualizer.d.ts.map +0 -1
  227. package/dist/src/components/virtualizer.js.map +0 -1
  228. package/dist/src/controllers/data-operation.d.ts.map +0 -1
  229. package/dist/src/controllers/data-operation.js.map +0 -1
  230. package/dist/src/controllers/dom.d.ts.map +0 -1
  231. package/dist/src/controllers/dom.js +0 -60
  232. package/dist/src/controllers/dom.js.map +0 -1
  233. package/dist/src/controllers/filter.d.ts.map +0 -1
  234. package/dist/src/controllers/filter.js +0 -119
  235. package/dist/src/controllers/filter.js.map +0 -1
  236. package/dist/src/controllers/navigation.d.ts.map +0 -1
  237. package/dist/src/controllers/navigation.js.map +0 -1
  238. package/dist/src/controllers/resize.d.ts.map +0 -1
  239. package/dist/src/controllers/resize.js +0 -70
  240. package/dist/src/controllers/resize.js.map +0 -1
  241. package/dist/src/controllers/sort.d.ts.map +0 -1
  242. package/dist/src/controllers/sort.js +0 -94
  243. package/dist/src/controllers/sort.js.map +0 -1
  244. package/dist/src/controllers/state.d.ts.map +0 -1
  245. package/dist/src/controllers/state.js.map +0 -1
  246. package/dist/src/define.d.ts.map +0 -1
  247. package/dist/src/define.js.map +0 -1
  248. package/dist/src/index.d.ts.map +0 -1
  249. package/dist/src/index.js.map +0 -1
  250. package/dist/src/internal/constants.d.ts.map +0 -1
  251. package/dist/src/internal/constants.js.map +0 -1
  252. package/dist/src/internal/icon-registry.d.ts.map +0 -1
  253. package/dist/src/internal/icon-registry.js.map +0 -1
  254. package/dist/src/internal/is-defined.d.ts.map +0 -1
  255. package/dist/src/internal/is-defined.js.map +0 -1
  256. package/dist/src/internal/mixins/event-emitter.d.ts.map +0 -1
  257. package/dist/src/internal/mixins/event-emitter.js.map +0 -1
  258. package/dist/src/internal/normalize-case.d.ts.map +0 -1
  259. package/dist/src/internal/normalize-case.js.map +0 -1
  260. package/dist/src/internal/part-map.d.ts.map +0 -1
  261. package/dist/src/internal/part-map.js.map +0 -1
  262. package/dist/src/internal/register.d.ts.map +0 -1
  263. package/dist/src/internal/register.js +0 -9
  264. package/dist/src/internal/register.js.map +0 -1
  265. package/dist/src/internal/tags.d.ts.map +0 -1
  266. package/dist/src/internal/tags.js.map +0 -1
  267. package/dist/src/internal/types.d.ts.map +0 -1
  268. package/dist/src/internal/types.js.map +0 -1
  269. package/dist/src/internal/utils.d.ts.map +0 -1
  270. package/dist/src/internal/utils.js.map +0 -1
  271. package/dist/src/internal/watch.d.ts.map +0 -1
  272. package/dist/src/internal/watch.js.map +0 -1
  273. package/dist/src/operations/base.d.ts.map +0 -1
  274. package/dist/src/operations/base.js.map +0 -1
  275. package/dist/src/operations/filter/operands/boolean.d.ts.map +0 -1
  276. package/dist/src/operations/filter/operands/boolean.js.map +0 -1
  277. package/dist/src/operations/filter/operands/number.d.ts.map +0 -1
  278. package/dist/src/operations/filter/operands/number.js.map +0 -1
  279. package/dist/src/operations/filter/operands/string.d.ts.map +0 -1
  280. package/dist/src/operations/filter/operands/string.js.map +0 -1
  281. package/dist/src/operations/filter/state.d.ts.map +0 -1
  282. package/dist/src/operations/filter/state.js.map +0 -1
  283. package/dist/src/operations/filter/tree.d.ts.map +0 -1
  284. package/dist/src/operations/filter/tree.js.map +0 -1
  285. package/dist/src/operations/filter/types.d.ts.map +0 -1
  286. package/dist/src/operations/filter/types.js.map +0 -1
  287. package/dist/src/operations/filter.d.ts.map +0 -1
  288. package/dist/src/operations/filter.js.map +0 -1
  289. package/dist/src/operations/sort/types.d.ts.map +0 -1
  290. package/dist/src/operations/sort/types.js.map +0 -1
  291. package/dist/src/operations/sort.d.ts.map +0 -1
  292. package/dist/src/operations/sort.js.map +0 -1
  293. package/dist/src/styles/body-cell/body-cell-styles.css.d.ts.map +0 -1
  294. package/dist/src/styles/body-cell/body-cell-styles.css.js +0 -71
  295. package/dist/src/styles/body-cell/body-cell-styles.css.js.map +0 -1
  296. package/dist/src/styles/body-row/body-row-styles.css.d.ts.map +0 -1
  297. package/dist/src/styles/body-row/body-row-styles.css.js +0 -38
  298. package/dist/src/styles/body-row/body-row-styles.css.js.map +0 -1
  299. package/dist/src/styles/filter-row/filter-row-styles.css.d.ts.map +0 -1
  300. package/dist/src/styles/filter-row/filter-row-styles.css.js +0 -96
  301. package/dist/src/styles/filter-row/filter-row-styles.css.js.map +0 -1
  302. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.d.ts +0 -2
  303. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.d.ts.map +0 -1
  304. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.js +0 -83
  305. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.js.map +0 -1
  306. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.d.ts.map +0 -1
  307. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.js +0 -83
  308. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.js.map +0 -1
  309. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.d.ts +0 -2
  310. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.d.ts.map +0 -1
  311. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.js +0 -83
  312. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.js.map +0 -1
  313. package/dist/src/styles/grid/themes/light/grid.material-styles.css.d.ts +0 -2
  314. package/dist/src/styles/grid/themes/light/grid.material-styles.css.d.ts.map +0 -1
  315. package/dist/src/styles/grid/themes/light/grid.material-styles.css.js +0 -83
  316. package/dist/src/styles/grid/themes/light/grid.material-styles.css.js.map +0 -1
  317. package/dist/src/styles/header-cell/header-cell-styles.css.d.ts +0 -2
  318. package/dist/src/styles/header-cell/header-cell-styles.css.d.ts.map +0 -1
  319. package/dist/src/styles/header-cell/header-cell-styles.css.js +0 -141
  320. package/dist/src/styles/header-cell/header-cell-styles.css.js.map +0 -1
  321. package/dist/src/styles/header-row/header-row.base-styles.css.d.ts +0 -2
  322. package/dist/src/styles/header-row/header-row.base-styles.css.d.ts.map +0 -1
  323. package/dist/src/styles/header-row/header-row.base-styles.css.js +0 -35
  324. package/dist/src/styles/header-row/header-row.base-styles.css.js.map +0 -1
  325. /package/{dist/src/define.js → define.js} +0 -0
  326. /package/{dist/docs → docs}/.nojekyll +0 -0
  327. /package/{dist/src/index.js → index.js} +0 -0
  328. /package/{dist/src/internal → internal}/constants.js +0 -0
  329. /package/{dist/src/internal → internal}/icon-registry.js +0 -0
  330. /package/{dist/src/internal → internal}/is-defined.js +0 -0
  331. /package/{dist/src/internal → internal}/mixins/event-emitter.js +0 -0
  332. /package/{dist/src/internal → internal}/normalize-case.js +0 -0
  333. /package/{dist/src/internal → internal}/tags.js +0 -0
  334. /package/{dist/src/internal → internal}/types.js +0 -0
  335. /package/{dist/src/operations → operations}/base.js +0 -0
  336. /package/{dist/src/operations → operations}/filter/types.js +0 -0
  337. /package/{dist/src/operations → operations}/sort/types.js +0 -0
@@ -1,119 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _FilterController_instances, _FilterController_virtualizer_get, _FilterController_emitFilteringEvent, _FilterController_emitFilteredEvent, _FilterController_filter;
7
- import { PIPELINE } from '../internal/constants.js';
8
- import { asArray, getFilterOperandsFor } from '../internal/utils.js';
9
- import { FilterState } from '../operations/filter/state.js';
10
- export class FilterController {
11
- constructor(host) {
12
- _FilterController_instances.add(this);
13
- this.host = host;
14
- this.state = new FilterState();
15
- this.host.addController(this);
16
- }
17
- get filterRow() {
18
- // @ts-expect-error - protected access
19
- return this.host.filterRow;
20
- }
21
- hostConnected() { }
22
- hostUpdate() {
23
- var _a;
24
- (_a = this.filterRow) === null || _a === void 0 ? void 0 : _a.requestUpdate();
25
- }
26
- get(key) {
27
- return this.state.get(key);
28
- }
29
- reset(key) {
30
- key ? this.state.delete(key) : this.state.clear();
31
- }
32
- setActiveColumn(column) {
33
- var _a;
34
- if ((column === null || column === void 0 ? void 0 : column.filter) && ((_a = this.filterRow) === null || _a === void 0 ? void 0 : _a.active)) {
35
- this.filterRow.column = column;
36
- this.filterRow.expression = this.getDefaultExpression(column);
37
- this.host.requestUpdate();
38
- }
39
- }
40
- getDefaultExpression(column) {
41
- var _a;
42
- const caseSensitive = typeof column.filter === 'boolean' ? false : Boolean((_a = column.filter) === null || _a === void 0 ? void 0 : _a.caseSensitive);
43
- const operands = getFilterOperandsFor(column);
44
- const keys = Object.keys(operands);
45
- // XXX: Types
46
- return {
47
- key: column.key,
48
- condition: operands[keys[0]],
49
- caseSensitive,
50
- };
51
- }
52
- async removeAllExpressions(key) {
53
- var _a, _b, _c, _d;
54
- const state = (_b = (_a = this.get(key)) === null || _a === void 0 ? void 0 : _a.all) !== null && _b !== void 0 ? _b : [];
55
- if (!this.host.emitEvent('filtering', {
56
- detail: {
57
- key,
58
- expressions: state,
59
- type: 'remove',
60
- },
61
- cancelable: true,
62
- })) {
63
- return;
64
- }
65
- this.reset(key);
66
- __classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_filter).call(this, []);
67
- await this.host.updateComplete;
68
- __classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_emitFilteredEvent).call(this, { key, state: (_d = (_c = this.get(key)) === null || _c === void 0 ? void 0 : _c.all) !== null && _d !== void 0 ? _d : [] });
69
- }
70
- async removeExpression(expression) {
71
- var _a;
72
- const state = this.get(expression.key);
73
- if (!__classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_emitFilteringEvent).call(this, expression, 'remove')) {
74
- return;
75
- }
76
- state === null || state === void 0 ? void 0 : state.remove(expression);
77
- if (state === null || state === void 0 ? void 0 : state.empty) {
78
- this.reset(state.key);
79
- }
80
- __classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_filter).call(this, []);
81
- await this.host.updateComplete;
82
- __classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_emitFilteredEvent).call(this, { key: expression.key, state: (_a = state === null || state === void 0 ? void 0 : state.all) !== null && _a !== void 0 ? _a : [] });
83
- }
84
- async filterWithEvent(expression, type) {
85
- var _a, _b;
86
- if (!__classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_emitFilteringEvent).call(this, expression, type)) {
87
- return;
88
- }
89
- __classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_filter).call(this, expression);
90
- await this.host.updateComplete;
91
- __classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_emitFilteredEvent).call(this, { key: expression.key, state: (_b = (_a = this.get(expression.key)) === null || _a === void 0 ? void 0 : _a.all) !== null && _b !== void 0 ? _b : [] });
92
- }
93
- filter(expression) {
94
- __classPrivateFieldGet(this, _FilterController_instances, "m", _FilterController_filter).call(this, asArray(expression).map(expr => Object.assign(this.getDefaultExpression(this.host.getColumn(expr.key)), expr)));
95
- }
96
- }
97
- _FilterController_instances = new WeakSet(), _FilterController_virtualizer_get = function _FilterController_virtualizer_get() {
98
- // @ts-expect-error - protected access
99
- return this.host.scrollContainer;
100
- }, _FilterController_emitFilteringEvent = function _FilterController_emitFilteringEvent(expression, type) {
101
- return this.host.emitEvent('filtering', {
102
- detail: {
103
- key: expression.key,
104
- expressions: [expression],
105
- type,
106
- },
107
- cancelable: true,
108
- });
109
- }, _FilterController_emitFilteredEvent = function _FilterController_emitFilteredEvent(detail) {
110
- return this.host.emitEvent('filtered', { detail });
111
- }, _FilterController_filter = function _FilterController_filter(expression) {
112
- var _a;
113
- asArray(expression).forEach(expr => this.state.set(expr));
114
- // HACK: In the case where the scrollTop is a large and amount and a big chunk of data is filtered out
115
- // HACK: the virtualizer can't recalculate its scroll position correctly. Thus, we reset the scrollTop state.
116
- (_a = __classPrivateFieldGet(this, _FilterController_instances, "a", _FilterController_virtualizer_get)) === null || _a === void 0 ? void 0 : _a.scrollTo({ top: 0 });
117
- this.host.requestUpdate(PIPELINE);
118
- };
119
- //# sourceMappingURL=filter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter.js","sourceRoot":"","sources":["../../../src/controllers/filter.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAM5D,MAAM,OAAO,gBAAgB;IAC3B,YAAsB,IAAiB;;QAAjB,SAAI,GAAJ,IAAI,CAAa;QAIhC,UAAK,GAAmB,IAAI,WAAW,EAAE,CAAC;QAH/C,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAID,IAAW,SAAS;QAClB,sCAAsC;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;IAC7B,CAAC;IA8BM,aAAa,KAAI,CAAC;IAElB,UAAU;;QACf,MAAA,IAAI,CAAC,SAAS,0CAAE,aAAa,EAAE,CAAC;IAClC,CAAC;IAEM,GAAG,CAAC,GAAY;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,KAAK,CAAC,GAAa;QACxB,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACpD,CAAC;IAEM,eAAe,CAAC,MAA+B;;QACpD,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,MAAI,MAA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xC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AACpC,CAAC","sourcesContent":["import { ReactiveController } from 'lit';\nimport { PIPELINE } from '../internal/constants.js';\nimport { asArray, getFilterOperandsFor } from '../internal/utils.js';\nimport { FilterState } from '../operations/filter/state.js';\n\nimport type { ColumnConfiguration, GridHost, Keys } from '../internal/types.js';\nimport type { FilterExpression } from '../operations/filter/types.js';\nimport type { ApexFilteredEvent } from '../components/grid.js';\n\nexport class FilterController<T extends object> implements ReactiveController {\n constructor(protected host: GridHost<T>) {\n this.host.addController(this);\n }\n\n public state: FilterState<T> = new FilterState();\n\n public get filterRow() {\n // @ts-expect-error - protected access\n return this.host.filterRow;\n }\n\n get #virtualizer() {\n // @ts-expect-error - protected access\n return this.host.scrollContainer;\n }\n\n #emitFilteringEvent(expression: FilterExpression<T>, type: 'add' | 'modify' | 'remove') {\n return this.host.emitEvent('filtering', {\n detail: {\n key: expression.key,\n expressions: [expression],\n type,\n },\n cancelable: true,\n });\n }\n\n #emitFilteredEvent(detail?: ApexFilteredEvent<T>) {\n return this.host.emitEvent('filtered', { detail });\n }\n\n #filter(expression: FilterExpression<T> | FilterExpression<T>[]) {\n asArray(expression).forEach(expr => this.state.set(expr));\n // HACK: In the case where the scrollTop is a large and amount and a big chunk of data is filtered out\n // HACK: the virtualizer can't recalculate its scroll position correctly. Thus, we reset the scrollTop state.\n this.#virtualizer?.scrollTo({ top: 0 });\n this.host.requestUpdate(PIPELINE);\n }\n\n public hostConnected() {}\n\n public hostUpdate(): void {\n this.filterRow?.requestUpdate();\n }\n\n public get(key: Keys<T>) {\n return this.state.get(key);\n }\n\n public reset(key?: Keys<T>) {\n key ? this.state.delete(key) : this.state.clear();\n }\n\n public setActiveColumn(column?: ColumnConfiguration<T>) {\n if (column?.filter && this.filterRow?.active) {\n this.filterRow.column = column;\n this.filterRow.expression = this.getDefaultExpression(column);\n this.host.requestUpdate();\n }\n }\n\n public getDefaultExpression(column: ColumnConfiguration<T>) {\n const caseSensitive =\n typeof column.filter === 'boolean' ? false : Boolean(column.filter?.caseSensitive);\n const operands = getFilterOperandsFor(column);\n const keys = Object.keys(operands) as Keys<typeof operands>[];\n\n // XXX: Types\n return {\n key: column.key,\n condition: operands[keys[0]],\n caseSensitive,\n } as unknown as FilterExpression<T>;\n }\n\n public async removeAllExpressions(key: Keys<T>) {\n const state = this.get(key)?.all ?? [];\n\n if (\n !this.host.emitEvent('filtering', {\n detail: {\n key,\n expressions: state,\n type: 'remove',\n },\n cancelable: true,\n })\n ) {\n return;\n }\n\n this.reset(key);\n this.#filter([]);\n\n await this.host.updateComplete;\n this.#emitFilteredEvent({ key, state: this.get(key)?.all ?? [] });\n }\n\n public async removeExpression(expression: FilterExpression<T>) {\n const state = this.get(expression.key);\n\n if (!this.#emitFilteringEvent(expression, 'remove')) {\n return;\n }\n\n state?.remove(expression);\n\n if (state?.empty) {\n this.reset(state.key);\n }\n\n this.#filter([]);\n\n await this.host.updateComplete;\n this.#emitFilteredEvent({ key: expression.key, state: state?.all ?? [] });\n }\n\n public async filterWithEvent(expression: FilterExpression<T>, type: 'add' | 'modify' | 'remove') {\n if (!this.#emitFilteringEvent(expression, type)) {\n return;\n }\n\n this.#filter(expression);\n\n await this.host.updateComplete;\n this.#emitFilteredEvent({ key: expression.key, state: this.get(expression.key)?.all ?? [] });\n }\n\n public filter(expression: FilterExpression<T> | FilterExpression<T>[]) {\n this.#filter(\n asArray(expression).map(expr =>\n Object.assign(this.getDefaultExpression(this.host.getColumn(expr.key)!), expr),\n ),\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/controllers/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAGzC,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEvE,qBAAa,oBAAoB,CA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K,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3E,CAAC;IAES,SAAS;QACjB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACnF,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAES,UAAU;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QAC/E,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAEM,aAAa,KAAI,CAAC;IAElB,gBAAgB;QACrB,IAAI,CAAC,MAAM,GAAG,aAA8B,CAAC;QAC7C,IAAI,CAAC,KAAK,GAAG,gBAAgB,CAAC;IAChC,CAAC;IAEM,QAAQ,CAAC,KAAoB;QAClC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;YAChC,KAAK,CAAC,cAAc,EAAE,CAAC;YACvB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1C;IACH,CAAC;CACF","sourcesContent":["import { ReactiveController } from 'lit';\nimport ApexGridRow from '../components/row.js';\nimport { NAVIGATION_STATE, SENTINEL_NODE } from '../internal/constants.js';\nimport type { ActiveNode, GridHost, Keys } from '../internal/types.js';\n\nexport class NavigationController<T extends object> implements ReactiveController {\n protected handlers = new Map(\n Object.entries({\n ArrowDown: this.arrowDown,\n ArrowUp: this.arrowUp,\n ArrowLeft: this.arrowLeft,\n ArrowRight: this.arrowRight,\n Home: this.home,\n End: this.end,\n }),\n );\n\n protected get virtualizer() {\n // @ts-expect-error - Protected member access\n return this.host.scrollContainer;\n }\n\n protected state = NAVIGATION_STATE;\n protected _active = SENTINEL_NODE;\n\n protected get nextNode() {\n const node = this.state.get('current')!;\n return node === SENTINEL_NODE\n ? { column: this.firstColumn, row: 0 }\n : ({ ...node } as ActiveNode<T>);\n }\n\n protected get columns() {\n return this.host.columns;\n }\n\n protected get firstColumn() {\n return this.host.getColumn(0)!.key ?? '';\n }\n\n protected getPreviousColumn(key: Keys<T>) {\n return this.columns[Math.max(this.columns.indexOf(this.host.getColumn(key)!) - 1, 0)].key;\n }\n\n protected getNextColumn(key: Keys<T>) {\n return this.columns[\n Math.min(this.columns.indexOf(this.host.getColumn(key)!) + 1, this.columns.length - 1)\n ].key;\n }\n\n protected scrollToCell(node: ActiveNode<T>) {\n const row = Array.from(this.virtualizer.querySelectorAll(ApexGridRow.is)).find(\n row => row.index === node.row,\n ) as unknown as ApexGridRow<T>;\n\n if (row) {\n row.cells.find(cell => cell.column.key === node.column)?.scrollIntoView({ block: 'nearest' });\n }\n }\n\n public get active() {\n return this._active as ActiveNode<T>;\n }\n\n public set active(node: ActiveNode<T>) {\n this._active = node;\n this.state.set('previous', this._active);\n this.state.set('current', node);\n this.host.requestUpdate();\n }\n\n constructor(protected host: GridHost<T>) {\n this.host.addController(this);\n }\n\n protected home() {\n this.active = Object.assign(this.nextNode, { row: 0 });\n this.virtualizer.element(this.active.row)?.scrollIntoView({ block: 'nearest' });\n }\n\n protected end() {\n this.active = Object.assign(this.nextNode, { row: this.host.totalItems - 1 });\n this.virtualizer.element(this.active.row)?.scrollIntoView({ block: 'nearest' });\n }\n\n protected arrowDown() {\n const next = this.nextNode;\n\n this.active = Object.assign(next, {\n row: Math.min(next.row + 1, this.host.totalItems - 1),\n });\n this.virtualizer.element(next.row)?.scrollIntoView({ block: 'nearest' });\n }\n\n protected arrowUp() {\n const next = this.nextNode;\n this.active = Object.assign(next, { row: Math.max(0, next.row - 1) });\n this.virtualizer.element(next.row)?.scrollIntoView({ block: 'nearest' });\n }\n\n protected arrowLeft() {\n const next = this.nextNode;\n this.active = Object.assign(next, { column: this.getPreviousColumn(next.column) });\n this.scrollToCell(this.active);\n }\n\n protected arrowRight() {\n const next = this.nextNode;\n this.active = Object.assign(next, { column: this.getNextColumn(next.column) });\n this.scrollToCell(this.active);\n }\n\n public hostConnected() {}\n\n public hostDisconnected() {\n this.active = SENTINEL_NODE as ActiveNode<T>;\n this.state = NAVIGATION_STATE;\n }\n\n public navigate(event: KeyboardEvent) {\n if (this.handlers.has(event.key)) {\n event.preventDefault();\n this.handlers.get(event.key)!.call(this);\n }\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../../src/controllers/resize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAExD,OAAO,cAAc,MAAM,yBAAyB,CAAC;AAErD,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAQ,MAAM,sBAAsB,CAAC;AAEhF,qBAAa,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAE,YAAW,kBAAkB;;IAC/D,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;gBAAjB,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAIhC,eAAe,UAAS;IACxB,eAAe,SAAK;IAU3B;;;;OAIG;IACI,KAAK,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IAMtC;;OAEG;IACI,IAAI;IAKJ,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM;IASpE,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,CAAC,CAAC;IAUxE,aAAa;IAEpB;;OAEG;IACI,eAAe;CAUvB"}
@@ -1,70 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _ResizeController_instances, _ResizeController_maxSize;
7
- import { html, nothing } from 'lit';
8
- import { styleMap } from 'lit/directives/style-map.js';
9
- import { MIN_COL_RESIZE_WIDTH } from '../internal/constants.js';
10
- export class ResizeController {
11
- constructor(host) {
12
- _ResizeController_instances.add(this);
13
- this.host = host;
14
- this.indicatorActive = false;
15
- this.indicatorOffset = 0;
16
- this.host.addController(this);
17
- }
18
- /**
19
- * Begins resizing a column by showing and positioning the resize indicator in relation to the column.
20
- *
21
- * @param header the
22
- */
23
- start(header) {
24
- this.indicatorActive = true;
25
- this.indicatorOffset = header.offsetLeft + header.offsetWidth;
26
- this.host.requestUpdate();
27
- }
28
- /**
29
- * Stops and resets the resizing state.
30
- */
31
- stop() {
32
- this.indicatorActive = false;
33
- this.host.requestUpdate();
34
- }
35
- resize(column, width, sizerOffset) {
36
- if (sizerOffset) {
37
- this.indicatorOffset = sizerOffset;
38
- }
39
- column.width = `${width}px`;
40
- this.host.requestUpdate();
41
- }
42
- async autosize(column, header) {
43
- column.width = `max-content`;
44
- this.host.requestUpdate();
45
- await this.host.updateComplete;
46
- column.width = `${__classPrivateFieldGet(this, _ResizeController_instances, "m", _ResizeController_maxSize).call(this, column.key, header.offsetWidth)}px`;
47
- this.host.requestUpdate();
48
- }
49
- hostConnected() { }
50
- /**
51
- * Renders the resize indicator in the grid.
52
- */
53
- renderIndicator() {
54
- return this.indicatorActive
55
- ? html `<div
56
- part="resize-indicator"
57
- style=${styleMap({
58
- transform: `translateX(${this.indicatorOffset}px)`,
59
- })}
60
- ></div>`
61
- : nothing;
62
- }
63
- }
64
- _ResizeController_instances = new WeakSet(), _ResizeController_maxSize = function _ResizeController_maxSize(key, headerWidth) {
65
- const max = this.host.rows
66
- .map(row => row.cells.find(cell => cell.column.key === key))
67
- .reduce((prev, current) => (current.offsetWidth > prev ? current.offsetWidth : prev), 0);
68
- return Math.max(...[MIN_COL_RESIZE_WIDTH, max, headerWidth]);
69
- };
70
- //# sourceMappingURL=resize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resize.js","sourceRoot":"","sources":["../../../src/controllers/resize.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAsB,MAAM,KAAK,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,MAAM,OAAO,gBAAgB;IAC3B,YAAsB,IAAiB;;QAAjB,SAAI,GAAJ,IAAI,CAAa;QAIhC,oBAAe,GAAG,KAAK,CAAC;QACxB,oBAAe,GAAG,CAAC,CAAC;QAJzB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAaD;;;;OAIG;IACI,KAAK,CAAC,MAAyB;QACpC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;QAC5B,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;QAC9D,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACI,IAAI;QACT,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;QAC7B,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;IAC5B,CAAC;IAEM,MAAM,CAAC,MAA8B,EAAE,K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I,CAAC,EAAE,CAAC,CAAC,CAAC;IAE3F,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,oBAAoB,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC;AAC/D,CAAC","sourcesContent":["import { html, nothing, ReactiveController } from 'lit';\nimport { styleMap } from 'lit/directives/style-map.js';\nimport ApexGridHeader from '../components/header.js';\nimport { MIN_COL_RESIZE_WIDTH } from '../internal/constants.js';\nimport type { ColumnConfiguration, GridHost, Keys } from '../internal/types.js';\n\nexport class ResizeController<T extends object> implements ReactiveController {\n constructor(protected host: GridHost<T>) {\n this.host.addController(this);\n }\n\n public indicatorActive = false;\n public indicatorOffset = 0;\n\n #maxSize(key: Keys<T>, headerWidth: number) {\n const max = this.host.rows\n .map(row => row.cells.find(cell => cell.column.key === key)!)\n .reduce((prev, current) => (current.offsetWidth > prev ? current.offsetWidth : prev), 0);\n\n return Math.max(...[MIN_COL_RESIZE_WIDTH, max, headerWidth]);\n }\n\n /**\n * Begins resizing a column by showing and positioning the resize indicator in relation to the column.\n *\n * @param header the\n */\n public start(header: ApexGridHeader<T>) {\n this.indicatorActive = true;\n this.indicatorOffset = header.offsetLeft + header.offsetWidth;\n this.host.requestUpdate();\n }\n\n /**\n * Stops and resets the resizing state.\n */\n public stop() {\n this.indicatorActive = false;\n this.host.requestUpdate();\n }\n\n public resize(column: ColumnConfiguration<T>, width: number, sizerOffset?: number) {\n if (sizerOffset) {\n this.indicatorOffset = sizerOffset;\n }\n\n column.width = `${width}px`;\n this.host.requestUpdate();\n }\n\n public async autosize(column: ColumnConfiguration<T>, header: ApexGridHeader<T>) {\n column.width = `max-content`;\n\n this.host.requestUpdate();\n await this.host.updateComplete;\n\n column.width = `${this.#maxSize(column.key, header.offsetWidth)}px`;\n this.host.requestUpdate();\n }\n\n public hostConnected() {}\n\n /**\n * Renders the resize indicator in the grid.\n */\n public renderIndicator() {\n return this.indicatorActive\n ? html`<div\n part=\"resize-indicator\"\n style=${styleMap({\n transform: `translateX(${this.indicatorOffset}px)`,\n })}\n ></div>`\n : nothing;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../src/controllers/sort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAGzC,OAAO,KAAK,EACV,mBAAmB,EAEnB,QAAQ,EACR,IAAI,EACL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAoB,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAE/F,qBAAa,cAAc,CAAC,CAAC,SAAS,MAAM,CAAE,YAAW,kBAAkB;;IAC7D,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;gBAAjB,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAIhC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAa;IA8D1B,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAiBxD,iBAAiB,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC;IAcpF,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;IAI1B,SAAS,CAAC,KAAK,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE;IAK7D,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,EAAE;IAQzD,aAAa;CACrB"}
@@ -1,94 +0,0 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _SortController_instances, _SortController_isMultipleSort_get, _SortController_isTriStateSort_get, _SortController_resolveSortOptions, _SortController_createDefaultExpression, _SortController_orderBy, _SortController_emitSortingEvent, _SortController_emitSortedEvent, _SortController_setExpression;
7
- import { PIPELINE } from '../internal/constants.js';
8
- import { asArray } from '../internal/utils.js';
9
- export class SortController {
10
- constructor(host) {
11
- _SortController_instances.add(this);
12
- this.host = host;
13
- this.state = new Map();
14
- this.host.addController(this);
15
- }
16
- async sortFromHeaderClick(column) {
17
- const expression = this.prepareExpression(column);
18
- if (!__classPrivateFieldGet(this, _SortController_instances, "m", _SortController_emitSortingEvent).call(this, expression)) {
19
- return;
20
- }
21
- if (!__classPrivateFieldGet(this, _SortController_instances, "a", _SortController_isMultipleSort_get)) {
22
- this.reset();
23
- }
24
- this._sort(expression);
25
- await this.host.updateComplete;
26
- __classPrivateFieldGet(this, _SortController_instances, "m", _SortController_emitSortedEvent).call(this, expression);
27
- }
28
- prepareExpression({ key, sort: options }) {
29
- if (this.state.has(key)) {
30
- const expr = this.state.get(key);
31
- return Object.assign(expr, {
32
- direction: __classPrivateFieldGet(this, _SortController_instances, "m", _SortController_orderBy).call(this, expr.direction),
33
- ...__classPrivateFieldGet(this, _SortController_instances, "m", _SortController_resolveSortOptions).call(this, options),
34
- });
35
- }
36
- // Initial state
37
- return __classPrivateFieldGet(this, _SortController_instances, "m", _SortController_createDefaultExpression).call(this, key);
38
- }
39
- reset(key) {
40
- key ? this.state.delete(key) : this.state.clear();
41
- }
42
- _sort(expressions) {
43
- asArray(expressions).forEach(expr => __classPrivateFieldGet(this, _SortController_instances, "m", _SortController_setExpression).call(this, expr));
44
- this.host.requestUpdate(PIPELINE);
45
- }
46
- sort(expressions) {
47
- this._sort(asArray(expressions).map(expr => { var _a; return Object.assign((_a = this.state.get(expr.key)) !== null && _a !== void 0 ? _a : __classPrivateFieldGet(this, _SortController_instances, "m", _SortController_createDefaultExpression).call(this, expr.key), expr); }));
48
- }
49
- hostConnected() { }
50
- }
51
- _SortController_instances = new WeakSet(), _SortController_isMultipleSort_get = function _SortController_isMultipleSort_get() {
52
- return this.host.sortConfiguration.multiple;
53
- }, _SortController_isTriStateSort_get = function _SortController_isTriStateSort_get() {
54
- return this.host.sortConfiguration.triState;
55
- }, _SortController_resolveSortOptions = function _SortController_resolveSortOptions(options) {
56
- const expr = {
57
- caseSensitive: false,
58
- comparer: undefined,
59
- };
60
- if (!options || typeof options === 'boolean') {
61
- return expr;
62
- }
63
- return Object.assign(expr, {
64
- caseSensitive: options.caseSensitive,
65
- comparer: options.comparer,
66
- });
67
- }, _SortController_createDefaultExpression = function _SortController_createDefaultExpression(key) {
68
- var _a;
69
- const options = (_a = this.host.getColumn(key)) === null || _a === void 0 ? void 0 : _a.sort;
70
- return {
71
- key,
72
- direction: 'ascending',
73
- ...__classPrivateFieldGet(this, _SortController_instances, "m", _SortController_resolveSortOptions).call(this, options),
74
- };
75
- }, _SortController_orderBy = function _SortController_orderBy(dir) {
76
- return __classPrivateFieldGet(this, _SortController_instances, "a", _SortController_isTriStateSort_get)
77
- ? dir === 'ascending'
78
- ? 'descending'
79
- : dir === 'descending'
80
- ? 'none'
81
- : 'ascending'
82
- : dir === 'ascending'
83
- ? 'descending'
84
- : 'ascending';
85
- }, _SortController_emitSortingEvent = function _SortController_emitSortingEvent(detail) {
86
- return this.host.emitEvent('sorting', { detail, cancelable: true });
87
- }, _SortController_emitSortedEvent = function _SortController_emitSortedEvent(detail) {
88
- return this.host.emitEvent('sorted', { detail });
89
- }, _SortController_setExpression = function _SortController_setExpression(expression) {
90
- expression.direction === 'none'
91
- ? this.reset(expression.key)
92
- : this.state.set(expression.key, { ...expression });
93
- };
94
- //# sourceMappingURL=sort.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sort.js","sourceRoot":"","sources":["../../../src/controllers/sort.ts"],"names":[],"mappings":";;;;;;AAC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\nimport { asArray } from '../internal/utils.js';\nimport type {\n ColumnConfiguration,\n ColumnSortConfiguration,\n GridHost,\n Keys,\n} from '../internal/types.js';\nimport type { SortExpression, SortingDirection, SortState } from '../operations/sort/types.js';\n\nexport class SortController<T extends object> implements ReactiveController {\n constructor(protected host: GridHost<T>) {\n this.host.addController(this);\n }\n\n public state: SortState<T> = new Map();\n\n get #isMultipleSort() {\n return this.host.sortConfiguration.multiple;\n }\n\n get #isTriStateSort() {\n return this.host.sortConfiguration.triState;\n }\n\n #resolveSortOptions(options?: boolean | ColumnSortConfiguration<T>) {\n const expr: Pick<SortExpression<T>, 'caseSensitive' | 'comparer'> = {\n caseSensitive: false,\n comparer: undefined,\n };\n\n if (!options || typeof options === 'boolean') {\n return expr as Partial<SortExpression<T>>;\n }\n\n return Object.assign(expr, {\n caseSensitive: options.caseSensitive,\n comparer: options.comparer,\n }) as Partial<SortExpression<T>>;\n }\n\n #createDefaultExpression(key: Keys<T>) {\n const options = this.host.getColumn(key)?.sort;\n\n return {\n key,\n direction: 'ascending',\n ...this.#resolveSortOptions(options),\n } as SortExpression<T>;\n }\n\n #orderBy(dir?: SortingDirection): SortingDirection {\n return this.#isTriStateSort\n ? dir === 'ascending'\n ? 'descending'\n : dir === 'descending'\n ? 'none'\n : 'ascending'\n : dir === 'ascending'\n ? 'descending'\n : 'ascending';\n }\n\n #emitSortingEvent(detail: SortExpression<T>) {\n return this.host.emitEvent('sorting', { detail, cancelable: true });\n }\n\n #emitSortedEvent(detail: SortExpression<T>) {\n return this.host.emitEvent('sorted', { detail });\n }\n\n #setExpression(expression: SortExpression<T>) {\n expression.direction === 'none'\n ? this.reset(expression.key)\n : this.state.set(expression.key, { ...expression });\n }\n\n public async sortFromHeaderClick(column: ColumnConfiguration<T>) {\n const expression = this.prepareExpression(column);\n\n if (!this.#emitSortingEvent(expression)) {\n return;\n }\n\n if (!this.#isMultipleSort) {\n this.reset();\n }\n\n this._sort(expression);\n\n await this.host.updateComplete;\n this.#emitSortedEvent(expression);\n }\n\n public prepareExpression({ key, sort: options }: ColumnConfiguration<T>): SortExpression<T> {\n if (this.state.has(key)) {\n const expr = this.state.get(key)!;\n\n return Object.assign(expr, {\n direction: this.#orderBy(expr.direction),\n ...this.#resolveSortOptions(options),\n });\n }\n\n // Initial state\n return this.#createDefaultExpression(key);\n }\n\n public reset(key?: Keys<T>) {\n key ? this.state.delete(key) : this.state.clear();\n }\n\n protected _sort(expressions: SortExpression<T> | SortExpression<T>[]) {\n asArray(expressions).forEach(expr => this.#setExpression(expr));\n this.host.requestUpdate(PIPELINE);\n }\n\n public sort(expressions: SortExpression<T> | SortExpression<T>[]) {\n this._sort(\n asArray(expressions).map(expr =>\n Object.assign(this.state.get(expr.key) ?? this.#createDefaultExpression(expr.key), expr),\n ),\n );\n }\n\n public hostConnected() {}\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../src/controllers/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,KAAK,CAAC;AAEzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEjE,qBAAa,eAAe,CAAC,CAAC,SAAS,MAAM,CAAE,YAAW,kBAAkB;IAwBvD,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAvB7B,OAAO,EAAG,cAAc,CAAC,CAAC,CAAC,CAAC;IAC5B,SAAS,EAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAChC,UAAU,EAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC;IACrC,QAAQ,EAAG,gBAAgB,CAAC,C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AES,IAAI;QACZ,IAAI,CAAC,OAAO,GAAG,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7C,IAAI,CAAC,SAAS,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACtD,IAAI,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,CAAC;IAEM,aAAa,KAAI,CAAC;IAElB,UAAU;;QACf,MAAA,IAAI,CAAC,SAAS,0CAAE,aAAa,EAAE,CAAC;QAChC,MAAA,IAAI,CAAC,eAAe,0CAAE,aAAa,EAAE,CAAC;IACxC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAuB,qBAAqB,CAAC,CAAC","sourcesContent":["import { ReactiveController } from 'lit';\nimport { createContext } from '@lit-labs/context';\nimport { FilterController } from './filter.js';\nimport { NavigationController } from './navigation.js';\nimport { SortController } from './sort.js';\nimport { ResizeController } from './resize.js';\nimport type { ActiveNode, GridHost } from '../internal/types.js';\n\nexport class StateController<T extends object> implements ReactiveController {\n public sorting!: SortController<T>;\n public filtering!: FilterController<T>;\n public navigation!: NavigationController<T>;\n public resizing!: ResizeController<T>;\n\n public get active() {\n return this.navigation.active;\n }\n\n public set active(node: ActiveNode<T>) {\n this.navigation.active = node;\n }\n\n public get headerRow() {\n // @ts-expect-error - Protected member access\n return this.host.headerRow;\n }\n\n public get scrollContainer() {\n // @ts-expect-error - Protected member access\n return this.host.scrollContainer;\n }\n\n constructor(public host: GridHost<T>) {\n this.host.addController(this);\n this.init();\n }\n\n protected init() {\n this.sorting = new SortController(this.host);\n this.filtering = new FilterController(this.host);\n this.navigation = new NavigationController(this.host);\n this.resizing = new ResizeController(this.host);\n }\n\n public hostConnected() {}\n\n public hostUpdate(): void {\n this.headerRow?.requestUpdate();\n this.scrollContainer?.requestUpdate();\n }\n}\n\nexport const gridStateContext = createContext<StateController<any>>('gridStateController');\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"define.js","sourceRoot":"","sources":["../../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,QAAQ,CAAC,QAAQ,EAAE,CAAC","sourcesContent":["import { ApexGrid } from './components/grid.js';\nexport { ApexGrid };\n\nApexGrid.register();\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEpG,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAExE,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,YAAY,GACb,MAAM,4BAA4B,CAAC;AAEpC,YAAY,EACV,oBAAoB,EACpB,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,eAAe,EACf,oBAAoB,GACrB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,yBAAyB,EACzB,uBAAuB,EACvB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,QAAQ,EACR,qBAAqB,EACrB,IAAI,EACJ,YAAY,GACb,MAAM,qBAAqB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["export { ApexGrid } from './components/grid.js';\nexport type { ApexGridEventMap, ApexFilteringEvent, ApexFilteredEvent } from './components/grid.js';\n\nexport { BooleanOperands } from './operations/filter/operands/boolean.js';\nexport { NumberOperands } from './operations/filter/operands/number.js';\nexport { StringOperands } from './operations/filter/operands/string.js';\n\nexport type {\n BaseSortComparer,\n BaseSortExpression,\n SortExpression,\n SortingDirection,\n SortState,\n SortComparer,\n} from './operations/sort/types.js';\n\nexport type {\n BaseFilterExpression,\n FilterCriteria,\n FilterExpression,\n OperandKeys,\n FilterOperation,\n FilterOperationLogic,\n} from './operations/filter/types.js';\nexport type {\n ApexCellContext,\n ApexHeaderContext,\n BaseApexCellContext,\n BaseColumnConfiguration,\n BaseColumnSortConfiguration,\n BasePropertyType,\n ColumnConfiguration,\n ColumnFilterConfiguration,\n ColumnSortConfiguration,\n DataPipelineConfiguration,\n DataPipelineHook,\n DataPipelineParams,\n DataType,\n GridSortConfiguration,\n Keys,\n PropertyType,\n} from './internal/types.js';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/internal/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,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AC","sourcesContent":["import type { ActiveNode, ColumnConfiguration, NavigationState } from './types.js';\n\nconst columnKey = Symbol();\n\nexport const PIPELINE = 'pipeline';\nexport const SORT_ICON_ASCENDING = 'arrow-upward' as const;\nexport const SORT_ICON_DESCENDING = 'arrow-downward' as const;\n\nexport const MIN_COL_RESIZE_WIDTH = 80;\n\nexport const SENTINEL_NODE: Readonly<ActiveNode<any>> = Object.freeze({ column: '', row: -1 });\nexport const DEFAULT_COLUMN_CONFIG = Object.freeze<ColumnConfiguration<any>>({\n key: columnKey,\n type: 'string',\n resizable: false,\n hidden: false,\n sort: false,\n filter: false,\n});\nexport const NAVIGATION_STATE: Map<NavigationState, ActiveNode<any>> = new Map([\n ['previous', SENTINEL_NODE],\n ['current', SENTINEL_NODE],\n]);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-registry.d.ts","sourceRoot":"","sources":["../../../src/internal/icon-registry.ts"],"names":[],"mappings":"AA2CA,wBAAgB,iBAAiB,SAIhC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"icon-registry.js","sourceRoot":"","sources":["../../../src/internal/icon-registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,aAAa,GAA2B;IAC5C,cAAc,EACZ,0OAA0O;IAC5O,gBAAgB,EACd,wPAAwP;IAC1P,GAAG,EAAE,oUAAoU;IACzU,QAAQ,EACN,i2BAAi2B;IACn2B,cAAc,EACZ,o7BAAo7B;IACt7B,WAAW,EACT,wUAAwU;IAC1U,kBAAkB,EAChB,oZAAoZ;IACtZ,KAAK,EACH,wYAAwY;IAC1Y,QAAQ,EACN,0uBAA0uB;IAC5uB,MAAM,EACJ,0QAA0Q;IAC5Q,KAAK,EACH,olBAAolB;IACtlB,QAAQ,EACN,uTAAuT;IACzT,eAAe,EACb,mYAAmY;IACrY,QAAQ,EACN,2dAA2d;IAC7d,YAAY,EACV,uYAAuY;IACzY,UAAU,EACR,4bAA4b;IAC9b,IAAI,EAAE,2mBAA2mB;IACjnB,MAAM,EACJ,6HAA6H;IAC/H,KAAK,EACH,iMAAiM;IACnM,OAAO,EACL,4XAA4X;CAC/X,CAAC;AAEF,MAAM,UAAU,iBAAiB;IAC/B,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;QACvD,oBAAoB,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;KAC7C;AACH,CAAC","sourcesContent":["import { registerIconFromText } from 'igniteui-webcomponents';\n\nconst internalIcons: Record<string, string> = {\n 'arrow-upward':\n '<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fas\" data-icon=\"arrow-downward\" role=\"img\" viewBox=\"0 0 45 45\"><path d=\"M22.5 40V13.7L10.1 26.1 8 24 24 8l16 16-2.1 2.1-12.4-12.4V40Z\"/></svg>',\n 'arrow-downward':\n '<svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" data-prefix=\"fas\" data-icon=\"arrow-downward\" role=\"img\" viewBox=\"0 0 45 45\"><path fill=\"currentColor\" d=\"M24 40 8 24l2.1-2.1 12.4 12.4V8h3v26.3l12.4-12.4L40 24Z\"/></svg>',\n all: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"agall-desc agall-title\"><title id=\"agall-title\">Select All Icon</title><desc id=\"agall-desc\">A picture showing tree lines and a check mark.</desc><path d=\"M2 14h8v2H2zm0-8h12v2H2zm14 11l-3-3-1.5 1.5L16 20l7-7-1.5-1.5L16 17zM2 10h12v2H2z\"/></svg>',\n contains:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"czcontains-desc czcontains-title\"><title id=\"czcontains-title\">Contains Icon</title><desc id=\"czcontains-desc\">A picture showing the lowercase letter A in a square box.</desc><path d=\"M3 3v18h18V3zm16 16H5V5h14z\"/><path d=\"M12 11.3a4.39 4.39 0 00-2.54.63 2.07 2.07 0 00-.9 1.78 2.29 2.29 0 00.66 1.74 2.63 2.63 0 001.89.63 2.39 2.39 0 001.32-.37 3.05 3.05 0 001-.93 3.72 3.72 0 00.08.57c0 .19.1.38.16.58h1.79a4.51 4.51 0 01-.21-.88 5.57 5.57 0 01-.07-.93v-3.5a2.44 2.44 0 00-.84-2 3.34 3.34 0 00-2.22-.7 3.54 3.54 0 00-2.3.72A1.93 1.93 0 009 10.29h1.71a.93.93 0 01.29-.71 1.5 1.5 0 011-.29 1.45 1.45 0 011 .35 1.3 1.3 0 01.37 1v.69zm1.4 1.08v1.17a1.61 1.61 0 01-.71.77 2.27 2.27 0 01-1.21.34 1.18 1.18 0 01-.84-.27.92.92 0 01-.3-.72 1.16 1.16 0 01.44-.9 1.76 1.76 0 011.22-.39z\"/></svg>',\n doesNotContain:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"eadoes-not-contain-desc eadoes-not-contain-title\"><title id=\"eadoes-not-contain-title\">Does-Not-Contain Icon</title><desc id=\"eadoes-not-contain-desc\">A picture showing the lowercase letter A in a crossed-out square box.</desc><path d=\"M21 19.74V3H4.26L2.89 1.63 1.63 2.92 3 4.29V21h16.73l1.37 1.37 1.27-1.26zM5 19V6.28l5.28 5.27a3.19 3.19 0 00-.81.38 2.07 2.07 0 00-.9 1.78 2.29 2.29 0 00.66 1.74 2.63 2.63 0 001.89.63 2.39 2.39 0 001.32-.37 3.05 3.05 0 001-.93 3.72 3.72 0 00.08.57c0 .19.1.38.16.58h1L17.73 19zm5.79-6.23a1.31 1.31 0 01.45-.25l1.37 1.36.28.29a1.57 1.57 0 01-.19.15 2.27 2.27 0 01-1.21.34 1.18 1.18 0 01-.84-.27.92.92 0 01-.3-.72 1.16 1.16 0 01.44-.9zm2.6-1.47h-.83l-1.62-1.62.08-.1a1.5 1.5 0 011-.29 1.45 1.45 0 011 .35 1.3 1.3 0 01.37 1zM19 17.74l-3.85-3.85v-3.27a2.44 2.44 0 00-.84-2 3.34 3.34 0 00-2.22-.7 3.64 3.64 0 00-2.24.67L6.26 5H19z\"/></svg>',\n greaterThan:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"fygreater-than-desc fygreater-than-title\"><title id=\"fygreater-than-title\">Greater Than Icon</title><desc id=\"fygreater-than-desc\">A picture showing the greater-than symbol.</desc><path d=\"M6 7.11L15.09 12 6 16.89V19l12-6.46v-1.08L6 5v2.11z\"/></svg>',\n greaterThanOrEqual:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"fzgreater-than-or-equal-desc fzgreater-than-or-equal-title\"><title id=\"fzgreater-than-or-equal-title\">Greater Than or Equal Icon</title><desc id=\"fzgreater-than-or-equal-desc\">A picture showing the grater-than or equal symbol.</desc><path d=\"M5.99 19h12.02v2H5.99zM18 9.47L6 3v2.11L15.09 10 6 14.9v2.11l12-6.47V9.47z\"/></svg>',\n empty:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"gsis-empty-desc gsis-empty-title\"><title id=\"gsis-empty-title\">Is Empty Icon</title><desc id=\"gsis-empty-desc\">A picture showing a dotted square.</desc><path d=\"M5 17h2v2H5zm8 0h2v2h-2zm-8-4h2v2H5zm12 4h2v2h-2zM13 5h2v2h-2zM9 17h2v2H9zm8-8h2v2h-2zm0 4h2v2h-2zm0-8h2v2h-2zM5 9h2v2H5zm0-4h2v2H5zm4 0h2v2H9z\"/></svg>',\n endsWith:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"enends-with-desc enends-with-title\"><title id=\"enends-with-title\">Ends With Icon</title><desc id=\"enends-with-desc\">A picture showing three dots followed by lowercase a.</desc><path d=\"M3 14.5h2v2H3zm8 0h2v2h-2zm-4 0h2v2H7zm13.8.3v-3A2.1 2.1 0 0020 10a3 3 0 00-2-.6 3 3 0 00-2 .6 1.7 1.7 0 00-.7 1.5h1.5a.8.8 0 01.3-.7 1.3 1.3 0 01.9-.3 1.3 1.3 0 01.9.4 1.1 1.1 0 01.3.8v.6H18a3.8 3.8 0 00-2.2.6 1.8 1.8 0 00-.8 1.5 2 2 0 00.6 1.6 2.3 2.3 0 001.6.6 2.1 2.1 0 001.2-.4 2.8 2.8 0 00.8-.8 4.3 4.3 0 00.1.5l.1.5H21a4.1 4.1 0 01-.2-.7 5.4 5.4 0 010-1zm-1.6-.5a1.5 1.5 0 01-.6.7 2 2 0 01-1 .2 1.1 1.1 0 01-.8-.2.8.8 0 01-.2-.6 1 1 0 01.3-.8 1.5 1.5 0 011.1-.3h1.2z\"/></svg>',\n equals:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"eoequals-desc eoequals-title\"><title id=\"eoequals-title\">Equals Icon</title><desc id=\"eoequals-desc\">A picture showing the equals sign.</desc><path d=\"M5 13.5h14v2H5zm0-5h14v2H5z\"/></svg>',\n false:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"gtis-false-desc gtis-false-title\"><title id=\"gtis-false-title\">Is False Icon</title><desc id=\"gtis-false-desc\">A picture showing an encircled X symbol.</desc><path d=\"M8 5a7 7 0 107 7 7 7 0 00-7-7zm4.31 9.79l-1.52 1.52L8 13.52l-2.79 2.79-1.52-1.52L6.48 12 3.69 9.21l1.52-1.52L8 10.48l2.79-2.79 1.52 1.52L9.52 12zM18 7a5 5 0 00-3 1.06 7.48 7.48 0 01.49 1 3.89 3.89 0 110 5.82 8.08 8.08 0 01-.49 1A5 5 0 1018 7z\"/><path d=\"M17.52 13.85l2.91-2.92-.78-.78-2.13 2.12-1.17-1.15-.38.37-.41.41.42.42L17 13.34l.52.51z\"/></svg>',\n lessThan:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"hhless-than-desc hhless-than-title\"><title id=\"hhless-than-title\">Less Than Icon</title><desc id=\"hhless-than-desc\">A picture showing the less-than symbol.</desc><path d=\"M6 12.54L18 19v-2.11L8.91 12 18 7.11V5L6 11.46v1.08z\"/></svg>',\n lessThanOrEqual:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"hiless-than-or-equal-desc hiless-than-or-equal-title\"><title id=\"hiless-than-or-equal-title\">Less Than or Equal Icon</title><desc id=\"hiless-than-or-equal-desc\">A picture showing the lass-than or equal symbol.</desc><path d=\"M5.99 19h12.02v2H5.99zM18 14.9L8.91 10 18 5.11V3L6 9.47v1.07l12 6.47V14.9z\"/></svg>',\n notEmpty:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"ionot-empty-desc ionot-empty-title\"><title id=\"ionot-empty-title\">Not Empty Icon</title><desc id=\"ionot-empty-desc\">A picture showing a crossed-out dotted square.</desc><path d=\"M5 9h2v2H5zm4 8h2v2H9zm4 0h2v2h-2zm4-8h2v2h-2zm0-4h2v2h-2zM5 17h2v2H5zm8-12h2v2h-2zm-8 8h2v2H5zm14 2v-2h-2v.47L18.53 15H19zm-8-8V5H9v.46L10.54 7H11zM2.76 1.76L1.5 3.06 20.97 22.5l1.26-1.26-8.89-8.89L2.76 1.76z\"/></svg>',\n doesNotEqual:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" aria-labelledby=\"ipnot-equal-desc ipnot-equal-title\"><title id=\"ipnot-equal-title\">Not Equal Icon</title><desc id=\"ipnot-equal-desc\">A picture showing a crossed-out equals symbol.</desc><path d=\"M17.37 4.71l-1.74-1-2.76 4.79H5v2h6.71l-1.73 3H5v2h3.82l-2.19 3.79 1.74 1 2.76-4.79H19v-2h-6.71l1.73-3H19v-2h-3.82l2.19-3.79z\"/></svg>',\n startsWith:\n '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\" width=\"512\" height=\"512\" aria-labelledby=\"lqstarts-with-desc lqstarts-with-title\"><title id=\"lqstarts-with-title\">Starts With Icon</title><desc id=\"lqstarts-with-desc\">A picture showing the uppercase letter A followed by three dots.</desc><path d=\"M5.9 7.5l-3.9 9h1.7l.7-1.8h4.1l.7 1.8H11l-3.9-9H5.9zM5 13.2l1.5-4.1L8 13.2H5zm7 1.3h2v2h-2v-2zm8 0h2v2h-2v-2zm-4 0h2v2h-2v-2z\"/></svg>',\n true: '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"512\" height=\"512\" aria-labelledby=\"gwis-true-desc gwis-true-title\"><title id=\"gwis-true-title\">is True Icon</title><desc id=\"gwis-true-desc\">A picture showing an encircled check mark symbol.</desc><path d=\"M19.44 14.22zm-2.88 0zm0 0L18 12.79l1.44 1.43.78-.78L18.79 12l1.43-1.44-.78-.78L18 11.21l-1.44-1.43-.78.78L17.21 12l-1.43 1.44.78.78z\"/><path d=\"M18 7a5 5 0 00-3 1.06 7.48 7.48 0 01.49 1 3.89 3.89 0 110 5.82 8.08 8.08 0 01-.49 1A5 5 0 1018 7zM8 5a7 7 0 107 7 7 7 0 00-7-7zm-.93 10.18l-3.38-3.37 1.13-1.12 2.25 2.25 4.11-4.12 1.13 1.12z\"/></svg>',\n filter:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 45 45\"><path d=\"M20 36v-3h8v3Zm-8-10.5v-3h24v3ZM6 15v-3h36v3Z\"/></svg>',\n close:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"m12.45 37.65-2.1-2.1L21.9 24 10.35 12.45l2.1-2.1L24 21.9l11.55-11.55 2.1 2.1L26.1 24l11.55 11.55-2.1 2.1L24 26.1Z\"/></svg>',\n refresh:\n '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 48 48\"><path d=\"M24 40q-6.65 0-11.325-4.675Q8 30.65 8 24q0-6.65 4.675-11.325Q17.35 8 24 8q4.25 0 7.45 1.725T37 14.45V8h3v12.7H27.3v-3h8.4q-1.9-3-4.85-4.85Q27.9 11 24 11q-5.45 0-9.225 3.775Q11 18.55 11 24q0 5.45 3.775 9.225Q18.55 37 24 37q4.15 0 7.6-2.375 3.45-2.375 4.8-6.275h3.1q-1.45 5.25-5.75 8.45Q29.45 40 24 40Z\"/></svg>',\n};\n\nexport function registerGridIcons() {\n for (const [name, svg] of Object.entries(internalIcons)) {\n registerIconFromText(name, svg, 'internal');\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-defined.d.ts","sourceRoot":"","sources":["../../../src/internal/is-defined.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,IAAI,WAAW,CAAC,CAAC,CAAC,CAEjF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-defined.js","sourceRoot":"","sources":["../../../src/internal/is-defined.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,SAAS,CAAI,KAA2B;IACtD,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC;AAC/C,CAAC","sourcesContent":["export function isDefined<T>(value: T | null | undefined): value is NonNullable<T> {\n return value !== undefined && value !== null;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../../../../src/internal/mixins/event-emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAEjC,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,SAAS,WAAW,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE9E,qBAAa,gBAAgB,CAAC,CAAC,C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O,EACP,aAAkC;QAElC,OAAO,IAAI,CAAC,aAAa,CACvB,IAAI,WAAW,CACb,IAAc,EACd,MAAM,CAAC,MAAM,CACX;YACE,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,IAAI;YACd,MAAM,EAAE,EAAE;SACX,EACD,aAAa,CACd,CACF,CACF,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { LitElement } from 'lit';\n\nexport type UnpackCustomEvent<T> = T extends CustomEvent<infer U> ? U : never;\n\nexport class EventEmitterBase<E> extends LitElement {\n public override addEventListener<K extends keyof M, M extends E & HTMLElementEventMap>(\n type: K,\n listener: (this: HTMLElement, ev: M[K]) => any,\n options?: boolean | AddEventListenerOptions,\n ): void;\n public override addEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | AddEventListenerOptions,\n ): void {\n super.addEventListener(type, listener, options);\n }\n\n public override removeEventListener<K extends keyof M, M extends E & HTMLElementEventMap>(\n type: K,\n listener: (this: HTMLElement, ev: M[K]) => any,\n options?: boolean | EventListenerOptions,\n ): void;\n public override removeEventListener(\n type: string,\n listener: EventListenerOrEventListenerObject,\n options?: boolean | EventListenerOptions,\n ): void {\n super.removeEventListener(type, listener, options);\n }\n public emitEvent<K extends keyof E, D extends UnpackCustomEvent<E[K]>>(\n type: K,\n eventInitDict?: CustomEventInit<D>,\n ): boolean {\n return this.dispatchEvent(\n new CustomEvent<D>(\n type as string,\n Object.assign(\n {\n bubbles: true,\n cancelable: false,\n composed: true,\n detail: {},\n },\n eventInitDict,\n ),\n ),\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize-case.d.ts","sourceRoot":"","sources":["../../../src/internal/normalize-case.ts"],"names":[],"mappings":"AAAA,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,OAAO,UAEpE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalize-case.js","sourceRoot":"","sources":["../../../src/internal/normalize-case.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,aAAa,CAAC,MAAc,EAAE,aAAuB;IACnE,OAAO,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;AACvD,CAAC","sourcesContent":["export function normalizeCase(string: string, caseSensitive?: boolean) {\n return caseSensitive ? string : string.toLowerCase();\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"part-map.d.ts","sourceRoot":"","sources":["../../../src/internal/part-map.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;CACpD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,UAI9C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"part-map.js","sourceRoot":"","sources":["../../../src/internal/part-map.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,WAAW,CAAC,KAAmB;IAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;SACtB,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;SACzB,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC","sourcesContent":["export interface PartNameInfo {\n readonly [name: string]: string | boolean | number;\n}\n\nexport function partNameMap(parts: PartNameInfo) {\n return Object.keys(parts)\n .filter(key => parts[key])\n .join(' ');\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/internal/register.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,GAAG,wBAAwB,GAAG;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;CACpB,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,aAAa,EAAE,YAAY,GAAE,aAAa,EAAO,QAQ7F"}
@@ -1,9 +0,0 @@
1
- export function registerComponent(component, dependencies = []) {
2
- for (const dependency of dependencies) {
3
- dependency.register();
4
- }
5
- if (!customElements.get(component.is)) {
6
- customElements.define(component.is, component);
7
- }
8
- }
9
- //# sourceMappingURL=register.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/internal/register.ts"],"names":[],"mappings":"AAKA,MAAM,UAAU,iBAAiB,CAAC,SAAwB,EAAE,eAAgC,EAAE;IAC5F,KAAK,MAAM,UAAU,IAAI,YAAY,EAAE;QACrC,UAAU,CAAC,QAAQ,EAAE,CAAC;KACvB;IAED,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE;QACrC,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;KAChD;AACH,CAAC","sourcesContent":["type ApexComponent = CustomElementConstructor & {\n is: string;\n register: Function;\n};\n\nexport function registerComponent(component: ApexComponent, dependencies: ApexComponent[] = []) {\n for (const dependency of dependencies) {\n dependency.register();\n }\n\n if (!customElements.get(component.is)) {\n customElements.define(component.is, component);\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tags.d.ts","sourceRoot":"","sources":["../../../src/internal/tags.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,aAAuB,CAAC;AAC7C,eAAO,MAAM,SAAS,oBAA8B,CAAC;AACrD,eAAO,MAAM,mBAAmB,wBAAkC,CAAC;AACnE,eAAO,MAAM,eAAe,oBAA8B,CAAC;AAC3D,eAAO,MAAM,YAAY,iBAA2B,CAAC;AACrD,eAAO,MAAM,aAAa,kBAA4B,CAAC;AACvD,eAAO,MAAM,mBAAmB,mBAA6B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tags.js","sourceRoot":"","sources":["../../../src/internal/tags.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,WAAoB,CAAC;AAC7C,MAAM,CAAC,MAAM,SAAS,GAAG,kBAA2B,CAAC;AACrD,MAAM,CAAC,MAAM,mBAAmB,GAAG,sBAA+B,CAAC;AACnE,MAAM,CAAC,MAAM,eAAe,GAAG,kBAA2B,CAAC;AAC3D,MAAM,CAAC,MAAM,YAAY,GAAG,eAAwB,CAAC;AACrD,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAyB,CAAC;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAA0B,CAAC","sourcesContent":["export const GRID_TAG = 'apex-grid' as const;\nexport const GRID_BODY = 'apex-virtualizer' as const;\nexport const GRID_HEADER_ROW_TAG = 'apex-grid-header-row' as const;\nexport const GRID_HEADER_TAG = 'apex-grid-header' as const;\nexport const GRID_ROW_TAG = 'apex-grid-row' as const;\nexport const GRID_CELL_TAG = 'apex-grid-cell' as const;\nexport const GRID_FILTER_ROW_TAG = 'apex-filter-row' as const;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,SAAS,CAAC;AACrD,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,sBAAsB,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,IAAI,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AAE9B;;GAEG;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,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAC3B;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;CAC9B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internal/types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactiveControllerHost, TemplateResult } from 'lit';\nimport type { ApexGrid } from '../components/grid.js';\nimport type ApexGridCell from '../components/cell.js';\nimport type ApexGridRow from '../components/row.js';\nimport type ApexGridHeader from '../components/header.js';\nimport type { SortComparer } from '../operations/sort/types.js';\n\nexport type NavigationState = 'previous' | 'current';\nexport type GridHost<T extends object> = ReactiveControllerHost & ApexGrid<T>;\n\n/**\n * Helper type for resolving keys of type T.\n */\nexport type Keys<T> = keyof T;\n\n/**\n * Helper type for resolving types of type T.\n */\nexport type BasePropertyType<T, K extends Keys<T> = Keys<T>> = T[K];\n\n/**\n * Helper type for resolving types of type T.\n */\nexport type PropertyType<T, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BasePropertyType<T, K>\n : never;\n\n/** The data for the current column. */\nexport type DataType = 'number' | 'string' | 'boolean';\n\n/**\n * Configures the sort behavior for the grid.\n */\nexport interface GridSortConfiguration {\n /**\n * Whether multiple sorting is enabled.\n */\n multiple: boolean;\n /**\n * Whether tri-state sorting is enabled.\n */\n triState: boolean;\n}\n\n/**\n * Extended sort configuration for a column.\n */\nexport interface BaseColumnSortConfiguration<T, K extends Keys<T> = Keys<T>> {\n /**\n * Whether the sort operations will be case sensitive.\n */\n caseSensitive?: boolean;\n /**\n * Custom comparer function for sort operations for this column.\n */\n comparer?: SortComparer<T, K>;\n}\n\n/**\n * See {@link BaseColumnSortConfiguration} for the full documentation.\n */\nexport type ColumnSortConfiguration<T, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseColumnSortConfiguration<T, K>\n : never;\n\n/**\n * Extended filter configuration for a column.\n */\nexport interface ColumnFilterConfiguration {\n /**\n * Whether the filter operations will be case sensitive.\n */\n caseSensitive?: boolean;\n}\n\n/** Configuration object for grid columns. */\nexport interface BaseColumnConfiguration<T extends object, K extends Keys<T> = Keys<T>> {\n /**\n * The field for from the data the this column will reference.\n */\n key: K;\n /**\n * The type of data this column will reference.\n *\n * Affects the default filter operands if the column is with filtering enabled.\n *\n * @remarks\n * If not passed, `string` is assumed to be the default type.\n *\n */\n type?: DataType;\n /**\n * Optional text to display in the column header. By default, the column key is used\n * to render the header text.\n */\n headerText?: string;\n /**\n * Width for the current column.\n *\n * Accepts most CSS units for controlling width.\n *\n * @remarks\n * If not passed, the column will try to size itself based on the number of other\n * columns and the total width of the grid.\n *\n */\n width?: string;\n /**\n * Whether the column is hidden or not.\n */\n hidden?: boolean;\n /**\n * Whether the the column can be resized or not.\n */\n resizable?: boolean;\n /**\n * Whether the column can be sorted or not.\n */\n sort?: ColumnSortConfiguration<T, K> | boolean;\n /**\n * Whether filter operation can be applied on the column or not.\n */\n filter?: ColumnFilterConfiguration | boolean;\n /**\n * Header template callback.\n */\n headerTemplate?: (params: ApexHeaderContext<T>) => TemplateResult | unknown;\n /**\n * Cell template callback.\n */\n cellTemplate?: (params: ApexCellContext<T, K>) => TemplateResult | unknown;\n}\n\n/**\n * See {@link BaseColumnConfiguration} for the full documentation.\n */\nexport type ColumnConfiguration<T extends object, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseColumnConfiguration<T, K>\n : never;\n\nexport interface ActiveNode<T> {\n column: Keys<T>;\n row: number;\n}\n\n/**\n * Context object for the column header template callback.\n */\nexport interface ApexHeaderContext<T extends object> {\n /**\n * The header element parent of the template.\n */\n parent: ApexGridHeader<T>;\n /**\n * The current configuration for the column.\n */\n column: ColumnConfiguration<T>;\n}\n\n/**\n * Context object for the row cell template callback.\n */\nexport interface BaseApexCellContext<T extends object, K extends Keys<T> = Keys<T>> {\n /**\n * The cell element parent of the template.\n */\n parent: ApexGridCell<T>;\n /**\n * The row element containing the cell.\n */\n row: ApexGridRow<T>;\n /**\n * The current configuration for the column.\n */\n column: ColumnConfiguration<T, K>;\n /**\n * The value from the data source for this cell.\n */\n value: PropertyType<T, K>;\n}\n\n/**\n * See {@link BaseApexCellContext} for the full documentation.\n */\nexport type ApexCellContext<T extends object, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseApexCellContext<T, K>\n : never;\n\n/**\n * The parameters passed to a {@link DataPipelineHook} callback.\n */\nexport type DataPipelineParams<T extends object> = {\n /**\n * The current data state of the grid.\n */\n data: T[];\n /**\n * The grid component itself.\n */\n grid: ApexGrid<T>;\n /**\n * The type of data operation being performed.\n */\n type: 'sort' | 'filter';\n};\n\n/**\n * Callback function for customizing data operations in the grid.\n */\nexport type DataPipelineHook<T extends object> = (\n state: DataPipelineParams<T>,\n) => T[] | Promise<T[]>;\n\n/**\n * Configuration for customizing the various data operations of the grid.\n */\nexport interface DataPipelineConfiguration<T extends object> {\n /**\n * Hook for customizing sort operations.\n */\n sort?: DataPipelineHook<T>;\n /**\n * Hook for customizing filter operations.\n */\n filter?: DataPipelineHook<T>;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/internal/utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAY,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG1E,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,EAChD,OAAO,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,GACrC,SAAS,CAOX;AAED,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,QAUtE;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,EAAE,OAExC;AAED,wBAAgB,oBAAoB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AC,CAAC;KACJ;AACH,CAAC;AAED,MAAM,UAAU,OAAO,CAAI,KAAc;IACvC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAmB,MAA8B;IACnF,8CAA8C;IAC9C,QAAQ,MAAM,CAAC,IAAI,EAAE;QACnB,KAAK,SAAS;YACZ,OAAO,eAAe,CAAC;QACzB,KAAK,QAAQ;YACX,OAAO,cAAc,CAAC;QACxB;YACE,OAAO,cAAc,CAAC;KACzB;AACH,CAAC","sourcesContent":["import { BooleanOperands } from '../operations/filter/operands/boolean.js';\nimport { NumberOperands } from '../operations/filter/operands/number.js';\nimport { StringOperands } from '../operations/filter/operands/string.js';\n\nimport type { StyleInfo } from 'lit/directives/style-map.js';\nimport type { ColumnConfiguration, DataType, GridHost } from './types.js';\n\n// TODO: Revise if this is needed\nexport function applyColumnWidths<T extends object>(\n columns: Array<ColumnConfiguration<T>>,\n): StyleInfo {\n return {\n 'grid-template-columns': columns\n .filter(each => !each.hidden)\n .map(({ width }) => width ?? 'minmax(136px, 1fr)')\n .join(' '),\n };\n}\n\nexport function autoGenerateColumns<T extends object>(grid: GridHost<T>) {\n if (grid.autoGenerate && grid.columns.length < 1) {\n const record = grid.data[0] ?? {};\n\n grid.columns = Object.entries(record).map(([key, value]) => {\n const type: DataType =\n typeof value === 'boolean' ? 'boolean' : typeof value === 'number' ? 'number' : 'string';\n return { key, type } as ColumnConfiguration<T>;\n });\n }\n}\n\nexport function asArray<T>(value: T | T[]) {\n return Array.isArray(value) ? value : [value];\n}\n\nexport function getFilterOperandsFor<T extends object>(column: ColumnConfiguration<T>) {\n // Check for custom class in the filter config\n switch (column.type) {\n case 'boolean':\n return BooleanOperands;\n case 'number':\n return NumberOperands;\n default:\n return StringOperands;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"watch.d.ts","sourceRoot":"","sources":["../../../src/internal/watch.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IACpB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,uBACjC,GAAG,QAAQ,MAAM,KAAG,GAAG,CAoBnD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"watch.js","sourceRoot":"","sources":["../../../src/internal/watch.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,KAAK,CAAC,QAAgB,EAAE,OAAsB;IAC5D,OAAO,CAAC,iBAAsB,EAAE,IAAY,EAAO,EAAE;QACnD,MAAM,EAAE,UAAU,EAAE,GAAG,iBAAiB,CAAC;QAEzC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,oBAAoB,EAAE,KAAK,EAAE,EAAE,OAAO,CAAiB,CAAC;QAElF,iBAAiB,CAAC,UAAU,GAAG,UAAU,YAA8B;YACrE,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAEpC,IAAI,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE;gBAC9B,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAEhC,IAAI,QAAQ,KAAK,QAAQ,EAAE;oBACzB,IAAI,CAAC,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,CAAA,IAAI,IAAI,CAAC,UAAU,EAAE;wBACrD,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;qBAC3C;iBACF;aACF;QACH,CAAC,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC","sourcesContent":["interface WatchOptions {\n waitUntilFirstUpdate?: boolean;\n}\n\nexport function watch(propName: string, options?: WatchOptions) {\n return (protoOrDescriptor: any, name: string): any => {\n const { willUpdate } = protoOrDescriptor;\n\n options = Object.assign({ waitUntilFirstUpdate: false }, options) as WatchOptions;\n\n protoOrDescriptor.willUpdate = function (changedProps: Map<string, any>) {\n willUpdate.call(this, changedProps);\n\n if (changedProps.has(propName)) {\n const oldValue = changedProps.get(propName);\n const newValue = this[propName];\n\n if (oldValue !== newValue) {\n if (!options?.waitUntilFirstUpdate || this.hasUpdated) {\n this[name].call(this, oldValue, newValue);\n }\n }\n }\n };\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/operations/base.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAEjD,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IACxE,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC;IAIxC,SAAS,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,aAAa,CAAC,EAAE,OAAO;aAIjD,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,EAAE;CAC/C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../src/operations/base.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAgB,aAAa;IAC/B,YAAY,CAAC,MAAS,EAAE,GAAM;QACtC,OAAO,MAAM,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IAES,WAAW,CAAW,KAAQ,EAAE,aAAuB;QAC/D,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,aAAa,CAAC,CAAC,CAAE,KAAK,CAAC,WAAW,EAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;IAC1F,CAAC;CAGF","sourcesContent":["import type { Keys } from '../internal/types.js';\n\nexport default abstract class DataOperation<T, K extends Keys<T> = Keys<T>> {\n protected resolveValue(record: T, key: K) {\n return record[key];\n }\n\n protected resolveCase<U = T[K]>(value: U, caseSensitive?: boolean) {\n return typeof value === 'string' && !caseSensitive ? (value.toLowerCase() as U) : value;\n }\n\n public abstract apply(...args: unknown[]): T[];\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"boolean.d.ts","sourceRoot":"","sources":["../../../../../src/operations/filter/operands/boolean.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;AAE1E,eAAO,MAAM,eAAe,gDA+B1B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"boolean.js","sourceRoot":"","sources":["../../../../../src/operations/filter/operands/boolean.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAK5D,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAuC;IACjF,GAAG,EAAE;QACH,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI;KACjB;IACD,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,KAAK,IAAI;KACjC;IACD,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,MAAM,KAAK,KAAK;KAClC;IACD,KAAK,EAAE;QACL,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC;KACpC;IACD,QAAQ,EAAE;QACR,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,WAAW;QAClB,KAAK,EAAE,IAAI;QACX,KAAK,EAAE,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC;KACnC;CACF,CAAC,CAAC","sourcesContent":["import { isDefined } from '../../../internal/is-defined.js';\nimport type { FilterOperands } from '../types.js';\n\nexport type BooleanKeys = 'all' | 'true' | 'false' | 'empty' | 'notEmpty';\n\nexport const BooleanOperands = Object.freeze<FilterOperands<boolean, BooleanKeys>>({\n all: {\n name: 'all',\n label: 'All',\n unary: true,\n logic: _ => true,\n },\n true: {\n name: 'true',\n label: 'True',\n unary: true,\n logic: target => target === true,\n },\n false: {\n name: 'false',\n label: 'False',\n unary: true,\n logic: target => target === false,\n },\n empty: {\n name: 'empty',\n label: 'Empty',\n unary: true,\n logic: target => !isDefined(target),\n },\n notEmpty: {\n name: 'notEmpty',\n label: 'Not empty',\n unary: true,\n logic: target => isDefined(target),\n },\n});\n"]}