nucleus-core-ts 0.9.804 → 0.9.805
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/fe/components/IntegrationsPage/components/ConnectionForm.js +4 -2
- package/dist/fe/components/IntegrationsPage/components/IntegrationsPage.js +9 -1
- package/dist/fe/components/IntegrationsPage/text/index.d.ts +4 -0
- package/dist/fe/components/IntegrationsPage/text/index.js +5 -1
- package/package.json +1 -1
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useEffectEvent, useState } from 'react';
|
|
4
4
|
import { useIntegrationsStore } from '../store';
|
|
5
|
+
import { useLabels } from '../text/context';
|
|
5
6
|
import { integrationsPageTheme } from '../theme';
|
|
6
7
|
import { ConnectionAuthFields } from './ConnectionAuthFields';
|
|
7
8
|
import { ConnectionBasicFields } from './ConnectionBasicFields';
|
|
@@ -17,6 +18,7 @@ import { CardSkeleton } from './Skeletons';
|
|
|
17
18
|
* of what was stored and what is being typed.
|
|
18
19
|
*/ const theme = integrationsPageTheme;
|
|
19
20
|
export function ConnectionForm({ actions, source, loading = false, onSaved }) {
|
|
21
|
+
const labels = useLabels();
|
|
20
22
|
const store = useIntegrationsStore();
|
|
21
23
|
const [draft, setDraft] = useState(()=>source ? draftFromSource(source) : emptyConnectionDraft);
|
|
22
24
|
const [errors, setErrors] = useState({});
|
|
@@ -73,11 +75,11 @@ export function ConnectionForm({ actions, source, loading = false, onSaved }) {
|
|
|
73
75
|
children: [
|
|
74
76
|
/*#__PURE__*/ _jsx("h2", {
|
|
75
77
|
className: theme.card.title,
|
|
76
|
-
children: source ?
|
|
78
|
+
children: source ? labels.connections.editTitle : labels.connections.newTitle
|
|
77
79
|
}),
|
|
78
80
|
source ? /*#__PURE__*/ _jsx(Badge, {
|
|
79
81
|
tone: source.enabled === false ? 'neutral' : 'success',
|
|
80
|
-
children: source.enabled === false ?
|
|
82
|
+
children: source.enabled === false ? labels.connections.disabledBadge : labels.connections.enabledBadge
|
|
81
83
|
}) : null
|
|
82
84
|
]
|
|
83
85
|
}),
|
|
@@ -60,7 +60,15 @@ export function IntegrationsPage({ title = 'Integrations', subtitle = 'Connect a
|
|
|
60
60
|
limit: 1
|
|
61
61
|
};
|
|
62
62
|
const total = (result)=>result.meta?.totalItems ?? 0;
|
|
63
|
-
|
|
63
|
+
// A PAGE of endpoints, not a count. The strip says how many calls have been
|
|
64
|
+
// tried, and "tried" lives on the row — counting alone reported "5 calls,
|
|
65
|
+
// 0 tried" for five endpoints that had all been sampled. It also warms the
|
|
66
|
+
// store for every tab, which is what made the mappings tab depend on having
|
|
67
|
+
// visited the endpoints tab first.
|
|
68
|
+
actions.listEndpoints(sourceId, {
|
|
69
|
+
page: 1,
|
|
70
|
+
limit: 50
|
|
71
|
+
}).then((r)=>store.setEndpoints(r.items, r.meta?.totalItems ?? r.items.length)).catch(()=>{});
|
|
64
72
|
actions.listMappings(sourceId, one).then((r)=>store.setMappingsTotal(total(r))).catch(()=>{});
|
|
65
73
|
// Runs are deliberately NOT counted here. A run records the mapping it came
|
|
66
74
|
// from and nothing about the connection, so the only count available is
|
|
@@ -58,6 +58,10 @@ export type IntegrationsLabels = {
|
|
|
58
58
|
off: string;
|
|
59
59
|
/** Returns to the chooser once a connection is being worked in. */
|
|
60
60
|
change: string;
|
|
61
|
+
editTitle: string;
|
|
62
|
+
newTitle: string;
|
|
63
|
+
enabledBadge: string;
|
|
64
|
+
disabledBadge: string;
|
|
61
65
|
};
|
|
62
66
|
runs: {
|
|
63
67
|
/** The one-line summary above the buttons. */
|
|
@@ -51,7 +51,11 @@
|
|
|
51
51
|
loadFailed: 'This list could not be loaded',
|
|
52
52
|
retry: 'Try again',
|
|
53
53
|
off: 'Off',
|
|
54
|
-
change: 'Change'
|
|
54
|
+
change: 'Change',
|
|
55
|
+
editTitle: 'Connection',
|
|
56
|
+
newTitle: 'New connection',
|
|
57
|
+
enabledBadge: 'Enabled',
|
|
58
|
+
disabledBadge: 'Off'
|
|
55
59
|
},
|
|
56
60
|
runs: {
|
|
57
61
|
summary: (target, writeMode, missing)=>`Writes into ${target} · ${writeMode} · missing rows: ${missing}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nucleus-core-ts",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.805",
|
|
4
4
|
"description": "Production-ready, enterprise-grade TypeScript framework for building multi-tenant APIs",
|
|
5
5
|
"author": "Hidayet Can Özcan <hidayetcan@gmail.com>",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|