Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: Improve plugin infrastructure #1695

Merged
merged 1 commit into from Jul 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion frontend-html/src/model/actions-ui-tree/actions.ts
Expand Up @@ -31,7 +31,7 @@ import { crs_fieldBlur_ActionClick } from "model/actions/actionSync";

export default {
onActionClick(ctx: any) {
return flow(function*onActionClick(event: any, action: IAction) {
return flow(function*onActionClick(event: any, action: IAction, beforeHandleError?: () => void) {
try {
yield*crs_fieldBlur_ActionClick.runGenerator(function*() {
if (!action.isEnabled) {
Expand All @@ -58,6 +58,7 @@ export default {
}
});
} catch (e) {
beforeHandleError?.();
yield*handleError(ctx)(e);
throw e;
}
Expand Down
11 changes: 5 additions & 6 deletions frontend-html/src/model/entities/OrigamAPI.ts
Expand Up @@ -734,13 +734,12 @@ export class OrigamAPI implements IApi {
).data;
}

getBlobUrl(data: { downloadToken: string }) {
return `${this.urlPrefix}/Blob/${data.downloadToken}`;
}

async getBlob(data: { downloadToken: string }) {
window.open(`${this.urlPrefix}/Blob/${data.downloadToken}`);
/*return (
await axios.get(`${this.urlPrefix}/Blob/${data.downloadToken}`, {
headers: this.httpAuthHeader,
})
).data;*/
window.open(this.getBlobUrl(data));
}

async getUploadToken(data: {
Expand Down
1 change: 1 addition & 0 deletions frontend-html/src/model/entities/types/IApi.ts
Expand Up @@ -381,6 +381,7 @@ export interface IApi {
}): Promise<any>;

getBlob(data: { downloadToken: string }): Promise<any>;
getBlobUrl(data: { downloadToken: string }): string;

getUploadToken(data: {
SessionFormIdentifier: string;
Expand Down
2 changes: 2 additions & 0 deletions frontend-html/src/model/entities/types/IDataView.ts
Expand Up @@ -151,6 +151,8 @@ export interface IDataView extends IDataViewData {

setSelectedRowId(id: string | undefined): void;

focusFormViewControl(fieldId: string): void;

setRecords(rows: any[][]): Promise<any>;

appendRecords(rows: any[][]): void;
Expand Down