@simple-table/angular 3.9.6 → 3.9.7

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/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@angular/core"),t=require("simple-table-core");function o(e,t,o,n){var i,r=arguments.length,p=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(p=(r<3?i(p):r>3?i(t,o,p):i(t,o))||p);return r>3&&p&&Object.defineProperty(t,o,p),p}function n(t,o,n,i){return r=>{const p=document.createElement("div"),s=e.createComponent(t,{environmentInjector:n,hostElement:p});return Object.assign(s.instance,r),o.attachView(s.hostView),s.changeDetectorRef.detectChanges(),i?.register(p,()=>{o.detachView(s.hostView),s.destroy()}),p}}function i(e,t,o,r){const{defaultHeaders:p,rows:s,footerRenderer:l,emptyStateRenderer:d,errorStateRenderer:a,loadingStateRenderer:h,tableEmptyStateRenderer:m,headerDropdown:u,columnEditorConfig:c,icons:C,rowButtons:v,onColumnOrderChange:g,onColumnWidthChange:S,onHeaderEdit:b,onColumnSelect:y,...x}=e,R=e=>n(e,o,r,t),I={...x,rows:s,defaultHeaders:p.map(function e(n){const{cellRenderer:p,headerRenderer:s,children:l,nestedTable:d,...a}=n,h={...a};if(p&&(h.cellRenderer=p.ɵcmp?R(p):p),s&&(h.headerRenderer=s.ɵcmp?R(s):s),l&&(h.children=l.map(e)),d){const e={...d,rows:[]};h.nestedTable=i(e,t,o,r)}return h}),onRendererHostDiscard:t.disposeHost,...g?{onColumnOrderChange:e=>g(e)}:{},...S?{onColumnWidthChange:e=>S(e)}:{},...b?{onHeaderEdit:(e,t)=>b(e,t)}:{},...y?{onColumnSelect:e=>y(e)}:{}};return void 0!==l&&(I.footerRenderer=l.ɵcmp?R(l):l),void 0!==d&&(I.emptyStateRenderer=d.ɵcmp?R(d):d),void 0!==a&&(I.errorStateRenderer=a.ɵcmp?R(a):a),void 0!==h&&(I.loadingStateRenderer=h.ɵcmp?R(h):h),void 0!==m&&(I.tableEmptyStateRenderer=m),void 0!==u&&(I.headerDropdown=R(u)),void 0!==c&&(I.columnEditorConfig=function(e){const{rowRenderer:t,customRenderer:o,...n}=e;return{...n,...t?{rowRenderer:R(t)}:{},...o?{customRenderer:R(o)}:{}}}(c)),void 0!==C&&(I.icons=function(e){const t={};for(const[o,n]of Object.entries(e))null!=n&&(t[o]="string"==typeof n||n instanceof HTMLElement||n instanceof SVGSVGElement?n:n.ɵcmp?R(n)({}):n);return t}(C)),void 0!==v&&(I.rowButtons=v.map(e=>R(e))),I}"function"==typeof SuppressedError&&SuppressedError;const r="data-st-mount-id";class p{constructor(){this.entries=new Map,this.nextId=0,this.disposeHost=e=>{if("function"!=typeof e.getAttribute)return;const t=[],o=e.getAttribute(r);null!==o&&t.push(o),e.querySelectorAll(`[${r}]`).forEach(e=>{const o=e.getAttribute(r);null!==o&&t.push(o)});for(const e of t){const t=this.entries.get(e);t&&(this.entries.delete(e),t())}}}register(e,t){const o="st-mount-"+this.nextId++;e.setAttribute(r,o),this.entries.set(o,t)}clear(){for(const e of this.entries.values())e();this.entries.clear()}get size(){return this.entries.size}}exports.SimpleTableComponent=class{constructor(){this.tableReady=new e.EventEmitter,this.instance=null,this.registry=new p,this.hostEl=e.inject(e.ElementRef),this.appRef=e.inject(e.ApplicationRef),this.envInjector=e.inject(e.EnvironmentInjector)}ngOnInit(){const e=this.hostEl.nativeElement.querySelector("div");e&&(this.instance=new t.SimpleTableVanilla(e,i(this.getProps(),this.registry,this.appRef,this.envInjector)),this.instance.mount(),this.tableReady.emit(this.instance.getAPI()))}ngOnChanges(){this.instance?.update(i(this.getProps(),this.registry,this.appRef,this.envInjector))}ngOnDestroy(){this.instance?.destroy(),this.instance=null,this.registry.clear()}getAPI(){return this.instance?.getAPI()??null}getProps(){const e={rows:this.rows,defaultHeaders:this.defaultHeaders};return void 0!==this.footerRenderer&&(e.footerRenderer=this.footerRenderer),void 0!==this.loadingStateRenderer&&(e.loadingStateRenderer=this.loadingStateRenderer),void 0!==this.errorStateRenderer&&(e.errorStateRenderer=this.errorStateRenderer),void 0!==this.emptyStateRenderer&&(e.emptyStateRenderer=this.emptyStateRenderer),void 0!==this.tableEmptyStateRenderer&&(e.tableEmptyStateRenderer=this.tableEmptyStateRenderer),void 0!==this.headerDropdown&&(e.headerDropdown=this.headerDropdown),void 0!==this.columnEditorConfig&&(e.columnEditorConfig=this.columnEditorConfig),void 0!==this.onCellClick&&(e.onCellClick=this.onCellClick),void 0!==this.onCellEdit&&(e.onCellEdit=this.onCellEdit),void 0!==this.onSortChange&&(e.onSortChange=this.onSortChange),void 0!==this.onFilterChange&&(e.onFilterChange=this.onFilterChange),void 0!==this.onRowSelectionChange&&(e.onRowSelectionChange=this.onRowSelectionChange),void 0!==this.onRowGroupExpand&&(e.onRowGroupExpand=this.onRowGroupExpand),void 0!==this.onColumnOrderChange&&(e.onColumnOrderChange=this.onColumnOrderChange),void 0!==this.onColumnVisibilityChange&&(e.onColumnVisibilityChange=this.onColumnVisibilityChange),void 0!==this.onColumnWidthChange&&(e.onColumnWidthChange=this.onColumnWidthChange),void 0!==this.onPageChange&&(e.onPageChange=this.onPageChange),void 0!==this.onLoadMore&&(e.onLoadMore=this.onLoadMore),void 0!==this.onGridReady&&(e.onGridReady=this.onGridReady),void 0!==this.rowGrouping&&(e.rowGrouping=this.rowGrouping),void 0!==this.enableRowSelection&&(e.enableRowSelection=this.enableRowSelection),void 0!==this.theme&&(e.theme=this.theme),void 0!==this.quickFilter&&(e.quickFilter=this.quickFilter),void 0!==this.isLoading&&(e.isLoading=this.isLoading),void 0!==this.getRowId&&(e.getRowId=this.getRowId),void 0!==this.shouldPaginate&&(e.shouldPaginate=this.shouldPaginate),void 0!==this.rowsPerPage&&(e.rowsPerPage=this.rowsPerPage),void 0!==this.serverSidePagination&&(e.serverSidePagination=this.serverSidePagination),void 0!==this.totalRowCount&&(e.totalRowCount=this.totalRowCount),void 0!==this.height&&(e.height=this.height),void 0!==this.maxHeight&&(e.maxHeight=this.maxHeight),void 0!==this.scrollParent&&(e.scrollParent=this.scrollParent),void 0!==this.infiniteScrollThreshold&&(e.infiniteScrollThreshold=this.infiniteScrollThreshold),void 0!==this.columnResizing&&(e.columnResizing=this.columnResizing),void 0!==this.columnReordering&&(e.columnReordering=this.columnReordering),void 0!==this.editColumns&&(e.editColumns=this.editColumns),void 0!==this.editColumnsInitOpen&&(e.editColumnsInitOpen=this.editColumnsInitOpen),void 0!==this.selectableCells&&(e.selectableCells=this.selectableCells),void 0!==this.enableHeaderEditing&&(e.enableHeaderEditing=this.enableHeaderEditing),void 0!==this.onHeaderEdit&&(e.onHeaderEdit=this.onHeaderEdit),void 0!==this.customTheme&&(e.customTheme=this.customTheme),void 0!==this.icons&&(e.icons=this.icons),void 0!==this.externalFilterHandling&&(e.externalFilterHandling=this.externalFilterHandling),void 0!==this.externalSortHandling&&(e.externalSortHandling=this.externalSortHandling),void 0!==this.columnBorders&&(e.columnBorders=this.columnBorders),void 0!==this.rowButtons&&(e.rowButtons=this.rowButtons),void 0!==this.hideFooter&&(e.hideFooter=this.hideFooter),void 0!==this.footerPosition&&(e.footerPosition=this.footerPosition),void 0!==this.initialSortColumn&&(e.initialSortColumn=this.initialSortColumn),void 0!==this.initialSortDirection&&(e.initialSortDirection=this.initialSortDirection),void 0!==this.expandAll&&(e.expandAll=this.expandAll),void 0!==this.autoExpandColumns&&(e.autoExpandColumns=this.autoExpandColumns),void 0!==this.animations&&(e.animations=this.animations),e}},o([e.Input({required:!0})],exports.SimpleTableComponent.prototype,"rows",void 0),o([e.Input({required:!0})],exports.SimpleTableComponent.prototype,"defaultHeaders",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"footerRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"loadingStateRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"errorStateRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"emptyStateRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"tableEmptyStateRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"headerDropdown",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"columnEditorConfig",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onCellClick",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onCellEdit",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onSortChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onFilterChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onRowSelectionChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onRowGroupExpand",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onColumnOrderChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onColumnVisibilityChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onColumnWidthChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onPageChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onLoadMore",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onGridReady",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"rowGrouping",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"enableRowSelection",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"theme",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"quickFilter",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"isLoading",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"getRowId",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"shouldPaginate",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"rowsPerPage",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"serverSidePagination",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"totalRowCount",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"height",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"maxHeight",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"scrollParent",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"infiniteScrollThreshold",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"columnResizing",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"columnReordering",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"editColumns",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"editColumnsInitOpen",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"selectableCells",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"enableHeaderEditing",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onHeaderEdit",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"customTheme",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"icons",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"externalFilterHandling",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"externalSortHandling",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"columnBorders",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"rowButtons",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"hideFooter",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"footerPosition",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"initialSortColumn",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"initialSortDirection",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"expandAll",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"autoExpandColumns",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"animations",void 0),o([e.Output()],exports.SimpleTableComponent.prototype,"tableReady",void 0),exports.SimpleTableComponent=o([e.Component({selector:"simple-table",standalone:!0,template:"<div #host></div>",styles:[":host { display: block; }"]})],exports.SimpleTableComponent),Object.defineProperty(exports,"asRows",{enumerable:!0,get:function(){return t.asRows}}),exports.provideSimpleTable=function(){return e.makeEnvironmentProviders([])},exports.wrapAngularRenderer=n;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@angular/core"),t=require("simple-table-core");function o(e,t,o,n){var i,r=arguments.length,p=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)p=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(p=(r<3?i(p):r>3?i(t,o,p):i(t,o))||p);return r>3&&p&&Object.defineProperty(t,o,p),p}function n(t,o,n,i){return r=>{const p=document.createElement("div"),s=e.createComponent(t,{environmentInjector:n,hostElement:p});return Object.assign(s.instance,r),o.attachView(s.hostView),s.changeDetectorRef.detectChanges(),i?.register(p,()=>{o.detachView(s.hostView),s.destroy()}),p}}function i(e,t,o,r){const{defaultHeaders:p,rows:s,footerRenderer:l,emptyStateRenderer:d,errorStateRenderer:a,loadingStateRenderer:h,tableEmptyStateRenderer:m,headerDropdown:u,columnEditorConfig:c,icons:C,rowButtons:v,onColumnOrderChange:g,onColumnWidthChange:S,onHeaderEdit:b,onColumnSelect:y,...x}=e,R=e=>n(e,o,r,t),I={...x,rows:s,defaultHeaders:p.map(function e(n){const{cellRenderer:p,headerRenderer:s,children:l,nestedTable:d,...a}=n,h={...a};if(p&&(h.cellRenderer=p.ɵcmp?R(p):p),s&&(h.headerRenderer=s.ɵcmp?R(s):s),l&&(h.children=l.map(e)),d){const e={...d,rows:[]};h.nestedTable=i(e,t,o,r)}return h}),onRendererHostDiscard:t.disposeHost,...g?{onColumnOrderChange:e=>g(e)}:{},...S?{onColumnWidthChange:e=>S(e)}:{},...b?{onHeaderEdit:(e,t)=>b(e,t)}:{},...y?{onColumnSelect:e=>y(e)}:{}};return void 0!==l&&(I.footerRenderer=l.ɵcmp?R(l):l),void 0!==d&&(I.emptyStateRenderer=d.ɵcmp?R(d):d),void 0!==a&&(I.errorStateRenderer=a.ɵcmp?R(a):a),void 0!==h&&(I.loadingStateRenderer=h.ɵcmp?R(h):h),void 0!==m&&(I.tableEmptyStateRenderer=m),void 0!==u&&(I.headerDropdown=R(u)),void 0!==c&&(I.columnEditorConfig=function(e){const{rowRenderer:t,customRenderer:o,...n}=e;return{...n,...t?{rowRenderer:R(t)}:{},...o?{customRenderer:R(o)}:{}}}(c)),void 0!==C&&(I.icons=function(e){const t={};for(const[o,n]of Object.entries(e))null!=n&&(t[o]="string"==typeof n||n instanceof HTMLElement||n instanceof SVGSVGElement?n:n.ɵcmp?R(n)({}):n);return t}(C)),void 0!==v&&(I.rowButtons=v.map(e=>R(e))),I}"function"==typeof SuppressedError&&SuppressedError;const r="data-st-mount-id";class p{constructor(){this.entries=new Map,this.nextId=0,this.disposeHost=e=>{if("function"!=typeof e.getAttribute)return;const t=[],o=e.getAttribute(r);null!==o&&t.push(o),e.querySelectorAll(`[${r}]`).forEach(e=>{const o=e.getAttribute(r);null!==o&&t.push(o)});for(const e of t){const t=this.entries.get(e);t&&(this.entries.delete(e),t())}}}register(e,t){const o="st-mount-"+this.nextId++;e.setAttribute(r,o),this.entries.set(o,t)}clear(){for(const e of this.entries.values())e();this.entries.clear()}get size(){return this.entries.size}}exports.SimpleTableComponent=class{constructor(){this.tableReady=new e.EventEmitter,this.instance=null,this.registry=new p,this.hostEl=e.inject(e.ElementRef),this.appRef=e.inject(e.ApplicationRef),this.envInjector=e.inject(e.EnvironmentInjector)}ngOnInit(){const e=this.hostEl.nativeElement.querySelector("div");e&&(this.instance=new t.SimpleTableVanilla(e,i(this.getProps(),this.registry,this.appRef,this.envInjector)),this.instance.mount(),this.tableReady.emit(this.instance.getAPI()))}ngOnChanges(){this.instance?.update(i(this.getProps(),this.registry,this.appRef,this.envInjector))}ngOnDestroy(){this.instance?.destroy(),this.instance=null,this.registry.clear()}getAPI(){return this.instance?.getAPI()??null}getProps(){const e={rows:this.rows,defaultHeaders:this.defaultHeaders};return void 0!==this.footerRenderer&&(e.footerRenderer=this.footerRenderer),void 0!==this.loadingStateRenderer&&(e.loadingStateRenderer=this.loadingStateRenderer),void 0!==this.errorStateRenderer&&(e.errorStateRenderer=this.errorStateRenderer),void 0!==this.emptyStateRenderer&&(e.emptyStateRenderer=this.emptyStateRenderer),void 0!==this.tableEmptyStateRenderer&&(e.tableEmptyStateRenderer=this.tableEmptyStateRenderer),void 0!==this.headerDropdown&&(e.headerDropdown=this.headerDropdown),void 0!==this.columnEditorConfig&&(e.columnEditorConfig=this.columnEditorConfig),void 0!==this.onCellClick&&(e.onCellClick=this.onCellClick),void 0!==this.onCellEdit&&(e.onCellEdit=this.onCellEdit),void 0!==this.onSortChange&&(e.onSortChange=this.onSortChange),void 0!==this.onFilterChange&&(e.onFilterChange=this.onFilterChange),void 0!==this.onRowSelectionChange&&(e.onRowSelectionChange=this.onRowSelectionChange),void 0!==this.onRowGroupExpand&&(e.onRowGroupExpand=this.onRowGroupExpand),void 0!==this.onColumnOrderChange&&(e.onColumnOrderChange=this.onColumnOrderChange),void 0!==this.onColumnVisibilityChange&&(e.onColumnVisibilityChange=this.onColumnVisibilityChange),void 0!==this.onColumnWidthChange&&(e.onColumnWidthChange=this.onColumnWidthChange),void 0!==this.onPageChange&&(e.onPageChange=this.onPageChange),void 0!==this.onLoadMore&&(e.onLoadMore=this.onLoadMore),void 0!==this.onGridReady&&(e.onGridReady=this.onGridReady),void 0!==this.rowGrouping&&(e.rowGrouping=this.rowGrouping),void 0!==this.enableRowSelection&&(e.enableRowSelection=this.enableRowSelection),void 0!==this.theme&&(e.theme=this.theme),void 0!==this.quickFilter&&(e.quickFilter=this.quickFilter),void 0!==this.isLoading&&(e.isLoading=this.isLoading),void 0!==this.getRowId&&(e.getRowId=this.getRowId),void 0!==this.shouldPaginate&&(e.shouldPaginate=this.shouldPaginate),void 0!==this.rowsPerPage&&(e.rowsPerPage=this.rowsPerPage),void 0!==this.serverSidePagination&&(e.serverSidePagination=this.serverSidePagination),void 0!==this.totalRowCount&&(e.totalRowCount=this.totalRowCount),void 0!==this.height&&(e.height=this.height),void 0!==this.maxHeight&&(e.maxHeight=this.maxHeight),void 0!==this.scrollParent&&(e.scrollParent=this.scrollParent),void 0!==this.infiniteScrollThreshold&&(e.infiniteScrollThreshold=this.infiniteScrollThreshold),void 0!==this.columnResizing&&(e.columnResizing=this.columnResizing),void 0!==this.columnReordering&&(e.columnReordering=this.columnReordering),void 0!==this.editColumns&&(e.editColumns=this.editColumns),void 0!==this.editColumnsInitOpen&&(e.editColumnsInitOpen=this.editColumnsInitOpen),void 0!==this.selectableCells&&(e.selectableCells=this.selectableCells),void 0!==this.selectableColumns&&(e.selectableColumns=this.selectableColumns),void 0!==this.enableHeaderEditing&&(e.enableHeaderEditing=this.enableHeaderEditing),void 0!==this.onHeaderEdit&&(e.onHeaderEdit=this.onHeaderEdit),void 0!==this.customTheme&&(e.customTheme=this.customTheme),void 0!==this.icons&&(e.icons=this.icons),void 0!==this.externalFilterHandling&&(e.externalFilterHandling=this.externalFilterHandling),void 0!==this.externalSortHandling&&(e.externalSortHandling=this.externalSortHandling),void 0!==this.columnBorders&&(e.columnBorders=this.columnBorders),void 0!==this.rowButtons&&(e.rowButtons=this.rowButtons),void 0!==this.hideFooter&&(e.hideFooter=this.hideFooter),void 0!==this.footerPosition&&(e.footerPosition=this.footerPosition),void 0!==this.initialSortColumn&&(e.initialSortColumn=this.initialSortColumn),void 0!==this.initialSortDirection&&(e.initialSortDirection=this.initialSortDirection),void 0!==this.expandAll&&(e.expandAll=this.expandAll),void 0!==this.autoExpandColumns&&(e.autoExpandColumns=this.autoExpandColumns),void 0!==this.animations&&(e.animations=this.animations),e}},o([e.Input({required:!0})],exports.SimpleTableComponent.prototype,"rows",void 0),o([e.Input({required:!0})],exports.SimpleTableComponent.prototype,"defaultHeaders",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"footerRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"loadingStateRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"errorStateRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"emptyStateRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"tableEmptyStateRenderer",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"headerDropdown",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"columnEditorConfig",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onCellClick",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onCellEdit",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onSortChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onFilterChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onRowSelectionChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onRowGroupExpand",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onColumnOrderChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onColumnVisibilityChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onColumnWidthChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onPageChange",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onLoadMore",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onGridReady",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"rowGrouping",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"enableRowSelection",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"theme",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"quickFilter",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"isLoading",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"getRowId",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"shouldPaginate",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"rowsPerPage",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"serverSidePagination",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"totalRowCount",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"height",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"maxHeight",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"scrollParent",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"infiniteScrollThreshold",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"columnResizing",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"columnReordering",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"editColumns",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"editColumnsInitOpen",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"selectableCells",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"selectableColumns",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"enableHeaderEditing",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"onHeaderEdit",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"customTheme",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"icons",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"externalFilterHandling",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"externalSortHandling",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"columnBorders",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"rowButtons",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"hideFooter",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"footerPosition",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"initialSortColumn",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"initialSortDirection",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"expandAll",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"autoExpandColumns",void 0),o([e.Input()],exports.SimpleTableComponent.prototype,"animations",void 0),o([e.Output()],exports.SimpleTableComponent.prototype,"tableReady",void 0),exports.SimpleTableComponent=o([e.Component({selector:"simple-table",standalone:!0,template:"<div #host></div>",styles:[":host { display: block; }"]})],exports.SimpleTableComponent),Object.defineProperty(exports,"asRows",{enumerable:!0,get:function(){return t.asRows}}),exports.provideSimpleTable=function(){return e.makeEnvironmentProviders([])},exports.wrapAngularRenderer=n;
2
2
  //# sourceMappingURL=index.js.map
package/dist/index.es.js CHANGED
@@ -1,2 +1,2 @@
1
- import{createComponent as e,Input as t,Output as o,Component as i,EventEmitter as n,inject as r,ElementRef as d,ApplicationRef as s,EnvironmentInjector as a,makeEnvironmentProviders as l}from"@angular/core";import{SimpleTableVanilla as h}from"simple-table-core";export{asRows}from"simple-table-core";function p(e,t,o,i){var n,r=arguments.length,d=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)d=Reflect.decorate(e,t,o,i);else for(var s=e.length-1;s>=0;s--)(n=e[s])&&(d=(r<3?n(d):r>3?n(t,o,d):n(t,o))||d);return r>3&&d&&Object.defineProperty(t,o,d),d}function c(t,o,i,n){return r=>{const d=document.createElement("div"),s=e(t,{environmentInjector:i,hostElement:d});return Object.assign(s.instance,r),o.attachView(s.hostView),s.changeDetectorRef.detectChanges(),n?.register(d,()=>{o.detachView(s.hostView),s.destroy()}),d}}function u(e,t,o,i){const{defaultHeaders:n,rows:r,footerRenderer:d,emptyStateRenderer:s,errorStateRenderer:a,loadingStateRenderer:l,tableEmptyStateRenderer:h,headerDropdown:p,columnEditorConfig:v,icons:g,rowButtons:m,onColumnOrderChange:y,onColumnWidthChange:C,onHeaderEdit:R,onColumnSelect:f,...S}=e,w=e=>c(e,o,i,t),E={...S,rows:r,defaultHeaders:n.map(function e(n){const{cellRenderer:r,headerRenderer:d,children:s,nestedTable:a,...l}=n,h={...l};if(r&&(h.cellRenderer=r.ɵcmp?w(r):r),d&&(h.headerRenderer=d.ɵcmp?w(d):d),s&&(h.children=s.map(e)),a){const e={...a,rows:[]};h.nestedTable=u(e,t,o,i)}return h}),onRendererHostDiscard:t.disposeHost,...y?{onColumnOrderChange:e=>y(e)}:{},...C?{onColumnWidthChange:e=>C(e)}:{},...R?{onHeaderEdit:(e,t)=>R(e,t)}:{},...f?{onColumnSelect:e=>f(e)}:{}};return void 0!==d&&(E.footerRenderer=d.ɵcmp?w(d):d),void 0!==s&&(E.emptyStateRenderer=s.ɵcmp?w(s):s),void 0!==a&&(E.errorStateRenderer=a.ɵcmp?w(a):a),void 0!==l&&(E.loadingStateRenderer=l.ɵcmp?w(l):l),void 0!==h&&(E.tableEmptyStateRenderer=h),void 0!==p&&(E.headerDropdown=w(p)),void 0!==v&&(E.columnEditorConfig=function(e){const{rowRenderer:t,customRenderer:o,...i}=e;return{...i,...t?{rowRenderer:w(t)}:{},...o?{customRenderer:w(o)}:{}}}(v)),void 0!==g&&(E.icons=function(e){const t={};for(const[o,i]of Object.entries(e))null!=i&&(t[o]="string"==typeof i||i instanceof HTMLElement||i instanceof SVGSVGElement?i:i.ɵcmp?w(i)({}):i);return t}(g)),void 0!==m&&(E.rowButtons=m.map(e=>w(e))),E}"function"==typeof SuppressedError&&SuppressedError;const v="data-st-mount-id";class g{constructor(){this.entries=new Map,this.nextId=0,this.disposeHost=e=>{if("function"!=typeof e.getAttribute)return;const t=[],o=e.getAttribute(v);null!==o&&t.push(o),e.querySelectorAll(`[${v}]`).forEach(e=>{const o=e.getAttribute(v);null!==o&&t.push(o)});for(const e of t){const t=this.entries.get(e);t&&(this.entries.delete(e),t())}}}register(e,t){const o="st-mount-"+this.nextId++;e.setAttribute(v,o),this.entries.set(o,t)}clear(){for(const e of this.entries.values())e();this.entries.clear()}get size(){return this.entries.size}}let m=class{constructor(){this.tableReady=new n,this.instance=null,this.registry=new g,this.hostEl=r(d),this.appRef=r(s),this.envInjector=r(a)}ngOnInit(){const e=this.hostEl.nativeElement.querySelector("div");e&&(this.instance=new h(e,u(this.getProps(),this.registry,this.appRef,this.envInjector)),this.instance.mount(),this.tableReady.emit(this.instance.getAPI()))}ngOnChanges(){this.instance?.update(u(this.getProps(),this.registry,this.appRef,this.envInjector))}ngOnDestroy(){this.instance?.destroy(),this.instance=null,this.registry.clear()}getAPI(){return this.instance?.getAPI()??null}getProps(){const e={rows:this.rows,defaultHeaders:this.defaultHeaders};return void 0!==this.footerRenderer&&(e.footerRenderer=this.footerRenderer),void 0!==this.loadingStateRenderer&&(e.loadingStateRenderer=this.loadingStateRenderer),void 0!==this.errorStateRenderer&&(e.errorStateRenderer=this.errorStateRenderer),void 0!==this.emptyStateRenderer&&(e.emptyStateRenderer=this.emptyStateRenderer),void 0!==this.tableEmptyStateRenderer&&(e.tableEmptyStateRenderer=this.tableEmptyStateRenderer),void 0!==this.headerDropdown&&(e.headerDropdown=this.headerDropdown),void 0!==this.columnEditorConfig&&(e.columnEditorConfig=this.columnEditorConfig),void 0!==this.onCellClick&&(e.onCellClick=this.onCellClick),void 0!==this.onCellEdit&&(e.onCellEdit=this.onCellEdit),void 0!==this.onSortChange&&(e.onSortChange=this.onSortChange),void 0!==this.onFilterChange&&(e.onFilterChange=this.onFilterChange),void 0!==this.onRowSelectionChange&&(e.onRowSelectionChange=this.onRowSelectionChange),void 0!==this.onRowGroupExpand&&(e.onRowGroupExpand=this.onRowGroupExpand),void 0!==this.onColumnOrderChange&&(e.onColumnOrderChange=this.onColumnOrderChange),void 0!==this.onColumnVisibilityChange&&(e.onColumnVisibilityChange=this.onColumnVisibilityChange),void 0!==this.onColumnWidthChange&&(e.onColumnWidthChange=this.onColumnWidthChange),void 0!==this.onPageChange&&(e.onPageChange=this.onPageChange),void 0!==this.onLoadMore&&(e.onLoadMore=this.onLoadMore),void 0!==this.onGridReady&&(e.onGridReady=this.onGridReady),void 0!==this.rowGrouping&&(e.rowGrouping=this.rowGrouping),void 0!==this.enableRowSelection&&(e.enableRowSelection=this.enableRowSelection),void 0!==this.theme&&(e.theme=this.theme),void 0!==this.quickFilter&&(e.quickFilter=this.quickFilter),void 0!==this.isLoading&&(e.isLoading=this.isLoading),void 0!==this.getRowId&&(e.getRowId=this.getRowId),void 0!==this.shouldPaginate&&(e.shouldPaginate=this.shouldPaginate),void 0!==this.rowsPerPage&&(e.rowsPerPage=this.rowsPerPage),void 0!==this.serverSidePagination&&(e.serverSidePagination=this.serverSidePagination),void 0!==this.totalRowCount&&(e.totalRowCount=this.totalRowCount),void 0!==this.height&&(e.height=this.height),void 0!==this.maxHeight&&(e.maxHeight=this.maxHeight),void 0!==this.scrollParent&&(e.scrollParent=this.scrollParent),void 0!==this.infiniteScrollThreshold&&(e.infiniteScrollThreshold=this.infiniteScrollThreshold),void 0!==this.columnResizing&&(e.columnResizing=this.columnResizing),void 0!==this.columnReordering&&(e.columnReordering=this.columnReordering),void 0!==this.editColumns&&(e.editColumns=this.editColumns),void 0!==this.editColumnsInitOpen&&(e.editColumnsInitOpen=this.editColumnsInitOpen),void 0!==this.selectableCells&&(e.selectableCells=this.selectableCells),void 0!==this.enableHeaderEditing&&(e.enableHeaderEditing=this.enableHeaderEditing),void 0!==this.onHeaderEdit&&(e.onHeaderEdit=this.onHeaderEdit),void 0!==this.customTheme&&(e.customTheme=this.customTheme),void 0!==this.icons&&(e.icons=this.icons),void 0!==this.externalFilterHandling&&(e.externalFilterHandling=this.externalFilterHandling),void 0!==this.externalSortHandling&&(e.externalSortHandling=this.externalSortHandling),void 0!==this.columnBorders&&(e.columnBorders=this.columnBorders),void 0!==this.rowButtons&&(e.rowButtons=this.rowButtons),void 0!==this.hideFooter&&(e.hideFooter=this.hideFooter),void 0!==this.footerPosition&&(e.footerPosition=this.footerPosition),void 0!==this.initialSortColumn&&(e.initialSortColumn=this.initialSortColumn),void 0!==this.initialSortDirection&&(e.initialSortDirection=this.initialSortDirection),void 0!==this.expandAll&&(e.expandAll=this.expandAll),void 0!==this.autoExpandColumns&&(e.autoExpandColumns=this.autoExpandColumns),void 0!==this.animations&&(e.animations=this.animations),e}};function y(){return l([])}p([t({required:!0})],m.prototype,"rows",void 0),p([t({required:!0})],m.prototype,"defaultHeaders",void 0),p([t()],m.prototype,"footerRenderer",void 0),p([t()],m.prototype,"loadingStateRenderer",void 0),p([t()],m.prototype,"errorStateRenderer",void 0),p([t()],m.prototype,"emptyStateRenderer",void 0),p([t()],m.prototype,"tableEmptyStateRenderer",void 0),p([t()],m.prototype,"headerDropdown",void 0),p([t()],m.prototype,"columnEditorConfig",void 0),p([t()],m.prototype,"onCellClick",void 0),p([t()],m.prototype,"onCellEdit",void 0),p([t()],m.prototype,"onSortChange",void 0),p([t()],m.prototype,"onFilterChange",void 0),p([t()],m.prototype,"onRowSelectionChange",void 0),p([t()],m.prototype,"onRowGroupExpand",void 0),p([t()],m.prototype,"onColumnOrderChange",void 0),p([t()],m.prototype,"onColumnVisibilityChange",void 0),p([t()],m.prototype,"onColumnWidthChange",void 0),p([t()],m.prototype,"onPageChange",void 0),p([t()],m.prototype,"onLoadMore",void 0),p([t()],m.prototype,"onGridReady",void 0),p([t()],m.prototype,"rowGrouping",void 0),p([t()],m.prototype,"enableRowSelection",void 0),p([t()],m.prototype,"theme",void 0),p([t()],m.prototype,"quickFilter",void 0),p([t()],m.prototype,"isLoading",void 0),p([t()],m.prototype,"getRowId",void 0),p([t()],m.prototype,"shouldPaginate",void 0),p([t()],m.prototype,"rowsPerPage",void 0),p([t()],m.prototype,"serverSidePagination",void 0),p([t()],m.prototype,"totalRowCount",void 0),p([t()],m.prototype,"height",void 0),p([t()],m.prototype,"maxHeight",void 0),p([t()],m.prototype,"scrollParent",void 0),p([t()],m.prototype,"infiniteScrollThreshold",void 0),p([t()],m.prototype,"columnResizing",void 0),p([t()],m.prototype,"columnReordering",void 0),p([t()],m.prototype,"editColumns",void 0),p([t()],m.prototype,"editColumnsInitOpen",void 0),p([t()],m.prototype,"selectableCells",void 0),p([t()],m.prototype,"enableHeaderEditing",void 0),p([t()],m.prototype,"onHeaderEdit",void 0),p([t()],m.prototype,"customTheme",void 0),p([t()],m.prototype,"icons",void 0),p([t()],m.prototype,"externalFilterHandling",void 0),p([t()],m.prototype,"externalSortHandling",void 0),p([t()],m.prototype,"columnBorders",void 0),p([t()],m.prototype,"rowButtons",void 0),p([t()],m.prototype,"hideFooter",void 0),p([t()],m.prototype,"footerPosition",void 0),p([t()],m.prototype,"initialSortColumn",void 0),p([t()],m.prototype,"initialSortDirection",void 0),p([t()],m.prototype,"expandAll",void 0),p([t()],m.prototype,"autoExpandColumns",void 0),p([t()],m.prototype,"animations",void 0),p([o()],m.prototype,"tableReady",void 0),m=p([i({selector:"simple-table",standalone:!0,template:"<div #host></div>",styles:[":host { display: block; }"]})],m);export{m as SimpleTableComponent,y as provideSimpleTable,c as wrapAngularRenderer};
1
+ import{createComponent as e,Input as t,Output as o,Component as i,EventEmitter as n,inject as r,ElementRef as s,ApplicationRef as d,EnvironmentInjector as l,makeEnvironmentProviders as a}from"@angular/core";import{SimpleTableVanilla as h}from"simple-table-core";export{asRows}from"simple-table-core";function p(e,t,o,i){var n,r=arguments.length,s=r<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,o):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,o,i);else for(var d=e.length-1;d>=0;d--)(n=e[d])&&(s=(r<3?n(s):r>3?n(t,o,s):n(t,o))||s);return r>3&&s&&Object.defineProperty(t,o,s),s}function c(t,o,i,n){return r=>{const s=document.createElement("div"),d=e(t,{environmentInjector:i,hostElement:s});return Object.assign(d.instance,r),o.attachView(d.hostView),d.changeDetectorRef.detectChanges(),n?.register(s,()=>{o.detachView(d.hostView),d.destroy()}),s}}function u(e,t,o,i){const{defaultHeaders:n,rows:r,footerRenderer:s,emptyStateRenderer:d,errorStateRenderer:l,loadingStateRenderer:a,tableEmptyStateRenderer:h,headerDropdown:p,columnEditorConfig:v,icons:g,rowButtons:m,onColumnOrderChange:y,onColumnWidthChange:C,onHeaderEdit:R,onColumnSelect:f,...S}=e,w=e=>c(e,o,i,t),b={...S,rows:r,defaultHeaders:n.map(function e(n){const{cellRenderer:r,headerRenderer:s,children:d,nestedTable:l,...a}=n,h={...a};if(r&&(h.cellRenderer=r.ɵcmp?w(r):r),s&&(h.headerRenderer=s.ɵcmp?w(s):s),d&&(h.children=d.map(e)),l){const e={...l,rows:[]};h.nestedTable=u(e,t,o,i)}return h}),onRendererHostDiscard:t.disposeHost,...y?{onColumnOrderChange:e=>y(e)}:{},...C?{onColumnWidthChange:e=>C(e)}:{},...R?{onHeaderEdit:(e,t)=>R(e,t)}:{},...f?{onColumnSelect:e=>f(e)}:{}};return void 0!==s&&(b.footerRenderer=s.ɵcmp?w(s):s),void 0!==d&&(b.emptyStateRenderer=d.ɵcmp?w(d):d),void 0!==l&&(b.errorStateRenderer=l.ɵcmp?w(l):l),void 0!==a&&(b.loadingStateRenderer=a.ɵcmp?w(a):a),void 0!==h&&(b.tableEmptyStateRenderer=h),void 0!==p&&(b.headerDropdown=w(p)),void 0!==v&&(b.columnEditorConfig=function(e){const{rowRenderer:t,customRenderer:o,...i}=e;return{...i,...t?{rowRenderer:w(t)}:{},...o?{customRenderer:w(o)}:{}}}(v)),void 0!==g&&(b.icons=function(e){const t={};for(const[o,i]of Object.entries(e))null!=i&&(t[o]="string"==typeof i||i instanceof HTMLElement||i instanceof SVGSVGElement?i:i.ɵcmp?w(i)({}):i);return t}(g)),void 0!==m&&(b.rowButtons=m.map(e=>w(e))),b}"function"==typeof SuppressedError&&SuppressedError;const v="data-st-mount-id";class g{constructor(){this.entries=new Map,this.nextId=0,this.disposeHost=e=>{if("function"!=typeof e.getAttribute)return;const t=[],o=e.getAttribute(v);null!==o&&t.push(o),e.querySelectorAll(`[${v}]`).forEach(e=>{const o=e.getAttribute(v);null!==o&&t.push(o)});for(const e of t){const t=this.entries.get(e);t&&(this.entries.delete(e),t())}}}register(e,t){const o="st-mount-"+this.nextId++;e.setAttribute(v,o),this.entries.set(o,t)}clear(){for(const e of this.entries.values())e();this.entries.clear()}get size(){return this.entries.size}}let m=class{constructor(){this.tableReady=new n,this.instance=null,this.registry=new g,this.hostEl=r(s),this.appRef=r(d),this.envInjector=r(l)}ngOnInit(){const e=this.hostEl.nativeElement.querySelector("div");e&&(this.instance=new h(e,u(this.getProps(),this.registry,this.appRef,this.envInjector)),this.instance.mount(),this.tableReady.emit(this.instance.getAPI()))}ngOnChanges(){this.instance?.update(u(this.getProps(),this.registry,this.appRef,this.envInjector))}ngOnDestroy(){this.instance?.destroy(),this.instance=null,this.registry.clear()}getAPI(){return this.instance?.getAPI()??null}getProps(){const e={rows:this.rows,defaultHeaders:this.defaultHeaders};return void 0!==this.footerRenderer&&(e.footerRenderer=this.footerRenderer),void 0!==this.loadingStateRenderer&&(e.loadingStateRenderer=this.loadingStateRenderer),void 0!==this.errorStateRenderer&&(e.errorStateRenderer=this.errorStateRenderer),void 0!==this.emptyStateRenderer&&(e.emptyStateRenderer=this.emptyStateRenderer),void 0!==this.tableEmptyStateRenderer&&(e.tableEmptyStateRenderer=this.tableEmptyStateRenderer),void 0!==this.headerDropdown&&(e.headerDropdown=this.headerDropdown),void 0!==this.columnEditorConfig&&(e.columnEditorConfig=this.columnEditorConfig),void 0!==this.onCellClick&&(e.onCellClick=this.onCellClick),void 0!==this.onCellEdit&&(e.onCellEdit=this.onCellEdit),void 0!==this.onSortChange&&(e.onSortChange=this.onSortChange),void 0!==this.onFilterChange&&(e.onFilterChange=this.onFilterChange),void 0!==this.onRowSelectionChange&&(e.onRowSelectionChange=this.onRowSelectionChange),void 0!==this.onRowGroupExpand&&(e.onRowGroupExpand=this.onRowGroupExpand),void 0!==this.onColumnOrderChange&&(e.onColumnOrderChange=this.onColumnOrderChange),void 0!==this.onColumnVisibilityChange&&(e.onColumnVisibilityChange=this.onColumnVisibilityChange),void 0!==this.onColumnWidthChange&&(e.onColumnWidthChange=this.onColumnWidthChange),void 0!==this.onPageChange&&(e.onPageChange=this.onPageChange),void 0!==this.onLoadMore&&(e.onLoadMore=this.onLoadMore),void 0!==this.onGridReady&&(e.onGridReady=this.onGridReady),void 0!==this.rowGrouping&&(e.rowGrouping=this.rowGrouping),void 0!==this.enableRowSelection&&(e.enableRowSelection=this.enableRowSelection),void 0!==this.theme&&(e.theme=this.theme),void 0!==this.quickFilter&&(e.quickFilter=this.quickFilter),void 0!==this.isLoading&&(e.isLoading=this.isLoading),void 0!==this.getRowId&&(e.getRowId=this.getRowId),void 0!==this.shouldPaginate&&(e.shouldPaginate=this.shouldPaginate),void 0!==this.rowsPerPage&&(e.rowsPerPage=this.rowsPerPage),void 0!==this.serverSidePagination&&(e.serverSidePagination=this.serverSidePagination),void 0!==this.totalRowCount&&(e.totalRowCount=this.totalRowCount),void 0!==this.height&&(e.height=this.height),void 0!==this.maxHeight&&(e.maxHeight=this.maxHeight),void 0!==this.scrollParent&&(e.scrollParent=this.scrollParent),void 0!==this.infiniteScrollThreshold&&(e.infiniteScrollThreshold=this.infiniteScrollThreshold),void 0!==this.columnResizing&&(e.columnResizing=this.columnResizing),void 0!==this.columnReordering&&(e.columnReordering=this.columnReordering),void 0!==this.editColumns&&(e.editColumns=this.editColumns),void 0!==this.editColumnsInitOpen&&(e.editColumnsInitOpen=this.editColumnsInitOpen),void 0!==this.selectableCells&&(e.selectableCells=this.selectableCells),void 0!==this.selectableColumns&&(e.selectableColumns=this.selectableColumns),void 0!==this.enableHeaderEditing&&(e.enableHeaderEditing=this.enableHeaderEditing),void 0!==this.onHeaderEdit&&(e.onHeaderEdit=this.onHeaderEdit),void 0!==this.customTheme&&(e.customTheme=this.customTheme),void 0!==this.icons&&(e.icons=this.icons),void 0!==this.externalFilterHandling&&(e.externalFilterHandling=this.externalFilterHandling),void 0!==this.externalSortHandling&&(e.externalSortHandling=this.externalSortHandling),void 0!==this.columnBorders&&(e.columnBorders=this.columnBorders),void 0!==this.rowButtons&&(e.rowButtons=this.rowButtons),void 0!==this.hideFooter&&(e.hideFooter=this.hideFooter),void 0!==this.footerPosition&&(e.footerPosition=this.footerPosition),void 0!==this.initialSortColumn&&(e.initialSortColumn=this.initialSortColumn),void 0!==this.initialSortDirection&&(e.initialSortDirection=this.initialSortDirection),void 0!==this.expandAll&&(e.expandAll=this.expandAll),void 0!==this.autoExpandColumns&&(e.autoExpandColumns=this.autoExpandColumns),void 0!==this.animations&&(e.animations=this.animations),e}};function y(){return a([])}p([t({required:!0})],m.prototype,"rows",void 0),p([t({required:!0})],m.prototype,"defaultHeaders",void 0),p([t()],m.prototype,"footerRenderer",void 0),p([t()],m.prototype,"loadingStateRenderer",void 0),p([t()],m.prototype,"errorStateRenderer",void 0),p([t()],m.prototype,"emptyStateRenderer",void 0),p([t()],m.prototype,"tableEmptyStateRenderer",void 0),p([t()],m.prototype,"headerDropdown",void 0),p([t()],m.prototype,"columnEditorConfig",void 0),p([t()],m.prototype,"onCellClick",void 0),p([t()],m.prototype,"onCellEdit",void 0),p([t()],m.prototype,"onSortChange",void 0),p([t()],m.prototype,"onFilterChange",void 0),p([t()],m.prototype,"onRowSelectionChange",void 0),p([t()],m.prototype,"onRowGroupExpand",void 0),p([t()],m.prototype,"onColumnOrderChange",void 0),p([t()],m.prototype,"onColumnVisibilityChange",void 0),p([t()],m.prototype,"onColumnWidthChange",void 0),p([t()],m.prototype,"onPageChange",void 0),p([t()],m.prototype,"onLoadMore",void 0),p([t()],m.prototype,"onGridReady",void 0),p([t()],m.prototype,"rowGrouping",void 0),p([t()],m.prototype,"enableRowSelection",void 0),p([t()],m.prototype,"theme",void 0),p([t()],m.prototype,"quickFilter",void 0),p([t()],m.prototype,"isLoading",void 0),p([t()],m.prototype,"getRowId",void 0),p([t()],m.prototype,"shouldPaginate",void 0),p([t()],m.prototype,"rowsPerPage",void 0),p([t()],m.prototype,"serverSidePagination",void 0),p([t()],m.prototype,"totalRowCount",void 0),p([t()],m.prototype,"height",void 0),p([t()],m.prototype,"maxHeight",void 0),p([t()],m.prototype,"scrollParent",void 0),p([t()],m.prototype,"infiniteScrollThreshold",void 0),p([t()],m.prototype,"columnResizing",void 0),p([t()],m.prototype,"columnReordering",void 0),p([t()],m.prototype,"editColumns",void 0),p([t()],m.prototype,"editColumnsInitOpen",void 0),p([t()],m.prototype,"selectableCells",void 0),p([t()],m.prototype,"selectableColumns",void 0),p([t()],m.prototype,"enableHeaderEditing",void 0),p([t()],m.prototype,"onHeaderEdit",void 0),p([t()],m.prototype,"customTheme",void 0),p([t()],m.prototype,"icons",void 0),p([t()],m.prototype,"externalFilterHandling",void 0),p([t()],m.prototype,"externalSortHandling",void 0),p([t()],m.prototype,"columnBorders",void 0),p([t()],m.prototype,"rowButtons",void 0),p([t()],m.prototype,"hideFooter",void 0),p([t()],m.prototype,"footerPosition",void 0),p([t()],m.prototype,"initialSortColumn",void 0),p([t()],m.prototype,"initialSortDirection",void 0),p([t()],m.prototype,"expandAll",void 0),p([t()],m.prototype,"autoExpandColumns",void 0),p([t()],m.prototype,"animations",void 0),p([o()],m.prototype,"tableReady",void 0),m=p([i({selector:"simple-table",standalone:!0,template:"<div #host></div>",styles:[":host { display: block; }"]})],m);export{m as SimpleTableComponent,y as provideSimpleTable,c as wrapAngularRenderer};
2
2
  //# sourceMappingURL=index.es.js.map
@@ -54,6 +54,7 @@ export declare class SimpleTableComponent implements OnInit, OnChanges, OnDestro
54
54
  editColumns?: SimpleTableAngularProps["editColumns"];
55
55
  editColumnsInitOpen?: SimpleTableAngularProps["editColumnsInitOpen"];
56
56
  selectableCells?: SimpleTableAngularProps["selectableCells"];
57
+ selectableColumns?: SimpleTableAngularProps["selectableColumns"];
57
58
  enableHeaderEditing?: SimpleTableAngularProps["enableHeaderEditing"];
58
59
  onHeaderEdit?: SimpleTableAngularProps["onHeaderEdit"];
59
60
  customTheme?: SimpleTableAngularProps["customTheme"];
@@ -1,7 +1,7 @@
1
1
  import HeaderObject from "../types/HeaderObject";
2
2
  import Cell from "../types/Cell";
3
3
  export interface HandleOutsideClickConfig {
4
- selectableCells: boolean;
4
+ selectableColumns: boolean;
5
5
  selectedCells: Set<string>;
6
6
  selectedColumns: Set<number>;
7
7
  setSelectedCells: (cells: Set<string>) => void;
@@ -5,8 +5,13 @@ import type Cell from "../../types/Cell";
5
5
  import type { CustomTheme } from "../../types/CustomTheme";
6
6
  export declare const createSetString: ({ rowIndex, colIndex, rowId }: Cell) => string;
7
7
  export interface SelectionManagerConfig {
8
- /** When true, enables cell selection and column header selection. */
9
8
  selectableCells: boolean;
9
+ /**
10
+ * When true, column header click selects columns (`st-header-selected` on headers).
11
+ * Cell-in-column header tint (`st-header-has-highlighted-cell`) also applies when `selectableCells` is true
12
+ * even if this is false.
13
+ */
14
+ selectableColumns?: boolean;
10
15
  headers: HeaderObject[];
11
16
  tableRows: TableRowType[];
12
17
  onCellEdit?: (props: any) => void;
@@ -105,6 +105,7 @@ export interface SimpleTableConfig {
105
105
  rowsPerPage?: number;
106
106
  scrollParent?: HTMLElement | "window" | (() => HTMLElement | null);
107
107
  selectableCells?: boolean;
108
+ selectableColumns?: boolean;
108
109
  serverSidePagination?: boolean;
109
110
  shouldPaginate?: boolean;
110
111
  tableEmptyStateRenderer?: HTMLElement | string | null;
@@ -98,6 +98,7 @@ export interface SimpleTableProps {
98
98
  rowsPerPage?: number;
99
99
  scrollParent?: HTMLElement | "window" | (() => HTMLElement | null);
100
100
  selectableCells?: boolean;
101
+ selectableColumns?: boolean;
101
102
  serverSidePagination?: boolean;
102
103
  shouldPaginate?: boolean;
103
104
  tableEmptyStateRenderer?: HTMLElement | string | null;
@@ -74,7 +74,7 @@ export interface HeaderRenderContext {
74
74
  reverse: boolean;
75
75
  rows: Row[];
76
76
  selectColumns?: (columnIndices: number[]) => void;
77
- selectableCells?: boolean;
77
+ selectableColumns?: boolean;
78
78
  selectedColumns: Set<number>;
79
79
  selectedRowCount?: number; /** Used for context cache invalidation when row selection changes */
80
80
  setCollapsedHeaders: Dispatch<SetStateAction<Set<Accessor>>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simple-table/angular",
3
- "version": "3.9.6",
3
+ "version": "3.9.7",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/types/angular/src/index.d.ts",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "tslib": "^2.8.1",
33
- "simple-table-core": "3.9.6"
33
+ "simple-table-core": "3.9.7"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@angular/common": "^20.0.0",