@alfresco/adf-core 8.4.0-19062358161 → 8.4.0-19066231420
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/bundles/assets/adf-core/i18n/en.json +13 -2
- package/custom-theme/material-theme.scss +13 -13
- package/custom-theme/theme/custom-palette-creator.scss +25 -23
- package/custom-theme/theme/custom-theme-palettes.scss +7 -7
- package/custom-theme/theme/theme-data.scss +13 -13
- package/custom-theme/theme/typography.scss +5 -5
- package/fesm2022/adf-core.mjs +332 -127
- package/fesm2022/adf-core.mjs.map +1 -1
- package/lib/form/components/form-renderer.component.d.ts +7 -5
- package/lib/form/components/form-renderer.component.scss +24 -0
- package/lib/form/components/widgets/core/container-column.model.d.ts +2 -0
- package/lib/form/components/widgets/core/container-row.model.d.ts +26 -0
- package/lib/form/components/widgets/core/form-field-types.d.ts +2 -0
- package/lib/form/components/widgets/core/form-field.model.d.ts +25 -2
- package/lib/form/components/widgets/index.d.ts +1 -0
- package/lib/form/components/widgets/repeat/repeat.widget.d.ts +10 -0
- package/lib/form/components/widgets/repeat/repeat.widget.scss +25 -0
- package/package.json +3 -3
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { FormRulesManager } from '../models/form-rules.model';
|
|
3
2
|
import { FormService } from '../services/form.service';
|
|
4
3
|
import { FormFieldModelRenderMiddleware } from './middlewares/middleware';
|
|
5
4
|
import { ContainerModel, FormFieldModel, FormModel, TabModel } from './widgets';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class FormRendererComponent<T> implements OnInit, OnDestroy {
|
|
8
|
-
formService: FormService;
|
|
9
|
-
private formRulesManager;
|
|
10
7
|
private middlewareServices?;
|
|
8
|
+
readonly formService: FormService;
|
|
9
|
+
private readonly formRulesManager;
|
|
10
|
+
private readonly dialog;
|
|
11
|
+
private cdr;
|
|
11
12
|
formDefinition: FormModel;
|
|
12
13
|
readOnly: boolean;
|
|
13
14
|
debugMode: boolean;
|
|
14
15
|
fields: FormFieldModel[];
|
|
15
|
-
constructor(
|
|
16
|
+
constructor(middlewareServices?: FormFieldModelRenderMiddleware[]);
|
|
16
17
|
ngOnInit(): void;
|
|
17
18
|
ngOnDestroy(): void;
|
|
18
19
|
hasTabs(): boolean;
|
|
@@ -26,6 +27,7 @@ export declare class FormRendererComponent<T> implements OnInit, OnDestroy {
|
|
|
26
27
|
*/
|
|
27
28
|
getContainerFields(content: ContainerModel): FormFieldModel[];
|
|
28
29
|
private getMaxColumnFieldSize;
|
|
30
|
+
displayDialogToRemoveRow(field: FormFieldModel, rowIndex: number): void;
|
|
29
31
|
/**
|
|
30
32
|
* Calculate the column width based on the numberOfColumns and current field's colspan property
|
|
31
33
|
*
|
|
@@ -34,6 +36,6 @@ export declare class FormRendererComponent<T> implements OnInit, OnDestroy {
|
|
|
34
36
|
*/
|
|
35
37
|
getColumnWidth(container: ContainerModel): string;
|
|
36
38
|
private runMiddlewareServices;
|
|
37
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<FormRendererComponent<any>, [
|
|
39
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormRendererComponent<any>, [{ optional: true; }]>;
|
|
38
40
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormRendererComponent<any>, "adf-form-renderer", never, { "formDefinition": { "alias": "formDefinition"; "required": true; }; "readOnly": { "alias": "readOnly"; "required": false; }; }, {}, never, never, true, never>;
|
|
39
41
|
}
|
|
@@ -97,6 +97,30 @@
|
|
|
97
97
|
padding-left: 3px;
|
|
98
98
|
padding-right: 3px;
|
|
99
99
|
}
|
|
100
|
+
|
|
101
|
+
&-remove-row-button {
|
|
102
|
+
margin-top: 20px;
|
|
103
|
+
|
|
104
|
+
#{ms.$mat-icon} {
|
|
105
|
+
display: flex;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
align-items: center;
|
|
108
|
+
font-size: 20px;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-container {
|
|
113
|
+
padding: 0 10px;
|
|
114
|
+
|
|
115
|
+
&-label {
|
|
116
|
+
margin: 5px 0 5px -10px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&-multiple {
|
|
120
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.54);
|
|
121
|
+
margin-bottom: 25px;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
100
124
|
}
|
|
101
125
|
|
|
102
126
|
@include flex.layout-bp(lt-md) {
|
|
@@ -16,9 +16,11 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { FormFieldModel } from './form-field.model';
|
|
18
18
|
export declare class ContainerColumnModel {
|
|
19
|
+
id: string;
|
|
19
20
|
size: number;
|
|
20
21
|
fields: FormFieldModel[];
|
|
21
22
|
colspan: number;
|
|
22
23
|
rowspan: number;
|
|
24
|
+
constructor();
|
|
23
25
|
hasFields(): boolean;
|
|
24
26
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { ContainerColumnModel } from './container-column.model';
|
|
18
|
+
export declare class ContainerRowModel {
|
|
19
|
+
id: string;
|
|
20
|
+
isInitial: boolean;
|
|
21
|
+
columns: ContainerColumnModel[];
|
|
22
|
+
size: number;
|
|
23
|
+
colspan: number;
|
|
24
|
+
rowspan: number;
|
|
25
|
+
constructor(isInitial?: boolean);
|
|
26
|
+
}
|
|
@@ -18,6 +18,7 @@ import { MaybeReactiveFormWidget, ReactiveFormWidget } from '../reactive-widget.
|
|
|
18
18
|
export declare class FormFieldTypes {
|
|
19
19
|
static CONTAINER: string;
|
|
20
20
|
static GROUP: string;
|
|
21
|
+
static REPEATABLE_SECTION: string;
|
|
21
22
|
static SECTION: string;
|
|
22
23
|
static DYNAMIC_TABLE: string;
|
|
23
24
|
static TEXT: string;
|
|
@@ -59,4 +60,5 @@ export declare class FormFieldTypes {
|
|
|
59
60
|
static isConstantValueType(type: string): boolean;
|
|
60
61
|
static isContainerType(type: string): boolean;
|
|
61
62
|
static isSectionType(type: string): boolean;
|
|
63
|
+
static isRepeatableSectionType(type: string): boolean;
|
|
62
64
|
}
|
|
@@ -23,9 +23,17 @@ import { FormWidgetModel } from './form-widget.model';
|
|
|
23
23
|
import { FormFieldRule } from './form-field-rule';
|
|
24
24
|
import { VariableConfig } from './form-field-variable-options';
|
|
25
25
|
import { DataColumn } from '../../../../datatable/data/data-column.model';
|
|
26
|
+
import { ContainerRowModel } from './container-row.model';
|
|
26
27
|
export type FieldOptionType = 'rest' | 'manual' | 'variable';
|
|
27
28
|
export type FieldSelectionType = 'single' | 'multiple';
|
|
28
29
|
export type FieldAlignmentType = 'vertical' | 'horizontal';
|
|
30
|
+
interface RepeatableSectionModel {
|
|
31
|
+
id: string;
|
|
32
|
+
uid: string;
|
|
33
|
+
fields: FormFieldModel[];
|
|
34
|
+
rowIndex: number;
|
|
35
|
+
value?: any;
|
|
36
|
+
}
|
|
29
37
|
export declare class FormFieldModel extends FormWidgetModel {
|
|
30
38
|
private _value;
|
|
31
39
|
private _readOnly;
|
|
@@ -81,9 +89,11 @@ export declare class FormFieldModel extends FormWidgetModel {
|
|
|
81
89
|
schemaDefinition: DataColumn[];
|
|
82
90
|
externalProperty?: string;
|
|
83
91
|
style?: string;
|
|
92
|
+
parent?: RepeatableSectionModel;
|
|
84
93
|
numberOfColumns: number;
|
|
85
94
|
fields: FormFieldModel[];
|
|
86
95
|
columns: ContainerColumnModel[];
|
|
96
|
+
rows: ContainerRowModel[];
|
|
87
97
|
emptyOption: FormFieldOption;
|
|
88
98
|
validationSummary: ErrorMessageModel;
|
|
89
99
|
get value(): any;
|
|
@@ -98,7 +108,7 @@ export declare class FormFieldModel extends FormWidgetModel {
|
|
|
98
108
|
markAsValid(): void;
|
|
99
109
|
validate(): boolean;
|
|
100
110
|
private isFieldValidatable;
|
|
101
|
-
constructor(form: any, json?: any);
|
|
111
|
+
constructor(form: any, json?: any, parent?: RepeatableSectionModel);
|
|
102
112
|
private getEmptyOption;
|
|
103
113
|
private setValueForReadonlyType;
|
|
104
114
|
private getDefaultDateFormat;
|
|
@@ -106,9 +116,21 @@ export declare class FormFieldModel extends FormWidgetModel {
|
|
|
106
116
|
private getFieldNameWithLabel;
|
|
107
117
|
private getProcessVariableValue;
|
|
108
118
|
private containerFactory;
|
|
119
|
+
private repeatableSectionFactory;
|
|
120
|
+
private getNumberOfRows;
|
|
121
|
+
private createRow;
|
|
122
|
+
private createColumns;
|
|
123
|
+
private getUniqueId;
|
|
124
|
+
private updateChildrenFieldsRowIndex;
|
|
125
|
+
private createInitialValue;
|
|
109
126
|
private updateContainerColspan;
|
|
110
|
-
|
|
127
|
+
addRow(fields: any, form: any): void;
|
|
128
|
+
private shouldAddRow;
|
|
129
|
+
removeRow(index: number): void;
|
|
130
|
+
private shouldRemoveRow;
|
|
131
|
+
parseValue(json: any, initialValue?: any): any;
|
|
111
132
|
updateForm(): void;
|
|
133
|
+
private updateRepeatableSectionValue;
|
|
112
134
|
/**
|
|
113
135
|
* Check if the field type is invalid, requires a type to be a `container`
|
|
114
136
|
*
|
|
@@ -129,3 +151,4 @@ export declare class FormFieldModel extends FormWidgetModel {
|
|
|
129
151
|
private isDateTimeField;
|
|
130
152
|
private isCheckboxField;
|
|
131
153
|
}
|
|
154
|
+
export {};
|
|
@@ -48,5 +48,6 @@ export * from './base-viewer/base-viewer.widget';
|
|
|
48
48
|
export * from './text/text-mask.component';
|
|
49
49
|
export * from './display-text';
|
|
50
50
|
export * from './header';
|
|
51
|
+
export * from './repeat/repeat.widget';
|
|
51
52
|
export declare const WIDGET_DIRECTIVES: readonly [typeof UnknownWidgetComponent, typeof TextWidgetComponent, typeof NumberWidgetComponent, typeof DecimalWidgetComponent, typeof CheckboxWidgetComponent, typeof MultilineTextWidgetComponentComponent, typeof HyperlinkWidgetComponent, typeof DisplayTextWidgetComponent, typeof DateWidgetComponent, typeof AmountWidgetComponent, typeof ErrorWidgetComponent, typeof DateTimeWidgetComponent, typeof JsonWidgetComponent, typeof BaseViewerWidgetComponent];
|
|
52
53
|
export declare const MASK_DIRECTIVE: readonly [typeof InputMaskDirective];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ContainerModel } from '../core/container.model';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class RepeatWidgetComponent {
|
|
4
|
+
element: ContainerModel;
|
|
5
|
+
isEditor: boolean;
|
|
6
|
+
addRow(): void;
|
|
7
|
+
getAddedRowsCount(): number;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RepeatWidgetComponent, never>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RepeatWidgetComponent, "adf-repeat-widget", never, { "element": { "alias": "element"; "required": false; }; "isEditor": { "alias": "isEditor"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.adf-container-widget {
|
|
2
|
+
&-repeat__text {
|
|
3
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.87);
|
|
4
|
+
padding-bottom: 10px;
|
|
5
|
+
cursor: default;
|
|
6
|
+
user-select: none;
|
|
7
|
+
font-size: var(--adf-header-font-size);
|
|
8
|
+
font-weight: var(--adf-header-font-weight);
|
|
9
|
+
color: var(--adf-header-color);
|
|
10
|
+
line-height: normal;
|
|
11
|
+
|
|
12
|
+
&.adf-collapsible {
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-row-action {
|
|
18
|
+
margin-left: 10px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-row-limit {
|
|
22
|
+
color: rgba(0, 0, 0, 0.67);
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
}
|
|
25
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfresco/adf-core",
|
|
3
3
|
"description": "Alfresco ADF core",
|
|
4
|
-
"version": "8.4.0-
|
|
4
|
+
"version": "8.4.0-19066231420",
|
|
5
5
|
"author": "Hyland Software, Inc. and its affiliates",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
"@angular/router": ">=16.0.0",
|
|
64
64
|
"@mat-datetimepicker/core": ">=12.0.1",
|
|
65
65
|
"@ngx-translate/core": ">=16.0.0",
|
|
66
|
-
"@alfresco/js-api": ">=9.4.0-
|
|
67
|
-
"@alfresco/adf-extensions": ">=8.4.0-
|
|
66
|
+
"@alfresco/js-api": ">=9.4.0-19066231420",
|
|
67
|
+
"@alfresco/adf-extensions": ">=8.4.0-19066231420",
|
|
68
68
|
"minimatch": ">=10.0.0",
|
|
69
69
|
"pdfjs-dist": ">=3.3.122"
|
|
70
70
|
},
|