@byteluck-fe/runtime-engine 7.0.0-beta.0 → 7.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime-engine.js +67889 -15495
- package/dist/src/constant/controls/simple-search.d.ts +1 -0
- package/dist/src/constant/page/address.d.ts +1 -1
- package/dist/src/entry_desktop/components/EllipsisTooltip/EllipsisTooltip.d.ts +3 -3
- package/dist/src/entry_desktop/controls/rok-bar-chart/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-barcode/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-blank-container/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-cascader/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-collapse/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-counter/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-iframe/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-line-chart/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-pie-chart/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-qr-code/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-slider/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-switch/index.d.ts +3 -0
- package/dist/src/entry_desktop/controls/rok-tag/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-bar-chart/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-barcode/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-blank-container/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-cascader/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-collapse/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-counter/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-iframe/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-line-chart/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-pie-chart/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-qr-code/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-slider/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-switch/index.d.ts +3 -0
- package/dist/src/entry_mobile/controls/rok-tag/index.d.ts +3 -0
- package/dist/src/hooks/controls/address/useAddress.d.ts +1 -1
- package/dist/src/hooks/controls/barcode/index.d.ts +1 -0
- package/dist/src/hooks/controls/barcode/useBarcode.d.ts +25 -0
- package/dist/src/hooks/controls/button/useButton.d.ts +31 -0
- package/dist/src/hooks/controls/chart/chart-transform.d.ts +19 -0
- package/dist/src/hooks/controls/chart/index.d.ts +1 -0
- package/dist/src/hooks/controls/chart/useChart.d.ts +13 -0
- package/dist/src/hooks/controls/counter/index.d.ts +1 -0
- package/dist/src/hooks/controls/iframe/index.d.ts +1 -0
- package/dist/src/hooks/controls/iframe/useIframe.d.ts +15 -0
- package/dist/src/hooks/controls/index.d.ts +7 -0
- package/dist/src/hooks/controls/qrCode/index.d.ts +1 -0
- package/dist/src/hooks/controls/qrCode/useQrCode.d.ts +26 -0
- package/dist/src/hooks/controls/slider/index.d.ts +1 -0
- package/dist/src/hooks/controls/switch/index.d.ts +1 -0
- package/dist/src/hooks/form/useDisplay.d.ts +1 -1
- package/dist/src/plugins/engine/EventListenerPlugin/CallActionHandler.d.ts +27 -0
- package/dist/src/plugins/engine/EventListenerPlugin/type.d.ts +2 -0
- package/dist/src/utils/model/operateCache.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { ControlRuntimeInstance } from '@byteluck-fe/model-driven-core-all';
|
|
|
4
4
|
|
|
5
5
|
declare const EllipsisTooltip: DefineComponent<{
|
|
6
6
|
instance: {
|
|
7
|
-
type: PropType<ControlRuntimeInstance<"select" | "select-multiple">>;
|
|
7
|
+
type: PropType<ControlRuntimeInstance<"select" | "select-multiple" | "tag">>;
|
|
8
8
|
default: () => void;
|
|
9
9
|
};
|
|
10
10
|
value: {
|
|
@@ -44,7 +44,7 @@ declare const EllipsisTooltip: DefineComponent<{
|
|
|
44
44
|
handleShowDetail: () => void;
|
|
45
45
|
}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
46
46
|
instance: {
|
|
47
|
-
type: PropType<ControlRuntimeInstance<"select" | "select-multiple">>;
|
|
47
|
+
type: PropType<ControlRuntimeInstance<"select" | "select-multiple" | "tag">>;
|
|
48
48
|
default: () => void;
|
|
49
49
|
};
|
|
50
50
|
value: {
|
|
@@ -78,7 +78,7 @@ declare const EllipsisTooltip: DefineComponent<{
|
|
|
78
78
|
}>>, {
|
|
79
79
|
title: VueNode;
|
|
80
80
|
color: string;
|
|
81
|
-
instance: ControlRuntimeInstance<"select" | "select-multiple">;
|
|
81
|
+
instance: ControlRuntimeInstance<"select" | "select-multiple" | "tag">;
|
|
82
82
|
overlayClassName: string;
|
|
83
83
|
formVisible: boolean;
|
|
84
84
|
isShowDetail: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useBarcode } from './useBarcode';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { PropsInstanceType } from '../../../constant';
|
|
2
|
+
import { ShallowRef, Ref, ComputedRef } from 'vue';
|
|
3
|
+
|
|
4
|
+
export declare function useBarcode(props: PropsInstanceType<'barcode'>): {
|
|
5
|
+
formItemRef: ShallowRef<null>;
|
|
6
|
+
renderError: Ref<string>;
|
|
7
|
+
barcodeDataUrl: Ref<string>;
|
|
8
|
+
formItemInstanceProps: ComputedRef<{
|
|
9
|
+
caption: any;
|
|
10
|
+
}>;
|
|
11
|
+
resolved: ComputedRef<{
|
|
12
|
+
caption: any;
|
|
13
|
+
defaultValue: any;
|
|
14
|
+
align: any;
|
|
15
|
+
format: string;
|
|
16
|
+
width: any;
|
|
17
|
+
height: any;
|
|
18
|
+
lineColor: any;
|
|
19
|
+
margin: any;
|
|
20
|
+
displayValue: any;
|
|
21
|
+
}>;
|
|
22
|
+
contentValue: ComputedRef<string>;
|
|
23
|
+
alignClass: ComputedRef<string>;
|
|
24
|
+
showPlaceholder: ComputedRef<boolean>;
|
|
25
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
import { CONTROL_TYPE, OptObject, BaseStyle } from '@byteluck-fe/model-driven-core-all';
|
|
3
|
+
import { PropsInstanceType } from '../../../constant';
|
|
4
|
+
import { DebouncedFunc } from 'lodash';
|
|
5
|
+
|
|
6
|
+
export declare function useButton(props: PropsInstanceType<CONTROL_TYPE.BUTTON>, emit?: Function): {
|
|
7
|
+
isPlain: ComputedRef<boolean>;
|
|
8
|
+
isDisabled: ComputedRef<boolean>;
|
|
9
|
+
buttonData: ComputedRef<{
|
|
10
|
+
content: string;
|
|
11
|
+
buttonType: "text" | "primary" | "secondary";
|
|
12
|
+
showType: "text" | "icon" | "iconText";
|
|
13
|
+
color: "success" | "info" | "warning" | "primary" | "danger" | "blue";
|
|
14
|
+
icon: string;
|
|
15
|
+
defaultState: "default" | "readonly";
|
|
16
|
+
command: string;
|
|
17
|
+
isLoading: boolean;
|
|
18
|
+
optObj?: OptObject | undefined;
|
|
19
|
+
isHide: boolean;
|
|
20
|
+
className?: string[] | undefined;
|
|
21
|
+
style: BaseStyle;
|
|
22
|
+
caption: string;
|
|
23
|
+
}>;
|
|
24
|
+
buttonType: ComputedRef<"success" | "info" | "warning" | "primary" | "danger" | "blue">;
|
|
25
|
+
showIcon: ComputedRef<boolean>;
|
|
26
|
+
showText: ComputedRef<boolean>;
|
|
27
|
+
isShowPopover: Ref<boolean>;
|
|
28
|
+
showContent: ComputedRef<string>;
|
|
29
|
+
buttonContent: ComputedRef<string>;
|
|
30
|
+
clickHandle: DebouncedFunc<(event: Event) => Promise<void>>;
|
|
31
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface ChartSeriesConfigItem {
|
|
2
|
+
nameField?: string;
|
|
3
|
+
valueField?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ChartTransformFields {
|
|
7
|
+
xField?: string;
|
|
8
|
+
yField?: string;
|
|
9
|
+
seriesConfig?: ChartSeriesConfigItem[];
|
|
10
|
+
}
|
|
11
|
+
type ChartKind = 'bar' | 'line' | 'pie';
|
|
12
|
+
export declare function transformDataToChartOption(params: {
|
|
13
|
+
optionJson: string;
|
|
14
|
+
template: string;
|
|
15
|
+
chartKind: ChartKind;
|
|
16
|
+
data: Array<Record<string, any>>;
|
|
17
|
+
fields: ChartTransformFields;
|
|
18
|
+
}): Record<string, any>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useChart } from './useChart';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref, ShallowRef, ComputedRef } from 'vue';
|
|
2
|
+
import { PropsInstanceType } from '../../../constant';
|
|
3
|
+
|
|
4
|
+
type ChartProps = PropsInstanceType<'bar-chart'> | PropsInstanceType<'line-chart'> | PropsInstanceType<'pie-chart'>;
|
|
5
|
+
export declare function useChart(props: ChartProps, defaultTemplate: string): {
|
|
6
|
+
formItemRef: ShallowRef<null>;
|
|
7
|
+
chartRef: Ref<HTMLDivElement | null>;
|
|
8
|
+
renderError: Ref<string>;
|
|
9
|
+
formItemInstanceProps: ComputedRef<{
|
|
10
|
+
caption: any;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useCounter';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useIframe } from './useIframe';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PropsInstanceType } from '../../../constant';
|
|
2
|
+
import { ComputedRef, ShallowRef } from 'vue';
|
|
3
|
+
|
|
4
|
+
export declare function useIframe(props: PropsInstanceType<'iframe'>): {
|
|
5
|
+
iframeProps: ComputedRef<{
|
|
6
|
+
content: string;
|
|
7
|
+
width: string;
|
|
8
|
+
height: string;
|
|
9
|
+
}>;
|
|
10
|
+
instanceProps: ShallowRef<any>;
|
|
11
|
+
customStyle: ComputedRef<{
|
|
12
|
+
width: string;
|
|
13
|
+
height: string;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
@@ -24,3 +24,10 @@ export * from './useAttachmentPreview';
|
|
|
24
24
|
export * from './useForceUpdate';
|
|
25
25
|
export * from './useAttachmentPreview';
|
|
26
26
|
export * from './actionBar';
|
|
27
|
+
export * from './counter';
|
|
28
|
+
export * from './slider';
|
|
29
|
+
export * from './switch';
|
|
30
|
+
export * from './qrCode';
|
|
31
|
+
export * from './barcode';
|
|
32
|
+
export * from './iframe';
|
|
33
|
+
export * from './chart';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useQrCode } from './useQrCode';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PropsInstanceType } from '../../../constant';
|
|
2
|
+
import { ShallowRef, Ref, ComputedRef } from 'vue';
|
|
3
|
+
|
|
4
|
+
export declare function useQrCode(props: PropsInstanceType<'qr-code'>): {
|
|
5
|
+
formItemRef: ShallowRef<null>;
|
|
6
|
+
canvasRef: Ref<HTMLCanvasElement | null>;
|
|
7
|
+
renderError: Ref<string>;
|
|
8
|
+
qrDataUrl: Ref<string>;
|
|
9
|
+
formItemInstanceProps: ComputedRef<{
|
|
10
|
+
caption: any;
|
|
11
|
+
}>;
|
|
12
|
+
resolved: ComputedRef<{
|
|
13
|
+
caption: any;
|
|
14
|
+
defaultValue: any;
|
|
15
|
+
qrVersion: any;
|
|
16
|
+
errorCorrectionLevel: any;
|
|
17
|
+
codeMode: any;
|
|
18
|
+
size: any;
|
|
19
|
+
codeMargin: any;
|
|
20
|
+
qrColor: any;
|
|
21
|
+
align: any;
|
|
22
|
+
}>;
|
|
23
|
+
contentValue: ComputedRef<string>;
|
|
24
|
+
alignClass: ComputedRef<string>;
|
|
25
|
+
renderCode: () => Promise<void>;
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useSlider';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './useSwitch';
|
|
@@ -3,7 +3,7 @@ import { ControlRuntimeInstance } from '@byteluck-fe/model-driven-core-all';
|
|
|
3
3
|
import { Engine } from '@byteluck-fe/model-driven-engine';
|
|
4
4
|
|
|
5
5
|
export declare function useDisplay(params: {
|
|
6
|
-
instance: ControlRuntimeInstance<'select' | 'radio' | 'select-multiple' | 'checkbox' | 'amount' | 'varchar-column'>;
|
|
6
|
+
instance: ControlRuntimeInstance<'select' | 'radio' | 'select-multiple' | 'checkbox' | 'amount' | 'tag' | 'varchar-column'>;
|
|
7
7
|
rowIndex: number | undefined;
|
|
8
8
|
value?: string | string[];
|
|
9
9
|
display?: string | string[];
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventCaseHandlerPayload } from './type';
|
|
2
|
+
|
|
3
|
+
export default function CallActionHandler(eventPayload: EventCaseHandlerPayload): Promise<{
|
|
4
|
+
input: Record<string, any>;
|
|
5
|
+
output: {};
|
|
6
|
+
error: {
|
|
7
|
+
state: string;
|
|
8
|
+
message: string;
|
|
9
|
+
data?: undefined;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
input: Record<string, unknown>;
|
|
13
|
+
output: boolean;
|
|
14
|
+
error?: undefined;
|
|
15
|
+
} | {
|
|
16
|
+
input: Record<string, unknown>;
|
|
17
|
+
output: any;
|
|
18
|
+
error: any;
|
|
19
|
+
} | {
|
|
20
|
+
input: EventCaseHandlerPayload;
|
|
21
|
+
output: {};
|
|
22
|
+
error: {
|
|
23
|
+
data: unknown;
|
|
24
|
+
state: string;
|
|
25
|
+
message?: undefined;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
@@ -43,6 +43,8 @@ export declare enum EventHandlerMethod {
|
|
|
43
43
|
batchSetControlProps = "batchSetControlPropsHandler",
|
|
44
44
|
setState = "setState",
|
|
45
45
|
querySvc = "querySvc",
|
|
46
|
+
/** 调用业务行动(dataAction),与 querySvc 同属事件动作链 */
|
|
47
|
+
callAction = "callAction",
|
|
46
48
|
unknown = "unknown",
|
|
47
49
|
jsMethod = "jsMethod",
|
|
48
50
|
optPage = "optPage",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ControlRuntimeInstance, CONTROL_TYPE } from '@byteluck-fe/model-driven-core-all';
|
|
2
2
|
|
|
3
|
-
export declare const useOperateCache: (instance: ControlRuntimeInstance<CONTROL_TYPE.DEPARTMENT> | ControlRuntimeInstance<CONTROL_TYPE.DEPARTMENT2> | ControlRuntimeInstance<CONTROL_TYPE.EMPLOYEE> | ControlRuntimeInstance<CONTROL_TYPE.EMPLOYEE2> | ControlRuntimeInstance<CONTROL_TYPE.SELECT> | ControlRuntimeInstance<CONTROL_TYPE.SELECT_MULTIPLE> | ControlRuntimeInstance<CONTROL_TYPE.SELECT_RELATION> | ControlRuntimeInstance<CONTROL_TYPE.RADIO> | ControlRuntimeInstance<CONTROL_TYPE.AMOUNT> | ControlRuntimeInstance<CONTROL_TYPE.TREE> | ControlRuntimeInstance<CONTROL_TYPE.CHECKBOX> | ControlRuntimeInstance<CONTROL_TYPE.IMAGE> | ControlRuntimeInstance<CONTROL_TYPE.ATTACHMENT>) => {
|
|
3
|
+
export declare const useOperateCache: (instance: ControlRuntimeInstance<CONTROL_TYPE.DEPARTMENT> | ControlRuntimeInstance<CONTROL_TYPE.DEPARTMENT2> | ControlRuntimeInstance<CONTROL_TYPE.EMPLOYEE> | ControlRuntimeInstance<CONTROL_TYPE.EMPLOYEE2> | ControlRuntimeInstance<CONTROL_TYPE.SELECT> | ControlRuntimeInstance<CONTROL_TYPE.SELECT_MULTIPLE> | ControlRuntimeInstance<CONTROL_TYPE.TAG> | ControlRuntimeInstance<CONTROL_TYPE.SELECT_RELATION> | ControlRuntimeInstance<CONTROL_TYPE.RADIO> | ControlRuntimeInstance<CONTROL_TYPE.AMOUNT> | ControlRuntimeInstance<CONTROL_TYPE.TREE> | ControlRuntimeInstance<CONTROL_TYPE.CHECKBOX> | ControlRuntimeInstance<CONTROL_TYPE.IMAGE> | ControlRuntimeInstance<CONTROL_TYPE.ATTACHMENT>) => {
|
|
4
4
|
updateStorageCache: (value: string[], data: any[] | unknown) => void;
|
|
5
5
|
getCacheDisplayValue: (value?: unknown[] | string[] | string) => any[];
|
|
6
6
|
updateCacheDisplay: (data: any, valueCode?: string, displayCode?: string) => void;
|