@lmzhen/dsh-evolution-merge-ui 0.30.0 → 0.30.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/lib/client.js +23 -0
- package/lib/types/client/api.d.ts +3 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -149,6 +149,27 @@ window.__ModuleLoader__.load({
|
|
|
149
149
|
failure: answer.failure
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
|
+
async function body(id, side) {
|
|
153
|
+
const url = HOST_ROUTES.body + "?id=" + encodeURIComponent(id) + "&side=" + side;
|
|
154
|
+
const answer = await requestJson(fetch, url, { headers: { accept: "application/json" } });
|
|
155
|
+
return answer.ok ? {
|
|
156
|
+
ok: true,
|
|
157
|
+
payload: answer.data
|
|
158
|
+
} : {
|
|
159
|
+
ok: false,
|
|
160
|
+
failure: answer.failure
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
async function history() {
|
|
164
|
+
const answer = await requestJson(fetch, HOST_ROUTES.history, { headers: { accept: "application/json" } });
|
|
165
|
+
return answer.ok ? {
|
|
166
|
+
ok: true,
|
|
167
|
+
payload: answer.data
|
|
168
|
+
} : {
|
|
169
|
+
ok: false,
|
|
170
|
+
failure: answer.failure
|
|
171
|
+
};
|
|
172
|
+
}
|
|
152
173
|
//#endregion
|
|
153
174
|
//#region src/client/seam.ts
|
|
154
175
|
const PANEL_ID = "merge";
|
|
@@ -607,6 +628,8 @@ window.__ModuleLoader__.load({
|
|
|
607
628
|
rows: [],
|
|
608
629
|
loadView: view,
|
|
609
630
|
loadRows: rows,
|
|
631
|
+
loadBody: body,
|
|
632
|
+
loadHistory: history,
|
|
610
633
|
t
|
|
611
634
|
})
|
|
612
635
|
}, MergePanel);
|