tin-spa 2.1.3 → 2.1.4

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.
@@ -20,7 +20,7 @@ export declare class FormConfig {
20
20
  reset?: boolean;
21
21
  }
22
22
  export interface Button {
23
- name: 'create' | 'view' | 'edit' | 'delete' | 'custom1' | 'custom2' | 'custom3';
23
+ name: string;
24
24
  visible?: (value: any) => boolean;
25
25
  display?: string;
26
26
  icon?: Icon;
@@ -39,7 +39,7 @@ export interface Condition {
39
39
  }
40
40
  export interface Field {
41
41
  name: string;
42
- type: 'text' | 'date' | 'datetime' | 'checkbox' | 'select' | 'multi-select' | 'money' | 'number' | 'section' | 'blank' | 'chip' | 'file' | 'file-view';
42
+ type: 'text' | 'date' | 'datetime' | 'checkbox' | 'select' | 'multi-select' | 'money' | 'number' | 'section' | 'blank' | 'chip' | 'file' | 'file-view' | 'icon' | 'spinner';
43
43
  alias?: string;
44
44
  options?: any[];
45
45
  optionDisplay?: string;
@@ -50,6 +50,8 @@ export interface Field {
50
50
  max?: any;
51
51
  rows?: number;
52
52
  span?: boolean;
53
+ readonly?: boolean;
54
+ hidden?: boolean;
53
55
  }
54
56
  export declare class TableConfig {
55
57
  title?: string;
@@ -64,7 +66,7 @@ export declare class TableConfig {
64
66
  }
65
67
  export interface Column {
66
68
  name: string;
67
- type?: 'text' | 'date' | 'datetime' | 'checkbox' | 'select' | 'multi-select' | 'money' | 'number' | 'chip';
69
+ type?: 'text' | 'date' | 'datetime' | 'checkbox' | 'select' | 'multi-select' | 'money' | 'number' | 'chip' | 'icon' | 'spinner';
68
70
  alias?: string;
69
71
  icon?: Icon;
70
72
  icons?: Icon[];
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnInit, EventEmitter } from '@angular/core';
2
2
  import { MatDialogRef } from '@angular/material/dialog';
3
3
  import { FormConfig, Field, TableConfig } from '../../classes/Classes';
4
4
  import { MessageService } from '../../services/message.service';
@@ -19,10 +19,12 @@ export declare class detailsDialog implements OnInit {
19
19
  smallScreen: boolean;
20
20
  isLoadComplete: boolean;
21
21
  isProcessing: boolean;
22
+ inputChange: EventEmitter<any>;
23
+ inputChanged(event: any): void;
22
24
  setMode(newMode: string): void;
23
25
  create(): void;
24
26
  edit(): void;
25
27
  delete(): void;
26
28
  static ɵfac: i0.ɵɵFactoryDeclaration<detailsDialog, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<detailsDialog, "app-viewModel", never, {}, {}, never, never, false>;
29
+ static ɵcmp: i0.ɵɵComponentDeclaration<detailsDialog, "app-viewModel", never, {}, { "inputChange": "inputChange"; }, never, never, false>;
28
30
  }
@@ -25,49 +25,36 @@ export declare class TableComponent implements OnInit {
25
25
  refreshClick: EventEmitter<any>;
26
26
  searchClick: EventEmitter<any>;
27
27
  createClick: EventEmitter<any>;
28
- viewClick: EventEmitter<any>;
29
- editClick: EventEmitter<any>;
30
- deleteClick: EventEmitter<any>;
31
- custom1Click: EventEmitter<any>;
32
- custom2Click: EventEmitter<any>;
33
- custom3Click: EventEmitter<any>;
28
+ actionClick: EventEmitter<any>;
29
+ inputChange: EventEmitter<any>;
30
+ inputChanged(event: any): void;
34
31
  smallScreen: boolean;
35
32
  createButton: Button;
36
- viewButton: any;
37
- editButton: any;
38
- deleteButton: any;
39
- custom1Button: any;
40
- custom2Button: any;
41
- custom3Button: any;
42
33
  tableDataSource: any;
43
34
  dataSource: any[];
44
35
  options: Column[];
45
36
  displayedColumns: any[];
37
+ formDefaults(): void;
38
+ setColumns(): void;
46
39
  getButton(name: string): Button;
47
40
  getIcon(buttonName: string): string;
48
- setColumns(): void;
41
+ getButtonColor(button: Button, row: any): string;
49
42
  getOptions(column: any): Column;
43
+ getColor(v: any, options: any): any;
50
44
  testIconCondition(value: any, icon: Icon): boolean;
51
45
  testDisabled(row: any, buttonName: string): boolean;
52
46
  testVisible(row: any, buttonName: string): boolean;
47
+ loadData(action: Action, data: any): void;
53
48
  searchClicked(x: any): void;
54
49
  refreshClicked(): void;
55
50
  dataLoaded(x: any): void;
56
- view(x: any): void;
57
- create(x: any): void;
58
- edit(x: any): void;
59
- delete(x: any): void;
60
- custom1(x: any): void;
61
- custom2(x: any): void;
62
- custom3(x: any): void;
51
+ actionClicked(name: any, row: any): void;
52
+ actionClickedEmit(name: any, row: any): void;
63
53
  viewModel(row: any): void;
64
54
  newModel(): void;
65
55
  editModel(row: any): void;
66
56
  deleteModel(row: any): void;
67
57
  doAction(buttonName: any, row: any): void;
68
- loadData(action: Action, data: any): void;
69
- formDefaults(): void;
70
- getColor(v: any, options: any): any;
71
58
  static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent, never>;
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>;
59
+ static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent, "spa-table", never, { "data": "data"; "config": "config"; }, { "dataLoad": "dataLoad"; "refreshClick": "refreshClick"; "searchClick": "searchClick"; "createClick": "createClick"; "actionClick": "actionClick"; "inputChange": "inputChange"; }, never, never, false>;
73
60
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tin-spa",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.2.0",
6
6
  "@angular/core": "^14.2.0"