@ieeesa-npm/presentation 0.13.4 → 0.13.5

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.
@@ -183,6 +183,14 @@ export declare class ChipsComponent implements OnInit, OnDestroy {
183
183
  timePicker: {
184
184
  defaultTimeFormat: number;
185
185
  };
186
+ colorPicker: {
187
+ selectLabel: string;
188
+ cancelLabel: string;
189
+ defaultColor: string;
190
+ ariaLabel: string;
191
+ ariaDescription: string;
192
+ ariaDescribedById: string;
193
+ };
186
194
  };
187
195
  chipsType: typeof ChipsType;
188
196
  orientations: typeof ChipOrientation;
@@ -0,0 +1,64 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { NgxColorsTriggerDirective } from 'ngx-colors';
3
+ import { FormGroup } from '@angular/forms';
4
+ import { ColorFormat, ColorsAnimation } from '../../models/color-format.model';
5
+ import { FieldConfig } from '../../models/field-config.model';
6
+ import { FormUtilityService } from '../../services/form-utility.service';
7
+ import * as i0 from "@angular/core";
8
+ export declare class ColorPickerComponent implements OnInit {
9
+ private formUtilityService;
10
+ colorPickerDirective: NgxColorsTriggerDirective;
11
+ colorPickerTexts: any;
12
+ group: FormGroup;
13
+ config: FieldConfig;
14
+ colorPickerChange: EventEmitter<string>;
15
+ colorPickerSliderChange: EventEmitter<string>;
16
+ defaultColor: string;
17
+ canShowPalette: boolean;
18
+ palette: string[];
19
+ overlayClassName: string;
20
+ colorFormat: ColorFormat;
21
+ colorAnimation: ColorsAnimation;
22
+ formControlName: string;
23
+ paletteSelectLabel: any;
24
+ paletteCancelLabel: any;
25
+ colorPickerLabel: string;
26
+ isColorCodeLabelNeeded: boolean;
27
+ isArrowIconNeeded: boolean;
28
+ canHideTextInput: boolean;
29
+ canHideColorPicker: boolean;
30
+ constructor(formUtilityService: FormUtilityService);
31
+ ngOnInit(): void;
32
+ /**
33
+ * Sets the color to form group control.
34
+ * @memberof ColorPickerComponent
35
+ * @param {string} color
36
+ * @returns {void}
37
+ */
38
+ inputChange(color: string): void;
39
+ /**
40
+ * Sets canShowPalette to true when the palette is opened.
41
+ * @memberof ColorPickerComponent
42
+ * @returns {void}
43
+ */
44
+ onOpenPalette(): void;
45
+ /**
46
+ * Sets canShowPalette to false when the palette is closed.
47
+ * @memberof ColorPickerComponent
48
+ * @returns {void}
49
+ */
50
+ onClosePalette(): void;
51
+ /**
52
+ * Gets triggered when the the alpha, hue or Lightness sliders are changed
53
+ * @param {string} color
54
+ */
55
+ onSliderChange(color: string): void;
56
+ /**
57
+ * Toggles the palette panel.
58
+ * @memberof ColorPickerComponent
59
+ * @returns {void}
60
+ */
61
+ togglePalette(): void;
62
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColorPickerComponent, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColorPickerComponent, "ieeesa-color-picker", never, { "defaultColor": { "alias": "defaultColor"; "required": false; }; "palette": { "alias": "palette"; "required": false; }; "overlayClassName": { "alias": "overlayClassName"; "required": false; }; "colorFormat": { "alias": "colorFormat"; "required": false; }; "colorAnimation": { "alias": "colorAnimation"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "paletteSelectLabel": { "alias": "paletteSelectLabel"; "required": false; }; "paletteCancelLabel": { "alias": "paletteCancelLabel"; "required": false; }; "colorPickerLabel": { "alias": "colorPickerLabel"; "required": false; }; "isColorCodeLabelNeeded": { "alias": "isColorCodeLabelNeeded"; "required": false; }; "isArrowIconNeeded": { "alias": "isArrowIconNeeded"; "required": false; }; "canHideTextInput": { "alias": "canHideTextInput"; "required": false; }; "canHideColorPicker": { "alias": "canHideColorPicker"; "required": false; }; }, { "colorPickerChange": "colorPickerChange"; "colorPickerSliderChange": "colorPickerSliderChange"; }, never, never, true, never>;
64
+ }
@@ -0,0 +1,9 @@
1
+ export declare enum ColorFormat {
2
+ hex = "hex",
3
+ rgba = "rgba",
4
+ hsla = "hsla"
5
+ }
6
+ export declare enum ColorsAnimation {
7
+ popup = "popup",
8
+ slidein = "slide-in"
9
+ }
@@ -7,6 +7,7 @@ import { SelectOption } from '../models/select-option.model';
7
7
  import { AutoCompleteOption } from '../models/autocomplete-option.model';
8
8
  import { LinkType } from './link-type.model';
9
9
  import { SlideToggleOption } from './slide-toggle-options.model';
10
+ import { ColorFormat, ColorsAnimation } from './color-format.model';
10
11
  export interface FieldConfig {
11
12
  isSortNeeded?: boolean;
12
13
  disabled?: boolean;
@@ -60,4 +61,15 @@ export interface FieldConfig {
60
61
  linkType?: LinkType;
61
62
  slideToggleOption?: SlideToggleOption;
62
63
  invalidDateRangeErrorMessage?: string;
64
+ palette?: string[];
65
+ defaultColor?: string;
66
+ colorFormat?: ColorFormat;
67
+ overlayClassName?: string;
68
+ colorAnimation?: ColorsAnimation;
69
+ paletteSelectLabel?: string;
70
+ paletteCancelLabel?: string;
71
+ isColorCodeLabelNeeded?: boolean;
72
+ isArrowIconNeeded?: boolean;
73
+ canHideColorPicker?: boolean;
74
+ canHideTextInput?: boolean;
63
75
  }
@@ -9,5 +9,6 @@ export declare enum FormControlType {
9
9
  AUTO_COMPLETE = "AUTO_COMPLETE",
10
10
  ADD_FORM_GROUP = "ADD_FORM_GROUP",
11
11
  TIME_PICKER = "TIME_PICKER",
12
- SLIDE_TOGGLE = "SLIDE_TOGGLE"
12
+ SLIDE_TOGGLE = "SLIDE_TOGGLE",
13
+ COLOR_PICKER = "COLOR_PICKER"
13
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ieeesa-npm/presentation",
3
- "version": "0.13.4",
3
+ "version": "0.13.5",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.1.0",
6
6
  "@angular/core": "^16.1.0",
@@ -18,7 +18,8 @@
18
18
  "moment": "^2.29.4",
19
19
  "rxjs": "~7.8.0",
20
20
  "zone.js": "~0.13.0",
21
- "ngx-material-timepicker": "^13.1.1"
21
+ "ngx-material-timepicker": "^13.1.1",
22
+ "ngx-colors": "^3.5.3"
22
23
  },
23
24
  "dependencies": {
24
25
  "tslib": "^2.3.0"
package/public-api.d.ts CHANGED
@@ -31,6 +31,7 @@ export * from './lib/components/time-picker/time-picker.component';
31
31
  export * from './lib/components/tabs/tabs.component';
32
32
  export * from './lib/components/slide-toggle/slide-toggle.component';
33
33
  export * from './lib/components/card/card.component';
34
+ export * from './lib/components/color-picker/color-picker.component';
34
35
  export * from './lib/directives/dynamic-form-field/dynamic-form-field.directive';
35
36
  export * from './lib/directives/focus-invalid-form-field/focus-invalid-form-field.directive';
36
37
  export * from './lib/directives/set-background/set-background.directive';
@@ -75,6 +76,7 @@ export * from './lib/models/slide-toggle-options.model';
75
76
  export * from './lib/models/button-type.model';
76
77
  export * from './lib/models/card-button.model';
77
78
  export * from './lib/models/card-info.model';
79
+ export * from './lib/models/color-format.model';
78
80
  export * from './lib/services/datepicker.service';
79
81
  export * from './lib/services/form-utility.service';
80
82
  export * from './lib/presentation.module';
@@ -244,5 +244,13 @@
244
244
  "defaultWelcomeBgColor": "#C0DCED",
245
245
  "timePicker": {
246
246
  "defaultTimeFormat": 12
247
+ },
248
+ "colorPicker": {
249
+ "selectLabel": "Select",
250
+ "cancelLabel": "Cancel",
251
+ "defaultColor": "#F4F3F3",
252
+ "ariaLabel": "Color Picker",
253
+ "ariaDescription": "Choose background color.",
254
+ "ariaDescribedById": "ariaColorPicker"
247
255
  }
248
256
  }