@byteluck-fe/runtime-engine 2.0.35 → 2.0.36

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 (26) hide show
  1. package/dist/runtime-engine.js +11355 -8295
  2. package/dist/src/entry_desktop/components/AppHeader/guide.d.ts +23 -0
  3. package/dist/src/entry_desktop/controls/rok-attachment/hook.d.ts +3 -2
  4. package/dist/src/entry_desktop/controls/rok-grid-table/hooks/useColumns.d.ts +1 -1
  5. package/dist/src/entry_desktop/controls/rok-grid-table/hooks/useOrganization.d.ts +1 -1
  6. package/dist/src/hooks/components/listEngineModal/useListEngineModal.d.ts +1 -0
  7. package/dist/src/hooks/components/listEngineModal/useListState.d.ts +1 -0
  8. package/dist/src/hooks/components/useApprovelAi.d.ts +34 -0
  9. package/dist/src/hooks/controls/selecRelation/tools.d.ts +1 -1
  10. package/dist/src/hooks/controls/useRokFormEngineModal.d.ts +1 -1
  11. package/dist/src/plugins/engine/AiConversationModalPlugin.d.ts +89 -0
  12. package/dist/src/plugins/engine/EventListenerPlugin/OpenAiModalHandler.d.ts +6 -0
  13. package/dist/src/plugins/engine/EventListenerPlugin/type.d.ts +1 -0
  14. package/dist/src/plugins/engine/ExpressionPlugin.d.ts +13 -0
  15. package/dist/src/plugins/engine/WorkerDataStorePlugin.d.ts +7 -0
  16. package/dist/src/services/services.auto.d.ts +10 -7
  17. package/dist/src/services/template.d.ts +1 -0
  18. package/dist/src/utils/core/ai.d.ts +1 -0
  19. package/dist/src/utils/core/expressionTools.d.ts +6 -0
  20. package/dist/src/utils/core/index.d.ts +1 -1
  21. package/dist/src/utils/tools/displayValue.d.ts +17 -0
  22. package/dist/src/utils/tools/index.d.ts +2 -0
  23. package/dist/src/utils/tools/replacePrefixPath.d.ts +1 -0
  24. package/package.json +1 -1
  25. package/dist/src/hooks/controls/ElectronicSignature/useElectronicSignature.d.ts +0 -27
  26. package/dist/src/utils/core/proxy.d.ts +0 -4
@@ -0,0 +1,23 @@
1
+ export default class TourGuide {
2
+ tourSteps: {
3
+ element: string;
4
+ content: string;
5
+ }[];
6
+ steps: {
7
+ element: string;
8
+ content: string;
9
+ }[];
10
+ currentStep: number;
11
+ mask1: HTMLDivElement | null;
12
+ mask2: HTMLDivElement | null;
13
+ mask3: HTMLDivElement | null;
14
+ mask4: HTMLDivElement | null;
15
+ contentBox: HTMLDivElement | null;
16
+ nextBtn: HTMLButtonElement | null;
17
+ endFunction: any;
18
+ createMask(target: any): void;
19
+ showContent(target: any, content: any): HTMLDivElement;
20
+ clearCurrent(): void;
21
+ showStep(stepIndex: any): void;
22
+ start(endFunction: any): Promise<void>;
23
+ }
@@ -5,7 +5,7 @@ import { Ref, ComputedRef } from 'vue';
5
5
  export default function (props: PropsInstanceType<CONTROL_TYPE.ATTACHMENT>): {
6
6
  data: Ref<{
7
7
  deletable: boolean;
8
- app_id: string;
8
+ app_id: any;
9
9
  form_key: string;
10
10
  element_id: string;
11
11
  }>;
@@ -15,10 +15,11 @@ export default function (props: PropsInstanceType<CONTROL_TYPE.ATTACHMENT>): {
15
15
  hideUploader: ComputedRef<boolean>;
16
16
  fileList: ComputedRef<string[]>;
17
17
  pageStatus: ComputedRef< PAGE_STATUS | undefined>;
18
- operation: ComputedRef<string[]>;
18
+ operation: ComputedRef<any>;
19
19
  updateCtrlValue: (data: any) => void;
20
20
  beforeUpload: (file: any, list: any[]) => boolean | undefined;
21
21
  handleExceed: () => void;
22
+ handleExplanation: (file: any) => Promise<void>;
22
23
  uploadError: (data: {
23
24
  error: any;
24
25
  file: any;
@@ -22,5 +22,5 @@ export declare function useColumns(params: {
22
22
  viewConfigs: ComputedRef<ViewConfigType>;
23
23
  customColumns: ShallowRef<any>;
24
24
  fullColumns: any[];
25
- getColumns: (viewFieldCode?: string[] | undefined, type?: "reset" | undefined) => void;
25
+ getColumns: (viewFieldCode?: string[] | undefined, type?: "reset" | undefined) => Promise<void>;
26
26
  };
@@ -9,7 +9,7 @@ import { SelectStateType } from '../../../../hooks/controls/listView/useListSele
9
9
  */
10
10
  export declare function useOrganization(props: BasicPropsTypes, selectState: Ref<SelectStateType>): {
11
11
  isQuerySelectedRows: Ref<boolean>;
12
- selectedRows: ComputedRef<any[]>;
12
+ selectedRows: Ref<any[]>;
13
13
  clearAllSelect: () => void;
14
14
  showSelectedDetail: ComputedRef<any>;
15
15
  selectedContentConfig: ComputedRef<any>;
@@ -36,6 +36,7 @@ export declare function useListEngineModal(props: ListEngineModalProps): {
36
36
  hasPermission: Ref<boolean>;
37
37
  supportMobile: Ref<boolean>;
38
38
  isSimpleMode: Ref<boolean>;
39
+ authFlag: Ref<string>;
39
40
  width: ComputedRef<string>;
40
41
  changeFullScreen: (status: boolean) => void;
41
42
  handleOk: () => Promise<void>;
@@ -16,4 +16,5 @@ export declare function useListState(formKey: string | Ref<string>, visible: Ref
16
16
  loading: Ref<boolean>;
17
17
  hasPermission: Ref<boolean>;
18
18
  supportMobile: Ref<boolean>;
19
+ authFlag: Ref<string>;
19
20
  };
@@ -0,0 +1,34 @@
1
+ import { Ref, ComputedRef } from 'vue';
2
+ export declare function useApprovelAi(props: any, decisionBtns: any, customId: any, device: string): {
3
+ ristState: Ref<{
4
+ text: string;
5
+ type: string;
6
+ }>;
7
+ isShowRist: ComputedRef<boolean>;
8
+ isShowSideAi: ComputedRef<boolean>;
9
+ aiAssistant: ComputedRef<any>;
10
+ sideAiRef: Ref<any>;
11
+ sideAiInfo: ComputedRef<{
12
+ env: string;
13
+ agentCode: any;
14
+ mode: string;
15
+ src: string;
16
+ header: {
17
+ hide: boolean;
18
+ };
19
+ welcome: {
20
+ description: string;
21
+ };
22
+ avatar: {
23
+ hide: boolean;
24
+ };
25
+ sender: {
26
+ beforeSendCallback: (callback: Function) => void;
27
+ };
28
+ platformInfo: {
29
+ app_type: string;
30
+ };
31
+ }>;
32
+ onSideAiMessage: (e: any) => void;
33
+ onDecisionAiSendBefore: (e: any) => void;
34
+ };
@@ -1,4 +1,4 @@
1
- export declare function getNoCacheListTableSchema(appId: string, formKey: string): Promise<typing.ApplyPageBo_1 | undefined>;
1
+ export declare function getNoCacheListTableSchema(appId: string, formKey: string): Promise<typing.ApplyPageBo | undefined>;
2
2
  export declare function getModel(result: any): any;
3
3
  export declare function getOperationSchema(model: any): any;
4
4
  export declare function getBindProcessInstanceId(result: typing.PageDataDetailBo): string | undefined;
@@ -1,5 +1,5 @@
1
- import { Engine } from '@byteluck-fe/model-driven-engine';
2
1
  import { Ref, ComputedRef } from 'vue';
2
+ import { Engine } from '@byteluck-fe/model-driven-engine';
3
3
 
4
4
  export declare function useRokFormEngineModal(engine: Engine | undefined, onClickError?: (caption: string) => void): {
5
5
  visible: Ref<boolean>;
@@ -0,0 +1,89 @@
1
+ import { Engine, Plugin } from '@byteluck-fe/model-driven-engine';
2
+ import { VNode } from 'vue';
3
+
4
+ interface Payload {
5
+ instance: any;
6
+ rowIndex?: number;
7
+ options?: {
8
+ e?: Event;
9
+ agentCode: string;
10
+ /**
11
+ * AI对话框初始化完成后,立即发送问题,默认发送
12
+ * 特别说明,发送消息时,页面显示值和当前控件显示值会固定通过inputs发送,变量如下
13
+ * inputs: {
14
+ * page_display: 当前页面的显示值
15
+ * current_display: 当前控件显示值
16
+ * }
17
+ */
18
+ isInitSendQuestion?: boolean;
19
+ displayType?: string;
20
+ isCheckCurrentDisplay?: boolean;
21
+ question: {
22
+ /**
23
+ * 提示词
24
+ * 提示词获取顺序,prompt > assistant > 触发的instance
25
+ */
26
+ prompt?: {
27
+ content?: string;
28
+ instance?: any;
29
+ };
30
+ inputs: any;
31
+ files: {
32
+ type: 'document' | 'image' | 'audio' | 'video' | 'custom';
33
+ transfer_method: 'remote_url' | 'local_file';
34
+ url?: string;
35
+ upload_file_id?: string;
36
+ }[];
37
+ };
38
+ /**
39
+ * 当AI有消息返回时,要执行的回调
40
+ * 返回的数据格式为:
41
+ * {
42
+ * message:{
43
+ * type: string
44
+ * data: any
45
+ * cmd?: {
46
+ * m: string
47
+ * t: string
48
+ * }
49
+ * },
50
+ * payload: Payload
51
+ * }
52
+ */
53
+ recieveAIMessageCallback?: Function;
54
+ fill?: [
55
+ {
56
+ instance?: any;
57
+ rowIndex?: number;
58
+ }
59
+ ];
60
+ assistant?: any;
61
+ };
62
+ }
63
+ export declare class AiConversationModalPlugin implements Plugin {
64
+ pluginName: string;
65
+ private engine;
66
+ private src;
67
+ constructor();
68
+ apply(engine: Engine): void;
69
+ init(): void;
70
+ show(payload: Payload): void;
71
+ receiveAiMessage(e: any, payload: Payload, vnode: VNode): void;
72
+ checkToFill(payload: Payload, data: any): void;
73
+ getPrompt(payload: Payload): string;
74
+ checkToSendMessage(payload: Payload, vnode: VNode): void;
75
+ getInstanceId(instance: any): any;
76
+ windowClickHandle(e: any): void;
77
+ hide(payload: Payload): void;
78
+ getAiModalDom(payload: Payload): Element | null;
79
+ getId(instanceId: string, rowIndex?: number): string;
80
+ getIframePosition(targetDom: any): {
81
+ height: number;
82
+ left: string;
83
+ right: string;
84
+ top: string;
85
+ bottom: string;
86
+ classname: string;
87
+ };
88
+ }
89
+ export {};
@@ -0,0 +1,6 @@
1
+ import { EventCaseHandlerPayload } from './type';
2
+
3
+ export default function OpenAiModalHandler(payload: EventCaseHandlerPayload): Promise<{
4
+ input: any;
5
+ output: {};
6
+ }>;
@@ -35,6 +35,7 @@ export interface IBaitedaEventHandler {
35
35
  params: any;
36
36
  }
37
37
  export declare enum EventHandlerMethod {
38
+ openAiModal = "openAiModal",
38
39
  openLink = "openLink",
39
40
  openPage = "openPage",
40
41
  setInstance = "setInstance",
@@ -60,15 +60,28 @@ export declare class ExpressionPlugin extends ExpressionBasePlugin {
60
60
  max: any;
61
61
  };
62
62
  resetParseResult(controlId: string, prevParseResult: any, propertyKey: string): any;
63
+ deepCloneWithPrototype(obj: any, map?: WeakMap<object, any>): any;
63
64
  runnerExpressionAndUpdateBeforeSubTableInsert(controlId: string): void;
64
65
  registerDatasourceFunctions(): void;
65
66
  getLocaleText(key: string, rowNumber: number): any;
66
67
  registerSystemVariables(): void;
68
+ parseFunctionExpression(expression: any): void;
69
+ parseConditionArgument(expression: any): void;
70
+ parseAndOrFunctionExpression(expression: any): void;
71
+ parseIfFunctionExpression(expression: any): void;
72
+ getConditionCodes(conditionArgument: any[]): string[];
67
73
  getFormControlValue(controlIds: string[]): any;
68
74
  getFormControlValueOfEventListener(controlIds: string[]): any;
69
75
  getFormControlValueOfSubTableRowBeforeInsert(controlIds: string[]): any;
70
76
  checkToRunRelationExpressionAndUpdateBeforeSubTableInsert(relationId: string, isNoCheckHasExpressionsControlId?: boolean): void;
71
77
  getCurrentSystemVariables(keys: string[]): any;
78
+ getTimeConstVariables(keys: string[]): {
79
+ min: number | undefined;
80
+ max: number | undefined;
81
+ };
82
+ getTimeConstRangeVariables(keys: string[]): number[] | undefined;
83
+ getMinTimeConstVariables(keys: string[]): number | undefined;
84
+ getMaxTimeConstVariables(keys: string[]): number | undefined;
72
85
  /**
73
86
  * 解析datasource变量值的处理器
74
87
  * @param paths 表达式中的访问路径,如:__datasource__.a.b.c;paths返回的值为[a,b,c]
@@ -9,6 +9,13 @@ export declare class WorkerDataStorePlugin implements Plugin {
9
9
  behaviors: typing.PageBehaviorBo[];
10
10
  });
11
11
  apply(engine: Engine): void;
12
+ /**
13
+ * disableMultistageFillingPluginListChange 默认为 true
14
+ * 当明细表中存在填充字段,且被填充字段中有没有绑定字段的控件时,disableMultistageFillingPluginListChange = false
15
+ * @param subtableInstance
16
+ * @returns
17
+ */
18
+ private getDisableMultistageFillingPluginListChangeOfPageData;
12
19
  listUpdateSubtableToDBPostMessage(options: any): void;
13
20
  initListener(): void;
14
21
  /**
@@ -39,7 +39,7 @@ export default class {
39
39
  query?: {
40
40
  'sappId'?: string;
41
41
  };
42
- }, options?: any): Promise<typing.PlainResult$AppBasicInfoBo$_1>;
42
+ }, options?: any): Promise<typing.PlainResult$AppBasicInfoBo$>;
43
43
  /**
44
44
  * 获取导航菜单及应用菜单信息
45
45
  * @method
@@ -57,7 +57,7 @@ export default class {
57
57
  */
58
58
  GetAllAppNavGroupTreeAppPrivateV1ApiAppsPOST(params: {
59
59
  payload?: typing.SappQuery;
60
- }, options?: any): Promise<typing.PlainResult$List$GroupListDto$$_2>;
60
+ }, options?: any): Promise<typing.PlainResult$List$GroupListDto$$>;
61
61
  /**
62
62
  * 轻应用菜单
63
63
  * @method
@@ -77,7 +77,7 @@ export default class {
77
77
  */
78
78
  GetSappNavGroupTreeByQueryAppPrivateV1ApiAppsPOST(params: {
79
79
  payload?: typing.SappTreeQuery;
80
- }, options?: any): Promise<typing.PlainResult$List$GroupListDto$$_1>;
80
+ }, options?: any): Promise<typing.PlainResult$List$GroupListDto$$>;
81
81
  /**
82
82
  * 菜单、导航搜索
83
83
  * @method
@@ -1397,7 +1397,7 @@ export default class {
1397
1397
  * @param {} submitFormRequest - submitFormRequest
1398
1398
  */
1399
1399
  ApplySubmitPagePrivateV1ApiAppsPOST(params: {
1400
- payload?: typing.SubmitFormDto_1;
1400
+ payload?: typing.SubmitFormDto_8;
1401
1401
  }, options?: any): Promise<typing.PlainResult$string$>;
1402
1402
  /**
1403
1403
  * 传入:非第一次表单提交数据(JSON格式)
@@ -1434,7 +1434,7 @@ export default class {
1434
1434
  */
1435
1435
  ApplyRenderChumaPagePrivateV1ApiAppsPOST(params: {
1436
1436
  payload?: typing.ApplyRenderDto;
1437
- }, options?: any): Promise<typing.PlainResult$ApplyPageBo$_1>;
1437
+ }, options?: any): Promise<typing.PlainResult$ApplyPageBo$>;
1438
1438
  /**
1439
1439
  * 传入:数据模型编码和数据UID集合
1440
1440
  * @method
@@ -1605,7 +1605,7 @@ export default class {
1605
1605
  * @param {} runFormRequest - runFormRequest
1606
1606
  */
1607
1607
  GetNextNodeUserBySubmitPagePrivateV1ApiAppsPOST(params: {
1608
- payload?: typing.SubmitFormDto_3;
1608
+ payload?: typing.SubmitFormDto_1;
1609
1609
  }, options?: any): Promise<typing.ListResult$OptionalNodeDto$>;
1610
1610
  /**
1611
1611
  * getPageSimpleInfo
@@ -1719,7 +1719,7 @@ export default class {
1719
1719
  * @param {} pageRequest - pageRequest
1720
1720
  */
1721
1721
  ListDataSubtablePagePrivateV1ApiAppsPOST(params: {
1722
- payload?: typing.PageRequest$SubTableQuery$_2;
1722
+ payload?: typing.PageRequest$SubTableQuery$;
1723
1723
  }, options?: any): Promise<typing.PageResult$SubTableRowDataBo$>;
1724
1724
  /**
1725
1725
  * 传入:查询条件(JSON格式)
@@ -2146,4 +2146,7 @@ export default class {
2146
2146
  WriteSignPdfXssPrivateV1ApiAppsPOST(params: {
2147
2147
  payload?: typing.XssParamBo;
2148
2148
  }, options?: any): Promise<typing.PlainResult$AttachmentDto$>;
2149
+ uploadFileById(params: {
2150
+ payload?: any;
2151
+ }, options?: any): Promise<any>;
2149
2152
  }
@@ -13,4 +13,5 @@ export default class {
13
13
  * @method
14
14
  */
15
15
  subtableAdvancedImport(templateCode: string, file: File, main_uid: string | undefined, main_data_code: string): Promise<any>;
16
+ uploadFileById(parm: any): Promise<any>;
16
17
  }
@@ -0,0 +1 @@
1
+ export declare const getAiAgentSrc: (agentCode: string) => string;
@@ -29,6 +29,12 @@ export declare class ExpressionTools {
29
29
  max: any;
30
30
  };
31
31
  resetParseResult(originControlId: string, controlId: string, prevParseResult: any, propertyKey: string): any;
32
+ parseFunctionExpression(expression: any): void;
33
+ parseConditionArgument(expression: any): void;
34
+ parseAndOrFunctionExpression(expression: any): void;
35
+ parseIfFunctionExpression(expression: any): void;
36
+ getConditionCodes(conditionArgument: any[]): string[];
37
+ deepCloneWithPrototype(obj: any, map?: WeakMap<object, any>): any;
32
38
  doExpressionParse(id: string, propertyKey: string): void;
33
39
  registerSystemVariables(): void;
34
40
  /**
@@ -4,7 +4,6 @@ export * from './setFormData';
4
4
  export * from './setSubtableData';
5
5
  export * from './buildFiltersToDataSetValues';
6
6
  export * from './math';
7
- export * from './proxy';
8
7
  export { default as vueApp } from './vueApp';
9
8
  export { default as Mitt } from './tinyMitt';
10
9
  export * from './pageRefreshData';
@@ -15,3 +14,4 @@ export * from './expressionUtils';
15
14
  export * from './dynamicDefaultValue';
16
15
  export * from './setSubtableCache';
17
16
  export * from './buildSubtableStoreState';
17
+ export * from './ai';
@@ -0,0 +1,17 @@
1
+ import { Engine } from '@byteluck-fe/model-driven-engine';
2
+
3
+ declare const getControlDisplay: (instanceId: string, engine: Engine) => {
4
+ label: string;
5
+ value: any;
6
+ data: any;
7
+ type: string;
8
+ } | undefined;
9
+ declare const getPageDisplayValues: (engine: Engine, container?: Document | undefined) => any[];
10
+ declare const getPageFullDisplayValues: (engine: Engine, container?: Document | undefined) => {
11
+ main: any[];
12
+ files: {
13
+ type: string;
14
+ value: string;
15
+ }[];
16
+ };
17
+ export { getPageDisplayValues, getControlDisplay, getPageFullDisplayValues };
@@ -18,3 +18,5 @@ export * from './autoClearTimer';
18
18
  export * from './getTabWindowTitle';
19
19
  export * from './getMultipleTabsTitle';
20
20
  export * from './getPageDefaultProps';
21
+ export * from './displayValue';
22
+ export * from './replacePrefixPath';
@@ -0,0 +1 @@
1
+ export declare const replaceDesktopPrefixPath: (path: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byteluck-fe/runtime-engine",
3
- "version": "2.0.35",
3
+ "version": "2.0.36",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/runtime-engine.js",
@@ -1,27 +0,0 @@
1
- import { Ref, ComputedRef } from 'vue';
2
- import { CONTROL_TYPE, PAGE_STATUS } from '@byteluck-fe/model-driven-core-all';
3
- import { PropsInstanceType } from '../../../constant';
4
-
5
- export declare const useElectronicSignature: (props: PropsInstanceType<CONTROL_TYPE.ELECTRONIC_SIGNATURE>, errorToast: (message: string) => void) => {
6
- queryStatus: () => void;
7
- signStatus: Ref<{
8
- name: string;
9
- tips: string;
10
- type: string;
11
- status: string;
12
- }>;
13
- startSign: () => Promise<void>;
14
- buttonClick: () => void;
15
- staHover: () => Promise<void>;
16
- signMemberLists: Ref<any>;
17
- memberSignSta: {
18
- Pending: string;
19
- Completed: string;
20
- Rejected: string;
21
- };
22
- loading: Ref<boolean>;
23
- mobileShowPopup: Ref<boolean>;
24
- mobilPopopActiveTab: Ref<string>;
25
- signResult: any;
26
- pageStatus: ComputedRef< PAGE_STATUS | undefined>;
27
- };
@@ -1,4 +0,0 @@
1
- import { ComponentPublicInstance, ComponentOptionsBase } from 'vue';
2
- export declare function getCurrentProxy(): {
3
- proxy: ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
4
- };