@gct-paas/core 0.1.4-dev.8 → 0.1.4-dev.9

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.
Files changed (86) hide show
  1. package/dist/index.esm.min.mjs +3865 -1995
  2. package/dist/index.min.cjs +383 -11
  3. package/dist/index.system.min.js +383 -11
  4. package/es/constants/expression-type/BuiltOperators.d.ts +20 -0
  5. package/es/constants/expression-type/BuiltOperators.mjs +148 -0
  6. package/es/constants/expression-type/FunctionKeys.d.ts +1 -0
  7. package/es/constants/expression-type/FunctionKeys.mjs +81 -0
  8. package/es/constants/expression-type/editor.d.ts +8 -0
  9. package/es/constants/expression-type/editor.mjs +4 -0
  10. package/es/constants/expression-type/function.d.ts +7 -0
  11. package/es/constants/expression-type/function.mjs +875 -0
  12. package/es/constants/expression-type/index.d.ts +42 -0
  13. package/es/constants/expression-type/index.mjs +120 -0
  14. package/es/constants/expression-type/modeCfg.d.ts +30 -0
  15. package/es/constants/expression-type/modeCfg.mjs +268 -0
  16. package/es/constants/expression-type/variable.d.ts +12 -0
  17. package/es/constants/expression-type/variable.mjs +42 -0
  18. package/es/constants/index.d.ts +1 -0
  19. package/es/constants/index.mjs +5 -0
  20. package/es/create-app-vue.mjs +3 -10
  21. package/es/enums/appEnum.d.ts +5 -0
  22. package/es/enums/appEnum.mjs +6 -1
  23. package/es/enums/designEnum.d.ts +2 -2
  24. package/es/enums/designEnum.mjs +31 -31
  25. package/es/enums/developer-center/index.d.ts +1 -0
  26. package/es/enums/developer-center/integration.d.ts +4 -0
  27. package/es/enums/developer-center/integration.mjs +7 -0
  28. package/es/enums/expressionEnum.d.ts +130 -0
  29. package/es/enums/expressionEnum.mjs +75 -0
  30. package/es/enums/index.d.ts +11 -5
  31. package/es/enums/index.mjs +6 -8
  32. package/es/enums/page-designer/designer.d.ts +6 -0
  33. package/es/enums/page-designer/designer.mjs +6 -1
  34. package/es/enums/page-designer/panel.d.ts +78 -7
  35. package/es/enums/page-designer/panel.mjs +22 -3
  36. package/es/enums/processEnum.d.ts +54 -0
  37. package/es/enums/processEnum.mjs +36 -1
  38. package/es/global/gct/gct.d.ts +9 -13
  39. package/es/global/gct/gct.mjs +15 -20
  40. package/es/hooks/index.d.ts +0 -1
  41. package/es/hooks/use-overlay-scrollbars/use-overlay-scrollbars.d.ts +11 -0
  42. package/es/index.d.ts +1 -7
  43. package/es/index.mjs +26 -11
  44. package/es/interface/index.d.ts +1 -4
  45. package/es/interface/open-util/i-message-util/i-message-util.d.ts +54 -0
  46. package/es/interface/{i-modal → open-util/i-modal}/i-modal.d.ts +9 -10
  47. package/es/interface/{i-modal-data → open-util/i-modal-data}/i-modal-data.d.ts +6 -0
  48. package/es/interface/open-util/i-modal-options/i-modal-options.d.ts +12 -0
  49. package/es/interface/open-util/i-overlay-container/i-overlay-container.d.ts +36 -0
  50. package/es/interface/open-util/i-overlay-controller/i-overlay-controller.d.ts +36 -0
  51. package/es/interface/open-util/index.d.ts +7 -0
  52. package/es/locale/index.mjs +1 -0
  53. package/es/modules/user-stores/store/user.store.mjs +9 -2
  54. package/es/register/index.d.ts +0 -7
  55. package/es/setup-app.d.ts +8 -0
  56. package/es/setup-app.mjs +30 -0
  57. package/es/store/global-store.mjs +9 -3
  58. package/es/types/index.d.ts +4 -0
  59. package/es/utils/axios/interceptors.mjs +0 -1
  60. package/es/utils/cache-adapter/cache-adapter.d.ts +2 -0
  61. package/es/utils/cache-adapter/cache-adapter.mjs +59 -0
  62. package/es/utils/index.d.ts +6 -1
  63. package/es/utils/lowcode/utils.d.ts +1 -0
  64. package/es/utils/lowcode/utils.mjs +20 -0
  65. package/es/utils/lowcode/validate.d.ts +13 -0
  66. package/es/utils/lowcode/validate.mjs +29 -0
  67. package/es/utils/namespace/namespace.d.ts +8 -0
  68. package/es/utils/namespace/namespace.mjs +4 -1
  69. package/es/utils/openUtil/index.d.ts +2 -0
  70. package/es/utils/openUtil/modal/modal.d.ts +61 -0
  71. package/es/utils/openUtil/modal/modal.mjs +80 -0
  72. package/es/utils/openUtil/overlay-container/overlay-container.d.ts +100 -0
  73. package/es/utils/openUtil/overlay-container/overlay-container.mjs +139 -0
  74. package/es/utils/tools/tools.mjs +4 -0
  75. package/es/utils/treeHelper/treeHelper.d.ts +7 -0
  76. package/es/utils/treeHelper/treeHelper.mjs +14 -0
  77. package/es/utils/uuid/uuid.d.ts +3 -0
  78. package/es/utils/uuid/uuid.mjs +48 -0
  79. package/es/utils/value-helper/value-helper.mjs +2 -0
  80. package/es/utils/width-install/width-install.mjs +4 -0
  81. package/package.json +4 -3
  82. package/es/hooks/use-namespace/use-namespace.d.ts +0 -9
  83. package/es/hooks/use-namespace/use-namespace.mjs +0 -18
  84. package/es/interface/i-message-util/i-message-util.d.ts +0 -78
  85. package/es/register/render-register/render-register.d.ts +0 -59
  86. package/es/register/render-register/render-register.mjs +0 -63
@@ -1,17 +1,21 @@
1
1
  import { GlobalStoreUtil } from '../../store/index.mjs';
2
2
  import { EditorRegister } from '../../register/editor-register/editor-register.mjs';
3
3
  import { FormItemRegister } from '../../register/form-item-register/form-item-register.mjs';
4
- import { RenderRegister } from '../../register/render-register/render-register.mjs';
4
+ import 'qs';
5
5
  import { DictionaryUtil } from '../../utils/dictionary/dictionary.mjs';
6
- import '../../utils/mitt/mitt.mjs';
7
6
  import 'lodash-es';
7
+ import '../../utils/mitt/mitt.mjs';
8
8
  import '../../enums/app-designer/index.mjs';
9
9
  import '../../enums/page-designer/designer.mjs';
10
10
  import '../../enums/breakpointEnum.mjs';
11
- import 'path-browserify';
12
- import 'qx-util';
13
- import 'qs';
11
+ import '../../constants/expression-type/modeCfg.mjs';
12
+ import '../../constants/expression-type/BuiltOperators.mjs';
13
+ import '../../constants/expression-type/function.mjs';
14
+ import '../../constants/expression-type/variable.mjs';
14
15
  import 'vue';
16
+ import 'qx-util';
17
+ import 'path-browserify';
18
+ import '../../utils/uuid/uuid.mjs';
15
19
  import 'axios';
16
20
  import '@fingerprintjs/fingerprintjs';
17
21
  import { EnvironmentManager } from '../../modules/env-manager/env-manager.mjs';
@@ -30,16 +34,6 @@ class GctGlobal {
30
34
  * @type {I18n}
31
35
  */
32
36
  i18n = this.i18nUtil.i18n;
33
- /**
34
- * i18n 实例的 t 方法,多语言转换
35
- *
36
- * @param {string} key
37
- * @param {string} [def]
38
- * @returns {*} {string}
39
- */
40
- t(key, def) {
41
- return this.i18n.global.t(key, def);
42
- }
43
37
  /**
44
38
  * 全局 store 工具类
45
39
  */
@@ -72,14 +66,15 @@ class GctGlobal {
72
66
  * 综合性注册中心
73
67
  */
74
68
  register = {
75
- render: {
76
- pad: new RenderRegister(),
77
- mobile: new RenderRegister(),
78
- web: new RenderRegister()
79
- },
80
69
  editor: new EditorRegister(),
81
70
  formItem: new FormItemRegister()
82
71
  };
72
+ /**
73
+ * 全局呈现容器控制器,这里只是声明了类型,具体实例需要由主项目根据实际情况进行实现和挂载
74
+ *
75
+ * @type {IOverlayController}
76
+ */
77
+ openUtil;
83
78
  /**
84
79
  * 异步初始化一些内容,在 createApp 之前调用
85
80
  *
@@ -2,6 +2,5 @@ export { useAppInst } from './use-app-inst/use-app-inst';
2
2
  export { useForm } from './use-form/use-form';
3
3
  export { useGctFormValue, useGctFormValueByText, } from './use-gct-form-value/use-gct-form-value';
4
4
  export { useModal } from './use-modal/use-modal';
5
- export { useNamespace } from './use-namespace/use-namespace';
6
5
  export { useIFrameProps, useWuJieBus, useWuJieProps, } from './use-sub-app-utils/use-sub-app-utils';
7
6
  export { copyTextToClipboard, isDef, useCopyToClipboard, } from './useCopyToClipboard';
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ import { OverlayScrollbars, EventListeners, PartialOptions } from 'overlayscrollbars';
3
+ /**
4
+ * OverlayScrollbars Vue 3 组合式函数
5
+ *
6
+ * @export
7
+ * @param {PartialOptions} options
8
+ * @param {EventListeners} [eventListeners]
9
+ * @return {*}
10
+ */
11
+ export declare function useOverlayScrollbars(osElRef: Ref<HTMLElement | undefined>, options: PartialOptions, eventListeners?: EventListeners): Ref<OverlayScrollbars>;
package/es/index.d.ts CHANGED
@@ -14,10 +14,4 @@ export * from './state';
14
14
  export * from './store';
15
15
  export * from './utils';
16
16
  export { createAppVue } from './create-app-vue';
17
- /**
18
- * 安装核心包,主要用于一些参数的初始化
19
- *
20
- * @export
21
- */
22
- export declare function install(): void;
23
- export default install;
17
+ export { setupApp } from './setup-app';
package/es/index.mjs CHANGED
@@ -16,12 +16,11 @@ export { FormItemBasicController, useFormItemController } from './controller/for
16
16
  export { FormHiddenItemController } from './controller/form-item-hidden/form-item-hidden.controller.mjs';
17
17
  export { LengthUnitEditorController } from './controller/editor/length-unit-editor.controller.mjs';
18
18
  export { ColorEditorController } from './controller/editor/color-editor.controller.mjs';
19
- export { GctMqttTopsEnum, ReturnTypeEnum } from './enums/index.mjs';
19
+ export { GctMqttTopsEnum, GlobalParamEnum } from './enums/index.mjs';
20
20
  export { useAppInst } from './hooks/use-app-inst/use-app-inst.mjs';
21
21
  export { useForm } from './hooks/use-form/use-form.mjs';
22
22
  export { useGctFormValue, useGctFormValueByText } from './hooks/use-gct-form-value/use-gct-form-value.mjs';
23
23
  export { useModal } from './hooks/use-modal/use-modal.mjs';
24
- export { useNamespace } from './hooks/use-namespace/use-namespace.mjs';
25
24
  export { useIFrameProps, useWuJieBus, useWuJieProps } from './hooks/use-sub-app-utils/use-sub-app-utils.mjs';
26
25
  export { copyTextToClipboard, isDef, useCopyToClipboard } from './hooks/useCopyToClipboard.mjs';
27
26
  export { LocaleUtil, setupI18n } from './locale/index.mjs';
@@ -42,7 +41,6 @@ export { useTenantStore } from './modules/user-stores/store/tenant.store.mjs';
42
41
  export { usePermissionStore } from './modules/user-stores/store/permission.store.mjs';
43
42
  export { EditorRegister } from './register/editor-register/editor-register.mjs';
44
43
  export { FormItemRegister } from './register/form-item-register/form-item-register.mjs';
45
- export { RenderRegister } from './register/render-register/render-register.mjs';
46
44
  export { GlobalPiniaState } from './state/global-pinia-state/global-pinia-state.mjs';
47
45
  export { FormState } from './state/form/form.state.mjs';
48
46
  export { FormCollapsePaneState } from './state/form-collapse-pane/form-collapse-pane.state.mjs';
@@ -54,16 +52,22 @@ export { FormGroupState } from './state/form-group/form-group.state.mjs';
54
52
  export { FormItemState } from './state/form-item/form-item.state.mjs';
55
53
  export { FormItemBasicState } from './state/form-item-basic/form-item-basic.state.mjs';
56
54
  export { GlobalStoreUtil } from './store/index.mjs';
55
+ export { gctMemoizeAsync } from './utils/cache-adapter/cache-adapter.mjs';
57
56
  export { DictionaryUtil } from './utils/dictionary/dictionary.mjs';
58
57
  export { t } from './utils/i18n/index.mjs';
59
58
  export { LinkedList } from './utils/linked-list/linked-list.mjs';
60
59
  export { LinkedNode } from './utils/linked-node/linked-node.mjs';
60
+ export { insertCustomCssToHead } from './utils/lowcode/utils.mjs';
61
+ export { buildItemRules } from './utils/lowcode/validate.mjs';
61
62
  export { mitt } from './utils/mitt/mitt.mjs';
62
63
  export { modelLoader } from './utils/model-loader/model-loader.mjs';
63
- export { Namespace } from './utils/namespace/namespace.mjs';
64
+ export { Namespace, useNamespace } from './utils/namespace/namespace.mjs';
65
+ export { Modal } from './utils/openUtil/modal/modal.mjs';
66
+ export { OverlayContainer } from './utils/openUtil/overlay-container/overlay-container.mjs';
64
67
  export { PluginStaticResource } from './utils/plugin-static-resource/plugin-static-resource.mjs';
65
68
  export { gctFormItemEditorProps } from './utils/props/gct-form-item/gct-form-item.props.mjs';
66
69
  export { deepMerge, getTenant, getTimezone, getToken, isMobile, parseMatrixParams, setTenant, setToken, stringifyMatrixParams } from './utils/tools/tools.mjs';
70
+ export { buildShortUUID, buildUUID, uuid2 } from './utils/uuid/uuid.mjs';
67
71
  export { afterFieldSet, afterValueSet, cacheFnReturn, computedEx, emitFieldSet, parseValueUnit } from './utils/value-helper/value-helper.mjs';
68
72
  export { widthEditorInstall } from './utils/width-install/width-install.mjs';
69
73
  export { interceptors } from './utils/axios/interceptors.mjs';
@@ -72,33 +76,43 @@ export { TreeHelper } from './utils/treeHelper/treeHelper.mjs';
72
76
  export { calcFontStyle, calcStyle } from './utils/style/index.mjs';
73
77
  export { genUrl, openWindow } from './utils/util.mjs';
74
78
  export { createAppVue } from './create-app-vue.mjs';
75
- export { AGLINE_ENUMS, ButtonOpeEnum, RdoButtonOpeEnum, SEARCH_SEVICE, notSingleArr, presetColor } from './enums/designEnum.mjs';
79
+ export { setupApp } from './setup-app.mjs';
80
+ export { AGLINE_ENUMS, ButtonOpeEnum, RdoButtonOpeEnum, SEARCH_SERVICE, notSingleArr, presetColor } from './enums/designEnum.mjs';
76
81
  export { APP_DARK_MODE_KEY_, APP_LOCAL_CACHE_KEY, APP_SESSION_CACHE_KEY, CacheTypeEnum, DESIGNER_SESSION_CACHE_KEY, LOCALE_KEY, LOCALE_LIST_KEY, LOCAL_I18N_TRANSLATE, LOCK_INFO_KEY, MULTIPLE_TABS_KEY, PROJ_CFG_KEY, ROLES_KEY, TENANT_KEY, TIMEZONE_KEY, TOKEN_KEY, USER_INFO_KEY } from './enums/cacheEnum.mjs';
77
- export { ASSIGNMENTSTRATEGY_ENUM, BorderStyle, COLUMNS_TYPE, Dependency_ENUM, DisplayType, EventCategory, GLOBAL_TYPE, GLOBAL_VAR_TYPE, INNER_EVENT, PanelEnum, Postion, ProgressTypeEnum, PropGroup, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, StyleGroup, TagTypeEnum, TextAlign, TextDecoration, VERIFICATIONCONDITIONS_TYPE, tagEnum } from './enums/page-designer/panel.mjs';
78
- export { AggTypes, ContentEnum, CreateType, FIELD_TYPE, FIELD_TYPE_BASIC, FIELD_TYPE_CATEGORY, FIELD_TYPE_LOGIC, FIELD_TYPE_TRACE, FieldIconMap, FieldTypeToJs, GENDER_TYPE, MaterialEnum, MenuType, MessageType, NodesConfigTypeEnum, OpenMode, PermissionModeEnum, PersonalCenterType, ProjectName, RouterTransitionEnum, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, TODO_TYPE, ThemeEnum, UniqueConstraintType, WorkbenchType, selectionTypeEnums } from './enums/appEnum.mjs';
82
+ export { ARRAY_TYPE, BOOLEAN_TYPE, FUN_BOL_TYPE, FUN_NUM_TYPE, FUN_OBJ_OR_ARR_TYPE, FUN_STR_TYPE, NUMBER_TYPE, OBJECT_TYPE, RETURN_TYPE_MAP, STRING_TYPE, WinMsgTypeEnum, operator2FuncMap } from './constants/expression-type/index.mjs';
83
+ export { ASSIGNMENTSTRATEGY_ENUM, BorderStyle, COLUMNS_TYPE, Dependency_ENUM, DisplayTagTypeEnum, DisplayType, EventCategory, GLOBAL_TYPE, GLOBAL_VAR_TYPE, INNER_EVENT, PanelEnum, Postion, ProgressTypeEnum, PropGroup, SUB_TABLE_EDIT_MODE, SUB_TABLE_OPE_EVENT_TYPE, SUB_TABLE_OPE_EVENT_TYPE_INLINE, StyleGroup, TagTypeEnum, TextAlign, TextDecoration, VERIFICATIONCONDITIONS_TYPE, tagEnum } from './enums/page-designer/panel.mjs';
84
+ export { AggTypes, CARD_TRIGGER_ENUM, ContentEnum, CreateType, FIELD_TYPE, FIELD_TYPE_BASIC, FIELD_TYPE_CATEGORY, FIELD_TYPE_LOGIC, FIELD_TYPE_TRACE, FieldIconMap, FieldTypeToJs, GENDER_TYPE, MaterialEnum, MenuType, MessageType, NodesConfigTypeEnum, OpenMode, PermissionModeEnum, PersonalCenterType, ProjectName, RouterTransitionEnum, SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH, SessionTimeoutProcessingEnum, SettingButtonPositionEnum, TODO_TYPE, ThemeEnum, UniqueConstraintType, WorkbenchType, selectionTypeEnums } from './enums/appEnum.mjs';
79
85
  export { AppPublishStateEnum } from './enums/appStateEnum.mjs';
80
86
  export { BasicAction, CustomAction, DefaultActions, PlatformSettingActions } from './enums/authActionEnum.mjs';
81
- export { BindCmpStyleEnum, BindCmpStyleTypeEnum, Ch_BindCmpStyleEnum, FormComponents, SCOPE, SearchComponents, bindCmpStyleMap, buttonShowType, controlConfigEnum, fixedAlignENUM, mobileSearchListByFieldType, padSearchListByFieldType, searchListByFieldType, sortTypeEnum, statisticalMethodEnum, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, transformBindCmp2CmpType } from './enums/page-designer/designer.mjs';
87
+ export { BindCmpStyleEnum, BindCmpStyleTypeEnum, Ch_BindCmpStyleEnum, FormComponents, SCOPE, SCOPEINFO, SearchComponents, bindCmpStyleMap, buttonShowType, controlConfigEnum, fixedAlignENUM, mobileSearchListByFieldType, padSearchListByFieldType, searchListByFieldType, sortTypeEnum, statisticalMethodEnum, tableColumnTypeEnum, tableColumnWidthEnum, tabsTypeENUM, transformBindCmp2CmpType } from './enums/page-designer/designer.mjs';
82
88
  export { BizServiceEnum, ContentTypeEnum, RequestEnum, ResultEnum } from './enums/httpEnum.mjs';
89
+ export { BpmnNodeTypeEnum, ButtonTypeEnum, ExamineAndApproveStateEnum, OpinionTypeEnum, ProcessStatusEnum, ch_ProcessStatusMap } from './enums/processEnum.mjs';
90
+ export { BuiltOperators, allOperator, booleanOperator, getOperatorList, numberOperator, returnBolOperator } from './constants/expression-type/BuiltOperators.mjs';
83
91
  export { BuiltinType, ButtonColorTheme, ButtonColorType, ButtonGroupType, ButtonSize, ButtonStyle, ButtonType, ButtonTypeGroup, ButtonType_vant, CURRENCY_ENUM, CURRENCY_LANG_ENUM, CategoryTypeEnum, DatasourceTypeEnum, DateRangeEnums, DisplayEnums, KeyMode, ListTreeSearchTypeEnum, Platform, PrintModeEnums, ResetRuleType, RowSelectionTypeEnums, SelectPickerEnums, SignatureTypeEnum, StatisticalMethodEnums, TIMETYPE_ENUM, TIMETYPE_LANG_ENUM, TableEditingMethodEnum, TableSearchTypeEnum, TableTypeEnum, TransactionMode, WidgetInScopeEnum, openWindowEnums, operateSysEnums } from './enums/page-designer/widget.mjs';
92
+ export { CUSTOM_LANGUAGE, CUSTOM_THEME } from './constants/expression-type/editor.mjs';
84
93
  export { CoreConst } from './constants/core.mjs';
94
+ export { DataSetReturnTypeEnum, EntityFormulaReturnTypeEnum, ExpressionModeEnum, ExpressionTabEnum, IdentifierAddon, OperatorTypeEnum, ReturnTypeEnum, VarTypeEnum, zeroWidthSpace } from './enums/expressionEnum.mjs';
85
95
  export { DeviceParamsTypeEnum, PlatformType, nullDisplayEnum } from './enums/globalEnum.mjs';
86
96
  export { EditorRegisterConst } from './constants/editor-register/editor-register.mjs';
87
97
  export { EditorType, EditorTypeOld } from './constants/editor-type/editor-type.mjs';
88
98
  export { EntityModelCategoryEnum, EntityModelTypeEnum, FieldDefaultValueTypeEnum, FieldSysVarDefaultValueEnum, SHOW_FIELDTYPES, UserServiceType, pageLayoutModeEnum, scriptTypeEnum } from './enums/app-designer/index.mjs';
89
99
  export { ErrorStrategyFactory } from './modules/error-handler/error-strategy.mjs';
90
100
  export { ErrorTypeEnum, ExceptionEnum } from './enums/exceptionEnum.mjs';
91
- export { ExamineAndApproveStateEnum, ProcessStatusEnum, ch_ProcessStatusMap } from './enums/processEnum.mjs';
101
+ export { FUNC_KEYS } from './constants/expression-type/FunctionKeys.mjs';
92
102
  export { FormContainerType } from './constants/form-container-type/form-container-type.mjs';
93
103
  export { MenuModeEnum, MenuSplitTyeEnum, MenuTypeEnum, MixSidebarTriggerEnum, TopMenuAlignEnum, TriggerEnum } from './enums/menuEnum.mjs';
104
+ export { ModeFnMap, ModeTabDict, ModeTabMap, ReturnTypeMaps } from './constants/expression-type/modeCfg.mjs';
94
105
  export { PageEnum } from './enums/pageEnum.mjs';
95
106
  export { PluginModeEnum } from './enums/plugin-enum.mjs';
107
+ export { PrintResourceEnum } from './enums/developer-center/integration.mjs';
96
108
  export { RoleEnum } from './enums/roleEnum.mjs';
109
+ export { SYSTEM_VAR_PREFIX, booleanTypes, innerVarIds, innerVarList, numberTypes } from './constants/expression-type/variable.mjs';
97
110
  export { SizeEnum } from './enums/sizeEnum.mjs';
98
111
  export { ToolkitEnum } from './enums/page-designer/toolkit.mjs';
112
+ export { biBackFunctionGroup, biBackFunctionMap, functionGroup, functionMap, ipaasBackFunctionGroup, ipaasBackFunctionMap } from './constants/expression-type/function.mjs';
99
113
  export { screenEnum, screenMap, sizeEnum } from './enums/breakpointEnum.mjs';
100
114
 
101
- function install() {
115
+ function onInit() {
102
116
  if (window._gct) {
103
117
  console.warn("核心包已安装,请勿重复安装!");
104
118
  return;
@@ -116,5 +130,6 @@ function install() {
116
130
  }
117
131
  });
118
132
  }
133
+ onInit();
119
134
 
120
- export { GctGlobal, install as default, install };
135
+ export { GctGlobal };
@@ -6,16 +6,13 @@ export type { IDictionary } from './i-dictionary/i-dictionary';
6
6
  export type { IDictionaryItem } from './i-dictionary/i-dictionary-item';
7
7
  export type { IFieldCodeChain } from './i-field-code-chain/i-field-code-chain';
8
8
  export type { GlobalVar } from './i-global-var/i-global-var';
9
- export type { IMessageParams, IMessageUtil, } from './i-message-util/i-message-util';
10
9
  export type { IMobileHomeMenuItem } from './i-mobile-home-menu-item/i-mobile-home-menu-item';
11
- export type { IModal } from './i-modal/i-modal';
12
- export type { IModalData } from './i-modal-data/i-modal-data';
13
10
  export type { IStyleIMportMap } from './i-import-style-map/i-import-style-map';
14
11
  export type { IGlobalActions } from './i-pinia-action/i-global-actions';
15
12
  export type { IGlobalGetters } from './i-pinia-getter/i-global-getters';
16
13
  export type { IGlobalState } from './i-pinia-state/i-global-state';
14
+ export type * from './open-util';
17
15
  export type * from './layout';
18
- export type * from './open-util/i-open-window-options/i-open-window-options';
19
16
  export type * from './provider';
20
17
  export type * from './state';
21
18
  export type * from './style';
@@ -0,0 +1,54 @@
1
+ /**
2
+ * 消息参数
3
+ *
4
+ * @export
5
+ * @interface IMessageParams
6
+ */
7
+ export interface IMessageParams {
8
+ /**
9
+ * 持续时间,单位:秒,默认:1.5
10
+ *
11
+ * @type {number}
12
+ */
13
+ duration?: number;
14
+ }
15
+ /**
16
+ * 顶部居中显示,并自动消失
17
+ *
18
+ * @export
19
+ * @interface IMessageUtil
20
+ */
21
+ export interface IMessageUtil {
22
+ /**
23
+ * 普通消息
24
+ *
25
+ * @param {string} msg
26
+ * @param {IMessageParams} [params]
27
+ * @return {*} {Promise<void>}
28
+ */
29
+ info(msg: string, params?: IMessageParams): Promise<void>;
30
+ /**
31
+ * 成功消息
32
+ *
33
+ * @param {string} msg
34
+ * @param {IMessageParams} [params]
35
+ * @return {*} {Promise<void>}
36
+ */
37
+ success(msg: string, params?: IMessageParams): Promise<void>;
38
+ /**
39
+ * 警告消息
40
+ *
41
+ * @param {string} msg
42
+ * @param {IMessageParams} [params]
43
+ * @return {*} {Promise<void>}
44
+ */
45
+ warning(msg: string, params?: IMessageParams): Promise<void>;
46
+ /**
47
+ * 错误消息
48
+ *
49
+ * @param {string} msg
50
+ * @param {IMessageParams} [params]
51
+ * @return {*} {Promise<void>}
52
+ */
53
+ error(msg: string, params?: IMessageParams): Promise<void>;
54
+ }
@@ -1,6 +1,6 @@
1
1
  import { AsyncSeriesHook } from 'qx-util';
2
2
  import { IModalData } from '../i-modal-data/i-modal-data';
3
- interface ModalHooks {
3
+ export interface IModalHooks {
4
4
  shouldDismiss: AsyncSeriesHook<[
5
5
  ], {
6
6
  allowClose?: boolean;
@@ -29,22 +29,22 @@ export interface IModal {
29
29
  *
30
30
  * @author zhanghanrui
31
31
  * @date 2024-03-19 21:03:55
32
- * @type {ModalHooks}
32
+ * @type {IModalHooks}
33
33
  */
34
- hooks: ModalHooks;
34
+ hooks: IModalHooks;
35
35
  /**
36
36
  * 统一关闭入口
37
37
  *
38
- * @author zhanghanrui
39
- * @date 2024-03-19 21:03:04
38
+ * @param {IModalData} [data]
39
+ * @return {*} {Promise<boolean>}
40
40
  */
41
- dismiss: (data?: IModalData) => Promise<boolean>;
41
+ dismiss(data?: IModalData): Promise<boolean>;
42
42
  /**
43
43
  * 设置模态框属性
44
- * @param options
45
- * @returns
44
+ *
45
+ * @param {object} options
46
46
  */
47
- setOptions: (options: object) => void;
47
+ setOptions?(options: object): void;
48
48
  /**
49
49
  * 确认操作
50
50
  *
@@ -68,4 +68,3 @@ export interface IModal {
68
68
  */
69
69
  cancel?: () => Promise<boolean>;
70
70
  }
71
- export {};
@@ -15,6 +15,12 @@ export interface IModalData {
15
15
  * @type {boolean}
16
16
  */
17
17
  ok: boolean;
18
+ /**
19
+ * 是否关闭模态窗(当 close 为 true 时,ok=false 也会关闭模态窗)
20
+ *
21
+ * @type {boolean}
22
+ */
23
+ close?: boolean;
18
24
  /**
19
25
  * 返回的数据
20
26
  *
@@ -0,0 +1,12 @@
1
+ /**
2
+ * 模态打开参数,此为具体端实现,具体扩充参数由各端定义
3
+ *
4
+ * @export
5
+ * @interface IModalOptions
6
+ */
7
+ export interface IModalOptions {
8
+ [key: string]: any;
9
+ title?: string;
10
+ width?: string | number;
11
+ zIndex?: number;
12
+ }
@@ -0,0 +1,36 @@
1
+ /**
2
+ * 全局呈现容器
3
+ *
4
+ * @author zhanghanrui
5
+ * @date 2024-03-19 18:03:21
6
+ * @export
7
+ * @interface IOverlayContainer
8
+ */
9
+ export interface IOverlayContainer {
10
+ /**
11
+ * 展示容器
12
+ *
13
+ * @author zhanghanrui
14
+ * @date 2024-03-19 18:03:02
15
+ * @return {*} {Promise<void>}
16
+ */
17
+ present(): Promise<void>;
18
+ /**
19
+ * 关闭容器
20
+ *
21
+ * @author zhanghanrui
22
+ * @date 2024-03-19 18:03:08
23
+ * @param {unknown} [data]
24
+ * @return {*} {Promise<void>}
25
+ */
26
+ dismiss(data?: unknown): Promise<void>;
27
+ /**
28
+ * 等待容器关闭并返回返回值
29
+ *
30
+ * @author zhanghanrui
31
+ * @date 2024-03-19 18:03:12
32
+ * @template T
33
+ * @return {*} {Promise<T>}
34
+ */
35
+ onWillDismiss<T = unknown>(): Promise<T>;
36
+ }
@@ -0,0 +1,36 @@
1
+ import { IOverlayContainer } from '../i-overlay-container/i-overlay-container';
2
+ import { IModalOptions } from '../i-modal-options/i-modal-options';
3
+ import { IModalData } from '../i-modal-data/i-modal-data';
4
+ /**
5
+ * 全局呈现容器控制器
6
+ *
7
+ * @author zhanghanrui
8
+ * @date 2024-03-19 19:03:18
9
+ * @export
10
+ * @interface IOverlayController
11
+ */
12
+ export interface IOverlayController {
13
+ /**
14
+ * 模态打开组件
15
+ *
16
+ * @author zhanghanrui
17
+ * @date 2024-03-19 19:03:42
18
+ * @template T
19
+ * @param {unknown} component 组件名称,组件对象,或者绘制函数
20
+ * @param {IParams} [props] 组件props
21
+ * @param {IModalOptions} [opts]
22
+ * @return {*} {Promise<T>}
23
+ */
24
+ modal<T = IModalData>(component: unknown, props?: IParams, opts?: IModalOptions): Promise<T>;
25
+ /**
26
+ * 创建全局模态容器
27
+ *
28
+ * @author zhanghanrui
29
+ * @date 2024-03-19 19:03:04
30
+ * @param {unknown} component 组件名称,组件对象,或者绘制函数
31
+ * @param {IParams} [props] 组件props
32
+ * @param {IModalOptions} [opts]
33
+ * @return {*} {IOverlayContainer}
34
+ */
35
+ createModal(component: unknown, props?: IParams, opts?: IModalOptions): IOverlayContainer;
36
+ }
@@ -0,0 +1,7 @@
1
+ export type { IMessageParams, IMessageUtil, } from './i-message-util/i-message-util';
2
+ export type { IModal } from './i-modal/i-modal';
3
+ export type { IModalData } from './i-modal-data/i-modal-data';
4
+ export type { IModalOptions } from './i-modal-options/i-modal-options';
5
+ export type { IOpenWindowOptions } from './i-open-window-options/i-open-window-options';
6
+ export type { IOverlayContainer } from './i-overlay-container/i-overlay-container';
7
+ export type { IOverlayController } from './i-overlay-controller/i-overlay-controller';
@@ -2,6 +2,7 @@ import { createI18n } from 'vue-i18n';
2
2
 
3
3
  class LocaleUtil {
4
4
  i18n = createI18n({
5
+ legacy: false,
5
6
  locale: "zh-CN",
6
7
  fallbackLocale: "en",
7
8
  messages: {
@@ -1,12 +1,19 @@
1
1
  import { defineStore } from 'pinia';
2
- import '../../../utils/mitt/mitt.mjs';
2
+ import 'qs';
3
3
  import 'lodash-es';
4
+ import '../../../utils/mitt/mitt.mjs';
4
5
  import '../../../enums/app-designer/index.mjs';
5
6
  import '../../../enums/page-designer/designer.mjs';
6
7
  import '../../../enums/breakpointEnum.mjs';
8
+ import '../../../constants/expression-type/modeCfg.mjs';
9
+ import '../../../constants/expression-type/BuiltOperators.mjs';
10
+ import '../../../constants/expression-type/function.mjs';
11
+ import '../../../constants/expression-type/variable.mjs';
12
+ import 'vue';
13
+ import 'qx-util';
7
14
  import 'path-browserify';
8
15
  import { getToken, setToken } from '../../../utils/tools/tools.mjs';
9
- import 'vue';
16
+ import '../../../utils/uuid/uuid.mjs';
10
17
  import 'axios';
11
18
  import { getDeviceFingerprint, getPageIdentification } from '../../../utils/deviceFingerprint.mjs';
12
19
 
@@ -1,9 +1,7 @@
1
1
  import { EditorRegister } from './editor-register/editor-register';
2
2
  import { FormItemRegister } from './form-item-register/form-item-register';
3
- import { RenderRegister } from './render-register/render-register';
4
3
  export { EditorRegister } from './editor-register/editor-register';
5
4
  export { FormItemRegister } from './form-item-register/form-item-register';
6
- export { RenderRegister } from './render-register/render-register';
7
5
  /**
8
6
  * 综合性注册中心
9
7
  *
@@ -11,11 +9,6 @@ export { RenderRegister } from './render-register/render-register';
11
9
  * @interface IGlobalRegister
12
10
  */
13
11
  export interface IGlobalRegister {
14
- render: {
15
- pad: RenderRegister;
16
- mobile: RenderRegister;
17
- web: RenderRegister;
18
- };
19
12
  editor: EditorRegister;
20
13
  formItem: FormItemRegister;
21
14
  }
@@ -0,0 +1,8 @@
1
+ import { App } from 'vue';
2
+ /**
3
+ *
4
+ *
5
+ * @export
6
+ * @param {App} app
7
+ */
8
+ export declare function setupApp(app: App): Promise<void>;
@@ -0,0 +1,30 @@
1
+ import { setupErrorHandler } from './modules/error-handler/index.mjs';
2
+ import { HttpUtil } from '@gct-paas/api';
3
+ import 'qs';
4
+ import 'lodash-es';
5
+ import './utils/mitt/mitt.mjs';
6
+ import './enums/app-designer/index.mjs';
7
+ import './enums/page-designer/designer.mjs';
8
+ import './enums/breakpointEnum.mjs';
9
+ import './constants/expression-type/modeCfg.mjs';
10
+ import './constants/expression-type/BuiltOperators.mjs';
11
+ import './constants/expression-type/function.mjs';
12
+ import './constants/expression-type/variable.mjs';
13
+ import 'vue';
14
+ import 'qx-util';
15
+ import 'path-browserify';
16
+ import './utils/uuid/uuid.mjs';
17
+ import { interceptors } from './utils/axios/interceptors.mjs';
18
+ import '@fingerprintjs/fingerprintjs';
19
+ import './modules/platform-config/constants/login.const.mjs';
20
+ import { usePlatformConfigStore } from './modules/platform-config/store.mjs';
21
+
22
+ async function setupApp(app) {
23
+ await setupErrorHandler(app);
24
+ HttpUtil.use(interceptors);
25
+ await _gct.init();
26
+ const platformStore = usePlatformConfigStore();
27
+ await platformStore.init();
28
+ }
29
+
30
+ export { setupApp };
@@ -1,13 +1,20 @@
1
1
  import { defineStore } from 'pinia';
2
2
  import { GlobalPiniaState } from '../state/global-pinia-state/global-pinia-state.mjs';
3
- import '../utils/mitt/mitt.mjs';
3
+ import 'qs';
4
4
  import 'lodash-es';
5
+ import '../utils/mitt/mitt.mjs';
5
6
  import '../enums/app-designer/index.mjs';
6
7
  import '../enums/page-designer/designer.mjs';
7
8
  import '../enums/breakpointEnum.mjs';
9
+ import '../constants/expression-type/modeCfg.mjs';
10
+ import '../constants/expression-type/BuiltOperators.mjs';
11
+ import '../constants/expression-type/function.mjs';
12
+ import '../constants/expression-type/variable.mjs';
13
+ import 'vue';
14
+ import 'qx-util';
8
15
  import 'path-browserify';
9
16
  import { parseMatrixParams } from '../utils/tools/tools.mjs';
10
- import 'vue';
17
+ import '../utils/uuid/uuid.mjs';
11
18
  import 'axios';
12
19
  import '@fingerprintjs/fingerprintjs';
13
20
 
@@ -38,7 +45,6 @@ const useGlobalStore = defineStore("global-store", {
38
45
  },
39
46
  async loadAppInfo() {
40
47
  const res = await _api.apaas.designerCommon.getGetApp();
41
- console.log(res);
42
48
  this.appInfo = res;
43
49
  },
44
50
  setProjectName(name) {
@@ -142,4 +142,8 @@ declare global {
142
142
  */
143
143
  data: T[];
144
144
  }
145
+
146
+ type Fn<T = any, R = T> = (...arg: T[]) => R;
147
+
148
+ type PromiseFn<T = any, R = T> = (...arg: T[]) => Promise<R>;
145
149
  }
@@ -3,7 +3,6 @@ import { getTimezone, getTenant, isMobile, getToken } from '../tools/tools.mjs';
3
3
 
4
4
  function interceptors(axios) {
5
5
  axios.interceptors.request.use((config) => {
6
- config.headers["Lang"] = _gct.store.lang;
7
6
  if (!config.headers) {
8
7
  config.headers = new AxiosHeaders();
9
8
  }
@@ -0,0 +1,2 @@
1
+ /**异步缓存函数 */
2
+ export declare const gctMemoizeAsync: (...arg: unknown[]) => (...args: any[]) => any;
@@ -0,0 +1,59 @@
1
+ import qs from 'qs';
2
+
3
+ const gctMemoizeAsync = (...arg) => cacheAdapter.bind(null, ...arg);
4
+ function cacheAdapter(adapter, ...args) {
5
+ const maxAge = 1e3 * 60 * 5;
6
+ const requestKey = typeof args === "object" ? qs.stringify(args) : args;
7
+ let responsePromise = MemoryCache.get(requestKey);
8
+ if (!responsePromise) {
9
+ responsePromise = (async () => {
10
+ try {
11
+ return await adapter(...args);
12
+ } catch (reason) {
13
+ MemoryCache.delete(requestKey);
14
+ throw reason;
15
+ }
16
+ })();
17
+ MemoryCache.set(requestKey, responsePromise, maxAge);
18
+ return responsePromise;
19
+ }
20
+ return responsePromise;
21
+ }
22
+ class MemoryCache {
23
+ static cachedata = {};
24
+ static set(key, value, maxAge) {
25
+ this.cachedata[key] = {
26
+ maxAge: maxAge || 0,
27
+ value,
28
+ now: Date.now()
29
+ };
30
+ }
31
+ static get(key) {
32
+ this.reset();
33
+ const cachedItem = this.cachedata[key];
34
+ if (!cachedItem) return null;
35
+ return cachedItem.value;
36
+ }
37
+ static delete(key) {
38
+ return delete this.cachedata[key];
39
+ }
40
+ static clear() {
41
+ this.cachedata = {};
42
+ }
43
+ /**
44
+ *清空过期的数据
45
+ */
46
+ static reset() {
47
+ for (const key in this.cachedata) {
48
+ const cachedItem = this.cachedata[key];
49
+ if (cachedItem) {
50
+ const isExpired = Date.now() - cachedItem.now > cachedItem.maxAge;
51
+ if (isExpired) {
52
+ this.delete(key);
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+
59
+ export { gctMemoizeAsync };