bpm-core 0.0.114 → 0.0.116

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.
@@ -2,7 +2,7 @@ import { CoreI18nService } from '../../../../services';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class FormLabelComponent {
4
4
  i18n: CoreI18nService;
5
- tooltip: any;
5
+ tooltip: string;
6
6
  label: string;
7
7
  optional: boolean;
8
8
  constructor(i18n: CoreI18nService);
@@ -24,3 +24,4 @@ export * from './radio/radio.component';
24
24
  export * from './doc-uploader/docs-uploader.component';
25
25
  export type { ErrorMsg } from './validation-errors/validation-error-messages';
26
26
  export { ValidationErrorsComponent } from './validation-errors/validation-errors.component';
27
+ export * from './multiselect/multiselect.component';
@@ -0,0 +1,59 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { MatSelectChange } from '@angular/material/select';
3
+ import { ControlValueAccessorDirective } from '../control-value-accessor.directive';
4
+ import * as i0 from "@angular/core";
5
+ interface KeyValuePair {
6
+ key: string;
7
+ value: string;
8
+ }
9
+ /**
10
+ * Multi-select dropdown component for selecting multiple options.
11
+ *
12
+ * Supports both Reactive Forms and Template-driven forms.
13
+ *
14
+ * Inputs:
15
+ * - `options`: Accepts an array of objects used as the selection list.
16
+ * - `displayedLabel`: Property name from the option object to display in the UI (default: `'description'`).
17
+ * - `key`: Property name from the option object used as the value (default: `'value'`).
18
+ * - `label`: Defines the label text shown above the multi-select field.
19
+ * - `placeholder`: Sets the placeholder text when no value is selected.
20
+ * - `isReadOnly`: Disables interaction and renders the component in a read-only display mode.
21
+ * - `mandatory`: Hides the "optional" label visually. Does not add validation.
22
+ * - `required`: Hides the "optional" label and also adds Angular's required validator.
23
+ * - `tooltip`: Displays a tooltip beside the label.
24
+ * - `loading`: Shows a loading spinner inside the dropdown when set to true.
25
+ * - `customErrorMessages`: Custom messages for validation errors.
26
+ *
27
+ * Emits:
28
+ * - The selected value is emitted as an array of objects:
29
+ * ```ts
30
+ * [{ key: option[key], value: option[displayedLabel] }, ...]
31
+ * ```
32
+ *
33
+ * Example usage:
34
+ * ```html
35
+ * <app-multiselect
36
+ * class="section-item"
37
+ * formControlName="multi"
38
+ * [options]="[]"
39
+ * label="Multi select"
40
+ * placeholder="Select from here"
41
+ * [isReadOnly]="false"
42
+ * [mandatory]="true"
43
+ * >
44
+ * </app-multiselect>
45
+ * ```
46
+ */
47
+ export declare class MultiselectComponent<Type> extends ControlValueAccessorDirective<Type> implements OnInit {
48
+ options: any[];
49
+ displayedLabel: string;
50
+ key: string;
51
+ private cdRef;
52
+ private destroyRef;
53
+ ngOnInit(): void;
54
+ selectionChange(event: MatSelectChange<any[]>): void;
55
+ mapKeyValuePairsToKeys(value: KeyValuePair[] | null): string[];
56
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiselectComponent<any>, never>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiselectComponent<any>, "app-multiselect", never, { "options": { "alias": "options"; "required": false; }; "displayedLabel": { "alias": "displayedLabel"; "required": false; }; "key": { "alias": "key"; "required": false; }; }, {}, never, never, true, never>;
58
+ }
59
+ export {};
@@ -9,7 +9,7 @@ import { EnOnlyDirective } from "../../../directives/en.directive";
9
9
  import { ArOnlyDirective } from "../../../directives/ar.directive";
10
10
  import { NgClass } from "@angular/common";
11
11
  import { TranslatePipe } from "../../../pipes/translate.pipe";
12
- export declare const MatDatePickerImports: (typeof MatDatepickerInput | typeof MatDatepickerToggle | typeof MatDatepickerModule)[];
13
- export declare const MatFormImports: (typeof MatInput | typeof MatFormFieldModule | typeof MatFormField)[];
14
- export declare const Shareds: (typeof NgClass | typeof ReactiveFormsModule | typeof TranslatePipe | typeof FormLabelComponent | typeof ValidationErrorsComponent | typeof InfoItemComponent)[];
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)[];
15
15
  export declare const TextLanguageDirectives: (typeof EnOnlyDirective | typeof ArOnlyDirective)[];
@@ -39,6 +39,10 @@ export declare function logFormStatus(formGroup: FormGroup): void;
39
39
  * A collection of custom validators for various data types.
40
40
  */
41
41
  export declare class DataValidators {
42
+ /**
43
+ * Validates that the control's value is the string 'true'
44
+ */
45
+ static checkboxRequired(control: AbstractControl): ValidationErrors | null;
42
46
  /**
43
47
  * Validates that the control's value is a valid employee object.
44
48
  */
@@ -1,7 +1,7 @@
1
1
  import { DestroyRef, OnInit } from '@angular/core';
2
2
  import { Form, Section } from "../../interfaces";
3
3
  import { ActionStateService, CoreI18nService } from "../../services";
4
- import { FormBuilder, FormGroup, ValidatorFn } from "@angular/forms";
4
+ import { FormBuilder, FormGroup, FormControl, ValidatorFn } from "@angular/forms";
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class RequestDetailsSectionComponent implements OnInit {
7
7
  i18n: CoreI18nService;
@@ -50,6 +50,10 @@ export declare class RequestDetailsSectionComponent implements OnInit {
50
50
  sumQuantity: number;
51
51
  __typename: string;
52
52
  }[];
53
+ multiData: {
54
+ description: string;
55
+ value: string;
56
+ }[];
53
57
  totalElements: number;
54
58
  constructor(i18n: CoreI18nService, fb: FormBuilder, actionStateService: ActionStateService);
55
59
  ngOnInit(): void;
@@ -57,16 +61,56 @@ export declare class RequestDetailsSectionComponent implements OnInit {
57
61
  initializeColumns(): void;
58
62
  initializeColumnConfig(): void;
59
63
  createForm(): void;
60
- textArea: string;
61
64
  editAsset(asset: any): void;
62
65
  startsWithDMOEOrCR(): ValidatorFn;
63
66
  deleteAsset(asset: any): void;
64
- log(d: any): void;
65
67
  formValue(form: any): void;
66
68
  checkValidity(action: string): boolean;
67
69
  customCallSubmit(action: string): void;
68
70
  resetForm(): void;
71
+ multi: {
72
+ key: string;
73
+ value: string;
74
+ }[];
69
75
  pageChanged(event: any): void;
76
+ countryControl: FormControl<any>;
77
+ skillsControl: FormControl<any[]>;
78
+ stateControl: FormControl<any>;
79
+ categoryControl: FormControl<any>;
80
+ priorityControl: FormControl<any>;
81
+ selectedCountry: string;
82
+ isLoadingCategories: boolean;
83
+ countryOptions: {
84
+ options: {
85
+ value: string;
86
+ description: string;
87
+ }[];
88
+ };
89
+ skillsOptions: {
90
+ options: {
91
+ value: string;
92
+ description: string;
93
+ }[];
94
+ };
95
+ stateOptions: {
96
+ options: {
97
+ value: string;
98
+ description: string;
99
+ parentValue: string;
100
+ }[];
101
+ };
102
+ priorityOptions: {
103
+ options: {
104
+ value: string;
105
+ description: string;
106
+ }[];
107
+ };
108
+ categoryOptions: {
109
+ options: any[];
110
+ };
111
+ onCountrySelected(event: any): void;
112
+ onSkillsSelected(values: string[]): void;
113
+ loadCategories(): void;
70
114
  static ɵfac: i0.ɵɵFactoryDeclaration<RequestDetailsSectionComponent, never>;
71
115
  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>;
72
116
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bpm-core",
3
- "version": "0.0.114",
3
+ "version": "0.0.116",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.0.0",
6
6
  "@angular/core": "^19.0.0",
@@ -1943,3 +1943,15 @@ mat-form-field.mat-mdc-form-field .mat-mdc-form-field-icon-suffix {
1943
1943
  mat-form-field.mat-mdc-form-field .mat-mdc-form-field-infix label {
1944
1944
  margin-bottom: 0 !important;
1945
1945
  }
1946
+
1947
+ .mdc-menu-surface .mdc-list-item .mat-pseudo-checkbox-checked:after,
1948
+ .mdc-menu-surface .mat-mdc-menu-item .mat-pseudo-checkbox-checked:after,
1949
+ .mat-mdc-menu-panel .mdc-list-item .mat-pseudo-checkbox-checked:after,
1950
+ .mat-mdc-menu-panel .mat-mdc-menu-item .mat-pseudo-checkbox-checked:after {
1951
+ color: var(--white);
1952
+ }
1953
+
1954
+
1955
+ .mat-primary {
1956
+ --mat-full-pseudo-checkbox-selected-icon-color: var(--purple);
1957
+ }
@@ -8,6 +8,9 @@ app-form-label {
8
8
  color: var(--dark);
9
9
  text-transform: initial;
10
10
  }
11
+ .optional-input {
12
+ margin-inline-start: 8px;
13
+ }
11
14
  }
12
15
 
13
16
  html mat-form-field.mat-mdc-form-field {