apex-grid 1.0.0 → 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 +4 -11
  3. package/components/cell.js.map +1 -0
  4. package/{dist/src/components → components}/filter-row.d.ts +8 -9
  5. package/{dist/src/components → components}/filter-row.js +112 -114
  6. package/components/filter-row.js.map +1 -0
  7. package/{dist/src/components → components}/grid.d.ts +9 -9
  8. package/{dist/src/components → components}/grid.js +72 -148
  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 +20 -25
  12. package/components/header-row.js.map +1 -0
  13. package/{dist/src/components → components}/header.d.ts +5 -6
  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 +7 -10
  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 +5 -6
  26. package/controllers/dom.js +54 -0
  27. package/controllers/dom.js.map +1 -0
  28. package/{dist/src/controllers → controllers}/filter.d.ts +5 -6
  29. package/controllers/filter.js +105 -0
  30. package/controllers/filter.js.map +1 -0
  31. package/{dist/src/controllers → controllers}/navigation.d.ts +3 -4
  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 +5 -6
  41. package/{dist/src/controllers → controllers}/state.js +4 -7
  42. package/controllers/state.js.map +1 -0
  43. package/custom-elements.json +1229 -980
  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 +2 -3
  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 +1 -2
  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 +4 -5
  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 -2191
  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 -1280
  182. package/dist/docs/classes/ApexGrid.html +0 -301
  183. package/dist/docs/index.html +0 -88
  184. package/dist/docs/interfaces/ApexFilteredEvent.html +0 -78
  185. package/dist/docs/interfaces/ApexFilteringEvent.html +0 -90
  186. package/dist/docs/interfaces/ApexGridEventMap.html +0 -101
  187. package/dist/docs/interfaces/ApexHeaderContext.html +0 -78
  188. package/dist/docs/interfaces/BaseApexCellContext.html +0 -94
  189. package/dist/docs/interfaces/BaseColumnConfiguration.html +0 -170
  190. package/dist/docs/interfaces/BaseColumnSortConfiguration.html +0 -80
  191. package/dist/docs/interfaces/BaseFilterExpression.html +0 -106
  192. package/dist/docs/interfaces/BaseSortExpression.html +0 -98
  193. package/dist/docs/interfaces/ColumnFilterConfiguration.html +0 -66
  194. package/dist/docs/interfaces/DataPipelineConfiguration.html +0 -78
  195. package/dist/docs/interfaces/GridSortConfiguration.html +0 -73
  196. package/dist/docs/modules.html +0 -107
  197. package/dist/docs/types/ApexCellContext.html +0 -79
  198. package/dist/docs/types/BasePropertyType.html +0 -79
  199. package/dist/docs/types/BaseSortComparer.html +0 -94
  200. package/dist/docs/types/ColumnConfiguration.html +0 -79
  201. package/dist/docs/types/ColumnSortConfiguration.html +0 -79
  202. package/dist/docs/types/DataPipelineHook.html +0 -90
  203. package/dist/docs/types/DataPipelineParams.html +0 -92
  204. package/dist/docs/types/DataType.html +0 -72
  205. package/dist/docs/types/FilterCriteria.html +0 -76
  206. package/dist/docs/types/FilterExpression.html +0 -79
  207. package/dist/docs/types/Keys.html +0 -77
  208. package/dist/docs/types/PropertyType.html +0 -79
  209. package/dist/docs/types/SortComparer.html +0 -79
  210. package/dist/docs/types/SortExpression.html +0 -79
  211. package/dist/docs/types/SortState.html +0 -77
  212. package/dist/docs/types/SortingDirection.html +0 -74
  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 -143
  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,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
- this.host = host;
12
- _SortController_instances.add(this);
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":";;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAS/C,MAAM,OAAO,cAAc;IACzB,YAAsB,IAAiB;QAAjB,SAAI,GAAJ,IAAI,CAAa;;QAIhC,UAAK,GAAiB,IAAI,GAAG,EAAE,CAAC;QAHrC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAChC,CAAC;IAgEM,KAAK,CAAC,mBAAmB,CAAC,MAA8B;QAC7D,MAAM,UAAU,GAAG,IA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zB,CAAC,6DAEQ,GAAsB;IAC7B,OAAO,uBAAA,IAAI,qEAAgB;QACzB,CAAC,CAAC,GAAG,KAAK,WAAW;YACnB,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,GAAG,KAAK,YAAY;gBACtB,CAAC,CAAC,MAAM;gBACR,CAAC,CAAC,WAAW;QACf,CAAC,CAAC,GAAG,KAAK,WAAW;YACrB,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,WAAW,CAAC;AAClB,CAAC,+EAEiB,MAAyB;IACzC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACtE,CAAC,6EAEgB,MAAyB;IACxC,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;AACnD,CAAC,yEAEc,UAA6B;IAC1C,UAAU,CAAC,SAAS,KAAK,MAAM;QAC7B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC;QAC5B,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,GAAG,UAAU,EAAE,CAAC,CAAC;AACxD,CAAC","sourcesContent":["import { ReactiveController } from 'lit';\nimport { PIPELINE } from '../internal/constants.js';\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,CAAC,CAAC,CAAC;IAEtC,IAAW,MAAM,IAIO,UAAU,CAAC,CAAC,CAAC,CAFpC;IAED,IAAW,MAAM,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,EAEpC;IAED,IAAW,SAAS,kDAGnB;IAED,IAAW,eAAe,gDAGzB;gBAEkB,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAKpC,SAAS,CAAC,IAAI;IAOP,aAAa;IAEb,UAAU,IAAI,IAAI;CAI1B;AAED,eAAO,MAAM,gBAAgB;;CAA6D,CAAC"}
@@ -1 +0,0 @@
1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AC;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,EAAuB,eAAe,EAAE,MAAM,YAAY,CAAC;AAInF,eAAO,MAAM,QAAQ,aAAa,CAAC;AACnC,eAAO,MAAM,mBAAmB,gBAA0B,CAAC;AAC3D,eAAO,MAAM,oBAAoB,kBAA4B,CAAC;AAE9D,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,CAA0C,CAAC;AAC/F,eAAO,MAAM,qBAAqB,6LAOhC,CAAC;AACH,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,eAAe,EAAE,UAAU,CAAC,GAAG,CAAC,CAGjE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/internal/constants.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;AAE3B,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAuB,CAAC;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAyB,CAAC;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,aAAa,GAA8B,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AAC/F,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAA2B;IAC3E,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,KAAK;IACX,MAAM,EAAE,KAAK;CACd,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA0C,IAAI,GAAG,CAAC;IAC7E,CAAC,UAAU,EAAE,aAAa,CAAC;IAC3B,CAAC,SAAS,EAAE,aAAa,CAAC;CAC3B,CAAC,CAAC","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,CAAE,SAAQ,UAAU;IACjC,gBAAgB,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,mBAAmB,EACnF,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAC9C,OAAO,CAAC,EAAE,OAAO,GAAG,uBAAuB,GAC1C,IAAI;IASS,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,SAAS,CAAC,GAAG,mBAAmB,EACtF,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,EAC9C,OAAO,CAAC,EAAE,OAAO,GAAG,oBAAoB,GACvC,IAAI;IAQA,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,SAAS,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACnE,IAAI,EAAE,CAAC,EACP,aAAa,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,GACjC,OAAO;CAgBX"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"event-emitter.js","sourceRoot":"","sources":["../../../../src/internal/mixins/event-emitter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAIjC,MAAM,OAAO,gBAAoB,SAAQ,UAAU;IAMjC,gBAAgB,CAC9B,IAAY,EACZ,QAA4C,EAC5C,OAA2C;QAE3C,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IAClD,CAAC;IAOe,mBAAmB,CACjC,IAAY,EACZ,QAA4C,EAC5C,OAAwC;QAExC,KAAK,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;IACrD,CAAC;IACM,SAAS,CACd,IAAO,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;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GACxE,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,GACtB,KAAK,CAAC;AAEV,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AC,CAAC,EAAE,CAAC,CAAC,CAAC;IAClC;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAC1F,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GACzB,KAAK,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,MAAM,IAAI;IACjD;;OAEG;IACH,IAAI,EAAE,CAAC,EAAE,CAAC;IACV;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,QAAQ,CAAC;CACzB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,CAC/C,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,KACzB,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC,SAAS,MAAM;IACzD;;OAEG;IACH,IAAI,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,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,sZAUpF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/internal/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAKzE,iCAAiC;AACjC,MAAM,UAAU,iBAAiB,CAC/B,OAAsC;IA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O,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"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../../../src/operations/filter/operands/number.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,UAAU,GAClB,QAAQ,GACR,cAAc,GACd,aAAa,GACb,UAAU,GACV,oBAAoB,GACpB,iBAAiB,GACjB,OAAO,GACP,UAAU,CAAC;AAEf,eAAO,MAAM,cAAc,8CAiDzB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"number.js","sourceRoot":"","sources":["../../../../../src/operations/filter/operands/number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAa5D,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAqC;IAC9E,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,KAAK,IAAI;KACzC;IACD,YAAY,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,KAAK;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\nimport type { FilterOperands } from '../types.js';\n\nexport type NumberKeys =\n | 'equals'\n | 'doesNotEqual'\n | 'greaterThan'\n | 'lessThan'\n | 'greaterThanOrEqual'\n | 'lessThanOrEqual'\n | 'empty'\n | 'notEmpty';\n\nexport const NumberOperands = Object.freeze<FilterOperands<number, NumberKeys>>({\n equals: {\n name: 'equals',\n label: 'Equals',\n unary: false,\n logic: (target, term) => target === term,\n },\n doesNotEqual: {\n name: 'doesNotEqual',\n label: 'Does not equal',\n unary: false,\n logic: (target, term) => target !== term,\n },\n greaterThan: {\n name: 'greaterThan',\n label: 'Greater than',\n unary: false,\n logic: (target, term) => target > term,\n },\n lessThan: {\n name: 'lessThan',\n label: 'Less than',\n unary: false,\n logic: (target, term) => target < term,\n },\n greaterThanOrEqual: {\n name: 'greaterThanOrEqual',\n label: 'Greater than or equal',\n unary: false,\n logic: (target, term) => target >= term,\n },\n lessThanOrEqual: {\n name: 'lessThanOrEqual',\n label: 'Less than or equal',\n unary: false,\n logic: (target, term) => target <= term,\n },\n empty: {\n name: 'empty',\n label: 'Empty',\n unary: true,\n logic: target => !isDefined(target) || isNaN(target),\n },\n notEmpty: {\n name: 'notEmpty',\n label: 'Not empty',\n unary: true,\n logic: target => isDefined(target) && !isNaN(target),\n },\n});\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../../../../src/operations/filter/operands/string.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,UAAU,GAClB,UAAU,GACV,gBAAgB,GAChB,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,cAAc,GACd,OAAO,GACP,UAAU,CAAC;AAEf,eAAO,MAAM,cAAc,8CA0DzB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"string.js","sourceRoot":"","sources":["../../../../../src/operations/filter/operands/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE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AI,EAAE,QAAQ;QACd,KAAK,EAAE,QAAQ;QACf,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,CAC3C,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,aAAa,CAAC,UAAU,EAAE,aAAa,CAAC;KACpF;IAED,YAAY,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,KAAK,EAAE,gBAAgB;QACvB,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,EAAE,EAAE,CAC3C,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,KAAK,aAAa,CAAC,UAAU,EAAE,aAAa,CAAC;KACpF;IAED,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,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;KACzD;IAED,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,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;KACxD;CACF,CAAC,CAAC","sourcesContent":["import { isDefined } from '../../../internal/is-defined.js';\nimport { normalizeCase } from '../../../internal/normalize-case.js';\nimport type { FilterOperands } from '../types.js';\n\nexport type StringKeys =\n | 'contains'\n | 'doesNotContain'\n | 'startsWith'\n | 'endsWith'\n | 'equals'\n | 'doesNotEqual'\n | 'empty'\n | 'notEmpty';\n\nexport const StringOperands = Object.freeze<FilterOperands<string, StringKeys>>({\n contains: {\n name: 'contains',\n label: 'Contains',\n unary: false,\n logic: (target, term, caseSensitive?) =>\n normalizeCase(target, caseSensitive).includes(normalizeCase(term, caseSensitive)),\n },\n doesNotContain: {\n name: 'doesNotContain',\n label: 'Does not contain',\n unary: false,\n logic: (target, term, caseSensitive?) =>\n !normalizeCase(target, caseSensitive).includes(normalizeCase(term, caseSensitive)),\n },\n startsWith: {\n name: 'startsWith',\n label: 'Starts with',\n unary: false,\n logic: (target, searchTerm, caseSensitive?) =>\n normalizeCase(target, caseSensitive).startsWith(normalizeCase(searchTerm, caseSensitive)),\n },\n endsWith: {\n name: 'endsWith',\n label: 'Ends with',\n unary: false,\n logic: (target, searchTerm, caseSensitive?) =>\n normalizeCase(target, caseSensitive).endsWith(normalizeCase(searchTerm, caseSensitive)),\n },\n equals: {\n name: 'equals',\n label: 'Equals',\n unary: false,\n logic: (target, searchTerm, caseSensitive) =>\n normalizeCase(target, caseSensitive) === normalizeCase(searchTerm, caseSensitive),\n },\n\n doesNotEqual: {\n name: 'doesNotEqual',\n label: 'Does not equal',\n unary: false,\n logic: (target, searchTerm, caseSensitive) =>\n normalizeCase(target, caseSensitive) !== normalizeCase(searchTerm, caseSensitive),\n },\n\n empty: {\n name: 'empty',\n label: 'Empty',\n unary: true,\n logic: target => !isDefined(target) || target.length < 1,\n },\n\n notEmpty: {\n name: 'notEmpty',\n label: 'Not empty',\n unary: true,\n logic: target => isDefined(target) && target.length > 0,\n },\n});\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/operations/filter/state.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,qBAAa,WAAW,CAAC,CAAC;IACxB,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAa;IAEnE,IAAW,KAAK,YAE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KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,GAAG,CAAC,GAAY;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAEM,MAAM,CAAC,GAAY;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAEM,KAAK;QACV,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;IAEM,GAAG,CAAC,UAA+B;;QACxC,IAAI,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;YAC5B,MAAA,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,0CAAE,GAAG,CAAC,UAAU,CAAC,CAAC;YAC1C,OAAO;SACR;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,IAAI,oBAAoB,CAAI,UAAU,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;IAC9F,CAAC;CACF","sourcesContent":["import { FilterExpressionTree } from './tree.js';\nimport type { Keys } from '../../internal/types.js';\nimport type { FilterExpression } from './types.js';\n\nexport class FilterState<T> {\n protected state: Map<Keys<T>, FilterExpressionTree<T>> = new Map();\n\n public get empty() {\n return this.state.size < 1;\n }\n\n public get keys() {\n return Array.from(this.state.keys());\n }\n\n public get values() {\n return Array.from(this.state.values());\n }\n\n public get ands() {\n return this.values.map(each => each.ands).flat();\n }\n\n public get ors() {\n return this.values.map(each => each.ors).flat();\n }\n\n public has(key: Keys<T>) {\n return this.state.has(key);\n }\n\n public get(key: Keys<T>) {\n return this.state.get(key);\n }\n\n public delete(key: Keys<T>) {\n return this.state.delete(key);\n }\n\n public clear() {\n this.state.clear();\n }\n\n public set(expression: FilterExpression<T>) {\n if (this.has(expression.key)) {\n this.get(expression.key)?.add(expression);\n return;\n }\n\n this.state.set(expression.key, new FilterExpressionTree<T>(expression.key).add(expression));\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../../../../src/operations/filter/tree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,qBAAa,oBAAoB,CAAC,CAAC;IAGd,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAF/B,SAAS,CAAC,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAM;gBAEjC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;IAE/B,IAAW,KAAK,YAEf;IAED,IAAW,MAAM,WAEhB;IAED,IAAW,GAAG,mCAEb;IAED,IAAW,IAAI,mCAEd;IAED,IAAW,GAAG,mCAEb;IAEM,GAAG,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAInC,GAAG,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAanC,MAAM,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAK7C,SAAS,CAAE,QAAQ;IAMZ,CAAC,MAAM,CAAC,QAAQ,CAAC;CAGzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"tree.js","sourceRoot":"","sources":["../../../../src/operations/filter/tree.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,oBAAoB;IAG/B,YAAmB,GAAY;QAAZ,QAAG,GAAH,GAAG,CAAS;QAFrB,aAAQ,GAA+B,EAAE,CAAC;IAElB,CAAC;IAEnC,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAClC,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAC9B,CAAC;IAED,I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';\nimport type { FilterExpression } from './types.js';\n\nexport class FilterExpressionTree<T> {\n protected operands: Array<FilterExpression<T>> = [];\n\n constructor(public key: Keys<T>) {}\n\n public get empty() {\n return this.operands.length < 1;\n }\n\n public get length() {\n return this.operands.length;\n }\n\n public get all() {\n return Array.from(this.iterator());\n }\n\n public get ands() {\n return this.operands.filter(each => each.criteria === 'and');\n }\n\n public get ors() {\n return this.operands.filter(each => each.criteria === 'or');\n }\n\n public has(expression: FilterExpression<T>) {\n return this.operands.includes(expression);\n }\n\n public add(expression: FilterExpression<T>) {\n if (!expression.criteria) {\n expression.criteria = 'and';\n }\n\n if (this.operands.includes(expression)) {\n return this;\n }\n\n this.operands.push(expression);\n return this;\n }\n\n public remove(expression: FilterExpression<T>) {\n this.operands = this.operands.filter(each => each !== expression);\n return this;\n }\n\n protected *iterator() {\n for (const operand of this.operands) {\n yield operand;\n }\n }\n\n public [Symbol.iterator]() {\n return this.iterator();\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/operations/filter/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,IAAI,CAAC;AAE1C,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,CACpC,MAAM,EAAE,CAAC,EACT,UAAU,EAAE,CAAC,EACb,aAAa,CAAC,EAAE,OAAO,KACpB,OAAO,CAAC;AAEb,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;CAChC;AAED,MAAM,MAAM,cAAc,CAAC,QAAQ,EAAE,QAAQ,SAAS,MAAM,IAAI;KAC7D,GAAG,IAAI,QAAQ,GAAG,eAAe,CAAC,QAAQ,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAClE;;OAEG;IACH,GAAG,EAAE,CAAC,CAAC;IACP;;OAEG;IACH,SAAS,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAErD;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,EAAE,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,GAC5E,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC1B,KAAK,CAAC;AAEV,MAAM,MAAM,WAAW,CAAC,IAAI,IAAI,IAAI,SAAS,MAAM,GAC/C,MAAM,OAAO,cAAc,GAC3B,IAAI,SAAS,MAAM,GACnB,MAAM,OAAO,cAAc,GAC3B,IAAI,SAAS,OAAO,GACpB,MAAM,OAAO,eAAe,GAC5B,IAAI,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/operations/filter/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Keys } from '../../internal/types.js';\nimport type { BooleanOperands } from './operands/boolean.js';\nimport type { NumberOperands } from './operands/number.js';\nimport type { StringOperands } from './operands/string.js';\n\n/**\n * Controls how a data record should resolve in a filter operation:\n * - `'and'` - the record must pass all the conditions.\n * - `'or'` - the record must pass at least one condition.\n */\nexport type FilterCriteria = 'and' | 'or';\n\nexport type FilterOperationLogic<T> = (\n target: T,\n searchTerm: T,\n caseSensitive?: boolean,\n) => boolean;\n\nexport interface FilterOperation<T> {\n name: string;\n label?: string;\n unary: boolean;\n logic: FilterOperationLogic<T>;\n}\n\nexport type FilterOperands<DataType, Operands extends string> = {\n [key in Operands]: FilterOperation<DataType>;\n};\n\n/**\n * Represents a filter operation for a given column.\n */\nexport interface BaseFilterExpression<T, K extends Keys<T> = Keys<T>> {\n /**\n * The target column for the filter operation.\n */\n key: K;\n /**\n * The filter function which will be executed against the data records.\n */\n condition: FilterOperation<T[K]> | OperandKeys<T[K]>;\n\n /**\n * The filtering value used in the filter condition function.\n *\n * @remarks\n * Optional for unary conditions.\n */\n searchTerm?: T[K];\n /**\n * Dictates how this expression should resolve in the filter operation in relation to\n * other expressions.\n */\n criteria?: FilterCriteria;\n /**\n * Whether the sort operation should be case sensitive.\n *\n * @remarks\n * If not provided, the value is resolved based on the column filter configuration (if any).\n */\n caseSensitive?: boolean;\n}\n\n/**\n * See {@link BaseFilterExpression} for the full documentation.\n */\nexport type FilterExpression<T, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseFilterExpression<T, K>\n : never;\n\nexport type OperandKeys<Type> = Type extends number\n ? keyof typeof NumberOperands\n : Type extends string\n ? keyof typeof StringOperands\n : Type extends boolean\n ? keyof typeof BooleanOperands\n : Type;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/operations/filter.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB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EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,CAAC,EAClC,EAAE,CACH,CAAC;aACH;SACF;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACxD,CAAC;IAEM,KAAK,CAAC,IAAS,EAAE,KAAqB;QAC3C,IAAI,KAAK,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QAE7B,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;QAC5B,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC;IAC9D,CAAC;CACF","sourcesContent":["import DataOperation from './base.js';\nimport type { FilterState } from './filter/state.js';\nimport type { FilterExpression, FilterOperation } from './filter/types.js';\n\nexport default class FilterDataOperation<T extends object> extends DataOperation<T> {\n protected resolveFilter(record: T, expr: FilterExpression<T>) {\n const condition = expr.condition as FilterOperation<T>;\n return condition.logic(\n // XXX: Types\n // @ts-expect-error - resolve\n this.resolveValue(record, expr.key),\n expr.searchTerm,\n expr.caseSensitive,\n );\n }\n\n protected match(record: T, ands: FilterExpression<T>[], ors: FilterExpression<T>[]): boolean {\n for (const or of ors) {\n if (this.resolveFilter(record, or)) {\n return this.match(\n record,\n ands.filter(f => f.key !== or.key),\n [],\n );\n }\n }\n return ands.every(f => this.resolveFilter(record, f));\n }\n\n public apply(data: T[], state: FilterState<T>): T[] {\n if (state.empty) return data;\n\n const { ands, ors } = state;\n return data.filter(record => this.match(record, ands, ors));\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/operations/sort/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CA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AC,CAAC,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/operations/sort/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Keys } from '../../internal/types.js';\n\n/**\n * Sort direction for a given sort expression.\n *\n * @remarks\n * `none` is used\n */\nexport type SortingDirection = 'ascending' | 'descending' | 'none';\n\n/**\n * Custom comparer function for a given column used when sorting is performed.\n */\nexport type BaseSortComparer<T, K extends Keys<T> = Keys<T>> = (a: T[K], b: T[K]) => number;\n\n/**\n * See {@link BaseSortComparer} for the full documentation.\n */\nexport type SortComparer<T, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseSortComparer<T, K>\n : never;\n\n/**\n * Represents a sort operation for a given column.\n */\nexport interface BaseSortExpression<T, K extends Keys<T> = Keys<T>> {\n /**\n * The target column.\n */\n key: K;\n /**\n * Sort direction for this operation.\n */\n direction: SortingDirection;\n /**\n * Whether the sort operation should be case sensitive.\n *\n * @remarks\n * If not provided, the value is resolved based on the column sort configuration (if any).\n */\n caseSensitive?: boolean;\n /**\n * Custom comparer function for this operation.\n *\n * @remarks\n * If not provided, the value is resolved based on the column sort configuration (if any).\n */\n comparer?: SortComparer<T, K>;\n}\n\n/**\n * See {@link BaseSortExpression} for the full documentation.\n */\nexport type SortExpression<T, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseSortExpression<T, K>\n : never;\n\n/** Represents the sort state of the grid. */\nexport type SortState<T> = Map<Keys<T>, SortExpression<T>>;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sort.d.ts","sourceRoot":"","sources":["../../../src/operations/sort.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,WAAW,CAAC;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,iBAAiB,CAAC,CAAC,CAAE,SAAQ,aAAa,CAAC,CAAC,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C,EAAE,aAAa,CAAC,CAAC;QACzE,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,aAAa,CAAC,CAAC;QAE1E,8BAA8B;QAC9B,OAAO,CACL,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAE,GAAG,CAAC,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,CAAQ,EAAE,CAAQ,CAAC,mCAAI,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAC5F,CAAC;IACJ,CAAC;IAEM,KAAK,CAAC,IAAS,EAAE,KAAmB;QACzC,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,EAC5C,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;QAE9B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACjB,IAAI,CAAC,GAAG,CAAC,EACP,MAAM,GAAG,CAAC,CAAC;YAEb,OAAO,CAAC,GAAG,MAAM,IAAI,CAAC,MAAM,EAAE;gBAC5B,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;gBACnD,CAAC,EAAE,CAAC;aACL;YAED,OAAO,MAAM,CAAC;QAChB,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import DataOperation from './base.js';\nimport type { SortExpression, SortState } from './sort/types.js';\n\nexport default class SortDataOperation<T> extends DataOperation<T> {\n protected orderBy = new Map(\n Object.entries({\n ascending: 1,\n descending: -1,\n }),\n );\n\n protected compareValues<U>(first: U, second: U) {\n if (typeof first === 'string' && typeof second === 'string') {\n return first.localeCompare(second);\n }\n return first > second ? 1 : first < second ? -1 : 0;\n }\n\n protected compareObjects(first: T, second: T, expression: SortExpression<T>) {\n const { direction, key, caseSensitive, comparer } = expression;\n\n const a = this.resolveCase(this.resolveValue(first, key), caseSensitive);\n const b = this.resolveCase(this.resolveValue(second, key), caseSensitive);\n\n // TODO: Remove casting as any\n return (\n this.orderBy.get(direction)! * (comparer?.(a as any, b as any) ?? this.compareValues(a, b))\n );\n }\n\n public apply(data: T[], state: SortState<T>) {\n const expressions = Array.from(state.values()),\n length = expressions.length;\n\n data.sort((a, b) => {\n let i = 0,\n result = 0;\n\n while (i < length && !result) {\n result = this.compareObjects(a, b, expressions[i]);\n i++;\n }\n\n return result;\n });\n\n return data;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"body-cell-styles.css.d.ts","sourceRoot":"","sources":["../../../../src/styles/body-cell/body-cell-styles.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAoEjB,CAAC"}
@@ -1,71 +0,0 @@
1
- import { css } from 'lit';
2
- export const styles = css `/* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */
3
- :host {
4
- --is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);
5
- --is-medium:
6
- min(
7
- clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1),
8
- clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1)
9
- );
10
- --is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);
11
- --component-size: 3;
12
- }
13
-
14
- :host {
15
- position: relative;
16
- display: -webkit-inline-box;
17
- display: -ms-inline-flexbox;
18
- display: inline-flex;
19
- -webkit-box-flex: 1;
20
- -ms-flex: 1 0 0px;
21
- flex: 1 0 0;
22
- -webkit-box-align: center;
23
- -ms-flex-align: center;
24
- align-items: center;
25
- padding: 0 max(var(--is-large, 1) * max(1.5rem, -1 * 1.5rem), var(--is-medium, 1) * max(1rem, -1 * 1rem), var(--is-small, 1) * max(0.5rem, -1 * 0.5rem));
26
- color: inherit;
27
- border-right: var(--igx-row-border-width, var(--row-border-width)) solid transparent;
28
- font-size: 0.8125rem;
29
- overflow-wrap: anywhere;
30
- }
31
- :host:last-of-type {
32
- border-right: 0;
33
- }
34
-
35
- :host([active]) {
36
- outline: none;
37
- -webkit-box-shadow: inset 0 0 0 0.0625rem var(--igx-cell-active-border-color, var(--cell-active-border-color));
38
- box-shadow: inset 0 0 0 0.0625rem var(--igx-cell-active-border-color, var(--cell-active-border-color));
39
- }
40
-
41
- :host(:last-child) {
42
- -webkit-border-end: none;
43
- border-inline-end: none;
44
- }
45
-
46
- igc-input {
47
- position: absolute;
48
- left: 0;
49
- height: calc(100% - 0.0625rem * 2);
50
- width: 100%;
51
- }
52
- igc-input::part(container), igc-input::part(input) {
53
- border-color: transparent;
54
- -webkit-box-shadow: none;
55
- box-shadow: none;
56
- height: 100%;
57
- }
58
-
59
- igc-input::part(container), igc-input::part(input),
60
- igc-select::part(container),
61
- igc-select::part(input) {
62
- background: inherit;
63
- color: inherit;
64
- font-size: 0.8125rem;
65
- }
66
- igc-input::part(helper-text)::after, igc-input::part(container)::after,
67
- igc-select::part(helper-text)::after,
68
- igc-select::part(container)::after {
69
- display: none;
70
- }`;
71
- //# sourceMappingURL=body-cell-styles.css.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"body-cell-styles.css.js","sourceRoot":"","sources":["../../../../src/styles/body-cell/body-cell-styles.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoEvB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`/* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */\n:host {\n --is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);\n --is-medium:\n min(\n clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1),\n clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1)\n );\n --is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);\n --component-size: 3;\n}\n\n:host {\n position: relative;\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -webkit-box-flex: 1;\n -ms-flex: 1 0 0px;\n flex: 1 0 0;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n padding: 0 max(var(--is-large, 1) * max(1.5rem, -1 * 1.5rem), var(--is-medium, 1) * max(1rem, -1 * 1rem), var(--is-small, 1) * max(0.5rem, -1 * 0.5rem));\n color: inherit;\n border-right: var(--igx-row-border-width, var(--row-border-width)) solid transparent;\n font-size: 0.8125rem;\n overflow-wrap: anywhere;\n}\n:host:last-of-type {\n border-right: 0;\n}\n\n:host([active]) {\n outline: none;\n -webkit-box-shadow: inset 0 0 0 0.0625rem var(--igx-cell-active-border-color, var(--cell-active-border-color));\n box-shadow: inset 0 0 0 0.0625rem var(--igx-cell-active-border-color, var(--cell-active-border-color));\n}\n\n:host(:last-child) {\n -webkit-border-end: none;\n border-inline-end: none;\n}\n\nigc-input {\n position: absolute;\n left: 0;\n height: calc(100% - 0.0625rem * 2);\n width: 100%;\n}\nigc-input::part(container), igc-input::part(input) {\n border-color: transparent;\n -webkit-box-shadow: none;\n box-shadow: none;\n height: 100%;\n}\n\nigc-input::part(container), igc-input::part(input),\nigc-select::part(container),\nigc-select::part(input) {\n background: inherit;\n color: inherit;\n font-size: 0.8125rem;\n}\nigc-input::part(helper-text)::after, igc-input::part(container)::after,\nigc-select::part(helper-text)::after,\nigc-select::part(container)::after {\n display: none;\n}`;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"body-row-styles.css.d.ts","sourceRoot":"","sources":["../../../../src/styles/body-row/body-row-styles.css.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAmCjB,CAAC"}
@@ -1,38 +0,0 @@
1
- import { css } from 'lit';
2
- export const styles = css `/* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */ /* stylelint-disable max-line-length */
3
- :host {
4
- --is-large: clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-large, 3), 1);
5
- --is-medium:
6
- min(
7
- clamp(0, (var(--component-size, 1) + 1) - var(--ig-size-medium, 2), 1),
8
- clamp(0, var(--ig-size-large, 3) - var(--component-size, 1), 1)
9
- );
10
- --is-small: clamp(0, var(--ig-size-medium) - var(--component-size, 1), 1);
11
- --component-size: 3;
12
- }
13
-
14
- :host {
15
- display: grid;
16
- width: 100%;
17
- min-height: max(var(--is-large, 1) * max(3.125rem, -1 * 3.125rem), var(--is-medium, 1) * max(2.125rem, -1 * 2.125rem), var(--is-small, 1) * max(1.5rem, -1 * 1.5rem));
18
- -webkit-border-after: var(--igx-row-border-width, var(--header-border-width)) var(--igx-row-border-style, var(--header-border-style)) var(--igx-row-border-color, var(--header-border-color));
19
- border-block-end: var(--igx-row-border-width, var(--header-border-width)) var(--igx-row-border-style, var(--header-border-style)) var(--igx-row-border-color, var(--header-border-color));
20
- background: var(--igx-row-odd-background, var(--row-odd-background));
21
- color: var(--igx-row-odd-text-color, var(--row-odd-text-color));
22
- z-index: var(--z-index-base);
23
- }
24
-
25
- :host(:last-of-type) {
26
- border-bottom: 0;
27
- }
28
-
29
- :host(:nth-of-type(even)) {
30
- background: var(--igx-row-even-background, var(--row-even-background));
31
- color: var(--igx-row-even-text-color, var(--row-even-text-color));
32
- }
33
-
34
- :host(:hover) {
35
- background: var(--igx-row-hover-background, var(--row-hover-background));
36
- color: var(--igx-row-hover-text-color, var(--row-hover-text-color));
37
- }`;
38
- //# sourceMappingURL=body-row-styles.css.js.map