@klippa/ngx-enhancy-forms 14.6.2 → 16.0.2

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 (74) hide show
  1. package/{esm2020 → esm2022}/lib/elements/button/button.component.mjs +4 -4
  2. package/{esm2020 → esm2022}/lib/elements/checkbox/checkbox.component.mjs +4 -4
  3. package/{esm2020 → esm2022}/lib/elements/date-picker/date-picker.component.mjs +4 -4
  4. package/{esm2020 → esm2022}/lib/elements/date-time-picker/date-time-picker.component.mjs +13 -13
  5. package/{esm2020 → esm2022}/lib/elements/email/email-input.component.mjs +4 -4
  6. package/{esm2020 → esm2022}/lib/elements/file-input/file-input.component.mjs +5 -5
  7. package/{esm2020 → esm2022}/lib/elements/hour-minute-input/hour-minute-input.component.mjs +4 -4
  8. package/{esm2020 → esm2022}/lib/elements/loading-indicator/loading-indicator.component.mjs +4 -4
  9. package/{esm2020 → esm2022}/lib/elements/number-input/number-input.component.mjs +4 -4
  10. package/{esm2020 → esm2022}/lib/elements/password-field/password-field.component.mjs +4 -4
  11. package/esm2022/lib/elements/radio/radio.component.mjs +30 -0
  12. package/{esm2020 → esm2022}/lib/elements/select/select-footer/select-footer.component.mjs +4 -4
  13. package/esm2022/lib/elements/select/select.component.mjs +138 -0
  14. package/{esm2020 → esm2022}/lib/elements/sortable-grouped-items/sortable-grouped-items.component.mjs +4 -4
  15. package/esm2022/lib/elements/sortable-items/sortable-items.component.mjs +86 -0
  16. package/esm2022/lib/elements/text-input/text-input.component.mjs +31 -0
  17. package/{esm2020 → esm2022}/lib/elements/toggle/toggle.component.mjs +4 -4
  18. package/{esm2020 → esm2022}/lib/elements/value-accessor-base/multiple-value-accessor-base.component.mjs +4 -4
  19. package/{esm2020 → esm2022}/lib/elements/value-accessor-base/value-accessor-base.component.mjs +4 -4
  20. package/{esm2020 → esm2022}/lib/form/form-caption/form-caption.component.mjs +4 -4
  21. package/esm2022/lib/form/form-element/form-element.component.mjs +122 -0
  22. package/{esm2020 → esm2022}/lib/form/form-error/form-error.component.mjs +4 -4
  23. package/{esm2020 → esm2022}/lib/form/form-submit-button/form-submit-button.component.mjs +7 -7
  24. package/{esm2020 → esm2022}/lib/form/form.component.mjs +7 -7
  25. package/esm2022/lib/material.module.mjs +22 -0
  26. package/{esm2020 → esm2022}/lib/ngx-enhancy-forms.module.mjs +67 -67
  27. package/{esm2020 → esm2022}/lib/util/arrays.mjs +2 -2
  28. package/{fesm2020 → fesm2022}/klippa-ngx-enhancy-forms.mjs +193 -274
  29. package/fesm2022/klippa-ngx-enhancy-forms.mjs.map +1 -0
  30. package/lib/elements/button/button.component.d.ts +1 -1
  31. package/lib/elements/checkbox/checkbox.component.d.ts +1 -1
  32. package/lib/elements/date-picker/date-picker.component.d.ts +1 -1
  33. package/lib/elements/date-time-picker/date-time-picker.component.d.ts +1 -1
  34. package/lib/elements/email/email-input.component.d.ts +1 -1
  35. package/lib/elements/file-input/file-input.component.d.ts +1 -1
  36. package/lib/elements/hour-minute-input/hour-minute-input.component.d.ts +1 -1
  37. package/lib/elements/loading-indicator/loading-indicator.component.d.ts +1 -1
  38. package/lib/elements/number-input/number-input.component.d.ts +1 -1
  39. package/lib/elements/password-field/password-field.component.d.ts +1 -1
  40. package/lib/elements/radio/radio.component.d.ts +3 -4
  41. package/lib/elements/select/select-footer/select-footer.component.d.ts +1 -1
  42. package/lib/elements/select/select.component.d.ts +7 -18
  43. package/lib/elements/sortable-grouped-items/sortable-grouped-items.component.d.ts +1 -1
  44. package/lib/elements/sortable-items/sortable-items.component.d.ts +1 -1
  45. package/lib/elements/text-input/text-input.component.d.ts +1 -3
  46. package/lib/elements/toggle/toggle.component.d.ts +1 -1
  47. package/lib/elements/value-accessor-base/multiple-value-accessor-base.component.d.ts +1 -1
  48. package/lib/elements/value-accessor-base/value-accessor-base.component.d.ts +1 -1
  49. package/lib/form/form-caption/form-caption.component.d.ts +1 -1
  50. package/lib/form/form-element/form-element.component.d.ts +2 -2
  51. package/lib/form/form-error/form-error.component.d.ts +1 -1
  52. package/lib/form/form-submit-button/form-submit-button.component.d.ts +1 -1
  53. package/lib/form/form.component.d.ts +2 -2
  54. package/lib/material.module.d.ts +4 -4
  55. package/lib/ngx-enhancy-forms.module.d.ts +1 -1
  56. package/lib/types.d.ts +3 -3
  57. package/package.json +8 -14
  58. package/esm2020/lib/elements/radio/radio.component.mjs +0 -31
  59. package/esm2020/lib/elements/select/select.component.mjs +0 -225
  60. package/esm2020/lib/elements/sortable-items/sortable-items.component.mjs +0 -70
  61. package/esm2020/lib/elements/text-input/text-input.component.mjs +0 -37
  62. package/esm2020/lib/form/form-element/form-element.component.mjs +0 -124
  63. package/esm2020/lib/material.module.mjs +0 -22
  64. package/fesm2015/klippa-ngx-enhancy-forms.mjs +0 -2147
  65. package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +0 -1
  66. package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +0 -1
  67. package/src/lib/form/README.md +0 -1
  68. /package/{esm2020 → esm2022}/klippa-ngx-enhancy-forms.mjs +0 -0
  69. /package/{esm2020 → esm2022}/lib/types.mjs +0 -0
  70. /package/{esm2020 → esm2022}/lib/util/objects.mjs +0 -0
  71. /package/{esm2020 → esm2022}/lib/util/values.mjs +0 -0
  72. /package/{esm2020 → esm2022}/lib/validators/dateValidator.mjs +0 -0
  73. /package/{esm2020 → esm2022}/lib/validators/timeValidator.mjs +0 -0
  74. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
@@ -1,10 +1,10 @@
1
- import { AfterViewInit, ElementRef, EventEmitter, InjectionToken, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
1
+ import { ElementRef, EventEmitter, InjectionToken, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
2
2
  import { ControlContainer } from '@angular/forms';
3
3
  import { ValueAccessorBase } from '../value-accessor-base/value-accessor-base.component';
4
4
  import { FormElementComponent } from '../../form/form-element/form-element.component';
5
5
  import * as i0 from "@angular/core";
6
- export declare type AppSelectOptions = Array<AppSelectOption>;
7
- export declare type AppSelectOption = {
6
+ export type AppSelectOptions = Array<AppSelectOption>;
7
+ export type AppSelectOption = {
8
8
  id: any;
9
9
  name: string;
10
10
  description?: string;
@@ -14,24 +14,21 @@ export declare type AppSelectOption = {
14
14
  export declare const SELECT_TRANSLATIONS: InjectionToken<any>;
15
15
  export declare class KlpSelectOptionTemplateDirective {
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<KlpSelectOptionTemplateDirective, never>;
17
- static ɵdir: i0.ɵɵDirectiveDeclaration<KlpSelectOptionTemplateDirective, "[klpSelectOptionTpl]", never, {}, {}, never, never, false>;
17
+ static ɵdir: i0.ɵɵDirectiveDeclaration<KlpSelectOptionTemplateDirective, "[klpSelectOptionTpl]", never, {}, {}, never, never, false, never>;
18
18
  }
19
- export declare class SelectComponent extends ValueAccessorBase<string | string[]> implements OnChanges, AfterViewInit {
19
+ export declare class SelectComponent extends ValueAccessorBase<string | string[]> implements OnChanges {
20
20
  protected parent: FormElementComponent;
21
21
  protected controlContainer: ControlContainer;
22
22
  private translations;
23
23
  private elRef;
24
24
  placeholder: string;
25
- prefix: string;
26
25
  orientation: 'vertical' | 'horizontal';
27
26
  options: AppSelectOptions;
28
27
  multiple: boolean;
29
28
  multipleDisplayedAsAmount: boolean;
30
29
  clearable: boolean;
31
30
  truncateOptions: boolean;
32
- withSeparatingLine: boolean;
33
- searchable: boolean;
34
- dropdownPosition: 'auto' | 'bottom' | 'top' | 'left' | 'right';
31
+ dropdownPosition: string;
35
32
  customSearchFn: (term: string, item: {
36
33
  id: string;
37
34
  name: string;
@@ -41,27 +38,19 @@ export declare class SelectComponent extends ValueAccessorBase<string | string[]
41
38
  onSearch: EventEmitter<string>;
42
39
  onEndReached: EventEmitter<void>;
43
40
  onOpened: EventEmitter<void>;
44
- onClosed: EventEmitter<void>;
45
41
  onBlur: EventEmitter<void>;
46
42
  onClear: EventEmitter<void>;
47
43
  ngSelect: any;
48
44
  customOptionTpl: TemplateRef<any>;
49
45
  private lastItemIndexReached;
50
- dropdownPositionToUse: 'auto' | 'bottom' | 'top' | 'left' | 'right';
51
46
  constructor(parent: FormElementComponent, controlContainer: ControlContainer, translations: any, elRef: ElementRef);
52
- ngAfterViewInit(): void;
53
- private addPrefix;
54
47
  ngOnChanges(changes: SimpleChanges): void;
55
48
  getDefaultTranslation(key: string): (x: any) => string;
56
49
  getTranslation(key: string, params?: any): string;
57
50
  onScroll(lastItemIndex: number): void;
58
51
  searchQueryChanged(searchQuery: string): void;
59
52
  onOpen(): void;
60
- private setWidthBasedOnOptionsWidths;
61
- private determineDropdownPosition;
62
- private isLimitingContainer;
63
53
  focus: () => void;
64
- onClose(): void;
65
54
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, [{ optional: true; host: true; }, { optional: true; host: true; }, { optional: true; }, null]>;
66
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "klp-form-select", never, { "placeholder": "placeholder"; "prefix": "prefix"; "orientation": "orientation"; "options": "options"; "multiple": "multiple"; "multipleDisplayedAsAmount": "multipleDisplayedAsAmount"; "clearable": "clearable"; "truncateOptions": "truncateOptions"; "withSeparatingLine": "withSeparatingLine"; "searchable": "searchable"; "dropdownPosition": "dropdownPosition"; "customSearchFn": "customSearchFn"; "footerElement": "footerElement"; }, { "onSearch": "onSearch"; "onEndReached": "onEndReached"; "onOpened": "onOpened"; "onClosed": "onClosed"; "onBlur": "onBlur"; "onClear": "onClear"; }, ["customOptionTpl"], never, false>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "klp-form-select", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "options": { "alias": "options"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "multipleDisplayedAsAmount": { "alias": "multipleDisplayedAsAmount"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "truncateOptions": { "alias": "truncateOptions"; "required": false; }; "dropdownPosition": { "alias": "dropdownPosition"; "required": false; }; "customSearchFn": { "alias": "customSearchFn"; "required": false; }; "footerElement": { "alias": "footerElement"; "required": false; }; }, { "onSearch": "onSearch"; "onEndReached": "onEndReached"; "onOpened": "onOpened"; "onBlur": "onBlur"; "onClear": "onClear"; }, ["customOptionTpl"], never, false, never>;
67
56
  }
@@ -6,5 +6,5 @@ export declare class SortableGroupedItemsComponent<T> extends ValueAccessorBase<
6
6
  writeValue(value: Array<Array<T>>): void;
7
7
  onItemsRearranged(value: Array<T | string>): void;
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<SortableGroupedItemsComponent<any>, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<SortableGroupedItemsComponent<any>, "klp-form-sortable-grouped-items", never, {}, {}, never, never, false>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<SortableGroupedItemsComponent<any>, "klp-form-sortable-grouped-items", never, {}, {}, never, never, false, never>;
10
10
  }
@@ -15,5 +15,5 @@ export declare class SortableItemsComponent extends ValueAccessorBase<Array<any>
15
15
  private scrollPage;
16
16
  private stopScrolling;
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<SortableItemsComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<SortableItemsComponent, "klp-form-sortable-items", never, { "sortableItemSize": "sortableItemSize"; "useCustomScroll": "useCustomScroll"; }, {}, ["template"], never, false>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<SortableItemsComponent, "klp-form-sortable-items", never, { "sortableItemSize": { "alias": "sortableItemSize"; "required": false; }; "useCustomScroll": { "alias": "useCustomScroll"; "required": false; }; }, {}, ["template"], never, false, never>;
19
19
  }
@@ -6,9 +6,7 @@ export declare class TextInputComponent extends ValueAccessorBase<string> {
6
6
  type: 'text' | 'password';
7
7
  clearable: boolean;
8
8
  icon: 'search';
9
- hasBorderLeft: boolean;
10
- hasBorderRight: boolean;
11
9
  onBlur: EventEmitter<void>;
12
10
  static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "klp-form-text-input", never, { "placeholder": "placeholder"; "type": "type"; "clearable": "clearable"; "icon": "icon"; "hasBorderLeft": "hasBorderLeft"; "hasBorderRight": "hasBorderRight"; }, { "onBlur": "onBlur"; }, never, never, false>;
11
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "klp-form-text-input", never, { "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; }, { "onBlur": "onBlur"; }, never, never, false, never>;
14
12
  }
@@ -2,5 +2,5 @@ import { ValueAccessorBase } from '../value-accessor-base/value-accessor-base.co
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class ToggleComponent extends ValueAccessorBase<boolean> {
4
4
  static ɵfac: i0.ɵɵFactoryDeclaration<ToggleComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<ToggleComponent, "klp-form-toggle", never, {}, {}, never, never, false>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToggleComponent, "klp-form-toggle", never, {}, {}, never, never, false, never>;
6
6
  }
@@ -10,5 +10,5 @@ export declare class MultipleValueAccessorBase<T> extends ValueAccessorBase<Arra
10
10
  writeValue(value: Array<T> | T): void;
11
11
  setInnerValueAndNotify(value: T | Array<T>): void;
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<MultipleValueAccessorBase<any>, [{ optional: true; host: true; }, { optional: true; host: true; }]>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<MultipleValueAccessorBase<any>, "ng-component", never, { "multiple": "multiple"; }, {}, never, never, false>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultipleValueAccessorBase<any>, "ng-component", never, { "multiple": { "alias": "multiple"; "required": false; }; }, {}, never, never, false, never>;
14
14
  }
@@ -39,5 +39,5 @@ export declare class ValueAccessorBase<T> implements ControlValueAccessor, OnIni
39
39
  hasValidator(validatorName: string): boolean;
40
40
  focus: () => void;
41
41
  static ɵfac: i0.ɵɵFactoryDeclaration<ValueAccessorBase<any>, [{ optional: true; host: true; }, { optional: true; host: true; }]>;
42
- static ɵcmp: i0.ɵɵComponentDeclaration<ValueAccessorBase<any>, "ng-component", never, { "disabled": "disabled"; "innerValueChangeInterceptor": "innerValueChangeInterceptor"; "formControlName": "formControlName"; "formControl": "formControl"; }, { "onTouch": "onTouch"; }, never, never, false>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<ValueAccessorBase<any>, "ng-component", never, { "disabled": { "alias": "disabled"; "required": false; }; "innerValueChangeInterceptor": { "alias": "innerValueChangeInterceptor"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; }, { "onTouch": "onTouch"; }, never, never, false, never>;
43
43
  }
@@ -7,5 +7,5 @@ export declare class FormCaptionComponent implements OnInit {
7
7
  constructor(parent: FormElementComponent);
8
8
  ngOnInit(): void;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<FormCaptionComponent, [{ optional: true; host: true; }]>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<FormCaptionComponent, "klp-form-caption", never, {}, {}, never, ["*"], false>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormCaptionComponent, "klp-form-caption", never, {}, {}, never, ["*"], false, never>;
11
11
  }
@@ -42,6 +42,6 @@ export declare class FormElementComponent {
42
42
  isRequired(): boolean;
43
43
  getErrorMessage(key: keyof FormErrorMessages): string;
44
44
  getErrorLocation(): 'belowCaption' | 'rightOfCaption';
45
- static ɵfac: i0.ɵɵFactoryDeclaration<FormElementComponent, [{ optional: true; host: true; }, { optional: true; }]>;
46
- static ɵcmp: i0.ɵɵComponentDeclaration<FormElementComponent, "klp-form-element", never, { "caption": "caption"; "direction": "direction"; "captionSpacing": "captionSpacing"; "spaceDistribution": "spaceDistribution"; "swapInputAndCaption": "swapInputAndCaption"; }, {}, never, ["*"], false>;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormElementComponent, [{ optional: true; }, { optional: true; }]>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormElementComponent, "klp-form-element", never, { "caption": { "alias": "caption"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; "captionSpacing": { "alias": "captionSpacing"; "required": false; }; "spaceDistribution": { "alias": "spaceDistribution"; "required": false; }; "swapInputAndCaption": { "alias": "swapInputAndCaption"; "required": false; }; }, {}, never, ["*"], false, never>;
47
47
  }
@@ -10,5 +10,5 @@ export declare class FormErrorComponent implements OnInit {
10
10
  constructor(parent: FormElementComponent);
11
11
  ngOnInit(): void;
12
12
  static ɵfac: i0.ɵɵFactoryDeclaration<FormErrorComponent, [{ optional: true; host: true; }]>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<FormErrorComponent, "klp-form-error", never, { "error": "error"; }, {}, never, ["*"], false>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormErrorComponent, "klp-form-error", never, { "error": { "alias": "error"; "required": false; }; }, {}, never, ["*"], false, never>;
14
14
  }
@@ -12,5 +12,5 @@ export declare class FormSubmitButtonComponent {
12
12
  constructor(parentForm: FormComponent);
13
13
  submitForm(): Promise<void>;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<FormSubmitButtonComponent, [{ optional: true; host: true; }]>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<FormSubmitButtonComponent, "klp-form-submit-button", never, { "isLoading": "isLoading"; "fullWidth": "fullWidth"; "variant": "variant"; "before": "before"; "after": "after"; "submitCallback": "submitCallback"; }, {}, never, ["*"], false>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormSubmitButtonComponent, "klp-form-submit-button", never, { "isLoading": { "alias": "isLoading"; "required": false; }; "fullWidth": { "alias": "fullWidth"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "before": { "alias": "before"; "required": false; }; "after": { "alias": "after"; "required": false; }; "submitCallback": { "alias": "submitCallback"; "required": false; }; }, {}, never, ["*"], false, never>;
16
16
  }
@@ -7,7 +7,7 @@ export declare class SubFormDirective {
7
7
  injectInto: UntypedFormArray | UntypedFormGroup;
8
8
  at: number | string;
9
9
  static ɵfac: i0.ɵɵFactoryDeclaration<SubFormDirective, never>;
10
- static ɵdir: i0.ɵɵDirectiveDeclaration<SubFormDirective, "klp-sub-form", never, { "injectInto": "injectInto"; "at": "at"; }, {}, never, never, false>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SubFormDirective, "klp-sub-form", never, { "injectInto": { "alias": "injectInto"; "required": false; }; "at": { "alias": "at"; "required": false; }; }, {}, never, never, false, never>;
11
11
  }
12
12
  export declare class FormComponent implements OnInit, OnDestroy, OnChanges {
13
13
  private parent;
@@ -35,5 +35,5 @@ export declare class FormComponent implements OnInit, OnDestroy, OnChanges {
35
35
  private getRenderedFieldValuesFormArray;
36
36
  private setDisabledStatesForAllControls;
37
37
  static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, [{ optional: true; skipSelf: true; }, { optional: true; }]>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "klp-form", never, { "readOnly": "readOnly"; "showErrorMessages": "showErrorMessages"; "errorMessageLocation": "errorMessageLocation"; "formGroup": "formGroup"; "patchValueInterceptor": "patchValueInterceptor"; }, {}, never, ["*"], false>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "klp-form", never, { "readOnly": { "alias": "readOnly"; "required": false; }; "showErrorMessages": { "alias": "showErrorMessages"; "required": false; }; "errorMessageLocation": { "alias": "errorMessageLocation"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "patchValueInterceptor": { "alias": "patchValueInterceptor"; "required": false; }; }, {}, never, ["*"], false, never>;
39
39
  }
@@ -1,11 +1,11 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "@angular/material/datepicker";
3
- import * as i2 from "@angular/material/form-field";
3
+ import * as i2 from "@angular/material/legacy-form-field";
4
4
  import * as i3 from "@angular/material/core";
5
- import * as i4 from "@angular/material/input";
6
- import * as i5 from "@angular/material/button";
5
+ import * as i4 from "@angular/material/legacy-input";
6
+ import * as i5 from "@angular/material/legacy-button";
7
7
  export declare class MaterialModule {
8
8
  static ɵfac: i0.ɵɵFactoryDeclaration<MaterialModule, never>;
9
- static ɵmod: i0.ɵɵNgModuleDeclaration<MaterialModule, never, [typeof i1.MatDatepickerModule, typeof i2.MatFormFieldModule, typeof i3.MatNativeDateModule, typeof i4.MatInputModule, typeof i5.MatButtonModule], [typeof i1.MatDatepickerModule, typeof i2.MatFormFieldModule, typeof i3.MatNativeDateModule, typeof i4.MatInputModule, typeof i5.MatButtonModule]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MaterialModule, never, [typeof i1.MatDatepickerModule, typeof i2.MatLegacyFormFieldModule, typeof i3.MatNativeDateModule, typeof i4.MatLegacyInputModule, typeof i5.MatLegacyButtonModule], [typeof i1.MatDatepickerModule, typeof i2.MatLegacyFormFieldModule, typeof i3.MatNativeDateModule, typeof i4.MatLegacyInputModule, typeof i5.MatLegacyButtonModule]>;
10
10
  static ɵinj: i0.ɵɵInjectorDeclaration<MaterialModule>;
11
11
  }
@@ -26,7 +26,7 @@ import * as i24 from "./elements/radio/radio.component";
26
26
  import * as i25 from "@angular/common";
27
27
  import * as i26 from "@angular/forms";
28
28
  import * as i27 from "@ng-select/ng-select";
29
- import * as i28 from "ngx-sortablejs";
29
+ import * as i28 from "@dustfoundation/ngx-sortablejs";
30
30
  import * as i29 from "./material.module";
31
31
  export declare class NgxEnhancyFormsModule {
32
32
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxEnhancyFormsModule, never>;
package/lib/types.d.ts CHANGED
@@ -10,6 +10,6 @@ export interface FormErrorMessages {
10
10
  matchPassword: string;
11
11
  date: string;
12
12
  }
13
- export declare type CustomErrorMessages = Record<keyof FormErrorMessages, () => string>;
14
- export declare type KlpDateFormats = (format: string) => MatDateFormats;
15
- export declare type ErrorTypes = keyof FormErrorMessages | 'message';
13
+ export type CustomErrorMessages = Record<keyof FormErrorMessages, () => string>;
14
+ export type KlpDateFormats = (format: string) => MatDateFormats;
15
+ export type ErrorTypes = keyof FormErrorMessages | 'message';
package/package.json CHANGED
@@ -1,27 +1,23 @@
1
1
  {
2
2
  "name": "@klippa/ngx-enhancy-forms",
3
- "version": "14.6.2",
3
+ "version": "16.0.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
7
  "peerDependencies": {
8
- "@angular/common": ">=10",
9
- "@angular/core": ">=10",
8
+ "@angular/common": ">=16",
9
+ "@angular/core": ">=16",
10
10
  "@ng-select/ng-select": ">=9",
11
11
  "ngx-mat-datefns-date-adapter": ">=10",
12
12
  "date-fns": ">=2.29",
13
13
  "lodash-es": ">=4.17",
14
- "ngx-sortablejs": ">=11.1",
14
+ "@dustfoundation/ngx-sortablejs": ">=15.0.0",
15
15
  "sortablejs": ">=1.15"
16
16
  },
17
17
  "dependencies": {
18
18
  "tslib": "^2.0.0"
19
19
  },
20
- "module": "fesm2015/klippa-ngx-enhancy-forms.mjs",
21
- "es2020": "fesm2020/klippa-ngx-enhancy-forms.mjs",
22
- "esm2020": "esm2020/klippa-ngx-enhancy-forms.mjs",
23
- "fesm2020": "fesm2020/klippa-ngx-enhancy-forms.mjs",
24
- "fesm2015": "fesm2015/klippa-ngx-enhancy-forms.mjs",
20
+ "module": "fesm2022/klippa-ngx-enhancy-forms.mjs",
25
21
  "typings": "index.d.ts",
26
22
  "exports": {
27
23
  "./package.json": {
@@ -29,11 +25,9 @@
29
25
  },
30
26
  ".": {
31
27
  "types": "./index.d.ts",
32
- "esm2020": "./esm2020/klippa-ngx-enhancy-forms.mjs",
33
- "es2020": "./fesm2020/klippa-ngx-enhancy-forms.mjs",
34
- "es2015": "./fesm2015/klippa-ngx-enhancy-forms.mjs",
35
- "node": "./fesm2015/klippa-ngx-enhancy-forms.mjs",
36
- "default": "./fesm2020/klippa-ngx-enhancy-forms.mjs"
28
+ "esm2022": "./esm2022/klippa-ngx-enhancy-forms.mjs",
29
+ "esm": "./esm2022/klippa-ngx-enhancy-forms.mjs",
30
+ "default": "./fesm2022/klippa-ngx-enhancy-forms.mjs"
37
31
  }
38
32
  },
39
33
  "sideEffects": false
@@ -1,31 +0,0 @@
1
- import { Component, Input } from '@angular/core';
2
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
- import { ValueAccessorBase } from '../value-accessor-base/value-accessor-base.component';
4
- import * as i0 from "@angular/core";
5
- import * as i1 from "@angular/common";
6
- export var Orientation;
7
- (function (Orientation) {
8
- Orientation["COLUMN"] = "column";
9
- Orientation["ROW"] = "row";
10
- })(Orientation || (Orientation = {}));
11
- export class RadioComponent extends ValueAccessorBase {
12
- constructor() {
13
- super(...arguments);
14
- this.orientation = Orientation.ROW;
15
- this.variant = 'classic';
16
- this.Orientation = Orientation;
17
- }
18
- }
19
- RadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
20
- RadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: RadioComponent, selector: "klp-form-radio", inputs: { options: "options", orientation: "orientation", variant: "variant" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [ngClass]=\"{'verticallyOriented': orientation === Orientation.COLUMN, 'horizontallyOriented': orientation === Orientation.ROW}\">\n\t<ng-container *ngFor=\"let option of options\">\n\t\t<button class=\"optionContainer\"\n\t\t\t[ngClass]=\"{classic: variant === 'classic', button: variant === 'button', isSelected: innerValue === option.id}\"\n\t\t\t(click)=\"setInnerValueAndNotify(option.id)\"\n\t\t>\n\t\t\t<div class=\"selectedRadioBtnContainer\" *ngIf=\"variant === 'classic'\">\n\t\t\t\t<div class=\"selected\" *ngIf=\"innerValue === option.id\"></div>\n\t\t\t</div>\n\t\t\t<div>{{option.name}}</div>\n\t\t</button>\n\t</ng-container>\n</div>\n", styles: [":host{display:block}.componentContainer{position:relative;display:flex}.componentContainer.verticallyOriented{flex-direction:column}.componentContainer.verticallyOriented .optionContainer{margin-bottom:.3125rem}.componentContainer.verticallyOriented .optionContainer:last-child{margin-bottom:0}.componentContainer.horizontallyOriented{flex-direction:row}.componentContainer.horizontallyOriented .optionContainer:first-child{border-radius:6px 0 0 6px}.componentContainer.horizontallyOriented .optionContainer:last-child{border-radius:0 6px 6px 0}.optionContainer{display:flex;flex-direction:row;margin-right:.3125rem;background:transparent;border:none;align-items:center}.optionContainer.classic{cursor:pointer}.optionContainer.classic .selectedRadioBtnContainer{position:relative;height:20px;width:20px;padding:4px;border-radius:50%;border:2px solid #e6ecf5;margin-right:.3125rem}.optionContainer.classic .selectedRadioBtnContainer .selected{height:100%;width:100%;display:block;border-radius:100%;background-color:#27bb5f}.optionContainer.button{position:relative;cursor:pointer;padding:10px 14px;margin-right:0;transition:all .3s ease-in-out;color:#27bb5f;border:1px solid #27bb5f;background-color:#fff}.optionContainer.button.isSelected{background:#27bb5f;color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioComponent, decorators: [{
22
- type: Component,
23
- args: [{ selector: 'klp-form-radio', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }], template: "<div class=\"componentContainer\" [ngClass]=\"{'verticallyOriented': orientation === Orientation.COLUMN, 'horizontallyOriented': orientation === Orientation.ROW}\">\n\t<ng-container *ngFor=\"let option of options\">\n\t\t<button class=\"optionContainer\"\n\t\t\t[ngClass]=\"{classic: variant === 'classic', button: variant === 'button', isSelected: innerValue === option.id}\"\n\t\t\t(click)=\"setInnerValueAndNotify(option.id)\"\n\t\t>\n\t\t\t<div class=\"selectedRadioBtnContainer\" *ngIf=\"variant === 'classic'\">\n\t\t\t\t<div class=\"selected\" *ngIf=\"innerValue === option.id\"></div>\n\t\t\t</div>\n\t\t\t<div>{{option.name}}</div>\n\t\t</button>\n\t</ng-container>\n</div>\n", styles: [":host{display:block}.componentContainer{position:relative;display:flex}.componentContainer.verticallyOriented{flex-direction:column}.componentContainer.verticallyOriented .optionContainer{margin-bottom:.3125rem}.componentContainer.verticallyOriented .optionContainer:last-child{margin-bottom:0}.componentContainer.horizontallyOriented{flex-direction:row}.componentContainer.horizontallyOriented .optionContainer:first-child{border-radius:6px 0 0 6px}.componentContainer.horizontallyOriented .optionContainer:last-child{border-radius:0 6px 6px 0}.optionContainer{display:flex;flex-direction:row;margin-right:.3125rem;background:transparent;border:none;align-items:center}.optionContainer.classic{cursor:pointer}.optionContainer.classic .selectedRadioBtnContainer{position:relative;height:20px;width:20px;padding:4px;border-radius:50%;border:2px solid #e6ecf5;margin-right:.3125rem}.optionContainer.classic .selectedRadioBtnContainer .selected{height:100%;width:100%;display:block;border-radius:100%;background-color:#27bb5f}.optionContainer.button{position:relative;cursor:pointer;padding:10px 14px;margin-right:0;transition:all .3s ease-in-out;color:#27bb5f;border:1px solid #27bb5f;background-color:#fff}.optionContainer.button.isSelected{background:#27bb5f;color:#fff}\n"] }]
24
- }], propDecorators: { options: [{
25
- type: Input
26
- }], orientation: [{
27
- type: Input
28
- }], variant: [{
29
- type: Input
30
- }] } });
31
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaW8uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMva2xpc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