@dignite-ng/expand.dynamic-form 3.1.12 → 3.2.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.
@@ -63,9 +63,27 @@ export declare class TreeConfigComponent implements AfterViewChecked {
63
63
  private generateGuid;
64
64
  get keyInput(): FormControl;
65
65
  private _LocalizationService;
66
- SlugRegExValidator(): (control: AbstractControl) => {
66
+ /**
67
+ * 验证器:检查字符串格式和唯一性
68
+ * @description 格式只允许字母、数字、下划线和短横线,且值在树中必须唯一
69
+ */
70
+ keyValidator(): (control: AbstractControl) => {
67
71
  [key: string]: any;
68
72
  } | null;
73
+ /**
74
+ * 检查 key 是否在树中已存在
75
+ * @param key 要检查的 key 值
76
+ * @returns 如果存在返回 true,否则返回 false
77
+ */
78
+ private isKeyExists;
79
+ /**
80
+ * 递归查找 key 是否存在于节点中
81
+ * @param nodes 节点数组
82
+ * @param targetKey 要查找的 key
83
+ * @param excludeKey 要排除的 key(编辑时排除当前节点)
84
+ * @returns 如果找到返回 true,否则返回 false
85
+ */
86
+ private findKeyInNodes;
69
87
  /**创建节点 */
70
88
  addNodeBtn(): void;
71
89
  /**编辑节点 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dignite-ng/expand.dynamic-form",
3
- "version": "3.1.12",
3
+ "version": "3.2.0",
4
4
  "homepage": "https://abp.io",
5
5
  "repository": {
6
6
  "type": "git",