@jooler/inputs 0.0.52 → 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.
Files changed (56) hide show
  1. package/esm2022/lib/choose-enum/choose-enum.component.mjs +2 -2
  2. package/esm2022/lib/choose-general-item/choose-general-item.component.mjs +222 -45
  3. package/esm2022/lib/choose-general-item/choose-general-item.service.mjs +24 -3
  4. package/esm2022/lib/choose-general-item/choose-object-basic-template-label-field.enum.mjs +7 -0
  5. package/esm2022/lib/choose-general-item/choose-object-basic-template.model.mjs +67 -0
  6. package/esm2022/lib/choose-general-item/choose-object-template-type.enum.mjs +7 -0
  7. package/esm2022/lib/choose-general-item-renderer/choose-general-item-renderer.component.mjs +3 -3
  8. package/esm2022/lib/custom-colors/bom-production-type.enum.mjs +11 -0
  9. package/esm2022/lib/custom-colors/enum-custom-color-mapping.mjs +32 -0
  10. package/esm2022/lib/custom-colors/enum-custom-colors.mjs +21 -0
  11. package/esm2022/lib/custom-colors/sales-order-status.enum.mjs +27 -0
  12. package/esm2022/lib/custom-theme.mjs +104 -0
  13. package/esm2022/lib/dictionary-to-params-converter.mjs +15 -0
  14. package/esm2022/lib/enum-custom-label-mapping.mjs +32 -0
  15. package/esm2022/lib/enum-helper-functions.mjs +85 -0
  16. package/esm2022/lib/enum-models/bill-status.model.mjs +25 -0
  17. package/esm2022/lib/enum-models/charge-level.enum.mjs +6 -0
  18. package/esm2022/lib/enum-models/custom-order-request-status.enum.mjs +29 -0
  19. package/esm2022/lib/enum-models/invitation-status.model.mjs +15 -0
  20. package/esm2022/lib/enum-models/invoice-status.model.mjs +15 -0
  21. package/esm2022/lib/enum-models/locker-transfer-status.enum.mjs +11 -0
  22. package/esm2022/lib/enum-models/priority.model.mjs +13 -0
  23. package/esm2022/lib/enum-models/quotation-status.model.mjs +19 -0
  24. package/esm2022/lib/enum-models/request-status.model.mjs +15 -0
  25. package/esm2022/lib/enum-string-class-map.mjs +26 -0
  26. package/esm2022/lib/json/enum-custom-label-mappings.json +10 -0
  27. package/esm2022/lib/models/choose-item-full-object-control-config.enum.mjs +6 -0
  28. package/esm2022/lib/primary-colors.mjs +9 -1
  29. package/fesm2022/inputs.mjs +844 -137
  30. package/fesm2022/inputs.mjs.map +1 -1
  31. package/lib/choose-general-item/choose-general-item.component.d.ts +44 -15
  32. package/lib/choose-general-item/choose-general-item.service.d.ts +5 -1
  33. package/lib/choose-general-item/choose-object-basic-template-label-field.enum.d.ts +5 -0
  34. package/lib/choose-general-item/choose-object-basic-template.model.d.ts +15 -0
  35. package/lib/choose-general-item/choose-object-template-type.enum.d.ts +5 -0
  36. package/lib/custom-colors/bom-production-type.enum.d.ts +5 -0
  37. package/lib/custom-colors/enum-custom-color-mapping.d.ts +11 -0
  38. package/lib/custom-colors/enum-custom-colors.d.ts +2 -0
  39. package/lib/custom-colors/sales-order-status.enum.d.ts +13 -0
  40. package/lib/custom-theme.d.ts +8 -0
  41. package/lib/dictionary-to-params-converter.d.ts +4 -0
  42. package/lib/enum-custom-label-mapping.d.ts +7 -0
  43. package/lib/enum-helper-functions.d.ts +7 -0
  44. package/lib/enum-models/bill-status.model.d.ts +12 -0
  45. package/lib/enum-models/charge-level.enum.d.ts +4 -0
  46. package/lib/enum-models/custom-order-request-status.enum.d.ts +14 -0
  47. package/lib/enum-models/invitation-status.model.d.ts +7 -0
  48. package/lib/enum-models/invoice-status.model.d.ts +13 -0
  49. package/lib/enum-models/locker-transfer-status.enum.d.ts +5 -0
  50. package/lib/enum-models/priority.model.d.ts +6 -0
  51. package/lib/enum-models/quotation-status.model.d.ts +9 -0
  52. package/lib/enum-models/request-status.model.d.ts +7 -0
  53. package/lib/enum-string-class-map.d.ts +3 -0
  54. package/lib/models/choose-item-full-object-control-config.enum.d.ts +4 -0
  55. package/lib/primary-colors.d.ts +8 -0
  56. package/package.json +1 -1
@@ -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,5 @@
1
+ export declare enum BOMProductionType {
2
+ MANUFACTURED_IN_HOUSE = 0,
3
+ PARTIALLY_MANUFACTURED_IN_HOUSE = 1
4
+ }
5
+ export declare const bomProductionTypeColors: string[];
@@ -0,0 +1,11 @@
1
+ export interface IEnumCustomColorMapping {
2
+ enumClass: any;
3
+ colors: string[];
4
+ }
5
+ export declare class EnumCustomColorMapping {
6
+ enumClass: any;
7
+ colors: string[];
8
+ constructor(enumClass: any, colors: string[]);
9
+ private validateColors;
10
+ }
11
+ export declare const enumCustomColorMappings: EnumCustomColorMapping[];
@@ -0,0 +1,2 @@
1
+ import { IEnumCustomColorMapping } from "./enum-custom-color-mapping";
2
+ export declare const enumCustomColors: IEnumCustomColorMapping[];
@@ -0,0 +1,13 @@
1
+ export declare enum SalesOrderStatus {
2
+ DRAFT = 0,
3
+ PENDING_APPROVAL = 1,
4
+ APPROVED = 2,
5
+ TO_DELIVER_AND_TO_BILL = 3,
6
+ TO_BILL = 4,
7
+ PARTIALLY_DELIVERED_AND_PARTIALLY_BILLED = 5,
8
+ PARTIALLY_DELIVERED_AND_TO_BILL = 6,
9
+ COMPLETED = 7,
10
+ CANCELED = 8,
11
+ CLOSED = 9
12
+ }
13
+ export declare const salesOrderStatusColors: string[];
@@ -0,0 +1,8 @@
1
+ export declare class CustomTheme {
2
+ static $joolerBlue: string[];
3
+ static $joolerTeal: string[];
4
+ static $joolerRed: string[];
5
+ static $joolerPink: string[];
6
+ static $joolerPurple: string[];
7
+ static $joolerCombo: string[];
8
+ }
@@ -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,7 @@
1
+ export declare class EnumCustomLabelMapping {
2
+ enumClass: any;
3
+ labels: string[];
4
+ constructor(enumClass: any, labels: string[]);
5
+ private validateLabels;
6
+ }
7
+ export declare const enumCustomLabelMappings: EnumCustomLabelMapping[];
@@ -0,0 +1,7 @@
1
+ import { EnumOption } from './enum-helper.model';
2
+ export declare class EnumHelperBaseClass {
3
+ static getEnumOptionsFromEnumClass(enumClass: any, customColors?: string[], isAllCaps?: boolean, isIntegerChoice?: boolean): EnumOption[];
4
+ static getColorsForEnumClass(enumClass: any, stringValues: string[], customColors?: string[]): string[];
5
+ static getStringValuesForEnumClass(enumClass: any, isAllCaps?: boolean): string[];
6
+ static getLabelAndColorFromEnumValue(enumClass: any, enumValue: number, customColors?: string[]): EnumOption;
7
+ }
@@ -0,0 +1,12 @@
1
+ export declare enum BillStatus {
2
+ DRAFT = 0,
3
+ RECEIVED = 1,
4
+ PAID = 2,
5
+ CANCELLED = 3,
6
+ RETURN = 4,
7
+ DEBIT_NOTE_ISSUED = 5,
8
+ PARTLY_PAID = 6,
9
+ UNPAID = 7,
10
+ OVERDUE = 8
11
+ }
12
+ export declare const billStatusColors: string[];
@@ -0,0 +1,4 @@
1
+ export declare enum ChargeLevel {
2
+ MAIN = 0,
3
+ LINE = 1
4
+ }
@@ -0,0 +1,14 @@
1
+ export declare enum CustomOrderRequestStatus {
2
+ DRAFT = 0,
3
+ SENT = 1,
4
+ RESPONDED = 2,
5
+ REJECTED = 3,
6
+ CANCELED = 4,
7
+ DECLINED = 5,
8
+ ACCEPTED = 6,
9
+ ORDER_CONFIRMED = 7,
10
+ DELIVERED = 8,
11
+ ON_HOLD = 9,
12
+ IN_PRODUCTION = 10
13
+ }
14
+ export declare const customOrderRequestStatusColors: string[];
@@ -0,0 +1,7 @@
1
+ export declare enum InvitationStatus {
2
+ PENDING = 0,
3
+ ACCEPTED = 1,
4
+ EXPIRED = 2,
5
+ CANCELED = 3
6
+ }
7
+ export declare const invitationStatusColors: string[];
@@ -0,0 +1,13 @@
1
+ export declare enum InvoiceStatus {
2
+ DRAFT = 0,
3
+ SUBMITTED = 1,
4
+ PAID = 2,
5
+ UNPAID = 3,
6
+ PARTLY_PAID = 4,
7
+ CANCELLED = 5,
8
+ OVERDUE = 6,
9
+ CREDIT_NOTE_ISSUED = 7,
10
+ RETURN = 8,
11
+ UNPAID_AND_DISCOUNTED = 9,
12
+ OVERDUE_AND_DISCOUNTED = 10
13
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum LockerTransferStatus {
2
+ DRAFT = 0,
3
+ POSTED = 1
4
+ }
5
+ export declare const lockerTransferStatusColors: string[];
@@ -0,0 +1,6 @@
1
+ export declare enum Priority {
2
+ LOW = 0,
3
+ NORMAL = 1,
4
+ HIGH = 2
5
+ }
6
+ export declare const priorityColors: string[];
@@ -0,0 +1,9 @@
1
+ export declare enum QuotationStatus {
2
+ CREATED = 0,
3
+ SENT = 1,
4
+ REJECTED = 2,
5
+ CANCELED = 3,
6
+ ACCEPTED = 4,
7
+ EXPIRED = 5
8
+ }
9
+ export declare const quotationStatusColors: string[];
@@ -0,0 +1,7 @@
1
+ export declare enum RequestStatus {
2
+ PENDING = 0,
3
+ REJECTED = 1,
4
+ APPROVED = 2,
5
+ CANCELED = 3
6
+ }
7
+ export declare const requestStatusColors: string[];
@@ -0,0 +1,3 @@
1
+ export declare const enumClassMap: {
2
+ [key: string]: any;
3
+ };
@@ -0,0 +1,4 @@
1
+ export declare enum ChooseItemFullObjectControlConfig {
2
+ OBJECT = 1,
3
+ ID = 2
4
+ }
@@ -3,9 +3,17 @@ export declare class PrimaryColors {
3
3
  static $primaryPinkColor: string;
4
4
  static $primaryTealColor: string;
5
5
  static $primaryCarbonColor: string;
6
+ static $primaryGrayColor: string;
6
7
  static $primaryPurpleColor: string;
7
8
  static $primaryRedColor: string;
8
9
  static $primaryLightRedColor: string;
9
10
  static $primaryLightGrayBlueColor: string;
10
11
  static $primaryLightGrayColor: string;
12
+ static $primaryLightBlueColor: string;
13
+ static $primaryYellowColor: string;
14
+ static $primaryOrangeColor: string;
15
+ static $primaryLimeGreenColor: string;
16
+ static $primaryNavyBlueColor: string;
17
+ static $primaryOrangeRedColor: string;
18
+ static $primaryDarkPurpleColor: string;
11
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jooler/inputs",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=13.0.0",
6
6
  "@angular/core": ">=13.0.0"