@declarion/react 0.32.0 → 0.34.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/{ActionRunner-CaSrGpBi.js → ActionRunner-UGGvGypS.js} +676 -543
- package/dist-lib/{DraggableChildrenTable-CAHg7paQ.js → DraggableChildrenTable-CljdYXd_.js} +30 -30
- package/dist-lib/DynamicIcon-BWO6QtNF.js +261 -0
- package/dist-lib/{Grid-DDbBhqcl.js → Grid-5Y_iPqNW.js} +2 -2
- package/dist-lib/{LayoutRenderer-CelsqsZ6.js → LayoutRenderer-CoTMmvNW.js} +712 -712
- package/dist-lib/{MarkdownRenderer-DThy2ixe.js → MarkdownRenderer-unbncYEV.js} +1 -1
- package/dist-lib/RefreshControl-oeKhCjEC.js +837 -0
- package/dist-lib/SmartDetailPage.impl-Caxd97q6.js +1771 -0
- package/dist-lib/{SmartRecordListPage.impl-BKIpTNK7.js → SmartRecordListPage.impl-BF_ieDc2.js} +258 -258
- package/dist-lib/components/pages/DocumentsMenu.d.ts +22 -0
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +42 -0
- package/dist-lib/components/pages/list/ListHeader.d.ts +1 -11
- package/dist-lib/components/primitives/Icons.d.ts +1 -0
- package/dist-lib/components/primitives/Tooltip.d.ts +30 -0
- package/dist-lib/components/primitives/index.d.ts +2 -0
- package/dist-lib/components/shared/ActionResultDialog.d.ts +4 -0
- package/dist-lib/components/shared/RecordHeader.d.ts +2 -1
- package/dist-lib/components/shared/ResponsiveActionBar.d.ts +9 -1
- package/dist-lib/icons.js +1 -1
- package/dist-lib/index.js +2288 -2334
- package/dist-lib/lib/document-templates.d.ts +12 -0
- package/dist-lib/lib/download.d.ts +20 -0
- package/dist-lib/lib/record-documents-key.d.ts +1 -0
- package/dist-lib/{registry-KQyyL5Gt.js → registry-DnPK3Msj.js} +826 -826
- package/dist-lib/testing.js +25 -25
- package/dist-lib/types/api.d.ts +1 -9
- package/dist-lib/types/schema.d.ts +17 -1
- package/dist-lib/{useProperties-D74hyWIa.js → useProperties-CgRhBh0k.js} +52 -52
- package/dist-lib/{value-BfXXl5EE.js → value-GmL5BVFm.js} +29 -29
- package/package.json +1 -1
- package/dist-lib/DynamicIcon-DCRdxxZ7.js +0 -260
- package/dist-lib/RefreshControl-CorluL6r.js +0 -582
- package/dist-lib/SmartDetailPage.impl-USIxbl-8.js +0 -1532
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Schema } from "../types/schema";
|
|
2
|
+
/**
|
|
3
|
+
* Heuristic used by DocumentsMenu mount sites to decide whether the caller
|
|
4
|
+
* can manage TENANT document templates: the `document_template` entity is
|
|
5
|
+
* present in the projected schema (schema.entities is already RBAC-pruned -
|
|
6
|
+
* `document_template` appears only when the caller can read it). Gates the
|
|
7
|
+
* lazy `document.templates.available` tenant-template visibility probe
|
|
8
|
+
* (Business Case 6, plan 2026-07-08-document-generation-hardening) so a
|
|
9
|
+
* caller who cannot manage templates never fires it - the Haia default.
|
|
10
|
+
* One shared predicate so SmartDetailPage and SmartListPage agree.
|
|
11
|
+
*/
|
|
12
|
+
export declare function canManageDocumentTemplates(schema: Schema | undefined): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare class DownloadError extends Error {
|
|
2
|
+
readonly code?: string | undefined;
|
|
3
|
+
constructor(message: string, code?: string | undefined);
|
|
4
|
+
}
|
|
5
|
+
/** True when `err` is the download failing because the underlying blob is
|
|
6
|
+
* gone (purged, superseded, never generated). Callers use this to disable a
|
|
7
|
+
* dead Download button instead of leaving it re-clickable against nothing. */
|
|
8
|
+
export declare function isMissingArtifactError(err: unknown): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Fetches `url` as an authenticated (same-origin cookie) request, then
|
|
11
|
+
* triggers a browser download of the resulting blob. Refuses any URL whose
|
|
12
|
+
* scheme is not in the safeExternalUrl allowlist (http/https/mailto/relative)
|
|
13
|
+
* BEFORE issuing the fetch - a `javascript:`/`data:` URL never reaches
|
|
14
|
+
* `fetch` or an anchor's `href`.
|
|
15
|
+
*
|
|
16
|
+
* Blob-fetch (not a bare `<a href>`) so a non-2xx response (404 FILE_NOT_FOUND,
|
|
17
|
+
* 403, etc.) surfaces as a thrown DownloadError instead of silently
|
|
18
|
+
* navigating the browser to an error page.
|
|
19
|
+
*/
|
|
20
|
+
export declare function downloadFile(url: string, filename?: string): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RECORD_DOCUMENTS_KEY: "record-documents";
|