@gct-paas/design 0.1.6-dev.13 → 0.1.6-dev.15
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/loader.esm.min.js +2 -2
- package/es/components/user-occupy/useUserOccupy.mjs +2 -2
- package/es/constant/page-designer.d.ts +5 -18
- package/es/constant/page-designer.mjs +2 -17
- package/es/hooks/index.d.ts +0 -1
- package/es/hooks/index.mjs +0 -1
- package/es/index.mjs +2 -3
- package/es/locale/sys/component.d.ts +4 -4
- package/es/locale/sys/pageDesigner.d.ts +5 -5
- package/package.json +9 -9
- package/es/hooks/develop/useKeyParser.d.ts +0 -16
- package/es/hooks/develop/useKeyParser.mjs +0 -79
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PageTypeEnum
|
|
1
|
+
import { PageTypeEnum } from "../../constant/page-designer.mjs";
|
|
2
2
|
import "../../constant/index.mjs";
|
|
3
3
|
import "../../hooks/design-view/page/usePage.mjs";
|
|
4
4
|
import "../../hooks/index.mjs";
|
|
5
5
|
import { OCCUPY_MQTT_KEY } from "./occupy.const.mjs";
|
|
6
6
|
import { throttle } from "lodash-es";
|
|
7
|
-
import { t } from "@gct-paas/core";
|
|
7
|
+
import { ScriptTypeEnum, t } from "@gct-paas/core";
|
|
8
8
|
import { computed, createVNode, ref } from "vue";
|
|
9
9
|
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
|
10
10
|
import { Modal } from "ant-design-vue";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormDesignEnum, PrintTypeEnum } from '@gct-paas/core';
|
|
1
|
+
import { FormDesignEnum, PrintTypeEnum, ProcessTypeEnum, ScriptTypeEnum } from '@gct-paas/core';
|
|
2
2
|
export declare enum MenuClickEvent {
|
|
3
3
|
NEW = "new",
|
|
4
4
|
EDIT = "edit",
|
|
@@ -28,24 +28,15 @@ export declare enum PageTypeEnum {
|
|
|
28
28
|
/** 统计 */
|
|
29
29
|
STATISTICS = 8
|
|
30
30
|
}
|
|
31
|
-
export declare enum ScriptTypeEnum {
|
|
32
|
-
/** 公共方法 */
|
|
33
|
-
GLOBAL_METHOD = "global_method_module",
|
|
34
|
-
/** 脚本 */
|
|
35
|
-
DEFAULT = "script_module",
|
|
36
|
-
/** 编排 */
|
|
37
|
-
ORCHESTRATION = "so_module"
|
|
38
|
-
}
|
|
39
|
-
export declare enum ProcessTypeEnum {
|
|
40
|
-
/** 业务流 */
|
|
41
|
-
/** 审批流 */
|
|
42
|
-
APPROVAL = "approval_process_module"
|
|
43
|
-
}
|
|
44
31
|
export declare const CategoryEnum: {
|
|
32
|
+
GLOBAL_METHOD: ScriptTypeEnum.GLOBAL_METHOD;
|
|
33
|
+
DEFAULT: ScriptTypeEnum.DEFAULT;
|
|
34
|
+
ORCHESTRATION: ScriptTypeEnum.ORCHESTRATION;
|
|
45
35
|
ONLINE_FORM: FormDesignEnum.ONLINE_FORM;
|
|
46
36
|
EDHR: FormDesignEnum.EDHR;
|
|
47
37
|
LABEL: PrintTypeEnum.LABEL;
|
|
48
38
|
RECEIPT: PrintTypeEnum.RECEIPT;
|
|
39
|
+
APPROVAL: ProcessTypeEnum.APPROVAL;
|
|
49
40
|
ENTITY: ModelTypeEnum.ENTITY;
|
|
50
41
|
ENUM: ModelTypeEnum.ENUM;
|
|
51
42
|
VIRTUAL: ModelTypeEnum.VIRTUAL;
|
|
@@ -56,9 +47,5 @@ export declare const CategoryEnum: {
|
|
|
56
47
|
MOBILE: PageTypeEnum.MOBILE;
|
|
57
48
|
PAD: PageTypeEnum.PAD;
|
|
58
49
|
STATISTICS: PageTypeEnum.STATISTICS;
|
|
59
|
-
GLOBAL_METHOD: ScriptTypeEnum.GLOBAL_METHOD;
|
|
60
|
-
DEFAULT: ScriptTypeEnum.DEFAULT;
|
|
61
|
-
ORCHESTRATION: ScriptTypeEnum.ORCHESTRATION;
|
|
62
|
-
APPROVAL: ProcessTypeEnum.APPROVAL;
|
|
63
50
|
};
|
|
64
51
|
export type CategoryType = ModelTypeEnum | PageTypeEnum | ScriptTypeEnum | PrintTypeEnum | ProcessTypeEnum;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormDesignEnum, PrintTypeEnum } from "@gct-paas/core";
|
|
1
|
+
import { FormDesignEnum, PrintTypeEnum, ProcessTypeEnum, ScriptTypeEnum } from "@gct-paas/core";
|
|
2
2
|
//#region src/constant/page-designer.ts
|
|
3
3
|
var MenuClickEvent = /* @__PURE__ */ function(MenuClickEvent) {
|
|
4
4
|
MenuClickEvent["NEW"] = "new";
|
|
@@ -32,21 +32,6 @@ var PageTypeEnum = /* @__PURE__ */ function(PageTypeEnum) {
|
|
|
32
32
|
PageTypeEnum[PageTypeEnum["STATISTICS"] = 8] = "STATISTICS";
|
|
33
33
|
return PageTypeEnum;
|
|
34
34
|
}({});
|
|
35
|
-
var ScriptTypeEnum = /* @__PURE__ */ function(ScriptTypeEnum) {
|
|
36
|
-
/** 公共方法 */
|
|
37
|
-
ScriptTypeEnum["GLOBAL_METHOD"] = "global_method_module";
|
|
38
|
-
/** 脚本 */
|
|
39
|
-
ScriptTypeEnum["DEFAULT"] = "script_module";
|
|
40
|
-
/** 编排 */
|
|
41
|
-
ScriptTypeEnum["ORCHESTRATION"] = "so_module";
|
|
42
|
-
return ScriptTypeEnum;
|
|
43
|
-
}({});
|
|
44
|
-
var ProcessTypeEnum = /* @__PURE__ */ function(ProcessTypeEnum) {
|
|
45
|
-
/** 业务流 */
|
|
46
|
-
/** 审批流 */
|
|
47
|
-
ProcessTypeEnum["APPROVAL"] = "approval_process_module";
|
|
48
|
-
return ProcessTypeEnum;
|
|
49
|
-
}({});
|
|
50
35
|
var CategoryEnum = {
|
|
51
36
|
...ModelTypeEnum,
|
|
52
37
|
...PageTypeEnum,
|
|
@@ -56,4 +41,4 @@ var CategoryEnum = {
|
|
|
56
41
|
...FormDesignEnum
|
|
57
42
|
};
|
|
58
43
|
//#endregion
|
|
59
|
-
export { CategoryEnum, MenuClickEvent, ModelTypeEnum, PageTypeEnum
|
|
44
|
+
export { CategoryEnum, MenuClickEvent, ModelTypeEnum, PageTypeEnum };
|
package/es/hooks/index.d.ts
CHANGED
|
@@ -19,7 +19,6 @@ export * from './design-view/layout/useScope';
|
|
|
19
19
|
export * from './design-view/layout/useToolkit';
|
|
20
20
|
export * from './design-view/utils/field-schema.util';
|
|
21
21
|
export * from './develop/useCacheHistory';
|
|
22
|
-
export * from './develop/useKeyParser';
|
|
23
22
|
export * from './use-model-field/use-model-field';
|
|
24
23
|
export * from './use-design-view-controller/use-design-view-controller';
|
|
25
24
|
export * from './widgets/useAsyncFields';
|
package/es/hooks/index.mjs
CHANGED
|
@@ -21,7 +21,6 @@ import "./design-view/constants/style-editor.const.mjs";
|
|
|
21
21
|
import "./design-view/editor/useStyleEditor.mjs";
|
|
22
22
|
import "./design-view/editor/useStyle.mjs";
|
|
23
23
|
import "./design-view/utils/field-schema.util.mjs";
|
|
24
|
-
import "./develop/useKeyParser.mjs";
|
|
25
24
|
import "./use-model-field/use-model-field.mjs";
|
|
26
25
|
import "./designer.hooks.mjs";
|
|
27
26
|
import "./use-design-view-controller/use-design-view-controller.mjs";
|
package/es/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DesignerRegister } from "./register/designer-register/designer-register.mjs";
|
|
2
2
|
import { DesignEditorType } from "./constant/design-editor-type.mjs";
|
|
3
|
-
import { CategoryEnum, MenuClickEvent, ModelTypeEnum, PageTypeEnum
|
|
3
|
+
import { CategoryEnum, MenuClickEvent, ModelTypeEnum, PageTypeEnum } from "./constant/page-designer.mjs";
|
|
4
4
|
import { ControllerType, DesignItemActionTag, DesignItemAttribute, DesignNodePrefix, DesignNodeType, DesignViewPrefix, InsertNodeMode, MaterialGroup } from "./constant/index.mjs";
|
|
5
5
|
import { MaterialRegister } from "./register/material/material.register.mjs";
|
|
6
6
|
import { NodeRegister } from "./register/node/node.register.mjs";
|
|
@@ -62,7 +62,6 @@ import { BTN_TYPE_COLOR, PRESET_COLOR } from "./hooks/design-view/constants/styl
|
|
|
62
62
|
import { styleEditorProps, useStyleEditor } from "./hooks/design-view/editor/useStyleEditor.mjs";
|
|
63
63
|
import { propsToStyle, schemaToStyle, useStyle } from "./hooks/design-view/editor/useStyle.mjs";
|
|
64
64
|
import { FieldSchema, initFieldWidgetRuntime } from "./hooks/design-view/utils/field-schema.util.mjs";
|
|
65
|
-
import { useKeyParser } from "./hooks/develop/useKeyParser.mjs";
|
|
66
65
|
import { useModelField } from "./hooks/use-model-field/use-model-field.mjs";
|
|
67
66
|
import { useDesignViewStore } from "./store/view/design-view.store.mjs";
|
|
68
67
|
import "./store/index.mjs";
|
|
@@ -110,4 +109,4 @@ function onInit() {
|
|
|
110
109
|
}
|
|
111
110
|
onInit();
|
|
112
111
|
//#endregion
|
|
113
|
-
export { BaseDate, BaseSearch, CategoryEnum, ControllerType, DesignContainerNode, DesignContent, DesignEditorNode, DesignEditorNodeProvider, DesignEditorType, DesignItemActionTag, DesignItemAttribute, DesignItemPreview, DesignNode, DesignNodePrefix, DesignNodeType, DesignPluginPgkUtil, DesignSaveTip, DesignStepCheck, DesignViewController, DesignViewHooks, DesignViewLayout, DesignViewPrefix, DesignerRegister, FieldCascader_default as FieldCascader, FieldOverrideUtil, FieldSchema, InsertNodeMode, MaterialContent, MaterialGroup, MaterialRegister, MenuClickEvent, ModalNameEditor, ModelTypeEnum, multi_field_display_default as MultiFieldDisplay, NodeBaseProvider, NodeRegister, NotMask, PageTypeEnum, PanelContent,
|
|
112
|
+
export { BaseDate, BaseSearch, CategoryEnum, ControllerType, DesignContainerNode, DesignContent, DesignEditorNode, DesignEditorNodeProvider, DesignEditorType, DesignItemActionTag, DesignItemAttribute, DesignItemPreview, DesignNode, DesignNodePrefix, DesignNodeType, DesignPluginPgkUtil, DesignSaveTip, DesignStepCheck, DesignViewController, DesignViewHooks, DesignViewLayout, DesignViewPrefix, DesignerRegister, FieldCascader_default as FieldCascader, FieldOverrideUtil, FieldSchema, InsertNodeMode, MaterialContent, MaterialGroup, MaterialRegister, MenuClickEvent, ModalNameEditor, ModelTypeEnum, multi_field_display_default as MultiFieldDisplay, NodeBaseProvider, NodeRegister, NotMask, PageTypeEnum, PanelContent, PropsEditorRegister, SCREditorUtils, user_lock_default as UserLock, user_occupy_default as UserOccupy, asyncIdentify, 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, isCanCrop, 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, useDesignViewController, useDesignViewStore, useDesigner, useDesignerController, useFieldTransfer, useGlobal, useModelField, usePage, usePageOccupy, usePropEditor, useScope, useSelectedWidget, useStyle, useStyleEditor, useToolkit, useUserOccupy, useWidget, useWidgetQuery, useWidgetRegistry, validatorEditor, wfNodesModalId, wfNodesModalState, widgetInfo, widgetProps, widgetWrapperProps, workflowModalId, workflowModalState };
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
fieldTransfer: {
|
|
3
3
|
defaultModalTitle: string;
|
|
4
|
-
linkModel: string;
|
|
5
|
-
subMainModel: string;
|
|
6
|
-
currentModel: string;
|
|
7
|
-
soModelTitle: string;
|
|
8
4
|
noSelect: string;
|
|
9
5
|
select: string;
|
|
10
6
|
noSearchData: string;
|
|
@@ -13,6 +9,10 @@ declare const _default: {
|
|
|
13
9
|
pleaseSearch: string;
|
|
14
10
|
selectAllData: string;
|
|
15
11
|
invertCurrentPage: string;
|
|
12
|
+
linkModel: string;
|
|
13
|
+
subMainModel: string;
|
|
14
|
+
currentModel: string;
|
|
15
|
+
soModelTitle: string;
|
|
16
16
|
move: string;
|
|
17
17
|
};
|
|
18
18
|
};
|
|
@@ -10,16 +10,16 @@ declare const _default: {
|
|
|
10
10
|
prop: string;
|
|
11
11
|
defaultValue: string;
|
|
12
12
|
codeError: string;
|
|
13
|
-
topBorder: string;
|
|
14
|
-
leftBorder: string;
|
|
15
|
-
bottomBorder: string;
|
|
16
|
-
rightBorder: string;
|
|
17
|
-
whole: string;
|
|
18
13
|
upLeft: string;
|
|
19
14
|
upRight: string;
|
|
20
15
|
downLeft: string;
|
|
21
16
|
downRight: string;
|
|
17
|
+
whole: string;
|
|
22
18
|
radius: string;
|
|
19
|
+
topBorder: string;
|
|
20
|
+
leftBorder: string;
|
|
21
|
+
bottomBorder: string;
|
|
22
|
+
rightBorder: string;
|
|
23
23
|
bold: string;
|
|
24
24
|
italic: string;
|
|
25
25
|
underline: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gct-paas/design",
|
|
3
|
-
"version": "0.1.6-dev.
|
|
3
|
+
"version": "0.1.6-dev.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "paas 平台设计界面底包",
|
|
6
6
|
"loader": "dist/loader.esm.min.js",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"react-dnd-html5-backend": "^16.0.1",
|
|
52
52
|
"vue": "^3.5.30",
|
|
53
53
|
"vue3-dnd": "^2.1.0",
|
|
54
|
-
"@gct-paas/core": "0.1.6-dev.
|
|
55
|
-
"@gct-paas/core-web": "0.1.6-dev.
|
|
56
|
-
"@gct-paas/schema": "0.1.6-dev.
|
|
57
|
-
"@gct-paas/scss": "0.1.6-dev.
|
|
54
|
+
"@gct-paas/core": "0.1.6-dev.15",
|
|
55
|
+
"@gct-paas/core-web": "0.1.6-dev.15",
|
|
56
|
+
"@gct-paas/schema": "0.1.6-dev.15",
|
|
57
|
+
"@gct-paas/scss": "0.1.6-dev.15"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/babel__core": "^7.20.5",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@gct-paas/api": "^0.1.6-dev.11",
|
|
66
66
|
"vue": ">=3",
|
|
67
|
-
"@gct-paas/core": "0.1.6-dev.
|
|
68
|
-
"@gct-paas/core-web": "0.1.6-dev.
|
|
69
|
-
"@gct-paas/scss": "0.1.6-dev.
|
|
70
|
-
"@gct-paas/schema": "0.1.6-dev.
|
|
67
|
+
"@gct-paas/core": "0.1.6-dev.15",
|
|
68
|
+
"@gct-paas/core-web": "0.1.6-dev.15",
|
|
69
|
+
"@gct-paas/scss": "0.1.6-dev.15",
|
|
70
|
+
"@gct-paas/schema": "0.1.6-dev.15"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"dev": "cross-env NODE_ENV=development vite build --watch --config vite.dev.config.ts",
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* key值转换器
|
|
4
|
-
* @param prefix 前缀
|
|
5
|
-
* @param suffix 后缀 仅空字符串代表不需要后缀
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
export declare function useKeyParser(prefix: Ref<string | undefined> | string, suffix?: Ref<string | undefined> | string): {
|
|
9
|
-
keyPrefix: Ref<string, string>;
|
|
10
|
-
keySuffix: Ref<string, string>;
|
|
11
|
-
keyReset: () => void;
|
|
12
|
-
keyPad: (key: string) => string | undefined;
|
|
13
|
-
keyClip: (formKey: string) => string;
|
|
14
|
-
keyPrePad: (key: string) => string | undefined;
|
|
15
|
-
keyPreClip: (formKey: string) => string;
|
|
16
|
-
};
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { ProjectName } from "@gct-paas/core";
|
|
2
|
-
import { isRef, ref, unref, watch } from "vue";
|
|
3
|
-
//#region src/hooks/develop/useKeyParser.ts
|
|
4
|
-
var SourceTypeEnum = /* @__PURE__ */ function(SourceTypeEnum) {
|
|
5
|
-
SourceTypeEnum["SELF_BUILT"] = "SELF_BUILT";
|
|
6
|
-
SourceTypeEnum["IMPORT"] = "IMPORT";
|
|
7
|
-
return SourceTypeEnum;
|
|
8
|
-
}(SourceTypeEnum || {});
|
|
9
|
-
/**
|
|
10
|
-
* key值转换器
|
|
11
|
-
* @param prefix 前缀
|
|
12
|
-
* @param suffix 后缀 仅空字符串代表不需要后缀
|
|
13
|
-
* @returns
|
|
14
|
-
*/
|
|
15
|
-
function useKeyParser(prefix, suffix) {
|
|
16
|
-
const hasDollar = ref(false);
|
|
17
|
-
const upperCase = ref(false);
|
|
18
|
-
const keyPrefix = ref("");
|
|
19
|
-
const keySuffix = ref("");
|
|
20
|
-
const branchId = _gct.store.context.bid || "";
|
|
21
|
-
function keyReset() {
|
|
22
|
-
const prefixString = unref(prefix);
|
|
23
|
-
const suffixString = unref(suffix);
|
|
24
|
-
if (!prefixString) return;
|
|
25
|
-
hasDollar.value = prefixString.startsWith("$");
|
|
26
|
-
upperCase.value = /\$?[A-Z]+_/.test(prefixString);
|
|
27
|
-
keyPrefix.value = (hasDollar.value ? "$" : "") + (_gct.store.appInfo.sourceType === SourceTypeEnum.IMPORT ? upperCase.value ? "I" : "i" : "") + (hasDollar.value ? prefixString.substring(1) : prefixString) + (prefixString.endsWith("_") ? "" : "_");
|
|
28
|
-
keySuffix.value = suffixString === "" ? "" : _gct.store.projectName === ProjectName.WEB_RENDER ? "" : branchId ? "_" + (upperCase.value ? branchId.toUpperCase() : branchId) : "";
|
|
29
|
-
}
|
|
30
|
-
keyReset();
|
|
31
|
-
if (isRef(prefix)) watch(prefix, () => {
|
|
32
|
-
keyReset();
|
|
33
|
-
});
|
|
34
|
-
if (isRef(suffix)) watch(suffix, () => {
|
|
35
|
-
keyReset();
|
|
36
|
-
});
|
|
37
|
-
/**
|
|
38
|
-
* 补全key信息 包含 导入信息 模块信息 分支信息
|
|
39
|
-
* @param key
|
|
40
|
-
* @returns
|
|
41
|
-
*/
|
|
42
|
-
function keyPad(key) {
|
|
43
|
-
if (!key) return;
|
|
44
|
-
return `${keyPrefix.value}${key}${keySuffix.value}`;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* 裁剪key
|
|
48
|
-
* @param key
|
|
49
|
-
*/
|
|
50
|
-
function keyClip(formKey) {
|
|
51
|
-
const id = unref(prefix).match(/\$?(([a-zA-Z]+_)*[a-zA-Z]+)_?/)[1];
|
|
52
|
-
const prefixPos = formKey.indexOf(id) + id.length;
|
|
53
|
-
const suffixPos = !keySuffix.value || unref(suffix) === "" ? formKey.length : formKey.lastIndexOf("_");
|
|
54
|
-
keyPrefix.value = formKey.substring(0, prefixPos + 1);
|
|
55
|
-
keySuffix.value = formKey.substring(suffixPos);
|
|
56
|
-
return formKey.substring(prefixPos + 1, suffixPos);
|
|
57
|
-
}
|
|
58
|
-
function keyPreClip(formKey) {
|
|
59
|
-
const id = unref(prefix).match(/\$?(([a-zA-Z]+_)*[a-zA-Z]+)_?/)[1];
|
|
60
|
-
const prefixPos = formKey.indexOf(id) + id.length;
|
|
61
|
-
keyPrefix.value = formKey.substring(0, prefixPos + 1);
|
|
62
|
-
return formKey.substring(prefixPos + 1);
|
|
63
|
-
}
|
|
64
|
-
function keyPrePad(key) {
|
|
65
|
-
if (!key) return;
|
|
66
|
-
return `${keyPrefix.value}${key}`;
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
keyPrefix,
|
|
70
|
-
keySuffix,
|
|
71
|
-
keyReset,
|
|
72
|
-
keyPad,
|
|
73
|
-
keyClip,
|
|
74
|
-
keyPrePad,
|
|
75
|
-
keyPreClip
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
//#endregion
|
|
79
|
-
export { useKeyParser };
|