@alauda-fe/crd-form 0.0.4 → 0.0.5
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/esm2022/lib/field-controls/form-item.component.mjs +105 -66
- package/esm2022/lib/field-controls/widgets/link/component.mjs +4 -4
- package/esm2022/lib/field-controls/widgets/resource-requirements/resource-requirements.component.mjs +2 -2
- package/esm2022/lib/field-widgets/htpasswd/component.mjs +10 -5
- package/esm2022/lib/field-widgets/htpasswd/form.mjs +123 -54
- package/esm2022/lib/field-widgets/htpasswd/utils.mjs +38 -0
- package/esm2022/lib/types/index.mjs +2 -1
- package/esm2022/lib/utils/capability.mjs +4 -1
- package/lib/field-controls/form-item.component.d.ts +2 -0
- package/lib/field-widgets/htpasswd/form.d.ts +7 -5
- package/lib/field-widgets/htpasswd/utils.d.ts +15 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/utils/capability.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { FormGroup } from '@angular/forms';
|
|
2
2
|
import { BaseResourceFormComponent } from 'ng-resource-form-util';
|
|
3
3
|
import { OperandField } from '../../types';
|
|
4
|
+
import { getFieldDescription, getFieldLabel, getFieldPlaceholder, isFieldDisabled } from './utils';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare class HtpasswdFormComponent extends BaseResourceFormComponent<string, {
|
|
6
7
|
username: string;
|
|
@@ -9,8 +10,13 @@ export declare class HtpasswdFormComponent extends BaseResourceFormComponent<str
|
|
|
9
10
|
field: OperandField;
|
|
10
11
|
required: boolean;
|
|
11
12
|
isUpdate: boolean;
|
|
13
|
+
isDisabled: boolean;
|
|
12
14
|
originalUsername: string;
|
|
13
15
|
originalResource: string;
|
|
16
|
+
getFieldDescription: typeof getFieldDescription;
|
|
17
|
+
isFieldDisabled: typeof isFieldDisabled;
|
|
18
|
+
getFieldPlaceholder: typeof getFieldPlaceholder;
|
|
19
|
+
getFieldLabel: typeof getFieldLabel;
|
|
14
20
|
createForm(): FormGroup<{
|
|
15
21
|
username: import("@angular/forms").FormControl<string>;
|
|
16
22
|
password: import("@angular/forms").FormControl<string>;
|
|
@@ -23,10 +29,6 @@ export declare class HtpasswdFormComponent extends BaseResourceFormComponent<str
|
|
|
23
29
|
username: string;
|
|
24
30
|
password: string;
|
|
25
31
|
}): string;
|
|
26
|
-
getLabel(field: OperandField, type: 'username' | 'password'): "username" | "password" | {
|
|
27
|
-
en: string;
|
|
28
|
-
zh: string;
|
|
29
|
-
};
|
|
30
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<HtpasswdFormComponent, never>;
|
|
31
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HtpasswdFormComponent, "acl-htpasswd-form", never, { "field": { "alias": "field"; "required": false; }; "required": { "alias": "required"; "required": false; }; "isUpdate": { "alias": "isUpdate"; "required": false; }; }, {}, never, never, false, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HtpasswdFormComponent, "acl-htpasswd-form", never, { "field": { "alias": "field"; "required": false; }; "required": { "alias": "required"; "required": false; }; "isUpdate": { "alias": "isUpdate"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; }, {}, never, never, false, never>;
|
|
32
34
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OperandField } from '../../types';
|
|
2
|
+
export declare function getFieldLabel(field: OperandField, type: 'username' | 'password'): {
|
|
3
|
+
en: string;
|
|
4
|
+
zh: string;
|
|
5
|
+
};
|
|
6
|
+
export declare function getFieldDescription(field: OperandField, type: 'username' | 'password'): {
|
|
7
|
+
en: string;
|
|
8
|
+
zh: string;
|
|
9
|
+
};
|
|
10
|
+
export declare function getFieldPlaceholder(field: OperandField, type: 'username' | 'password'): {
|
|
11
|
+
en: string;
|
|
12
|
+
zh: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function getUsernameDefaultValue(field: OperandField): string;
|
|
15
|
+
export declare function isFieldDisabled(field: OperandField, type: 'username' | 'password'): boolean;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare enum SpecCapability {
|
|
|
50
50
|
docOption = "urn:alm:descriptor:docOption:",// docOption:{product}:{path}
|
|
51
51
|
docLink = "urn:alm:descriptor:docLink:",// docOption:{link}
|
|
52
52
|
validation = "urn:alm:descriptor:com.tectonic.ui:validation:",
|
|
53
|
+
copyable = "urn:alm:descriptor:copyable",
|
|
53
54
|
/**
|
|
54
55
|
* 表单布局/控制能力
|
|
55
56
|
*/
|
|
@@ -42,6 +42,7 @@ export declare function getFieldTooltip(field: OperandField): {
|
|
|
42
42
|
en: string;
|
|
43
43
|
zh: string;
|
|
44
44
|
};
|
|
45
|
+
export declare function isFieldCopyable(field: OperandField): boolean;
|
|
45
46
|
export declare function isFieldDescriptionAsLink(field: OperandField): boolean;
|
|
46
47
|
export declare function getFieldDocLink(field: OperandField): string;
|
|
47
48
|
export declare function getFieldDocOption(field: OperandField): DocsOption;
|