apex-grid 3.6.0 → 4.0.0-beta.2

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 (151) hide show
  1. package/CHANGELOG.md +301 -0
  2. package/LICENSE.md +2 -1
  3. package/README.md +117 -18
  4. package/components/cell.d.ts +13 -1
  5. package/components/cell.js +28 -13
  6. package/components/cell.js.map +1 -1
  7. package/components/grid.d.ts +175 -28
  8. package/components/grid.js +183 -63
  9. package/components/grid.js.map +1 -1
  10. package/components/header-row.d.ts +0 -6
  11. package/components/header-row.js +1 -19
  12. package/components/header-row.js.map +1 -1
  13. package/components/header.js +39 -2
  14. package/components/header.js.map +1 -1
  15. package/components/paginator.d.ts +20 -5
  16. package/components/paginator.js +54 -17
  17. package/components/paginator.js.map +1 -1
  18. package/components/row.js +149 -40
  19. package/components/row.js.map +1 -1
  20. package/components/toolbar.d.ts +5 -1
  21. package/components/toolbar.js +4 -1
  22. package/components/toolbar.js.map +1 -1
  23. package/components/virtualize-rows.d.ts +38 -0
  24. package/components/virtualize-rows.js +286 -0
  25. package/components/virtualize-rows.js.map +1 -0
  26. package/components/virtualizer.d.ts +71 -1
  27. package/components/virtualizer.js +105 -29
  28. package/components/virtualizer.js.map +1 -1
  29. package/controllers/dom.d.ts +10 -3
  30. package/controllers/dom.js +5 -5
  31. package/controllers/dom.js.map +1 -1
  32. package/controllers/navigation.d.ts +63 -0
  33. package/controllers/navigation.js +295 -21
  34. package/controllers/navigation.js.map +1 -1
  35. package/controllers/pagination.d.ts +7 -6
  36. package/controllers/pagination.js +27 -28
  37. package/controllers/pagination.js.map +1 -1
  38. package/controllers/row-pin.d.ts +6 -0
  39. package/controllers/row-pin.js +8 -2
  40. package/controllers/row-pin.js.map +1 -1
  41. package/controllers/row-reorder.d.ts +12 -4
  42. package/controllers/row-reorder.js +20 -6
  43. package/controllers/row-reorder.js.map +1 -1
  44. package/controllers/selection.d.ts +32 -10
  45. package/controllers/selection.js +33 -10
  46. package/controllers/selection.js.map +1 -1
  47. package/controllers/sort.js +2 -3
  48. package/controllers/sort.js.map +1 -1
  49. package/controllers/state.d.ts +18 -5
  50. package/controllers/state.js +53 -46
  51. package/controllers/state.js.map +1 -1
  52. package/custom-elements.json +1762 -339
  53. package/docs/assets/hierarchy.js +1 -1
  54. package/docs/assets/search.js +1 -1
  55. package/docs/classes/ApexGrid.html +166 -66
  56. package/docs/classes/ApexGridPaginator.html +39 -8
  57. package/docs/classes/ApexGridToolbar.html +9 -5
  58. package/docs/functions/localize.html +2 -2
  59. package/docs/hierarchy.html +1 -1
  60. package/docs/index.html +123 -20
  61. package/docs/interfaces/ApexPageChangedEvent.html +3 -1
  62. package/docs/interfaces/BaseApexCellContext.html +18 -5
  63. package/docs/interfaces/BaseApexEditorContext.html +20 -5
  64. package/docs/interfaces/BaseFilterExpression.html +1 -1
  65. package/docs/interfaces/CSVExportOptions.html +1 -1
  66. package/docs/interfaces/DataPipelineConfiguration.html +4 -9
  67. package/docs/interfaces/ExportOptions.html +1 -1
  68. package/docs/interfaces/GridSelectionConfiguration.html +19 -4
  69. package/docs/interfaces/PaginationConfiguration.html +11 -4
  70. package/docs/interfaces/PaginationState.html +4 -2
  71. package/docs/media/_token-values.scss +42 -16
  72. package/docs/media/package.json +12 -4
  73. package/docs/types/DataPipelineParams.html +2 -2
  74. package/docs/types/PaginationMode.html +5 -4
  75. package/docs/variables/EN_LOCALE.html +2 -2
  76. package/i18n/en.d.ts +2 -0
  77. package/i18n/en.js +2 -0
  78. package/i18n/en.js.map +1 -1
  79. package/i18n/es.js +2 -0
  80. package/i18n/es.js.map +1 -1
  81. package/ignite-ui.d.ts +1 -0
  82. package/ignite-ui.js +4 -0
  83. package/ignite-ui.js.map +1 -0
  84. package/internal/column-types.d.ts +11 -1
  85. package/internal/column-types.js +8 -6
  86. package/internal/column-types.js.map +1 -1
  87. package/internal/design-system.d.ts +32 -0
  88. package/internal/design-system.js +66 -0
  89. package/internal/design-system.js.map +1 -0
  90. package/internal/export.d.ts +6 -0
  91. package/internal/export.js +4 -0
  92. package/internal/export.js.map +1 -1
  93. package/internal/feature-module.d.ts +7 -0
  94. package/internal/feature-module.js.map +1 -1
  95. package/internal/flip.d.ts +28 -16
  96. package/internal/flip.js +42 -10
  97. package/internal/flip.js.map +1 -1
  98. package/internal/icons.d.ts +2 -16
  99. package/internal/icons.js +0 -8
  100. package/internal/icons.js.map +1 -1
  101. package/internal/ignite-ui.d.ts +10 -0
  102. package/internal/ignite-ui.js +118 -0
  103. package/internal/ignite-ui.js.map +1 -0
  104. package/internal/index.d.ts +4 -2
  105. package/internal/index.js +3 -2
  106. package/internal/index.js.map +1 -1
  107. package/internal/types.d.ts +75 -19
  108. package/internal/types.js.map +1 -1
  109. package/operations/filter/types.d.ts +1 -1
  110. package/operations/filter/types.js.map +1 -1
  111. package/package.json +7 -2
  112. package/styles/_token-blocks.css.d.ts +1 -0
  113. package/styles/_token-blocks.css.js +3 -0
  114. package/styles/_token-blocks.css.js.map +1 -0
  115. package/styles/_tokens.css.js +1 -1
  116. package/styles/_tokens.css.js.map +1 -1
  117. package/styles/body-cell/body-cell.css.js +1 -1
  118. package/styles/body-cell/body-cell.css.js.map +1 -1
  119. package/styles/body-cell/cell-renderers.css.js +1 -1
  120. package/styles/body-cell/cell-renderers.css.js.map +1 -1
  121. package/styles/body-row/body-row.css.js +1 -1
  122. package/styles/body-row/body-row.css.js.map +1 -1
  123. package/styles/document-tokens.css.js +1 -1
  124. package/styles/document-tokens.css.js.map +1 -1
  125. package/styles/grid/_grid.base.css.js +1 -1
  126. package/styles/grid/_grid.base.css.js.map +1 -1
  127. package/styles/grid/grid.css.js +1 -1
  128. package/styles/grid/grid.css.js.map +1 -1
  129. package/styles/group-header-row/group-header-row.css.js +1 -1
  130. package/styles/group-header-row/group-header-row.css.js.map +1 -1
  131. package/styles/header-cell/header-cell.css.js +1 -1
  132. package/styles/header-cell/header-cell.css.js.map +1 -1
  133. package/styles/header-row/header-row.base.css.js +1 -1
  134. package/styles/header-row/header-row.base.css.js.map +1 -1
  135. package/styles/ignite-ui/ignite-ui-dark.css.d.ts +1 -0
  136. package/styles/ignite-ui/ignite-ui-dark.css.js +3 -0
  137. package/styles/ignite-ui/ignite-ui-dark.css.js.map +1 -0
  138. package/styles/ignite-ui/ignite-ui-document.css.d.ts +1 -0
  139. package/styles/ignite-ui/ignite-ui-document.css.js +3 -0
  140. package/styles/ignite-ui/ignite-ui-document.css.js.map +1 -0
  141. package/styles/ignite-ui/ignite-ui.css.d.ts +1 -0
  142. package/styles/ignite-ui/ignite-ui.css.js +3 -0
  143. package/styles/ignite-ui/ignite-ui.css.js.map +1 -0
  144. package/styles/paginator/paginator.css.js +1 -1
  145. package/styles/paginator/paginator.css.js.map +1 -1
  146. package/styles/toolbar/toolbar.css.js +1 -1
  147. package/styles/toolbar/toolbar.css.js.map +1 -1
  148. package/tokens.css +14 -15
  149. package/operations/pagination.d.ts +0 -19
  150. package/operations/pagination.js +0 -12
  151. package/operations/pagination.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/internal/icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA0B,GAAG,EAAuB,MAAM,KAAK,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAYzD,MAAM,aAAa,GAA4B;IAC7C,GAAG,EAAE;QACH,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,GAAG,CAAA,+FAA+F;KAC1G;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,GAAG,CAAA,+lBAA+lB;KAC1mB;IACD,cAAc,EAAE;QACd,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,GAAG,CAAA,8nBAA8nB;KACzoB;IACD,WAAW,EAAE;QACX,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,GAAG,CAAA,iEAAiE;KAC5E;IACD,kBAAkB,EAAE;QA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AgB;IAC9B,OAAO,IAAI,CAAA;;;;;;;;;;;;;KAaR,GAAG,CAAA,mFAAmF,QAAQ,CAAC;AACpG,CAAC","sourcesContent":["import { html, type SVGTemplateResult, svg, type TemplateResult } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\ninterface IconDef {\n viewBox: string;\n paths: SVGTemplateResult;\n /** When true, renders stroke=\"currentColor\" fill=\"none\" (Lucide style). */\n stroke?: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Filter-operand icons — fill-based, no Lucide equivalents.\n// ---------------------------------------------------------------------------\nconst OPERAND_ICONS: Record<string, IconDef> = {\n all: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M2 14h8v2H2zm0-8h12v2H2zm14 11l-3-3-1.5 1.5L16 20l7-7-1.5-1.5L16 17zM2 10h12v2H2z\"/>`,\n },\n contains: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n doesNotContain: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n greaterThan: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M6 7.11L15.09 12 6 16.89V19l12-6.46v-1.08L6 5v2.11z\"/>`,\n },\n greaterThanOrEqual: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M5.99 19h12.02v2H5.99zM18 9.47L6 3v2.11L15.09 10 6 14.9v2.11l12-6.47V9.47z\"/>`,\n },\n empty: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M5 17h2v2H5zm8 0h2v2h-2zm-8-4h2v2H5zm12 4h2v2h-2zM13 5h2v2h-2zM9 17h2v2H9zm8-8h2v2h-2zm0 4h2v2h-2zm0-8h2v2h-2zM5 9h2v2H5zm0-4h2v2H5zm4 0h2v2H9z\"/>`,\n },\n endsWith: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n equals: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M5 13.5h14v2H5zm0-5h14v2H5z\"/>`,\n },\n false: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M8 5a7 7 0 107 7 7 7 0 00-8-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\"/>`,\n },\n lessThan: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M6 12.54L18 19v-2.11L8.91 12 18 7.11V5L6 11.46v1.08z\"/>`,\n },\n lessThanOrEqual: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M5.99 19h12.02v2H5.99zM18 14.9L8.91 10 18 5.11V3L6 9.47v1.07l12 6.47V14.9z\"/>`,\n },\n notEmpty: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n doesNotEqual: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n startsWith: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n true: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n};\n\n// ---------------------------------------------------------------------------\n// Lucide UI-chrome icons — stroke-based, consistent family.\n// ---------------------------------------------------------------------------\nconst CHROME_ICONS: Record<string, IconDef> = {\n // ListFilter: three lines of decreasing width (funnel metaphor)\n filter: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M3 6h18M7 12h10M11 18h2\"/>`,\n },\n // Three-dots vertical menu (filled circles — intentionally fill, not stroke)\n 'more-vert': {\n viewBox: '0 0 24 24',\n paths: svg`<circle cx=\"12\" cy=\"5\" r=\"1.5\"/><circle cx=\"12\" cy=\"12\" r=\"1.5\"/><circle cx=\"12\" cy=\"19\" r=\"1.5\"/>`,\n },\n // X close\n close: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M18 6 6 18M6 6l12 12\"/>`,\n },\n // RotateCcw reset\n refresh: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\"/><path d=\"M3 3v5h5\"/>`,\n },\n // Search\n search: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<circle cx=\"11\" cy=\"11\" r=\"8\"/><path d=\"m21 21-4.35-4.35\"/>`,\n },\n // ChevronDown\n 'chevron-down': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m6 9 6 6 6-6\"/>`,\n },\n // ArrowUp (used by expansion and group row icons)\n 'arrow-upward': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M12 19V5\"/><path d=\"m5 12 7-7 7 7\"/>`,\n },\n // ArrowDown\n 'arrow-downward': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M12 5v14\"/><path d=\"m19 12-7 7-7-7\"/>`,\n },\n // Download\n download: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/><polyline points=\"7 10 12 15 17 10\"/><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"/>`,\n },\n // Star\n star: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<polygon points=\"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2\"/>`,\n },\n // Column menu: sort ascending (ArrowUpWideNarrow)\n 'sort-asc': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m3 8 4-4 4 4\"/><path d=\"M7 4v16\"/><path d=\"M11 12h4\"/><path d=\"M11 16h7\"/><path d=\"M11 20h10\"/>`,\n },\n // Column menu: sort descending (ArrowDownWideNarrow)\n 'sort-desc': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m3 16 4 4 4-4\"/><path d=\"M7 20V4\"/><path d=\"M11 4h10\"/><path d=\"M11 8h7\"/><path d=\"M11 12h4\"/>`,\n },\n // Paginator\n 'page-first': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m17 18-6-6 6-6\"/><path d=\"M7 6v12\"/>`,\n },\n 'page-previous': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m15 18-6-6 6-6\"/>`,\n },\n 'page-next': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m9 18 6-6-6-6\"/>`,\n },\n 'page-last': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m7 18 6-6-6-6\"/><path d=\"M17 6v12\"/>`,\n },\n};\n\nconst ICONS: Record<string, IconDef> = { ...OPERAND_ICONS, ...CHROME_ICONS };\n\nexport type GridIconName = keyof typeof ICONS;\n\nexport interface IconRenderOptions {\n /** Lit `slot` attribute. Useful when icons sit inside slotted positions of other components. */\n slot?: string;\n /** Lit `part` attribute. */\n part?: string;\n /** Inline `class` attribute. */\n class?: string;\n /** When provided, sets `data-sort-index` (used by the header sort indicator). */\n sortIndex?: number | string;\n}\n\n/**\n * Renders one of the grid's built-in icons as an inline `<svg>`. Lucide-based\n * icons (`stroke: true`) render as `stroke=\"currentColor\" fill=\"none\"`;\n * legacy fill icons render as `fill=\"currentColor\"`.\n */\nexport function renderIcon(name: string, opts: IconRenderOptions = {}): TemplateResult {\n const icon = ICONS[name];\n if (!icon) return html``;\n const isStroke = Boolean(icon.stroke);\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=${icon.viewBox}\n fill=${isStroke ? 'none' : 'currentColor'}\n stroke=${ifDefined(isStroke ? 'currentColor' : undefined)}\n stroke-width=${ifDefined(isStroke ? '2' : undefined)}\n stroke-linecap=${ifDefined(isStroke ? 'round' : undefined)}\n stroke-linejoin=${ifDefined(isStroke ? 'round' : undefined)}\n aria-hidden=\"true\"\n focusable=\"false\"\n data-icon=${name}\n slot=${ifDefined(opts.slot)}\n part=${ifDefined(opts.part)}\n class=${ifDefined(opts.class)}\n data-sort-index=${ifDefined(opts.sortIndex)}\n >${icon.paths}</svg>`;\n}\n\n/**\n * Renders the stacked up/down sort affordance (Lucide ChevronsUpDown split\n * into two independently-styleable parts). The header CSS dims both chevrons\n * at rest, lifts the inactive one on hover, and paints the active direction\n * in the brand color via `data-sort-active` on the parent button.\n */\nexport function renderSortArrows(): TemplateResult {\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"5 3 14 18\"\n width=\"7\"\n height=\"9\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n part=\"sort-arrows\"\n >${svg`<path part=\"sort-up\" d=\"M7 9l5-5 5 5\"/><path part=\"sort-down\" d=\"M7 15l5 5 5-5\"/>`}</svg>`;\n}\n"]}
1
+ {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../src/internal/icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA0B,GAAG,EAAuB,MAAM,KAAK,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAYzD,MAAM,aAAa,GAA4B;IAC7C,GAAG,EAAE;QACH,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,GAAG,CAAA,+FAA+F;KAC1G;IACD,QAAQ,EAAE;QACR,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,GAAG,CAAA,+lBAA+lB;KAC1mB;IACD,cAAc,EAAE;QACd,OAAO,EAAE,WAAW;QACpB,KAAK,EAAE,GAAG,CAAA,8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emplateResult, svg, type TemplateResult } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\n\ninterface IconDef {\n viewBox: string;\n paths: SVGTemplateResult;\n /** When true, renders stroke=\"currentColor\" fill=\"none\" (Lucide style). */\n stroke?: boolean;\n}\n\n// ---------------------------------------------------------------------------\n// Filter-operand icons — fill-based, no Lucide equivalents.\n// ---------------------------------------------------------------------------\nconst OPERAND_ICONS: Record<string, IconDef> = {\n all: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M2 14h8v2H2zm0-8h12v2H2zm14 11l-3-3-1.5 1.5L16 20l7-7-1.5-1.5L16 17zM2 10h12v2H2z\"/>`,\n },\n contains: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n doesNotContain: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n greaterThan: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M6 7.11L15.09 12 6 16.89V19l12-6.46v-1.08L6 5v2.11z\"/>`,\n },\n greaterThanOrEqual: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M5.99 19h12.02v2H5.99zM18 9.47L6 3v2.11L15.09 10 6 14.9v2.11l12-6.47V9.47z\"/>`,\n },\n empty: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M5 17h2v2H5zm8 0h2v2h-2zm-8-4h2v2H5zm12 4h2v2h-2zM13 5h2v2h-2zM9 17h2v2H9zm8-8h2v2h-2zm0 4h2v2h-2zm0-8h2v2h-2zM5 9h2v2H5zm0-4h2v2H5zm4 0h2v2H9z\"/>`,\n },\n endsWith: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n equals: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M5 13.5h14v2H5zm0-5h14v2H5z\"/>`,\n },\n false: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M8 5a7 7 0 107 7 7 7 0 00-8-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\"/>`,\n },\n lessThan: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M6 12.54L18 19v-2.11L8.91 12 18 7.11V5L6 11.46v1.08z\"/>`,\n },\n lessThanOrEqual: {\n viewBox: '0 0 24 24',\n paths: svg`<path d=\"M5.99 19h12.02v2H5.99zM18 14.9L8.91 10 18 5.11V3L6 9.47v1.07l12 6.47V14.9z\"/>`,\n },\n notEmpty: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n doesNotEqual: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n startsWith: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n true: {\n viewBox: '0 0 24 24',\n paths: svg`<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\"/>`,\n },\n};\n\n// ---------------------------------------------------------------------------\n// Lucide UI-chrome icons — stroke-based, consistent family.\n// ---------------------------------------------------------------------------\nconst CHROME_ICONS: Record<string, IconDef> = {\n // ListFilter: three lines of decreasing width (funnel metaphor)\n filter: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M3 6h18M7 12h10M11 18h2\"/>`,\n },\n // Three-dots vertical menu (filled circles — intentionally fill, not stroke)\n 'more-vert': {\n viewBox: '0 0 24 24',\n paths: svg`<circle cx=\"12\" cy=\"5\" r=\"1.5\"/><circle cx=\"12\" cy=\"12\" r=\"1.5\"/><circle cx=\"12\" cy=\"19\" r=\"1.5\"/>`,\n },\n // X close\n close: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M18 6 6 18M6 6l12 12\"/>`,\n },\n // RotateCcw reset\n refresh: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\"/><path d=\"M3 3v5h5\"/>`,\n },\n // Search\n search: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<circle cx=\"11\" cy=\"11\" r=\"8\"/><path d=\"m21 21-4.35-4.35\"/>`,\n },\n // ChevronDown\n 'chevron-down': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m6 9 6 6 6-6\"/>`,\n },\n // ArrowUp (column menu: Autosize)\n 'arrow-upward': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M12 19V5\"/><path d=\"m5 12 7-7 7 7\"/>`,\n },\n // Download\n download: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\"/><polyline points=\"7 10 12 15 17 10\"/><line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\"/>`,\n },\n // Star\n star: {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<polygon points=\"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2\"/>`,\n },\n // Column menu: sort ascending (ArrowUpWideNarrow)\n 'sort-asc': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m3 8 4-4 4 4\"/><path d=\"M7 4v16\"/><path d=\"M11 12h4\"/><path d=\"M11 16h7\"/><path d=\"M11 20h10\"/>`,\n },\n // Column menu: sort descending (ArrowDownWideNarrow)\n 'sort-desc': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m3 16 4 4 4-4\"/><path d=\"M7 20V4\"/><path d=\"M11 4h10\"/><path d=\"M11 8h7\"/><path d=\"M11 12h4\"/>`,\n },\n // Paginator\n 'page-first': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m17 18-6-6 6-6\"/><path d=\"M7 6v12\"/>`,\n },\n 'page-previous': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m15 18-6-6 6-6\"/>`,\n },\n 'page-next': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m9 18 6-6-6-6\"/>`,\n },\n 'page-last': {\n viewBox: '0 0 24 24',\n stroke: true,\n paths: svg`<path d=\"m7 18 6-6-6-6\"/><path d=\"M17 6v12\"/>`,\n },\n};\n\nconst ICONS: Record<string, IconDef> = { ...OPERAND_ICONS, ...CHROME_ICONS };\n\ninterface IconRenderOptions {\n /** Lit `part` attribute. */\n part?: string;\n}\n\n/**\n * Renders one of the grid's built-in icons as an inline `<svg>`. Lucide-based\n * icons (`stroke: true`) render as `stroke=\"currentColor\" fill=\"none\"`;\n * legacy fill icons render as `fill=\"currentColor\"`.\n */\nexport function renderIcon(name: string, opts: IconRenderOptions = {}): TemplateResult {\n const icon = ICONS[name];\n if (!icon) return html``;\n const isStroke = Boolean(icon.stroke);\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=${icon.viewBox}\n fill=${isStroke ? 'none' : 'currentColor'}\n stroke=${ifDefined(isStroke ? 'currentColor' : undefined)}\n stroke-width=${ifDefined(isStroke ? '2' : undefined)}\n stroke-linecap=${ifDefined(isStroke ? 'round' : undefined)}\n stroke-linejoin=${ifDefined(isStroke ? 'round' : undefined)}\n aria-hidden=\"true\"\n focusable=\"false\"\n data-icon=${name}\n part=${ifDefined(opts.part)}\n >${icon.paths}</svg>`;\n}\n\n/**\n * Renders the stacked up/down sort affordance (Lucide ChevronsUpDown split\n * into two independently-styleable parts). The header CSS dims both chevrons\n * at rest, lifts the inactive one on hover, and paints the active direction\n * in the brand color via `data-sort-active` on the parent button.\n */\nexport function renderSortArrows(): TemplateResult {\n return html`<svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"5 3 14 18\"\n width=\"7\"\n height=\"9\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n focusable=\"false\"\n part=\"sort-arrows\"\n >${svg`<path part=\"sort-up\" d=\"M7 9l5-5 5 5\"/><path part=\"sort-down\" d=\"M7 15l5 5 5-5\"/>`}</svg>`;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { DesignSystemStyles } from './design-system.js';
2
+ /**
3
+ * Overrides the style-query probe.
4
+ *
5
+ * @internal Test-only: `false` runs the fallback in a browser that has style
6
+ * queries, `null` probes again.
7
+ */
8
+ export declare function setStyleQuerySupport(value: boolean | null): void;
9
+ /** The add-on as the grid registers it. */
10
+ export declare const IGNITE_UI_STYLES: DesignSystemStyles;
@@ -0,0 +1,118 @@
1
+ import { styles as shadowStyles } from '../styles/ignite-ui/ignite-ui.css.js';
2
+ import { styles as darkVariantStyles } from '../styles/ignite-ui/ignite-ui-dark.css.js';
3
+ import { styles as documentStyles } from '../styles/ignite-ui/ignite-ui-document.css.js';
4
+ const VARIANT = '--ig-theme-variant';
5
+ let styleQueries = null;
6
+ export function setStyleQuerySupport(value) {
7
+ styleQueries = value;
8
+ for (const doc of sheets.keys()) {
9
+ if (!supportsStyleQueries(doc))
10
+ watch(doc);
11
+ refresh(doc);
12
+ }
13
+ }
14
+ function probe(doc) {
15
+ const host = doc.createElement('div');
16
+ const parent = doc.body ?? doc.documentElement;
17
+ if (!parent || typeof host.attachShadow !== 'function')
18
+ return false;
19
+ host.style.setProperty('--_ag-probe', 'on');
20
+ const shadow = host.attachShadow({ mode: 'open' });
21
+ const Sheet = sheetConstructor(doc);
22
+ const sheet = new Sheet();
23
+ sheet.replaceSync('@container style(--_ag-probe: on) { i { --_ag-probe-hit: on; } }');
24
+ shadow.adoptedStyleSheets = [sheet];
25
+ const child = doc.createElement('i');
26
+ shadow.append(child);
27
+ parent.append(host);
28
+ const hit = getComputedStyle(child).getPropertyValue('--_ag-probe-hit').trim() === 'on';
29
+ host.remove();
30
+ return hit;
31
+ }
32
+ function sheetConstructor(doc) {
33
+ return doc.defaultView?.CSSStyleSheet ?? CSSStyleSheet;
34
+ }
35
+ function supportsStyleQueries(doc) {
36
+ styleQueries ??= probe(doc);
37
+ return styleQueries;
38
+ }
39
+ function documentVariant(doc) {
40
+ const root = doc.documentElement;
41
+ return root ? getComputedStyle(root).getPropertyValue(VARIANT).trim() : '';
42
+ }
43
+ function cssFor(doc) {
44
+ const base = shadowStyles.cssText;
45
+ const dark = darkVariantStyles.cssText;
46
+ if (supportsStyleQueries(doc))
47
+ return `${base}@container style(${VARIANT}: dark){${dark}}`;
48
+ return documentVariant(doc) === 'dark' ? `${base}${dark}` : base;
49
+ }
50
+ const sheets = new Map();
51
+ function refresh(doc) {
52
+ const entry = sheets.get(doc);
53
+ if (!entry)
54
+ return;
55
+ const css = cssFor(doc);
56
+ if (css === entry.css)
57
+ return;
58
+ entry.css = css;
59
+ entry.sheet.replaceSync(css);
60
+ }
61
+ const watched = new WeakSet();
62
+ function watch(doc) {
63
+ if (watched.has(doc))
64
+ return;
65
+ watched.add(doc);
66
+ const update = () => refresh(doc);
67
+ const observer = new MutationObserver(update);
68
+ if (doc.head) {
69
+ observer.observe(doc.head, {
70
+ childList: true,
71
+ subtree: true,
72
+ characterData: true,
73
+ attributes: true,
74
+ attributeFilter: ['href', 'media', 'disabled'],
75
+ });
76
+ }
77
+ for (const el of [doc.documentElement, doc.body]) {
78
+ if (el)
79
+ observer.observe(el, {
80
+ attributes: true,
81
+ attributeFilter: ['class', 'style', 'theme', 'data-theme'],
82
+ });
83
+ }
84
+ doc.addEventListener('load', update, true);
85
+ }
86
+ function sheetFor(doc) {
87
+ let entry = sheets.get(doc);
88
+ if (!entry) {
89
+ const css = cssFor(doc);
90
+ const Sheet = sheetConstructor(doc);
91
+ entry = { sheet: new Sheet(), css };
92
+ entry.sheet.replaceSync(css);
93
+ sheets.set(doc, entry);
94
+ if (!supportsStyleQueries(doc))
95
+ watch(doc);
96
+ }
97
+ else if (!supportsStyleQueries(doc)) {
98
+ refresh(doc);
99
+ }
100
+ return entry.sheet;
101
+ }
102
+ function adoptInto(root, sheet) {
103
+ if (!('adoptedStyleSheets' in root))
104
+ return;
105
+ if (root.adoptedStyleSheets.includes(sheet))
106
+ return;
107
+ root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet];
108
+ }
109
+ export const IGNITE_UI_STYLES = Object.freeze({
110
+ name: 'igniteui',
111
+ documentCss: documentStyles.cssText,
112
+ attach(grid, root) {
113
+ if (typeof CSSStyleSheet === 'undefined' || !('replaceSync' in CSSStyleSheet.prototype))
114
+ return;
115
+ adoptInto(root, sheetFor(grid.ownerDocument));
116
+ },
117
+ });
118
+ //# sourceMappingURL=ignite-ui.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ignite-ui.js","sourceRoot":"","sources":["../../src/internal/ignite-ui.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAmBzF,MAAM,OAAO,GAAG,oBAAoB,CAAC;AAKrC,IAAI,YAAY,GAAmB,IAAI,CAAC;AAQxC,MAAM,UAAU,oBAAoB,CAAC,KAAqB;IACxD,YAAY,GAAG,KAAK,CAAC;IACrB,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;QAChC,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC;YAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;AACH,CAAC;AAMD,SAAS,KAAK,CAAC,GAAa;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CAAC;IAC7C,CAAC;SAAM,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,EAAE,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IACD,OAAO,KAAK,CAAC,KAAK,CAAC;AACrB,CAAC;AAED,SAAS,SAAS,CAAC,IAAe,EAAE,KAAoB;IACtD,IAAI,CAAC,CAAC,oBAAoB,IAAI,IAAI,CAAC;QAAE,OAAO;IAC5C,IAAI,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO;IACpD,IAAI,CAAC,kBAAkB,GAAG,CAAC,GAAG,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;AAChE,CAAC;AAGD,MAAM,CAAC,MAAM,gBAAgB,GAAuB,MAAM,CAAC,MAAM,CAAC;IAChE,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,cAAc,CAAC,OAAO;IACnC,MAAM,CAAC,IAAiB,EAAE,IAAgB;QACxC,IAAI,OAAO,aAAa,KAAK,WAAW,IAAI,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,SAAS,CAAC;YAAE,OAAO;QAChG,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAChD,CAAC;CACF,CAAC,CAAC","sourcesContent":["import { styles as shadowStyles } from '../styles/ignite-ui/ignite-ui.css.js';\nimport { styles as darkVariantStyles } from '../styles/ignite-ui/ignite-ui-dark.css.js';\nimport { styles as documentStyles } from '../styles/ignite-ui/ignite-ui-document.css.js';\nimport type { DesignSystemStyles } from './design-system.js';\n\n/**\n * The Ignite UI add-on's rules (`apex-grid/ignite-ui`).\n *\n * Each grid's shadow root adopts one sheet per document: the grid's token\n * chains with the Ignite UI steps (`styles/ignite-ui/ignite-ui.scss`), then\n * the rules for a dark Ignite UI variant (`ignite-ui-dark.scss`) inside\n * `@container style(--ig-theme-variant: dark)`, so every grid follows the\n * variant in effect where it sits, and follows a theme swap live.\n *\n * A browser without container style queries on custom properties drops that\n * rule. There the sheet holds the dark rules outright while the document's\n * variant is dark, and is rewritten when it changes: the add-on re-reads the\n * variant as grids connect, when the document's `<head>` or the root's and\n * body's attributes change, and when a stylesheet loads.\n */\n\nconst VARIANT = '--ig-theme-variant';\n\ntype StyleRoot = Document | ShadowRoot;\n\n/** Whether the browser applies `@container style()` to custom properties; null: not probed yet. */\nlet styleQueries: boolean | null = null;\n\n/**\n * Overrides the style-query probe.\n *\n * @internal Test-only: `false` runs the fallback in a browser that has style\n * queries, `null` probes again.\n */\nexport function setStyleQuerySupport(value: boolean | null): void {\n styleQueries = value;\n for (const doc of sheets.keys()) {\n if (!supportsStyleQueries(doc)) watch(doc);\n refresh(doc);\n }\n}\n\n/**\n * Probes container style queries: a host carrying a custom property, and a\n * shadow child styled only when a style query on that property matches.\n */\nfunction probe(doc: Document): boolean {\n const host = doc.createElement('div');\n const parent = doc.body ?? doc.documentElement;\n if (!parent || typeof host.attachShadow !== 'function') return false;\n host.style.setProperty('--_ag-probe', 'on');\n const shadow = host.attachShadow({ mode: 'open' });\n const Sheet = sheetConstructor(doc);\n const sheet = new Sheet();\n sheet.replaceSync('@container style(--_ag-probe: on) { i { --_ag-probe-hit: on; } }');\n shadow.adoptedStyleSheets = [sheet];\n const child = doc.createElement('i');\n shadow.append(child);\n parent.append(host);\n const hit = getComputedStyle(child).getPropertyValue('--_ag-probe-hit').trim() === 'on';\n host.remove();\n return hit;\n}\n\nfunction sheetConstructor(doc: Document): typeof CSSStyleSheet {\n return (doc.defaultView as (Window & typeof globalThis) | null)?.CSSStyleSheet ?? CSSStyleSheet;\n}\n\nfunction supportsStyleQueries(doc: Document): boolean {\n styleQueries ??= probe(doc);\n return styleQueries;\n}\n\n/** The document's variant, for the fallback: read where Ignite UI themes declare it. */\nfunction documentVariant(doc: Document): string {\n const root = doc.documentElement;\n return root ? getComputedStyle(root).getPropertyValue(VARIANT).trim() : '';\n}\n\n/** The shadow-root sheet's text for one document. */\nfunction cssFor(doc: Document): string {\n const base = shadowStyles.cssText;\n const dark = darkVariantStyles.cssText;\n if (supportsStyleQueries(doc)) return `${base}@container style(${VARIANT}: dark){${dark}}`;\n return documentVariant(doc) === 'dark' ? `${base}${dark}` : base;\n}\n\ninterface SheetEntry {\n sheet: CSSStyleSheet;\n /** The text the sheet holds, so an unchanged rewrite is skipped. */\n css: string;\n}\n\n/** One constructed sheet per document: a sheet adopts only into its own document's roots. */\nconst sheets = new Map<Document, SheetEntry>();\n\nfunction refresh(doc: Document): void {\n const entry = sheets.get(doc);\n if (!entry) return;\n const css = cssFor(doc);\n if (css === entry.css) return;\n entry.css = css;\n entry.sheet.replaceSync(css);\n}\n\n/** The documents the fallback watches. */\nconst watched = new WeakSet<Document>();\n\n/** Fallback only: re-reads the variant when the document's theme can have changed. */\nfunction watch(doc: Document): void {\n if (watched.has(doc)) return;\n watched.add(doc);\n const update = () => refresh(doc);\n const observer = new MutationObserver(update);\n if (doc.head) {\n observer.observe(doc.head, {\n childList: true,\n subtree: true,\n characterData: true,\n attributes: true,\n attributeFilter: ['href', 'media', 'disabled'],\n });\n }\n for (const el of [doc.documentElement, doc.body]) {\n if (el)\n observer.observe(el, {\n attributes: true,\n attributeFilter: ['class', 'style', 'theme', 'data-theme'],\n });\n }\n // A `<link>` swap is seen before its sheet loads; read the variant again then.\n doc.addEventListener('load', update, true);\n}\n\nfunction sheetFor(doc: Document): CSSStyleSheet {\n let entry = sheets.get(doc);\n if (!entry) {\n const css = cssFor(doc);\n const Sheet = sheetConstructor(doc);\n entry = { sheet: new Sheet(), css };\n entry.sheet.replaceSync(css);\n sheets.set(doc, entry);\n if (!supportsStyleQueries(doc)) watch(doc);\n } else if (!supportsStyleQueries(doc)) {\n refresh(doc);\n }\n return entry.sheet;\n}\n\nfunction adoptInto(root: StyleRoot, sheet: CSSStyleSheet): void {\n if (!('adoptedStyleSheets' in root)) return;\n if (root.adoptedStyleSheets.includes(sheet)) return;\n root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet];\n}\n\n/** The add-on as the grid registers it. */\nexport const IGNITE_UI_STYLES: DesignSystemStyles = Object.freeze({\n name: 'igniteui',\n documentCss: documentStyles.cssText,\n attach(grid: HTMLElement, root: ShadowRoot): void {\n if (typeof CSSStyleSheet === 'undefined' || !('replaceSync' in CSSStyleSheet.prototype)) return;\n adoptInto(root, sheetFor(grid.ownerDocument));\n },\n});\n"]}
@@ -15,12 +15,14 @@ export { viewIndexer } from '../controllers/history.js';
15
15
  export { gridStateContext, StateController } from '../controllers/state.js';
16
16
  export { clampRating, commitDateInSameShape, getColumnTypeRenderer, getRatingMax, getSelectOptions, parseDate, } from './column-types.js';
17
17
  export { PIPELINE } from './constants.js';
18
+ export type { DesignSystemStyles } from './design-system.js';
19
+ export { designSystemName, onDesignSystemRegistered } from './design-system.js';
18
20
  export type { ExportCellValue, ExportFormat, ExportOptions } from './export.js';
19
- export { downloadBlob, escapeCSVCell, escapeFormula, getColumnLabel, resolveExportColumns, resolveExportRows, resolveExportValue, } from './export.js';
21
+ export { downloadBlob, escapeCSVCell, escapeFormula, formatDisplayText, getColumnLabel, resolveExportColumns, resolveExportRows, resolveExportValue, } from './export.js';
20
22
  export type { CellDecoration, CellDecorator, CellDecoratorContext, CellInteraction, CellInteractionHandler, CellInteractionKind, ColumnMenuProvider, CoordinateLabeler, GridFeatureModule, PresentedRow, RowAria, RowAriaProvider, RowPresenter, RowPresenterContext, RowTransformer, SerializableModule, } from './feature-module.js';
21
23
  export { isCellDecorator, isCellInteractionHandler, isColumnMenuProvider, isCoordinateLabeler, isRowAriaProvider, isRowPresenter, isRowTransformer, isSerializableModule, } from './feature-module.js';
22
24
  export { registerComponent } from './register.js';
23
25
  export type { ColumnLayoutState, FilterStateSnapshot, GetStateOptions, GridState, RowRef, SetStateOptions, SortStateSnapshot, } from './state-snapshot.js';
24
26
  export { applyColumnLayout, deserializeFilter, mergeColumnLayout, registerFilterOperand, resolveFilterOperand, resolveRowRefs, serializeColumnLayout, serializeFilter, serializeRowRefs, serializeSort, } from './state-snapshot.js';
25
27
  export type { ActiveNode, ColumnConfiguration, GridHost, Keys, ToolbarAction } from './types.js';
26
- export { getDisplayColumns } from './utils.js';
28
+ export { getDisplayColumns, isRTL } from './utils.js';
package/internal/index.js CHANGED
@@ -3,9 +3,10 @@ export { viewIndexer } from '../controllers/history.js';
3
3
  export { gridStateContext, StateController } from '../controllers/state.js';
4
4
  export { clampRating, commitDateInSameShape, getColumnTypeRenderer, getRatingMax, getSelectOptions, parseDate, } from './column-types.js';
5
5
  export { PIPELINE } from './constants.js';
6
- export { downloadBlob, escapeCSVCell, escapeFormula, getColumnLabel, resolveExportColumns, resolveExportRows, resolveExportValue, } from './export.js';
6
+ export { designSystemName, onDesignSystemRegistered } from './design-system.js';
7
+ export { downloadBlob, escapeCSVCell, escapeFormula, formatDisplayText, getColumnLabel, resolveExportColumns, resolveExportRows, resolveExportValue, } from './export.js';
7
8
  export { isCellDecorator, isCellInteractionHandler, isColumnMenuProvider, isCoordinateLabeler, isRowAriaProvider, isRowPresenter, isRowTransformer, isSerializableModule, } from './feature-module.js';
8
9
  export { registerComponent } from './register.js';
9
10
  export { applyColumnLayout, deserializeFilter, mergeColumnLayout, registerFilterOperand, resolveFilterOperand, resolveRowRefs, serializeColumnLayout, serializeFilter, serializeRowRefs, serializeSort, } from './state-snapshot.js';
10
- export { getDisplayColumns } from './utils.js';
11
+ export { getDisplayColumns, isRTL } from './utils.js';
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAmBrB,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAUlD,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/**\n * Unstable, first-party extension surface for `apex-grid`.\n *\n * This entry point (`apex-grid/internal`) exposes the internals that the\n * first-party `@apexcharts/grid-enterprise` package builds on: the grid class,\n * its state controller, the component registration helper, and the feature\n * module contract. It is intentionally separate from the public `.` barrel.\n *\n * @remarks\n * No semver guarantees are made for these exports. They may change between\n * minor releases. Do not depend on them from third-party code.\n */\nexport { ApexGrid } from '../components/grid.js';\nexport { viewIndexer } from '../controllers/history.js';\nexport { gridStateContext, StateController } from '../controllers/state.js';\nexport {\n clampRating,\n commitDateInSameShape,\n getColumnTypeRenderer,\n getRatingMax,\n getSelectOptions,\n parseDate,\n} from './column-types.js';\nexport { PIPELINE } from './constants.js';\nexport type { ExportCellValue, ExportFormat, ExportOptions } from './export.js';\nexport {\n downloadBlob,\n escapeCSVCell,\n escapeFormula,\n getColumnLabel,\n resolveExportColumns,\n resolveExportRows,\n resolveExportValue,\n} from './export.js';\nexport type {\n CellDecoration,\n CellDecorator,\n CellDecoratorContext,\n CellInteraction,\n CellInteractionHandler,\n CellInteractionKind,\n ColumnMenuProvider,\n CoordinateLabeler,\n GridFeatureModule,\n PresentedRow,\n RowAria,\n RowAriaProvider,\n RowPresenter,\n RowPresenterContext,\n RowTransformer,\n SerializableModule,\n} from './feature-module.js';\nexport {\n isCellDecorator,\n isCellInteractionHandler,\n isColumnMenuProvider,\n isCoordinateLabeler,\n isRowAriaProvider,\n isRowPresenter,\n isRowTransformer,\n isSerializableModule,\n} from './feature-module.js';\nexport { registerComponent } from './register.js';\nexport type {\n ColumnLayoutState,\n FilterStateSnapshot,\n GetStateOptions,\n GridState,\n RowRef,\n SetStateOptions,\n SortStateSnapshot,\n} from './state-snapshot.js';\nexport {\n applyColumnLayout,\n deserializeFilter,\n mergeColumnLayout,\n registerFilterOperand,\n resolveFilterOperand,\n resolveRowRefs,\n serializeColumnLayout,\n serializeFilter,\n serializeRowRefs,\n serializeSort,\n} from './state-snapshot.js';\nexport type { ActiveNode, ColumnConfiguration, GridHost, Keys, ToolbarAction } from './types.js';\nexport { getDisplayColumns } from './utils.js';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/internal/index.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC5E,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,qBAAqB,EACrB,YAAY,EACZ,gBAAgB,EAChB,SAAS,GACV,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EACL,YAAY,EACZ,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAmBrB,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAUlD,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,gBAAgB,EAChB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC","sourcesContent":["/**\n * Unstable, first-party extension surface for `apex-grid`.\n *\n * This entry point (`apex-grid/internal`) exposes the internals that the\n * first-party `@apexcharts/grid-enterprise` package builds on: the grid class,\n * its state controller, the component registration helper, and the feature\n * module contract. It is intentionally separate from the public `.` barrel.\n *\n * @remarks\n * No semver guarantees are made for these exports. They may change between\n * minor releases. Do not depend on them from third-party code.\n */\nexport { ApexGrid } from '../components/grid.js';\nexport { viewIndexer } from '../controllers/history.js';\nexport { gridStateContext, StateController } from '../controllers/state.js';\nexport {\n clampRating,\n commitDateInSameShape,\n getColumnTypeRenderer,\n getRatingMax,\n getSelectOptions,\n parseDate,\n} from './column-types.js';\nexport { PIPELINE } from './constants.js';\nexport type { DesignSystemStyles } from './design-system.js';\nexport { designSystemName, onDesignSystemRegistered } from './design-system.js';\nexport type { ExportCellValue, ExportFormat, ExportOptions } from './export.js';\nexport {\n downloadBlob,\n escapeCSVCell,\n escapeFormula,\n formatDisplayText,\n getColumnLabel,\n resolveExportColumns,\n resolveExportRows,\n resolveExportValue,\n} from './export.js';\nexport type {\n CellDecoration,\n CellDecorator,\n CellDecoratorContext,\n CellInteraction,\n CellInteractionHandler,\n CellInteractionKind,\n ColumnMenuProvider,\n CoordinateLabeler,\n GridFeatureModule,\n PresentedRow,\n RowAria,\n RowAriaProvider,\n RowPresenter,\n RowPresenterContext,\n RowTransformer,\n SerializableModule,\n} from './feature-module.js';\nexport {\n isCellDecorator,\n isCellInteractionHandler,\n isColumnMenuProvider,\n isCoordinateLabeler,\n isRowAriaProvider,\n isRowPresenter,\n isRowTransformer,\n isSerializableModule,\n} from './feature-module.js';\nexport { registerComponent } from './register.js';\nexport type {\n ColumnLayoutState,\n FilterStateSnapshot,\n GetStateOptions,\n GridState,\n RowRef,\n SetStateOptions,\n SortStateSnapshot,\n} from './state-snapshot.js';\nexport {\n applyColumnLayout,\n deserializeFilter,\n mergeColumnLayout,\n registerFilterOperand,\n resolveFilterOperand,\n resolveRowRefs,\n serializeColumnLayout,\n serializeFilter,\n serializeRowRefs,\n serializeSort,\n} from './state-snapshot.js';\nexport type { ActiveNode, ColumnConfiguration, GridHost, Keys, ToolbarAction } from './types.js';\nexport { getDisplayColumns, isRTL } from './utils.js';\n"]}
@@ -4,7 +4,6 @@ import type { ApexGrid } from '../components/grid.js';
4
4
  import type ApexGridHeader from '../components/header.js';
5
5
  import type ApexGridRow from '../components/row.js';
6
6
  import type { SortComparer } from '../operations/sort/types.js';
7
- export type NavigationState = 'previous' | 'current';
8
7
  export type GridHost<T extends object> = ReactiveControllerHost & ApexGrid<T>;
9
8
  /**
10
9
  * A custom action button contributed to the toolbar's trailing actions area.
@@ -448,12 +447,29 @@ export interface ApexHeaderContext<T extends object> {
448
447
  export interface BaseApexCellContext<T extends object, K extends Keys<T> = Keys<T>> {
449
448
  /**
450
449
  * The cell element parent of the template.
450
+ *
451
+ * @remarks
452
+ * A rendered element, not the record: the grid may later re-bind it to show
453
+ * another record (a pinned band does when a row above it is unpinned). Read
454
+ * {@link data} for the record, and do not hold this element across an
455
+ * `await`.
451
456
  */
452
457
  parent: ApexGridCell<T>;
453
458
  /**
454
459
  * The row element containing the cell.
460
+ *
461
+ * @remarks
462
+ * A rendered element that may later show another record, as for
463
+ * {@link parent}. Read {@link data} for the record, and do not hold this
464
+ * element across an `await`.
455
465
  */
456
466
  row: ApexGridRow<T>;
467
+ /**
468
+ * The record (row data object) this cell was rendered for. Stays the same
469
+ * record for the life of this context object, even after the cell element
470
+ * is re-bound to another record.
471
+ */
472
+ readonly data: T;
457
473
  /**
458
474
  * The current configuration for the column.
459
475
  */
@@ -469,6 +485,8 @@ export interface BaseApexCellContext<T extends object, K extends Keys<T> = Keys<
469
485
  *
470
486
  * Goes through the cancellable `cellValueChanging` event and follow-up
471
487
  * `cellValueChanged` event — same write path as an edit-mode commit.
488
+ * Writes to {@link data}, the record the context was built for, so a commit
489
+ * issued after an `await` still lands on that record.
472
490
  */
473
491
  commit?: (value: PropertyType<T, K>) => Promise<boolean>;
474
492
  }
@@ -489,6 +507,12 @@ export interface BaseApexEditorContext<T extends object, K extends Keys<T> = Key
489
507
  * Commits `value` as the new cell value, going through the cancellable
490
508
  * `cellValueChanging` event and then `cellValueChanged`.
491
509
  *
510
+ * @remarks
511
+ * Unlike the display context's `commit`, this one is not bound to
512
+ * {@link BaseApexCellContext.data}: it commits the cell that is in edit
513
+ * when it is called. Do not call it after an `await` that can outlive the
514
+ * edit, as another cell may be in edit by then.
515
+ *
492
516
  * @returns `true` if the value was applied, `false` if cancelled.
493
517
  */
494
518
  commit: (value: PropertyType<T, K>) => Promise<boolean>;
@@ -533,7 +557,7 @@ export type SelectionMode = 'single' | 'multiple';
533
557
  /**
534
558
  * Grid-level row-selection configuration.
535
559
  */
536
- export interface GridSelectionConfiguration {
560
+ export interface GridSelectionConfiguration<T extends object = any> {
537
561
  /**
538
562
  * Whether row selection is enabled. Disabled by default.
539
563
  */
@@ -549,6 +573,32 @@ export interface GridSelectionConfiguration {
549
573
  * Defaults to `false`.
550
574
  */
551
575
  showCheckboxColumn?: boolean;
576
+ /**
577
+ * Decides per row whether it can be selected. When unset every row is
578
+ * selectable, pinned rows included.
579
+ *
580
+ * @remarks
581
+ * A row this returns `false` for renders no checkbox (its cell stays, so
582
+ * the columns line up), carries no `aria-selected`, and is skipped by
583
+ * every selection path: checkbox and cell clicks, Shift and Ctrl/Cmd
584
+ * clicks, Space, Select all, `selectRow`, `selectedRows = ...` and
585
+ * `setState`. The header checkbox counts only selectable rows. When
586
+ * `selection` or `data` is reassigned, selected rows the predicate now
587
+ * rejects are dropped through the cancellable `rowSelecting` event. A
588
+ * selected row it comes to reject otherwise (pinned or edited in place)
589
+ * keeps its checkbox until it is deselected.
590
+ *
591
+ * @example
592
+ * ```ts
593
+ * // A pinned total row is a summary, not a record to pick.
594
+ * grid.selection = {
595
+ * enabled: true,
596
+ * showCheckboxColumn: true,
597
+ * isRowSelectable: (row) => row !== totalRow,
598
+ * };
599
+ * ```
600
+ */
601
+ isRowSelectable?: (row: T) => boolean;
552
602
  }
553
603
  /**
554
604
  * Context passed to {@link GridExpansionConfiguration.detailTemplate}.
@@ -739,7 +789,7 @@ export type DataPipelineParams<T extends object> = {
739
789
  /**
740
790
  * The type of data operation being performed.
741
791
  */
742
- type: 'sort' | 'filter' | 'quickFilter' | 'pagination';
792
+ type: 'sort' | 'filter' | 'quickFilter';
743
793
  };
744
794
  /**
745
795
  * Callback function for customizing data operations in the grid.
@@ -757,15 +807,6 @@ export interface DataPipelineConfiguration<T extends object> {
757
807
  * Hook for customizing filter operations.
758
808
  */
759
809
  filter?: DataPipelineHook<T>;
760
- /**
761
- * Hook for customizing pagination operations.
762
- *
763
- * @remarks
764
- * The hook receives the filtered + sorted data slice for the grid to render and the current
765
- * pagination state. Return the page slice. For server-driven pagination, return the externally
766
- * fetched page and report the row total via {@link ApexGrid.totalItems}.
767
- */
768
- pagination?: DataPipelineHook<T>;
769
810
  /**
770
811
  * Hook for customizing quick (global) filter operations.
771
812
  *
@@ -779,10 +820,11 @@ export interface DataPipelineConfiguration<T extends object> {
779
820
  * The pagination mode for the grid.
780
821
  *
781
822
  * @remarks
782
- * `'local'` — the grid slices the in-memory {@link ApexGrid.dataView} by `page` and `pageSize`.
783
- * `'remote'` — the consumer drives data fetching; the grid emits paging events but does not
784
- * slice the data. Use together with {@link DataPipelineConfiguration.pagination} or by setting
785
- * `data` to the current page on `pageChanged`.
823
+ * `'local'`: the grid slices the in-memory {@link ApexGrid.dataView} by `page` and `pageSize`.
824
+ * `'remote'`: the consumer drives data fetching. The grid does not slice `data`; it renders
825
+ * whatever `data` holds as the current page. Listen for `pageChanged`, fetch that page and
826
+ * assign it to `data`, and keep {@link PaginationConfiguration.totalItems} at the number of
827
+ * rows the server holds for the current filter so the paginator can count the pages.
786
828
  */
787
829
  export type PaginationMode = 'local' | 'remote';
788
830
  /**
@@ -815,10 +857,22 @@ export interface PaginationConfiguration {
815
857
  */
816
858
  pageSizeOptions?: number[];
817
859
  /**
818
- * In `'remote'` mode the consumer must supply the unfiltered row total so the paginator
819
- * can compute the page count. Ignored in `'local'` mode.
860
+ * In `'remote'` mode, the number of rows the server holds for the current filter, so the
861
+ * paginator can compute the page count. Update it when a server side filter changes that
862
+ * number. Ignored in `'local'` mode, where the grid counts the rows itself.
820
863
  */
821
864
  totalItems?: number;
865
+ /**
866
+ * The paginator layout. Defaults to `'full'`.
867
+ *
868
+ * @remarks
869
+ * `'full'` shows the page size select, the "start-end of total" summary, first, previous,
870
+ * "page / count", next and last. When the grid is too narrow for all of them it drops the
871
+ * page size select first, then first and last, so previous and next always stay reachable.
872
+ *
873
+ * `'compact'` always uses the narrow layout: the summary, previous, "page / count" and next.
874
+ */
875
+ paginator?: 'compact' | 'full';
822
876
  }
823
877
  /**
824
878
  * Resolved pagination state passed to controllers and event payloads.
@@ -837,7 +891,9 @@ export interface PaginationState {
837
891
  */
838
892
  pageCount: number;
839
893
  /**
840
- * The total number of records before pagination (after filter/sort).
894
+ * The post-filter, post-sort row count. With pagination enabled, the rows paged
895
+ * through: rows pinned to the top or bottom (they show on every page) are left out.
896
+ * In `'remote'` mode, the {@link PaginationConfiguration.totalItems} you supplied.
841
897
  */
842
898
  totalItems: number;
843
899
  }