@visactor/react-vtable 1.13.3-alpha.2 → 1.13.3-alpha.4

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.
@@ -42,4 +42,5 @@ function TagComponent(baseProps, ref) {
42
42
 
43
43
  export const Tag = React.forwardRef(TagComponent);
44
44
 
45
- Tag.displayName = "Tag";
45
+ Tag.displayName = "Tag";
46
+ //# sourceMappingURL=tag.js.map
package/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './tables';
2
2
  export * from './table-components';
3
3
  export * from './components';
4
- export declare const version = "1.13.3-alpha.2";
4
+ export declare const version = "1.13.3-alpha.4";
package/es/index.js CHANGED
@@ -4,5 +4,5 @@ export * from "./table-components";
4
4
 
5
5
  export * from "./components";
6
6
 
7
- export const version = "1.13.3-alpha.2";
7
+ export const version = "1.13.3-alpha.4";
8
8
  //# sourceMappingURL=index.js.map
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.13.3-alpha.2\";\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAE7B,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.13.3-alpha.4\";\n"]}
@@ -1,4 +1,3 @@
1
1
  import { createComponent } from "../base-component";
2
2
 
3
- export const EmptyTip = createComponent("EmptyTip", "emptyTip", void 0, !0);
4
- //# sourceMappingURL=emptyTip.js.map
3
+ export const EmptyTip = createComponent("EmptyTip", "emptyTip", void 0, !0);
@@ -12,7 +12,7 @@ class VTableBrowserEnvContribution extends BrowserEnvContribution {
12
12
  updateDom(dom, params) {
13
13
  var _a, _b;
14
14
  const tableDiv = dom.parentElement;
15
- if (tableDiv) {
15
+ if (tableDiv && params.graphic) {
16
16
  const top = parseInt(params.style.top, 10), left = parseInt(params.style.left, 10);
17
17
  let domWidth, domHeight;
18
18
  if (dom.style.display = "none") {
@@ -1 +1 @@
1
- {"version":3,"sources":["table-components/custom/vtable-browser-env-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAO5C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,eAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAClF,IAAI,CAAC,4BAA4B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC/D,IAAI,OAAO,CAAC,eAAe,CAAC,EAAE;QAC5B,MAAM,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;KACjE;SAAM;QACL,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;KAC/D;AACH,CAAC,CAAC,CAAC;AAEH,MAAM,4BAA6B,SAAQ,sBAAsB;IAC/D,SAAS,CAAC,GAAgB,EAAE,MAAoC;;QAC9D,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC;QACnC,IAAI,QAAQ,EAAE;YACZ,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC3C,MAAM,IAAI,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,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,KAAK,IAAI,CAAC;SAChC;QACD,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC;SAClC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF","file":"vtable-browser-env-contribution.js","sourcesContent":["import { getTargetCell } from '@visactor/vtable';\nimport type { CreateDOMParamsType, IGraphic } from '@visactor/vtable/es/vrender';\nimport { ContainerModule, EnvContribution, BrowserEnvContribution } from '@visactor/vtable/es/vrender';\nimport { isString } from '@visactor/vutils';\n\nexport type CreateDOMParamsTypeForVTable = CreateDOMParamsType & {\n graphic: IGraphic;\n style?: Record<string, any>;\n};\n\nexport const reactEnvModule = new ContainerModule((bind, unbind, isBound, rebind) => {\n bind(VTableBrowserEnvContribution).toSelf().inSingletonScope();\n if (isBound(EnvContribution)) {\n rebind(EnvContribution).toService(VTableBrowserEnvContribution);\n } else {\n bind(EnvContribution).toService(VTableBrowserEnvContribution);\n }\n});\n\nclass VTableBrowserEnvContribution extends BrowserEnvContribution {\n updateDom(dom: HTMLElement, params: CreateDOMParamsTypeForVTable): boolean {\n const tableDiv = dom.parentElement;\n if (tableDiv) {\n const top = parseInt(params.style.top, 10);\n const left = parseInt(params.style.left, 10);\n\n let domWidth;\n let domHeight;\n if ((dom.style.display = 'none')) {\n const cellGroup = getTargetCell(params.graphic);\n domWidth = cellGroup.attribute.width ?? 1;\n domHeight = cellGroup.attribute.height ?? 1;\n } else {\n domWidth = dom.offsetWidth;\n domHeight = dom.offsetHeight;\n }\n if (top + domHeight < 0 || left + domWidth < 0 || top > tableDiv.offsetHeight || left > tableDiv.offsetWidth) {\n dom.style.display = 'none';\n return false;\n }\n }\n\n const { width, height, style } = params;\n\n if (style) {\n if (isString(style)) {\n dom.setAttribute('style', style);\n } else {\n Object.keys(style).forEach((k: any) => {\n dom.style[k] = style[k];\n });\n }\n }\n if (width != null) {\n dom.style.width = `${width}px`;\n }\n if (height != null) {\n dom.style.height = `${height}px`;\n }\n\n return true;\n }\n}\n"]}
1
+ {"version":3,"sources":["table-components/custom/vtable-browser-env-contribution.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACvG,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAO5C,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,eAAe,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE;IAClF,IAAI,CAAC,4BAA4B,CAAC,CAAC,MAAM,EAAE,CAAC,gBAAgB,EAAE,CAAC;IAC/D,IAAI,OAAO,CAAC,eAAe,CAAC,EAAE;QAC5B,MAAM,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;KACjE;SAAM;QACL,IAAI,CAAC,eAAe,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;KAC/D;AACH,CAAC,CAAC,CAAC;AAEH,MAAM,4BAA6B,SAAQ,sBAAsB;IAC/D,SAAS,CAAC,GAAgB,EAAE,MAAoC;;QAC9D,MAAM,QAAQ,GAAG,GAAG,CAAC,aAAa,CAAC;QACnC,IAAI,QAAQ,IAAI,MAAM,CAAC,OAAO,EAAE;YAC9B,MAAM,GAAG,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;YAC3C,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAE7C,IAAI,QAAQ,CAAC;YACb,IAAI,SAAS,CAAC;YACd,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,EAAE;gBAChC,MAAM,SAAS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table-browser-env-contribution.js","sourcesContent":["import { getTargetCell } from '@visactor/vtable';\nimport type { CreateDOMParamsType, IGraphic } from '@visactor/vtable/es/vrender';\nimport { ContainerModule, EnvContribution, BrowserEnvContribution } from '@visactor/vtable/es/vrender';\nimport { isString } from '@visactor/vutils';\n\nexport type CreateDOMParamsTypeForVTable = CreateDOMParamsType & {\n graphic: IGraphic;\n style?: Record<string, any>;\n};\n\nexport const reactEnvModule = new ContainerModule((bind, unbind, isBound, rebind) => {\n bind(VTableBrowserEnvContribution).toSelf().inSingletonScope();\n if (isBound(EnvContribution)) {\n rebind(EnvContribution).toService(VTableBrowserEnvContribution);\n } else {\n bind(EnvContribution).toService(VTableBrowserEnvContribution);\n }\n});\n\nclass VTableBrowserEnvContribution extends BrowserEnvContribution {\n updateDom(dom: HTMLElement, params: CreateDOMParamsTypeForVTable): boolean {\n const tableDiv = dom.parentElement;\n if (tableDiv && params.graphic) {\n const top = parseInt(params.style.top, 10);\n const left = parseInt(params.style.left, 10);\n\n let domWidth;\n let domHeight;\n if ((dom.style.display = 'none')) {\n const cellGroup = getTargetCell(params.graphic);\n domWidth = cellGroup.attribute.width ?? 1;\n domHeight = cellGroup.attribute.height ?? 1;\n } else {\n domWidth = dom.offsetWidth;\n domHeight = dom.offsetHeight;\n }\n if (top + domHeight < 0 || left + domWidth < 0 || top > tableDiv.offsetHeight || left > tableDiv.offsetWidth) {\n dom.style.display = 'none';\n return false;\n }\n }\n\n const { width, height, style } = params;\n\n if (style) {\n if (isString(style)) {\n dom.setAttribute('style', style);\n } else {\n Object.keys(style).forEach((k: any) => {\n dom.style[k] = style[k];\n });\n }\n }\n if (width != null) {\n dom.style.width = `${width}px`;\n }\n if (height != null) {\n dom.style.height = `${height}px`;\n }\n\n return true;\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/react-vtable",
3
- "version": "1.13.3-alpha.2",
3
+ "version": "1.13.3-alpha.4",
4
4
  "description": "The react version of VTable",
5
5
  "keywords": [
6
6
  "react",
@@ -43,7 +43,7 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "@visactor/vtable": "1.13.3-alpha.2",
46
+ "@visactor/vtable": "1.13.3-alpha.4",
47
47
  "@visactor/vutils": "~0.18.14",
48
48
  "react-is": "^18.2.0",
49
49
  "react-reconciler": "0.29.2"
@@ -92,8 +92,8 @@
92
92
  "@arco-design/web-react": "2.60.2",
93
93
  "@types/react-reconciler": "0.28.8",
94
94
  "@internal/bundler": "0.0.1",
95
- "@internal/ts-config": "0.0.1",
96
- "@internal/eslint-config": "0.0.1"
95
+ "@internal/eslint-config": "0.0.1",
96
+ "@internal/ts-config": "0.0.1"
97
97
  },
98
98
  "scripts": {
99
99
  "start": "vite ./demo",