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