@nocobase/client-v2 2.2.0-alpha.7 → 2.2.0-beta.10
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/BaseApplication.d.ts +1 -1
- package/es/components/form/TypedVariableInput.d.ts +5 -31
- package/es/components/form/filter/CollectionFilter.d.ts +0 -2
- package/es/components/form/filter/CollectionFilterItem.d.ts +1 -11
- package/es/components/form/filter/CollectionFilterPanel.d.ts +0 -2
- package/es/components/form/filter/index.d.ts +0 -2
- package/es/components/form/filter/useFilterActionProps.d.ts +0 -2
- package/es/components/index.d.ts +0 -1
- package/es/flow/components/FieldAssignExactDatePicker.d.ts +0 -1
- package/es/flow/components/FieldAssignValueInput.d.ts +0 -3
- package/es/flow/components/RunJSValueEditor.d.ts +0 -1
- package/es/flow/index.d.ts +0 -1
- package/es/index.d.ts +0 -4
- package/es/index.mjs +99 -133
- package/es/utils/index.d.ts +0 -1
- package/lib/index.js +106 -140
- package/package.json +7 -8
- package/src/BaseApplication.tsx +6 -6
- package/src/__tests__/app.test.tsx +0 -26
- package/src/__tests__/browserChecker.test.ts +0 -61
- package/src/components/README.md +1 -7
- package/src/components/README.zh-CN.md +1 -6
- package/src/components/form/JsonTextArea.tsx +0 -4
- package/src/components/form/ScanInput/__tests__/useCodeScanner.test.tsx +2 -145
- package/src/components/form/ScanInput/useCodeScanner.ts +2 -154
- package/src/components/form/TypedVariableInput.tsx +98 -445
- package/src/components/form/__tests__/TypedVariableInput.test.tsx +9 -320
- package/src/components/form/filter/CollectionFilter.tsx +0 -4
- package/src/components/form/filter/CollectionFilterItem.tsx +7 -32
- package/src/components/form/filter/CollectionFilterPanel.tsx +0 -4
- package/src/components/form/filter/__tests__/CollectionFilterItem.test.tsx +0 -38
- package/src/components/form/filter/index.ts +0 -2
- package/src/components/form/filter/useFilterActionProps.ts +6 -37
- package/src/components/index.ts +0 -1
- package/src/flow/admin-shell/admin-layout/AdminLayoutComponent.tsx +1 -0
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutComponent.test.tsx +6 -253
- package/src/flow/components/FieldAssignExactDatePicker.tsx +11 -25
- package/src/flow/components/FieldAssignValueInput.tsx +9 -55
- package/src/flow/components/RunJSValueEditor.tsx +1 -9
- package/src/flow/index.ts +0 -1
- package/src/index.ts +0 -4
- package/src/utils/index.tsx +0 -1
- package/es/components/category-tabs/SortableCategoryTabs.d.ts +0 -55
- package/es/components/category-tabs/index.d.ts +0 -9
- package/es/utils/getRouteRuntimeVersion.d.ts +0 -23
- package/src/__tests__/getRouteRuntimeVersion.test.ts +0 -68
- package/src/components/category-tabs/SortableCategoryTabs.tsx +0 -210
- package/src/components/category-tabs/index.ts +0 -10
- package/src/components/form/filter/__tests__/useFilterActionProps.test.tsx +0 -95
- package/src/utils/getRouteRuntimeVersion.ts +0 -185
package/es/BaseApplication.d.ts
CHANGED
|
@@ -143,7 +143,7 @@ export declare abstract class BaseApplication<TOptions extends BaseApplicationOp
|
|
|
143
143
|
setMaintaining(maintaining: boolean): void;
|
|
144
144
|
getOptions(): TOptions;
|
|
145
145
|
getName(): string;
|
|
146
|
-
getCdnUrl():
|
|
146
|
+
getCdnUrl(): any;
|
|
147
147
|
getPublicPath(): string;
|
|
148
148
|
getApiUrl(pathname?: string): string;
|
|
149
149
|
getRouteUrl(pathname: string): string;
|
|
@@ -10,11 +10,11 @@ import { type MetaTreeNode } from '@nocobase/flow-engine';
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { type VariableDelimiters } from './VariableInput';
|
|
12
12
|
/**
|
|
13
|
-
* Constant types this input can edit.
|
|
14
|
-
* `useTypedConstant`
|
|
15
|
-
*
|
|
13
|
+
* Constant types this input can edit. Subset of v1 `Variable.Input`
|
|
14
|
+
* `useTypedConstant` — drops `'object'` (no v2 JSON editor yet) and `'null'`
|
|
15
|
+
* (handled by the dedicated `nullable` prop).
|
|
16
16
|
*/
|
|
17
|
-
export type TypedConstantType = 'string' | 'number' | 'boolean' | 'date'
|
|
17
|
+
export type TypedConstantType = 'string' | 'number' | 'boolean' | 'date';
|
|
18
18
|
/**
|
|
19
19
|
* One allowed constant type. Either a bare type name (`'number'`) or a
|
|
20
20
|
* `[type, editorProps]` pair (`['number', { min: 1, max: 65535 }]`) where
|
|
@@ -33,51 +33,25 @@ export interface TypedVariableInputProps {
|
|
|
33
33
|
* Allowed constant types. The `Constant` switcher entry always exposes a
|
|
34
34
|
* typed submenu (matching v1 `Variable.Input`) so users can see what type
|
|
35
35
|
* the constant is, even when only one type is permitted. Default: all four
|
|
36
|
-
* supported types.
|
|
37
|
-
* mode: constants/null are hidden, the empty state becomes a readonly
|
|
38
|
-
* placeholder, and clearing a selected variable resets to `null`.
|
|
36
|
+
* supported types.
|
|
39
37
|
*/
|
|
40
38
|
types?: TypedConstantSpec[];
|
|
41
39
|
/**
|
|
42
40
|
* Restrict the variable picker to specific top-level meta-tree namespaces
|
|
43
41
|
* (e.g. `['$env']`). When omitted, every registered top-level property is
|
|
44
42
|
* exposed — matching `VariableInput`'s default behaviour.
|
|
45
|
-
*
|
|
46
|
-
* Ignored when `metaTree` is supplied (an explicit tree wins).
|
|
47
43
|
*/
|
|
48
44
|
namespaces?: string[];
|
|
49
45
|
/** Additional leaves appended to the picker after the namespace-filtered nodes. */
|
|
50
46
|
extraNodes?: MetaTreeNode[];
|
|
51
|
-
/**
|
|
52
|
-
* Provide the variable tree explicitly instead of reading the global
|
|
53
|
-
* FlowContext meta tree. When set, `namespaces`/`extraNodes` are ignored and
|
|
54
|
-
* this tree is used verbatim — use for context-scoped variable sources that
|
|
55
|
-
* are not part of the global registry (e.g. a workflow node's upstream
|
|
56
|
-
* outputs). Lazy `children` thunks are resolved on demand as the user
|
|
57
|
-
* expands the cascader.
|
|
58
|
-
*/
|
|
59
|
-
metaTree?: MetaTreeNode[];
|
|
60
47
|
/**
|
|
61
48
|
* When true (default), the switcher exposes a `Null` option that resets the
|
|
62
49
|
* value to `null`. When false, the value is constrained to one of the
|
|
63
50
|
* allowed types or a variable reference.
|
|
64
51
|
*/
|
|
65
52
|
nullable?: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Opt-in: when the incoming `value` is `undefined`, initialize the editor to
|
|
68
|
-
* the first allowed constant type instead of rendering the null-mode
|
|
69
|
-
* placeholder. `null` still keeps its explicit null semantics; only
|
|
70
|
-
* `undefined` triggers this path.
|
|
71
|
-
*/
|
|
72
|
-
defaultToFirstConstantTypeWhenUndefined?: boolean;
|
|
73
53
|
/** Variable-token delimiters. Default `['{{', '}}']` — see `VariableInput`. */
|
|
74
54
|
delimiters?: VariableDelimiters;
|
|
75
|
-
/**
|
|
76
|
-
* Hide variable choices from the switcher. In variable-only mode this hides
|
|
77
|
-
* the selector button entirely; in mixed constant/variable mode it keeps the
|
|
78
|
-
* null/constant choices but removes variable entries.
|
|
79
|
-
*/
|
|
80
|
-
hideVariable?: boolean;
|
|
81
55
|
disabled?: boolean;
|
|
82
56
|
placeholder?: string;
|
|
83
57
|
style?: React.CSSProperties;
|
|
@@ -15,8 +15,6 @@ export interface CollectionFilterProps {
|
|
|
15
15
|
collection: Collection | undefined;
|
|
16
16
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
17
17
|
initialValue?: CompiledFilter;
|
|
18
|
-
/** Default compiled filter used both for initial empty state and Reset. */
|
|
19
|
-
defaultValue?: CompiledFilter;
|
|
20
18
|
/** Called on Submit or Reset with the compiled NocoBase filter param (`undefined` when cleared). */
|
|
21
19
|
onChange: (filter: CompiledFilter) => void;
|
|
22
20
|
/** Translator. Defaults to identity. */
|
|
@@ -37,16 +37,6 @@ export interface CollectionFilterItemProps {
|
|
|
37
37
|
app?: {
|
|
38
38
|
getComponent?: (name: string) => React.ComponentType<any> | undefined;
|
|
39
39
|
};
|
|
40
|
-
/** Optional override for the left field picker placeholder. */
|
|
41
|
-
fieldPlaceholder?: string;
|
|
42
|
-
/** Optional override for the operator picker placeholder. */
|
|
43
|
-
operatorPlaceholder?: string;
|
|
44
|
-
/** Optional override for the value input placeholder. Pass `null` to suppress it. */
|
|
45
|
-
valuePlaceholder?: string | null;
|
|
46
|
-
/** Optional override for the left field picker width. Defaults to v2's original 200px. */
|
|
47
|
-
fieldWidth?: number;
|
|
48
|
-
/** Optional override for the operator picker min-width. Defaults to v2's original 120px. */
|
|
49
|
-
operatorMinWidth?: number;
|
|
50
40
|
}
|
|
51
41
|
/**
|
|
52
42
|
* Filter row bound directly to a `Collection`, with no `FlowModel` dependency. Use this from settings pages or other surfaces that need a filter UI but don't have (and shouldn't synthesise) a block model just to satisfy `FilterItem`. Pair with `FilterContainer` via either an inline wrapper or `createCollectionFilterItem(collection)`.
|
|
@@ -57,7 +47,7 @@ export declare const CollectionFilterItem: FC<CollectionFilterItemProps>;
|
|
|
57
47
|
/**
|
|
58
48
|
* Convenience factory returning a `FilterContainer`-compatible `FilterItem` component bound to a specific collection. Avoids creating an inline closure on every parent render, which would otherwise reset any focused inner antd control.
|
|
59
49
|
*/
|
|
60
|
-
export declare function createCollectionFilterItem(collection: Collection, bound?: Pick<CollectionFilterItemProps, 'filterableFieldNames' | 'nonfilterableFieldNames' | 'noIgnore' | 't' | 'app'
|
|
50
|
+
export declare function createCollectionFilterItem(collection: Collection, bound?: Pick<CollectionFilterItemProps, 'filterableFieldNames' | 'nonfilterableFieldNames' | 'noIgnore' | 't' | 'app'>): React.FC<{
|
|
61
51
|
value: CollectionFilterItemValue;
|
|
62
52
|
}>;
|
|
63
53
|
export default CollectionFilterItem;
|
|
@@ -18,8 +18,6 @@ export interface CollectionFilterPanelProps {
|
|
|
18
18
|
collection: Collection | undefined;
|
|
19
19
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
20
20
|
initialValue?: CompiledFilter;
|
|
21
|
-
/** Default compiled filter used both for initial empty state and Reset. */
|
|
22
|
-
defaultValue?: CompiledFilter;
|
|
23
21
|
/** Called when the condition group structure changes or `reset()` is invoked. */
|
|
24
22
|
onChange?: (filter: CompiledFilter) => void;
|
|
25
23
|
/** Translator. Defaults to identity. */
|
|
@@ -9,7 +9,5 @@
|
|
|
9
9
|
export { CollectionFilter } from './CollectionFilter';
|
|
10
10
|
export type { CollectionFilterProps } from './CollectionFilter';
|
|
11
11
|
export { CollectionFilterPanel } from './CollectionFilterPanel';
|
|
12
|
-
export { CollectionFilterItem } from './CollectionFilterItem';
|
|
13
|
-
export type { CollectionFilterItemValue } from './CollectionFilterItem';
|
|
14
12
|
export type { CollectionFilterPanelProps, CollectionFilterPanelRef } from './CollectionFilterPanel';
|
|
15
13
|
export type { CompiledFilter } from './useFilterActionProps';
|
|
@@ -46,8 +46,6 @@ export interface UseFilterActionPropsArgs extends UseFilterOptionsArgs {
|
|
|
46
46
|
collection: Collection | undefined;
|
|
47
47
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
48
48
|
initialValue?: CompiledFilter;
|
|
49
|
-
/** Default compiled filter used both for initial empty state and Reset. */
|
|
50
|
-
defaultValue?: CompiledFilter;
|
|
51
49
|
/**
|
|
52
50
|
* Called when the user submits or resets the filter popover. Receives the compiled filter param (`undefined` when cleared) and which footer button triggered the call. Typical implementation: `(filter, action) => { listRequest.run(filter); if (action === 'submit') closePopover(); }`.
|
|
53
51
|
*/
|
package/es/components/index.d.ts
CHANGED
|
@@ -19,6 +19,5 @@ export interface FieldAssignExactDatePickerProps {
|
|
|
19
19
|
isRange?: boolean;
|
|
20
20
|
onChange?: (value: ExactDatePickerValue) => void;
|
|
21
21
|
style?: React.CSSProperties;
|
|
22
|
-
disabled?: boolean;
|
|
23
22
|
}
|
|
24
23
|
export declare const FieldAssignExactDatePicker: React.FC<FieldAssignExactDatePickerProps>;
|
|
@@ -52,10 +52,7 @@ interface Props {
|
|
|
52
52
|
* 默认 false,保持历史行为。
|
|
53
53
|
*/
|
|
54
54
|
enableDateVariableAsConstant?: boolean;
|
|
55
|
-
/** 是否允许在变量选择器中使用 RunJS。默认 true,保持历史行为。 */
|
|
56
|
-
allowRunJS?: boolean;
|
|
57
55
|
maxAssociationFieldDepth?: number;
|
|
58
|
-
disabled?: boolean;
|
|
59
56
|
}
|
|
60
57
|
export declare function mergeItemMetaTreeForAssignValue(baseTree: MetaTreeNode[], extraTree: MetaTreeNode[]): MetaTreeNode[];
|
|
61
58
|
export declare function resolveAssignValueFieldPath(itemModel: any): string | undefined;
|
package/es/flow/index.d.ts
CHANGED
|
@@ -21,7 +21,6 @@ export * from './FlowPage';
|
|
|
21
21
|
export * from './models';
|
|
22
22
|
export * from './utils';
|
|
23
23
|
export * from './actions';
|
|
24
|
-
export { FieldAssignValueInput } from './components/FieldAssignValueInput';
|
|
25
24
|
export * from './system-settings';
|
|
26
25
|
export * from './admin-shell/admin-layout';
|
|
27
26
|
export * from './admin-shell/BaseLayoutModel';
|
package/es/index.d.ts
CHANGED
|
@@ -28,8 +28,6 @@ export * from './layout-manager';
|
|
|
28
28
|
export * from './hooks';
|
|
29
29
|
export { default as languageCodes } from './locale/languageCodes';
|
|
30
30
|
export * from './nocobase-buildin-plugin';
|
|
31
|
-
export { getRouteRuntimeVersion } from './utils/getRouteRuntimeVersion';
|
|
32
|
-
export type { RouteRuntimeVersion } from './utils/getRouteRuntimeVersion';
|
|
33
31
|
export * from './collection-field-interface/CollectionFieldInterface';
|
|
34
32
|
export * from './collection-field-interface/CollectionFieldInterfaceManager';
|
|
35
33
|
export * from './collection-manager/field-configure';
|
|
@@ -40,8 +38,6 @@ export * from './collection-manager/template-fields';
|
|
|
40
38
|
export * from './data-source';
|
|
41
39
|
export * from './entry-actions';
|
|
42
40
|
export * from './flow';
|
|
43
|
-
export { CodeEditorExtension } from './flow/components/code-editor/extension';
|
|
44
|
-
export type { CodeEditorExtra, CodeEditorExtraRegistry, EditorRef } from './flow/components/code-editor/types';
|
|
45
41
|
export { DEFAULT_DATA_SOURCE_KEY, IconPicker, isTitleField, isTitleFieldInterface, NocoBaseDesktopRouteType, } from './flow-compat';
|
|
46
42
|
export type { NocoBaseDesktopRoute } from './flow-compat';
|
|
47
43
|
export * from './utils/markdownSanitize';
|