Skip to content

Commit edaa0a1

Browse files
committed
add theme hook & bugfixes
- fix async and runQueryLibrary in preview - fix: signature lazy - fix options context not exist in auto completion - fix(listView): fix listView's bug
1 parent 40a3a9c commit edaa0a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+877
-299
lines changed

client/packages/openblocks-core/lib/index.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,8 +3209,8 @@ function updateNodesV2Action(value) {
32093209
value: value,
32103210
};
32113211
}
3212-
function wrapActionExtraInfo(action, extraCompInfos) {
3213-
return __assign(__assign({}, action), { extraInfo: { compInfos: extraCompInfos } });
3212+
function wrapActionExtraInfo(action, extraInfos) {
3213+
return __assign(__assign({}, action), { extraInfo: __assign(__assign({}, action.extraInfo), extraInfos) });
32143214
}
32153215
function deferAction(action) {
32163216
return __assign(__assign({}, action), { priority: "defer" });

client/packages/openblocks-core/lib/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ declare type ExtraActionType =
504504
| "recover"
505505
| "upgrade";
506506
declare type ActionExtraInfo = {
507-
compInfos: {
507+
compInfos?: {
508508
compName: string;
509509
compType: string;
510510
type: ExtraActionType;
@@ -631,7 +631,7 @@ declare function changeChildAction(childName: string, value: JSONValue): CompAct
631631
declare function updateNodesV2Action(value: any): UpdateNodesV2Action;
632632
declare function wrapActionExtraInfo<T extends CompAction>(
633633
action: T,
634-
extraCompInfos: ActionExtraInfo["compInfos"]
634+
extraInfos: ActionExtraInfo
635635
): T;
636636
declare function deferAction<T extends CompAction>(action: T): T;
637637

client/packages/openblocks-core/lib/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3201,8 +3201,8 @@ function updateNodesV2Action(value) {
32013201
value: value,
32023202
};
32033203
}
3204-
function wrapActionExtraInfo(action, extraCompInfos) {
3205-
return __assign(__assign({}, action), { extraInfo: { compInfos: extraCompInfos } });
3204+
function wrapActionExtraInfo(action, extraInfos) {
3205+
return __assign(__assign({}, action), { extraInfo: __assign(__assign({}, action.extraInfo), extraInfos) });
32063206
}
32073207
function deferAction(action) {
32083208
return __assign(__assign({}, action), { priority: "defer" });

client/packages/openblocks-core/src/actions/actionTypes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export type ExtraActionType =
5252
| "recover"
5353
| "upgrade";
5454
export type ActionExtraInfo = {
55-
compInfos: {
55+
compInfos?: {
5656
compName: string;
5757
compType: string;
5858
type: ExtraActionType;

client/packages/openblocks-core/src/actions/actions.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
import { JSONValue } from "util/jsonTypes";
1+
import { CompConstructor } from "baseComps/comp";
22
import _ from "lodash";
3+
import { JSONValue } from "util/jsonTypes";
34
import {
4-
CompAction,
55
ActionContextType,
66
ActionExtraInfo,
77
AddChildAction,
88
BroadcastAction,
99
ChangeValueAction,
10+
CompAction,
1011
CompActionTypes,
1112
CustomAction,
1213
ExecuteQueryAction,
1314
MultiChangeAction,
1415
RenameAction,
16+
ReplaceCompAction,
1517
RouteByNameAction,
1618
SimpleCompAction,
19+
TriggerModuleEventAction,
1720
UpdateActionContextAction,
1821
UpdateNodesV2Action,
19-
TriggerModuleEventAction,
20-
ReplaceCompAction,
2122
} from "./actionTypes";
22-
import { CompConstructor } from "baseComps/comp";
2323

2424
export function customAction<DataType>(value: DataType): CustomAction<DataType> {
2525
return {
@@ -189,9 +189,9 @@ export function updateNodesV2Action(value: any): UpdateNodesV2Action {
189189

190190
export function wrapActionExtraInfo<T extends CompAction>(
191191
action: T,
192-
extraCompInfos: ActionExtraInfo["compInfos"]
192+
extraInfos: ActionExtraInfo
193193
): T {
194-
return { ...action, extraInfo: { compInfos: extraCompInfos } };
194+
return { ...action, extraInfo: { ...action.extraInfo, ...extraInfos } };
195195
}
196196

197197
export function deferAction<T extends CompAction>(action: T): T {

client/packages/openblocks-design/src/components/Label.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export const labelCss: any = css`
66
77
font-size: 13px;
88
color: #222222;
9+
line-height: 1;
910
1011
:hover {
1112
cursor: default;

client/packages/openblocks-design/src/components/control.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ const ChildrenWrapper = styled.div<{ layout: ControlLayout }>`
9898

9999
const LastNode = styled.div`
100100
margin-left: 8px;
101+
display: inline-flex;
102+
align-items: center;
101103
102104
.ant-select-selection-item {
103105
width: 40px;

client/packages/openblocks-design/src/components/keyValueList.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ const AddBtn = styled(TacoButton)`
6565
&:hover ${AddIcon} g {
6666
stroke: #315efb;
6767
}
68+
69+
> svg {
70+
height: 8px;
71+
width: 8px;
72+
}
6873
`;
6974

7075
export const KeyValueList = (props: {

client/packages/openblocks-design/src/components/toolTip.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ const Label = styled.div<{ border?: boolean }>`
168168
}
169169
}};
170170
${labelCss};
171-
line-height: normal;
172171
margin: 0;
173172
width: fit-content;
174173
`;
Lines changed: 11 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)