@object-ui/react 3.3.0 → 3.3.2
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/CHANGELOG.md +18 -0
- package/README.md +21 -1
- package/dist/SchemaRenderer.js +19 -2
- package/dist/context/AppShellContext.d.ts +26 -0
- package/dist/context/AppShellContext.js +67 -0
- package/dist/context/index.d.ts +1 -7
- package/dist/context/index.js +1 -7
- package/package.json +32 -9
- package/.turbo/turbo-build.log +0 -4
- package/src/LazyPluginLoader.tsx +0 -174
- package/src/SchemaRenderer.tsx +0 -266
- package/src/__tests__/LazyPluginLoader.test.tsx +0 -176
- package/src/__tests__/SchemaRenderer.aria.test.tsx +0 -118
- package/src/__tests__/SchemaRenderer.debug.test.tsx +0 -69
- package/src/__tests__/SchemaRenderer.errorBoundary.test.tsx +0 -114
- package/src/__tests__/SchemaRenderer.expressions.test.tsx +0 -131
- package/src/__tests__/SchemaRendererProvider.smoke.test.tsx +0 -132
- package/src/__tests__/ThemeProvider.test.tsx +0 -451
- package/src/__tests__/useNavigationOverlay.test.ts +0 -578
- package/src/__tests__/useOffline.test.ts +0 -198
- package/src/__tests__/usePageTransition.test.ts +0 -214
- package/src/__tests__/usePageVariables.test.tsx +0 -334
- package/src/__tests__/usePerformance.test.ts +0 -137
- package/src/__tests__/useViewData.test.tsx +0 -422
- package/src/__tests__/view-switching.test.tsx +0 -456
- package/src/components/form/FieldFactory.tsx +0 -516
- package/src/components/form/FormRenderer.test.tsx +0 -744
- package/src/components/form/FormRenderer.tsx +0 -258
- package/src/components/form/README.md +0 -352
- package/src/components/form/index.ts +0 -12
- package/src/context/ActionContext.tsx +0 -213
- package/src/context/DndContext.tsx +0 -260
- package/src/context/NotificationContext.tsx +0 -280
- package/src/context/SchemaRendererContext.tsx +0 -48
- package/src/context/ThemeContext.tsx +0 -325
- package/src/context/__tests__/ActionContext.test.tsx +0 -174
- package/src/context/__tests__/DndContext.test.tsx +0 -150
- package/src/context/__tests__/NotificationContext.test.tsx +0 -176
- package/src/context/__tests__/useDataScope.test.tsx +0 -91
- package/src/context/index.ts +0 -13
- package/src/hooks/__tests__/useActionEngine.test.ts +0 -170
- package/src/hooks/__tests__/useActionRunner.test.ts +0 -153
- package/src/hooks/__tests__/useAnimation.test.ts +0 -82
- package/src/hooks/__tests__/useColumnSummary.test.ts +0 -93
- package/src/hooks/__tests__/useCrudShortcuts.test.ts +0 -85
- package/src/hooks/__tests__/useDataRefresh.test.ts +0 -115
- package/src/hooks/__tests__/useDebugMode.test.ts +0 -83
- package/src/hooks/__tests__/useDensityMode.test.ts +0 -81
- package/src/hooks/__tests__/useDiscovery.test.tsx +0 -247
- package/src/hooks/__tests__/useDynamicApp.test.ts +0 -161
- package/src/hooks/__tests__/useETagCache.test.ts +0 -153
- package/src/hooks/__tests__/useExpression.test.ts +0 -86
- package/src/hooks/__tests__/useFocusTrap.test.ts +0 -294
- package/src/hooks/__tests__/useKeyboardShortcuts.test.ts +0 -144
- package/src/hooks/__tests__/usePageTransition.test.ts +0 -158
- package/src/hooks/__tests__/usePerformanceBudget.test.ts +0 -157
- package/src/hooks/__tests__/useReducedMotion.test.ts +0 -104
- package/src/hooks/__tests__/useSchemaPersistence.test.ts +0 -220
- package/src/hooks/__tests__/useViewSharing.test.ts +0 -121
- package/src/hooks/__tests__/useViewTransition.test.ts +0 -61
- package/src/hooks/index.ts +0 -36
- package/src/hooks/useActionEngine.ts +0 -84
- package/src/hooks/useActionRunner.ts +0 -119
- package/src/hooks/useAnimation.ts +0 -117
- package/src/hooks/useClientNotifications.ts +0 -251
- package/src/hooks/useColumnSummary.ts +0 -87
- package/src/hooks/useCrudShortcuts.ts +0 -126
- package/src/hooks/useDataRefresh.ts +0 -58
- package/src/hooks/useDebugMode.ts +0 -95
- package/src/hooks/useDensityMode.ts +0 -102
- package/src/hooks/useDiscovery.ts +0 -168
- package/src/hooks/useDynamicApp.ts +0 -142
- package/src/hooks/useETagCache.ts +0 -404
- package/src/hooks/useExpression.ts +0 -56
- package/src/hooks/useFocusManagement.ts +0 -248
- package/src/hooks/useFocusTrap.ts +0 -138
- package/src/hooks/useGlobalUndo.ts +0 -98
- package/src/hooks/useKeyboardShortcuts.ts +0 -119
- package/src/hooks/useNavigationOverlay.ts +0 -190
- package/src/hooks/useOffline.ts +0 -301
- package/src/hooks/usePageTransition.ts +0 -187
- package/src/hooks/usePageVariables.tsx +0 -157
- package/src/hooks/usePerformance.ts +0 -246
- package/src/hooks/usePerformanceBudget.ts +0 -313
- package/src/hooks/useReducedMotion.ts +0 -53
- package/src/hooks/useSchemaPersistence.ts +0 -222
- package/src/hooks/useViewData.ts +0 -201
- package/src/hooks/useViewSharing.ts +0 -140
- package/src/hooks/useViewTransition.ts +0 -144
- package/src/index.ts +0 -41
- package/src/spec-bridge/SpecBridge.ts +0 -64
- package/src/spec-bridge/__tests__/P1SpecBridge.test.ts +0 -855
- package/src/spec-bridge/__tests__/SpecBridge.test.ts +0 -550
- package/src/spec-bridge/bridges/dashboard.ts +0 -180
- package/src/spec-bridge/bridges/form-view.ts +0 -109
- package/src/spec-bridge/bridges/list-view.ts +0 -187
- package/src/spec-bridge/bridges/page.ts +0 -136
- package/src/spec-bridge/index.ts +0 -14
- package/src/spec-bridge/types.ts +0 -38
- package/src/utils/i18n.ts +0 -10
- package/tsconfig.json +0 -17
- package/tsconfig.tsbuildinfo +0 -1
- package/vitest.config.ts +0 -2
package/src/index.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ObjectUI
|
|
3
|
-
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export * from './SchemaRenderer';
|
|
10
|
-
export * from './hooks'; // will be empty for now
|
|
11
|
-
export * from './context'; // will be empty for now
|
|
12
|
-
export * from './components/form';
|
|
13
|
-
export * from './LazyPluginLoader';
|
|
14
|
-
export * from './spec-bridge';
|
|
15
|
-
|
|
16
|
-
// i18n utilities
|
|
17
|
-
export { resolveI18nLabel } from './utils/i18n';
|
|
18
|
-
|
|
19
|
-
// Built-in i18n support
|
|
20
|
-
export {
|
|
21
|
-
I18nProvider,
|
|
22
|
-
useObjectTranslation,
|
|
23
|
-
useObjectLabel,
|
|
24
|
-
useSafeFieldLabel,
|
|
25
|
-
useI18nContext,
|
|
26
|
-
createI18n,
|
|
27
|
-
getDirection,
|
|
28
|
-
getAvailableLanguages,
|
|
29
|
-
formatDate,
|
|
30
|
-
formatDateTime,
|
|
31
|
-
formatRelativeTime,
|
|
32
|
-
formatCurrency,
|
|
33
|
-
formatNumber,
|
|
34
|
-
type I18nConfig,
|
|
35
|
-
type I18nProviderProps,
|
|
36
|
-
type TranslationKeys,
|
|
37
|
-
type DateFormatOptions,
|
|
38
|
-
type CurrencyFormatOptions,
|
|
39
|
-
type NumberFormatOptions,
|
|
40
|
-
} from '@object-ui/i18n';
|
|
41
|
-
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ObjectUI
|
|
3
|
-
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type { SchemaNode } from '@object-ui/core';
|
|
10
|
-
import type { BridgeContext, BridgeFn } from './types';
|
|
11
|
-
import { bridgeListView } from './bridges/list-view';
|
|
12
|
-
import { bridgeFormView } from './bridges/form-view';
|
|
13
|
-
import { bridgePage } from './bridges/page';
|
|
14
|
-
import { bridgeDashboard } from './bridges/dashboard';
|
|
15
|
-
|
|
16
|
-
export class SpecBridge {
|
|
17
|
-
private bridges = new Map<string, BridgeFn>();
|
|
18
|
-
private context: BridgeContext;
|
|
19
|
-
|
|
20
|
-
constructor(context: BridgeContext = {}) {
|
|
21
|
-
this.context = context;
|
|
22
|
-
this.register('list', bridgeListView);
|
|
23
|
-
this.register('form', bridgeFormView);
|
|
24
|
-
this.register('page', bridgePage);
|
|
25
|
-
this.register('dashboard', bridgeDashboard);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
register(specType: string, bridge: BridgeFn): void {
|
|
29
|
-
this.bridges.set(specType, bridge);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/** Transform a spec schema into a SchemaNode tree */
|
|
33
|
-
transform(specType: string, spec: any): SchemaNode {
|
|
34
|
-
const bridge = this.bridges.get(specType);
|
|
35
|
-
if (!bridge) {
|
|
36
|
-
throw new Error(`No bridge registered for spec type: ${specType}`);
|
|
37
|
-
}
|
|
38
|
-
return bridge(spec, this.context);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/** Transform a ListView spec */
|
|
42
|
-
transformListView(spec: any): SchemaNode {
|
|
43
|
-
return this.transform('list', spec);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/** Transform a FormView spec */
|
|
47
|
-
transformFormView(spec: any): SchemaNode {
|
|
48
|
-
return this.transform('form', spec);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/** Transform a Page spec */
|
|
52
|
-
transformPage(spec: any): SchemaNode {
|
|
53
|
-
return this.transform('page', spec);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
/** Transform a Dashboard spec */
|
|
57
|
-
transformDashboard(spec: any): SchemaNode {
|
|
58
|
-
return this.transform('dashboard', spec);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
updateContext(ctx: Partial<BridgeContext>): void {
|
|
62
|
-
this.context = { ...this.context, ...ctx };
|
|
63
|
-
}
|
|
64
|
-
}
|