@nocobase/client-v2 2.2.0-alpha.3 → 2.2.0-alpha.4
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/es/RouteRepository.d.ts +8 -0
- package/es/authRedirect.d.ts +1 -0
- package/es/components/form/TypedVariableInput.d.ts +9 -1
- package/es/components/form/filter/CollectionFilter.d.ts +2 -0
- package/es/components/form/filter/CollectionFilterPanel.d.ts +2 -0
- package/es/components/form/filter/useFilterActionProps.d.ts +2 -0
- package/es/index.d.ts +2 -0
- package/es/index.mjs +146 -114
- package/es/utils/getRouteRuntimeVersion.d.ts +23 -0
- package/es/utils/index.d.ts +1 -0
- package/lib/index.js +147 -115
- package/package.json +7 -7
- package/src/RouteRepository.ts +25 -0
- package/src/__tests__/RouteRepository.test.ts +23 -0
- package/src/__tests__/authRedirect.test.ts +17 -0
- package/src/__tests__/getRouteRuntimeVersion.test.ts +68 -0
- package/src/authRedirect.ts +38 -0
- package/src/components/form/JsonTextArea.tsx +4 -0
- package/src/components/form/TypedVariableInput.tsx +58 -34
- package/src/components/form/__tests__/TypedVariableInput.test.tsx +52 -0
- package/src/components/form/filter/CollectionFilter.tsx +4 -0
- package/src/components/form/filter/CollectionFilterPanel.tsx +4 -0
- package/src/components/form/filter/__tests__/useFilterActionProps.test.tsx +95 -0
- package/src/components/form/filter/useFilterActionProps.ts +37 -6
- package/src/flow/actions/dateTimeFormat.tsx +2 -2
- package/src/flow/admin-shell/BaseLayoutModel.tsx +13 -0
- package/src/flow/admin-shell/admin-layout/AdminLayoutEntryGuard.test.tsx +177 -1
- package/src/flow/admin-shell/admin-layout/AdminLayoutEntryGuard.tsx +20 -0
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutModel.test.tsx +77 -0
- package/src/flow/models/blocks/table/TableColumnModel.tsx +6 -2
- package/src/flow/models/blocks/table/__tests__/TableColumnModel.test.tsx +51 -0
- package/src/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.tsx +45 -13
- package/src/flow/utils/__tests__/dateTimeFormat.test.ts +42 -0
- package/src/index.ts +2 -0
- package/src/utils/getRouteRuntimeVersion.ts +185 -0
- package/src/utils/index.tsx +1 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export type RouteRuntimeVersion = 'legacy' | 'modern';
|
|
10
|
+
declare global {
|
|
11
|
+
interface Window {
|
|
12
|
+
__nocobase_modern_client_prefix__?: string;
|
|
13
|
+
__nocobase_public_path__?: string;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/** Resolve which client shell currently owns the route.
|
|
17
|
+
*
|
|
18
|
+
* - returns `modern` when the current page is actually mounted under the modern
|
|
19
|
+
* client base path (`/v/`, `/nocobase/v/`, ...)
|
|
20
|
+
* - returns `legacy` when the route is still under the legacy shell, even if the
|
|
21
|
+
* modern prefix global has been injected into the page
|
|
22
|
+
*/
|
|
23
|
+
export declare function getRouteRuntimeVersion(): RouteRuntimeVersion;
|
package/es/utils/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React, { ComponentType } from 'react';
|
|
10
10
|
export * from './appVersionHTML';
|
|
11
|
+
export * from './getRouteRuntimeVersion';
|
|
11
12
|
export declare function normalizeContainer(container: Element | ShadowRoot | string): Element | null;
|
|
12
13
|
export declare const compose: (...components: [ComponentType<any>, any][]) => (LastChild?: ComponentType<any>) => React.FC;
|