@visactor/react-vtable 1.13.3-alpha.3 → 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.
@@ -44,4 +44,5 @@ function TagComponent(baseProps, ref) {
44
44
  }, rest));
45
45
  }
46
46
 
47
- exports.Tag = react_1.default.forwardRef(TagComponent), exports.Tag.displayName = "Tag";
47
+ exports.Tag = react_1.default.forwardRef(TagComponent), exports.Tag.displayName = "Tag";
48
+ //# sourceMappingURL=tag.js.map
package/cjs/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.3";
4
+ export declare const version = "1.13.3-alpha.4";
package/cjs/index.js CHANGED
@@ -18,5 +18,5 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
18
18
  Object.defineProperty(exports, "__esModule", {
19
19
  value: !0
20
20
  }), exports.version = void 0, __exportStar(require("./tables"), exports), __exportStar(require("./table-components"), exports),
21
- __exportStar(require("./components"), exports), exports.version = "1.13.3-alpha.3";
21
+ __exportStar(require("./components"), exports), exports.version = "1.13.3-alpha.4";
22
22
  //# sourceMappingURL=index.js.map
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,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.3\";\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,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"]}
@@ -6,5 +6,4 @@ Object.defineProperty(exports, "__esModule", {
6
6
 
7
7
  const base_component_1 = require("../base-component");
8
8
 
9
- exports.EmptyTip = (0, base_component_1.createComponent)("EmptyTip", "emptyTip", void 0, !0);
10
- //# sourceMappingURL=emptyTip.js.map
9
+ exports.EmptyTip = (0, base_component_1.createComponent)("EmptyTip", "emptyTip", void 0, !0);
@@ -14,7 +14,7 @@ class VTableBrowserEnvContribution extends vrender_1.BrowserEnvContribution {
14
14
  updateDom(dom, params) {
15
15
  var _a, _b;
16
16
  const tableDiv = dom.parentElement;
17
- if (tableDiv) {
17
+ if (tableDiv && params.graphic) {
18
18
  const top = parseInt(params.style.top, 10), left = parseInt(params.style.left, 10);
19
19
  let domWidth, domHeight;
20
20
  if (dom.style.display = "none") {
@@ -1 +1 @@
1
- {"version":3,"sources":["table-components/custom/vtable-browser-env-contribution.ts"],"names":[],"mappings":";;;AAAA,6CAAiD;AAEjD,yDAAuG;AACvG,6CAA4C;AAO/B,QAAA,cAAc,GAAG,IAAI,yBAAe,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,yBAAe,CAAC,EAAE;QAC5B,MAAM,CAAC,yBAAe,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;KACjE;SAAM;QACL,IAAI,CAAC,yBAAe,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;KAC/D;AACH,CAAC,CAAC,CAAC;AAEH,MAAM,4BAA6B,SAAQ,gCAAsB;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,C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AC1B,CAAC,CAAC,CAAC;aACJ;SACF;QACD,IAAI,KAAK,IAAI,IAAI,EAAE;YACjB,GAAG,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,6CAAiD;AAEjD,yDAAuG;AACvG,6CAA4C;AAO/B,QAAA,cAAc,GAAG,IAAI,yBAAe,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,yBAAe,CAAC,EAAE;QAC5B,MAAM,CAAC,yBAAe,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;KACjE;SAAM;QACL,IAAI,CAAC,yBAAe,CAAC,CAAC,SAAS,CAAC,4BAA4B,CAAC,CAAC;KAC/D;AACH,CAAC,CAAC,CAAC;AAEH,MAAM,4BAA6B,SAAQ,gCAAsB;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,GAAG,IAAA,sBAAa,EAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBA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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"]}
@@ -12764,7 +12764,7 @@
12764
12764
  class VTableBrowserEnvContribution extends BrowserEnvContribution {
12765
12765
  updateDom(dom, params) {
12766
12766
  const tableDiv = dom.parentElement;
12767
- if (tableDiv) {
12767
+ if (tableDiv && params.graphic) {
12768
12768
  const top = parseInt(params.style.top, 10);
12769
12769
  const left = parseInt(params.style.left, 10);
12770
12770
  let domWidth;
@@ -19578,7 +19578,7 @@
19578
19578
  const Checkbox = React.forwardRef(CheckboxComponent);
19579
19579
  Checkbox.displayName = 'Checkbox';
19580
19580
 
19581
- const version = "1.13.3-alpha.3";
19581
+ const version = "1.13.3-alpha.4";
19582
19582
 
19583
19583
  Object.defineProperty(exports, 'register', {
19584
19584
  enumerable: true,