@declarion/react 0.54.0 → 0.56.0
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/dist-lib/{DraggableChildrenTable-CPoUY99R.js → DraggableChildrenTable-BV5sb8Uo.js} +32 -32
- package/dist-lib/{Grid--QAEby8k.js → Grid-DWgUPuZ3.js} +45 -45
- package/dist-lib/{JsonEditor-DoNmyrYd.js → JsonEditor-Dz1PQHC8.js} +2 -2
- package/dist-lib/{LayoutRenderer-BxZ7Nd9b.js → LayoutRenderer-C9AH9cXf.js} +716 -714
- package/dist-lib/{ListCardsBody-BPV4GPrv.js → ListCardsBody-DXcDg536.js} +29 -29
- package/dist-lib/{MarkdownRenderer-CIKuh_0i.js → MarkdownRenderer-CcSFc2N3.js} +1 -1
- package/dist-lib/{RefreshControl-DMLkZP3R.js → RefreshControl-CNtN8zSl.js} +41 -41
- package/dist-lib/{SmartDetailPage.impl-SnNu6Ug-.js → SmartDetailPage.impl-lskCd-WG.js} +492 -492
- package/dist-lib/{SmartListPage.impl-C73pR7Iw.js → SmartListPage.impl-CrGbdzyK.js} +744 -743
- package/dist-lib/{SmartRecordListPage.impl-rJjQZe1V.js → SmartRecordListPage.impl-Bkl9aZJ8.js} +129 -129
- package/dist-lib/{SortHeaderMenu-DQ_KrkWk.js → SortHeaderMenu-SYSAaqQJ.js} +1 -1
- package/dist-lib/{action-dispatch-DsuUS7ae.js → action-dispatch-CR4ajBtT.js} +179 -179
- package/dist-lib/api/auth.d.ts +1 -1
- package/dist-lib/api/batch.d.ts +1 -1
- package/dist-lib/api/data.d.ts +3 -3
- package/dist-lib/api/entities.d.ts +1 -1
- package/dist-lib/api/events.d.ts +13 -4
- package/dist-lib/api/params.d.ts +1 -1
- package/dist-lib/api/properties.d.ts +1 -1
- package/dist-lib/api/schema.d.ts +1 -1
- package/dist-lib/api/status.d.ts +1 -1
- package/dist-lib/{cardProjection-BadzqyeQ.js → cardProjection-CW5RIMko.js} +24 -24
- package/dist-lib/components/actions/ActionButton.d.ts +1 -1
- package/dist-lib/components/actions/ActionDialog.d.ts +1 -1
- package/dist-lib/components/actions/ActionRunner.d.ts +1 -1
- package/dist-lib/components/actions/ObjectActionBar.d.ts +3 -3
- package/dist-lib/components/actions/PropertyGridEditor.d.ts +2 -2
- package/dist-lib/components/actions/ResponsiveActionBar.d.ts +2 -2
- package/dist-lib/components/actions/RowActionsKebab.d.ts +1 -1
- package/dist-lib/components/agents/AgentConversationDrawer.d.ts +1 -1
- package/dist-lib/components/agents/AgentPicker.d.ts +1 -1
- package/dist-lib/components/agents/transcript-runs.d.ts +1 -1
- package/dist-lib/components/chrome/AssociationTabs.d.ts +1 -1
- package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +1 -1
- package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +2 -2
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +2 -2
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +3 -3
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +3 -3
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +3 -3
- package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/FieldsBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutColumn.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +3 -3
- package/dist-lib/components/detail-layout/LayoutRow.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutTabs.d.ts +1 -1
- package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/QuickAddForm.d.ts +2 -2
- package/dist-lib/components/detail-layout/SectionBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/StatusesBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/TimelineComposer.d.ts +2 -2
- package/dist-lib/components/detail-layout/blockMeta.d.ts +1 -1
- package/dist-lib/components/detail-layout/useQuickAdd.d.ts +2 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +1 -1
- package/dist-lib/components/fields/RefCombobox.d.ts +2 -2
- package/dist-lib/components/fields/cells/factories/host-icons.d.ts +1 -1
- package/dist-lib/components/fields/cells/registry.d.ts +2 -2
- package/dist-lib/components/fields/index.d.ts +3 -3
- package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +3 -3
- package/dist-lib/components/file-widgets/payload.d.ts +2 -2
- package/dist-lib/components/file-widgets/types.d.ts +1 -1
- package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +1 -1
- package/dist-lib/components/filters/FilterChips.d.ts +1 -1
- package/dist-lib/components/filters/FilterDrawer.d.ts +3 -3
- package/dist-lib/components/layout/CommandPalette.d.ts +2 -2
- package/dist-lib/components/layout/Layout.d.ts +3 -3
- package/dist-lib/components/layout/Rail.d.ts +2 -2
- package/dist-lib/components/layout/Sidebar.d.ts +1 -1
- package/dist-lib/components/layout/TabStrip.d.ts +1 -1
- package/dist-lib/components/layout/TenantChip.d.ts +1 -1
- package/dist-lib/components/layout/TopBar.d.ts +1 -1
- package/dist-lib/components/layout/tab-close.d.ts +1 -1
- package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
- package/dist-lib/components/list/PeekFieldCell.d.ts +2 -2
- package/dist-lib/components/list/QuickPeek.d.ts +3 -3
- package/dist-lib/components/list/ViewSwitcher.d.ts +1 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
- package/dist-lib/components/pages/ExportMenu.d.ts +1 -1
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -1
- package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
- package/dist-lib/components/pages/exportRequest.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardRow.d.ts +3 -3
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +3 -3
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +3 -3
- package/dist-lib/components/pages/list/ListHeader.d.ts +3 -3
- package/dist-lib/components/pages/list/ListNoRows.d.ts +1 -1
- package/dist-lib/components/pages/list/ListTable.d.ts +2 -2
- package/dist-lib/components/pages/list/ListTableRow.d.ts +1 -1
- package/dist-lib/components/pages/list/ListToolbar.d.ts +7 -5
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +1 -1
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -1
- package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +1 -1
- package/dist-lib/components/pages/list/cardProjection.d.ts +2 -2
- package/dist-lib/components/pages/list/columns.d.ts +3 -3
- package/dist-lib/components/pages/list/filter-meta.d.ts +2 -2
- package/dist-lib/components/pages/list/sortable-header.d.ts +1 -1
- package/dist-lib/components/pages/list/table-features.d.ts +1 -1
- package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +4 -4
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +1 -1
- package/dist-lib/components/pages/list/useListQuery.d.ts +4 -8
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +4 -4
- package/dist-lib/components/pages/list/useListSelection.d.ts +2 -2
- package/dist-lib/components/pages/list/useListSort.d.ts +1 -1
- package/dist-lib/components/pages/list/useListViews.d.ts +3 -3
- package/dist-lib/components/pages/list/useRowMenu.d.ts +3 -3
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +1 -1
- package/dist-lib/components/params/param-editors.d.ts +1 -1
- package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -1
- package/dist-lib/components/shared/MarkdownRenderer.d.ts +1 -1
- package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +2 -2
- package/dist-lib/embed/screen-location.d.ts +1 -1
- package/dist-lib/{field-classification-sMkkAEg9.js → field-classification-D6xQYn-h.js} +271 -400
- package/dist-lib/{format-count-B5SLlNOb.js → format-count-Dobmi-Ji.js} +238 -238
- package/dist-lib/hooks/useAgentConversation.d.ts +1 -1
- package/dist-lib/hooks/useAllEntityData.d.ts +1 -1
- package/dist-lib/hooks/useAssociatedData.d.ts +1 -1
- package/dist-lib/hooks/useBranding.d.ts +4 -4
- package/dist-lib/hooks/useBrandingChrome.d.ts +2 -2
- package/dist-lib/hooks/useChildrenData.d.ts +1 -1
- package/dist-lib/hooks/useCurrentScreen.d.ts +1 -1
- package/dist-lib/hooks/useCursorEntityData.d.ts +5 -5
- package/dist-lib/hooks/useEntity.d.ts +1 -1
- package/dist-lib/hooks/useEntityData.d.ts +8 -1
- package/dist-lib/hooks/useFilters.d.ts +1 -1
- package/dist-lib/hooks/useImpersonation.d.ts +1 -1
- package/dist-lib/hooks/useLiveObject.d.ts +2 -2
- package/dist-lib/hooks/useMutations.d.ts +3 -3
- package/dist-lib/hooks/useObject.d.ts +1 -1
- package/dist-lib/hooks/useParams.d.ts +2 -2
- package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
- package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
- package/dist-lib/hooks/useResponsiveMode.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +1 -2
- package/dist-lib/hooks/useScreen.d.ts +1 -1
- package/dist-lib/hooks/useTimelineData.d.ts +2 -2
- package/dist-lib/hooks/useViews.d.ts +1 -1
- package/dist-lib/index.js +811 -811
- package/dist-lib/lib/action-dispatch.d.ts +2 -2
- package/dist-lib/lib/actions.d.ts +1 -1
- package/dist-lib/lib/brand-tokens.d.ts +1 -1
- package/dist-lib/lib/branding.d.ts +1 -1
- package/dist-lib/lib/child-config.d.ts +1 -1
- package/dist-lib/lib/children-validation.d.ts +2 -2
- package/dist-lib/lib/document-templates.d.ts +1 -1
- package/dist-lib/lib/evidence-verdict.d.ts +1 -1
- package/dist-lib/lib/mass-edit.d.ts +1 -1
- package/dist-lib/lib/messages.d.ts +2 -2
- package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
- package/dist-lib/lib/realtime-reconcile.d.ts +1 -10
- package/dist-lib/lib/realtime-resync.d.ts +23 -0
- package/dist-lib/lib/rich-text.d.ts +1 -1
- package/dist-lib/lib/schema-routing.d.ts +1 -1
- package/dist-lib/lib/screen-back.d.ts +1 -1
- package/dist-lib/lib/size-value.d.ts +1 -1
- package/dist-lib/lib/toast.d.ts +2 -2
- package/dist-lib/lib/ui-actions.d.ts +1 -1
- package/dist-lib/lib/variants.d.ts +1 -1
- package/dist-lib/{peekDraftStore-CbHFwz_F.js → peekDraftStore-5wQ7lq_V.js} +17 -17
- package/dist-lib/{registry-D0RhCnEL.js → registry-CjgUaF7C.js} +511 -511
- package/dist-lib/stores/auth.d.ts +1 -1
- package/dist-lib/stores/preferences.d.ts +1 -1
- package/dist-lib/stores/realtime.d.ts +86 -19
- package/dist-lib/testing.d.ts +4 -4
- package/dist-lib/testing.js +40 -40
- package/dist-lib/types/api.d.ts +1 -1
- package/dist-lib/types/schema.d.ts +2 -2
- package/dist-lib/{useCurrentScreen-DVTXCj_K.js → useCurrentScreen-CzwzQpoW.js} +2476 -1967
- package/dist-lib/useListQuery-D7Hr5WM1.js +96 -0
- package/dist-lib/{useProperties-BcIz-MyO.js → useProperties-CqtCzFCr.js} +25 -25
- package/dist-lib/{useTabSearchMirror-UYCsopxP.js → useTabSearchMirror-C39U85cg.js} +13 -13
- package/dist-lib/{value-CQzGOI0F.js → value-Bo8C8WMU.js} +4 -4
- package/package.json +10 -10
- package/dist-lib/useListQuery-C2nq58YV.js +0 -90
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type UIActionContext } from "./ui-actions";
|
|
2
|
-
import type { UIStep } from "../types/schema";
|
|
1
|
+
import { type UIActionContext } from "./ui-actions.d.ts";
|
|
2
|
+
import type { UIStep } from "../types/schema.d.ts";
|
|
3
3
|
export declare function dispatchAction(code: string, action: {
|
|
4
4
|
ui_steps?: UIStep[];
|
|
5
5
|
handler?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Action, ActionCondition, Entity, LocalizedString, Schema } from "../types/schema";
|
|
1
|
+
import type { Action, ActionCondition, Entity, LocalizedString, Schema } from "../types/schema.d.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Row-menu navigation platform-default action codes. The server injects them
|
|
4
4
|
* into every entity and (for explicit action_layout trees) prepends them so the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BrandingTheme } from "../types/api";
|
|
1
|
+
import type { BrandingTheme } from "../types/api.d.ts";
|
|
2
2
|
/** The two color schemes, and the order their rules are emitted in. */
|
|
3
3
|
export declare const COLOR_SCHEMES: readonly ["light", "dark"];
|
|
4
4
|
export type BrandColorScheme = (typeof COLOR_SCHEMES)[number];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { BrandingChrome, BrandingIdentity, BrandingTheme, PublicBranding, PublicParam, PublicParamsResponse } from "../types/api";
|
|
1
|
+
import type { BrandingChrome, BrandingIdentity, BrandingTheme, PublicBranding, PublicParam, PublicParamsResponse } from "../types/api.d.ts";
|
|
2
2
|
export declare const BRANDING_PARAM_CODE = "branding";
|
|
3
3
|
export declare function paramsToRecord(list: PublicParam[] | undefined): Record<string, unknown>;
|
|
4
4
|
export declare function publicParamValue(publicParams: PublicParamsResponse | undefined, code: string): unknown;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChildDisplayMode, ChildQuickAdd, ChildRelation, CardsConfig, Entity, LayoutNode, LocalizedString, TimelineConfig } from "../types/schema";
|
|
1
|
+
import type { ChildDisplayMode, ChildQuickAdd, ChildRelation, CardsConfig, Entity, LayoutNode, LocalizedString, TimelineConfig } from "../types/schema.d.ts";
|
|
2
2
|
export interface ResolvedChildConfig {
|
|
3
3
|
entity: string;
|
|
4
4
|
foreign_key: string | string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Entity, Schema } from "../types/schema";
|
|
2
|
-
import type { PendingChildRow } from "../components/detail-layout/LayoutRenderer";
|
|
1
|
+
import type { Entity, Schema } from "../types/schema.d.ts";
|
|
2
|
+
import type { PendingChildRow } from "../components/detail-layout/LayoutRenderer.d.ts";
|
|
3
3
|
export declare function findMissingRequiredFields(entity: Entity, formData: Record<string, unknown>, isNew: boolean): string[];
|
|
4
4
|
export declare function findInvalidEmailFields(entity: Entity, formData: Record<string, unknown>): string[];
|
|
5
5
|
export declare function validatePendingChildren(pendingChildren: Record<string, PendingChildRow[]> | undefined, schema: Schema | undefined): Record<string, Record<string, string[]>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Entity, EntityField, PropertyDef, StatusGroupDef } from "../types/schema";
|
|
1
|
+
import type { Entity, EntityField, PropertyDef, StatusGroupDef } from "../types/schema.d.ts";
|
|
2
2
|
/** Target kinds mirror engine.MassEditTargetKind in Go. */
|
|
3
3
|
export type MassEditTargetKind = "field" | "status" | "property";
|
|
4
4
|
/** Metadata a property-grid row needs to render a target + editable value cell. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type LocalizedString } from "../types/schema";
|
|
2
|
-
import type { PublicParam } from "../types/api";
|
|
1
|
+
import { type LocalizedString } from "../types/schema.d.ts";
|
|
2
|
+
import type { PublicParam } from "../types/api.d.ts";
|
|
3
3
|
export declare const DEFAULT_LOCALE = "en";
|
|
4
4
|
/**
|
|
5
5
|
* A catalogue of localized strings keyed by code. The platform ships two and
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Every list-shaped cache the SDK ships. The REFETCH-ONLY kind is the cursor
|
|
3
|
+
* list, whose cold tables a key does not prune. docs/realtime.md.
|
|
4
|
+
*/
|
|
5
|
+
export declare const NARROWED_LIST_CACHE_KEYS: readonly ["entity-data", "entity-data-all"];
|
|
6
|
+
export declare const REFETCH_ONLY_LIST_CACHE_KEYS: readonly ["entity-data-cursor"];
|
|
7
|
+
export declare const LIST_CACHE_KEYS: readonly string[];
|
|
8
|
+
/**
|
|
9
|
+
* The entity code backing RecordDocumentsPanel's realtime flip, declared once
|
|
10
|
+
* so the "generated_document" ↔ RECORD_DOCUMENTS_KEY link is a single fact.
|
|
11
|
+
*/
|
|
12
|
+
export declare const GENERATED_DOCUMENT_ENTITY = "generated_document";
|
|
13
|
+
export declare function isListCacheKey(key: readonly unknown[]): boolean;
|
|
14
|
+
export declare function isRefetchOnlyListKey(key: readonly unknown[]): boolean;
|
|
15
|
+
/** A list, count or detail cache: the queries whose rows ARE an entity's rows. */
|
|
16
|
+
export declare function isEntityRowsKey(key: readonly unknown[]): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* The entity whose frames keep this cache fresh, or null when realtime does not
|
|
19
|
+
* keep it - the one list of realtime-backed caches.
|
|
20
|
+
*/
|
|
21
|
+
export declare function entityOfRealtimeQueryKey(key: readonly unknown[]): string | null;
|
|
22
|
+
export declare function isRealtimeBackedQueryKey(key: readonly unknown[]): boolean;
|
|
@@ -4,15 +4,7 @@
|
|
|
4
4
|
* "Frontend Invalidation".
|
|
5
5
|
*/
|
|
6
6
|
import type { QueryClient } from "@tanstack/react-query";
|
|
7
|
-
import type { ListParams } from "../types/api";
|
|
8
|
-
/**
|
|
9
|
-
* Every list-shaped cache the SDK ships, stated once and read by the reconciler
|
|
10
|
-
* and its tests alike. The REFETCH-ONLY kind is the cursor list, whose cold
|
|
11
|
-
* tables a key does not prune. docs/realtime.md.
|
|
12
|
-
*/
|
|
13
|
-
export declare const NARROWED_LIST_CACHE_KEYS: readonly ["entity-data", "entity-data-all"];
|
|
14
|
-
export declare const REFETCH_ONLY_LIST_CACHE_KEYS: readonly ["entity-data-cursor"];
|
|
15
|
-
export declare const LIST_CACHE_KEYS: readonly string[];
|
|
7
|
+
import type { ListParams } from "../types/api.d.ts";
|
|
16
8
|
/** One row a frame named, plus whether every frame naming it said `created`. */
|
|
17
9
|
export interface ChangedRow {
|
|
18
10
|
pk: Record<string, string>;
|
|
@@ -40,4 +32,3 @@ export declare function reconcileListCaches(queryClient: QueryClient, entity: st
|
|
|
40
32
|
* inside the deployment's own page ceiling and cannot be clamped.
|
|
41
33
|
*/
|
|
42
34
|
export declare function narrowedParams(params: ListParams, rows: ChangedRow[]): ListParams;
|
|
43
|
-
export declare function isListCacheKey(key: readonly unknown[]): boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type QueryClient, type QueryKey } from "@tanstack/react-query";
|
|
2
|
+
import { type ResyncScope } from "../stores/realtime.d.ts";
|
|
3
|
+
export interface ResyncRequest {
|
|
4
|
+
scope: ResyncScope;
|
|
5
|
+
/** The fixed keys of a `keys` scope. */
|
|
6
|
+
keys?: readonly QueryKey[];
|
|
7
|
+
standing?: boolean;
|
|
8
|
+
jitter?: boolean;
|
|
9
|
+
carriedMarks?: ReadonlyMap<string, number>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Opens a resync over the keys the request names, taking the current fetch
|
|
13
|
+
* generation. An `all` request folds into an `all` resync not yet issued: that
|
|
14
|
+
* one re-reads everything already, and a fold moves its generation forward so
|
|
15
|
+
* nothing fetched before the newer cause satisfies it.
|
|
16
|
+
*/
|
|
17
|
+
export declare function openResync(queryClient: QueryClient, request: ResyncRequest): void;
|
|
18
|
+
/**
|
|
19
|
+
* Mounts the engine for this client for as long as the caller is mounted -
|
|
20
|
+
* outside any SSE connection, so a token refresh, a tab hide or a reconnect
|
|
21
|
+
* leaves every obligation where it was.
|
|
22
|
+
*/
|
|
23
|
+
export declare function useResyncEngine(queryClient: QueryClient): void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { Schema } from "../types/schema";
|
|
1
|
+
import type { Schema } from "../types/schema.d.ts";
|
|
2
2
|
export declare function schemaDefaultRoute(schema: Schema | undefined): string | null;
|
|
3
3
|
export declare function accessibleRedirectPath(requestedPath: string, schema: Schema | undefined): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReturnTarget, type TabItem } from "../stores/tabs";
|
|
1
|
+
import { type ReturnTarget, type TabItem } from "../stores/tabs.d.ts";
|
|
2
2
|
/** Drop a leading `?` so a search string matches the canonical `TabItem.search`
|
|
3
3
|
* / `ReturnTarget.search` form (stored WITHOUT `?`). Empty in -> empty out. */
|
|
4
4
|
export declare function stripLeadingQuestion(search: string | undefined | null): string;
|
package/dist-lib/lib/toast.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ToastType } from "../components/shared/toast/DeclarionToast";
|
|
2
|
-
export type { ToastType, ToastAction } from "../components/shared/toast/DeclarionToast";
|
|
1
|
+
import { type ToastType } from "../components/shared/toast/DeclarionToast.d.ts";
|
|
2
|
+
export type { ToastType, ToastAction } from "../components/shared/toast/DeclarionToast.d.ts";
|
|
3
3
|
/** Per-call toast options. Severity sets the defaults; these override them. */
|
|
4
4
|
export interface ToastOptions {
|
|
5
5
|
/** Auto-dismiss after this many ms. 0 = sticky. Defaults to the variant's. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FilterRecord } from "./filter-evaluator";
|
|
2
|
-
import type { Entity, Screen } from "../types/schema";
|
|
2
|
+
import type { Entity, Screen } from "../types/schema.d.ts";
|
|
3
3
|
export declare function resolveEntityVariantCode(entity: Entity, record: FilterRecord): string | undefined;
|
|
4
4
|
export declare function variantActionCodesForRecord(entity: Entity | undefined, record: FilterRecord): ReadonlySet<string> | undefined;
|
|
5
5
|
export declare function commonVariantActionCodes(entity: Entity | undefined, records: readonly FilterRecord[]): ReadonlySet<string> | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { s as e } from "./DynamicIcon-DW5krHuX.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Lr as t, Mr as n, Vr as r, en as i, hr as a, i as o, kr as s, nr as c } from "./useCurrentScreen-CzwzQpoW.js";
|
|
3
3
|
import { useMemo as l, useRef as u, useState as d } from "react";
|
|
4
4
|
import { useQuery as f } from "@tanstack/react-query";
|
|
5
5
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
@@ -21,10 +21,10 @@ function v(e, t) {
|
|
|
21
21
|
//#endregion
|
|
22
22
|
//#region src/components/pages/DocumentsMenu.tsx
|
|
23
23
|
var y = "document-templates-available";
|
|
24
|
-
function b({ entityCode:
|
|
24
|
+
function b({ entityCode: a, scope: g, objectIds: v = [], viewState: b, selectedIds: w = [], capability: T, canManageTemplates: E = !1 }) {
|
|
25
25
|
let { run: D } = o(), O = u(null), [k, A] = d(!1), j = g === "detail" ? !!T?.generate_one : !!T?.generate_many, M = E && !j, { data: N, isLoading: P, error: F } = f({
|
|
26
|
-
queryKey: [y,
|
|
27
|
-
queryFn: async () => (await i("document.templates.available", { entity:
|
|
26
|
+
queryKey: [y, a],
|
|
27
|
+
queryFn: async () => (await i("document.templates.available", { entity: a })).result?.templates ?? [],
|
|
28
28
|
enabled: k || M,
|
|
29
29
|
staleTime: 6e4
|
|
30
30
|
}), I = P, L = l(() => (N ?? []).filter((e) => g === "detail" ? e.input_mode === "one" || e.input_mode === "global" : e.input_mode === "many" || e.input_mode === "global"), [g, N]), R = M && L.length > 0, z = j || R;
|
|
@@ -50,10 +50,10 @@ function b({ entityCode: s, scope: g, objectIds: v = [], viewState: b, selectedI
|
|
|
50
50
|
return [];
|
|
51
51
|
}
|
|
52
52
|
function H(e, t, n) {
|
|
53
|
-
let r = x(e),
|
|
53
|
+
let r = x(e), a = c(e.name) || e.code;
|
|
54
54
|
A(!1), D({
|
|
55
55
|
action: r,
|
|
56
|
-
title:
|
|
56
|
+
title: a,
|
|
57
57
|
execute: (r) => {
|
|
58
58
|
let a = {
|
|
59
59
|
template_code: e.code,
|
|
@@ -67,8 +67,8 @@ function b({ entityCode: s, scope: g, objectIds: v = [], viewState: b, selectedI
|
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
}
|
|
70
|
-
let { isPhone: U } =
|
|
71
|
-
return z ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(
|
|
70
|
+
let { isPhone: U } = n();
|
|
71
|
+
return z ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(r, {
|
|
72
72
|
ref: O,
|
|
73
73
|
kind: "ghost",
|
|
74
74
|
size: "sm",
|
|
@@ -78,36 +78,36 @@ function b({ entityCode: s, scope: g, objectIds: v = [], viewState: b, selectedI
|
|
|
78
78
|
"aria-label": "Generate",
|
|
79
79
|
title: "Generate",
|
|
80
80
|
children: U ? null : "Generate"
|
|
81
|
-
}), /* @__PURE__ */ h(
|
|
81
|
+
}), /* @__PURE__ */ h(t, {
|
|
82
82
|
open: k,
|
|
83
83
|
anchor: O.current,
|
|
84
84
|
onClose: () => A(!1),
|
|
85
85
|
align: "end",
|
|
86
86
|
width: 300,
|
|
87
87
|
children: [
|
|
88
|
-
I && /* @__PURE__ */ m(
|
|
88
|
+
I && /* @__PURE__ */ m(s, {
|
|
89
89
|
disabled: !0,
|
|
90
90
|
icon: /* @__PURE__ */ m(e.loader, { size: 12 }),
|
|
91
91
|
children: "Loading templates..."
|
|
92
92
|
}),
|
|
93
|
-
F && /* @__PURE__ */ m(
|
|
93
|
+
F && /* @__PURE__ */ m(s, {
|
|
94
94
|
disabled: !0,
|
|
95
95
|
icon: /* @__PURE__ */ m(e.warning, { size: 12 }),
|
|
96
96
|
children: F instanceof Error ? F.message : String(F)
|
|
97
97
|
}),
|
|
98
|
-
!I && !F && L.length === 0 && /* @__PURE__ */ m(
|
|
98
|
+
!I && !F && L.length === 0 && /* @__PURE__ */ m(s, {
|
|
99
99
|
disabled: !0,
|
|
100
100
|
icon: /* @__PURE__ */ m(e.file, { size: 12 }),
|
|
101
101
|
children: "No document templates"
|
|
102
102
|
}),
|
|
103
103
|
!I && !F && L.map((t) => {
|
|
104
104
|
let n = V(t);
|
|
105
|
-
return n.length === 0 ? null : S(t).flatMap((r) => n.map((n) => r.available ? /* @__PURE__ */ m(
|
|
105
|
+
return n.length === 0 ? null : S(t).flatMap((r) => n.map((n) => r.available ? /* @__PURE__ */ m(s, {
|
|
106
106
|
icon: /* @__PURE__ */ m(e.file, { size: 12 }),
|
|
107
107
|
onClick: () => H(t, n, r.format),
|
|
108
|
-
title:
|
|
108
|
+
title: c(t.description),
|
|
109
109
|
children: C(t, n, r.format)
|
|
110
|
-
}, `${t.source}:${t.code}:${n.kind}:${r.format}`) : /* @__PURE__ */ h(
|
|
110
|
+
}, `${t.source}:${t.code}:${n.kind}:${r.format}`) : /* @__PURE__ */ h(s, {
|
|
111
111
|
disabled: !0,
|
|
112
112
|
icon: /* @__PURE__ */ m(e.file, { size: 12 }),
|
|
113
113
|
title: r.disabled_reason,
|
|
@@ -122,7 +122,7 @@ function b({ entityCode: s, scope: g, objectIds: v = [], viewState: b, selectedI
|
|
|
122
122
|
})] }) : null;
|
|
123
123
|
}
|
|
124
124
|
function x(e) {
|
|
125
|
-
let t = new
|
|
125
|
+
let t = new a((e.params ?? []).map((e) => ({
|
|
126
126
|
...e,
|
|
127
127
|
name: e.name ?? ""
|
|
128
128
|
})));
|
|
@@ -143,7 +143,7 @@ function S(e) {
|
|
|
143
143
|
}));
|
|
144
144
|
}
|
|
145
145
|
function C(e, t, n) {
|
|
146
|
-
let r =
|
|
146
|
+
let r = c(e.name) || e.code, i = n ? ` (${n.toUpperCase()})` : "";
|
|
147
147
|
switch (t.kind) {
|
|
148
148
|
case "one": return `${r}${i}`;
|
|
149
149
|
case "selected": return `${r}${i} - selected rows`;
|