@moxa/graph 3.0.0-beta.1 → 3.0.0-beta.3
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/README.md +602 -114
- package/assets/icon-sprite.svg +1 -1
- package/components/edge-label/index.d.ts +4 -4
- package/components/edge-label/index.d.ts.map +1 -1
- package/components/edge-polyline/index.d.ts.map +1 -1
- package/components/node-device/models/index.d.ts +1 -0
- package/components/node-device/models/index.d.ts.map +1 -1
- package/components/node-label/index.d.ts +1 -1
- package/components/node-label/index.d.ts.map +1 -1
- package/components/shared/transforms/edge-transform.d.ts.map +1 -1
- package/components/shared/transforms/group-transform.d.ts.map +1 -1
- package/components/shared/transforms/node-transform.d.ts.map +1 -1
- package/components/shared/utils/node-utils/config.d.ts +27 -0
- package/components/shared/utils/node-utils/config.d.ts.map +1 -0
- package/components/shared/utils/node-utils/icon-style.d.ts.map +1 -1
- package/components/shared/utils/node-utils/index.d.ts +5 -5
- package/components/shared/utils/node-utils/index.d.ts.map +1 -1
- package/components/shared/utils/node-utils/offset.d.ts +2 -6
- package/components/shared/utils/node-utils/offset.d.ts.map +1 -1
- package/components/shared/utils/node-utils/text-style.d.ts.map +1 -1
- package/components/shared/utils/node-utils/title-style.d.ts.map +1 -1
- package/core/model/index.d.ts +1 -0
- package/core/model/index.d.ts.map +1 -1
- package/core/model/label.model.d.ts +2 -1
- package/core/model/label.model.d.ts.map +1 -1
- package/core/model/plugin.model.d.ts +1 -1
- package/core/model/text.model.d.ts +5 -0
- package/core/model/text.model.d.ts.map +1 -0
- package/index.cjs +57 -57
- package/index.js +3629 -3574
- package/layouts/grid/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/plugins/context-menu/index.d.ts +11 -1
- package/plugins/context-menu/index.d.ts.map +1 -1
- package/plugins/minimap/index.d.ts +3 -2
- package/plugins/minimap/index.d.ts.map +1 -1
- package/shared/transforms/plugin-transform.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/layouts/grid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAGjE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,SAAS,OAAO,CAAC,gBAAgB,CAAC,KACjC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/layouts/grid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAoB,MAAM,aAAa,CAAC;AAGjE,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,GAAG;IAChD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAMF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,SAAS,OAAO,CAAC,gBAAgB,CAAC,KACjC,mBAmDF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import { BasePluginOptions, Contextmenu, ContextmenuOptions } from '@antv/g6';
|
|
2
2
|
import { PluginFunction } from '../../core/model';
|
|
3
3
|
export type ContextMenu = Contextmenu;
|
|
4
|
-
export
|
|
4
|
+
export interface ContextMenuItem {
|
|
5
|
+
name: string;
|
|
6
|
+
value: string;
|
|
7
|
+
onClick?: (value: any, element: any) => void;
|
|
8
|
+
visible?: (element: any) => boolean;
|
|
9
|
+
}
|
|
10
|
+
export type ContextMenuOptions = BasePluginOptions & {
|
|
11
|
+
items?: ContextMenuItem[];
|
|
12
|
+
trigger?: 'contextmenu' | 'click';
|
|
13
|
+
enable?: (e: any) => boolean;
|
|
14
|
+
};
|
|
5
15
|
export declare const getContextMenuOptions: PluginFunction<ContextMenuOptions, ContextmenuOptions>;
|
|
6
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/context-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/context-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9E,OAAO,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,WAAW,CAAC;AACtC,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAC7C,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC;CACrC;AAED,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,GAAG;IACnD,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAClC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAChD,kBAAkB,EAClB,kBAAkB,CA8BnB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { BasePluginOptions, Minimap as G6Minimap
|
|
1
|
+
import { BasePluginOptions, Minimap as G6Minimap } from '@antv/g6';
|
|
2
2
|
import { Graph } from '../../core/graph';
|
|
3
3
|
import { PluginFunction } from '../../core/model';
|
|
4
4
|
export type Minimap = G6Minimap;
|
|
5
|
+
export type MinimapPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
5
6
|
export type MinimapOptions = BasePluginOptions & {
|
|
6
|
-
position?:
|
|
7
|
+
position?: MinimapPosition;
|
|
7
8
|
className?: string;
|
|
8
9
|
size?: [number, number];
|
|
9
10
|
offset?: [number, number];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/minimap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,IAAI,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/plugins/minimap/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAU,cAAc,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG,SAAS,CAAC;AAGhC,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,WAAW,GACX,aAAa,GACb,cAAc,CAAC;AAEnB,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG;IAC/C,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC3B,CAAC;AAUF,eAAO,MAAM,iBAAiB,EAAE,cAAc,CAC5C,cAAc,EACd,cAAc,CAuBf,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,KAAK,SAOxC,CAAC"}
|
|
@@ -14,7 +14,7 @@ export declare const DEFAULT_PLUGINS: Plugin[];
|
|
|
14
14
|
* Plugin factory mapping
|
|
15
15
|
*/
|
|
16
16
|
export declare const PLUGIN_FACTORIES: {
|
|
17
|
-
|
|
17
|
+
contextmenu: import('../../core/model').PluginFunction<import('../../plugins/context-menu').ContextMenuOptions, import('@antv/g6').ContextmenuOptions>;
|
|
18
18
|
elementToolbar: import('../../core/model').PluginFunction<import('../../plugins/element-toolbar').ElementToolbarOptions, import('../../plugins/element-toolbar').ElementToolbarOptions>;
|
|
19
19
|
fixedToolbar: import('../../core/model').PluginFunction<import('../../plugins/fixed-toolbar').FixedToolbarOptions, import('../../plugins/fixed-toolbar').FixedToolbarOptions>;
|
|
20
20
|
graphBackground: import('../../core/model').PluginFunction<import('../../plugins/graph-background').GraphBackgroundOptions, import('../../plugins/graph-background').GraphBackgroundOptions>;
|