tin-spa 2.6.4 → 2.6.6

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 (44) hide show
  1. package/esm2020/lib/classes/Classes.mjs +1 -1
  2. package/esm2020/lib/classes/TinCore.mjs +3 -17
  3. package/esm2020/lib/components/form/form.component.mjs +33 -15
  4. package/esm2020/lib/components/multi-select/multi-select.component.mjs +58 -13
  5. package/esm2020/lib/components/multi-text/multi-text.component.mjs +54 -14
  6. package/esm2020/lib/components/option/option.component.mjs +7 -3
  7. package/esm2020/lib/components/search/search.component.mjs +3 -3
  8. package/esm2020/lib/components/select/select.component.mjs +16 -7
  9. package/esm2020/lib/components/select-common/select-common.component.mjs +16 -11
  10. package/esm2020/lib/components/select-internal/select-internal.component.mjs +16 -7
  11. package/esm2020/lib/components/select-lite/select-lite.component.mjs +3 -3
  12. package/esm2020/lib/components/table/detailsDialog.component.mjs +3 -3
  13. package/esm2020/lib/components/table-internal/detailsDialog-internal.component.mjs +3 -3
  14. package/esm2020/lib/components/table-lite/detailsDialog-lite.component.mjs +3 -3
  15. package/esm2020/lib/components/text/text.component.mjs +78 -28
  16. package/esm2020/lib/pages/accounts/accountDialog.component.mjs +1 -1
  17. package/esm2020/lib/pages/change-password/change-password.component.mjs +1 -1
  18. package/esm2020/lib/pages/create-account/create-account.component.mjs +1 -1
  19. package/esm2020/lib/pages/inventory/quantityDialog.component.mjs +1 -1
  20. package/esm2020/lib/pages/login/login.component.mjs +1 -1
  21. package/esm2020/lib/pages/notifications/notifications.component.mjs +3 -13
  22. package/esm2020/lib/pages/profile/profile.component.mjs +1 -1
  23. package/esm2020/lib/pages/recover-account/recover-account.component.mjs +1 -1
  24. package/esm2020/lib/pages/signup/signup.component.mjs +1 -1
  25. package/esm2020/lib/pages/tenant-settings/tenant-settings.component.mjs +1 -1
  26. package/esm2020/lib/pages/transactions/transactDialog.component.mjs +1 -1
  27. package/esm2020/lib/pages/welcome/welcome.component.mjs +1 -1
  28. package/esm2020/lib/services/datalib.service.mjs +38 -4
  29. package/fesm2015/tin-spa.mjs +338 -171
  30. package/fesm2015/tin-spa.mjs.map +1 -1
  31. package/fesm2020/tin-spa.mjs +350 -171
  32. package/fesm2020/tin-spa.mjs.map +1 -1
  33. package/lib/classes/Classes.d.ts +3 -6
  34. package/lib/components/form/form.component.d.ts +2 -3
  35. package/lib/components/multi-select/multi-select.component.d.ts +12 -2
  36. package/lib/components/multi-text/multi-text.component.d.ts +12 -2
  37. package/lib/components/option/option.component.d.ts +3 -1
  38. package/lib/components/select/select.component.d.ts +4 -3
  39. package/lib/components/select-common/select-common.component.d.ts +3 -2
  40. package/lib/components/select-internal/select-internal.component.d.ts +4 -3
  41. package/lib/components/text/text.component.d.ts +10 -2
  42. package/lib/pages/notifications/notifications.component.d.ts +0 -1
  43. package/lib/services/datalib.service.d.ts +5 -0
  44. package/package.json +1 -1
@@ -44,6 +44,7 @@ export declare class Action {
44
44
  params?: any[];
45
45
  successMessage?: string;
46
46
  isFormData?: boolean;
47
+ forceRefresh?: boolean;
47
48
  }
48
49
  export declare class SearchConfig {
49
50
  fields: SearchField[];
@@ -110,6 +111,7 @@ export interface Field {
110
111
  options?: any[];
111
112
  optionDisplay?: string;
112
113
  optionValue?: string;
114
+ masterOptionValue?: string;
113
115
  defaultValue?: any;
114
116
  defaultFirstValue?: boolean;
115
117
  required?: boolean;
@@ -137,17 +139,12 @@ export interface Field {
137
139
  hideOnExists?: boolean;
138
140
  hiddenCondition?: (value: any) => boolean;
139
141
  readonlyCondition?: (value: any) => boolean;
140
- peekConfig?: PeekDialogConfig;
142
+ detailsConfig?: DetailsDialogConfig;
141
143
  loadAction?: Action;
142
144
  infoMessage?: string;
143
145
  suffix?: string;
144
146
  subfields?: Field[];
145
147
  }
146
- export interface PeekDialogConfig {
147
- detailsConfig: DetailsDialogConfig;
148
- create?: boolean;
149
- view?: boolean;
150
- }
151
148
  export interface ChildField {
152
149
  childField?: string;
153
150
  childValueField?: string;
@@ -10,8 +10,6 @@ export declare class FormComponent implements OnInit {
10
10
  ngOnInit(): void;
11
11
  initializeCompositeFields(): void;
12
12
  getVisibleSubfields(field: Field): Field[];
13
- ngOnChanges(): void;
14
- ngAfterViewInit(): void;
15
13
  getVisibleFields(): Field[];
16
14
  testReadOnly(f: Field): boolean;
17
15
  dynamicSelectTemplate: TemplateRef<any>;
@@ -30,7 +28,8 @@ export declare class FormComponent implements OnInit {
30
28
  inputChange: EventEmitter<any>;
31
29
  selectChanged(field: Field): void;
32
30
  inputChanged(field: Field, value: any): void;
33
- updateChildOptions(masterField: Field): void;
31
+ updateChildOptions(masterFieldName: string): void;
32
+ private loadChildMasterOptions;
34
33
  buttonClicked(): void;
35
34
  processCall(button: Button): void;
36
35
  processForm(): void;
@@ -1,10 +1,13 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
3
  import { MessageService } from '../../services/message.service';
4
+ import { Action } from '../../classes/Classes';
5
+ import { DataServiceLib } from '../../services/datalib.service';
4
6
  import * as i0 from "@angular/core";
5
7
  export declare class MultiSelectComponent implements OnInit {
6
8
  private messageService;
7
- constructor(messageService: MessageService);
9
+ private dataService;
10
+ constructor(messageService: MessageService, dataService: DataServiceLib);
8
11
  display: string;
9
12
  value: string;
10
13
  valueChange: EventEmitter<string>;
@@ -21,6 +24,7 @@ export declare class MultiSelectComponent implements OnInit {
21
24
  placeholder: string;
22
25
  width: string;
23
26
  suffix: string;
27
+ loadAction: Action;
24
28
  control: FormControl<any[]>;
25
29
  selectedValues: any[];
26
30
  ngOnInit(): void;
@@ -32,6 +36,12 @@ export declare class MultiSelectComponent implements OnInit {
32
36
  compareWith(v1: any, v2: any): boolean;
33
37
  clear(): void;
34
38
  copyValues(): void;
39
+ isHovered: boolean;
40
+ hoverChange: EventEmitter<boolean>;
41
+ onMouseEnter(): void;
42
+ onMouseLeave(): void;
43
+ refresh(event: MouseEvent): void;
44
+ getData(action: Action): void;
35
45
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent, never>;
36
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "spa-multi-select", never, { "display": "display"; "value": "value"; "readonly": "readonly"; "required": "required"; "hint": "hint"; "options": "options"; "optionDisplay": "optionDisplay"; "optionValue": "optionValue"; "infoMessage": "infoMessage"; "copyContent": "copyContent"; "clearContent": "clearContent"; "nullable": "nullable"; "placeholder": "placeholder"; "width": "width"; "suffix": "suffix"; }, { "valueChange": "valueChange"; }, never, never, false>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "spa-multi-select", never, { "display": "display"; "value": "value"; "readonly": "readonly"; "required": "required"; "hint": "hint"; "options": "options"; "optionDisplay": "optionDisplay"; "optionValue": "optionValue"; "infoMessage": "infoMessage"; "copyContent": "copyContent"; "clearContent": "clearContent"; "nullable": "nullable"; "placeholder": "placeholder"; "width": "width"; "suffix": "suffix"; "loadAction": "loadAction"; }, { "valueChange": "valueChange"; "hoverChange": "hoverChange"; }, never, never, false>;
37
47
  }
@@ -4,10 +4,13 @@ import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
4
4
  import { MatChipInputEvent } from '@angular/material/chips';
5
5
  import { Observable } from 'rxjs';
6
6
  import { MessageService } from '../../services/message.service';
7
+ import { Action } from '../../classes/Classes';
8
+ import { DataServiceLib } from '../../services/datalib.service';
7
9
  import * as i0 from "@angular/core";
8
10
  export declare class MultiTextComponent implements OnInit {
9
11
  private messageService;
10
- constructor(messageService: MessageService);
12
+ private dataService;
13
+ constructor(messageService: MessageService, dataService: DataServiceLib);
11
14
  textInput: ElementRef<HTMLInputElement>;
12
15
  display: string;
13
16
  value: string;
@@ -23,6 +26,7 @@ export declare class MultiTextComponent implements OnInit {
23
26
  options: any[];
24
27
  optionDisplay: string;
25
28
  optionValue: string;
29
+ loadAction: Action;
26
30
  values: string[];
27
31
  control: FormControl<string>;
28
32
  filteredOptions: Observable<any[]>;
@@ -41,6 +45,12 @@ export declare class MultiTextComponent implements OnInit {
41
45
  clear(): void;
42
46
  getDisplayValue(value: string): string;
43
47
  copyValues(): void;
48
+ isHovered: boolean;
49
+ hoverChange: EventEmitter<boolean>;
50
+ onMouseEnter(): void;
51
+ onMouseLeave(): void;
52
+ refresh(event: MouseEvent): void;
53
+ getData(action: Action): void;
44
54
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiTextComponent, never>;
45
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiTextComponent, "spa-multi-text", never, { "display": "display"; "value": "value"; "readonly": "readonly"; "required": "required"; "hint": "hint"; "strict": "strict"; "suffix": "suffix"; "infoMessage": "infoMessage"; "copyContent": "copyContent"; "clearContent": "clearContent"; "options": "options"; "optionDisplay": "optionDisplay"; "optionValue": "optionValue"; }, { "valueChange": "valueChange"; }, never, never, false>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiTextComponent, "spa-multi-text", never, { "display": "display"; "value": "value"; "readonly": "readonly"; "required": "required"; "hint": "hint"; "strict": "strict"; "suffix": "suffix"; "infoMessage": "infoMessage"; "copyContent": "copyContent"; "clearContent": "clearContent"; "options": "options"; "optionDisplay": "optionDisplay"; "optionValue": "optionValue"; "loadAction": "loadAction"; }, { "valueChange": "valueChange"; "hoverChange": "hoverChange"; }, never, never, false>;
46
56
  }
@@ -1,5 +1,6 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { MessageService } from '../../services/message.service';
3
+ import { Action } from '../../classes/Classes';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class OptionComponent implements OnInit {
5
6
  private messageService;
@@ -18,6 +19,7 @@ export declare class OptionComponent implements OnInit {
18
19
  infoMessage: string;
19
20
  copyContent: boolean;
20
21
  suffix: string;
22
+ loadAction: Action;
21
23
  valueChange: EventEmitter<any>;
22
24
  enterPress: EventEmitter<any>;
23
25
  changed(): void;
@@ -26,5 +28,5 @@ export declare class OptionComponent implements OnInit {
26
28
  resetValue(): void;
27
29
  onInfoClick(event: MouseEvent): void;
28
30
  static ɵfac: i0.ɵɵFactoryDeclaration<OptionComponent, never>;
29
- static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent, "spa-option", never, { "options": "options"; "optionValue": "optionValue"; "optionDisplay": "optionDisplay"; "readonly": "readonly"; "type": "type"; "value": "value"; "display": "display"; "show": "show"; "required": "required"; "infoMessage": "infoMessage"; "copyContent": "copyContent"; "suffix": "suffix"; }, { "valueChange": "valueChange"; "enterPress": "enterPress"; }, never, never, false>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent, "spa-option", never, { "options": "options"; "optionValue": "optionValue"; "optionDisplay": "optionDisplay"; "readonly": "readonly"; "type": "type"; "value": "value"; "display": "display"; "show": "show"; "required": "required"; "infoMessage": "infoMessage"; "copyContent": "copyContent"; "suffix": "suffix"; "loadAction": "loadAction"; }, { "valueChange": "valueChange"; "enterPress": "enterPress"; }, never, never, false>;
30
32
  }
@@ -1,4 +1,4 @@
1
- import { PeekDialogConfig } from '../../classes/Classes';
1
+ import { DetailsDialogConfig } from '../../classes/Classes';
2
2
  import { MessageService } from '../../services/message.service';
3
3
  import { DialogService } from '../../services/dialog.service';
4
4
  import { SelectCommonComponent } from '../select-common/select-common.component';
@@ -9,9 +9,10 @@ export declare class SelectComponent extends SelectCommonComponent {
9
9
  protected dataService: DataServiceLib;
10
10
  private dialogService;
11
11
  constructor(messageService: MessageService, dataService: DataServiceLib, dialogService: DialogService);
12
- peekConfig: PeekDialogConfig;
12
+ detailsConfig: DetailsDialogConfig;
13
13
  onHoverChange(isHovered: boolean): void;
14
+ canCreate(): boolean;
14
15
  onPeekClick(event: MouseEvent, mode: 'create' | 'view'): void;
15
16
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "spa-select", never, { "peekConfig": "peekConfig"; }, {}, never, never, false>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "spa-select", never, { "detailsConfig": "detailsConfig"; }, {}, never, never, false>;
17
18
  }
@@ -23,6 +23,7 @@ export declare class SelectCommonComponent implements OnInit {
23
23
  value: any;
24
24
  options: any;
25
25
  masterOptions: any;
26
+ masterField: string;
26
27
  optionValue: string;
27
28
  optionDisplay: string;
28
29
  optionDisplayExtra: string;
@@ -36,7 +37,7 @@ export declare class SelectCommonComponent implements OnInit {
36
37
  onMouseEnter(): void;
37
38
  onMouseLeave(): void;
38
39
  refresh(event: MouseEvent): void;
39
- getData(): void;
40
+ getData(loadAction: Action): void;
40
41
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectCommonComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectCommonComponent, "spa-select-common", never, { "width": "width"; "readonly": "readonly"; "required": "required"; "defaultFirstValue": "defaultFirstValue"; "readonlyMode": "readonlyMode"; "hint": "hint"; "placeholder": "placeholder"; "multiple": "multiple"; "display": "display"; "value": "value"; "options": "options"; "masterOptions": "masterOptions"; "optionValue": "optionValue"; "optionDisplay": "optionDisplay"; "optionDisplayExtra": "optionDisplayExtra"; "nullable": "nullable"; "infoMessage": "infoMessage"; "copyContent": "copyContent"; "loadAction": "loadAction"; }, { "valueChange": "valueChange"; "hoverChange": "hoverChange"; }, never, ["[additionalButtons]"], false>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectCommonComponent, "spa-select-common", never, { "width": "width"; "readonly": "readonly"; "required": "required"; "defaultFirstValue": "defaultFirstValue"; "readonlyMode": "readonlyMode"; "hint": "hint"; "placeholder": "placeholder"; "multiple": "multiple"; "display": "display"; "value": "value"; "options": "options"; "masterOptions": "masterOptions"; "masterField": "masterField"; "optionValue": "optionValue"; "optionDisplay": "optionDisplay"; "optionDisplayExtra": "optionDisplayExtra"; "nullable": "nullable"; "infoMessage": "infoMessage"; "copyContent": "copyContent"; "loadAction": "loadAction"; }, { "valueChange": "valueChange"; "hoverChange": "hoverChange"; }, never, ["[additionalButtons]"], false>;
42
43
  }
@@ -1,4 +1,4 @@
1
- import { PeekDialogConfig } from '../../classes/Classes';
1
+ import { DetailsDialogConfig } from '../../classes/Classes';
2
2
  import { MessageService } from '../../services/message.service';
3
3
  import { DialogService } from '../../services/dialog.service';
4
4
  import { SelectCommonComponent } from '../select-common/select-common.component';
@@ -9,9 +9,10 @@ export declare class SelectInternalComponent extends SelectCommonComponent {
9
9
  protected dataService: DataServiceLib;
10
10
  private dialogService;
11
11
  constructor(messageService: MessageService, dataService: DataServiceLib, dialogService: DialogService);
12
- peekConfig: PeekDialogConfig;
12
+ detailsConfig: DetailsDialogConfig;
13
13
  onHoverChange(isHovered: boolean): void;
14
+ canCreate(): boolean;
14
15
  onPeekClick(event: MouseEvent, mode: 'create' | 'view'): void;
15
16
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectInternalComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectInternalComponent, "spa-select-internal", never, { "peekConfig": "peekConfig"; }, {}, never, never, false>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectInternalComponent, "spa-select-internal", never, { "detailsConfig": "detailsConfig"; }, {}, never, never, false>;
17
18
  }
@@ -1,9 +1,12 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { FormControl } from '@angular/forms';
3
3
  import { Observable } from 'rxjs';
4
+ import { Action } from '../../classes/Classes';
5
+ import { DataServiceLib } from '../../services/datalib.service';
4
6
  import * as i0 from "@angular/core";
5
7
  export declare class TextComponent implements OnInit {
6
- constructor();
8
+ private dataService;
9
+ constructor(dataService: DataServiceLib);
7
10
  ngOnInit(): void;
8
11
  ngAfterViewInit(): void;
9
12
  filteredOptions: Observable<string[]>;
@@ -25,7 +28,9 @@ export declare class TextComponent implements OnInit {
25
28
  copyContent: boolean;
26
29
  clearContent: boolean;
27
30
  options: any;
31
+ optionDisplay: string;
28
32
  optionValue: string;
33
+ loadAction: Action;
29
34
  required: boolean;
30
35
  min: number;
31
36
  max: number;
@@ -38,13 +43,16 @@ export declare class TextComponent implements OnInit {
38
43
  private initFilter;
39
44
  private _filter;
40
45
  initControl(control: FormControl): void;
46
+ getDisplayValue(value: any): string;
41
47
  changed(): void;
42
48
  leaved(): void;
43
49
  clear(): void;
44
50
  enterPressed(): void;
51
+ refresh(event: MouseEvent): void;
52
+ getData(action: Action): void;
45
53
  myControl: FormControl<string>;
46
54
  control: FormControl<string>;
47
55
  validate(control: FormControl): string;
48
56
  static ɵfac: i0.ɵɵFactoryDeclaration<TextComponent, never>;
49
- static ɵcmp: i0.ɵɵComponentDeclaration<TextComponent, "spa-text", never, { "readonly": "readonly"; "hint": "hint"; "display": "display"; "placeholder": "placeholder"; "value": "value"; "format": "format"; "type": "type"; "rows": "rows"; "width": "width"; "copyContent": "copyContent"; "clearContent": "clearContent"; "options": "options"; "optionValue": "optionValue"; "required": "required"; "min": "min"; "max": "max"; "regex": "regex"; "suffix": "suffix"; "infoMessage": "infoMessage"; }, { "valueChange": "valueChange"; "leave": "leave"; "enterPress": "enterPress"; }, never, never, false>;
57
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextComponent, "spa-text", never, { "readonly": "readonly"; "hint": "hint"; "display": "display"; "placeholder": "placeholder"; "value": "value"; "format": "format"; "type": "type"; "rows": "rows"; "width": "width"; "copyContent": "copyContent"; "clearContent": "clearContent"; "options": "options"; "optionDisplay": "optionDisplay"; "optionValue": "optionValue"; "loadAction": "loadAction"; "required": "required"; "min": "min"; "max": "max"; "regex": "regex"; "suffix": "suffix"; "infoMessage": "infoMessage"; }, { "valueChange": "valueChange"; "leave": "leave"; "enterPress": "enterPress"; }, never, never, false>;
50
58
  }
@@ -8,7 +8,6 @@ export declare class NotificationsComponent implements OnInit {
8
8
  private notificationsService;
9
9
  constructor(dataService: DataServiceLib, notificationsService: NotificationsService);
10
10
  ngOnInit(): void;
11
- loadRoles(): void;
12
11
  createDialog: DetailsDialogConfig;
13
12
  notificationsTableConfig: TableConfig;
14
13
  actionClicked(x: any): void;
@@ -52,7 +52,12 @@ export declare class DataServiceLib {
52
52
  departmentFormConfig: FormConfig;
53
53
  editDepartmentButton: Button;
54
54
  departmentTableConfig: TableConfig;
55
+ private listCache;
56
+ private cacheDuration;
57
+ private cacheTimestamps;
55
58
  CallApi(action: Action, data?: any): Observable<any>;
59
+ private handleListCall;
60
+ invalidateListCache(entityUrl: string): void;
56
61
  CheckWelcomed(path?: string): void;
57
62
  Navigate(path: string): void;
58
63
  NavigateWithValue(path: string, value: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tin-spa",
3
- "version": "2.6.4",
3
+ "version": "2.6.6",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.2.0",
6
6
  "@angular/core": "^14.2.0"