@octaviaflow/core 3.1.0-beta.110 → 3.1.0-beta.112
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/components/ExpressionField/ExpressionField.d.ts.map +1 -1
- package/dist/components/ExpressionField/parseExpression.d.ts +17 -1
- package/dist/components/ExpressionField/parseExpression.d.ts.map +1 -1
- package/dist/components/SlideoutPanel/SlideoutPanel.d.ts +2 -0
- package/dist/components/SlideoutPanel/SlideoutPanel.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts +6 -0
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/components/VersionHistory/VersionHistory.d.ts.map +1 -1
- package/dist/index.cjs +168 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +183 -72
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/workflow/components/FxPanel/FxPanel.d.ts.map +1 -1
- package/dist/workflow.cjs +3 -2
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.js +3 -2
- package/dist/workflow.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionField.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionField/ExpressionField.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAML,KAAK,aAAa,EAIlB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpressionField.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionField/ExpressionField.tsx"],"names":[],"mappings":"AA2BA,OAAO,EAML,KAAK,aAAa,EAIlB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAkBf,6EAA6E;AAC7E,MAAM,WAAW,gBAAgB;IAC/B,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;CAChC;AAED,uEAAuE;AACvE,MAAM,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eAAe,CAAC"}
|
|
@@ -22,7 +22,14 @@ export declare function parseCall(raw: string): {
|
|
|
22
22
|
name: string;
|
|
23
23
|
args: string[];
|
|
24
24
|
} | undefined;
|
|
25
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Rebuild a call from its parts, in the wrapped form a field stores.
|
|
27
|
+
*
|
|
28
|
+
* Empty arguments are kept, not dropped: while the editor is open an argument
|
|
29
|
+
* whose text has just been deleted is still an argument, and removing it would
|
|
30
|
+
* take the row away from under the author's cursor. `normalizeCall` settles
|
|
31
|
+
* them when the edit finishes.
|
|
32
|
+
*/
|
|
26
33
|
export declare function formatCall(name: string, args: string[]): string;
|
|
27
34
|
/**
|
|
28
35
|
* Break a field's value into what the reader sees: plain text, references
|
|
@@ -41,6 +48,15 @@ export declare function callAt(raw: string, path: number[]): {
|
|
|
41
48
|
export declare function argumentAt(raw: string, path: number[]): string | undefined;
|
|
42
49
|
/** A nested call is written bare; only the outermost one wears braces. */
|
|
43
50
|
export declare function formatNestedCall(name: string, args: string[]): string;
|
|
51
|
+
/**
|
|
52
|
+
* Settle a call that was being edited into something an engine can read.
|
|
53
|
+
*
|
|
54
|
+
* An argument left empty in the middle keeps its place as `""` — the arguments
|
|
55
|
+
* after it are positional, and quietly closing the gap would hand `zone` to
|
|
56
|
+
* the `value` parameter. Empty arguments at the END are simply dropped, since
|
|
57
|
+
* nothing depends on their position. Applies to nested calls too.
|
|
58
|
+
*/
|
|
59
|
+
export declare function normalizeCall(raw: string): string;
|
|
44
60
|
/**
|
|
45
61
|
* Replace the argument at `path`, rebuilding every call on the way back up.
|
|
46
62
|
* An empty path replaces the whole expression.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseExpression.d.ts","sourceRoot":"","sources":["../../../src/components/ExpressionField/parseExpression.ts"],"names":[],"mappings":"AASA,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,uDAAuD,CAAC;AAGrF,MAAM,MAAM,OAAO,GACf;IAAE,IAAI,E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EAAE,cAAc,UAAQ,GAAG,OAAO,EAAE,CA8BhF;AAQD,mEAAmE;AACnE,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,SAAS,CAShG;AAED,oEAAoE;AACpE,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAI1E;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAErE;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CASjD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAYjF;AAED,6EAA6E;AAC7E,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAE5D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAQtD"}
|
|
@@ -7,6 +7,8 @@ export interface SlideoutPanelProps {
|
|
|
7
7
|
title?: ReactNode;
|
|
8
8
|
children?: ReactNode;
|
|
9
9
|
footer?: ReactNode;
|
|
10
|
+
/** Controls shown in the header, before the close button — a refresh, a menu. */
|
|
11
|
+
headerActions?: ReactNode;
|
|
10
12
|
className?: string;
|
|
11
13
|
/**
|
|
12
14
|
* Inset the panel (and its backdrop) from the top of the viewport — e.g. to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlideoutPanel.d.ts","sourceRoot":"","sources":["../../../src/components/SlideoutPanel/SlideoutPanel.tsx"],"names":[],"mappings":"AAEA,OAAO,EA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,kBAAkB,+BAWtD"}
|
|
@@ -32,6 +32,12 @@ export interface ToastOptions {
|
|
|
32
32
|
duration?: number;
|
|
33
33
|
closeable?: boolean;
|
|
34
34
|
position?: ToastPosition;
|
|
35
|
+
/**
|
|
36
|
+
* Lines of `description` shown before it is cut. A longer description gets
|
|
37
|
+
* a More / Less toggle, and a click on the text toggles too. 0 never cuts.
|
|
38
|
+
* Default 2.
|
|
39
|
+
*/
|
|
40
|
+
clampLines?: number;
|
|
35
41
|
}
|
|
36
42
|
export interface ToastProviderProps {
|
|
37
43
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,SAAS,EAQf,MAAM,OAAO,CAAC;AAOf,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACpE,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAEnB,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,sCAAsC;IACtC,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,4CAA4C;IAC5C,MAAM,CAAC,EAAE,CAAC,KAAK,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AwB,EACxB,SAAS,EACT,SAAS,EACT,YAAY,GACb,EAAE,mBAAmB,
|
|
1
|
+
{"version":3,"file":"VersionHistory.d.ts","sourceRoot":"","sources":["../../../src/components/VersionHistory/VersionHistory.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAC;AAaxD,MAAM,MAAM,kBAAkB,GAC1B,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,GACT,QAAQ,CAAC;AAEb,kEAAkE;AAClE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,EAAE,CAAC,EAAE,SAAS,CAAC;CAChB;AAED,mFAAmF;AACnF,MAAM,WAAW,mBAAmB;IAClC,uDAAuD;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,mEAAmE;IACnE,KAAK,EAAE,SAAS,CAAC;IACjB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACnC,2BAA2B;IAC3B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,2DAA2D;IAC3D,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,oEAAoE;IACpE,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B,gEAAgE;IAChE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,wDAAwD;IACxD,IAAI,CAAC,EAAE,cAAc,EAAE,CAAC;IACxB,2EAA2E;IAC3E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0EAA0E;IAC1E,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAA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AAE,MAAM,GAAG,MAAM,CAAC;CAChC;AA6DD,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,OAAO,EACP,OAAO,EACP,KAAyB,EACzB,QAAkB,EAClB,KAAW,EACX,OAAe,EACf,KAAK,EACL,UAA8B,EAC9B,UAAsB,EACtB,OAAO,EACP,YAAqB,EACrB,SAAS,EACT,SAAS,EACT,UAAkB,EAClB,IAAI,EACJ,SAAS,EACT,WAAW,EACX,iBAAwB,EACxB,SAAS,EACT,SAAS,EACT,YAAY,GACb,EAAE,mBAAmB,2CAiNrB;yBAxOe,cAAc"}
|
package/dist/index.cjs
CHANGED
|
@@ -16762,7 +16762,9 @@ function splitArguments(argsText) {
|
|
|
16762
16762
|
}
|
|
16763
16763
|
current += ch;
|
|
16764
16764
|
}
|
|
16765
|
-
|
|
16765
|
+
const tail = current.trim();
|
|
16766
|
+
if (tail) args.push(tail);
|
|
16767
|
+
else if (args.length) args.push("");
|
|
16766
16768
|
return args;
|
|
16767
16769
|
}
|
|
16768
16770
|
function parseCall(raw) {
|
|
@@ -16775,7 +16777,7 @@ function parseCall(raw) {
|
|
|
16775
16777
|
return { name: head[1], args: splitArguments(inner.slice(open + 1, close)) };
|
|
16776
16778
|
}
|
|
16777
16779
|
function formatCall(name, args) {
|
|
16778
|
-
return `{{${name}(${args.
|
|
16780
|
+
return `{{${name}(${args.join(", ")})}}`;
|
|
16779
16781
|
}
|
|
16780
16782
|
function parseExpression(value, pillEveryToken = false) {
|
|
16781
16783
|
const segments = [];
|
|
@@ -16817,7 +16819,15 @@ function callAt(raw, path) {
|
|
|
16817
16819
|
return current;
|
|
16818
16820
|
}
|
|
16819
16821
|
function formatNestedCall(name, args) {
|
|
16820
|
-
return `${name}(${args.
|
|
16822
|
+
return `${name}(${args.join(", ")})`;
|
|
16823
|
+
}
|
|
16824
|
+
function normalizeCall(raw) {
|
|
16825
|
+
const call = parseCall(raw);
|
|
16826
|
+
if (!call) return raw;
|
|
16827
|
+
const args = call.args.map((arg) => parseCall(arg) ? normalizeCall(arg) : arg);
|
|
16828
|
+
while (args.length > 0 && args[args.length - 1].trim() === "") args.pop();
|
|
16829
|
+
const held = args.map((arg) => arg.trim() === "" ? '""' : arg);
|
|
16830
|
+
return raw.trim().startsWith("{{") ? formatCall(call.name, held) : formatNestedCall(call.name, held);
|
|
16821
16831
|
}
|
|
16822
16832
|
function replaceArgument(raw, path, next) {
|
|
16823
16833
|
if (path.length === 0) return next;
|
|
@@ -16849,7 +16859,10 @@ function shortReferenceLabel(token) {
|
|
|
16849
16859
|
if (token.startsWith("{{ods://")) {
|
|
16850
16860
|
const path = token.slice(8, -2);
|
|
16851
16861
|
const parts = path.split("/");
|
|
16852
|
-
if (parts[0] === "steps"
|
|
16862
|
+
if (parts[0] === "steps") {
|
|
16863
|
+
if (parts.length >= 4) return parts.slice(3).join(".");
|
|
16864
|
+
return parts[2] ?? "output";
|
|
16865
|
+
}
|
|
16853
16866
|
if (parts[0] === "flow") return `flow.${parts.slice(1).join(".")}`;
|
|
16854
16867
|
return parts.join(".");
|
|
16855
16868
|
}
|
|
@@ -17285,7 +17298,9 @@ function CallEditor({
|
|
|
17285
17298
|
const target = e.target;
|
|
17286
17299
|
if (panelRef.current?.contains(target)) return;
|
|
17287
17300
|
if (anchor.contains(target)) return;
|
|
17288
|
-
|
|
17301
|
+
const el = target instanceof Element ? target : target.parentElement;
|
|
17302
|
+
if (el?.closest('[draggable="true"]')) return;
|
|
17303
|
+
onApplyRef.current(normalizeCall(draftRef.current));
|
|
17289
17304
|
};
|
|
17290
17305
|
document.addEventListener("keydown", onKey);
|
|
17291
17306
|
document.addEventListener("mousedown", onPointerDown, true);
|
|
@@ -17482,7 +17497,7 @@ function CallEditor({
|
|
|
17482
17497
|
] }),
|
|
17483
17498
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "ods-expression-field__editor-foot", children: [
|
|
17484
17499
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { variant: "secondary", size: "sm", onClick: onCancel, children: "Cancel" }),
|
|
17485
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { variant: "primary", size: "sm", onClick: () => onApply(draft), children: "Apply" })
|
|
17500
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { variant: "primary", size: "sm", onClick: () => onApply(normalizeCall(draft)), children: "Apply" })
|
|
17486
17501
|
] })
|
|
17487
17502
|
]
|
|
17488
17503
|
}
|
|
@@ -40057,6 +40072,7 @@ function SlideoutContent({
|
|
|
40057
40072
|
title,
|
|
40058
40073
|
children,
|
|
40059
40074
|
footer,
|
|
40075
|
+
headerActions,
|
|
40060
40076
|
className,
|
|
40061
40077
|
offsetTop = 0,
|
|
40062
40078
|
offsetBottom = 0
|
|
@@ -40142,16 +40158,19 @@ function SlideoutContent({
|
|
|
40142
40158
|
children: [
|
|
40143
40159
|
title && /* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("div", { className: "ods-slideout__header", children: [
|
|
40144
40160
|
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)("h2", { ...titleProps, className: "ods-slideout__title", children: title }),
|
|
40145
|
-
/* @__PURE__ */ (0, import_jsx_runtime161.
|
|
40146
|
-
|
|
40147
|
-
|
|
40148
|
-
|
|
40149
|
-
|
|
40150
|
-
|
|
40151
|
-
|
|
40152
|
-
|
|
40153
|
-
|
|
40154
|
-
|
|
40161
|
+
/* @__PURE__ */ (0, import_jsx_runtime161.jsxs)("div", { className: "ods-slideout__header-actions", children: [
|
|
40162
|
+
headerActions,
|
|
40163
|
+
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)(
|
|
40164
|
+
"button",
|
|
40165
|
+
{
|
|
40166
|
+
className: "ods-slideout__close",
|
|
40167
|
+
onClick: onClose,
|
|
40168
|
+
"aria-label": "Close panel",
|
|
40169
|
+
type: "button",
|
|
40170
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("path", { d: "M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 00-1.06-1.06L10 8.94 6.28 5.22z" }) })
|
|
40171
|
+
}
|
|
40172
|
+
)
|
|
40173
|
+
] })
|
|
40155
40174
|
] }),
|
|
40156
40175
|
/* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "ods-slideout__body", children }),
|
|
40157
40176
|
footer && /* @__PURE__ */ (0, import_jsx_runtime161.jsx)("div", { className: "ods-slideout__footer", children: footer })
|
|
@@ -41664,15 +41683,57 @@ var defaultIcons = {
|
|
|
41664
41683
|
] })
|
|
41665
41684
|
};
|
|
41666
41685
|
var ToastContext = (0, import_react188.createContext)(null);
|
|
41667
|
-
function ToastBody({ item, onDismiss }) {
|
|
41686
|
+
function ToastBody({ item, stacked, onDismiss }) {
|
|
41668
41687
|
const dismiss = () => onDismiss(item.id);
|
|
41688
|
+
const [expanded, setExpanded] = (0, import_react188.useState)(false);
|
|
41689
|
+
const [overflowing, setOverflowing] = (0, import_react188.useState)(false);
|
|
41690
|
+
const descRef = (0, import_react188.useRef)(null);
|
|
41691
|
+
const cut = item.clampLines > 0 && !expanded;
|
|
41692
|
+
(0, import_react188.useLayoutEffect)(() => {
|
|
41693
|
+
if (!cut) return;
|
|
41694
|
+
const el = descRef.current;
|
|
41695
|
+
if (el) setOverflowing(el.scrollHeight > el.clientHeight + 1);
|
|
41696
|
+
}, [cut, item.description]);
|
|
41669
41697
|
if (item.render) return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(import_jsx_runtime174.Fragment, { children: item.render({ id: item.id, dismiss }) });
|
|
41670
41698
|
const title = item.title ?? item.message;
|
|
41699
|
+
const toggles = overflowing && !stacked;
|
|
41700
|
+
const toggle = () => setExpanded((v) => !v);
|
|
41701
|
+
const onTextClick = (e) => {
|
|
41702
|
+
if (!toggles) return;
|
|
41703
|
+
if (window.getSelection()?.toString()) return;
|
|
41704
|
+
e.stopPropagation();
|
|
41705
|
+
toggle();
|
|
41706
|
+
};
|
|
41671
41707
|
return /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
|
|
41672
41708
|
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)("span", { className: "ods-toast__icon", "aria-hidden": "true", children: item.icon ?? defaultIcons[item.variant] }),
|
|
41673
|
-
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "ods-toast__body", children: [
|
|
41709
|
+
/* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "ods-toast__body", onClick: onTextClick, children: [
|
|
41674
41710
|
title && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "ods-toast__title", children: title }),
|
|
41675
|
-
item.description && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
41711
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
41712
|
+
"div",
|
|
41713
|
+
{
|
|
41714
|
+
ref: descRef,
|
|
41715
|
+
className: cn(
|
|
41716
|
+
"ods-toast__desc",
|
|
41717
|
+
cut && "ods-toast__desc--cut",
|
|
41718
|
+
toggles && "ods-toast__desc--toggles"
|
|
41719
|
+
),
|
|
41720
|
+
style: cut ? { "--ods-toast-clamp": item.clampLines } : void 0,
|
|
41721
|
+
children: item.description
|
|
41722
|
+
}
|
|
41723
|
+
),
|
|
41724
|
+
toggles && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
41725
|
+
"button",
|
|
41726
|
+
{
|
|
41727
|
+
type: "button",
|
|
41728
|
+
className: "ods-toast__more",
|
|
41729
|
+
"aria-expanded": expanded,
|
|
41730
|
+
onClick: (e) => {
|
|
41731
|
+
e.stopPropagation();
|
|
41732
|
+
toggle();
|
|
41733
|
+
},
|
|
41734
|
+
children: expanded ? "Less" : "More"
|
|
41735
|
+
}
|
|
41736
|
+
)
|
|
41676
41737
|
] }),
|
|
41677
41738
|
(item.actionLabel || item.action) && /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "ods-toast__action", children: item.actionLabel ? (
|
|
41678
41739
|
// First-class action chip — consistent styling, auto-dismiss
|
|
@@ -41720,10 +41781,17 @@ function ToastBody({ item, onDismiss }) {
|
|
|
41720
41781
|
)
|
|
41721
41782
|
] });
|
|
41722
41783
|
}
|
|
41723
|
-
function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
41784
|
+
function PositionStack({ items, position, onDismiss, onHold, onRelease, maxStack }) {
|
|
41724
41785
|
const [hovered, setHovered] = (0, import_react188.useState)(false);
|
|
41786
|
+
const [focused, setFocused] = (0, import_react188.useState)(false);
|
|
41725
41787
|
const [pinned, setPinned] = (0, import_react188.useState)(false);
|
|
41726
41788
|
const expanded = hovered || pinned;
|
|
41789
|
+
const held = hovered || focused;
|
|
41790
|
+
const ids = (0, import_react188.useMemo)(() => items.map((t) => t.id), [items]);
|
|
41791
|
+
(0, import_react188.useEffect)(() => {
|
|
41792
|
+
if (held) onHold(ids);
|
|
41793
|
+
else onRelease(ids);
|
|
41794
|
+
}, [held, ids, onHold, onRelease]);
|
|
41727
41795
|
const ordered = (0, import_react188.useMemo)(() => [...items].reverse(), [items]);
|
|
41728
41796
|
const isBottom = position.startsWith("bottom");
|
|
41729
41797
|
const dir = isBottom ? -1 : 1;
|
|
@@ -41751,6 +41819,10 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
41751
41819
|
),
|
|
41752
41820
|
onMouseEnter: () => setHovered(true),
|
|
41753
41821
|
onMouseLeave: () => setHovered(false),
|
|
41822
|
+
onFocus: () => setFocused(true),
|
|
41823
|
+
onBlur: (e) => {
|
|
41824
|
+
if (!e.currentTarget.contains(e.relatedTarget)) setFocused(false);
|
|
41825
|
+
},
|
|
41754
41826
|
"aria-live": "polite",
|
|
41755
41827
|
children: [
|
|
41756
41828
|
/* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
@@ -41788,7 +41860,14 @@ function PositionStack({ items, position, onDismiss, maxStack }) {
|
|
|
41788
41860
|
setPinned(true);
|
|
41789
41861
|
}
|
|
41790
41862
|
},
|
|
41791
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
41863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
|
|
41864
|
+
ToastBody,
|
|
41865
|
+
{
|
|
41866
|
+
item,
|
|
41867
|
+
stacked: !expanded && items.length > 1,
|
|
41868
|
+
onDismiss
|
|
41869
|
+
}
|
|
41870
|
+
)
|
|
41792
41871
|
},
|
|
41793
41872
|
item.id
|
|
41794
41873
|
);
|
|
@@ -41825,29 +41904,51 @@ function ToastProvider({
|
|
|
41825
41904
|
const [toasts, setToasts] = (0, import_react188.useState)([]);
|
|
41826
41905
|
const timers = (0, import_react188.useRef)(/* @__PURE__ */ new Map());
|
|
41827
41906
|
const idCounter2 = (0, import_react188.useRef)(0);
|
|
41828
|
-
const
|
|
41829
|
-
|
|
41830
|
-
|
|
41831
|
-
|
|
41832
|
-
clearTimeout(timer);
|
|
41833
|
-
timers.current.delete(id);
|
|
41834
|
-
}
|
|
41907
|
+
const forget = (0, import_react188.useCallback)((id) => {
|
|
41908
|
+
const c = timers.current.get(id);
|
|
41909
|
+
if (c?.handle) clearTimeout(c.handle);
|
|
41910
|
+
timers.current.delete(id);
|
|
41835
41911
|
}, []);
|
|
41836
|
-
const
|
|
41837
|
-
|
|
41838
|
-
|
|
41839
|
-
|
|
41840
|
-
|
|
41841
|
-
|
|
41842
|
-
|
|
41843
|
-
|
|
41844
|
-
|
|
41845
|
-
|
|
41912
|
+
const dismiss = (0, import_react188.useCallback)(
|
|
41913
|
+
(id) => {
|
|
41914
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
41915
|
+
forget(id);
|
|
41916
|
+
},
|
|
41917
|
+
[forget]
|
|
41918
|
+
);
|
|
41919
|
+
const dismissAll = (0, import_react188.useCallback)(
|
|
41920
|
+
(position) => {
|
|
41921
|
+
setToasts((prev) => {
|
|
41922
|
+
const remaining = position ? prev.filter((t) => t.position !== position) : [];
|
|
41923
|
+
for (const t of prev) {
|
|
41924
|
+
if (!remaining.find((r) => r.id === t.id)) forget(t.id);
|
|
41846
41925
|
}
|
|
41847
|
-
|
|
41848
|
-
|
|
41849
|
-
}
|
|
41926
|
+
return remaining;
|
|
41927
|
+
});
|
|
41928
|
+
},
|
|
41929
|
+
[forget]
|
|
41930
|
+
);
|
|
41931
|
+
const hold = (0, import_react188.useCallback)((ids) => {
|
|
41932
|
+
const now2 = Date.now();
|
|
41933
|
+
for (const id of ids) {
|
|
41934
|
+
const c = timers.current.get(id);
|
|
41935
|
+
if (!c || c.handle === null) continue;
|
|
41936
|
+
clearTimeout(c.handle);
|
|
41937
|
+
c.handle = null;
|
|
41938
|
+
c.remaining = Math.max(0, c.remaining - (now2 - c.since));
|
|
41939
|
+
}
|
|
41850
41940
|
}, []);
|
|
41941
|
+
const release = (0, import_react188.useCallback)(
|
|
41942
|
+
(ids) => {
|
|
41943
|
+
for (const id of ids) {
|
|
41944
|
+
const c = timers.current.get(id);
|
|
41945
|
+
if (!c || c.handle !== null) continue;
|
|
41946
|
+
c.since = Date.now();
|
|
41947
|
+
c.handle = setTimeout(() => dismiss(id), c.remaining);
|
|
41948
|
+
}
|
|
41949
|
+
},
|
|
41950
|
+
[dismiss]
|
|
41951
|
+
);
|
|
41851
41952
|
const toast = (0, import_react188.useCallback)(
|
|
41852
41953
|
(options2) => {
|
|
41853
41954
|
const id = `toast-${++idCounter2.current}`;
|
|
@@ -41864,12 +41965,16 @@ function ToastProvider({
|
|
|
41864
41965
|
render: options2.render,
|
|
41865
41966
|
duration: options2.duration ?? 5e3,
|
|
41866
41967
|
closeable: options2.closeable ?? true,
|
|
41867
|
-
position: options2.position ?? defaultPosition
|
|
41968
|
+
position: options2.position ?? defaultPosition,
|
|
41969
|
+
clampLines: options2.clampLines ?? 2
|
|
41868
41970
|
};
|
|
41869
41971
|
setToasts((prev) => [...prev, item]);
|
|
41870
41972
|
if (item.duration > 0) {
|
|
41871
|
-
|
|
41872
|
-
|
|
41973
|
+
timers.current.set(id, {
|
|
41974
|
+
handle: setTimeout(() => dismiss(id), item.duration),
|
|
41975
|
+
remaining: item.duration,
|
|
41976
|
+
since: Date.now()
|
|
41977
|
+
});
|
|
41873
41978
|
}
|
|
41874
41979
|
return id;
|
|
41875
41980
|
},
|
|
@@ -41897,7 +42002,9 @@ function ToastProvider({
|
|
|
41897
42002
|
items: list,
|
|
41898
42003
|
position: pos,
|
|
41899
42004
|
maxStack,
|
|
41900
|
-
onDismiss: dismiss
|
|
42005
|
+
onDismiss: dismiss,
|
|
42006
|
+
onHold: hold,
|
|
42007
|
+
onRelease: release
|
|
41901
42008
|
},
|
|
41902
42009
|
pos
|
|
41903
42010
|
);
|
|
@@ -42798,7 +42905,20 @@ function VersionHistory({
|
|
|
42798
42905
|
}) {
|
|
42799
42906
|
const [expandedId, setExpandedId] = (0, import_react195.useState)(defaultExpandedId);
|
|
42800
42907
|
const baseId = (0, import_react195.useId)();
|
|
42801
|
-
const showToolbar = Boolean(tabs && tabs.length > 0
|
|
42908
|
+
const showToolbar = Boolean(tabs && tabs.length > 0);
|
|
42909
|
+
const refreshButton = onRefresh ? /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(
|
|
42910
|
+
"button",
|
|
42911
|
+
{
|
|
42912
|
+
type: "button",
|
|
42913
|
+
className: "ods-version-history__refresh",
|
|
42914
|
+
onClick: onRefresh,
|
|
42915
|
+
disabled: refreshing,
|
|
42916
|
+
"aria-label": "Refresh history",
|
|
42917
|
+
title: "Refresh",
|
|
42918
|
+
"data-spinning": refreshing || void 0,
|
|
42919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(RefreshGlyph, {})
|
|
42920
|
+
}
|
|
42921
|
+
) : null;
|
|
42802
42922
|
return /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)(
|
|
42803
42923
|
SlideoutPanel,
|
|
42804
42924
|
{
|
|
@@ -42807,6 +42927,7 @@ function VersionHistory({
|
|
|
42807
42927
|
position,
|
|
42808
42928
|
width,
|
|
42809
42929
|
title,
|
|
42930
|
+
headerActions: showToolbar ? void 0 : refreshButton,
|
|
42810
42931
|
offsetTop,
|
|
42811
42932
|
offsetBottom,
|
|
42812
42933
|
className: cn("ods-version-history", className),
|
|
@@ -42834,19 +42955,7 @@ function VersionHistory({
|
|
|
42834
42955
|
tab.id
|
|
42835
42956
|
);
|
|
42836
42957
|
}) }) : /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("span", {}),
|
|
42837
|
-
|
|
42838
|
-
"button",
|
|
42839
|
-
{
|
|
42840
|
-
type: "button",
|
|
42841
|
-
className: "ods-version-history__refresh",
|
|
42842
|
-
onClick: onRefresh,
|
|
42843
|
-
disabled: refreshing,
|
|
42844
|
-
"aria-label": "Refresh history",
|
|
42845
|
-
title: "Refresh",
|
|
42846
|
-
"data-spinning": refreshing || void 0,
|
|
42847
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(RefreshGlyph, {})
|
|
42848
|
-
}
|
|
42849
|
-
)
|
|
42958
|
+
refreshButton
|
|
42850
42959
|
] }),
|
|
42851
42960
|
error && /* @__PURE__ */ (0, import_jsx_runtime182.jsx)("div", { className: "ods-version-history__banner", children: /* @__PURE__ */ (0, import_jsx_runtime182.jsx)(Banner, { variant: "error", appearance: "subtle", title: "Couldn't load history", description: error }) }),
|
|
42852
42961
|
/* @__PURE__ */ (0, import_jsx_runtime182.jsx)("div", { className: "ods-version-history__body", role: "tabpanel", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime182.jsxs)("div", { className: "ods-version-history__status", role: "status", "aria-live": "polite", children: [
|