@masterteam/components 0.0.8 → 0.0.10

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 (60) hide show
  1. package/avatar/index.d.ts +20 -0
  2. package/avatar-text/index.d.ts +23 -0
  3. package/button-group/index.d.ts +8 -0
  4. package/card/index.d.ts +13 -0
  5. package/checkbox-field/index.d.ts +3 -2
  6. package/chip/index.d.ts +19 -0
  7. package/color-picker-field/index.d.ts +30 -0
  8. package/date-field/index.d.ts +2 -0
  9. package/editor-field/index.d.ts +30 -0
  10. package/fesm2022/masterteam-components-avatar-text.mjs +46 -0
  11. package/fesm2022/masterteam-components-avatar-text.mjs.map +1 -0
  12. package/fesm2022/masterteam-components-avatar.mjs +44 -0
  13. package/fesm2022/masterteam-components-avatar.mjs.map +1 -0
  14. package/fesm2022/masterteam-components-button-group.mjs +20 -0
  15. package/fesm2022/masterteam-components-button-group.mjs.map +1 -0
  16. package/fesm2022/masterteam-components-button.mjs +4 -4
  17. package/fesm2022/masterteam-components-button.mjs.map +1 -1
  18. package/fesm2022/masterteam-components-card.mjs +29 -0
  19. package/fesm2022/masterteam-components-card.mjs.map +1 -0
  20. package/fesm2022/masterteam-components-checkbox-field.mjs +10 -8
  21. package/fesm2022/masterteam-components-checkbox-field.mjs.map +1 -1
  22. package/fesm2022/masterteam-components-chip.mjs +37 -0
  23. package/fesm2022/masterteam-components-chip.mjs.map +1 -0
  24. package/fesm2022/masterteam-components-color-picker-field.mjs +76 -0
  25. package/fesm2022/masterteam-components-color-picker-field.mjs.map +1 -0
  26. package/fesm2022/masterteam-components-date-field.mjs +9 -6
  27. package/fesm2022/masterteam-components-date-field.mjs.map +1 -1
  28. package/fesm2022/masterteam-components-editor-field.mjs +87 -0
  29. package/fesm2022/masterteam-components-editor-field.mjs.map +1 -0
  30. package/fesm2022/masterteam-components-field-validation.mjs +78 -113
  31. package/fesm2022/masterteam-components-field-validation.mjs.map +1 -1
  32. package/fesm2022/masterteam-components-icon-field.mjs +9 -6
  33. package/fesm2022/masterteam-components-icon-field.mjs.map +1 -1
  34. package/fesm2022/masterteam-components-list.mjs +31 -0
  35. package/fesm2022/masterteam-components-list.mjs.map +1 -0
  36. package/fesm2022/masterteam-components-multi-select-field.mjs +9 -6
  37. package/fesm2022/masterteam-components-multi-select-field.mjs.map +1 -1
  38. package/fesm2022/masterteam-components-number-field.mjs +9 -6
  39. package/fesm2022/masterteam-components-number-field.mjs.map +1 -1
  40. package/fesm2022/masterteam-components-select-field.mjs +9 -7
  41. package/fesm2022/masterteam-components-select-field.mjs.map +1 -1
  42. package/fesm2022/masterteam-components-slider-field.mjs +9 -6
  43. package/fesm2022/masterteam-components-slider-field.mjs.map +1 -1
  44. package/fesm2022/masterteam-components-text-field.mjs +8 -6
  45. package/fesm2022/masterteam-components-text-field.mjs.map +1 -1
  46. package/fesm2022/masterteam-components-textarea-field.mjs +9 -6
  47. package/fesm2022/masterteam-components-textarea-field.mjs.map +1 -1
  48. package/fesm2022/masterteam-components.mjs +23 -1
  49. package/fesm2022/masterteam-components.mjs.map +1 -1
  50. package/field-validation/index.d.ts +3 -3
  51. package/icon-field/index.d.ts +3 -1
  52. package/index.d.ts +19 -4
  53. package/list/index.d.ts +18 -0
  54. package/multi-select-field/index.d.ts +2 -0
  55. package/number-field/index.d.ts +2 -0
  56. package/package.json +52 -18
  57. package/select-field/index.d.ts +2 -0
  58. package/slider-field/index.d.ts +2 -0
  59. package/text-field/index.d.ts +2 -0
  60. package/textarea-field/index.d.ts +2 -0
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _angular_core from '@angular/core';
2
- import { ValidatorFn } from '@angular/forms';
2
+ import { AbstractControl, ValidatorFn } from '@angular/forms';
3
3
 
4
4
  declare function provideMTComponents(): _angular_core.EnvironmentProviders;
5
5
 
@@ -15,7 +15,9 @@ type TailwindColorPalette = {
15
15
  */
16
16
  declare function generateTailwindPalette(primaryColor500: string): TailwindColorPalette;
17
17
 
18
- type FieldType = 'text' | 'textarea' | 'select' | 'date' | 'number' | 'slider' | 'multi-select' | 'checkbox' | string;
18
+ declare function isInvalid(control: AbstractControl | null): boolean;
19
+
20
+ type FieldType = 'text' | 'textarea' | 'select' | 'date' | 'number' | 'slider' | 'multi-select' | 'checkbox' | 'icon-field' | 'color-picker' | string;
19
21
  type ValidatorType = 'required' | 'email' | 'minLength' | 'maxLength' | 'min' | 'max' | 'pattern' | 'custom';
20
22
  declare class ValidatorConfig {
21
23
  type: ValidatorType;
@@ -231,8 +233,21 @@ declare class CheckboxFieldConfig extends BaseFieldConfig {
231
233
  checkboxIcon?: string;
232
234
  });
233
235
  }
236
+ declare class ColorPickerFieldConfig extends BaseFieldConfig {
237
+ format?: 'hex' | 'rgb' | 'hsb';
238
+ inline?: boolean;
239
+ appendTo?: any;
240
+ constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {
241
+ format?: 'hex' | 'rgb' | 'hsb';
242
+ inline?: boolean;
243
+ appendTo?: any;
244
+ });
245
+ }
246
+ declare class IconFieldConfig extends BaseFieldConfig {
247
+ constructor(config: Omit<BaseFieldConstructorConfig, 'type'> & {});
248
+ }
234
249
  type DynamicFieldConfig = {
235
- [K in keyof (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & CheckboxFieldConfig & BaseFieldConfig)]?: (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & CheckboxFieldConfig & BaseFieldConfig)[K];
250
+ [K in keyof (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & CheckboxFieldConfig & ColorPickerFieldConfig & IconFieldConfig & BaseFieldConfig)]?: (TextFieldConfig & TextareaFieldConfig & SelectFieldConfig & DateFieldConfig & NumberFieldConfig & SliderFieldConfig & MultiSelectFieldConfig & CheckboxFieldConfig & ColorPickerFieldConfig & IconFieldConfig & BaseFieldConfig)[K];
236
251
  };
237
252
  interface LayoutConfig {
238
253
  containerClass?: string;
@@ -256,5 +271,5 @@ interface SectionConfig {
256
271
  declare function createCustomValidator(customValidator: (value: any) => boolean | Promise<boolean>, message?: string): ValidatorFn;
257
272
  declare function wrapValidatorWithMessage(validator: ValidatorFn, errorKey: string, message: string): ValidatorFn;
258
273
 
259
- export { BaseFieldConfig, CheckboxFieldConfig, DateFieldConfig, MultiSelectFieldConfig, NumberFieldConfig, SelectFieldConfig, SliderFieldConfig, TextFieldConfig, TextareaFieldConfig, ValidatorConfig, createCustomValidator, generateTailwindPalette, provideMTComponents, wrapValidatorWithMessage };
274
+ export { BaseFieldConfig, CheckboxFieldConfig, ColorPickerFieldConfig, DateFieldConfig, IconFieldConfig, MultiSelectFieldConfig, NumberFieldConfig, SelectFieldConfig, SliderFieldConfig, TextFieldConfig, TextareaFieldConfig, ValidatorConfig, createCustomValidator, generateTailwindPalette, isInvalid, provideMTComponents, wrapValidatorWithMessage };
260
275
  export type { BaseFieldConstructorConfig, DynamicFieldConfig, DynamicFormConfig, FieldType, LayoutConfig, SectionConfig, ValidatorType };
@@ -0,0 +1,18 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { TemplateRef } from '@angular/core';
3
+
4
+ interface ListItem {
5
+ [key: string]: any;
6
+ }
7
+ declare class List {
8
+ data: _angular_core.InputSignal<ListItem[]>;
9
+ separated: _angular_core.InputSignalWithTransform<boolean, unknown>;
10
+ itemTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
11
+ template: _angular_core.InputSignal<TemplateRef<any> | null>;
12
+ effectiveTemplate: _angular_core.Signal<TemplateRef<any> | null>;
13
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<List, never>;
14
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<List, "mt-list", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "separated": { "alias": "separated"; "required": false; "isSignal": true; }; "template": { "alias": "template"; "required": false; "isSignal": true; }; }, {}, ["itemTemplate"], never, true, never>;
15
+ }
16
+
17
+ export { List };
18
+ export type { ListItem };
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
3
3
  import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
4
4
  import { MultiSelect } from 'primeng/multiselect';
5
+ import { isInvalid } from '@masterteam/components';
5
6
 
6
7
  declare class MultiSelectField implements ControlValueAccessor, OnInit, OnChanges {
7
8
  multiSelect: MultiSelect;
@@ -27,6 +28,7 @@ declare class MultiSelectField implements ControlValueAccessor, OnInit, OnChange
27
28
  onTouched: () => void;
28
29
  onModelChange: (value: any) => void;
29
30
  ngControl: NgControl;
31
+ isInvalid: typeof isInvalid;
30
32
  constructor();
31
33
  applyInputsToMultiSelect(): void;
32
34
  ngOnInit(): void;
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
3
3
  import { ControlValueAccessor, NgControl, Validators } from '@angular/forms';
4
4
  import { InputNumber } from 'primeng/inputnumber';
5
+ import { isInvalid } from '@masterteam/components';
5
6
 
6
7
  declare class NumberField implements ControlValueAccessor, OnInit, OnChanges {
7
8
  inputNumber: InputNumber;
@@ -17,6 +18,7 @@ declare class NumberField implements ControlValueAccessor, OnInit, OnChanges {
17
18
  readonly max: _angular_core.InputSignal<number>;
18
19
  styleClass: string;
19
20
  ngControl: NgControl;
21
+ isInvalid: typeof isInvalid;
20
22
  requiredValidator: typeof Validators.required;
21
23
  value: _angular_core.WritableSignal<number | null>;
22
24
  disabled: _angular_core.WritableSignal<boolean>;
package/package.json CHANGED
@@ -1,21 +1,23 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "publishConfig": {
5
5
  "directory": ".",
6
6
  "linkDirectory": false,
7
7
  "access": "public"
8
8
  },
9
9
  "peerDependencies": {
10
- "@angular/common": "^20.1.0",
11
- "@angular/core": "^20.1.0",
12
- "@angular/forms": "^20.1.0",
10
+ "@angular/common": "^20.1.3",
11
+ "@angular/core": "^20.1.3",
12
+ "@angular/forms": "^20.1.3",
13
13
  "@primeuix/themes": "^1.2.1",
14
14
  "@tailwindcss/postcss": "^4.1.11",
15
15
  "postcss": "^8.5.6",
16
- "primeng": "20.0.0-rc.3",
16
+ "primeng": "^20.0.0",
17
17
  "tailwindcss": "^4.1.11",
18
- "tailwindcss-primeui": "^0.6.1"
18
+ "tailwindcss-primeui": "^0.6.1",
19
+ "ngx-quill": "^28.0.0",
20
+ "quill": "^2.0.0"
19
21
  },
20
22
  "dependencies": {
21
23
  "tslib": "^2.3.0",
@@ -36,42 +38,74 @@
36
38
  "types": "./index.d.ts",
37
39
  "default": "./fesm2022/masterteam-components.mjs"
38
40
  },
39
- "./checkbox-field": {
40
- "types": "./checkbox-field/index.d.ts",
41
- "default": "./fesm2022/masterteam-components-checkbox-field.mjs"
41
+ "./avatar": {
42
+ "types": "./avatar/index.d.ts",
43
+ "default": "./fesm2022/masterteam-components-avatar.mjs"
42
44
  },
43
45
  "./button": {
44
46
  "types": "./button/index.d.ts",
45
47
  "default": "./fesm2022/masterteam-components-button.mjs"
46
48
  },
47
- "./field-validation": {
48
- "types": "./field-validation/index.d.ts",
49
- "default": "./fesm2022/masterteam-components-field-validation.mjs"
49
+ "./button-group": {
50
+ "types": "./button-group/index.d.ts",
51
+ "default": "./fesm2022/masterteam-components-button-group.mjs"
52
+ },
53
+ "./card": {
54
+ "types": "./card/index.d.ts",
55
+ "default": "./fesm2022/masterteam-components-card.mjs"
56
+ },
57
+ "./avatar-text": {
58
+ "types": "./avatar-text/index.d.ts",
59
+ "default": "./fesm2022/masterteam-components-avatar-text.mjs"
60
+ },
61
+ "./checkbox-field": {
62
+ "types": "./checkbox-field/index.d.ts",
63
+ "default": "./fesm2022/masterteam-components-checkbox-field.mjs"
64
+ },
65
+ "./chip": {
66
+ "types": "./chip/index.d.ts",
67
+ "default": "./fesm2022/masterteam-components-chip.mjs"
68
+ },
69
+ "./color-picker-field": {
70
+ "types": "./color-picker-field/index.d.ts",
71
+ "default": "./fesm2022/masterteam-components-color-picker-field.mjs"
50
72
  },
51
73
  "./date-field": {
52
74
  "types": "./date-field/index.d.ts",
53
75
  "default": "./fesm2022/masterteam-components-date-field.mjs"
54
76
  },
77
+ "./field-validation": {
78
+ "types": "./field-validation/index.d.ts",
79
+ "default": "./fesm2022/masterteam-components-field-validation.mjs"
80
+ },
81
+ "./editor-field": {
82
+ "types": "./editor-field/index.d.ts",
83
+ "default": "./fesm2022/masterteam-components-editor-field.mjs"
84
+ },
55
85
  "./icon-field": {
56
86
  "types": "./icon-field/index.d.ts",
57
87
  "default": "./fesm2022/masterteam-components-icon-field.mjs"
58
88
  },
59
- "./multi-select-field": {
60
- "types": "./multi-select-field/index.d.ts",
61
- "default": "./fesm2022/masterteam-components-multi-select-field.mjs"
89
+ "./list": {
90
+ "types": "./list/index.d.ts",
91
+ "default": "./fesm2022/masterteam-components-list.mjs"
62
92
  },
63
93
  "./number-field": {
64
94
  "types": "./number-field/index.d.ts",
65
95
  "default": "./fesm2022/masterteam-components-number-field.mjs"
66
96
  },
67
- "./slider-field": {
68
- "types": "./slider-field/index.d.ts",
69
- "default": "./fesm2022/masterteam-components-slider-field.mjs"
97
+ "./multi-select-field": {
98
+ "types": "./multi-select-field/index.d.ts",
99
+ "default": "./fesm2022/masterteam-components-multi-select-field.mjs"
70
100
  },
71
101
  "./select-field": {
72
102
  "types": "./select-field/index.d.ts",
73
103
  "default": "./fesm2022/masterteam-components-select-field.mjs"
74
104
  },
105
+ "./slider-field": {
106
+ "types": "./slider-field/index.d.ts",
107
+ "default": "./fesm2022/masterteam-components-slider-field.mjs"
108
+ },
75
109
  "./text-field": {
76
110
  "types": "./text-field/index.d.ts",
77
111
  "default": "./fesm2022/masterteam-components-text-field.mjs"
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnChanges, ChangeDetectorRef, EventEmitter, SimpleChanges } from '@angular/core';
3
3
  import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
4
4
  import { Select } from 'primeng/select';
5
+ import { isInvalid } from '@masterteam/components';
5
6
 
6
7
  declare class SelectField implements ControlValueAccessor, OnInit, OnChanges {
7
8
  cdr: ChangeDetectorRef;
@@ -29,6 +30,7 @@ declare class SelectField implements ControlValueAccessor, OnInit, OnChanges {
29
30
  onTouched: () => void;
30
31
  onModelChange: (value: any) => void;
31
32
  ngControl: NgControl;
33
+ isInvalid: typeof isInvalid;
32
34
  constructor();
33
35
  applyInputsToDropdown(): void;
34
36
  ngOnInit(): void;
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
3
3
  import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
4
4
  import { Slider, SliderChangeEvent, SliderSlideEndEvent } from 'primeng/slider';
5
+ import { isInvalid } from '@masterteam/components';
5
6
 
6
7
  declare class SliderField implements ControlValueAccessor, OnInit, OnChanges {
7
8
  input: Slider;
@@ -25,6 +26,7 @@ declare class SliderField implements ControlValueAccessor, OnInit, OnChanges {
25
26
  onTouched: () => void;
26
27
  onModelChange: (value: number | null) => void;
27
28
  ngControl: NgControl;
29
+ isInvalid: typeof isInvalid;
28
30
  constructor();
29
31
  applyInputsToInput(): void;
30
32
  ngOnInit(): void;
@@ -2,6 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
3
3
  import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
4
4
  import { KeyFilterPattern } from 'primeng/keyfilter';
5
+ import { isInvalid } from '@masterteam/components';
5
6
 
6
7
  declare class TextField implements ControlValueAccessor, OnInit, OnChanges {
7
8
  inputText: HTMLInputElement;
@@ -22,6 +23,7 @@ declare class TextField implements ControlValueAccessor, OnInit, OnChanges {
22
23
  onTouched: () => void;
23
24
  onModelChange: (value: any) => void;
24
25
  ngControl: NgControl | null;
26
+ isInvalid: typeof isInvalid;
25
27
  constructor();
26
28
  ngOnInit(): void;
27
29
  applyInputsToInputText(): void;
@@ -1,6 +1,7 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnInit, OnChanges, SimpleChanges } from '@angular/core';
3
3
  import { ControlValueAccessor, Validators, NgControl } from '@angular/forms';
4
+ import { isInvalid } from '@masterteam/components';
4
5
 
5
6
  declare class TextareaField implements ControlValueAccessor, OnInit, OnChanges {
6
7
  textarea: HTMLTextAreaElement;
@@ -19,6 +20,7 @@ declare class TextareaField implements ControlValueAccessor, OnInit, OnChanges {
19
20
  onTouched: () => void;
20
21
  onModelChange: (value: string | null) => void;
21
22
  ngControl: NgControl;
23
+ isInvalid: typeof isInvalid;
22
24
  constructor();
23
25
  applyInputsToTextarea(): void;
24
26
  ngOnInit(): void;