apex-grid 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (453) hide show
  1. package/LICENSE +76 -5
  2. package/README.md +520 -10
  3. package/components/cell.d.ts +74 -0
  4. package/components/cell.js +376 -0
  5. package/components/cell.js.map +1 -0
  6. package/{dist/src/components → components}/filter-row.d.ts +13 -12
  7. package/components/filter-row.js +396 -0
  8. package/components/filter-row.js.map +1 -0
  9. package/components/grid.d.ts +1173 -0
  10. package/components/grid.js +620 -0
  11. package/components/grid.js.map +1 -0
  12. package/components/header-row.d.ts +43 -0
  13. package/components/header-row.js +205 -0
  14. package/components/header-row.js.map +1 -0
  15. package/{dist/src/components → components}/header.d.ts +11 -5
  16. package/components/header.js +263 -0
  17. package/components/header.js.map +1 -0
  18. package/components/paginator.d.ts +56 -0
  19. package/components/paginator.js +148 -0
  20. package/components/paginator.js.map +1 -0
  21. package/components/row.d.ts +43 -0
  22. package/components/row.js +239 -0
  23. package/components/row.js.map +1 -0
  24. package/components/toolbar.d.ts +60 -0
  25. package/components/toolbar.js +275 -0
  26. package/components/toolbar.js.map +1 -0
  27. package/{dist/src/components → components}/virtualizer.d.ts +2 -3
  28. package/{dist/src/components → components}/virtualizer.js +3 -3
  29. package/components/virtualizer.js.map +1 -0
  30. package/controllers/data-operation.d.ts +31 -0
  31. package/controllers/data-operation.js +53 -0
  32. package/controllers/data-operation.js.map +1 -0
  33. package/controllers/dom.d.ts +55 -0
  34. package/controllers/dom.js +221 -0
  35. package/controllers/dom.js.map +1 -0
  36. package/controllers/editing.d.ts +130 -0
  37. package/controllers/editing.js +197 -0
  38. package/controllers/editing.js.map +1 -0
  39. package/controllers/expansion.d.ts +68 -0
  40. package/controllers/expansion.js +126 -0
  41. package/controllers/expansion.js.map +1 -0
  42. package/{dist/src/controllers → controllers}/filter.d.ts +2 -3
  43. package/controllers/filter.js +105 -0
  44. package/controllers/filter.js.map +1 -0
  45. package/{dist/src/controllers → controllers}/navigation.d.ts +18 -8
  46. package/{dist/src/controllers → controllers}/navigation.js +31 -20
  47. package/controllers/navigation.js.map +1 -0
  48. package/controllers/pagination.d.ts +102 -0
  49. package/controllers/pagination.js +106 -0
  50. package/controllers/pagination.js.map +1 -0
  51. package/controllers/reorder.d.ts +78 -0
  52. package/controllers/reorder.js +124 -0
  53. package/controllers/reorder.js.map +1 -0
  54. package/{dist/src/controllers → controllers}/resize.d.ts +2 -3
  55. package/controllers/resize.js +52 -0
  56. package/controllers/resize.js.map +1 -0
  57. package/controllers/selection.d.ts +109 -0
  58. package/controllers/selection.js +168 -0
  59. package/controllers/selection.js.map +1 -0
  60. package/{dist/src/controllers → controllers}/sort.d.ts +1 -2
  61. package/controllers/sort.js +122 -0
  62. package/controllers/sort.js.map +1 -0
  63. package/controllers/state.d.ts +56 -0
  64. package/controllers/state.js +74 -0
  65. package/controllers/state.js.map +1 -0
  66. package/controllers/tree.d.ts +87 -0
  67. package/controllers/tree.js +0 -0
  68. package/controllers/tree.js.map +1 -0
  69. package/custom-elements.json +6901 -1554
  70. package/{dist/src/define.d.ts → define.d.ts} +0 -1
  71. package/define.js.map +1 -0
  72. package/docs/assets/hierarchy.js +1 -0
  73. package/docs/assets/highlight.css +127 -0
  74. package/docs/assets/icons.js +18 -0
  75. package/docs/assets/icons.svg +1 -0
  76. package/docs/assets/main.js +60 -0
  77. package/docs/assets/navigation.js +1 -0
  78. package/docs/assets/search.js +1 -0
  79. package/docs/assets/style.css +1633 -0
  80. package/docs/classes/ApexGrid.html +371 -0
  81. package/docs/functions/setup.html +22 -0
  82. package/docs/hierarchy.html +1 -0
  83. package/docs/index.html +504 -0
  84. package/docs/interfaces/ApexCellValueChangedEvent.html +11 -0
  85. package/docs/interfaces/ApexCellValueChangingEvent.html +13 -0
  86. package/docs/interfaces/ApexColumnMovedEvent.html +8 -0
  87. package/docs/interfaces/ApexColumnMovingEvent.html +11 -0
  88. package/docs/interfaces/ApexColumnPinnedEvent.html +6 -0
  89. package/docs/interfaces/ApexColumnPinningEvent.html +8 -0
  90. package/docs/interfaces/ApexDetailContext.html +8 -0
  91. package/docs/interfaces/ApexFilteredEvent.html +6 -0
  92. package/docs/interfaces/ApexFilteringEvent.html +12 -0
  93. package/docs/interfaces/ApexGridEventMap.html +68 -0
  94. package/docs/interfaces/ApexHeaderContext.html +6 -0
  95. package/docs/interfaces/ApexPageChangedEvent.html +10 -0
  96. package/docs/interfaces/ApexPageChangingEvent.html +10 -0
  97. package/docs/interfaces/ApexQuickFilterChangedEvent.html +4 -0
  98. package/docs/interfaces/ApexQuickFilterChangingEvent.html +6 -0
  99. package/docs/interfaces/ApexRowEditEndedEvent.html +6 -0
  100. package/docs/interfaces/ApexRowEditStartedEvent.html +4 -0
  101. package/docs/interfaces/ApexRowExpandedEvent.html +8 -0
  102. package/docs/interfaces/ApexRowExpandingEvent.html +11 -0
  103. package/docs/interfaces/ApexRowSelectedEvent.html +8 -0
  104. package/docs/interfaces/ApexRowSelectingEvent.html +11 -0
  105. package/docs/interfaces/ApexTreeRowExpandedEvent.html +8 -0
  106. package/docs/interfaces/ApexTreeRowExpandingEvent.html +10 -0
  107. package/docs/interfaces/BaseApexCellContext.html +16 -0
  108. package/docs/interfaces/BaseApexEditorContext.html +19 -0
  109. package/docs/interfaces/BaseColumnConfiguration.html +83 -0
  110. package/docs/interfaces/BaseColumnSortConfiguration.html +6 -0
  111. package/docs/interfaces/BaseFilterExpression.html +15 -0
  112. package/docs/interfaces/BaseSortExpression.html +12 -0
  113. package/docs/interfaces/CSVExportOptions.html +22 -0
  114. package/docs/interfaces/ColumnFilterConfiguration.html +4 -0
  115. package/docs/interfaces/DataPipelineConfiguration.html +15 -0
  116. package/docs/interfaces/ExportOptions.html +15 -0
  117. package/docs/interfaces/GridEditingConfiguration.html +10 -0
  118. package/docs/interfaces/GridExpansionConfiguration.html +15 -0
  119. package/docs/interfaces/GridSelectionConfiguration.html +11 -0
  120. package/docs/interfaces/GridSortConfiguration.html +6 -0
  121. package/docs/interfaces/GridTreeConfiguration.html +33 -0
  122. package/docs/interfaces/PaginationConfiguration.html +18 -0
  123. package/docs/interfaces/PaginationState.html +10 -0
  124. package/docs/interfaces/XLSXExportOptions.html +17 -0
  125. package/docs/media/package.json +83 -0
  126. package/docs/media/publish.yml +111 -0
  127. package/docs/modules.html +1 -0
  128. package/docs/types/ApexCellContext.html +2 -0
  129. package/docs/types/ApexEditorContext.html +2 -0
  130. package/docs/types/BasePropertyType.html +2 -0
  131. package/docs/types/BaseSortComparer.html +2 -0
  132. package/docs/types/ColumnConfiguration.html +2 -0
  133. package/docs/types/ColumnDropPosition.html +2 -0
  134. package/docs/types/ColumnSortConfiguration.html +2 -0
  135. package/docs/types/DataPipelineHook.html +2 -0
  136. package/docs/types/DataPipelineParams.html +8 -0
  137. package/docs/types/DataType.html +30 -0
  138. package/docs/types/EditMode.html +6 -0
  139. package/docs/types/EditTrigger.html +4 -0
  140. package/docs/types/ExportCellValue.html +5 -0
  141. package/docs/types/ExportSource.html +8 -0
  142. package/docs/types/FilterCriteria.html +6 -0
  143. package/docs/types/FilterExpression.html +2 -0
  144. package/docs/types/Keys.html +2 -0
  145. package/docs/types/PaginationMode.html +6 -0
  146. package/docs/types/PinPosition.html +5 -0
  147. package/docs/types/PropertyType.html +2 -0
  148. package/docs/types/SelectionMode.html +7 -0
  149. package/docs/types/SortComparer.html +2 -0
  150. package/docs/types/SortExpression.html +2 -0
  151. package/docs/types/SortState.html +2 -0
  152. package/docs/types/SortingDirection.html +3 -0
  153. package/index.d.ts +11 -0
  154. package/{dist/src/index.js → index.js} +1 -0
  155. package/index.js.map +1 -0
  156. package/internal/column-types.d.ts +94 -0
  157. package/internal/column-types.js +268 -0
  158. package/internal/column-types.js.map +1 -0
  159. package/{dist/src/internal → internal}/constants.d.ts +0 -1
  160. package/internal/constants.js.map +1 -0
  161. package/internal/export.d.ts +106 -0
  162. package/internal/export.js +122 -0
  163. package/internal/export.js.map +1 -0
  164. package/internal/flip.d.ts +80 -0
  165. package/internal/flip.js +52 -0
  166. package/internal/flip.js.map +1 -0
  167. package/internal/icons.d.ts +24 -0
  168. package/internal/icons.js +134 -0
  169. package/internal/icons.js.map +1 -0
  170. package/{dist/src/internal → internal}/is-defined.d.ts +0 -1
  171. package/internal/is-defined.js.map +1 -0
  172. package/{dist/src/internal → internal}/mixins/event-emitter.d.ts +0 -1
  173. package/internal/mixins/event-emitter.js.map +1 -0
  174. package/{dist/src/internal → internal}/normalize-case.d.ts +0 -1
  175. package/internal/normalize-case.js.map +1 -0
  176. package/{dist/src/internal → internal}/part-map.d.ts +0 -1
  177. package/{dist/src/internal → internal}/part-map.js +1 -1
  178. package/internal/part-map.js.map +1 -0
  179. package/{dist/src/internal → internal}/register.d.ts +3 -4
  180. package/internal/register.js +9 -0
  181. package/internal/register.js.map +1 -0
  182. package/{dist/src/internal → internal}/tags.d.ts +2 -1
  183. package/{dist/src/internal → internal}/tags.js +2 -0
  184. package/internal/tags.js.map +1 -0
  185. package/internal/theming.d.ts +34 -0
  186. package/internal/theming.js +123 -0
  187. package/internal/theming.js.map +1 -0
  188. package/internal/types.d.ts +619 -0
  189. package/internal/types.js.map +1 -0
  190. package/internal/utils.d.ts +29 -0
  191. package/internal/utils.js +75 -0
  192. package/internal/utils.js.map +1 -0
  193. package/{dist/src/internal → internal}/watch.d.ts +0 -1
  194. package/{dist/src/internal → internal}/watch.js +2 -2
  195. package/internal/watch.js.map +1 -0
  196. package/internal/xlsx.d.ts +22 -0
  197. package/internal/xlsx.js +228 -0
  198. package/internal/xlsx.js.map +1 -0
  199. package/{dist/src/operations → operations}/base.d.ts +0 -1
  200. package/operations/base.js.map +1 -0
  201. package/{dist/src/operations → operations}/filter/operands/boolean.d.ts +0 -1
  202. package/{dist/src/operations → operations}/filter/operands/boolean.js +5 -5
  203. package/operations/filter/operands/boolean.js.map +1 -0
  204. package/{dist/src/operations → operations}/filter/operands/number.d.ts +0 -1
  205. package/{dist/src/operations → operations}/filter/operands/number.js +2 -2
  206. package/operations/filter/operands/number.js.map +1 -0
  207. package/{dist/src/operations → operations}/filter/operands/string.d.ts +0 -1
  208. package/{dist/src/operations → operations}/filter/operands/string.js +2 -2
  209. package/operations/filter/operands/string.js.map +1 -0
  210. package/{dist/src/operations → operations}/filter/state.d.ts +1 -2
  211. package/{dist/src/operations → operations}/filter/state.js +3 -4
  212. package/operations/filter/state.js.map +1 -0
  213. package/{dist/src/operations → operations}/filter/tree.d.ts +1 -2
  214. package/{dist/src/operations → operations}/filter/tree.js +5 -6
  215. package/operations/filter/tree.js.map +1 -0
  216. package/{dist/src/operations → operations}/filter/types.d.ts +0 -1
  217. package/operations/filter/types.js.map +1 -0
  218. package/{dist/src/operations → operations}/filter.d.ts +0 -1
  219. package/{dist/src/operations → operations}/filter.js +4 -7
  220. package/operations/filter.js.map +1 -0
  221. package/operations/pagination.d.ts +19 -0
  222. package/operations/pagination.js +12 -0
  223. package/operations/pagination.js.map +1 -0
  224. package/operations/quick-filter.d.ts +21 -0
  225. package/operations/quick-filter.js +26 -0
  226. package/operations/quick-filter.js.map +1 -0
  227. package/{dist/src/operations → operations}/sort/types.d.ts +0 -1
  228. package/operations/sort/types.js.map +1 -0
  229. package/{dist/src/operations → operations}/sort.d.ts +0 -1
  230. package/{dist/src/operations → operations}/sort.js +5 -5
  231. package/operations/sort.js.map +1 -0
  232. package/package.json +25 -83
  233. package/setup.d.ts +58 -0
  234. package/setup.js +29 -0
  235. package/setup.js.map +1 -0
  236. package/{dist/src/styles/body-row/body-row-styles.css.d.ts → styles/_common.css.d.ts} +0 -1
  237. package/styles/_common.css.js +3 -0
  238. package/styles/_common.css.js.map +1 -0
  239. package/{dist/src/styles/body-cell/body-cell-styles.css.d.ts → styles/body-cell/body-cell.css.d.ts} +0 -1
  240. package/styles/body-cell/body-cell.css.js +3 -0
  241. package/styles/body-cell/body-cell.css.js.map +1 -0
  242. package/{dist/src/styles/filter-row/filter-row-styles.css.d.ts → styles/body-row/body-row.css.d.ts} +0 -1
  243. package/styles/body-row/body-row.css.js +3 -0
  244. package/styles/body-row/body-row.css.js.map +1 -0
  245. package/{dist/src/styles/grid/themes/light/grid.fluent-styles.css.d.ts → styles/filter-row/filter-row.css.d.ts} +0 -1
  246. package/styles/filter-row/filter-row.css.js +3 -0
  247. package/styles/filter-row/filter-row.css.js.map +1 -0
  248. package/styles/grid/_grid.base.css.d.ts +1 -0
  249. package/styles/grid/_grid.base.css.js +3 -0
  250. package/styles/grid/_grid.base.css.js.map +1 -0
  251. package/styles/grid/themes/light/grid.bootstrap.css.d.ts +1 -0
  252. package/styles/grid/themes/light/grid.bootstrap.css.js +3 -0
  253. package/styles/grid/themes/light/grid.bootstrap.css.js.map +1 -0
  254. package/styles/grid/themes/light/grid.fluent.css.d.ts +1 -0
  255. package/styles/grid/themes/light/grid.fluent.css.js +3 -0
  256. package/styles/grid/themes/light/grid.fluent.css.js.map +1 -0
  257. package/styles/grid/themes/light/grid.indigo.css.d.ts +1 -0
  258. package/styles/grid/themes/light/grid.indigo.css.js +3 -0
  259. package/styles/grid/themes/light/grid.indigo.css.js.map +1 -0
  260. package/styles/grid/themes/light/grid.material.css.d.ts +1 -0
  261. package/styles/grid/themes/light/grid.material.css.js +3 -0
  262. package/styles/grid/themes/light/grid.material.css.js.map +1 -0
  263. package/styles/header-cell/header-cell.css.d.ts +1 -0
  264. package/styles/header-cell/header-cell.css.js +3 -0
  265. package/styles/header-cell/header-cell.css.js.map +1 -0
  266. package/styles/header-row/header-row.base.css.d.ts +1 -0
  267. package/styles/header-row/header-row.base.css.js +3 -0
  268. package/styles/header-row/header-row.base.css.js.map +1 -0
  269. package/styles/paginator/paginator.css.d.ts +1 -0
  270. package/styles/paginator/paginator.css.js +3 -0
  271. package/styles/paginator/paginator.css.js.map +1 -0
  272. package/styles/toolbar/toolbar.css.d.ts +1 -0
  273. package/styles/toolbar/toolbar.css.js +3 -0
  274. package/styles/toolbar/toolbar.css.js.map +1 -0
  275. package/styles.css +17 -0
  276. package/dist/bundle.js +0 -2194
  277. package/dist/docs/assets/highlight.css +0 -43
  278. package/dist/docs/assets/main.js +0 -58
  279. package/dist/docs/assets/search.js +0 -1
  280. package/dist/docs/assets/style.css +0 -1365
  281. package/dist/docs/classes/ApexGrid.html +0 -327
  282. package/dist/docs/index.html +0 -82
  283. package/dist/docs/interfaces/ApexFilteredEvent.html +0 -104
  284. package/dist/docs/interfaces/ApexFilteringEvent.html +0 -116
  285. package/dist/docs/interfaces/ApexGridEventMap.html +0 -127
  286. package/dist/docs/interfaces/ApexHeaderContext.html +0 -104
  287. package/dist/docs/interfaces/BaseApexCellContext.html +0 -120
  288. package/dist/docs/interfaces/BaseColumnConfiguration.html +0 -196
  289. package/dist/docs/interfaces/BaseColumnSortConfiguration.html +0 -106
  290. package/dist/docs/interfaces/BaseFilterExpression.html +0 -132
  291. package/dist/docs/interfaces/BaseSortExpression.html +0 -124
  292. package/dist/docs/interfaces/ColumnFilterConfiguration.html +0 -92
  293. package/dist/docs/interfaces/DataPipelineConfiguration.html +0 -104
  294. package/dist/docs/interfaces/GridSortConfiguration.html +0 -99
  295. package/dist/docs/modules.html +0 -102
  296. package/dist/docs/types/ApexCellContext.html +0 -74
  297. package/dist/docs/types/BasePropertyType.html +0 -74
  298. package/dist/docs/types/BaseSortComparer.html +0 -89
  299. package/dist/docs/types/ColumnConfiguration.html +0 -74
  300. package/dist/docs/types/ColumnSortConfiguration.html +0 -74
  301. package/dist/docs/types/DataPipelineHook.html +0 -85
  302. package/dist/docs/types/DataPipelineParams.html +0 -87
  303. package/dist/docs/types/DataType.html +0 -67
  304. package/dist/docs/types/FilterCriteria.html +0 -71
  305. package/dist/docs/types/FilterExpression.html +0 -74
  306. package/dist/docs/types/Keys.html +0 -72
  307. package/dist/docs/types/PropertyType.html +0 -74
  308. package/dist/docs/types/SortComparer.html +0 -74
  309. package/dist/docs/types/SortExpression.html +0 -74
  310. package/dist/docs/types/SortState.html +0 -72
  311. package/dist/docs/types/SortingDirection.html +0 -69
  312. package/dist/src/components/cell.d.ts +0 -36
  313. package/dist/src/components/cell.d.ts.map +0 -1
  314. package/dist/src/components/cell.js +0 -55
  315. package/dist/src/components/cell.js.map +0 -1
  316. package/dist/src/components/filter-row.d.ts.map +0 -1
  317. package/dist/src/components/filter-row.js +0 -316
  318. package/dist/src/components/filter-row.js.map +0 -1
  319. package/dist/src/components/grid.d.ts +0 -226
  320. package/dist/src/components/grid.d.ts.map +0 -1
  321. package/dist/src/components/grid.js +0 -309
  322. package/dist/src/components/grid.js.map +0 -1
  323. package/dist/src/components/header-row.d.ts +0 -24
  324. package/dist/src/components/header-row.d.ts.map +0 -1
  325. package/dist/src/components/header-row.js +0 -78
  326. package/dist/src/components/header-row.js.map +0 -1
  327. package/dist/src/components/header.d.ts.map +0 -1
  328. package/dist/src/components/header.js +0 -144
  329. package/dist/src/components/header.js.map +0 -1
  330. package/dist/src/components/row.d.ts +0 -25
  331. package/dist/src/components/row.d.ts.map +0 -1
  332. package/dist/src/components/row.js +0 -68
  333. package/dist/src/components/row.js.map +0 -1
  334. package/dist/src/components/virtualizer.d.ts.map +0 -1
  335. package/dist/src/components/virtualizer.js.map +0 -1
  336. package/dist/src/controllers/data-operation.d.ts +0 -18
  337. package/dist/src/controllers/data-operation.d.ts.map +0 -1
  338. package/dist/src/controllers/data-operation.js +0 -37
  339. package/dist/src/controllers/data-operation.js.map +0 -1
  340. package/dist/src/controllers/dom.d.ts +0 -20
  341. package/dist/src/controllers/dom.d.ts.map +0 -1
  342. package/dist/src/controllers/dom.js +0 -60
  343. package/dist/src/controllers/dom.js.map +0 -1
  344. package/dist/src/controllers/filter.d.ts.map +0 -1
  345. package/dist/src/controllers/filter.js +0 -119
  346. package/dist/src/controllers/filter.js.map +0 -1
  347. package/dist/src/controllers/navigation.d.ts.map +0 -1
  348. package/dist/src/controllers/navigation.js.map +0 -1
  349. package/dist/src/controllers/resize.d.ts.map +0 -1
  350. package/dist/src/controllers/resize.js +0 -70
  351. package/dist/src/controllers/resize.js.map +0 -1
  352. package/dist/src/controllers/sort.d.ts.map +0 -1
  353. package/dist/src/controllers/sort.js +0 -94
  354. package/dist/src/controllers/sort.js.map +0 -1
  355. package/dist/src/controllers/state.d.ts +0 -25
  356. package/dist/src/controllers/state.d.ts.map +0 -1
  357. package/dist/src/controllers/state.js +0 -40
  358. package/dist/src/controllers/state.js.map +0 -1
  359. package/dist/src/define.d.ts.map +0 -1
  360. package/dist/src/define.js.map +0 -1
  361. package/dist/src/index.d.ts +0 -9
  362. package/dist/src/index.d.ts.map +0 -1
  363. package/dist/src/index.js.map +0 -1
  364. package/dist/src/internal/constants.d.ts.map +0 -1
  365. package/dist/src/internal/constants.js.map +0 -1
  366. package/dist/src/internal/icon-registry.d.ts +0 -2
  367. package/dist/src/internal/icon-registry.d.ts.map +0 -1
  368. package/dist/src/internal/icon-registry.js +0 -29
  369. package/dist/src/internal/icon-registry.js.map +0 -1
  370. package/dist/src/internal/is-defined.d.ts.map +0 -1
  371. package/dist/src/internal/is-defined.js.map +0 -1
  372. package/dist/src/internal/mixins/event-emitter.d.ts.map +0 -1
  373. package/dist/src/internal/mixins/event-emitter.js.map +0 -1
  374. package/dist/src/internal/normalize-case.d.ts.map +0 -1
  375. package/dist/src/internal/normalize-case.js.map +0 -1
  376. package/dist/src/internal/part-map.d.ts.map +0 -1
  377. package/dist/src/internal/part-map.js.map +0 -1
  378. package/dist/src/internal/register.d.ts.map +0 -1
  379. package/dist/src/internal/register.js +0 -9
  380. package/dist/src/internal/register.js.map +0 -1
  381. package/dist/src/internal/tags.d.ts.map +0 -1
  382. package/dist/src/internal/tags.js.map +0 -1
  383. package/dist/src/internal/types.d.ts +0 -199
  384. package/dist/src/internal/types.d.ts.map +0 -1
  385. package/dist/src/internal/types.js.map +0 -1
  386. package/dist/src/internal/utils.d.ts +0 -7
  387. package/dist/src/internal/utils.d.ts.map +0 -1
  388. package/dist/src/internal/utils.js +0 -37
  389. package/dist/src/internal/utils.js.map +0 -1
  390. package/dist/src/internal/watch.d.ts.map +0 -1
  391. package/dist/src/internal/watch.js.map +0 -1
  392. package/dist/src/operations/base.d.ts.map +0 -1
  393. package/dist/src/operations/base.js.map +0 -1
  394. package/dist/src/operations/filter/operands/boolean.d.ts.map +0 -1
  395. package/dist/src/operations/filter/operands/boolean.js.map +0 -1
  396. package/dist/src/operations/filter/operands/number.d.ts.map +0 -1
  397. package/dist/src/operations/filter/operands/number.js.map +0 -1
  398. package/dist/src/operations/filter/operands/string.d.ts.map +0 -1
  399. package/dist/src/operations/filter/operands/string.js.map +0 -1
  400. package/dist/src/operations/filter/state.d.ts.map +0 -1
  401. package/dist/src/operations/filter/state.js.map +0 -1
  402. package/dist/src/operations/filter/tree.d.ts.map +0 -1
  403. package/dist/src/operations/filter/tree.js.map +0 -1
  404. package/dist/src/operations/filter/types.d.ts.map +0 -1
  405. package/dist/src/operations/filter/types.js.map +0 -1
  406. package/dist/src/operations/filter.d.ts.map +0 -1
  407. package/dist/src/operations/filter.js.map +0 -1
  408. package/dist/src/operations/sort/types.d.ts.map +0 -1
  409. package/dist/src/operations/sort/types.js.map +0 -1
  410. package/dist/src/operations/sort.d.ts.map +0 -1
  411. package/dist/src/operations/sort.js.map +0 -1
  412. package/dist/src/styles/body-cell/body-cell-styles.css.d.ts.map +0 -1
  413. package/dist/src/styles/body-cell/body-cell-styles.css.js +0 -71
  414. package/dist/src/styles/body-cell/body-cell-styles.css.js.map +0 -1
  415. package/dist/src/styles/body-row/body-row-styles.css.d.ts.map +0 -1
  416. package/dist/src/styles/body-row/body-row-styles.css.js +0 -38
  417. package/dist/src/styles/body-row/body-row-styles.css.js.map +0 -1
  418. package/dist/src/styles/filter-row/filter-row-styles.css.d.ts.map +0 -1
  419. package/dist/src/styles/filter-row/filter-row-styles.css.js +0 -96
  420. package/dist/src/styles/filter-row/filter-row-styles.css.js.map +0 -1
  421. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.d.ts +0 -2
  422. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.d.ts.map +0 -1
  423. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.js +0 -83
  424. package/dist/src/styles/grid/themes/light/grid.bootstrap-styles.css.js.map +0 -1
  425. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.d.ts.map +0 -1
  426. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.js +0 -83
  427. package/dist/src/styles/grid/themes/light/grid.fluent-styles.css.js.map +0 -1
  428. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.d.ts +0 -2
  429. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.d.ts.map +0 -1
  430. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.js +0 -83
  431. package/dist/src/styles/grid/themes/light/grid.indigo-styles.css.js.map +0 -1
  432. package/dist/src/styles/grid/themes/light/grid.material-styles.css.d.ts +0 -2
  433. package/dist/src/styles/grid/themes/light/grid.material-styles.css.d.ts.map +0 -1
  434. package/dist/src/styles/grid/themes/light/grid.material-styles.css.js +0 -83
  435. package/dist/src/styles/grid/themes/light/grid.material-styles.css.js.map +0 -1
  436. package/dist/src/styles/header-cell/header-cell-styles.css.d.ts +0 -2
  437. package/dist/src/styles/header-cell/header-cell-styles.css.d.ts.map +0 -1
  438. package/dist/src/styles/header-cell/header-cell-styles.css.js +0 -141
  439. package/dist/src/styles/header-cell/header-cell-styles.css.js.map +0 -1
  440. package/dist/src/styles/header-row/header-row.base-styles.css.d.ts +0 -2
  441. package/dist/src/styles/header-row/header-row.base-styles.css.d.ts.map +0 -1
  442. package/dist/src/styles/header-row/header-row.base-styles.css.js +0 -35
  443. package/dist/src/styles/header-row/header-row.base-styles.css.js.map +0 -1
  444. /package/{dist/src/define.js → define.js} +0 -0
  445. /package/{dist/docs → docs}/.nojekyll +0 -0
  446. /package/{dist/src/internal → internal}/constants.js +0 -0
  447. /package/{dist/src/internal → internal}/is-defined.js +0 -0
  448. /package/{dist/src/internal → internal}/mixins/event-emitter.js +0 -0
  449. /package/{dist/src/internal → internal}/normalize-case.js +0 -0
  450. /package/{dist/src/internal → internal}/types.js +0 -0
  451. /package/{dist/src/operations → operations}/base.js +0 -0
  452. /package/{dist/src/operations → operations}/filter/types.js +0 -0
  453. /package/{dist/src/operations → operations}/sort/types.js +0 -0
@@ -1,69 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SortingDirection | apex-grid</title><meta name="description" content="Documentation for apex-grid"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/search.js" id="tsd-search-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
2
- <div class="tsd-toolbar-contents container">
3
- <div class="table-cell" id="tsd-search" data-base="..">
4
- <div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
5
- <div class="field">
6
- <div id="tsd-toolbar-links"></div></div>
7
- <ul class="results">
8
- <li class="state loading">Preparing search index...</li>
9
- <li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">apex-grid</a></div>
10
- <div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
11
- <div class="container container-main">
12
- <div class="col-content">
13
- <div class="tsd-page-title">
14
- <ul class="tsd-breadcrumb">
15
- <li><a href="../modules.html">apex-grid</a></li>
16
- <li><a href="SortingDirection.html">SortingDirection</a></li></ul>
17
- <h1>Type alias SortingDirection</h1></div>
18
- <div class="tsd-signature"><span class="tsd-kind-type-alias">Sorting<wbr/>Direction</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;ascending&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;descending&quot;</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">&quot;none&quot;</span></div>
19
- <div class="tsd-comment tsd-typography"><p>Sort direction for a given sort expression.</p>
20
-
21
- <h3>Remarks</h3><p><code>none</code> is used</p>
22
- </div></div>
23
- <div class="col-sidebar">
24
- <div class="page-menu">
25
- <div class="tsd-navigation settings">
26
- <details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
27
- <h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg>Settings</h3></summary>
28
- <div class="tsd-accordion-details">
29
- <div class="tsd-filter-visibility">
30
- <h4 class="uppercase">Member Visibility</h4><form>
31
- <ul id="tsd-filter-options">
32
- <li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></form></div>
33
- <div class="tsd-theme-toggle">
34
- <h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div>
35
- <div class="site-menu">
36
- <nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4-path"></rect><path d="M9.33 16V7.24H10.77L13.446 14.74C13.43 14.54 13.41 14.296 13.386 14.008C13.37 13.712 13.354 13.404 13.338 13.084C13.33 12.756 13.326 12.448 13.326 12.16V7.24H14.37V16H12.93L10.266 8.5C10.282 8.692 10.298 8.936 10.314 9.232C10.33 9.52 10.342 9.828 10.35 10.156C10.366 10.476 10.374 10.784 10.374 11.08V16H9.33Z" fill="var(--color-text)" id="icon-4-text"></path></svg><span>apex-<wbr/>grid</span></a>
37
- <ul class="tsd-small-nested-navigation">
38
- <li><a href="../classes/ApexGrid.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-128-path"></rect><path d="M11.898 16.1201C11.098 16.1201 10.466 15.8961 10.002 15.4481C9.53803 15.0001 9.30603 14.3841 9.30603 13.6001V9.64012C9.30603 8.85612 9.53803 8.24012 10.002 7.79212C10.466 7.34412 11.098 7.12012 11.898 7.12012C12.682 7.12012 13.306 7.34812 13.77 7.80412C14.234 8.25212 14.466 8.86412 14.466 9.64012H13.386C13.386 9.14412 13.254 8.76412 12.99 8.50012C12.734 8.22812 12.37 8.09212 11.898 8.09212C11.426 8.09212 11.054 8.22412 10.782 8.48812C10.518 8.75212 10.386 9.13212 10.386 9.62812V13.6001C10.386 14.0961 10.518 14.4801 10.782 14.7521C11.054 15.0161 11.426 15.1481 11.898 15.1481C12.37 15.1481 12.734 15.0161 12.99 14.7521C13.254 14.4801 13.386 14.0961 13.386 13.6001H14.466C14.466 14.3761 14.234 14.9921 13.77 15.4481C13.306 15.8961 12.682 16.1201 11.898 16.1201Z" fill="var(--color-text)" id="icon-128-text"></path></svg><span>Apex<wbr/>Grid</span></a></li>
39
- <li><a href="../interfaces/ApexFilteredEvent.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-256-path"></rect><path d="M9.51 16V15.016H11.298V8.224H9.51V7.24H14.19V8.224H12.402V15.016H14.19V16H9.51Z" fill="var(--color-text)" id="icon-256-text"></path></svg><span>Apex<wbr/>Filtered<wbr/>Event</span></a></li>
40
- <li><a href="../interfaces/ApexFilteringEvent.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Apex<wbr/>Filtering<wbr/>Event</span></a></li>
41
- <li><a href="../interfaces/ApexGridEventMap.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Apex<wbr/>Grid<wbr/>Event<wbr/>Map</span></a></li>
42
- <li><a href="../interfaces/ApexHeaderContext.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Apex<wbr/>Header<wbr/>Context</span></a></li>
43
- <li><a href="../interfaces/BaseApexCellContext.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Base<wbr/>Apex<wbr/>Cell<wbr/>Context</span></a></li>
44
- <li><a href="../interfaces/BaseColumnConfiguration.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Base<wbr/>Column<wbr/>Configuration</span></a></li>
45
- <li><a href="../interfaces/BaseColumnSortConfiguration.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Base<wbr/>Column<wbr/>Sort<wbr/>Configuration</span></a></li>
46
- <li><a href="../interfaces/BaseFilterExpression.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Base<wbr/>Filter<wbr/>Expression</span></a></li>
47
- <li><a href="../interfaces/BaseSortExpression.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Base<wbr/>Sort<wbr/>Expression</span></a></li>
48
- <li><a href="../interfaces/ColumnFilterConfiguration.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Column<wbr/>Filter<wbr/>Configuration</span></a></li>
49
- <li><a href="../interfaces/DataPipelineConfiguration.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Data<wbr/>Pipeline<wbr/>Configuration</span></a></li>
50
- <li><a href="../interfaces/GridSortConfiguration.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-256-path"></use><use href="#icon-256-text"></use></svg><span>Grid<wbr/>Sort<wbr/>Configuration</span></a></li>
51
- <li><a href="ApexCellContext.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-4194304-path"></rect><path d="M11.31 16V8.224H8.91V7.24H14.79V8.224H12.39V16H11.31Z" fill="var(--color-text)" id="icon-4194304-text"></path></svg><span>Apex<wbr/>Cell<wbr/>Context</span></a></li>
52
- <li><a href="BasePropertyType.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Base<wbr/>Property<wbr/>Type</span></a></li>
53
- <li><a href="BaseSortComparer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Base<wbr/>Sort<wbr/>Comparer</span></a></li>
54
- <li><a href="ColumnConfiguration.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Column<wbr/>Configuration</span></a></li>
55
- <li><a href="ColumnSortConfiguration.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Column<wbr/>Sort<wbr/>Configuration</span></a></li>
56
- <li><a href="DataPipelineHook.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Data<wbr/>Pipeline<wbr/>Hook</span></a></li>
57
- <li><a href="DataPipelineParams.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Data<wbr/>Pipeline<wbr/>Params</span></a></li>
58
- <li><a href="DataType.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Data<wbr/>Type</span></a></li>
59
- <li><a href="FilterCriteria.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Filter<wbr/>Criteria</span></a></li>
60
- <li><a href="FilterExpression.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Filter<wbr/>Expression</span></a></li>
61
- <li><a href="Keys.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Keys</span></a></li>
62
- <li><a href="PropertyType.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Property<wbr/>Type</span></a></li>
63
- <li><a href="SortComparer.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Sort<wbr/>Comparer</span></a></li>
64
- <li><a href="SortExpression.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Sort<wbr/>Expression</span></a></li>
65
- <li><a href="SortState.html"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Sort<wbr/>State</span></a></li>
66
- <li><a href="SortingDirection.html" class="current"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-4194304-path"></use><use href="#icon-4194304-text"></use></svg><span>Sorting<wbr/>Direction</span></a></li></ul></nav></div></div></div>
67
- <div class="tsd-generator">
68
- <p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
69
- <div class="overlay"></div></body></html>
@@ -1,36 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import type { ApexCellContext, ColumnConfiguration, PropertyType } from '../internal/types.js';
3
- import type ApexGridRow from './row.js';
4
- /**
5
- * Component representing a DOM cell of the Apex grid.
6
- */
7
- export default class ApexGridCell<T extends object> extends LitElement {
8
- static get is(): "apex-grid-cell";
9
- static styles: import("lit").CSSResult;
10
- static register(): void;
11
- /**
12
- * The value which will be rendered by the component.
13
- */
14
- value: PropertyType<T>;
15
- /**
16
- * A reference to the column configuration object.
17
- */
18
- column: ColumnConfiguration<T>;
19
- /**
20
- * Indicates whether this is the active cell in the grid.
21
- *
22
- */
23
- active: boolean;
24
- /**
25
- * The parent row component holding this cell.
26
- */
27
- row: ApexGridRow<T>;
28
- protected get context(): ApexCellContext<T>;
29
- protected render(): unknown;
30
- }
31
- declare global {
32
- interface HTMLElementTagNameMap {
33
- [ApexGridCell.is]: ApexGridCell<object>;
34
- }
35
- }
36
- //# sourceMappingURL=cell.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cell.d.ts","sourceRoot":"","sources":["../../../src/components/cell.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAIvC,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAE/F,OAAO,KAAK,WAAW,MAAM,UAAU,CAAC;AAExC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,YAAY,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,UAAU;IACpE,WAAkB,EAAE,qBAEnB;IAED,OAAuB,MAAM,0BAAU;WAEzB,QAAQ;IAItB;;OAEG;IAEI,KAAK,EAAG,YAAY,CAAC,CAAC,CAAC,CAAC;IAE/B;;OAEG;IAEI,MAAM,EAAG,mBAAmB,CAAC,CAAC,CAAC,CAAC;IAEvC;;;OAGG;IAEI,MAAM,UAAS;IAEtB;;OAEG;IACI,GAAG,EAAG,WAAW,CAAC,CAAC,CAAC,CAAC;IAE5B,SAAS,KAAK,OAAO,IAAI,eAAe,CAAC,CAAC,CAAC,CAO1C;cAEkB,MAAM;CAK1B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;KACzC;CACF"}
@@ -1,55 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, LitElement } from 'lit';
8
- import { property } from 'lit/decorators.js';
9
- import { registerComponent } from '../internal/register.js';
10
- import { GRID_CELL_TAG } from '../internal/tags.js';
11
- import { styles } from '../styles/body-cell/body-cell-styles.css.js';
12
- /**
13
- * Component representing a DOM cell of the Apex grid.
14
- */
15
- class ApexGridCell extends LitElement {
16
- constructor() {
17
- super(...arguments);
18
- /**
19
- * Indicates whether this is the active cell in the grid.
20
- *
21
- */
22
- this.active = false;
23
- }
24
- static get is() {
25
- return GRID_CELL_TAG;
26
- }
27
- static register() {
28
- registerComponent(this);
29
- }
30
- get context() {
31
- return {
32
- parent: this,
33
- row: this.row,
34
- column: this.column,
35
- value: this.value,
36
- };
37
- }
38
- render() {
39
- return this.column.cellTemplate
40
- ? this.column.cellTemplate(this.context)
41
- : html `${this.value}`;
42
- }
43
- }
44
- ApexGridCell.styles = styles;
45
- __decorate([
46
- property({ attribute: false })
47
- ], ApexGridCell.prototype, "value", void 0);
48
- __decorate([
49
- property({ attribute: false })
50
- ], ApexGridCell.prototype, "column", void 0);
51
- __decorate([
52
- property({ type: Boolean, reflect: true })
53
- ], ApexGridCell.prototype, "active", void 0);
54
- export default ApexGridCell;
55
- //# sourceMappingURL=cell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cell.js","sourceRoot":"","sources":["../../../src/components/cell.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,6CAA6C,CAAC;AAGrE;;GAEG;AACH,MAAqB,YAA+B,SAAQ,UAAU;IAAtE;;QAuBE;;;WAGG;QAEI,WAAM,GAAG,KAAK,CAAC;IAqBxB,CAAC;IAhDQ,MAAM,KAAK,EAAE;QAClB,OAAO,aAAa,CAAC;IACvB,CAAC;IAIM,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;IA0BD,IAAc,OAAO;QACnB,OAAO;YACL,MAAM,EAAE,IAAI;YACZ,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,KAAK,EAAE,IAAI,CAAC,KAAK;SACe,CAAC;IACrC,CAAC;IAEkB,MAAM;QACvB,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY;YAC7B,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,OAAoC,CAAC;YACrE,CAAC,CAAC,IAAI,CAAA,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAC1B,CAAC;;AA3CsB,mBAAM,GAAG,MAAM,AAAT,CAAU;AAUhC;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;2CACA;AAMxB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4CACQ;AAOhC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACrB;eA5BH,YAAY","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { registerComponent } from '../internal/register.js';\nimport { GRID_CELL_TAG } from '../internal/tags.js';\nimport type { ApexCellContext, ColumnConfiguration, PropertyType } from '../internal/types.js';\nimport { styles } from '../styles/body-cell/body-cell-styles.css.js';\nimport type ApexGridRow from './row.js';\n\n/**\n * Component representing a DOM cell of the Apex grid.\n */\nexport default class ApexGridCell<T extends object> extends LitElement {\n public static get is() {\n return GRID_CELL_TAG;\n }\n\n public static override styles = styles;\n\n public static register() {\n registerComponent(this);\n }\n\n /**\n * The value which will be rendered by the component.\n */\n @property({ attribute: false })\n public value!: PropertyType<T>;\n\n /**\n * A reference to the column configuration object.\n */\n @property({ attribute: false })\n public column!: ColumnConfiguration<T>;\n\n /**\n * Indicates whether this is the active cell in the grid.\n *\n */\n @property({ type: Boolean, reflect: true })\n public active = false;\n\n /**\n * The parent row component holding this cell.\n */\n public row!: ApexGridRow<T>;\n\n protected get context(): ApexCellContext<T> {\n return {\n parent: this,\n row: this.row,\n column: this.column,\n value: this.value,\n } as unknown as ApexCellContext<T>;\n }\n\n protected override render() {\n return this.column.cellTemplate\n ? this.column.cellTemplate(this.context as ApexCellContext<T> as any)\n : html`${this.value}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [ApexGridCell.is]: ApexGridCell<object>;\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter-row.d.ts","sourceRoot":"","sources":["../../../src/components/filter-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAKhD,OAAO,E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,SAAS,CAAC,iBAAiB;IAmB3B,SAAS,CAAC,mBAAmB;IAmB7B,SAAS,CAAC,cAAc;IAmBxB,SAAS,CAAC,oBAAoB;IAW9B,SAAS,CAAC,eAAe;IAczB,SAAS,CAAC,iBAAiB;IAQ3B,SAAS,CAAC,mBAAmB,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC;IAkB5F,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAsB1D,SAAS,CAAC,mBAAmB;cAUV,MAAM;CAG1B;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;KAC3C;CACF"}
@@ -1,316 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- 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");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _ApexFilterRow_instances, _ApexFilterRow_setDefaultExpression, _ApexFilterRow_removeExpression, _ApexFilterRow_show, _ApexFilterRow_handleConditionChanged, _ApexFilterRow_handleInput, _ApexFilterRow_handleKeydown, _ApexFilterRow_handleResetClick, _ApexFilterRow_openDropdownList, _ApexFilterRow_chipCriteriaFor, _ApexFilterRow_chipSelectFor, _ApexFilterRow_chipRemoveFor;
13
- import { html, LitElement, nothing } from 'lit';
14
- import { consume } from '@lit-labs/context';
15
- import { property, query } from 'lit/decorators.js';
16
- import { ifDefined } from 'lit/directives/if-defined.js';
17
- import { gridStateContext } from '../controllers/state.js';
18
- import { DEFAULT_COLUMN_CONFIG } from '../internal/constants.js';
19
- import { GRID_FILTER_ROW_TAG } from '../internal/tags.js';
20
- import { getFilterOperandsFor } from '../internal/utils.js';
21
- import { registerComponent } from '../internal/register.js';
22
- import { watch } from '../internal/watch.js';
23
- import { styles } from '../styles/filter-row/filter-row-styles.css.js';
24
- import { IgcInputComponent, IgcDropdownComponent, } from 'igniteui-webcomponents';
25
- function prefixedIcon(icon) {
26
- return html `<igc-icon
27
- slot="prefix"
28
- name=${ifDefined(icon)}
29
- collection="internal"
30
- ></igc-icon>`;
31
- }
32
- class ApexFilterRow extends LitElement {
33
- constructor() {
34
- super(...arguments);
35
- _ApexFilterRow_instances.add(this);
36
- this.active = false;
37
- this.column = DEFAULT_COLUMN_CONFIG;
38
- }
39
- static get is() {
40
- return GRID_FILTER_ROW_TAG;
41
- }
42
- static register() {
43
- registerComponent(this);
44
- }
45
- get isNumeric() {
46
- return this.column.type === 'number';
47
- }
48
- get filterController() {
49
- return this.state.filtering;
50
- }
51
- get condition() {
52
- return this.expression.condition;
53
- }
54
- activeChanged() {
55
- this.style.display = this.active ? 'flex' : '';
56
- if (!this.active) {
57
- this.column = DEFAULT_COLUMN_CONFIG;
58
- }
59
- this.state.host.requestUpdate();
60
- }
61
- renderCriteriaButton(expr, index) {
62
- return index
63
- ? html `<igc-button
64
- variant="flat"
65
- @click=${__classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_chipCriteriaFor).call(this, expr)}
66
- >
67
- ${expr.criteria}
68
- </igc-button>`
69
- : nothing;
70
- }
71
- renderExpressionChip(props) {
72
- const { name, unary } = props.expression.condition;
73
- const { searchTerm: term } = props.expression;
74
- const prefix = html `<span slot="select"></span>${prefixedIcon(name)}`;
75
- return html `<igc-chip
76
- selectable
77
- removable
78
- ?selected=${props.selected}
79
- @igcRemove=${props.onRemove}
80
- @igcSelect=${props.onSelect}
81
- >
82
- ${prefix}${unary ? name : term}
83
- </igc-chip>`;
84
- }
85
- renderActiveChips() {
86
- const state = this.filterController.get(this.column.key);
87
- return !state
88
- ? nothing
89
- : Array.from(state).map((expression, idx) => {
90
- const props = {
91
- expression,
92
- selected: this.expression === expression,
93
- onRemove: __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_chipRemoveFor).call(this, expression),
94
- onSelect: __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_chipSelectFor).call(this, expression),
95
- };
96
- return html `${this.renderCriteriaButton(expression, idx)}${this.renderExpressionChip(props)}`;
97
- });
98
- }
99
- renderFilterActions() {
100
- return html `
101
- <igc-button
102
- id="reset"
103
- variant="flat"
104
- @click=${__classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_handleResetClick)}
105
- >
106
- ${prefixedIcon('refresh')} Reset
107
- </igc-button>
108
- <igc-button
109
- id="close"
110
- variant="flat"
111
- @click=${() => (this.active = false)}
112
- >
113
- ${prefixedIcon('close')} Close
114
- </igc-button>
115
- `;
116
- }
117
- renderDropdown() {
118
- return html `<igc-dropdown
119
- flip
120
- same-width
121
- @igcChange=${__classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_handleConditionChanged)}
122
- >
123
- ${Object.entries(getFilterOperandsFor(this.column)).map(([key, operand]) => {
124
- var _a;
125
- return html `
126
- <igc-dropdown-item
127
- .value=${key}
128
- ?selected=${this.condition.name === key}
129
- >
130
- ${prefixedIcon(key)}${(_a = operand === null || operand === void 0 ? void 0 : operand.label) !== null && _a !== void 0 ? _a : key}
131
- </igc-dropdown-item>
132
- `;
133
- })}
134
- </igc-dropdown>`;
135
- }
136
- renderDropdownTarget() {
137
- return html `<igc-icon
138
- id="condition"
139
- slot="prefix"
140
- collection="internal"
141
- .name=${this.condition.name}
142
- @click=${__classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_openDropdownList)}
143
- >
144
- </igc-icon>`;
145
- }
146
- renderInputArea() {
147
- return html `<igc-input
148
- outlined
149
- value=${ifDefined(this.expression.searchTerm)}
150
- placeholder="Add filter value"
151
- ?readonly=${this.condition.unary}
152
- @igcInput=${__classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_handleInput)}
153
- @keydown=${__classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_handleKeydown)}
154
- >
155
- ${this.renderDropdownTarget()}
156
- </igc-input>
157
- ${this.renderDropdown()}`;
158
- }
159
- renderActiveState() {
160
- return html `<div part="active-state">
161
- <div part="filter-row-input">${this.renderInputArea()}</div>
162
- <div part="filter-row-filters">${this.renderActiveChips()}</div>
163
- <div part="filter-row-actions">${this.renderFilterActions()}</div>
164
- </div> `;
165
- }
166
- renderInactiveChips(column, state) {
167
- return Array.from(state).map((expression, idx) => {
168
- const props = {
169
- expression,
170
- selected: false,
171
- onRemove: __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_chipRemoveFor).call(this, expression),
172
- onSelect: (e) => {
173
- e.stopPropagation();
174
- this.column = column;
175
- this.expression = expression;
176
- __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_show).call(this);
177
- },
178
- };
179
- return html `${this.renderCriteriaButton(expression, idx)}${this.renderExpressionChip(props)}`;
180
- });
181
- }
182
- renderFilterState(column) {
183
- const state = this.filterController.get(column.key);
184
- const partial = state && state.length < 3;
185
- const hidden = state && state.length >= 3;
186
- const open = () => {
187
- this.column = column;
188
- __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_setDefaultExpression).call(this);
189
- __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_show).call(this);
190
- };
191
- const count = hidden ? html `<span slot="suffix">${state.length}</span>` : nothing;
192
- const chip = html `<igc-chip
193
- data-column=${column.key}
194
- @click=${open}
195
- >${prefixedIcon('filter')}Filter${count}</igc-chip
196
- >`;
197
- return partial ? this.renderInactiveChips(column, state) : chip;
198
- }
199
- renderInactiveState() {
200
- return this.state.host.columns.map(column => column.hidden
201
- ? nothing
202
- : html `<div part="filter-row-preview">
203
- ${column.filter ? this.renderFilterState(column) : nothing}
204
- </div>`);
205
- }
206
- render() {
207
- return html `${this.active ? this.renderActiveState() : this.renderInactiveState()}`;
208
- }
209
- }
210
- _ApexFilterRow_instances = new WeakSet(), _ApexFilterRow_setDefaultExpression = function _ApexFilterRow_setDefaultExpression() {
211
- this.expression = this.filterController.getDefaultExpression(this.column);
212
- }, _ApexFilterRow_removeExpression = function _ApexFilterRow_removeExpression(expression) {
213
- this.filterController.removeExpression(expression);
214
- }, _ApexFilterRow_show = async function _ApexFilterRow_show() {
215
- var _a;
216
- this.active = true;
217
- await this.updateComplete;
218
- (_a = this.input) === null || _a === void 0 ? void 0 : _a.select();
219
- }, _ApexFilterRow_handleConditionChanged = function _ApexFilterRow_handleConditionChanged(event) {
220
- event.stopPropagation();
221
- const key = event.detail.value;
222
- // XXX: Types
223
- this.expression.condition = getFilterOperandsFor(this.column)[key];
224
- if (this.input.value || this.expression.condition.unary) {
225
- this.filterController.filterWithEvent(this.expression, 'modify');
226
- }
227
- this.requestUpdate();
228
- }, _ApexFilterRow_handleInput = function _ApexFilterRow_handleInput(event) {
229
- var _a;
230
- event.stopPropagation();
231
- const value = this.isNumeric ? parseFloat(event.detail) : event.detail;
232
- const shouldUpdate = this.isNumeric ? !isNaN(value) : !!value;
233
- const type = ((_a = this.filterController.get(this.expression.key)) === null || _a === void 0 ? void 0 : _a.has(this.expression))
234
- ? 'modify'
235
- : 'add';
236
- if (shouldUpdate) {
237
- this.expression.searchTerm = value;
238
- this.filterController.filterWithEvent(this.expression, type);
239
- }
240
- else {
241
- __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_removeExpression).call(this, this.expression);
242
- }
243
- this.requestUpdate();
244
- }, _ApexFilterRow_handleKeydown = function _ApexFilterRow_handleKeydown(event) {
245
- event.stopPropagation();
246
- switch (event.key) {
247
- case 'Enter':
248
- this.input.value = '';
249
- __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_setDefaultExpression).call(this);
250
- return;
251
- case 'Escape':
252
- this.active = false;
253
- return;
254
- default:
255
- return;
256
- }
257
- }, _ApexFilterRow_handleResetClick = function _ApexFilterRow_handleResetClick() {
258
- this.filterController.removeAllExpressions(this.column.key);
259
- this.requestUpdate();
260
- }, _ApexFilterRow_openDropdownList = function _ApexFilterRow_openDropdownList() {
261
- this.dropdown.toggle(this.input);
262
- }, _ApexFilterRow_chipCriteriaFor = function _ApexFilterRow_chipCriteriaFor(expression) {
263
- return async (e) => {
264
- e.stopPropagation();
265
- expression.criteria = expression.criteria === 'and' ? 'or' : 'and';
266
- this.filterController.filterWithEvent(expression, 'modify');
267
- this.requestUpdate();
268
- };
269
- }, _ApexFilterRow_chipSelectFor = function _ApexFilterRow_chipSelectFor(expression) {
270
- return async (e) => {
271
- var _a;
272
- e.stopPropagation();
273
- this.expression = expression;
274
- await this.updateComplete;
275
- (_a = this.input) === null || _a === void 0 ? void 0 : _a.select();
276
- };
277
- }, _ApexFilterRow_chipRemoveFor = function _ApexFilterRow_chipRemoveFor(expression) {
278
- return async (e) => {
279
- e.stopPropagation();
280
- __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_removeExpression).call(this, expression);
281
- if (this.active && this.expression === expression) {
282
- __classPrivateFieldGet(this, _ApexFilterRow_instances, "m", _ApexFilterRow_setDefaultExpression).call(this);
283
- await this.updateComplete;
284
- this.input.focus();
285
- }
286
- this.requestUpdate();
287
- };
288
- };
289
- ApexFilterRow.styles = styles;
290
- __decorate([
291
- consume({ context: gridStateContext, subscribe: true }),
292
- property({ attribute: false })
293
- ], ApexFilterRow.prototype, "state", void 0);
294
- __decorate([
295
- property({ attribute: false })
296
- ], ApexFilterRow.prototype, "active", void 0);
297
- __decorate([
298
- query(IgcInputComponent.tagName)
299
- ], ApexFilterRow.prototype, "input", void 0);
300
- __decorate([
301
- query('#condition')
302
- ], ApexFilterRow.prototype, "conditionElement", void 0);
303
- __decorate([
304
- query(IgcDropdownComponent.tagName)
305
- ], ApexFilterRow.prototype, "dropdown", void 0);
306
- __decorate([
307
- property({ attribute: false })
308
- ], ApexFilterRow.prototype, "column", void 0);
309
- __decorate([
310
- property({ attribute: false })
311
- ], ApexFilterRow.prototype, "expression", void 0);
312
- __decorate([
313
- watch('active', { waitUntilFirstUpdate: true })
314
- ], ApexFilterRow.prototype, "activeChanged", null);
315
- export default ApexFilterRow;
316
- //# sourceMappingURL=filter-row.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filter-row.js","sourceRoot":"","sources":["../../../src/components/filter-row.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAmB,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE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,CAAQ,EAAE,EAAE;QACxB,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,uBAAA,IAAI,iEAAkB,MAAtB,IAAI,EAAmB,UAAU,CAAC,CAAC;QAEnC,IAAI,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,UAAU,KAAK,UAAU,EAAE;YACjD,uBAAA,IAAI,qEAAsB,MAA1B,IAAI,CAAwB,CAAC;YAC7B,MAAM,IAAI,CAAC,cAAc,CAAC;YAC1B,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC;SACpB;QAED,IAAI,CAAC,aAAa,EAAE,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC;AA/JsB,oBAAM,GAAG,MAAM,AAAT,CAAU;AAQhC;IAFN,OAAO,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;IACvD,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;4CACG;AAe3B;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6CACT;AAGf;IADN,KAAK,CAAC,iBAAiB,CAAC,OAAO,CAAC;4CACA;AAG1B;IADN,KAAK,CAAC,YAAY,CAAC;uDACuB;AAGpC;IADN,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC;+CACG;AAGhC;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6CACyD;AAGjF;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;iDACS;AA+E9B;IADT,KAAK,CAAC,QAAQ,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;kDAS/C;eAlIkB,aAAa","sourcesContent":["import { html, LitElement, nothing } from 'lit';\nimport { consume } from '@lit-labs/context';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\nimport { StateController, gridStateContext } from '../controllers/state.js';\nimport { DEFAULT_COLUMN_CONFIG } from '../internal/constants.js';\nimport { GRID_FILTER_ROW_TAG } from '../internal/tags.js';\nimport { getFilterOperandsFor } from '../internal/utils.js';\nimport { registerComponent } from '../internal/register.js';\nimport { watch } from '../internal/watch.js';\n\nimport { styles } from '../styles/filter-row/filter-row-styles.css.js';\n\nimport type { FilterExpressionTree } from '../operations/filter/tree.js';\nimport type { FilterExpression, FilterOperation, OperandKeys } from '../operations/filter/types.js';\nimport type { ColumnConfiguration } from '../internal/types.js';\nimport {\n IgcInputComponent,\n IgcDropdownComponent,\n IgcDropdownItemComponent,\n IgcIconComponent,\n} from 'igniteui-webcomponents';\n\ntype ExpressionChipProps<T> = {\n expression: FilterExpression<T>;\n selected: boolean;\n onRemove: Function;\n onSelect: Function;\n};\n\nfunction prefixedIcon(icon?: string) {\n return html`<igc-icon\n slot=\"prefix\"\n name=${ifDefined(icon)}\n collection=\"internal\"\n ></igc-icon>`;\n}\n\nexport default class ApexFilterRow<T extends object> extends LitElement {\n public static get is() {\n return GRID_FILTER_ROW_TAG;\n }\n\n public static override styles = styles;\n\n public static register() {\n registerComponent(this);\n }\n\n @consume({ context: gridStateContext, subscribe: true })\n @property({ attribute: false })\n public state!: StateController<T>;\n\n protected get isNumeric() {\n return this.column.type === 'number';\n }\n\n protected get filterController() {\n return this.state.filtering;\n }\n\n protected get condition() {\n return this.expression.condition as FilterOperation<T>;\n }\n\n @property({ attribute: false })\n public active = false;\n\n @query(IgcInputComponent.tagName)\n public input!: IgcInputComponent;\n\n @query('#condition')\n public conditionElement!: IgcIconComponent;\n\n @query(IgcDropdownComponent.tagName)\n public dropdown!: IgcDropdownComponent;\n\n @property({ attribute: false })\n public column: ColumnConfiguration<T> = DEFAULT_COLUMN_CONFIG as ColumnConfiguration<T>;\n\n @property({ attribute: false })\n public expression!: FilterExpression<T>;\n\n #setDefaultExpression() {\n this.expression = this.filterController.getDefaultExpression(this.column);\n }\n\n #removeExpression(expression: FilterExpression<T>) {\n this.filterController.removeExpression(expression);\n }\n\n async #show() {\n this.active = true;\n\n await this.updateComplete;\n this.input?.select();\n }\n\n #handleConditionChanged(event: CustomEvent<IgcDropdownItemComponent>) {\n event.stopPropagation();\n const key = event.detail.value as OperandKeys<T[typeof this.column.key]>;\n\n // XXX: Types\n this.expression.condition = (getFilterOperandsFor(this.column) as any)[key] as FilterOperation<\n T[keyof T]\n >;\n\n if (this.input.value || this.expression.condition.unary) {\n this.filterController.filterWithEvent(this.expression, 'modify');\n }\n\n this.requestUpdate();\n }\n\n #handleInput(event: CustomEvent<string>) {\n event.stopPropagation();\n\n const value = this.isNumeric ? parseFloat(event.detail) : event.detail;\n const shouldUpdate = this.isNumeric ? !isNaN(value as number) : !!value;\n const type = this.filterController.get(this.expression.key)?.has(this.expression)\n ? 'modify'\n : 'add';\n\n if (shouldUpdate) {\n this.expression.searchTerm = value as any;\n\n this.filterController.filterWithEvent(this.expression, type);\n } else {\n this.#removeExpression(this.expression);\n }\n\n this.requestUpdate();\n }\n\n #handleKeydown(event: KeyboardEvent) {\n event.stopPropagation();\n\n switch (event.key) {\n case 'Enter':\n this.input.value = '';\n this.#setDefaultExpression();\n return;\n case 'Escape':\n this.active = false;\n return;\n default:\n return;\n }\n }\n\n #handleResetClick() {\n this.filterController.removeAllExpressions(this.column.key);\n this.requestUpdate();\n }\n\n #openDropdownList() {\n this.dropdown.toggle(this.input);\n }\n\n @watch('active', { waitUntilFirstUpdate: true })\n protected activeChanged() {\n this.style.display = this.active ? 'flex' : '';\n\n if (!this.active) {\n this.column = DEFAULT_COLUMN_CONFIG as ColumnConfiguration<T>;\n }\n\n this.state.host.requestUpdate();\n }\n\n #chipCriteriaFor(expression: FilterExpression<T>) {\n return async (e: Event) => {\n e.stopPropagation();\n\n expression.criteria = expression.criteria === 'and' ? 'or' : 'and';\n this.filterController.filterWithEvent(expression, 'modify');\n this.requestUpdate();\n };\n }\n\n #chipSelectFor(expression: FilterExpression<T>) {\n return async (e: Event) => {\n e.stopPropagation();\n this.expression = expression;\n await this.updateComplete;\n this.input?.select();\n };\n }\n\n #chipRemoveFor(expression: FilterExpression<T>) {\n return async (e: Event) => {\n e.stopPropagation();\n this.#removeExpression(expression);\n\n if (this.active && this.expression === expression) {\n this.#setDefaultExpression();\n await this.updateComplete;\n this.input.focus();\n }\n\n this.requestUpdate();\n };\n }\n\n protected renderCriteriaButton(expr: FilterExpression<T>, index: number) {\n return index\n ? html`<igc-button\n variant=\"flat\"\n @click=${this.#chipCriteriaFor(expr)}\n >\n ${expr.criteria}\n </igc-button>`\n : nothing;\n }\n\n protected renderExpressionChip(props: ExpressionChipProps<T>) {\n const { name, unary } = props.expression.condition as FilterOperation<T>;\n const { searchTerm: term } = props.expression;\n\n const prefix = html`<span slot=\"select\"></span>${prefixedIcon(name)}`;\n\n return html`<igc-chip\n selectable\n removable\n ?selected=${props.selected}\n @igcRemove=${props.onRemove}\n @igcSelect=${props.onSelect}\n >\n ${prefix}${unary ? name : term}\n </igc-chip>`;\n }\n\n protected renderActiveChips() {\n const state = this.filterController.get(this.column.key);\n\n return !state\n ? nothing\n : Array.from(state).map((expression, idx) => {\n const props: ExpressionChipProps<T> = {\n expression,\n selected: this.expression === expression,\n onRemove: this.#chipRemoveFor(expression),\n onSelect: this.#chipSelectFor(expression),\n };\n\n return html`${this.renderCriteriaButton(expression, idx)}${this.renderExpressionChip(\n props,\n )}`;\n });\n }\n\n protected renderFilterActions() {\n return html`\n <igc-button\n id=\"reset\"\n variant=\"flat\"\n @click=${this.#handleResetClick}\n >\n ${prefixedIcon('refresh')} Reset\n </igc-button>\n <igc-button\n id=\"close\"\n variant=\"flat\"\n @click=${() => (this.active = false)}\n >\n ${prefixedIcon('close')} Close\n </igc-button>\n `;\n }\n\n protected renderDropdown() {\n return html`<igc-dropdown\n flip\n same-width\n @igcChange=${this.#handleConditionChanged}\n >\n ${Object.entries(getFilterOperandsFor(this.column)).map(\n ([key, operand]) => html`\n <igc-dropdown-item\n .value=${key}\n ?selected=${this.condition.name === key}\n >\n ${prefixedIcon(key)}${operand?.label ?? key}\n </igc-dropdown-item>\n `,\n )}\n </igc-dropdown>`;\n }\n\n protected renderDropdownTarget() {\n return html`<igc-icon\n id=\"condition\"\n slot=\"prefix\"\n collection=\"internal\"\n .name=${this.condition.name}\n @click=${this.#openDropdownList}\n >\n </igc-icon>`;\n }\n\n protected renderInputArea() {\n return html`<igc-input\n outlined\n value=${ifDefined(this.expression.searchTerm)}\n placeholder=\"Add filter value\"\n ?readonly=${this.condition.unary}\n @igcInput=${this.#handleInput}\n @keydown=${this.#handleKeydown}\n >\n ${this.renderDropdownTarget()}\n </igc-input>\n ${this.renderDropdown()}`;\n }\n\n protected renderActiveState() {\n return html`<div part=\"active-state\">\n <div part=\"filter-row-input\">${this.renderInputArea()}</div>\n <div part=\"filter-row-filters\">${this.renderActiveChips()}</div>\n <div part=\"filter-row-actions\">${this.renderFilterActions()}</div>\n </div> `;\n }\n\n protected renderInactiveChips(column: ColumnConfiguration<T>, state: FilterExpressionTree<T>) {\n return Array.from(state).map((expression, idx) => {\n const props: ExpressionChipProps<T> = {\n expression,\n selected: false,\n onRemove: this.#chipRemoveFor(expression),\n onSelect: (e: Event) => {\n e.stopPropagation();\n this.column = column;\n this.expression = expression;\n this.#show();\n },\n };\n\n return html`${this.renderCriteriaButton(expression, idx)}${this.renderExpressionChip(props)}`;\n });\n }\n\n protected renderFilterState(column: ColumnConfiguration<T>) {\n const state = this.filterController.get(column.key);\n\n const partial = state && state.length < 3;\n const hidden = state && state.length >= 3;\n\n const open = () => {\n this.column = column;\n this.#setDefaultExpression();\n this.#show();\n };\n\n const count = hidden ? html`<span slot=\"suffix\">${state.length}</span>` : nothing;\n const chip = html`<igc-chip\n data-column=${column.key}\n @click=${open}\n >${prefixedIcon('filter')}Filter${count}</igc-chip\n >`;\n\n return partial ? this.renderInactiveChips(column, state) : chip;\n }\n\n protected renderInactiveState() {\n return this.state.host.columns.map(column =>\n column.hidden\n ? nothing\n : html`<div part=\"filter-row-preview\">\n ${column.filter ? this.renderFilterState(column) : nothing}\n </div>`,\n );\n }\n\n protected override render() {\n return html`${this.active ? this.renderActiveState() : this.renderInactiveState()}`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n [ApexFilterRow.is]: ApexFilterRow<object>;\n }\n}\n"]}