amis-editor-core 6.11.0-beta.1 → 6.11.0-beta.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/esm/manager.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="lodash" />
3
3
  import { DataSchema } from 'amis';
4
- import { RenderOptions } from 'amis-core';
4
+ import { RenderOptions, GlobalVariableItem } from 'amis-core';
5
5
  import { PluginInterface, BasicPanelItem, RendererInfo, SubRendererInfo, PluginEvent, RegionConfig, ContextMenuItem, ContextMenuEventContext, EventContext, PluginEventFn, ScaffoldForm, RendererPluginEvent, PluginEvents, PluginActions } from './plugin';
6
6
  import { EditorStoreType, SubEditorContext } from './store/editor';
7
7
  import { EditorNodeType } from './store/node';
@@ -112,6 +112,10 @@ export declare class EditorManager {
112
112
  readonly removable: boolean;
113
113
  readonly duplicatable: boolean;
114
114
  readonly replaceable: boolean;
115
+ /**
116
+ * 在 component/Editor.tsx 里面实例化的。
117
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
118
+ */
115
119
  memberImmutable(region: string): boolean;
116
120
  readonly isRegion: boolean;
117
121
  readonly childRegions: any[];
@@ -176,6 +180,10 @@ export declare class EditorManager {
176
180
  readonly removable: boolean;
177
181
  readonly duplicatable: boolean;
178
182
  readonly replaceable: boolean;
183
+ /**
184
+ * 在 component/Editor.tsx 里面实例化的。
185
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
186
+ */
179
187
  memberImmutable(region: string): boolean;
180
188
  readonly isRegion: boolean;
181
189
  readonly childRegions: any[];
@@ -239,6 +247,10 @@ export declare class EditorManager {
239
247
  readonly removable: boolean;
240
248
  readonly duplicatable: boolean;
241
249
  readonly replaceable: boolean;
250
+ /**
251
+ * 在 component/Editor.tsx 里面实例化的。
252
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
253
+ */
242
254
  memberImmutable(region: string): boolean;
243
255
  readonly isRegion: boolean;
244
256
  readonly childRegions: any[];
@@ -329,6 +341,10 @@ export declare class EditorManager {
329
341
  readonly removable: boolean;
330
342
  readonly duplicatable: boolean;
331
343
  readonly replaceable: boolean;
344
+ /**
345
+ * 在 component/Editor.tsx 里面实例化的。
346
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
347
+ */
332
348
  memberImmutable(region: string): boolean;
333
349
  readonly isRegion: boolean;
334
350
  readonly childRegions: any[];
@@ -392,6 +408,10 @@ export declare class EditorManager {
392
408
  readonly removable: boolean;
393
409
  readonly duplicatable: boolean;
394
410
  readonly replaceable: boolean;
411
+ /**
412
+ * 在 component/Editor.tsx 里面实例化的。
413
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
414
+ */
395
415
  memberImmutable(region: string): boolean;
396
416
  readonly isRegion: boolean;
397
417
  readonly childRegions: any[];
@@ -441,11 +461,6 @@ export declare class EditorManager {
441
461
  getTarget(): HTMLElement | HTMLElement[] | null;
442
462
  calculateHighlightBox(root?: any): void;
443
463
  resetHighlightBox(root: any): void;
444
- /**
445
- * 显示插入面板
446
- * @param region
447
- * @param preferTag
448
- */
449
464
  updateState(state: any, replace?: boolean): void;
450
465
  setWidthMutable(value: any): void;
451
466
  setHeightMutable(value: any): void;
@@ -494,6 +509,10 @@ export declare class EditorManager {
494
509
  readonly removable: boolean;
495
510
  readonly duplicatable: boolean;
496
511
  readonly replaceable: boolean;
512
+ /**
513
+ * 在 component/Editor.tsx 里面实例化的。
514
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
515
+ */
497
516
  memberImmutable(region: string): boolean;
498
517
  readonly isRegion: boolean;
499
518
  readonly childRegions: any[];
@@ -558,6 +577,10 @@ export declare class EditorManager {
558
577
  readonly removable: boolean;
559
578
  readonly duplicatable: boolean;
560
579
  readonly replaceable: boolean;
580
+ /**
581
+ * 在 component/Editor.tsx 里面实例化的。
582
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
583
+ */
561
584
  memberImmutable(region: string): boolean;
562
585
  readonly isRegion: boolean;
563
586
  readonly childRegions: any[];
@@ -621,6 +644,10 @@ export declare class EditorManager {
621
644
  readonly removable: boolean;
622
645
  readonly duplicatable: boolean;
623
646
  readonly replaceable: boolean;
647
+ /**
648
+ * 在 component/Editor.tsx 里面实例化的。
649
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
650
+ */
624
651
  memberImmutable(region: string): boolean;
625
652
  readonly isRegion: boolean;
626
653
  readonly childRegions: any[];
@@ -711,6 +738,10 @@ export declare class EditorManager {
711
738
  readonly removable: boolean;
712
739
  readonly duplicatable: boolean;
713
740
  readonly replaceable: boolean;
741
+ /**
742
+ * 在 component/Editor.tsx 里面实例化的。
743
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
744
+ */
714
745
  memberImmutable(region: string): boolean;
715
746
  readonly isRegion: boolean;
716
747
  readonly childRegions: any[];
@@ -774,6 +805,10 @@ export declare class EditorManager {
774
805
  readonly removable: boolean;
775
806
  readonly duplicatable: boolean;
776
807
  readonly replaceable: boolean;
808
+ /**
809
+ * 在 component/Editor.tsx 里面实例化的。
810
+ * 辅助 component/Editor.tsx 实现一些非 UI 相关的功能。
811
+ */
777
812
  memberImmutable(region: string): boolean;
778
813
  readonly isRegion: boolean;
779
814
  readonly childRegions: any[];
@@ -823,11 +858,6 @@ export declare class EditorManager {
823
858
  getTarget(): HTMLElement | HTMLElement[] | null;
824
859
  calculateHighlightBox(root?: any): void;
825
860
  resetHighlightBox(root: any): void;
826
- /**
827
- * 显示插入面板
828
- * @param region
829
- * @param preferTag
830
- */
831
861
  updateState(state: any, replace?: boolean): void;
832
862
  setWidthMutable(value: any): void;
833
863
  setHeightMutable(value: any): void;
@@ -1140,6 +1170,22 @@ export declare class EditorManager {
1140
1170
  * 获取可用上下文待绑定字段
1141
1171
  */
1142
1172
  getAvailableContextFields(node: EditorNodeType): Promise<any>;
1173
+ /**
1174
+ * 初始化全局变量
1175
+ */
1176
+ initGlobalVariables(): Promise<void>;
1177
+ /**
1178
+ * 获取全局变量详情
1179
+ */
1180
+ getGlobalVariableDetail(variable: Partial<GlobalVariableItem>): Promise<any>;
1181
+ /**
1182
+ * 保存全局变量,包括新增保存和编辑保存
1183
+ */
1184
+ saveGlobalVariable(variable: Partial<GlobalVariableItem>): Promise<any>;
1185
+ /**
1186
+ * 删除全局变量
1187
+ */
1188
+ deleteGlobalVariable(variable: Partial<GlobalVariableItem>): Promise<any>;
1143
1189
  beforeDispatchEvent(originHook: any, e: any, component: any, scoped: IScopedContext, data: any, broadcasts?: any): void;
1144
1190
  /**
1145
1191
  * 销毁函数
package/esm/plugin.d.ts CHANGED
@@ -7,7 +7,7 @@ import { EditorStoreType } from './store/editor';
7
7
  import { EditorNodeType } from './store/node';
8
8
  import React from 'react';
9
9
  import { DiffChange } from './util';
10
- import type { RendererConfig, Schema } from 'amis-core';
10
+ import type { GlobalVariableItem, RendererConfig, Schema } from 'amis-core';
11
11
  import type { MenuDivider, MenuItem } from 'amis-ui/lib/components/ContextMenu';
12
12
  import type { BaseSchema, SchemaCollection } from 'amis';
13
13
  import type { AsyncLayerOptions } from './component/AsyncLayer';
@@ -470,6 +470,12 @@ export interface ResizeMoveEventContext extends EventContext {
470
470
  node: EditorNodeType;
471
471
  store: EditorStoreType;
472
472
  }
473
+ export interface GlobalVariablesEventContext extends EventContext {
474
+ data: Array<GlobalVariableItem>;
475
+ }
476
+ export interface GlobalVariableEventContext extends EventContext {
477
+ data: Partial<GlobalVariableItem>;
478
+ }
473
479
  export interface AfterBuildPanelBody extends EventContext {
474
480
  data: SchemaCollection;
475
481
  plugin: BasePlugin;
@@ -549,6 +555,10 @@ export interface PluginEventListener {
549
555
  onMove(e: MouseEvent): void;
550
556
  onEnd(e: MouseEvent): void;
551
557
  }>) => void;
558
+ onGlobalVariableInit?: (event: PluginEvent<GlobalVariablesEventContext>) => void;
559
+ onGlobalVariableDetail?: (event: PluginEvent<GlobalVariableEventContext>) => void;
560
+ onGlobalVariableSave?: (event: PluginEvent<GlobalVariableEventContext>) => void;
561
+ onGlobalVariableDelete?: (event: PluginEvent<GlobalVariableEventContext>) => void;
552
562
  }
553
563
  /**
554
564
  * 插件的 interface 定义
@@ -1,4 +1,5 @@
1
1
  /// <reference types="react" />
2
+ import { GlobalVariableItem } from 'amis-core';
2
3
  import { Instance } from 'mobx-state-tree';
3
4
  import { InsertEventContext, PluginEvent, RendererInfo, SubRendererInfo, ToolbarItem, PanelItem, MoveEventContext, ScaffoldForm, PopOverForm, DeleteEventContext, BaseEventContext, IGlobalEvent } from '../plugin';
4
5
  import type { Schema } from 'amis';
@@ -125,7 +126,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
125
126
  memberImmutable(region: string): boolean;
126
127
  readonly isRegion: boolean;
127
128
  readonly childRegions: any[];
128
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
129
+ readonly uniqueChildren: any[];
129
130
  readonly sameIdChild: any;
130
131
  readonly singleRegion: boolean;
131
132
  isExists(id: string): boolean;
@@ -189,7 +190,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
189
190
  memberImmutable(region: string): boolean;
190
191
  readonly isRegion: boolean;
191
192
  readonly childRegions: any[];
192
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
193
+ readonly uniqueChildren: any[];
193
194
  readonly sameIdChild: any;
194
195
  readonly singleRegion: boolean;
195
196
  isExists(id: string): boolean;
@@ -252,7 +253,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
252
253
  memberImmutable(region: string): boolean;
253
254
  readonly isRegion: boolean;
254
255
  readonly childRegions: any[];
255
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
256
+ readonly uniqueChildren: any[];
256
257
  readonly sameIdChild: any;
257
258
  readonly singleRegion: boolean;
258
259
  isExists(id: string): boolean;
@@ -342,7 +343,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
342
343
  memberImmutable(region: string): boolean;
343
344
  readonly isRegion: boolean;
344
345
  readonly childRegions: any[];
345
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
346
+ readonly uniqueChildren: any[];
346
347
  readonly sameIdChild: any;
347
348
  readonly singleRegion: boolean;
348
349
  isExists(id: string): boolean;
@@ -405,7 +406,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
405
406
  memberImmutable(region: string): boolean;
406
407
  readonly isRegion: boolean;
407
408
  readonly childRegions: any[];
408
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
409
+ readonly uniqueChildren: any[];
409
410
  readonly sameIdChild: any;
410
411
  readonly singleRegion: boolean;
411
412
  isExists(id: string): boolean;
@@ -521,6 +522,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
521
522
  appCorpusData: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any, any, any>, [undefined]>;
522
523
  appLocaleState: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<number>, [undefined]>;
523
524
  globalEvents: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<IGlobalEvent[], IGlobalEvent[], IGlobalEvent[]>, [undefined]>;
525
+ globalVariables: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<any[], any[], any[]>, [undefined]>;
524
526
  }, {
525
527
  readonly filteredSchema: any;
526
528
  readonly filteredSchemaForPreview: any;
@@ -583,7 +585,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
583
585
  memberImmutable(region: string): boolean;
584
586
  readonly isRegion: boolean;
585
587
  readonly childRegions: any[];
586
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
588
+ readonly uniqueChildren: any[];
587
589
  readonly sameIdChild: any;
588
590
  readonly singleRegion: boolean;
589
591
  isExists(id: string): boolean;
@@ -647,7 +649,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
647
649
  memberImmutable(region: string): boolean;
648
650
  readonly isRegion: boolean;
649
651
  readonly childRegions: any[];
650
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
652
+ readonly uniqueChildren: any[];
651
653
  readonly sameIdChild: any;
652
654
  readonly singleRegion: boolean;
653
655
  isExists(id: string): boolean;
@@ -710,7 +712,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
710
712
  memberImmutable(region: string): boolean;
711
713
  readonly isRegion: boolean;
712
714
  readonly childRegions: any[];
713
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
715
+ readonly uniqueChildren: any[];
714
716
  readonly sameIdChild: any;
715
717
  readonly singleRegion: boolean;
716
718
  isExists(id: string): boolean;
@@ -800,7 +802,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
800
802
  memberImmutable(region: string): boolean;
801
803
  readonly isRegion: boolean;
802
804
  readonly childRegions: any[];
803
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
805
+ readonly uniqueChildren: any[];
804
806
  readonly sameIdChild: any;
805
807
  readonly singleRegion: boolean;
806
808
  isExists(id: string): boolean;
@@ -863,7 +865,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
863
865
  memberImmutable(region: string): boolean;
864
866
  readonly isRegion: boolean;
865
867
  readonly childRegions: any[];
866
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
868
+ readonly uniqueChildren: any[];
867
869
  readonly sameIdChild: any;
868
870
  readonly singleRegion: boolean;
869
871
  isExists(id: string): boolean;
@@ -960,7 +962,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
960
962
  memberImmutable(region: string): boolean;
961
963
  readonly isRegion: boolean;
962
964
  readonly childRegions: any[];
963
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
965
+ readonly uniqueChildren: any[];
964
966
  readonly sameIdChild: any;
965
967
  readonly singleRegion: boolean;
966
968
  isExists(id: string): boolean;
@@ -1024,7 +1026,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1024
1026
  memberImmutable(region: string): boolean;
1025
1027
  readonly isRegion: boolean;
1026
1028
  readonly childRegions: any[];
1027
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1029
+ readonly uniqueChildren: any[];
1028
1030
  readonly sameIdChild: any;
1029
1031
  readonly singleRegion: boolean;
1030
1032
  isExists(id: string): boolean;
@@ -1087,7 +1089,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1087
1089
  memberImmutable(region: string): boolean;
1088
1090
  readonly isRegion: boolean;
1089
1091
  readonly childRegions: any[];
1090
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1092
+ readonly uniqueChildren: any[];
1091
1093
  readonly sameIdChild: any;
1092
1094
  readonly singleRegion: boolean;
1093
1095
  isExists(id: string): boolean;
@@ -1177,7 +1179,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1177
1179
  memberImmutable(region: string): boolean;
1178
1180
  readonly isRegion: boolean;
1179
1181
  readonly childRegions: any[];
1180
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1182
+ readonly uniqueChildren: any[];
1181
1183
  readonly sameIdChild: any;
1182
1184
  readonly singleRegion: boolean;
1183
1185
  isExists(id: string): boolean;
@@ -1240,7 +1242,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1240
1242
  memberImmutable(region: string): boolean;
1241
1243
  readonly isRegion: boolean;
1242
1244
  readonly childRegions: any[];
1243
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1245
+ readonly uniqueChildren: any[];
1244
1246
  readonly sameIdChild: any;
1245
1247
  readonly singleRegion: boolean;
1246
1248
  isExists(id: string): boolean;
@@ -1360,7 +1362,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1360
1362
  memberImmutable(region: string): boolean;
1361
1363
  readonly isRegion: boolean;
1362
1364
  readonly childRegions: any[];
1363
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1365
+ readonly uniqueChildren: any[];
1364
1366
  readonly sameIdChild: any;
1365
1367
  readonly singleRegion: boolean;
1366
1368
  isExists(id: string): boolean;
@@ -1424,7 +1426,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1424
1426
  memberImmutable(region: string): boolean;
1425
1427
  readonly isRegion: boolean;
1426
1428
  readonly childRegions: any[];
1427
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1429
+ readonly uniqueChildren: any[];
1428
1430
  readonly sameIdChild: any;
1429
1431
  readonly singleRegion: boolean;
1430
1432
  isExists(id: string): boolean;
@@ -1487,7 +1489,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1487
1489
  memberImmutable(region: string): boolean;
1488
1490
  readonly isRegion: boolean;
1489
1491
  readonly childRegions: any[];
1490
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1492
+ readonly uniqueChildren: any[];
1491
1493
  readonly sameIdChild: any;
1492
1494
  readonly singleRegion: boolean;
1493
1495
  isExists(id: string): boolean;
@@ -1577,7 +1579,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1577
1579
  memberImmutable(region: string): boolean;
1578
1580
  readonly isRegion: boolean;
1579
1581
  readonly childRegions: any[];
1580
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1582
+ readonly uniqueChildren: any[];
1581
1583
  readonly sameIdChild: any;
1582
1584
  readonly singleRegion: boolean;
1583
1585
  isExists(id: string): boolean;
@@ -1640,7 +1642,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1640
1642
  memberImmutable(region: string): boolean;
1641
1643
  readonly isRegion: boolean;
1642
1644
  readonly childRegions: any[];
1643
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1645
+ readonly uniqueChildren: any[];
1644
1646
  readonly sameIdChild: any;
1645
1647
  readonly singleRegion: boolean;
1646
1648
  isExists(id: string): boolean;
@@ -1737,7 +1739,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1737
1739
  memberImmutable(region: string): boolean;
1738
1740
  readonly isRegion: boolean;
1739
1741
  readonly childRegions: any[];
1740
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1742
+ readonly uniqueChildren: any[];
1741
1743
  readonly sameIdChild: any;
1742
1744
  readonly singleRegion: boolean;
1743
1745
  isExists(id: string): boolean;
@@ -1801,7 +1803,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1801
1803
  memberImmutable(region: string): boolean;
1802
1804
  readonly isRegion: boolean;
1803
1805
  readonly childRegions: any[];
1804
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1806
+ readonly uniqueChildren: any[];
1805
1807
  readonly sameIdChild: any;
1806
1808
  readonly singleRegion: boolean;
1807
1809
  isExists(id: string): boolean;
@@ -1864,7 +1866,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1864
1866
  memberImmutable(region: string): boolean;
1865
1867
  readonly isRegion: boolean;
1866
1868
  readonly childRegions: any[];
1867
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1869
+ readonly uniqueChildren: any[];
1868
1870
  readonly sameIdChild: any;
1869
1871
  readonly singleRegion: boolean;
1870
1872
  isExists(id: string): boolean;
@@ -1954,7 +1956,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
1954
1956
  memberImmutable(region: string): boolean;
1955
1957
  readonly isRegion: boolean;
1956
1958
  readonly childRegions: any[];
1957
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
1959
+ readonly uniqueChildren: any[];
1958
1960
  readonly sameIdChild: any;
1959
1961
  readonly singleRegion: boolean;
1960
1962
  isExists(id: string): boolean;
@@ -2017,7 +2019,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2017
2019
  memberImmutable(region: string): boolean;
2018
2020
  readonly isRegion: boolean;
2019
2021
  readonly childRegions: any[];
2020
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2022
+ readonly uniqueChildren: any[];
2021
2023
  readonly sameIdChild: any;
2022
2024
  readonly singleRegion: boolean;
2023
2025
  isExists(id: string): boolean;
@@ -2115,7 +2117,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2115
2117
  memberImmutable(region: string): boolean;
2116
2118
  readonly isRegion: boolean;
2117
2119
  readonly childRegions: any[];
2118
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2120
+ readonly uniqueChildren: any[];
2119
2121
  readonly sameIdChild: any;
2120
2122
  readonly singleRegion: boolean;
2121
2123
  isExists(id: string): boolean;
@@ -2179,7 +2181,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2179
2181
  memberImmutable(region: string): boolean;
2180
2182
  readonly isRegion: boolean;
2181
2183
  readonly childRegions: any[];
2182
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2184
+ readonly uniqueChildren: any[];
2183
2185
  readonly sameIdChild: any;
2184
2186
  readonly singleRegion: boolean;
2185
2187
  isExists(id: string): boolean;
@@ -2242,7 +2244,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2242
2244
  memberImmutable(region: string): boolean;
2243
2245
  readonly isRegion: boolean;
2244
2246
  readonly childRegions: any[];
2245
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2247
+ readonly uniqueChildren: any[];
2246
2248
  readonly sameIdChild: any;
2247
2249
  readonly singleRegion: boolean;
2248
2250
  isExists(id: string): boolean;
@@ -2332,7 +2334,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2332
2334
  memberImmutable(region: string): boolean;
2333
2335
  readonly isRegion: boolean;
2334
2336
  readonly childRegions: any[];
2335
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2337
+ readonly uniqueChildren: any[];
2336
2338
  readonly sameIdChild: any;
2337
2339
  readonly singleRegion: boolean;
2338
2340
  isExists(id: string): boolean;
@@ -2395,7 +2397,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2395
2397
  memberImmutable(region: string): boolean;
2396
2398
  readonly isRegion: boolean;
2397
2399
  readonly childRegions: any[];
2398
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2400
+ readonly uniqueChildren: any[];
2399
2401
  readonly sameIdChild: any;
2400
2402
  readonly singleRegion: boolean;
2401
2403
  isExists(id: string): boolean;
@@ -2492,7 +2494,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2492
2494
  memberImmutable(region: string): boolean;
2493
2495
  readonly isRegion: boolean;
2494
2496
  readonly childRegions: any[];
2495
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2497
+ readonly uniqueChildren: any[];
2496
2498
  readonly sameIdChild: any;
2497
2499
  readonly singleRegion: boolean;
2498
2500
  isExists(id: string): boolean;
@@ -2556,7 +2558,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2556
2558
  memberImmutable(region: string): boolean;
2557
2559
  readonly isRegion: boolean;
2558
2560
  readonly childRegions: any[];
2559
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2561
+ readonly uniqueChildren: any[];
2560
2562
  readonly sameIdChild: any;
2561
2563
  readonly singleRegion: boolean;
2562
2564
  isExists(id: string): boolean;
@@ -2619,7 +2621,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2619
2621
  memberImmutable(region: string): boolean;
2620
2622
  readonly isRegion: boolean;
2621
2623
  readonly childRegions: any[];
2622
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2624
+ readonly uniqueChildren: any[];
2623
2625
  readonly sameIdChild: any;
2624
2626
  readonly singleRegion: boolean;
2625
2627
  isExists(id: string): boolean;
@@ -2709,7 +2711,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2709
2711
  memberImmutable(region: string): boolean;
2710
2712
  readonly isRegion: boolean;
2711
2713
  readonly childRegions: any[];
2712
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2714
+ readonly uniqueChildren: any[];
2713
2715
  readonly sameIdChild: any;
2714
2716
  readonly singleRegion: boolean;
2715
2717
  isExists(id: string): boolean;
@@ -2772,7 +2774,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2772
2774
  memberImmutable(region: string): boolean;
2773
2775
  readonly isRegion: boolean;
2774
2776
  readonly childRegions: any[];
2775
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2777
+ readonly uniqueChildren: any[];
2776
2778
  readonly sameIdChild: any;
2777
2779
  readonly singleRegion: boolean;
2778
2780
  isExists(id: string): boolean;
@@ -2870,7 +2872,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2870
2872
  memberImmutable(region: string): boolean;
2871
2873
  readonly isRegion: boolean;
2872
2874
  readonly childRegions: any[];
2873
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2875
+ readonly uniqueChildren: any[];
2874
2876
  readonly sameIdChild: any;
2875
2877
  readonly singleRegion: boolean;
2876
2878
  isExists(id: string): boolean;
@@ -2934,7 +2936,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2934
2936
  memberImmutable(region: string): boolean;
2935
2937
  readonly isRegion: boolean;
2936
2938
  readonly childRegions: any[];
2937
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
2939
+ readonly uniqueChildren: any[];
2938
2940
  readonly sameIdChild: any;
2939
2941
  readonly singleRegion: boolean;
2940
2942
  isExists(id: string): boolean;
@@ -2997,7 +2999,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
2997
2999
  memberImmutable(region: string): boolean;
2998
3000
  readonly isRegion: boolean;
2999
3001
  readonly childRegions: any[];
3000
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
3002
+ readonly uniqueChildren: any[];
3001
3003
  readonly sameIdChild: any;
3002
3004
  readonly singleRegion: boolean;
3003
3005
  isExists(id: string): boolean;
@@ -3087,7 +3089,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
3087
3089
  memberImmutable(region: string): boolean;
3088
3090
  readonly isRegion: boolean;
3089
3091
  readonly childRegions: any[];
3090
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
3092
+ readonly uniqueChildren: any[];
3091
3093
  readonly sameIdChild: any;
3092
3094
  readonly singleRegion: boolean;
3093
3095
  isExists(id: string): boolean;
@@ -3150,7 +3152,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
3150
3152
  memberImmutable(region: string): boolean;
3151
3153
  readonly isRegion: boolean;
3152
3154
  readonly childRegions: any[];
3153
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
3155
+ readonly uniqueChildren: any[];
3154
3156
  readonly sameIdChild: any;
3155
3157
  readonly singleRegion: boolean;
3156
3158
  isExists(id: string): boolean;
@@ -3247,7 +3249,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
3247
3249
  memberImmutable(region: string): boolean;
3248
3250
  readonly isRegion: boolean;
3249
3251
  readonly childRegions: any[];
3250
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
3252
+ readonly uniqueChildren: any[];
3251
3253
  readonly sameIdChild: any;
3252
3254
  readonly singleRegion: boolean;
3253
3255
  isExists(id: string): boolean;
@@ -3311,7 +3313,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
3311
3313
  memberImmutable(region: string): boolean;
3312
3314
  readonly isRegion: boolean;
3313
3315
  readonly childRegions: any[];
3314
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
3316
+ readonly uniqueChildren: any[];
3315
3317
  readonly sameIdChild: any;
3316
3318
  readonly singleRegion: boolean;
3317
3319
  isExists(id: string): boolean;
@@ -3374,7 +3376,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
3374
3376
  memberImmutable(region: string): boolean;
3375
3377
  readonly isRegion: boolean;
3376
3378
  readonly childRegions: any[];
3377
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
3379
+ readonly uniqueChildren: any[];
3378
3380
  readonly sameIdChild: any;
3379
3381
  readonly singleRegion: boolean;
3380
3382
  isExists(id: string): boolean;
@@ -3464,7 +3466,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
3464
3466
  memberImmutable(region: string): boolean;
3465
3467
  readonly isRegion: boolean;
3466
3468
  readonly childRegions: any[];
3467
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
3469
+ readonly uniqueChildren: any[];
3468
3470
  readonly sameIdChild: any;
3469
3471
  readonly singleRegion: boolean;
3470
3472
  isExists(id: string): boolean;
@@ -3527,7 +3529,7 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
3527
3529
  memberImmutable(region: string): boolean;
3528
3530
  readonly isRegion: boolean;
3529
3531
  readonly childRegions: any[];
3530
- readonly uniqueChildren: any[]; /** 应用多语言状态,用于其它组件进行订阅 */
3532
+ readonly uniqueChildren: any[];
3531
3533
  readonly sameIdChild: any;
3532
3534
  readonly singleRegion: boolean;
3533
3535
  isExists(id: string): boolean;
@@ -3765,6 +3767,9 @@ export declare const MainStore: import("mobx-state-tree").IModelType<{
3765
3767
  /** 设置应用的语料数据 */
3766
3768
  setAppCorpusData(data?: any): void;
3767
3769
  setGlobalEvents(events: IGlobalEvent[]): void;
3770
+ setGlobalVariables(variables: Array<GlobalVariableItem & {
3771
+ id: string | number;
3772
+ }>): void;
3768
3773
  beforeDestroy(): void;
3769
3774
  }, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
3770
3775
  export type EditorStoreType = Instance<typeof MainStore>;
package/esm/variable.d.ts CHANGED
@@ -60,4 +60,9 @@ export declare class VariableManager {
60
60
  * 根据变量路径获取变量名称
61
61
  */
62
62
  getNameByPath(path: string, valueField?: string, labelField?: string): any;
63
+ /**
64
+ * 获取全局变量树形结构
65
+ * @returns
66
+ */
67
+ getGlobalVariablesOptions(): Option[];
63
68
  }