@nexia/sdk 0.8.3 → 0.8.4
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/changelog/0.8.4/en.md +12 -0
- package/changelog/0.8.4/ko.md +12 -0
- package/dist/host.d.ts +14 -0
- package/dist/host.js +8 -0
- package/dist/platform.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: published
|
|
3
|
+
version: 0.8.4
|
|
4
|
+
date: 2026-10-12
|
|
5
|
+
title: Shared widget queries and dashboard refresh
|
|
6
|
+
description: Custom App widgets use the host transport and participate in dashboard refresh.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
- Use `useWidgetQueryRuntime()` from `@nexia/sdk/host` for scoped widget reads and cancellation.
|
|
10
|
+
- Register active non-preview query keys with `useDashboardDataSource()` to include custom widgets in dashboard refresh and update times.
|
|
11
|
+
- `SelfWorkContext` declares the legal-entity field already supplied by Core. Update typed fixtures accordingly.
|
|
12
|
+
- Requires Core 0.8.0 host bindings. Rebuild consuming App bundles and reload existing browser sessions when adopting the new query endpoint.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
status: published
|
|
3
|
+
version: 0.8.4
|
|
4
|
+
date: 2026-10-12
|
|
5
|
+
title: 공통 위젯 조회와 대시보드 새로고침
|
|
6
|
+
description: 사용자 정의 App 위젯이 호스트 조회 기능과 대시보드 새로고침을 사용합니다.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
- `@nexia/sdk/host`의 `useWidgetQueryRuntime()`으로 범위가 지정된 위젯 조회와 요청 취소를 처리합니다.
|
|
10
|
+
- 활성 상태이며 미리보기가 아닌 조회 키를 `useDashboardDataSource()`에 등록하면 대시보드 새로고침과 갱신 시각에 참여합니다.
|
|
11
|
+
- `SelfWorkContext`에 Core가 이미 제공하던 법인 필드를 명시합니다. 타입을 사용하는 테스트 데이터를 맞춰 주세요.
|
|
12
|
+
- Core 0.8.0 호스트 연결이 필요합니다. 새 조회 경로 적용 시 사용 App 번들을 다시 빌드하고 기존 브라우저 화면을 새로고침하세요.
|
package/dist/host.d.ts
CHANGED
|
@@ -252,6 +252,8 @@ export interface NexiaAppFrontendHostBindings {
|
|
|
252
252
|
WorkSurface: typeof WorkSurface;
|
|
253
253
|
};
|
|
254
254
|
hooks: {
|
|
255
|
+
useWidgetQueryRuntime: () => WidgetQueryRuntime;
|
|
256
|
+
useDashboardDataSource: (queryKey: readonly unknown[], enabled?: boolean) => void;
|
|
255
257
|
useContextQuery: () => ContextQueryResult;
|
|
256
258
|
useAffiliatedOperatingUnits: (tenantId: string | undefined, legalEntityPublicId: string | null | undefined, permission: string, enabled?: boolean) => OperatingUnitQueryResult;
|
|
257
259
|
useAgentToolDataFreshness: (options: AgentToolDataFreshnessInput) => AgentToolDataFreshnessResult;
|
|
@@ -463,6 +465,18 @@ export declare function WorkSurface(props: WorkSurfaceProps): ReactNode;
|
|
|
463
465
|
export declare function useContextQuery(): ContextQueryResult;
|
|
464
466
|
export declare function useAffiliatedOperatingUnits(tenantId: string | undefined, legalEntityPublicId: string | null | undefined, permission: string, enabled?: boolean): OperatingUnitQueryResult;
|
|
465
467
|
export declare function useAgentToolDataInvalidation(enabled?: boolean): void;
|
|
468
|
+
/** Environment-owned, read-only widget queries. The host preserves actor and runtime scope. */
|
|
469
|
+
export interface WidgetQueryRuntime {
|
|
470
|
+
readonly tenantId: string;
|
|
471
|
+
readonly legalEntityPublicId: string | null;
|
|
472
|
+
readonly timezone: string;
|
|
473
|
+
readonly supportsRealtimeInvalidation: boolean;
|
|
474
|
+
query<TResponse = unknown>(tool: string, args?: Record<string, unknown>, signal?: AbortSignal): Promise<TResponse>;
|
|
475
|
+
}
|
|
476
|
+
/** Use the surrounding widget runtime in both host and isolated App renderers. */
|
|
477
|
+
export declare function useWidgetQueryRuntime(): WidgetQueryRuntime;
|
|
478
|
+
/** Register a widget's query with its surrounding dashboard's refresh control. */
|
|
479
|
+
export declare function useDashboardDataSource(queryKey: readonly unknown[], enabled?: boolean): void;
|
|
466
480
|
export interface AgentToolDataFreshnessInput {
|
|
467
481
|
enabled: boolean;
|
|
468
482
|
refreshMs: number;
|
package/dist/host.js
CHANGED
|
@@ -498,6 +498,14 @@ export function useAffiliatedOperatingUnits(tenantId, legalEntityPublicId, permi
|
|
|
498
498
|
export function useAgentToolDataInvalidation(enabled = true) {
|
|
499
499
|
host().hooks.useAgentToolDataInvalidation(enabled);
|
|
500
500
|
}
|
|
501
|
+
/** Use the surrounding widget runtime in both host and isolated App renderers. */
|
|
502
|
+
export function useWidgetQueryRuntime() {
|
|
503
|
+
return host().hooks.useWidgetQueryRuntime();
|
|
504
|
+
}
|
|
505
|
+
/** Register a widget's query with its surrounding dashboard's refresh control. */
|
|
506
|
+
export function useDashboardDataSource(queryKey, enabled = true) {
|
|
507
|
+
host().hooks.useDashboardDataSource(queryKey, enabled);
|
|
508
|
+
}
|
|
501
509
|
/**
|
|
502
510
|
* The freshness half of a widget's useQuery options, resolved by the host.
|
|
503
511
|
* Polling pauses while the surrounding Work Tab is parked, the host enforces
|
package/dist/platform.d.ts
CHANGED