@visactor/vrender-components 0.14.1-alpha.3 → 0.14.1-alpha.5

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/es/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.14.1-alpha.3";
1
+ export declare const version = "0.14.1-alpha.5";
2
2
  export * from './core/base';
3
3
  export * from './scrollbar';
4
4
  export * from './tag';
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "0.14.1-alpha.3";
1
+ export const version = "0.14.1-alpha.5";
2
2
 
3
3
  export * from "./core/base";
4
4
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAExC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.14.1-alpha.3\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAExC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"0.14.1-alpha.5\";\n\nexport * from './core/base';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './interface';\n"]}
@@ -3,10 +3,13 @@ import { AbstractComponent } from '../core/base';
3
3
  import type { Tag } from '../tag';
4
4
  import type { MarkerAttrs } from './type';
5
5
  export declare abstract class Marker<T extends MarkerAttrs> extends AbstractComponent<Required<T>> {
6
+ private _containerClip;
6
7
  private _container;
7
8
  protected _label: Tag;
8
9
  protected abstract setLabelPos(): any;
9
10
  protected abstract initMarker(container: IGroup): any;
10
11
  protected abstract updateMarker(): any;
12
+ private _initContainer;
13
+ private _updateContainer;
11
14
  protected render(): void;
12
15
  }
package/es/marker/base.js CHANGED
@@ -5,18 +5,33 @@ import { isValid } from "@visactor/vutils";
5
5
  import { AbstractComponent } from "../core/base";
6
6
 
7
7
  export class Marker extends AbstractComponent {
8
+ _initContainer() {
9
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
10
+ const groupClip = createGroup(Object.assign(Object.assign({}, null === (_a = this.attribute) || void 0 === _a ? void 0 : _a.clipRange), {
11
+ clip: null !== (_c = isValid(null === (_b = this.attribute) || void 0 === _b ? void 0 : _b.clipRange)) && void 0 !== _c && _c
12
+ }));
13
+ groupClip.name = "marker-container";
14
+ const group = createGroup({
15
+ x: null !== (_f = -(null === (_e = null === (_d = this.attribute) || void 0 === _d ? void 0 : _d.clipRange) || void 0 === _e ? void 0 : _e.x)) && void 0 !== _f ? _f : 0,
16
+ y: null !== (_j = -(null === (_h = null === (_g = this.attribute) || void 0 === _g ? void 0 : _g.clipRange) || void 0 === _h ? void 0 : _h.y)) && void 0 !== _j ? _j : 0
17
+ });
18
+ groupClip.add(group), this._containerClip = groupClip, this.add(groupClip), this._container = group;
19
+ }
20
+ _updateContainer() {
21
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
22
+ this._containerClip.setAttributes(Object.assign(Object.assign({}, null === (_a = this.attribute) || void 0 === _a ? void 0 : _a.clipRange), {
23
+ clip: null !== (_c = isValid(null === (_b = this.attribute) || void 0 === _b ? void 0 : _b.clipRange)) && void 0 !== _c && _c
24
+ })), this._container.setAttributes({
25
+ x: null !== (_f = -(null === (_e = null === (_d = this.attribute) || void 0 === _d ? void 0 : _d.clipRange) || void 0 === _e ? void 0 : _e.x)) && void 0 !== _f ? _f : 0,
26
+ y: null !== (_j = -(null === (_h = null === (_g = this.attribute) || void 0 === _g ? void 0 : _g.clipRange) || void 0 === _h ? void 0 : _h.y)) && void 0 !== _j ? _j : 0
27
+ });
28
+ }
8
29
  render() {
9
- var _a, _b, _c, _d, _e, _f, _g, _h;
30
+ var _a, _b;
10
31
  const markerVisible = null === (_a = this.attribute.visible) || void 0 === _a || _a;
11
- if (null !== (_b = this.attribute.interactive) && void 0 !== _b && _b || (this.setAttribute("pickable", !1),
12
- this.setAttribute("childrenPickable", !1)), markerVisible) if (this._container) this._container.setAttributes(Object.assign(Object.assign({}, null === (_f = this.attribute) || void 0 === _f ? void 0 : _f.clipRange), {
13
- clip: null !== (_h = isValid(null === (_g = this.attribute) || void 0 === _g ? void 0 : _g.clipRange)) && void 0 !== _h && _h
14
- })), this.updateMarker(); else {
15
- const group = createGroup(Object.assign(Object.assign({}, null === (_c = this.attribute) || void 0 === _c ? void 0 : _c.clipRange), {
16
- clip: null !== (_e = isValid(null === (_d = this.attribute) || void 0 === _d ? void 0 : _d.clipRange)) && void 0 !== _e && _e
17
- }));
18
- group.name = "marker-container", this.add(group), this._container = group, this.initMarker(group);
19
- }
32
+ null !== (_b = this.attribute.interactive) && void 0 !== _b && _b || (this.setAttribute("pickable", !1),
33
+ this.setAttribute("childrenPickable", !1)), markerVisible && (this._containerClip ? (this._updateContainer(),
34
+ this.updateMarker()) : (this._initContainer(), this.initMarker(this._container)));
20
35
  }
21
36
  }
22
37
  //# sourceMappingURL=base.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["marker/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIjD,MAAM,OAAgB,MAA8B,SAAQ,iBAA8B;IAS9E,MAAM;;QACd,MAAM,aAAa,GAAG,MAAA,IAAI,CAAC,SAAS,CAAC,OAAO,mCAAI,IAAI,CAAC;QACrD,MAAM,iBAAiB,GAAG,MAAA,IAAI,CAAC,SAAS,CAAC,WAAW,mCAAI,KAAK,CAAC;QAE9D,IAAI,CAAC,iBAAiB,EAAE;YACtB,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;YACrC,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;SAC9C;QAED,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,MAAM,KAAK,GAAG,WAAW,iCACpB,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,KAC5B,IAAI,EAAE,MAAA,OAAO,CAAC,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,CAAC,mCAAI,KAAK,IACjD,CAAC;gBACH,KAAK,CAAC,IAAI,GAAG,kBAAkB,CAAC;gBAChC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;gBAChB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;gBACxB,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;aACxB;iBAAM;gBACL,IAAI,CAAC,UAAU,CAAC,aAAa,iCACxB,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,KAC5B,IAAI,EAAE,MAAA,OAAO,CAAC,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,CAAC,mCAAI,KAAK,IACjD,CAAC;gBACH,IAAI,CAAC,YAAY,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CACF","file":"base.js","sourcesContent":["import type { IGroup } from '@visactor/vrender';\nimport { createGroup } from '@visactor/vrender';\nimport { isValid } from '@visactor/vutils';\nimport { AbstractComponent } from '../core/base';\nimport type { Tag } from '../tag';\nimport type { MarkerAttrs } from './type';\n\nexport abstract class Marker<T extends MarkerAttrs> extends AbstractComponent<Required<T>> {\n private _container!: IGroup;\n\n protected _label!: Tag;\n\n protected abstract setLabelPos(): any;\n protected abstract initMarker(container: IGroup): any;\n protected abstract updateMarker(): any;\n\n protected render() {\n const markerVisible = this.attribute.visible ?? true;\n const markerInteractive = this.attribute.interactive ?? false;\n\n if (!markerInteractive) {\n this.setAttribute('pickable', false);\n this.setAttribute('childrenPickable', false);\n }\n\n if (markerVisible) {\n if (!this._container) {\n const group = createGroup({\n ...this.attribute?.clipRange,\n clip: isValid(this.attribute?.clipRange) ?? false\n });\n group.name = 'marker-container';\n this.add(group);\n this._container = group;\n this.initMarker(group);\n } else {\n this._container.setAttributes({\n ...this.attribute?.clipRange,\n clip: isValid(this.attribute?.clipRange) ?? false\n });\n this.updateMarker();\n }\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["marker/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIjD,MAAM,OAAgB,MAA8B,SAAQ,iBAA8B;IAUhF,cAAc;;QACpB,MAAM,SAAS,GAAG,WAAW,iCACxB,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,KAC5B,IAAI,EAAE,MAAA,OAAO,CAAC,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,CAAC,mCAAI,KAAK,IACjD,CAAC;QACH,SAAS,CAAC,IAAI,GAAG,kBAAkB,CAAC;QACpC,MAAM,KAAK,GAAG,WAAW,CAAC;YACxB,CAAC,EAAE,MAAA,CAAC,CAAA,MAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,0CAAE,CAAC,CAAA,mCAAI,CAAC;YACrC,CAAC,EAAE,MAAA,CAAC,CAAA,MAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,0CAAE,CAAC,CAAA,mCAAI,CAAC;SACtC,CAAC,CAAC;QACH,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,SAAS,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;IAC1B,CAAC;IAEO,gBAAgB;;QACtB,IAAI,CAAC,cAAc,CAAC,aAAa,iCAC5B,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,KAC5B,IAAI,EAAE,MAAA,OAAO,CAAC,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,CAAC,mCAAI,KAAK,IACjD,CAAC;QACH,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;YAC5B,CAAC,EAAE,MAAA,CAAC,CAAA,MAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,0CAAE,CAAC,CAAA,mCAAI,CAAC;YACrC,CAAC,EAAE,MAAA,CAAC,CAAA,MAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,SAAS,0CAAE,CAAC,CAAA,mCAAI,CAAC;SACtC,CAAC,CAAC;IACL,CAAC;IAES,MAAM;;QACd,MAAM,aAAa,GAAG,MAAA,IAAI,CAAC,SAAS,CAAC,OAAO,mCAAI,IAAI,CAAC;QACrD,MAAM,iBAAiB,GAAG,MAAA,IAAI,CAAC,SAAS,CAAC,WAAW,mCAAI,KAAK,CAAC;QAE9D,IAAI,CAAC,iBAAiB,EAAE;YACtB,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;YACrC,IAAI,CAAC,YAAY,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;SAC9C;QAED,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;gBACxB,IAAI,CAAC,cAAc,EAAE,CAAC;gBACtB,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;aAClC;iBAAM;gBACL,IAAI,CAAC,gBAAgB,EAAE,CAAC;gBACxB,IAAI,CAAC,YAAY,EAAE,CAAC;aACrB;SACF;IACH,CAAC;CACF","file":"base.js","sourcesContent":["import type { IGroup } from '@visactor/vrender';\nimport { createGroup } from '@visactor/vrender';\nimport { isValid } from '@visactor/vutils';\nimport { AbstractComponent } from '../core/base';\nimport type { Tag } from '../tag';\nimport type { MarkerAttrs } from './type';\n\nexport abstract class Marker<T extends MarkerAttrs> extends AbstractComponent<Required<T>> {\n private _containerClip!: IGroup;\n private _container!: IGroup;\n\n protected _label!: Tag;\n\n protected abstract setLabelPos(): any;\n protected abstract initMarker(container: IGroup): any;\n protected abstract updateMarker(): any;\n\n private _initContainer() {\n const groupClip = createGroup({\n ...this.attribute?.clipRange,\n clip: isValid(this.attribute?.clipRange) ?? false\n });\n groupClip.name = 'marker-container';\n const group = createGroup({\n x: -this.attribute?.clipRange?.x ?? 0,\n y: -this.attribute?.clipRange?.y ?? 0\n });\n groupClip.add(group);\n this._containerClip = groupClip;\n this.add(groupClip);\n this._container = group;\n }\n\n private _updateContainer() {\n this._containerClip.setAttributes({\n ...this.attribute?.clipRange,\n clip: isValid(this.attribute?.clipRange) ?? false\n });\n this._container.setAttributes({\n x: -this.attribute?.clipRange?.x ?? 0,\n y: -this.attribute?.clipRange?.y ?? 0\n });\n }\n\n protected render() {\n const markerVisible = this.attribute.visible ?? true;\n const markerInteractive = this.attribute.interactive ?? false;\n\n if (!markerInteractive) {\n this.setAttribute('pickable', false);\n this.setAttribute('childrenPickable', false);\n }\n\n if (markerVisible) {\n if (!this._containerClip) {\n this._initContainer();\n this.initMarker(this._container);\n } else {\n this._updateContainer();\n this.updateMarker();\n }\n }\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vrender-components",
3
- "version": "0.14.1-alpha.3",
3
+ "version": "0.14.1-alpha.5",
4
4
  "description": "components library for dp visualization",
5
5
  "sideEffects": false,
6
6
  "main": "cjs/index.js",
@@ -12,7 +12,7 @@
12
12
  "dist"
13
13
  ],
14
14
  "dependencies": {
15
- "@visactor/vrender": "0.14.1-alpha.3",
15
+ "@visactor/vrender": "0.14.1-alpha.5",
16
16
  "@visactor/vutils": "~0.13.0",
17
17
  "@visactor/vscale": "~0.13.0",
18
18
  "inversify": "6.0.1"
@@ -28,9 +28,9 @@
28
28
  "eslint": "~8.18.0",
29
29
  "vite": "3.2.6",
30
30
  "typescript": "4.9.5",
31
- "@internal/bundler": "0.0.1",
31
+ "@internal/ts-config": "0.0.1",
32
32
  "@internal/eslint-config": "0.0.1",
33
- "@internal/ts-config": "0.0.1"
33
+ "@internal/bundler": "0.0.1"
34
34
  },
35
35
  "keywords": [
36
36
  "VisActor",