bpm-core 0.0.55 → 0.0.57

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.
Files changed (68) hide show
  1. package/esm2022/lib/components/app-component-sections/activities/activities.component.mjs +13 -10
  2. package/esm2022/lib/components/app-component-sections/approvals-workflow/approvals-workflow.component.mjs +5 -3
  3. package/esm2022/lib/components/app-component-sections/feedback-section/feedback-section.component.mjs +7 -5
  4. package/esm2022/lib/components/app-component-sections/form-section/form-section.component.mjs +5 -3
  5. package/esm2022/lib/components/app-component-sections/previous-requests/previous-requests.component.mjs +196 -36
  6. package/esm2022/lib/components/app-component-sections/service-header/service-header.component.mjs +5 -3
  7. package/esm2022/lib/components/app-component-sections/workflow-section/workflow-section.component.mjs +5 -3
  8. package/esm2022/lib/components/shared-components/action-buttons/action-buttons.component.mjs +6 -4
  9. package/esm2022/lib/components/shared-components/form-field/add-attachment-section/add-attachment-section.component.mjs +10 -6
  10. package/esm2022/lib/components/shared-components/form-field/attachment-section/attachment-section.component.mjs +11 -9
  11. package/esm2022/lib/components/shared-components/form-field/checkbox/checkbox.component.mjs +4 -3
  12. package/esm2022/lib/components/shared-components/form-field/control-value-accessor.directive.mjs +5 -1
  13. package/esm2022/lib/components/shared-components/form-field/custom-searchable-autocomplete/custom-searchable.component.mjs +3 -3
  14. package/esm2022/lib/components/shared-components/form-field/date-picker/date-picker.component.mjs +4 -3
  15. package/esm2022/lib/components/shared-components/form-field/date-range-picker/date-range-picker.component.mjs +4 -3
  16. package/esm2022/lib/components/shared-components/form-field/doc-uploader/docs-uploader.component.mjs +12 -10
  17. package/esm2022/lib/components/shared-components/form-field/form-label/form-label.component.mjs +5 -3
  18. package/esm2022/lib/components/shared-components/form-field/info-item/info-item.component.mjs +6 -4
  19. package/esm2022/lib/components/shared-components/form-field/input-telephone/input-telephone.component.mjs +16 -3
  20. package/esm2022/lib/components/shared-components/form-field/search-employee/search-employee.component.mjs +18 -13
  21. package/esm2022/lib/components/shared-components/form-field/shared-imports.mjs +4 -2
  22. package/esm2022/lib/components/shared-components/form-field/toggle-button/toggle-button.component.mjs +6 -6
  23. package/esm2022/lib/components/shared-components/form-field/validation-errors/validation-errors.component.mjs +5 -5
  24. package/esm2022/lib/components/shared-components/table/table.component.mjs +240 -0
  25. package/esm2022/lib/directives/skip-location.directive.mjs +28 -0
  26. package/esm2022/lib/enums/actions.enum.mjs +21 -0
  27. package/esm2022/lib/enums/colors.enum.mjs +6 -0
  28. package/esm2022/lib/enums/events.enum.mjs +6 -0
  29. package/esm2022/lib/helpers/shared.helper.mjs +26 -0
  30. package/esm2022/lib/interfaces/action.interface.mjs +2 -0
  31. package/esm2022/lib/pipes/translate.pipe.mjs +36 -0
  32. package/esm2022/lib/regex/index.mjs +2 -0
  33. package/esm2022/lib/services/core.service.ts.mjs +7 -5
  34. package/esm2022/lib/testComponent/general-approver-section/general-approver-section.component.mjs +5 -3
  35. package/esm2022/lib/testComponent/request-details-section/request-details-section.component.mjs +90 -54
  36. package/esm2022/public-api.mjs +2 -1
  37. package/fesm2022/bpm-core.mjs +761 -198
  38. package/fesm2022/bpm-core.mjs.map +1 -1
  39. package/lib/components/app-component-sections/approvals-workflow/approvals-workflow.component.d.ts +2 -0
  40. package/lib/components/app-component-sections/feedback-section/feedback-section.component.d.ts +2 -1
  41. package/lib/components/app-component-sections/form-section/form-section.component.d.ts +2 -1
  42. package/lib/components/app-component-sections/previous-requests/previous-requests.component.d.ts +123 -1
  43. package/lib/components/app-component-sections/service-header/service-header.component.d.ts +2 -1
  44. package/lib/components/app-component-sections/workflow-section/workflow-section.component.d.ts +2 -1
  45. package/lib/components/shared-components/action-buttons/action-buttons.component.d.ts +2 -1
  46. package/lib/components/shared-components/form-field/add-attachment-section/add-attachment-section.component.d.ts +2 -1
  47. package/lib/components/shared-components/form-field/attachment-section/attachment-section.component.d.ts +2 -1
  48. package/lib/components/shared-components/form-field/control-value-accessor.directive.d.ts +1 -0
  49. package/lib/components/shared-components/form-field/doc-uploader/docs-uploader.component.d.ts +2 -1
  50. package/lib/components/shared-components/form-field/input-telephone/input-telephone.component.d.ts +2 -0
  51. package/lib/components/shared-components/form-field/search-employee/search-employee.component.d.ts +2 -1
  52. package/lib/components/shared-components/form-field/shared-imports.d.ts +4 -3
  53. package/lib/components/shared-components/form-field/toggle-button/toggle-button.component.d.ts +2 -2
  54. package/lib/components/shared-components/form-field/validation-errors/validation-errors.component.d.ts +4 -4
  55. package/lib/components/shared-components/table/table.component.d.ts +76 -0
  56. package/lib/directives/skip-location.directive.d.ts +10 -0
  57. package/lib/enums/actions.enum.d.ts +19 -0
  58. package/lib/enums/colors.enum.d.ts +4 -0
  59. package/lib/enums/events.enum.d.ts +4 -0
  60. package/lib/helpers/shared.helper.d.ts +1 -0
  61. package/lib/interfaces/action.interface.d.ts +7 -0
  62. package/lib/pipes/translate.pipe.d.ts +11 -0
  63. package/lib/regex/index.d.ts +1 -0
  64. package/lib/services/core.service.ts.d.ts +2 -0
  65. package/lib/testComponent/general-approver-section/general-approver-section.component.d.ts +2 -1
  66. package/lib/testComponent/request-details-section/request-details-section.component.d.ts +3 -1
  67. package/package.json +1 -1
  68. package/public-api.d.ts +1 -0
@@ -1,3 +1,4 @@
1
+ import { DestroyRef } from '@angular/core';
1
2
  import { CoreI18nService, CoreService, SidenavService } from '../../../services';
2
3
  import { Form, Section } from '../../../interfaces';
3
4
  import { ToastrService } from "ngx-toastr";
@@ -11,6 +12,7 @@ export declare class ApprovalsWorkflowComponent {
11
12
  form: Form;
12
13
  approvals: unknown[];
13
14
  loading: boolean;
15
+ destroyRef: DestroyRef;
14
16
  constructor(i18n: CoreI18nService, sidenavService: SidenavService, coreService: CoreService, toasterService: ToastrService);
15
17
  getApprovals(): void;
16
18
  isLoading(): boolean;
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { DestroyRef, OnInit } from '@angular/core';
2
2
  import { CoreI18nService } from '../../../services';
3
3
  import { Form, InboxItem, ProfileInfoDrop } from '../../../interfaces';
4
4
  import { FeedBackService } from "../../../services";
@@ -19,6 +19,7 @@ export declare class FeedbackSectionComponent implements OnInit {
19
19
  isResponseValidated: boolean;
20
20
  employeeInput: string;
21
21
  feedbackId: string;
22
+ destroyRef: DestroyRef;
22
23
  constructor(feedBackService: FeedBackService, i18n: CoreI18nService, data: any);
23
24
  ngOnInit(): void;
24
25
  getFeedBack(): void;
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { DestroyRef, OnInit } from '@angular/core';
2
2
  import { CoreI18nService, CoreService, SidenavService } from '../../../services';
3
3
  import { Form, Section } from '../../../interfaces';
4
4
  import * as i0 from "@angular/core";
@@ -29,6 +29,7 @@ export declare class FormSectionComponent implements OnInit {
29
29
  };
30
30
  input: any;
31
31
  processingDate: string;
32
+ destroyRef: DestroyRef;
32
33
  constructor(i18n: CoreI18nService, coreService: CoreService, sidenavService: SidenavService);
33
34
  /**
34
35
  * Method to initialize various components when the component is initialized.
@@ -1,4 +1,4 @@
1
- import { AfterViewInit, OnInit } from "@angular/core";
1
+ import { AfterViewInit, DestroyRef, OnInit } from "@angular/core";
2
2
  import { MatDialog } from "@angular/material/dialog";
3
3
  import { FormBuilder, FormGroup } from "@angular/forms";
4
4
  import { CoreI18nService, CoreService, SidenavService } from "../../../services";
@@ -12,6 +12,7 @@ export declare class PreviousRequestsComponent implements OnInit, AfterViewInit
12
12
  i18n: CoreI18nService;
13
13
  private readonly fb;
14
14
  previousRequests: any[];
15
+ destroyRef: DestroyRef;
15
16
  loading: boolean;
16
17
  filterFormGroup: FormGroup;
17
18
  errorMessage: string;
@@ -30,14 +31,135 @@ export declare class PreviousRequestsComponent implements OnInit, AfterViewInit
30
31
  month: any;
31
32
  };
32
33
  constructor(dialog: MatDialog, sidenavService: SidenavService, coreService: CoreService, toasterService: ToastrService, i18n: CoreI18nService, fb: FormBuilder);
34
+ /**
35
+ * Initializes the component on initialization.
36
+ * It creates a form and sets the available statuses based on the current language.
37
+ *
38
+ * @return {void}
39
+ */
33
40
  ngOnInit(): void;
41
+ private readonly ngUnsubscribe;
42
+ /**
43
+ * Generates form controls for the current month and year.
44
+ *
45
+ * @return {object} An object containing form controls for the current month and year.
46
+ * - month: FormControl for the current month with Validators required
47
+ * - year: FormControl for the current year with Validators required
48
+ */
49
+ private currentDateControl;
50
+ /**
51
+ * Initializes a form group for filtering data.
52
+ * It creates form controls for the current date and status.
53
+ * Also sets up a subscription to listen for changes in the status control.
54
+ *
55
+ * @return {void}
56
+ */
34
57
  createForm(): void;
58
+ /**
59
+ * Perform initialization after Angular has fully initialized a component's view.
60
+ *
61
+ * @return {void}
62
+ */
35
63
  ngAfterViewInit(): void;
64
+ /**
65
+ * Clear all filters and reset the form group to its initial state.
66
+ * Sets the month and year filters to the current date's month and year respectively.
67
+ * Sets the status filter to an empty string.
68
+ * Toggles the isOpen property and triggers the filterStatus method.
69
+ *
70
+ * @return {void}
71
+ */
36
72
  clearFilters(): void;
73
+ /**
74
+ * Toggles the isOpen property and triggers the getRequests() method.
75
+ *
76
+ * @return {void}
77
+ */
37
78
  applyFilters(): void;
79
+ /**
80
+ * Retrieves request data based on form values.
81
+ *
82
+ * @return {void}
83
+ */
38
84
  getRequests(): void;
85
+ /**
86
+ * Retrieves the form values including the year and month.
87
+ *
88
+ * @return {Object} Returns an object containing the year and month values.
89
+ */
90
+ getFormValues(): {
91
+ year: number;
92
+ month: number;
93
+ };
94
+ /**
95
+ * Retrieves the selected year value from the filter form group.
96
+ *
97
+ * @return The selected year value as a number.
98
+ */
99
+ private getYearValue;
100
+ /**
101
+ * Retrieves the month value from the filter form group.
102
+ *
103
+ * @return {number} The month value retrieved from the form group.
104
+ */
105
+ private getMonthValue;
106
+ /**
107
+ * Checks if the year and month values of two form objects are equal.
108
+ *
109
+ * @param {Object} first - The first form object to compare.
110
+ * @param {Object} second - The second form object to compare.
111
+ * @returns {boolean} - true if the year and month values are equal, otherwise false.
112
+ */
113
+ areFormValuesEqual(first: any, second: any): boolean;
114
+ /**
115
+ * Update the search data with the provided data.
116
+ *
117
+ * @param {Object} data - The new search data to update.
118
+ *
119
+ * @return {void}
120
+ */
121
+ updateSearchData(data: any): void;
122
+ /**
123
+ * Sends a request to retrieve core data using the Core Service API.
124
+ * Initializes loading and requests before making the call.
125
+ *
126
+ * @return {void}
127
+ */
128
+ requestCoreData(): void;
129
+ /**
130
+ * Initializes loading and requests.
131
+ *
132
+ * @return {void}
133
+ */
134
+ initializeLoadingAndRequests(): void;
135
+ /**
136
+ * Handles successful response from a request.
137
+ *
138
+ * @param {Object} response - The response object containing history data.
139
+ * @return {void}
140
+ */
141
+ handleRequestSuccess(response: any): void;
142
+ /**
143
+ * Handles the error received from a request
144
+ *
145
+ * @param {Object} err - The error object containing information about the error
146
+ * @return {void}
147
+ */
148
+ handleRequestError(err: any): void;
149
+ /**
150
+ * Filters the previous requests based on the status selected in the filter form.
151
+ *
152
+ * @return {void}
153
+ */
39
154
  filterStatus(): void;
155
+ /**
156
+ * Opens a form in a new window based on the provided form ID.
157
+ *
158
+ * @param {string} formId - The ID of the form to be opened.
159
+ * @return {void}
160
+ */
40
161
  viewForm(formId: string): void;
162
+ ngOnDestroy(): void;
41
163
  static ɵfac: i0.ɵɵFactoryDeclaration<PreviousRequestsComponent, never>;
42
164
  static ɵcmp: i0.ɵɵComponentDeclaration<PreviousRequestsComponent, "app-history", never, {}, {}, never, never, true, never>;
43
165
  }
@@ -1,4 +1,4 @@
1
- import { AfterViewInit, ChangeDetectorRef } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, DestroyRef } from '@angular/core';
2
2
  import { Form, Section } from '../../../interfaces';
3
3
  import { MatDialog } from '@angular/material/dialog';
4
4
  import { CoreI18nService, CoreService, FeedBackService, SidenavService } from '../../../services';
@@ -31,6 +31,7 @@ export declare class ServiceHeaderComponent implements AfterViewInit {
31
31
  serviceFaq: any[];
32
32
  approvals: any[];
33
33
  flagPriority: string;
34
+ destroyRef: DestroyRef;
34
35
  constructor(cdRef: ChangeDetectorRef, coreService: CoreService, i18n: CoreI18nService, feedBackService: FeedBackService, dialog: MatDialog, sidenavService: SidenavService, toasterService: ToastrService);
35
36
  /**
36
37
  * Executes after the view has been fully initialized.
@@ -1,4 +1,4 @@
1
- import { ChangeDetectorRef, EventEmitter } from '@angular/core';
1
+ import { ChangeDetectorRef, DestroyRef, EventEmitter } from '@angular/core';
2
2
  import { NgForm } from '@angular/forms';
3
3
  import { Form, Section } from '../../../interfaces';
4
4
  import { CoreI18nService } from '../../../services';
@@ -19,6 +19,7 @@ export declare class WorkflowSectionComponent {
19
19
  segmentDynamicLoaderService: any;
20
20
  sectionFormComponent: any;
21
21
  sectionName: string;
22
+ destroyRef: DestroyRef;
22
23
  constructor(i18n: CoreI18nService, cdRef: ChangeDetectorRef);
23
24
  ngAfterViewChecked(): void;
24
25
  get isExpandableFromBackend(): boolean;
@@ -1,4 +1,4 @@
1
- import { AfterViewInit, ChangeDetectorRef, EventEmitter } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, DestroyRef, EventEmitter } from '@angular/core';
2
2
  import { ActionStateService, CoreI18nService, CoreService } from "../../../services";
3
3
  import { Form, Section } from "../../../interfaces";
4
4
  import { MatDialog } from "@angular/material/dialog";
@@ -29,6 +29,7 @@ export declare class ActionButtonsComponent implements AfterViewInit {
29
29
  SUBMIT: boolean;
30
30
  };
31
31
  submittingForm: boolean;
32
+ destroyRef: DestroyRef;
32
33
  constructor(i18n: CoreI18nService, actionStateService: ActionStateService, coreService: CoreService, dialog: MatDialog, toasterService: ToastrService, cdRef: ChangeDetectorRef);
33
34
  ngAfterViewInit(): void;
34
35
  resetForm(): void;
@@ -1,4 +1,4 @@
1
- import { Injector } from '@angular/core';
1
+ import { DestroyRef, Injector } from '@angular/core';
2
2
  import { MatDialogRef } from '@angular/material/dialog';
3
3
  import { ControlValueAccessorDirective } from '../control-value-accessor.directive';
4
4
  import { Section } from '../../../../interfaces';
@@ -17,6 +17,7 @@ export declare class AttachmentSectionDataComponent<Type> extends ControlValueAc
17
17
  hasColumnBreak: boolean;
18
18
  section: Section;
19
19
  formGroup: FormGroup;
20
+ destroyRef: DestroyRef;
20
21
  constructor(injector: Injector, i18n: CoreI18nService, toasterService: ToastrService, coreService: CoreService, sanitizer: DomSanitizer, fb: FormBuilder, dialogRef: MatDialogRef<any>, dialogData: any);
21
22
  ngOnInit(): void;
22
23
  createForm(): void;
@@ -1,4 +1,4 @@
1
- import { AfterViewInit, EventEmitter } from '@angular/core';
1
+ import { AfterViewInit, DestroyRef, EventEmitter } from '@angular/core';
2
2
  import { CdkDragDrop } from '@angular/cdk/drag-drop';
3
3
  import { ControlValueAccessorDirective } from "../control-value-accessor.directive";
4
4
  import { MatDialog } from "@angular/material/dialog";
@@ -23,6 +23,7 @@ export declare class AttachmentSectionComponent extends ControlValueAccessorDire
23
23
  totalRecords: number;
24
24
  pageSize: number;
25
25
  pageNumber: number;
26
+ destroyRef: DestroyRef;
26
27
  ngOnInit(): void;
27
28
  ngAfterViewInit(): void;
28
29
  onPaginateChange(event: any): void;
@@ -30,6 +30,7 @@ export declare class ControlValueAccessorDirective<Type> implements ControlValue
30
30
  multiple: boolean;
31
31
  searchControl: FormControl<any>;
32
32
  employeeSearchControl: FormControl<any>;
33
+ telephoneControl: FormControl<any>;
33
34
  attachments: any[];
34
35
  startDateControl: FormControl<any>;
35
36
  endDateControl: FormControl<any>;
@@ -1,4 +1,4 @@
1
- import { ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
1
+ import { DestroyRef, ElementRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { DocumentFile } from '../../../../interfaces';
3
3
  import { FormGroup } from '@angular/forms';
4
4
  import { ControlValueAccessorDirective } from '../control-value-accessor.directive';
@@ -53,6 +53,7 @@ export declare class DocsUploaderComponent<Type> extends ControlValueAccessorDir
53
53
  maxSize: string;
54
54
  inputFile: ElementRef;
55
55
  dialog: MatDialog;
56
+ destroyRef: DestroyRef;
56
57
  private readonly validImageTypes;
57
58
  validImgPdfTypes: {
58
59
  pdf: string[];
@@ -4,9 +4,11 @@ import * as i0 from "@angular/core";
4
4
  export declare class InputTelephoneComponent<Type> extends ControlValueAccessorDirective<Type> {
5
5
  floatLabel: any;
6
6
  className: string;
7
+ controlValue: string;
7
8
  CountryISO: typeof CountryISO;
8
9
  SearchCountryField: typeof SearchCountryField;
9
10
  show: boolean;
11
+ setControlValue(controlValue: any): void;
10
12
  static ɵfac: i0.ɵɵFactoryDeclaration<InputTelephoneComponent<any>, never>;
11
13
  static ɵcmp: i0.ɵɵComponentDeclaration<InputTelephoneComponent<any>, "app-input-telephone", never, { "floatLabel": { "alias": "floatLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, never, true, never>;
12
14
  }
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { DestroyRef, EventEmitter } from '@angular/core';
2
2
  import { ControlValueAccessorDirective } from '../control-value-accessor.directive';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class SearchEmployeeComponent<Type> extends ControlValueAccessorDirective<Type> {
@@ -18,6 +18,7 @@ export declare class SearchEmployeeComponent<Type> extends ControlValueAccessorD
18
18
  isUniqueUsers: boolean;
19
19
  userAlreadyExist: boolean;
20
20
  emitedDeletedValue: EventEmitter<any>;
21
+ destroyRef: DestroyRef;
21
22
  deleteRow(ind: number, rowData: any): void;
22
23
  onLoadOptions(event: any): void;
23
24
  includeData(option: any, filterValue: string): any;
@@ -8,7 +8,8 @@ import { InfoItemComponent } from "./info-item/info-item.component";
8
8
  import { EnOnlyDirective } from "../../../directives/en.directive";
9
9
  import { ArOnlyDirective } from "../../../directives/ar.directive";
10
10
  import { NgClass } from "@angular/common";
11
- export declare const MatDatePickerImports: (typeof MatDatepickerInput | typeof MatDatepickerToggle | typeof MatDatepickerModule)[];
12
- export declare const MatFormImports: (typeof MatInput | typeof MatFormFieldModule | typeof MatFormField)[];
13
- export declare const Shareds: (typeof NgClass | typeof ReactiveFormsModule | typeof InfoItemComponent | typeof FormLabelComponent | typeof ValidationErrorsComponent)[];
11
+ import { TranslatePipe } from "../../../pipes/translate.pipe";
12
+ export declare const MatDatePickerImports: (typeof MatDatepickerToggle | typeof MatDatepickerInput | typeof MatDatepickerModule)[];
13
+ export declare const MatFormImports: (typeof MatFormFieldModule | typeof MatFormField | typeof MatInput)[];
14
+ export declare const Shareds: (typeof FormLabelComponent | typeof ValidationErrorsComponent | typeof InfoItemComponent | typeof ReactiveFormsModule | typeof NgClass | typeof TranslatePipe)[];
14
15
  export declare const TextLanguageDirectives: (typeof EnOnlyDirective | typeof ArOnlyDirective)[];
@@ -10,8 +10,8 @@ export declare class ToggleButtonComponent<Type> extends ControlValueAccessorDir
10
10
  optionEn: string;
11
11
  hasHint: boolean;
12
12
  options: any[];
13
- displayedLable: string;
13
+ displayedLabel: string;
14
14
  key: string;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<ToggleButtonComponent<any>, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<ToggleButtonComponent<any>, "app-toggle-button", never, { "className": { "alias": "className"; "required": false; }; "data": { "alias": "data"; "required": false; }; "error": { "alias": "error"; "required": false; }; "optionAr": { "alias": "optionAr"; "required": false; }; "optionEn": { "alias": "optionEn"; "required": false; }; "hasHint": { "alias": "hasHint"; "required": false; }; "options": { "alias": "options"; "required": false; }; "displayedLable": { "alias": "displayedLable"; "required": false; }; "key": { "alias": "key"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToggleButtonComponent<any>, "app-toggle-button", never, { "className": { "alias": "className"; "required": false; }; "data": { "alias": "data"; "required": false; }; "error": { "alias": "error"; "required": false; }; "optionAr": { "alias": "optionAr"; "required": false; }; "optionEn": { "alias": "optionEn"; "required": false; }; "hasHint": { "alias": "hasHint"; "required": false; }; "options": { "alias": "options"; "required": false; }; "displayedLabel": { "alias": "displayedLabel"; "required": false; }; "key": { "alias": "key"; "required": false; }; }, { "onChange": "onChange"; }, never, never, true, never>;
17
17
  }
@@ -5,10 +5,10 @@ export declare class ValidationErrorsComponent<Type> extends ControlValueAccesso
5
5
  errors: {};
6
6
  customErrorMessages: {};
7
7
  errorMessages: {
8
- required: string;
9
- maxlength: string;
10
- minlength: string;
11
- validatePhoneNumber: string;
8
+ required: any;
9
+ maxlength: any;
10
+ minlength: any;
11
+ validatePhoneNumber: any;
12
12
  };
13
13
  ngOnChanges(changes: SimpleChanges): void;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<ValidationErrorsComponent<any>, never>;
@@ -0,0 +1,76 @@
1
+ import { ElementRef, EventEmitter, OnInit } from '@angular/core';
2
+ import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
3
+ import { MatDialog } from '@angular/material/dialog';
4
+ import { MatPaginator, PageEvent } from '@angular/material/paginator';
5
+ import { MatSort, Sort } from '@angular/material/sort';
6
+ import { MatTableDataSource } from '@angular/material/table';
7
+ import { TranslateService } from '@ngx-translate/core';
8
+ import { ActionModel } from '../../../interfaces/action.interface';
9
+ import { Actions } from '../../../enums/actions.enum';
10
+ import * as i0 from "@angular/core";
11
+ export declare class TableComponent implements OnInit {
12
+ dialog: MatDialog;
13
+ translateService: TranslateService;
14
+ private fb;
15
+ matTableRef: ElementRef;
16
+ control: FormControl<any>;
17
+ serviceDetailForm: FormGroup;
18
+ columns: any;
19
+ isError: any;
20
+ isLoading: any;
21
+ customMessage: string;
22
+ columnsConfig: any;
23
+ loadData: any;
24
+ actions: ActionModel[];
25
+ className: string;
26
+ totalElements: number;
27
+ showPagination: boolean;
28
+ pageIndex: number;
29
+ pageSize: number;
30
+ sortDisabled: boolean;
31
+ useScroll: boolean;
32
+ serviceRowSelect: EventEmitter<any>;
33
+ selectPage: EventEmitter<any>;
34
+ rowClicked: EventEmitter<any>;
35
+ autoCompleteValueSelected: EventEmitter<any>;
36
+ selectValueSelected: EventEmitter<any>;
37
+ sortChanged: EventEmitter<Sort>;
38
+ inputCellChanged: EventEmitter<any>;
39
+ pageScroll: EventEmitter<any>;
40
+ toggleChanged: EventEmitter<any>;
41
+ eventClicked: EventEmitter<any>;
42
+ dataSource: MatTableDataSource<any, MatPaginator>;
43
+ tableSort: MatSort;
44
+ localControl: FormControl<any>;
45
+ lang: string;
46
+ spans: any[];
47
+ ctrl: FormControl<any>;
48
+ protected readonly Actions: typeof Actions;
49
+ private unSubscribe;
50
+ hasPaginator: boolean;
51
+ currentPage: number;
52
+ pageChange: EventEmitter<any>;
53
+ form: FormGroup;
54
+ constructor(dialog: MatDialog, translateService: TranslateService, fb: FormBuilder);
55
+ set keyWord(value: string);
56
+ _rows: any;
57
+ get rows(): any;
58
+ set rows(value: any);
59
+ ngOnInit(): void;
60
+ pageChanged(event: PageEvent): void;
61
+ ngAfterViewInit(): void;
62
+ applyFilter(keyWord: string): void;
63
+ truncateName(text: string): string;
64
+ sortChange(sortState: Sort): void;
65
+ mapText(path: string, source: any): any;
66
+ getSlaColor(min: number, max: number): string;
67
+ clickRow(row: any): void;
68
+ emitElement(row: any): void;
69
+ toggleValueChange(e: any, element?: any): void;
70
+ ngOnDestroy(): void;
71
+ parseInt(value: string): number;
72
+ private handleScroll;
73
+ private onTableScroll;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "app-table", never, { "columns": { "alias": "columns"; "required": false; }; "isError": { "alias": "isError"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "customMessage": { "alias": "customMessage"; "required": false; }; "columnsConfig": { "alias": "columnsConfig"; "required": false; }; "loadData": { "alias": "loadData"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "className": { "alias": "className"; "required": false; }; "totalElements": { "alias": "totalElements"; "required": false; }; "showPagination": { "alias": "showPagination"; "required": false; }; "pageIndex": { "alias": "pageIndex"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "sortDisabled": { "alias": "sortDisabled"; "required": false; }; "useScroll": { "alias": "useScroll"; "required": false; }; "hasPaginator": { "alias": "hasPaginator"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "keyWord": { "alias": "keyWord"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; }, { "serviceRowSelect": "serviceRowSelect"; "selectPage": "selectPage"; "rowClicked": "rowClicked"; "autoCompleteValueSelected": "autoCompleteValueSelected"; "selectValueSelected": "selectValueSelected"; "sortChanged": "sortChanged"; "inputCellChanged": "inputCellChanged"; "pageScroll": "pageScroll"; "toggleChanged": "toggleChanged"; "eventClicked": "eventClicked"; "pageChange": "pageChange"; }, never, never, true, never>;
76
+ }
@@ -0,0 +1,10 @@
1
+ import { Router } from '@angular/router';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SkipLocationDirective {
4
+ private router;
5
+ appSkipLocation: any;
6
+ constructor(router: Router);
7
+ onClick(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<SkipLocationDirective, never>;
9
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SkipLocationDirective, "[appSkipLocation]", never, { "appSkipLocation": { "alias": "appSkipLocation"; "required": false; }; }, {}, never, never, true, never>;
10
+ }
@@ -0,0 +1,19 @@
1
+ export declare enum Actions {
2
+ VIEW = "view",
3
+ COPY = "copy",
4
+ EDIT = "edit",
5
+ DELETE = "delete",
6
+ DELETEPENDING = "deletePendingContract",
7
+ CHART = "chart",
8
+ APPROVE = "approve",
9
+ REJECT = "reject",
10
+ DETAILS = "Details",
11
+ START = "Start",
12
+ PREPARE = "Prepare",
13
+ CUSTOMACTION = "customAction",
14
+ CUSTOMACTIONMANAGE = "customActionManage",
15
+ CUSTOMACTIONEXTEND = "customActionExtend",
16
+ CUSTOMACTIONDETAILS = "customActionDetails",
17
+ STATUS = "status",
18
+ ALLOCATE = "allocate"
19
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum Colors {
2
+ RED = "#CA102F",
3
+ GREEN = "#02C389"
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum Events {
2
+ SCROLL = "scroll",
3
+ ENTER = "enter"
4
+ }
@@ -0,0 +1 @@
1
+ export declare function mapTo(path: string, source: any, allowUndefined?: boolean, allowArrayWithSingleValue?: boolean): any;
@@ -0,0 +1,7 @@
1
+ import { Actions } from "../enums/actions.enum";
2
+ export interface ActionModel {
3
+ action: Actions;
4
+ onClick?: (element: any) => {};
5
+ actionName?: string;
6
+ isHidden?: boolean;
7
+ }
@@ -0,0 +1,11 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TranslatePipe implements PipeTransform {
4
+ private coreLocales;
5
+ language: string;
6
+ constructor();
7
+ transform(key: any): any;
8
+ getLanguage(): string;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslatePipe, never>;
10
+ static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
11
+ }
@@ -0,0 +1 @@
1
+ export * from './regex-patterns';
@@ -1,4 +1,5 @@
1
1
  import { HttpClient } from "@angular/common/http";
2
+ import { DestroyRef } from "@angular/core";
2
3
  import type { MyLibConfig } from "../interfaces/shared.interface";
3
4
  import { Observable } from "rxjs";
4
5
  import * as i0 from "@angular/core";
@@ -22,6 +23,7 @@ export declare class CoreService {
22
23
  historyDataLoaded: boolean;
23
24
  historyData: any[];
24
25
  private readonly isMobile;
26
+ destroyRef: DestroyRef;
25
27
  constructor(http: HttpClient, config: MyLibConfig);
26
28
  getLoggedInUserData(): void;
27
29
  loadForm(): Observable<any>;
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { DestroyRef, OnInit } from '@angular/core';
2
2
  import { Form, Section } from "../../interfaces";
3
3
  import { ActionStateService, CoreI18nService } from "../../services";
4
4
  import { FormBuilder, FormControl, FormGroup } from "@angular/forms";
@@ -14,6 +14,7 @@ export declare class GeneralApproverSectionComponent implements OnInit {
14
14
  className: string;
15
15
  fieldsForm: FormGroup;
16
16
  numbers: number[];
17
+ destroyRef: DestroyRef;
17
18
  formGroup: FormGroup<{
18
19
  name: FormControl<string>;
19
20
  countries: FormControl<string>;
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { DestroyRef, OnInit } from '@angular/core';
2
2
  import { Form, Section } from "../../interfaces";
3
3
  import { ActionStateService, CoreI18nService } from "../../services";
4
4
  import { FormBuilder, FormGroup } from "@angular/forms";
@@ -21,6 +21,7 @@ export declare class RequestDetailsSectionComponent implements OnInit {
21
21
  pageSize: number;
22
22
  columnsConfig: any[];
23
23
  columns: string[];
24
+ destroyRef: DestroyRef;
24
25
  isError: boolean;
25
26
  categoryData: {
26
27
  assetDeviceType: any;
@@ -61,6 +62,7 @@ export declare class RequestDetailsSectionComponent implements OnInit {
61
62
  checkValidity(action: string): boolean;
62
63
  customCallSubmit(action: string): void;
63
64
  resetForm(): void;
65
+ pageChanged(event: any): void;
64
66
  static ɵfac: i0.ɵɵFactoryDeclaration<RequestDetailsSectionComponent, never>;
65
67
  static ɵcmp: i0.ɵɵComponentDeclaration<RequestDetailsSectionComponent, "app-request-details-section", never, { "isReadOnly": { "alias": "isReadOnly"; "required": false; }; "section": { "alias": "section"; "required": false; }; "form": { "alias": "form"; "required": false; }; "lov": { "alias": "lov"; "required": false; }; "className": { "alias": "className"; "required": false; }; }, {}, never, never, true, never>;
66
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpm-core",
3
- "version": "0.0.55",
3
+ "version": "0.0.57",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^18.2.0",
6
6
  "@angular/core": "^18.2.0",
package/public-api.d.ts CHANGED
@@ -12,4 +12,5 @@ export * from './lib/hooks';
12
12
  export * from './lib/functions';
13
13
  export * from './lib/validators';
14
14
  export * from './lib/services';
15
+ export * from './lib/regex';
15
16
  export declare const MY_LIB_CONFIG_TOKEN: InjectionToken<MyLibConfig>;