Merge branch 'master' of github.com:appsmithorg/appsmith
This commit is contained in:
commit
2be2d441c6
|
|
@ -287,6 +287,7 @@ export const ReduxActionTypes: { [key: string]: string } = {
|
|||
WIDGET_ADD_CHILDREN: "WIDGET_ADD_CHILDREN",
|
||||
SET_EVALUATED_TREE: "SET_EVALUATED_TREE",
|
||||
BATCH_UPDATES_SUCCESS: "BATCH_UPDATES_SUCCESS",
|
||||
START_EVALUATION: "START_EVALUATION",
|
||||
};
|
||||
|
||||
export type ReduxActionType = typeof ReduxActionTypes[keyof typeof ReduxActionTypes];
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ function* initializeEditorSaga(
|
|||
initializeEditorAction: ReduxAction<InitializeEditorPayload>,
|
||||
) {
|
||||
const { applicationId, pageId } = initializeEditorAction.payload;
|
||||
yield put({ type: ReduxActionTypes.START_EVALUATION });
|
||||
// Step 1: Start getting all the data needed by the
|
||||
yield all([
|
||||
put(fetchPageList(applicationId)),
|
||||
|
|
@ -151,6 +152,7 @@ export function* initializeAppViewerSaga(
|
|||
action: ReduxAction<{ applicationId: string }>,
|
||||
) {
|
||||
const { applicationId } = action.payload;
|
||||
yield put({ type: ReduxActionTypes.START_EVALUATION });
|
||||
yield all([
|
||||
put(fetchActionsForView(applicationId)),
|
||||
put(fetchPageList(applicationId)),
|
||||
|
|
|
|||
|
|
@ -80,10 +80,10 @@ function* evaluateTreeSaga() {
|
|||
|
||||
export function* evaluateSingleValue(binding: string) {
|
||||
if (evaluationWorker) {
|
||||
const evalTree = yield select(getDataTree);
|
||||
const unEvalTree = yield select(getUnevaluatedDataTree);
|
||||
evaluationWorker.postMessage({
|
||||
action: EVAL_WORKER_ACTIONS.EVAL_SINGLE,
|
||||
dataTree: evalTree,
|
||||
dataTree: unEvalTree,
|
||||
binding,
|
||||
});
|
||||
const workerResponse = yield take(workerChannel);
|
||||
|
|
@ -215,13 +215,6 @@ function* evaluationChangeListenerSaga() {
|
|||
|
||||
export default function* evaluationSagaListeners() {
|
||||
yield all([
|
||||
takeLatest(
|
||||
ReduxActionTypes.INITIALIZE_EDITOR_SUCCESS,
|
||||
evaluationChangeListenerSaga,
|
||||
),
|
||||
takeLatest(
|
||||
ReduxActionTypes.INITIALIZE_PAGE_VIEWER_SUCCESS,
|
||||
evaluationChangeListenerSaga,
|
||||
),
|
||||
takeLatest(ReduxActionTypes.START_EVALUATION, evaluationChangeListenerSaga),
|
||||
]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,8 @@ ctx.addEventListener("message", e => {
|
|||
}
|
||||
case EVAL_WORKER_ACTIONS.EVAL_SINGLE: {
|
||||
const { binding, dataTree } = rest;
|
||||
const withFunctions = addFunctions(dataTree);
|
||||
const evalTree = getEvaluatedDataTree(dataTree);
|
||||
const withFunctions = addFunctions(evalTree);
|
||||
const value = getDynamicValue(binding, withFunctions, false);
|
||||
ctx.postMessage({ value, errors: ERRORS });
|
||||
ERRORS = [];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user