@unifylib/ui-lib 1.0.3
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/README.md +0 -0
- package/ng-package.json +7 -0
- package/package.json +12 -0
- package/src/lib/base-model/SearchStrConfig.ts +12 -0
- package/src/lib/base-model/api-response.ts +23 -0
- package/src/lib/base-model/audit-log-entry.ts +7 -0
- package/src/lib/base-model/button-action-settings.ts +25 -0
- package/src/lib/base-model/column-def.model.ts +34 -0
- package/src/lib/base-model/do-action-request.ts +11 -0
- package/src/lib/base-model/field-action.ts +7 -0
- package/src/lib/base-model/field-filter.model.ts +14 -0
- package/src/lib/base-model/field-info.ts +98 -0
- package/src/lib/base-model/field-predicate.model.ts +7 -0
- package/src/lib/base-model/filter-request.ts +27 -0
- package/src/lib/base-model/filter.model.ts +49 -0
- package/src/lib/base-model/get-items-list.ts +24 -0
- package/src/lib/base-model/index.ts +11 -0
- package/src/lib/base-model/lookupItem.ts +21 -0
- package/src/lib/base-model/null-snackmessage.ts +9 -0
- package/src/lib/base-model/page-info.ts +51 -0
- package/src/lib/base-model/report-request.model.ts +33 -0
- package/src/lib/base-model/response-envelop.model.ts +15 -0
- package/src/lib/base-model/snack-message.model.ts +14 -0
- package/src/lib/base-model/snackmessage-interface.ts +7 -0
- package/src/lib/base-model/table-column.interface.ts +29 -0
- package/src/lib/base-model/table-page-user-action.interface.ts +33 -0
- package/src/lib/base-model/workflow/workflow-steps.model.ts +9 -0
- package/src/lib/base-model/workflow/workflow.model.ts +52 -0
- package/src/lib/components/action-confirmation/action-confirmation.component.css +34 -0
- package/src/lib/components/action-confirmation/action-confirmation.component.html +18 -0
- package/src/lib/components/action-confirmation/action-confirmation.component.spec.ts +23 -0
- package/src/lib/components/action-confirmation/action-confirmation.component.ts +58 -0
- package/src/lib/components/activity-report-form/activity-report-form.component.html +109 -0
- package/src/lib/components/activity-report-form/activity-report-form.component.scss +0 -0
- package/src/lib/components/activity-report-form/activity-report-form.component.spec.ts +25 -0
- package/src/lib/components/activity-report-form/activity-report-form.component.ts +605 -0
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.css +51 -0
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.html +23 -0
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.spec.ts +23 -0
- package/src/lib/components/audit-log-details-dialog/audit-log-details-dialog.component.ts +69 -0
- package/src/lib/components/audit-log-list/audit-log.component.html +23 -0
- package/src/lib/components/audit-log-list/audit-log.component.scss +0 -0
- package/src/lib/components/audit-log-list/audit-log.component.spec.ts +25 -0
- package/src/lib/components/audit-log-list/audit-log.component.ts +116 -0
- package/src/lib/components/auto-complete/auto-complete.component.css +14 -0
- package/src/lib/components/auto-complete/auto-complete.component.html +29 -0
- package/src/lib/components/auto-complete/auto-complete.component.spec.ts +23 -0
- package/src/lib/components/auto-complete/auto-complete.component.ts +330 -0
- package/src/lib/components/base-form/base-form.component.html +58 -0
- package/src/lib/components/base-form/base-form.component.scss +0 -0
- package/src/lib/components/base-form/base-form.component.spec.ts +25 -0
- package/src/lib/components/base-form/base-form.component.ts +305 -0
- package/src/lib/components/base-form-canvas/base-form-canvas.component.css +22 -0
- package/src/lib/components/base-form-canvas/base-form-canvas.component.html +1006 -0
- package/src/lib/components/base-form-canvas/base-form-canvas.component.spec.ts +23 -0
- package/src/lib/components/base-form-canvas/base-form-canvas.component.ts +573 -0
- package/src/lib/components/base-input-dialog/base-input-dialog.component.css +0 -0
- package/src/lib/components/base-input-dialog/base-input-dialog.component.html +42 -0
- package/src/lib/components/base-input-dialog/base-input-dialog.component.spec.ts +23 -0
- package/src/lib/components/base-input-dialog/base-input-dialog.component.ts +78 -0
- package/src/lib/components/base-table/base-table.component.html +242 -0
- package/src/lib/components/base-table/base-table.component.scss +31 -0
- package/src/lib/components/base-table/base-table.component.spec.ts +25 -0
- package/src/lib/components/base-table/base-table.component.ts +568 -0
- package/src/lib/components/button-actions/button-actions.component.html +28 -0
- package/src/lib/components/button-actions/button-actions.component.scss +6 -0
- package/src/lib/components/button-actions/button-actions.component.spec.ts +23 -0
- package/src/lib/components/button-actions/button-actions.component.ts +72 -0
- package/src/lib/components/editable-base-table/editable-base-table.component.html +372 -0
- package/src/lib/components/editable-base-table/editable-base-table.component.scss +44 -0
- package/src/lib/components/editable-base-table/editable-base-table.component.spec.ts +25 -0
- package/src/lib/components/editable-base-table/editable-base-table.component.ts +570 -0
- package/src/lib/components/equation-builder/equation-builder.component.css +0 -0
- package/src/lib/components/equation-builder/equation-builder.component.html +31 -0
- package/src/lib/components/equation-builder/equation-builder.component.spec.ts +23 -0
- package/src/lib/components/equation-builder/equation-builder.component.ts +121 -0
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.css +11 -0
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.html +38 -0
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.spec.ts +23 -0
- package/src/lib/components/multi-auto-complete/multi-auto-complete.component.ts +317 -0
- package/src/lib/components/paginator/paginator.component.css +25 -0
- package/src/lib/components/paginator/paginator.component.html +34 -0
- package/src/lib/components/paginator/paginator.component.ts +94 -0
- package/src/lib/components/rejection-comment/action-comment.component.css +33 -0
- package/src/lib/components/rejection-comment/action-comment.component.html +46 -0
- package/src/lib/components/rejection-comment/action-comment.component.spec.ts +23 -0
- package/src/lib/components/rejection-comment/action-comment.component.ts +86 -0
- package/src/lib/components/report-details-dialog/report-details-dialog.component.css +17 -0
- package/src/lib/components/report-details-dialog/report-details-dialog.component.html +16 -0
- package/src/lib/components/report-details-dialog/report-details-dialog.component.spec.ts +23 -0
- package/src/lib/components/report-details-dialog/report-details-dialog.component.ts +113 -0
- package/src/lib/components/report-form/report-form.component.html +94 -0
- package/src/lib/components/report-form/report-form.component.scss +0 -0
- package/src/lib/components/report-form/report-form.component.spec.ts +25 -0
- package/src/lib/components/report-form/report-form.component.ts +588 -0
- package/src/lib/components/search-bar/search-bar.component.html +62 -0
- package/src/lib/components/search-bar/search-bar.component.scss +8 -0
- package/src/lib/components/search-bar/search-bar.component.spec.ts +25 -0
- package/src/lib/components/search-bar/search-bar.component.ts +70 -0
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.css +54 -0
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.html +22 -0
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.spec.ts +23 -0
- package/src/lib/components/shared/attachment-uploader/attachment-uploader.component.ts +45 -0
- package/src/lib/components/shared-list/shared-list.component.css +0 -0
- package/src/lib/components/shared-list/shared-list.component.html +17 -0
- package/src/lib/components/shared-list/shared-list.component.spec.ts +23 -0
- package/src/lib/components/shared-list/shared-list.component.ts +53 -0
- package/src/lib/components/title-bar/title-bar.component.css +0 -0
- package/src/lib/components/title-bar/title-bar.component.css.map +1 -0
- package/src/lib/components/title-bar/title-bar.component.html +31 -0
- package/src/lib/components/title-bar/title-bar.component.scss +23 -0
- package/src/lib/components/title-bar/title-bar.component.spec.ts +23 -0
- package/src/lib/components/title-bar/title-bar.component.ts +119 -0
- package/src/lib/services/backend-service.ts +286 -0
- package/src/lib/services/index.ts +3 -0
- package/src/lib/services/top-panel.ts +17 -0
- package/src/lib/services/trigger-form.service.ts +11 -0
- package/src/lib/share-module/shared-module.ts +10 -0
- package/src/lib/styles/invoiceq-theme.scss +252 -0
- package/src/lib/styles/styles.scss +1723 -0
- package/src/lib/utils/base-utils.ts +102 -0
- package/src/lib/validators/date-range-validator.ts +31 -0
- package/src/lib/validators/index.ts +3 -0
- package/src/lib/validators/match-list.validator.ts +10 -0
- package/src/lib/validators/multi-email-validator.ts +15 -0
- package/src/public-api.ts +21 -0
- package/tsconfig.lib.json +15 -0
- package/tsconfig.lib.prod.json +11 -0
- package/tsconfig.spec.json +15 -0
package/README.md
ADDED
|
File without changes
|
package/ng-package.json
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ApiResponse {
|
|
2
|
+
body: any;
|
|
3
|
+
valid?: boolean;
|
|
4
|
+
fieldMessages?: FieldMessage[];
|
|
5
|
+
globalMessages?: GlobalMessage[];
|
|
6
|
+
pagination?: Pagination;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Pagination {
|
|
10
|
+
pageNumber: number ;
|
|
11
|
+
pageSize: number ;
|
|
12
|
+
totalElements: number ;
|
|
13
|
+
totalPages: number ;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface FieldMessage {
|
|
17
|
+
message: string;
|
|
18
|
+
fieldName: string;
|
|
19
|
+
}
|
|
20
|
+
export interface GlobalMessage {
|
|
21
|
+
message: string;
|
|
22
|
+
messageType: 'INFO'| 'WARNING' | 'ERROR';
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
export class ButtonActionSettings {
|
|
3
|
+
constructor(buttonActionSettings: ButtonActionSettings) {
|
|
4
|
+
this.key = buttonActionSettings.key;
|
|
5
|
+
this.action = buttonActionSettings.action;
|
|
6
|
+
this.label = buttonActionSettings.label;
|
|
7
|
+
this.isPrimary = buttonActionSettings.isPrimary;
|
|
8
|
+
this.icon = buttonActionSettings.icon;
|
|
9
|
+
this.showCommentDialog = buttonActionSettings.showCommentDialog;
|
|
10
|
+
this.comment = buttonActionSettings.comment;
|
|
11
|
+
this.shareExternal = buttonActionSettings.shareExternal;
|
|
12
|
+
this.commentRequired = buttonActionSettings.commentRequired || false;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
label: string;
|
|
16
|
+
action?: any;
|
|
17
|
+
key: number;
|
|
18
|
+
isPrimary?: boolean;
|
|
19
|
+
icon?: any;
|
|
20
|
+
showCommentDialog?:boolean;
|
|
21
|
+
comment?: any;
|
|
22
|
+
shareExternal?: boolean;
|
|
23
|
+
selectedId?: number;
|
|
24
|
+
commentRequired? : boolean;
|
|
25
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export class ColumnDef {
|
|
2
|
+
order: number;
|
|
3
|
+
label: string;
|
|
4
|
+
fieldName: string;
|
|
5
|
+
datatype: string;
|
|
6
|
+
groupLabel: string;
|
|
7
|
+
width: number;
|
|
8
|
+
showSum: boolean=false;
|
|
9
|
+
showCount: boolean=false;
|
|
10
|
+
|
|
11
|
+
constructor(tableColumn: any, order: number, transLabel :string, lang?:string, groupLabel?:string) {
|
|
12
|
+
this.order = order;
|
|
13
|
+
this.label = transLabel;
|
|
14
|
+
if (tableColumn.reportProperty) {
|
|
15
|
+
this.fieldName = tableColumn.reportProperty;
|
|
16
|
+
} else {
|
|
17
|
+
this.fieldName = tableColumn.property.toString();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (tableColumn.langDrivenName){
|
|
21
|
+
this.fieldName = this.fieldName + "." + (lang === 'en'? "englishName": "arabicName");
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
if (tableColumn.reportType) {
|
|
25
|
+
this.datatype = tableColumn.reportType;
|
|
26
|
+
} else {
|
|
27
|
+
this.datatype = tableColumn.type === 'number' ? 'long' : tableColumn.type;
|
|
28
|
+
}
|
|
29
|
+
this.width = tableColumn.reportwidth ? tableColumn.reportwidth : null;
|
|
30
|
+
this.showSum = tableColumn.showSum;
|
|
31
|
+
this.showCount = tableColumn.showCount;
|
|
32
|
+
this.groupLabel = groupLabel;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class FieldFilter {
|
|
2
|
+
fieldName: string;
|
|
3
|
+
operator: string;
|
|
4
|
+
firstValue: any;
|
|
5
|
+
filterType: string;
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const EMPTY_FILED_FILTER : FieldFilter = {
|
|
10
|
+
fieldName: 'abc',
|
|
11
|
+
operator: 'abc',
|
|
12
|
+
firstValue: 'abc',
|
|
13
|
+
filterType: 'FILED_FILTER',
|
|
14
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {ValidatorFn} from "@angular/forms";
|
|
2
|
+
import {Filter} from "./filter.model";
|
|
3
|
+
|
|
4
|
+
export class FieldInfo {
|
|
5
|
+
property: string = "";
|
|
6
|
+
row: number;
|
|
7
|
+
required: boolean = false;
|
|
8
|
+
type: 'text' | 'amount' |'color-picker' | 'currency' | 'date' | 'number' | 'sequence' | 'list' |'lookup'| 'multi-select' | 'password'| 'rich-text'|'radio-button'| 'phone-number'| 'iban-text'|'checkbox' |'textarea' |'button'|'spacer' | 'attachment'| 'section-title'| 'chip-list' |'time' | 'divider' | 'hyper-text' |'stateType'|'status' | 'year' | 'equation-builder' = 'text';
|
|
9
|
+
textFormat?: 'json';
|
|
10
|
+
readonly?: boolean = false;
|
|
11
|
+
viewonly?: boolean ;
|
|
12
|
+
label?: string = '';
|
|
13
|
+
currency?: string;
|
|
14
|
+
lookupApiPath?: string;
|
|
15
|
+
multi?:boolean;
|
|
16
|
+
supportedTypes?:string;
|
|
17
|
+
cascadedBy?: string;
|
|
18
|
+
cascadedByProperty?: string;
|
|
19
|
+
pathParams?: string;
|
|
20
|
+
listOptions?: any[];
|
|
21
|
+
operators?: any[];
|
|
22
|
+
fieldsApi?: string;
|
|
23
|
+
reportFilter?:string;
|
|
24
|
+
updateOnly?: boolean;
|
|
25
|
+
fieldSize ?: number ;
|
|
26
|
+
includeAllOption?: boolean;
|
|
27
|
+
defaultListOption?: any;
|
|
28
|
+
acceptNewItem?: boolean;
|
|
29
|
+
translate?: boolean = false;
|
|
30
|
+
validators?: ValidatorFn[];
|
|
31
|
+
placeholder?: any;
|
|
32
|
+
visible?: boolean = true;
|
|
33
|
+
pattern?: string;
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
advancedFilter?: boolean;
|
|
36
|
+
filterOperator?: 'GREATER_THAN_EQUAL'|'GREATER_THAN'| 'LESS_THAN'|'LESS_THAN_EQUAL'| 'EQUALS'| 'LIKE'| 'NOT_EQ'| 'IN' ;
|
|
37
|
+
workflowManaged?: boolean;
|
|
38
|
+
workflowCascadingField?: string;
|
|
39
|
+
attachmentType?: string;
|
|
40
|
+
lookupFilterList?: Filter[];
|
|
41
|
+
buttonType?: string;
|
|
42
|
+
hideFiles?: boolean;
|
|
43
|
+
behavioralName?: string;
|
|
44
|
+
flattenBySubAttribute?: string;
|
|
45
|
+
defaultValue?:any;
|
|
46
|
+
extraLookupsColumns?: string[];
|
|
47
|
+
displayColumn?: string;
|
|
48
|
+
searchAttribute?:string;
|
|
49
|
+
searchOperator?:"GREATER_THAN_EQUAL" | "GREATER_THAN" | "LESS_THAN" | "LESS_THAN_EQUAL" | "EQUALS" | "LIKE" | "NOT_EQ" | "IN" | "NOT_NULL";
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
constructor(fieldInfo: FieldInfo) {
|
|
54
|
+
this.property = fieldInfo.property;
|
|
55
|
+
this.required = fieldInfo.required;
|
|
56
|
+
this.type = fieldInfo.type;
|
|
57
|
+
this.readonly = fieldInfo.readonly;
|
|
58
|
+
this.label = fieldInfo.label;
|
|
59
|
+
this.fieldSize = fieldInfo.fieldSize;
|
|
60
|
+
this.lookupApiPath = fieldInfo.lookupApiPath ? fieldInfo.lookupApiPath : fieldInfo.property;
|
|
61
|
+
this.row = fieldInfo.row;
|
|
62
|
+
this.supportedTypes = fieldInfo.supportedTypes;
|
|
63
|
+
this.listOptions = fieldInfo.listOptions;
|
|
64
|
+
this.pathParams = fieldInfo.pathParams;
|
|
65
|
+
this.viewonly = fieldInfo.viewonly;
|
|
66
|
+
this.multi = fieldInfo.multi;
|
|
67
|
+
this.updateOnly = fieldInfo.updateOnly;
|
|
68
|
+
this.includeAllOption = fieldInfo.includeAllOption;
|
|
69
|
+
this.defaultListOption = fieldInfo.defaultListOption;
|
|
70
|
+
this.acceptNewItem = fieldInfo.acceptNewItem;
|
|
71
|
+
this.cascadedBy = fieldInfo.cascadedBy;
|
|
72
|
+
this.cascadedByProperty = fieldInfo.cascadedByProperty ? fieldInfo.cascadedByProperty : fieldInfo.cascadedBy;
|
|
73
|
+
this.currency = fieldInfo.currency;
|
|
74
|
+
this.translate = fieldInfo.translate;
|
|
75
|
+
this.advancedFilter = fieldInfo.advancedFilter;
|
|
76
|
+
this.placeholder = fieldInfo.placeholder;
|
|
77
|
+
this.validators = fieldInfo.validators;
|
|
78
|
+
this.filterOperator = fieldInfo.filterOperator;
|
|
79
|
+
this.pattern = fieldInfo.pattern;
|
|
80
|
+
this.workflowManaged = fieldInfo.workflowManaged;
|
|
81
|
+
this.workflowCascadingField = fieldInfo.workflowCascadingField;
|
|
82
|
+
this.visible = fieldInfo.visible === undefined || fieldInfo.visible;
|
|
83
|
+
this.attachmentType = fieldInfo.attachmentType;
|
|
84
|
+
this.lookupFilterList = fieldInfo.lookupFilterList;
|
|
85
|
+
this.extraLookupsColumns = fieldInfo.extraLookupsColumns;
|
|
86
|
+
this.displayColumn = fieldInfo.displayColumn;
|
|
87
|
+
this.textFormat = fieldInfo.textFormat;
|
|
88
|
+
this.buttonType = fieldInfo.buttonType;
|
|
89
|
+
this.hideFiles = fieldInfo.hideFiles;
|
|
90
|
+
this.behavioralName = fieldInfo.behavioralName;
|
|
91
|
+
this.flattenBySubAttribute = fieldInfo.flattenBySubAttribute;
|
|
92
|
+
this.defaultValue = fieldInfo.defaultValue;
|
|
93
|
+
this.searchAttribute = fieldInfo.searchAttribute || this.property;
|
|
94
|
+
this.searchOperator = fieldInfo.searchOperator || 'EQUALS';
|
|
95
|
+
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {Filter} from "./filter.model";
|
|
2
|
+
import {MATCH_TYPE} from "./SearchStrConfig";
|
|
3
|
+
|
|
4
|
+
export class FilterRequest {
|
|
5
|
+
filters?: Filter[];
|
|
6
|
+
searchStr: string;
|
|
7
|
+
pageIndex: number;
|
|
8
|
+
pageSize: number;
|
|
9
|
+
sortKey: string;
|
|
10
|
+
sortDirection: 'ASC'|'DESC';
|
|
11
|
+
apiUri: string;
|
|
12
|
+
columns: string[];
|
|
13
|
+
pendingPage: boolean;
|
|
14
|
+
matchType?: MATCH_TYPE;
|
|
15
|
+
|
|
16
|
+
constructor(pageSize: number = 10) {
|
|
17
|
+
this.apiUri = '';
|
|
18
|
+
this.searchStr = '';
|
|
19
|
+
this.pageIndex = 0;
|
|
20
|
+
this.pageSize = pageSize;
|
|
21
|
+
this.sortKey = 'id';
|
|
22
|
+
this.sortDirection = "DESC";
|
|
23
|
+
this.columns = [];
|
|
24
|
+
this.pendingPage = false;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export class Filter {
|
|
2
|
+
id?: any;
|
|
3
|
+
key?: any;
|
|
4
|
+
label?: string;
|
|
5
|
+
fieldName?: string;
|
|
6
|
+
joinObjectName?: string;
|
|
7
|
+
valueObject?: any;
|
|
8
|
+
fieldType?: string;
|
|
9
|
+
objectFieldName?: string;
|
|
10
|
+
filterType?: 'ASSIGNED_TO_ME'|'FILED_FILTER' | 'CLEAR_FILTERS' | 'CUSTOMER_ID'| 'VENDOR_ID' | 'INVOICE_CUSTOMER_ID'|
|
|
11
|
+
'INVOICE_VENDOR_ID' | 'DATE' | 'ASSIGNED_DEPARTMENT'| 'ASSIGNED_DEPARTMENT_MANAGER_STEPS';
|
|
12
|
+
operator?: 'GREATER_THAN_EQUAL'|'GREATER_THAN'| 'LESS_THAN'|'LESS_THAN_EQUAL'| 'EQUALS'| 'LIKE'| 'NOT_EQ'| 'IN' | 'NOT_NULL';
|
|
13
|
+
firstValue?: any;
|
|
14
|
+
secondValue?: string;
|
|
15
|
+
values?: string[];
|
|
16
|
+
autoSelect?: boolean = false;
|
|
17
|
+
|
|
18
|
+
constructor(filter : Filter) {
|
|
19
|
+
this.id = filter.id;
|
|
20
|
+
this.key = filter.key;
|
|
21
|
+
this.label = filter.label;
|
|
22
|
+
this.fieldName = filter.fieldName;
|
|
23
|
+
this.joinObjectName = filter.joinObjectName;
|
|
24
|
+
this.objectFieldName = filter.objectFieldName;
|
|
25
|
+
this.valueObject = filter.valueObject;
|
|
26
|
+
this.filterType = filter.filterType || 'FILED_FILTER';
|
|
27
|
+
this.fieldType = filter.fieldType;
|
|
28
|
+
this.operator = filter.operator || 'EQUALS';
|
|
29
|
+
this.firstValue = filter.firstValue;
|
|
30
|
+
this.secondValue = filter.secondValue;
|
|
31
|
+
this.values = filter.values;
|
|
32
|
+
this.autoSelect = filter.autoSelect;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const HIDE_TERMINATED: Filter = new Filter(
|
|
37
|
+
{key: 2, label: 'hideTerminated', filterType: 'FILED_FILTER', fieldType: 'number' , fieldName: 'statusId', firstValue: '3' , operator: 'NOT_EQ' , autoSelect:true});
|
|
38
|
+
|
|
39
|
+
export const ASSIGNED_TO_ME_FILTER: Filter = new Filter(
|
|
40
|
+
{key: -1, label: 'Assigned to me', fieldName: 'stepId', filterType: 'ASSIGNED_TO_ME', autoSelect: true});
|
|
41
|
+
|
|
42
|
+
export const PENDING_STATUS_FILTER: Filter = new Filter(
|
|
43
|
+
{key: -2, label: 'Pending Items', fieldName: 'statusId', firstValue: '2', filterType: 'FILED_FILTER'});
|
|
44
|
+
|
|
45
|
+
export const CLEAR_FILTERS: Filter = new Filter(
|
|
46
|
+
{key: -3, label: 'clear', filterType:'CLEAR_FILTERS'});
|
|
47
|
+
|
|
48
|
+
export const ASSIGNED_DEPARTMENT_FILTER : Filter = new Filter(
|
|
49
|
+
{key: -4, label: 'ASSIGNED_DEPARTMENT', filterType:'ASSIGNED_DEPARTMENT'});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {Filter} from "./filter.model";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export interface GetItemsList {
|
|
5
|
+
filters? : Filter[];
|
|
6
|
+
apiUri?: string;
|
|
7
|
+
pageNumber?: number;
|
|
8
|
+
pageSize?: number,
|
|
9
|
+
sortBy?: string;
|
|
10
|
+
sortDirection?: 'ASC' | 'DESC';
|
|
11
|
+
searchStr?:any;
|
|
12
|
+
status?: string;
|
|
13
|
+
columns?: any[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const INIT_GET_ITEMS_LIST = {
|
|
17
|
+
apiUri: '',
|
|
18
|
+
pageNumber: 0,
|
|
19
|
+
pageSize: 10,
|
|
20
|
+
sortBy: 'id',
|
|
21
|
+
sortDirection: "DESC" as const,
|
|
22
|
+
filters: [],
|
|
23
|
+
columns: []
|
|
24
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './button-action-settings';
|
|
2
|
+
export * from './table-column.interface';
|
|
3
|
+
export * from './field-info'
|
|
4
|
+
export * from './page-info'
|
|
5
|
+
export * from './report-request.model'
|
|
6
|
+
export * from './filter-request'
|
|
7
|
+
export * from './filter.model'
|
|
8
|
+
export * from './lookupItem'
|
|
9
|
+
export * from './snack-message.model'
|
|
10
|
+
export * from './table-page-user-action.interface'
|
|
11
|
+
export * from './do-action-request'
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class LookupItem {
|
|
2
|
+
id: number;
|
|
3
|
+
arabicName: string;
|
|
4
|
+
englishName: string;
|
|
5
|
+
defaultValue?: boolean = false;
|
|
6
|
+
|
|
7
|
+
constructor(lookup: LookupItem) {
|
|
8
|
+
this.id = lookup.id;
|
|
9
|
+
this.englishName = lookup.englishName;
|
|
10
|
+
this.arabicName = lookup.arabicName;
|
|
11
|
+
this.defaultValue = lookup.defaultValue;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ALL_ITEM= {
|
|
16
|
+
id: -100,
|
|
17
|
+
arabicName:'Select All',
|
|
18
|
+
englishName:'Select All',
|
|
19
|
+
defaultValue: false
|
|
20
|
+
}
|
|
21
|
+
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export interface PageInfo {
|
|
2
|
+
hasHint?: boolean;
|
|
3
|
+
id: string;
|
|
4
|
+
labelsSection: string;
|
|
5
|
+
hasAddButton: boolean;
|
|
6
|
+
apiUri?: string;
|
|
7
|
+
selfRouting?: boolean;
|
|
8
|
+
addNewRoutePath?: string;
|
|
9
|
+
editRoutePath?: string;
|
|
10
|
+
listRoutePath?: string;
|
|
11
|
+
hideTitle?: boolean;
|
|
12
|
+
saveLabel?:string;
|
|
13
|
+
pageHeight?:'full'|'match',
|
|
14
|
+
processId?: number,
|
|
15
|
+
draftSupported:boolean;
|
|
16
|
+
hasExtraTabs?:boolean;
|
|
17
|
+
attachmentEnabled?: boolean;
|
|
18
|
+
attachmentDefaultExternal?:boolean;
|
|
19
|
+
printAction?: boolean;
|
|
20
|
+
completedStatusFilterLabel?: string;
|
|
21
|
+
enableHideTerminated?: boolean;
|
|
22
|
+
embededTableOnly?: boolean;
|
|
23
|
+
hasCustomFields?: boolean;
|
|
24
|
+
hidePagination?: boolean;
|
|
25
|
+
hideExtractButton?: boolean;
|
|
26
|
+
hideReportsExtractButton?: boolean;
|
|
27
|
+
externalPropertyName?: string;
|
|
28
|
+
lazyLoadData?:boolean;
|
|
29
|
+
groupByProperty?: string;
|
|
30
|
+
groupByValue?: string[];
|
|
31
|
+
supportGroupingInExport?: boolean;
|
|
32
|
+
pageSize?: number;
|
|
33
|
+
hideAuditLog?: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const EMPTY_PAGE_INFO = {
|
|
37
|
+
id: "",
|
|
38
|
+
labelsSection: "",
|
|
39
|
+
hasAddButton: false,
|
|
40
|
+
selfRouting: true,
|
|
41
|
+
draftSupported: false,
|
|
42
|
+
hasExtraTabs: false,
|
|
43
|
+
attachmentEnabled:false,
|
|
44
|
+
printAction: false,
|
|
45
|
+
hidePagination: false,
|
|
46
|
+
attachmentDefaultExternal: false,
|
|
47
|
+
supportGroupingInExport: false,
|
|
48
|
+
hideReportsExtractButton: false,
|
|
49
|
+
hideAuditLog: false
|
|
50
|
+
|
|
51
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {ColumnDef} from "./column-def.model";
|
|
2
|
+
import {FieldPredicate} from "./field-predicate.model";
|
|
3
|
+
import {FilterRequest} from "./filter-request";
|
|
4
|
+
|
|
5
|
+
export class ReportRequest {
|
|
6
|
+
sessionId: string;
|
|
7
|
+
title: string;
|
|
8
|
+
prefLang: string;
|
|
9
|
+
columns: ColumnDef[];
|
|
10
|
+
filter: string;
|
|
11
|
+
reportType: 'pdf' | 'xlsx'
|
|
12
|
+
dataset: any[];
|
|
13
|
+
orientation: string;
|
|
14
|
+
searchStr?: string;
|
|
15
|
+
filtersList?: FieldPredicate[];
|
|
16
|
+
filterRequest?: FilterRequest;
|
|
17
|
+
reportCode?: string;
|
|
18
|
+
constructor(br : any) {
|
|
19
|
+
this.sessionId = br.sessionId;
|
|
20
|
+
this.title = br.title;
|
|
21
|
+
this.prefLang = br.prefLang;
|
|
22
|
+
this.searchStr = br.searchStr;
|
|
23
|
+
this.filter = br.filter;
|
|
24
|
+
this.columns = br.columns;
|
|
25
|
+
this.reportType=br.reportType;
|
|
26
|
+
this.dataset = br.dataset;
|
|
27
|
+
this.orientation = br.orientation;
|
|
28
|
+
this.filtersList = br.filtersList;
|
|
29
|
+
this.filterRequest = br.filterRequest;
|
|
30
|
+
this.reportCode = br.reportCode;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class ResponseEnvelop {
|
|
2
|
+
valid: boolean;
|
|
3
|
+
message: string[];
|
|
4
|
+
body: any;
|
|
5
|
+
pagesCount: number;
|
|
6
|
+
totalSize: number;
|
|
7
|
+
|
|
8
|
+
constructor(responseEnvelop:ResponseEnvelop) {
|
|
9
|
+
this.valid = responseEnvelop.valid;
|
|
10
|
+
this.message = responseEnvelop.message;
|
|
11
|
+
this.body = responseEnvelop.body;
|
|
12
|
+
this.pagesCount = responseEnvelop.pagesCount;
|
|
13
|
+
this.totalSize = responseEnvelop.totalSize;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class SnackMessage {
|
|
2
|
+
message: string='';
|
|
3
|
+
translate: boolean=false;
|
|
4
|
+
type: 'info' | 'success' | 'error' | 'warning';
|
|
5
|
+
translateParams: any;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
constructor(message: string, translate=false , type?:any , translateParams: any = {}) {
|
|
9
|
+
this.message = message;
|
|
10
|
+
this.translate = translate;
|
|
11
|
+
this.type = type;
|
|
12
|
+
this.translateParams = translateParams;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface TableColumn<T> {
|
|
2
|
+
property: string;
|
|
3
|
+
type: 'text' | 'croppedText' | 'image' | 'netAmount' | 'workflowStatus' | 'onOff' | 'progress' | 'checkbox' | 'button' | 'date' | 'number'| 'icon' |'bigdecimal'|'builder'|'localDateTime'|'report-sequence' | 'listAction' | 'info' | 'stateType' | 'hyper-text'|'year' | 'reportType' | 'status'
|
|
4
|
+
viewType?:string;
|
|
5
|
+
enableSorting: boolean;
|
|
6
|
+
visible?: boolean;
|
|
7
|
+
cssClasses?: string[];
|
|
8
|
+
reportVisible?:boolean | true;
|
|
9
|
+
reportProperty?: string;
|
|
10
|
+
reportType?: string;
|
|
11
|
+
showSum?:boolean;
|
|
12
|
+
showCount?:boolean;
|
|
13
|
+
translate?: boolean;
|
|
14
|
+
width?:number;
|
|
15
|
+
label?:string;
|
|
16
|
+
reportwidth?:number;
|
|
17
|
+
langDrivenName?:boolean;
|
|
18
|
+
additionalProperty?: string;
|
|
19
|
+
currency?: string;
|
|
20
|
+
orderByProperty?: string;
|
|
21
|
+
advancedFilter?: boolean;
|
|
22
|
+
enableQuickFilter?: boolean;
|
|
23
|
+
format?:string;
|
|
24
|
+
group?:string;
|
|
25
|
+
arraySubProperty?: string;
|
|
26
|
+
digitInfo?:string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export const FRONT_END_COLUMN_TYPES = ['listAction', 'button','hyper-text'];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {PageInfo} from "./page-info";
|
|
2
|
+
|
|
3
|
+
export interface TablePageUserAction {
|
|
4
|
+
type: 'add' | 'select' | 'extra';
|
|
5
|
+
id?:number;
|
|
6
|
+
item?:any;
|
|
7
|
+
actionKey?: string;
|
|
8
|
+
pageInfo?:PageInfo
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const SELECT_RECORD_ACTION: TablePageUserAction = {
|
|
12
|
+
type:'select'
|
|
13
|
+
}
|
|
14
|
+
export const EXTRA_ACTION: TablePageUserAction = {
|
|
15
|
+
type:'extra'
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const DRILL_DOWN_ACTION: TablePageUserAction = {
|
|
19
|
+
type:'extra'
|
|
20
|
+
}
|
|
21
|
+
export const JUNIOR_DOWN_ACTION: TablePageUserAction = {
|
|
22
|
+
type:'extra'
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const ADD_NEW_RECORD_ACTION: TablePageUserAction = {
|
|
26
|
+
type:'add',
|
|
27
|
+
id: -1
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const TABLE_RECORD_ACTION: TablePageUserAction = {
|
|
31
|
+
type:'extra',
|
|
32
|
+
id: -1
|
|
33
|
+
}
|