@campfire-interactive/volume-intelligence-ui 0.9.1 → 0.10.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/index.d.ts +12 -1
- package/dist/index.js +25 -2
- package/package.json +43 -43
package/dist/index.d.ts
CHANGED
|
@@ -272,7 +272,18 @@ interface DetectSegmentsResult {
|
|
|
272
272
|
interface ClearSourceDataResult {
|
|
273
273
|
uploads: number;
|
|
274
274
|
criteria: number;
|
|
275
|
-
|
|
275
|
+
/** Whether the source is now EMPTY. False when the call hit its time budget
|
|
276
|
+
* with rows still to delete — call again to continue.
|
|
277
|
+
*
|
|
278
|
+
* BREAKING in 2026-09: this was the literal `true`, returned regardless of
|
|
279
|
+
* whether anything remained. Batched clearing introduced a third outcome
|
|
280
|
+
* (partial), and a consumer branching on `cleared` would have read it as an
|
|
281
|
+
* empty source. */
|
|
282
|
+
cleared: boolean;
|
|
283
|
+
/** False when the call hit its time budget with rows still to delete. */
|
|
284
|
+
done?: boolean;
|
|
285
|
+
/** Criteria still to delete when `done` is false. */
|
|
286
|
+
remainingCriteria?: number;
|
|
276
287
|
}
|
|
277
288
|
/** Whether a source satisfies every required identity field. The dual-
|
|
278
289
|
* satisfaction rule (explicit automotive_field mapping OR the covering
|
package/dist/index.js
CHANGED
|
@@ -1769,8 +1769,31 @@ function VolumeSourceDetail({ transport, sourceId, onOpenSource, onBack, readOnl
|
|
|
1769
1769
|
setError(null);
|
|
1770
1770
|
setClearResult(null);
|
|
1771
1771
|
try {
|
|
1772
|
-
|
|
1773
|
-
|
|
1772
|
+
let criteria = 0;
|
|
1773
|
+
let uploads = 0;
|
|
1774
|
+
let passes = 0;
|
|
1775
|
+
const MAX_PASSES = 200;
|
|
1776
|
+
for (; ; ) {
|
|
1777
|
+
const result = await transport.clearSourceData(id, clearConfirm);
|
|
1778
|
+
criteria += result.criteria;
|
|
1779
|
+
uploads += result.uploads;
|
|
1780
|
+
passes += 1;
|
|
1781
|
+
if (result.done !== false || passes >= MAX_PASSES) {
|
|
1782
|
+
if (result.done === false) {
|
|
1783
|
+
setClearResult(
|
|
1784
|
+
`Stopped after ${passes} passes with ${(result.remainingCriteria ?? 0).toLocaleString()} criteria still to delete. ${criteria.toLocaleString()} criteria and ${uploads.toLocaleString()} uploads were removed. Run Clear again to continue.`
|
|
1785
|
+
);
|
|
1786
|
+
} else {
|
|
1787
|
+
setClearResult(
|
|
1788
|
+
`Cleared ${criteria.toLocaleString()} criteria and ${uploads.toLocaleString()} uploads${passes > 1 ? ` over ${passes} passes` : ""}. Configuration (segments, mappings) preserved.`
|
|
1789
|
+
);
|
|
1790
|
+
}
|
|
1791
|
+
break;
|
|
1792
|
+
}
|
|
1793
|
+
setClearResult(
|
|
1794
|
+
`Clearing\u2026 ${criteria.toLocaleString()} criteria removed so far, ${(result.remainingCriteria ?? 0).toLocaleString()} to go.`
|
|
1795
|
+
);
|
|
1796
|
+
}
|
|
1774
1797
|
setClearConfirm("");
|
|
1775
1798
|
await load();
|
|
1776
1799
|
} catch (e) {
|
package/package.json
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@campfire-interactive/volume-intelligence-ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Shared Volume Intelligence UI components (volume import) for the Campfire Suite — embedded by the VI webapp and by consuming apps (OMSF) so there is one import surface, not two that drift.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"dist"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsup",
|
|
19
|
-
"dev": "tsup --watch"
|
|
20
|
-
},
|
|
21
|
-
"peerDependencies": {
|
|
22
|
-
"react": "^18.0.0 || ^19.0.0",
|
|
23
|
-
"react-dom": "^18.0.0 || ^19.0.0"
|
|
24
|
-
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@campfire-interactive/design-tokens": "*",
|
|
27
|
-
"lucide-react": "^0.487.0"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@types/react": "^18.2.0",
|
|
31
|
-
"react": "^18.2.0",
|
|
32
|
-
"react-dom": "^18.2.0",
|
|
33
|
-
"tsup": "^8.0.0",
|
|
34
|
-
"typescript": "^5.3.3"
|
|
35
|
-
},
|
|
36
|
-
"publishConfig": {
|
|
37
|
-
"registry": "https://registry.npmjs.org",
|
|
38
|
-
"access": "public"
|
|
39
|
-
},
|
|
40
|
-
"engines": {
|
|
41
|
-
"node": ">=18.0.0"
|
|
42
|
-
}
|
|
43
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@campfire-interactive/volume-intelligence-ui",
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"description": "Shared Volume Intelligence UI components (volume import) for the Campfire Suite — embedded by the VI webapp and by consuming apps (OMSF) so there is one import surface, not two that drift.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsup",
|
|
19
|
+
"dev": "tsup --watch"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
23
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@campfire-interactive/design-tokens": "*",
|
|
27
|
+
"lucide-react": "^0.487.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/react": "^18.2.0",
|
|
31
|
+
"react": "^18.2.0",
|
|
32
|
+
"react-dom": "^18.2.0",
|
|
33
|
+
"tsup": "^8.0.0",
|
|
34
|
+
"typescript": "^5.3.3"
|
|
35
|
+
},
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"registry": "https://registry.npmjs.org",
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18.0.0"
|
|
42
|
+
}
|
|
43
|
+
}
|