@cxbox-ui/core 2.0.0-alpha.8 → 2.0.0
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/README.md +261 -28
- package/dist/core.d.ts +4274 -0
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -0
- package/package.json +20 -30
- package/dist/actions/index.d.ts +0 -1081
- package/dist/api/ObservableApi.d.ts +0 -53
- package/dist/api/ObservableApiWrapper.d.ts +0 -11
- package/dist/api/index.d.ts +0 -1
- package/dist/cxbox-ui-core.cjs.development.js +0 -3692
- package/dist/cxbox-ui-core.cjs.production.min.js +0 -2
- package/dist/cxbox-ui-core.esm.js +0 -3656
- package/dist/cxbox-ui-core.modern.development.js +0 -3586
- package/dist/cxbox-ui-core.modern.js +0 -3586
- package/dist/cxbox-ui-core.modern.production.min.js +0 -2
- package/dist/epics/data/bcCancelCreateDataEpic.d.ts +0 -9
- package/dist/epics/data/bcDeleteDataEpic.d.ts +0 -2
- package/dist/epics/data/bcFetchDataEpic.d.ts +0 -15
- package/dist/epics/data/bcFetchRowMetaRequestEpic.d.ts +0 -17
- package/dist/epics/data/bcLoadMoreEpic.d.ts +0 -2
- package/dist/epics/data/bcNewDataEpic.d.ts +0 -14
- package/dist/epics/data/bcSaveDataEpic.d.ts +0 -24
- package/dist/epics/data/bcSelectDepthRecordEpic.d.ts +0 -2
- package/dist/epics/data/bcSelectRecordEpic.d.ts +0 -2
- package/dist/epics/data/changeAssociationEpic.d.ts +0 -2
- package/dist/epics/data/changeAssociationFullEpic.d.ts +0 -5
- package/dist/epics/data/changeAssociationSameBcEpic.d.ts +0 -5
- package/dist/epics/data/changeChildrenAssociationsEpic.d.ts +0 -2
- package/dist/epics/data/changeChildrenAssociationsSameBcEpic.d.ts +0 -2
- package/dist/epics/data/changeDescendantsAssociationsFullEpic.d.ts +0 -5
- package/dist/epics/data/index.d.ts +0 -20
- package/dist/epics/data/inlinePickListFetchDataEpic.d.ts +0 -2
- package/dist/epics/data/removeMultivalueTagEpic.d.ts +0 -17
- package/dist/epics/data/saveAssociationsActiveEpic.d.ts +0 -7
- package/dist/epics/data/saveAssociationsPassiveEpic.d.ts +0 -7
- package/dist/epics/data/selectViewEpic.d.ts +0 -11
- package/dist/epics/index.d.ts +0 -6
- package/dist/epics/router/changeLocationEpic.d.ts +0 -10
- package/dist/epics/router/drilldownEpic.d.ts +0 -2
- package/dist/epics/router/handleRouterEpic.d.ts +0 -2
- package/dist/epics/router/index.d.ts +0 -10
- package/dist/epics/router/loginDoneEpic.d.ts +0 -9
- package/dist/epics/router/selectScreenEpic.d.ts +0 -7
- package/dist/epics/router/selectScreenFailEpic.d.ts +0 -7
- package/dist/epics/router/selectViewEpic.d.ts +0 -7
- package/dist/epics/router/selectViewFailEpic.d.ts +0 -6
- package/dist/epics/router/userDrillDownEpic.d.ts +0 -6
- package/dist/epics/router/userDrilldownChangeCursorsEpic.d.ts +0 -2
- package/dist/epics/screen/apiErrorEpic.d.ts +0 -2
- package/dist/epics/screen/downloadFileByUrlEpic.d.ts +0 -2
- package/dist/epics/screen/downloadFileEpic.d.ts +0 -2
- package/dist/epics/screen/httpError401Epic.d.ts +0 -2
- package/dist/epics/screen/httpError409Epic.d.ts +0 -2
- package/dist/epics/screen/httpError418Epic.d.ts +0 -2
- package/dist/epics/screen/httpError500Epic.d.ts +0 -2
- package/dist/epics/screen/httpErrorDefaultEpic.d.ts +0 -2
- package/dist/epics/screen/index.d.ts +0 -10
- package/dist/epics/screen/processPostInvokeConfirmEpic.d.ts +0 -2
- package/dist/epics/screen/processPostInvokeEpic.d.ts +0 -2
- package/dist/epics/session/index.d.ts +0 -5
- package/dist/epics/session/loginByAnotherRoleEpic.d.ts +0 -5
- package/dist/epics/session/loginDoneEpic.d.ts +0 -6
- package/dist/epics/session/refreshMetaAndReloadPageEpic.d.ts +0 -2
- package/dist/epics/session/refreshMetaEpic.d.ts +0 -5
- package/dist/epics/session/switchRoleEpic.d.ts +0 -5
- package/dist/epics/utils/postOperationRoutine.d.ts +0 -13
- package/dist/epics/view/clearPendingDataChangesAfterCursorChangeEpic.d.ts +0 -7
- package/dist/epics/view/fileUploadConfirmEpic.d.ts +0 -11
- package/dist/epics/view/getRowMetaByForceActiveEpic.d.ts +0 -5
- package/dist/epics/view/index.d.ts +0 -9
- package/dist/epics/view/selectTableCellInitEpic.d.ts +0 -2
- package/dist/epics/view/sendOperationAssociateEpic.d.ts +0 -5
- package/dist/epics/view/sendOperationEpic.d.ts +0 -10
- package/dist/epics/view/showAllTableRecordsInitEpic.d.ts +0 -2
- package/dist/epics/view/showAssocPopupEpic.d.ts +0 -2
- package/dist/epics/view/showFileUploadPopupEpic.d.ts +0 -5
- package/dist/index.d.ts +0 -7
- package/dist/interfaces/bc.d.ts +0 -79
- package/dist/interfaces/customEpics.d.ts +0 -15
- package/dist/interfaces/customMiddlewares.d.ts +0 -35
- package/dist/interfaces/data.d.ts +0 -48
- package/dist/interfaces/filters.d.ts +0 -32
- package/dist/interfaces/index.d.ts +0 -27
- package/dist/interfaces/navigation.d.ts +0 -48
- package/dist/interfaces/objectMap.d.ts +0 -36
- package/dist/interfaces/operation.d.ts +0 -336
- package/dist/interfaces/router.d.ts +0 -17
- package/dist/interfaces/rowMeta.d.ts +0 -74
- package/dist/interfaces/screen.d.ts +0 -28
- package/dist/interfaces/session.d.ts +0 -83
- package/dist/interfaces/store.d.ts +0 -14
- package/dist/interfaces/tree.d.ts +0 -66
- package/dist/interfaces/view.d.ts +0 -202
- package/dist/interfaces/widget.d.ts +0 -209
- package/dist/middlewares/autosaveMiddleware.d.ts +0 -2
- package/dist/middlewares/index.d.ts +0 -6
- package/dist/middlewares/popupMiddleware.d.ts +0 -2
- package/dist/middlewares/preInvokeMiddleware.d.ts +0 -5
- package/dist/middlewares/requiredFieldsMiddleware.d.ts +0 -30
- package/dist/reducers/ReducerBuilderManager.d.ts +0 -19
- package/dist/reducers/data.d.ts +0 -4
- package/dist/reducers/depthData.d.ts +0 -4
- package/dist/reducers/index.d.ts +0 -6
- package/dist/reducers/router.d.ts +0 -9
- package/dist/reducers/screen.d.ts +0 -10
- package/dist/reducers/session.d.ts +0 -10
- package/dist/reducers/view.d.ts +0 -10
- package/dist/utils/api.d.ts +0 -25
- package/dist/utils/apiError.d.ts +0 -19
- package/dist/utils/autosave.d.ts +0 -37
- package/dist/utils/bc.d.ts +0 -27
- package/dist/utils/breadthFirst.d.ts +0 -21
- package/dist/utils/cancelRequestEpic.d.ts +0 -27
- package/dist/utils/combineMiddlewares.d.ts +0 -3
- package/dist/utils/deleteUndefinedFromObject.d.ts +0 -1
- package/dist/utils/exportState.d.ts +0 -0
- package/dist/utils/extendPopupWidgetTypes.d.ts +0 -8
- package/dist/utils/filters.d.ts +0 -63
- package/dist/utils/hierarchy.d.ts +0 -17
- package/dist/utils/highlightJson.d.ts +0 -12
- package/dist/utils/history.d.ts +0 -50
- package/dist/utils/index.d.ts +0 -10
- package/dist/utils/operations.d.ts +0 -21
- package/dist/utils/others.d.ts +0 -6
- package/dist/utils/strings.d.ts +0 -44
- package/dist/utils/tree.d.ts +0 -43
- package/dist/utils/viewTabs.d.ts +0 -20
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,4274 @@
|
|
|
1
|
+
import { Action } from 'redux';
|
|
2
|
+
import { ActionCreatorWithNonInferrablePayload } from '@reduxjs/toolkit';
|
|
3
|
+
import { ActionCreatorWithOptionalPayload } from '@reduxjs/toolkit';
|
|
4
|
+
import { ActionCreatorWithoutPayload } from '@reduxjs/toolkit';
|
|
5
|
+
import { ActionReducerMapBuilder } from '@reduxjs/toolkit';
|
|
6
|
+
import { AnyAction } from 'redux';
|
|
7
|
+
import { AnyAction as AnyAction_2 } from '@reduxjs/toolkit';
|
|
8
|
+
import { AxiosError } from 'axios';
|
|
9
|
+
import { AxiosInstance } from 'axios';
|
|
10
|
+
import { AxiosRequestConfig } from 'axios';
|
|
11
|
+
import { CancelToken } from 'axios';
|
|
12
|
+
import { CaseReducer } from '@reduxjs/toolkit';
|
|
13
|
+
import { ComponentType } from 'react';
|
|
14
|
+
import { Dispatch } from 'redux';
|
|
15
|
+
import { Epic } from 'redux-observable';
|
|
16
|
+
import { Middleware } from 'redux';
|
|
17
|
+
import { Observable } from 'rxjs';
|
|
18
|
+
|
|
19
|
+
declare namespace actions {
|
|
20
|
+
export {
|
|
21
|
+
changeLocation,
|
|
22
|
+
login,
|
|
23
|
+
loginDone,
|
|
24
|
+
loginFail,
|
|
25
|
+
logout,
|
|
26
|
+
logoutDone,
|
|
27
|
+
selectScreen,
|
|
28
|
+
selectScreenFail,
|
|
29
|
+
selectView,
|
|
30
|
+
selectViewFail,
|
|
31
|
+
bcFetchDataRequest,
|
|
32
|
+
bcFetchDataPages,
|
|
33
|
+
inlinePickListFetchDataRequest,
|
|
34
|
+
bcFetchDataSuccess,
|
|
35
|
+
bcFetchDataFail,
|
|
36
|
+
bcLoadMore,
|
|
37
|
+
bcFetchRowMeta,
|
|
38
|
+
bcFetchRowMetaSuccess,
|
|
39
|
+
bcFetchRowMetaFail,
|
|
40
|
+
bcNewData,
|
|
41
|
+
bcNewDataSuccess,
|
|
42
|
+
bcNewDataFail,
|
|
43
|
+
bcDeleteDataFail,
|
|
44
|
+
forceActiveChangeFail,
|
|
45
|
+
sendOperation,
|
|
46
|
+
sendOperationFail,
|
|
47
|
+
sendOperationSuccess,
|
|
48
|
+
processPostInvoke,
|
|
49
|
+
processPreInvoke,
|
|
50
|
+
processPostInvokeConfirm,
|
|
51
|
+
userDrillDown,
|
|
52
|
+
userDrillDownSuccess,
|
|
53
|
+
drillDown,
|
|
54
|
+
bcChangeCursors,
|
|
55
|
+
bcChangeDepthCursor,
|
|
56
|
+
changeDataItem,
|
|
57
|
+
changeDataItems,
|
|
58
|
+
forceActiveRmUpdate,
|
|
59
|
+
showViewPopup,
|
|
60
|
+
showFileUploadPopup,
|
|
61
|
+
closeViewPopup,
|
|
62
|
+
viewPutPickMap,
|
|
63
|
+
viewClearPickMap,
|
|
64
|
+
saveAssociations,
|
|
65
|
+
changeAssociations,
|
|
66
|
+
removeMultivalueTag,
|
|
67
|
+
bcSaveDataSuccess,
|
|
68
|
+
bcSaveDataFail,
|
|
69
|
+
operationConfirmation,
|
|
70
|
+
bcForceUpdate,
|
|
71
|
+
uploadFile,
|
|
72
|
+
uploadFileDone,
|
|
73
|
+
uploadFileFailed,
|
|
74
|
+
bcCancelPendingChanges,
|
|
75
|
+
bcSelectRecord,
|
|
76
|
+
bcSelectDepthRecord,
|
|
77
|
+
changeAssociation,
|
|
78
|
+
changeAssociationSameBc,
|
|
79
|
+
changeAssociationFull,
|
|
80
|
+
changeChildrenAssociations,
|
|
81
|
+
changeChildrenAssociationsSameBc,
|
|
82
|
+
changeDescendantsAssociationsFull,
|
|
83
|
+
dropAllAssociations,
|
|
84
|
+
dropAllAssociationsSameBc,
|
|
85
|
+
dropAllAssociationsFull,
|
|
86
|
+
handleRouter,
|
|
87
|
+
selectTableCellInit,
|
|
88
|
+
selectTableCell,
|
|
89
|
+
showAllTableRecordsInit,
|
|
90
|
+
showNotification,
|
|
91
|
+
closeNotification,
|
|
92
|
+
bcAddFilter,
|
|
93
|
+
bcRemoveFilter,
|
|
94
|
+
bcRemoveAllFilters,
|
|
95
|
+
bcAddSorter,
|
|
96
|
+
bcRemoveSorter,
|
|
97
|
+
bcChangePage,
|
|
98
|
+
showViewError,
|
|
99
|
+
closeViewError,
|
|
100
|
+
closeConfirmModal,
|
|
101
|
+
clearValidationFails,
|
|
102
|
+
downloadFile,
|
|
103
|
+
downloadFileByUrl,
|
|
104
|
+
bulkUploadFiles,
|
|
105
|
+
apiError,
|
|
106
|
+
httpError,
|
|
107
|
+
switchDebugMode,
|
|
108
|
+
exportState,
|
|
109
|
+
emptyAction,
|
|
110
|
+
refreshMeta,
|
|
111
|
+
refreshMetaDone,
|
|
112
|
+
refreshMetaFail,
|
|
113
|
+
refreshMetaAndReloadPage,
|
|
114
|
+
switchRole,
|
|
115
|
+
addPendingRequest,
|
|
116
|
+
removePendingRequest,
|
|
117
|
+
addNotification,
|
|
118
|
+
removeNotifications
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
export { actions }
|
|
122
|
+
|
|
123
|
+
declare const addNotification: ActionCreatorWithOptionalPayload<Notification_2, string>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Add pending request for tracking and blocking race conditions
|
|
127
|
+
*/
|
|
128
|
+
declare const addPendingRequest: ActionCreatorWithOptionalPayload< {
|
|
129
|
+
request: PendingRequest;
|
|
130
|
+
}, string>;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Extends url with query parameters control symbol (`?` or `&`)
|
|
134
|
+
*
|
|
135
|
+
* @param url Url with or without `?` symbol
|
|
136
|
+
*/
|
|
137
|
+
declare function addTailControlSequences(url: string): string;
|
|
138
|
+
|
|
139
|
+
export declare type AllWidgetTypeFieldBase = WidgetFormFieldBase | WidgetListFieldBase;
|
|
140
|
+
|
|
141
|
+
export declare class Api {
|
|
142
|
+
api$: ObservableApiWrapper;
|
|
143
|
+
constructor(instance: AxiosInstance);
|
|
144
|
+
routerRequest(path: string, params: Record<string, unknown>): Observable<CxboxResponse>;
|
|
145
|
+
fetchBcData(screenName: string, bcUrl: string, params?: GetParamsMap, cancelToken?: CancelToken): Observable<BcDataResponse>;
|
|
146
|
+
fetchBcDataAll(screenName: string, bcUrl: string, params?: GetParamsMap): Observable<DataItem[]>;
|
|
147
|
+
fetchRowMeta(screenName: string, bcUrl: string, params?: GetParamsMap, cancelToken?: CancelToken): Observable<RowMeta>;
|
|
148
|
+
newBcData(screenName: string, bcUrl: string, context: ApiCallContext, params?: GetParamsMap): Observable< {
|
|
149
|
+
row: RowMeta;
|
|
150
|
+
postActions?: OperationPostInvokeAny[];
|
|
151
|
+
}>;
|
|
152
|
+
saveBcData(screenName: string, bcUrl: string, data: PendingDataItem & {
|
|
153
|
+
vstamp: number;
|
|
154
|
+
}, context: ApiCallContext, params?: GetParamsMap): Observable< {
|
|
155
|
+
record: DataItem;
|
|
156
|
+
postActions?: OperationPostInvokeAny[];
|
|
157
|
+
preInvoke?: OperationPreInvoke;
|
|
158
|
+
}>;
|
|
159
|
+
deleteBcData(screenName: string, bcUrl: string, context: ApiCallContext, params?: GetParamsMap): Observable< {
|
|
160
|
+
record: DataItem;
|
|
161
|
+
postActions?: OperationPostInvokeAny[];
|
|
162
|
+
preInvoke?: OperationPreInvoke;
|
|
163
|
+
}>;
|
|
164
|
+
customAction(screenName: string, bcUrl: string, data?: Record<string, any>, context?: ApiCallContext, params?: GetParamsMap): Observable< {
|
|
165
|
+
record: DataItem;
|
|
166
|
+
postActions?: OperationPostInvokeAny[];
|
|
167
|
+
preInvoke?: OperationPreInvoke;
|
|
168
|
+
}>;
|
|
169
|
+
associate(screenName: string, bcUrl: string, data: AssociatedItem[] | Record<string, AssociatedItem[]>, params?: GetParamsMap): Observable<any>;
|
|
170
|
+
getRmByForceActive(screenName: string, bcUrl: string | null, data: PendingDataItem & {
|
|
171
|
+
vstamp: number;
|
|
172
|
+
}, params?: GetParamsMap): Observable<RowMeta>;
|
|
173
|
+
/**
|
|
174
|
+
* Get Cxbox API file upload endpoint based on baseURL of axios instance
|
|
175
|
+
*
|
|
176
|
+
* Handles empty baseURL and trailing slash
|
|
177
|
+
*
|
|
178
|
+
* @returns File upload endpoint
|
|
179
|
+
*/
|
|
180
|
+
get fileUploadEndpoint(): string;
|
|
181
|
+
refreshMeta(): Observable<CxboxResponse>;
|
|
182
|
+
loginByRoleRequest(role: string): Observable<LoginResponse>;
|
|
183
|
+
createCanceler(): {
|
|
184
|
+
cancel: () => void;
|
|
185
|
+
cancelToken: CancelToken;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
declare interface ApiCallContext {
|
|
190
|
+
widgetName: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
declare interface ApiCallContext_2 {
|
|
194
|
+
widgetName: string;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* An error occured during API request
|
|
199
|
+
*/
|
|
200
|
+
declare const apiError: ActionCreatorWithOptionalPayload< {
|
|
201
|
+
/**
|
|
202
|
+
* Axios error object
|
|
203
|
+
* https://redux.js.org/style-guide/#do-not-put-non-serializable-values-in-state-or-actions
|
|
204
|
+
*/
|
|
205
|
+
error: AxiosError;
|
|
206
|
+
/**
|
|
207
|
+
* Request context
|
|
208
|
+
*/
|
|
209
|
+
callContext: ApiCallContext;
|
|
210
|
+
}, string>;
|
|
211
|
+
|
|
212
|
+
declare const apiErrorEpic: CXBoxEpic;
|
|
213
|
+
|
|
214
|
+
export declare type ApplicationError = BusinessError | SystemError | ApplicationErrorBase;
|
|
215
|
+
|
|
216
|
+
export declare interface ApplicationErrorBase {
|
|
217
|
+
type: ApplicationErrorType;
|
|
218
|
+
code?: number;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export declare enum ApplicationErrorType {
|
|
222
|
+
BusinessError = 0,
|
|
223
|
+
SystemError = 1,
|
|
224
|
+
NetworkError = 2
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* Extends url with query parameters
|
|
229
|
+
*
|
|
230
|
+
* @param url Url to extend
|
|
231
|
+
* @param qso Query parameters dictionary
|
|
232
|
+
*/
|
|
233
|
+
declare function applyParams(url: string, qso?: QueryParamsMap): string;
|
|
234
|
+
|
|
235
|
+
/**
|
|
236
|
+
* TODO
|
|
237
|
+
*
|
|
238
|
+
* @param url
|
|
239
|
+
* @param qso
|
|
240
|
+
*/
|
|
241
|
+
declare function applyRawParams(url: string, qso: Record<string, any>): string;
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* Types of notification messages
|
|
245
|
+
*/
|
|
246
|
+
export declare enum AppNotificationType {
|
|
247
|
+
success = "success",
|
|
248
|
+
info = "info",
|
|
249
|
+
warning = "warning",
|
|
250
|
+
error = "error"
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Assigns for each element:
|
|
255
|
+
*
|
|
256
|
+
* - `parent` property, which is a reference to parent mode found through `parentId` match.
|
|
257
|
+
* - `children` property, which is an array of references to child nodes.
|
|
258
|
+
*
|
|
259
|
+
* `parentId`: '0' considered a root pseudo-node
|
|
260
|
+
*
|
|
261
|
+
* Orphaned records will be excluded from result and throw a console warning.
|
|
262
|
+
*
|
|
263
|
+
* @param flat Flat array representation of tree structure
|
|
264
|
+
* @returns New array
|
|
265
|
+
*/
|
|
266
|
+
declare function assignTreeLinks<T extends DataNode>(flat: T[]): (T & TreeNodeBidirectional)[];
|
|
267
|
+
|
|
268
|
+
export declare interface AssociatedItem extends DataItem {
|
|
269
|
+
_associate: boolean;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export declare interface BaseDataNode {
|
|
273
|
+
/**
|
|
274
|
+
* Uniquely identifies record
|
|
275
|
+
*/
|
|
276
|
+
id: string;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* TODO
|
|
281
|
+
*/
|
|
282
|
+
declare const bcAddFilter: ActionCreatorWithOptionalPayload< {
|
|
283
|
+
/**
|
|
284
|
+
* TODO: Will be mandatory in 2.0.0
|
|
285
|
+
*/
|
|
286
|
+
widgetName?: string;
|
|
287
|
+
/**
|
|
288
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of widgetName
|
|
289
|
+
*/
|
|
290
|
+
bcName: string;
|
|
291
|
+
filter: BcFilter;
|
|
292
|
+
}, string>;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* TODO
|
|
296
|
+
*/
|
|
297
|
+
declare const bcAddSorter: ActionCreatorWithOptionalPayload< {
|
|
298
|
+
bcName: string;
|
|
299
|
+
sorter: BcSorter | BcSorter[];
|
|
300
|
+
}, string>;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Sends `cancel-create` custom operation with record's pending changes and vstamp;
|
|
304
|
+
* Dispatches `sendOperationSuccess` and `bcChangeCursors` to drop cursors, also
|
|
305
|
+
* `processPostInvokeEpic` if received `postActions` in response.
|
|
306
|
+
*
|
|
307
|
+
* @category Epics
|
|
308
|
+
*/
|
|
309
|
+
declare const bcCancelCreateDataEpic: CXBoxEpic;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* TODO
|
|
313
|
+
*/
|
|
314
|
+
declare const bcCancelPendingChanges: ActionCreatorWithOptionalPayload< {
|
|
315
|
+
bcNames: string[];
|
|
316
|
+
}, string>;
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* TODO
|
|
320
|
+
*/
|
|
321
|
+
declare const bcChangeCursors: ActionCreatorWithOptionalPayload< {
|
|
322
|
+
cursorsMap: Record<string, string>;
|
|
323
|
+
keepDelta?: boolean;
|
|
324
|
+
}, string>;
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* Sets a cursor for the specified depth level of hierarchy widget
|
|
328
|
+
* builded around a single business component.
|
|
329
|
+
*/
|
|
330
|
+
declare const bcChangeDepthCursor: ActionCreatorWithOptionalPayload< {
|
|
331
|
+
/**
|
|
332
|
+
* Business component for the hierarchy widget
|
|
333
|
+
*/
|
|
334
|
+
bcName: string;
|
|
335
|
+
/**
|
|
336
|
+
* Depth level for which cursor is set
|
|
337
|
+
*/
|
|
338
|
+
depth: number;
|
|
339
|
+
/**
|
|
340
|
+
* Cursor set for specific depth level of the hierarchy widget.
|
|
341
|
+
*
|
|
342
|
+
* Controls the collapsed state of the record and which data are fetched for the next level of hierarchy
|
|
343
|
+
*/
|
|
344
|
+
cursor: string;
|
|
345
|
+
}, string>;
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Fetches data for the new page of business component, replacing existing data
|
|
349
|
+
*/
|
|
350
|
+
declare const bcChangePage: ActionCreatorWithOptionalPayload< {
|
|
351
|
+
/**
|
|
352
|
+
* Business component changing the page
|
|
353
|
+
*
|
|
354
|
+
* @deprecated TODO: Will be removed in 2.0.0 in favor of `widgetNam`
|
|
355
|
+
*/
|
|
356
|
+
bcName: string;
|
|
357
|
+
/**
|
|
358
|
+
* Requested page number
|
|
359
|
+
*/
|
|
360
|
+
page: number;
|
|
361
|
+
/**
|
|
362
|
+
* Widget changing the page
|
|
363
|
+
*/
|
|
364
|
+
widgetName?: string;
|
|
365
|
+
}, string>;
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* API's response on Business Component's data.ts request
|
|
369
|
+
*/
|
|
370
|
+
export declare interface BcDataResponse {
|
|
371
|
+
data: DataItem[];
|
|
372
|
+
hasNext: boolean;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
declare const bcDeleteDataEpic: CXBoxEpic;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Delete record request was
|
|
379
|
+
*/
|
|
380
|
+
declare const bcDeleteDataFail: ActionCreatorWithOptionalPayload< {
|
|
381
|
+
/**
|
|
382
|
+
* Business component initiated delete record
|
|
383
|
+
*/
|
|
384
|
+
bcName: string;
|
|
385
|
+
}, string>;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
*
|
|
389
|
+
*
|
|
390
|
+
* Loads BC's dataEpics.ts.
|
|
391
|
+
* In case successful download:
|
|
392
|
+
* - dispatches action to store
|
|
393
|
+
* - initializes rowMeta load
|
|
394
|
+
* - initializes child BCs dataEpics.ts load
|
|
395
|
+
*
|
|
396
|
+
* action.payload.bcName BC's name for dataEpics.ts load
|
|
397
|
+
*
|
|
398
|
+
* @category Epics
|
|
399
|
+
*/
|
|
400
|
+
declare const bcFetchDataEpic: CXBoxEpic;
|
|
401
|
+
|
|
402
|
+
/**
|
|
403
|
+
* Fetch data request wac unsuccesful
|
|
404
|
+
*/
|
|
405
|
+
declare const bcFetchDataFail: ActionCreatorWithOptionalPayload< {
|
|
406
|
+
/**
|
|
407
|
+
* Business component that initiated data fetch
|
|
408
|
+
*/
|
|
409
|
+
bcName: string;
|
|
410
|
+
/**
|
|
411
|
+
* BC url with respect of parents cursors
|
|
412
|
+
*/
|
|
413
|
+
bcUrl: string;
|
|
414
|
+
/**
|
|
415
|
+
* For same BC hierarchies, the level which was requested
|
|
416
|
+
*
|
|
417
|
+
* @deprecated TODO: 2.0.0 Should be all moved to separate hierarchy-specific action
|
|
418
|
+
*/
|
|
419
|
+
depth?: number;
|
|
420
|
+
}, string>;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Fetch data request request for specific pages range
|
|
424
|
+
*/
|
|
425
|
+
declare const bcFetchDataPages: ActionCreatorWithOptionalPayload< {
|
|
426
|
+
/**
|
|
427
|
+
* The business component to fetch data for
|
|
428
|
+
*
|
|
429
|
+
* @deprecated TODO: 2.0.0 Should be removed in favor of widgetName
|
|
430
|
+
*/
|
|
431
|
+
bcName: string;
|
|
432
|
+
/**
|
|
433
|
+
* Fisrt page to fetch (default is 1)
|
|
434
|
+
*/
|
|
435
|
+
widgetName: string;
|
|
436
|
+
/**
|
|
437
|
+
* What widget requires data (widget can only request its own data here)
|
|
438
|
+
*/
|
|
439
|
+
from?: number;
|
|
440
|
+
/**
|
|
441
|
+
* Last page to fetch (default is current page)
|
|
442
|
+
*/
|
|
443
|
+
to?: number;
|
|
444
|
+
}, string>;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Fetch data request for business component was initiated
|
|
448
|
+
*/
|
|
449
|
+
declare const bcFetchDataRequest: ActionCreatorWithOptionalPayload< {
|
|
450
|
+
/**
|
|
451
|
+
* The business component to fetch data for
|
|
452
|
+
*
|
|
453
|
+
* @deprecated TODO: 2.0.0 Should be removed in favor of widgetName
|
|
454
|
+
*/
|
|
455
|
+
bcName?: string;
|
|
456
|
+
/**
|
|
457
|
+
* The level of hierarchy to fetch data for
|
|
458
|
+
*
|
|
459
|
+
* @deprecated Do not use; TODO: Will be removed in 2.0.0
|
|
460
|
+
*/
|
|
461
|
+
depth?: number;
|
|
462
|
+
/**
|
|
463
|
+
* What widget requires data (widget can only request its own data here)
|
|
464
|
+
*/
|
|
465
|
+
widgetName: string;
|
|
466
|
+
/**
|
|
467
|
+
* Page size should be ignored
|
|
468
|
+
*
|
|
469
|
+
* Used mostly for hierarchy widgets which does not have controls
|
|
470
|
+
* for navigating between pages aside of root level.
|
|
471
|
+
*/
|
|
472
|
+
ignorePageLimit?: boolean;
|
|
473
|
+
/**
|
|
474
|
+
* Pending changes should not be dropped when performing this request
|
|
475
|
+
* (due to hierarchy expanging through cursor change, for same BC hierarchy this leads to data loss)
|
|
476
|
+
*/
|
|
477
|
+
keepDelta?: boolean;
|
|
478
|
+
}, string>;
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Fetch data request was succesful
|
|
482
|
+
*/
|
|
483
|
+
declare const bcFetchDataSuccess: ActionCreatorWithOptionalPayload< {
|
|
484
|
+
/**
|
|
485
|
+
* Business component that requested data
|
|
486
|
+
*
|
|
487
|
+
* @deprecated TODO: 2.0.0 Remove in favor of widgetName
|
|
488
|
+
*/
|
|
489
|
+
bcName: string;
|
|
490
|
+
/**
|
|
491
|
+
* Data records from response for this business component
|
|
492
|
+
*/
|
|
493
|
+
data: DataItem[];
|
|
494
|
+
/**
|
|
495
|
+
* For same BC hierarchies, the level which was requested
|
|
496
|
+
*
|
|
497
|
+
* @deprecated TODO: 2.0.0 Should be all moved to separate hierarchy-specific action
|
|
498
|
+
*/
|
|
499
|
+
depth?: number;
|
|
500
|
+
/**
|
|
501
|
+
* BC url with respect of parents cursors
|
|
502
|
+
*/
|
|
503
|
+
bcUrl: string;
|
|
504
|
+
/**
|
|
505
|
+
* If there are more data to fetch (other pages etc.)
|
|
506
|
+
*/
|
|
507
|
+
hasNext?: boolean;
|
|
508
|
+
}, string>;
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* Fetch meta information for active record of business component
|
|
512
|
+
*/
|
|
513
|
+
declare const bcFetchRowMeta: ActionCreatorWithOptionalPayload< {
|
|
514
|
+
/**
|
|
515
|
+
*
|
|
516
|
+
* Business component that initiated row meta fetch
|
|
517
|
+
*
|
|
518
|
+
* @deprecated TODO: 2.0.0 Remove in favor of widgetName
|
|
519
|
+
*/
|
|
520
|
+
bcName: string;
|
|
521
|
+
/**
|
|
522
|
+
* Widget that initiated row meta fetch
|
|
523
|
+
*/
|
|
524
|
+
widgetName: string;
|
|
525
|
+
}, string>;
|
|
526
|
+
|
|
527
|
+
/**
|
|
528
|
+
* Fetch request for row meta was unsuccesful
|
|
529
|
+
*/
|
|
530
|
+
declare const bcFetchRowMetaFail: ActionCreatorWithOptionalPayload< {
|
|
531
|
+
/**
|
|
532
|
+
* Business component initiated row meta fetch
|
|
533
|
+
*/
|
|
534
|
+
bcName: string;
|
|
535
|
+
}, string>;
|
|
536
|
+
|
|
537
|
+
/**
|
|
538
|
+
* Access `row-meta` API endpoint for business component; response will contain information
|
|
539
|
+
* about operations available for row and additional information about row fields.
|
|
540
|
+
*
|
|
541
|
+
* On success, {@link ActionPayloadTypes.bcFetchRowMetaSuccess | bcFetchRowMetaSuccess} action dispatched
|
|
542
|
+
* to store received row meta.
|
|
543
|
+
* On failure, console.error called and {@link ActionPayloadTypes.bcFetchRowMetaFail | bcFetchRowMetaFail} action
|
|
544
|
+
* dispatched to drop fetching state.
|
|
545
|
+
*
|
|
546
|
+
* If any action from `cancelRequestActionTypes` array dispatched while this epic is in progress,
|
|
547
|
+
* this epic will be cancelled and {@link ActionPayloadTypes.bcFetchRowMetaFail | bcFetchRowMetaFail} action
|
|
548
|
+
* will be dispatched.
|
|
549
|
+
*
|
|
550
|
+
* @category Epics
|
|
551
|
+
*/
|
|
552
|
+
declare const bcFetchRowMetaRequestEpic: CXBoxEpic;
|
|
553
|
+
|
|
554
|
+
/**
|
|
555
|
+
* Puts row meta received from Cxbox API to the store.
|
|
556
|
+
*
|
|
557
|
+
* Updates values in `data` store slice with new values from row meta when possible.
|
|
558
|
+
*/
|
|
559
|
+
declare const bcFetchRowMetaSuccess: ActionCreatorWithOptionalPayload< {
|
|
560
|
+
/**
|
|
561
|
+
* Business component that initiated row meta fetch
|
|
562
|
+
*/
|
|
563
|
+
bcName: string;
|
|
564
|
+
/**
|
|
565
|
+
* Path to BC with respect to ancestors BC and their cursors
|
|
566
|
+
*/
|
|
567
|
+
bcUrl: string;
|
|
568
|
+
/**
|
|
569
|
+
* Row meta returned by Cxbox API
|
|
570
|
+
*/
|
|
571
|
+
rowMeta: RowMeta;
|
|
572
|
+
/**
|
|
573
|
+
* Cursor for a record that initiated row meta fetch.
|
|
574
|
+
*
|
|
575
|
+
* Can be empty (e.g. BC has no records) or will be set to new id for `create` operation.
|
|
576
|
+
*/
|
|
577
|
+
cursor?: string;
|
|
578
|
+
}, string>;
|
|
579
|
+
|
|
580
|
+
export declare interface BcFilter {
|
|
581
|
+
type: FilterType | string;
|
|
582
|
+
fieldName: string;
|
|
583
|
+
value: DataValue | DataValue[];
|
|
584
|
+
viewName?: string;
|
|
585
|
+
widgetName?: string;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* Manually update business component by fetching its data and and row meta
|
|
590
|
+
*/
|
|
591
|
+
declare const bcForceUpdate: ActionCreatorWithOptionalPayload< {
|
|
592
|
+
/**
|
|
593
|
+
* @deprecated Will be removed in 2.0.0 in favor of `widgetName`
|
|
594
|
+
*/
|
|
595
|
+
bcName: string;
|
|
596
|
+
/**
|
|
597
|
+
* What widget requires data (widget can only request its own data here)
|
|
598
|
+
*
|
|
599
|
+
* TODO: Will be mandatory in 2.0.0
|
|
600
|
+
*/
|
|
601
|
+
widgetName?: string;
|
|
602
|
+
}, string>;
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Fetch next chunk of data for table widgets with infinite scroll
|
|
606
|
+
*/
|
|
607
|
+
declare const bcLoadMore: ActionCreatorWithOptionalPayload< {
|
|
608
|
+
/**
|
|
609
|
+
* Business component that initiated data fetch
|
|
610
|
+
*/
|
|
611
|
+
bcName: string;
|
|
612
|
+
/**
|
|
613
|
+
* Widget that initiated row meta fetch
|
|
614
|
+
*/
|
|
615
|
+
widgetName?: string;
|
|
616
|
+
}, string>;
|
|
617
|
+
|
|
618
|
+
declare const bcLoadMoreEpic: CXBoxEpic;
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Meta data.ts for Business Component
|
|
622
|
+
*/
|
|
623
|
+
export declare interface BcMeta {
|
|
624
|
+
/**
|
|
625
|
+
* Name of Business Component
|
|
626
|
+
*/
|
|
627
|
+
name: string;
|
|
628
|
+
/**
|
|
629
|
+
* Name of parent Business Component
|
|
630
|
+
*/
|
|
631
|
+
parentName: string | null;
|
|
632
|
+
/**
|
|
633
|
+
* TODO: desc, example
|
|
634
|
+
*/
|
|
635
|
+
url: string;
|
|
636
|
+
/**
|
|
637
|
+
* Currently active record
|
|
638
|
+
*/
|
|
639
|
+
cursor: string | null;
|
|
640
|
+
/**
|
|
641
|
+
* String representation of default bc sorters
|
|
642
|
+
*
|
|
643
|
+
* "_sort.{order}.{direction}={fieldKey}&_sort.{order}.{direction}"
|
|
644
|
+
*
|
|
645
|
+
* @param fieldKey Sort by field
|
|
646
|
+
* @param order Priority of this specific sorter
|
|
647
|
+
* @param direction "asc" or "desc"
|
|
648
|
+
* i.e. "_sort.0.asc=firstName"
|
|
649
|
+
*/
|
|
650
|
+
defaultSort?: string;
|
|
651
|
+
/**
|
|
652
|
+
* Predefined filters
|
|
653
|
+
*/
|
|
654
|
+
filterGroups?: FilterGroup[];
|
|
655
|
+
/**
|
|
656
|
+
* String representation of default bc filters
|
|
657
|
+
*
|
|
658
|
+
* "{fieldKey}.contains={someValue}"
|
|
659
|
+
*
|
|
660
|
+
* @param fieldKey Filtering field
|
|
661
|
+
* @param someValue Filter value
|
|
662
|
+
* i.e. "someField1.contains=someValue&someField2.equalsOneOf=%5B%22someValue1%22%2C%22someValue2%22%5D"
|
|
663
|
+
*/
|
|
664
|
+
defaultFilter?: string;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
export declare interface BcMetaState extends BcMeta {
|
|
668
|
+
/**
|
|
669
|
+
* Data fetch for this business component is in progress
|
|
670
|
+
*/
|
|
671
|
+
loading?: boolean;
|
|
672
|
+
/**
|
|
673
|
+
* Number of the page to fetch
|
|
674
|
+
*/
|
|
675
|
+
page?: number;
|
|
676
|
+
/**
|
|
677
|
+
* Page limit to fetch
|
|
678
|
+
*/
|
|
679
|
+
limit?: number;
|
|
680
|
+
/**
|
|
681
|
+
* There is an addional pages of data.ts to fetch
|
|
682
|
+
*/
|
|
683
|
+
hasNext?: boolean;
|
|
684
|
+
/**
|
|
685
|
+
* Stores a selected cursor and loading state per depth level.
|
|
686
|
+
*
|
|
687
|
+
* Used by hierarchy widgets builded around single business component:
|
|
688
|
+
* controls which record is expanded and which children should be fetched.
|
|
689
|
+
*/
|
|
690
|
+
depthBc?: DepthBcType;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* @deprecated Not used; `sendOperationEpic` with `create` role is used instead
|
|
695
|
+
*
|
|
696
|
+
* TODO: Remove in 2.0.0
|
|
697
|
+
*/
|
|
698
|
+
declare const bcNewData: ActionCreatorWithOptionalPayload< {
|
|
699
|
+
/**
|
|
700
|
+
* Business component for which to create a new record
|
|
701
|
+
*/
|
|
702
|
+
bcName: string;
|
|
703
|
+
}, string>;
|
|
704
|
+
|
|
705
|
+
/**
|
|
706
|
+
* Access `row-meta-new` API endpoint for business component endpoint; response will contain
|
|
707
|
+
* row meta where `currentValue` of `id` field will contain an id for newly created record.
|
|
708
|
+
*
|
|
709
|
+
* `bcNewDataSuccess` action dispatched with new dataEpics.ts item draft (vstamp = -1).
|
|
710
|
+
* `bcFetchRowMetaSuccess` action dispatched to set BC cursor to this new id.
|
|
711
|
+
* `changeDataItem` action dispatched to add this new item to pending changes.
|
|
712
|
+
* `processPostInvokeEpic` dispatched to handle possible post invokes.
|
|
713
|
+
*
|
|
714
|
+
* In case of an error message is logged as warning and `bcNewDataFail` action dispatched.
|
|
715
|
+
*
|
|
716
|
+
*/
|
|
717
|
+
declare const bcNewDataEpic: CXBoxEpic;
|
|
718
|
+
|
|
719
|
+
/**
|
|
720
|
+
* Dispatched when record creation failed
|
|
721
|
+
*/
|
|
722
|
+
declare const bcNewDataFail: ActionCreatorWithOptionalPayload< {
|
|
723
|
+
/**
|
|
724
|
+
* Business component for which record creation failed
|
|
725
|
+
*/
|
|
726
|
+
bcName: string;
|
|
727
|
+
}, string>;
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* Put new record draft to `data` store slice
|
|
731
|
+
*/
|
|
732
|
+
declare const bcNewDataSuccess: ActionCreatorWithOptionalPayload< {
|
|
733
|
+
/**
|
|
734
|
+
* Business component for which new record was created
|
|
735
|
+
*/
|
|
736
|
+
bcName: string;
|
|
737
|
+
/**
|
|
738
|
+
* New record with `id` returned by Cxbox API and vstamp = -1 (denoting a record draft)
|
|
739
|
+
*/
|
|
740
|
+
dataItem: DataItem;
|
|
741
|
+
/**
|
|
742
|
+
* Path to BC with respect to ancestors BC and their cursors
|
|
743
|
+
*/
|
|
744
|
+
bcUrl: string;
|
|
745
|
+
}, string>;
|
|
746
|
+
|
|
747
|
+
/**
|
|
748
|
+
* Remove all filters at once
|
|
749
|
+
*/
|
|
750
|
+
declare const bcRemoveAllFilters: ActionCreatorWithOptionalPayload< {
|
|
751
|
+
bcName: string;
|
|
752
|
+
}, string>;
|
|
753
|
+
|
|
754
|
+
/**
|
|
755
|
+
* TODO
|
|
756
|
+
*/
|
|
757
|
+
declare const bcRemoveFilter: ActionCreatorWithOptionalPayload< {
|
|
758
|
+
bcName: string;
|
|
759
|
+
filter: BcFilter;
|
|
760
|
+
}, string>;
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* TODO
|
|
764
|
+
*/
|
|
765
|
+
declare const bcRemoveSorter: ActionCreatorWithOptionalPayload< {
|
|
766
|
+
bcName: string;
|
|
767
|
+
sorter: BcSorter;
|
|
768
|
+
}, string>;
|
|
769
|
+
|
|
770
|
+
/**
|
|
771
|
+
* Post record's pending changes to `save dataEpics.ts` API endpoint.
|
|
772
|
+
* Pending changes for fields disabled through row meta are not send; please notice that fields are
|
|
773
|
+
* disabled by default.
|
|
774
|
+
*
|
|
775
|
+
* On success following actions are dispatched:
|
|
776
|
+
* - {@link bcSaveDataSuccess}
|
|
777
|
+
* - {@link bcFetchRowMeta}
|
|
778
|
+
* - one {@link bcFetchDataRequest} for each child of saved business component
|
|
779
|
+
* - optional {@link ActionPayloadTypes.processPostInvokeEpic | processPostInvokeEpic } if present in response
|
|
780
|
+
* - optional `onSuccessAction` callback if provided in payload.
|
|
781
|
+
*
|
|
782
|
+
* On failure, console\.error called and {@link ActionPayloadTypes.bcSaveDataFail | bcSaveDataFail} action
|
|
783
|
+
* dispatched.
|
|
784
|
+
*
|
|
785
|
+
* If there was a `onSuccessAction` callback provided in action payload (and widget option
|
|
786
|
+
* {@link WidgetOptions.disableNotification} was not set)
|
|
787
|
+
* then a notification will be shown on failure with suggestion to cancel pending changes and a button that fires
|
|
788
|
+
* {@link bcCancelPendingChanges}
|
|
789
|
+
*
|
|
790
|
+
* @category Epics
|
|
791
|
+
*/
|
|
792
|
+
declare const bcSaveDataEpic: CXBoxEpic;
|
|
793
|
+
|
|
794
|
+
/**
|
|
795
|
+
* TODO
|
|
796
|
+
*/
|
|
797
|
+
declare const bcSaveDataFail: ActionCreatorWithOptionalPayload< {
|
|
798
|
+
bcName: string;
|
|
799
|
+
bcUrl: string;
|
|
800
|
+
entityError?: OperationErrorEntity;
|
|
801
|
+
viewError?: string;
|
|
802
|
+
}, string>;
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* TODO
|
|
806
|
+
*/
|
|
807
|
+
declare const bcSaveDataSuccess: ActionCreatorWithOptionalPayload< {
|
|
808
|
+
bcName: string;
|
|
809
|
+
cursor: string;
|
|
810
|
+
dataItem: DataItem;
|
|
811
|
+
}, string>;
|
|
812
|
+
|
|
813
|
+
/**
|
|
814
|
+
* Wrapper action to sets a cursor for the specified depth level of hierarchy widget
|
|
815
|
+
* builded around a single business component and fetch children for that record.
|
|
816
|
+
*
|
|
817
|
+
* @deprecated Do not use. TODO: Will be removed in 2.0.0
|
|
818
|
+
*/
|
|
819
|
+
declare const bcSelectDepthRecord: ActionCreatorWithOptionalPayload< {
|
|
820
|
+
/**
|
|
821
|
+
* Business component for the hierarchy widget
|
|
822
|
+
*/
|
|
823
|
+
bcName: string;
|
|
824
|
+
/**
|
|
825
|
+
* Depth level for which cursor is set
|
|
826
|
+
*/
|
|
827
|
+
depth: number;
|
|
828
|
+
/**
|
|
829
|
+
* Cursor set for specific depth level of the hierarchy widget.
|
|
830
|
+
*
|
|
831
|
+
* Controls the collapsed state of the record and which data are fetched for the next level of hierarchy
|
|
832
|
+
*/
|
|
833
|
+
cursor: string;
|
|
834
|
+
}, string>;
|
|
835
|
+
|
|
836
|
+
declare const bcSelectDepthRecordEpic: CXBoxEpic;
|
|
837
|
+
|
|
838
|
+
/**
|
|
839
|
+
* TODO
|
|
840
|
+
*/
|
|
841
|
+
declare const bcSelectRecord: ActionCreatorWithOptionalPayload< {
|
|
842
|
+
bcName: string;
|
|
843
|
+
cursor: string;
|
|
844
|
+
ignoreChildrenPageLimit?: boolean;
|
|
845
|
+
keepDelta?: boolean;
|
|
846
|
+
}, string>;
|
|
847
|
+
|
|
848
|
+
declare const bcSelectRecordEpic: CXBoxEpic;
|
|
849
|
+
|
|
850
|
+
export declare interface BcSorter {
|
|
851
|
+
fieldName: string;
|
|
852
|
+
direction: 'asc' | 'desc';
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
/**
|
|
856
|
+
* Bredth-first search result
|
|
857
|
+
*/
|
|
858
|
+
declare interface BreadthFirstResult<T> {
|
|
859
|
+
/**
|
|
860
|
+
* Matching node
|
|
861
|
+
*/
|
|
862
|
+
node: T;
|
|
863
|
+
/**
|
|
864
|
+
* Tree depth where this node was found
|
|
865
|
+
*/
|
|
866
|
+
depth: number;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* Search node matching the predicate on the current depth prior to moving to the next depth level
|
|
871
|
+
*
|
|
872
|
+
* @param root Tree root
|
|
873
|
+
* @param predicate Search condition for the target tree node
|
|
874
|
+
* @returns Matching node and a tree depth where this node was found
|
|
875
|
+
*/
|
|
876
|
+
declare function breadthFirstSearch<T>(root: T, predicate: (current: any) => boolean, depth?: number, childrenProperty?: keyof T): BreadthFirstResult<T>;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* Forms a string representation of business components hierarchy with
|
|
880
|
+
* respect to business components ancestors and their corresponding cursors
|
|
881
|
+
*
|
|
882
|
+
* @param bcName Business component name
|
|
883
|
+
* @param includeSelf If result hierarchy should include target bc or only ancestors
|
|
884
|
+
* @param state
|
|
885
|
+
* @category Utils
|
|
886
|
+
*/
|
|
887
|
+
declare function buildBcUrl(bcName: string, includeSelf: boolean, state: Store): string;
|
|
888
|
+
|
|
889
|
+
/**
|
|
890
|
+
* Returns array of matching nodes, their direct children and every ancestor node
|
|
891
|
+
*
|
|
892
|
+
* @param nodes An array to search
|
|
893
|
+
* @param matchingNodes Ids of the nodes to match
|
|
894
|
+
*/
|
|
895
|
+
declare function buildSearchResultTree<T extends TreeNodeBidirectional = TreeNodeBidirectional>(nodes: T[], matchingNodes: string[]): T[];
|
|
896
|
+
|
|
897
|
+
/**
|
|
898
|
+
* TODO
|
|
899
|
+
*
|
|
900
|
+
* @param literals
|
|
901
|
+
* @param placeholders
|
|
902
|
+
* @category Utils
|
|
903
|
+
*/
|
|
904
|
+
declare function buildUrl(literals: TemplateStringsArray, ...placeholders: Array<string | number>): string;
|
|
905
|
+
|
|
906
|
+
/**
|
|
907
|
+
* Save uploaded files to the widget
|
|
908
|
+
*/
|
|
909
|
+
declare const bulkUploadFiles: ActionCreatorWithOptionalPayload< {
|
|
910
|
+
/**
|
|
911
|
+
* default true
|
|
912
|
+
*/
|
|
913
|
+
isPopup?: boolean;
|
|
914
|
+
/**
|
|
915
|
+
* If not specified, then taken from state.view.popupData.bcName
|
|
916
|
+
*/
|
|
917
|
+
bcName?: string;
|
|
918
|
+
/**
|
|
919
|
+
* Ids of uploaded files
|
|
920
|
+
*/
|
|
921
|
+
fileIds: string[];
|
|
922
|
+
}, string>;
|
|
923
|
+
|
|
924
|
+
export declare interface BusinessError extends ApplicationErrorBase {
|
|
925
|
+
type: ApplicationErrorType.BusinessError;
|
|
926
|
+
message: string;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
/**
|
|
930
|
+
* TODO
|
|
931
|
+
*/
|
|
932
|
+
declare const changeAssociation: ActionCreatorWithOptionalPayload< {
|
|
933
|
+
bcName: string;
|
|
934
|
+
widgetName: string;
|
|
935
|
+
dataItem: AssociatedItem;
|
|
936
|
+
assocValueKey: string;
|
|
937
|
+
}, string>;
|
|
938
|
+
|
|
939
|
+
declare const changeAssociationEpic: CXBoxEpic;
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* TODO
|
|
943
|
+
*/
|
|
944
|
+
declare const changeAssociationFull: ActionCreatorWithOptionalPayload< {
|
|
945
|
+
bcName: string;
|
|
946
|
+
depth: number;
|
|
947
|
+
widgetName: string;
|
|
948
|
+
dataItem: AssociatedItem;
|
|
949
|
+
/**
|
|
950
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of store.view.popupData.assocValueKey instead
|
|
951
|
+
*/
|
|
952
|
+
assocValueKey?: string;
|
|
953
|
+
}, string>;
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* Change full hierarchy record association state. Also select/deselect dependent records according to widget options.
|
|
957
|
+
*/
|
|
958
|
+
declare const changeAssociationFullEpic: CXBoxEpic;
|
|
959
|
+
|
|
960
|
+
/**
|
|
961
|
+
* Sets intermediate state for association widget by storing associated records in pseudo-business component.
|
|
962
|
+
*
|
|
963
|
+
* Name for this pseudo-BC is formed as `${bcName}Delta`.
|
|
964
|
+
*/
|
|
965
|
+
declare const changeAssociations: ActionCreatorWithOptionalPayload< {
|
|
966
|
+
/**
|
|
967
|
+
* Assoc widget's business component
|
|
968
|
+
*/
|
|
969
|
+
bcName: string;
|
|
970
|
+
/**
|
|
971
|
+
* Records that marked as `associated` for this widget
|
|
972
|
+
*
|
|
973
|
+
* TODO: Will be mandatory in 2.0.0
|
|
974
|
+
*/
|
|
975
|
+
records?: DataItem[];
|
|
976
|
+
}, string>;
|
|
977
|
+
|
|
978
|
+
/**
|
|
979
|
+
* TODO
|
|
980
|
+
*/
|
|
981
|
+
declare const changeAssociationSameBc: ActionCreatorWithOptionalPayload< {
|
|
982
|
+
bcName: string;
|
|
983
|
+
depth: number;
|
|
984
|
+
widgetName: string;
|
|
985
|
+
dataItem: AssociatedItem;
|
|
986
|
+
assocValueKey: string;
|
|
987
|
+
}, string>;
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* @category Epics
|
|
991
|
+
*/
|
|
992
|
+
declare const changeAssociationSameBcEpic: CXBoxEpic;
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* TODO
|
|
996
|
+
*/
|
|
997
|
+
declare const changeChildrenAssociations: ActionCreatorWithOptionalPayload< {
|
|
998
|
+
bcName: string;
|
|
999
|
+
assocValueKey: string;
|
|
1000
|
+
selected: boolean;
|
|
1001
|
+
}, string>;
|
|
1002
|
+
|
|
1003
|
+
declare const changeChildrenAssociationsEpic: CXBoxEpic;
|
|
1004
|
+
|
|
1005
|
+
/**
|
|
1006
|
+
* TODO
|
|
1007
|
+
*/
|
|
1008
|
+
declare const changeChildrenAssociationsSameBc: ActionCreatorWithOptionalPayload< {
|
|
1009
|
+
bcName: string;
|
|
1010
|
+
depth: number;
|
|
1011
|
+
assocValueKey: string;
|
|
1012
|
+
selected: boolean;
|
|
1013
|
+
}, string>;
|
|
1014
|
+
|
|
1015
|
+
declare const changeChildrenAssociationsSameBcEpic: CXBoxEpic;
|
|
1016
|
+
|
|
1017
|
+
/**
|
|
1018
|
+
* TODO
|
|
1019
|
+
*/
|
|
1020
|
+
declare const changeDataItem: ActionCreatorWithOptionalPayload< {
|
|
1021
|
+
bcName: string;
|
|
1022
|
+
bcUrl: string;
|
|
1023
|
+
cursor: string;
|
|
1024
|
+
dataItem: PendingDataItem;
|
|
1025
|
+
disableRetry?: boolean;
|
|
1026
|
+
}, string>;
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* TODO
|
|
1030
|
+
*/
|
|
1031
|
+
declare const changeDataItems: ActionCreatorWithOptionalPayload< {
|
|
1032
|
+
bcName: string;
|
|
1033
|
+
cursors: string[];
|
|
1034
|
+
dataItems: PendingDataItem[];
|
|
1035
|
+
}, string>;
|
|
1036
|
+
|
|
1037
|
+
/**
|
|
1038
|
+
* TODO
|
|
1039
|
+
*/
|
|
1040
|
+
declare const changeDescendantsAssociationsFull: ActionCreatorWithOptionalPayload< {
|
|
1041
|
+
bcName: string;
|
|
1042
|
+
parentId: string;
|
|
1043
|
+
depth: number;
|
|
1044
|
+
assocValueKey: string;
|
|
1045
|
+
selected: boolean;
|
|
1046
|
+
}, string>;
|
|
1047
|
+
|
|
1048
|
+
/**
|
|
1049
|
+
* Change full hierarchy descendants association state
|
|
1050
|
+
*/
|
|
1051
|
+
declare const changeDescendantsAssociationsFullEpic: CXBoxEpic;
|
|
1052
|
+
|
|
1053
|
+
declare const changeLocation: ActionCreatorWithOptionalPayload< {
|
|
1054
|
+
location: Route;
|
|
1055
|
+
forceUpdate?: boolean;
|
|
1056
|
+
}, string>;
|
|
1057
|
+
|
|
1058
|
+
/**
|
|
1059
|
+
* Epic of changing the current route
|
|
1060
|
+
*
|
|
1061
|
+
* Checks route parameters (screen, view, BC cursors) relative to those
|
|
1062
|
+
* that are currently stored in the store, and in case of a mismatch
|
|
1063
|
+
* initiates reloading the screen, view or BC with new cursors.
|
|
1064
|
+
*
|
|
1065
|
+
*/
|
|
1066
|
+
declare const changeLocationEpic: CXBoxEpic;
|
|
1067
|
+
|
|
1068
|
+
/**
|
|
1069
|
+
*
|
|
1070
|
+
* TODO: Rename to `selectScreen` in 2.0.0
|
|
1071
|
+
*
|
|
1072
|
+
*/
|
|
1073
|
+
declare const changeScreen: CXBoxEpic;
|
|
1074
|
+
|
|
1075
|
+
/**
|
|
1076
|
+
*
|
|
1077
|
+
* TODO: Rename to `selectView` in 2.0.0
|
|
1078
|
+
*
|
|
1079
|
+
*/
|
|
1080
|
+
declare const changeViewEpic: CXBoxEpic;
|
|
1081
|
+
|
|
1082
|
+
export declare type CheckboxFieldMeta = AllWidgetTypeFieldBase & {
|
|
1083
|
+
type: FieldType.checkbox;
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
/**
|
|
1087
|
+
* Check specified show condition for the widget
|
|
1088
|
+
*
|
|
1089
|
+
* Condition is true (and widget is visible) if currently active record for condition business component has a value of the specific
|
|
1090
|
+
* field matching the condition; pending values are also enough for the condition to be true.
|
|
1091
|
+
* Condition is also true when it explicitly declared as default condition, if it's empty or of the legacy array format
|
|
1092
|
+
*
|
|
1093
|
+
* Otherwise the condition is false and the widget is hidden.
|
|
1094
|
+
*
|
|
1095
|
+
* @param condition Widget showCondition to check
|
|
1096
|
+
* @param cursor Id of active record for business component in condition
|
|
1097
|
+
* @param data An array of data.ts items to check for condition
|
|
1098
|
+
* @param pendingDataChanges Pending data.ts changes of the currently active view
|
|
1099
|
+
*/
|
|
1100
|
+
declare function checkShowCondition(condition: WidgetShowCondition | undefined, cursor: string, data: DataItem[], pendingDataChanges: Record<string, Record<string, PendingDataItem>>): boolean;
|
|
1101
|
+
|
|
1102
|
+
/**
|
|
1103
|
+
* Clears descendant business components pending changes on cursor change
|
|
1104
|
+
*
|
|
1105
|
+
* TODO: Review required as it might be no longer valid due to autosave middleware implementation
|
|
1106
|
+
*/
|
|
1107
|
+
declare const clearPendingDataChangesAfterCursorChangeEpic: CXBoxEpic;
|
|
1108
|
+
|
|
1109
|
+
/**
|
|
1110
|
+
* TODO
|
|
1111
|
+
*/
|
|
1112
|
+
declare const clearValidationFails: ActionCreatorWithOptionalPayload<null, string>;
|
|
1113
|
+
|
|
1114
|
+
/**
|
|
1115
|
+
* Close confirm modal window
|
|
1116
|
+
*/
|
|
1117
|
+
declare const closeConfirmModal: ActionCreatorWithOptionalPayload<null, string>;
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* TODO
|
|
1121
|
+
*/
|
|
1122
|
+
declare const closeNotification: ActionCreatorWithOptionalPayload< {
|
|
1123
|
+
id: number;
|
|
1124
|
+
}, string>;
|
|
1125
|
+
|
|
1126
|
+
/**
|
|
1127
|
+
* TODO
|
|
1128
|
+
*/
|
|
1129
|
+
declare const closeViewError: ActionCreatorWithOptionalPayload<null, string>;
|
|
1130
|
+
|
|
1131
|
+
/**
|
|
1132
|
+
* Closes currently active popup on view
|
|
1133
|
+
*/
|
|
1134
|
+
declare const closeViewPopup: ActionCreatorWithNonInferrablePayload<string>;
|
|
1135
|
+
|
|
1136
|
+
/**
|
|
1137
|
+
* Form a dictionary of override descriptors for those middleware
|
|
1138
|
+
*/
|
|
1139
|
+
export declare type CoreMiddlewareOverrideDescriptors = Record<CoreMiddlewareType, Middleware | null>;
|
|
1140
|
+
|
|
1141
|
+
/**
|
|
1142
|
+
* Type of core middlewares
|
|
1143
|
+
*/
|
|
1144
|
+
export declare type CoreMiddlewares = typeof middlewares;
|
|
1145
|
+
|
|
1146
|
+
/**
|
|
1147
|
+
* List the names of all core middlewares
|
|
1148
|
+
*/
|
|
1149
|
+
export declare type CoreMiddlewareType = keyof CoreMiddlewares;
|
|
1150
|
+
|
|
1151
|
+
export declare const coreOperations: OperationTypeCrud[];
|
|
1152
|
+
|
|
1153
|
+
declare function createApiError(error: AxiosError, context?: ApiCallContext_2): {
|
|
1154
|
+
payload: {
|
|
1155
|
+
error: AxiosError<unknown, any>;
|
|
1156
|
+
callContext: ApiCallContext;
|
|
1157
|
+
};
|
|
1158
|
+
type: string;
|
|
1159
|
+
};
|
|
1160
|
+
|
|
1161
|
+
declare function createApiErrorObservable(error: AxiosError, context?: ApiCallContext_2): Observable< {
|
|
1162
|
+
payload: {
|
|
1163
|
+
error: AxiosError<unknown, any>;
|
|
1164
|
+
callContext: ApiCallContext;
|
|
1165
|
+
};
|
|
1166
|
+
type: string;
|
|
1167
|
+
}>;
|
|
1168
|
+
|
|
1169
|
+
declare const createDataReducerBuilderManager: (initialState: DataState) => ReducerBuilderManager<DataState>;
|
|
1170
|
+
|
|
1171
|
+
declare const createDepthDataReducerBuilderManager: (initialState: DepthDataState) => ReducerBuilderManager<DepthDataState>;
|
|
1172
|
+
|
|
1173
|
+
/**
|
|
1174
|
+
* Router reducer
|
|
1175
|
+
*
|
|
1176
|
+
* Stores information about currently active route
|
|
1177
|
+
*/
|
|
1178
|
+
declare const createRouterReducerBuilderManager: <S extends Route>(initialState: S) => ReducerBuilderManager<S>;
|
|
1179
|
+
|
|
1180
|
+
/**
|
|
1181
|
+
* Screen reducer
|
|
1182
|
+
*
|
|
1183
|
+
* Stores information about currently active screen and various more persistent values which should be stored
|
|
1184
|
+
* until we navitage to a different screen.
|
|
1185
|
+
*/
|
|
1186
|
+
declare const createScreenReducerBuilderManager: <S extends ScreenState>(initialState: S) => ReducerBuilderManager<S>;
|
|
1187
|
+
|
|
1188
|
+
/**
|
|
1189
|
+
* Session reducer
|
|
1190
|
+
*
|
|
1191
|
+
* Stores information about currently active session and dataEpics.ts that should be persistent during all period of
|
|
1192
|
+
* user interaction with application.
|
|
1193
|
+
*/
|
|
1194
|
+
declare const createSessionReducerBuilderManager: <S extends Session>(initialState: S) => ReducerBuilderManager<S>;
|
|
1195
|
+
|
|
1196
|
+
/**
|
|
1197
|
+
* View reducer
|
|
1198
|
+
*
|
|
1199
|
+
* Stores information about currently active view and various fast-living pending values which should be stored
|
|
1200
|
+
* until we navitage to a different view.
|
|
1201
|
+
*/
|
|
1202
|
+
declare const createViewReducerBuilderManager: <S extends ViewState>(initialState: S) => ReducerBuilderManager<S>;
|
|
1203
|
+
|
|
1204
|
+
/**
|
|
1205
|
+
* Custom middleware interface
|
|
1206
|
+
*/
|
|
1207
|
+
export declare interface CustomMiddleware {
|
|
1208
|
+
/**
|
|
1209
|
+
* Implementation of custom middleware
|
|
1210
|
+
*/
|
|
1211
|
+
implementation: Middleware;
|
|
1212
|
+
/**
|
|
1213
|
+
* Priority of custom middleware
|
|
1214
|
+
*/
|
|
1215
|
+
priority: 'BEFORE' | 'AFTER';
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
/**
|
|
1219
|
+
* Type of custom middlewares
|
|
1220
|
+
*/
|
|
1221
|
+
export declare type CustomMiddlewares<T = Record<string, unknown>> = Partial<CoreMiddlewareOverrideDescriptors> | NewMiddlewareDescriptor<T>;
|
|
1222
|
+
|
|
1223
|
+
/**
|
|
1224
|
+
* Component of custom widget
|
|
1225
|
+
*
|
|
1226
|
+
* @deprecated TODO: Remove in 2.0.0
|
|
1227
|
+
*/
|
|
1228
|
+
export declare type CustomWidget = ComponentType<any>;
|
|
1229
|
+
|
|
1230
|
+
/**
|
|
1231
|
+
* Configuration of custom widget
|
|
1232
|
+
*/
|
|
1233
|
+
export declare interface CustomWidgetConfiguration {
|
|
1234
|
+
/**
|
|
1235
|
+
* Whether widget is popup
|
|
1236
|
+
*/
|
|
1237
|
+
isPopup?: boolean;
|
|
1238
|
+
/**
|
|
1239
|
+
* Component of custom widget
|
|
1240
|
+
*/
|
|
1241
|
+
component: ComponentType<any>;
|
|
1242
|
+
/**
|
|
1243
|
+
* Card of widget
|
|
1244
|
+
*/
|
|
1245
|
+
card?: ComponentType<any> | null;
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
export declare type CustomWidgetDescriptor = CustomWidget | CustomWidgetConfiguration;
|
|
1249
|
+
|
|
1250
|
+
/**
|
|
1251
|
+
* Default Epic typing with dependency injection
|
|
1252
|
+
*/
|
|
1253
|
+
export declare type CXBoxEpic<S = Store, A = Api> = Epic<AnyAction_2, AnyAction_2, S, EpicDependencyInjection<A>>;
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* Basic type for Cxbox API responses
|
|
1257
|
+
*
|
|
1258
|
+
* TODO: Move this to a an appropriate module
|
|
1259
|
+
*/
|
|
1260
|
+
export declare type CxboxResponse = {
|
|
1261
|
+
/**
|
|
1262
|
+
* If any response returs with this field, browser should redirect on this address
|
|
1263
|
+
*/
|
|
1264
|
+
redirectUrl?: string;
|
|
1265
|
+
[x: string]: any;
|
|
1266
|
+
};
|
|
1267
|
+
|
|
1268
|
+
declare const dataInitialState: DataState;
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* Instance of `Business component` data
|
|
1272
|
+
* Has unlimited number of fields, which available to widget
|
|
1273
|
+
*/
|
|
1274
|
+
export declare interface DataItem {
|
|
1275
|
+
/**
|
|
1276
|
+
* Record's identificator
|
|
1277
|
+
*/
|
|
1278
|
+
id: string;
|
|
1279
|
+
/**
|
|
1280
|
+
* Version of last record's edit
|
|
1281
|
+
*/
|
|
1282
|
+
vstamp: number;
|
|
1283
|
+
/**
|
|
1284
|
+
* User fields
|
|
1285
|
+
*/
|
|
1286
|
+
[fieldName: string]: DataValue;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Cxbox-specific data.ts item that classifies as tree node
|
|
1291
|
+
*/
|
|
1292
|
+
export declare type DataItemNode = DataNode & DataItem;
|
|
1293
|
+
|
|
1294
|
+
/**
|
|
1295
|
+
* Result of saving record, which back-end returns
|
|
1296
|
+
*/
|
|
1297
|
+
export declare interface DataItemResponse {
|
|
1298
|
+
data: {
|
|
1299
|
+
/**
|
|
1300
|
+
* Saved record
|
|
1301
|
+
*/
|
|
1302
|
+
record: DataItem;
|
|
1303
|
+
/**
|
|
1304
|
+
* Actions which have to do after saving
|
|
1305
|
+
*/
|
|
1306
|
+
postActions?: OperationPostInvokeAny[];
|
|
1307
|
+
preInvoke?: OperationPreInvoke;
|
|
1308
|
+
};
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
/**
|
|
1312
|
+
* Types for Tree-like structures (tree traversal, search, etc)
|
|
1313
|
+
*/
|
|
1314
|
+
/**
|
|
1315
|
+
* Base type for tree-like structures in flat array form
|
|
1316
|
+
*/
|
|
1317
|
+
export declare interface DataNode extends BaseDataNode {
|
|
1318
|
+
/**
|
|
1319
|
+
* String reference to a parent node
|
|
1320
|
+
*/
|
|
1321
|
+
parentId: string;
|
|
1322
|
+
/**
|
|
1323
|
+
* The depth of the node counting from the root of the tree
|
|
1324
|
+
*/
|
|
1325
|
+
level?: number;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
/**
|
|
1329
|
+
* State of `data.ts` in global store
|
|
1330
|
+
*/
|
|
1331
|
+
export declare interface DataState {
|
|
1332
|
+
[bcName: string]: DataItem[];
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
/**
|
|
1336
|
+
* Possible types of fields values
|
|
1337
|
+
*/
|
|
1338
|
+
export declare type DataValue = string | number | boolean | null | MultivalueSingleValue[] | undefined | DataItem[];
|
|
1339
|
+
|
|
1340
|
+
export declare type DateFieldMeta = AllWidgetTypeFieldBase & {
|
|
1341
|
+
type: FieldType.date;
|
|
1342
|
+
};
|
|
1343
|
+
|
|
1344
|
+
export declare type DateTimeFieldMeta = AllWidgetTypeFieldBase & {
|
|
1345
|
+
type: FieldType.dateTime;
|
|
1346
|
+
};
|
|
1347
|
+
|
|
1348
|
+
export declare type DateTimeWithSecondsFieldMeta = AllWidgetTypeFieldBase & {
|
|
1349
|
+
type: FieldType.dateTimeWithSeconds;
|
|
1350
|
+
};
|
|
1351
|
+
|
|
1352
|
+
/**
|
|
1353
|
+
* Transform {@link Route | Cxbox UI route} to string url.
|
|
1354
|
+
*
|
|
1355
|
+
* Reverse function is {@link defaultParseURL}.
|
|
1356
|
+
*
|
|
1357
|
+
* @param route Cxbox UI route
|
|
1358
|
+
* @category Utils
|
|
1359
|
+
*/
|
|
1360
|
+
declare function defaultBuildURL(route: Route): string;
|
|
1361
|
+
|
|
1362
|
+
export declare type DefaultNotificationType = 'success' | 'error' | 'info' | 'warning';
|
|
1363
|
+
|
|
1364
|
+
/**
|
|
1365
|
+
* Default implementation for utility to parse `history`-compatible location to {@link Route | Cxbox UI route}.
|
|
1366
|
+
*
|
|
1367
|
+
* Supports three types of URLs:
|
|
1368
|
+
* - {@link RouteType.screen | RouteType.screen}, i.e. an url referencing some UI entity that can be parsed to Route directly. Example: `/screen/name/view/name/`;
|
|
1369
|
+
* - {@link RouteType.router | RouteType.router}, i.e. an url without information about entity that should be handled on server side. Example: `/router/server-entity`
|
|
1370
|
+
* - {@link RouteType.default | RouteType.default}, i.e. an url that leads to default entity of the application. Example: `/`
|
|
1371
|
+
*
|
|
1372
|
+
* Reverse function is {@link defaultBuildURL}.
|
|
1373
|
+
*
|
|
1374
|
+
* @category Utils
|
|
1375
|
+
*/
|
|
1376
|
+
declare function defaultParseURL(url: URL): Route;
|
|
1377
|
+
|
|
1378
|
+
declare function deleteUndefinedFromObject(obj: Record<string, any>): void;
|
|
1379
|
+
|
|
1380
|
+
declare type DepthBcType = Record<number, {
|
|
1381
|
+
loading?: boolean;
|
|
1382
|
+
cursor?: string;
|
|
1383
|
+
}>;
|
|
1384
|
+
|
|
1385
|
+
export declare interface DepthDataState {
|
|
1386
|
+
[depth: number]: {
|
|
1387
|
+
[bcName: string]: DataItem[];
|
|
1388
|
+
};
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
export declare type DictionaryFieldMeta = AllWidgetTypeFieldBase & {
|
|
1392
|
+
type: FieldType.dictionary;
|
|
1393
|
+
multiple?: boolean;
|
|
1394
|
+
dictionaryName?: string;
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
/**
|
|
1398
|
+
* TODO
|
|
1399
|
+
*/
|
|
1400
|
+
declare const downloadFile: ActionCreatorWithOptionalPayload< {
|
|
1401
|
+
fileId: string;
|
|
1402
|
+
}, string>;
|
|
1403
|
+
|
|
1404
|
+
/**
|
|
1405
|
+
* TODO
|
|
1406
|
+
*/
|
|
1407
|
+
declare const downloadFileByUrl: ActionCreatorWithOptionalPayload< {
|
|
1408
|
+
url: string;
|
|
1409
|
+
}, string>;
|
|
1410
|
+
|
|
1411
|
+
declare const downloadFileByUrlEpic: CXBoxEpic;
|
|
1412
|
+
|
|
1413
|
+
declare const downloadFileEpic: CXBoxEpic;
|
|
1414
|
+
|
|
1415
|
+
/**
|
|
1416
|
+
* TODO
|
|
1417
|
+
*/
|
|
1418
|
+
declare const drillDown: ActionCreatorWithOptionalPayload< {
|
|
1419
|
+
url: string;
|
|
1420
|
+
drillDownType?: DrillDownType;
|
|
1421
|
+
urlName?: string;
|
|
1422
|
+
route: Route;
|
|
1423
|
+
widgetName?: string;
|
|
1424
|
+
}, string>;
|
|
1425
|
+
|
|
1426
|
+
declare const drillDownEpic: CXBoxEpic;
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* Types of drilldowns in the application, specified by Cxbox API
|
|
1430
|
+
*/
|
|
1431
|
+
export declare enum DrillDownType {
|
|
1432
|
+
/**
|
|
1433
|
+
* Drilldown to inner entity of the application (screen, view), i.e. url will be places after route hash sy: `#/${inner}`
|
|
1434
|
+
*/
|
|
1435
|
+
inner = "inner",
|
|
1436
|
+
/**
|
|
1437
|
+
* Drilldown to an url relative to the current url: `/${relative}`
|
|
1438
|
+
*/
|
|
1439
|
+
relative = "relative",
|
|
1440
|
+
/**
|
|
1441
|
+
* Drilldown to an url relative to the current url: `/${relative}` that opens in a new browser tab
|
|
1442
|
+
*/
|
|
1443
|
+
relativeNew = "relativeNew",
|
|
1444
|
+
/**
|
|
1445
|
+
* An external redirect, i.e. `http://${external}`
|
|
1446
|
+
*/
|
|
1447
|
+
external = "external",
|
|
1448
|
+
/**
|
|
1449
|
+
* An external redirect, i.e. `http://${external}` that opens in a new browser tab
|
|
1450
|
+
*/
|
|
1451
|
+
externalNew = "externalNew"
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
/**
|
|
1455
|
+
* TODO
|
|
1456
|
+
*/
|
|
1457
|
+
declare const dropAllAssociations: ActionCreatorWithOptionalPayload< {
|
|
1458
|
+
bcNames: string[];
|
|
1459
|
+
}, string>;
|
|
1460
|
+
|
|
1461
|
+
/**
|
|
1462
|
+
* TODO
|
|
1463
|
+
*/
|
|
1464
|
+
declare const dropAllAssociationsFull: ActionCreatorWithOptionalPayload< {
|
|
1465
|
+
bcName: string;
|
|
1466
|
+
depth: number;
|
|
1467
|
+
dropDescendants?: boolean;
|
|
1468
|
+
}, string>;
|
|
1469
|
+
|
|
1470
|
+
/**
|
|
1471
|
+
* TODO
|
|
1472
|
+
*/
|
|
1473
|
+
declare const dropAllAssociationsSameBc: ActionCreatorWithOptionalPayload< {
|
|
1474
|
+
bcName: string;
|
|
1475
|
+
depthFrom: number;
|
|
1476
|
+
}, string>;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* TODO
|
|
1480
|
+
*/
|
|
1481
|
+
declare const emptyAction: ActionCreatorWithOptionalPayload<null, string>;
|
|
1482
|
+
|
|
1483
|
+
export declare interface EpicDependencyInjection<A = Api> {
|
|
1484
|
+
api: A;
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1487
|
+
declare namespace epics {
|
|
1488
|
+
export {
|
|
1489
|
+
sendOperationEpic,
|
|
1490
|
+
showAssocPopupEpic,
|
|
1491
|
+
fileUploadConfirmEpic,
|
|
1492
|
+
selectTableCellInitEpic,
|
|
1493
|
+
showFileUploadPopupEpic,
|
|
1494
|
+
sendOperationAssociateEpic,
|
|
1495
|
+
getRowMetaByForceActiveEpic,
|
|
1496
|
+
showAllTableRecordsInitEpic,
|
|
1497
|
+
clearPendingDataChangesAfterCursorChangeEpic,
|
|
1498
|
+
drillDownEpic,
|
|
1499
|
+
loginDoneEpic,
|
|
1500
|
+
changeViewEpic,
|
|
1501
|
+
handleRouterEpic,
|
|
1502
|
+
changeScreen,
|
|
1503
|
+
userDrillDownEpic,
|
|
1504
|
+
changeLocationEpic,
|
|
1505
|
+
selectViewFailEpic,
|
|
1506
|
+
selectScreenFailEpic,
|
|
1507
|
+
userDrillDownChangeCursorsEpic,
|
|
1508
|
+
apiErrorEpic,
|
|
1509
|
+
downloadFileEpic,
|
|
1510
|
+
httpError401Epic,
|
|
1511
|
+
httpError409Epic,
|
|
1512
|
+
httpError418Epic,
|
|
1513
|
+
httpError500Epic,
|
|
1514
|
+
httpErrorDefaultEpic,
|
|
1515
|
+
downloadFileByUrlEpic,
|
|
1516
|
+
processPostInvokeEpic,
|
|
1517
|
+
processPostInvokeConfirmEpic,
|
|
1518
|
+
switchRoleEpic,
|
|
1519
|
+
refreshMetaEpic,
|
|
1520
|
+
loginDoneSessionEpic,
|
|
1521
|
+
loginByAnotherRoleEpic,
|
|
1522
|
+
refreshMetaAndReloadPageEpic,
|
|
1523
|
+
bcNewDataEpic,
|
|
1524
|
+
bcLoadMoreEpic,
|
|
1525
|
+
bcSaveDataEpic,
|
|
1526
|
+
selectViewEpic,
|
|
1527
|
+
bcFetchDataEpic,
|
|
1528
|
+
bcDeleteDataEpic,
|
|
1529
|
+
bcSelectRecordEpic,
|
|
1530
|
+
changeAssociationEpic,
|
|
1531
|
+
bcCancelCreateDataEpic,
|
|
1532
|
+
bcSelectDepthRecordEpic,
|
|
1533
|
+
removeMultivalueTagEpic,
|
|
1534
|
+
bcFetchRowMetaRequestEpic,
|
|
1535
|
+
changeAssociationFullEpic,
|
|
1536
|
+
saveAssociationsActiveEpic,
|
|
1537
|
+
changeAssociationSameBcEpic,
|
|
1538
|
+
inlinePickListFetchDataEpic,
|
|
1539
|
+
saveAssociationsPassiveEpic,
|
|
1540
|
+
changeChildrenAssociationsEpic,
|
|
1541
|
+
changeChildrenAssociationsSameBcEpic,
|
|
1542
|
+
changeDescendantsAssociationsFullEpic
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
export { epics }
|
|
1546
|
+
|
|
1547
|
+
/**
|
|
1548
|
+
* Convert string to RegExp
|
|
1549
|
+
*
|
|
1550
|
+
* @param str Source string
|
|
1551
|
+
*/
|
|
1552
|
+
declare function escapedSrc(str: string): RegExp;
|
|
1553
|
+
|
|
1554
|
+
/**
|
|
1555
|
+
* Download state to device
|
|
1556
|
+
*/
|
|
1557
|
+
declare const exportState: ActionCreatorWithOptionalPayload<null, string>;
|
|
1558
|
+
|
|
1559
|
+
export declare enum FieldType {
|
|
1560
|
+
number = "number",
|
|
1561
|
+
input = "input",
|
|
1562
|
+
monthYear = "monthYear",
|
|
1563
|
+
date = "date",
|
|
1564
|
+
dateTime = "dateTime",
|
|
1565
|
+
dateTimeWithSeconds = "dateTimeWithSeconds",
|
|
1566
|
+
checkbox = "checkbox",
|
|
1567
|
+
/**
|
|
1568
|
+
* @deprecated TODO: project-specific, remove in 2.0.0
|
|
1569
|
+
*/
|
|
1570
|
+
checkboxSql = "checkboxSql",
|
|
1571
|
+
/**
|
|
1572
|
+
* @deprecated TODO: project-specific, remove in 2.0.0
|
|
1573
|
+
*/
|
|
1574
|
+
DMN = "DMN",
|
|
1575
|
+
pickList = "pickList",
|
|
1576
|
+
inlinePickList = "inline-pickList",
|
|
1577
|
+
dictionary = "dictionary",
|
|
1578
|
+
hidden = "hidden",// @deprecated TODO: Remove in 2.0.0 in favor of `hidden` flag of widget meta field description
|
|
1579
|
+
text = "text",
|
|
1580
|
+
percent = "percent",
|
|
1581
|
+
fileUpload = "fileUpload",
|
|
1582
|
+
money = "money",
|
|
1583
|
+
/**
|
|
1584
|
+
* @deprecated TODO: project-specific, remove in 2.0.0
|
|
1585
|
+
*/
|
|
1586
|
+
comboCondition = "combo-condition",
|
|
1587
|
+
richText = "richText",
|
|
1588
|
+
printForm = "printForm",
|
|
1589
|
+
multifield = "multifield",
|
|
1590
|
+
multivalue = "multivalue",
|
|
1591
|
+
multivalueHover = "multivalueHover",
|
|
1592
|
+
hint = "hint",
|
|
1593
|
+
radio = "radio"
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
/**
|
|
1597
|
+
* It sends customAction request for `file-upload-save` endpoint with `bulkIds` dataEpics.ts
|
|
1598
|
+
* containing ids of uploaded files.
|
|
1599
|
+
* On success it fires `sendOperationSuccess`, `bcForceUpdate` and `closeViewPopup` actions
|
|
1600
|
+
* to refresh business component and close popup.
|
|
1601
|
+
*
|
|
1602
|
+
* It also launces postOperationRoutine to handle pre and post invokes.
|
|
1603
|
+
*
|
|
1604
|
+
*/
|
|
1605
|
+
declare const fileUploadConfirmEpic: CXBoxEpic;
|
|
1606
|
+
|
|
1607
|
+
export declare type FileUploadFieldMeta = AllWidgetTypeFieldBase & {
|
|
1608
|
+
type: FieldType.fileUpload;
|
|
1609
|
+
fileIdKey: string;
|
|
1610
|
+
fileSource: string;
|
|
1611
|
+
snapshotFileIdKey?: string;
|
|
1612
|
+
};
|
|
1613
|
+
|
|
1614
|
+
export declare interface FilterGroup {
|
|
1615
|
+
name: string;
|
|
1616
|
+
filters: string;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
export declare enum FilterType {
|
|
1620
|
+
/**
|
|
1621
|
+
* Transforms into combination of 'greaterOrEqualThan' and 'lessOrEqualThan' (See src/utils/filters.ts)
|
|
1622
|
+
*/
|
|
1623
|
+
range = "range",
|
|
1624
|
+
equals = "equals",
|
|
1625
|
+
greaterThan = "greaterThan",
|
|
1626
|
+
lessThan = "lessThan",
|
|
1627
|
+
greaterOrEqualThan = "greaterOrEqualThan",
|
|
1628
|
+
lessOrEqualThan = "lessOrEqualThan",
|
|
1629
|
+
contains = "contains",
|
|
1630
|
+
specified = "specified",
|
|
1631
|
+
specifiedBooleanSql = "specifiedBooleanSql",
|
|
1632
|
+
equalsOneOf = "equalsOneOf",
|
|
1633
|
+
containsOneOf = "containsOneOf"
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* Extract operations from all operations groups and return them as an array of flat operations
|
|
1638
|
+
*
|
|
1639
|
+
* @param operations Operations or operation groups as received from row meta
|
|
1640
|
+
* @category Utils
|
|
1641
|
+
*/
|
|
1642
|
+
declare function flattenOperations(operations: Array<Operation | OperationGroup>): Operation[];
|
|
1643
|
+
|
|
1644
|
+
/**
|
|
1645
|
+
* Request to change Force active field was unsuccesful
|
|
1646
|
+
*/
|
|
1647
|
+
declare const forceActiveChangeFail: ActionCreatorWithOptionalPayload< {
|
|
1648
|
+
/**
|
|
1649
|
+
* Business component initiated force active change
|
|
1650
|
+
*/
|
|
1651
|
+
bcName: string;
|
|
1652
|
+
/**
|
|
1653
|
+
* Cursors hierarchy at the time of force active change to
|
|
1654
|
+
*/
|
|
1655
|
+
bcUrl: string;
|
|
1656
|
+
/**
|
|
1657
|
+
* Error to show in modal
|
|
1658
|
+
*/
|
|
1659
|
+
viewError: string;
|
|
1660
|
+
/**
|
|
1661
|
+
* Validation errors on fields
|
|
1662
|
+
*/
|
|
1663
|
+
entityError: OperationErrorEntity;
|
|
1664
|
+
}, string>;
|
|
1665
|
+
|
|
1666
|
+
/**
|
|
1667
|
+
* TODO
|
|
1668
|
+
*/
|
|
1669
|
+
declare const forceActiveRmUpdate: ActionCreatorWithOptionalPayload< {
|
|
1670
|
+
/**
|
|
1671
|
+
* current data for record that initiated rowMeta fetch
|
|
1672
|
+
*/
|
|
1673
|
+
currentRecordData: DataItem;
|
|
1674
|
+
rowMeta: RowMeta;
|
|
1675
|
+
bcName: string;
|
|
1676
|
+
bcUrl: string;
|
|
1677
|
+
cursor: string;
|
|
1678
|
+
}, string>;
|
|
1679
|
+
|
|
1680
|
+
/**
|
|
1681
|
+
* Find all widgets referencing or descendant from specified origin BC
|
|
1682
|
+
*
|
|
1683
|
+
* @param originBcName Origin business component name
|
|
1684
|
+
* @param widgets Widgets to search through
|
|
1685
|
+
* @param bcMap Business components dictionary
|
|
1686
|
+
* @returns A dictionary of business components and widgets
|
|
1687
|
+
*/
|
|
1688
|
+
declare function getBcChildren(originBcName: string, widgets: WidgetMeta[], bcMap: Record<string, BcMetaState>): Record<string, string[]>;
|
|
1689
|
+
|
|
1690
|
+
/**
|
|
1691
|
+
* Recursively traverse through each node and their descendant to aggregate ids of all
|
|
1692
|
+
* descendant nodes into `result` array.
|
|
1693
|
+
*
|
|
1694
|
+
* @param nodes Nodes to start search from; their ids also will be part of the result
|
|
1695
|
+
* @param result An array of ids for found descendant nodes
|
|
1696
|
+
*/
|
|
1697
|
+
declare function getDescendants(nodes: TreeNodeDescending[], result: string[]): void;
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* If there is a template in the field name then returns the formatted string
|
|
1701
|
+
*
|
|
1702
|
+
* @param title Field name
|
|
1703
|
+
* @param dataItem An object in the fields of which tokens should be searched
|
|
1704
|
+
*/
|
|
1705
|
+
declare function getFieldTitle(title: string, dataItem?: DataItem): string;
|
|
1706
|
+
|
|
1707
|
+
/**
|
|
1708
|
+
* Maps an input array of BcFilter objects into a dictionary of GET-request params
|
|
1709
|
+
*
|
|
1710
|
+
* Name of the param formed as field name and filter type, separated by dot,
|
|
1711
|
+
* e.g. `${filter.fieldName}.${filter.type}`
|
|
1712
|
+
*
|
|
1713
|
+
* Value of the param is:
|
|
1714
|
+
* - for non-array values, stringified filter value
|
|
1715
|
+
* - for array values, a comma-separated list of stringified elements with each element enclosed in double quotes
|
|
1716
|
+
*
|
|
1717
|
+
* @see {@link parseFilters} Reverse function
|
|
1718
|
+
*
|
|
1719
|
+
* @param filters Filters for business components
|
|
1720
|
+
* @returns Dictionary of query-params for GET-request
|
|
1721
|
+
* @category Utils
|
|
1722
|
+
*/
|
|
1723
|
+
declare function getFilters(filters: BcFilter[]): Record<string, string>;
|
|
1724
|
+
|
|
1725
|
+
/**
|
|
1726
|
+
* Returns appropriate filtration type for specified field type.
|
|
1727
|
+
*
|
|
1728
|
+
* - Text-based fields use `contains`
|
|
1729
|
+
* - Checkbox fields use `specified` (boolean)
|
|
1730
|
+
* - Dictionary fiels use `equalsOneOf`
|
|
1731
|
+
*
|
|
1732
|
+
* All other field types use strict `equals`
|
|
1733
|
+
*
|
|
1734
|
+
* @param fieldType Field type
|
|
1735
|
+
*/
|
|
1736
|
+
declare function getFilterType(fieldType: FieldType): FilterType.equals | FilterType.contains | FilterType.specified | FilterType.equalsOneOf;
|
|
1737
|
+
|
|
1738
|
+
declare type GetParamsMap = Record<string, string | number>;
|
|
1739
|
+
|
|
1740
|
+
declare const getRouteFromString: (ulrString: string) => Route;
|
|
1741
|
+
|
|
1742
|
+
/**
|
|
1743
|
+
* Sends row meta request when `forceActive` field fires `onChange`
|
|
1744
|
+
*/
|
|
1745
|
+
declare const getRowMetaByForceActiveEpic: CXBoxEpic;
|
|
1746
|
+
|
|
1747
|
+
/**
|
|
1748
|
+
* Maps an input array of business component sorters into a dictionary of query params for
|
|
1749
|
+
* Cxbox API, where values are field names and keys follows the template:
|
|
1750
|
+
* `_sort.${index}.${item.direction}`
|
|
1751
|
+
*
|
|
1752
|
+
* @param sorters Array of business component sorters
|
|
1753
|
+
* @returns Dictionary of query-params for GET-request
|
|
1754
|
+
* @category Utils
|
|
1755
|
+
*/
|
|
1756
|
+
declare function getSorters(sorters: BcSorter[]): Record<string, string>;
|
|
1757
|
+
|
|
1758
|
+
/**
|
|
1759
|
+
* TODO
|
|
1760
|
+
*
|
|
1761
|
+
* @param literals
|
|
1762
|
+
* @param placeholders
|
|
1763
|
+
*/
|
|
1764
|
+
declare function getTemplate(literals: TemplateStringsArray, ...placeholders: any[]): string;
|
|
1765
|
+
|
|
1766
|
+
/**
|
|
1767
|
+
* For server side routing where {@link RouteType.router | routes are handled by Cxbox API endpoint}, this action is dispatched
|
|
1768
|
+
* to process requested route.
|
|
1769
|
+
*/
|
|
1770
|
+
declare const handleRouter: ActionCreatorWithOptionalPayload< {
|
|
1771
|
+
/**
|
|
1772
|
+
* An URL that will be passed to Cxbox API router endpoint
|
|
1773
|
+
*/
|
|
1774
|
+
path: string;
|
|
1775
|
+
/**
|
|
1776
|
+
* AJAX request parameters for the requests
|
|
1777
|
+
*/
|
|
1778
|
+
params: Record<string, unknown>;
|
|
1779
|
+
}, string>;
|
|
1780
|
+
|
|
1781
|
+
declare const handleRouterEpic: CXBoxEpic;
|
|
1782
|
+
|
|
1783
|
+
/**
|
|
1784
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of `hidden` flag of widget meta field description
|
|
1785
|
+
*/
|
|
1786
|
+
export declare type HiddenFieldMeta = AllWidgetTypeFieldBase & {
|
|
1787
|
+
type: FieldType.hidden;
|
|
1788
|
+
};
|
|
1789
|
+
|
|
1790
|
+
/**
|
|
1791
|
+
* Fires for specific HTTP status code
|
|
1792
|
+
*/
|
|
1793
|
+
declare const httpError: ActionCreatorWithOptionalPayload< {
|
|
1794
|
+
/**
|
|
1795
|
+
* Status code for failed request caught by `onErrorHook`
|
|
1796
|
+
*/
|
|
1797
|
+
statusCode: number;
|
|
1798
|
+
/**
|
|
1799
|
+
* Axios error object
|
|
1800
|
+
*/
|
|
1801
|
+
error: AxiosError;
|
|
1802
|
+
/**
|
|
1803
|
+
* Request context
|
|
1804
|
+
*/
|
|
1805
|
+
callContext: ApiCallContext;
|
|
1806
|
+
}, string>;
|
|
1807
|
+
|
|
1808
|
+
declare const httpError401Epic: CXBoxEpic;
|
|
1809
|
+
|
|
1810
|
+
declare const httpError409Epic: CXBoxEpic;
|
|
1811
|
+
|
|
1812
|
+
declare const httpError418Epic: CXBoxEpic;
|
|
1813
|
+
|
|
1814
|
+
declare const httpError500Epic: CXBoxEpic;
|
|
1815
|
+
|
|
1816
|
+
declare const httpErrorDefaultEpic: CXBoxEpic;
|
|
1817
|
+
|
|
1818
|
+
declare const initialDepthDataState: DepthDataState;
|
|
1819
|
+
|
|
1820
|
+
declare const initialRouterState: Route;
|
|
1821
|
+
|
|
1822
|
+
declare const initialScreenState: ScreenState;
|
|
1823
|
+
|
|
1824
|
+
declare const initialSessionState: Session;
|
|
1825
|
+
|
|
1826
|
+
declare const initialViewState: ViewState;
|
|
1827
|
+
|
|
1828
|
+
declare const inlinePickListFetchDataEpic: CXBoxEpic;
|
|
1829
|
+
|
|
1830
|
+
/**
|
|
1831
|
+
* Fetch data request for searchable fields
|
|
1832
|
+
*/
|
|
1833
|
+
declare const inlinePickListFetchDataRequest: ActionCreatorWithOptionalPayload< {
|
|
1834
|
+
/**
|
|
1835
|
+
* The business component to fetch data for
|
|
1836
|
+
*/
|
|
1837
|
+
bcName: string;
|
|
1838
|
+
/**
|
|
1839
|
+
* Search expression // TODO: Check format
|
|
1840
|
+
*/
|
|
1841
|
+
searchSpec: string;
|
|
1842
|
+
/**
|
|
1843
|
+
* Value to search for
|
|
1844
|
+
*/
|
|
1845
|
+
searchString: string;
|
|
1846
|
+
}, string>;
|
|
1847
|
+
|
|
1848
|
+
export declare type InlinePickListFieldMeta = AllWidgetTypeFieldBase & {
|
|
1849
|
+
type: FieldType.inlinePickList;
|
|
1850
|
+
searchSpec: string;
|
|
1851
|
+
popupBcName: string;
|
|
1852
|
+
pickMap: PickMap_2;
|
|
1853
|
+
};
|
|
1854
|
+
|
|
1855
|
+
export declare type InputFieldMeta = AllWidgetTypeFieldBase & {
|
|
1856
|
+
type: FieldType.input | FieldType.hint;
|
|
1857
|
+
};
|
|
1858
|
+
|
|
1859
|
+
declare namespace interfaces {
|
|
1860
|
+
export {
|
|
1861
|
+
BcMeta,
|
|
1862
|
+
BcMetaState,
|
|
1863
|
+
DataValue,
|
|
1864
|
+
DataItem,
|
|
1865
|
+
MultivalueSingleValue,
|
|
1866
|
+
MultivalueSingleValueOptions,
|
|
1867
|
+
PendingDataItem,
|
|
1868
|
+
DataItemResponse,
|
|
1869
|
+
BcDataResponse,
|
|
1870
|
+
DataState,
|
|
1871
|
+
DepthDataState,
|
|
1872
|
+
PickMap,
|
|
1873
|
+
RecordSnapshotState,
|
|
1874
|
+
SystemNotification,
|
|
1875
|
+
CxboxResponse,
|
|
1876
|
+
ObjectMap,
|
|
1877
|
+
AppNotificationType,
|
|
1878
|
+
DrillDownType,
|
|
1879
|
+
Route,
|
|
1880
|
+
RouteType,
|
|
1881
|
+
ScreenMetaResponse,
|
|
1882
|
+
ScreenState,
|
|
1883
|
+
CoreMiddlewares,
|
|
1884
|
+
CustomMiddleware,
|
|
1885
|
+
CoreMiddlewareType,
|
|
1886
|
+
NewMiddlewareDescriptor,
|
|
1887
|
+
CoreMiddlewareOverrideDescriptors,
|
|
1888
|
+
CustomMiddlewares,
|
|
1889
|
+
UserRole,
|
|
1890
|
+
DefaultNotificationType,
|
|
1891
|
+
Notification_2 as Notification,
|
|
1892
|
+
NotificationKeys,
|
|
1893
|
+
Session,
|
|
1894
|
+
LoginResponse,
|
|
1895
|
+
SessionScreen,
|
|
1896
|
+
PendingRequest,
|
|
1897
|
+
Store,
|
|
1898
|
+
FieldType,
|
|
1899
|
+
ViewSelectedCell,
|
|
1900
|
+
PendingValidationFails,
|
|
1901
|
+
PendingValidationFailsFormat,
|
|
1902
|
+
ViewState,
|
|
1903
|
+
ViewMetaResponse,
|
|
1904
|
+
PopupType,
|
|
1905
|
+
PopupData,
|
|
1906
|
+
ApplicationError,
|
|
1907
|
+
ApplicationErrorType,
|
|
1908
|
+
ApplicationErrorBase,
|
|
1909
|
+
BusinessError,
|
|
1910
|
+
SystemError,
|
|
1911
|
+
NetworkError,
|
|
1912
|
+
isCustomWidget,
|
|
1913
|
+
isCustomWidgetConfiguration,
|
|
1914
|
+
isWidgetFieldBlock,
|
|
1915
|
+
WidgetOptions,
|
|
1916
|
+
WidgetShowCondition,
|
|
1917
|
+
LayoutRow,
|
|
1918
|
+
LayoutCol,
|
|
1919
|
+
WidgetOperations,
|
|
1920
|
+
TableOperations,
|
|
1921
|
+
WidgetTableHierarchy,
|
|
1922
|
+
WidgetFieldBase,
|
|
1923
|
+
WidgetListFieldBase,
|
|
1924
|
+
WidgetFormFieldBase,
|
|
1925
|
+
AllWidgetTypeFieldBase,
|
|
1926
|
+
NumberFieldMeta,
|
|
1927
|
+
DateFieldMeta,
|
|
1928
|
+
CheckboxFieldMeta,
|
|
1929
|
+
DateTimeFieldMeta,
|
|
1930
|
+
DateTimeWithSecondsFieldMeta,
|
|
1931
|
+
DictionaryFieldMeta,
|
|
1932
|
+
TextFieldMeta,
|
|
1933
|
+
InputFieldMeta,
|
|
1934
|
+
MultiFieldMeta,
|
|
1935
|
+
MultivalueFieldMeta,
|
|
1936
|
+
PickListFieldMeta,
|
|
1937
|
+
InlinePickListFieldMeta,
|
|
1938
|
+
FileUploadFieldMeta,
|
|
1939
|
+
WidgetFormField,
|
|
1940
|
+
WidgetListField,
|
|
1941
|
+
HiddenFieldMeta,
|
|
1942
|
+
RadioButtonFieldMeta,
|
|
1943
|
+
WidgetField,
|
|
1944
|
+
WidgetInfoField,
|
|
1945
|
+
WidgetTypes,
|
|
1946
|
+
PositionTypes,
|
|
1947
|
+
TableLikeWidgetTypes,
|
|
1948
|
+
PopupWidgetTypes,
|
|
1949
|
+
WidgetInfoOptions,
|
|
1950
|
+
WidgetMeta,
|
|
1951
|
+
WidgetFieldBlock,
|
|
1952
|
+
WidgetFieldsOrBlocks,
|
|
1953
|
+
WidgetFormMeta,
|
|
1954
|
+
WidgetTableMeta,
|
|
1955
|
+
WidgetInfoMeta,
|
|
1956
|
+
WidgetTextMeta,
|
|
1957
|
+
NavigationOptions,
|
|
1958
|
+
NavigationWidgetMeta,
|
|
1959
|
+
WidgetMetaAny,
|
|
1960
|
+
CustomWidget,
|
|
1961
|
+
CustomWidgetConfiguration,
|
|
1962
|
+
CustomWidgetDescriptor,
|
|
1963
|
+
PaginationMode,
|
|
1964
|
+
isOperationGroup,
|
|
1965
|
+
OperationType,
|
|
1966
|
+
OperationInclusionDescriptor,
|
|
1967
|
+
OperationTypeCrud,
|
|
1968
|
+
coreOperations,
|
|
1969
|
+
Operation,
|
|
1970
|
+
OperationGroup,
|
|
1971
|
+
OperationPreInvoke,
|
|
1972
|
+
OperationPreInvokeType,
|
|
1973
|
+
OperationPostInvokeType,
|
|
1974
|
+
OperationPostInvokeConfirmType,
|
|
1975
|
+
OperationPostInvokeConfirm,
|
|
1976
|
+
OperationModalInvokeConfirm,
|
|
1977
|
+
OperationPostInvoke,
|
|
1978
|
+
OperationPostInvokeRefreshBc,
|
|
1979
|
+
OperationPostInvokeDownloadFile,
|
|
1980
|
+
OperationPostInvokeDownloadFileByUrl,
|
|
1981
|
+
OperationPostInvokeDrillDown,
|
|
1982
|
+
OperationPostInvokeOpenPickList,
|
|
1983
|
+
OperationPostInvokeShowMessage,
|
|
1984
|
+
OperationPostInvokeAny,
|
|
1985
|
+
OperationScope,
|
|
1986
|
+
AssociatedItem,
|
|
1987
|
+
OperationError,
|
|
1988
|
+
OperationErrorEntity,
|
|
1989
|
+
RequestType,
|
|
1990
|
+
RowMeta,
|
|
1991
|
+
RowMetaResponse,
|
|
1992
|
+
RowMetaField,
|
|
1993
|
+
FilterType,
|
|
1994
|
+
BcFilter,
|
|
1995
|
+
BcSorter,
|
|
1996
|
+
FilterGroup,
|
|
1997
|
+
EpicDependencyInjection,
|
|
1998
|
+
CXBoxEpic,
|
|
1999
|
+
isViewNavigationItem,
|
|
2000
|
+
isViewNavigationCategory,
|
|
2001
|
+
isViewNavigationGroup,
|
|
2002
|
+
ViewNavigationGroup,
|
|
2003
|
+
MenuItem,
|
|
2004
|
+
ViewNavigationCategory,
|
|
2005
|
+
ViewNavigationItem,
|
|
2006
|
+
NavigationLevel,
|
|
2007
|
+
NavigationTab,
|
|
2008
|
+
BaseDataNode,
|
|
2009
|
+
DataNode,
|
|
2010
|
+
DataItemNode,
|
|
2011
|
+
TreeNodeAscending,
|
|
2012
|
+
TreeNodeDescending,
|
|
2013
|
+
TreeNodeBidirectional,
|
|
2014
|
+
TreeAssociatedRecord,
|
|
2015
|
+
TreeNodeCollapsable
|
|
2016
|
+
}
|
|
2017
|
+
}
|
|
2018
|
+
export { interfaces }
|
|
2019
|
+
|
|
2020
|
+
/**
|
|
2021
|
+
* Check if descriptor is just a widget, or it has additional data.ts
|
|
2022
|
+
*/
|
|
2023
|
+
export declare function isCustomWidget(descriptor: CustomWidgetDescriptor): descriptor is CustomWidget;
|
|
2024
|
+
|
|
2025
|
+
/**
|
|
2026
|
+
* Checks whether @param descriptor is an instance of `CustomWidgetConfiguration`
|
|
2027
|
+
*
|
|
2028
|
+
* @param descriptor custom widget descriptor
|
|
2029
|
+
*/
|
|
2030
|
+
export declare function isCustomWidgetConfiguration(descriptor: CustomWidgetDescriptor): descriptor is CustomWidgetConfiguration;
|
|
2031
|
+
|
|
2032
|
+
/**
|
|
2033
|
+
*
|
|
2034
|
+
* @param operation
|
|
2035
|
+
*/
|
|
2036
|
+
export declare function isOperationGroup(operation: Operation | OperationGroup): operation is OperationGroup;
|
|
2037
|
+
|
|
2038
|
+
/**
|
|
2039
|
+
* @param item
|
|
2040
|
+
* @deprecated ViewNavigationCategory will be deleted in 2.0.0
|
|
2041
|
+
* @category Type Guards
|
|
2042
|
+
*/
|
|
2043
|
+
export declare function isViewNavigationCategory(item: any): item is ViewNavigationCategory;
|
|
2044
|
+
|
|
2045
|
+
/**
|
|
2046
|
+
* Returns MenuItem if it is ViewNavigationGroup
|
|
2047
|
+
*
|
|
2048
|
+
* @param item to be identified as group
|
|
2049
|
+
* @category Type Guards
|
|
2050
|
+
*/
|
|
2051
|
+
export declare function isViewNavigationGroup(item: MenuItem): item is ViewNavigationGroup;
|
|
2052
|
+
|
|
2053
|
+
/**
|
|
2054
|
+
* Returns MenuItem if it is ViewNavigationItem
|
|
2055
|
+
*
|
|
2056
|
+
* @param item to be identified as view
|
|
2057
|
+
* @category Type Guards
|
|
2058
|
+
*/
|
|
2059
|
+
export declare function isViewNavigationItem(item: MenuItem): item is ViewNavigationItem;
|
|
2060
|
+
|
|
2061
|
+
/**
|
|
2062
|
+
* TODO
|
|
2063
|
+
*
|
|
2064
|
+
* @param item
|
|
2065
|
+
* @category Type Guards
|
|
2066
|
+
*/
|
|
2067
|
+
export declare function isWidgetFieldBlock(item: any): item is WidgetFieldBlock<any>;
|
|
2068
|
+
|
|
2069
|
+
/**
|
|
2070
|
+
* Description of the interface for WidgetOptions's layout.rows
|
|
2071
|
+
*/
|
|
2072
|
+
export declare interface LayoutCol {
|
|
2073
|
+
fieldKey: string;
|
|
2074
|
+
span?: number;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
2077
|
+
/**
|
|
2078
|
+
* Description of the interface for LayoutRow
|
|
2079
|
+
*/
|
|
2080
|
+
export declare interface LayoutRow {
|
|
2081
|
+
cols: LayoutCol[];
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
/**
|
|
2085
|
+
* Authentication request
|
|
2086
|
+
*/
|
|
2087
|
+
declare const login: ActionCreatorWithOptionalPayload< {
|
|
2088
|
+
/**
|
|
2089
|
+
* User-provided login
|
|
2090
|
+
*/
|
|
2091
|
+
login: string;
|
|
2092
|
+
/**
|
|
2093
|
+
* User-provided password
|
|
2094
|
+
*/
|
|
2095
|
+
password: string;
|
|
2096
|
+
/**
|
|
2097
|
+
* Optionally user can choose a role to authentificate with
|
|
2098
|
+
*/
|
|
2099
|
+
role?: string;
|
|
2100
|
+
}, string>;
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* Performed on role switching
|
|
2104
|
+
*/
|
|
2105
|
+
declare const loginByAnotherRoleEpic: CXBoxEpic;
|
|
2106
|
+
|
|
2107
|
+
/**
|
|
2108
|
+
* Login was successful
|
|
2109
|
+
*/
|
|
2110
|
+
declare const loginDone: ActionCreatorWithOptionalPayload<LoginResponse, string>;
|
|
2111
|
+
|
|
2112
|
+
/**
|
|
2113
|
+
* Fires `selectScreen` or `selectScreenFail` to set requested in url screen as active
|
|
2114
|
+
* after succesful login.
|
|
2115
|
+
*
|
|
2116
|
+
* For server-side router fires `handleRouter` instead.
|
|
2117
|
+
*
|
|
2118
|
+
*/
|
|
2119
|
+
declare const loginDoneEpic: CXBoxEpic;
|
|
2120
|
+
|
|
2121
|
+
/**
|
|
2122
|
+
* Fires on successful login; there is no default implementation related to this epic,
|
|
2123
|
+
* but it can be used to customize successful login behaivior.
|
|
2124
|
+
*/
|
|
2125
|
+
declare const loginDoneSessionEpic: CXBoxEpic;
|
|
2126
|
+
|
|
2127
|
+
/**
|
|
2128
|
+
* Login was unsuccesful
|
|
2129
|
+
*/
|
|
2130
|
+
declare const loginFail: ActionCreatorWithOptionalPayload< {
|
|
2131
|
+
/**
|
|
2132
|
+
* Reason could be provided
|
|
2133
|
+
*/
|
|
2134
|
+
errorMsg: string;
|
|
2135
|
+
}, string>;
|
|
2136
|
+
|
|
2137
|
+
export declare interface LoginResponse extends CxboxResponse {
|
|
2138
|
+
devPanelEnabled?: boolean;
|
|
2139
|
+
activeRole?: string;
|
|
2140
|
+
roles?: UserRole[];
|
|
2141
|
+
firstName?: string;
|
|
2142
|
+
lastName?: string;
|
|
2143
|
+
login?: string;
|
|
2144
|
+
screens: SessionScreen[];
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
/**
|
|
2148
|
+
* Logout was requested, manually or through stale session
|
|
2149
|
+
*/
|
|
2150
|
+
declare const logout: ActionCreatorWithOptionalPayload<null, string>;
|
|
2151
|
+
|
|
2152
|
+
/**
|
|
2153
|
+
* User successfully was logged out
|
|
2154
|
+
*/
|
|
2155
|
+
declare const logoutDone: ActionCreatorWithOptionalPayload<null, string>;
|
|
2156
|
+
|
|
2157
|
+
/**
|
|
2158
|
+
* Appends '/' in front of `absoluteUrl` argument.
|
|
2159
|
+
* If `absoluteUrl` alredy starts with `/` then argument returned without changes.
|
|
2160
|
+
*
|
|
2161
|
+
* @param absoluteUrl Url
|
|
2162
|
+
*/
|
|
2163
|
+
declare function makeRelativeUrl(absoluteUrl: string): string;
|
|
2164
|
+
|
|
2165
|
+
/**
|
|
2166
|
+
* Check if an operation matches a specified `role` directly by type or by `actionRole` field.
|
|
2167
|
+
*
|
|
2168
|
+
* If operation role is unavailable due to the store lacking an appropriate row meta, only `role` is checked.
|
|
2169
|
+
*
|
|
2170
|
+
* @param role Expected operation role or 'none' if operation shouldn't match any crud role
|
|
2171
|
+
* @param payload sendOperation action payload
|
|
2172
|
+
* @param store Store instance
|
|
2173
|
+
* @category Utils
|
|
2174
|
+
*/
|
|
2175
|
+
declare function matchOperationRole(role: OperationTypeCrud | 'none' | string, payload: ReturnType<typeof sendOperation>['payload'], store: Store): boolean;
|
|
2176
|
+
|
|
2177
|
+
/**
|
|
2178
|
+
* The type of object to describe the menu items in the navigation.
|
|
2179
|
+
*/
|
|
2180
|
+
export declare type MenuItem = ViewNavigationGroup | ViewNavigationCategory | ViewNavigationItem;
|
|
2181
|
+
|
|
2182
|
+
export declare const middlewares: {
|
|
2183
|
+
autosave: Middleware< {}, any, Dispatch<AnyAction>>;
|
|
2184
|
+
requiredFields: Middleware< {}, any, Dispatch<AnyAction>>;
|
|
2185
|
+
preInvoke: Middleware< {}, any, Dispatch<AnyAction>>;
|
|
2186
|
+
popup: Middleware< {}, any, Dispatch<AnyAction>>;
|
|
2187
|
+
};
|
|
2188
|
+
|
|
2189
|
+
export declare type MultiFieldMeta = AllWidgetTypeFieldBase & {
|
|
2190
|
+
type: FieldType.multifield;
|
|
2191
|
+
fields: WidgetField[];
|
|
2192
|
+
style: 'inline' | 'list';
|
|
2193
|
+
};
|
|
2194
|
+
|
|
2195
|
+
export declare type MultivalueFieldMeta = AllWidgetTypeFieldBase & {
|
|
2196
|
+
type: FieldType.multivalue | FieldType.multivalueHover;
|
|
2197
|
+
popupBcName?: string;
|
|
2198
|
+
assocValueKey?: string;
|
|
2199
|
+
associateFieldKey?: string;
|
|
2200
|
+
displayedKey?: string;
|
|
2201
|
+
};
|
|
2202
|
+
|
|
2203
|
+
/**
|
|
2204
|
+
* Structure which contain `Multivalue` field's values
|
|
2205
|
+
*/
|
|
2206
|
+
export declare interface MultivalueSingleValue {
|
|
2207
|
+
/**
|
|
2208
|
+
* Record's identificator
|
|
2209
|
+
*/
|
|
2210
|
+
id: string;
|
|
2211
|
+
/**
|
|
2212
|
+
* Showed value
|
|
2213
|
+
*/
|
|
2214
|
+
value: string;
|
|
2215
|
+
options?: MultivalueSingleValueOptions;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
/**
|
|
2219
|
+
* `Multivalue` field's options
|
|
2220
|
+
*/
|
|
2221
|
+
export declare interface MultivalueSingleValueOptions {
|
|
2222
|
+
/**
|
|
2223
|
+
* Hint for value
|
|
2224
|
+
*/
|
|
2225
|
+
hint?: string;
|
|
2226
|
+
/**
|
|
2227
|
+
* Type of Icon
|
|
2228
|
+
*/
|
|
2229
|
+
icon?: string;
|
|
2230
|
+
drillDown?: string;
|
|
2231
|
+
drillDownType?: DrillDownType;
|
|
2232
|
+
snapshotState?: RecordSnapshotState;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
/**
|
|
2236
|
+
* 1 - for static, top level navigation
|
|
2237
|
+
* 2 - `SecondLevelMenu` tab widgets
|
|
2238
|
+
* 2 - `ThirdLevelMenu` tab widgets
|
|
2239
|
+
* 2 - `FourthLevelMenu` tab widgets
|
|
2240
|
+
*/
|
|
2241
|
+
export declare type NavigationLevel = 1 | 2 | 3 | 4;
|
|
2242
|
+
|
|
2243
|
+
/**
|
|
2244
|
+
* Options configuration for widgets displaying NavigationTabs
|
|
2245
|
+
*/
|
|
2246
|
+
export declare interface NavigationOptions extends WidgetOptions {
|
|
2247
|
+
/**
|
|
2248
|
+
* Level of menu
|
|
2249
|
+
*/
|
|
2250
|
+
navigationLevel?: number;
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
/**
|
|
2254
|
+
* Model for displayed tab item
|
|
2255
|
+
*/
|
|
2256
|
+
export declare interface NavigationTab {
|
|
2257
|
+
/**
|
|
2258
|
+
* View name where navigation tab will redirect the user
|
|
2259
|
+
*/
|
|
2260
|
+
viewName: string;
|
|
2261
|
+
/**
|
|
2262
|
+
* Displayed title: either view name or a group name
|
|
2263
|
+
*/
|
|
2264
|
+
title?: string;
|
|
2265
|
+
/**
|
|
2266
|
+
* When true, menu item will not be visible
|
|
2267
|
+
*
|
|
2268
|
+
* It's still will be accessible through direct link though
|
|
2269
|
+
*/
|
|
2270
|
+
hidden?: boolean;
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
/**
|
|
2274
|
+
* Configuration for widgets displaying NavigationTabs
|
|
2275
|
+
*/
|
|
2276
|
+
export declare interface NavigationWidgetMeta extends WidgetMeta {
|
|
2277
|
+
/**
|
|
2278
|
+
* Unambiguous marker for JSON file specifying widget type
|
|
2279
|
+
*/
|
|
2280
|
+
type: WidgetTypes.NavigationTabs | WidgetTypes.ViewNavigation;
|
|
2281
|
+
/**
|
|
2282
|
+
* Options for customizing widget
|
|
2283
|
+
*/
|
|
2284
|
+
options: NavigationOptions;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
export declare interface NetworkError extends ApplicationErrorBase {
|
|
2288
|
+
type: ApplicationErrorType.NetworkError;
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
/**
|
|
2292
|
+
* Descriptor of custom middleware not presented in core middlewares
|
|
2293
|
+
*/
|
|
2294
|
+
export declare type NewMiddlewareDescriptor<T = Record<string, unknown>> = Record<Exclude<keyof T, keyof CoreMiddlewares>, CustomMiddleware>;
|
|
2295
|
+
|
|
2296
|
+
declare interface Notification_2 {
|
|
2297
|
+
key: string;
|
|
2298
|
+
type: DefaultNotificationType | string;
|
|
2299
|
+
message: string;
|
|
2300
|
+
description?: string;
|
|
2301
|
+
options?: {
|
|
2302
|
+
messageOptions?: {
|
|
2303
|
+
[key: string]: string | number;
|
|
2304
|
+
};
|
|
2305
|
+
buttonWarningNotificationOptions?: {
|
|
2306
|
+
buttonText: string;
|
|
2307
|
+
actionsForClick?: Array<Record<string, any>>;
|
|
2308
|
+
};
|
|
2309
|
+
};
|
|
2310
|
+
duration?: number;
|
|
2311
|
+
}
|
|
2312
|
+
export { Notification_2 as Notification }
|
|
2313
|
+
|
|
2314
|
+
export declare type NotificationKeys = string[];
|
|
2315
|
+
|
|
2316
|
+
export declare type NumberFieldMeta = AllWidgetTypeFieldBase & {
|
|
2317
|
+
type: FieldType.number | FieldType.money | FieldType.percent;
|
|
2318
|
+
digits?: number;
|
|
2319
|
+
nullable?: boolean;
|
|
2320
|
+
};
|
|
2321
|
+
|
|
2322
|
+
/**
|
|
2323
|
+
* A dictionary for a values of specified type
|
|
2324
|
+
*
|
|
2325
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of native `Record` type
|
|
2326
|
+
*
|
|
2327
|
+
* @template T Value type
|
|
2328
|
+
*/
|
|
2329
|
+
export declare interface ObjectMap<T> {
|
|
2330
|
+
[key: string]: T | undefined;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
declare class ObservableApiWrapper {
|
|
2334
|
+
instance: AxiosInstance;
|
|
2335
|
+
constructor(instance: AxiosInstance);
|
|
2336
|
+
get<ResponsePayload extends CxboxResponse>(path: string, config?: AxiosRequestConfig, callContext?: ApiCallContext): Observable<ResponsePayload>;
|
|
2337
|
+
put<ResponsePayload extends CxboxResponse>(path: string, data: any, callContext?: ApiCallContext): Observable<ResponsePayload>;
|
|
2338
|
+
post<ResponsePayload extends CxboxResponse>(path: string, data: any, config?: AxiosRequestConfig, callContext?: ApiCallContext): Observable<ResponsePayload>;
|
|
2339
|
+
delete<ResponsePayload extends CxboxResponse>(path: string, data: any, config?: AxiosRequestConfig, callContext?: ApiCallContext): Observable<ResponsePayload>;
|
|
2340
|
+
}
|
|
2341
|
+
|
|
2342
|
+
/**
|
|
2343
|
+
* User operation: CRUD or any custom business action.
|
|
2344
|
+
*
|
|
2345
|
+
* Received from record's row meta.
|
|
2346
|
+
*/
|
|
2347
|
+
export declare interface Operation {
|
|
2348
|
+
/**
|
|
2349
|
+
* Displayed name
|
|
2350
|
+
*/
|
|
2351
|
+
text: string;
|
|
2352
|
+
/**
|
|
2353
|
+
* String that uniquely identifies an operation on widget
|
|
2354
|
+
*/
|
|
2355
|
+
type: OperationType;
|
|
2356
|
+
/**
|
|
2357
|
+
* A hint to decide where to display an operation which is related to the record or the whole widget
|
|
2358
|
+
*/
|
|
2359
|
+
scope: OperationScope;
|
|
2360
|
+
/**
|
|
2361
|
+
* @deprecated TODO: Remove in 2.0.0, designation unknown
|
|
2362
|
+
*/
|
|
2363
|
+
action?: string;
|
|
2364
|
+
/**
|
|
2365
|
+
* An icon (https://ant.design/components/icon) to display on operation button,
|
|
2366
|
+
*/
|
|
2367
|
+
icon?: string;
|
|
2368
|
+
/**
|
|
2369
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of client-side custom parameters
|
|
2370
|
+
*/
|
|
2371
|
+
bcKey?: string;
|
|
2372
|
+
/**
|
|
2373
|
+
* Omit text value of operation in favor of icon
|
|
2374
|
+
*/
|
|
2375
|
+
showOnlyIcon?: boolean;
|
|
2376
|
+
/**
|
|
2377
|
+
* An operation that should be fired before initiating this operation
|
|
2378
|
+
*/
|
|
2379
|
+
preInvoke?: OperationPreInvoke;
|
|
2380
|
+
/**
|
|
2381
|
+
* Validate the record for empty "required" fields before API call
|
|
2382
|
+
*/
|
|
2383
|
+
autoSaveBefore?: boolean;
|
|
2384
|
+
/**
|
|
2385
|
+
* ???
|
|
2386
|
+
*/
|
|
2387
|
+
confirmOperation?: OperationPreInvoke;
|
|
2388
|
+
/**
|
|
2389
|
+
* If custom operation needs to be processed as if it was a default crud operation,
|
|
2390
|
+
* this flag can be specified and will be used instead of real `type`
|
|
2391
|
+
*/
|
|
2392
|
+
actionRole?: OperationType;
|
|
2393
|
+
/**
|
|
2394
|
+
* Subtype for association popup, used for calling multiFileUploadPopup,
|
|
2395
|
+
* else has default behaviour of assoc popup
|
|
2396
|
+
*/
|
|
2397
|
+
subtype?: 'bc' | 'multiFileUpload';
|
|
2398
|
+
}
|
|
2399
|
+
|
|
2400
|
+
/**
|
|
2401
|
+
* Save info about current operation for confirm modal
|
|
2402
|
+
*/
|
|
2403
|
+
declare const operationConfirmation: ActionCreatorWithOptionalPayload< {
|
|
2404
|
+
/**
|
|
2405
|
+
* Current operation
|
|
2406
|
+
*/
|
|
2407
|
+
operation: {
|
|
2408
|
+
bcName: string;
|
|
2409
|
+
operationType: OperationTypeCrud | string;
|
|
2410
|
+
widgetName: string;
|
|
2411
|
+
};
|
|
2412
|
+
/**
|
|
2413
|
+
* Text for confirm modal
|
|
2414
|
+
*/
|
|
2415
|
+
confirmOperation: OperationPostInvokeConfirm;
|
|
2416
|
+
}, string>;
|
|
2417
|
+
|
|
2418
|
+
export declare interface OperationError {
|
|
2419
|
+
success: false;
|
|
2420
|
+
error: {
|
|
2421
|
+
entity?: OperationErrorEntity;
|
|
2422
|
+
popup?: string[];
|
|
2423
|
+
postActions?: OperationPostInvokeAny[];
|
|
2424
|
+
};
|
|
2425
|
+
}
|
|
2426
|
+
|
|
2427
|
+
export declare interface OperationErrorEntity {
|
|
2428
|
+
bcName: string;
|
|
2429
|
+
fields: Record<string, string>;
|
|
2430
|
+
id: string;
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* Group of actions.
|
|
2435
|
+
*
|
|
2436
|
+
* It shows name of a group, drop down list of actions
|
|
2437
|
+
* and some actions which are shown in case list is covered.
|
|
2438
|
+
* Группа действий, показывает название группы и раскрываемые список ее действий,
|
|
2439
|
+
* а также несколько действий рядом с группой, которые видны не раскрывая список.
|
|
2440
|
+
*/
|
|
2441
|
+
export declare interface OperationGroup {
|
|
2442
|
+
/**
|
|
2443
|
+
* Unique identifier for the operation group
|
|
2444
|
+
*/
|
|
2445
|
+
type?: string;
|
|
2446
|
+
/**
|
|
2447
|
+
* Displayed name of a group
|
|
2448
|
+
*/
|
|
2449
|
+
text: string;
|
|
2450
|
+
/**
|
|
2451
|
+
* An icon (https://ant.design/components/icon) to display on operation button,
|
|
2452
|
+
*/
|
|
2453
|
+
icon?: string;
|
|
2454
|
+
/**
|
|
2455
|
+
* Omit text value of operation in favor of icon
|
|
2456
|
+
*/
|
|
2457
|
+
showOnlyIcon?: boolean;
|
|
2458
|
+
/**
|
|
2459
|
+
* List of group actions
|
|
2460
|
+
*/
|
|
2461
|
+
actions: Operation[];
|
|
2462
|
+
/**
|
|
2463
|
+
* Number of showed actions in case list is covered
|
|
2464
|
+
*/
|
|
2465
|
+
maxGroupVisualButtonsCount: number;
|
|
2466
|
+
}
|
|
2467
|
+
|
|
2468
|
+
/**
|
|
2469
|
+
* Descriptor enabling operation on widget:
|
|
2470
|
+
* - string (if you just need to include / exclude operation or groups)
|
|
2471
|
+
* - object, if this is group in which you want to selectively include or exclude the operation
|
|
2472
|
+
*/
|
|
2473
|
+
export declare type OperationInclusionDescriptor = string | {
|
|
2474
|
+
/**
|
|
2475
|
+
* Type of transaction; a string that uniquely identifies the operation on the widget
|
|
2476
|
+
*/
|
|
2477
|
+
type: OperationType;
|
|
2478
|
+
/**
|
|
2479
|
+
* List of included operations or groups operations
|
|
2480
|
+
*/
|
|
2481
|
+
include?: OperationInclusionDescriptor[];
|
|
2482
|
+
/**
|
|
2483
|
+
* List of excluded operations or groups operations
|
|
2484
|
+
*/
|
|
2485
|
+
exclude?: OperationType[];
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2488
|
+
/**
|
|
2489
|
+
* Modal window operation types
|
|
2490
|
+
*/
|
|
2491
|
+
export declare interface OperationModalInvokeConfirm extends OperationPostInvokeConfirm {
|
|
2492
|
+
/**
|
|
2493
|
+
* Type of confirm action
|
|
2494
|
+
*/
|
|
2495
|
+
type: OperationPostInvokeConfirmType | OperationPreInvokeType | string;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2498
|
+
/**
|
|
2499
|
+
* An action which fires after user's operation
|
|
2500
|
+
*
|
|
2501
|
+
* @param bc Имя бизнес-компоненты, которую надо обновлять при refreshBC
|
|
2502
|
+
* @param fileId Идентификатор файла, который надо скачать при downloadFile
|
|
2503
|
+
* @param url?
|
|
2504
|
+
*
|
|
2505
|
+
* @param [key: string] ??? TODO: Это что?
|
|
2506
|
+
*/
|
|
2507
|
+
export declare interface OperationPostInvoke {
|
|
2508
|
+
/**
|
|
2509
|
+
* A type of action
|
|
2510
|
+
*/
|
|
2511
|
+
type: OperationPostInvokeType | string;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
/**
|
|
2515
|
+
* A union of all action types which could be be fired after user's operation
|
|
2516
|
+
*/
|
|
2517
|
+
export declare type OperationPostInvokeAny = OperationPostInvokeRefreshBc | OperationPostInvokeDownloadFile | OperationPostInvokeDownloadFileByUrl | OperationPostInvokeDrillDown | OperationPostInvokeOpenPickList | OperationPostInvokeShowMessage | OperationPostInvokeConfirm;
|
|
2518
|
+
|
|
2519
|
+
/**
|
|
2520
|
+
* The action that will be performed after the user confirms it
|
|
2521
|
+
*/
|
|
2522
|
+
export declare interface OperationPostInvokeConfirm {
|
|
2523
|
+
/**
|
|
2524
|
+
* Type of postInvokeConfirm action
|
|
2525
|
+
*/
|
|
2526
|
+
type: OperationPostInvokeConfirmType | string;
|
|
2527
|
+
/**
|
|
2528
|
+
* Body text of a modal actually
|
|
2529
|
+
* TODO 2.0.0 rename correctly
|
|
2530
|
+
*/
|
|
2531
|
+
message: string;
|
|
2532
|
+
/**
|
|
2533
|
+
* Custom modal title actually
|
|
2534
|
+
* TODO 2.0.0 rename correctly
|
|
2535
|
+
*/
|
|
2536
|
+
messageContent?: string;
|
|
2537
|
+
/**
|
|
2538
|
+
* Custom label of OK button
|
|
2539
|
+
*/
|
|
2540
|
+
okText?: string;
|
|
2541
|
+
/**
|
|
2542
|
+
* Custom label of Cancel button
|
|
2543
|
+
*/
|
|
2544
|
+
cancelText?: string;
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
/**
|
|
2548
|
+
* The type of message that will be shown to the user for confirmation
|
|
2549
|
+
*/
|
|
2550
|
+
export declare enum OperationPostInvokeConfirmType {
|
|
2551
|
+
/**
|
|
2552
|
+
* Simple confirmation
|
|
2553
|
+
*/
|
|
2554
|
+
confirm = "confirm",
|
|
2555
|
+
/**
|
|
2556
|
+
* Сonfirmation with text from the user
|
|
2557
|
+
*/
|
|
2558
|
+
confirmText = "confirmText"
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
/**
|
|
2562
|
+
* File downloading by `fileId` which comes from answer.
|
|
2563
|
+
*/
|
|
2564
|
+
export declare interface OperationPostInvokeDownloadFile extends OperationPostInvoke {
|
|
2565
|
+
/**
|
|
2566
|
+
* Backend's file ID
|
|
2567
|
+
*/
|
|
2568
|
+
fileId: string;
|
|
2569
|
+
}
|
|
2570
|
+
|
|
2571
|
+
/**
|
|
2572
|
+
* File downloading by `url` which comes from answer.
|
|
2573
|
+
*/
|
|
2574
|
+
export declare interface OperationPostInvokeDownloadFileByUrl extends OperationPostInvoke {
|
|
2575
|
+
/**
|
|
2576
|
+
* File's URL
|
|
2577
|
+
*/
|
|
2578
|
+
url: string;
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
/**
|
|
2582
|
+
* Calling a browser transition to some record
|
|
2583
|
+
*
|
|
2584
|
+
* @param urlName При выполнении перехода на внешнюю сущность (POST-запрос на пришедший url),
|
|
2585
|
+
* этот адрес будет передан в теле запроса (см. CBR-9320 МР и тикет)
|
|
2586
|
+
*/
|
|
2587
|
+
export declare interface OperationPostInvokeDrillDown extends OperationPostInvoke {
|
|
2588
|
+
/**
|
|
2589
|
+
* URL of transition
|
|
2590
|
+
*/
|
|
2591
|
+
url: string;
|
|
2592
|
+
/**
|
|
2593
|
+
* A type of transition
|
|
2594
|
+
*/
|
|
2595
|
+
drillDownType?: DrillDownType;
|
|
2596
|
+
/**
|
|
2597
|
+
* If transition performs to outer entity (POST call),
|
|
2598
|
+
* this param will be passed to request body
|
|
2599
|
+
*/
|
|
2600
|
+
urlName?: string;
|
|
2601
|
+
}
|
|
2602
|
+
|
|
2603
|
+
/**
|
|
2604
|
+
* `Pick list` widget opening
|
|
2605
|
+
*/
|
|
2606
|
+
export declare interface OperationPostInvokeOpenPickList extends OperationPostInvoke {
|
|
2607
|
+
/**
|
|
2608
|
+
* BC name of pick list widget
|
|
2609
|
+
*/
|
|
2610
|
+
pickList: string;
|
|
2611
|
+
}
|
|
2612
|
+
|
|
2613
|
+
/**
|
|
2614
|
+
* BC's refresh. It leads to cursor dropping, data.ts refresh of current BC and its children
|
|
2615
|
+
*/
|
|
2616
|
+
export declare interface OperationPostInvokeRefreshBc extends OperationPostInvoke {
|
|
2617
|
+
/**
|
|
2618
|
+
* BC's name
|
|
2619
|
+
*/
|
|
2620
|
+
bc: string;
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
/**
|
|
2624
|
+
* Pop-up message showing
|
|
2625
|
+
*/
|
|
2626
|
+
export declare interface OperationPostInvokeShowMessage extends OperationPostInvoke {
|
|
2627
|
+
/**
|
|
2628
|
+
* A type of a message
|
|
2629
|
+
*/
|
|
2630
|
+
messageType: AppNotificationType;
|
|
2631
|
+
/**
|
|
2632
|
+
* A text of a message
|
|
2633
|
+
*/
|
|
2634
|
+
messageText: string;
|
|
2635
|
+
}
|
|
2636
|
+
|
|
2637
|
+
/**
|
|
2638
|
+
* A type of action which fires after user's operation
|
|
2639
|
+
*/
|
|
2640
|
+
export declare enum OperationPostInvokeType {
|
|
2641
|
+
/**
|
|
2642
|
+
* BC's refresh. It leads to cursor dropping, data.ts refresh of current BC and its children
|
|
2643
|
+
*/
|
|
2644
|
+
refreshBC = "refreshBC",
|
|
2645
|
+
/**
|
|
2646
|
+
* File downloading by `fileId` which comes from answer to user's operation.
|
|
2647
|
+
* Вызов сохранения файла в браузере по пришедшему в ответе fileId
|
|
2648
|
+
*/
|
|
2649
|
+
downloadFile = "downloadFile",
|
|
2650
|
+
/**
|
|
2651
|
+
* File downloading by `url` which comes from answer to user's operation.
|
|
2652
|
+
* Вызов сохранения файла в браузере по пришедшему в ответе url
|
|
2653
|
+
*/
|
|
2654
|
+
downloadFileByUrl = "downloadFileByUrl",
|
|
2655
|
+
/**
|
|
2656
|
+
* Calling a browser transition to some record
|
|
2657
|
+
*/
|
|
2658
|
+
drillDown = "drillDown",
|
|
2659
|
+
/**
|
|
2660
|
+
* `Pick list` widget opening
|
|
2661
|
+
*/
|
|
2662
|
+
openPickList = "openPickList",
|
|
2663
|
+
/**
|
|
2664
|
+
* @deprecated TODO: Не работает, удалить все упоминания из Досье и убрать всех свидетелей
|
|
2665
|
+
*
|
|
2666
|
+
*/
|
|
2667
|
+
/**
|
|
2668
|
+
* Showing pop-up message
|
|
2669
|
+
*/
|
|
2670
|
+
showMessage = "showMessage",
|
|
2671
|
+
/**
|
|
2672
|
+
* Инициировать удаление записей
|
|
2673
|
+
*
|
|
2674
|
+
* @deprecated TODO: Remove in 2.0.0
|
|
2675
|
+
*/
|
|
2676
|
+
postDelete = "postDelete"
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
/**
|
|
2680
|
+
* An action which fires before user's operation
|
|
2681
|
+
*/
|
|
2682
|
+
export declare interface OperationPreInvoke {
|
|
2683
|
+
/**
|
|
2684
|
+
* A type of operation (Pop-up message. Other types are not supported)
|
|
2685
|
+
*/
|
|
2686
|
+
type: OperationPreInvokeType;
|
|
2687
|
+
/**
|
|
2688
|
+
* A message shown to user before operation fires
|
|
2689
|
+
*/
|
|
2690
|
+
message: string;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
/**
|
|
2694
|
+
* A type of message shown to user before operation fires
|
|
2695
|
+
*/
|
|
2696
|
+
export declare enum OperationPreInvokeType {
|
|
2697
|
+
/**
|
|
2698
|
+
* Pop-up message contains "Yes/No" answers.
|
|
2699
|
+
* If user says "Yes" then operation fires
|
|
2700
|
+
*/
|
|
2701
|
+
confirm = "confirm",
|
|
2702
|
+
/**
|
|
2703
|
+
* Pop-up message contains some informational text with info icon
|
|
2704
|
+
*/
|
|
2705
|
+
info = "info",
|
|
2706
|
+
/**
|
|
2707
|
+
* Pop-up message contains some information about error with error icon
|
|
2708
|
+
* Перед операцией пользователя будет показано всплывающее сообщение
|
|
2709
|
+
* с иконкой ошибки и операция не будет выполнена (TODO: Будет или не будет? Проверить)
|
|
2710
|
+
*/
|
|
2711
|
+
error = "error"
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
/**
|
|
2715
|
+
* TODO: ???
|
|
2716
|
+
*/
|
|
2717
|
+
export declare type OperationScope = 'bc' | 'record' | 'page' | 'associate';
|
|
2718
|
+
|
|
2719
|
+
/**
|
|
2720
|
+
* String that uniquely identifies an operation on widget
|
|
2721
|
+
*/
|
|
2722
|
+
export declare type OperationType = OperationTypeCrud | string;
|
|
2723
|
+
|
|
2724
|
+
/**
|
|
2725
|
+
* TODO: Rename to CoreOperationRole in 2.0.0
|
|
2726
|
+
*/
|
|
2727
|
+
export declare enum OperationTypeCrud {
|
|
2728
|
+
create = "create",
|
|
2729
|
+
save = "save",
|
|
2730
|
+
delete = "delete",
|
|
2731
|
+
associate = "associate",
|
|
2732
|
+
cancelCreate = "cancel-create",
|
|
2733
|
+
fileUpload = "file-upload"
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
/**
|
|
2737
|
+
* Type of pagination, either page numbers or "Load More" button
|
|
2738
|
+
*/
|
|
2739
|
+
export declare enum PaginationMode {
|
|
2740
|
+
page = "page",
|
|
2741
|
+
loadMore = "loadMore"
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
/**
|
|
2745
|
+
* Parses a business component hierarchy url into a dictionary of business components
|
|
2746
|
+
* and their cursors.
|
|
2747
|
+
*
|
|
2748
|
+
* @param bcPath Business component hierarchy url, e.g. `bcName1/cursor1/bcName2/cursor2`
|
|
2749
|
+
* @category Utils
|
|
2750
|
+
*/
|
|
2751
|
+
declare function parseBcCursors(bcPath: string): Record<string, string>;
|
|
2752
|
+
|
|
2753
|
+
/**
|
|
2754
|
+
* Function for parsing filters from string into BcFilter type
|
|
2755
|
+
*
|
|
2756
|
+
* @see {@link getFilters} Reverse function
|
|
2757
|
+
* @param defaultFilters string representation of filters
|
|
2758
|
+
* @category Utils
|
|
2759
|
+
*/
|
|
2760
|
+
declare function parseFilters(defaultFilters?: string): BcFilter[];
|
|
2761
|
+
|
|
2762
|
+
/**
|
|
2763
|
+
* Parse sorter string into separate sorter objects.
|
|
2764
|
+
* String representation of sorters is url based:
|
|
2765
|
+
* "_sort.{order}.{direction}={fieldKey}&_sort.{order}.{direction}"
|
|
2766
|
+
*
|
|
2767
|
+
* fieldKey Sort by field
|
|
2768
|
+
* order Priority of this specfic sorter
|
|
2769
|
+
* direction "asc" or "desc"
|
|
2770
|
+
*
|
|
2771
|
+
* i.e. "_sort.0.asc=firstName"
|
|
2772
|
+
*
|
|
2773
|
+
* @param sorters string representation of sorters
|
|
2774
|
+
* @category Utils
|
|
2775
|
+
*/
|
|
2776
|
+
declare function parseSorters(sorters?: string): BcSorter[];
|
|
2777
|
+
|
|
2778
|
+
/**
|
|
2779
|
+
* Edited changes
|
|
2780
|
+
*/
|
|
2781
|
+
export declare interface PendingDataItem {
|
|
2782
|
+
[fieldName: string]: DataValue;
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
export declare interface PendingRequest {
|
|
2786
|
+
requestId: string;
|
|
2787
|
+
type: RequestType;
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2790
|
+
export declare interface PendingValidationFails {
|
|
2791
|
+
[bcName: string]: {
|
|
2792
|
+
[cursor: string]: Record<string, string>;
|
|
2793
|
+
};
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
/**
|
|
2797
|
+
* Describes format of `pendingValidationFails`
|
|
2798
|
+
* TODO remove in 2.0.0
|
|
2799
|
+
*/
|
|
2800
|
+
export declare enum PendingValidationFailsFormat {
|
|
2801
|
+
old = "old",
|
|
2802
|
+
target = "target"
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
export declare type PickListFieldMeta = AllWidgetTypeFieldBase & {
|
|
2806
|
+
type: FieldType.pickList;
|
|
2807
|
+
popupBcName: string;
|
|
2808
|
+
pickMap: PickMap_2;
|
|
2809
|
+
};
|
|
2810
|
+
|
|
2811
|
+
/**
|
|
2812
|
+
* `x` is name of field, for which the value will be set up.
|
|
2813
|
+
* A value of `x` is name of field, from which the value will be gotten.
|
|
2814
|
+
*/
|
|
2815
|
+
export declare type PickMap = Record<string, string>;
|
|
2816
|
+
|
|
2817
|
+
/**
|
|
2818
|
+
* `x` is name of field, for which the value will be set up.
|
|
2819
|
+
* A value of `x` is name of field, from which the value will be gotten.
|
|
2820
|
+
*/
|
|
2821
|
+
declare type PickMap_2 = Record<string, string>;
|
|
2822
|
+
|
|
2823
|
+
/**
|
|
2824
|
+
* Describes currently open popup
|
|
2825
|
+
*
|
|
2826
|
+
* TODO: Split interface by popup types
|
|
2827
|
+
*/
|
|
2828
|
+
export declare interface PopupData {
|
|
2829
|
+
/**
|
|
2830
|
+
* Business component of the widget that initiated popup
|
|
2831
|
+
*
|
|
2832
|
+
* TODO: Will me removed in favor of widgetName in 2.0.0
|
|
2833
|
+
*/
|
|
2834
|
+
calleeBCName?: string;
|
|
2835
|
+
/**
|
|
2836
|
+
* Name of the widget that initiated popup
|
|
2837
|
+
*/
|
|
2838
|
+
calleeWidgetName?: string;
|
|
2839
|
+
/**
|
|
2840
|
+
* Type of the popup
|
|
2841
|
+
*
|
|
2842
|
+
* TODO: Will not be optional in 2.0.0
|
|
2843
|
+
*/
|
|
2844
|
+
type?: PopupType;
|
|
2845
|
+
/**
|
|
2846
|
+
* Business component for widget in Popup
|
|
2847
|
+
*
|
|
2848
|
+
* TODO: Move to inherited interfaces (not all popups display widgets)
|
|
2849
|
+
*/
|
|
2850
|
+
bcName?: string;
|
|
2851
|
+
/**
|
|
2852
|
+
* Name of popup widget
|
|
2853
|
+
*
|
|
2854
|
+
* TODO: Move to inherited interfaces (not all popups display widgets)
|
|
2855
|
+
*/
|
|
2856
|
+
widgetName?: string;
|
|
2857
|
+
/**
|
|
2858
|
+
* TODO: Description + move to AssocPopupDescriptor
|
|
2859
|
+
*/
|
|
2860
|
+
associateFieldKey?: string;
|
|
2861
|
+
/**
|
|
2862
|
+
* TODO: Description + move to AssocPopupDescriptor
|
|
2863
|
+
*/
|
|
2864
|
+
assocValueKey?: string;
|
|
2865
|
+
/**
|
|
2866
|
+
* If true popup confirm button will send selected items to Cxbox API
|
|
2867
|
+
*
|
|
2868
|
+
* TODO: Move to AssocPopupDescriptor
|
|
2869
|
+
*/
|
|
2870
|
+
active?: boolean;
|
|
2871
|
+
/**
|
|
2872
|
+
* This popup is used as a filter
|
|
2873
|
+
*
|
|
2874
|
+
* TODO: Used only by assocs so probably move to AssocPopupDescriptor
|
|
2875
|
+
*/
|
|
2876
|
+
isFilter?: boolean;
|
|
2877
|
+
}
|
|
2878
|
+
|
|
2879
|
+
export declare type PopupType = 'assoc' | 'file-upload' | null;
|
|
2880
|
+
|
|
2881
|
+
/**
|
|
2882
|
+
* Widgets that are considered `popups` and usually excluded from widgets layout grid
|
|
2883
|
+
*/
|
|
2884
|
+
export declare const PopupWidgetTypes: string[];
|
|
2885
|
+
|
|
2886
|
+
/**
|
|
2887
|
+
* Description of possible positioning options
|
|
2888
|
+
*/
|
|
2889
|
+
export declare enum PositionTypes {
|
|
2890
|
+
Top = "Top",
|
|
2891
|
+
Bottom = "Bottom",
|
|
2892
|
+
TopAndBottom = "TopAndBottom"
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2895
|
+
/**
|
|
2896
|
+
* Presort items based on their `level` property: each parent is followed by its descendant.
|
|
2897
|
+
* Items with level `1` considered to be root-level items.
|
|
2898
|
+
*
|
|
2899
|
+
* Notice: not very performant and almost always wasted as Cxbox API mostly returns already
|
|
2900
|
+
* sorted data.ts.
|
|
2901
|
+
*
|
|
2902
|
+
* @param data Unsorted data.ts
|
|
2903
|
+
*/
|
|
2904
|
+
declare function presort(data: TreeNodeBidirectional[]): TreeNodeBidirectional[];
|
|
2905
|
+
|
|
2906
|
+
/**
|
|
2907
|
+
* TODO
|
|
2908
|
+
*/
|
|
2909
|
+
declare const processPostInvoke: ActionCreatorWithOptionalPayload< {
|
|
2910
|
+
/**
|
|
2911
|
+
* @deprecated TODO: Prefer widgetName instead (2.0.0)
|
|
2912
|
+
*/
|
|
2913
|
+
bcName: string;
|
|
2914
|
+
postInvoke: OperationPostInvokeAny;
|
|
2915
|
+
cursor?: string;
|
|
2916
|
+
/**
|
|
2917
|
+
* What widget initiated original operation, TODO: mandatory in 2.0.0
|
|
2918
|
+
*/
|
|
2919
|
+
widgetName?: string;
|
|
2920
|
+
}, string>;
|
|
2921
|
+
|
|
2922
|
+
/**
|
|
2923
|
+
* Operation to perform postInvokeConfirm actions
|
|
2924
|
+
*/
|
|
2925
|
+
declare const processPostInvokeConfirm: ActionCreatorWithOptionalPayload< {
|
|
2926
|
+
/**
|
|
2927
|
+
* The business component to fetch data for
|
|
2928
|
+
*/
|
|
2929
|
+
bcName: string;
|
|
2930
|
+
/**
|
|
2931
|
+
* Type of operation to be performed
|
|
2932
|
+
*/
|
|
2933
|
+
operationType: string;
|
|
2934
|
+
/**
|
|
2935
|
+
* What widget requires data
|
|
2936
|
+
*/
|
|
2937
|
+
widgetName: string;
|
|
2938
|
+
/**
|
|
2939
|
+
* Action that will be performed after the main operation and confirmation
|
|
2940
|
+
*/
|
|
2941
|
+
postInvokeConfirm: OperationPostInvokeConfirm;
|
|
2942
|
+
}, string>;
|
|
2943
|
+
|
|
2944
|
+
declare const processPostInvokeConfirmEpic: CXBoxEpic;
|
|
2945
|
+
|
|
2946
|
+
declare const processPostInvokeEpic: CXBoxEpic;
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* Operation to perform preInvoke actions
|
|
2950
|
+
*/
|
|
2951
|
+
declare const processPreInvoke: ActionCreatorWithOptionalPayload< {
|
|
2952
|
+
/**
|
|
2953
|
+
* The business component to fetch data for
|
|
2954
|
+
*/
|
|
2955
|
+
bcName: string;
|
|
2956
|
+
/**
|
|
2957
|
+
* Type of operation to be performed
|
|
2958
|
+
*/
|
|
2959
|
+
operationType: string;
|
|
2960
|
+
/**
|
|
2961
|
+
* What widget requires data
|
|
2962
|
+
*/
|
|
2963
|
+
widgetName: string;
|
|
2964
|
+
/**
|
|
2965
|
+
* Action that will be performed before the main operation
|
|
2966
|
+
*/
|
|
2967
|
+
preInvoke: OperationPreInvoke;
|
|
2968
|
+
}, string>;
|
|
2969
|
+
|
|
2970
|
+
declare type QueryParamsMap = Record<string, string | number>;
|
|
2971
|
+
|
|
2972
|
+
export declare type RadioButtonFieldMeta = AllWidgetTypeFieldBase & {
|
|
2973
|
+
type: FieldType.radio;
|
|
2974
|
+
};
|
|
2975
|
+
|
|
2976
|
+
export declare enum RecordSnapshotState {
|
|
2977
|
+
noChange = "noChange",
|
|
2978
|
+
new = "new",
|
|
2979
|
+
deleted = "deleted"
|
|
2980
|
+
}
|
|
2981
|
+
|
|
2982
|
+
declare class ReducerBuilderManager<State> {
|
|
2983
|
+
private reducers;
|
|
2984
|
+
private matchers;
|
|
2985
|
+
private defaultCaseReducer;
|
|
2986
|
+
addCase<ActionCreator extends TypedActionCreator<string>>(action: ActionCreator, reducer: CaseReducer<State, ReturnType<ActionCreator>>): this;
|
|
2987
|
+
removeCase<ActionCreator extends TypedActionCreator<string>>(action: ActionCreator): this;
|
|
2988
|
+
replaceCase<ActionCreator extends TypedActionCreator<string>>(action: ActionCreator, reducer: CaseReducer<State, ReturnType<ActionCreator>>): this;
|
|
2989
|
+
addMatcher<A>(matcher: TypeGuard<A> | ((action: any) => boolean), reducer: CaseReducer<State, A extends AnyAction ? A : A & AnyAction>): Omit<ReducerBuilderManager<State>, 'addCase'>;
|
|
2990
|
+
addDefaultCase(reducer: CaseReducer<State, AnyAction>): Omit<ReducerBuilderManager<State>, 'addCase' | 'addMatcher' | 'addDefaultCase'>;
|
|
2991
|
+
get builder(): (builder: ActionReducerMapBuilder<State>) => {};
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
declare namespace reducers {
|
|
2995
|
+
export {
|
|
2996
|
+
dataInitialState,
|
|
2997
|
+
createDataReducerBuilderManager,
|
|
2998
|
+
initialDepthDataState,
|
|
2999
|
+
createDepthDataReducerBuilderManager,
|
|
3000
|
+
initialRouterState,
|
|
3001
|
+
createRouterReducerBuilderManager,
|
|
3002
|
+
initialScreenState,
|
|
3003
|
+
createScreenReducerBuilderManager,
|
|
3004
|
+
initialSessionState,
|
|
3005
|
+
createSessionReducerBuilderManager,
|
|
3006
|
+
initialViewState,
|
|
3007
|
+
createViewReducerBuilderManager
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
3010
|
+
export { reducers }
|
|
3011
|
+
|
|
3012
|
+
/**
|
|
3013
|
+
* refresh screens, views and widgets meta
|
|
3014
|
+
*/
|
|
3015
|
+
declare const refreshMeta: ActionCreatorWithoutPayload<"refreshMeta">;
|
|
3016
|
+
|
|
3017
|
+
/**
|
|
3018
|
+
* Refresh meta data (see action above) and reload page
|
|
3019
|
+
*/
|
|
3020
|
+
declare const refreshMetaAndReloadPage: ActionCreatorWithOptionalPayload<null, string>;
|
|
3021
|
+
|
|
3022
|
+
declare const refreshMetaAndReloadPageEpic: CXBoxEpic;
|
|
3023
|
+
|
|
3024
|
+
/**
|
|
3025
|
+
* refresh refreshMeta was successful
|
|
3026
|
+
*/
|
|
3027
|
+
declare const refreshMetaDone: ActionCreatorWithoutPayload<"refreshMetaDone">;
|
|
3028
|
+
|
|
3029
|
+
/**
|
|
3030
|
+
* Performed on refresh meta dataEpics.ts process.
|
|
3031
|
+
*/
|
|
3032
|
+
declare const refreshMetaEpic: CXBoxEpic;
|
|
3033
|
+
|
|
3034
|
+
/**
|
|
3035
|
+
* refresh refreshMeta was unsuccessful
|
|
3036
|
+
*/
|
|
3037
|
+
declare const refreshMetaFail: ActionCreatorWithoutPayload<"refreshMetaFail">;
|
|
3038
|
+
|
|
3039
|
+
/**
|
|
3040
|
+
* TODO
|
|
3041
|
+
*/
|
|
3042
|
+
declare const removeMultivalueTag: ActionCreatorWithOptionalPayload< {
|
|
3043
|
+
bcName: string;
|
|
3044
|
+
popupBcName: string;
|
|
3045
|
+
cursor: string;
|
|
3046
|
+
associateFieldKey: string;
|
|
3047
|
+
dataItem: MultivalueSingleValue[];
|
|
3048
|
+
removedItem: MultivalueSingleValue;
|
|
3049
|
+
}, string>;
|
|
3050
|
+
|
|
3051
|
+
/**
|
|
3052
|
+
* For full hierarchies it fires `changeDataItem` action to remove value from source record
|
|
3053
|
+
*
|
|
3054
|
+
* With `hierarchyGroupDeselection` widget option, parent removal also remove children; removing
|
|
3055
|
+
* last child will also remove the parent.
|
|
3056
|
+
*
|
|
3057
|
+
* With `hierarchyTraverse` widget option, descendants are used instead of children.
|
|
3058
|
+
*
|
|
3059
|
+
* When parent should be removed with both option, `removeMultivalueTag` with updated `removedItem` will
|
|
3060
|
+
* fire instead of `changeDataItem`.
|
|
3061
|
+
*
|
|
3062
|
+
* For non-full hierarchies two `changeDataItem` actions will fire, first to drop `_associate` flag
|
|
3063
|
+
* of remove item and second to update value of source record.
|
|
3064
|
+
* Widget options are not tested for non-full hierarchies.
|
|
3065
|
+
*/
|
|
3066
|
+
declare const removeMultivalueTagEpic: CXBoxEpic;
|
|
3067
|
+
|
|
3068
|
+
declare const removeNotifications: ActionCreatorWithOptionalPayload<NotificationKeys, string>;
|
|
3069
|
+
|
|
3070
|
+
/**
|
|
3071
|
+
* Remove pending request
|
|
3072
|
+
*/
|
|
3073
|
+
declare const removePendingRequest: ActionCreatorWithOptionalPayload< {
|
|
3074
|
+
requestId: string;
|
|
3075
|
+
}, string>;
|
|
3076
|
+
|
|
3077
|
+
export declare type RequestType = 'data' | 'row-meta' | 'force-active';
|
|
3078
|
+
|
|
3079
|
+
export declare interface Route {
|
|
3080
|
+
type: RouteType;
|
|
3081
|
+
path: string;
|
|
3082
|
+
search: string;
|
|
3083
|
+
params: Record<string, unknown>;
|
|
3084
|
+
screenName?: string;
|
|
3085
|
+
viewName?: string;
|
|
3086
|
+
bcPath?: string;
|
|
3087
|
+
}
|
|
3088
|
+
|
|
3089
|
+
export declare enum RouteType {
|
|
3090
|
+
screen = "screen",
|
|
3091
|
+
default = "default",
|
|
3092
|
+
router = "router",
|
|
3093
|
+
invalid = "invalid",
|
|
3094
|
+
unknown = "unknown"
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
/**
|
|
3098
|
+
* Мета записи, содержит информацию:
|
|
3099
|
+
*
|
|
3100
|
+
* @param actions о действиях, которые с ней можно совершить
|
|
3101
|
+
* @param fields о полях, которые есть в этой записи
|
|
3102
|
+
* @param errors об ошибках, если запись не проходит валидацию бэка
|
|
3103
|
+
*
|
|
3104
|
+
* TODO: По смыслу тут должно быть название DataItemMeta
|
|
3105
|
+
*/
|
|
3106
|
+
export declare interface RowMeta {
|
|
3107
|
+
actions: Array<Operation | OperationGroup>;
|
|
3108
|
+
fields: RowMetaField[];
|
|
3109
|
+
errors?: Record<string, string>;
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
/**
|
|
3113
|
+
* Мета поля, которую предоставляет мета записи.
|
|
3114
|
+
* Описывает разную дополнительную информацию о поле, которая не связана
|
|
3115
|
+
* с конкретной записью или с конкретным виджетом.
|
|
3116
|
+
*
|
|
3117
|
+
* @param key - ключ поля, уникально его идентифицирующий (см. DataItem [fieldName: string])
|
|
3118
|
+
* @param currentValue - актуальное значение на бэке, присылаемое на случай конфликтов совместного изменения
|
|
3119
|
+
* @param disabled - доступно ли поле для редактирования
|
|
3120
|
+
* @param placeholder - hint for filling the field
|
|
3121
|
+
* @param ephemeral - при любой операции поле будет отправляться на бэк, даже если не изменялось
|
|
3122
|
+
* @param hidden - поле не видно пользователю
|
|
3123
|
+
* @param required - поле обязательно для заполнения
|
|
3124
|
+
* @param forceActive - любое изменение этого поля пользователем должно инициировать запрос новой меты записи
|
|
3125
|
+
* @param drillDown - адрес, по которому поле позволяет осуществить переход
|
|
3126
|
+
* @param drillDownType - как будет обработан переход по адресу в браузере
|
|
3127
|
+
* @param drillDownKey - ключ для получения адреса из данных
|
|
3128
|
+
* @param values TODO:
|
|
3129
|
+
* @param filterValues TODO:
|
|
3130
|
+
* @param filterable - можно ли фильтровать записи по этому полю
|
|
3131
|
+
*/
|
|
3132
|
+
export declare interface RowMetaField {
|
|
3133
|
+
key: string;
|
|
3134
|
+
defaultValue?: DataValue;
|
|
3135
|
+
currentValue: DataValue;
|
|
3136
|
+
disabled?: boolean;
|
|
3137
|
+
placeholder?: string;
|
|
3138
|
+
ephemeral?: boolean;
|
|
3139
|
+
hidden?: boolean;
|
|
3140
|
+
required?: boolean;
|
|
3141
|
+
forceActive?: boolean;
|
|
3142
|
+
/**
|
|
3143
|
+
* @deprecated
|
|
3144
|
+
* Флаг, определяющий надо ли устанавливать значение переданное в forceValue
|
|
3145
|
+
* TODO: В Досье не используется, проверить на бэке и удалить
|
|
3146
|
+
*/
|
|
3147
|
+
setForced?: boolean;
|
|
3148
|
+
drillDown?: string;
|
|
3149
|
+
drillDownType?: string;
|
|
3150
|
+
/**
|
|
3151
|
+
* @deprecated
|
|
3152
|
+
* TODO: В Досье не используется, проверить на бэке и удалить
|
|
3153
|
+
*/
|
|
3154
|
+
values?: Array<{
|
|
3155
|
+
value: string;
|
|
3156
|
+
icon: string;
|
|
3157
|
+
}>;
|
|
3158
|
+
filterValues?: Array<{
|
|
3159
|
+
value: string;
|
|
3160
|
+
}>;
|
|
3161
|
+
filterable?: boolean;
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
export declare interface RowMetaResponse extends CxboxResponse {
|
|
3165
|
+
data: {
|
|
3166
|
+
row: RowMeta;
|
|
3167
|
+
postActions?: OperationPostInvokeAny[];
|
|
3168
|
+
};
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
/**
|
|
3172
|
+
* TODO
|
|
3173
|
+
*/
|
|
3174
|
+
declare const saveAssociations: ActionCreatorWithOptionalPayload< {
|
|
3175
|
+
bcNames: string[];
|
|
3176
|
+
/**
|
|
3177
|
+
* For usage outside Popup (without opening multivalue)
|
|
3178
|
+
*/
|
|
3179
|
+
calleeBcName?: string;
|
|
3180
|
+
associateFieldKey?: string;
|
|
3181
|
+
}, string>;
|
|
3182
|
+
|
|
3183
|
+
/**
|
|
3184
|
+
* Works with assoc-lists, which does call back-end's assoc methods by click on confirm button in modal window
|
|
3185
|
+
*
|
|
3186
|
+
* @category Epics
|
|
3187
|
+
*/
|
|
3188
|
+
declare const saveAssociationsActiveEpic: CXBoxEpic;
|
|
3189
|
+
|
|
3190
|
+
/**
|
|
3191
|
+
* Works with assoc-lists, which doesn't call back-end's assoc methods
|
|
3192
|
+
*
|
|
3193
|
+
* @category Epics
|
|
3194
|
+
*/
|
|
3195
|
+
declare const saveAssociationsPassiveEpic: CXBoxEpic;
|
|
3196
|
+
|
|
3197
|
+
export declare interface ScreenMetaResponse {
|
|
3198
|
+
bo: {
|
|
3199
|
+
bc: BcMeta[];
|
|
3200
|
+
};
|
|
3201
|
+
views: ViewMetaResponse[];
|
|
3202
|
+
primary?: string;
|
|
3203
|
+
navigation?: {
|
|
3204
|
+
menu: Array<ViewNavigationGroup | ViewNavigationItem>;
|
|
3205
|
+
};
|
|
3206
|
+
}
|
|
3207
|
+
|
|
3208
|
+
export declare interface ScreenState {
|
|
3209
|
+
screenName: string;
|
|
3210
|
+
bo: {
|
|
3211
|
+
activeBcName: string;
|
|
3212
|
+
bc: Record<string, BcMetaState>;
|
|
3213
|
+
};
|
|
3214
|
+
cachedBc: {
|
|
3215
|
+
[bcName: string]: string;
|
|
3216
|
+
};
|
|
3217
|
+
views: ViewMetaResponse[];
|
|
3218
|
+
primaryView: string;
|
|
3219
|
+
filters: Record<string, BcFilter[]>;
|
|
3220
|
+
sorters: Record<string, BcSorter[]>;
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3223
|
+
/**
|
|
3224
|
+
* Request to change active screen was initiated
|
|
3225
|
+
*
|
|
3226
|
+
* TODO: 2.0.0 Should be string (just the screen name) instead;
|
|
3227
|
+
*
|
|
3228
|
+
* Initially this was due to `screen` reducer did not having access to `session` part of redux store
|
|
3229
|
+
*/
|
|
3230
|
+
declare const selectScreen: ActionCreatorWithOptionalPayload< {
|
|
3231
|
+
/**
|
|
3232
|
+
* Request initiated with all the meta from login response
|
|
3233
|
+
*/
|
|
3234
|
+
screen: SessionScreen;
|
|
3235
|
+
}, string>;
|
|
3236
|
+
|
|
3237
|
+
/**
|
|
3238
|
+
* Request to change active screen was unsuccesful (incorrect path, unknown screen, etc.)
|
|
3239
|
+
*/
|
|
3240
|
+
declare const selectScreenFail: ActionCreatorWithOptionalPayload< {
|
|
3241
|
+
/**
|
|
3242
|
+
* Which screen was requested originally
|
|
3243
|
+
*/
|
|
3244
|
+
screenName: string;
|
|
3245
|
+
}, string>;
|
|
3246
|
+
|
|
3247
|
+
/**
|
|
3248
|
+
* Throws a error popup when attempting to navigate to a screen which is missing for current session
|
|
3249
|
+
*
|
|
3250
|
+
* @param action$ selectViewFail
|
|
3251
|
+
*/
|
|
3252
|
+
declare const selectScreenFailEpic: CXBoxEpic;
|
|
3253
|
+
|
|
3254
|
+
/**
|
|
3255
|
+
* TODO
|
|
3256
|
+
*/
|
|
3257
|
+
declare const selectTableCell: ActionCreatorWithOptionalPayload< {
|
|
3258
|
+
widgetName: string;
|
|
3259
|
+
rowId: string;
|
|
3260
|
+
fieldKey: string;
|
|
3261
|
+
}, string>;
|
|
3262
|
+
|
|
3263
|
+
/**
|
|
3264
|
+
* TODO
|
|
3265
|
+
*/
|
|
3266
|
+
declare const selectTableCellInit: ActionCreatorWithOptionalPayload< {
|
|
3267
|
+
widgetName: string;
|
|
3268
|
+
rowId: string;
|
|
3269
|
+
fieldKey: string;
|
|
3270
|
+
}, string>;
|
|
3271
|
+
|
|
3272
|
+
declare const selectTableCellInitEpic: CXBoxEpic;
|
|
3273
|
+
|
|
3274
|
+
/**
|
|
3275
|
+
* Request to change active view was initiated
|
|
3276
|
+
*
|
|
3277
|
+
* TODO: 2.0.0 Should be string (just the view name) instead;
|
|
3278
|
+
* Initially this was due to `screen` and `view` reducers did not having access to `session` part of redux store
|
|
3279
|
+
*/
|
|
3280
|
+
declare const selectView: ActionCreatorWithOptionalPayload<ViewMetaResponse, string>;
|
|
3281
|
+
|
|
3282
|
+
/**
|
|
3283
|
+
* Schedules dataEpics.ts fetch for every widget on the view
|
|
3284
|
+
*
|
|
3285
|
+
* After selecting a view, this epic schedules a dataEpics.ts fetch for every widget present on the view.
|
|
3286
|
+
* If business componenet for the widget has a parent, then root ancestor BC is scheduled for dataEpics.ts fetch instead
|
|
3287
|
+
* and dataEpics.ts for its descendants will be scheduled after ancestor dataEpics.ts fetch resolved.
|
|
3288
|
+
*
|
|
3289
|
+
* @see {@link src/epics/dataEpics.ts/bcFetchDataEpic.ts} for details how descendants resolved
|
|
3290
|
+
*/
|
|
3291
|
+
declare const selectViewEpic: CXBoxEpic;
|
|
3292
|
+
|
|
3293
|
+
/**
|
|
3294
|
+
* Request to change active view was unsuccesful (incorrect path, unknown screen, etc.)
|
|
3295
|
+
*
|
|
3296
|
+
* @param selectViewFail Which view was requested originally
|
|
3297
|
+
*/
|
|
3298
|
+
declare const selectViewFail: ActionCreatorWithOptionalPayload< {
|
|
3299
|
+
viewName: string;
|
|
3300
|
+
}, string>;
|
|
3301
|
+
|
|
3302
|
+
/**
|
|
3303
|
+
* Throws a error popup when attempting to navigate to the view which is missing for current session
|
|
3304
|
+
*
|
|
3305
|
+
*/
|
|
3306
|
+
declare const selectViewFailEpic: CXBoxEpic;
|
|
3307
|
+
|
|
3308
|
+
/**
|
|
3309
|
+
* Perform CustomAction
|
|
3310
|
+
*/
|
|
3311
|
+
declare const sendOperation: ActionCreatorWithOptionalPayload< {
|
|
3312
|
+
/**
|
|
3313
|
+
* The business component to fetch data for
|
|
3314
|
+
*/
|
|
3315
|
+
bcName: string;
|
|
3316
|
+
/**
|
|
3317
|
+
* Type of operation to be performed
|
|
3318
|
+
*/
|
|
3319
|
+
operationType: OperationTypeCrud | string;
|
|
3320
|
+
/**
|
|
3321
|
+
* What widget requires data
|
|
3322
|
+
*/
|
|
3323
|
+
widgetName: string;
|
|
3324
|
+
/**
|
|
3325
|
+
* Any other action
|
|
3326
|
+
*/
|
|
3327
|
+
onSuccessAction?: AnyAction_2;
|
|
3328
|
+
/**
|
|
3329
|
+
* params for confirm modal
|
|
3330
|
+
*/
|
|
3331
|
+
confirm?: string;
|
|
3332
|
+
/**
|
|
3333
|
+
* key called bk
|
|
3334
|
+
*
|
|
3335
|
+
* @deprecated TODO: Remove in 2.0.0
|
|
3336
|
+
*/
|
|
3337
|
+
bcKey?: string;
|
|
3338
|
+
/**
|
|
3339
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of sendOperationWithConfirm
|
|
3340
|
+
*/
|
|
3341
|
+
confirmOperation?: OperationPreInvoke;
|
|
3342
|
+
}, string>;
|
|
3343
|
+
|
|
3344
|
+
/**
|
|
3345
|
+
* Opens a popup with associate component.
|
|
3346
|
+
*/
|
|
3347
|
+
declare const sendOperationAssociateEpic: CXBoxEpic;
|
|
3348
|
+
|
|
3349
|
+
/**
|
|
3350
|
+
* Handle any `sendOperationEpic` action which is not part of built-in operations types
|
|
3351
|
+
*
|
|
3352
|
+
* Request will be send to `custom-action/${screenName}/${bcUrl}?_action=${action.payload.type}` endpoint,
|
|
3353
|
+
* with pending changes of the widget as requst body.
|
|
3354
|
+
*
|
|
3355
|
+
* Fires sendOperationSuccess, bcForceUpdate and postOperationRoutine
|
|
3356
|
+
*/
|
|
3357
|
+
declare const sendOperationEpic: CXBoxEpic;
|
|
3358
|
+
|
|
3359
|
+
/**
|
|
3360
|
+
* Send operation request was unsuccessful
|
|
3361
|
+
*/
|
|
3362
|
+
declare const sendOperationFail: ActionCreatorWithOptionalPayload< {
|
|
3363
|
+
/**
|
|
3364
|
+
* Business component initiated send operation request
|
|
3365
|
+
*/
|
|
3366
|
+
bcName: string;
|
|
3367
|
+
/**
|
|
3368
|
+
* Cursors hierarchy at the time when request was fired
|
|
3369
|
+
*/
|
|
3370
|
+
bcUrl: string;
|
|
3371
|
+
/**
|
|
3372
|
+
* Error to show in modal
|
|
3373
|
+
*/
|
|
3374
|
+
viewError: string;
|
|
3375
|
+
/**
|
|
3376
|
+
* Validation errors on fields
|
|
3377
|
+
*/
|
|
3378
|
+
entityError: OperationErrorEntity;
|
|
3379
|
+
}, string>;
|
|
3380
|
+
|
|
3381
|
+
/**
|
|
3382
|
+
* Send operation request was successful
|
|
3383
|
+
*/
|
|
3384
|
+
declare const sendOperationSuccess: ActionCreatorWithOptionalPayload< {
|
|
3385
|
+
/**
|
|
3386
|
+
* Business component initiated the request
|
|
3387
|
+
*/
|
|
3388
|
+
bcName: string;
|
|
3389
|
+
/**
|
|
3390
|
+
* Cursor which initiated the request
|
|
3391
|
+
*/
|
|
3392
|
+
cursor: string;
|
|
3393
|
+
/**
|
|
3394
|
+
* New record with `id` returned by Cxbox API and vstamp = -1 (denoting a record draft)
|
|
3395
|
+
*/
|
|
3396
|
+
dataItem?: DataItem;
|
|
3397
|
+
}, string>;
|
|
3398
|
+
|
|
3399
|
+
export declare interface Session {
|
|
3400
|
+
/**
|
|
3401
|
+
* Whether dev tools panel is shown
|
|
3402
|
+
*/
|
|
3403
|
+
devPanelEnabled?: boolean;
|
|
3404
|
+
activeRole?: string;
|
|
3405
|
+
roles?: UserRole[];
|
|
3406
|
+
/**
|
|
3407
|
+
* Shows if debug mode is enabled
|
|
3408
|
+
*/
|
|
3409
|
+
debugMode?: boolean;
|
|
3410
|
+
/**
|
|
3411
|
+
* Enables availability of saving redux store and other info on user device.
|
|
3412
|
+
* There is need to set it to `true` from client application.
|
|
3413
|
+
*/
|
|
3414
|
+
exportStateEnabled?: boolean;
|
|
3415
|
+
firstName?: string;
|
|
3416
|
+
lastName?: string;
|
|
3417
|
+
login?: string;
|
|
3418
|
+
active: boolean;
|
|
3419
|
+
logout: boolean;
|
|
3420
|
+
screens: SessionScreen[];
|
|
3421
|
+
loginSpin: boolean;
|
|
3422
|
+
errorMsg?: string;
|
|
3423
|
+
pendingRequests?: PendingRequest[];
|
|
3424
|
+
notifications: Notification_2[];
|
|
3425
|
+
isMetaRefreshing: boolean;
|
|
3426
|
+
}
|
|
3427
|
+
|
|
3428
|
+
export declare interface SessionScreen {
|
|
3429
|
+
id: string;
|
|
3430
|
+
name: string;
|
|
3431
|
+
text: string;
|
|
3432
|
+
url: string;
|
|
3433
|
+
primary?: string;
|
|
3434
|
+
defaultScreen?: boolean;
|
|
3435
|
+
meta?: ScreenMetaResponse;
|
|
3436
|
+
icon?: string;
|
|
3437
|
+
notification?: number;
|
|
3438
|
+
}
|
|
3439
|
+
|
|
3440
|
+
/**
|
|
3441
|
+
* TODO
|
|
3442
|
+
*/
|
|
3443
|
+
declare const showAllTableRecordsInit: ActionCreatorWithOptionalPayload< {
|
|
3444
|
+
bcName: string;
|
|
3445
|
+
cursor: string;
|
|
3446
|
+
/**
|
|
3447
|
+
* @deprecated Remove in 2.0 (accessible from the store)
|
|
3448
|
+
*/
|
|
3449
|
+
route?: Route;
|
|
3450
|
+
}, string>;
|
|
3451
|
+
|
|
3452
|
+
declare const showAllTableRecordsInitEpic: CXBoxEpic;
|
|
3453
|
+
|
|
3454
|
+
declare const showAssocPopupEpic: CXBoxEpic;
|
|
3455
|
+
|
|
3456
|
+
/**
|
|
3457
|
+
* TODO
|
|
3458
|
+
*/
|
|
3459
|
+
declare const showFileUploadPopup: ActionCreatorWithOptionalPayload< {
|
|
3460
|
+
/**
|
|
3461
|
+
* Name of the widget that initiated popup opening
|
|
3462
|
+
*/
|
|
3463
|
+
widgetName: string;
|
|
3464
|
+
}, string>;
|
|
3465
|
+
|
|
3466
|
+
/**
|
|
3467
|
+
* Fires `bcChangeCursors` and `showFileUploadPopupEpic` to drop the cursors and show file upload popup.
|
|
3468
|
+
*/
|
|
3469
|
+
declare const showFileUploadPopupEpic: CXBoxEpic;
|
|
3470
|
+
|
|
3471
|
+
/**
|
|
3472
|
+
* TODO
|
|
3473
|
+
*/
|
|
3474
|
+
declare const showNotification: ActionCreatorWithOptionalPayload< {
|
|
3475
|
+
type: AppNotificationType;
|
|
3476
|
+
message: string;
|
|
3477
|
+
}, string>;
|
|
3478
|
+
|
|
3479
|
+
/**
|
|
3480
|
+
* TODO
|
|
3481
|
+
*/
|
|
3482
|
+
declare const showViewError: ActionCreatorWithOptionalPayload< {
|
|
3483
|
+
error: ApplicationError;
|
|
3484
|
+
}, string>;
|
|
3485
|
+
|
|
3486
|
+
/**
|
|
3487
|
+
* TODO
|
|
3488
|
+
*/
|
|
3489
|
+
declare const showViewPopup: ActionCreatorWithOptionalPayload< {
|
|
3490
|
+
/**
|
|
3491
|
+
* BC name of popup widget
|
|
3492
|
+
*
|
|
3493
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of widget name
|
|
3494
|
+
*/
|
|
3495
|
+
bcName: string;
|
|
3496
|
+
/**
|
|
3497
|
+
* Name of popup widget
|
|
3498
|
+
*/
|
|
3499
|
+
widgetName?: string;
|
|
3500
|
+
/**
|
|
3501
|
+
* It's BC name of `caller` widget actually
|
|
3502
|
+
*
|
|
3503
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of widget name
|
|
3504
|
+
*/
|
|
3505
|
+
calleeBCName?: string;
|
|
3506
|
+
/**
|
|
3507
|
+
* Name of `caller` widget actually
|
|
3508
|
+
*
|
|
3509
|
+
* TODO: 2.0.0 : Rename to `callerWidgetName`
|
|
3510
|
+
*/
|
|
3511
|
+
calleeWidgetName?: string;
|
|
3512
|
+
/**
|
|
3513
|
+
* Popup widget field key associated to `assocValueKey` of caller widget
|
|
3514
|
+
*/
|
|
3515
|
+
associateFieldKey?: string;
|
|
3516
|
+
/**
|
|
3517
|
+
* Caller widget field key associated to `associateFieldKey` of popup widget
|
|
3518
|
+
*/
|
|
3519
|
+
assocValueKey?: string;
|
|
3520
|
+
/**
|
|
3521
|
+
* If `true` then backend's method of association is used
|
|
3522
|
+
*/
|
|
3523
|
+
active?: boolean;
|
|
3524
|
+
/**
|
|
3525
|
+
* Whether popup is used as filter
|
|
3526
|
+
*/
|
|
3527
|
+
isFilter?: boolean;
|
|
3528
|
+
/**
|
|
3529
|
+
* Type of popup
|
|
3530
|
+
*/
|
|
3531
|
+
type?: PopupType;
|
|
3532
|
+
}, string>;
|
|
3533
|
+
|
|
3534
|
+
declare function splitBcUrl(bcUrl: string): string[];
|
|
3535
|
+
|
|
3536
|
+
/**
|
|
3537
|
+
* If there is a template in the field name then returns array of string
|
|
3538
|
+
*
|
|
3539
|
+
* Example:
|
|
3540
|
+
* splitIntoTokens(`The quick brown fox jumps over the lazy dog. If the dog reacted, was it realdogly lazy?`, 'dog')
|
|
3541
|
+
* ["The quick brown fox jumps over the lazy ", "dog", ". If the ", "dog", " reacted, was it real", "dog", "ly lazy?"]
|
|
3542
|
+
*
|
|
3543
|
+
* @param source Field name
|
|
3544
|
+
* @param search An object in the fields of which tokens should be searched
|
|
3545
|
+
*/
|
|
3546
|
+
declare function splitIntoTokens(source: string, search: string | RegExp): string[];
|
|
3547
|
+
|
|
3548
|
+
export declare interface Store {
|
|
3549
|
+
router: Route;
|
|
3550
|
+
session: Session;
|
|
3551
|
+
screen: ScreenState;
|
|
3552
|
+
view: ViewState;
|
|
3553
|
+
data: DataState;
|
|
3554
|
+
depthData: DepthDataState;
|
|
3555
|
+
[reducerName: string]: any;
|
|
3556
|
+
}
|
|
3557
|
+
|
|
3558
|
+
/**
|
|
3559
|
+
* Enable/disable debug mode
|
|
3560
|
+
*/
|
|
3561
|
+
declare const switchDebugMode: ActionCreatorWithOptionalPayload<boolean, string>;
|
|
3562
|
+
|
|
3563
|
+
/**
|
|
3564
|
+
* Switch to another user role
|
|
3565
|
+
*/
|
|
3566
|
+
declare const switchRole: ActionCreatorWithOptionalPayload< {
|
|
3567
|
+
role: string;
|
|
3568
|
+
}, string>;
|
|
3569
|
+
|
|
3570
|
+
/**
|
|
3571
|
+
* Activates process of role switching
|
|
3572
|
+
*/
|
|
3573
|
+
declare const switchRoleEpic: CXBoxEpic;
|
|
3574
|
+
|
|
3575
|
+
export declare interface SystemError extends ApplicationErrorBase {
|
|
3576
|
+
type: ApplicationErrorType.SystemError;
|
|
3577
|
+
error?: AxiosError;
|
|
3578
|
+
details: string;
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
export declare interface SystemNotification {
|
|
3582
|
+
id: number;
|
|
3583
|
+
type: AppNotificationType;
|
|
3584
|
+
message: string;
|
|
3585
|
+
}
|
|
3586
|
+
|
|
3587
|
+
/**
|
|
3588
|
+
* All widget types that display table-like data.ts
|
|
3589
|
+
*/
|
|
3590
|
+
declare type TableLikeWidgetType = (typeof TableLikeWidgetTypes)[number];
|
|
3591
|
+
|
|
3592
|
+
/**
|
|
3593
|
+
* Different widget types that are considered `tables` in nature for purposes of applying some shared features.
|
|
3594
|
+
* For example, autofocus on missing required field should work for tables but not forms.
|
|
3595
|
+
*
|
|
3596
|
+
* TODO: Make extension point
|
|
3597
|
+
*
|
|
3598
|
+
* @category Components
|
|
3599
|
+
*/
|
|
3600
|
+
export declare const TableLikeWidgetTypes: readonly [WidgetTypes.List, WidgetTypes.DataGrid, WidgetTypes.AssocListPopup, WidgetTypes.PickListPopup, WidgetTypes.FlatTree, WidgetTypes.FlatTreePopup];
|
|
3601
|
+
|
|
3602
|
+
/**
|
|
3603
|
+
* Description of options of allowed on table widget actions
|
|
3604
|
+
*/
|
|
3605
|
+
export declare interface TableOperations {
|
|
3606
|
+
/**
|
|
3607
|
+
* Describes position of tableOperations relatively of table
|
|
3608
|
+
*/
|
|
3609
|
+
position?: PositionTypes;
|
|
3610
|
+
}
|
|
3611
|
+
|
|
3612
|
+
export declare type TextFieldMeta = AllWidgetTypeFieldBase & {
|
|
3613
|
+
type: FieldType.text;
|
|
3614
|
+
popover?: boolean;
|
|
3615
|
+
};
|
|
3616
|
+
|
|
3617
|
+
export declare type TreeAssociatedRecord = DataNode & AssociatedItem;
|
|
3618
|
+
|
|
3619
|
+
/**
|
|
3620
|
+
* Base type for tree nodes that keep references to parent nodes
|
|
3621
|
+
*/
|
|
3622
|
+
export declare interface TreeNodeAscending extends DataNode {
|
|
3623
|
+
/**
|
|
3624
|
+
* Reference to parent node
|
|
3625
|
+
*/
|
|
3626
|
+
parent: TreeNodeAscending;
|
|
3627
|
+
}
|
|
3628
|
+
|
|
3629
|
+
/**
|
|
3630
|
+
* Base type for tree nodes that keep references both to the parent and children nodes
|
|
3631
|
+
*/
|
|
3632
|
+
export declare interface TreeNodeBidirectional extends DataNode {
|
|
3633
|
+
/**
|
|
3634
|
+
* Reference to the parent
|
|
3635
|
+
*/
|
|
3636
|
+
parent: TreeNodeBidirectional;
|
|
3637
|
+
/**
|
|
3638
|
+
* An array of children
|
|
3639
|
+
*/
|
|
3640
|
+
children?: TreeNodeBidirectional[];
|
|
3641
|
+
}
|
|
3642
|
+
|
|
3643
|
+
/**
|
|
3644
|
+
* Tree node that keeps a status if it is expanded (i.e. children also should be displayed)
|
|
3645
|
+
*/
|
|
3646
|
+
export declare type TreeNodeCollapsable<T extends TreeNodeBidirectional = TreeNodeBidirectional> = T & {
|
|
3647
|
+
_expanded: boolean;
|
|
3648
|
+
};
|
|
3649
|
+
|
|
3650
|
+
/**
|
|
3651
|
+
* Base type for tree nodes that keep references to children nodes
|
|
3652
|
+
*/
|
|
3653
|
+
export declare interface TreeNodeDescending extends BaseDataNode {
|
|
3654
|
+
/**
|
|
3655
|
+
* An array of references to children nodes
|
|
3656
|
+
*/
|
|
3657
|
+
children?: TreeNodeDescending[];
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3660
|
+
declare interface TypedActionCreator<Type extends string> {
|
|
3661
|
+
(...args: any[]): Action<Type>;
|
|
3662
|
+
type: Type;
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3665
|
+
declare type TypeGuard<T> = (value: any) => value is T;
|
|
3666
|
+
|
|
3667
|
+
/**
|
|
3668
|
+
* TODO
|
|
3669
|
+
*/
|
|
3670
|
+
declare const uploadFile: ActionCreatorWithOptionalPayload<null, string>;
|
|
3671
|
+
|
|
3672
|
+
/**
|
|
3673
|
+
* TODO
|
|
3674
|
+
*/
|
|
3675
|
+
declare const uploadFileDone: ActionCreatorWithOptionalPayload<null, string>;
|
|
3676
|
+
|
|
3677
|
+
/**
|
|
3678
|
+
* TODO
|
|
3679
|
+
*/
|
|
3680
|
+
declare const uploadFileFailed: ActionCreatorWithOptionalPayload<null, string>;
|
|
3681
|
+
|
|
3682
|
+
/**
|
|
3683
|
+
* TODO
|
|
3684
|
+
*/
|
|
3685
|
+
declare const userDrillDown: ActionCreatorWithOptionalPayload< {
|
|
3686
|
+
widgetName: string;
|
|
3687
|
+
bcName: string;
|
|
3688
|
+
cursor: string;
|
|
3689
|
+
fieldKey: string;
|
|
3690
|
+
}, string>;
|
|
3691
|
+
|
|
3692
|
+
declare const userDrillDownChangeCursorsEpic: CXBoxEpic;
|
|
3693
|
+
|
|
3694
|
+
/**
|
|
3695
|
+
*
|
|
3696
|
+
* @category Epics
|
|
3697
|
+
*/
|
|
3698
|
+
declare const userDrillDownEpic: CXBoxEpic;
|
|
3699
|
+
|
|
3700
|
+
/**
|
|
3701
|
+
* TODO
|
|
3702
|
+
*/
|
|
3703
|
+
declare const userDrillDownSuccess: ActionCreatorWithOptionalPayload< {
|
|
3704
|
+
bcUrl: string;
|
|
3705
|
+
bcName: string;
|
|
3706
|
+
cursor: string;
|
|
3707
|
+
}, string>;
|
|
3708
|
+
|
|
3709
|
+
export declare interface UserRole {
|
|
3710
|
+
type: string;
|
|
3711
|
+
key: string;
|
|
3712
|
+
value: string;
|
|
3713
|
+
description: string;
|
|
3714
|
+
language: string;
|
|
3715
|
+
displayOrder: number;
|
|
3716
|
+
active: boolean;
|
|
3717
|
+
cacheLoaderName: string;
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3720
|
+
declare namespace utils {
|
|
3721
|
+
export {
|
|
3722
|
+
addTailControlSequences,
|
|
3723
|
+
applyParams,
|
|
3724
|
+
applyRawParams,
|
|
3725
|
+
ApiCallContext,
|
|
3726
|
+
createApiError,
|
|
3727
|
+
createApiErrorObservable,
|
|
3728
|
+
getTemplate,
|
|
3729
|
+
buildBcUrl,
|
|
3730
|
+
splitBcUrl,
|
|
3731
|
+
getFieldTitle,
|
|
3732
|
+
splitIntoTokens,
|
|
3733
|
+
escapedSrc,
|
|
3734
|
+
makeRelativeUrl,
|
|
3735
|
+
parseBcCursors,
|
|
3736
|
+
buildUrl,
|
|
3737
|
+
defaultParseURL,
|
|
3738
|
+
defaultBuildURL,
|
|
3739
|
+
getRouteFromString,
|
|
3740
|
+
getFilters,
|
|
3741
|
+
getSorters,
|
|
3742
|
+
parseFilters,
|
|
3743
|
+
parseSorters,
|
|
3744
|
+
getFilterType,
|
|
3745
|
+
flattenOperations,
|
|
3746
|
+
matchOperationRole,
|
|
3747
|
+
getBcChildren,
|
|
3748
|
+
checkShowCondition,
|
|
3749
|
+
assignTreeLinks,
|
|
3750
|
+
getDescendants,
|
|
3751
|
+
buildSearchResultTree,
|
|
3752
|
+
presort,
|
|
3753
|
+
breadthFirstSearch,
|
|
3754
|
+
BreadthFirstResult,
|
|
3755
|
+
deleteUndefinedFromObject
|
|
3756
|
+
}
|
|
3757
|
+
}
|
|
3758
|
+
export { utils }
|
|
3759
|
+
|
|
3760
|
+
/**
|
|
3761
|
+
* TODO
|
|
3762
|
+
*/
|
|
3763
|
+
declare const viewClearPickMap: ActionCreatorWithOptionalPayload<null, string>;
|
|
3764
|
+
|
|
3765
|
+
/**
|
|
3766
|
+
* View description returned by Cxbox API
|
|
3767
|
+
*/
|
|
3768
|
+
export declare interface ViewMetaResponse {
|
|
3769
|
+
/**
|
|
3770
|
+
* @deprecated Deprecated in favor of `name`
|
|
3771
|
+
*/
|
|
3772
|
+
id?: number;
|
|
3773
|
+
/**
|
|
3774
|
+
* Name of the view as specified in *.view.json file
|
|
3775
|
+
*/
|
|
3776
|
+
name: string;
|
|
3777
|
+
/**
|
|
3778
|
+
* Displayed title
|
|
3779
|
+
*/
|
|
3780
|
+
title?: string;
|
|
3781
|
+
/**
|
|
3782
|
+
* Specifies which layout template to use for the view
|
|
3783
|
+
*
|
|
3784
|
+
*Not used in Cxbox UI Core, but can used by client application
|
|
3785
|
+
*/
|
|
3786
|
+
template?: string;
|
|
3787
|
+
/**
|
|
3788
|
+
* @deprecated Used for dynamic view layouts (configurable from user side), which are no longer implemented
|
|
3789
|
+
*/
|
|
3790
|
+
customizable?: boolean;
|
|
3791
|
+
/**
|
|
3792
|
+
* @deprecated Not used
|
|
3793
|
+
*/
|
|
3794
|
+
editable?: boolean;
|
|
3795
|
+
/**
|
|
3796
|
+
* Url for the view (usually in form of `${screen.name}/${view.name}`)
|
|
3797
|
+
*/
|
|
3798
|
+
url: string;
|
|
3799
|
+
/**
|
|
3800
|
+
* Widgets present on the view
|
|
3801
|
+
*/
|
|
3802
|
+
widgets: WidgetMeta[];
|
|
3803
|
+
/**
|
|
3804
|
+
* @deprecated Used for dynamic view layouts (configurable from user side), which are no longer implemented
|
|
3805
|
+
*/
|
|
3806
|
+
columns?: number | null;
|
|
3807
|
+
/**
|
|
3808
|
+
* @deprecated Used for dynamic view layouts (configurable from user side), which are no longer implemented
|
|
3809
|
+
*/
|
|
3810
|
+
rowHeight?: number | null;
|
|
3811
|
+
/**
|
|
3812
|
+
* Not used in Cxbox UI Core, but can be used by client application
|
|
3813
|
+
*/
|
|
3814
|
+
readOnly?: boolean;
|
|
3815
|
+
/**
|
|
3816
|
+
* Not used in Cxbox UI Core
|
|
3817
|
+
*
|
|
3818
|
+
* TODO: Need description
|
|
3819
|
+
*/
|
|
3820
|
+
ignoreHistory?: boolean;
|
|
3821
|
+
}
|
|
3822
|
+
|
|
3823
|
+
/**
|
|
3824
|
+
* Description of the category in the navigation menu.
|
|
3825
|
+
* Used to create nesting levels of menu items.
|
|
3826
|
+
*
|
|
3827
|
+
* @param categoryName The name of the category.
|
|
3828
|
+
* @param child list of categories or menu items included in a category.
|
|
3829
|
+
* @deprecated ViewNavigationCategory will be deleted in 2.0.0
|
|
3830
|
+
* @category Type Guards
|
|
3831
|
+
*/
|
|
3832
|
+
export declare interface ViewNavigationCategory {
|
|
3833
|
+
categoryName: string;
|
|
3834
|
+
child: Array<ViewNavigationCategory | ViewNavigationItem>;
|
|
3835
|
+
}
|
|
3836
|
+
|
|
3837
|
+
/**
|
|
3838
|
+
* Description of groups in the navigation menu.
|
|
3839
|
+
*
|
|
3840
|
+
* Used to create nesting levels of menu items.
|
|
3841
|
+
*
|
|
3842
|
+
* @param title Title of group. Navigation element shows it to user.
|
|
3843
|
+
* @param child Array of navigation elements specified below group(View or inner Group)
|
|
3844
|
+
*/
|
|
3845
|
+
export declare interface ViewNavigationGroup {
|
|
3846
|
+
/** TODO identifier will be nullable and string-only in 2.0.0 */
|
|
3847
|
+
id?: string | number;
|
|
3848
|
+
/**
|
|
3849
|
+
* Displayed name for the grouup
|
|
3850
|
+
*/
|
|
3851
|
+
title: string;
|
|
3852
|
+
/**
|
|
3853
|
+
* Nested items for the group
|
|
3854
|
+
*/
|
|
3855
|
+
child: Array<ViewNavigationGroup | ViewNavigationItem>;
|
|
3856
|
+
/**
|
|
3857
|
+
* If true, the group will not be visible in navigation (but still accessible by direct link or drilldown)
|
|
3858
|
+
*/
|
|
3859
|
+
hidden?: boolean;
|
|
3860
|
+
/**
|
|
3861
|
+
* If specified this view will be default view for the group; if not, the first available view will be default view
|
|
3862
|
+
*/
|
|
3863
|
+
defaultView?: string;
|
|
3864
|
+
}
|
|
3865
|
+
|
|
3866
|
+
/**
|
|
3867
|
+
* Description of the destination in the navigation menu.
|
|
3868
|
+
*
|
|
3869
|
+
* @param viewName Identifier of view.
|
|
3870
|
+
*/
|
|
3871
|
+
export declare interface ViewNavigationItem {
|
|
3872
|
+
viewName?: string;
|
|
3873
|
+
hidden?: boolean;
|
|
3874
|
+
/** TODO: remove in 2.0.0 */
|
|
3875
|
+
id?: string;
|
|
3876
|
+
}
|
|
3877
|
+
|
|
3878
|
+
/**
|
|
3879
|
+
* TODO
|
|
3880
|
+
*/
|
|
3881
|
+
declare const viewPutPickMap: ActionCreatorWithOptionalPayload< {
|
|
3882
|
+
map: PickMap;
|
|
3883
|
+
bcName: string;
|
|
3884
|
+
}, string>;
|
|
3885
|
+
|
|
3886
|
+
export declare interface ViewSelectedCell {
|
|
3887
|
+
widgetName: string;
|
|
3888
|
+
rowId: string;
|
|
3889
|
+
fieldKey: string;
|
|
3890
|
+
}
|
|
3891
|
+
|
|
3892
|
+
export declare interface ViewState extends ViewMetaResponse {
|
|
3893
|
+
rowMeta: {
|
|
3894
|
+
[bcName: string]: {
|
|
3895
|
+
[bcUrl: string]: RowMeta;
|
|
3896
|
+
};
|
|
3897
|
+
};
|
|
3898
|
+
pendingDataChanges: {
|
|
3899
|
+
[bcName: string]: {
|
|
3900
|
+
[cursor: string]: PendingDataItem;
|
|
3901
|
+
};
|
|
3902
|
+
};
|
|
3903
|
+
handledForceActive: {
|
|
3904
|
+
[bcName: string]: {
|
|
3905
|
+
[cursor: string]: PendingDataItem;
|
|
3906
|
+
};
|
|
3907
|
+
};
|
|
3908
|
+
metaInProgress: {
|
|
3909
|
+
[bcName: string]: boolean;
|
|
3910
|
+
};
|
|
3911
|
+
popupData?: PopupData;
|
|
3912
|
+
infiniteWidgets?: string[];
|
|
3913
|
+
pickMap?: PickMap;
|
|
3914
|
+
selectedCell?: ViewSelectedCell;
|
|
3915
|
+
systemNotifications?: SystemNotification[];
|
|
3916
|
+
error?: ApplicationError;
|
|
3917
|
+
/**
|
|
3918
|
+
* For backward compatibility
|
|
3919
|
+
*
|
|
3920
|
+
* `old` describes `pendingValidationFails` as `Record<string, string>`
|
|
3921
|
+
* `target` describes `pendingValidationFails` as `PendingValidationFails`
|
|
3922
|
+
*/
|
|
3923
|
+
pendingValidationFailsFormat?: PendingValidationFailsFormat.old | PendingValidationFailsFormat.target;
|
|
3924
|
+
pendingValidationFails?: Record<string, string> | PendingValidationFails;
|
|
3925
|
+
modalInvoke?: {
|
|
3926
|
+
operation: {
|
|
3927
|
+
bcName: string;
|
|
3928
|
+
operationType: OperationTypeCrud | string;
|
|
3929
|
+
widgetName: string;
|
|
3930
|
+
};
|
|
3931
|
+
confirmOperation: OperationPostInvokeConfirm;
|
|
3932
|
+
};
|
|
3933
|
+
}
|
|
3934
|
+
|
|
3935
|
+
/**
|
|
3936
|
+
* Field descriptor in widget configuration
|
|
3937
|
+
*/
|
|
3938
|
+
export declare type WidgetField = NumberFieldMeta | DateFieldMeta | DateTimeFieldMeta | DateTimeWithSecondsFieldMeta | DictionaryFieldMeta | TextFieldMeta | MultiFieldMeta | InputFieldMeta | MultivalueFieldMeta | PickListFieldMeta | InlinePickListFieldMeta | FileUploadFieldMeta | CheckboxFieldMeta | HiddenFieldMeta | RadioButtonFieldMeta;
|
|
3939
|
+
|
|
3940
|
+
export declare interface WidgetFieldBase {
|
|
3941
|
+
type: FieldType;
|
|
3942
|
+
key: string;
|
|
3943
|
+
drillDown?: boolean;
|
|
3944
|
+
bgColor?: string;
|
|
3945
|
+
bgColorKey?: string;
|
|
3946
|
+
title?: string;
|
|
3947
|
+
label?: string;
|
|
3948
|
+
snapshotKey?: string;
|
|
3949
|
+
/**
|
|
3950
|
+
* Maximum number of characters
|
|
3951
|
+
*/
|
|
3952
|
+
maxInput?: number;
|
|
3953
|
+
/**
|
|
3954
|
+
* Whether the field is hidden
|
|
3955
|
+
*/
|
|
3956
|
+
hidden?: boolean;
|
|
3957
|
+
/**
|
|
3958
|
+
* Shift value of different hierarchy level
|
|
3959
|
+
*
|
|
3960
|
+
* TODO: Project-specific, has no support in Cxbox backend
|
|
3961
|
+
*/
|
|
3962
|
+
hierarchyShift?: boolean;
|
|
3963
|
+
drillDownKey?: string;
|
|
3964
|
+
/**
|
|
3965
|
+
* When assigned with another field key, this another will be used for filtration purposes
|
|
3966
|
+
*/
|
|
3967
|
+
filterBy?: string;
|
|
3968
|
+
}
|
|
3969
|
+
|
|
3970
|
+
/**
|
|
3971
|
+
* Description of the list of fields of block type.
|
|
3972
|
+
*
|
|
3973
|
+
* @deprecated Used to create a block grouping of fields
|
|
3974
|
+
*/
|
|
3975
|
+
export declare interface WidgetFieldBlock<T> {
|
|
3976
|
+
/**
|
|
3977
|
+
* Block ID
|
|
3978
|
+
*/
|
|
3979
|
+
blockId: number;
|
|
3980
|
+
/**
|
|
3981
|
+
* Name of the block
|
|
3982
|
+
*/
|
|
3983
|
+
name: string;
|
|
3984
|
+
/**
|
|
3985
|
+
* Fields contained in the block
|
|
3986
|
+
*/
|
|
3987
|
+
fields: T[];
|
|
3988
|
+
/**
|
|
3989
|
+
* @deprecated TODO: Remove in 2.0.0, used to denote a new row in old layout system for forms
|
|
3990
|
+
*/
|
|
3991
|
+
newRow?: boolean;
|
|
3992
|
+
/**
|
|
3993
|
+
* @deprecated TODO: Remove in 2.0.0, used to ...
|
|
3994
|
+
*/
|
|
3995
|
+
break?: boolean;
|
|
3996
|
+
}
|
|
3997
|
+
|
|
3998
|
+
export declare type WidgetFieldsOrBlocks<T> = Array<T | WidgetFieldBlock<T>>;
|
|
3999
|
+
|
|
4000
|
+
export declare type WidgetFormField = Extract<WidgetField, WidgetFormFieldBase>;
|
|
4001
|
+
|
|
4002
|
+
export declare interface WidgetFormFieldBase extends WidgetFieldBase {
|
|
4003
|
+
label: string;
|
|
4004
|
+
}
|
|
4005
|
+
|
|
4006
|
+
/**
|
|
4007
|
+
* Configuration for widgets dislaying form data.ts
|
|
4008
|
+
*/
|
|
4009
|
+
export declare interface WidgetFormMeta extends WidgetMeta {
|
|
4010
|
+
/**
|
|
4011
|
+
* Unambiguous marker for JSON file specifing widget type
|
|
4012
|
+
*/
|
|
4013
|
+
type: WidgetTypes.Form;
|
|
4014
|
+
/**
|
|
4015
|
+
* Descriptor for fields or block of fields on the form
|
|
4016
|
+
*/
|
|
4017
|
+
fields: WidgetFieldsOrBlocks<WidgetFormField>;
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
/**
|
|
4021
|
+
*
|
|
4022
|
+
*/
|
|
4023
|
+
export declare type WidgetInfoField = WidgetFormField & {
|
|
4024
|
+
drillDownTitle?: string;
|
|
4025
|
+
drillDownTitleKey?: string;
|
|
4026
|
+
hintKey?: string;
|
|
4027
|
+
};
|
|
4028
|
+
|
|
4029
|
+
/**
|
|
4030
|
+
* Configuration for widgets displaying read-only table data.ts
|
|
4031
|
+
*/
|
|
4032
|
+
export declare interface WidgetInfoMeta extends WidgetMeta {
|
|
4033
|
+
/**
|
|
4034
|
+
* Unambiguous marker for JSON file specifying widget type
|
|
4035
|
+
*/
|
|
4036
|
+
type: WidgetTypes.Info;
|
|
4037
|
+
/**
|
|
4038
|
+
* Descriptor for fields or block of fields on the form
|
|
4039
|
+
*/
|
|
4040
|
+
fields: WidgetFieldsOrBlocks<WidgetInfoField>;
|
|
4041
|
+
/**
|
|
4042
|
+
* Options for customizing widget
|
|
4043
|
+
*/
|
|
4044
|
+
options?: WidgetOptions & WidgetInfoOptions;
|
|
4045
|
+
}
|
|
4046
|
+
|
|
4047
|
+
export declare interface WidgetInfoOptions {
|
|
4048
|
+
fieldBorderBottom?: boolean;
|
|
4049
|
+
footer?: string;
|
|
4050
|
+
}
|
|
4051
|
+
|
|
4052
|
+
export declare type WidgetListField = Extract<WidgetField, WidgetListFieldBase>;
|
|
4053
|
+
|
|
4054
|
+
export declare interface WidgetListFieldBase extends WidgetFieldBase {
|
|
4055
|
+
title: string;
|
|
4056
|
+
width?: number;
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
export declare interface WidgetMeta {
|
|
4060
|
+
name: string;
|
|
4061
|
+
type: WidgetTypes | string;
|
|
4062
|
+
title: string;
|
|
4063
|
+
bcName: string;
|
|
4064
|
+
/**
|
|
4065
|
+
* Business components ancestors hierarchy
|
|
4066
|
+
*
|
|
4067
|
+
* TODO: Will be mandatory (but nullable) in 2.0.0
|
|
4068
|
+
*
|
|
4069
|
+
* It is declared in `WidgetDTO` of Cxbox API, can be null for widgets without
|
|
4070
|
+
* business component (headers, navigation tabs, etc.)
|
|
4071
|
+
*/
|
|
4072
|
+
url?: string | null;
|
|
4073
|
+
position: number;
|
|
4074
|
+
limit?: number;
|
|
4075
|
+
gridWidth: number;
|
|
4076
|
+
fields: unknown[];
|
|
4077
|
+
options?: WidgetOptions;
|
|
4078
|
+
showCondition?: WidgetShowCondition;
|
|
4079
|
+
description?: string;
|
|
4080
|
+
}
|
|
4081
|
+
|
|
4082
|
+
/**
|
|
4083
|
+
* A widget configuration of any known type
|
|
4084
|
+
*/
|
|
4085
|
+
export declare type WidgetMetaAny = WidgetFormMeta | WidgetTableMeta | WidgetTextMeta | WidgetInfoMeta | NavigationWidgetMeta;
|
|
4086
|
+
|
|
4087
|
+
/**
|
|
4088
|
+
* Operations description in `options` of widget meta, which allows its availability.
|
|
4089
|
+
*/
|
|
4090
|
+
export declare interface WidgetOperations {
|
|
4091
|
+
/**
|
|
4092
|
+
* List of included operations or groups of operations
|
|
4093
|
+
*/
|
|
4094
|
+
include?: OperationInclusionDescriptor[];
|
|
4095
|
+
/**
|
|
4096
|
+
* List of excluded operations or groups of operations
|
|
4097
|
+
*/
|
|
4098
|
+
exclude?: OperationType[];
|
|
4099
|
+
/**
|
|
4100
|
+
* default no crud save action
|
|
4101
|
+
*/
|
|
4102
|
+
defaultSave?: string;
|
|
4103
|
+
}
|
|
4104
|
+
|
|
4105
|
+
/**
|
|
4106
|
+
* @param readOnly All widget fields are not editable
|
|
4107
|
+
* @param tableOperations Options for allowed on table widget actions
|
|
4108
|
+
*/
|
|
4109
|
+
export declare interface WidgetOptions {
|
|
4110
|
+
layout?: {
|
|
4111
|
+
header?: string[];
|
|
4112
|
+
aside?: string[];
|
|
4113
|
+
rows: LayoutRow[];
|
|
4114
|
+
};
|
|
4115
|
+
/**
|
|
4116
|
+
* Options for allowed on table widget actions
|
|
4117
|
+
*/
|
|
4118
|
+
tableOperations?: TableOperations;
|
|
4119
|
+
/**
|
|
4120
|
+
* TODO: Move all hierarchy-specific properties to a single property
|
|
4121
|
+
*/
|
|
4122
|
+
hierarchy?: WidgetTableHierarchy[];
|
|
4123
|
+
hierarchySameBc?: boolean;
|
|
4124
|
+
hierarchyFull?: boolean;
|
|
4125
|
+
hierarchyParentKey?: string;
|
|
4126
|
+
hierarchyGroupSelection?: boolean;
|
|
4127
|
+
hierarchyGroupDeselection?: boolean;
|
|
4128
|
+
hierarchyTraverse?: boolean;
|
|
4129
|
+
hierarchyRadio?: boolean;
|
|
4130
|
+
hierarchyRadioAll?: boolean;
|
|
4131
|
+
hierarchyDisableRoot?: boolean;
|
|
4132
|
+
/**
|
|
4133
|
+
* Disable searched item descendants in fullHierarchy search
|
|
4134
|
+
*/
|
|
4135
|
+
hierarchyDisableDescendants?: boolean;
|
|
4136
|
+
hierarchyDisableParent?: boolean;
|
|
4137
|
+
actionGroups?: WidgetOperations | Record<string, WidgetOperations>;
|
|
4138
|
+
/**
|
|
4139
|
+
* All widget fields are not editable
|
|
4140
|
+
*/
|
|
4141
|
+
readOnly?: boolean;
|
|
4142
|
+
/**
|
|
4143
|
+
* @deprecated TODO: Remove in 2.0.0 in favor of actionGroups
|
|
4144
|
+
*/
|
|
4145
|
+
hideActionGroups?: string[];
|
|
4146
|
+
/**
|
|
4147
|
+
* Record field which value will be used as a title for the whole record
|
|
4148
|
+
* for this particular widget
|
|
4149
|
+
*/
|
|
4150
|
+
displayedValueKey?: string;
|
|
4151
|
+
/**
|
|
4152
|
+
* Disable tooltip with error text
|
|
4153
|
+
*/
|
|
4154
|
+
disableHoverError?: boolean;
|
|
4155
|
+
/**
|
|
4156
|
+
* Disable notification after failed operation
|
|
4157
|
+
*/
|
|
4158
|
+
disableNotification?: boolean;
|
|
4159
|
+
/**
|
|
4160
|
+
* Allow selecting multiple items for FlatListPopup
|
|
4161
|
+
*
|
|
4162
|
+
* TODO: Move to separate interface
|
|
4163
|
+
*/
|
|
4164
|
+
multiple?: boolean;
|
|
4165
|
+
/**
|
|
4166
|
+
* Enables filtering dates by range
|
|
4167
|
+
* TODO: It's a temporal option. Remove for 2.x of cxbox-ui/core
|
|
4168
|
+
*/
|
|
4169
|
+
filterDateByRange?: boolean;
|
|
4170
|
+
}
|
|
4171
|
+
|
|
4172
|
+
/**
|
|
4173
|
+
* Show widget only if certain condition is met
|
|
4174
|
+
*
|
|
4175
|
+
* Supported conditions:
|
|
4176
|
+
* - Active record for specified business component {bcName} should contain field {fieldKey}
|
|
4177
|
+
* with value {fieldValue}
|
|
4178
|
+
*
|
|
4179
|
+
* @param bcName Business component where field condition is checked
|
|
4180
|
+
* @param fieldCondition Field key and value expected from this field
|
|
4181
|
+
*/
|
|
4182
|
+
export declare interface WidgetShowCondition {
|
|
4183
|
+
bcName: string;
|
|
4184
|
+
isDefault: boolean;
|
|
4185
|
+
params: {
|
|
4186
|
+
fieldKey: string;
|
|
4187
|
+
value: DataValue;
|
|
4188
|
+
};
|
|
4189
|
+
}
|
|
4190
|
+
|
|
4191
|
+
/**
|
|
4192
|
+
* Configuration descriptor for hierarchy subset of table widgets.
|
|
4193
|
+
*
|
|
4194
|
+
* Each descriptor describes a specific level of hierarchy
|
|
4195
|
+
*/
|
|
4196
|
+
export declare interface WidgetTableHierarchy {
|
|
4197
|
+
/**
|
|
4198
|
+
* Which business component is displayed on this level
|
|
4199
|
+
*/
|
|
4200
|
+
bcName: string;
|
|
4201
|
+
/**
|
|
4202
|
+
* What record field to use as displayed value of that record
|
|
4203
|
+
*/
|
|
4204
|
+
assocValueKey?: string;
|
|
4205
|
+
/**
|
|
4206
|
+
* If true only one item can be selected
|
|
4207
|
+
*/
|
|
4208
|
+
radio?: boolean;
|
|
4209
|
+
/**
|
|
4210
|
+
* Fields that will be displayed on this hierarchy level
|
|
4211
|
+
*/
|
|
4212
|
+
fields: WidgetListField[];
|
|
4213
|
+
}
|
|
4214
|
+
|
|
4215
|
+
/**
|
|
4216
|
+
* Configuration for widgets displaying table-like data.ts
|
|
4217
|
+
*/
|
|
4218
|
+
export declare interface WidgetTableMeta extends WidgetMeta {
|
|
4219
|
+
/**
|
|
4220
|
+
* Unambiguous marker for JSON file specifing widget type
|
|
4221
|
+
*/
|
|
4222
|
+
type: TableLikeWidgetType;
|
|
4223
|
+
/**
|
|
4224
|
+
* Descriptor for table columns
|
|
4225
|
+
*/
|
|
4226
|
+
fields: WidgetListField[];
|
|
4227
|
+
}
|
|
4228
|
+
|
|
4229
|
+
/**
|
|
4230
|
+
* Configuration for widgets displaying markdown text
|
|
4231
|
+
*/
|
|
4232
|
+
export declare interface WidgetTextMeta extends WidgetMeta {
|
|
4233
|
+
/**
|
|
4234
|
+
* Unambiguous marker for JSON file specifying widget type
|
|
4235
|
+
*/
|
|
4236
|
+
type: WidgetTypes.Text;
|
|
4237
|
+
/**
|
|
4238
|
+
* Text to display
|
|
4239
|
+
*/
|
|
4240
|
+
description: string;
|
|
4241
|
+
/**
|
|
4242
|
+
* Title text
|
|
4243
|
+
*/
|
|
4244
|
+
descriptionTitle: string;
|
|
4245
|
+
}
|
|
4246
|
+
|
|
4247
|
+
export declare enum WidgetTypes {
|
|
4248
|
+
Info = "Info",
|
|
4249
|
+
Form = "Form",
|
|
4250
|
+
List = "List",
|
|
4251
|
+
DataGrid = "DataGrid",
|
|
4252
|
+
AssocListPopup = "AssocListPopup",
|
|
4253
|
+
PickListPopup = "PickListPopup",
|
|
4254
|
+
HeaderWidget = "HeaderWidget",
|
|
4255
|
+
SecondLevelMenu = "SecondLevelMenu",
|
|
4256
|
+
ThirdLevelMenu = "ThirdLevelMenu",
|
|
4257
|
+
FourthLevelMenu = "FourthLevelMenu",
|
|
4258
|
+
WidgetCreator = "WidgetCreator",
|
|
4259
|
+
Pivot = "Pivot",
|
|
4260
|
+
DimFilter = "DimFilter",
|
|
4261
|
+
Text = "Text",
|
|
4262
|
+
FlatTree = "FlatTree",
|
|
4263
|
+
FlatTreePopup = "FlatTreePopup",
|
|
4264
|
+
/**
|
|
4265
|
+
* Navigation tabs widget to be excluded from the widget stream
|
|
4266
|
+
*/
|
|
4267
|
+
ViewNavigation = "ViewNavigation",
|
|
4268
|
+
/**
|
|
4269
|
+
* Navigation tabs widget to be displayed in the widget stream
|
|
4270
|
+
*/
|
|
4271
|
+
NavigationTabs = "NavigationTabs"
|
|
4272
|
+
}
|
|
4273
|
+
|
|
4274
|
+
export { }
|