bpm-core 0.0.129 → 0.0.130

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 (75) hide show
  1. package/README.md +57 -4
  2. package/cli/deploy/build.js +1 -1
  3. package/cli/deploy/git-operations-handler.js +1 -1
  4. package/cli/deploy/index.js +1 -1
  5. package/cli/generate/index.js +2 -0
  6. package/cli/generate/mock/index.js +17 -15
  7. package/cli/generate/new/angular-template/.editorconfig +13 -0
  8. package/cli/generate/new/angular-template/README.md +7 -0
  9. package/cli/generate/new/angular-template/angular.json.ejs +167 -0
  10. package/cli/generate/new/angular-template/build.sh +6 -0
  11. package/cli/generate/new/angular-template/extra-webpack.config.js.ejs +5 -0
  12. package/cli/generate/new/angular-template/karma.conf.js +44 -0
  13. package/cli/generate/new/angular-template/package.json.ejs +67 -0
  14. package/cli/generate/new/angular-template/protractor.conf.js +28 -0
  15. package/cli/generate/new/angular-template/src/app/app.component.html +35 -0
  16. package/cli/generate/new/angular-template/src/app/app.component.scss +0 -0
  17. package/cli/generate/new/angular-template/src/app/app.component.ts +81 -0
  18. package/cli/generate/new/angular-template/src/app/config/segment-dynamic-loader.config.ts.ejs +8 -0
  19. package/cli/generate/new/angular-template/src/app/i18n/ar.ts.ejs +18 -0
  20. package/cli/generate/new/angular-template/src/app/i18n/en.ts.ejs +18 -0
  21. package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/@@.component.html.ejs +33 -0
  22. package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/@@.component.ts.ejs +128 -0
  23. package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_html-field.ejs +97 -0
  24. package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_html-table.ejs +27 -0
  25. package/cli/generate/new/angular-template/src/app/page-components/@@comp-template@@/_ts-field.ejs +3 -0
  26. package/cli/generate/new/angular-template/src/app/shared/pipes/translate.pipe.ts +32 -0
  27. package/cli/generate/new/angular-template/src/app/shared/services/i18n.service.ts +32 -0
  28. package/cli/generate/new/angular-template/src/app/shared/services/segment-dynamic-loader.service.ts.ejs +49 -0
  29. package/cli/generate/new/angular-template/src/app/shared/services/state-machine.service.ts +119 -0
  30. package/cli/generate/new/angular-template/src/app/shared/types/lov.enum.ts.ejs +7 -0
  31. package/cli/generate/new/angular-template/src/app/templates/print-section/print-section.component.html +5 -0
  32. package/cli/generate/new/angular-template/src/app/templates/print-section/print-section.component.scss +0 -0
  33. package/cli/generate/new/angular-template/src/app/templates/print-section/print-section.component.ts.ejs +156 -0
  34. package/cli/generate/new/angular-template/src/app/templates/print.ts.ejs +392 -0
  35. package/cli/generate/new/angular-template/src/environments/environment.local.ts.ejs +40 -0
  36. package/cli/generate/new/angular-template/src/environments/environment.prod.ts +25 -0
  37. package/cli/generate/new/angular-template/src/environments/environment.ts +25 -0
  38. package/cli/generate/new/angular-template/src/favicon.ico +0 -0
  39. package/cli/generate/new/angular-template/src/index.html.ejs +14 -0
  40. package/cli/generate/new/angular-template/src/main.ts +49 -0
  41. package/cli/generate/new/angular-template/src/polyfills.ts +65 -0
  42. package/cli/generate/new/angular-template/src/styles.scss.ejs +121 -0
  43. package/cli/generate/new/angular-template/src/test.ts +26 -0
  44. package/cli/generate/new/angular-template/tsconfig.app.json +15 -0
  45. package/cli/generate/new/angular-template/tsconfig.json +50 -0
  46. package/cli/generate/new/angular-template/tsconfig.spec.json +18 -0
  47. package/cli/generate/new/angular-template/tslint.json +143 -0
  48. package/cli/generate/new/copy-and-generate.js +120 -0
  49. package/cli/generate/new/field.js +4 -0
  50. package/cli/generate/new/index.js +47 -0
  51. package/cli/generate/new/service-data.js +284 -0
  52. package/fesm2022/bpm-core.mjs +244 -252
  53. package/fesm2022/bpm-core.mjs.map +1 -1
  54. package/lib/components/shared-components/form-field/attachment-section/attachment-section.component.d.ts +1 -2
  55. package/lib/components/shared-components/form-field/control-value-accessor.directive.d.ts +4 -4
  56. package/lib/components/shared-components/form-field/index.d.ts +0 -1
  57. package/lib/components/shared-components/form-field/input/input.component.d.ts +3 -2
  58. package/lib/components/shared-components/form-field/input-number/input-number.component.d.ts +2 -0
  59. package/lib/components/shared-components/form-field/radio/radio.component.d.ts +39 -2
  60. package/lib/components/shared-components/form-field/search-employee/search-employee.component.d.ts +5 -5
  61. package/lib/components/shared-components/form-field/shared-imports.d.ts +1 -4
  62. package/lib/components/shared-components/form-field/textarea/textarea.component.d.ts +76 -1
  63. package/lib/components/shared-components/table/table.component.d.ts +3 -3
  64. package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/input-filters.d.ts +1 -0
  65. package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/input-map-filter.directive.d.ts +4 -1
  66. package/lib/testComponent/request-details-section/request-details-section.component.d.ts +8 -3
  67. package/package.json +7 -2
  68. package/public-api.d.ts +1 -0
  69. package/lib/directives/ar.directive.d.ts +0 -11
  70. package/lib/directives/en.directive.d.ts +0 -11
  71. package/lib/directives/number.directive.d.ts +0 -14
  72. /package/cli/{deploy → utilities}/utilities.js +0 -0
  73. /package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/index.d.ts +0 -0
  74. /package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/input-mappers.d.ts +0 -0
  75. /package/lib/{components/shared-components/form-field/input → directives}/input-map-filter/types.d.ts +0 -0
@@ -16,7 +16,6 @@ export declare class AttachmentSectionComponent extends ControlValueAccessorDire
16
16
  isSortable: boolean;
17
17
  downloadAll: boolean;
18
18
  popupData: any;
19
- isRequired: boolean;
20
19
  descriptionRequired: boolean;
21
20
  commentsRequired: boolean;
22
21
  allowedExtensions: string;
@@ -44,5 +43,5 @@ export declare class AttachmentSectionComponent extends ControlValueAccessorDire
44
43
  downloadFile(event: any, field: any): Promise<void>;
45
44
  customDownloadAction(event: any): void;
46
45
  static ɵfac: i0.ɵɵFactoryDeclaration<AttachmentSectionComponent, never>;
47
- static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentSectionComponent, "app-attachment-section", never, { "className": { "alias": "className"; "required": false; }; "customDownload": { "alias": "customDownload"; "required": false; }; "attachmentsMax": { "alias": "attachmentsMax"; "required": false; }; "isSortable": { "alias": "isSortable"; "required": false; }; "downloadAll": { "alias": "downloadAll"; "required": false; }; "isRequired": { "alias": "isRequired"; "required": false; }; "descriptionRequired": { "alias": "descriptionRequired"; "required": false; }; "commentsRequired": { "alias": "commentsRequired"; "required": false; }; "allowedExtensions": { "alias": "allowedExtensions"; "required": false; }; }, { "downloadActionClicked": "downloadActionClicked"; "emitedValue": "emitedValue"; }, never, never, true, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<AttachmentSectionComponent, "app-attachment-section", never, { "className": { "alias": "className"; "required": false; }; "customDownload": { "alias": "customDownload"; "required": false; }; "attachmentsMax": { "alias": "attachmentsMax"; "required": false; }; "isSortable": { "alias": "isSortable"; "required": false; }; "downloadAll": { "alias": "downloadAll"; "required": false; }; "descriptionRequired": { "alias": "descriptionRequired"; "required": false; }; "commentsRequired": { "alias": "commentsRequired"; "required": false; }; "allowedExtensions": { "alias": "allowedExtensions"; "required": false; }; }, { "downloadActionClicked": "downloadActionClicked"; "emitedValue": "emitedValue"; }, never, never, true, never>;
48
47
  }
@@ -41,11 +41,11 @@ export declare class ControlValueAccessorDirective<Type> implements ControlValue
41
41
  Validators: typeof Validators;
42
42
  minDateValue: any;
43
43
  maxDateValue: any;
44
- maxDate: string;
44
+ maxDate: 'today' | 'oneYear';
45
45
  datepickerObj: any;
46
- minDate: string;
47
- customMaxDate: any;
48
- customMinDate: any;
46
+ minDate: 'today';
47
+ customMaxDate: string;
48
+ customMinDate: string;
49
49
  value: any;
50
50
  control: FormControl | undefined;
51
51
  required: boolean;
@@ -6,7 +6,6 @@ export * from './date-range-picker/date-range-picker.component';
6
6
  export * from './form-label/form-label.component';
7
7
  export * from './info-item/info-item.component';
8
8
  export * from './input/input.component';
9
- export * from './input/input-map-filter';
10
9
  export * from './input-number/input-number.component';
11
10
  export * from './input-email/input-email.component';
12
11
  export * from './input-mask/input-mask.component';
@@ -1,6 +1,6 @@
1
1
  import { EventEmitter, DestroyRef } from '@angular/core';
2
2
  import { ControlValueAccessorDirective } from '../control-value-accessor.directive';
3
- import type { InputMapFn, InputFilterFn } from './input-map-filter/types';
3
+ import type { InputMapFn, InputFilterFn } from '../../../../directives/input-map-filter/types';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class InputComponent<Type> extends ControlValueAccessorDirective<Type> {
6
6
  floatLabel: any;
@@ -8,6 +8,7 @@ export declare class InputComponent<Type> extends ControlValueAccessorDirective<
8
8
  iconPrefixName: string;
9
9
  iconSuffixName: string;
10
10
  emitedChangedValue1: EventEmitter<any>;
11
+ maxLength: number | string;
11
12
  /**
12
13
  * A mapping function that modifies the input value during typing, pasting, or dropping text.
13
14
  * You can use it to modify the full input value **before it appears** (e.g., for auto-capitalization,
@@ -85,5 +86,5 @@ export declare class InputComponent<Type> extends ControlValueAccessorDirective<
85
86
  destroyRef: DestroyRef;
86
87
  ngOnInit(): void;
87
88
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent<any>, never>;
88
- static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent<any>, "app-input", never, { "floatLabel": { "alias": "floatLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "iconPrefixName": { "alias": "iconPrefixName"; "required": false; }; "iconSuffixName": { "alias": "iconSuffixName"; "required": false; }; "emitedChangedValue1": { "alias": "emitedChangedValue1"; "required": false; }; "mapFn": { "alias": "mapFn"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; }, {}, never, never, true, never>;
89
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent<any>, "app-input", never, { "floatLabel": { "alias": "floatLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "iconPrefixName": { "alias": "iconPrefixName"; "required": false; }; "iconSuffixName": { "alias": "iconSuffixName"; "required": false; }; "emitedChangedValue1": { "alias": "emitedChangedValue1"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "mapFn": { "alias": "mapFn"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; }, {}, never, never, true, never>;
89
90
  }
@@ -1,5 +1,6 @@
1
1
  import { DestroyRef, EventEmitter } from '@angular/core';
2
2
  import { ControlValueAccessorDirective } from '../control-value-accessor.directive';
3
+ import { InputFilterFn } from '../../../../directives/input-map-filter';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class InputNumberComponent<Type> extends ControlValueAccessorDirective<Type> {
5
6
  floatLabel: any;
@@ -10,6 +11,7 @@ export declare class InputNumberComponent<Type> extends ControlValueAccessorDire
10
11
  allowedPattern: string;
11
12
  destroyRef: DestroyRef;
12
13
  emitedChangedValue: EventEmitter<any>;
14
+ onlyNumbers: InputFilterFn;
13
15
  ngOnInit(): void;
14
16
  static ɵfac: i0.ɵɵFactoryDeclaration<InputNumberComponent<any>, never>;
15
17
  static ɵcmp: i0.ɵɵComponentDeclaration<InputNumberComponent<any>, "app-input-number", never, { "floatLabel": { "alias": "floatLabel"; "required": false; }; "className": { "alias": "className"; "required": false; }; "iconPrefixName": { "alias": "iconPrefixName"; "required": false; }; "iconSuffixName": { "alias": "iconSuffixName"; "required": false; }; "numberSuffixName": { "alias": "numberSuffixName"; "required": false; }; "allowedPattern": { "alias": "allowedPattern"; "required": false; }; }, { "emitedChangedValue": "emitedChangedValue"; }, never, never, true, never>;
@@ -1,10 +1,47 @@
1
1
  import { DestroyRef } from '@angular/core';
2
+ import { MatRadioChange } from '@angular/material/radio';
2
3
  import { ControlValueAccessorDirective } from '../control-value-accessor.directive';
3
4
  import * as i0 from "@angular/core";
5
+ /**
6
+ * Radio Component for selecting a single option from a list of options.
7
+ *
8
+ * Supports both Reactive Forms and Template-driven forms.
9
+ *
10
+ * Inputs:
11
+ * - `options`: Accepts an array of objects used as the selection list.
12
+ * - `displayedLabel`: Property name from the option object to display in the UI (default: `'description'`).
13
+ * - `key`: Property name from the option object used as the value (default: `'value'`).
14
+ * - `label`: Defines the label text shown above the radio buttons.
15
+ * - `isReadOnly`: Disables interaction and renders the component in a read-only display mode.
16
+ * - `mandatory`: Hides the "optional" label visually. Does not add validation.
17
+ * - `required`: Hides the "optional" label and also adds Angular's required validator.
18
+ * - `tooltip`: Displays a tooltip beside the label.
19
+ *
20
+ * Emits:
21
+ * - The selected value is emitted as an object with `key` and `value` properties:
22
+ * ```ts
23
+ * { key: option[key], value: option[displayedLabel] }
24
+ * ```
25
+ *
26
+ * Example usage:
27
+ * ```html
28
+ *<app-radio
29
+ * class="section-item"
30
+ * [isReadOnly]="isReadOnly"
31
+ * formControlName="radio"
32
+ * [options]="[]"
33
+ * label="Radio"
34
+ *>
35
+ *</app-radio>
36
+ * ```
37
+ */
4
38
  export declare class RadioComponent<Type> extends ControlValueAccessorDirective<Type> {
5
- options: any;
39
+ options: Array<Record<string, any>>;
40
+ displayedLabel: string;
41
+ key: string;
6
42
  destroyRef: DestroyRef;
7
43
  ngOnInit(): void;
44
+ onChange(event: MatRadioChange): void;
8
45
  static ɵfac: i0.ɵɵFactoryDeclaration<RadioComponent<any>, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent<any>, "app-radio", never, { "options": { "alias": "options"; "required": false; }; }, {}, never, never, true, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent<any>, "app-radio", never, { "options": { "alias": "options"; "required": false; }; "displayedLabel": { "alias": "displayedLabel"; "required": false; }; "key": { "alias": "key"; "required": false; }; }, {}, never, never, true, never>;
10
47
  }
@@ -9,11 +9,11 @@ export declare class SearchEmployeeComponent<Type> extends ControlValueAccessorD
9
9
  floatLabel: any;
10
10
  error: string;
11
11
  selected: boolean;
12
- selectedEmp: EventEmitter<any>;
13
- onInputChange: EventEmitter<any>;
12
+ /**
13
+ * Emits the full details of the selected employee.
14
+ */
15
+ selectedEmployee: EventEmitter<any>;
14
16
  showEdit: boolean;
15
- editDirectManger: EventEmitter<any>;
16
- deleteDirectManger: EventEmitter<any>;
17
17
  arrayList: any[];
18
18
  isUniqueUsers: boolean;
19
19
  userAlreadyExist: boolean;
@@ -26,7 +26,7 @@ export declare class SearchEmployeeComponent<Type> extends ControlValueAccessorD
26
26
  getImage(id: string): string;
27
27
  selectOption(object: any, ev: any): void;
28
28
  static ɵfac: i0.ɵɵFactoryDeclaration<SearchEmployeeComponent<any>, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<SearchEmployeeComponent<any>, "app-search-employee", never, { "valueName": { "alias": "valueName"; "required": false; }; "className": { "alias": "className"; "required": false; }; "optional": { "alias": "optional"; "required": false; }; "data": { "alias": "data"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "error": { "alias": "error"; "required": false; }; "showEdit": { "alias": "showEdit"; "required": false; }; "arrayList": { "alias": "arrayList"; "required": false; }; "isUniqueUsers": { "alias": "isUniqueUsers"; "required": false; }; }, { "selectedEmp": "selectedEmp"; "onInputChange": "onInputChange"; "editDirectManger": "editDirectManger"; "deleteDirectManger": "deleteDirectManger"; "emitedDeletedValue": "emitedDeletedValue"; }, never, never, true, never>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<SearchEmployeeComponent<any>, "app-search-employee", never, { "valueName": { "alias": "valueName"; "required": false; }; "className": { "alias": "className"; "required": false; }; "optional": { "alias": "optional"; "required": false; }; "data": { "alias": "data"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "error": { "alias": "error"; "required": false; }; "showEdit": { "alias": "showEdit"; "required": false; }; "arrayList": { "alias": "arrayList"; "required": false; }; "isUniqueUsers": { "alias": "isUniqueUsers"; "required": false; }; }, { "selectedEmployee": "selectedEmployee"; "emitedDeletedValue": "emitedDeletedValue"; }, never, never, true, never>;
30
30
  }
31
31
  export interface searchEmp {
32
32
  personName?: string;
@@ -5,11 +5,8 @@ import { FormLabelComponent } from "./form-label/form-label.component";
5
5
  import { ValidationErrorsComponent } from "./validation-errors/validation-errors.component";
6
6
  import { ReactiveFormsModule } from "@angular/forms";
7
7
  import { InfoItemComponent } from "./info-item/info-item.component";
8
- import { EnOnlyDirective } from "../../../directives/en.directive";
9
- import { ArOnlyDirective } from "../../../directives/ar.directive";
10
8
  import { NgClass } from "@angular/common";
11
9
  import { TranslatePipe } from "../../../pipes/translate.pipe";
12
10
  export declare const MatDatePickerImports: (typeof MatDatepickerInput | typeof MatDatepickerToggle | typeof MatDatepickerModule)[];
13
11
  export declare const MatFormImports: (typeof MatInput | typeof MatFormFieldModule | typeof MatFormField)[];
14
- export declare const Shareds: (typeof NgClass | typeof FormLabelComponent | typeof TranslatePipe | typeof ReactiveFormsModule | typeof ValidationErrorsComponent | typeof InfoItemComponent)[];
15
- export declare const TextLanguageDirectives: (typeof EnOnlyDirective | typeof ArOnlyDirective)[];
12
+ export declare const Shareds: (typeof NgClass | typeof ReactiveFormsModule | typeof TranslatePipe | typeof FormLabelComponent | typeof ValidationErrorsComponent | typeof InfoItemComponent)[];
@@ -1,12 +1,87 @@
1
1
  import { DestroyRef } from '@angular/core';
2
2
  import { ControlValueAccessorDirective } from '../control-value-accessor.directive';
3
+ import type { InputMapFn, InputFilterFn } from '../../../../directives/input-map-filter/types';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class TextareaComponent<Type> extends ControlValueAccessorDirective<Type> {
5
6
  className: string;
6
7
  preventSpecailChar: boolean;
7
8
  maxLength: number | string;
9
+ /**
10
+ * A mapping function that modifies the input value during typing, pasting, or dropping text.
11
+ * You can use it to modify the full input value **before it appears** (e.g., for auto-capitalization,
12
+ * formatting, or custom replacements).
13
+ *
14
+ * This function is called:
15
+ * - On each **key press**, to determine how the input value should change when a character is typed.
16
+ * - On **paste**, to transform the pasted content before it’s applied.
17
+ * - On **drop**, to transform the dropped text before it’s applied.
18
+ *
19
+ * **Built-in mappers are available via the `InputMappers` utility class:**
20
+ *
21
+ * - `InputMappers.toUpperCase` — Transforms all input to UPPERCASE.
22
+ * - `InputMappers.toLowerCase` — Transforms all input to lowercase.
23
+ *
24
+ * @param char - The character(s) being inserted. This is:
25
+ * - A single character (e.g., `'a'`) during typing.
26
+ * - The full pasted string during paste events.
27
+ * - The full dropped string during drop events.
28
+ * @param currentValue - The current value of the input **before** the change is applied.
29
+ * @param nextValue - The simulated value of the input **after** the character, paste, or drop is inserted, but before transformation.
30
+ *
31
+ * @returns The final string to use as the new input value.
32
+ *
33
+ * @example
34
+ * // Use a built-in mapper to force UPPERCASE input:
35
+ * this.mapFn = InputMappers.toUpperCase;
36
+ *
37
+ * @example
38
+ * // Custom mapper: Capitalize the first letter of each word
39
+ * this.mapFn = (char, current, next) =>
40
+ * typeof next === 'string' ? next.replace(/\b\w/g, c => c.toUpperCase()) : next;
41
+ */
42
+ mapFn: InputMapFn;
43
+ /**
44
+ * A filtering function that determines whether a character or string should be allowed into the input.
45
+ *
46
+ * This function is called during:
47
+ * - **Typing**: When a key is pressed to decide if the character should be accepted.
48
+ * - **Paste**: When text is pasted to decide if the entire pasted string should be accepted.
49
+ * - **Drop**: When text is dropped into the input to decide if it should be allowed.
50
+ *
51
+ * You can use it to reject unwanted characters (e.g. numbers, symbols) or block input entirely based
52
+ * on the current or predicted value.
53
+ *
54
+ * **Built-in filters are available via the `InputFilters` utility class:**
55
+ *
56
+ * - `InputFilters.arabicOnly` — Allows Arabic letters and digits, as well as common symbols.
57
+ * - `InputFilters.englishOnly` — Allows English letters and digits, as well as common symbols.
58
+ * - `InputFilters.digitsOnly` — Allows digits only (`0–9`), no letters or symbols.
59
+ * - You can also use `InputFilters.buildPattern()` to define a custom filter.
60
+ *
61
+ * @param char - The character(s) being inserted:
62
+ * - A single typed character (e.g., `'a'`) during key presses
63
+ * - The full pasted or dropped string during paste/drop
64
+ * @param currentValue - The current value of the input before the character or string is applied.
65
+ * @param nextValue - The simulated next value if the character or string were applied.
66
+ * @param event - The originating event triggering the input change. This can be a
67
+ * `KeyboardEvent` (for typing), `ClipboardEvent` (for paste), or `DragEvent` (for drop).
68
+ *
69
+ * @returns `true` to allow the input, or `false` to block it.
70
+ *
71
+ *
72
+ * @example
73
+ * // Use a built-in filter to restrict to digits only
74
+ * this.filterFn = InputFilters.digitsOnly;
75
+ *
76
+ * @example
77
+ * // Custom filter: Allow only letters (no numbers or symbols)
78
+ * this.filterFn = (char, current, next, event) => {
79
+ * return /^[a-zA-Z]+$/.test(char);
80
+ * };
81
+ */
82
+ filterFn: InputFilterFn;
8
83
  destroyRef: DestroyRef;
9
84
  ngOnInit(): void;
10
85
  static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent<any>, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent<any>, "app-textarea", never, { "className": { "alias": "className"; "required": false; }; "preventSpecailChar": { "alias": "preventSpecailChar"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; }, {}, never, never, true, never>;
86
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent<any>, "app-textarea", never, { "className": { "alias": "className"; "required": false; }; "preventSpecailChar": { "alias": "preventSpecailChar"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "mapFn": { "alias": "mapFn"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; }, {}, never, never, true, never>;
12
87
  }
@@ -4,13 +4,13 @@ import { MatDialog } from '@angular/material/dialog';
4
4
  import { MatPaginator, PageEvent } from '@angular/material/paginator';
5
5
  import { MatSort, Sort } from '@angular/material/sort';
6
6
  import { MatTableDataSource } from '@angular/material/table';
7
- import { TranslateService } from '@ngx-translate/core';
8
7
  import { ActionModel } from '../../../interfaces/action.interface';
9
8
  import { Actions } from '../../../enums/actions.enum';
9
+ import { CoreI18nService } from '../../../services';
10
10
  import * as i0 from "@angular/core";
11
11
  export declare class TableComponent implements OnInit {
12
12
  dialog: MatDialog;
13
- translateService: TranslateService;
13
+ i18Service: CoreI18nService;
14
14
  private fb;
15
15
  matTableRef: ElementRef;
16
16
  control: FormControl<any>;
@@ -51,7 +51,7 @@ export declare class TableComponent implements OnInit {
51
51
  currentPage: number;
52
52
  pageChange: EventEmitter<any>;
53
53
  form: FormGroup;
54
- constructor(dialog: MatDialog, translateService: TranslateService, fb: FormBuilder);
54
+ constructor(dialog: MatDialog, i18Service: CoreI18nService, fb: FormBuilder);
55
55
  set keyWord(value: string);
56
56
  _rows: any;
57
57
  get rows(): any;
@@ -19,6 +19,7 @@ export declare class InputFilters {
19
19
  * @returns `true` if the character is a digit; otherwise, `false`
20
20
  */
21
21
  static digitsOnly(char: string, current: string, next: string, event: KeyboardEvent | ClipboardEvent | DragEvent): boolean;
22
+ static decimalDigitsOnly(char: string, current: string, next: string, event: KeyboardEvent | ClipboardEvent | DragEvent): boolean;
22
23
  /**
23
24
  * Creates a new `PatternBuilder` instance for building a custom input filter.
24
25
  *
@@ -5,11 +5,14 @@ export declare class InputMapFilterDirective {
5
5
  private ngControl;
6
6
  mapFn: InputMapFn;
7
7
  filterFn: InputFilterFn;
8
+ maxLength: number | string;
8
9
  constructor(ngControl: NgControl);
9
10
  handleKeydown(event: KeyboardEvent): boolean;
10
11
  handlePaste(event: ClipboardEvent): void;
11
12
  handleDrop(event: DragEvent): void;
13
+ private shouldProceed;
14
+ private hasMaxLength;
12
15
  private updateValue;
13
16
  static ɵfac: i0.ɵɵFactoryDeclaration<InputMapFilterDirective, [{ optional: true; self: true; }]>;
14
- static ɵdir: i0.ɵɵDirectiveDeclaration<InputMapFilterDirective, "[inputMapFilter]", never, { "mapFn": { "alias": "mapFn"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; }, {}, never, never, true, never>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<InputMapFilterDirective, "[inputMapFilter]", never, { "mapFn": { "alias": "mapFn"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; }, {}, never, never, true, never>;
15
18
  }
@@ -2,7 +2,7 @@ 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, ValidatorFn } from "@angular/forms";
5
- import { InputMappers } from '../../components/shared-components/form-field/input/input-map-filter/input-mappers';
5
+ import { InputMappers } from '../../directives/input-map-filter/input-mappers';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class RequestDetailsSectionComponent implements OnInit {
8
8
  i18n: CoreI18nService;
@@ -15,7 +15,7 @@ export declare class RequestDetailsSectionComponent implements OnInit {
15
15
  isLoading: boolean;
16
16
  className: string;
17
17
  formGroup: FormGroup;
18
- options: string[];
18
+ options: any[];
19
19
  private readonly DEFAULT_PAGE_SIZE;
20
20
  private readonly DEFAULT_PAGE_NUMBER;
21
21
  pageNumber: number;
@@ -54,6 +54,10 @@ export declare class RequestDetailsSectionComponent implements OnInit {
54
54
  totalElements: number;
55
55
  constructor(i18n: CoreI18nService, fb: FormBuilder, actionStateService: ActionStateService);
56
56
  ngOnInit(): void;
57
+ radio: {
58
+ key: string;
59
+ value: string;
60
+ };
57
61
  timePicker: string;
58
62
  timePickerChange(e: any): void;
59
63
  initializeTableConfig(): void;
@@ -68,8 +72,9 @@ export declare class RequestDetailsSectionComponent implements OnInit {
68
72
  customCallSubmit(action: string): void;
69
73
  resetForm(): void;
70
74
  pageChanged(event: any): void;
71
- filterFn: import("../../components/shared-components").InputFilterFn;
75
+ filterFn: import("bpm-core").InputFilterFn;
72
76
  mapFn: typeof InputMappers.toUpperCase;
77
+ log(event: any): void;
73
78
  static ɵfac: i0.ɵɵFactoryDeclaration<RequestDetailsSectionComponent, never>;
74
79
  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>;
75
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpm-core",
3
- "version": "0.0.129",
3
+ "version": "0.0.130",
4
4
  "bin": {
5
5
  "bpm-core": "./cli/index.js"
6
6
  },
@@ -11,7 +11,12 @@
11
11
  "ngx-intl-tel-input-gg": "^1.0.12"
12
12
  },
13
13
  "dependencies": {
14
- "tslib": "^2.3.0"
14
+ "tslib": "^2.3.0",
15
+ "cheerio": "^1.1.2",
16
+ "prettier": "^3.6.2",
17
+ "change-case": "^5.4.4",
18
+ "ejs": "^3.1.10",
19
+ "commander": "^13.0.0"
15
20
  },
16
21
  "sideEffects": false,
17
22
  "module": "fesm2022/bpm-core.mjs",
package/public-api.d.ts CHANGED
@@ -12,4 +12,5 @@ export * from './lib/functions';
12
12
  export * from './lib/validators';
13
13
  export * from './lib/services';
14
14
  export * from './lib/regex';
15
+ export * from './lib/directives/input-map-filter';
15
16
  export declare const MY_LIB_CONFIG_TOKEN: InjectionToken<MyLibConfig>;
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class ArOnlyDirective {
3
- private specialKeys;
4
- constructor();
5
- regex: RegExp;
6
- onKeyDown(event: any): void;
7
- onPaste(event: any): void;
8
- onDrop(event: any): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<ArOnlyDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<ArOnlyDirective, "[arOnly]", never, {}, {}, never, never, true, never>;
11
- }
@@ -1,11 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class EnOnlyDirective {
3
- private specialKeys;
4
- constructor();
5
- regex: RegExp;
6
- onKeyDown(event: any): void;
7
- onPaste(event: any): void;
8
- onDrop(event: any): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<EnOnlyDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<EnOnlyDirective, "[enOnly]", never, {}, {}, never, never, true, never>;
11
- }
@@ -1,14 +0,0 @@
1
- import { ElementRef } from "@angular/core";
2
- import * as i0 from "@angular/core";
3
- export declare class NumberDirective {
4
- private el;
5
- decimals: number;
6
- constructor(el: ElementRef);
7
- private check;
8
- onKeyPress(event: KeyboardEvent): void;
9
- private run;
10
- onKeyDown(): void;
11
- onPaste(): void;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<NumberDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<NumberDirective, "[numberOnly]", never, { "decimals": { "alias": "decimals"; "required": false; }; }, {}, never, never, true, never>;
14
- }
File without changes