@gct-paas/design 0.1.4-dev.17 → 0.1.4-dev.19
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/dist/index.min.css +1 -1
- package/dist/loader.esm.min.js +1 -1
- package/es/components/design-view-layout/design-view-layout.css +11 -11
- package/es/components/design-view-layout/design-view-layout.mjs +1 -1
- package/es/components/field-transfer/components/Transfer/AdvancedTransfer.mjs +6 -1
- package/es/components/field-transfer/components/Transfer/TransferTree.mjs +6 -1
- package/es/hooks/design-view/design-state.d.ts +14 -0
- package/es/hooks/design-view/designer/useDesignModal.d.ts +17 -0
- package/es/hooks/design-view/designer/useDesignPreview.mjs +40 -55
- package/es/hooks/design-view/global/useGlobal.d.ts +8 -0
- package/es/hooks/design-view/layout/useToolkit.d.ts +2 -0
- package/es/hooks/design-view/useDesigner.d.ts +24 -1
- package/es/hooks/design-view/useDesigner.mjs +6 -1
- package/es/hooks/design-view/widget/useWidget.mjs +3 -1
- package/es/index.mjs +6 -5
- package/es/register/designer-register/designer-register.mjs +4 -0
- package/es/{utils → schema}/begin-drag/begin-drag.mjs +8 -6
- package/es/schema/common-config/button-editor-config.mjs +4 -2
- package/es/schema/common-config/common-field-editor-config.mjs +2 -0
- package/es/schema/field/data-table-column.mjs +52 -4
- package/es/schema/field/index.mjs +1 -1
- package/es/schema/index.d.ts +3 -1
- package/es/schema/index.mjs +4 -2
- package/es/schema/utils.d.ts +8 -0
- package/es/schema/utils.mjs +76 -0
- package/es/utils/design-plugin-pkg-util/design-plugin-pkg-util.d.ts +1 -1
- package/es/utils/design-plugin-pkg-util/design-plugin-pkg-util.mjs +1 -29
- package/es/utils/index.d.ts +0 -1
- package/es/utils/index.mjs +2 -2
- package/es/utils/transform-js/index.mjs +1 -0
- package/es/utils/transform-js/transform-js.d.ts +7 -6
- package/es/utils/transform-js/transform-js.mjs +62 -68
- package/package.json +9 -7
- package/dist/assets/transform-js.worker-jL3ThXZ5.js +0 -172438
- package/es/assets/transform-js.worker-CI2jwZbi.js +0 -230912
- package/es/utils/transform-js/transform-js.worker.d.ts +0 -1
- /package/es/{utils → schema}/begin-drag/begin-drag.d.ts +0 -0
|
@@ -171,6 +171,7 @@ export declare function useDesigner(): {
|
|
|
171
171
|
tableheight?: number | undefined;
|
|
172
172
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
173
173
|
enableHeaderBGColor?: boolean | undefined;
|
|
174
|
+
enableBGColor?: boolean | undefined;
|
|
174
175
|
};
|
|
175
176
|
props: {
|
|
176
177
|
[x: string]: any;
|
|
@@ -374,6 +375,7 @@ export declare function useDesigner(): {
|
|
|
374
375
|
tableheight?: number | undefined;
|
|
375
376
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
376
377
|
enableHeaderBGColor?: boolean | undefined;
|
|
378
|
+
enableBGColor?: boolean | undefined;
|
|
377
379
|
};
|
|
378
380
|
props: {
|
|
379
381
|
[x: string]: any;
|
|
@@ -564,6 +566,7 @@ export declare function useDesigner(): {
|
|
|
564
566
|
tableheight?: number | undefined;
|
|
565
567
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
566
568
|
enableHeaderBGColor?: boolean | undefined;
|
|
569
|
+
enableBGColor?: boolean | undefined;
|
|
567
570
|
};
|
|
568
571
|
props: {
|
|
569
572
|
[x: string]: any;
|
|
@@ -754,6 +757,7 @@ export declare function useDesigner(): {
|
|
|
754
757
|
tableheight?: number | undefined;
|
|
755
758
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
756
759
|
enableHeaderBGColor?: boolean | undefined;
|
|
760
|
+
enableBGColor?: boolean | undefined;
|
|
757
761
|
};
|
|
758
762
|
props: {
|
|
759
763
|
[x: string]: any;
|
|
@@ -942,6 +946,7 @@ export declare function useDesigner(): {
|
|
|
942
946
|
tableheight?: number | undefined;
|
|
943
947
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
944
948
|
enableHeaderBGColor?: boolean | undefined;
|
|
949
|
+
enableBGColor?: boolean | undefined;
|
|
945
950
|
};
|
|
946
951
|
runJs?: string | undefined;
|
|
947
952
|
los?: Record<string, IData> | undefined;
|
|
@@ -1055,6 +1060,7 @@ export declare function useDesigner(): {
|
|
|
1055
1060
|
tableheight?: number | undefined;
|
|
1056
1061
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1057
1062
|
enableHeaderBGColor?: boolean | undefined;
|
|
1063
|
+
enableBGColor?: boolean | undefined;
|
|
1058
1064
|
};
|
|
1059
1065
|
pageConfig: {
|
|
1060
1066
|
title?: string | undefined;
|
|
@@ -1085,7 +1091,7 @@ export declare function useDesigner(): {
|
|
|
1085
1091
|
methodMap: import('vue').Ref<import('@gct-paas/schema').ExportMethod, import('@gct-paas/schema').ExportMethod>;
|
|
1086
1092
|
checkWidgetMove: () => boolean;
|
|
1087
1093
|
handleAddDrag: (newIndex: number, childrenList: LowCodeWidget.BasicSchema[], scope: SCOPE, formID?: string) => void;
|
|
1088
|
-
setPageJson: (json: PageJson) => void
|
|
1094
|
+
setPageJson: (json: PageJson) => Promise<void>;
|
|
1089
1095
|
save: (flag?: boolean, showSuccess?: boolean) => Promise<boolean>;
|
|
1090
1096
|
savePageJsonSnapshot: (json?: PageJson) => void;
|
|
1091
1097
|
emitCache: () => void;
|
|
@@ -1242,6 +1248,7 @@ export declare function useDesigner(): {
|
|
|
1242
1248
|
tableheight?: number | undefined;
|
|
1243
1249
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1244
1250
|
enableHeaderBGColor?: boolean | undefined;
|
|
1251
|
+
enableBGColor?: boolean | undefined;
|
|
1245
1252
|
};
|
|
1246
1253
|
props: {
|
|
1247
1254
|
[x: string]: any;
|
|
@@ -1432,6 +1439,7 @@ export declare function useDesigner(): {
|
|
|
1432
1439
|
tableheight?: number | undefined;
|
|
1433
1440
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1434
1441
|
enableHeaderBGColor?: boolean | undefined;
|
|
1442
|
+
enableBGColor?: boolean | undefined;
|
|
1435
1443
|
};
|
|
1436
1444
|
props: {
|
|
1437
1445
|
[x: string]: any;
|
|
@@ -1622,6 +1630,7 @@ export declare function useDesigner(): {
|
|
|
1622
1630
|
tableheight?: number | undefined;
|
|
1623
1631
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1624
1632
|
enableHeaderBGColor?: boolean | undefined;
|
|
1633
|
+
enableBGColor?: boolean | undefined;
|
|
1625
1634
|
};
|
|
1626
1635
|
props: {
|
|
1627
1636
|
[x: string]: any;
|
|
@@ -1810,6 +1819,7 @@ export declare function useDesigner(): {
|
|
|
1810
1819
|
tableheight?: number | undefined;
|
|
1811
1820
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1812
1821
|
enableHeaderBGColor?: boolean | undefined;
|
|
1822
|
+
enableBGColor?: boolean | undefined;
|
|
1813
1823
|
};
|
|
1814
1824
|
runJs?: string | undefined;
|
|
1815
1825
|
los?: Record<string, IData> | undefined;
|
|
@@ -1944,6 +1954,7 @@ export declare function useDesigner(): {
|
|
|
1944
1954
|
tableheight?: number | undefined;
|
|
1945
1955
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
1946
1956
|
enableHeaderBGColor?: boolean | undefined;
|
|
1957
|
+
enableBGColor?: boolean | undefined;
|
|
1947
1958
|
};
|
|
1948
1959
|
props: {
|
|
1949
1960
|
[x: string]: any;
|
|
@@ -2134,6 +2145,7 @@ export declare function useDesigner(): {
|
|
|
2134
2145
|
tableheight?: number | undefined;
|
|
2135
2146
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2136
2147
|
enableHeaderBGColor?: boolean | undefined;
|
|
2148
|
+
enableBGColor?: boolean | undefined;
|
|
2137
2149
|
};
|
|
2138
2150
|
props: {
|
|
2139
2151
|
[x: string]: any;
|
|
@@ -2324,6 +2336,7 @@ export declare function useDesigner(): {
|
|
|
2324
2336
|
tableheight?: number | undefined;
|
|
2325
2337
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2326
2338
|
enableHeaderBGColor?: boolean | undefined;
|
|
2339
|
+
enableBGColor?: boolean | undefined;
|
|
2327
2340
|
};
|
|
2328
2341
|
props: {
|
|
2329
2342
|
[x: string]: any;
|
|
@@ -2512,6 +2525,7 @@ export declare function useDesigner(): {
|
|
|
2512
2525
|
tableheight?: number | undefined;
|
|
2513
2526
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2514
2527
|
enableHeaderBGColor?: boolean | undefined;
|
|
2528
|
+
enableBGColor?: boolean | undefined;
|
|
2515
2529
|
};
|
|
2516
2530
|
runJs?: string | undefined;
|
|
2517
2531
|
los?: Record<string, IData> | undefined;
|
|
@@ -2638,6 +2652,7 @@ export declare function useDesigner(): {
|
|
|
2638
2652
|
tableheight?: number | undefined;
|
|
2639
2653
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2640
2654
|
enableHeaderBGColor?: boolean | undefined;
|
|
2655
|
+
enableBGColor?: boolean | undefined;
|
|
2641
2656
|
};
|
|
2642
2657
|
props: {
|
|
2643
2658
|
[x: string]: any;
|
|
@@ -2828,6 +2843,7 @@ export declare function useDesigner(): {
|
|
|
2828
2843
|
tableheight?: number | undefined;
|
|
2829
2844
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
2830
2845
|
enableHeaderBGColor?: boolean | undefined;
|
|
2846
|
+
enableBGColor?: boolean | undefined;
|
|
2831
2847
|
};
|
|
2832
2848
|
props: {
|
|
2833
2849
|
[x: string]: any;
|
|
@@ -3018,6 +3034,7 @@ export declare function useDesigner(): {
|
|
|
3018
3034
|
tableheight?: number | undefined;
|
|
3019
3035
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
3020
3036
|
enableHeaderBGColor?: boolean | undefined;
|
|
3037
|
+
enableBGColor?: boolean | undefined;
|
|
3021
3038
|
};
|
|
3022
3039
|
props: {
|
|
3023
3040
|
[x: string]: any;
|
|
@@ -3209,6 +3226,7 @@ export declare function useDesigner(): {
|
|
|
3209
3226
|
tableheight?: number | undefined;
|
|
3210
3227
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
3211
3228
|
enableHeaderBGColor?: boolean | undefined;
|
|
3229
|
+
enableBGColor?: boolean | undefined;
|
|
3212
3230
|
};
|
|
3213
3231
|
props: {
|
|
3214
3232
|
[x: string]: any;
|
|
@@ -3399,6 +3417,7 @@ export declare function useDesigner(): {
|
|
|
3399
3417
|
tableheight?: number | undefined;
|
|
3400
3418
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
3401
3419
|
enableHeaderBGColor?: boolean | undefined;
|
|
3420
|
+
enableBGColor?: boolean | undefined;
|
|
3402
3421
|
};
|
|
3403
3422
|
props: {
|
|
3404
3423
|
[x: string]: any;
|
|
@@ -3589,6 +3608,7 @@ export declare function useDesigner(): {
|
|
|
3589
3608
|
tableheight?: number | undefined;
|
|
3590
3609
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
3591
3610
|
enableHeaderBGColor?: boolean | undefined;
|
|
3611
|
+
enableBGColor?: boolean | undefined;
|
|
3592
3612
|
};
|
|
3593
3613
|
props: {
|
|
3594
3614
|
[x: string]: any;
|
|
@@ -3780,6 +3800,7 @@ export declare function useDesigner(): {
|
|
|
3780
3800
|
tableheight?: number | undefined;
|
|
3781
3801
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
3782
3802
|
enableHeaderBGColor?: boolean | undefined;
|
|
3803
|
+
enableBGColor?: boolean | undefined;
|
|
3783
3804
|
};
|
|
3784
3805
|
props: {
|
|
3785
3806
|
[x: string]: any;
|
|
@@ -3970,6 +3991,7 @@ export declare function useDesigner(): {
|
|
|
3970
3991
|
tableheight?: number | undefined;
|
|
3971
3992
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
3972
3993
|
enableHeaderBGColor?: boolean | undefined;
|
|
3994
|
+
enableBGColor?: boolean | undefined;
|
|
3973
3995
|
};
|
|
3974
3996
|
props: {
|
|
3975
3997
|
[x: string]: any;
|
|
@@ -4160,6 +4182,7 @@ export declare function useDesigner(): {
|
|
|
4160
4182
|
tableheight?: number | undefined;
|
|
4161
4183
|
tableheightConfigure?: import('@gct-paas/core').tableColumnWidthEnum | undefined;
|
|
4162
4184
|
enableHeaderBGColor?: boolean | undefined;
|
|
4185
|
+
enableBGColor?: boolean | undefined;
|
|
4163
4186
|
};
|
|
4164
4187
|
props: {
|
|
4165
4188
|
[x: string]: any;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { platform } from "../../utils/design-view/index.mjs";
|
|
2
|
+
import { initMethodMap } from "../../utils/transform-js/transform-js.mjs";
|
|
3
|
+
import "../../utils/index.mjs";
|
|
2
4
|
import { methodMap, pageJson } from "./design-state.mjs";
|
|
3
5
|
import { useDesignModal } from "./designer/useDesignModal.mjs";
|
|
4
6
|
import { useDesignPreview } from "./designer/useDesignPreview.mjs";
|
|
@@ -36,9 +38,12 @@ function useDesigner() {
|
|
|
36
38
|
/**
|
|
37
39
|
* 设置设计器的 pageJSON
|
|
38
40
|
*/
|
|
39
|
-
function setPageJson(json) {
|
|
41
|
+
async function setPageJson(json) {
|
|
40
42
|
pageJson.pageConfig.hasFooter = platform.value === Platform.MOBILE || platform.value === Platform.PAD;
|
|
41
43
|
Object.assign(pageJson, json);
|
|
44
|
+
initMethodMap(pageJson.js).then((map) => {
|
|
45
|
+
methodMap.value = map;
|
|
46
|
+
});
|
|
42
47
|
cache.emitCache();
|
|
43
48
|
}
|
|
44
49
|
/** 检查是否可以拖拽进入的方法,比如某些组件不能拖到某些组件内 */
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { designRegister } from "../../../utils/design-view/index.mjs";
|
|
2
|
+
import "../../../utils/index.mjs";
|
|
1
3
|
import { useSelectedWidget } from "./useSelectedWidget.mjs";
|
|
2
4
|
import { has } from "lodash-es";
|
|
3
5
|
import { FormComponents } from "@gct-paas/core";
|
|
@@ -50,7 +52,7 @@ function useWidget(props) {
|
|
|
50
52
|
const value = computed(() => {
|
|
51
53
|
return "";
|
|
52
54
|
});
|
|
53
|
-
const widgetdesigner = {};
|
|
55
|
+
const widgetdesigner = designRegister.value.getProvider(widget.type)?.designerConfig || {};
|
|
54
56
|
const hideMaskValue = computed(() => {
|
|
55
57
|
if (typeof widgetdesigner[widget.type]?.hideMask === "function") return widgetdesigner[widget.type].hideMask(widget);
|
|
56
58
|
return widgetdesigner[widget.type]?.hideMask;
|
package/es/index.mjs
CHANGED
|
@@ -9,11 +9,10 @@ import { DesignStepCheck } from "./components/design-step-check/design-step-chec
|
|
|
9
9
|
import { ModalNameEditor } from "./components/modal-name-editor/modal-name-editor.mjs";
|
|
10
10
|
import { DesignViewLayout } from "./components/design-view-layout/design-view-layout.mjs";
|
|
11
11
|
import FieldCascader_default from "./components/field-cascader/src/FieldCascader.vue.mjs";
|
|
12
|
+
import { designInterceptors } from "./utils/design-interceptors/design-interceptors.mjs";
|
|
12
13
|
import { designRegister, platform } from "./utils/design-view/index.mjs";
|
|
13
14
|
import { basicAttrsUtils } from "./utils/field-attrs/basicAttrs.mjs";
|
|
14
15
|
import { transformField2Component } from "./utils/field-attrs/index.mjs";
|
|
15
|
-
import { beginDrag } from "./utils/begin-drag/begin-drag.mjs";
|
|
16
|
-
import { designInterceptors } from "./utils/design-interceptors/design-interceptors.mjs";
|
|
17
16
|
import { deptFilter, formulaFilter } from "./utils/field-filter/index.mjs";
|
|
18
17
|
import { openFormulaEditorByDesign } from "./utils/formula-editor-design/formula-editor-design.mjs";
|
|
19
18
|
import { findAllChildrenTypes } from "./utils/find-deep-types/find-deep-types.mjs";
|
|
@@ -24,6 +23,9 @@ import { buildRunJs, initMethodMap } from "./utils/transform-js/transform-js.mjs
|
|
|
24
23
|
import { flatten } from "./utils/flatten.mjs";
|
|
25
24
|
import "./utils/index.mjs";
|
|
26
25
|
import { modal_exports } from "./schema/modal/modal.mjs";
|
|
26
|
+
import { changeCmpData, createdSearchField } from "./schema/utils.mjs";
|
|
27
|
+
import { fixedAlignEditor } from "./schema/common-config/column-editor-config.mjs";
|
|
28
|
+
import { beginDrag } from "./schema/begin-drag/begin-drag.mjs";
|
|
27
29
|
import { hiddenButtonProps } from "./schema/common-config/button-props-func.mjs";
|
|
28
30
|
import { commonStyle, notNeedPxStyle } from "./schema/common-config/common-style.mjs";
|
|
29
31
|
import { displayEditor, displayProps } from "./schema/common-config/display-editor-config.mjs";
|
|
@@ -34,10 +36,9 @@ import { buttonEditor, buttonProps, buttonStyleEditor } from "./schema/common-co
|
|
|
34
36
|
import { formItemProps } from "./schema/common-config/formItem-editor-config.mjs";
|
|
35
37
|
import { deviceEvent } from "./schema/common-config/common-event-config.mjs";
|
|
36
38
|
import { getAutofillEditor } from "./schema/common-config/autofill-editor-config.mjs";
|
|
37
|
-
import {
|
|
39
|
+
import { FieldOverrideUtil, setupOverride } from "./schema/field/index.mjs";
|
|
38
40
|
import { BaseSearch, getSearchOptions } from "./schema/search/BaseSearch.mjs";
|
|
39
41
|
import { BaseDate } from "./schema/search/BaseDate.mjs";
|
|
40
|
-
import { FieldOverrideUtil, setupOverride } from "./schema/field/index.mjs";
|
|
41
42
|
import "./schema/index.mjs";
|
|
42
43
|
import { isModified, loading, methodMap, modalDesignId, modalDesignState, modalInfo, noMore, pageDesignHistoryList, pageJson, pageJsonSnapshot, pageNo, pluginConfigs, regRoot, subTableModalId, subTableModalState, transformPageJson, wfNodesModalId, wfNodesModalState, widgetInfo, workflowModalId, workflowModalState } from "./hooks/design-view/design-state.mjs";
|
|
43
44
|
import { useScope } from "./hooks/design-view/layout/useScope.mjs";
|
|
@@ -91,4 +92,4 @@ function onInit() {
|
|
|
91
92
|
}
|
|
92
93
|
onInit();
|
|
93
94
|
//#endregion
|
|
94
|
-
export { BaseDate, BaseSearch, CategoryEnum, ControllerType, DesignContainerNode, DesignEditorNode, DesignEditorType, DesignItemActionTag, DesignItemAttribute, DesignNode, DesignNodePrefix, DesignNodeType, DesignPluginPgkUtil, DesignSaveTip, DesignStepCheck, DesignViewHooks, DesignViewLayout, DesignViewPrefix, DesignerRegister, FieldCascader_default as FieldCascader, FieldOverrideUtil, FieldSchema, InsertNodeMode, MaterialGroup, MaterialRegister, MenuClickEvent, ModalNameEditor, ModelTypeEnum, NotMask, PageTypeEnum, ProcessTypeEnum, SCREditorUtils, ScriptTypeEnum, user_lock_default as UserLock, user_occupy_default as UserOccupy, baseBtnEditor, baseBtnProp, basicAttrsUtils, basicFieldEditor, beginDrag, BTN_TYPE_COLOR as btnTypeColor, buildRunJs, buildRuntimeJson, buttonEditor, buttonProps, buttonStyleEditor, commonStyle, createWidgetByType, createWidgetProvider, currentPanel, customMenu, deptFilter, designCreateAppVue, designInterceptors, designRegister, designSetupApp, destroyOccupyTimer, deviceEvent, displayEditor, displayProps, explainEditor, findAllChildrenTypes, fixedAlignEditor, flatten, formItemProps, formulaFilter, getAutofillEditor, getBindCmpTypeEditor, getInputAttrEditor, getSearchOptions, hiddenButtonProps, initFieldWidgetRuntime, initMethodMap, isModified, loadPageInfo, loadPageOccupyInfo, loading, lockPage, methodMap, modal_exports as modalCfg, modalDesignId, modalDesignState, modalInfo, multiFieldEditor, newKeyTag, noMore, nodeContainerProps, nodeEditorProps, nodeProps, notNeedPxStyle, occupyPage, onWidgetInfoInit, openFormulaEditorByDesign, pageDesignHistoryList, pageInfo, pageJson, pageJsonSnapshot, pageNo, pageOccupyInfo, pagePermissions, permissionEditor, placeholderEditor, platform, pluginConfigs, PRESET_COLOR as presetColor, propEditorProps, propsToStyle, regRoot, regexEditor, rgba2hex, schemaToStyle, setupOverride, shadeColor, styleEditorProps, subTableModalId, subTableModalState, submitInHideEditor, togglePanel, transformField2Component, transformPageJson, unlockAvailable, uploadDraggerEditor, useAsyncFieldConfig, useAsyncFileAttrs, useAsyncOperateField, useCacheHistory, useCacheHistoryInner, useDesignCache, useDesignHistory, useDesignModal, useDesignPreview, useDesignSave, useDesigner, useDesignerController, useFieldTransfer, useGlobal, useKeyParser, useModelField, usePage, usePageOccupy, usePropEditor, useScope, useSelectedWidget, useStyle, useStyleEditor, useToolkit, useUserOccupy, useWidget, useWidgetQuery, useWidgetRegistry, validatorEditor, wfNodesModalId, wfNodesModalState, widgetInfo, widgetProps, widgetWrapperProps, workflowModalId, workflowModalState };
|
|
95
|
+
export { BaseDate, BaseSearch, CategoryEnum, ControllerType, DesignContainerNode, DesignEditorNode, DesignEditorType, DesignItemActionTag, DesignItemAttribute, DesignNode, DesignNodePrefix, DesignNodeType, DesignPluginPgkUtil, DesignSaveTip, DesignStepCheck, DesignViewHooks, DesignViewLayout, DesignViewPrefix, DesignerRegister, FieldCascader_default as FieldCascader, FieldOverrideUtil, FieldSchema, InsertNodeMode, MaterialGroup, MaterialRegister, MenuClickEvent, ModalNameEditor, ModelTypeEnum, NotMask, PageTypeEnum, ProcessTypeEnum, SCREditorUtils, ScriptTypeEnum, user_lock_default as UserLock, user_occupy_default as UserOccupy, baseBtnEditor, baseBtnProp, basicAttrsUtils, basicFieldEditor, beginDrag, BTN_TYPE_COLOR as btnTypeColor, buildRunJs, buildRuntimeJson, buttonEditor, buttonProps, buttonStyleEditor, changeCmpData, commonStyle, createWidgetByType, createWidgetProvider, createdSearchField, currentPanel, customMenu, deptFilter, designCreateAppVue, designInterceptors, designRegister, designSetupApp, destroyOccupyTimer, deviceEvent, displayEditor, displayProps, explainEditor, findAllChildrenTypes, fixedAlignEditor, flatten, formItemProps, formulaFilter, getAutofillEditor, getBindCmpTypeEditor, getInputAttrEditor, getSearchOptions, hiddenButtonProps, initFieldWidgetRuntime, initMethodMap, isModified, loadPageInfo, loadPageOccupyInfo, loading, lockPage, methodMap, modal_exports as modalCfg, modalDesignId, modalDesignState, modalInfo, multiFieldEditor, newKeyTag, noMore, nodeContainerProps, nodeEditorProps, nodeProps, notNeedPxStyle, occupyPage, onWidgetInfoInit, openFormulaEditorByDesign, pageDesignHistoryList, pageInfo, pageJson, pageJsonSnapshot, pageNo, pageOccupyInfo, pagePermissions, permissionEditor, placeholderEditor, platform, pluginConfigs, PRESET_COLOR as presetColor, propEditorProps, propsToStyle, regRoot, regexEditor, rgba2hex, schemaToStyle, setupOverride, shadeColor, styleEditorProps, subTableModalId, subTableModalState, submitInHideEditor, togglePanel, transformField2Component, transformPageJson, unlockAvailable, uploadDraggerEditor, useAsyncFieldConfig, useAsyncFileAttrs, useAsyncOperateField, useCacheHistory, useCacheHistoryInner, useDesignCache, useDesignHistory, useDesignModal, useDesignPreview, useDesignSave, useDesigner, useDesignerController, useFieldTransfer, useGlobal, useKeyParser, useModelField, usePage, usePageOccupy, usePropEditor, useScope, useSelectedWidget, useStyle, useStyleEditor, useToolkit, useUserOccupy, useWidget, useWidgetQuery, useWidgetRegistry, validatorEditor, wfNodesModalId, wfNodesModalState, widgetInfo, widgetProps, widgetWrapperProps, workflowModalId, workflowModalState };
|
|
@@ -85,6 +85,10 @@ var DesignerRegister = class {
|
|
|
85
85
|
* @returns {*} {(IDesignerProvider | undefined)}
|
|
86
86
|
*/
|
|
87
87
|
getProvider(tag) {
|
|
88
|
+
if (!this.providers.has(tag)) {
|
|
89
|
+
console.warn(`getProvider with tag ${tag} is not registered.`);
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
88
92
|
return this.providers.get(tag);
|
|
89
93
|
}
|
|
90
94
|
/**
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { designRegister, platform } from "
|
|
2
|
-
import { basicAttrsUtils } from "
|
|
3
|
-
import { transformField2Component } from "
|
|
1
|
+
import { designRegister, platform } from "../../utils/design-view/index.mjs";
|
|
2
|
+
import { basicAttrsUtils } from "../../utils/field-attrs/basicAttrs.mjs";
|
|
3
|
+
import { transformField2Component } from "../../utils/field-attrs/index.mjs";
|
|
4
|
+
import "../../utils/index.mjs";
|
|
5
|
+
import { runSubtableFieldWidget, runWidget } from "../field/data-table-column.mjs";
|
|
4
6
|
import { useDesigner } from "../../hooks/design-view/useDesigner.mjs";
|
|
5
7
|
import { useAsyncOperateField } from "../../hooks/widgets/useAsyncFields.mjs";
|
|
6
8
|
import "../../hooks/index.mjs";
|
|
7
9
|
import { cloneDeep, get, merge } from "lodash-es";
|
|
8
10
|
import { CreateType, EntityModelTypeEnum, FIELD_TYPE, FieldIconMap, FormComponents, MaterialEnum, Platform, buildShortUUID } from "@gct-paas/core";
|
|
9
11
|
import { transformI18n } from "@gct-paas/schema";
|
|
10
|
-
//#region src/
|
|
12
|
+
//#region src/schema/begin-drag/begin-drag.ts
|
|
11
13
|
var { unBindAsyncStatus } = useAsyncOperateField();
|
|
12
14
|
/**
|
|
13
15
|
*
|
|
@@ -94,8 +96,8 @@ function beginDrag(data, { materialType = MaterialEnum.MaterialFormField, preLoc
|
|
|
94
96
|
transformI18n(cmp.props);
|
|
95
97
|
const widget = merge(cmp, basic);
|
|
96
98
|
provider.beforeCreate?.(widget);
|
|
97
|
-
if (materialType === MaterialEnum.MaterialTableField)
|
|
98
|
-
if ([MaterialEnum.MaterialSubTableField, MaterialEnum.MaterialTableSelectField].includes(materialType) && (widget.platform === Platform.WEB || widget.platform === Platform.PAD))
|
|
99
|
+
if (materialType === MaterialEnum.MaterialTableField) return runWidget(widget);
|
|
100
|
+
if ([MaterialEnum.MaterialSubTableField, MaterialEnum.MaterialTableSelectField].includes(materialType) && (widget.platform === Platform.WEB || widget.platform === Platform.PAD)) return runSubtableFieldWidget(widget);
|
|
99
101
|
if (materialType === MaterialEnum.MaterialSubTableModalField) {
|
|
100
102
|
const { subTableModalId } = useDesigner();
|
|
101
103
|
unBindAsyncStatus(subTableModalId.value);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { platform } from "../../utils/design-view/index.mjs";
|
|
2
|
+
import "../../utils/index.mjs";
|
|
1
3
|
import { hiddenButtonProps } from "./button-props-func.mjs";
|
|
2
|
-
import { ButtonColorTheme, ButtonColorType, ButtonSize, ButtonStyle, PropGroup, StyleGroup } from "@gct-paas/core";
|
|
4
|
+
import { ButtonColorTheme, ButtonColorType, ButtonSize, ButtonStyle, Platform, PropGroup, StyleGroup } from "@gct-paas/core";
|
|
3
5
|
//#region src/schema/common-config/button-editor-config.ts
|
|
4
6
|
var buttonProps = {
|
|
5
7
|
disabled: false,
|
|
@@ -79,7 +81,7 @@ var buttonEditor = [
|
|
|
79
81
|
label: "sys.pageDesigner.buttonSize",
|
|
80
82
|
group: PropGroup.ButtonStyle,
|
|
81
83
|
hidden: (widget) => {
|
|
82
|
-
return hiddenButtonProps(widget);
|
|
84
|
+
return hiddenButtonProps(widget) || platform.value === Platform.MOBILE;
|
|
83
85
|
},
|
|
84
86
|
_config: { options: Object.values(ButtonSize).map((i) => {
|
|
85
87
|
return {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { changeCmpData } from "../utils.mjs";
|
|
1
2
|
import { useScope } from "../../hooks/design-view/layout/useScope.mjs";
|
|
2
3
|
import { useDesigner } from "../../hooks/design-view/useDesigner.mjs";
|
|
3
4
|
import "../../hooks/index.mjs";
|
|
@@ -105,6 +106,7 @@ var getBindCmpTypeEditor = ({ name, type, hiddenCallback, filterOptionsCallback,
|
|
|
105
106
|
widget.props.displayTimeType = "d:h:m:s";
|
|
106
107
|
return;
|
|
107
108
|
}
|
|
109
|
+
changeCmpData(widget);
|
|
108
110
|
}
|
|
109
111
|
}];
|
|
110
112
|
};
|
|
@@ -1,8 +1,56 @@
|
|
|
1
|
+
import { createdSearchField } from "../utils.mjs";
|
|
1
2
|
import { fixedAlignEditor } from "../common-config/column-editor-config.mjs";
|
|
2
|
-
import "lodash-es";
|
|
3
|
-
import { BindCmpStyleEnum, FIELD_TYPE, FormComponents, Platform, ProgressTypeEnum, PropGroup, StyleGroup, TagTypeEnum, TextDecoration, buildShortUUID, fixedAlignENUM, tableColumnWidthEnum, tagEnum } from "@gct-paas/core";
|
|
3
|
+
import { merge } from "lodash-es";
|
|
4
|
+
import { BindCmpStyleEnum, FIELD_TYPE, FormComponents, MaterialEnum, Platform, ProgressTypeEnum, PropGroup, StyleGroup, TagTypeEnum, TextDecoration, buildShortUUID, fixedAlignENUM, searchListByFieldType, t, tableColumnWidthEnum, tagEnum } from "@gct-paas/core";
|
|
4
5
|
import "@gct-paas/schema";
|
|
5
|
-
|
|
6
|
+
//#region src/schema/field/data-table-column.ts
|
|
7
|
+
var columns = {
|
|
8
|
+
props: {
|
|
9
|
+
fixedAlign: fixedAlignENUM.NONE,
|
|
10
|
+
embeddedSearch: false
|
|
11
|
+
},
|
|
12
|
+
style: {
|
|
13
|
+
columnwidthConfigure: tableColumnWidthEnum.ATUO,
|
|
14
|
+
columnwidth: 100,
|
|
15
|
+
columnFontStyleByRule: [],
|
|
16
|
+
columnBackgroundByRule: []
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var tempComponent = [];
|
|
20
|
+
function runWidget(widget) {
|
|
21
|
+
const columnWidget = merge({}, { ...widget }, columns);
|
|
22
|
+
if (widget.platform === Platform.MOBILE) {
|
|
23
|
+
/**移动端汇总字段 */
|
|
24
|
+
columnWidget.style.columnwidth = 25;
|
|
25
|
+
columnWidget.style.columnwidthConfigure = tableColumnWidthEnum.ATUO;
|
|
26
|
+
return columnWidget;
|
|
27
|
+
}
|
|
28
|
+
/** bindFieldKey 存在必然是关联模型关联字段 不需要内嵌搜索*/
|
|
29
|
+
columnWidget.props.embeddedSearch = !columnWidget.props.bindFieldKey;
|
|
30
|
+
const searchField = searchListByFieldType.includes(widget.props.fieldType);
|
|
31
|
+
if (searchField && columnWidget.props.embeddedSearch) {
|
|
32
|
+
if (!tempComponent.includes(widget.props.fieldType)) {
|
|
33
|
+
const search = createdSearchField(widget.props);
|
|
34
|
+
if (search) {
|
|
35
|
+
search.alias = t("sys.pageDesigner.embeddedSearch");
|
|
36
|
+
columnWidget.children = [search];
|
|
37
|
+
search.materialType = MaterialEnum.MaterialTableField;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
columnWidget.props.readonly = true;
|
|
41
|
+
columnWidget.props.required = false;
|
|
42
|
+
}
|
|
43
|
+
if (!searchField) {
|
|
44
|
+
columnWidget.props.readonly = true;
|
|
45
|
+
columnWidget.props.embeddedSearch = false;
|
|
46
|
+
columnWidget.props.required = false;
|
|
47
|
+
if (widget.props.fieldType === FIELD_TYPE.SERIAL) columnWidget.props.fieldReadonly = true;
|
|
48
|
+
}
|
|
49
|
+
return columnWidget;
|
|
50
|
+
}
|
|
51
|
+
function runSubtableFieldWidget(widget) {
|
|
52
|
+
return merge({}, { ...widget }, columns);
|
|
53
|
+
}
|
|
6
54
|
function webRunPropEditor(list) {
|
|
7
55
|
return [
|
|
8
56
|
...list,
|
|
@@ -218,4 +266,4 @@ function getBackgroundRule() {
|
|
|
218
266
|
};
|
|
219
267
|
}
|
|
220
268
|
//#endregion
|
|
221
|
-
export { mobileRunSubTableStyleEditor, runStyleEditor, webRunPropEditor };
|
|
269
|
+
export { mobileRunSubTableStyleEditor, runStyleEditor, runSubtableFieldWidget, runWidget, webRunPropEditor };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { runPropEditor } from "./card-list-field.mjs";
|
|
2
1
|
import { mobileRunSubTableStyleEditor, runStyleEditor, webRunPropEditor } from "./data-table-column.mjs";
|
|
2
|
+
import { runPropEditor } from "./card-list-field.mjs";
|
|
3
3
|
import { MaterialEnum, Platform, SUB_TABLE_EDIT_MODE } from "@gct-paas/core";
|
|
4
4
|
import { FieldEditorOverrideRegistry, padVTableSupportEditFieldTypes } from "@gct-paas/schema";
|
|
5
5
|
//#region src/schema/field/index.ts
|
package/es/schema/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as modalCfg from './modal/modal';
|
|
2
2
|
export { modalCfg };
|
|
3
|
+
export { beginDrag } from './begin-drag/begin-drag';
|
|
3
4
|
export * from './common-config/button-props-func';
|
|
4
5
|
export * from './common-config/common-style';
|
|
5
6
|
export * from './common-config/display-editor-config';
|
|
@@ -11,6 +12,7 @@ export * from './common-config/formItem-editor-config';
|
|
|
11
12
|
export * from './common-config/common-event-config';
|
|
12
13
|
export * from './common-config/autofill-editor-config';
|
|
13
14
|
export * from './common-config/column-editor-config';
|
|
15
|
+
export * from './field';
|
|
14
16
|
export * from './search/BaseSearch';
|
|
15
17
|
export * from './search/BaseDate';
|
|
16
|
-
export * from './
|
|
18
|
+
export * from './utils';
|
package/es/schema/index.mjs
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import "./modal/modal.mjs";
|
|
2
|
+
import "./utils.mjs";
|
|
3
|
+
import "./common-config/column-editor-config.mjs";
|
|
4
|
+
import "./begin-drag/begin-drag.mjs";
|
|
2
5
|
import "./common-config/button-props-func.mjs";
|
|
3
6
|
import "./common-config/common-style.mjs";
|
|
4
7
|
import "./common-config/display-editor-config.mjs";
|
|
@@ -9,7 +12,6 @@ import "./common-config/button-editor-config.mjs";
|
|
|
9
12
|
import "./common-config/formItem-editor-config.mjs";
|
|
10
13
|
import "./common-config/common-event-config.mjs";
|
|
11
14
|
import "./common-config/autofill-editor-config.mjs";
|
|
12
|
-
import "./
|
|
15
|
+
import "./field/index.mjs";
|
|
13
16
|
import "./search/BaseSearch.mjs";
|
|
14
17
|
import "./search/BaseDate.mjs";
|
|
15
|
-
import "./field/index.mjs";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LowCodeWidget } from '@gct-paas/schema';
|
|
2
|
+
/**
|
|
3
|
+
* 创建搜索字段组件
|
|
4
|
+
* @param data
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function createdSearchField(data: IObject): LowCodeWidget.SearchSchema;
|
|
8
|
+
export declare function changeCmpData(widget: LowCodeWidget.BasicSchema): void;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { designRegister } from "../utils/design-view/index.mjs";
|
|
2
|
+
import "../utils/index.mjs";
|
|
3
|
+
import { cloneDeep, difference, merge, pick, without } from "lodash-es";
|
|
4
|
+
import { FIELD_TYPE, FieldIconMap, buildShortUUID, t, transformBindCmp2CmpType } from "@gct-paas/core";
|
|
5
|
+
import { basicSearchAttrsUtils, transformField2SearchComponent, transformI18n } from "@gct-paas/schema";
|
|
6
|
+
//#region src/schema/utils.ts
|
|
7
|
+
/**
|
|
8
|
+
* 创建搜索字段组件
|
|
9
|
+
* @param data
|
|
10
|
+
* @returns
|
|
11
|
+
*/
|
|
12
|
+
function createdSearchField(data) {
|
|
13
|
+
const { field, fieldId, fieldName, fieldCodeChain, fieldType: comType, label, bindModelKey, modelKey, returnType, type, preLocation, isFieldModel, platform } = data;
|
|
14
|
+
const basic = {
|
|
15
|
+
id: buildShortUUID(comType),
|
|
16
|
+
name: `sys.pageDesigner.fieldCmp.${type || comType}`,
|
|
17
|
+
icon: FieldIconMap[type || comType],
|
|
18
|
+
isSearchField: true,
|
|
19
|
+
preLocation,
|
|
20
|
+
platform
|
|
21
|
+
};
|
|
22
|
+
const fieldType = [FIELD_TYPE.AGG, FIELD_TYPE.EXPRESSION].includes(comType) ? returnType : comType;
|
|
23
|
+
data.fieldType = fieldType;
|
|
24
|
+
const { searchCmpKey, attrsTransform } = transformField2SearchComponent(fieldType) || {};
|
|
25
|
+
if (!searchCmpKey) return;
|
|
26
|
+
const searchCmp = cloneDeep(designRegister.value.getProvider(searchCmpKey)?.schema);
|
|
27
|
+
const otherAttrs = Object.fromEntries(attrsTransform.concat([...basicSearchAttrsUtils.ope]).map((row) => {
|
|
28
|
+
const value = data[row.from];
|
|
29
|
+
return [row.to, row.transform ? row.transform(value) : value];
|
|
30
|
+
}));
|
|
31
|
+
merge(searchCmp.props, {
|
|
32
|
+
field,
|
|
33
|
+
fieldId,
|
|
34
|
+
fieldType,
|
|
35
|
+
fieldName,
|
|
36
|
+
fieldCodeChain,
|
|
37
|
+
label,
|
|
38
|
+
modelKey,
|
|
39
|
+
bindModelKey,
|
|
40
|
+
disabled: false,
|
|
41
|
+
readonly: false,
|
|
42
|
+
modeldata: {
|
|
43
|
+
modelCategory: data.modelCategory,
|
|
44
|
+
modelType: data.modelType
|
|
45
|
+
},
|
|
46
|
+
isFieldModel,
|
|
47
|
+
...otherAttrs
|
|
48
|
+
}, searchCmp.props.placeholder && { placeholder: t(searchCmp.props.placeholder) });
|
|
49
|
+
if (isFieldModel && fieldCodeChain) searchCmp.props.fieldSearchKey = [...JSON.parse(fieldCodeChain)?.fieldLink || [], field].join("$");
|
|
50
|
+
return merge(searchCmp, basic);
|
|
51
|
+
}
|
|
52
|
+
function changeCmpData(widget) {
|
|
53
|
+
const cmpType = transformBindCmp2CmpType[widget.props.bindCompStyleType];
|
|
54
|
+
const cmp = cloneDeep(designRegister.value.getProvider(cmpType)?.schema);
|
|
55
|
+
const sourceWidgetPropsAttrs = Object.keys(widget.props);
|
|
56
|
+
const nowWidgetPropsAttrs = Object.keys(cmp.props);
|
|
57
|
+
const commonAttrs = [
|
|
58
|
+
"field",
|
|
59
|
+
"fieldId",
|
|
60
|
+
"fieldType",
|
|
61
|
+
"fieldName",
|
|
62
|
+
"fieldCodeChain",
|
|
63
|
+
"bindFieldKey"
|
|
64
|
+
];
|
|
65
|
+
const addAttrs = difference(nowWidgetPropsAttrs, sourceWidgetPropsAttrs);
|
|
66
|
+
const delAttrs = without(difference(sourceWidgetPropsAttrs, nowWidgetPropsAttrs), ...commonAttrs);
|
|
67
|
+
widget.type = cmp.type;
|
|
68
|
+
delAttrs.forEach((attr) => {
|
|
69
|
+
delete widget.props[attr];
|
|
70
|
+
});
|
|
71
|
+
const addRes = pick(cmp.props, addAttrs);
|
|
72
|
+
merge(widget.props, addRes);
|
|
73
|
+
transformI18n(widget.props);
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { changeCmpData, createdSearchField };
|
|
@@ -15,7 +15,7 @@ export declare class DesignPluginPgkUtil extends PluginPgkUtil {
|
|
|
15
15
|
* @param {Platform} platform
|
|
16
16
|
* @returns {*} {Promise<LoadPluginResult>}
|
|
17
17
|
*/
|
|
18
|
-
static loadDesignPlugin(_app: App,
|
|
18
|
+
static loadDesignPlugin(_app: App, _platform: Platform, _kit?: string[]): Promise<LoadPluginResult>;
|
|
19
19
|
/**
|
|
20
20
|
* 加载设计态中,已经被从配置中移除的插件
|
|
21
21
|
*
|
|
@@ -15,35 +15,7 @@ var DesignPluginPgkUtil = class extends PluginPgkUtil {
|
|
|
15
15
|
* @param {Platform} platform
|
|
16
16
|
* @returns {*} {Promise<LoadPluginResult>}
|
|
17
17
|
*/
|
|
18
|
-
static async loadDesignPlugin(_app,
|
|
19
|
-
try {
|
|
20
|
-
const result = await this.loadPlugin(PluginModeEnum.DESIGN, platform, kit);
|
|
21
|
-
const [configs, moduleMap] = result;
|
|
22
|
-
configs.forEach((config) => {
|
|
23
|
-
config.plugins.forEach((plugin) => {
|
|
24
|
-
const module = moduleMap[plugin.key];
|
|
25
|
-
if (!module) {
|
|
26
|
-
console.error(`${plugin.key} 插件加载失败,请检查插件配置是否正确`);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
switch (platform) {
|
|
30
|
-
case Platform.MOBILE:
|
|
31
|
-
if (module.mobile) _gct.register.designer.mobile.register(plugin.key, () => new module.mobile());
|
|
32
|
-
break;
|
|
33
|
-
case Platform.PAD:
|
|
34
|
-
if (module.mobile) _gct.register.designer.pad.register(plugin.key, () => new module.mobile());
|
|
35
|
-
break;
|
|
36
|
-
case Platform.WEB:
|
|
37
|
-
if (module.web) _gct.register.designer.web.register(plugin.key, () => new module.web());
|
|
38
|
-
break;
|
|
39
|
-
default: console.warn(`未知平台 ${platform},无法注册插件 ${plugin.key}`);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
return result;
|
|
44
|
-
} catch (error) {
|
|
45
|
-
console.error(error);
|
|
46
|
-
}
|
|
18
|
+
static async loadDesignPlugin(_app, _platform, _kit = []) {
|
|
47
19
|
return [[], {}];
|
|
48
20
|
}
|
|
49
21
|
/**
|
package/es/utils/index.d.ts
CHANGED
package/es/utils/index.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
+
import "./design-interceptors/design-interceptors.mjs";
|
|
1
2
|
import "./design-view/index.mjs";
|
|
2
3
|
import "./field-attrs/basicAttrs.mjs";
|
|
3
4
|
import "./field-attrs/index.mjs";
|
|
4
|
-
import "./begin-drag/begin-drag.mjs";
|
|
5
|
-
import "./design-interceptors/design-interceptors.mjs";
|
|
6
5
|
import "./field-filter/index.mjs";
|
|
7
6
|
import "./formula-editor-design/formula-editor-design.mjs";
|
|
8
7
|
import "./find-deep-types/find-deep-types.mjs";
|
|
@@ -10,4 +9,5 @@ import "./init-widget-info/init-widget-info.mjs";
|
|
|
10
9
|
import "./design-plugin-pkg-util/design-plugin-pkg-util.mjs";
|
|
11
10
|
import "./schema/index.mjs";
|
|
12
11
|
import "./transform-js/transform-js.mjs";
|
|
12
|
+
import "./transform-js/index.mjs";
|
|
13
13
|
import "./flatten.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./transform-js.mjs";
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
import { ExportMethod } from '@gct-paas/schema';
|
|
1
2
|
/**
|
|
2
|
-
* 将 TypeScript/ES 代码编译为可在运行时执行的 JS
|
|
3
|
-
* @param code - 源代码字符串(支持 TS
|
|
3
|
+
* 将 TypeScript/ES 代码编译为可在运行时执行的 JS 字符串
|
|
4
|
+
* @param code - 源代码字符串(支持 TS 语法,可为 URI 编码)
|
|
4
5
|
* @param needExport - 是否在末尾追加 `return exports`,默认为 true
|
|
5
|
-
* @returns 编译后可执行的 JS
|
|
6
|
+
* @returns 编译后可执行的 JS 字符串
|
|
6
7
|
*/
|
|
7
|
-
export declare function buildRunJs(code: string, needExport?: boolean): Promise<string
|
|
8
|
+
export declare function buildRunJs(code: string, needExport?: boolean): Promise<string>;
|
|
8
9
|
/**
|
|
9
|
-
*
|
|
10
|
+
* 解析代码字符串并提取所有命名导出函数的方法映射
|
|
10
11
|
* @param code - 包含命名导出函数的代码字符串
|
|
11
12
|
* @returns 以函数名为键的方法映射对象,解析失败时返回空对象
|
|
12
13
|
*/
|
|
13
|
-
export declare function initMethodMap(code: string): Promise<
|
|
14
|
+
export declare function initMethodMap(code: string): Promise<ExportMethod>;
|