@sava-info-systems/api-maker-with-extensions 1.5.3 → 1.7.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 +2 -2
- package/dist/1025.js +1 -1
- package/dist/148.js +1 -1
- package/dist/1558.js +1 -1
- package/dist/1678.js +1 -1
- package/dist/2295.js +1 -1
- package/dist/2443.js +1 -1
- package/dist/2473.js +1 -1
- package/dist/2714.js +1 -1
- package/dist/3139.js +1 -1
- package/dist/4181.js +1 -1
- package/dist/4186.js +1 -1
- package/dist/4211.js +1 -1
- package/dist/485.js +1 -1
- package/dist/4895.js +1 -1
- package/dist/5334.js +1 -1
- package/dist/5421.js +1 -1
- package/dist/5679.js +1 -1
- package/dist/5765.js +1 -0
- package/dist/6236.js +1 -1
- package/dist/6393.js +1 -1
- package/dist/6401.js +1 -1
- package/dist/6855.js +1 -0
- package/dist/7436.js +1 -1
- package/dist/7470.js +1 -1
- package/dist/7987.js +1 -1
- package/dist/8125.js +1 -1
- package/dist/8266.js +1 -1
- package/dist/8296.js +1 -1
- package/dist/885.js +1 -1
- package/dist/9243.js +1 -1
- package/dist/assets/images/icons/api-group.svg +10 -9
- package/dist/assets/images/icons/api-user.svg +9 -6
- package/dist/assets/images/icons/comparator.svg +13 -4
- package/dist/assets/images/icons/custom.svg +5 -8
- package/dist/assets/images/icons/database.svg +28 -11
- package/dist/assets/images/icons/db-m.svg +9 -27
- package/dist/assets/images/icons/dev.svg +10 -6
- package/dist/assets/images/icons/diagram.svg +27 -6
- package/dist/assets/images/icons/event.svg +16 -0
- package/dist/assets/images/icons/film-movies-icon.svg +3 -13
- package/dist/assets/images/icons/finder.svg +9 -6
- package/dist/assets/images/icons/i18n.svg +10 -8
- package/dist/assets/images/icons/increment.svg +4 -3
- package/dist/assets/images/icons/license.svg +6 -0
- package/dist/assets/images/icons/log-profile.svg +20 -6
- package/dist/assets/images/icons/log.svg +14 -6
- package/dist/assets/images/icons/masters.svg +14 -0
- package/dist/assets/images/icons/nodes.svg +4 -2
- package/dist/assets/images/icons/notes.svg +11 -18
- package/dist/assets/images/icons/process_initializers.svg +19 -12
- package/dist/assets/images/icons/redis.svg +17 -6
- package/dist/assets/images/icons/sandbox.svg +10 -3
- package/dist/assets/images/icons/schedulers.svg +7 -11
- package/dist/assets/images/icons/secret.svg +12 -6
- package/dist/assets/images/icons/systems.svg +7 -8
- package/dist/assets/images/icons/testing.svg +11 -3
- package/dist/assets/images/icons/third-party.svg +16 -6
- package/dist/assets/images/icons/typescript.svg +7 -6
- package/dist/assets/images/icons/ui-maker.svg +11 -0
- package/dist/assets/images/icons/utility.svg +18 -6
- package/dist/assets/images/icons/vulnerability.svg +19 -11
- package/dist/assets/images/icons/web.svg +3 -9
- package/dist/assets/schema-types/InterfaceProps.ts +8 -0
- package/dist/assets/schema-types/types.ts +1583 -112
- package/dist/assets/styles/out/styles.css +1 -1
- package/dist/assets/styles/out/styles.css.map +1 -1
- package/dist/assets/styles/styles.scss +2 -2
- package/dist/common.js +1 -1
- package/dist/main.js +1 -1
- package/dist/primeicons.eot +0 -0
- package/dist/primeicons.svg +62 -9
- package/dist/primeicons.ttf +0 -0
- package/dist/primeicons.woff +0 -0
- package/dist/primeicons.woff2 +0 -0
- package/dist/styles.css +1 -1
- package/license.txt +2 -1
- package/main.js +1 -1
- package/package.json +5 -4
- package/sandbox/assets/schema-types/types.js +240 -3
- package/sandbox/package.json +1 -0
- package/sandbox/sandbox.js +1 -1
- package/src/assets/schema-types/types.ts +1583 -112
- package/src/public/dist-db-masters/3rdpartylicenses.txt +5 -5
- package/src/public/dist-db-masters/browser/assets/data/mime_types.json +819 -0
- package/src/public/dist-db-masters/browser/assets/iframe_test.html +61 -0
- package/src/public/dist-db-masters/browser/assets/themes/arya-blue/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/arya-green/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/arya-orange/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/arya-purple/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-amber/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-blue/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-cyan/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-green/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-indigo/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-lime/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-noir/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-pink/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-purple/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-dark-teal/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-amber/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-blue/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-cyan/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-green/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-indigo/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-lime/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-noir/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-pink/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-purple/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/aura-light-teal/theme.css +174 -2
- package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-dark-blue/theme.css +166 -5
- package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-dark-purple/theme.css +166 -5
- package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-light-blue/theme.css +166 -5
- package/src/public/dist-db-masters/browser/assets/themes/bootstrap4-light-purple/theme.css +166 -5
- package/src/public/dist-db-masters/browser/assets/themes/fluent-light/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/lara-dark-blue/theme.css +173 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-dark-indigo/theme.css +173 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-dark-purple/theme.css +173 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-dark-teal/theme.css +173 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-light-blue/theme.css +222 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-light-indigo/theme.css +222 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-light-purple/theme.css +222 -1
- package/src/public/dist-db-masters/browser/assets/themes/lara-light-teal/theme.css +222 -1
- package/src/public/dist-db-masters/browser/assets/themes/luna-amber/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/luna-blue/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/luna-green/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/luna-pink/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/md-dark-deeppurple/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/md-dark-indigo/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/md-light-deeppurple/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/md-light-indigo/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mdc-dark-deeppurple/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mdc-dark-indigo/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mdc-light-deeppurple/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mdc-light-indigo/theme.css +187 -4
- package/src/public/dist-db-masters/browser/assets/themes/mira/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/nano/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/nova/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/nova-accent/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/nova-alt/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/rhea/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/saga-blue/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/saga-green/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/saga-orange/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/saga-purple/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/soho-dark/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/soho-light/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/tailwind-light/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/vela-blue/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/vela-green/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/vela-orange/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/vela-purple/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/viva-dark/theme.css +117 -5
- package/src/public/dist-db-masters/browser/assets/themes/viva-light/theme.css +117 -5
- package/src/public/dist-db-masters/browser/chunk-MON7YFGF.js +1 -0
- package/src/public/dist-db-masters/browser/chunk-YFZ444RX.js +49 -0
- package/src/public/dist-db-masters/browser/index.html +3 -0
- package/src/public/dist-db-masters/browser/main.js +77 -67
- package/src/public/dist-db-masters/browser/polyfills.js +2 -2
- package/src/public/dist-db-masters/browser/styles.css +1 -1
- package/dist/1840.js +0 -1
- package/dist/9208.js +0 -1
- package/dist/assets/images/icons/event.png +0 -0
- package/dist/assets/images/icons/license.png +0 -0
- package/dist/assets/images/icons/masters.png +0 -0
|
@@ -142,17 +142,6 @@ export interface IIsAutoIncrementByAM {
|
|
|
142
142
|
step?: number; // default value will be 1
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
export interface IPropertyValidation {
|
|
146
|
-
required?: boolean; // Allowed Types : *
|
|
147
|
-
min?: number; // Allowed Types : number | date
|
|
148
|
-
max?: number; // Allowed Types : number | date
|
|
149
|
-
minLength?: number; // Allowed Types : string
|
|
150
|
-
maxLength?: number; // Allowed Types : string
|
|
151
|
-
unique?: boolean;
|
|
152
|
-
email?: boolean; // Allowed Types : string
|
|
153
|
-
validatorFun?: Function;
|
|
154
|
-
}
|
|
155
|
-
|
|
156
145
|
export interface IPropertyConversion {
|
|
157
146
|
trimStart?: boolean;
|
|
158
147
|
trimEnd?: boolean;
|
|
@@ -236,7 +225,7 @@ export interface ISecretTypeCommon extends Pick<IAuthTokenInfoCommon, 'authToken
|
|
|
236
225
|
sqlServer?: string;
|
|
237
226
|
postgreSQL?: string;
|
|
238
227
|
oracle?: string;
|
|
239
|
-
}
|
|
228
|
+
};
|
|
240
229
|
}
|
|
241
230
|
|
|
242
231
|
export interface IAuthTokenInfo {
|
|
@@ -284,7 +273,7 @@ export interface IAuthTokenAWS extends IAuthTokenGroupsProperties {
|
|
|
284
273
|
tokenExpiration: number; // Up to default expiration of 1 hour (3600000 ms)
|
|
285
274
|
}
|
|
286
275
|
|
|
287
|
-
export interface IAuthTokenAzureAD extends IAuthTokenGroupsProperties{
|
|
276
|
+
export interface IAuthTokenAzureAD extends IAuthTokenGroupsProperties {
|
|
288
277
|
/** client_id */
|
|
289
278
|
appId: string;
|
|
290
279
|
tenant: string;
|
|
@@ -575,7 +564,13 @@ export enum EArrayOperation {
|
|
|
575
564
|
}
|
|
576
565
|
|
|
577
566
|
export enum EAPIAccessType {
|
|
567
|
+
/** API is not accessible for outside world. Can be used from custom API and code from global "g" object.. */
|
|
568
|
+
NO_ACCESS = 'NO_ACCESS',
|
|
569
|
+
|
|
570
|
+
/** API is public and can be accessible without any token. */
|
|
578
571
|
IS_PUBLIC = 'IS_PUBLIC',
|
|
572
|
+
|
|
573
|
+
/** API can be accessible using tokens. Required tokens depends on authTokenInfo configuration.. */
|
|
579
574
|
TOKEN_ACCESS = 'TOKEN_ACCESS',
|
|
580
575
|
}
|
|
581
576
|
|
|
@@ -845,6 +840,7 @@ export interface IApiParamsGetById extends IAMGlobalBaseParams {
|
|
|
845
840
|
id: any;
|
|
846
841
|
primaryKey?: string;
|
|
847
842
|
select?: any;
|
|
843
|
+
deep?: IApiParamsDeepFormat[] | string[] | string;
|
|
848
844
|
}
|
|
849
845
|
|
|
850
846
|
export interface IApiParamsSave extends IAMGlobalBaseParams {
|
|
@@ -904,13 +900,14 @@ export interface IExecuteQuery {
|
|
|
904
900
|
instance: string;
|
|
905
901
|
database?: string; // required for postgresql, mongodb only
|
|
906
902
|
collection?: string; // required for mongodb only
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* You can give SQL query for SQL based databases.<br/>
|
|
906
|
+
* MongoDB = You can give object which will be passed in "command" function.
|
|
907
|
+
* ex: https://www.mongodb.com/docs/drivers/node/current/usage-examples/command/
|
|
908
|
+
* Supported commands : https://www.mongodb.com/docs/v6.0/reference/command/
|
|
909
|
+
*/
|
|
910
|
+
query: string | any;
|
|
914
911
|
headers?: any;
|
|
915
912
|
}
|
|
916
913
|
|
|
@@ -1085,7 +1082,7 @@ export interface IWSObject {
|
|
|
1085
1082
|
validatedTokens: {
|
|
1086
1083
|
apiUser?: any; // IApiUser
|
|
1087
1084
|
amUser?: any; // IUser
|
|
1088
|
-
}
|
|
1085
|
+
};
|
|
1089
1086
|
}
|
|
1090
1087
|
|
|
1091
1088
|
export type IWSObject_P = Partial<IWSObject>;
|
|
@@ -1215,6 +1212,10 @@ export enum EDBMasterGridExport {
|
|
|
1215
1212
|
// PDF = 'PDF',
|
|
1216
1213
|
}
|
|
1217
1214
|
|
|
1215
|
+
export enum EDBMasterDataImport {
|
|
1216
|
+
CSV = 'CSV',
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1218
1219
|
export interface IDBMasterConfig {
|
|
1219
1220
|
theme?: EDBMasterTheme;
|
|
1220
1221
|
|
|
@@ -1231,6 +1232,7 @@ export interface IDBMasterConfig {
|
|
|
1231
1232
|
/**
|
|
1232
1233
|
* Default : browser timezone.
|
|
1233
1234
|
* Dates will be converted into this timezone before display in grid and sending to database query.
|
|
1235
|
+
* Timezone List : https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
|
1234
1236
|
*/
|
|
1235
1237
|
dateTimeZone?: string;
|
|
1236
1238
|
|
|
@@ -1241,14 +1243,62 @@ export interface IDBMasterConfig {
|
|
|
1241
1243
|
* It will not work when unsupported format options of primeNg calendar control are used.
|
|
1242
1244
|
*
|
|
1243
1245
|
* PrimeNG calendar does not support time format but it will be automatically appended.
|
|
1244
|
-
* This format will be
|
|
1246
|
+
* This format will be default for all Calendar control in UI.
|
|
1245
1247
|
*/
|
|
1246
1248
|
dateTimeFormat?: string;
|
|
1247
1249
|
|
|
1248
1250
|
operations?: {
|
|
1249
1251
|
add?: IDBMasterConfigOperation;
|
|
1250
1252
|
hideAddConfirmation?: boolean;
|
|
1253
|
+
/** Default : false. If true, it will not show delete all button. */
|
|
1254
|
+
hideDeleteAllButton?: boolean;
|
|
1251
1255
|
hideDeleteAllConfirmation?: boolean;
|
|
1256
|
+
|
|
1257
|
+
showRefreshButton?: boolean;
|
|
1258
|
+
|
|
1259
|
+
/**
|
|
1260
|
+
* Default : T.EDBMasterOperationsOrder.theme_selector,
|
|
1261
|
+
* T.EDBMasterOperationsOrder.column_selector,
|
|
1262
|
+
* T.EDBMasterOperationsOrder.global_search,
|
|
1263
|
+
* T.EDBMasterOperationsOrder.import,
|
|
1264
|
+
* T.EDBMasterOperationsOrder.export,
|
|
1265
|
+
* T.EDBMasterOperationsOrder.refresh,
|
|
1266
|
+
* T.EDBMasterOperationsOrder.add,
|
|
1267
|
+
* T.EDBMasterOperationsOrder.custom_actions,
|
|
1268
|
+
* T.EDBMasterOperationsOrder.delete_all,
|
|
1269
|
+
* */
|
|
1270
|
+
operationsOrder?: (
|
|
1271
|
+
EDBMasterOperationsOrder.custom_actions
|
|
1272
|
+
| EDBMasterOperationsOrder.delete_all
|
|
1273
|
+
| EDBMasterOperationsOrder.add
|
|
1274
|
+
| EDBMasterOperationsOrder.refresh
|
|
1275
|
+
| EDBMasterOperationsOrder.export
|
|
1276
|
+
| EDBMasterOperationsOrder.import
|
|
1277
|
+
| EDBMasterOperationsOrder.global_search
|
|
1278
|
+
| EDBMasterOperationsOrder.column_selector
|
|
1279
|
+
| EDBMasterOperationsOrder.theme_selector)[];
|
|
1280
|
+
|
|
1281
|
+
customActionButtons?: IDBMasterTopLevelCustomActionButton[];
|
|
1282
|
+
|
|
1283
|
+
importData?: IDBMasterImportData;
|
|
1284
|
+
|
|
1285
|
+
exportData?: {
|
|
1286
|
+
showExportButton?: boolean;
|
|
1287
|
+
|
|
1288
|
+
/** Default : pi pi-download */
|
|
1289
|
+
icon?: string;
|
|
1290
|
+
|
|
1291
|
+
csv?: {
|
|
1292
|
+
enable: boolean;
|
|
1293
|
+
|
|
1294
|
+
/** Default : CSV */
|
|
1295
|
+
labelCSV: string;
|
|
1296
|
+
|
|
1297
|
+
/** Default : CSV Selected */
|
|
1298
|
+
labelCSVSelected: string;
|
|
1299
|
+
}
|
|
1300
|
+
// pdf?: boolean;
|
|
1301
|
+
}
|
|
1252
1302
|
};
|
|
1253
1303
|
externalLibs?: {
|
|
1254
1304
|
css?: string[],
|
|
@@ -1261,13 +1311,16 @@ export interface IDBMasterConfig {
|
|
|
1261
1311
|
jsCode?: {
|
|
1262
1312
|
|
|
1263
1313
|
/**
|
|
1264
|
-
* oncePageLoad = Code will be run only once on page load.
|
|
1265
|
-
*
|
|
1266
|
-
*
|
|
1267
|
-
*
|
|
1314
|
+
* oncePageLoad = Code will be run only once on page load. config and global data are not available. It will append script to page script tag. <br/>
|
|
1315
|
+
* oncePageLoadWithContext = Code will be run only once on page load with context of data. (config, globalData: any, utils: any, queryParams: any) <br/>
|
|
1316
|
+
* gridRender = Gets executed everytime grid gets data. (gridEvent, gridData, globalData: any, utils: any, queryParams: any) <br/>
|
|
1317
|
+
* modifyGridRequest = You can modify api call request. (gridEvent, reqBody: IQueryFormat, globalData: any, utils: any, queryParams: any) <br/>
|
|
1318
|
+
* preSaveAndEdit = Change data before saving/update/import. (reqBody: any | any[], globalData: any, utils: any, queryParams: any, mode: 'save' | 'edit' | 'import') <br/>
|
|
1319
|
+
* beforeSaveModalOpen = Change data before save modal open. (formData: any , globalData: any, utils: any, queryParams: any) <br/>
|
|
1320
|
+
* beforeEditModalOpen = Change data before edit modal open. (formData: any , globalData: any, utils: any, queryParams: any) <br/>
|
|
1268
1321
|
*
|
|
1269
1322
|
*/
|
|
1270
|
-
appendTo:
|
|
1323
|
+
appendTo: EDBMasterConfigAppendTo,
|
|
1271
1324
|
/**
|
|
1272
1325
|
* // gridEvent, gridData are available to use.
|
|
1273
1326
|
*
|
|
@@ -1290,25 +1343,42 @@ export interface IDBMasterConfig {
|
|
|
1290
1343
|
grid?: {
|
|
1291
1344
|
header?: string;
|
|
1292
1345
|
|
|
1346
|
+
/** ex: Showing {first} to {last} of {totalRecords} entries */
|
|
1347
|
+
currentPageReportTemplate?: string;
|
|
1348
|
+
|
|
1293
1349
|
/** Default : false */
|
|
1294
1350
|
showColumnSelector?: boolean;
|
|
1295
1351
|
|
|
1296
1352
|
/** Default : 50rem */
|
|
1297
1353
|
minWidth?: string;
|
|
1298
1354
|
|
|
1355
|
+
/** Default : 40rem */
|
|
1356
|
+
breakpoint?: string;
|
|
1357
|
+
|
|
1299
1358
|
/** Used for nested grid only. From this field it will pickup data array and show grid based on that */
|
|
1300
1359
|
dataFieldPath?: string;
|
|
1301
1360
|
|
|
1302
1361
|
operations?: {
|
|
1303
|
-
delete?: Omit<IDBMasterConfigOperation, 'label'
|
|
1304
|
-
edit?: Omit<IDBMasterConfigOperation, 'label'
|
|
1362
|
+
delete?: Omit<IDBMasterConfigOperation, 'label'> & { apiCallOverridesDeleteMany?: IDBMasterAPICallOverrides; };
|
|
1363
|
+
edit?: Omit<IDBMasterConfigOperation, 'label'> & { apiCallOverridesGetById?: IDBMasterAPICallOverrides; };
|
|
1305
1364
|
|
|
1306
1365
|
hideDeleteConfirmation?: boolean;
|
|
1307
1366
|
hideEditConfirmation?: boolean;
|
|
1367
|
+
/** Default : false, if true, it will not show success message when delete multiple is used. You need to provide that message manually. */
|
|
1368
|
+
hideDeleteManySuccessMessage?: boolean;
|
|
1369
|
+
|
|
1370
|
+
disableDoubleClickForEdit?: boolean;
|
|
1371
|
+
disableDeleteButtonClickForDelete?: boolean;
|
|
1372
|
+
|
|
1373
|
+
/** Only 3 */
|
|
1374
|
+
gridOperationsOrder?: (EDBMasterGridOperationsOrder.delete | EDBMasterGridOperationsOrder.edit | EDBMasterGridOperationsOrder.custom)[];
|
|
1308
1375
|
|
|
1309
|
-
|
|
1376
|
+
/** Only 3 */
|
|
1377
|
+
gridColumnsOrder?: (EDBMasterGridColumnsOrder.checkbox | EDBMasterGridColumnsOrder.actions | EDBMasterGridColumnsOrder.dbFields)[];
|
|
1310
1378
|
|
|
1311
1379
|
actionColumnWidth?: string;
|
|
1380
|
+
|
|
1381
|
+
customActionButtons?: IDBMasterCustomActionButton[];
|
|
1312
1382
|
};
|
|
1313
1383
|
|
|
1314
1384
|
/**
|
|
@@ -1355,7 +1425,30 @@ export interface IDBMasterConfig {
|
|
|
1355
1425
|
rowsPerPageOptions?: number[];
|
|
1356
1426
|
}
|
|
1357
1427
|
|
|
1428
|
+
grouping?: {
|
|
1429
|
+
// rowGroupMode: 'subheader'; // default : subheader. rowspan = is not supported.
|
|
1430
|
+
|
|
1431
|
+
/** group by column name */
|
|
1432
|
+
groupRowsBy: string;
|
|
1433
|
+
|
|
1434
|
+
/** Give style object in angular style. */
|
|
1435
|
+
headerStyle?: any;
|
|
1436
|
+
|
|
1437
|
+
/** You can provide single or multiple classes. */
|
|
1438
|
+
headerCssClass?: string,
|
|
1439
|
+
|
|
1440
|
+
/** Give style object in angular style. */
|
|
1441
|
+
footerStyle?: any;
|
|
1442
|
+
|
|
1443
|
+
/** You can provide single or multiple classes. */
|
|
1444
|
+
footerCssClass?: string,
|
|
1445
|
+
|
|
1446
|
+
/** Group footer will be generated from this property of object. */
|
|
1447
|
+
footerColumnPath?: string,
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1358
1450
|
selection?: {
|
|
1451
|
+
/** Default grid selection mode is multiple */
|
|
1359
1452
|
mode: 'single' | 'multiple';
|
|
1360
1453
|
|
|
1361
1454
|
/** name of primary key field. Default : it will be automatically pickup from schema. */
|
|
@@ -1383,19 +1476,141 @@ export interface IDBMasterConfig {
|
|
|
1383
1476
|
/** Default : false, if true it will show filter for each column */
|
|
1384
1477
|
rowFilter?: boolean;
|
|
1385
1478
|
}
|
|
1479
|
+
|
|
1480
|
+
apiCallOverrides?: IDBMasterAPICallOverrides;
|
|
1386
1481
|
};
|
|
1387
1482
|
form?: {
|
|
1483
|
+
/** add custom css class to form dialog. */
|
|
1484
|
+
cssClass?: string,
|
|
1485
|
+
|
|
1486
|
+
/** Give style object in angular style to form dialog. */
|
|
1487
|
+
style?: any;
|
|
1488
|
+
|
|
1489
|
+
/** only applicable for top level form modal. */
|
|
1490
|
+
draggable?: boolean;
|
|
1491
|
+
|
|
1388
1492
|
/** Ex : 90vw */
|
|
1389
1493
|
width?: string;
|
|
1390
1494
|
|
|
1495
|
+
/** Default : true,
|
|
1496
|
+
* If multiple is coming from API which is not mapped to any field, it will show in table.
|
|
1497
|
+
* In case of only one error, it will show in notification.
|
|
1498
|
+
* If false, it will not show table and show first error in notification.
|
|
1499
|
+
* */
|
|
1500
|
+
showOtherFieldErrors?: boolean;
|
|
1501
|
+
|
|
1391
1502
|
/** If it is empty, and operation.add is true, then it will generate form based on schema with all fields. */
|
|
1392
1503
|
fields?: IDBMasterConfigFormField[][];
|
|
1393
1504
|
};
|
|
1394
1505
|
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
export enum EDBMasterOperationsOrder {
|
|
1509
|
+
custom_actions = 'custom_actions',
|
|
1510
|
+
delete_all = 'delete_all',
|
|
1511
|
+
add = 'add',
|
|
1512
|
+
refresh = 'refresh',
|
|
1513
|
+
export = 'export',
|
|
1514
|
+
import = 'import',
|
|
1515
|
+
global_search = 'global_search',
|
|
1516
|
+
column_selector = 'column_selector',
|
|
1517
|
+
theme_selector = 'theme_selector',
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
export enum EDBMasterGridOperationsOrder {
|
|
1521
|
+
delete = 'delete',
|
|
1522
|
+
edit = 'edit',
|
|
1523
|
+
custom = 'custom',
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
export enum EDBMasterGridColumnsOrder {
|
|
1527
|
+
checkbox = 'checkbox',
|
|
1528
|
+
actions = 'actions',
|
|
1529
|
+
dbFields = 'dbFields',
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
export interface IDBMasterImportData {
|
|
1533
|
+
enable: boolean;
|
|
1534
|
+
|
|
1535
|
+
/** Default : pi pi-file-import */
|
|
1536
|
+
icon?: string;
|
|
1537
|
+
|
|
1538
|
+
/** width of grid. */
|
|
1539
|
+
gridWidth?: string;
|
|
1540
|
+
|
|
1541
|
+
fieldMappings: IDBMasterImportGridColumn[];
|
|
1542
|
+
|
|
1543
|
+
/** By default it can use save API. */
|
|
1544
|
+
apiCallOverrides?: IDBMasterAPICallOverrides;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
export interface IDBMasterImportGridColumn {
|
|
1548
|
+
header: string;
|
|
1549
|
+
|
|
1550
|
+
/** CSV field map */
|
|
1551
|
+
sourceField: string;
|
|
1552
|
+
|
|
1553
|
+
/** It will be database field, csv data will be stored into this field after conversion. */
|
|
1554
|
+
targetField: string;
|
|
1555
|
+
|
|
1556
|
+
/** CSV data will be converted to this type. */
|
|
1557
|
+
convertTargetFieldToType: EType;
|
|
1558
|
+
|
|
1559
|
+
/** Default: ISO date format, date-fns format, Dates from CSV will be parsed using this format. */
|
|
1560
|
+
dateParseFormat?: string;
|
|
1561
|
+
|
|
1562
|
+
/** Dates will be converted into this timezone before sending to database query. */
|
|
1563
|
+
dateTimeZone?: string;
|
|
1564
|
+
|
|
1565
|
+
/** Dates will be converted to this format to display in UI.<br/> */
|
|
1566
|
+
dateFormatUIDisplay?: string;
|
|
1567
|
+
|
|
1568
|
+
/** Dates will be converted to this format to display in UI.<br/> */
|
|
1569
|
+
dateTimeZoneUIDisplay?: string;
|
|
1570
|
+
|
|
1571
|
+
// calculated property
|
|
1572
|
+
filterType?: EDBMasterConfigFilterType;
|
|
1573
|
+
|
|
1574
|
+
/** width of grid column */
|
|
1575
|
+
width?: string;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
export interface IDBMasterCustomActionButton {
|
|
1579
|
+
/** So parent can identify which custom action button clicked. */
|
|
1580
|
+
actionName: string;
|
|
1581
|
+
|
|
1582
|
+
/** ex : pi pi-check. https://primeng.org/icons */
|
|
1583
|
+
cssClass: string,
|
|
1584
|
+
|
|
1585
|
+
/** Give style object in angular style. */
|
|
1586
|
+
style?: any;
|
|
1587
|
+
|
|
1588
|
+
/**
|
|
1589
|
+
* If provided, it will ask for confirmation with this message.<br/>
|
|
1590
|
+
* Below variables are available<br/>
|
|
1591
|
+
* rowData = entire row object.<br/>
|
|
1592
|
+
* message = Assign your custom confirmation message to this variable.<br/>
|
|
1593
|
+
* ex: confirmationMessageScript: "message = `Do you want to approve ${rowData.name}?`",
|
|
1594
|
+
*
|
|
1595
|
+
* */
|
|
1596
|
+
confirmationMessageScript?: string;
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
export interface IDBMasterTopLevelCustomActionButton extends Omit<IDBMasterCustomActionButton, 'cssClass'> {
|
|
1600
|
+
/** custom CSS class to assign to button */
|
|
1601
|
+
cssClass?: string,
|
|
1602
|
+
|
|
1603
|
+
/** Give label to button */
|
|
1604
|
+
label?: string;
|
|
1605
|
+
|
|
1606
|
+
/** Default: info */
|
|
1607
|
+
severity?: 'contrast' | 'danger' | 'help' | 'info' | 'primary' | 'secondary' | 'success' | 'warning';
|
|
1608
|
+
|
|
1609
|
+
/** ex : pi pi-check https://primeng.org/icons */
|
|
1610
|
+
icon?: string;
|
|
1611
|
+
|
|
1612
|
+
/** Default: true, if false it will be enabled even if no row selected in grid. */
|
|
1613
|
+
isDependentOnGridSelection?: boolean;
|
|
1399
1614
|
}
|
|
1400
1615
|
|
|
1401
1616
|
export interface IDBMasterConfigGridFilterOfField {
|
|
@@ -1408,7 +1623,50 @@ export interface IDBMasterConfigOperation {
|
|
|
1408
1623
|
|
|
1409
1624
|
/** Applicable for add button only. */
|
|
1410
1625
|
label?: string;
|
|
1626
|
+
/** Applicable for add button only. */
|
|
1411
1627
|
cssClass?: string;
|
|
1628
|
+
|
|
1629
|
+
apiCallOverrides?: IDBMasterAPICallOverrides;
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
export interface IDBMasterAPICallOverrides {
|
|
1633
|
+
url: string;
|
|
1634
|
+
headers?: any;
|
|
1635
|
+
method?: 'POST';
|
|
1636
|
+
body?: any;
|
|
1637
|
+
|
|
1638
|
+
/** Primary key field name for current table. _id for mongodb. */
|
|
1639
|
+
pkField?: string;
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* Below variables are available,
|
|
1643
|
+
* config: IDBMasterConfig,<br/>
|
|
1644
|
+
* formData: any, Not available in case of grid.<br/>
|
|
1645
|
+
* allDropdownDataMap: { [path: string]: any[] }, Not available in case of grid.<br/>
|
|
1646
|
+
* apiResponse: any,<br/>
|
|
1647
|
+
* globalData: any,<br/>
|
|
1648
|
+
* headers: any,<br/>
|
|
1649
|
+
* reqBody: any,<br/>
|
|
1650
|
+
* utils: any,<br/>
|
|
1651
|
+
* queryParams: any,<br/>
|
|
1652
|
+
* mode: any | null,<br/>
|
|
1653
|
+
* */
|
|
1654
|
+
codeBeforeAPICall?: string;
|
|
1655
|
+
|
|
1656
|
+
/**
|
|
1657
|
+
* Below variables are available,
|
|
1658
|
+
* config: IDBMasterConfig,<br/>
|
|
1659
|
+
* formData: any, Not available in case of grid.<br/>
|
|
1660
|
+
* allDropdownDataMap: { [path: string]: any[] }, Not available in case of grid.<br/>
|
|
1661
|
+
* apiResponse: any,<br/>
|
|
1662
|
+
* globalData: any,<br/>
|
|
1663
|
+
* headers: any,<br/>
|
|
1664
|
+
* reqBody: any,<br/>
|
|
1665
|
+
* utils: any,<br/>
|
|
1666
|
+
* queryParams: any,<br/>
|
|
1667
|
+
* mode: any | null,<br/>
|
|
1668
|
+
* */
|
|
1669
|
+
codeAfterAPICall?: string;
|
|
1412
1670
|
}
|
|
1413
1671
|
|
|
1414
1672
|
export enum EDBMasterMatchMode {
|
|
@@ -1431,14 +1689,22 @@ export enum EDBMasterMatchMode {
|
|
|
1431
1689
|
}
|
|
1432
1690
|
|
|
1433
1691
|
export interface IDBMasterConfigGridField {
|
|
1692
|
+
/** It will be picked up automatically from schema, but if not provided in schema, you can define at this place. */
|
|
1693
|
+
type?: EType;
|
|
1694
|
+
|
|
1695
|
+
/** Grid header */
|
|
1434
1696
|
header: string;
|
|
1697
|
+
|
|
1435
1698
|
/** Database field name or path for nested objects. */
|
|
1436
1699
|
path?: string; // nested fields like 'country.name' is supported by primeNG grid
|
|
1437
1700
|
|
|
1701
|
+
/** If displayField provided, it will display from this field otherwise it will display value of path field. */
|
|
1702
|
+
displayField?: string;
|
|
1703
|
+
|
|
1438
1704
|
/** Default false, it will format dates in 'dd-MM-yyyy hh:mm:ss a' automatically if 'dateTimeFormat' is not provided. */
|
|
1439
1705
|
autoFormatDate?: boolean;
|
|
1440
1706
|
|
|
1441
|
-
/**
|
|
1707
|
+
/** Dates will be converted into this timezone before sending to database query. */
|
|
1442
1708
|
dateTimeZone?: string;
|
|
1443
1709
|
|
|
1444
1710
|
/** Default : 'dd-MM-yyyy hh:mm:ss a' . System is using date-fns formats to format date object. */
|
|
@@ -1446,11 +1712,40 @@ export interface IDBMasterConfigGridField {
|
|
|
1446
1712
|
|
|
1447
1713
|
/** Default : false, if true sorting will be enabled for this field. */
|
|
1448
1714
|
enableSorting?: boolean;
|
|
1715
|
+
|
|
1716
|
+
dataSource?: 'db_data';
|
|
1717
|
+
dbData?: {
|
|
1718
|
+
instance?: string;
|
|
1719
|
+
database?: string;
|
|
1720
|
+
collection?: string;
|
|
1721
|
+
pkField?: string;
|
|
1722
|
+
displayField: string;
|
|
1723
|
+
|
|
1724
|
+
/** if select is provided, it will get those data. Make sure displayField is included in it. */
|
|
1725
|
+
select?: any;
|
|
1726
|
+
};
|
|
1727
|
+
|
|
1728
|
+
/** ex: 200px */
|
|
1729
|
+
width?: string;
|
|
1730
|
+
|
|
1731
|
+
/** Give style object in angular style. */
|
|
1732
|
+
headerStyle?: any;
|
|
1733
|
+
|
|
1734
|
+
/** custom CSS class to assign */
|
|
1735
|
+
headerCssClass?: string,
|
|
1736
|
+
|
|
1737
|
+
/** Give style object in angular style. */
|
|
1738
|
+
dataCellStyle?: any;
|
|
1739
|
+
|
|
1740
|
+
/** custom CSS class to assign */
|
|
1741
|
+
dataCellCssClass?: string,
|
|
1742
|
+
|
|
1743
|
+
/** Set column visibility in grid and in export. */
|
|
1744
|
+
visibilityStatus?: EDBMasterConfigGridColumnVisibilityStatus;
|
|
1449
1745
|
}
|
|
1450
1746
|
|
|
1451
1747
|
/** For internal use only. */
|
|
1452
1748
|
export interface IDBMasterConfigGridFieldExport extends IDBMasterConfigGridField {
|
|
1453
|
-
type: EType;
|
|
1454
1749
|
|
|
1455
1750
|
/** PrimeNG needs it for export purpose from grid. It should be present in [columns] */
|
|
1456
1751
|
field?: string;
|
|
@@ -1466,67 +1761,198 @@ export enum EDBMasterConfigFilterType {
|
|
|
1466
1761
|
date = 'date',
|
|
1467
1762
|
}
|
|
1468
1763
|
|
|
1764
|
+
export enum EDBMasterConfigGridColumnVisibilityStatus {
|
|
1765
|
+
/** Default and column is visible in grid. */
|
|
1766
|
+
VISIBLE = 'VISIBLE',
|
|
1767
|
+
|
|
1768
|
+
/** Column is present in grid but hidden by default. Need to select in column selector dropdown. */
|
|
1769
|
+
INVISIBLE = 'INVISIBLE',
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
// genericConfig : start
|
|
1469
1773
|
export interface IDBMasterConfigFormField {
|
|
1470
|
-
|
|
1471
|
-
|
|
1774
|
+
/** It is used to find element. */
|
|
1775
|
+
hiddenId?: string;
|
|
1776
|
+
label?: string;
|
|
1777
|
+
|
|
1778
|
+
/** This text will be displayed under control in small. HTML supported. */
|
|
1779
|
+
helpText?: string;
|
|
1780
|
+
|
|
1781
|
+
path?: string;
|
|
1472
1782
|
control: EDBMasterFormControl;
|
|
1473
1783
|
|
|
1474
|
-
|
|
1784
|
+
/** if true, that control will take focus automatically. */
|
|
1785
|
+
autofocus?: boolean;
|
|
1786
|
+
|
|
1787
|
+
disabled?: boolean;
|
|
1788
|
+
|
|
1789
|
+
validations?: Pick<IPropertyValidation, 'required'>;
|
|
1790
|
+
validationErrors?: {
|
|
1791
|
+
required?: string;
|
|
1792
|
+
};
|
|
1793
|
+
// genericConfig : end
|
|
1794
|
+
|
|
1795
|
+
// gridSettings : start
|
|
1796
|
+
gridSettings?: IDBMasterConfig;
|
|
1797
|
+
// gridSettings : end
|
|
1475
1798
|
|
|
1799
|
+
// textAreaSettings : start
|
|
1476
1800
|
textAreaSettings?: {
|
|
1801
|
+
/** Give style object in angular style. */
|
|
1802
|
+
style?: any;
|
|
1803
|
+
|
|
1804
|
+
placeholder?: string;
|
|
1477
1805
|
rows?: number;
|
|
1478
1806
|
autoResize?: boolean;
|
|
1479
|
-
}
|
|
1480
1807
|
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
showTime?: boolean;
|
|
1484
|
-
/** Default : 24 */
|
|
1485
|
-
hourFormat?: '12' | '24';
|
|
1486
|
-
dateTimeFormat?: string;
|
|
1808
|
+
/** Maximum number of character allows in the input field. */
|
|
1809
|
+
maxLength?: number;
|
|
1487
1810
|
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1811
|
+
jsCode?: {
|
|
1812
|
+
/**
|
|
1813
|
+
* Available variables:<br/>
|
|
1814
|
+
* formData: any = Entire form object<br/>
|
|
1815
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
1816
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
1817
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
1818
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
1819
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
1820
|
+
* config: IDBMasterConfigFormField <br/>
|
|
1821
|
+
* event: any <br/>
|
|
1822
|
+
*/
|
|
1823
|
+
appendTo: EDBMasterTextAreaAppendTo,
|
|
1824
|
+
/**
|
|
1825
|
+
* // dropdownData is available to use.
|
|
1826
|
+
*
|
|
1827
|
+
* // Return promise for long awaiting tasks.
|
|
1828
|
+
* new Promise(async (resolve, reject) => {
|
|
1829
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
1830
|
+
* dropdownData[0].name = 'Sample data';
|
|
1831
|
+
* resolve();
|
|
1832
|
+
* });
|
|
1833
|
+
*
|
|
1834
|
+
* // Directly modify data of grid
|
|
1835
|
+
* dropdownData[0].name = 'Sample data';
|
|
1836
|
+
*
|
|
1837
|
+
* // Return function
|
|
1838
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
1839
|
+
*
|
|
1840
|
+
*/
|
|
1841
|
+
code: string,
|
|
1842
|
+
}[],
|
|
1493
1843
|
};
|
|
1844
|
+
// textAreaSettings : end
|
|
1494
1845
|
|
|
1495
|
-
|
|
1496
|
-
|
|
1846
|
+
// inputTextSettings : start
|
|
1847
|
+
inputTextSettings?: {
|
|
1848
|
+
/** Give style object in angular style. */
|
|
1849
|
+
style?: any;
|
|
1850
|
+
|
|
1851
|
+
placeholder?: string;
|
|
1852
|
+
|
|
1853
|
+
/** Default is off */
|
|
1854
|
+
autocomplete?: 'on' | 'off' | undefined;
|
|
1855
|
+
|
|
1856
|
+
/** Default is false */
|
|
1857
|
+
spellcheck?: 'true' | 'false' | undefined;
|
|
1858
|
+
|
|
1859
|
+
/** Maximum number of character allows in the input field. */
|
|
1860
|
+
maxLength?: number;
|
|
1861
|
+
|
|
1862
|
+
/** Minimum number of character allows in the input field. */
|
|
1863
|
+
minLength?: number;
|
|
1864
|
+
|
|
1865
|
+
jsCode?: {
|
|
1866
|
+
/**
|
|
1867
|
+
* Available variables:<br/>
|
|
1868
|
+
* formData: any = Entire form object<br/>
|
|
1869
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
1870
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
1871
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
1872
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
1873
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
1874
|
+
* config: IDBMasterConfigFormField <br/>
|
|
1875
|
+
* event: any <br/>
|
|
1876
|
+
*/
|
|
1877
|
+
appendTo: EDBMasterInputTextAppendTo,
|
|
1878
|
+
/**
|
|
1879
|
+
* // dropdownData is available to use.
|
|
1880
|
+
*
|
|
1881
|
+
* // Return promise for long awaiting tasks.
|
|
1882
|
+
* new Promise(async (resolve, reject) => {
|
|
1883
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
1884
|
+
* dropdownData[0].name = 'Sample data';
|
|
1885
|
+
* resolve();
|
|
1886
|
+
* });
|
|
1887
|
+
*
|
|
1888
|
+
* // Directly modify data of grid
|
|
1889
|
+
* dropdownData[0].name = 'Sample data';
|
|
1890
|
+
*
|
|
1891
|
+
* // Return function
|
|
1892
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
1893
|
+
*
|
|
1894
|
+
*/
|
|
1895
|
+
code: string,
|
|
1896
|
+
}[],
|
|
1897
|
+
|
|
1898
|
+
validationErrors?: {
|
|
1899
|
+
minLength?: string;
|
|
1900
|
+
};
|
|
1497
1901
|
};
|
|
1902
|
+
// inputTextSettings : end
|
|
1498
1903
|
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1904
|
+
// inputNumberSettings : start
|
|
1905
|
+
/** Doc : https://primeng.org/inputnumber */
|
|
1906
|
+
inputNumberSettings?: {
|
|
1907
|
+
/** Give style object in angular style. */
|
|
1908
|
+
style?: any;
|
|
1502
1909
|
|
|
1503
|
-
/**
|
|
1504
|
-
|
|
1910
|
+
/** custom CSS class to assign to control */
|
|
1911
|
+
cssClass?: string,
|
|
1505
1912
|
|
|
1506
|
-
|
|
1507
|
-
|
|
1913
|
+
placeholder?: string;
|
|
1914
|
+
min?: number;
|
|
1915
|
+
max?: number;
|
|
1916
|
+
minFractionDigits?: number;
|
|
1917
|
+
mode?: 'decimal' | 'currency' | '';
|
|
1508
1918
|
|
|
1509
|
-
/**
|
|
1510
|
-
|
|
1919
|
+
/** The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB. There is no default value; if the style is "currency", the currency property must be provided. */
|
|
1920
|
+
currency?: string;
|
|
1511
1921
|
|
|
1512
|
-
/** Default :
|
|
1513
|
-
|
|
1922
|
+
/** Default : 'en-US' */
|
|
1923
|
+
locale?: string;
|
|
1924
|
+
prefix?: string;
|
|
1925
|
+
suffix?: string;
|
|
1514
1926
|
|
|
1515
|
-
|
|
1927
|
+
// buttons
|
|
1928
|
+
showButtons?: boolean;
|
|
1516
1929
|
|
|
1517
|
-
/**
|
|
1518
|
-
|
|
1930
|
+
/** Default : stacked */
|
|
1931
|
+
buttonLayout?: 'stacked' | 'horizontal' | 'vertical';
|
|
1932
|
+
step?: number;
|
|
1519
1933
|
|
|
1520
|
-
|
|
1934
|
+
/** Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. */
|
|
1935
|
+
useGrouping?: boolean;
|
|
1521
1936
|
|
|
1522
|
-
/**
|
|
1523
|
-
|
|
1937
|
+
/** Maximum number of character allows in the input field. */
|
|
1938
|
+
maxLength?: number;
|
|
1524
1939
|
|
|
1525
|
-
/**
|
|
1526
|
-
|
|
1940
|
+
/** Minimum number of character allows in the input field. */
|
|
1941
|
+
minLength?: number;
|
|
1527
1942
|
|
|
1528
1943
|
jsCode?: {
|
|
1529
|
-
|
|
1944
|
+
/**
|
|
1945
|
+
* Available variables:<br/>
|
|
1946
|
+
* formData: any = Entire form object<br/>
|
|
1947
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
1948
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
1949
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
1950
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
1951
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
1952
|
+
* config: IDBMasterConfigFormField <br/>
|
|
1953
|
+
* event: any <br/>
|
|
1954
|
+
*/
|
|
1955
|
+
appendTo: EDBMasterInputNumberAppendTo,
|
|
1530
1956
|
/**
|
|
1531
1957
|
* // dropdownData is available to use.
|
|
1532
1958
|
*
|
|
@@ -1546,53 +1972,1098 @@ export interface IDBMasterConfigFormField {
|
|
|
1546
1972
|
*/
|
|
1547
1973
|
code: string,
|
|
1548
1974
|
}[],
|
|
1549
|
-
};
|
|
1550
1975
|
|
|
1551
|
-
|
|
1552
|
-
|
|
1976
|
+
validationErrors?: {
|
|
1977
|
+
minLength?: string;
|
|
1978
|
+
};
|
|
1553
1979
|
};
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1980
|
+
// inputNumberSettings : end
|
|
1981
|
+
|
|
1982
|
+
// inputMaskSettings : start
|
|
1983
|
+
inputMaskSettings?: {
|
|
1984
|
+
/** Give style object in angular style. */
|
|
1985
|
+
style?: any;
|
|
1986
|
+
|
|
1987
|
+
/** custom CSS class to assign to control */
|
|
1988
|
+
cssClass?: string,
|
|
1989
|
+
|
|
1990
|
+
/** Ex : mask="99-999999", mask="(999) 999-9999? x99999" <br/>
|
|
1991
|
+
* Mask format can be a combination of the following definitions; <br/>
|
|
1992
|
+
* a for alphabetic characters, <br/>
|
|
1993
|
+
* 9 for numeric characters and <br/>
|
|
1994
|
+
* * for alphanumeric characters. <br/>
|
|
1995
|
+
* In addition, formatting characters like ( , ) , - are also accepted. <br/>
|
|
1565
1996
|
*
|
|
1997
|
+
* ? is used to mark anything after the question mark optional. <br/>
|
|
1566
1998
|
* */
|
|
1567
|
-
|
|
1568
|
-
/** API URL which returns content of file in base64 format. */
|
|
1569
|
-
downloadApiUrl?: string;
|
|
1570
|
-
removeApiUrl?: string;
|
|
1999
|
+
mask?: string;
|
|
1571
2000
|
|
|
1572
|
-
/**
|
|
1573
|
-
|
|
2001
|
+
/** Advisory information to display on input. */
|
|
2002
|
+
placeholder?: string;
|
|
1574
2003
|
|
|
1575
|
-
/**
|
|
1576
|
-
|
|
2004
|
+
/** Ex : slotChar="mm/dd/yyyy" <br/>
|
|
2005
|
+
* Default placeholder for a mask is underscore that can be customized using slotChar property.
|
|
2006
|
+
* */
|
|
2007
|
+
slotChar?: string;
|
|
1577
2008
|
|
|
1578
|
-
/**
|
|
1579
|
-
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
2009
|
+
/** Default : true, Clears the incomplete value on blur. */
|
|
2010
|
+
autoClear?: boolean;
|
|
1582
2011
|
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
2012
|
+
/** Maximum number of character allows in the input field. */
|
|
2013
|
+
maxLength?: number;
|
|
2014
|
+
|
|
2015
|
+
jsCode?: {
|
|
2016
|
+
/**
|
|
2017
|
+
* Available variables:<br/>
|
|
2018
|
+
* formData: any = Entire form object<br/>
|
|
2019
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2020
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2021
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2022
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2023
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2024
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2025
|
+
* event: any <br/>
|
|
2026
|
+
*/
|
|
2027
|
+
appendTo: EDBMasterInputMaskAppendTo,
|
|
2028
|
+
/**
|
|
2029
|
+
* // dropdownData is available to use.
|
|
2030
|
+
*
|
|
2031
|
+
* // Return promise for long awaiting tasks.
|
|
2032
|
+
* new Promise(async (resolve, reject) => {
|
|
2033
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2034
|
+
* dropdownData[0].name = 'Sample data';
|
|
2035
|
+
* resolve();
|
|
2036
|
+
* });
|
|
2037
|
+
*
|
|
2038
|
+
* // Directly modify data of grid
|
|
2039
|
+
* dropdownData[0].name = 'Sample data';
|
|
2040
|
+
*
|
|
2041
|
+
* // Return function
|
|
2042
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2043
|
+
*
|
|
2044
|
+
*/
|
|
2045
|
+
code: string,
|
|
2046
|
+
}[],
|
|
2047
|
+
};
|
|
2048
|
+
// inputMaskSettings : end
|
|
2049
|
+
|
|
2050
|
+
// inputOtpSettings : start
|
|
2051
|
+
inputOtpSettings?: {
|
|
2052
|
+
/** Give style object in angular style. */
|
|
2053
|
+
style?: any;
|
|
2054
|
+
|
|
2055
|
+
/** Enable the mask option to hide the values in the input fields. */
|
|
2056
|
+
mask?: boolean;
|
|
2057
|
+
|
|
2058
|
+
/** When integerOnly is present, only integers can be accepted as input. */
|
|
2059
|
+
integerOnly?: boolean;
|
|
2060
|
+
|
|
2061
|
+
/** Default : 300px; */
|
|
2062
|
+
uiControlWidth?: string;
|
|
2063
|
+
|
|
2064
|
+
/** Number of characters to initiate. */
|
|
2065
|
+
length?: number;
|
|
2066
|
+
};
|
|
2067
|
+
// inputOtpSettings : end
|
|
2068
|
+
|
|
2069
|
+
// inputPasswordSettings : start
|
|
2070
|
+
inputPasswordSettings?: {
|
|
2071
|
+
/** Give style object in angular style. */
|
|
2072
|
+
style?: any;
|
|
2073
|
+
|
|
2074
|
+
/** custom CSS class to assign to control */
|
|
2075
|
+
cssClass?: string,
|
|
2076
|
+
|
|
2077
|
+
placeholder?: string;
|
|
2078
|
+
|
|
2079
|
+
/** Maximum number of character allows in the input field. */
|
|
2080
|
+
maxLength?: number;
|
|
2081
|
+
|
|
2082
|
+
jsCode?: {
|
|
2083
|
+
/**
|
|
2084
|
+
* Available variables:<br/>
|
|
2085
|
+
* formData: any = Entire form object<br/>
|
|
2086
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2087
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2088
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2089
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2090
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2091
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2092
|
+
* event: any <br/>
|
|
2093
|
+
*/
|
|
2094
|
+
appendTo: EDBMasterInputPasswordAppendTo,
|
|
2095
|
+
/**
|
|
2096
|
+
* // dropdownData is available to use.
|
|
2097
|
+
*
|
|
2098
|
+
* // Return promise for long awaiting tasks.
|
|
2099
|
+
* new Promise(async (resolve, reject) => {
|
|
2100
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2101
|
+
* dropdownData[0].name = 'Sample data';
|
|
2102
|
+
* resolve();
|
|
2103
|
+
* });
|
|
2104
|
+
*
|
|
2105
|
+
* // Directly modify data of grid
|
|
2106
|
+
* dropdownData[0].name = 'Sample data';
|
|
2107
|
+
*
|
|
2108
|
+
* // Return function
|
|
2109
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2110
|
+
*
|
|
2111
|
+
*/
|
|
2112
|
+
code: string,
|
|
2113
|
+
}[],
|
|
2114
|
+
};
|
|
2115
|
+
// inputPasswordSettings : end
|
|
2116
|
+
|
|
2117
|
+
// checkboxSettings : start
|
|
2118
|
+
checkboxSettings?: {
|
|
2119
|
+
jsCode?: {
|
|
2120
|
+
/**
|
|
2121
|
+
* Available variables:<br/>
|
|
2122
|
+
* formData: any = Entire form object<br/>
|
|
2123
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2124
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2125
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2126
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2127
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2128
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2129
|
+
* event: any <br/>
|
|
2130
|
+
*/
|
|
2131
|
+
appendTo: EDBMasterCheckboxAppendTo,
|
|
2132
|
+
/**
|
|
2133
|
+
* // dropdownData is available to use.
|
|
2134
|
+
*
|
|
2135
|
+
* // Return promise for long awaiting tasks.
|
|
2136
|
+
* new Promise(async (resolve, reject) => {
|
|
2137
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2138
|
+
* dropdownData[0].name = 'Sample data';
|
|
2139
|
+
* resolve();
|
|
2140
|
+
* });
|
|
2141
|
+
*
|
|
2142
|
+
* // Directly modify data of grid
|
|
2143
|
+
* dropdownData[0].name = 'Sample data';
|
|
2144
|
+
*
|
|
2145
|
+
* // Return function
|
|
2146
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2147
|
+
*
|
|
2148
|
+
*/
|
|
2149
|
+
code: string,
|
|
2150
|
+
}[],
|
|
2151
|
+
};
|
|
2152
|
+
// checkboxSettings : end
|
|
2153
|
+
|
|
2154
|
+
// radioSettings : start
|
|
2155
|
+
radioSettings?: {
|
|
2156
|
+
displayType?: 'inline' | 'new_line';
|
|
2157
|
+
displayInCenter?: boolean;
|
|
2158
|
+
options: { label: string; value: any }[];
|
|
2159
|
+
|
|
2160
|
+
jsCode?: {
|
|
2161
|
+
/**
|
|
2162
|
+
* Available variables:<br/>
|
|
2163
|
+
* formData: any = Entire form object<br/>
|
|
2164
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2165
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2166
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2167
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2168
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2169
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2170
|
+
* event: any <br/>
|
|
2171
|
+
*/
|
|
2172
|
+
appendTo: EDBMasterRadioAppendTo,
|
|
2173
|
+
/**
|
|
2174
|
+
* // dropdownData is available to use.
|
|
2175
|
+
*
|
|
2176
|
+
* // Return promise for long awaiting tasks.
|
|
2177
|
+
* new Promise(async (resolve, reject) => {
|
|
2178
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2179
|
+
* dropdownData[0].name = 'Sample data';
|
|
2180
|
+
* resolve();
|
|
2181
|
+
* });
|
|
2182
|
+
*
|
|
2183
|
+
* // Directly modify data of grid
|
|
2184
|
+
* dropdownData[0].name = 'Sample data';
|
|
2185
|
+
*
|
|
2186
|
+
* // Return function
|
|
2187
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2188
|
+
*
|
|
2189
|
+
*/
|
|
2190
|
+
code: string,
|
|
2191
|
+
}[],
|
|
2192
|
+
};
|
|
2193
|
+
// radioSettings : end
|
|
2194
|
+
|
|
2195
|
+
// datePickerSettings : start
|
|
2196
|
+
/** It's value will be Date object. */
|
|
2197
|
+
datePickerSettings?: {
|
|
2198
|
+
/** Give style object in angular style. */
|
|
2199
|
+
style?: any;
|
|
2200
|
+
|
|
2201
|
+
/** custom CSS class to assign to control */
|
|
2202
|
+
cssClass?: string,
|
|
2203
|
+
|
|
2204
|
+
placeholder?: string;
|
|
2205
|
+
showSeconds?: boolean;
|
|
2206
|
+
showTime?: boolean;
|
|
2207
|
+
|
|
2208
|
+
/** Default : 24 */
|
|
2209
|
+
hourFormat?: '12' | '24';
|
|
2210
|
+
|
|
2211
|
+
/** ex: dd-MM-yyyy hh:mm:ss a */
|
|
2212
|
+
dateTimeFormat?: string;
|
|
2213
|
+
|
|
2214
|
+
/** Whether to display timepicker only. Use hourFormat 12 to display AM/PM in UI. */
|
|
2215
|
+
timeOnly?: boolean;
|
|
2216
|
+
|
|
2217
|
+
/** The minimum selectable date. */
|
|
2218
|
+
minDate?: Date;
|
|
2219
|
+
|
|
2220
|
+
/** The maximum selectable date. */
|
|
2221
|
+
maxDate?: Date;
|
|
2222
|
+
|
|
2223
|
+
/**
|
|
2224
|
+
* Default : date
|
|
2225
|
+
* Update dateTimeFormat for 'month'(MM-yyyy) & 'year'(yyyy) values.
|
|
2226
|
+
*/
|
|
2227
|
+
view?: 'date' | 'month' | 'year';
|
|
2228
|
+
|
|
2229
|
+
jsCode?: {
|
|
2230
|
+
/**
|
|
2231
|
+
* Available variables:<br/>
|
|
2232
|
+
* formData: any = Entire form object<br/>
|
|
2233
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2234
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2235
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2236
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2237
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2238
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2239
|
+
* event: any <br/>
|
|
2240
|
+
*/
|
|
2241
|
+
appendTo: EDBMasterDatePickerAppendTo,
|
|
2242
|
+
/**
|
|
2243
|
+
* // dropdownData is available to use.
|
|
2244
|
+
*
|
|
2245
|
+
* // Return promise for long awaiting tasks.
|
|
2246
|
+
* new Promise(async (resolve, reject) => {
|
|
2247
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2248
|
+
* dropdownData[0].name = 'Sample data';
|
|
2249
|
+
* resolve();
|
|
2250
|
+
* });
|
|
2251
|
+
*
|
|
2252
|
+
* // Directly modify data of grid
|
|
2253
|
+
* dropdownData[0].name = 'Sample data';
|
|
2254
|
+
*
|
|
2255
|
+
* // Return function
|
|
2256
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2257
|
+
*
|
|
2258
|
+
*/
|
|
2259
|
+
code: string,
|
|
2260
|
+
}[],
|
|
2261
|
+
};
|
|
2262
|
+
// datePickerSettings : end
|
|
2263
|
+
|
|
2264
|
+
// colorPickerSettings : start
|
|
2265
|
+
colorPickerSettings?: {
|
|
2266
|
+
/** Give style object in angular style. */
|
|
2267
|
+
style?: any;
|
|
2268
|
+
|
|
2269
|
+
/** custom CSS class to assign to control */
|
|
2270
|
+
cssClass?: string,
|
|
2271
|
+
|
|
2272
|
+
format?: 'hex' | 'rgb' | 'hsb';
|
|
2273
|
+
|
|
2274
|
+
jsCode?: {
|
|
2275
|
+
/**
|
|
2276
|
+
* Available variables:<br/>
|
|
2277
|
+
* formData: any = Entire form object<br/>
|
|
2278
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2279
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2280
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2281
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2282
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2283
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2284
|
+
* event: any <br/>
|
|
2285
|
+
*/
|
|
2286
|
+
appendTo: EDBMasterColorPickerAppendTo,
|
|
2287
|
+
/**
|
|
2288
|
+
* // dropdownData is available to use.
|
|
2289
|
+
*
|
|
2290
|
+
* // Return promise for long awaiting tasks.
|
|
2291
|
+
* new Promise(async (resolve, reject) => {
|
|
2292
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2293
|
+
* dropdownData[0].name = 'Sample data';
|
|
2294
|
+
* resolve();
|
|
2295
|
+
* });
|
|
2296
|
+
*
|
|
2297
|
+
* // Directly modify data of grid
|
|
2298
|
+
* dropdownData[0].name = 'Sample data';
|
|
2299
|
+
*
|
|
2300
|
+
* // Return function
|
|
2301
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2302
|
+
*
|
|
2303
|
+
*/
|
|
2304
|
+
code: string,
|
|
2305
|
+
}[],
|
|
2306
|
+
};
|
|
2307
|
+
// colorPickerSettings : end
|
|
2308
|
+
|
|
2309
|
+
// dropdownSettings : start
|
|
2310
|
+
dropdownSettings?: {
|
|
2311
|
+
/** Give style object in angular style. */
|
|
2312
|
+
style?: any;
|
|
2313
|
+
|
|
2314
|
+
/** custom CSS class to assign to control */
|
|
2315
|
+
cssClass?: string,
|
|
2316
|
+
|
|
2317
|
+
placeholder?: string;
|
|
2318
|
+
showClear?: boolean;
|
|
2319
|
+
dataSource: 'static_data' | 'db_data' | 'api_call'; // custom_code = We can call any API in that.
|
|
2320
|
+
|
|
2321
|
+
/** it will use used when dataSource is 'static_data'. */
|
|
2322
|
+
staticData?: any[]; // { label: string; value: any; }[] works default.
|
|
2323
|
+
|
|
2324
|
+
/**
|
|
2325
|
+
* it can pickup IDB values from schema also.
|
|
2326
|
+
*/
|
|
2327
|
+
dbData?: Partial<Pick<ICollectionIdentity, 'instance' | 'database' | 'collection' | 'table'>
|
|
2328
|
+
& Pick<IQueryFormat, 'find' | 'select' | 'limit' | 'deep' | 'sort'>>;
|
|
2329
|
+
|
|
2330
|
+
/** Default : label */
|
|
2331
|
+
optionLabel?: string;
|
|
2332
|
+
|
|
2333
|
+
/** Default : value */
|
|
2334
|
+
optionValue?: string;
|
|
2335
|
+
|
|
2336
|
+
filter?: boolean;
|
|
2337
|
+
|
|
2338
|
+
/** one field or multiple comma separated fields are supported without any space in between. */
|
|
2339
|
+
filterBy?: string;
|
|
2340
|
+
|
|
2341
|
+
filterMatchMode?: 'contains' | 'startsWith' | 'endsWith' | 'equals' | 'notEquals' | 'in' | 'lt' | 'lte' | 'gt' | 'gte';
|
|
2342
|
+
|
|
2343
|
+
/** Default : false, if true it will get latest data when form opens for add/edit operation. */
|
|
2344
|
+
alwaysGetLatestDataOnFormOpen?: boolean;
|
|
2345
|
+
|
|
2346
|
+
/** Default : false, Make it true to handle huge amount of data. */
|
|
2347
|
+
virtualScroll?: boolean;
|
|
2348
|
+
|
|
2349
|
+
/** on value change of current dropdown, it will change values of these dropdowns and reload them. */
|
|
2350
|
+
reloadDropdownsOfPath?: string[];
|
|
2351
|
+
|
|
2352
|
+
/** API call will happen when these values of path are present in formData */
|
|
2353
|
+
isDependentOnPath?: string[];
|
|
2354
|
+
|
|
2355
|
+
jsCode?: {
|
|
2356
|
+
/**
|
|
2357
|
+
* modifyDropdownRequest = It will run before hitting API call. So we can do whatever we want.<br/>
|
|
2358
|
+
* onceDropdownDataLoaded = Execute code when dropdown data is loaded.<br/>
|
|
2359
|
+
*
|
|
2360
|
+
* Available variables:<br/>
|
|
2361
|
+
* body: IQueryFormat | any. Useful to modify apiCallOverrides also,<br/>
|
|
2362
|
+
* formData: any = Entire form object<br/>
|
|
2363
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2364
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2365
|
+
* dropdownData: any[] = Latest loaded dropdown data<br/>
|
|
2366
|
+
* reloadDropdownsOfPath: string[] = Add path to this variable to reload its dropdown data.<br/>
|
|
2367
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent.<br/>
|
|
2368
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2369
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2370
|
+
*/
|
|
2371
|
+
appendTo: EDBMasterDropdownAppendTo,
|
|
2372
|
+
/**
|
|
2373
|
+
* // dropdownData is available to use.
|
|
2374
|
+
*
|
|
2375
|
+
* // Return promise for long awaiting tasks.
|
|
2376
|
+
* new Promise(async (resolve, reject) => {
|
|
2377
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2378
|
+
* dropdownData[0].name = 'Sample data';
|
|
2379
|
+
* resolve();
|
|
2380
|
+
* });
|
|
2381
|
+
*
|
|
2382
|
+
* // Directly modify data of grid
|
|
2383
|
+
* dropdownData[0].name = 'Sample data';
|
|
2384
|
+
*
|
|
2385
|
+
* // Return function
|
|
2386
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2387
|
+
*
|
|
2388
|
+
*/
|
|
2389
|
+
code: string,
|
|
2390
|
+
|
|
2391
|
+
}[],
|
|
2392
|
+
|
|
2393
|
+
addNewFormConfig?: IDBMasterConfig;
|
|
2394
|
+
|
|
2395
|
+
apiCallOverrides?: IDBMasterAPICallOverrides;
|
|
2396
|
+
};
|
|
2397
|
+
// dropdownSettings : end
|
|
2398
|
+
|
|
2399
|
+
// autocompleteSettings : start
|
|
2400
|
+
autocompleteSettings?: {
|
|
2401
|
+
dropdown?: boolean;
|
|
2402
|
+
};
|
|
2403
|
+
// autocompleteSettings : end
|
|
2404
|
+
|
|
2405
|
+
// fileUploadSettings : start
|
|
2406
|
+
fileUploadSettings?: {
|
|
2407
|
+
/** Give style object in angular style. */
|
|
2408
|
+
style?: any;
|
|
2409
|
+
|
|
2410
|
+
/** custom CSS class to assign to control */
|
|
2411
|
+
cssClass?: string,
|
|
2412
|
+
|
|
2413
|
+
/** Default : false, When enabled, upload begins automatically after selection is completed. */
|
|
2414
|
+
auto?: boolean;
|
|
2415
|
+
|
|
2416
|
+
/**
|
|
2417
|
+
* API URL which will be used to upload files.<br/>
|
|
2418
|
+
* API should return array of objects in below format.<br/>
|
|
2419
|
+
* You can have other properties and below properties are required.
|
|
2420
|
+
* [{
|
|
2421
|
+
* originalName: string,
|
|
2422
|
+
* uploadPath: string,
|
|
2423
|
+
* }]
|
|
2424
|
+
* API Maker's custom API will accept files in "files" form data field.
|
|
2425
|
+
*
|
|
2426
|
+
* */
|
|
2427
|
+
uploadApiUrl: string;
|
|
2428
|
+
/** API URL which returns content of file in base64 format. */
|
|
2429
|
+
downloadApiUrl?: string;
|
|
2430
|
+
removeApiUrl?: string;
|
|
2431
|
+
|
|
2432
|
+
/** Allow to select multiple files or not */
|
|
2433
|
+
multiple?: boolean;
|
|
2434
|
+
|
|
2435
|
+
/** ex : image/* */
|
|
2436
|
+
accept?: string;
|
|
2437
|
+
|
|
2438
|
+
/** Maximum file size allowed in bytes. Default : 10000000 (10MB) */
|
|
2439
|
+
maxFileSize?: number;
|
|
2440
|
+
|
|
2441
|
+
/** Maximum number of files that can be uploaded. */
|
|
2442
|
+
fileLimit?: number;
|
|
2443
|
+
|
|
2444
|
+
/** Internal use property to show/hide upload button on UI control. */
|
|
2445
|
+
_showUploadButton?: boolean;
|
|
2446
|
+
|
|
2447
|
+
/** internal use only */
|
|
2448
|
+
_fileSelectEvent?: any;
|
|
2449
|
+
};
|
|
2450
|
+
// fileUploadSettings : end
|
|
2451
|
+
|
|
2452
|
+
// dividerSettings : start
|
|
2453
|
+
dividerSettings?: {
|
|
2454
|
+
/** Give style object in angular style. */
|
|
2455
|
+
style?: any;
|
|
2456
|
+
|
|
2457
|
+
/** custom CSS class to assign to control */
|
|
2458
|
+
cssClass?: string,
|
|
2459
|
+
|
|
2460
|
+
align?: 'center' | 'left' | 'right' | 'bottom' | 'top';
|
|
2461
|
+
type?: 'dashed' | 'dotted' | 'solid';
|
|
2462
|
+
dividerText?: string;
|
|
2463
|
+
};
|
|
2464
|
+
// dividerSettings : end
|
|
2465
|
+
|
|
2466
|
+
// accordionSettings : start
|
|
2467
|
+
accordionSettings?: {
|
|
2468
|
+
/** Give style object in angular style. */
|
|
2469
|
+
style?: any;
|
|
2470
|
+
|
|
2471
|
+
/** custom CSS class to assign to control */
|
|
2472
|
+
cssClass?: string,
|
|
2473
|
+
|
|
2474
|
+
/** Index of the active tab or an array of indexes in multiple mode. */
|
|
2475
|
+
activeIndex?: number | number[];
|
|
2476
|
+
|
|
2477
|
+
/** Default : 0, When form opens, this will be applied. */
|
|
2478
|
+
defaultIndex?: number;
|
|
2479
|
+
|
|
2480
|
+
multiple?: boolean;
|
|
2481
|
+
tabs: {
|
|
2482
|
+
/** Give style object in angular style. */
|
|
2483
|
+
style?: any;
|
|
2484
|
+
|
|
2485
|
+
/** Tab header, HTML is supported. */
|
|
2486
|
+
header: string;
|
|
2487
|
+
|
|
2488
|
+
/** Give style object in angular style. */
|
|
2489
|
+
headerStyle?: any;
|
|
2490
|
+
|
|
2491
|
+
/** You can provide single or multiple classes. */
|
|
2492
|
+
headerCssClass?: string,
|
|
2493
|
+
|
|
2494
|
+
disabled?: boolean;
|
|
2495
|
+
fields: IDBMasterConfigFormField[][];
|
|
2496
|
+
}[];
|
|
2497
|
+
|
|
2498
|
+
jsCode?: {
|
|
2499
|
+
/**
|
|
2500
|
+
* Available variables:<br/>
|
|
2501
|
+
* formData: any = Entire form object<br/>
|
|
2502
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2503
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2504
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2505
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2506
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2507
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2508
|
+
* event: any <br/>
|
|
2509
|
+
*/
|
|
2510
|
+
appendTo: EDBMasterAccordionAppendTo,
|
|
2511
|
+
/**
|
|
2512
|
+
* // dropdownData is available to use.
|
|
2513
|
+
*
|
|
2514
|
+
* // Return promise for long awaiting tasks.
|
|
2515
|
+
* new Promise(async (resolve, reject) => {
|
|
2516
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2517
|
+
* dropdownData[0].name = 'Sample data';
|
|
2518
|
+
* resolve();
|
|
2519
|
+
* });
|
|
2520
|
+
*
|
|
2521
|
+
* // Directly modify data of grid
|
|
2522
|
+
* dropdownData[0].name = 'Sample data';
|
|
2523
|
+
*
|
|
2524
|
+
* // Return function
|
|
2525
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2526
|
+
*
|
|
2527
|
+
*/
|
|
2528
|
+
code: string,
|
|
2529
|
+
}[],
|
|
2530
|
+
};
|
|
2531
|
+
// accordionSettings : end
|
|
2532
|
+
|
|
2533
|
+
// tabViewSettings : start
|
|
2534
|
+
tabViewSettings?: {
|
|
2535
|
+
/** Index of the active tab to change selected tab programmatically. */
|
|
2536
|
+
activeIndex?: number;
|
|
2537
|
+
|
|
2538
|
+
/** Default : 0, When form opens, this will be applied. */
|
|
2539
|
+
defaultIndex?: number;
|
|
2540
|
+
|
|
2541
|
+
/** Give style object in angular style. */
|
|
2542
|
+
style?: any;
|
|
2543
|
+
|
|
2544
|
+
/** custom CSS class to assign to control */
|
|
2545
|
+
cssClass?: string,
|
|
2546
|
+
|
|
2547
|
+
tabs: {
|
|
2548
|
+
/** Give style object in angular style. */
|
|
2549
|
+
style?: any;
|
|
2550
|
+
|
|
2551
|
+
/** Tab header, HTML is supported. */
|
|
2552
|
+
header: string;
|
|
2553
|
+
|
|
2554
|
+
/** Give style object in angular style. */
|
|
2555
|
+
headerStyle?: any;
|
|
2556
|
+
|
|
2557
|
+
/** You can provide single or multiple classes. */
|
|
2558
|
+
headerCssClass?: string,
|
|
2559
|
+
|
|
2560
|
+
disabled?: boolean;
|
|
2561
|
+
fields: IDBMasterConfigFormField[][];
|
|
2562
|
+
}[];
|
|
2563
|
+
|
|
2564
|
+
jsCode?: {
|
|
2565
|
+
/**
|
|
2566
|
+
* Available variables:<br/>
|
|
2567
|
+
* formData: any = Entire form object<br/>
|
|
2568
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2569
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2570
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2571
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2572
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2573
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2574
|
+
* event: any <br/>
|
|
2575
|
+
*/
|
|
2576
|
+
appendTo: EDBMasterTabViewAppendTo,
|
|
2577
|
+
/**
|
|
2578
|
+
* // dropdownData is available to use.
|
|
2579
|
+
*
|
|
2580
|
+
* // Return promise for long awaiting tasks.
|
|
2581
|
+
* new Promise(async (resolve, reject) => {
|
|
2582
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2583
|
+
* dropdownData[0].name = 'Sample data';
|
|
2584
|
+
* resolve();
|
|
2585
|
+
* });
|
|
2586
|
+
*
|
|
2587
|
+
* // Directly modify data of grid
|
|
2588
|
+
* dropdownData[0].name = 'Sample data';
|
|
2589
|
+
*
|
|
2590
|
+
* // Return function
|
|
2591
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2592
|
+
*
|
|
2593
|
+
*/
|
|
2594
|
+
code: string,
|
|
2595
|
+
}[],
|
|
2596
|
+
};
|
|
2597
|
+
// tabViewSettings : end
|
|
2598
|
+
|
|
2599
|
+
// buttonSettings : start
|
|
2600
|
+
buttonSettings?: {
|
|
2601
|
+
/** button label text */
|
|
2602
|
+
label: string;
|
|
2603
|
+
|
|
2604
|
+
/** Give style object in angular style. */
|
|
2605
|
+
style?: any;
|
|
2606
|
+
|
|
2607
|
+
/** custom CSS class to assign to control */
|
|
2608
|
+
cssClass?: string,
|
|
2609
|
+
|
|
2610
|
+
/** Add a link style to the button. */
|
|
2611
|
+
link?: boolean;
|
|
2612
|
+
|
|
2613
|
+
/** ex: pi pi-check , give icon to button */
|
|
2614
|
+
icon?: string,
|
|
2615
|
+
|
|
2616
|
+
/** default : left */
|
|
2617
|
+
iconPos?: 'left' | 'right' | 'top' | 'bottom';
|
|
2618
|
+
|
|
2619
|
+
/** Whether the button is in loading state. */
|
|
2620
|
+
loading?: boolean;
|
|
2621
|
+
|
|
2622
|
+
/** Icon to display in loading state. */
|
|
2623
|
+
loadingIcon?: string;
|
|
2624
|
+
|
|
2625
|
+
/** Defines the style of the button. */
|
|
2626
|
+
severity?: 'success' | 'info' | 'warning' | 'danger' | 'help' | 'primary' | 'secondary' | 'contrast' | null | undefined;
|
|
2627
|
+
|
|
2628
|
+
/** When present, it specifies that the component should be disabled. */
|
|
2629
|
+
disabled?: boolean;
|
|
2630
|
+
|
|
2631
|
+
/** Add a shadow to indicate elevation. */
|
|
2632
|
+
raised?: boolean;
|
|
2633
|
+
|
|
2634
|
+
/** Add a circular border radius to the button. */
|
|
2635
|
+
rounded?: boolean;
|
|
2636
|
+
|
|
2637
|
+
/** Add a textual class to the button without a background initially. */
|
|
2638
|
+
text?: boolean;
|
|
2639
|
+
|
|
2640
|
+
/** Add a border class without a background initially. */
|
|
2641
|
+
outlined?: boolean;
|
|
2642
|
+
|
|
2643
|
+
/** Value of the badge. */
|
|
2644
|
+
badge?: string;
|
|
2645
|
+
|
|
2646
|
+
/** Style class of the badge. */
|
|
2647
|
+
badgeClass?: string;
|
|
2648
|
+
|
|
2649
|
+
/** Style class of the badge. */
|
|
2650
|
+
size?: 'small' | 'large' | undefined | null;
|
|
2651
|
+
|
|
2652
|
+
jsCode?: {
|
|
2653
|
+
/**
|
|
2654
|
+
* Available variables:<br/>
|
|
2655
|
+
* formData: any = Entire form object<br/>
|
|
2656
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2657
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2658
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2659
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2660
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2661
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2662
|
+
* event: any <br/>
|
|
2663
|
+
*/
|
|
2664
|
+
appendTo: EDBMasterButtonAppendTo,
|
|
2665
|
+
/**
|
|
2666
|
+
* // dropdownData is available to use.
|
|
2667
|
+
*
|
|
2668
|
+
* // Return promise for long awaiting tasks.
|
|
2669
|
+
* new Promise(async (resolve, reject) => {
|
|
2670
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2671
|
+
* dropdownData[0].name = 'Sample data';
|
|
2672
|
+
* resolve();
|
|
2673
|
+
* });
|
|
2674
|
+
*
|
|
2675
|
+
* // Directly modify data of grid
|
|
2676
|
+
* dropdownData[0].name = 'Sample data';
|
|
2677
|
+
*
|
|
2678
|
+
* // Return function
|
|
2679
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2680
|
+
*
|
|
2681
|
+
*/
|
|
2682
|
+
code: string,
|
|
2683
|
+
}[],
|
|
2684
|
+
};
|
|
2685
|
+
// buttonSettings : end
|
|
2686
|
+
|
|
2687
|
+
// imageSettings : start
|
|
2688
|
+
imageSettings?: {
|
|
2689
|
+
src: string;
|
|
2690
|
+
|
|
2691
|
+
/** Give style object in angular style. */
|
|
2692
|
+
style?: any;
|
|
2693
|
+
|
|
2694
|
+
/** custom CSS class to assign to control */
|
|
2695
|
+
cssClass?: string,
|
|
2696
|
+
|
|
2697
|
+
/** it will be assigned to span which is parent of image tag. */
|
|
2698
|
+
imageParentSpanClass?: string,
|
|
2699
|
+
|
|
2700
|
+
/** Attribute of the image element. */
|
|
2701
|
+
width?: string;
|
|
2702
|
+
|
|
2703
|
+
/** Attribute of the image element. */
|
|
2704
|
+
height?: string;
|
|
2705
|
+
|
|
2706
|
+
/** Attribute of the preview image element. */
|
|
2707
|
+
alt?: string;
|
|
2708
|
+
|
|
2709
|
+
/** Controls the preview functionality. */
|
|
2710
|
+
preview?: boolean;
|
|
2711
|
+
|
|
2712
|
+
/** The source path for the preview image. */
|
|
2713
|
+
previewImageSrc?: string;
|
|
2714
|
+
|
|
2715
|
+
jsCode?: {
|
|
2716
|
+
/**
|
|
2717
|
+
* Available variables:<br/>
|
|
2718
|
+
* formData: any = Entire form object<br/>
|
|
2719
|
+
* column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
|
|
2720
|
+
* allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
|
|
2721
|
+
* globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
|
|
2722
|
+
* utils: any = Common utility functions for user to use. <br/>
|
|
2723
|
+
* queryParams: any = Query params received from URL. <br/>
|
|
2724
|
+
* config: IDBMasterConfigFormField <br/>
|
|
2725
|
+
* event: any <br/>
|
|
2726
|
+
*/
|
|
2727
|
+
appendTo: EDBMasterImageAppendTo,
|
|
2728
|
+
/**
|
|
2729
|
+
* // dropdownData is available to use.
|
|
2730
|
+
*
|
|
2731
|
+
* // Return promise for long awaiting tasks.
|
|
2732
|
+
* new Promise(async (resolve, reject) => {
|
|
2733
|
+
* await new Promise(r => setTimeout(r, 3000));
|
|
2734
|
+
* dropdownData[0].name = 'Sample data';
|
|
2735
|
+
* resolve();
|
|
2736
|
+
* });
|
|
2737
|
+
*
|
|
2738
|
+
* // Directly modify data of grid
|
|
2739
|
+
* dropdownData[0].name = 'Sample data';
|
|
2740
|
+
*
|
|
2741
|
+
* // Return function
|
|
2742
|
+
* (function setData() { dropdownData[0].name = 'Sample data'; } );
|
|
2743
|
+
*
|
|
2744
|
+
*/
|
|
2745
|
+
code: string,
|
|
2746
|
+
}[],
|
|
2747
|
+
};
|
|
2748
|
+
// imageSettings : end
|
|
2749
|
+
|
|
2750
|
+
// customHTMLSettings : start
|
|
2751
|
+
customHTMLSettings?: {
|
|
2752
|
+
htmlCode: string;
|
|
2753
|
+
};
|
|
2754
|
+
// customHTMLSettings : end
|
|
2755
|
+
|
|
2756
|
+
// genericConfig : start
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
// genericConfig : end
|
|
2760
|
+
|
|
2761
|
+
// genericConfig : start
|
|
2762
|
+
export interface IPropertyValidation {
|
|
2763
|
+
required?: boolean; // Allowed Types : *
|
|
2764
|
+
min?: number; // Allowed Types : number | date
|
|
2765
|
+
max?: number; // Allowed Types : number | date
|
|
2766
|
+
minLength?: number; // Allowed Types : string
|
|
2767
|
+
maxLength?: number; // Allowed Types : string
|
|
2768
|
+
unique?: boolean;
|
|
2769
|
+
email?: boolean; // Allowed Types : string
|
|
2770
|
+
validatorFun?: Function;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
// genericConfig : end
|
|
2774
|
+
|
|
2775
|
+
// dropdownSettings : start
|
|
2776
|
+
export enum EDBMasterDropdownAppendTo {
|
|
2777
|
+
modifyDropdownRequest = 'modifyDropdownRequest',
|
|
2778
|
+
onceDropdownDataLoaded = 'onceDropdownDataLoaded',
|
|
2779
|
+
onChange = 'onChange',
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
// dropdownSettings : end
|
|
2783
|
+
|
|
2784
|
+
// inputTextSettings : start
|
|
2785
|
+
export enum EDBMasterInputTextAppendTo {
|
|
2786
|
+
ngModelChange = 'ngModelChange',
|
|
2787
|
+
focus = 'focus',
|
|
2788
|
+
blur = 'blur',
|
|
2789
|
+
keyUp = 'keyUp',
|
|
2790
|
+
keyDown = 'keyDown',
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
// inputTextSettings : end
|
|
2794
|
+
|
|
2795
|
+
// buttonSettings : start
|
|
2796
|
+
export enum EDBMasterButtonAppendTo {
|
|
2797
|
+
click = 'click',
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
// buttonSettings : end
|
|
2801
|
+
|
|
2802
|
+
// imageSettings : start
|
|
2803
|
+
export enum EDBMasterImageAppendTo {
|
|
2804
|
+
click = 'click',
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
// imageSettings : end
|
|
2808
|
+
|
|
2809
|
+
// inputNumberSettings : start
|
|
2810
|
+
export enum EDBMasterInputNumberAppendTo {
|
|
2811
|
+
ngModelChange = 'ngModelChange',
|
|
2812
|
+
focus = 'focus',
|
|
2813
|
+
blur = 'blur',
|
|
2814
|
+
keyUp = 'keyUp',
|
|
2815
|
+
keyDown = 'keyDown',
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2818
|
+
// inputNumberSettings : end
|
|
2819
|
+
|
|
2820
|
+
// accordionSettings : start
|
|
2821
|
+
export enum EDBMasterTabViewAppendTo {
|
|
2822
|
+
activeIndexChange = 'activeIndexChange',
|
|
2823
|
+
}
|
|
2824
|
+
|
|
2825
|
+
// accordionSettings : end
|
|
2826
|
+
|
|
2827
|
+
// accordionSettings : start
|
|
2828
|
+
export enum EDBMasterAccordionAppendTo {
|
|
2829
|
+
activeIndexChange = 'activeIndexChange',
|
|
2830
|
+
}
|
|
2831
|
+
|
|
2832
|
+
// accordionSettings : end
|
|
2833
|
+
|
|
2834
|
+
// inputMaskSettings : start
|
|
2835
|
+
export enum EDBMasterInputMaskAppendTo {
|
|
2836
|
+
ngModelChange = 'ngModelChange',
|
|
2837
|
+
focus = 'focus',
|
|
2838
|
+
|
|
2839
|
+
/** If you are trying to modify model value in blur it will not work. It is old bug in PrimeNG. Use complete method instead. */
|
|
2840
|
+
blur = 'blur',
|
|
2841
|
+
complete = 'complete',
|
|
2842
|
+
keyUp = 'keyUp',
|
|
2843
|
+
keyDown = 'keyDown',
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
// inputMaskSettings : end
|
|
2847
|
+
|
|
2848
|
+
// inputPasswordSettings : start
|
|
2849
|
+
export enum EDBMasterInputPasswordAppendTo {
|
|
2850
|
+
ngModelChange = 'ngModelChange',
|
|
2851
|
+
focus = 'focus',
|
|
2852
|
+
blur = 'blur',
|
|
2853
|
+
keyUp = 'keyUp',
|
|
2854
|
+
keyDown = 'keyDown',
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
// inputPasswordSettings : end
|
|
2858
|
+
|
|
2859
|
+
// textAreaSettings : start
|
|
2860
|
+
export enum EDBMasterTextAreaAppendTo {
|
|
2861
|
+
ngModelChange = 'ngModelChange',
|
|
2862
|
+
focus = 'focus',
|
|
2863
|
+
blur = 'blur',
|
|
2864
|
+
keyUp = 'keyUp',
|
|
2865
|
+
keyDown = 'keyDown',
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
// textAreaSettings : end
|
|
2869
|
+
|
|
2870
|
+
// checkboxSettings : start
|
|
2871
|
+
export enum EDBMasterCheckboxAppendTo {
|
|
2872
|
+
ngModelChange = 'ngModelChange',
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2875
|
+
// checkboxSettings : end
|
|
2876
|
+
|
|
2877
|
+
// radioSettings : start
|
|
2878
|
+
export enum EDBMasterRadioAppendTo {
|
|
2879
|
+
ngModelChange = 'ngModelChange',
|
|
2880
|
+
}
|
|
2881
|
+
|
|
2882
|
+
// radioSettings : end
|
|
2883
|
+
|
|
2884
|
+
// colorPickerSettings : start
|
|
2885
|
+
export enum EDBMasterColorPickerAppendTo {
|
|
2886
|
+
ngModelChange = 'ngModelChange',
|
|
2887
|
+
}
|
|
2888
|
+
|
|
2889
|
+
// colorPickerSettings : end
|
|
2890
|
+
|
|
2891
|
+
// datePickerSettings : start
|
|
2892
|
+
export enum EDBMasterDatePickerAppendTo {
|
|
2893
|
+
ngModelChange = 'ngModelChange',
|
|
2894
|
+
focus = 'focus',
|
|
2895
|
+
blur = 'blur',
|
|
2896
|
+
}
|
|
2897
|
+
|
|
2898
|
+
// datePickerSettings : end
|
|
2899
|
+
|
|
2900
|
+
export enum EDBMasterConfigAppendTo {
|
|
2901
|
+
oncePageLoad = 'oncePageLoad',
|
|
2902
|
+
oncePageLoadWithContext = 'oncePageLoadWithContext',
|
|
2903
|
+
gridRender = 'gridRender',
|
|
2904
|
+
modifyGridRequest = 'modifyGridRequest',
|
|
2905
|
+
preSaveAndEdit = 'preSaveAndEdit',
|
|
2906
|
+
beforeSaveModalOpen = 'beforeSaveModalOpen',
|
|
2907
|
+
beforeEditModalOpen = 'beforeEditModalOpen',
|
|
2908
|
+
columnSelectionChanged = 'columnSelectionChanged',
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
// genericConfig : start
|
|
2912
|
+
export enum EDBMasterFormControl {
|
|
2913
|
+
input = 'input',
|
|
2914
|
+
inputNumber = 'inputNumber',
|
|
2915
|
+
inputMask = 'inputMask',
|
|
2916
|
+
inputOtp = 'inputOtp',
|
|
2917
|
+
password = 'password',
|
|
2918
|
+
date_picker = 'date_picker',
|
|
2919
|
+
textarea = 'textarea',
|
|
2920
|
+
checkbox = 'checkbox',
|
|
2921
|
+
radio = 'radio',
|
|
2922
|
+
color_picker = 'color_picker',
|
|
2923
|
+
dropdown = 'dropdown',
|
|
2924
|
+
file_upload = 'file_upload',
|
|
2925
|
+
grid = 'grid',
|
|
2926
|
+
divider = 'divider',
|
|
2927
|
+
|
|
2928
|
+
// Field holder controls
|
|
2929
|
+
accordion = 'accordion',
|
|
2930
|
+
tab_view = 'tab_view',
|
|
2931
|
+
|
|
2932
|
+
// utility controls
|
|
2933
|
+
button = 'button',
|
|
2934
|
+
image = 'image',
|
|
2935
|
+
customHTML = 'customHTML',
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
// genericConfig : end
|
|
2939
|
+
|
|
2940
|
+
export interface IDBMasterMessageFromIframeToParent {
|
|
2941
|
+
fromDBMaster: string;
|
|
2942
|
+
eventType: IDBMasterEventFromIframeToParent;
|
|
2943
|
+
eventData: any;
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2946
|
+
export interface IDBMasterMessageFromParentToIframe {
|
|
2947
|
+
eventType: IDBMasterEventFromParentToIframe;
|
|
2948
|
+
eventData: any;
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
/**
|
|
2952
|
+
* Iframe parent will receive these events via messages.
|
|
2953
|
+
*/
|
|
2954
|
+
export enum IDBMasterEventFromIframeToParent {
|
|
2955
|
+
PAGE_READY = 'PAGE_READY',
|
|
2956
|
+
RECORD_SAVED = 'RECORD_SAVED',
|
|
2957
|
+
RECORDS_IMPORTED = 'RECORDS_IMPORTED',
|
|
2958
|
+
RECORD_UPDATED = 'RECORD_UPDATED',
|
|
2959
|
+
RECORD_DELETED = 'RECORD_DELETED',
|
|
2960
|
+
MANY_RECORD_DELETED = 'MANY_RECORD_DELETED',
|
|
2961
|
+
GRID_EXPORTED = 'GRID_EXPORTED',
|
|
2962
|
+
GRID_REFRESHED = 'GRID_REFRESHED',
|
|
2963
|
+
ADD_NEW_BUTTON_CLICKED = 'ADD_NEW_BUTTON_CLICKED',
|
|
2964
|
+
CUSTOM_ACTION_BUTTON_CLICKED = 'CUSTOM_ACTION_BUTTON_CLICKED',
|
|
2965
|
+
DROPDOWN_ADD_NEW_RECORD_SAVED = 'DROPDOWN_ADD_NEW_RECORD_SAVED',
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
/**
|
|
2969
|
+
* Iframe parent can send these messages to UI Page via message.
|
|
2970
|
+
*/
|
|
2971
|
+
export enum IDBMasterEventFromParentToIframe {
|
|
2972
|
+
/** You can trigger add button click. */
|
|
2973
|
+
TRIGGER_ADD_NEW_BUTTON_CLICK = 'TRIGGER_ADD_NEW_BUTTON_CLICK',
|
|
2974
|
+
|
|
2975
|
+
/** You can trigger refresh button click of grid. */
|
|
2976
|
+
TRIGGER_REFRESH_BUTTON_CLICK = 'TRIGGER_REFRESH_BUTTON_CLICK',
|
|
2977
|
+
|
|
2978
|
+
/** Need to pass object and those properties will be sent in grid load query. */
|
|
2979
|
+
DATA_TO_APPEND_IN_GRID_LOAD_FIND_QUERY = 'DATA_TO_APPEND_IN_GRID_LOAD_FIND_QUERY',
|
|
2980
|
+
|
|
2981
|
+
/** Need to pass object and those properties will be sent in SAVE API call. */
|
|
2982
|
+
DATA_TO_APPEND_IN_RECORD_SAVE_API_PAYLOAD = 'DATA_TO_APPEND_IN_RECORD_SAVE_API_PAYLOAD',
|
|
2983
|
+
|
|
2984
|
+
/** Need to pass object and those properties will be sent in Update API call. */
|
|
2985
|
+
DATA_TO_APPEND_IN_RECORD_UPDATE_API_PAYLOAD = 'DATA_TO_APPEND_IN_RECORD_UPDATE_API_PAYLOAD',
|
|
2986
|
+
|
|
2987
|
+
/** Pass object which will be used in global variable named "globalData" in custom code. */
|
|
2988
|
+
SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT = 'SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT',
|
|
2989
|
+
|
|
2990
|
+
/** Send message to iframe when you are done with setting required data in globalData or other required places. */
|
|
2991
|
+
PARENT_READY = 'PARENT_READY', // parent will send message when it is ready with grid conditions.
|
|
2992
|
+
}
|
|
2993
|
+
|
|
2994
|
+
export interface IDBMasterUIPageUtilsScope {
|
|
2995
|
+
globalData: any;
|
|
2996
|
+
utils: {
|
|
2997
|
+
schema: any;
|
|
2998
|
+
dbMaser: any;
|
|
2999
|
+
errorsMap: { [path: string]: string };
|
|
3000
|
+
messageService: {
|
|
3001
|
+
showErrorToast(msg: string, otherProps?: any): void;
|
|
3002
|
+
showSuccessToast(msg: string, otherProps?: any): void;
|
|
3003
|
+
showInfoToast(msg: string, otherProps?: any): void;
|
|
3004
|
+
showWarningToast(msg: string, otherProps?: any): void;
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
/**
|
|
3008
|
+
* form fields are in nested form, it returns simple array of form fields.
|
|
3009
|
+
* It will not include fields from grid control as they are having different form and grid control itself is a form.
|
|
3010
|
+
* It will include all fields of accordion, tab controls.
|
|
3011
|
+
* It will include fields having path property.
|
|
3012
|
+
* */
|
|
3013
|
+
getFlatArrayOfAllFormFields(
|
|
3014
|
+
fields: IDBMasterConfigFormField[][]
|
|
3015
|
+
): Promise<IDBMasterConfigFormField[]>;
|
|
3016
|
+
|
|
3017
|
+
/**
|
|
3018
|
+
* form fields are in nested form, it returns simple array of form fields.
|
|
3019
|
+
* It will also include form fields from grid control.
|
|
3020
|
+
* It will include all fields of accordion, tab controls.
|
|
3021
|
+
* */
|
|
3022
|
+
getFlatArrayOfAllFormFieldsIncludingGridFields(
|
|
3023
|
+
fields: IDBMasterConfigFormField[][]
|
|
3024
|
+
): Promise<IDBMasterConfigFormField[]>;
|
|
3025
|
+
|
|
3026
|
+
/** It finds form element having that path.
|
|
3027
|
+
* It will also check into grid form fields.
|
|
3028
|
+
* It can find element having hiddenId
|
|
3029
|
+
* */
|
|
3030
|
+
findFormElement(pathOrHiddenId: string): IDBMasterConfigFormField | undefined;
|
|
3031
|
+
|
|
3032
|
+
/**
|
|
3033
|
+
* It will return list of all controls provided in arguments.
|
|
3034
|
+
* */
|
|
3035
|
+
findFormElementOfControl(control: EDBMasterFormControl): IDBMasterConfigFormField[];
|
|
3036
|
+
|
|
3037
|
+
/** It finds grid element having that path. */
|
|
3038
|
+
findGridElement(path: string): IDBMasterConfigGridField | undefined;
|
|
3039
|
+
};
|
|
3040
|
+
queryParams: any;
|
|
3041
|
+
userUtils: { [utilName: string]: any };
|
|
3042
|
+
event: any | null;
|
|
3043
|
+
config: IDBMasterConfig | null;
|
|
3044
|
+
column: IDBMasterConfigFormField | null;
|
|
3045
|
+
formData: any | null;
|
|
3046
|
+
allDropdownDataMap: { [path: string]: any[] } | null;
|
|
3047
|
+
reqBody: any | null;
|
|
3048
|
+
gridData: any[] | null;
|
|
3049
|
+
dropdownData: any[] | null;
|
|
3050
|
+
reloadDropdownsOfPath: string[] | null;
|
|
3051
|
+
mode: 'save' | 'edit' | 'import' | null,
|
|
3052
|
+
apiResponse: any | null;
|
|
3053
|
+
headers: any | null;
|
|
3054
|
+
selectedGridItems: any | null;
|
|
3055
|
+
}
|
|
3056
|
+
|
|
3057
|
+
/**
|
|
3058
|
+
* If you want to hide custom action provide below property
|
|
3059
|
+
* ____hide_actionName = true
|
|
3060
|
+
*/
|
|
3061
|
+
export enum IDBMasterSpecialRowProperties {
|
|
3062
|
+
/** if this property found in row with value true, it will hide delete button for that row even if that is supported. */
|
|
3063
|
+
____hide_delete_button = '____hide_delete_button',
|
|
3064
|
+
|
|
3065
|
+
/** if this property found in row with value true, it will hide edit button for that row even if that is supported. */
|
|
3066
|
+
____hide_edit_button = '____hide_edit_button',
|
|
1596
3067
|
}
|
|
1597
3068
|
|
|
1598
3069
|
// ==== DB Master configurations End ====
|