From 66648129e4bc1d754a238576027f7f7172b477a2 Mon Sep 17 00:00:00 2001 From: Xc Date: Thu, 9 May 2024 21:51:40 +0800 Subject: [PATCH] =?UTF-8?q?backendruntimecontext=E4=B8=ADsetTokenValue?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- es/components/config/style/platform/index.d.ts | 2 +- es/components/config/upsert/index.d.ts | 2 +- es/components/extraFile/commit/index.d.ts | 8 ++++---- es/components/userEntityGrant/claim/ubPicker/index.d.ts | 4 ++-- es/components/userEntityGrant/upsert/index.d.ts | 4 ++-- es/context/BackendRuntimeContext.d.ts | 2 +- es/context/BackendRuntimeContext.js | 2 +- lib/context/BackendRuntimeContext.d.ts | 2 +- lib/context/BackendRuntimeContext.js | 2 +- src/context/BackendRuntimeContext.ts | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/es/components/config/style/platform/index.d.ts b/es/components/config/style/platform/index.d.ts index d8601ae9e..8835a6c5f 100644 --- a/es/components/config/style/platform/index.d.ts +++ b/es/components/config/style/platform/index.d.ts @@ -1,7 +1,7 @@ import { Style } from '../../../../types/Style'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; diff --git a/es/components/config/upsert/index.d.ts b/es/components/config/upsert/index.d.ts index 9bf014f88..a4b61c5c2 100644 --- a/es/components/config/upsert/index.d.ts +++ b/es/components/config/upsert/index.d.ts @@ -1,7 +1,7 @@ import { Config } from '../../../types/Config'; declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; diff --git a/es/components/extraFile/commit/index.d.ts b/es/components/extraFile/commit/index.d.ts index 52c60b59b..d5d6f1990 100644 --- a/es/components/extraFile/commit/index.d.ts +++ b/es/components/extraFile/commit/index.d.ts @@ -13,19 +13,19 @@ declare const _default: ) => unknown) | undefined; - type?: "button" | "submit" | "reset" | undefined; + type?: "reset" | "submit" | "button" | undefined; shape?: "default" | "rounded" | "rectangular" | undefined; children?: import("react").ReactNode; - } & Pick & import("react").ButtonHTMLAttributes, "id" | "onMouseDown" | "onMouseUp" | "onTouchStart" | "onTouchEnd"> & { + } & Pick & import("react").ButtonHTMLAttributes, "id" | "onMouseUp" | "onMouseDown" | "onTouchStart" | "onTouchEnd"> & { className?: string | undefined; style?: (import("react").CSSProperties & Partial>) | undefined; tabIndex?: number | undefined; diff --git a/es/components/userEntityGrant/claim/ubPicker/index.d.ts b/es/components/userEntityGrant/claim/ubPicker/index.d.ts index baeab2b34..3ff190b84 100644 --- a/es/components/userEntityGrant/claim/ubPicker/index.d.ts +++ b/es/components/userEntityGrant/claim/ubPicker/index.d.ts @@ -4,8 +4,8 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps< entity: keyof EntityDict; entityFilter: any; relationIds: string[]; - rule: "all" | "single" | "free"; - ruleOnRow: "all" | "single" | "free"; + rule: "single" | "all" | "free"; + ruleOnRow: "single" | "all" | "free"; onPickRelations: (ids: string[]) => void; onPickRows: (ids: string[]) => void; pickedRowIds: string[] | undefined; diff --git a/es/components/userEntityGrant/upsert/index.d.ts b/es/components/userEntityGrant/upsert/index.d.ts index bd07bdafe..5a575ac50 100644 --- a/es/components/userEntityGrant/upsert/index.d.ts +++ b/es/components/userEntityGrant/upsert/index.d.ts @@ -11,7 +11,7 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps< claimUrl: string; qrCodeType: QrCodeType; multiple: boolean; - rule: "all" | "single" | "free"; - ruleOnRow: "all" | "single" | "free"; + rule: "single" | "all" | "free"; + ruleOnRow: "single" | "all" | "free"; }>) => React.ReactElement; export default _default; diff --git a/es/context/BackendRuntimeContext.d.ts b/es/context/BackendRuntimeContext.d.ts index 0abf29bf6..dbed9893d 100644 --- a/es/context/BackendRuntimeContext.d.ts +++ b/es/context/BackendRuntimeContext.d.ts @@ -14,7 +14,7 @@ export declare abstract class BackendRuntimeContext; - setTokenValue(tokenValue: string, userId?: string): Promise; + setTokenValue(tokenValue?: string, userId?: string): Promise; setApplication(appId: string): Promise; initialize(data?: SerializedData, later?: boolean): Promise; getApplicationId(): ED["application"]["Schema"]["id"] | undefined; diff --git a/es/context/BackendRuntimeContext.js b/es/context/BackendRuntimeContext.js index 70f9ce0d7..5de6eefac 100644 --- a/es/context/BackendRuntimeContext.js +++ b/es/context/BackendRuntimeContext.js @@ -123,7 +123,7 @@ export class BackendRuntimeContext extends BRC { if (appId) { promises.push(this.setApplication(appId)); } - if (tokenValue) { + if (tokenValue || userId) { promises.push(this.setTokenValue(tokenValue, userId)); } if (promises.length > 0) { diff --git a/lib/context/BackendRuntimeContext.d.ts b/lib/context/BackendRuntimeContext.d.ts index 0abf29bf6..dbed9893d 100644 --- a/lib/context/BackendRuntimeContext.d.ts +++ b/lib/context/BackendRuntimeContext.d.ts @@ -14,7 +14,7 @@ export declare abstract class BackendRuntimeContext; - setTokenValue(tokenValue: string, userId?: string): Promise; + setTokenValue(tokenValue?: string, userId?: string): Promise; setApplication(appId: string): Promise; initialize(data?: SerializedData, later?: boolean): Promise; getApplicationId(): ED["application"]["Schema"]["id"] | undefined; diff --git a/lib/context/BackendRuntimeContext.js b/lib/context/BackendRuntimeContext.js index 8cd50f98b..193b10a0a 100644 --- a/lib/context/BackendRuntimeContext.js +++ b/lib/context/BackendRuntimeContext.js @@ -126,7 +126,7 @@ class BackendRuntimeContext extends oak_frontend_base_1.BackendRuntimeContext { if (appId) { promises.push(this.setApplication(appId)); } - if (tokenValue) { + if (tokenValue || userId) { promises.push(this.setTokenValue(tokenValue, userId)); } if (promises.length > 0) { diff --git a/src/context/BackendRuntimeContext.ts b/src/context/BackendRuntimeContext.ts index cafc97bb7..a3fe2babd 100644 --- a/src/context/BackendRuntimeContext.ts +++ b/src/context/BackendRuntimeContext.ts @@ -65,7 +65,7 @@ export abstract class BackendRuntimeContext 0) {