@dative-gpi/foundation-core-domain 0.0.9 → 0.0.11
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.
- package/models/index.ts +1 -1
- package/models/tables/columnDetails.ts +16 -0
- package/models/{userOrganisationDispositions/userOrganisationDispositionInfos.ts → tables/columnInfos.ts} +13 -15
- package/models/tables/index.ts +6 -0
- package/models/tables/tableDetails.ts +19 -0
- package/models/tables/tableFilter.ts +17 -0
- package/models/tables/tableInfos.ts +29 -0
- package/models/tables/tableOrder.ts +14 -0
- package/package.json +2 -2
- package/models/userOrganisationDispositions/index.ts +0 -2
- package/models/userOrganisationDispositions/userOrganisationDispositionDetails.ts +0 -16
package/models/index.ts
CHANGED
|
@@ -38,7 +38,7 @@ export * from "./scenarioDiffusions";
|
|
|
38
38
|
export * from "./scenarioOrganisations";
|
|
39
39
|
export * from "./scenarioOrganisationTypes";
|
|
40
40
|
export * from "./shared"; // No service
|
|
41
|
-
export * from "./
|
|
41
|
+
export * from "./tables";
|
|
42
42
|
export * from "./userOrganisations";
|
|
43
43
|
export * from "./widgets"; // No service
|
|
44
44
|
export * from "./widgetTemplates";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ColumnInfos, ColumnInfosDTO } from "./columnInfos";
|
|
2
|
+
|
|
3
|
+
export class ColumnDetails extends ColumnInfos {
|
|
4
|
+
constructor(dto: ColumnInfosDTO) {
|
|
5
|
+
super(dto);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ColumnDetailsDTO extends ColumnInfosDTO {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface UpdateColumnDTO {
|
|
13
|
+
columnId: string;
|
|
14
|
+
index: number;
|
|
15
|
+
hidden: boolean;
|
|
16
|
+
}
|
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
export class
|
|
1
|
+
export class ColumnInfos {
|
|
2
2
|
columnId: string;
|
|
3
|
-
|
|
3
|
+
text: string;
|
|
4
4
|
value: string;
|
|
5
|
-
index: number;
|
|
6
|
-
hidden: boolean;
|
|
7
5
|
sortable: boolean;
|
|
8
6
|
filterable: boolean;
|
|
9
|
-
|
|
7
|
+
// Depends on [OrganisationType, UserOrganisation]
|
|
8
|
+
index: number;
|
|
9
|
+
hidden: boolean;
|
|
10
10
|
|
|
11
|
-
constructor(dto:
|
|
11
|
+
constructor(dto: ColumnInfosDTO) {
|
|
12
12
|
this.columnId = dto.columnId;
|
|
13
|
-
this.
|
|
13
|
+
this.text = dto.text;
|
|
14
14
|
this.value = dto.value;
|
|
15
|
-
this.index = dto.index;
|
|
16
|
-
this.hidden = dto.hidden;
|
|
17
15
|
this.sortable = dto.sortable;
|
|
18
16
|
this.filterable = dto.filterable;
|
|
19
|
-
this.
|
|
17
|
+
this.index = dto.index;
|
|
18
|
+
this.hidden = dto.hidden;
|
|
20
19
|
}
|
|
21
20
|
}
|
|
22
21
|
|
|
23
|
-
export interface
|
|
22
|
+
export interface ColumnInfosDTO {
|
|
24
23
|
columnId: string;
|
|
25
|
-
|
|
24
|
+
text: string;
|
|
26
25
|
value: string;
|
|
27
|
-
index: number;
|
|
28
|
-
hidden: boolean;
|
|
29
26
|
sortable: boolean;
|
|
30
27
|
filterable: boolean;
|
|
31
|
-
|
|
28
|
+
index: number;
|
|
29
|
+
hidden: boolean;
|
|
32
30
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { TableInfos, TableInfosDTO } from "./tableInfos";
|
|
2
|
+
import { UpdateColumnDTO } from "./columnDetails";
|
|
3
|
+
import { TableOrderDTO } from "./tableOrder";
|
|
4
|
+
|
|
5
|
+
export class TableDetails extends TableInfos {
|
|
6
|
+
constructor(dto: TableDetailsDTO) {
|
|
7
|
+
super(dto);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface TableDetailsDTO extends TableInfosDTO {
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface UpdateTableDTO {
|
|
15
|
+
mode: "table" | "iterator";
|
|
16
|
+
rowsPerPage: number;
|
|
17
|
+
columns: UpdateColumnDTO[];
|
|
18
|
+
sortBy: TableOrderDTO | undefined;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class TableFilter {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string;
|
|
4
|
+
hidden: boolean;
|
|
5
|
+
|
|
6
|
+
constructor(dto: TableFilterDTO) {
|
|
7
|
+
this.key = dto.key;
|
|
8
|
+
this.value = dto.value;
|
|
9
|
+
this.hidden = dto.hidden;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface TableFilterDTO {
|
|
14
|
+
key: string;
|
|
15
|
+
value: string;
|
|
16
|
+
hidden: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ColumnInfos, ColumnInfosDTO } from "./columnInfos";
|
|
2
|
+
import { TableOrder, TableOrderDTO } from "./tableOrder";
|
|
3
|
+
|
|
4
|
+
export class TableInfos {
|
|
5
|
+
id: string;
|
|
6
|
+
code: string;
|
|
7
|
+
mode: "table" | "iterator";
|
|
8
|
+
columns: ColumnInfos[];
|
|
9
|
+
sortBy: TableOrder | undefined;
|
|
10
|
+
rowsPerPage: number;
|
|
11
|
+
|
|
12
|
+
constructor(dto: TableInfosDTO) {
|
|
13
|
+
this.id = dto.id;
|
|
14
|
+
this.code = dto.code;
|
|
15
|
+
this.mode = dto.mode;
|
|
16
|
+
this.columns = dto.columns?.map(dto => new ColumnInfos(dto)) ?? [];
|
|
17
|
+
this.sortBy = dto.sortBy ? new TableOrder(dto.sortBy) : undefined;
|
|
18
|
+
this.rowsPerPage = dto.rowsPerPage;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface TableInfosDTO {
|
|
23
|
+
id: string;
|
|
24
|
+
code: string;
|
|
25
|
+
mode: "table" | "iterator";
|
|
26
|
+
columns: ColumnInfosDTO[];
|
|
27
|
+
sortBy: TableOrderDTO | undefined;
|
|
28
|
+
rowsPerPage: number;
|
|
29
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-domain",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
"main": "index.ts",
|
|
9
9
|
"author": "",
|
|
10
10
|
"license": "ISC",
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "4f28939e7d42ab1ef8319c614fbc210b1291fd79"
|
|
12
12
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { UserOrganisationDispositionInfos, UserOrganisationDispositionInfosDTO } from "./userOrganisationDispositionInfos";
|
|
2
|
-
|
|
3
|
-
export class UserOrganisationDispositionDetails extends UserOrganisationDispositionInfos {
|
|
4
|
-
constructor(dto: UserOrganisationDispositionDetailsDTO) {
|
|
5
|
-
super(dto);
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export interface UserOrganisationDispositionDetailsDTO extends UserOrganisationDispositionInfosDTO {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export interface UpdateUserOrganisationDispositionDTO {
|
|
13
|
-
columnId: string;
|
|
14
|
-
index: number;
|
|
15
|
-
hidden: boolean;
|
|
16
|
-
}
|