igniteui-grid-lite 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +233 -8
- package/components/cell.d.ts +1 -1
- package/components/cell.js +2 -3
- package/components/cell.js.map +1 -1
- package/components/column.d.ts +39 -0
- package/components/column.js +77 -0
- package/components/column.js.map +1 -0
- package/components/filter-row.d.ts +1 -1
- package/components/filter-row.js +45 -33
- package/components/filter-row.js.map +1 -1
- package/components/grid.d.ts +35 -35
- package/components/grid.js +147 -107
- package/components/grid.js.map +1 -1
- package/components/header-row.d.ts +5 -8
- package/components/header-row.js +18 -28
- package/components/header-row.js.map +1 -1
- package/components/header.d.ts +2 -1
- package/components/header.js +13 -11
- package/components/header.js.map +1 -1
- package/components/row.d.ts +3 -5
- package/components/row.js +6 -12
- package/components/row.js.map +1 -1
- package/components/virtualizer.d.ts +0 -1
- package/components/virtualizer.js +0 -5
- package/components/virtualizer.js.map +1 -1
- package/controllers/data-operation.d.ts +4 -1
- package/controllers/data-operation.js +5 -1
- package/controllers/data-operation.js.map +1 -1
- package/controllers/dom.d.ts +9 -10
- package/controllers/dom.js +20 -34
- package/controllers/dom.js.map +1 -1
- package/controllers/filter.d.ts +7 -4
- package/controllers/filter.js +8 -5
- package/controllers/filter.js.map +1 -1
- package/controllers/navigation.d.ts +8 -8
- package/controllers/navigation.js +28 -28
- package/controllers/navigation.js.map +1 -1
- package/controllers/sort.d.ts +4 -4
- package/controllers/sort.js +2 -2
- package/controllers/sort.js.map +1 -1
- package/controllers/state.d.ts +32 -15
- package/controllers/state.js +54 -17
- package/controllers/state.js.map +1 -1
- package/custom-elements.json +924 -190
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +27 -13
- package/docs/assets/main.js +2 -2
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +3 -3
- package/docs/classes/IgcGridLite.html +24 -26
- package/docs/classes/IgcGridLiteColumn.html +38 -0
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +193 -11
- package/docs/interfaces/BaseColumnConfiguration.html +11 -11
- package/docs/interfaces/BaseColumnSortConfiguration.html +4 -4
- package/docs/interfaces/BaseFilterExpression.html +6 -6
- package/docs/interfaces/BaseIgcCellContext.html +6 -6
- package/docs/interfaces/BaseSortingExpression.html +12 -0
- package/docs/interfaces/ColumnFilterConfiguration.html +3 -3
- package/docs/interfaces/DataPipelineConfiguration.html +4 -4
- package/docs/interfaces/GridLiteSortingOptions.html +4 -0
- package/docs/interfaces/IgcFilteredEvent.html +4 -4
- package/docs/interfaces/IgcFilteringEvent.html +5 -5
- package/docs/interfaces/IgcGridLiteEventMap.html +6 -6
- package/docs/interfaces/IgcHeaderContext.html +4 -4
- package/docs/media/LICENSE +9 -0
- package/docs/modules.html +1 -1
- package/docs/types/BasePropertyType.html +2 -2
- package/docs/types/BaseSortComparer.html +2 -2
- package/docs/types/ColumnConfiguration.html +2 -2
- package/docs/types/ColumnSortConfiguration.html +2 -2
- package/docs/types/DataPipelineHook.html +2 -2
- package/docs/types/DataPipelineParams.html +5 -5
- package/docs/types/DataType.html +2 -2
- package/docs/types/FilterCriteria.html +2 -2
- package/docs/types/FilterExpression.html +2 -2
- package/docs/types/IgcCellContext.html +2 -2
- package/docs/types/Keys.html +2 -2
- package/docs/types/PropertyType.html +2 -2
- package/docs/types/SortComparer.html +2 -2
- package/docs/types/SortState.html +2 -2
- package/docs/types/SortingDirection.html +2 -2
- package/docs/types/SortingExpression.html +2 -0
- package/index.d.ts +3 -2
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/internal/constants.js +5 -1
- package/internal/constants.js.map +1 -1
- package/internal/context.d.ts +9 -0
- package/internal/context.js +7 -0
- package/internal/context.js.map +1 -0
- package/internal/element-from-event-path.d.ts +2 -0
- package/internal/element-from-event-path.js +12 -0
- package/internal/element-from-event-path.js.map +1 -0
- package/internal/part-map.d.ts +16 -3
- package/internal/part-map.js +44 -4
- package/internal/part-map.js.map +1 -1
- package/internal/tags.d.ts +1 -0
- package/internal/tags.js +1 -0
- package/internal/tags.js.map +1 -1
- package/internal/theming.js +5 -7
- package/internal/theming.js.map +1 -1
- package/internal/types.d.ts +3 -7
- package/internal/types.js.map +1 -1
- package/internal/utils.d.ts +6 -2
- package/internal/utils.js +43 -14
- package/internal/utils.js.map +1 -1
- package/operations/filter/tree.d.ts +1 -1
- package/operations/sort/types.d.ts +4 -4
- package/operations/sort/types.js.map +1 -1
- package/operations/sort.d.ts +2 -2
- package/operations/sort.js.map +1 -1
- package/package.json +2 -2
- package/styles/_common.css.js +1 -1
- package/styles/_common.css.js.map +1 -1
- package/styles/body-cell/body-cell.css.js +1 -1
- package/styles/body-cell/body-cell.css.js.map +1 -1
- package/styles/body-row/body-row.css.js +1 -1
- package/styles/body-row/body-row.css.js.map +1 -1
- package/styles/filter-row/filter-row.css.js +1 -1
- package/styles/filter-row/filter-row.css.js.map +1 -1
- package/styles/header-cell/header-cell.css.js +1 -1
- package/styles/header-cell/header-cell.css.js.map +1 -1
- package/styles/header-row/header-row.base.css.js +1 -1
- package/styles/header-row/header-row.base.css.js.map +1 -1
- package/styles/themes/dark/_themes.css.js +3 -0
- package/styles/themes/dark/_themes.css.js.map +1 -0
- package/styles/themes/dark/grid.bootstrap.css.js +3 -0
- package/styles/themes/dark/grid.bootstrap.css.js.map +1 -0
- package/styles/themes/dark/grid.fluent.css.js +3 -0
- package/styles/themes/dark/grid.fluent.css.js.map +1 -0
- package/styles/themes/dark/grid.indigo.css.js +3 -0
- package/styles/themes/dark/grid.indigo.css.js.map +1 -0
- package/styles/themes/dark/grid.material.css.js +3 -0
- package/styles/themes/dark/grid.material.css.js.map +1 -0
- package/styles/themes/grid-header-themes.d.ts +2 -0
- package/styles/themes/grid-header-themes.js +21 -0
- package/styles/themes/grid-header-themes.js.map +1 -0
- package/styles/themes/grid-themes.d.ts +2 -0
- package/styles/{grid/themes/themes.js → themes/grid-themes.js} +17 -9
- package/styles/themes/grid-themes.js.map +1 -0
- package/styles/themes/grid.base.css.js +3 -0
- package/styles/themes/grid.base.css.js.map +1 -0
- package/styles/themes/light/_themes.css.js +3 -0
- package/styles/themes/light/_themes.css.js.map +1 -0
- package/styles/themes/light/grid.bootstrap.css.js +3 -0
- package/styles/themes/light/grid.bootstrap.css.js.map +1 -0
- package/styles/themes/light/grid.fluent.css.js +3 -0
- package/styles/themes/light/grid.fluent.css.js.map +1 -0
- package/styles/themes/light/grid.indigo.css.d.ts +1 -0
- package/styles/themes/light/grid.indigo.css.js +3 -0
- package/styles/themes/light/grid.indigo.css.js.map +1 -0
- package/styles/themes/light/grid.material.css.d.ts +1 -0
- package/styles/themes/light/grid.material.css.js +3 -0
- package/styles/themes/light/grid.material.css.js.map +1 -0
- package/styles/themes/light/grid.shared.css.d.ts +1 -0
- package/styles/themes/light/grid.shared.css.js +3 -0
- package/styles/themes/light/grid.shared.css.js.map +1 -0
- package/styles/themes/shared/grid.common.css.d.ts +1 -0
- package/styles/themes/shared/grid.common.css.js +3 -0
- package/styles/themes/shared/grid.common.css.js.map +1 -0
- package/styles/themes/shared/header.bootstrap.css.d.ts +1 -0
- package/styles/themes/shared/header.bootstrap.css.js +3 -0
- package/styles/themes/shared/header.bootstrap.css.js.map +1 -0
- package/styles/themes/shared/header.fluent.css.d.ts +1 -0
- package/styles/themes/shared/header.fluent.css.js +3 -0
- package/styles/themes/shared/header.fluent.css.js.map +1 -0
- package/docs/interfaces/BaseSortExpression.html +0 -12
- package/docs/interfaces/GridSortConfiguration.html +0 -6
- package/docs/types/SortExpression.html +0 -2
- package/styles/grid/themes/dark/grid.bootstrap.css.js +0 -3
- package/styles/grid/themes/dark/grid.bootstrap.css.js.map +0 -1
- package/styles/grid/themes/dark/grid.fluent.css.js +0 -3
- package/styles/grid/themes/dark/grid.fluent.css.js.map +0 -1
- package/styles/grid/themes/dark/grid.indigo.css.js +0 -3
- package/styles/grid/themes/dark/grid.indigo.css.js.map +0 -1
- package/styles/grid/themes/dark/grid.material.css.js +0 -3
- package/styles/grid/themes/dark/grid.material.css.js.map +0 -1
- package/styles/grid/themes/grid.base.css.js +0 -3
- package/styles/grid/themes/grid.base.css.js.map +0 -1
- package/styles/grid/themes/light/grid.bootstrap.css.js +0 -3
- package/styles/grid/themes/light/grid.bootstrap.css.js.map +0 -1
- package/styles/grid/themes/light/grid.fluent.css.js +0 -3
- package/styles/grid/themes/light/grid.fluent.css.js.map +0 -1
- package/styles/grid/themes/light/grid.indigo.css.js +0 -3
- package/styles/grid/themes/light/grid.indigo.css.js.map +0 -1
- package/styles/grid/themes/light/grid.material.css.js +0 -3
- package/styles/grid/themes/light/grid.material.css.js.map +0 -1
- package/styles/grid/themes/themes.d.ts +0 -2
- package/styles/grid/themes/themes.js.map +0 -1
- /package/styles/{grid/themes/dark/grid.bootstrap.css.d.ts → themes/dark/_themes.css.d.ts} +0 -0
- /package/styles/{grid/themes/light → themes/dark}/grid.bootstrap.css.d.ts +0 -0
- /package/styles/{grid/themes → themes}/dark/grid.fluent.css.d.ts +0 -0
- /package/styles/{grid/themes → themes}/dark/grid.indigo.css.d.ts +0 -0
- /package/styles/{grid/themes → themes}/dark/grid.material.css.d.ts +0 -0
- /package/styles/{grid/themes → themes}/grid.base.css.d.ts +0 -0
- /package/styles/{grid/themes/light/grid.fluent.css.d.ts → themes/light/_themes.css.d.ts} +0 -0
- /package/styles/{grid/themes/light/grid.indigo.css.d.ts → themes/light/grid.bootstrap.css.d.ts} +0 -0
- /package/styles/{grid/themes/light/grid.material.css.d.ts → themes/light/grid.fluent.css.d.ts} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SortComparer | igniteui-grid-lite</title><meta name="description" content="Documentation for igniteui-grid-lite"/><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/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">igniteui-grid-lite</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SortComparer</a></li></ul><h1>Type Alias SortComparer<T, K></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">SortComparer</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#k">K</a> <span class="tsd-signature-keyword">extends</span> <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">?</span> <a href="BaseSortComparer.html" class="tsd-signature-type tsd-kind-type-alias">BaseSortComparer</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#k">K</a><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">never</span></div><div class="tsd-comment tsd-typography"><p>See <a href="BaseSortComparer.html" class="tsd-kind-type-alias">BaseSortComparer</a> for the full documentation.</p>
|
|
2
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="t"><span class="tsd-kind-type-parameter">T</span></span></li><li><span id="k"><span class="tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">extends</span> <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span> = <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span></span></li></ul></section
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SortComparer | igniteui-grid-lite-workspace</title><meta name="description" content="Documentation for igniteui-grid-lite-workspace"/><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/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">igniteui-grid-lite-workspace</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SortComparer</a></li></ul><h1>Type Alias SortComparer<T, K></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">SortComparer</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#k">K</a> <span class="tsd-signature-keyword">extends</span> <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">?</span> <a href="BaseSortComparer.html" class="tsd-signature-type tsd-kind-type-alias">BaseSortComparer</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#k">K</a><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">never</span></div><div class="tsd-comment tsd-typography"><p>See <a href="BaseSortComparer.html" class="tsd-kind-type-alias">BaseSortComparer</a> for the full documentation.</p>
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="t"><span class="tsd-kind-type-parameter">T</span></span></li><li><span id="k"><span class="tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">extends</span> <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span> = <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span></span></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><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><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">igniteui-grid-lite-workspace</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SortState | igniteui-grid-lite</title><meta name="description" content="Documentation for igniteui-grid-lite"/><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/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">igniteui-grid-lite</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SortState</a></li></ul><h1>Type Alias SortState<T></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">SortState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span> <a href="
|
|
2
|
-
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="t"><span class="tsd-kind-type-parameter">T</span></span></li></ul></section
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SortState | igniteui-grid-lite-workspace</title><meta name="description" content="Documentation for igniteui-grid-lite-workspace"/><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/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">igniteui-grid-lite-workspace</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SortState</a></li></ul><h1>Type Alias SortState<T></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">SortState</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Map</span><span class="tsd-signature-symbol"><</span><a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span> <a href="SortingExpression.html" class="tsd-signature-type tsd-kind-type-alias">SortingExpression</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Represents the sort state of the grid.</p>
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="t"><span class="tsd-kind-type-parameter">T</span></span></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><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><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">igniteui-grid-lite-workspace</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SortingDirection | igniteui-grid-lite</title><meta name="description" content="Documentation for igniteui-grid-lite"/><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/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">igniteui-grid-lite</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SortingDirection</a></li></ul><h1>Type Alias SortingDirection</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">SortingDirection</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"ascending"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"descending"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"none"</span></div><div class="tsd-comment tsd-typography"><p>Sort direction for a given sort expression.</p>
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SortingDirection | igniteui-grid-lite-workspace</title><meta name="description" content="Documentation for igniteui-grid-lite-workspace"/><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/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">igniteui-grid-lite-workspace</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SortingDirection</a></li></ul><h1>Type Alias SortingDirection</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">SortingDirection</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"ascending"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"descending"</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"none"</span></div><div class="tsd-comment tsd-typography"><p>Sort direction for a given sort expression.</p>
|
|
2
2
|
</div><div class="tsd-comment tsd-typography"><div class="tsd-tag-remarks"><h4 class="tsd-anchor-link" id="remarks">Remarks<a href="#remarks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><code>none</code> is used</p>
|
|
3
|
-
</div></div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><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><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">igniteui-grid-lite</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
3
|
+
</div></div></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><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><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">igniteui-grid-lite-workspace</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SortingExpression | igniteui-grid-lite-workspace</title><meta name="description" content="Documentation for igniteui-grid-lite-workspace"/><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/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">igniteui-grid-lite-workspace</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">SortingExpression</a></li></ul><h1>Type Alias SortingExpression<T, K></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">SortingExpression</span><span class="tsd-signature-symbol">:</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#k">K</a> <span class="tsd-signature-keyword">extends</span> <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">?</span> <a href="../interfaces/BaseSortingExpression.html" class="tsd-signature-type tsd-kind-interface">BaseSortingExpression</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">,</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#k">K</a><span class="tsd-signature-symbol">></span> <span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">never</span></div><div class="tsd-comment tsd-typography"><p>See <a href="../interfaces/BaseSortingExpression.html" class="tsd-kind-interface">BaseSortingExpression</a> for the full documentation.</p>
|
|
2
|
+
</div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="t"><span class="tsd-kind-type-parameter">T</span></span></li><li><span id="k"><span class="tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">extends</span> <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span> = <a href="Keys.html" class="tsd-signature-type tsd-kind-type-alias">Keys</a><span class="tsd-signature-symbol"><</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#t">T</a><span class="tsd-signature-symbol">></span></span></li></ul></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><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></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><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><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">igniteui-grid-lite-workspace</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
export { IgcGridLiteColumn } from './components/column.js';
|
|
1
2
|
export type { IgcFilteredEvent, IgcFilteringEvent, IgcGridLiteEventMap, } from './components/grid.js';
|
|
2
3
|
export { IgcGridLite } from './components/grid.js';
|
|
3
|
-
export type { BaseColumnConfiguration, BaseColumnSortConfiguration, BaseIgcCellContext, BasePropertyType, ColumnConfiguration, ColumnFilterConfiguration, ColumnSortConfiguration, DataPipelineConfiguration, DataPipelineHook, DataPipelineParams, DataType,
|
|
4
|
+
export type { BaseColumnConfiguration, BaseColumnSortConfiguration, BaseIgcCellContext, BasePropertyType, ColumnConfiguration, ColumnFilterConfiguration, ColumnSortConfiguration, DataPipelineConfiguration, DataPipelineHook, DataPipelineParams, DataType, GridLiteSortingOptions, IgcCellContext, IgcHeaderContext, Keys, PropertyType, } from './internal/types.js';
|
|
4
5
|
export { BooleanOperands } from './operations/filter/operands/boolean.js';
|
|
5
6
|
export { NumberOperands } from './operations/filter/operands/number.js';
|
|
6
7
|
export { StringOperands } from './operations/filter/operands/string.js';
|
|
7
8
|
export type { BaseFilterExpression, FilterCriteria, FilterExpression, FilterOperation, FilterOperationLogic, OperandKeys, } from './operations/filter/types.js';
|
|
8
|
-
export type { BaseSortComparer,
|
|
9
|
+
export type { BaseSortComparer, BaseSortingExpression, SortComparer, SortingDirection, SortingExpression, SortState, } from './operations/sort/types.js';
|
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAM3D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAmBnD,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC","sourcesContent":["export { IgcGridLiteColumn } from './components/column.js';\nexport type {\n IgcFilteredEvent,\n IgcFilteringEvent,\n IgcGridLiteEventMap,\n} from './components/grid.js';\nexport { IgcGridLite } from './components/grid.js';\nexport type {\n BaseColumnConfiguration,\n BaseColumnSortConfiguration,\n BaseIgcCellContext,\n BasePropertyType,\n ColumnConfiguration,\n ColumnFilterConfiguration,\n ColumnSortConfiguration,\n DataPipelineConfiguration,\n DataPipelineHook,\n DataPipelineParams,\n DataType,\n GridLiteSortingOptions,\n IgcCellContext,\n IgcHeaderContext,\n Keys,\n PropertyType,\n} from './internal/types.js';\nexport { BooleanOperands } from './operations/filter/operands/boolean.js';\nexport { NumberOperands } from './operations/filter/operands/number.js';\nexport { StringOperands } from './operations/filter/operands/string.js';\n\nexport type {\n BaseFilterExpression,\n FilterCriteria,\n FilterExpression,\n FilterOperation,\n FilterOperationLogic,\n OperandKeys,\n} from './operations/filter/types.js';\nexport type {\n BaseSortComparer,\n BaseSortingExpression,\n SortComparer,\n SortingDirection,\n SortingExpression,\n SortState,\n} from './operations/sort/types.js';\n"]}
|
package/internal/constants.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
const columnKey = Symbol();
|
|
2
|
+
const NON_EXISTING_COLUMN = Symbol();
|
|
2
3
|
export const PIPELINE = 'pipeline';
|
|
3
4
|
export const SORT_ICON_ASCENDING = 'arrow-upward';
|
|
4
5
|
export const SORT_ICON_DESCENDING = 'arrow-downward';
|
|
5
6
|
export const MIN_COL_RESIZE_WIDTH = 80;
|
|
6
|
-
export const SENTINEL_NODE = Object.freeze({
|
|
7
|
+
export const SENTINEL_NODE = Object.freeze({
|
|
8
|
+
column: NON_EXISTING_COLUMN,
|
|
9
|
+
row: -1,
|
|
10
|
+
});
|
|
7
11
|
export const DEFAULT_COLUMN_CONFIG = Object.freeze({
|
|
8
12
|
key: columnKey,
|
|
9
13
|
type: 'string',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/internal/constants.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/internal/constants.ts"],"names":[],"mappings":"AAEA,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;AAC3B,MAAM,mBAAmB,GAAG,MAAM,EAAE,CAAC;AAErC,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAAC;AACnC,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAuB,CAAC;AAC3D,MAAM,CAAC,MAAM,oBAAoB,GAAG,gBAAyB,CAAC;AAE9D,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEvC,MAAM,CAAC,MAAM,aAAa,GAA8B,MAAM,CAAC,MAAM,CAAC;IACpE,MAAM,EAAE,mBAAmB;IAC3B,GAAG,EAAE,CAAC,CAAC;CACR,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAA2B;IAC3E,GAAG,EAAE,SAAS;IACd,IAAI,EAAE,QAAQ;IACd,SAAS,EAAE,KAAK;IAChB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,KAAK;IACX,MAAM,EAAE,KAAK;CACd,CAAC,CAAC;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA0C,IAAI,GAAG,CAAC;IAC7E,CAAC,UAAU,EAAE,aAAa,CAAC;IAC3B,CAAC,SAAS,EAAE,aAAa,CAAC;CAC3B,CAAC,CAAC","sourcesContent":["import type { ActiveNode, ColumnConfiguration, NavigationState } from './types.js';\n\nconst columnKey = Symbol();\nconst NON_EXISTING_COLUMN = Symbol();\n\nexport const PIPELINE = 'pipeline';\nexport const SORT_ICON_ASCENDING = 'arrow-upward' as const;\nexport const SORT_ICON_DESCENDING = 'arrow-downward' as const;\n\nexport const MIN_COL_RESIZE_WIDTH = 80;\n\nexport const SENTINEL_NODE: Readonly<ActiveNode<any>> = Object.freeze({\n column: NON_EXISTING_COLUMN,\n row: -1,\n});\nexport const DEFAULT_COLUMN_CONFIG = Object.freeze<ColumnConfiguration<any>>({\n key: columnKey,\n type: 'string',\n resizable: false,\n hidden: false,\n sort: false,\n filter: false,\n});\nexport const NAVIGATION_STATE: Map<NavigationState, ActiveNode<any>> = new Map([\n ['previous', SENTINEL_NODE],\n ['current', SENTINEL_NODE],\n]);\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { StateController } from '../controllers/state.js';
|
|
2
|
+
import type { BaseColumnConfiguration } from './types.js';
|
|
3
|
+
declare const COLUMN_UPDATE_CONTEXT: {
|
|
4
|
+
__context__: (config: BaseColumnConfiguration<object>) => void;
|
|
5
|
+
};
|
|
6
|
+
declare const GRID_STATE_CONTEXT: {
|
|
7
|
+
__context__: StateController<any>;
|
|
8
|
+
};
|
|
9
|
+
export { COLUMN_UPDATE_CONTEXT, GRID_STATE_CONTEXT };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createContext } from '@lit/context';
|
|
2
|
+
const COLUMN_CONTEXT = Symbol('Column context');
|
|
3
|
+
const STATE_CONTEXT = Symbol('Grid state context');
|
|
4
|
+
const COLUMN_UPDATE_CONTEXT = createContext(COLUMN_CONTEXT);
|
|
5
|
+
const GRID_STATE_CONTEXT = createContext(STATE_CONTEXT);
|
|
6
|
+
export { COLUMN_UPDATE_CONTEXT, GRID_STATE_CONTEXT };
|
|
7
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/internal/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAI7C,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AAChD,MAAM,aAAa,GAAG,MAAM,CAAC,oBAAoB,CAAC,CAAC;AAEnD,MAAM,qBAAqB,GACzB,aAAa,CAAoD,cAAc,CAAC,CAAC;AACnF,MAAM,kBAAkB,GAAG,aAAa,CAAuB,aAAa,CAAC,CAAC;AAE9E,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,CAAC","sourcesContent":["import { createContext } from '@lit/context';\nimport type { StateController } from '../controllers/state.js';\nimport type { BaseColumnConfiguration } from './types.js';\n\nconst COLUMN_CONTEXT = Symbol('Column context');\nconst STATE_CONTEXT = Symbol('Grid state context');\n\nconst COLUMN_UPDATE_CONTEXT =\n createContext<(config: BaseColumnConfiguration<object>) => void>(COLUMN_CONTEXT);\nconst GRID_STATE_CONTEXT = createContext<StateController<any>>(STATE_CONTEXT);\n\nexport { COLUMN_UPDATE_CONTEXT, GRID_STATE_CONTEXT };\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { isString } from './utils.js';
|
|
2
|
+
function isElement(node) {
|
|
3
|
+
return node instanceof Element;
|
|
4
|
+
}
|
|
5
|
+
function getElementFromEventPath(predicate, event) {
|
|
6
|
+
const callback = isString(predicate)
|
|
7
|
+
? (element) => element.matches(predicate)
|
|
8
|
+
: (element) => predicate(element);
|
|
9
|
+
return Iterator.from(event.composedPath()).filter(isElement).find(callback);
|
|
10
|
+
}
|
|
11
|
+
export { getElementFromEventPath };
|
|
12
|
+
//# sourceMappingURL=element-from-event-path.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"element-from-event-path.js","sourceRoot":"","sources":["../../src/internal/element-from-event-path.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,SAAS,SAAS,CAAC,IAAa;IAC9B,OAAO,IAAI,YAAY,OAAO,CAAC;AACjC,CAAC;AAED,SAAS,uBAAuB,CAC9B,SAA6C,EAC7C,KAAY;IAEZ,MAAM,QAAQ,GAAG,QAAQ,CAAC,SAAS,CAAC;QAClC,CAAC,CAAC,CAAC,OAAgB,EAAgB,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC;QAChE,CAAC,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,OAAY,CAAC,CAAC;IAElD,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAkB,CAAC;AAC/F,CAAC;AAED,OAAO,EAAE,uBAAuB,EAAE,CAAC","sourcesContent":["import { isString } from './utils.js';\n\nfunction isElement(node: unknown): node is Element {\n return node instanceof Element;\n}\n\nfunction getElementFromEventPath<T extends Element>(\n predicate: string | ((element: T) => boolean),\n event: Event\n): T | undefined {\n const callback = isString(predicate)\n ? (element: Element): element is T => element.matches(predicate)\n : (element: Element) => predicate(element as T);\n\n return Iterator.from(event.composedPath()).filter(isElement).find(callback) as T | undefined;\n}\n\nexport { getElementFromEventPath };\n"]}
|
package/internal/part-map.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { noChange } from 'lit';
|
|
2
|
+
import { type AttributePart, Directive, type DirectiveParameters, type PartInfo } from 'lit/directive.js';
|
|
3
|
+
export interface PartMapInfo {
|
|
4
|
+
readonly [name: string]: boolean | null | undefined;
|
|
3
5
|
}
|
|
4
|
-
|
|
6
|
+
declare class PartMapDirective extends Directive {
|
|
7
|
+
private _previousParts?;
|
|
8
|
+
constructor(partInfo: PartInfo);
|
|
9
|
+
render(partMapInfo: PartMapInfo): string;
|
|
10
|
+
update(part: AttributePart, [partMapInfo]: DirectiveParameters<this>): string | typeof noChange;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Similar to Lit's {@link https://lit.dev/docs/templates/directives/#classmap | `classMap`} and
|
|
14
|
+
* {@link https://lit.dev/docs/templates/directives/#stylemap | `styleMap`} but for `part` attributes.
|
|
15
|
+
*/
|
|
16
|
+
export declare const partMap: (partMapInfo: PartMapInfo) => import("lit-html/directive.js").DirectiveResult<typeof PartMapDirective>;
|
|
17
|
+
export type { PartMapDirective };
|
package/internal/part-map.js
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { noChange } from 'lit';
|
|
2
|
+
import { Directive, directive, PartType, } from 'lit/directive.js';
|
|
3
|
+
class PartMapDirective extends Directive {
|
|
4
|
+
constructor(partInfo) {
|
|
5
|
+
super(partInfo);
|
|
6
|
+
if (partInfo.type !== PartType.ATTRIBUTE ||
|
|
7
|
+
partInfo.name !== 'part' ||
|
|
8
|
+
partInfo.strings?.length > 0) {
|
|
9
|
+
throw new Error('`partMap() can only be used in the `part` attribute and must be the only part in the attribute.');
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
render(partMapInfo) {
|
|
13
|
+
return Object.keys(partMapInfo)
|
|
14
|
+
.filter((key) => partMapInfo[key])
|
|
15
|
+
.join(' ');
|
|
16
|
+
}
|
|
17
|
+
update(part, [partMapInfo]) {
|
|
18
|
+
const partList = part.element.part;
|
|
19
|
+
if (this._previousParts === undefined) {
|
|
20
|
+
this._previousParts = new Set();
|
|
21
|
+
for (const name in partMapInfo) {
|
|
22
|
+
if (partMapInfo[name]) {
|
|
23
|
+
partList.add(name);
|
|
24
|
+
this._previousParts.add(name);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return this.render(partMapInfo);
|
|
28
|
+
}
|
|
29
|
+
for (const name of this._previousParts) {
|
|
30
|
+
if (!(name in partMapInfo) || !partMapInfo[name]) {
|
|
31
|
+
partList.remove(name);
|
|
32
|
+
this._previousParts.delete(name);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
for (const name in partMapInfo) {
|
|
36
|
+
const value = !!partMapInfo[name];
|
|
37
|
+
if (value && !this._previousParts.has(name)) {
|
|
38
|
+
partList.add(name);
|
|
39
|
+
this._previousParts.add(name);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return noChange;
|
|
43
|
+
}
|
|
5
44
|
}
|
|
45
|
+
export const partMap = directive(PartMapDirective);
|
|
6
46
|
//# sourceMappingURL=part-map.js.map
|
package/internal/part-map.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"part-map.js","sourceRoot":"","sources":["../../src/internal/part-map.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"part-map.js","sourceRoot":"","sources":["../../src/internal/part-map.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EAEL,SAAS,EAET,SAAS,EAET,QAAQ,GACT,MAAM,kBAAkB,CAAC;AAM1B,MAAM,gBAAiB,SAAQ,SAAS;IAGtC,YAAY,QAAkB;QAC5B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAEhB,IACE,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,SAAS;YACpC,QAAQ,CAAC,IAAI,KAAK,MAAM;YACvB,QAAQ,CAAC,OAAO,EAAE,MAAiB,GAAG,CAAC,EACxC,CAAC;YACD,MAAM,IAAI,KAAK,CACb,iGAAiG,CAClG,CAAC;QACJ,CAAC;IACH,CAAC;IAEe,MAAM,CAAC,WAAwB;QAC7C,OAAO,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC;aAC5B,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;aACjC,IAAI,CAAC,GAAG,CAAC,CAAC;IACf,CAAC;IAEe,MAAM,CAAC,IAAmB,EAAE,CAAC,WAAW,CAA4B;QAClF,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;QAEnC,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS,EAAE,CAAC;YACtC,IAAI,CAAC,cAAc,GAAG,IAAI,GAAG,EAAE,CAAC;YAEhC,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;gBAC/B,IAAI,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;oBACtB,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;oBACnB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAClC,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,EAAE,CAAC;YACvC,IAAI,CAAC,CAAC,IAAI,IAAI,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;gBACjD,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACtB,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACnC,CAAC;QACH,CAAC;QAED,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAG,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAClC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC5C,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACnB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAChC,CAAC;QACH,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAMD,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC,gBAAgB,CAAC,CAAC","sourcesContent":["import { noChange } from 'lit';\nimport {\n type AttributePart,\n Directive,\n type DirectiveParameters,\n directive,\n type PartInfo,\n PartType,\n} from 'lit/directive.js';\n\nexport interface PartMapInfo {\n readonly [name: string]: boolean | null | undefined;\n}\n\nclass PartMapDirective extends Directive {\n private _previousParts?: Set<string>;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n\n if (\n partInfo.type !== PartType.ATTRIBUTE ||\n partInfo.name !== 'part' ||\n (partInfo.strings?.length as number) > 0\n ) {\n throw new Error(\n '`partMap() can only be used in the `part` attribute and must be the only part in the attribute.'\n );\n }\n }\n\n public override render(partMapInfo: PartMapInfo): string {\n return Object.keys(partMapInfo)\n .filter((key) => partMapInfo[key])\n .join(' ');\n }\n\n public override update(part: AttributePart, [partMapInfo]: DirectiveParameters<this>) {\n const partList = part.element.part;\n\n if (this._previousParts === undefined) {\n this._previousParts = new Set();\n\n for (const name in partMapInfo) {\n if (partMapInfo[name]) {\n partList.add(name);\n this._previousParts.add(name);\n }\n }\n\n return this.render(partMapInfo);\n }\n\n for (const name of this._previousParts) {\n if (!(name in partMapInfo) || !partMapInfo[name]) {\n partList.remove(name);\n this._previousParts.delete(name);\n }\n }\n\n for (const name in partMapInfo) {\n const value = !!partMapInfo[name];\n if (value && !this._previousParts.has(name)) {\n partList.add(name);\n this._previousParts.add(name);\n }\n }\n\n return noChange;\n }\n}\n\n/**\n * Similar to Lit's {@link https://lit.dev/docs/templates/directives/#classmap | `classMap`} and\n * {@link https://lit.dev/docs/templates/directives/#stylemap | `styleMap`} but for `part` attributes.\n */\nexport const partMap = directive(PartMapDirective);\nexport type { PartMapDirective };\n"]}
|
package/internal/tags.d.ts
CHANGED
|
@@ -5,3 +5,4 @@ export declare const GRID_HEADER_TAG: "igc-grid-lite-header";
|
|
|
5
5
|
export declare const GRID_ROW_TAG: "igc-grid-lite-row";
|
|
6
6
|
export declare const GRID_CELL_TAG: "igc-grid-lite-cell";
|
|
7
7
|
export declare const GRID_FILTER_ROW_TAG: "igc-filter-row";
|
|
8
|
+
export declare const GRID_COLUMN_TAG: "igc-grid-lite-column";
|
package/internal/tags.js
CHANGED
|
@@ -5,4 +5,5 @@ export const GRID_HEADER_TAG = 'igc-grid-lite-header';
|
|
|
5
5
|
export const GRID_ROW_TAG = 'igc-grid-lite-row';
|
|
6
6
|
export const GRID_CELL_TAG = 'igc-grid-lite-cell';
|
|
7
7
|
export const GRID_FILTER_ROW_TAG = 'igc-filter-row';
|
|
8
|
+
export const GRID_COLUMN_TAG = 'igc-grid-lite-column';
|
|
8
9
|
//# sourceMappingURL=tags.js.map
|
package/internal/tags.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/internal/tags.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAwB,CAAC;AACjD,MAAM,CAAC,MAAM,SAAS,GAAG,iBAA0B,CAAC;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAAmC,CAAC;AACvE,MAAM,CAAC,MAAM,eAAe,GAAG,sBAA+B,CAAC;AAC/D,MAAM,CAAC,MAAM,YAAY,GAAG,mBAA4B,CAAC;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,oBAA6B,CAAC;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAyB,CAAC","sourcesContent":["export const GRID_TAG = 'igc-grid-lite' as const;\nexport const GRID_BODY = 'igc-virtualizer' as const;\nexport const GRID_HEADER_ROW_TAG = 'igc-grid-lite-header-row' as const;\nexport const GRID_HEADER_TAG = 'igc-grid-lite-header' as const;\nexport const GRID_ROW_TAG = 'igc-grid-lite-row' as const;\nexport const GRID_CELL_TAG = 'igc-grid-lite-cell' as const;\nexport const GRID_FILTER_ROW_TAG = 'igc-filter-row' as const;\n"]}
|
|
1
|
+
{"version":3,"file":"tags.js","sourceRoot":"","sources":["../../src/internal/tags.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAwB,CAAC;AACjD,MAAM,CAAC,MAAM,SAAS,GAAG,iBAA0B,CAAC;AACpD,MAAM,CAAC,MAAM,mBAAmB,GAAG,0BAAmC,CAAC;AACvE,MAAM,CAAC,MAAM,eAAe,GAAG,sBAA+B,CAAC;AAC/D,MAAM,CAAC,MAAM,YAAY,GAAG,mBAA4B,CAAC;AACzD,MAAM,CAAC,MAAM,aAAa,GAAG,oBAA6B,CAAC;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAAG,gBAAyB,CAAC;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,sBAA+B,CAAC","sourcesContent":["export const GRID_TAG = 'igc-grid-lite' as const;\nexport const GRID_BODY = 'igc-virtualizer' as const;\nexport const GRID_HEADER_ROW_TAG = 'igc-grid-lite-header-row' as const;\nexport const GRID_HEADER_TAG = 'igc-grid-lite-header' as const;\nexport const GRID_ROW_TAG = 'igc-grid-lite-row' as const;\nexport const GRID_CELL_TAG = 'igc-grid-lite-cell' as const;\nexport const GRID_FILTER_ROW_TAG = 'igc-filter-row' as const;\nexport const GRID_COLUMN_TAG = 'igc-grid-lite-column' as const;\n"]}
|
package/internal/theming.js
CHANGED
|
@@ -59,13 +59,11 @@ function isOfTypeThemeVariant(variant) {
|
|
|
59
59
|
return ['light', 'dark'].includes(variant);
|
|
60
60
|
}
|
|
61
61
|
function getTheme() {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
themeVariant = isOfTypeThemeVariant(foundVariant) ? foundVariant : 'light';
|
|
68
|
-
}
|
|
62
|
+
const cssVars = getAllCssVariables();
|
|
63
|
+
const foundTheme = cssVars.igTheme;
|
|
64
|
+
const foundVariant = cssVars.igThemeVariant;
|
|
65
|
+
theme = isOfTypeTheme(foundTheme) ? foundTheme : 'bootstrap';
|
|
66
|
+
themeVariant = isOfTypeThemeVariant(foundVariant) ? foundVariant : 'light';
|
|
69
67
|
return { theme, themeVariant };
|
|
70
68
|
}
|
|
71
69
|
class ThemingController {
|
package/internal/theming.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theming.js","sourceRoot":"","sources":["../../src/internal/theming.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAmBjD,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAC9C,IA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AAI,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACtB,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC;YACxB,CAAC;YACD,IAAI,IAAI,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC;gBACxB,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;YACvB,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IAES,YAAY;QACpB,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,CAAC;QACzD,IAAI,CAAC,MAAM,GAAG,YAAY,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC;QAE7B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,WAAgC,CAAC;QACzD,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAE5C,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,UAAW,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IAC9E,CAAC;IAEO,mBAAmB;QACzB,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1D,IAAI,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,UAAU,oBAAoB,CAClC,IAA8C,EAC9C,MAAc,EACd,MAAgC;IAEhC,OAAO,IAAI,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACrD,CAAC","sourcesContent":["import type {\n CSSResult,\n LitElement,\n ReactiveController,\n ReactiveControllerHost,\n ReactiveElement,\n} from 'lit';\nimport { adoptStyles, css, isServer } from 'lit';\n\ntype Theme = 'material' | 'bootstrap' | 'indigo' | 'fluent';\ntype ThemeVariant = 'light' | 'dark';\n\nexport type Themes = {\n light: {\n [K in Theme | 'shared']?: CSSResult;\n };\n dark: {\n [K in Theme | 'shared']?: CSSResult;\n };\n};\n\ntype ThemeChangedCallback = (theme: Theme) => unknown;\ntype ThemingControllerConfig = {\n themeChange?: ThemeChangedCallback;\n};\n\nconst CHANGE_THEME_EVENT = 'igc-change-theme';\nlet theme: Theme;\nlet themeVariant: ThemeVariant;\n\nfunction isStyleRule(rule: CSSRule): rule is CSSStyleRule {\n return rule != null && 'style' in rule;\n}\n\nfunction cssKeyToJsKey(key: string): string {\n return key.replace(/^--|-./g, (match) => {\n return match.startsWith('--') ? '' : match.charAt(1).toUpperCase();\n });\n}\n\nfunction getAllCssVariableNames(): Set<string> {\n const cssVars = new Set<string>();\n const styleSheets = Array.from(document.styleSheets);\n\n for (const sheet of styleSheets) {\n let rules: CSSRuleList | undefined;\n\n // Potential CORS or access errors\n try {\n rules = sheet.cssRules;\n } catch {\n continue;\n }\n\n if (!rules) {\n continue;\n }\n\n for (const rule of Array.from(rules)) {\n if (isStyleRule(rule)) {\n const length = rule.style.length;\n\n for (let i = 0; i < length; i++) {\n const style = rule.style[i];\n\n if (style.startsWith('--')) {\n cssVars.add(style);\n }\n }\n }\n }\n }\n\n return cssVars;\n}\n\nfunction getElementCssVariables(\n allCssVars: Set<string>,\n element: HTMLElement,\n pseudo?: string\n): Record<string, string> {\n const cssVars: Record<string, string> = {};\n const styles = getComputedStyle(element, pseudo);\n\n for (const key of allCssVars) {\n const value = styles.getPropertyValue(key);\n\n if (value) {\n cssVars[cssKeyToJsKey(key)] = value.trim();\n }\n }\n\n return cssVars;\n}\n\nfunction getAllCssVariables(): Record<string, string> {\n /* c8 ignore next 2 */\n return isServer ? {} : getElementCssVariables(getAllCssVariableNames(), document.documentElement);\n}\n\nfunction isOfTypeTheme(theme: string): theme is Theme {\n return ['bootstrap', 'material', 'indigo', 'fluent'].includes(theme);\n}\n\nfunction isOfTypeThemeVariant(variant: string): variant is ThemeVariant {\n return ['light', 'dark'].includes(variant);\n}\n\nfunction getTheme() {\n const cssVars = getAllCssVariables();\n const foundTheme = cssVars.igTheme;\n const foundVariant = cssVars.igThemeVariant;\n\n theme = isOfTypeTheme(foundTheme) ? foundTheme : 'bootstrap';\n themeVariant = isOfTypeThemeVariant(foundVariant) ? foundVariant : 'light';\n\n return { theme, themeVariant };\n}\n\nclass ThemingController implements ReactiveController {\n private readonly _host: ReactiveControllerHost & ReactiveElement;\n private readonly _themes: Themes;\n private readonly _options?: ThemingControllerConfig;\n\n private _theme: Theme = 'bootstrap';\n private _variant: ThemeVariant = 'light';\n\n public get theme(): Theme {\n return this._theme;\n }\n\n constructor(\n host: ReactiveControllerHost & ReactiveElement,\n themes: Themes,\n config?: ThemingControllerConfig\n ) {\n this._host = host;\n this._themes = themes;\n this._options = config;\n this._host.addController(this);\n }\n\n /** @internal */\n public hostConnected(): void {\n this._handleThemeChanged();\n globalThis.addEventListener(CHANGE_THEME_EVENT, this);\n }\n\n /** @internal */\n public hostDisconnected(): void {\n globalThis.addEventListener(CHANGE_THEME_EVENT, this);\n }\n\n /** @internal */\n public handleEvent(): void {\n this._handleThemeChanged();\n }\n\n private _getStyles() {\n const props = this._themes[this._variant];\n const styles = { shared: css``, theme: css`` };\n\n for (const [name, sheet] of Object.entries(props)) {\n if (name === 'shared') {\n styles.shared = sheet;\n }\n if (name === this.theme) {\n styles.theme = sheet;\n }\n }\n\n return styles;\n }\n\n protected _adoptStyles(): void {\n const { theme: currentTheme, themeVariant } = getTheme();\n this._theme = currentTheme;\n this._variant = themeVariant;\n\n const ctor = this._host.constructor as typeof LitElement;\n const { shared, theme } = this._getStyles();\n\n adoptStyles(this._host.shadowRoot!, [...ctor.elementStyles, shared, theme]);\n }\n\n private _handleThemeChanged(): void {\n this._adoptStyles();\n this._options?.themeChange?.call(this._host, this._theme);\n this._host.requestUpdate();\n }\n}\n\nexport function addThemingController(\n host: ReactiveControllerHost & ReactiveElement,\n themes: Themes,\n config?: ThemingControllerConfig\n): ThemingController {\n return new ThemingController(host, themes, config);\n}\n\nexport type { ThemingController };\n"]}
|
package/internal/types.d.ts
CHANGED
|
@@ -23,15 +23,11 @@ export type DataType = 'number' | 'string' | 'boolean';
|
|
|
23
23
|
/**
|
|
24
24
|
* Configures the sort behavior for the grid.
|
|
25
25
|
*/
|
|
26
|
-
export interface
|
|
26
|
+
export interface GridLiteSortingOptions {
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* The sorting mode - either 'single' or 'multiple' column sorting.
|
|
29
29
|
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Whether tri-state sorting is enabled.
|
|
33
|
-
*/
|
|
34
|
-
triState: boolean;
|
|
30
|
+
mode: 'single' | 'multiple';
|
|
35
31
|
}
|
|
36
32
|
/**
|
|
37
33
|
* Extended sort configuration for a column.
|
package/internal/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/internal/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactiveControllerHost, TemplateResult } from 'lit';\nimport type IgcGridLiteCell from '../components/cell.js';\nimport type { IgcGridLite } from '../components/grid.js';\nimport type IgcGridLiteHeader from '../components/header.js';\nimport type IgcGridLiteRow from '../components/row.js';\nimport type { SortComparer } from '../operations/sort/types.js';\n\nexport type NavigationState = 'previous' | 'current';\nexport type GridHost<T extends object> = ReactiveControllerHost & IgcGridLite<T>;\n\n/**\n * Helper type for resolving keys of type T.\n */\nexport type Keys<T> = keyof T;\n\n/**\n * Helper type for resolving types of type T.\n */\nexport type BasePropertyType<T, K extends Keys<T> = Keys<T>> = T[K];\n\n/**\n * Helper type for resolving types of type T.\n */\nexport type PropertyType<T, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BasePropertyType<T, K>\n : never;\n\n/** The data for the current column. */\nexport type DataType = 'number' | 'string' | 'boolean';\n\n/**\n * Configures the sort behavior for the grid.\n */\nexport interface
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/internal/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactiveControllerHost, TemplateResult } from 'lit';\nimport type IgcGridLiteCell from '../components/cell.js';\nimport type { IgcGridLite } from '../components/grid.js';\nimport type IgcGridLiteHeader from '../components/header.js';\nimport type IgcGridLiteRow from '../components/row.js';\nimport type { SortComparer } from '../operations/sort/types.js';\n\nexport type NavigationState = 'previous' | 'current';\nexport type GridHost<T extends object> = ReactiveControllerHost & IgcGridLite<T>;\n\n/**\n * Helper type for resolving keys of type T.\n */\nexport type Keys<T> = keyof T;\n\n/**\n * Helper type for resolving types of type T.\n */\nexport type BasePropertyType<T, K extends Keys<T> = Keys<T>> = T[K];\n\n/**\n * Helper type for resolving types of type T.\n */\nexport type PropertyType<T, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BasePropertyType<T, K>\n : never;\n\n/** The data for the current column. */\nexport type DataType = 'number' | 'string' | 'boolean';\n\n/**\n * Configures the sort behavior for the grid.\n */\nexport interface GridLiteSortingOptions {\n /**\n * The sorting mode - either 'single' or 'multiple' column sorting.\n */\n mode: 'single' | 'multiple';\n}\n\n/**\n * Extended sort configuration for a column.\n */\nexport interface BaseColumnSortConfiguration<T, K extends Keys<T> = Keys<T>> {\n /**\n * Whether the sort operations will be case sensitive.\n */\n caseSensitive?: boolean;\n /**\n * Custom comparer function for sort operations for this column.\n */\n comparer?: SortComparer<T, K>;\n}\n\n/**\n * See {@link BaseColumnSortConfiguration} for the full documentation.\n */\nexport type ColumnSortConfiguration<T, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseColumnSortConfiguration<T, K>\n : never;\n\n/**\n * Extended filter configuration for a column.\n */\nexport interface ColumnFilterConfiguration {\n /**\n * Whether the filter operations will be case sensitive.\n */\n caseSensitive?: boolean;\n}\n\n/** Configuration object for grid columns. */\nexport interface BaseColumnConfiguration<T extends object, K extends Keys<T> = Keys<T>> {\n /**\n * The field for from the data the this column will reference.\n */\n key: K;\n /**\n * The type of data this column will reference.\n *\n * Affects the default filter operands if the column is with filtering enabled.\n *\n * @remarks\n * If not passed, `string` is assumed to be the default type.\n *\n */\n type?: DataType;\n /**\n * Optional text to display in the column header. By default, the column key is used\n * to render the header text.\n */\n headerText?: string;\n /**\n * Width for the current column.\n *\n * Accepts most CSS units for controlling width.\n *\n * @remarks\n * If not passed, the column will try to size itself based on the number of other\n * columns and the total width of the grid.\n *\n */\n width?: string;\n /**\n * Whether the column is hidden or not.\n */\n hidden?: boolean;\n /**\n * Whether the the column can be resized or not.\n */\n resizable?: boolean;\n /**\n * Whether the column can be sorted or not.\n */\n sort?: ColumnSortConfiguration<T, K> | boolean;\n /**\n * Whether filter operation can be applied on the column or not.\n */\n filter?: ColumnFilterConfiguration | boolean;\n /**\n * Header template callback.\n */\n headerTemplate?: (params: IgcHeaderContext<T>) => TemplateResult | unknown;\n /**\n * Cell template callback.\n */\n cellTemplate?: (params: IgcCellContext<T, K>) => TemplateResult | unknown;\n}\n\n/**\n * See {@link BaseColumnConfiguration} for the full documentation.\n */\nexport type ColumnConfiguration<T extends object, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseColumnConfiguration<T, K>\n : never;\n\nexport interface ActiveNode<T> {\n column: Keys<T>;\n row: number;\n}\n\n/**\n * Context object for the column header template callback.\n */\nexport interface IgcHeaderContext<T extends object> {\n /**\n * The header element parent of the template.\n */\n parent: IgcGridLiteHeader<T>;\n /**\n * The current configuration for the column.\n */\n column: ColumnConfiguration<T>;\n}\n\n/**\n * Context object for the row cell template callback.\n */\nexport interface BaseIgcCellContext<T extends object, K extends Keys<T> = Keys<T>> {\n /**\n * The cell element parent of the template.\n */\n parent: IgcGridLiteCell<T>;\n /**\n * The row element containing the cell.\n */\n row: IgcGridLiteRow<T>;\n /**\n * The current configuration for the column.\n */\n column: ColumnConfiguration<T, K>;\n /**\n * The value from the data source for this cell.\n */\n value: PropertyType<T, K>;\n}\n\n/**\n * See {@link BaseIgcCellContext} for the full documentation.\n */\nexport type IgcCellContext<T extends object, K extends Keys<T> = Keys<T>> = K extends Keys<T>\n ? BaseIgcCellContext<T, K>\n : never;\n\n/**\n * The parameters passed to a {@link DataPipelineHook} callback.\n */\nexport type DataPipelineParams<T extends object> = {\n /**\n * The current data state of the grid.\n */\n data: T[];\n /**\n * The grid component itself.\n */\n grid: IgcGridLite<T>;\n /**\n * The type of data operation being performed.\n */\n type: 'sort' | 'filter';\n};\n\n/**\n * Callback function for customizing data operations in the grid.\n */\nexport type DataPipelineHook<T extends object> = (\n state: DataPipelineParams<T>\n) => T[] | Promise<T[]>;\n\n/**\n * Configuration for customizing the various data operations of the grid.\n */\nexport interface DataPipelineConfiguration<T extends object> {\n /**\n * Hook for customizing sort operations.\n */\n sort?: DataPipelineHook<T>;\n /**\n * Hook for customizing filter operations.\n */\n filter?: DataPipelineHook<T>;\n}\n"]}
|
package/internal/utils.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { StyleInfo } from 'lit/directives/style-map.js';
|
|
2
|
-
import type { ColumnConfiguration
|
|
2
|
+
import type { ColumnConfiguration } from './types.js';
|
|
3
3
|
export declare function applyColumnWidths<T extends object>(columns: Array<ColumnConfiguration<T>>): StyleInfo;
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function isBoolean(x: unknown): x is boolean;
|
|
5
|
+
export declare function isNumber(x: unknown): x is number;
|
|
6
|
+
export declare function isString(x: unknown): x is string;
|
|
5
7
|
export declare function asArray<T>(value: T | T[]): T[];
|
|
6
8
|
export declare function getFilterOperandsFor<T extends object>(column: ColumnConfiguration<T>): Readonly<import("../operations/filter/types.js").FilterOperands<number, import("../operations/filter/operands/number.js").NumberKeys>> | Readonly<import("../operations/filter/types.js").FilterOperands<string, import("../operations/filter/operands/string.js").StringKeys>> | Readonly<import("../operations/filter/types.js").FilterOperands<boolean, import("../operations/filter/operands/boolean.js").BooleanKeys>>;
|
|
9
|
+
export declare function setColumnsFromData<T extends object>(record: T): Array<ColumnConfiguration<T>>;
|
|
10
|
+
export declare function createColumnConfiguration<T extends object>(config: Partial<ColumnConfiguration<T>>): ColumnConfiguration<T>;
|
package/internal/utils.js
CHANGED
|
@@ -2,21 +2,19 @@ import { BooleanOperands } from '../operations/filter/operands/boolean.js';
|
|
|
2
2
|
import { NumberOperands } from '../operations/filter/operands/number.js';
|
|
3
3
|
import { StringOperands } from '../operations/filter/operands/string.js';
|
|
4
4
|
export function applyColumnWidths(columns) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
.join(' '),
|
|
10
|
-
};
|
|
5
|
+
const iter = Iterator.from(columns)
|
|
6
|
+
.filter((each) => !each.hidden)
|
|
7
|
+
.map((each) => each.width ?? 'minmax(136px, 1fr)');
|
|
8
|
+
return { 'grid-template-columns': iter.toArray().join(' ') };
|
|
11
9
|
}
|
|
12
|
-
export function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
export function isBoolean(x) {
|
|
11
|
+
return typeof x === 'boolean';
|
|
12
|
+
}
|
|
13
|
+
export function isNumber(x) {
|
|
14
|
+
return typeof x === 'number' && !Number.isNaN(x);
|
|
15
|
+
}
|
|
16
|
+
export function isString(x) {
|
|
17
|
+
return typeof x === 'string';
|
|
20
18
|
}
|
|
21
19
|
export function asArray(value) {
|
|
22
20
|
return Array.isArray(value) ? value : [value];
|
|
@@ -31,4 +29,35 @@ export function getFilterOperandsFor(column) {
|
|
|
31
29
|
return StringOperands;
|
|
32
30
|
}
|
|
33
31
|
}
|
|
32
|
+
function getColumnType(value) {
|
|
33
|
+
if (isBoolean(value)) {
|
|
34
|
+
return 'boolean';
|
|
35
|
+
}
|
|
36
|
+
if (isNumber(value)) {
|
|
37
|
+
return 'number';
|
|
38
|
+
}
|
|
39
|
+
return 'string';
|
|
40
|
+
}
|
|
41
|
+
export function setColumnsFromData(record) {
|
|
42
|
+
return Object.entries(record).map(([key, value]) => {
|
|
43
|
+
return createColumnConfiguration({
|
|
44
|
+
key: key,
|
|
45
|
+
type: getColumnType(value),
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
export function createColumnConfiguration(config) {
|
|
50
|
+
return {
|
|
51
|
+
key: config.key ?? '',
|
|
52
|
+
type: config.type ?? 'string',
|
|
53
|
+
headerText: config.headerText,
|
|
54
|
+
width: config.width,
|
|
55
|
+
hidden: config.hidden ?? false,
|
|
56
|
+
resizable: config.resizable ?? false,
|
|
57
|
+
sort: config.sort ?? false,
|
|
58
|
+
filter: config.filter ?? false,
|
|
59
|
+
headerTemplate: config.headerTemplate,
|
|
60
|
+
cellTemplate: config.cellTemplate,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
34
63
|
//# sourceMappingURL=utils.js.map
|