@lumerahq/ui 0.7.6 → 0.7.7
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/{RecordSheet-BvHHP8P4.js → RecordSheet-M1ux7vW7.js} +2 -2
- package/dist/{api-BrhR_Jjl.js → api-DXN1wKkz.js} +1 -1
- package/dist/{automations-XN4WPV_g.js → automations-OzVpAuzv.js} +64 -24
- package/dist/components/index.js +1 -1
- package/dist/hooks/index.js +2 -2
- package/dist/index.js +29 -27
- package/dist/lib/bridge.d.ts +25 -5
- package/dist/lib/bridge.d.ts.map +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +26 -24
- package/dist/{use-automation-run-Cecvf4Aq.js → use-automation-run-hQ7DMZ8f.js} +1 -1
- package/dist/{use-sql-table-B7C06_An.js → use-sql-table-DSt5nL70.js} +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import React__default, { forwardRef, createElement, useState, useLayoutEffect, useCallback } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { d as automationStatuses, r as getAutomationRunFileDownloadUrl, y as listAutomationRunFiles } from "./automations-OzVpAuzv.js";
|
|
5
5
|
import { p as clsx, o as cn, a as formatCellValue } from "./formatters-Baj7FkeG.js";
|
|
6
|
-
import { u as useAutomationRun } from "./use-automation-run-
|
|
6
|
+
import { u as useAutomationRun } from "./use-automation-run-hQ7DMZ8f.js";
|
|
7
7
|
import * as ReactDOM from "react-dom";
|
|
8
8
|
const toKebabCase = (string) => string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
9
9
|
const toCamelCase = (string) => string.replace(
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as parentApiRequest, B as BridgeError } from "./automations-
|
|
1
|
+
import { p as parentApiRequest, B as BridgeError } from "./automations-OzVpAuzv.js";
|
|
2
2
|
const API_PREFIX = "/api";
|
|
3
3
|
const buildUrl = (path) => {
|
|
4
4
|
const normalized = path.startsWith("/") ? path : `/${path}`;
|
|
@@ -20,6 +20,40 @@ const EXPECTED_PARENT_ORIGINS = uniqueStrings([
|
|
|
20
20
|
...parseParentOrigins(void 0),
|
|
21
21
|
EXPECTED_PARENT_ORIGIN
|
|
22
22
|
]);
|
|
23
|
+
const BRIDGE_WINDOW_NAME_PREFIX = "__lumera_bridge__=";
|
|
24
|
+
const normalizeConfiguredParentOrigins = (origins) => uniqueStrings((origins ?? []).map((origin) => origin.trim()).filter(Boolean));
|
|
25
|
+
const mergeBridgeRuntimeConfig = (current, next) => ({
|
|
26
|
+
parentOrigins: normalizeConfiguredParentOrigins([...current.parentOrigins ?? [], ...next?.parentOrigins ?? []])
|
|
27
|
+
});
|
|
28
|
+
const parseBridgeRuntimeConfig = (raw) => {
|
|
29
|
+
try {
|
|
30
|
+
const parsed = JSON.parse(raw);
|
|
31
|
+
return {
|
|
32
|
+
parentOrigins: normalizeConfiguredParentOrigins(parsed.parentOrigins)
|
|
33
|
+
};
|
|
34
|
+
} catch {
|
|
35
|
+
return {};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const readBridgeRuntimeConfigFromWindowName = () => {
|
|
39
|
+
if (typeof window === "undefined") return {};
|
|
40
|
+
const token = window.name.split(/\s+/).find((part) => part.startsWith(BRIDGE_WINDOW_NAME_PREFIX));
|
|
41
|
+
if (!token) return {};
|
|
42
|
+
const encoded = token.slice(BRIDGE_WINDOW_NAME_PREFIX.length);
|
|
43
|
+
if (!encoded) return {};
|
|
44
|
+
try {
|
|
45
|
+
return parseBridgeRuntimeConfig(decodeURIComponent(encoded));
|
|
46
|
+
} catch {
|
|
47
|
+
return {};
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
let bridgeRuntimeConfig = readBridgeRuntimeConfigFromWindowName();
|
|
51
|
+
const trustedParentOrigins = () => uniqueStrings([...EXPECTED_PARENT_ORIGINS, ...bridgeRuntimeConfig.parentOrigins ?? []]);
|
|
52
|
+
const serializeBridgeRuntimeConfig = (config) => {
|
|
53
|
+
const normalized = normalizeConfiguredParentOrigins(config.parentOrigins);
|
|
54
|
+
if (normalized.length === 0) return "";
|
|
55
|
+
return `${BRIDGE_WINDOW_NAME_PREFIX}${encodeURIComponent(JSON.stringify({ parentOrigins: normalized }))}`;
|
|
56
|
+
};
|
|
23
57
|
class BridgeError extends Error {
|
|
24
58
|
status;
|
|
25
59
|
response;
|
|
@@ -132,7 +166,7 @@ const matchesOriginPattern = (origin, pattern) => {
|
|
|
132
166
|
const isAllowedParentOrigin = (origin, currentOrigin) => {
|
|
133
167
|
if (!origin) return false;
|
|
134
168
|
if (origin === currentOrigin) return true;
|
|
135
|
-
return
|
|
169
|
+
return trustedParentOrigins().some((pattern) => matchesOriginPattern(origin, pattern));
|
|
136
170
|
};
|
|
137
171
|
const PLAYGROUND_FLAG = "__playground__";
|
|
138
172
|
const isPlaygroundMode = () => typeof window !== "undefined" && window.self !== window.top && window.name.includes(PLAYGROUND_FLAG);
|
|
@@ -269,9 +303,10 @@ const ensureRouteSync = () => {
|
|
|
269
303
|
});
|
|
270
304
|
};
|
|
271
305
|
const handleMessage = (event) => {
|
|
306
|
+
const allowedOrigins = trustedParentOrigins();
|
|
272
307
|
if (!isAllowedParentOrigin(event.origin, window.location.origin)) {
|
|
273
308
|
log("Ignoring message from unexpected origin", {
|
|
274
|
-
expected:
|
|
309
|
+
expected: allowedOrigins,
|
|
275
310
|
received: event.origin,
|
|
276
311
|
current: window.location.origin
|
|
277
312
|
});
|
|
@@ -306,6 +341,9 @@ const ensureListener = () => {
|
|
|
306
341
|
window.addEventListener("message", handleMessage);
|
|
307
342
|
ensureRouteSync();
|
|
308
343
|
};
|
|
344
|
+
const configureBridge = (config) => {
|
|
345
|
+
bridgeRuntimeConfig = mergeBridgeRuntimeConfig(bridgeRuntimeConfig, config);
|
|
346
|
+
};
|
|
309
347
|
const isEmbedded = () => typeof window !== "undefined" && window.self !== window.top;
|
|
310
348
|
const postReadyMessage = () => {
|
|
311
349
|
if (typeof window === "undefined") return;
|
|
@@ -633,34 +671,36 @@ async function listRunsByExternalId(params) {
|
|
|
633
671
|
});
|
|
634
672
|
}
|
|
635
673
|
export {
|
|
636
|
-
|
|
674
|
+
listRunsByAgent as A,
|
|
637
675
|
BridgeError as B,
|
|
638
|
-
|
|
676
|
+
listRunsByExternalId as C,
|
|
677
|
+
pollAutomationRun as D,
|
|
639
678
|
EXPECTED_PARENT_ORIGIN as E,
|
|
679
|
+
pollRun as F,
|
|
640
680
|
getShareableAppUrl as a,
|
|
641
681
|
postReadyMessage as b,
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
682
|
+
configureBridge as c,
|
|
683
|
+
automationStatuses as d,
|
|
684
|
+
cancelAutomationRun as e,
|
|
685
|
+
cancelRun as f,
|
|
646
686
|
getAppProjectExternalId as g,
|
|
647
|
-
|
|
687
|
+
clearAutomationCache as h,
|
|
648
688
|
isEmbedded as i,
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
689
|
+
createAutomationRun as j,
|
|
690
|
+
createRun as k,
|
|
691
|
+
ensureAutomationRun as l,
|
|
692
|
+
ensureRun as m,
|
|
693
|
+
getAutomationByExternalId as n,
|
|
654
694
|
onInitMessage as o,
|
|
655
695
|
parentApiRequest as p,
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
696
|
+
getAutomationRun as q,
|
|
697
|
+
getAutomationRunFileDownloadUrl as r,
|
|
698
|
+
serializeBridgeRuntimeConfig as s,
|
|
699
|
+
getRun as t,
|
|
700
|
+
getRunFiles as u,
|
|
701
|
+
getRunFileUrl as v,
|
|
702
|
+
isActiveStatus as w,
|
|
703
|
+
isTerminalStatus as x,
|
|
704
|
+
listAutomationRunFiles as y,
|
|
705
|
+
listRuns as z
|
|
666
706
|
};
|
package/dist/components/index.js
CHANGED
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u, a, b, c, d, e } from "../use-sql-table-
|
|
2
|
-
import { u as u2 } from "../use-automation-run-
|
|
1
|
+
import { u, a, b, c, d, e } from "../use-sql-table-DSt5nL70.js";
|
|
2
|
+
import { u as u2 } from "../use-automation-run-hQ7DMZ8f.js";
|
|
3
3
|
export {
|
|
4
4
|
u as useAutomationAgent,
|
|
5
5
|
u2 as useAutomationRun,
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A, a, D, b, c, R } from "./RecordSheet-
|
|
2
|
-
import { u, a as a2, b as b2, c as c2, d, e } from "./use-sql-table-
|
|
3
|
-
import { u as u2 } from "./use-automation-run-
|
|
4
|
-
import { B, E,
|
|
5
|
-
import { g as g2, a as a4, p as p2, b as b4, c as c4, d as d3, e as e3, f as f2, h as h2, i as i2, j as j2, k as k2, l as l2, s as s2, u as u4 } from "./api-
|
|
1
|
+
import { A, a, D, b, c, R } from "./RecordSheet-M1ux7vW7.js";
|
|
2
|
+
import { u, a as a2, b as b2, c as c2, d, e } from "./use-sql-table-DSt5nL70.js";
|
|
3
|
+
import { u as u2 } from "./use-automation-run-hQ7DMZ8f.js";
|
|
4
|
+
import { B, E, d as d2, e as e2, f, h, c as c3, j, k, l, m, g, n, q, r, t, v, u as u3, a as a3, w, i, x, y, z, A as A2, C, o, p, D as D2, F, b as b3, s } from "./automations-OzVpAuzv.js";
|
|
5
|
+
import { g as g2, a as a4, p as p2, b as b4, c as c4, d as d3, e as e3, f as f2, h as h2, i as i2, j as j2, k as k2, l as l2, s as s2, u as u4 } from "./api-DXN1wKkz.js";
|
|
6
6
|
import { o as o2, f as f3, a as a5, b as b5, c as c5, d as d4, e as e4, g as g3, h as h3, i as i3, j as j3, k as k3, l as l3, m as m2, n as n2, s as s3 } from "./formatters-Baj7FkeG.js";
|
|
7
7
|
import { q as q2 } from "./query-client-DdOWay4_.js";
|
|
8
8
|
export {
|
|
@@ -14,15 +14,16 @@ export {
|
|
|
14
14
|
c as DataTablePagination,
|
|
15
15
|
E as EXPECTED_PARENT_ORIGIN,
|
|
16
16
|
R as RecordSheet,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
d2 as automationStatuses,
|
|
18
|
+
e2 as cancelAutomationRun,
|
|
19
|
+
f as cancelRun,
|
|
20
|
+
h as clearAutomationCache,
|
|
21
21
|
o2 as cn,
|
|
22
|
-
|
|
23
|
-
j as
|
|
24
|
-
k as
|
|
25
|
-
l as
|
|
22
|
+
c3 as configureBridge,
|
|
23
|
+
j as createAutomationRun,
|
|
24
|
+
k as createRun,
|
|
25
|
+
l as ensureAutomationRun,
|
|
26
|
+
m as ensureRun,
|
|
26
27
|
f3 as formatBoolean,
|
|
27
28
|
a5 as formatCellValue,
|
|
28
29
|
b5 as formatCurrency,
|
|
@@ -38,22 +39,22 @@ export {
|
|
|
38
39
|
m2 as formatSelect,
|
|
39
40
|
n2 as formatText,
|
|
40
41
|
g as getAppProjectExternalId,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
n as getAutomationByExternalId,
|
|
43
|
+
q as getAutomationRun,
|
|
44
|
+
r as getAutomationRunFileDownloadUrl,
|
|
44
45
|
g2 as getDownloadUrl,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
t as getRun,
|
|
47
|
+
v as getRunFileUrl,
|
|
48
|
+
u3 as getRunFiles,
|
|
48
49
|
a3 as getShareableAppUrl,
|
|
49
50
|
a4 as getUploadUrl,
|
|
50
|
-
|
|
51
|
+
w as isActiveStatus,
|
|
51
52
|
i as isEmbedded,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
x as isTerminalStatus,
|
|
54
|
+
y as listAutomationRunFiles,
|
|
55
|
+
z as listRuns,
|
|
56
|
+
A2 as listRunsByAgent,
|
|
57
|
+
C as listRunsByExternalId,
|
|
57
58
|
o as onInitMessage,
|
|
58
59
|
p as parentApiRequest,
|
|
59
60
|
p2 as pbBulkDelete,
|
|
@@ -67,11 +68,12 @@ export {
|
|
|
67
68
|
j2 as pbUpdate,
|
|
68
69
|
k2 as pbUpdateRecord,
|
|
69
70
|
l2 as pbUpsert,
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
D2 as pollAutomationRun,
|
|
72
|
+
F as pollRun,
|
|
72
73
|
b3 as postReadyMessage,
|
|
73
74
|
q2 as queryClient,
|
|
74
75
|
s2 as sendEmail,
|
|
76
|
+
s as serializeBridgeRuntimeConfig,
|
|
75
77
|
s3 as stripHtml,
|
|
76
78
|
u4 as uploadFile,
|
|
77
79
|
u as useAutomationAgent,
|
package/dist/lib/bridge.d.ts
CHANGED
|
@@ -8,22 +8,35 @@
|
|
|
8
8
|
* - Standalone dev mode for local development
|
|
9
9
|
*
|
|
10
10
|
* Future cleanup direction:
|
|
11
|
-
* - Prefer
|
|
11
|
+
* - Prefer runtime bridge config over build-time env injection for custom
|
|
12
|
+
* parent origins. Hosts can provide runtime config via the iframe `name`
|
|
13
|
+
* payload, and apps can extend it programmatically with `configureBridge()`.
|
|
14
|
+
* - Prefer `VITE_PARENT_ORIGINS` over `VITE_PARENT_ORIGIN` for all remaining
|
|
15
|
+
* env-based configuration.
|
|
12
16
|
* - Prefer the allowlist model (`EXPECTED_PARENT_ORIGINS`) over the singular
|
|
13
17
|
* compatibility export (`EXPECTED_PARENT_ORIGIN`).
|
|
14
|
-
* - Once all downstream apps/configs have migrated to
|
|
15
|
-
* external consumers import `EXPECTED_PARENT_ORIGIN`, we can deprecate
|
|
16
|
-
* remove:
|
|
18
|
+
* - Once all downstream apps/configs have migrated to runtime/plural config and
|
|
19
|
+
* no external consumers import `EXPECTED_PARENT_ORIGIN`, we can deprecate
|
|
20
|
+
* then remove:
|
|
17
21
|
* - `VITE_PARENT_ORIGIN`
|
|
18
22
|
* - `EXPECTED_PARENT_ORIGIN`
|
|
19
23
|
* - That removal should happen only in a deliberate breaking release after:
|
|
20
|
-
* 1. templates and docs use only `VITE_PARENT_ORIGINS`
|
|
24
|
+
* 1. templates and docs use only runtime config and/or `VITE_PARENT_ORIGINS`
|
|
21
25
|
* 2. published Lumera apps no longer depend on the singular export/env var
|
|
22
26
|
* 3. a major/minor migration note is shipped for external consumers
|
|
23
27
|
*
|
|
24
28
|
* @module bridge
|
|
25
29
|
*/
|
|
26
30
|
export declare const EXPECTED_PARENT_ORIGIN: any;
|
|
31
|
+
export type BridgeRuntimeConfig = {
|
|
32
|
+
/** Additional trusted parent origins/patterns resolved at runtime. */
|
|
33
|
+
parentOrigins?: string[];
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Serialize bridge runtime config into an iframe `name` token.
|
|
37
|
+
* Hosts can append this token to the iframe `name` before loading the app.
|
|
38
|
+
*/
|
|
39
|
+
export declare const serializeBridgeRuntimeConfig: (config: BridgeRuntimeConfig) => string;
|
|
27
40
|
/**
|
|
28
41
|
* Payload received from the parent during initialization.
|
|
29
42
|
* Contains company, user, and session information.
|
|
@@ -108,6 +121,13 @@ export declare function getAppProjectExternalId(): string | undefined;
|
|
|
108
121
|
export declare function getShareableAppUrl(options?: {
|
|
109
122
|
absolute?: boolean;
|
|
110
123
|
}): string | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* Extend bridge runtime config for the current page load.
|
|
126
|
+
*
|
|
127
|
+
* This is the preferred escape hatch when a host needs to add trusted parent
|
|
128
|
+
* origins at runtime without relying on build-time `import.meta.env` values.
|
|
129
|
+
*/
|
|
130
|
+
export declare const configureBridge: (config: BridgeRuntimeConfig) => void;
|
|
111
131
|
/**
|
|
112
132
|
* Check if the app is running embedded in an iframe.
|
|
113
133
|
*
|
package/dist/lib/bridge.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/lib/bridge.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bridge.d.ts","sourceRoot":"","sources":["../../src/lib/bridge.ts"],"names":[],"mappings":"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"}
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module @lumerahq/ui/lib
|
|
5
5
|
*/
|
|
6
|
-
export { BridgeError, type BridgeRequest, type BridgeResponse, EXPECTED_PARENT_ORIGIN, getAppProjectExternalId, getShareableAppUrl, type HostPayload, isEmbedded, onInitMessage, parentApiRequest, postReadyMessage, } from './bridge';
|
|
6
|
+
export { BridgeError, type BridgeRequest, type BridgeResponse, type BridgeRuntimeConfig, configureBridge, EXPECTED_PARENT_ORIGIN, getAppProjectExternalId, getShareableAppUrl, type HostPayload, isEmbedded, onInitMessage, parentApiRequest, postReadyMessage, serializeBridgeRuntimeConfig, } from './bridge';
|
|
7
7
|
export { type EmailSendRequest, type EmailSendResult, type FileDescriptor, getDownloadUrl, getUploadUrl, type PbBulkResult, type PbListOptions, type PbListResponse, type PbRecord, type PbSqlRequest, type PbSqlResponse, pbBulkDelete, pbBulkUpdate, pbCreate, pbDelete, pbGet, pbList, pbSearch, pbSql, pbUpdate, pbUpdateRecord, pbUpsert, sendEmail, type UploadOptions, type UploadUrlResponse, uploadFile, } from './api';
|
|
8
8
|
export { type Automation, type AutomationRun, type AutomationRunFile, type AutomationStatus, automationStatuses, type CreateRunOptions, cancelAutomationRun, cancelRun, clearAutomationCache, createAutomationRun, createRun, ensureAutomationRun, ensureRun, getAutomationByExternalId, getAutomationRun, getAutomationRunFileDownloadUrl, getRun, getRunFiles, getRunFileUrl, isActiveStatus, isTerminalStatus, type LegacyCreateRunOptions, type ListRunsOptions, listAutomationRunFiles, listRuns, listRunsByAgent, listRunsByExternalId, type PollOptions, pollAutomationRun, pollRun, } from './automations';
|
|
9
9
|
export { type ColumnType, type FileDescriptor as FormatterFileDescriptor, type FormatOptions, formatBoolean, formatCellValue, formatCurrency, formatDate, formatDateTime, formatEditor, formatFile, formatFileSize, formatJson, formatNumber, formatPercent, formatRelation, formatSelect, formatText, stripHtml, } from './formatters';
|
package/dist/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,EAEL,WAAW,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EAExB,eAAe,EAEf,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,EAElB,KAAK,WAAW,EAChB,UAAU,EACV,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,UAAU,CAAC;AAMlB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,cAAc,EAEd,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,cAAc,EAEnB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,YAAY,EAEZ,YAAY,EACZ,QAAQ,EACR,QAAQ,EAER,KAAK,EACL,MAAM,EACN,QAAQ,EAER,KAAK,EACL,QAAQ,EAER,cAAc,EACd,QAAQ,EAER,SAAS,EACT,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,UAAU,GACX,MAAM,OAAO,CAAC;AAMf,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,SAAS,EAET,oBAAoB,EAEpB,mBAAmB,EAEnB,SAAS,EACT,mBAAmB,EACnB,SAAS,EAET,yBAAyB,EACzB,gBAAgB,EAChB,+BAA+B,EAC/B,MAAM,EAEN,WAAW,EACX,aAAa,EACb,cAAc,EAEd,gBAAgB,EAChB,KAAK,sBAAsB,EAC3B,KAAK,eAAe,EACpB,sBAAsB,EACtB,QAAQ,EACR,eAAe,EACf,oBAAoB,EACpB,KAAK,WAAW,EAChB,iBAAiB,EACjB,OAAO,GACR,MAAM,eAAe,CAAC;AAMvB,OAAO,EACL,KAAK,UAAU,EACf,KAAK,cAAc,IAAI,uBAAuB,EAC9C,KAAK,aAAa,EAClB,aAAa,EACb,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,UAAU,EACV,YAAY,EACZ,aAAa,EACb,cAAc,EACd,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAM7C,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/lib/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { B, E,
|
|
2
|
-
import { g as g2, a as a2, p as p2, b as b2, c as c2, d as d2, e as e2, f as f2, h as h2, i as i2, j as j2, k as k2, l as l2, s as s2, u as u2 } from "../api-
|
|
1
|
+
import { B, E, d, e, f, h, c, j, k, l, m, g, n, q, r, t, v, u, a, w, i, x, y, z, A, C, o, p, D, F, b, s } from "../automations-OzVpAuzv.js";
|
|
2
|
+
import { g as g2, a as a2, p as p2, b as b2, c as c2, d as d2, e as e2, f as f2, h as h2, i as i2, j as j2, k as k2, l as l2, s as s2, u as u2 } from "../api-DXN1wKkz.js";
|
|
3
3
|
import { o as o2, f as f3, a as a3, b as b3, c as c3, d as d3, e as e3, g as g3, h as h3, i as i3, j as j3, k as k3, l as l3, m as m2, n as n2, s as s3 } from "../formatters-Baj7FkeG.js";
|
|
4
4
|
import { q as q2 } from "../query-client-DdOWay4_.js";
|
|
5
5
|
export {
|
|
6
6
|
B as BridgeError,
|
|
7
7
|
E as EXPECTED_PARENT_ORIGIN,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
d as automationStatuses,
|
|
9
|
+
e as cancelAutomationRun,
|
|
10
|
+
f as cancelRun,
|
|
11
|
+
h as clearAutomationCache,
|
|
12
12
|
o2 as cn,
|
|
13
|
-
|
|
14
|
-
j as
|
|
15
|
-
k as
|
|
16
|
-
l as
|
|
13
|
+
c as configureBridge,
|
|
14
|
+
j as createAutomationRun,
|
|
15
|
+
k as createRun,
|
|
16
|
+
l as ensureAutomationRun,
|
|
17
|
+
m as ensureRun,
|
|
17
18
|
f3 as formatBoolean,
|
|
18
19
|
a3 as formatCellValue,
|
|
19
20
|
b3 as formatCurrency,
|
|
@@ -29,22 +30,22 @@ export {
|
|
|
29
30
|
m2 as formatSelect,
|
|
30
31
|
n2 as formatText,
|
|
31
32
|
g as getAppProjectExternalId,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
n as getAutomationByExternalId,
|
|
34
|
+
q as getAutomationRun,
|
|
35
|
+
r as getAutomationRunFileDownloadUrl,
|
|
35
36
|
g2 as getDownloadUrl,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
t as getRun,
|
|
38
|
+
v as getRunFileUrl,
|
|
39
|
+
u as getRunFiles,
|
|
39
40
|
a as getShareableAppUrl,
|
|
40
41
|
a2 as getUploadUrl,
|
|
41
|
-
|
|
42
|
+
w as isActiveStatus,
|
|
42
43
|
i as isEmbedded,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
x as isTerminalStatus,
|
|
45
|
+
y as listAutomationRunFiles,
|
|
46
|
+
z as listRuns,
|
|
47
|
+
A as listRunsByAgent,
|
|
48
|
+
C as listRunsByExternalId,
|
|
48
49
|
o as onInitMessage,
|
|
49
50
|
p as parentApiRequest,
|
|
50
51
|
p2 as pbBulkDelete,
|
|
@@ -58,11 +59,12 @@ export {
|
|
|
58
59
|
j2 as pbUpdate,
|
|
59
60
|
k2 as pbUpdateRecord,
|
|
60
61
|
l2 as pbUpsert,
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
D as pollAutomationRun,
|
|
63
|
+
F as pollRun,
|
|
63
64
|
b as postReadyMessage,
|
|
64
65
|
q2 as queryClient,
|
|
65
66
|
s2 as sendEmail,
|
|
67
|
+
s as serializeBridgeRuntimeConfig,
|
|
66
68
|
s3 as stripHtml,
|
|
67
69
|
u2 as uploadFile
|
|
68
70
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useQueryClient, useMutation, useQuery } from "@tanstack/react-query";
|
|
2
2
|
import { useState, useRef, useEffect, useCallback } from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { l as ensureAutomationRun, j as createAutomationRun, e as cancelAutomationRun, d as automationStatuses, q as getAutomationRun } from "./automations-OzVpAuzv.js";
|
|
4
4
|
function useAutomationRun(options) {
|
|
5
5
|
const {
|
|
6
6
|
agentId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useQueryClient, useQuery, useMutation } from "@tanstack/react-query";
|
|
2
2
|
import { useState, useCallback, useEffect, useMemo } from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { u as uploadFile, i as pbSql, k as pbUpdateRecord } from "./api-
|
|
3
|
+
import { A as listRunsByAgent, d as automationStatuses, j as createAutomationRun, o as onInitMessage } from "./automations-OzVpAuzv.js";
|
|
4
|
+
import { u as uploadFile, i as pbSql, k as pbUpdateRecord } from "./api-DXN1wKkz.js";
|
|
5
5
|
function useAutomationAgent({
|
|
6
6
|
agentId,
|
|
7
7
|
limit = 5,
|