1
- import { IColumn , ISelection } from '@fluentui/react' ;
2
- import * as React from 'react' ;
3
-
4
1
export type EntityMetadata = ComponentFramework . PropertyHelper . EntityMetadata ;
5
2
6
- export type RetriveRecords = ComponentFramework . WebApi . RetrieveMultipleResponse ;
3
+ export type RetrieveRecords = ComponentFramework . WebApi . RetrieveMultipleResponse ;
7
4
8
5
export type Entity = ComponentFramework . WebApi . Entity ;
9
6
@@ -20,133 +17,27 @@ export interface OrderInFetchXml {
20
17
isLinkEntity : boolean ;
21
18
}
22
19
23
- export interface IDataverseService {
24
- getProps ( ) : IAppWrapperProps ;
25
- getEntityDisplayName ( entityName : string ) : Promise < string > ;
26
- getTimeZoneDefinitions ( ) : Promise < Object > ;
27
- getWholeNumberFieldName (
28
- format : string ,
29
- entity : Entity ,
30
- fieldName : string ,
31
- timeZoneDefinitions : any ) : string ;
32
- getRecordsCount ( fetchXml : string ) : Promise < number > ;
33
- getEntityMetadata ( entityName : string , attributesFieldNames : string [ ] ) : Promise < EntityMetadata > ;
34
- getCurrentPageRecords ( fetchXml : string | null ) : Promise < RetriveRecords > ;
35
- openRecord ( entityName : string , entityId : string ) : void ;
36
- openLookupForm ( entity : Entity , fieldName : string ) : void ;
37
- openLinkEntityRecord ( entity : Entity , fieldName : string ) : void ;
38
- openPrimaryEntityForm ( entity : Entity , entityName : string ) : void ;
39
- showNotificationPopup ( error : Error | undefined ) : Promise < void > ;
40
- openRecordDeleteDialog (
41
- selectedRecordIds : string [ ] ,
42
- entityName : string ,
43
- setDialogAccepted : ( value : any ) => void ) : Promise < void > ;
44
- getAllocatedWidth ( ) : number ;
45
- }
46
-
47
20
export interface EntityAttribute {
48
21
linkEntityAlias ?: string ;
49
22
name : string ;
50
23
attributeAlias : string ;
51
24
}
52
25
53
- export interface IItemProps {
54
- timeZoneDefinitions : any ;
55
- item : Entity ;
56
- isLinkEntity : boolean ;
57
- entityMetadata : EntityMetadata ;
58
- attributeType : number ;
59
- fieldName : string ;
60
- entity : Entity ;
26
+ export interface IRecordsData {
61
27
pagingFetchData : string ;
62
- index : number ;
63
- hasAliasValue : boolean ;
64
- }
65
-
66
- export interface IAppWrapperProps extends IService < IDataverseService > {
67
- fetchXmlOrJson : string | null ;
68
- allocatedWidth : number ;
69
- default : {
70
- fetchXml : string | null ;
71
- pageSize : number ;
72
- deleteButtonVisibility : boolean ;
73
- newButtonVisibility : boolean ;
74
- }
75
- }
76
-
77
- export interface IFetchToSubgridProps {
78
- fetchXml : string | null ;
79
- _service : IDataverseService ;
80
- pageSize : number ;
81
- deleteButtonVisibility : boolean ;
82
- newButtonVisibility : boolean ;
83
- allocatedWidth : number ;
84
- error ?: Error ;
85
- setIsLoading : ( isLoading : boolean ) => void ;
86
- setError : ( error ?: Error | undefined ) => void ;
87
- }
88
-
89
- export interface IListProps extends IService < IDataverseService > {
90
- entityName : string ;
91
- fetchXml : string | null ;
92
- pageSize : number ;
93
- forceReRender : number ;
94
- currentPage : number ;
95
- recordIds : React . MutableRefObject < string [ ] > ;
96
- columns : IColumn [ ] ;
97
- items : Entity [ ] ;
98
- firstItemIndex : React . MutableRefObject < number > ;
99
- lastItemIndex : React . MutableRefObject < number > ;
100
- selectedItemsCount : React . MutableRefObject < number > ;
101
- totalRecordsCount : number ;
102
- nextButtonDisabled : React . MutableRefObject < boolean > ;
103
- setItems : React . Dispatch < React . SetStateAction < ComponentFramework . WebApi . Entity [ ] > > ;
104
- setColumns : React . Dispatch < React . SetStateAction < IColumn [ ] > > ;
105
- setCurrentPage : React . Dispatch < React . SetStateAction < number > > ;
106
- selection : ISelection ;
107
- }
108
-
109
- export interface ICommandBarProps extends IService < IDataverseService > {
110
- isButtonActive : boolean ;
111
- entityName : string ;
112
- selectedRecordIds : string [ ] ;
113
- displayName : string ;
114
- newButtonVisibility : boolean ;
115
- deleteButtonVisibility : boolean | string ;
116
- setDialogAccepted : React . Dispatch < React . SetStateAction < boolean > > ;
117
- }
118
-
119
- export interface IFooterProps {
120
- firstItemIndex : number ;
121
- lastItemIndex : number ;
122
- selectedItemsCount : number ;
123
- totalRecordsCount : number ;
124
- currentPage : number ;
125
- nextButtonDisable : boolean ;
126
- movePreviousIsDisabled : boolean ;
127
- setCurrentPage : ( page : number ) => void ;
128
- }
129
-
130
- export interface IInfoMessageProps {
131
- error ?: Error ;
132
- dataverseService : IDataverseService ;
133
- }
134
-
135
- export interface ILinkableItemProps extends IService < IDataverseService > {
136
- item : Entity
137
- }
138
-
139
- export interface IJsonProps {
140
- newButtonVisibility : boolean ;
141
- deleteButtonVisibility : boolean ;
142
- pageSize : number ;
143
- fetchXml : string ;
28
+ attributesFieldNames : string [ ] ;
29
+ entityName :string ;
30
+ records : RetrieveRecords ;
31
+ entityMetadata : EntityMetadata ;
32
+ linkEntityNames : string [ ] ;
33
+ linkEntityAttributes : EntityAttribute [ ] [ ] ;
34
+ linkentityMetadata : EntityMetadata ;
35
+ timeZoneDefinitions : Object ;
36
+ entityAliases : string [ ] ;
144
37
}
145
38
146
- export type JsonAllowedProps = Array < keyof IJsonProps > ;
147
-
148
- declare global {
149
- interface String {
150
- hashCode ( ) : number ;
151
- }
39
+ export interface IItemsData {
40
+ fetchXml : string | null ,
41
+ pageSize : number ,
42
+ currentPage : number ,
152
43
}
0 commit comments