@appilots/sdk 0.4.1 → 0.5.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/{chunk-L2A4EZ6V.mjs → chunk-3D7PHOV7.mjs} +2 -1
- package/dist/{chunk-ZWPABTLA.js → chunk-45AMQGS3.js} +5 -5
- package/dist/{chunk-4GUPZDWT.mjs → chunk-BIEF6MNR.mjs} +62 -10
- package/dist/{chunk-P2BR4DFF.mjs → chunk-NIW7E3QD.mjs} +1 -1
- package/dist/{chunk-J75B2HWG.js → chunk-PQHZTAFG.js} +63 -9
- package/dist/{chunk-YSLDAQV7.js → chunk-ZWQUIDBZ.js} +160 -159
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.js +11 -11
- package/dist/hooks/index.mjs +2 -2
- package/dist/{index-Cb0D6uKH.d.mts → index-GvF_FlwO.d.mts} +31 -1
- package/dist/{index-Cb0D6uKH.d.ts → index-GvF_FlwO.d.ts} +31 -1
- package/dist/index.d.mts +40 -3
- package/dist/index.d.ts +40 -3
- package/dist/index.js +69 -65
- package/dist/index.mjs +5 -5
- package/dist/navigation/index.js +13 -13
- package/dist/navigation/index.mjs +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPQHZTAFG_js = require('./chunk-PQHZTAFG.js');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var reactNative = require('react-native');
|
|
6
6
|
|
|
@@ -495,7 +495,7 @@ function walkSubtree(root, detectLists, startInModal = false) {
|
|
|
495
495
|
}
|
|
496
496
|
function walkFiber(root) {
|
|
497
497
|
const snapshot = {
|
|
498
|
-
route:
|
|
498
|
+
route: chunkPQHZTAFG_js.getCurrentScreen(),
|
|
499
499
|
texts: [],
|
|
500
500
|
inputs: [],
|
|
501
501
|
buttons: [],
|
|
@@ -671,9 +671,9 @@ function fiberSliderMatches(fiber, registryId, registryLabel) {
|
|
|
671
671
|
function reconcileSliders(snapshot) {
|
|
672
672
|
const fiberSliders = snapshot.sliders;
|
|
673
673
|
const out = [];
|
|
674
|
-
for (const { id, kind } of
|
|
674
|
+
for (const { id, kind } of chunkPQHZTAFG_js.componentRegistry.snapshot()) {
|
|
675
675
|
if (kind !== "slider") continue;
|
|
676
|
-
const entry =
|
|
676
|
+
const entry = chunkPQHZTAFG_js.componentRegistry.getSlider(id);
|
|
677
677
|
if (!entry) continue;
|
|
678
678
|
const fiber = fiberSliders.find((s) => fiberSliderMatches(s, id, entry.label));
|
|
679
679
|
const visible = !!fiber || typeof entry.screen === "string" && entry.screen === snapshot.route;
|
|
@@ -697,7 +697,7 @@ function reconcileSliders(snapshot) {
|
|
|
697
697
|
snapshot.sliders = out;
|
|
698
698
|
}
|
|
699
699
|
function mergeRegisteredLists(snapshot) {
|
|
700
|
-
const registered =
|
|
700
|
+
const registered = chunkPQHZTAFG_js.listRegistry.snapshot();
|
|
701
701
|
if (registered.length === 0) return;
|
|
702
702
|
const byId = /* @__PURE__ */ new Map();
|
|
703
703
|
for (const list of snapshot.lists) {
|
|
@@ -745,13 +745,14 @@ function mergeRegisteredLists(snapshot) {
|
|
|
745
745
|
}
|
|
746
746
|
}
|
|
747
747
|
function captureSnapshot() {
|
|
748
|
-
const root =
|
|
748
|
+
const root = chunkPQHZTAFG_js.getFiberRoot();
|
|
749
749
|
if (!root) {
|
|
750
750
|
console.warn(
|
|
751
751
|
"[Appilots] captureSnapshot: fiber root not captured yet. Ensure <AppilotsProvider> has rendered before calling this."
|
|
752
752
|
);
|
|
753
|
+
chunkPQHZTAFG_js.recordIntrospectionFailure("never-mounted", null);
|
|
753
754
|
return {
|
|
754
|
-
route:
|
|
755
|
+
route: chunkPQHZTAFG_js.getCurrentScreen(),
|
|
755
756
|
texts: [],
|
|
756
757
|
inputs: [],
|
|
757
758
|
buttons: [],
|
|
@@ -766,17 +767,17 @@ function captureSnapshot() {
|
|
|
766
767
|
}
|
|
767
768
|
const start = Date.now();
|
|
768
769
|
const snapshot = walkFiber(root);
|
|
769
|
-
const activePath =
|
|
770
|
+
const activePath = chunkPQHZTAFG_js.getActiveRouteNames();
|
|
770
771
|
const deepestRoute = activePath[activePath.length - 1];
|
|
771
772
|
if (deepestRoute) snapshot.route = deepestRoute;
|
|
772
773
|
mergeRegisteredLists(snapshot);
|
|
773
774
|
reconcileSliders(snapshot);
|
|
774
|
-
snapshot.elements =
|
|
775
|
-
snapshot.choiceGroups =
|
|
775
|
+
snapshot.elements = chunkPQHZTAFG_js.deriveInteractionElements(snapshot);
|
|
776
|
+
snapshot.choiceGroups = chunkPQHZTAFG_js.attachElementIdsToChoiceGroups(
|
|
776
777
|
snapshot.choiceGroups,
|
|
777
778
|
snapshot.elements
|
|
778
779
|
);
|
|
779
|
-
|
|
780
|
+
chunkPQHZTAFG_js.elementRegistry.replaceAll(snapshot.elements);
|
|
780
781
|
const elapsed = Date.now() - start;
|
|
781
782
|
const totalListItems = snapshot.lists.reduce(
|
|
782
783
|
(acc, l) => acc + l.items.length,
|
|
@@ -969,7 +970,7 @@ function wrapTouchable(fiber, label) {
|
|
|
969
970
|
};
|
|
970
971
|
}
|
|
971
972
|
function findInteractiveByIdentifier(query, options = {}) {
|
|
972
|
-
const root =
|
|
973
|
+
const root = chunkPQHZTAFG_js.getFiberRoot();
|
|
973
974
|
if (!root) {
|
|
974
975
|
console.warn("[Appilots] findInteractiveByIdentifier: fiber root not captured yet");
|
|
975
976
|
return null;
|
|
@@ -1210,7 +1211,7 @@ function isPressableFiber(fiber) {
|
|
|
1210
1211
|
return TOUCHABLE_NAMES.has(typeName) || hasPressHandler3(fiber);
|
|
1211
1212
|
}
|
|
1212
1213
|
function findListContainers(options = {}) {
|
|
1213
|
-
const root =
|
|
1214
|
+
const root = chunkPQHZTAFG_js.getFiberRoot();
|
|
1214
1215
|
if (!root) return [];
|
|
1215
1216
|
const containers = [];
|
|
1216
1217
|
const visited = /* @__PURE__ */ new WeakSet();
|
|
@@ -1369,7 +1370,7 @@ function describeTouchable(fiber) {
|
|
|
1369
1370
|
}
|
|
1370
1371
|
function touchableLooksDestructive(fiber) {
|
|
1371
1372
|
const descriptor = describeTouchable(fiber);
|
|
1372
|
-
if (descriptor &&
|
|
1373
|
+
if (descriptor && chunkPQHZTAFG_js.looksDestructiveActionLabel(descriptor)) return true;
|
|
1373
1374
|
const props = fiber?.memoizedProps ?? {};
|
|
1374
1375
|
const haystack = [
|
|
1375
1376
|
props.testID,
|
|
@@ -1377,7 +1378,7 @@ function touchableLooksDestructive(fiber) {
|
|
|
1377
1378
|
props.accessibilityHint,
|
|
1378
1379
|
props.label
|
|
1379
1380
|
].filter((value) => typeof value === "string").join(" ");
|
|
1380
|
-
return
|
|
1381
|
+
return chunkPQHZTAFG_js.looksDestructiveActionLabel(haystack);
|
|
1381
1382
|
}
|
|
1382
1383
|
function describeItemCandidate(listIndex, zeroBasedIndex, item) {
|
|
1383
1384
|
const syntheticId = `list-${listIndex}-item-${zeroBasedIndex + 1}`;
|
|
@@ -1508,7 +1509,7 @@ function candidateLists(containers, locator) {
|
|
|
1508
1509
|
return containers.map((list, listIndex) => ({ list, listIndex }));
|
|
1509
1510
|
}
|
|
1510
1511
|
function pressListItemAtOrdinal(listIndex, itemIndex) {
|
|
1511
|
-
if (!
|
|
1512
|
+
if (!chunkPQHZTAFG_js.getFiberRoot()) return { ok: false, reason: "no-fiber-root" };
|
|
1512
1513
|
const containers = findListContainers({ allowSingleHeuristic: true });
|
|
1513
1514
|
if (listIndex < 0 || listIndex >= containers.length) {
|
|
1514
1515
|
return { ok: false, reason: "list-not-found" };
|
|
@@ -1522,7 +1523,7 @@ function pressListItemAtOrdinal(listIndex, itemIndex) {
|
|
|
1522
1523
|
return pressResolvedListItem(list, items[zeroBased], listIndex, itemIndex);
|
|
1523
1524
|
}
|
|
1524
1525
|
function pressListItemByIdentity(locator) {
|
|
1525
|
-
if (!
|
|
1526
|
+
if (!chunkPQHZTAFG_js.getFiberRoot()) return { ok: false, reason: "no-fiber-root" };
|
|
1526
1527
|
const parsed = locator.syntheticId ? parseSyntheticListItemId(locator.syntheticId) : null;
|
|
1527
1528
|
const effective = parsed ? { ...locator, listIndex: parsed.listIndex, itemIndex: parsed.itemIndex } : locator;
|
|
1528
1529
|
const containers = findListContainers({ allowSingleHeuristic: true });
|
|
@@ -1562,7 +1563,7 @@ function screenDiagnose(targetId, category = "component-not-found") {
|
|
|
1562
1563
|
return {
|
|
1563
1564
|
category,
|
|
1564
1565
|
targetId,
|
|
1565
|
-
screen:
|
|
1566
|
+
screen: chunkPQHZTAFG_js.getCurrentScreen() ?? void 0
|
|
1566
1567
|
};
|
|
1567
1568
|
}
|
|
1568
1569
|
function isPressLike(action) {
|
|
@@ -1579,10 +1580,10 @@ function elementLookupKey(value) {
|
|
|
1579
1580
|
return canonicalElementId(value).toLowerCase().replace(/[\s_]+/g, "-");
|
|
1580
1581
|
}
|
|
1581
1582
|
function findRegisteredElement(elementId) {
|
|
1582
|
-
const direct =
|
|
1583
|
+
const direct = chunkPQHZTAFG_js.elementRegistry.get(elementId) ?? chunkPQHZTAFG_js.elementRegistry.get(canonicalElementId(elementId));
|
|
1583
1584
|
if (direct) return direct;
|
|
1584
1585
|
const wanted = elementLookupKey(elementId);
|
|
1585
|
-
return
|
|
1586
|
+
return chunkPQHZTAFG_js.elementRegistry.snapshot().find((element) => elementLookupKey(element.id) === wanted);
|
|
1586
1587
|
}
|
|
1587
1588
|
function resolveInteractionElement(elementId) {
|
|
1588
1589
|
return getLatestElement(elementId);
|
|
@@ -1802,7 +1803,7 @@ function dispatchElement(element, registry, action) {
|
|
|
1802
1803
|
}
|
|
1803
1804
|
function dispatchStructuredElementId(identifier, action) {
|
|
1804
1805
|
if (!isElementIdentifier(identifier) || !isPressLike(action)) return null;
|
|
1805
|
-
const parsed =
|
|
1806
|
+
const parsed = chunkPQHZTAFG_js.parseStableElementId(identifier);
|
|
1806
1807
|
if (!parsed || parsed.role !== "option") return null;
|
|
1807
1808
|
if (!parsed.itemKey && !parsed.listId) return null;
|
|
1808
1809
|
const pressed = pressListItemByIdentity({
|
|
@@ -1842,20 +1843,20 @@ function normalize4(value) {
|
|
|
1842
1843
|
return value.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g, "").replace(/[^a-z0-9]/g, "");
|
|
1843
1844
|
}
|
|
1844
1845
|
function resolveScreenForFormFields() {
|
|
1845
|
-
const activePath =
|
|
1846
|
+
const activePath = chunkPQHZTAFG_js.getActiveRouteNames();
|
|
1846
1847
|
for (let i = activePath.length - 1; i >= 0; i--) {
|
|
1847
1848
|
const name = activePath[i];
|
|
1848
|
-
const meta = name ?
|
|
1849
|
+
const meta = name ? chunkPQHZTAFG_js.getScreenMetadata(name) : void 0;
|
|
1849
1850
|
if (name && Array.isArray(meta?.fields) && meta.fields.length > 0) return name;
|
|
1850
1851
|
}
|
|
1851
|
-
return
|
|
1852
|
+
return chunkPQHZTAFG_js.getCurrentScreen();
|
|
1852
1853
|
}
|
|
1853
1854
|
function collectKnownFormFields(registry) {
|
|
1854
1855
|
const registryFields = registry.snapshot().filter((entry) => entry.kind === "field" || entry.kind === "slider").map((entry) => ({ id: entry.id, label: entry.label }));
|
|
1855
1856
|
if (registryFields.length >= 2) return registryFields;
|
|
1856
1857
|
const screen = resolveScreenForFormFields();
|
|
1857
1858
|
if (screen) {
|
|
1858
|
-
const metaFields =
|
|
1859
|
+
const metaFields = chunkPQHZTAFG_js.getScreenMetadata(screen)?.fields;
|
|
1859
1860
|
if (Array.isArray(metaFields) && metaFields.length > 0) {
|
|
1860
1861
|
return metaFields.filter((field) => !!field && typeof field.id === "string").map((field) => ({
|
|
1861
1862
|
id: field.id,
|
|
@@ -1865,7 +1866,7 @@ function collectKnownFormFields(registry) {
|
|
|
1865
1866
|
}));
|
|
1866
1867
|
}
|
|
1867
1868
|
}
|
|
1868
|
-
for (const meta of
|
|
1869
|
+
for (const meta of chunkPQHZTAFG_js.getAllScreens()) {
|
|
1869
1870
|
if (Array.isArray(meta.fields) && meta.fields.length > 0) {
|
|
1870
1871
|
return meta.fields.filter((field) => !!field && typeof field.id === "string").map((field) => ({
|
|
1871
1872
|
id: field.id,
|
|
@@ -1963,7 +1964,7 @@ function rewriteMisplacedFormFillFields(fields, registry) {
|
|
|
1963
1964
|
const inferred = inferFieldIdForValue(String(field.value ?? ""), knownFields, used);
|
|
1964
1965
|
if (!inferred) return field;
|
|
1965
1966
|
used.add(inferred);
|
|
1966
|
-
|
|
1967
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
1967
1968
|
`formFieldRewrite: ${field.fieldId} \u2192 ${inferred} (value=${JSON.stringify(field.value)})`
|
|
1968
1969
|
);
|
|
1969
1970
|
return { ...field, fieldId: inferred };
|
|
@@ -2001,7 +2002,7 @@ function readVisibleFormSuccess(snap) {
|
|
|
2001
2002
|
return (snap.texts ?? []).find((text) => text?.trim() && FORM_SUCCESS_TEXT_RE.test(text));
|
|
2002
2003
|
}
|
|
2003
2004
|
function submitAsyncStillPending(submitTargetId) {
|
|
2004
|
-
const probe =
|
|
2005
|
+
const probe = chunkPQHZTAFG_js.probeLoadingState(submitTargetId ?? null, chunkPQHZTAFG_js.getCurrentScreen());
|
|
2005
2006
|
if (probe.loading) return true;
|
|
2006
2007
|
if (submitTargetId && probe.pressedFound && probe.pressedDisabled) return true;
|
|
2007
2008
|
return false;
|
|
@@ -2013,7 +2014,7 @@ function evaluatePostSubmitSnapshot(snap, activePath) {
|
|
|
2013
2014
|
}
|
|
2014
2015
|
const successText = readVisibleFormSuccess(snap);
|
|
2015
2016
|
if (successText) return { status: "success", message: successText };
|
|
2016
|
-
if (!
|
|
2017
|
+
if (!chunkPQHZTAFG_js.snapshotShowsOpenCreateForm(snap, activePath)) {
|
|
2017
2018
|
return { status: "success" };
|
|
2018
2019
|
}
|
|
2019
2020
|
return void 0;
|
|
@@ -2029,7 +2030,7 @@ async function waitForPostSubmitOutcome(options) {
|
|
|
2029
2030
|
continue;
|
|
2030
2031
|
}
|
|
2031
2032
|
const snap2 = captureSnapshot();
|
|
2032
|
-
const activePath2 =
|
|
2033
|
+
const activePath2 = chunkPQHZTAFG_js.getActiveRouteNames();
|
|
2033
2034
|
const outcome2 = evaluatePostSubmitSnapshot(snap2, activePath2);
|
|
2034
2035
|
if (outcome2) return outcome2;
|
|
2035
2036
|
await sleep(pollMs);
|
|
@@ -2041,7 +2042,7 @@ async function waitForPostSubmitOutcome(options) {
|
|
|
2041
2042
|
};
|
|
2042
2043
|
}
|
|
2043
2044
|
const snap = captureSnapshot();
|
|
2044
|
-
const activePath =
|
|
2045
|
+
const activePath = chunkPQHZTAFG_js.getActiveRouteNames();
|
|
2045
2046
|
const outcome = evaluatePostSubmitSnapshot(snap, activePath);
|
|
2046
2047
|
if (outcome) return outcome;
|
|
2047
2048
|
return {
|
|
@@ -2147,16 +2148,16 @@ function findSnapshotButton(targetId) {
|
|
|
2147
2148
|
}
|
|
2148
2149
|
}
|
|
2149
2150
|
function buildUiDiagnose(targetId, cause) {
|
|
2150
|
-
const activePath =
|
|
2151
|
-
const screen = activePath[activePath.length - 1] ??
|
|
2151
|
+
const activePath = chunkPQHZTAFG_js.getActiveRouteNames();
|
|
2152
|
+
const screen = activePath[activePath.length - 1] ?? chunkPQHZTAFG_js.getCurrentScreen() ?? void 0;
|
|
2152
2153
|
const screenPath = activePath.length > 1 ? activePath.join("/") : screen;
|
|
2153
2154
|
const diagnose = {
|
|
2154
2155
|
category: cause === "not-found" ? "component-not-found" : cause === "disabled" ? "disabled" : "unknown",
|
|
2155
2156
|
targetId,
|
|
2156
2157
|
screen: screenPath
|
|
2157
2158
|
};
|
|
2158
|
-
if (
|
|
2159
|
-
diagnose.visibleMessage =
|
|
2159
|
+
if (chunkPQHZTAFG_js.isOptionalStepAutomationFailure(targetId, screenPath, activePath)) {
|
|
2160
|
+
diagnose.visibleMessage = chunkPQHZTAFG_js.OPTIONAL_STEP_AUTOMATION_HINT;
|
|
2160
2161
|
diagnose.recoverable = true;
|
|
2161
2162
|
}
|
|
2162
2163
|
return diagnose;
|
|
@@ -2218,9 +2219,9 @@ function resolveComponentId(componentId, registry, action) {
|
|
|
2218
2219
|
return comp.id;
|
|
2219
2220
|
}
|
|
2220
2221
|
}
|
|
2221
|
-
const currentScreen =
|
|
2222
|
+
const currentScreen = chunkPQHZTAFG_js.getCurrentScreen();
|
|
2222
2223
|
if (currentScreen) {
|
|
2223
|
-
const screenMeta =
|
|
2224
|
+
const screenMeta = chunkPQHZTAFG_js.getScreenMetadata(currentScreen);
|
|
2224
2225
|
const actions = screenMeta?.actions;
|
|
2225
2226
|
if (actions && Array.isArray(actions)) {
|
|
2226
2227
|
const metaAction = actions.find(
|
|
@@ -2374,7 +2375,7 @@ function checkModalOcclusion(rawComponentId, action) {
|
|
|
2374
2375
|
return null;
|
|
2375
2376
|
}
|
|
2376
2377
|
if (typeof rawComponentId !== "string" || rawComponentId.trim().length === 0) return null;
|
|
2377
|
-
const fiberRoot =
|
|
2378
|
+
const fiberRoot = chunkPQHZTAFG_js.getFiberRoot();
|
|
2378
2379
|
if (!fiberRoot) return null;
|
|
2379
2380
|
let snap;
|
|
2380
2381
|
try {
|
|
@@ -2437,7 +2438,7 @@ function checkModalOcclusion(rawComponentId, action) {
|
|
|
2437
2438
|
}
|
|
2438
2439
|
function uiInteractionHandler(payload, context) {
|
|
2439
2440
|
const { permissions } = context;
|
|
2440
|
-
const registry = context.registry ??
|
|
2441
|
+
const registry = context.registry ?? chunkPQHZTAFG_js.componentRegistry;
|
|
2441
2442
|
if (!permissions.canInteractUI) {
|
|
2442
2443
|
return {
|
|
2443
2444
|
success: false,
|
|
@@ -2496,7 +2497,7 @@ function uiInteractionHandler(payload, context) {
|
|
|
2496
2497
|
);
|
|
2497
2498
|
return { success: true };
|
|
2498
2499
|
}
|
|
2499
|
-
const screen =
|
|
2500
|
+
const screen = chunkPQHZTAFG_js.getCurrentScreen() ?? void 0;
|
|
2500
2501
|
if (result.reason === "list-not-found" || result.reason === "item-not-found") {
|
|
2501
2502
|
return {
|
|
2502
2503
|
success: false,
|
|
@@ -2661,7 +2662,7 @@ function submitLabelHintsSubmit(label) {
|
|
|
2661
2662
|
return SUBMIT_LABEL_HINT_RE.test(trimmed);
|
|
2662
2663
|
}
|
|
2663
2664
|
function screenDeclaresSubmitAction(screenName) {
|
|
2664
|
-
const meta =
|
|
2665
|
+
const meta = chunkPQHZTAFG_js.getScreenMetadata(screenName);
|
|
2665
2666
|
return Array.isArray(meta?.actions) && meta.actions.some(
|
|
2666
2667
|
(action) => typeof action === "object" && action !== null && action.type === "submit"
|
|
2667
2668
|
);
|
|
@@ -2694,7 +2695,7 @@ function resolveFormScreensForSubmit(screen, activePath, registry) {
|
|
|
2694
2695
|
} else {
|
|
2695
2696
|
push(screen);
|
|
2696
2697
|
}
|
|
2697
|
-
push(
|
|
2698
|
+
push(chunkPQHZTAFG_js.getCurrentScreen() ?? void 0);
|
|
2698
2699
|
const withSubmit = [];
|
|
2699
2700
|
const rest = [];
|
|
2700
2701
|
for (const name of ordered) {
|
|
@@ -2712,7 +2713,7 @@ function collectSubmitTargetCandidates(screens, registry) {
|
|
|
2712
2713
|
candidates.push(id);
|
|
2713
2714
|
};
|
|
2714
2715
|
for (const screenName of screens) {
|
|
2715
|
-
const meta =
|
|
2716
|
+
const meta = chunkPQHZTAFG_js.getScreenMetadata(screenName);
|
|
2716
2717
|
const submitMeta = Array.isArray(meta?.actions) ? meta.actions.find(
|
|
2717
2718
|
(action) => typeof action === "object" && action !== null && action.type === "submit"
|
|
2718
2719
|
) : void 0;
|
|
@@ -2758,8 +2759,8 @@ function readVisibleValidation(fieldId, label) {
|
|
|
2758
2759
|
return void 0;
|
|
2759
2760
|
}
|
|
2760
2761
|
function resolveScreenContext() {
|
|
2761
|
-
const activePath =
|
|
2762
|
-
const screen = activePath[activePath.length - 1] ??
|
|
2762
|
+
const activePath = chunkPQHZTAFG_js.getActiveRouteNames();
|
|
2763
|
+
const screen = activePath[activePath.length - 1] ?? chunkPQHZTAFG_js.getCurrentScreen() ?? void 0;
|
|
2763
2764
|
return { screen, activePath };
|
|
2764
2765
|
}
|
|
2765
2766
|
function selectValueApplied(fieldId, requestedValue, currentValue, registry) {
|
|
@@ -2767,36 +2768,36 @@ function selectValueApplied(fieldId, requestedValue, currentValue, registry) {
|
|
|
2767
2768
|
if (!requested) return false;
|
|
2768
2769
|
const meta = getMetadataField(fieldId, registry);
|
|
2769
2770
|
const options = Array.isArray(meta?.options) ? meta.options : [];
|
|
2770
|
-
const requestedNorm =
|
|
2771
|
-
const currentNorm =
|
|
2771
|
+
const requestedNorm = chunkPQHZTAFG_js.normalize3(requested);
|
|
2772
|
+
const currentNorm = chunkPQHZTAFG_js.normalize3(currentValue);
|
|
2772
2773
|
if (currentNorm === requestedNorm) return true;
|
|
2773
2774
|
for (const option of options) {
|
|
2774
2775
|
const value = typeof option?.value === "string" ? option.value : "";
|
|
2775
2776
|
const label = typeof option?.label === "string" ? option.label : "";
|
|
2776
|
-
if (
|
|
2777
|
-
if (
|
|
2778
|
-
if (
|
|
2777
|
+
if (chunkPQHZTAFG_js.normalize3(value) === requestedNorm && chunkPQHZTAFG_js.normalize3(label) === currentNorm) return true;
|
|
2778
|
+
if (chunkPQHZTAFG_js.normalize3(label) === requestedNorm && chunkPQHZTAFG_js.normalize3(label) === currentNorm) return true;
|
|
2779
|
+
if (chunkPQHZTAFG_js.normalize3(value) === requestedNorm && chunkPQHZTAFG_js.normalize3(value) === currentNorm) return true;
|
|
2779
2780
|
}
|
|
2780
2781
|
return false;
|
|
2781
2782
|
}
|
|
2782
2783
|
function getMetadataField(fieldId, registry) {
|
|
2783
2784
|
const screens = /* @__PURE__ */ new Set();
|
|
2784
|
-
for (const name of
|
|
2785
|
-
const current =
|
|
2785
|
+
for (const name of chunkPQHZTAFG_js.getActiveRouteNames()) screens.add(name);
|
|
2786
|
+
const current = chunkPQHZTAFG_js.getCurrentScreen();
|
|
2786
2787
|
if (current) screens.add(current);
|
|
2787
2788
|
if (registry) {
|
|
2788
2789
|
for (const comp of registry.snapshot()) {
|
|
2789
2790
|
if (comp.kind === "field" && comp.screen) screens.add(comp.screen);
|
|
2790
2791
|
}
|
|
2791
2792
|
}
|
|
2792
|
-
const needle =
|
|
2793
|
+
const needle = chunkPQHZTAFG_js.normalize3(fieldId);
|
|
2793
2794
|
for (const screenName of screens) {
|
|
2794
|
-
const screenMeta =
|
|
2795
|
+
const screenMeta = chunkPQHZTAFG_js.getScreenMetadata(screenName);
|
|
2795
2796
|
const fields = Array.isArray(screenMeta?.fields) ? screenMeta.fields : [];
|
|
2796
2797
|
const match = fields.find((field) => {
|
|
2797
2798
|
if (!field || typeof field !== "object") return false;
|
|
2798
|
-
const id = typeof field.id === "string" ?
|
|
2799
|
-
const label = typeof field.label === "string" ?
|
|
2799
|
+
const id = typeof field.id === "string" ? chunkPQHZTAFG_js.normalize3(field.id) : "";
|
|
2800
|
+
const label = typeof field.label === "string" ? chunkPQHZTAFG_js.normalize3(field.label) : "";
|
|
2800
2801
|
return id === needle || label === needle;
|
|
2801
2802
|
});
|
|
2802
2803
|
if (match) return match;
|
|
@@ -2808,11 +2809,11 @@ function resolveSelectOption(fieldId, value, registry) {
|
|
|
2808
2809
|
if (!requested) return void 0;
|
|
2809
2810
|
const meta = getMetadataField(fieldId, registry);
|
|
2810
2811
|
const options = Array.isArray(meta?.options) ? meta.options : [];
|
|
2811
|
-
const requestedNorm =
|
|
2812
|
+
const requestedNorm = chunkPQHZTAFG_js.normalize3(requested);
|
|
2812
2813
|
for (const option of options) {
|
|
2813
2814
|
const optionValue = typeof option?.value === "string" ? option.value : "";
|
|
2814
2815
|
const optionLabel = typeof option?.label === "string" ? option.label : "";
|
|
2815
|
-
if (
|
|
2816
|
+
if (chunkPQHZTAFG_js.normalize3(optionValue) === requestedNorm || chunkPQHZTAFG_js.normalize3(optionLabel) === requestedNorm) {
|
|
2816
2817
|
return { value: optionValue, label: optionLabel };
|
|
2817
2818
|
}
|
|
2818
2819
|
}
|
|
@@ -2862,12 +2863,12 @@ async function tryPressSelectOption(fieldId, value, registry, options = {}) {
|
|
|
2862
2863
|
return {
|
|
2863
2864
|
success: false,
|
|
2864
2865
|
error: `No pressable option found for select field "${fieldId}"`,
|
|
2865
|
-
diagnose: { category: "component-not-found", fieldId, screen:
|
|
2866
|
+
diagnose: { category: "component-not-found", fieldId, screen: chunkPQHZTAFG_js.getCurrentScreen() ?? void 0 }
|
|
2866
2867
|
};
|
|
2867
2868
|
}
|
|
2868
2869
|
function normalizeFieldType(type) {
|
|
2869
2870
|
if (typeof type !== "string") return void 0;
|
|
2870
|
-
const normalized =
|
|
2871
|
+
const normalized = chunkPQHZTAFG_js.normalize3(type);
|
|
2871
2872
|
if (normalized === "select" || normalized === "picker" || normalized === "dropdown") return "select";
|
|
2872
2873
|
if (normalized === "toggle" || normalized === "switch" || normalized === "checkbox") return "toggle";
|
|
2873
2874
|
if (normalized === "date") return "date";
|
|
@@ -2895,7 +2896,7 @@ function fieldCueTerms(fieldId, label) {
|
|
|
2895
2896
|
);
|
|
2896
2897
|
const terms = /* @__PURE__ */ new Set();
|
|
2897
2898
|
for (const value of raw) {
|
|
2898
|
-
const normalized =
|
|
2899
|
+
const normalized = chunkPQHZTAFG_js.normalize3(value);
|
|
2899
2900
|
if (normalized.length >= 3 && normalized !== "id") terms.add(normalized);
|
|
2900
2901
|
}
|
|
2901
2902
|
return [...terms];
|
|
@@ -2906,17 +2907,17 @@ function snapshotHasFieldCue(snap, fieldId, label) {
|
|
|
2906
2907
|
const visible = [
|
|
2907
2908
|
...snap.texts ?? [],
|
|
2908
2909
|
...(snap.buttons ?? []).map((b) => b.label ?? b.id ?? "")
|
|
2909
|
-
].map((text) =>
|
|
2910
|
+
].map((text) => chunkPQHZTAFG_js.normalize3(text)).filter(Boolean);
|
|
2910
2911
|
return visible.some((text) => terms.some((term) => text.includes(term) || term.includes(text)));
|
|
2911
2912
|
}
|
|
2912
2913
|
function scoreCandidateText(value, texts) {
|
|
2913
|
-
const valueNorm =
|
|
2914
|
+
const valueNorm = chunkPQHZTAFG_js.normalize3(String(value ?? ""));
|
|
2914
2915
|
if (!valueNorm) return 0;
|
|
2915
2916
|
let best = 0;
|
|
2916
2917
|
for (const text of texts) {
|
|
2917
|
-
const textNorm =
|
|
2918
|
+
const textNorm = chunkPQHZTAFG_js.normalize3(text);
|
|
2918
2919
|
if (!textNorm) continue;
|
|
2919
|
-
best = Math.max(best,
|
|
2920
|
+
best = Math.max(best, chunkPQHZTAFG_js.matchScore(valueNorm, textNorm));
|
|
2920
2921
|
}
|
|
2921
2922
|
return best;
|
|
2922
2923
|
}
|
|
@@ -2930,7 +2931,7 @@ function optionTexts(option) {
|
|
|
2930
2931
|
function buildChoiceCandidates(snap, fieldId, value, allowFirstVisibleWhenNoCue, registry) {
|
|
2931
2932
|
const fieldLabel = getFieldLabel(fieldId, registry);
|
|
2932
2933
|
const fieldCueVisible = snapshotHasFieldCue(snap, fieldId, fieldLabel);
|
|
2933
|
-
const genericValue =
|
|
2934
|
+
const genericValue = chunkPQHZTAFG_js.isGenericSelectValue(value);
|
|
2934
2935
|
const candidates = [];
|
|
2935
2936
|
let order = 0;
|
|
2936
2937
|
const choiceGroups = snap.choiceGroups ?? [];
|
|
@@ -2942,7 +2943,7 @@ function buildChoiceCandidates(snap, fieldId, value, allowFirstVisibleWhenNoCue,
|
|
|
2942
2943
|
const groupCueScore = Math.max(
|
|
2943
2944
|
globalCueScore,
|
|
2944
2945
|
...groupTexts.map((text) => {
|
|
2945
|
-
const normalized =
|
|
2946
|
+
const normalized = chunkPQHZTAFG_js.normalize3(text);
|
|
2946
2947
|
return fieldCueTerms(fieldId, fieldLabel).some(
|
|
2947
2948
|
(term) => normalized.includes(term) || term.includes(normalized)
|
|
2948
2949
|
) ? 80 : 0;
|
|
@@ -2979,7 +2980,7 @@ function buildChoiceCandidates(snap, fieldId, value, allowFirstVisibleWhenNoCue,
|
|
|
2979
2980
|
const elementCueScore = Math.max(
|
|
2980
2981
|
fieldCueVisible && elements.length <= 12 ? 50 : 0,
|
|
2981
2982
|
...cueTexts.map((text) => {
|
|
2982
|
-
const normalized =
|
|
2983
|
+
const normalized = chunkPQHZTAFG_js.normalize3(text);
|
|
2983
2984
|
return fieldTerms.some(
|
|
2984
2985
|
(term) => normalized.includes(term) || term.includes(normalized)
|
|
2985
2986
|
) ? 80 : 0;
|
|
@@ -3039,7 +3040,7 @@ async function selectVisibleChoiceAsync(fieldId, value, registry, options) {
|
|
|
3039
3040
|
return {
|
|
3040
3041
|
success: false,
|
|
3041
3042
|
error: err?.message ?? "Could not capture visible choices",
|
|
3042
|
-
diagnose: { category: "unknown", fieldId, screen:
|
|
3043
|
+
diagnose: { category: "unknown", fieldId, screen: chunkPQHZTAFG_js.getCurrentScreen() ?? void 0 }
|
|
3043
3044
|
};
|
|
3044
3045
|
}
|
|
3045
3046
|
const candidates = buildChoiceCandidates(
|
|
@@ -3054,7 +3055,7 @@ async function selectVisibleChoiceAsync(fieldId, value, registry, options) {
|
|
|
3054
3055
|
return {
|
|
3055
3056
|
success: false,
|
|
3056
3057
|
error: `No visible option found for select field "${fieldId}"`,
|
|
3057
|
-
diagnose: { category: "component-not-found", fieldId, screen:
|
|
3058
|
+
diagnose: { category: "component-not-found", fieldId, screen: chunkPQHZTAFG_js.getCurrentScreen() ?? void 0 }
|
|
3058
3059
|
};
|
|
3059
3060
|
}
|
|
3060
3061
|
const pressed = pressTargetByIdOrLabel(candidate.targetId, registry);
|
|
@@ -3067,7 +3068,7 @@ async function selectVisibleChoiceAsync(fieldId, value, registry, options) {
|
|
|
3067
3068
|
}
|
|
3068
3069
|
function isContinuationButton(label) {
|
|
3069
3070
|
if (!label) return false;
|
|
3070
|
-
return /^(next|continue|proximo|prox|continuar|avancar|avançar)$/i.test(
|
|
3071
|
+
return /^(next|continue|proximo|prox|continuar|avancar|avançar)$/i.test(chunkPQHZTAFG_js.normalize3(label));
|
|
3071
3072
|
}
|
|
3072
3073
|
function pressContinuationButton(registry) {
|
|
3073
3074
|
const snap = captureSnapshot();
|
|
@@ -3080,7 +3081,7 @@ function pressContinuationButton(registry) {
|
|
|
3080
3081
|
return {
|
|
3081
3082
|
success: false,
|
|
3082
3083
|
error: "No enabled continuation button is visible",
|
|
3083
|
-
diagnose: { category: "component-not-found", screen:
|
|
3084
|
+
diagnose: { category: "component-not-found", screen: chunkPQHZTAFG_js.getCurrentScreen() ?? void 0 }
|
|
3084
3085
|
};
|
|
3085
3086
|
}
|
|
3086
3087
|
return pressTargetByIdOrLabel(id, registry);
|
|
@@ -3100,18 +3101,18 @@ function findField(fieldId, registry) {
|
|
|
3100
3101
|
return registry.getField(comp.id);
|
|
3101
3102
|
}
|
|
3102
3103
|
}
|
|
3103
|
-
const currentScreenForTieBreak =
|
|
3104
|
-
const needle =
|
|
3104
|
+
const currentScreenForTieBreak = chunkPQHZTAFG_js.getCurrentScreen();
|
|
3105
|
+
const needle = chunkPQHZTAFG_js.normalize3(fieldId);
|
|
3105
3106
|
let bestComp;
|
|
3106
3107
|
let bestScore = 0;
|
|
3107
3108
|
let bestOnCurrentScreen = false;
|
|
3108
3109
|
for (const comp of snapshot) {
|
|
3109
3110
|
if (comp.kind !== "field") continue;
|
|
3110
|
-
const candidates = [
|
|
3111
|
-
if (comp.label) candidates.push(
|
|
3111
|
+
const candidates = [chunkPQHZTAFG_js.normalize3(comp.id)];
|
|
3112
|
+
if (comp.label) candidates.push(chunkPQHZTAFG_js.normalize3(comp.label));
|
|
3112
3113
|
let candidateScore = 0;
|
|
3113
3114
|
for (const cand of candidates) {
|
|
3114
|
-
const s =
|
|
3115
|
+
const s = chunkPQHZTAFG_js.matchScore(needle, cand);
|
|
3115
3116
|
if (s > candidateScore) candidateScore = s;
|
|
3116
3117
|
}
|
|
3117
3118
|
if (candidateScore === 0) continue;
|
|
@@ -3129,9 +3130,9 @@ function findField(fieldId, registry) {
|
|
|
3129
3130
|
);
|
|
3130
3131
|
return registry.getField(bestComp.id);
|
|
3131
3132
|
}
|
|
3132
|
-
const currentScreen =
|
|
3133
|
+
const currentScreen = chunkPQHZTAFG_js.getCurrentScreen();
|
|
3133
3134
|
if (currentScreen) {
|
|
3134
|
-
const screenMeta =
|
|
3135
|
+
const screenMeta = chunkPQHZTAFG_js.getScreenMetadata(currentScreen);
|
|
3135
3136
|
const fields = screenMeta?.fields;
|
|
3136
3137
|
if (fields && Array.isArray(fields)) {
|
|
3137
3138
|
const metaField = fields.find(
|
|
@@ -3139,12 +3140,12 @@ function findField(fieldId, registry) {
|
|
|
3139
3140
|
);
|
|
3140
3141
|
if (metaField && typeof metaField === "object" && metaField.label) {
|
|
3141
3142
|
const metaLabel = metaField.label;
|
|
3142
|
-
const metaNeedle =
|
|
3143
|
+
const metaNeedle = chunkPQHZTAFG_js.normalize3(metaLabel);
|
|
3143
3144
|
let mBest;
|
|
3144
3145
|
let mBestScore = 0;
|
|
3145
3146
|
for (const comp of snapshot) {
|
|
3146
3147
|
if (comp.kind !== "field" || !comp.label) continue;
|
|
3147
|
-
const score =
|
|
3148
|
+
const score = chunkPQHZTAFG_js.matchScore(metaNeedle, chunkPQHZTAFG_js.normalize3(comp.label));
|
|
3148
3149
|
if (score > mBestScore) {
|
|
3149
3150
|
mBestScore = score;
|
|
3150
3151
|
mBest = comp;
|
|
@@ -3165,7 +3166,7 @@ function findField(fieldId, registry) {
|
|
|
3165
3166
|
);
|
|
3166
3167
|
return registry.getField(bestComp.id);
|
|
3167
3168
|
}
|
|
3168
|
-
|
|
3169
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
3169
3170
|
`findField: NOT FOUND \u2014 fieldId="${fieldId}" not in registry. Available fields: ${snapshot.filter((c) => c.kind === "field").map((c) => `"${c.id}" (label: ${c.label})`).join(", ") || "none"}`
|
|
3170
3171
|
);
|
|
3171
3172
|
return void 0;
|
|
@@ -3185,7 +3186,7 @@ function findToggle(fieldId, registry) {
|
|
|
3185
3186
|
return registry.getToggle(comp.id);
|
|
3186
3187
|
}
|
|
3187
3188
|
}
|
|
3188
|
-
|
|
3189
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
3189
3190
|
`findToggle: NOT FOUND \u2014 fieldId="${fieldId}" not in registry. Available toggles: ${snapshot.filter((c) => c.kind === "toggle").map((c) => `"${c.id}"`).join(", ") || "none"}`
|
|
3190
3191
|
);
|
|
3191
3192
|
return void 0;
|
|
@@ -3205,7 +3206,7 @@ function findSlider(fieldId, registry) {
|
|
|
3205
3206
|
var sleep2 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
3206
3207
|
async function formFillHandler(payload, context) {
|
|
3207
3208
|
const { permissions } = context;
|
|
3208
|
-
const registry = context.registry ??
|
|
3209
|
+
const registry = context.registry ?? chunkPQHZTAFG_js.componentRegistry;
|
|
3209
3210
|
const { screen, activePath } = resolveScreenContext();
|
|
3210
3211
|
const screenPath = activePath.length > 1 ? activePath.join("/") : screen;
|
|
3211
3212
|
if (!permissions.canFillForms) {
|
|
@@ -3224,7 +3225,7 @@ async function formFillHandler(payload, context) {
|
|
|
3224
3225
|
}
|
|
3225
3226
|
const registrySnapshot = registry.snapshot();
|
|
3226
3227
|
if (registrySnapshot.length === 0) {
|
|
3227
|
-
|
|
3228
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
3228
3229
|
"formFillHandler: registry is EMPTY \u2014 auto-tracking may not be active. Ensure enableAppilotsAutoTracking() runs before components mount."
|
|
3229
3230
|
);
|
|
3230
3231
|
} else {
|
|
@@ -3269,7 +3270,7 @@ async function formFillHandler(payload, context) {
|
|
|
3269
3270
|
const fieldEntry = findField(fieldId, registry);
|
|
3270
3271
|
if (fieldEntry) {
|
|
3271
3272
|
try {
|
|
3272
|
-
|
|
3273
|
+
chunkPQHZTAFG_js.appilotsDebugLog(
|
|
3273
3274
|
`formFillHandler: found field "${fieldId}" via registry, calling setValue(<${String(value).length} chars>)`
|
|
3274
3275
|
);
|
|
3275
3276
|
const beforeValue = effectiveFieldType === "date" ? fieldEntry.getValue?.() ?? "" : void 0;
|
|
@@ -3300,7 +3301,7 @@ async function formFillHandler(payload, context) {
|
|
|
3300
3301
|
after = fieldEntry.getValue?.() ?? "";
|
|
3301
3302
|
}
|
|
3302
3303
|
if (!selectValueApplied(fieldId, value, after, registry)) {
|
|
3303
|
-
|
|
3304
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
3304
3305
|
`formFillHandler: select field "${fieldId}" setValue did not stick (wrote <${String(value).length} chars>, current is <${String(after ?? "").length} chars>), trying visible choice fallback`
|
|
3305
3306
|
);
|
|
3306
3307
|
const selectResult = await selectVisibleChoice(fieldId, value, registry, {
|
|
@@ -3473,14 +3474,14 @@ async function formFillHandler(payload, context) {
|
|
|
3473
3474
|
if (payload.submitAfterFill === true) {
|
|
3474
3475
|
if (!allSuccess) {
|
|
3475
3476
|
const failedIds = fieldResults.filter((result) => !result.success).map((result) => result.fieldId);
|
|
3476
|
-
|
|
3477
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
3477
3478
|
"formFillHandler: submitAfterFill=true requested but some fields failed; NOT submitting" + (failedIds.length > 0 ? ` (failed: ${failedIds.join(", ")})` : "")
|
|
3478
3479
|
);
|
|
3479
3480
|
} else {
|
|
3480
3481
|
await sleep2(120);
|
|
3481
3482
|
const submitResult = pressSubmitButton({ screen, screenPath, activePath }, registry);
|
|
3482
3483
|
if (!submitResult.success) {
|
|
3483
|
-
|
|
3484
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(`formFillHandler: submitAfterFill failed \u2014 ${submitResult.error}`);
|
|
3484
3485
|
return {
|
|
3485
3486
|
success: false,
|
|
3486
3487
|
error: submitResult.error,
|
|
@@ -3492,7 +3493,7 @@ async function formFillHandler(payload, context) {
|
|
|
3492
3493
|
submitTargetId: submitResult.pressedTargetId
|
|
3493
3494
|
});
|
|
3494
3495
|
if (postSubmit.status === "pending") {
|
|
3495
|
-
|
|
3496
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(`formFillHandler: submit still pending \u2014 ${postSubmit.message}`);
|
|
3496
3497
|
return {
|
|
3497
3498
|
success: false,
|
|
3498
3499
|
error: postSubmit.message,
|
|
@@ -3501,7 +3502,7 @@ async function formFillHandler(payload, context) {
|
|
|
3501
3502
|
};
|
|
3502
3503
|
}
|
|
3503
3504
|
if (postSubmit.status === "failure") {
|
|
3504
|
-
|
|
3505
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
3505
3506
|
`formFillHandler: submit rejected by visible validation \u2014 ${postSubmit.message}`
|
|
3506
3507
|
);
|
|
3507
3508
|
return {
|
|
@@ -3528,10 +3529,10 @@ async function formFillHandler(payload, context) {
|
|
|
3528
3529
|
};
|
|
3529
3530
|
}
|
|
3530
3531
|
function pressSubmitButton(context, registry) {
|
|
3531
|
-
const activePath = context.activePath ??
|
|
3532
|
+
const activePath = context.activePath ?? chunkPQHZTAFG_js.getActiveRouteNames();
|
|
3532
3533
|
const hintScreen = context.screen ?? context.screenPath;
|
|
3533
3534
|
const formScreens = resolveFormScreensForSubmit(hintScreen, activePath, registry);
|
|
3534
|
-
const resolvedScreen = formScreens.find((name) => screenDeclaresSubmit(name)) ?? formScreens[0] ?? hintScreen ??
|
|
3535
|
+
const resolvedScreen = formScreens.find((name) => screenDeclaresSubmit(name)) ?? formScreens[0] ?? hintScreen ?? chunkPQHZTAFG_js.getCurrentScreen() ?? void 0;
|
|
3535
3536
|
const candidates = collectSubmitTargetCandidates(formScreens, registry);
|
|
3536
3537
|
for (const candidate of candidates) {
|
|
3537
3538
|
const target = registry.getTarget(candidate);
|
|
@@ -3552,7 +3553,7 @@ function pressSubmitButton(context, registry) {
|
|
|
3552
3553
|
}
|
|
3553
3554
|
}
|
|
3554
3555
|
for (const screenName of formScreens) {
|
|
3555
|
-
const screenMeta =
|
|
3556
|
+
const screenMeta = chunkPQHZTAFG_js.getScreenMetadata(screenName);
|
|
3556
3557
|
const submitMeta = Array.isArray(screenMeta?.actions) ? screenMeta.actions.find(
|
|
3557
3558
|
(action) => typeof action === "object" && action !== null && action.type === "submit"
|
|
3558
3559
|
) : void 0;
|
|
@@ -3658,12 +3659,12 @@ function buildDiagnose(category, targetId, candidates) {
|
|
|
3658
3659
|
return {
|
|
3659
3660
|
category,
|
|
3660
3661
|
targetId,
|
|
3661
|
-
screen:
|
|
3662
|
+
screen: chunkPQHZTAFG_js.getCurrentScreen() ?? void 0,
|
|
3662
3663
|
...candidates && candidates.length > 0 ? { candidates: candidates.slice(0, 8) } : {}
|
|
3663
3664
|
};
|
|
3664
3665
|
}
|
|
3665
3666
|
function resolveListEntry(listId) {
|
|
3666
|
-
const entries =
|
|
3667
|
+
const entries = chunkPQHZTAFG_js.listRegistry.snapshot();
|
|
3667
3668
|
if (entries.length === 0) return {};
|
|
3668
3669
|
if (listId) {
|
|
3669
3670
|
const wanted = normalizeId2(listId);
|
|
@@ -3774,23 +3775,23 @@ function targetIdFromPayload(payload) {
|
|
|
3774
3775
|
}
|
|
3775
3776
|
async function waitForPostInteractionSettle(payload) {
|
|
3776
3777
|
const targetId = targetIdFromPayload(payload);
|
|
3777
|
-
const fromScreen =
|
|
3778
|
-
const baseline =
|
|
3778
|
+
const fromScreen = chunkPQHZTAFG_js.getCurrentScreen();
|
|
3779
|
+
const baseline = chunkPQHZTAFG_js.probeLoadingState(targetId || null, fromScreen);
|
|
3779
3780
|
await sleepMs(100);
|
|
3780
|
-
const afterPress =
|
|
3781
|
+
const afterPress = chunkPQHZTAFG_js.probeLoadingState(targetId || null, chunkPQHZTAFG_js.getCurrentScreen());
|
|
3781
3782
|
const modalOrLoading = afterPress.modalOpen || afterPress.loading || afterPress.pressedDisabled;
|
|
3782
3783
|
const fingerprintChanged = afterPress.fingerprint !== baseline.fingerprint;
|
|
3783
|
-
const capMs =
|
|
3784
|
+
const capMs = chunkPQHZTAFG_js.isListItemPressTarget(targetId) ? 5e3 : 1e4;
|
|
3784
3785
|
if (modalOrLoading || fingerprintChanged) {
|
|
3785
|
-
await
|
|
3786
|
+
await chunkPQHZTAFG_js.waitForLoadingSettle({
|
|
3786
3787
|
pressedComponentId: targetId || null,
|
|
3787
3788
|
fromScreen,
|
|
3788
3789
|
maxMs: capMs
|
|
3789
3790
|
});
|
|
3790
3791
|
return;
|
|
3791
3792
|
}
|
|
3792
|
-
if (
|
|
3793
|
-
await
|
|
3793
|
+
if (chunkPQHZTAFG_js.isListItemPressTarget(targetId)) {
|
|
3794
|
+
await chunkPQHZTAFG_js.waitForLoadingSettle({
|
|
3794
3795
|
fromScreen,
|
|
3795
3796
|
maxMs: 3e3
|
|
3796
3797
|
});
|
|
@@ -3810,7 +3811,7 @@ function validateActionPayload(action) {
|
|
|
3810
3811
|
error: message,
|
|
3811
3812
|
diagnose: {
|
|
3812
3813
|
category: "validation",
|
|
3813
|
-
screen:
|
|
3814
|
+
screen: chunkPQHZTAFG_js.getCurrentScreen() ?? void 0,
|
|
3814
3815
|
...ids ?? {}
|
|
3815
3816
|
}
|
|
3816
3817
|
});
|
|
@@ -3877,7 +3878,7 @@ async function executeAction(action, context) {
|
|
|
3877
3878
|
let result;
|
|
3878
3879
|
const validationFailure = validateActionPayload(action);
|
|
3879
3880
|
if (validationFailure) {
|
|
3880
|
-
|
|
3881
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
3881
3882
|
`executeAction: payload validation failed for type="${action.type}" id="${action.id}": ${validationFailure.error}`
|
|
3882
3883
|
);
|
|
3883
3884
|
context.emit({
|
|
@@ -3904,13 +3905,13 @@ async function executeAction(action, context) {
|
|
|
3904
3905
|
case "form_fill":
|
|
3905
3906
|
result = await formFillHandler(action.payload, {
|
|
3906
3907
|
permissions,
|
|
3907
|
-
registry: context.registry ??
|
|
3908
|
+
registry: context.registry ?? chunkPQHZTAFG_js.getDefaultRegistry()
|
|
3908
3909
|
});
|
|
3909
3910
|
break;
|
|
3910
3911
|
case "ui_interaction":
|
|
3911
3912
|
result = uiInteractionHandler(action.payload, {
|
|
3912
3913
|
permissions,
|
|
3913
|
-
registry: context.registry ??
|
|
3914
|
+
registry: context.registry ?? chunkPQHZTAFG_js.getDefaultRegistry()
|
|
3914
3915
|
});
|
|
3915
3916
|
if (result.success) {
|
|
3916
3917
|
await waitForPostInteractionSettle(action.payload);
|
|
@@ -3940,7 +3941,7 @@ async function executeAction(action, context) {
|
|
|
3940
3941
|
};
|
|
3941
3942
|
}
|
|
3942
3943
|
} catch (err) {
|
|
3943
|
-
|
|
3944
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
3944
3945
|
`executeAction: exception during action type="${action.type}" id="${action.id}": ${err?.message}`
|
|
3945
3946
|
);
|
|
3946
3947
|
result = {
|
|
@@ -3966,35 +3967,35 @@ async function executeAction(action, context) {
|
|
|
3966
3967
|
}
|
|
3967
3968
|
var POST_ACTION_LOADING_MAX_MS = 6e3;
|
|
3968
3969
|
function resolveScreenMetadata() {
|
|
3969
|
-
const activePath =
|
|
3970
|
+
const activePath = chunkPQHZTAFG_js.getActiveRouteNames();
|
|
3970
3971
|
for (let i = activePath.length - 1; i >= 0; i--) {
|
|
3971
3972
|
const name = activePath[i];
|
|
3972
|
-
const meta = name ?
|
|
3973
|
+
const meta = name ? chunkPQHZTAFG_js.getScreenMetadata(name) : void 0;
|
|
3973
3974
|
if (meta && (Array.isArray(meta.fields) && meta.fields.length > 0 || Array.isArray(meta.actions) && meta.actions.length > 0)) {
|
|
3974
3975
|
return meta;
|
|
3975
3976
|
}
|
|
3976
3977
|
}
|
|
3977
|
-
const screen =
|
|
3978
|
-
return screen ?
|
|
3978
|
+
const screen = chunkPQHZTAFG_js.getCurrentScreen();
|
|
3979
|
+
return screen ? chunkPQHZTAFG_js.getScreenMetadata(screen) : void 0;
|
|
3979
3980
|
}
|
|
3980
3981
|
function buildAgentContext(extras = {}) {
|
|
3981
3982
|
const context = {};
|
|
3982
3983
|
context.platform = "react-native";
|
|
3983
|
-
const screen =
|
|
3984
|
+
const screen = chunkPQHZTAFG_js.getCurrentScreen();
|
|
3984
3985
|
if (screen) context.currentScreen = screen;
|
|
3985
|
-
const navigationState =
|
|
3986
|
+
const navigationState = chunkPQHZTAFG_js.getNavigationStateSnapshot();
|
|
3986
3987
|
if (navigationState) context.navigationState = navigationState;
|
|
3987
3988
|
const screenMeta = resolveScreenMetadata();
|
|
3988
3989
|
if (screenMeta) context.screenMetadata = screenMeta;
|
|
3989
3990
|
try {
|
|
3990
3991
|
context.snapshot = captureSnapshot();
|
|
3991
3992
|
} catch (err) {
|
|
3992
|
-
|
|
3993
|
+
chunkPQHZTAFG_js.appilotsDebugWarn("buildAgentContext: captureSnapshot failed", err);
|
|
3993
3994
|
}
|
|
3994
|
-
const registry =
|
|
3995
|
+
const registry = chunkPQHZTAFG_js.componentRegistry.snapshot();
|
|
3995
3996
|
const filtered = screen ? registry.filter((c) => !c.screen || c.screen === screen) : registry;
|
|
3996
3997
|
if (filtered.length > 0) context.registeredComponents = filtered;
|
|
3997
|
-
const registeredLists =
|
|
3998
|
+
const registeredLists = chunkPQHZTAFG_js.listRegistry.snapshot();
|
|
3998
3999
|
if (registeredLists.length > 0) {
|
|
3999
4000
|
context.registeredLists = registeredLists.map(
|
|
4000
4001
|
({ scrollToIndex, scrollToOffset, getScrollMetrics, dataPreview, ...rest }) => rest
|
|
@@ -4011,12 +4012,12 @@ function resolveActionHints(screen, pressedComponentId, actionPayload) {
|
|
|
4011
4012
|
}
|
|
4012
4013
|
}
|
|
4013
4014
|
if (!screen || !pressedComponentId) return void 0;
|
|
4014
|
-
const meta =
|
|
4015
|
+
const meta = chunkPQHZTAFG_js.getScreenMetadata(screen);
|
|
4015
4016
|
const actions = meta?.actions;
|
|
4016
4017
|
if (!actions || actions.length === 0) return void 0;
|
|
4017
4018
|
for (const a of actions) {
|
|
4018
4019
|
if (typeof a === "string") continue;
|
|
4019
|
-
if (
|
|
4020
|
+
if (chunkPQHZTAFG_js.idLooselyMatches(a.id, pressedComponentId)) {
|
|
4020
4021
|
const inferred = a.appilotsInferred;
|
|
4021
4022
|
if (inferred && typeof inferred === "object") return inferred;
|
|
4022
4023
|
return void 0;
|
|
@@ -4031,7 +4032,7 @@ async function settleTurn(input) {
|
|
|
4031
4032
|
const successById = new Map(input.results.map((r) => [r.actionId, r.success]));
|
|
4032
4033
|
const typeById = new Map(input.results.map((r) => [r.actionId, r.type]));
|
|
4033
4034
|
if (input.hadNavigate) {
|
|
4034
|
-
const settle = await
|
|
4035
|
+
const settle = await chunkPQHZTAFG_js.waitForScreenSettle({
|
|
4035
4036
|
expectingChange: true,
|
|
4036
4037
|
fromScreen: input.preNavigateScreen ?? null,
|
|
4037
4038
|
fromSignature: input.preNavigateSignature ?? null,
|
|
@@ -4041,19 +4042,19 @@ async function settleTurn(input) {
|
|
|
4041
4042
|
console.log(
|
|
4042
4043
|
`[Appilots] settleTurn: post-navigate settle done \u2014 screen="${settle.screen}" transitioned=${settle.transitioned} timedOut=${settle.timedOut} waitedMs=${settle.waitedMs}`
|
|
4043
4044
|
);
|
|
4044
|
-
const navigationMoved = settle.transitioned ||
|
|
4045
|
+
const navigationMoved = settle.transitioned || chunkPQHZTAFG_js.screenDepartedBaseline(
|
|
4045
4046
|
input.preNavigateScreen ?? null,
|
|
4046
4047
|
input.preNavigateSignature ?? null
|
|
4047
|
-
) || !!navigateTargetScreen && !!settle.screen &&
|
|
4048
|
+
) || !!navigateTargetScreen && !!settle.screen && chunkPQHZTAFG_js.routesBelongToSameFeature(settle.screen, navigateTargetScreen);
|
|
4048
4049
|
if (!navigationMoved) {
|
|
4049
|
-
|
|
4050
|
+
chunkPQHZTAFG_js.appilotsDebugWarn(
|
|
4050
4051
|
`tool-without-effect: navigate emitted but screen did not change (stayed at "${input.preNavigateScreen ?? "unknown"}", waitedMs=${settle.waitedMs}). Likely causes: target screenName missing from MCP doc, nested-nav path absent, or React Navigation rejected the route.`
|
|
4051
4052
|
);
|
|
4052
4053
|
for (const [actionId, type] of typeById) {
|
|
4053
4054
|
if (type === "navigate") toolWithoutEffectIds.add(actionId);
|
|
4054
4055
|
}
|
|
4055
4056
|
}
|
|
4056
|
-
const loadSettle = await
|
|
4057
|
+
const loadSettle = await chunkPQHZTAFG_js.waitForLoadingSettle({
|
|
4057
4058
|
fromScreen: settle.screen ?? null,
|
|
4058
4059
|
maxMs: 3e3
|
|
4059
4060
|
});
|
|
@@ -4065,11 +4066,11 @@ async function settleTurn(input) {
|
|
|
4065
4066
|
const pressedAction = turnActions.find(
|
|
4066
4067
|
(a) => a.type === "ui_interaction" && a.payload?.componentId === pressedId
|
|
4067
4068
|
);
|
|
4068
|
-
const hints = resolveActionHints(
|
|
4069
|
+
const hints = resolveActionHints(chunkPQHZTAFG_js.getCurrentScreen(), pressedId, pressedAction?.payload);
|
|
4069
4070
|
const settleCapMs = hints?.isAsyncTrigger === true ? 1e4 : POST_ACTION_LOADING_MAX_MS;
|
|
4070
|
-
const loadSettle = await
|
|
4071
|
+
const loadSettle = await chunkPQHZTAFG_js.waitForLoadingSettle({
|
|
4071
4072
|
pressedComponentId: pressedId,
|
|
4072
|
-
fromScreen:
|
|
4073
|
+
fromScreen: chunkPQHZTAFG_js.getCurrentScreen(),
|
|
4073
4074
|
maxMs: settleCapMs
|
|
4074
4075
|
});
|
|
4075
4076
|
console.log(
|
|
@@ -4077,23 +4078,23 @@ async function settleTurn(input) {
|
|
|
4077
4078
|
);
|
|
4078
4079
|
if (loadSettle.loadingPending) loadingPending = true;
|
|
4079
4080
|
const listPressActions = turnActions.filter((action) => {
|
|
4080
|
-
const target =
|
|
4081
|
-
return target ?
|
|
4081
|
+
const target = chunkPQHZTAFG_js.actionPressTargetId(action);
|
|
4082
|
+
return target ? chunkPQHZTAFG_js.isListItemPressTarget(target) : false;
|
|
4082
4083
|
});
|
|
4083
4084
|
if (listPressActions.length > 0) {
|
|
4084
|
-
const baselineFingerprint =
|
|
4085
|
-
const postPressSettle = await
|
|
4085
|
+
const baselineFingerprint = chunkPQHZTAFG_js.probeLoadingState(pressedId, chunkPQHZTAFG_js.getCurrentScreen()).fingerprint;
|
|
4086
|
+
const postPressSettle = await chunkPQHZTAFG_js.waitForScreenSettle({
|
|
4086
4087
|
expectingChange: true,
|
|
4087
4088
|
fromScreen: input.preNavigateScreen ?? null,
|
|
4088
4089
|
fromSignature: input.preNavigateSignature ?? null,
|
|
4089
4090
|
maxMs: 2500
|
|
4090
4091
|
});
|
|
4091
|
-
await
|
|
4092
|
+
await chunkPQHZTAFG_js.waitForLoadingSettle({
|
|
4092
4093
|
pressedComponentId: pressedId,
|
|
4093
|
-
fromScreen:
|
|
4094
|
+
fromScreen: chunkPQHZTAFG_js.getCurrentScreen(),
|
|
4094
4095
|
maxMs: 4e3
|
|
4095
4096
|
});
|
|
4096
|
-
const afterFingerprint =
|
|
4097
|
+
const afterFingerprint = chunkPQHZTAFG_js.probeLoadingState(pressedId, chunkPQHZTAFG_js.getCurrentScreen()).fingerprint;
|
|
4097
4098
|
console.log(
|
|
4098
4099
|
`[Appilots] settleTurn: post-list-press settle \u2014 screen="${postPressSettle.screen}" transitioned=${postPressSettle.transitioned} timedOut=${postPressSettle.timedOut} waitedMs=${postPressSettle.waitedMs}`
|
|
4099
4100
|
);
|
|
@@ -4110,8 +4111,8 @@ async function settleTurn(input) {
|
|
|
4110
4111
|
}
|
|
4111
4112
|
var reactNativeChatAdapter = {
|
|
4112
4113
|
buildContext: buildAgentContext,
|
|
4113
|
-
getCurrentScreen:
|
|
4114
|
-
getCurrentScreenSignature:
|
|
4114
|
+
getCurrentScreen: chunkPQHZTAFG_js.getCurrentScreen,
|
|
4115
|
+
getCurrentScreenSignature: chunkPQHZTAFG_js.getCurrentScreenSignature,
|
|
4115
4116
|
settleTurn
|
|
4116
4117
|
};
|
|
4117
4118
|
async function runWithConfirmedDestructiveContext(enabled, fn) {
|
|
@@ -4147,7 +4148,7 @@ function createReactNativeActionRunner(getOptions) {
|
|
|
4147
4148
|
return {
|
|
4148
4149
|
async execute(action, { confirmedDestructive }) {
|
|
4149
4150
|
const { permissions, emit, navigationRef } = getOptions();
|
|
4150
|
-
const navRef = navigationRef?.current ? navigationRef : { current:
|
|
4151
|
+
const navRef = navigationRef?.current ? navigationRef : { current: chunkPQHZTAFG_js.getNavigationRef() };
|
|
4151
4152
|
return runWithConfirmedDestructiveContext(
|
|
4152
4153
|
confirmedDestructive,
|
|
4153
4154
|
() => executeAction(action, {
|
|
@@ -4157,21 +4158,21 @@ function createReactNativeActionRunner(getOptions) {
|
|
|
4157
4158
|
})
|
|
4158
4159
|
);
|
|
4159
4160
|
},
|
|
4160
|
-
getCurrentScreen:
|
|
4161
|
-
getCurrentScreenSignature:
|
|
4161
|
+
getCurrentScreen: chunkPQHZTAFG_js.getCurrentScreen,
|
|
4162
|
+
getCurrentScreenSignature: chunkPQHZTAFG_js.getCurrentScreenSignature,
|
|
4162
4163
|
getScreenActionsMetadata(screen) {
|
|
4163
|
-
return
|
|
4164
|
+
return chunkPQHZTAFG_js.getScreenMetadata(screen)?.actions;
|
|
4164
4165
|
},
|
|
4165
|
-
waitForScreenSettle:
|
|
4166
|
+
waitForScreenSettle: chunkPQHZTAFG_js.waitForScreenSettle
|
|
4166
4167
|
};
|
|
4167
4168
|
}
|
|
4168
4169
|
|
|
4169
4170
|
// src/hooks/useAppilotsChat.ts
|
|
4170
4171
|
function useAppilotsChat(options = {}) {
|
|
4171
|
-
const { client, emit, subscribe } =
|
|
4172
|
+
const { client, emit, subscribe } = chunkPQHZTAFG_js.useAppilotsContext();
|
|
4172
4173
|
const machine = react.useMemo(
|
|
4173
|
-
() => new
|
|
4174
|
-
{ client, adapter: reactNativeChatAdapter, emit, warn:
|
|
4174
|
+
() => new chunkPQHZTAFG_js.ChatSessionMachine(
|
|
4175
|
+
{ client, adapter: reactNativeChatAdapter, emit, warn: chunkPQHZTAFG_js.appilotsDebugWarn },
|
|
4175
4176
|
options
|
|
4176
4177
|
),
|
|
4177
4178
|
// A new machine per client/provider instance — options are pushed in
|
|
@@ -4214,7 +4215,7 @@ var DEFAULT_PERMISSIONS2 = {
|
|
|
4214
4215
|
canSubmitForms: true
|
|
4215
4216
|
};
|
|
4216
4217
|
function useAppilotsActions(options = {}) {
|
|
4217
|
-
const { client, subscribe, config, emit } =
|
|
4218
|
+
const { client, subscribe, config, emit } = chunkPQHZTAFG_js.useAppilotsContext();
|
|
4218
4219
|
const { navigationRef, autoExecute = false } = options;
|
|
4219
4220
|
const runnerOptionsRef = react.useRef({
|
|
4220
4221
|
permissions: config.permissions ?? DEFAULT_PERMISSIONS2,
|
|
@@ -4227,12 +4228,12 @@ function useAppilotsActions(options = {}) {
|
|
|
4227
4228
|
navigationRef
|
|
4228
4229
|
};
|
|
4229
4230
|
const machine = react.useMemo(
|
|
4230
|
-
() => new
|
|
4231
|
+
() => new chunkPQHZTAFG_js.ActionQueueMachine(
|
|
4231
4232
|
{
|
|
4232
4233
|
client,
|
|
4233
4234
|
adapter: createReactNativeActionRunner(() => runnerOptionsRef.current),
|
|
4234
4235
|
emit,
|
|
4235
|
-
warn:
|
|
4236
|
+
warn: chunkPQHZTAFG_js.appilotsDebugWarn
|
|
4236
4237
|
},
|
|
4237
4238
|
{ autoExecute }
|
|
4238
4239
|
),
|
|
@@ -4289,7 +4290,7 @@ function shouldShowSuggestedPrompts(args) {
|
|
|
4289
4290
|
|
|
4290
4291
|
// src/hooks/useSuggestedPrompts.ts
|
|
4291
4292
|
function useSuggestedPrompts(options) {
|
|
4292
|
-
const { client } =
|
|
4293
|
+
const { client } = chunkPQHZTAFG_js.useAppilotsContext();
|
|
4293
4294
|
const { enabled, limit = 4 } = options;
|
|
4294
4295
|
const [prompts, setPrompts] = react.useState([]);
|
|
4295
4296
|
const [isLoading, setIsLoading] = react.useState(false);
|
|
@@ -4299,8 +4300,8 @@ function useSuggestedPrompts(options) {
|
|
|
4299
4300
|
if (!enabled) return;
|
|
4300
4301
|
const requestId = ++requestIdRef.current;
|
|
4301
4302
|
let cancelled = false;
|
|
4302
|
-
const screen =
|
|
4303
|
-
const localDev = screen ? (
|
|
4303
|
+
const screen = chunkPQHZTAFG_js.getCurrentScreen() ?? void 0;
|
|
4304
|
+
const localDev = screen ? (chunkPQHZTAFG_js.getScreenMetadata(screen)?.suggestedPrompts ?? []).map((text) => ({
|
|
4304
4305
|
text,
|
|
4305
4306
|
source: "dev-defined"
|
|
4306
4307
|
})) : [];
|
|
@@ -4325,9 +4326,9 @@ function useSuggestedPrompts(options) {
|
|
|
4325
4326
|
}, [client, enabled, limit, refreshTick]);
|
|
4326
4327
|
react.useEffect(() => {
|
|
4327
4328
|
if (!enabled) return;
|
|
4328
|
-
let lastScreen =
|
|
4329
|
+
let lastScreen = chunkPQHZTAFG_js.getCurrentScreen();
|
|
4329
4330
|
const interval = setInterval(() => {
|
|
4330
|
-
const current =
|
|
4331
|
+
const current = chunkPQHZTAFG_js.getCurrentScreen();
|
|
4331
4332
|
if (current !== lastScreen) {
|
|
4332
4333
|
lastScreen = current;
|
|
4333
4334
|
setRefreshTick((t) => t + 1);
|
|
@@ -4342,14 +4343,14 @@ function useSuggestedPrompts(options) {
|
|
|
4342
4343
|
};
|
|
4343
4344
|
}
|
|
4344
4345
|
function useAppilotsNavigation() {
|
|
4345
|
-
const { emit } =
|
|
4346
|
+
const { emit } = chunkPQHZTAFG_js.useAppilotsContext();
|
|
4346
4347
|
const [currentScreen, setCurrentScreenState] = react.useState(null);
|
|
4347
4348
|
const [navigationHistory, setNavigationHistory] = react.useState([]);
|
|
4348
4349
|
const navigationRef = react.useRef(null);
|
|
4349
4350
|
const setCurrentScreen2 = react.useCallback(
|
|
4350
4351
|
(screenName) => {
|
|
4351
4352
|
setCurrentScreenState(screenName);
|
|
4352
|
-
|
|
4353
|
+
chunkPQHZTAFG_js.setCurrentScreen(screenName);
|
|
4353
4354
|
setNavigationHistory((prev) => [...prev, screenName]);
|
|
4354
4355
|
emit({
|
|
4355
4356
|
type: "navigation:change",
|
|
@@ -4380,7 +4381,7 @@ function useAppilotsNavigation() {
|
|
|
4380
4381
|
|
|
4381
4382
|
// src/hooks/useAppilots.ts
|
|
4382
4383
|
function useAppilots() {
|
|
4383
|
-
const { config, client } =
|
|
4384
|
+
const { config, client } = chunkPQHZTAFG_js.useAppilotsContext();
|
|
4384
4385
|
const chat = useAppilotsChat();
|
|
4385
4386
|
const navigation = useAppilotsNavigation();
|
|
4386
4387
|
const actions = useAppilotsActions();
|
|
@@ -4409,7 +4410,7 @@ function useAppilots() {
|
|
|
4409
4410
|
}
|
|
4410
4411
|
function useAppilotsField(id, options) {
|
|
4411
4412
|
const { value, onChangeText, ref, fieldType, label, screen } = options;
|
|
4412
|
-
const registry =
|
|
4413
|
+
const registry = chunkPQHZTAFG_js.useResolvedRegistry();
|
|
4413
4414
|
const valueRef = react.useRef(value);
|
|
4414
4415
|
const onChangeRef = react.useRef(onChangeText);
|
|
4415
4416
|
valueRef.current = value;
|
|
@@ -4437,7 +4438,7 @@ function useAppilotsField(id, options) {
|
|
|
4437
4438
|
}
|
|
4438
4439
|
function useAppilotsTarget(id, options) {
|
|
4439
4440
|
const { onPress, onLongPress, onScrollTo, label, screen } = options;
|
|
4440
|
-
const registry =
|
|
4441
|
+
const registry = chunkPQHZTAFG_js.useResolvedRegistry();
|
|
4441
4442
|
const onPressRef = react.useRef(onPress);
|
|
4442
4443
|
const onLongPressRef = react.useRef(onLongPress);
|
|
4443
4444
|
const onScrollToRef = react.useRef(onScrollTo);
|
|
@@ -4464,7 +4465,7 @@ function useAppilotsTarget(id, options) {
|
|
|
4464
4465
|
}
|
|
4465
4466
|
function useAppilotsToggle(id, options) {
|
|
4466
4467
|
const { value, onValueChange, label, screen } = options;
|
|
4467
|
-
const registry =
|
|
4468
|
+
const registry = chunkPQHZTAFG_js.useResolvedRegistry();
|
|
4468
4469
|
const valueRef = react.useRef(value);
|
|
4469
4470
|
const onChangeRef = react.useRef(onValueChange);
|
|
4470
4471
|
valueRef.current = value;
|
|
@@ -4487,7 +4488,7 @@ function useAppilotsToggle(id, options) {
|
|
|
4487
4488
|
}
|
|
4488
4489
|
function useAppilotsSlider(id, options) {
|
|
4489
4490
|
const { value, onValueChange, min, max, step, label, screen } = options;
|
|
4490
|
-
const registry =
|
|
4491
|
+
const registry = chunkPQHZTAFG_js.useResolvedRegistry();
|
|
4491
4492
|
const valueRef = react.useRef(value);
|
|
4492
4493
|
const onChangeRef = react.useRef(onValueChange);
|
|
4493
4494
|
valueRef.current = value;
|