nucleus-core-ts 0.10.65 → 0.10.67
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/.build-ok +1 -1
- package/dist/fe/components/VerificationFlowPage/components/PendingTab.js +1 -1
- package/dist/fe/components/VerificationFlowPage/components/VerificationFlowPage.js +40 -3
- package/dist/fe/components/VerificationFlowPage/labels.d.ts +3 -0
- package/dist/fe/components/VerificationFlowPage/labels.js +3 -0
- package/dist/fe/components/VerificationFlowPage/theme/index.d.ts +5 -0
- package/dist/fe/components/VerificationFlowPage/theme/index.js +10 -0
- package/dist/index.js +11 -11
- package/dist/server.js +11 -11
- package/dist/src/Services/Verification/flowGraphSignature.d.ts +33 -0
- package/dist/src/Services/Verification/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/.build-ok
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.10.
|
|
1
|
+
0.10.67
|
|
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useEffect, useEffectEvent, useState } from 'react';
|
|
4
4
|
import { DEFAULT_VERIFICATION_FLOW_LABELS } from '../labels';
|
|
5
5
|
import { useVerificationFlowStore } from '../store';
|
|
6
|
-
import { planDecision, signatureFileType } from './decisionPlan';
|
|
7
6
|
import { getActiveTheme } from '../theme/store';
|
|
7
|
+
import { planDecision, signatureFileType } from './decisionPlan';
|
|
8
8
|
export function PendingTab({ pendingAction, decideAction, uploadSignatureAction, onDecisionMade, labels }) {
|
|
9
9
|
// Local, not in the store: only one card is in deciding mode at a time, and
|
|
10
10
|
// a chosen file must not survive cancelling out of that card.
|
|
@@ -405,15 +405,24 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
|
|
|
405
405
|
payload: payload,
|
|
406
406
|
onAfterHandle: (res)=>{
|
|
407
407
|
const resObj = res;
|
|
408
|
+
store.setIsSaving(false);
|
|
409
|
+
if (resObj.success === false) {
|
|
410
|
+
// Refused. The drawing on screen was NOT written, so the editor stays
|
|
411
|
+
// dirty — clearing it here would tell the user their work is saved.
|
|
412
|
+
store.setError(resObj.message || say.saveRefused);
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
store.setError(null);
|
|
408
416
|
if (resObj.flow_id) {
|
|
409
417
|
store.setSelectedFlowId(resObj.flow_id);
|
|
410
418
|
}
|
|
411
|
-
store.setIsSaving(false);
|
|
412
419
|
store.setIsDirty(false);
|
|
413
420
|
loadFlows();
|
|
414
421
|
},
|
|
415
|
-
onErrorHandle: ()=>{
|
|
422
|
+
onErrorHandle: (err)=>{
|
|
416
423
|
store.setIsSaving(false);
|
|
424
|
+
const e = err;
|
|
425
|
+
store.setError(e?.message || say.saveRefused);
|
|
417
426
|
}
|
|
418
427
|
});
|
|
419
428
|
});
|
|
@@ -423,8 +432,20 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
|
|
|
423
432
|
payload: {
|
|
424
433
|
flow_id: store.selectedFlowId
|
|
425
434
|
},
|
|
426
|
-
onAfterHandle: ()=>{
|
|
435
|
+
onAfterHandle: (res)=>{
|
|
436
|
+
const resObj = res;
|
|
437
|
+
if (resObj.success === false) {
|
|
438
|
+
// Every publish guard lands here: a step with no verifier, a verifier
|
|
439
|
+
// role that does not exist, a template that will never interpolate.
|
|
440
|
+
store.setError(resObj.message || say.publishRefused);
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
store.setError(null);
|
|
427
444
|
loadFlows();
|
|
445
|
+
},
|
|
446
|
+
onErrorHandle: (err)=>{
|
|
447
|
+
const e = err;
|
|
448
|
+
store.setError(e?.message || say.publishRefused);
|
|
428
449
|
}
|
|
429
450
|
});
|
|
430
451
|
});
|
|
@@ -876,6 +897,22 @@ export function VerificationFlowPage({ entityName, title, subtitle, flowListActi
|
|
|
876
897
|
})
|
|
877
898
|
]
|
|
878
899
|
}),
|
|
900
|
+
store.error && /*#__PURE__*/ _jsxs("div", {
|
|
901
|
+
className: theme.errorBanner.container,
|
|
902
|
+
role: "alert",
|
|
903
|
+
children: [
|
|
904
|
+
/*#__PURE__*/ _jsx("span", {
|
|
905
|
+
className: theme.errorBanner.text,
|
|
906
|
+
children: store.error
|
|
907
|
+
}),
|
|
908
|
+
/*#__PURE__*/ _jsx("button", {
|
|
909
|
+
type: "button",
|
|
910
|
+
className: theme.errorBanner.dismiss,
|
|
911
|
+
onClick: ()=>store.setError(null),
|
|
912
|
+
children: say.dismissError
|
|
913
|
+
})
|
|
914
|
+
]
|
|
915
|
+
}),
|
|
879
916
|
viewMode === 'list' && store.activeTab === 'flow' && /*#__PURE__*/ _jsxs("div", {
|
|
880
917
|
className: theme.flowList.container,
|
|
881
918
|
children: [
|
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
create: 'Create',
|
|
24
24
|
save: 'Save',
|
|
25
25
|
saving: 'Saving...',
|
|
26
|
+
saveRefused: 'The flow could not be saved.',
|
|
27
|
+
publishRefused: 'The flow could not be published.',
|
|
28
|
+
dismissError: 'Dismiss',
|
|
26
29
|
publish: 'Publish',
|
|
27
30
|
loading: 'Loading...',
|
|
28
31
|
loadMore: 'Load more',
|
|
@@ -18,6 +18,11 @@ export const verificationFlowPageTheme = {
|
|
|
18
18
|
publishButton: 'rounded-lg bg-emerald-500/20 border border-emerald-500/30 px-3.5 py-1.5 text-[11px] font-medium text-emerald-400 hover:bg-emerald-500/30 transition-all',
|
|
19
19
|
deleteButton: 'rounded-lg bg-red-500/10 border border-red-500/20 px-3 py-1.5 text-[11px] font-medium text-red-400 hover:bg-red-500/20 transition-all'
|
|
20
20
|
},
|
|
21
|
+
errorBanner: {
|
|
22
|
+
container: 'flex-shrink-0 flex items-start gap-3 px-5 py-2.5 bg-red-500/10 border-b border-red-500/20',
|
|
23
|
+
text: 'flex-1 text-[11px] leading-relaxed text-red-300',
|
|
24
|
+
dismiss: 'flex-shrink-0 text-[11px] text-red-300/60 hover:text-red-200 transition-colors px-1'
|
|
25
|
+
},
|
|
21
26
|
tabs: {
|
|
22
27
|
container: 'flex gap-0.5 p-0.5 bg-white/[0.04] border border-white/[0.06] rounded-lg',
|
|
23
28
|
tab: 'px-3 py-1 rounded-md text-[11px] font-medium text-white/40 hover:text-white/60 transition-all',
|
|
@@ -206,6 +211,11 @@ export const verificationFlowPageLightTheme = {
|
|
|
206
211
|
publishButton: 'rounded-lg bg-emerald-50 border border-emerald-200 px-3.5 py-1.5 text-[11px] font-medium text-emerald-700 hover:bg-emerald-100 transition-all',
|
|
207
212
|
deleteButton: 'rounded-lg bg-red-50 border border-red-200 px-3 py-1.5 text-[11px] font-medium text-red-600 hover:bg-red-100 transition-all'
|
|
208
213
|
},
|
|
214
|
+
errorBanner: {
|
|
215
|
+
container: 'flex-shrink-0 flex items-start gap-3 px-5 py-2.5 bg-red-50 border-b border-red-200',
|
|
216
|
+
text: 'flex-1 text-[11px] leading-relaxed text-red-700',
|
|
217
|
+
dismiss: 'flex-shrink-0 text-[11px] text-red-400 hover:text-red-700 transition-colors px-1'
|
|
218
|
+
},
|
|
209
219
|
tabs: {
|
|
210
220
|
container: 'flex gap-0.5 p-0.5 bg-gray-100 border border-gray-200 rounded-lg',
|
|
211
221
|
tab: 'px-3 py-1 rounded-md text-[11px] font-medium text-gray-400 hover:text-gray-600 transition-all',
|