@nocobase/client 2.1.0-beta.20 → 2.1.0-beta.21
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/flow/models/blocks/form/value-runtime/rules.d.ts +5 -0
- package/es/flow/models/blocks/form/value-runtime/runtime.d.ts +12 -0
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/rowIdentity.d.ts +18 -0
- package/es/index.mjs +67 -67
- package/lib/index.js +132 -132
- package/package.json +6 -6
|
@@ -11,6 +11,7 @@ import { DepCollector } from './deps';
|
|
|
11
11
|
import type { FormAssignRuleItem, FormValueWriteMeta, NamePath, Patch, SetOptions, ValueSource } from './types';
|
|
12
12
|
type ObservableBinding = {
|
|
13
13
|
source: ValueSource;
|
|
14
|
+
pathKey: string;
|
|
14
15
|
dispose: () => void;
|
|
15
16
|
};
|
|
16
17
|
export type RuleEngineOptions = {
|
|
@@ -110,6 +111,10 @@ export declare class RuleEngine {
|
|
|
110
111
|
private normalizeResolvedValueForAssociationTarget;
|
|
111
112
|
private prepareRuleContext;
|
|
112
113
|
private shouldApplyDefaultRuleInCurrentState;
|
|
114
|
+
private isStaleToManyItemContext;
|
|
115
|
+
private getItemContext;
|
|
116
|
+
private getRowTargetKey;
|
|
117
|
+
private isMismatchedToManyItemContext;
|
|
113
118
|
private shouldRunRule;
|
|
114
119
|
private createRuleCollectorAndContext;
|
|
115
120
|
private evaluateRuleCondition;
|
|
@@ -57,6 +57,18 @@ export declare class FormValueRuntime {
|
|
|
57
57
|
name?: NamePath | string | number;
|
|
58
58
|
touched?: boolean;
|
|
59
59
|
}>): void;
|
|
60
|
+
private shouldIgnoreSyntheticTouchedInit;
|
|
61
|
+
private isDeletedArrayItemPath;
|
|
62
|
+
private pruneDeletedArrayItemState;
|
|
63
|
+
private getArrayItemTargetKey;
|
|
64
|
+
private getArrayItemIdentity;
|
|
65
|
+
private reconcileArrayItemState;
|
|
66
|
+
private getReconciledArrayItemPath;
|
|
67
|
+
private reconcileArrayItemSet;
|
|
68
|
+
private reconcileArrayItemMap;
|
|
69
|
+
private reconcileObservableBindings;
|
|
70
|
+
private getObservedChangedValue;
|
|
71
|
+
private getObservedSnapshot;
|
|
60
72
|
handleFormValuesChange(changedValues: any, allValues: any): void;
|
|
61
73
|
private deriveExplicitPaths;
|
|
62
74
|
private collectExplicitDiffPaths;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
type FilterTargetKey = string | string[] | null | undefined;
|
|
10
|
+
type SubTableRow = {
|
|
11
|
+
__is_new__?: boolean;
|
|
12
|
+
id?: any;
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
};
|
|
15
|
+
export declare const SUB_TABLE_TEMP_ROW_KEY = "__index__";
|
|
16
|
+
export declare function getSubTableRowIdentity(record: SubTableRow, filterTargetKey: FilterTargetKey): string;
|
|
17
|
+
export declare function normalizeSubTableRows(rows: SubTableRow[]): SubTableRow[];
|
|
18
|
+
export {};
|