@jooler/inputs 0.0.53 → 0.0.54

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.
@@ -1,11 +1,19 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
1
+ import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
2
+ import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms';
3
+ import { MatDialog } from '@angular/material/dialog';
3
4
  import { LabelAndField } from '../models/label-and-field.model';
4
5
  import { ChooseGeneralItemService } from './choose-general-item.service';
6
+ import { ChooseObjectTemplateType } from './choose-object-template-type.enum';
7
+ import { ChooseObjectBasicTemplate } from './choose-object-basic-template.model';
8
+ import { ChooseItemFullObjectControlConfig } from '../models/choose-item-full-object-control-config.enum';
9
+ import { ChipInputType } from '@jooler/shared-general-components';
5
10
  import * as i0 from "@angular/core";
6
- export declare class ChooseGeneralItemComponent implements OnInit, ControlValueAccessor {
11
+ export declare class ChooseGeneralItemComponent implements OnInit, OnChanges, Validator, ControlValueAccessor {
7
12
  private _ChooseGeneralItemService;
8
- change: EventEmitter<any>;
13
+ private dialog;
14
+ private _cdr;
15
+ primaryRed: string;
16
+ isLoading: boolean;
9
17
  items: any[];
10
18
  label: string;
11
19
  appendTo: string;
@@ -17,8 +25,6 @@ export declare class ChooseGeneralItemComponent implements OnInit, ControlValueA
17
25
  showLabel: boolean;
18
26
  separator: string;
19
27
  width: number;
20
- fontWeight: number;
21
- fontSize: number;
22
28
  isChip: Boolean;
23
29
  isTypeDate: boolean;
24
30
  chipColor: string;
@@ -26,24 +32,47 @@ export declare class ChooseGeneralItemComponent implements OnInit, ControlValueA
26
32
  chipWidth: number;
27
33
  selectedItemId: number | number[];
28
34
  disabled: boolean;
35
+ readOnly: boolean;
29
36
  useFullObject: boolean;
30
- constructor(_ChooseGeneralItemService: ChooseGeneralItemService);
37
+ showAdd: boolean;
38
+ dialogComponentClass: any;
39
+ showDialogDefaultButtons: boolean;
40
+ dialogComponentInputs: any;
41
+ bindValueKey: string | null;
42
+ addRoute: string;
43
+ canActionsRoute: boolean;
44
+ dialogTitle: string;
45
+ clearable: boolean;
46
+ filterParams: any;
47
+ templateType: ChooseObjectTemplateType;
48
+ basicTemplateData: ChooseObjectBasicTemplate;
49
+ contentProjectionLabelKey: string;
50
+ fullObjectControlConfig: ChooseItemFullObjectControlConfig;
51
+ change: EventEmitter<any>;
52
+ blur: EventEmitter<any>;
53
+ customOptionTemplate: TemplateRef<any>;
54
+ ChooseObjectTemplateType: typeof ChooseObjectTemplateType;
55
+ chipInputTypes: typeof ChipInputType;
56
+ constructor(_ChooseGeneralItemService: ChooseGeneralItemService, dialog: MatDialog, _cdr: ChangeDetectorRef);
31
57
  ngOnInit(): void;
58
+ setupBasicTemplate(): void;
59
+ ngOnChanges(changes: SimpleChanges): void;
60
+ validateAddConfiguration(): void;
32
61
  writeValue(item: any): void;
33
62
  registerOnChange(fn: any): void;
34
63
  registerOnTouched(fn: any): void;
35
64
  private propagateChange;
36
65
  private propogateTouch;
66
+ private onValidationChange;
37
67
  updateBlur(): void;
38
68
  onSelectedItemChanged($event: any): void;
69
+ validateInputs(changes: SimpleChanges): void;
39
70
  getData(): void;
40
- setWidth(): {
41
- width: string;
42
- };
43
- setFontStyles(): {
44
- fontWeight: number;
45
- fontSize: string;
46
- };
71
+ setWidth(): {};
72
+ onClickAddNew(): void;
73
+ setDisabledState(isDisabled: boolean): void;
74
+ registerOnValidatorChange?(fn: () => void): void;
75
+ validate(control: AbstractControl): ValidationErrors | null;
47
76
  static ɵfac: i0.ɵɵFactoryDeclaration<ChooseGeneralItemComponent, never>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<ChooseGeneralItemComponent, "choose-general-item", never, { "items": { "alias": "items"; "required": false; }; "label": { "alias": "label"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "apiPath": { "alias": "apiPath"; "required": false; }; "isMultiple": { "alias": "isMultiple"; "required": false; }; "hideSelectedItem": { "alias": "hideSelectedItem"; "required": false; }; "objects": { "alias": "objects"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "width": { "alias": "width"; "required": false; }; "fontWeight": { "alias": "fontWeight"; "required": false; }; "fontSize": { "alias": "fontSize"; "required": false; }; "isChip": { "alias": "isChip"; "required": false; }; "isTypeDate": { "alias": "isTypeDate"; "required": false; }; "chipColor": { "alias": "chipColor"; "required": false; }; "chipTextColor": { "alias": "chipTextColor"; "required": false; }; "chipWidth": { "alias": "chipWidth"; "required": false; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "useFullObject": { "alias": "useFullObject"; "required": false; }; }, { "change": "change"; }, never, never, false, never>;
77
+ static ɵcmp: i0.ɵɵComponentDeclaration<ChooseGeneralItemComponent, "choose-general-item", never, { "items": { "alias": "items"; "required": false; }; "label": { "alias": "label"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "apiPath": { "alias": "apiPath"; "required": false; }; "isMultiple": { "alias": "isMultiple"; "required": false; }; "hideSelectedItem": { "alias": "hideSelectedItem"; "required": false; }; "objects": { "alias": "objects"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "separator": { "alias": "separator"; "required": false; }; "width": { "alias": "width"; "required": false; }; "isChip": { "alias": "isChip"; "required": false; }; "isTypeDate": { "alias": "isTypeDate"; "required": false; }; "chipColor": { "alias": "chipColor"; "required": false; }; "chipTextColor": { "alias": "chipTextColor"; "required": false; }; "chipWidth": { "alias": "chipWidth"; "required": false; }; "selectedItemId": { "alias": "selectedItemId"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "useFullObject": { "alias": "useFullObject"; "required": false; }; "showAdd": { "alias": "showAdd"; "required": false; }; "dialogComponentClass": { "alias": "dialogComponentClass"; "required": false; }; "showDialogDefaultButtons": { "alias": "showDialogDefaultButtons"; "required": false; }; "dialogComponentInputs": { "alias": "dialogComponentInputs"; "required": false; }; "bindValueKey": { "alias": "bindValueKey"; "required": false; }; "addRoute": { "alias": "addRoute"; "required": false; }; "canActionsRoute": { "alias": "canActionsRoute"; "required": false; }; "dialogTitle": { "alias": "dialogTitle"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "filterParams": { "alias": "filterParams"; "required": false; }; "templateType": { "alias": "templateType"; "required": false; }; "basicTemplateData": { "alias": "basicTemplateData"; "required": false; }; "contentProjectionLabelKey": { "alias": "contentProjectionLabelKey"; "required": false; }; "fullObjectControlConfig": { "alias": "fullObjectControlConfig"; "required": false; }; }, { "change": "change"; "blur": "blur"; }, ["customOptionTemplate"], never, false, never>;
49
78
  }
@@ -8,11 +8,15 @@ export declare class ChooseGeneralItemService {
8
8
  getHeaders(): {
9
9
  headers: HttpHeaders;
10
10
  };
11
+ getHeadersAndParams(dictionary: any): {
12
+ headers: any;
13
+ params: import("@angular/common/http").HttpParams;
14
+ };
11
15
  getAuthenticationHeadersWithQueryParams(params: any): {
12
16
  headers: HttpHeaders;
13
17
  params: any;
14
18
  };
15
- getData(apiPath: string): Observable<any>;
19
+ getData(apiPath: string, filterParams?: any): Observable<any>;
16
20
  static ɵfac: i0.ɵɵFactoryDeclaration<ChooseGeneralItemService, never>;
17
21
  static ɵprov: i0.ɵɵInjectableDeclaration<ChooseGeneralItemService>;
18
22
  }
@@ -0,0 +1,5 @@
1
+ export declare enum ChooseObjectBasicTemplateLabelField {
2
+ TITLE = 0,
3
+ SUBTITLE_ONE = 1,
4
+ SUBTITLE_TWO = 2
5
+ }
@@ -0,0 +1,15 @@
1
+ import { ChooseObjectBasicTemplateLabelField } from './choose-object-basic-template-label-field.enum';
2
+ export declare class ChooseObjectBasicTemplate {
3
+ title: string;
4
+ subtitleOne: string;
5
+ subtitleTwo: string;
6
+ description: string;
7
+ image: string;
8
+ useAsLabel: ChooseObjectBasicTemplateLabelField;
9
+ constructor(title: string, subtitleOne?: string, subtitleTwo?: string, description?: string, image?: string, useAsLabel?: ChooseObjectBasicTemplateLabelField);
10
+ get hasSubtitleOne(): boolean;
11
+ get hasSubtitleTwo(): boolean;
12
+ get hasDescription(): boolean;
13
+ get hasImage(): boolean;
14
+ get label(): string;
15
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum ChooseObjectTemplateType {
2
+ DEFAULT = 0,
3
+ BASIC = 1,
4
+ CONTENT_PROJECTION = 2
5
+ }
@@ -0,0 +1,4 @@
1
+ import { HttpParams } from '@angular/common/http';
2
+ export declare class DictionaryToHttpParamsConverter {
3
+ static dictionaryToHttpParamsConverter(form_dictionary: any): HttpParams;
4
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ChooseItemFullObjectControlConfig {
2
+ OBJECT = 1,
3
+ ID = 2
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jooler/inputs",
3
- "version": "0.0.53",
3
+ "version": "0.0.54",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=13.0.0",
6
6
  "@angular/core": ">=13.0.0"