tin-spa 2.1.2 → 2.1.3

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 (37) hide show
  1. package/esm2020/lib/classes/Classes.mjs +4 -2
  2. package/esm2020/lib/classes/TinCore.mjs +4 -2
  3. package/esm2020/lib/components/attach/attach.component.mjs +3 -3
  4. package/esm2020/lib/components/date/date.component.mjs +1 -1
  5. package/esm2020/lib/components/filter/filter.component.mjs +14 -11
  6. package/esm2020/lib/components/form/form.component.mjs +42 -7
  7. package/esm2020/lib/components/logs/logs.component.mjs +1 -1
  8. package/esm2020/lib/components/option/option.component.mjs +14 -6
  9. package/esm2020/lib/components/search/search.component.mjs +31 -0
  10. package/esm2020/lib/components/table/detailsDialog.component.mjs +51 -13
  11. package/esm2020/lib/components/table/table.component.mjs +64 -20
  12. package/esm2020/lib/components/text/text.component.mjs +3 -3
  13. package/esm2020/lib/components/tiles/tiles.component.mjs +57 -19
  14. package/esm2020/lib/components/users/users.component.mjs +1 -1
  15. package/esm2020/lib/components/viewer/viewer.component.mjs +58 -0
  16. package/esm2020/lib/components/viewer/viewerDialog.component.mjs +75 -0
  17. package/esm2020/lib/pipes/camelToWords.pipe.mjs +3 -9
  18. package/esm2020/lib/services/data.service.mjs +7 -2
  19. package/esm2020/lib/tin-spa.module.mjs +14 -5
  20. package/esm2020/public-api.mjs +4 -1
  21. package/fesm2015/tin-spa.mjs +434 -122
  22. package/fesm2015/tin-spa.mjs.map +1 -1
  23. package/fesm2020/tin-spa.mjs +425 -121
  24. package/fesm2020/tin-spa.mjs.map +1 -1
  25. package/lib/classes/Classes.d.ts +29 -8
  26. package/lib/components/filter/filter.component.d.ts +2 -1
  27. package/lib/components/form/form.component.d.ts +6 -1
  28. package/lib/components/option/option.component.d.ts +3 -1
  29. package/lib/components/search/search.component.d.ts +13 -0
  30. package/lib/components/table/detailsDialog.component.d.ts +3 -1
  31. package/lib/components/table/table.component.d.ts +12 -4
  32. package/lib/components/tiles/tiles.component.d.ts +15 -5
  33. package/lib/components/viewer/viewer.component.d.ts +19 -0
  34. package/lib/components/viewer/viewerDialog.component.d.ts +22 -0
  35. package/lib/tin-spa.module.d.ts +7 -4
  36. package/package.json +1 -1
  37. package/public-api.d.ts +3 -0
@@ -3,6 +3,14 @@ export declare class Action {
3
3
  url: string;
4
4
  params?: any[];
5
5
  successMessage?: string;
6
+ isFormData?: boolean;
7
+ }
8
+ export declare class SearchConfig {
9
+ fields: SearchField[];
10
+ searchAction?: Action;
11
+ }
12
+ export interface SearchField extends Field {
13
+ show?: boolean;
6
14
  }
7
15
  export declare class FormConfig {
8
16
  fields: Field[];
@@ -31,7 +39,8 @@ export interface Condition {
31
39
  }
32
40
  export interface Field {
33
41
  name: string;
34
- type: 'text' | 'date' | 'checkbox' | 'select' | 'multi-select' | 'money' | 'number' | 'section' | 'blank';
42
+ type: 'text' | 'date' | 'datetime' | 'checkbox' | 'select' | 'multi-select' | 'money' | 'number' | 'section' | 'blank' | 'chip' | 'file' | 'file-view';
43
+ alias?: string;
35
44
  options?: any[];
36
45
  optionDisplay?: string;
37
46
  optionValue?: string;
@@ -43,18 +52,23 @@ export interface Field {
43
52
  span?: boolean;
44
53
  }
45
54
  export declare class TableConfig {
55
+ title?: string;
46
56
  columns?: Column[];
47
57
  showFilter?: boolean;
48
58
  formConfig?: FormConfig;
59
+ searchConfig?: SearchConfig;
60
+ tileConfig?: TileConfig;
49
61
  minColumns?: string[];
50
62
  buttons?: Button[];
51
63
  loadAction?: Action;
52
64
  }
53
65
  export interface Column {
54
66
  name: string;
55
- type?: 'text' | 'date' | 'checkbox' | 'select' | 'multi-select' | 'money' | 'number';
67
+ type?: 'text' | 'date' | 'datetime' | 'checkbox' | 'select' | 'multi-select' | 'money' | 'number' | 'chip';
56
68
  alias?: string;
57
69
  icon?: Icon;
70
+ icons?: Icon[];
71
+ options?: any[];
58
72
  }
59
73
  export interface Icon {
60
74
  name: string;
@@ -62,12 +76,19 @@ export interface Icon {
62
76
  tip?: string;
63
77
  condition?: (value: any) => boolean;
64
78
  }
65
- export declare class Tile {
66
- tileName: string;
67
- tileValue: string;
68
- tileColor: string;
69
- selected: string;
70
- visible?: boolean;
79
+ export declare class TileConfig {
80
+ tiles: Tile[];
81
+ loadAction?: Action;
82
+ loadInit?: boolean;
83
+ clickable?: boolean;
84
+ }
85
+ export interface Tile {
86
+ name: string;
87
+ alias?: string;
88
+ value?: string;
89
+ color?: string;
90
+ selectedTile?: string;
91
+ hidden?: boolean;
71
92
  info?: string;
72
93
  }
73
94
  export declare class Step {
@@ -5,6 +5,7 @@ export declare class FilterComponent implements OnInit {
5
5
  constructor();
6
6
  ngOnInit(): void;
7
7
  ngOnChanges(): void;
8
+ showButton: boolean;
8
9
  data: MatTableDataSource<unknown>;
9
10
  refreshClick: EventEmitter<any>;
10
11
  _filterText: string;
@@ -12,5 +13,5 @@ export declare class FilterComponent implements OnInit {
12
13
  applyFilter(filterValue: string): void;
13
14
  refreshClicked(): void;
14
15
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "spa-filter", never, { "data": "data"; }, { "refreshClick": "refreshClick"; }, never, never, false>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterComponent, "spa-filter", never, { "showButton": "showButton"; "data": "data"; }, { "refreshClick": "refreshClick"; }, never, never, false>;
16
17
  }
@@ -9,6 +9,8 @@ export declare class FormComponent implements OnInit {
9
9
  constructor(messageService: MessageService, dataService: DataServiceLib);
10
10
  ngOnInit(): void;
11
11
  ngOnChanges(): void;
12
+ fileField: Field;
13
+ files: any[];
12
14
  fields: Field[];
13
15
  buttonDisplay: string;
14
16
  isProcessing: boolean;
@@ -16,8 +18,11 @@ export declare class FormComponent implements OnInit {
16
18
  data: any;
17
19
  config: FormConfig;
18
20
  buttonClick: EventEmitter<any>;
21
+ inputChange: EventEmitter<any>;
22
+ inputChanged(name: any, value: any): void;
19
23
  buttonClicked(): void;
20
24
  processCall(button: Button): void;
25
+ processForm(): void;
21
26
  static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "spa-form", never, { "data": "data"; "config": "config"; }, { "buttonClick": "buttonClick"; }, never, never, false>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "spa-form", never, { "files": "files"; "data": "data"; "config": "config"; }, { "buttonClick": "buttonClick"; "inputChange": "inputChange"; }, never, never, false>;
23
28
  }
@@ -8,14 +8,16 @@ export declare class OptionComponent implements OnInit {
8
8
  optionValue: string;
9
9
  optionDisplay: string;
10
10
  readonly: boolean;
11
+ type: string;
11
12
  value: string;
12
13
  display: string;
13
14
  show: boolean;
14
15
  valueChange: EventEmitter<any>;
15
16
  enterPress: EventEmitter<any>;
16
17
  changed(): void;
18
+ dateChanged(x: any): void;
17
19
  enterPressed(): void;
18
20
  resetValue(): void;
19
21
  static ɵfac: i0.ɵɵFactoryDeclaration<OptionComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent, "spa-option", never, { "options": "options"; "optionValue": "optionValue"; "optionDisplay": "optionDisplay"; "readonly": "readonly"; "value": "value"; "display": "display"; "show": "show"; }, { "valueChange": "valueChange"; "enterPress": "enterPress"; }, never, never, false>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent, "spa-option", never, { "options": "options"; "optionValue": "optionValue"; "optionDisplay": "optionDisplay"; "readonly": "readonly"; "type": "type"; "value": "value"; "display": "display"; "show": "show"; }, { "valueChange": "valueChange"; "enterPress": "enterPress"; }, never, never, false>;
21
23
  }
@@ -0,0 +1,13 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { SearchConfig } from '../../classes/Classes';
3
+ import * as i0 from "@angular/core";
4
+ export declare class SearchComponent implements OnInit {
5
+ constructor();
6
+ ngOnInit(): void;
7
+ data: any;
8
+ config: SearchConfig;
9
+ searchClick: EventEmitter<any>;
10
+ search(): void;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<SearchComponent, "spa-search", never, { "config": "config"; }, { "searchClick": "searchClick"; }, never, never, false>;
13
+ }
@@ -1,6 +1,6 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { MatDialogRef } from '@angular/material/dialog';
3
- import { FormConfig, TableConfig } from '../../classes/Classes';
3
+ import { FormConfig, Field, TableConfig } from '../../classes/Classes';
4
4
  import { MessageService } from '../../services/message.service';
5
5
  import { DataServiceLib } from '../../services/data.service';
6
6
  import * as i0 from "@angular/core";
@@ -11,6 +11,8 @@ export declare class detailsDialog implements OnInit {
11
11
  data: any;
12
12
  constructor(dataService: DataServiceLib, messageService: MessageService, dialogRef: MatDialogRef<detailsDialog>, data: any);
13
13
  ngOnInit(): void;
14
+ fileField: Field;
15
+ files: any[];
14
16
  tableConfig: TableConfig;
15
17
  details: any;
16
18
  formConfig: FormConfig;
@@ -1,10 +1,11 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
- import { Button, Column, TableConfig } from '../../classes/Classes';
2
+ import { Action, Button, Column, Icon, TableConfig } from '../../classes/Classes';
3
3
  import { MatPaginator } from '@angular/material/paginator';
4
4
  import { MessageService } from '../../services/message.service';
5
5
  import { MatDialog } from '@angular/material/dialog';
6
6
  import { BreakpointObserver } from '@angular/cdk/layout';
7
7
  import { DataServiceLib } from '../../services/data.service';
8
+ import { Subject } from 'rxjs';
8
9
  import * as i0 from "@angular/core";
9
10
  export declare class TableComponent implements OnInit {
10
11
  private dataService;
@@ -14,11 +15,15 @@ export declare class TableComponent implements OnInit {
14
15
  constructor(dataService: DataServiceLib, messageService: MessageService, breakpointObserver: BreakpointObserver, dialog: MatDialog);
15
16
  ngOnInit(): void;
16
17
  actionsWidth: string;
18
+ showFilterButton: boolean;
19
+ tileReload: Subject<boolean>;
17
20
  ngOnChanges(): void;
18
21
  tablePaginator: MatPaginator;
19
22
  data: any;
20
23
  config: TableConfig;
24
+ dataLoad: EventEmitter<any>;
21
25
  refreshClick: EventEmitter<any>;
26
+ searchClick: EventEmitter<any>;
22
27
  createClick: EventEmitter<any>;
23
28
  viewClick: EventEmitter<any>;
24
29
  editClick: EventEmitter<any>;
@@ -42,10 +47,12 @@ export declare class TableComponent implements OnInit {
42
47
  getIcon(buttonName: string): string;
43
48
  setColumns(): void;
44
49
  getOptions(column: any): Column;
45
- testIconCondition(column: string, row: any): boolean;
50
+ testIconCondition(value: any, icon: Icon): boolean;
46
51
  testDisabled(row: any, buttonName: string): boolean;
47
52
  testVisible(row: any, buttonName: string): boolean;
53
+ searchClicked(x: any): void;
48
54
  refreshClicked(): void;
55
+ dataLoaded(x: any): void;
49
56
  view(x: any): void;
50
57
  create(x: any): void;
51
58
  edit(x: any): void;
@@ -58,8 +65,9 @@ export declare class TableComponent implements OnInit {
58
65
  editModel(row: any): void;
59
66
  deleteModel(row: any): void;
60
67
  doAction(buttonName: any, row: any): void;
61
- loadData(): void;
68
+ loadData(action: Action, data: any): void;
62
69
  formDefaults(): void;
70
+ getColor(v: any, options: any): any;
63
71
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
64
- static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "spa-table", never, { "data": "data"; "config": "config"; }, { "refreshClick": "refreshClick"; "createClick": "createClick"; "viewClick": "viewClick"; "editClick": "editClick"; "deleteClick": "deleteClick"; "custom1Click": "custom1Click"; "custom2Click": "custom2Click"; "custom3Click": "custom3Click"; }, never, never, false>;
72
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "spa-table", never, { "data": "data"; "config": "config"; }, { "dataLoad": "dataLoad"; "refreshClick": "refreshClick"; "searchClick": "searchClick"; "createClick": "createClick"; "viewClick": "viewClick"; "editClick": "editClick"; "deleteClick": "deleteClick"; "custom1Click": "custom1Click"; "custom2Click": "custom2Click"; "custom3Click": "custom3Click"; }, never, never, false>;
65
73
  }
@@ -1,14 +1,24 @@
1
1
  import { EventEmitter, OnInit } from '@angular/core';
2
- import { Tile } from '../../classes/Classes';
2
+ import { Action, Tile, TileConfig } from '../../classes/Classes';
3
+ import { DataServiceLib } from '../../services/data.service';
4
+ import { MessageService } from '../../services/message.service';
5
+ import { Subject } from 'rxjs';
3
6
  import * as i0 from "@angular/core";
4
7
  export declare class TilesComponent implements OnInit {
5
- constructor();
8
+ private dataService;
9
+ private messageService;
10
+ constructor(dataService: DataServiceLib, messageService: MessageService);
6
11
  ngOnInit(): void;
12
+ ngOnChanges(): void;
7
13
  tiles: Tile[];
8
- clickable: boolean;
14
+ config: TileConfig;
15
+ data: any;
16
+ reload: Subject<boolean>;
9
17
  tileClick: EventEmitter<any>;
10
- selected: string;
18
+ selectedTile: string;
11
19
  clicked(v: Tile): void;
20
+ pop(x: any): void;
21
+ loadData(action: Action, data: any): void;
12
22
  static ɵfac: i0.ɵɵFactoryDeclaration<TilesComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<TilesComponent, "spa-tiles", never, { "tiles": "tiles"; "clickable": "clickable"; }, { "tileClick": "tileClick"; }, never, never, false>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<TilesComponent, "spa-tiles", never, { "config": "config"; "data": "data"; "reload": "reload"; }, { "tileClick": "tileClick"; }, never, never, false>;
14
24
  }
@@ -0,0 +1,19 @@
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { MatDialog } from '@angular/material/dialog';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ViewerComponent implements OnInit {
5
+ dialog: MatDialog;
6
+ constructor(dialog: MatDialog);
7
+ ngOnInit(): void;
8
+ path: string;
9
+ folderName: string;
10
+ fileNames: any;
11
+ removable: boolean;
12
+ remove: EventEmitter<any>;
13
+ display: string;
14
+ title: string;
15
+ viewDocs(fileName: string): void;
16
+ removed(i: any): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ViewerComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<ViewerComponent, "spa-viewer", never, { "path": "path"; "folderName": "folderName"; "fileNames": "fileNames"; "removable": "removable"; "display": "display"; "title": "title"; }, { "remove": "remove"; }, never, never, false>;
19
+ }
@@ -0,0 +1,22 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { HttpService } from '../../services/http.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class viewerDialog implements OnInit {
5
+ private httpService;
6
+ data: any;
7
+ constructor(httpService: HttpService, data: any);
8
+ ngOnInit(): void;
9
+ isProcessing: boolean;
10
+ path: string;
11
+ fileNames: any[];
12
+ fileName: string;
13
+ currIndex: number;
14
+ currentFileUrl: string;
15
+ previous(): void;
16
+ next(): void;
17
+ imageDoc: boolean;
18
+ setURL(): void;
19
+ change(fileName: any): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<viewerDialog, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<viewerDialog, "app-editRequest", never, {}, {}, never, never, false>;
22
+ }
@@ -22,11 +22,14 @@ import * as i20 from "./components/table/detailsDialog.component";
22
22
  import * as i21 from "./components/form/form.component";
23
23
  import * as i22 from "./pipes/camelToWords.pipe";
24
24
  import * as i23 from "./components/number/number.component";
25
- import * as i24 from "./modules/spa-mat.module";
26
- import * as i25 from "@angular/common/http";
27
- import * as i26 from "./components/money/currency-input-mask.module";
25
+ import * as i24 from "./components/search/search.component";
26
+ import * as i25 from "./components/viewer/viewer.component";
27
+ import * as i26 from "./components/viewer/viewerDialog.component";
28
+ import * as i27 from "./modules/spa-mat.module";
29
+ import * as i28 from "@angular/common/http";
30
+ import * as i29 from "./components/money/currency-input-mask.module";
28
31
  export declare class TinSpaModule {
29
32
  static ɵfac: i0.ɵɵFactoryDeclaration<TinSpaModule, never>;
30
- static ɵmod: i0.ɵɵNgModuleDeclaration<TinSpaModule, [typeof i1.TinSpaComponent, typeof i2.TextComponent, typeof i3.CheckComponent, typeof i4.DateComponent, typeof i5.DatetimeComponent, typeof i6.LabelComponent, typeof i7.SelectComponent, typeof i8.ActivityComponent, typeof i9.FilterComponent, typeof i10.messageDialog, typeof i11.MoneyComponent, typeof i12.OptionComponent, typeof i13.TilesComponent, typeof i14.StepsComponent, typeof i15.AttachComponent, typeof i16.ChipsComponent, typeof i17.LoaderComponent, typeof i18.NavMenuComponent, typeof i19.TableComponent, typeof i20.detailsDialog, typeof i21.FormComponent, typeof i22.CamelToWordsPipe, typeof i23.NumberComponent], [typeof i24.SpaMatModule, typeof i25.HttpClientModule, typeof i26.CurrencyInputModule], [typeof i1.TinSpaComponent, typeof i24.SpaMatModule, typeof i2.TextComponent, typeof i10.messageDialog, typeof i18.NavMenuComponent, typeof i17.LoaderComponent, typeof i13.TilesComponent, typeof i4.DateComponent, typeof i7.SelectComponent, typeof i5.DatetimeComponent, typeof i3.CheckComponent, typeof i15.AttachComponent, typeof i11.MoneyComponent, typeof i16.ChipsComponent, typeof i8.ActivityComponent, typeof i12.OptionComponent, typeof i6.LabelComponent, typeof i14.StepsComponent, typeof i9.FilterComponent, typeof i19.TableComponent, typeof i20.detailsDialog, typeof i21.FormComponent, typeof i23.NumberComponent]>;
33
+ static ɵmod: i0.ɵɵNgModuleDeclaration<TinSpaModule, [typeof i1.TinSpaComponent, typeof i2.TextComponent, typeof i3.CheckComponent, typeof i4.DateComponent, typeof i5.DatetimeComponent, typeof i6.LabelComponent, typeof i7.SelectComponent, typeof i8.ActivityComponent, typeof i9.FilterComponent, typeof i10.messageDialog, typeof i11.MoneyComponent, typeof i12.OptionComponent, typeof i13.TilesComponent, typeof i14.StepsComponent, typeof i15.AttachComponent, typeof i16.ChipsComponent, typeof i17.LoaderComponent, typeof i18.NavMenuComponent, typeof i19.TableComponent, typeof i20.detailsDialog, typeof i21.FormComponent, typeof i22.CamelToWordsPipe, typeof i23.NumberComponent, typeof i24.SearchComponent, typeof i25.ViewerComponent, typeof i26.viewerDialog], [typeof i27.SpaMatModule, typeof i28.HttpClientModule, typeof i29.CurrencyInputModule], [typeof i1.TinSpaComponent, typeof i27.SpaMatModule, typeof i2.TextComponent, typeof i10.messageDialog, typeof i18.NavMenuComponent, typeof i17.LoaderComponent, typeof i13.TilesComponent, typeof i4.DateComponent, typeof i7.SelectComponent, typeof i5.DatetimeComponent, typeof i3.CheckComponent, typeof i15.AttachComponent, typeof i11.MoneyComponent, typeof i16.ChipsComponent, typeof i8.ActivityComponent, typeof i12.OptionComponent, typeof i6.LabelComponent, typeof i14.StepsComponent, typeof i9.FilterComponent, typeof i19.TableComponent, typeof i20.detailsDialog, typeof i21.FormComponent, typeof i23.NumberComponent, typeof i24.SearchComponent, typeof i25.ViewerComponent, typeof i26.viewerDialog]>;
31
34
  static ɵinj: i0.ɵɵInjectorDeclaration<TinSpaModule>;
32
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tin-spa",
3
- "version": "2.1.2",
3
+ "version": "2.1.3",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.2.0",
6
6
  "@angular/core": "^14.2.0"
package/public-api.d.ts CHANGED
@@ -49,3 +49,6 @@ export * from './lib/components/table/table.component';
49
49
  export * from './lib/components/table/detailsDialog.component';
50
50
  export * from './lib/components/form/form.component';
51
51
  export * from './lib/components/number/number.component';
52
+ export * from './lib/components/search/search.component';
53
+ export * from './lib/components/viewer/viewer.component';
54
+ export * from './lib/components/viewer/viewerDialog.component';