@umituz/web-dashboard 11.5.0 → 11.6.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/web-dashboard",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.0",
|
|
4
4
|
"description": "Installable app skeleton for the fleet — layouts, analytics (dependency-free SVG charts), calendar, onboarding flow permissions/module registry; udb-* stylesheet on design-system tokens",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
2
|
-
import type { OnboardingScreen } from '../types/screens';
|
|
2
|
+
import type { OnboardingScreen, ValueDeliveryScreenConfig } from '../types/screens';
|
|
3
3
|
import type { OnboardingConfig } from '../types/config';
|
|
4
4
|
import { useOnboardingProgress } from '../hooks/useOnboardingProgress';
|
|
5
5
|
import { useOnboardingAnalytics } from '../hooks/useOnboardingAnalytics';
|
|
@@ -111,8 +111,18 @@ function renderScreen(
|
|
|
111
111
|
return <ProcessingScreen config={screen} onComplete={(data) => onStepCompleted(data)} />;
|
|
112
112
|
case 'app-demo':
|
|
113
113
|
return <AppDemoScreen config={screen} onNext={(data) => onStepCompleted(data)} />;
|
|
114
|
-
case 'value-delivery':
|
|
115
|
-
|
|
114
|
+
case 'value-delivery': {
|
|
115
|
+
const deliveryConfig = screen as ValueDeliveryScreenConfig;
|
|
116
|
+
const resolvedItems = deliveryConfig.itemsFromCollected
|
|
117
|
+
? deliveryConfig.itemsFromCollected(progress.collected)
|
|
118
|
+
: deliveryConfig.items;
|
|
119
|
+
return (
|
|
120
|
+
<ValueDeliveryScreen
|
|
121
|
+
config={{ ...screen, items: resolvedItems } as typeof screen}
|
|
122
|
+
onNext={() => onStepCompleted(undefined)}
|
|
123
|
+
/>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
116
126
|
case 'account-gate':
|
|
117
127
|
return <AccountGateScreen config={screen} onNext={(data) => onStepCompleted(data)} />;
|
|
118
128
|
case 'paywall':
|
|
@@ -133,6 +133,7 @@ export type ValueDeliveryScreenConfig<TResult = unknown> = BaseScreen<
|
|
|
133
133
|
title: string;
|
|
134
134
|
result: TResult;
|
|
135
135
|
items?: ReadonlyArray<ValueDeliveryItem>;
|
|
136
|
+
itemsFromCollected?: (collected: Record<string, unknown>) => ReadonlyArray<ValueDeliveryItem>;
|
|
136
137
|
shareConfig?: {
|
|
137
138
|
text: string;
|
|
138
139
|
url?: string;
|