@guiexpert/solid-table 1.0.5 → 1.0.6
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/{GuiexpertSolidTable.d.ts → GuiexpertTable.d.ts} +2 -2
- package/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +1 -1
- package/package.json +1 -1
|
@@ -16,5 +16,5 @@ export interface GuiexpertTableProps {
|
|
|
16
16
|
modelChanged?: GeModelChangeEventFn;
|
|
17
17
|
tableReady?: GeTableReadyEventFn;
|
|
18
18
|
}
|
|
19
|
-
declare const
|
|
20
|
-
export default
|
|
19
|
+
declare const GuiexpertTable: Component<GuiexpertTableProps>;
|
|
20
|
+
export default GuiexpertTable;
|
package/index.cjs
CHANGED
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
data-col-index="${s}"
|
|
18
18
|
data-input-type="text"
|
|
19
19
|
style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
|
|
20
|
-
class="ge-table-cell-editor-input">`}}}class nt{constructor(e="none",t="single"){this.selectionType=e,this.selectionMode=t,this.ranges=[],this.negativeRanges=[],this.allSelected=!1}getSelectionCount(e,t){let s=0;for(const i of this.ranges)i.isInRange(e,t)&&s++;return this.allSelected&&s++,this.isInNegativeRange(e,t)&&(s=0),s}isInNegativeRange(e,t){for(const s of this.negativeRanges)if(s.isInRange(e,t))return!0;return!1}getRanges(){return this.ranges}clear(){this.ranges=[],this.negativeRanges=[],this.allSelected=!1}hasSelection(){return!!this.ranges.length}selectAll(){this.allSelected=!0}addSelection(e){this.addRange(e)}removeSelection(e){if(this.selectionType==="none")return;let t=e;this.selectionType==="row"?t=T.singleRow(e.r1):this.selectionType==="column"&&(t=T.singleColumn(e.c1)),this.negativeRanges.push(t)}togglePoint(e,t){this.getSelectionCount(e,t)>0?this.removeSelection(T.singleCell(e,t)):this.addSelection(T.singleCell(e,t))}addRange(e){this.selectionType!=="none"&&(this.allSelected=!1,this.selectionMode==="single"&&(this.ranges=[]),this.selectionType==="row"?(e.c1=0,e.c2=Number.MAX_SAFE_INTEGER):this.selectionType==="column"?(e.r1=0,e.r2=Number.MAX_SAFE_INTEGER):this.selectionType==="cell"?(e.r2=e.r1,e.c2=e.c1):this.selectionType,this.ranges.push(e))}}class at{constructor(e="none"){this.selectionType=e,this.rowIndex=-1,this.columnIndex=-1,this.changed=!1}clearChanged(){this.changed=!1}hasChanged(){return this.changed}clear(){this.rowIndex=-1,this.columnIndex=-1}setFocus(e,t){(this.rowIndex!==e||this.columnIndex!==t)&&(this.rowIndex=e,this.columnIndex=t,this.changed=!0)}hasFocus(e,t){return this.rowIndex===e&&this.columnIndex===t}getFocus(){return[this.rowIndex,this.columnIndex]}}const dt=new nt,ht=new at("cell");class ct{constructor(){this.overflowX="auto",this.overflowY="auto",this.horizontalBorderVisible=!0,this.verticalBorderVisible=!0,this.footerSeparatorBorderVisible=!0,this.headerSeparatorBorderVisible=!0,this.fixedEastSeparatorBorderVisible=!0,this.fixedWestSeparatorBorderVisible=!0,this.tableTopBorderVisible=!0,this.tableBottomBorderVisible=!0,this.hoverRowVisible=!0,this.hoverColumnVisible=!0,this.columnsResizable=!0,this.columnsDraggable=!0,this.columnResizeHandleWidthInPx=4,this.defaultRowHeights={header:34,body:34,footer:34},this.footerVerticalSeparator=!1,this.headerToggleExpandCollapseIcons=!1,this.headerVerticalSeparator=!1,this.treeOptions=new ge,this.showCheckboxWihoutExtraColumn=!1,this.externalFilterFunction=void 0,this.sortedOptions=new Se,this.sortOrder=["asc","desc"],this.getEditRenderer=(e,t)=>new rt,this.getSelectionModel=()=>dt,this.getFocusModel=()=>ht}}class ut{setStyle(e,t,s){return e.style[t]=s,e}appendText(e,t){const s=this.createText(t);return this.appendChild(e,s),s}addClass(e,t){return t.includes(" ")?t.split(" ").forEach(s=>e.classList.add(s)):e.classList.add(t),e}appendChild(e,t){e.appendChild(t)}createElement(e){return document.createElement(e)}createText(e){return document.createTextNode(e)}setAttribute(e,t,s){e.setAttribute(t,s)}}const pt=Oe("<div>"),ft=l=>{let e;const t=fe({tableModel:null,tableOptions:new ct},l);return ve(()=>{const s={onCheckboxChanged:r=>{const n=new CustomEvent("checkboxChanged",{detail:r,bubbles:!0});e.dispatchEvent(n)},onContextmenu:r=>{const n=new CustomEvent("contextmenu",{detail:r,bubbles:!0});e.dispatchEvent(n)},onModelChanged:r=>{const n=new CustomEvent("modelChanged",{detail:r,bubbles:!0});e.dispatchEvent(n)},onMouseClicked:r=>{const n=new CustomEvent("mouseClicked",{detail:r,bubbles:!0});e.dispatchEvent(n)},onMouseDragging:r=>{const n=new CustomEvent("mouseDragging",{detail:r,bubbles:!0});e.dispatchEvent(n)},onMouseDraggingEnd:r=>{const n=new CustomEvent("mouseDraggingEnd",{detail:r,bubbles:!0});e.dispatchEvent(n)},onMouseMoved:r=>{const n=new CustomEvent("mouseMoved",{detail:r,bubbles:!0});e.dispatchEvent(n)}},i=new lt(e,t.tableModel,new ut,t.tableOptions,s);i.firstInit();const o=new CustomEvent("tableReady",{detail:i.getApi(),bubbles:!0});e.dispatchEvent(o)}),(()=>{const s=pt(),i=e;return typeof i=="function"?Le(i,s):e=s,s})()},gt=Object.freeze(Object.defineProperty({__proto__:null,default:ft},Symbol.toStringTag,{value:"Module"}));exports.ComponentRendererWrapper=Pe;exports.
|
|
20
|
+
class="ge-table-cell-editor-input">`}}}class nt{constructor(e="none",t="single"){this.selectionType=e,this.selectionMode=t,this.ranges=[],this.negativeRanges=[],this.allSelected=!1}getSelectionCount(e,t){let s=0;for(const i of this.ranges)i.isInRange(e,t)&&s++;return this.allSelected&&s++,this.isInNegativeRange(e,t)&&(s=0),s}isInNegativeRange(e,t){for(const s of this.negativeRanges)if(s.isInRange(e,t))return!0;return!1}getRanges(){return this.ranges}clear(){this.ranges=[],this.negativeRanges=[],this.allSelected=!1}hasSelection(){return!!this.ranges.length}selectAll(){this.allSelected=!0}addSelection(e){this.addRange(e)}removeSelection(e){if(this.selectionType==="none")return;let t=e;this.selectionType==="row"?t=T.singleRow(e.r1):this.selectionType==="column"&&(t=T.singleColumn(e.c1)),this.negativeRanges.push(t)}togglePoint(e,t){this.getSelectionCount(e,t)>0?this.removeSelection(T.singleCell(e,t)):this.addSelection(T.singleCell(e,t))}addRange(e){this.selectionType!=="none"&&(this.allSelected=!1,this.selectionMode==="single"&&(this.ranges=[]),this.selectionType==="row"?(e.c1=0,e.c2=Number.MAX_SAFE_INTEGER):this.selectionType==="column"?(e.r1=0,e.r2=Number.MAX_SAFE_INTEGER):this.selectionType==="cell"?(e.r2=e.r1,e.c2=e.c1):this.selectionType,this.ranges.push(e))}}class at{constructor(e="none"){this.selectionType=e,this.rowIndex=-1,this.columnIndex=-1,this.changed=!1}clearChanged(){this.changed=!1}hasChanged(){return this.changed}clear(){this.rowIndex=-1,this.columnIndex=-1}setFocus(e,t){(this.rowIndex!==e||this.columnIndex!==t)&&(this.rowIndex=e,this.columnIndex=t,this.changed=!0)}hasFocus(e,t){return this.rowIndex===e&&this.columnIndex===t}getFocus(){return[this.rowIndex,this.columnIndex]}}const dt=new nt,ht=new at("cell");class ct{constructor(){this.overflowX="auto",this.overflowY="auto",this.horizontalBorderVisible=!0,this.verticalBorderVisible=!0,this.footerSeparatorBorderVisible=!0,this.headerSeparatorBorderVisible=!0,this.fixedEastSeparatorBorderVisible=!0,this.fixedWestSeparatorBorderVisible=!0,this.tableTopBorderVisible=!0,this.tableBottomBorderVisible=!0,this.hoverRowVisible=!0,this.hoverColumnVisible=!0,this.columnsResizable=!0,this.columnsDraggable=!0,this.columnResizeHandleWidthInPx=4,this.defaultRowHeights={header:34,body:34,footer:34},this.footerVerticalSeparator=!1,this.headerToggleExpandCollapseIcons=!1,this.headerVerticalSeparator=!1,this.treeOptions=new ge,this.showCheckboxWihoutExtraColumn=!1,this.externalFilterFunction=void 0,this.sortedOptions=new Se,this.sortOrder=["asc","desc"],this.getEditRenderer=(e,t)=>new rt,this.getSelectionModel=()=>dt,this.getFocusModel=()=>ht}}class ut{setStyle(e,t,s){return e.style[t]=s,e}appendText(e,t){const s=this.createText(t);return this.appendChild(e,s),s}addClass(e,t){return t.includes(" ")?t.split(" ").forEach(s=>e.classList.add(s)):e.classList.add(t),e}appendChild(e,t){e.appendChild(t)}createElement(e){return document.createElement(e)}createText(e){return document.createTextNode(e)}setAttribute(e,t,s){e.setAttribute(t,s)}}const pt=Oe("<div>"),ft=l=>{let e;const t=fe({tableModel:null,tableOptions:new ct},l);return ve(()=>{const s={onCheckboxChanged:r=>{const n=new CustomEvent("checkboxChanged",{detail:r,bubbles:!0});e.dispatchEvent(n)},onContextmenu:r=>{const n=new CustomEvent("contextmenu",{detail:r,bubbles:!0});e.dispatchEvent(n)},onModelChanged:r=>{const n=new CustomEvent("modelChanged",{detail:r,bubbles:!0});e.dispatchEvent(n)},onMouseClicked:r=>{const n=new CustomEvent("mouseClicked",{detail:r,bubbles:!0});e.dispatchEvent(n)},onMouseDragging:r=>{const n=new CustomEvent("mouseDragging",{detail:r,bubbles:!0});e.dispatchEvent(n)},onMouseDraggingEnd:r=>{const n=new CustomEvent("mouseDraggingEnd",{detail:r,bubbles:!0});e.dispatchEvent(n)},onMouseMoved:r=>{const n=new CustomEvent("mouseMoved",{detail:r,bubbles:!0});e.dispatchEvent(n)}},i=new lt(e,t.tableModel,new ut,t.tableOptions,s);i.firstInit();const o=new CustomEvent("tableReady",{detail:i.getApi(),bubbles:!0});e.dispatchEvent(o)}),(()=>{const s=pt(),i=e;return typeof i=="function"?Le(i,s):e=s,s})()},gt=Object.freeze(Object.defineProperty({__proto__:null,default:ft},Symbol.toStringTag,{value:"Module"}));exports.ComponentRendererWrapper=Pe;exports.GuiexpertTable=gt;
|
package/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ComponentRendererWrapper } from "./ComponentRendererWrapper";
|
|
2
|
-
import * as
|
|
3
|
-
export {
|
|
2
|
+
import * as GuiexpertTable from "./GuiexpertTable";
|
|
3
|
+
export { GuiexpertTable, ComponentRendererWrapper };
|
package/index.js
CHANGED