@visactor/vtable 1.15.2-alpha.1 → 1.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/components/empty-tip/empty-tip.js +2 -3
- package/cjs/components/empty-tip/empty-tip.js.map +1 -1
- package/cjs/core/BaseTable.js +3 -3
- package/cjs/core/BaseTable.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js +28 -12
- package/cjs/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
- package/cjs/scenegraph/scenegraph.js +3 -3
- package/cjs/scenegraph/scenegraph.js.map +1 -1
- package/cjs/vrender.js.map +1 -1
- package/dist/vtable.js +50 -43
- package/dist/vtable.min.js +1 -1
- package/es/components/empty-tip/empty-tip.js +3 -3
- package/es/components/empty-tip/empty-tip.js.map +1 -1
- package/es/core/BaseTable.js +3 -3
- package/es/core/BaseTable.js.map +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js +28 -12
- package/es/scenegraph/group-creater/cell-type/progress-bar-cell.js.map +1 -1
- package/es/scenegraph/scenegraph.js +3 -3
- package/es/scenegraph/scenegraph.js.map +1 -1
- package/es/vrender.js.map +1 -1
- package/package.json +3 -3
|
@@ -20,9 +20,8 @@ class EmptyTip {
|
|
|
20
20
|
width: 100,
|
|
21
21
|
height: 100
|
|
22
22
|
}
|
|
23
|
-
}, this.isReleased = !1, this.table = table, (
|
|
24
|
-
vutils_1.isValid)(
|
|
25
|
-
this._emptyTipOption = Object.assign(this._emptyTipOption, !0 === emptyTipOption ? {} : emptyTipOption),
|
|
23
|
+
}, this.isReleased = !1, this.table = table, this._emptyTipOption = Object.assign(this._emptyTipOption, !0 === emptyTipOption ? {} : emptyTipOption),
|
|
24
|
+
(0, vutils_1.isValid)(this._emptyTipOption.displayMode) || (this.table.isListTable() ? this._emptyTipOption.displayMode = "basedOnTable" : this._emptyTipOption.displayMode = "basedOnContainer"),
|
|
26
25
|
this._emptyTipComponent = this._createOrUpdateEmptyTipComponent(this._getEmptyTipAttrs());
|
|
27
26
|
}
|
|
28
27
|
_createOrUpdateEmptyTipComponent(attrs) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/empty-tip/empty-tip.ts"],"names":[],"mappings":";;;AAAA,6CAAiE;AAKjE,6CAA2E;AAI3E,MAAM,WAAW,GACf,4pDAA4pD,CAAC;AAM/pD,MAAa,QAAQ;IAkBnB,YAAY,cAAgC,EAAE,KAAmB;QAhBjE,oBAAe,GAAc;YAC3B,uBAAuB,EAAE,EAAE;YAC3B,IAAI,EAAE,SAAS;YACf,SAAS,EAAE;gBACT,QAAQ,EAAE,EAAE;gBACZ,KAAK,EAAE,MAAM;aACd;YACD,IAAI,EAAE;gBACJ,KAAK,EAAE,WAAW;gBAClB,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;aACZ;SACF,CAAC;QACF,eAAU,GAAY,KAAK,CAAC;QAI1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QAEnB,IAAI,CAAC,IAAA,kBAAS,EAAC,cAAc,CAAC,IAAI,CAAC,IAAA,gBAAO,EAAC,cAAc,CAAC,WAAW,CAAC,EAAE;YAEtE,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE;gBAC5B,cAAc,CAAC,WAAW,GAAG,cAAc,CAAC;aAC7C;iBAAM;gBACL,cAAc,CAAC,WAAW,GAAG,kBAAkB,CAAC;aACjD;SACF;QACD,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAC1G,IAAI,CAAC,kBAAkB,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AAC;QAErF,OAAO;YACL,uBAAuB,EAAE,IAAI,CAAC,eAAe,CAAC,uBAAuB;YACrE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,eAAe;YACtC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,eAAe;YACtC,KAAK;YACL,MAAM;YACN,IAAI,gCACF,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,IAC5B,IAAI,CAAC,eAAe,CAAC,SAAS,KACjC,IAAI,EAAE,MAAA,IAAI,CAAC,eAAe,CAAC,SAAS,0CAAE,KAAK,GAC5C;YACD,IAAI,oBACC,IAAI,CAAC,eAAe,CAAC,IAAI,CAC7B;SAEoB,CAAC;IAC1B,CAAC;CACF;AAnLD,4BAmLC","file":"empty-tip.js","sourcesContent":["import { EmptyTip as EmptyTipComponents } from './../../vrender';\n// eslint-disable-next-line no-duplicate-imports\nimport type { EmptyTipAttributes, FederatedPointerEvent } from './../../vrender';\nimport type { IEmptyTip } from '../../ts-types/component/empty-tip';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { AABBBounds, isBoolean, isEqual, isValid } from '@visactor/vutils';\nimport type { ListTable } from '../../ListTable';\nimport type { PivotTable } from '../../PivotTable';\nimport type { BaseTable } from '../../core';\nconst emptyTipSvg =\n '<svg t=\"1716726614852\" class=\"icon\" viewBox=\"0 0 1194 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2621\" width=\"200\" height=\"200\"><path d=\"M1038.694079 367.237067c13.265507 23.342857-16.633865-40.004445-63.05621-40.004446H219.018794c-26.558738 0-46.46393 13.334815-63.05621 40.004446S0.006238 607.277601 0.006238 650.608819V940.647979a82.351494 82.351494 0 0 0 82.961402 83.349526H1111.702885a82.337632 82.337632 0 0 0 82.975264-83.349526V650.608819c0-43.331218-155.970208-283.371753-155.970208-283.371752zM730.066575 667.284269a136.328386 136.328386 0 0 1-132.738243 133.33429 133.417459 133.417459 0 0 1-132.738243-133.33429v-6.681269a40.6698 40.6698 0 0 0-36.497473-26.66963H73.015044l119.458874-220.02445s23.231965-40.004445 53.103614-40.004446h713.481918c26.544876 0 29.871649 10.008042 46.436207 40.004446L1128.33675 633.947231H769.904682c-26.184476 0-39.838107 7.623855-39.838107 33.337038zM338.505391 210.559919l-89.601086-86.69016a22.178487 22.178487 0 0 1 0-33.26773 21.984425 21.984425 0 0 1 33.170699 0l89.601087 86.676299a22.317102 22.317102 0 0 1 0 33.26773 24.950798 24.950798 0 0 1-33.1707 0z m252.197118-40.059891a25.532983 25.532983 0 0 1-6.639685-16.633865l-3.326773-126.694606A28.263709 28.263709 0 0 1 603.995739 0.515788c13.251646-3.326773 23.204242 10.021904 26.544877 23.342858V153.866163a28.249847 28.249847 0 0 1-23.259688 26.66963c-6.611961-3.312911-13.279369-3.312911-16.578419-10.035765z m235.646421 33.337038a22.372548 22.372548 0 0 1 0-33.337038l86.288175-90.030795a22.039871 22.039871 0 0 1 33.170699 0 22.289379 22.289379 0 0 1 0 33.364761l-82.961401 90.003072a25.962691 25.962691 0 0 1-36.483611 0z\" fill=\"#8a8a8a\" p-id=\"2622\"></path></svg>';\n\nexport interface IEmptyTipComponent {\n new (emptyTipOption: IEmptyTip | true, table: BaseTableAPI): EmptyTip;\n}\n\nexport class EmptyTip {\n table: BaseTableAPI;\n _emptyTipOption: IEmptyTip = {\n spaceBetweenTextAndIcon: 20,\n text: 'no data',\n textStyle: {\n fontSize: 14,\n color: '#000'\n },\n icon: {\n image: emptyTipSvg,\n width: 100,\n height: 100\n }\n };\n isReleased: boolean = false;\n private _emptyTipComponent: EmptyTipComponents;\n private _cacheAttrs: EmptyTipAttributes;\n constructor(emptyTipOption: IEmptyTip | true, table: BaseTableAPI) {\n this.table = table;\n // deal with displayMode\n if (!isBoolean(emptyTipOption) && !isValid(emptyTipOption.displayMode)) {\n // for list table and pivot table current display effect\n if (this.table.isListTable()) {\n emptyTipOption.displayMode = 'basedOnTable';\n } else {\n emptyTipOption.displayMode = 'basedOnContainer';\n }\n }\n this._emptyTipOption = Object.assign(this._emptyTipOption, emptyTipOption === true ? {} : emptyTipOption);\n this._emptyTipComponent = this._createOrUpdateEmptyTipComponent(this._getEmptyTipAttrs());\n }\n\n private _createOrUpdateEmptyTipComponent(attrs: EmptyTipAttributes): EmptyTipComponents {\n if (this._emptyTipComponent) {\n if (!isEqual(attrs, this._cacheAttrs)) {\n this._emptyTipComponent.setAttributes(attrs);\n }\n } else {\n const emptyTip = new EmptyTipComponents(attrs);\n emptyTip.name = 'emptyTip';\n this.table.scenegraph.stage.defaultLayer.appendChild(emptyTip);\n this._emptyTipComponent = emptyTip;\n\n // bind events\n this.bindEvents();\n }\n // update table size\n // this._adjustTableSize(this._emptyTipComponent.attribute);\n return this._emptyTipComponent;\n }\n\n bindEvents() {\n this._emptyTipComponent.on('click', (e: FederatedPointerEvent) => {\n const bounds = new AABBBounds();\n this._emptyTipComponent.forEachChildren((child: any) => {\n bounds.union(child.globalAABBBounds);\n });\n if (bounds.contains(e.x, e.y)) {\n this.table.fireListeners('empty_tip_click', e);\n return;\n }\n });\n this._emptyTipComponent.on('dblclick', (e: FederatedPointerEvent) => {\n const bounds = new AABBBounds();\n this._emptyTipComponent.forEachChildren((child: any) => {\n bounds.union(child.globalAABBBounds);\n });\n if (bounds.contains(e.x, e.y)) {\n this.table.fireListeners('empty_tip_dblclick', e);\n return;\n }\n });\n }\n\n resize() {\n if (!this._emptyTipComponent) {\n return;\n }\n const { leftHeaderWidth, topHeaderHeight, width, height } = this.getWidthAndHeight();\n this._emptyTipComponent.setAttributes({\n spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,\n x: this.table.tableX + leftHeaderWidth,\n y: this.table.tableY + topHeaderHeight,\n width,\n height,\n text: {\n text: this._emptyTipOption.text,\n ...this._emptyTipOption.textStyle,\n fill: this._emptyTipOption.textStyle?.color\n },\n icon: {\n ...this._emptyTipOption.icon\n }\n });\n }\n\n release(): void {\n this._emptyTipComponent && this.table.scenegraph.stage.defaultLayer.removeChild(this._emptyTipComponent);\n this._emptyTipComponent = null;\n this.isReleased = true;\n }\n resetVisible() {\n if (\n ((!this.table.recordsCount || this.table.recordsCount === 0) &&\n this.table.internalProps.layoutMap.rowCount === this.table.internalProps.layoutMap.columnHeaderLevelCount) ||\n this.table.internalProps.layoutMap.colCount === this.table.internalProps.layoutMap.rowHeaderLevelCount\n ) {\n // this._emptyTipComponent.setAttributes({\n // visible: true\n // });\n // this._emptyTipComponent.showAll();\n if (!this.table.scenegraph.stage.defaultLayer.children.includes(this._emptyTipComponent)) {\n this.table.scenegraph.stage.defaultLayer.appendChild(this._emptyTipComponent);\n }\n } else {\n // this._emptyTipComponent.setAttributes({\n // visible: false\n // });\n // this._emptyTipComponent.hideAll();\n if (this.table.scenegraph.stage.defaultLayer.children.includes(this._emptyTipComponent)) {\n this.table.scenegraph.stage.defaultLayer.removeChild(this._emptyTipComponent);\n }\n }\n }\n\n getWidthAndHeight() {\n const leftHeaderWidth =\n (this.table as ListTable).transpose || (this.table as PivotTable).options.indicatorsAsCol === false\n ? this.table.getFrozenColsWidth()\n : 0;\n const topHeaderHeight =\n !(this.table as ListTable).transpose || (this.table as PivotTable).options.indicatorsAsCol\n ? this.table.getFrozenRowsHeight()\n : 0;\n const width =\n (this._emptyTipOption.displayMode !== 'basedOnContainer' &&\n this.table.columnHeaderLevelCount > 0 &&\n this.table.colCount > this.table.rowHeaderLevelCount\n ? this.table.getDrawRange().width\n : this.table.tableNoFrameWidth) -\n leftHeaderWidth -\n (this.table as BaseTable).getTheme().scrollStyle.width;\n const height =\n (this._emptyTipOption.displayMode !== 'basedOnContainer' &&\n this.table.rowHeaderLevelCount > 0 &&\n this.table.rowCount > this.table.columnHeaderLevelCount\n ? this.table.getDrawRange().height\n : this.table.tableNoFrameHeight) -\n topHeaderHeight -\n (this.table as BaseTable).getTheme().scrollStyle.width;\n return {\n leftHeaderWidth,\n topHeaderHeight,\n width,\n height\n };\n }\n\n private _getEmptyTipAttrs() {\n const { leftHeaderWidth, topHeaderHeight, width, height } = this.getWidthAndHeight();\n\n return {\n spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,\n x: this.table.tableX + leftHeaderWidth,\n y: this.table.tableY + topHeaderHeight,\n width,\n height,\n text: {\n text: this._emptyTipOption.text,\n ...this._emptyTipOption.textStyle,\n fill: this._emptyTipOption.textStyle?.color\n },\n icon: {\n ...this._emptyTipOption.icon\n }\n // visible:this.table.recordsCount === 0?true:false\n } as EmptyTipAttributes;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/empty-tip/empty-tip.ts"],"names":[],"mappings":";;;AAAA,6CAAiE;AAKjE,6CAA2E;AAI3E,MAAM,WAAW,GACf,4pDAA4pD,CAAC;AAM/pD,MAAa,QAAQ;IAkBnB,YAAY,cAAgC,EAAE,KAAmB;QAhBjE,oBAAe,GAAc;YAC3B,uBAAuB,EAAE,EAAE;YAC3B,IAAI,EAAE,SAAS;YACf,SAAS,EAAE;gBACT,QAAQ,EAAE,EAAE;gBACZ,KAAK,EAAE,MAAM;aACd;YACD,IAAI,EAAE;gBACJ,KAAK,EAAE,WAAW;gBAClB,KAAK,EAAE,GAAG;gBACV,MAAM,EAAE,GAAG;aACZ;SACF,CAAC;QACF,eAAU,GAAY,KAAK,CAAC;QAI1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,cAAc,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;QAE1G,IAAI,CAAC,IAAA,gBAAO,EAAC,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE;YAE9C,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE;gBAC5B,IAAI,CAAC,eAAe,CAAC,WAAW,GAAG,cAAc,CAAC;aACnD;iBA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B,MAAM,EAAE,eAAe,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAErF,OAAO;YACL,uBAAuB,EAAE,IAAI,CAAC,eAAe,CAAC,uBAAuB;YACrE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,eAAe;YACtC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,eAAe;YACtC,KAAK;YACL,MAAM;YACN,IAAI,gCACF,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,IAC5B,IAAI,CAAC,eAAe,CAAC,SAAS,KACjC,IAAI,EAAE,MAAA,IAAI,CAAC,eAAe,CAAC,SAAS,0CAAE,KAAK,GAC5C;YACD,IAAI,oBACC,IAAI,CAAC,eAAe,CAAC,IAAI,CAC7B;SAEoB,CAAC;IAC1B,CAAC;CACF;AAnLD,4BAmLC","file":"empty-tip.js","sourcesContent":["import { EmptyTip as EmptyTipComponents } from './../../vrender';\n// eslint-disable-next-line no-duplicate-imports\nimport type { EmptyTipAttributes, FederatedPointerEvent } from './../../vrender';\nimport type { IEmptyTip } from '../../ts-types/component/empty-tip';\nimport type { BaseTableAPI } from '../../ts-types/base-table';\nimport { AABBBounds, isBoolean, isEqual, isValid } from '@visactor/vutils';\nimport type { ListTable } from '../../ListTable';\nimport type { PivotTable } from '../../PivotTable';\nimport type { BaseTable } from '../../core';\nconst emptyTipSvg =\n '<svg t=\"1716726614852\" class=\"icon\" viewBox=\"0 0 1194 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" p-id=\"2621\" width=\"200\" height=\"200\"><path d=\"M1038.694079 367.237067c13.265507 23.342857-16.633865-40.004445-63.05621-40.004446H219.018794c-26.558738 0-46.46393 13.334815-63.05621 40.004446S0.006238 607.277601 0.006238 650.608819V940.647979a82.351494 82.351494 0 0 0 82.961402 83.349526H1111.702885a82.337632 82.337632 0 0 0 82.975264-83.349526V650.608819c0-43.331218-155.970208-283.371753-155.970208-283.371752zM730.066575 667.284269a136.328386 136.328386 0 0 1-132.738243 133.33429 133.417459 133.417459 0 0 1-132.738243-133.33429v-6.681269a40.6698 40.6698 0 0 0-36.497473-26.66963H73.015044l119.458874-220.02445s23.231965-40.004445 53.103614-40.004446h713.481918c26.544876 0 29.871649 10.008042 46.436207 40.004446L1128.33675 633.947231H769.904682c-26.184476 0-39.838107 7.623855-39.838107 33.337038zM338.505391 210.559919l-89.601086-86.69016a22.178487 22.178487 0 0 1 0-33.26773 21.984425 21.984425 0 0 1 33.170699 0l89.601087 86.676299a22.317102 22.317102 0 0 1 0 33.26773 24.950798 24.950798 0 0 1-33.1707 0z m252.197118-40.059891a25.532983 25.532983 0 0 1-6.639685-16.633865l-3.326773-126.694606A28.263709 28.263709 0 0 1 603.995739 0.515788c13.251646-3.326773 23.204242 10.021904 26.544877 23.342858V153.866163a28.249847 28.249847 0 0 1-23.259688 26.66963c-6.611961-3.312911-13.279369-3.312911-16.578419-10.035765z m235.646421 33.337038a22.372548 22.372548 0 0 1 0-33.337038l86.288175-90.030795a22.039871 22.039871 0 0 1 33.170699 0 22.289379 22.289379 0 0 1 0 33.364761l-82.961401 90.003072a25.962691 25.962691 0 0 1-36.483611 0z\" fill=\"#8a8a8a\" p-id=\"2622\"></path></svg>';\n\nexport interface IEmptyTipComponent {\n new (emptyTipOption: IEmptyTip | true, table: BaseTableAPI): EmptyTip;\n}\n\nexport class EmptyTip {\n table: BaseTableAPI;\n _emptyTipOption: IEmptyTip = {\n spaceBetweenTextAndIcon: 20,\n text: 'no data',\n textStyle: {\n fontSize: 14,\n color: '#000'\n },\n icon: {\n image: emptyTipSvg,\n width: 100,\n height: 100\n }\n };\n isReleased: boolean = false;\n private _emptyTipComponent: EmptyTipComponents;\n private _cacheAttrs: EmptyTipAttributes;\n constructor(emptyTipOption: IEmptyTip | true, table: BaseTableAPI) {\n this.table = table;\n this._emptyTipOption = Object.assign(this._emptyTipOption, emptyTipOption === true ? {} : emptyTipOption);\n // deal with displayMode\n if (!isValid(this._emptyTipOption.displayMode)) {\n // for list table and pivot table current display effect\n if (this.table.isListTable()) {\n this._emptyTipOption.displayMode = 'basedOnTable';\n } else {\n this._emptyTipOption.displayMode = 'basedOnContainer';\n }\n }\n this._emptyTipComponent = this._createOrUpdateEmptyTipComponent(this._getEmptyTipAttrs());\n }\n\n private _createOrUpdateEmptyTipComponent(attrs: EmptyTipAttributes): EmptyTipComponents {\n if (this._emptyTipComponent) {\n if (!isEqual(attrs, this._cacheAttrs)) {\n this._emptyTipComponent.setAttributes(attrs);\n }\n } else {\n const emptyTip = new EmptyTipComponents(attrs);\n emptyTip.name = 'emptyTip';\n this.table.scenegraph.stage.defaultLayer.appendChild(emptyTip);\n this._emptyTipComponent = emptyTip;\n\n // bind events\n this.bindEvents();\n }\n // update table size\n // this._adjustTableSize(this._emptyTipComponent.attribute);\n return this._emptyTipComponent;\n }\n\n bindEvents() {\n this._emptyTipComponent.on('click', (e: FederatedPointerEvent) => {\n const bounds = new AABBBounds();\n this._emptyTipComponent.forEachChildren((child: any) => {\n bounds.union(child.globalAABBBounds);\n });\n if (bounds.contains(e.x, e.y)) {\n this.table.fireListeners('empty_tip_click', e);\n return;\n }\n });\n this._emptyTipComponent.on('dblclick', (e: FederatedPointerEvent) => {\n const bounds = new AABBBounds();\n this._emptyTipComponent.forEachChildren((child: any) => {\n bounds.union(child.globalAABBBounds);\n });\n if (bounds.contains(e.x, e.y)) {\n this.table.fireListeners('empty_tip_dblclick', e);\n return;\n }\n });\n }\n\n resize() {\n if (!this._emptyTipComponent) {\n return;\n }\n const { leftHeaderWidth, topHeaderHeight, width, height } = this.getWidthAndHeight();\n this._emptyTipComponent.setAttributes({\n spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,\n x: this.table.tableX + leftHeaderWidth,\n y: this.table.tableY + topHeaderHeight,\n width,\n height,\n text: {\n text: this._emptyTipOption.text,\n ...this._emptyTipOption.textStyle,\n fill: this._emptyTipOption.textStyle?.color\n },\n icon: {\n ...this._emptyTipOption.icon\n }\n });\n }\n\n release(): void {\n this._emptyTipComponent && this.table.scenegraph.stage.defaultLayer.removeChild(this._emptyTipComponent);\n this._emptyTipComponent = null;\n this.isReleased = true;\n }\n resetVisible() {\n if (\n ((!this.table.recordsCount || this.table.recordsCount === 0) &&\n this.table.internalProps.layoutMap.rowCount === this.table.internalProps.layoutMap.columnHeaderLevelCount) ||\n this.table.internalProps.layoutMap.colCount === this.table.internalProps.layoutMap.rowHeaderLevelCount\n ) {\n // this._emptyTipComponent.setAttributes({\n // visible: true\n // });\n // this._emptyTipComponent.showAll();\n if (!this.table.scenegraph.stage.defaultLayer.children.includes(this._emptyTipComponent)) {\n this.table.scenegraph.stage.defaultLayer.appendChild(this._emptyTipComponent);\n }\n } else {\n // this._emptyTipComponent.setAttributes({\n // visible: false\n // });\n // this._emptyTipComponent.hideAll();\n if (this.table.scenegraph.stage.defaultLayer.children.includes(this._emptyTipComponent)) {\n this.table.scenegraph.stage.defaultLayer.removeChild(this._emptyTipComponent);\n }\n }\n }\n\n getWidthAndHeight() {\n const leftHeaderWidth =\n (this.table as ListTable).transpose || (this.table as PivotTable).options.indicatorsAsCol === false\n ? this.table.getFrozenColsWidth()\n : 0;\n const topHeaderHeight =\n !(this.table as ListTable).transpose || (this.table as PivotTable).options.indicatorsAsCol\n ? this.table.getFrozenRowsHeight()\n : 0;\n const width =\n (this._emptyTipOption.displayMode !== 'basedOnContainer' &&\n this.table.columnHeaderLevelCount > 0 &&\n this.table.colCount > this.table.rowHeaderLevelCount\n ? this.table.getDrawRange().width\n : this.table.tableNoFrameWidth) -\n leftHeaderWidth -\n (this.table as BaseTable).getTheme().scrollStyle.width;\n const height =\n (this._emptyTipOption.displayMode !== 'basedOnContainer' &&\n this.table.rowHeaderLevelCount > 0 &&\n this.table.rowCount > this.table.columnHeaderLevelCount\n ? this.table.getDrawRange().height\n : this.table.tableNoFrameHeight) -\n topHeaderHeight -\n (this.table as BaseTable).getTheme().scrollStyle.width;\n return {\n leftHeaderWidth,\n topHeaderHeight,\n width,\n height\n };\n }\n\n private _getEmptyTipAttrs() {\n const { leftHeaderWidth, topHeaderHeight, width, height } = this.getWidthAndHeight();\n\n return {\n spaceBetweenTextAndIcon: this._emptyTipOption.spaceBetweenTextAndIcon,\n x: this.table.tableX + leftHeaderWidth,\n y: this.table.tableY + topHeaderHeight,\n width,\n height,\n text: {\n text: this._emptyTipOption.text,\n ...this._emptyTipOption.textStyle,\n fill: this._emptyTipOption.textStyle?.color\n },\n icon: {\n ...this._emptyTipOption.icon\n }\n // visible:this.table.recordsCount === 0?true:false\n } as EmptyTipAttributes;\n }\n}\n"]}
|
package/cjs/core/BaseTable.js
CHANGED
|
@@ -43,7 +43,7 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
43
43
|
}
|
|
44
44
|
constructor(container, options = {}) {
|
|
45
45
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
46
|
-
if (super(), this.showFrozenIcon = !0, this.version = "1.15.2
|
|
46
|
+
if (super(), this.showFrozenIcon = !0, this.version = "1.15.2", this.id = `VTable${Date.now()}`,
|
|
47
47
|
this.isReleased = !1, this._chartEventMap = {}, this.throttleInvalidate = (0, util_1.throttle2)(this.render.bind(this), 200),
|
|
48
48
|
!container && "node" !== options.mode && !options.canvas) throw new Error("vtable's container is undefined");
|
|
49
49
|
!1 === (null === (_a = options.customConfig) || void 0 === _a ? void 0 : _a.imageAnonymous) && (vrender_1.vglobal.isImageAnonymous = !1);
|
|
@@ -66,8 +66,8 @@ class BaseTable extends EventTarget_1.EventTarget {
|
|
|
66
66
|
this.columnWidthComputeMode = null !== (_b = options.columnWidthComputeMode) && void 0 !== _b ? _b : "normal";
|
|
67
67
|
const internalProps = this.internalProps = {};
|
|
68
68
|
void 0 !== showFrozenIcon && (this.showFrozenIcon = showFrozenIcon), "number" == typeof allowFrozenColCount && allowFrozenColCount <= 0 && (this.showFrozenIcon = !1),
|
|
69
|
-
this.options.canvas ? (
|
|
70
|
-
internalProps.element.style.position = "relative"
|
|
69
|
+
this.options.canvas ? (internalProps.element = this.options.canvas.parentElement,
|
|
70
|
+
internalProps.element.style.position = "relative", internalProps.focusControl = new FouseInput_1.FocusInput(this, internalProps.element),
|
|
71
71
|
internalProps.canvas = this.options.canvas, internalProps.context = internalProps.canvas.getContext("2d")) : "node" !== env_1.Env.mode && (internalProps.element = (0,
|
|
72
72
|
tableHelper_1.createRootElement)(this.padding), internalProps.focusControl = new FouseInput_1.FocusInput(this, internalProps.element),
|
|
73
73
|
internalProps.canvas = document.createElement("canvas"), internalProps.element.appendChild(internalProps.canvas),
|