@sava-info-systems/api-maker-with-extensions 1.12.1 → 1.14.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.
Files changed (95) hide show
  1. package/dist/1097.449af467da10a6f0.js +1 -0
  2. package/dist/3081.827b4ef503185325.js +1 -0
  3. package/dist/4211.26b06067756edec1.js +1 -0
  4. package/dist/4575.cb8bb3db7b7c0fe0.js +1 -0
  5. package/dist/9939.164ded8f7ca5162f.js +1 -0
  6. package/dist/assets/schema-types/types.ts +249 -11
  7. package/dist/index.html +2 -2
  8. package/dist/main.949138f5212140d3.js +1 -0
  9. package/dist/runtime.83de819192a264a1.js +1 -0
  10. package/dist/styles.b301d5c3703f519a.css +1 -0
  11. package/main.js +1 -1
  12. package/package.json +5 -4
  13. package/sandbox/assets/schema-types/types.js +36 -7
  14. package/sandbox/sandbox.js +1 -1
  15. package/src/assets/schema-types/types.ts +249 -11
  16. package/src/public/dist-db-masters/browser/index.html +7 -3
  17. package/src/public/dist-db-masters/browser/main-TYGVEM3B.js +139 -0
  18. package/src/public/dist-db-masters/browser/main.js +44 -44
  19. package/src/public/dist-db-masters/browser/media/color-3LUHUBGQ.png +0 -0
  20. package/src/public/dist-db-masters/browser/media/hue-RMMBQOAC.png +0 -0
  21. package/src/public/dist-db-masters/browser/media/primeicons-4GST5W3O.woff2 +0 -0
  22. package/src/public/dist-db-masters/browser/media/primeicons-DHQU4SEP.svg +345 -0
  23. package/src/public/dist-db-masters/browser/media/primeicons-GEFHGEHP.ttf +0 -0
  24. package/src/public/dist-db-masters/browser/media/primeicons-P53SE5CV.woff +0 -0
  25. package/src/public/dist-db-masters/browser/media/primeicons-RSSEDYLY.eot +0 -0
  26. package/src/public/dist-db-masters/browser/polyfills-6EAL64PA.js +2 -0
  27. package/src/public/dist-db-masters/browser/styles-2H2JU2BI.css +1 -0
  28. package/src/tools/install_utils/SetEnvInFrontend.js +16 -2
  29. package/dist/1097.js +0 -1
  30. package/dist/3081.js +0 -1
  31. package/dist/4211.js +0 -1
  32. package/dist/4575.js +0 -1
  33. package/dist/9939.js +0 -1
  34. package/dist/main.js +0 -1
  35. package/dist/runtime.js +0 -1
  36. package/dist/styles.css +0 -1
  37. /package/dist/{1025.js → 1025.aa53798f1b55461d.js} +0 -0
  38. /package/dist/{148.js → 148.ee8e99d678b8c025.js} +0 -0
  39. /package/dist/{1558.js → 1558.e0b57bdf7f56a8f0.js} +0 -0
  40. /package/dist/{1617.js → 1617.5e0016e4b9a7942e.js} +0 -0
  41. /package/dist/{1678.js → 1678.11aec0796eea5d87.js} +0 -0
  42. /package/dist/{1754.js → 1754.c8a592e8566b39cd.js} +0 -0
  43. /package/dist/{1928.js → 1928.970ea54226b2cd91.js} +0 -0
  44. /package/dist/{1957.js → 1957.ae3a282aaf017a6e.js} +0 -0
  45. /package/dist/{2140.js → 2140.6a93dae584183594.js} +0 -0
  46. /package/dist/{2295.js → 2295.2805c58221b89532.js} +0 -0
  47. /package/dist/{2473.js → 2473.7e8addd010a40342.js} +0 -0
  48. /package/dist/{2714.js → 2714.d2294502b2a67e9a.js} +0 -0
  49. /package/dist/{2735.js → 2735.8db087449ded306f.js} +0 -0
  50. /package/dist/{2908.js → 2908.afbb4bc0e7cd8877.js} +0 -0
  51. /package/dist/{3139.js → 3139.d0e02547c933c49b.js} +0 -0
  52. /package/dist/{3450.js → 3450.7258a816bd414e01.js} +0 -0
  53. /package/dist/{4110.js → 4110.864766464288eeb8.js} +0 -0
  54. /package/dist/{4181.js → 4181.30e4f1c8eada50e2.js} +0 -0
  55. /package/dist/{4186.js → 4186.dc909c8525a1e871.js} +0 -0
  56. /package/dist/{4842.js → 4842.0929ff5c931d6a5b.js} +0 -0
  57. /package/dist/{485.js → 485.0d081fb59c661f05.js} +0 -0
  58. /package/dist/{4895.js → 4895.4fcedd94060fad5d.js} +0 -0
  59. /package/dist/{5249.js → 5249.ff62ef792f1671c8.js} +0 -0
  60. /package/dist/{5334.js → 5334.58277491cb57f6ee.js} +0 -0
  61. /package/dist/{5421.js → 5421.8e428cae376ebf8c.js} +0 -0
  62. /package/dist/{5679.js → 5679.3897b7371f5e32fe.js} +0 -0
  63. /package/dist/{5761.js → 5761.844e55e87fc6bcf8.js} +0 -0
  64. /package/dist/{5765.js → 5765.c2d8207418a5561f.js} +0 -0
  65. /package/dist/{6236.js → 6236.9d38a82ecca3aec6.js} +0 -0
  66. /package/dist/{6393.js → 6393.0b1c08d78f1af0d8.js} +0 -0
  67. /package/dist/{6401.js → 6401.e28156bcbab146e7.js} +0 -0
  68. /package/dist/{6925.js → 6925.2135c4ac170fd066.js} +0 -0
  69. /package/dist/{7368.js → 7368.ce2ec22a1f33bc93.js} +0 -0
  70. /package/dist/{7436.js → 7436.8366a4a22515129b.js} +0 -0
  71. /package/dist/{7470.js → 7470.c9afc148f288ac63.js} +0 -0
  72. /package/dist/{7649.js → 7649.aa2999c02c9c54ae.js} +0 -0
  73. /package/dist/{7975.js → 7975.18f52f8018a65643.js} +0 -0
  74. /package/dist/{7977.js → 7977.21d1ce18dd90e683.js} +0 -0
  75. /package/dist/{7987.js → 7987.28e2ad3cf92b8a76.js} +0 -0
  76. /package/dist/{8125.js → 8125.0705f11a3e3c285b.js} +0 -0
  77. /package/dist/{8266.js → 8266.7a4c37981b3a1460.js} +0 -0
  78. /package/dist/{8296.js → 8296.74d7cbb4de44faad.js} +0 -0
  79. /package/dist/{8374.js → 8374.fa20d95bc952f56d.js} +0 -0
  80. /package/dist/{8682.js → 8682.ac569b2306382d34.js} +0 -0
  81. /package/dist/{8841.js → 8841.f4d477b20e8324df.js} +0 -0
  82. /package/dist/{885.js → 885.1c974629c902805a.js} +0 -0
  83. /package/dist/{891.js → 891.519823bb28bd0543.js} +0 -0
  84. /package/dist/{913.js → 913.6e9b6732fb48fa5f.js} +0 -0
  85. /package/dist/{9243.js → 9243.a2982da73f489775.js} +0 -0
  86. /package/dist/{9575.js → 9575.168612b46aca7ce7.js} +0 -0
  87. /package/dist/{color.png → color.dae87a04d07ca92b.png} +0 -0
  88. /package/dist/{common.js → common.7e62dd0fef3d35cc.js} +0 -0
  89. /package/dist/{hue.png → hue.8b1818380241e6ac.png} +0 -0
  90. /package/dist/{polyfills.js → polyfills.a6d93c3e94967b29.js} +0 -0
  91. /package/dist/{primeicons.svg → primeicons.19e14e488f5edc90.svg} +0 -0
  92. /package/dist/{primeicons.ttf → primeicons.310a7310efb91ab1.ttf} +0 -0
  93. /package/dist/{primeicons.woff → primeicons.7f7722745590608a.woff} +0 -0
  94. /package/dist/{primeicons.eot → primeicons.8ca441e178bfb872.eot} +0 -0
  95. /package/dist/{primeicons.woff2 → primeicons.e1a53edb6ea00325.woff2} +0 -0
@@ -270,6 +270,15 @@ export interface ISchemaProperty { // Add new schema property in ValidateDBSchem
270
270
  conversions?: IPropertyConversion;
271
271
  validations?: IPropertyValidation;
272
272
 
273
+ /**
274
+ * These settings are only available only for UI Maker extension. It will have no impact when UI Maker is not installed in your installation.<br/><br/>
275
+ * When we try to generate default JSON for collection from UI Maker, these settings will be merged with default JSON generation.<br/>
276
+ * These settings are only used to generate UI Maker code, it has no runtime effect.<br/>
277
+ *
278
+ * After generating default code for UI Maker page, system will use these settings and override those configurations.
279
+ * */
280
+ uim?: IDBMasterConfigFormField;
281
+
273
282
  instance?: string; // used as strings in _.get
274
283
  database?: string; // used as strings in _.get
275
284
  collection?: string; // used as strings in _.get
@@ -282,9 +291,19 @@ export interface ISchemaProperty { // Add new schema property in ValidateDBSchem
282
291
  /** Database will take care of assigning incremental value for this field. */
283
292
  isAutoIncrementByDB?: boolean;
284
293
 
285
- /** API Maker will take care of assigning incremental value for this field. */
294
+ /**
295
+ * API Maker will take care of assigning incremental value for this field.<br/>
296
+ * if isAutoIncrementByDB is true then isAutoIncrementByAM & isAutoGenerateByAM will have no effect.
297
+ * */
286
298
  isAutoIncrementByAM?: boolean | IIsAutoIncrementByAM;
287
299
 
300
+ /**
301
+ * API Maker will generate random values for this field based on configuration. When value is provided then it will not generate.<br/>
302
+ * isAutoGenerateByAM has higher priority over isAutoIncrementByAM.<br/>
303
+ * if isAutoIncrementByDB is true then isAutoIncrementByAM & isAutoGenerateByAM will have no effect.
304
+ * */
305
+ isAutoGenerateByAM?: IIsAutoGenerateByAM;
306
+
288
307
  /**
289
308
  * if true, system will fail update/replace operation when value of this field in request payload, and value of database is not same.<br/>
290
309
  * Sending this field in update request is mandatory.<br/>
@@ -300,6 +319,17 @@ export interface IIsAutoIncrementByAM {
300
319
  step?: number; // default value will be 1
301
320
  }
302
321
 
322
+ export interface IIsAutoGenerateByAM {
323
+ valueGeneratorType: EValueGeneratorType;
324
+ }
325
+
326
+ export enum EValueGeneratorType {
327
+ GUID_UUID = 'GUID_UUID',
328
+ ObjectID = 'ObjectID',
329
+ ULID = 'ULID',
330
+ ShortUUID = 'ShortUUID',
331
+ }
332
+
303
333
  export interface IPropertyConversion {
304
334
  trimStart?: boolean;
305
335
  trimEnd?: boolean;
@@ -1382,6 +1412,29 @@ export type ITestCaseSandboxCode_P = Partial<ITestCaseSandboxCode>;
1382
1412
 
1383
1413
  // ==== DB Master configurations Start ====
1384
1414
 
1415
+ export interface IUIMakerURLQueryParams {
1416
+ /** If you provide id in URL, it will open that Id in edit mode. */
1417
+ id?: any;
1418
+
1419
+ /** Default edit, It will open form in edit or view mode based on passed value. */
1420
+ 'form-open-mode'?: EDBMasterGridOperationsOrder | null;
1421
+
1422
+ /** name of ui page */
1423
+ 'db-master-name'?: string;
1424
+
1425
+ /** admin user path */
1426
+ 'admin-path'?: string;
1427
+
1428
+ /** true | false // If passed, master will wait until parent is done with setting its data. */
1429
+ 'wait-for-parent-ready'?: string;
1430
+
1431
+ /** Default: false, If true, it will print debugging logs in console */
1432
+ 'show-logs'?: string;
1433
+
1434
+ /** You can pass theme in URL also */
1435
+ theme?: any;
1436
+ }
1437
+
1385
1438
  export enum EDBMasterTheme {
1386
1439
  BOOTSTRAP4_LIGHT_BLUE = 'bootstrap4-light-blue',
1387
1440
  BOOTSTRAP4_LIGHT_PURPLE = 'bootstrap4-light-purple',
@@ -1490,8 +1543,6 @@ export interface IDBMasterConfig {
1490
1543
  hideDeleteAllButton?: boolean;
1491
1544
  hideDeleteAllConfirmation?: boolean;
1492
1545
 
1493
- showRefreshButton?: boolean;
1494
-
1495
1546
  deleteAllButtonSettings?: {
1496
1547
  /** default : true */
1497
1548
  raised?: boolean;
@@ -1508,6 +1559,8 @@ export interface IDBMasterConfig {
1508
1559
  severity?: uiMakerComponentSeverity;
1509
1560
  }
1510
1561
 
1562
+ showRefreshButton?: boolean;
1563
+
1511
1564
  refreshButtonSettings?: {
1512
1565
  /** default : true */
1513
1566
  raised?: boolean;
@@ -1530,6 +1583,7 @@ export interface IDBMasterConfig {
1530
1583
  * T.EDBMasterOperationsOrder.global_search,
1531
1584
  * T.EDBMasterOperationsOrder.import,
1532
1585
  * T.EDBMasterOperationsOrder.export,
1586
+ * T.EDBMasterOperationsOrder.export_csv_single,
1533
1587
  * T.EDBMasterOperationsOrder.refresh,
1534
1588
  * T.EDBMasterOperationsOrder.add,
1535
1589
  * T.EDBMasterOperationsOrder.custom_actions,
@@ -1541,6 +1595,7 @@ export interface IDBMasterConfig {
1541
1595
  | EDBMasterOperationsOrder.add
1542
1596
  | EDBMasterOperationsOrder.refresh
1543
1597
  | EDBMasterOperationsOrder.export
1598
+ | EDBMasterOperationsOrder.export_csv_single
1544
1599
  | EDBMasterOperationsOrder.import
1545
1600
  | EDBMasterOperationsOrder.global_search
1546
1601
  | EDBMasterOperationsOrder.column_selector
@@ -1571,16 +1626,40 @@ export interface IDBMasterConfig {
1571
1626
  style?: any;
1572
1627
 
1573
1628
  csv?: {
1574
- enable: boolean;
1629
+ enable?: boolean;
1575
1630
 
1576
1631
  /** Default : CSV */
1577
- labelCSV: string;
1632
+ labelCSV?: string;
1578
1633
 
1579
1634
  /** Default : CSV Selected */
1580
- labelCSVSelected: string;
1635
+ labelCSVSelected?: string;
1636
+
1637
+ /** Only these fields of grid will be exported. We can include hidden fields or calculated fields also in this. */
1638
+ exportFields?: Pick<IDBMasterConfigGridField, 'path' | 'header'>[];
1639
+
1640
+ /** It will be suggested file name for download */
1641
+ exportFileName?: string;
1581
1642
  }
1582
1643
  // pdf?: boolean;
1583
1644
  }
1645
+
1646
+ showExportCSVSingleButton?: boolean;
1647
+
1648
+ showExportCSVSingleButtonSettings?: {
1649
+ /** default : true */
1650
+ raised?: boolean;
1651
+
1652
+ /** Default : pi pi-sync */
1653
+ icon?: string;
1654
+
1655
+ /** comma separated CSS classes */
1656
+ cssClass?: string;
1657
+
1658
+ /** Give style object in angular style. */
1659
+ style?: any;
1660
+
1661
+ severity?: uiMakerComponentSeverity;
1662
+ }
1584
1663
  };
1585
1664
  /** Provide CDN path of JS/CSS libraries */
1586
1665
  externalLibs?: {
@@ -1603,7 +1682,7 @@ export interface IDBMasterConfig {
1603
1682
  * oncePageLoadWithContext = Code will be run only once on page load with context of data. (config, globalData: any, utils: any, queryParams: any) <br/>
1604
1683
  * gridRender = Gets executed everytime grid gets data. (gridEvent, gridData, globalData: any, utils: any, queryParams: any) <br/>
1605
1684
  * modifyGridRequest = You can modify api call request. (gridEvent, reqBody: IQueryFormat, globalData: any, utils: any, queryParams: any) <br/>
1606
- * preSaveAndEdit = Change data before saving/update/import. (reqBody: any | any[], globalData: any, utils: any, queryParams: any, mode: 'save' | 'edit' | 'import') <br/>
1685
+ * preSaveAndEdit = run code before save & edit operation of form. Change data before saving/update/import. (reqBody: any | any[], globalData: any, utils: any, queryParams: any, mode: 'save' | 'edit' | 'import') <br/>
1607
1686
  * beforeSaveModalOpen = Change data before save modal open. (formData: any , globalData: any, utils: any, queryParams: any) <br/>
1608
1687
  * beforeEditModalOpen = Change data before edit modal open. (formData: any , globalData: any, utils: any, queryParams: any) <br/>
1609
1688
  *
@@ -1778,6 +1857,9 @@ export interface IDBMasterConfig {
1778
1857
  /** only applicable for top level form modal. */
1779
1858
  draggable?: boolean;
1780
1859
 
1860
+ /** default: true, Whether the dialog can be displayed full screen. */
1861
+ maximizable?: boolean;
1862
+
1781
1863
  /** Ex : 90vw */
1782
1864
  width?: string;
1783
1865
 
@@ -1800,6 +1882,7 @@ export enum EDBMasterOperationsOrder {
1800
1882
  add = 'add',
1801
1883
  refresh = 'refresh',
1802
1884
  export = 'export',
1885
+ export_csv_single = 'export_csv_single',
1803
1886
  import = 'import',
1804
1887
  global_search = 'global_search',
1805
1888
  column_selector = 'column_selector',
@@ -1961,7 +2044,7 @@ export interface IDBMasterConfigOperation {
1961
2044
  /** default : true */
1962
2045
  raised?: boolean;
1963
2046
 
1964
- /** Applicable for add button only. */
2047
+ /** Gives label to Add button which is visible on top of the grid. Applicable for add button only. */
1965
2048
  label?: string;
1966
2049
 
1967
2050
  /** Applicable for add button only. */
@@ -2050,6 +2133,12 @@ export interface IDBMasterConfigGridField {
2050
2133
  /** If displayField provided, it will display from this field otherwise it will display value of path field. */
2051
2134
  displayField?: string;
2052
2135
 
2136
+ /** Placeholder value for filter in header */
2137
+ placeHolderOfFilterInHeader?: string;
2138
+
2139
+ /** If true, filter in header will be hidden. */
2140
+ hideFilter?: boolean;
2141
+
2053
2142
  /** Default false, it will format dates in 'dd-MM-yyyy hh:mm:ss a' automatically if 'dateTimeFormat' is not provided. */
2054
2143
  autoFormatDate?: boolean;
2055
2144
 
@@ -2101,6 +2190,9 @@ export interface IDBMasterConfigGridFieldExport extends IDBMasterConfigGridField
2101
2190
 
2102
2191
  /** Calculated property based on schema. Used to give type to <p-columnFilter>. */
2103
2192
  filterType?: EDBMasterConfigFilterType;
2193
+
2194
+ /** Sets default match mode to column filter */
2195
+ matchModeForFilterInColumn?: EDBMasterMatchMode;
2104
2196
  }
2105
2197
 
2106
2198
  export enum EDBMasterConfigFilterType {
@@ -2151,7 +2243,12 @@ export interface IDBMasterConfigFormField {
2151
2243
  /** Generates UI controls. */
2152
2244
  fields?: IDBMasterConfigFormField[][];
2153
2245
 
2154
- validations?: Pick<IPropertyValidation, 'required'>;
2246
+ validations?: Pick<IPropertyValidation, 'required'> & {
2247
+ /** If requiredFun is present, that code will be executed when form data is getting changed and it sets value in required.<br/>
2248
+ * Value of required will be ignored when requiredFun is present because system will evaluate "requiredFun" and it's output will be value of "required"
2249
+ * */
2250
+ requiredFun?: string;
2251
+ };
2155
2252
  validationErrors?: {
2156
2253
  required?: string;
2157
2254
  };
@@ -2215,6 +2312,63 @@ export interface IDBMasterConfigFormField {
2215
2312
  };
2216
2313
  // textAreaSettings : end
2217
2314
 
2315
+ // editorSettings : start
2316
+ editorSettings?: {
2317
+ /** Give style object in angular style. */
2318
+ style?: any;
2319
+
2320
+ placeholder?: string;
2321
+
2322
+ /** Maximum number of character allows in the input field. */
2323
+ maxLength?: number;
2324
+
2325
+ /** Advisory information to display in a tooltip on hover. */
2326
+ tooltip?: string;
2327
+
2328
+ /** Type of CSS position. */
2329
+ tooltipPosition?: 'left' | 'top' | 'bottom' | 'right';
2330
+ tooltipStyleClass?: string;
2331
+
2332
+ /** Only those controls and formats will be allowed
2333
+ * ex: ['background', 'bold', 'color', 'font', 'code', 'italic', 'link', 'size', 'strike', 'script', 'underline', 'blockquote', 'header', 'indent', 'list', 'align', 'direction', 'code-block', 'image', 'video', 'clean']
2334
+ * */
2335
+ formats?: string[];
2336
+
2337
+ jsCode?: {
2338
+ /**
2339
+ * Available variables:<br/>
2340
+ * formData: any = Entire form object<br/>
2341
+ * column: IDBMasterConfigFormField = Configuration of that form column. column.dropdownSettings?.dbData?.find will be query to get data. <br/>
2342
+ * allDropdownDataMap: {[path: string]: any[]} = Map of all dropdown data<br/>
2343
+ * globalData: any = User will send it using SET_GLOBAL_DATA_TO_USE_IN_ANY_SCRIPT event from parent. <br/>
2344
+ * utils: any = Common utility functions for user to use. <br/>
2345
+ * queryParams: any = Query params received from URL. <br/>
2346
+ * config: IDBMasterConfigFormField <br/>
2347
+ * event: any <br/>
2348
+ */
2349
+ appendTo: EDBMasterEditorAppendTo,
2350
+ /**
2351
+ * // dropdownData is available to use.
2352
+ *
2353
+ * // Return promise for long awaiting tasks.
2354
+ * new Promise(async (resolve, reject) => {
2355
+ * await new Promise(r => setTimeout(r, 3000));
2356
+ * dropdownData[0].name = 'Sample data';
2357
+ * resolve();
2358
+ * });
2359
+ *
2360
+ * // Directly modify data of grid
2361
+ * dropdownData[0].name = 'Sample data';
2362
+ *
2363
+ * // Return function
2364
+ * (function setData() { dropdownData[0].name = 'Sample data'; } );
2365
+ *
2366
+ */
2367
+ code: string,
2368
+ }[],
2369
+ };
2370
+ // editorSettings : end
2371
+
2218
2372
  // inputTextSettings : start
2219
2373
  inputTextSettings?: {
2220
2374
  /** Give style object in angular style. */
@@ -2574,7 +2728,7 @@ export interface IDBMasterConfigFormField {
2574
2728
  tooltipPosition?: 'left' | 'top' | 'bottom' | 'right';
2575
2729
  tooltipStyleClass?: string;
2576
2730
 
2577
- /** When specified a cancel icon is displayed to allow removing the value. */
2731
+ /** Default : true, When specified a cancel icon is displayed to allow removing the value. */
2578
2732
  cancel?: boolean;
2579
2733
 
2580
2734
  /** Style class of the on icon. */
@@ -3800,6 +3954,22 @@ export enum EDBMasterTextAreaAppendTo {
3800
3954
 
3801
3955
  // textAreaSettings : end
3802
3956
 
3957
+ // editorSettings : start
3958
+ export enum EDBMasterEditorAppendTo {
3959
+ visible = 'visible',
3960
+ disabled = 'disabled',
3961
+ ngModelChange = 'ngModelChange',
3962
+ onTextChange = 'onTextChange',
3963
+ onInit = 'onInit',
3964
+ onSelectionChange = 'onSelectionChange',
3965
+ focus = 'focus',
3966
+ blur = 'blur',
3967
+ keyUp = 'keyUp',
3968
+ keyDown = 'keyDown',
3969
+ }
3970
+
3971
+ // editorSettings : end
3972
+
3803
3973
  // checkboxSettings : start
3804
3974
  export enum EDBMasterCheckboxAppendTo {
3805
3975
  visible = 'visible',
@@ -3877,14 +4047,28 @@ export enum EDBMasterGridAppendTo {
3877
4047
  // gridSettings : end
3878
4048
 
3879
4049
  export enum EDBMasterConfigAppendTo {
4050
+ /** Code will be run only once on page load. config and global data are not available. It will append script to page script tag. */
3880
4051
  oncePageLoad = 'oncePageLoad',
4052
+
4053
+ /** Code will be run only once on page load with context of data. (config, globalData: any, utils: any, queryParams: any) */
3881
4054
  oncePageLoadWithContext = 'oncePageLoadWithContext',
4055
+
4056
+ /** Gets executed everytime grid gets data. (gridEvent, gridData, globalData: any, utils: any, queryParams: any) */
3882
4057
  gridRender = 'gridRender',
4058
+
4059
+ /** You can modify api call request. (gridEvent, reqBody: IQueryFormat, globalData: any, utils: any, queryParams: any) */
3883
4060
  modifyGridRequest = 'modifyGridRequest',
3884
4061
 
3885
- /** run code before save & edit operation of form */
4062
+ /** Executed once grid data loaded. */
4063
+ onceGridDataLoaded = 'onceGridDataLoaded',
4064
+
4065
+ /** run code before save & edit operation of form. Change data before saving/update/import. (reqBody: any | any[], globalData: any, utils: any, queryParams: any, mode: 'save' | 'edit' | 'import') */
3886
4066
  preSaveAndEdit = 'preSaveAndEdit',
4067
+
4068
+ /** Change data before save modal open. (formData: any , globalData: any, utils: any, queryParams: any) */
3887
4069
  beforeSaveModalOpen = 'beforeSaveModalOpen',
4070
+
4071
+ /** Change data before edit modal open. (formData: any , globalData: any, utils: any, queryParams: any) */
3888
4072
  beforeEditModalOpen = 'beforeEditModalOpen',
3889
4073
  beforeViewModalOpen = 'beforeViewModalOpen',
3890
4074
  columnSelectionChanged = 'columnSelectionChanged',
@@ -3899,6 +4083,7 @@ export enum EDBMasterFormControl {
3899
4083
  password = 'password',
3900
4084
  date_picker = 'date_picker',
3901
4085
  textarea = 'textarea',
4086
+ editor = 'editor',
3902
4087
  checkbox = 'checkbox',
3903
4088
  radio = 'radio',
3904
4089
  color_picker = 'color_picker',
@@ -3994,6 +4179,24 @@ export interface IDBMasterUIPageUtilsScope {
3994
4179
  showWarningToast(msg: string, otherProps?: any): void;
3995
4180
  }
3996
4181
 
4182
+ /** Add | Edit | Delete | View | Refresh Grid operations */
4183
+ operations: {
4184
+ /** Reload grid data. */
4185
+ refreshGrid(): Promise<void>;
4186
+
4187
+ /** Opens form in add mode. */
4188
+ openFormInAddMode(): Promise<void>;
4189
+
4190
+ /** Opens modal in edit mode with data filled in it. */
4191
+ openFormInEditMode(id: any): Promise<void>;
4192
+
4193
+ /** Opens modal in view mode with data filled in it. */
4194
+ openFormInViewMode(id: any): Promise<void>;
4195
+
4196
+ /** Without any confirmation it will directly perform delete operation of given id. */
4197
+ deleteRecord(id: any): Promise<void>;
4198
+ }
4199
+
3997
4200
  /**
3998
4201
  * form fields are in nested form, it returns simple array of form fields.
3999
4202
  * It will not include fields from grid control as they are having different form and grid control itself is a form.
@@ -4026,6 +4229,41 @@ export interface IDBMasterUIPageUtilsScope {
4026
4229
 
4027
4230
  /** It finds grid element having that path. */
4028
4231
  findGridElement(path: string): IDBMasterConfigGridField | undefined;
4232
+
4233
+ /** You can set value in any filter and it will trigger filter automatically on that field. */
4234
+ setValueInFilterOfTopGrid(path: string, value: any): void;
4235
+
4236
+ /**
4237
+ * It will convert array of objects into CSV string<br/>
4238
+ * papaUnparseOptions = https://www.papaparse.com/docs#unparse-config-default
4239
+ * */
4240
+ convertArrayToCSV(dataArr: any[], papaUnparseOptions?: any): string;
4241
+
4242
+ /**
4243
+ * It will throw file to user for download.<br/>
4244
+ * fileContent ex = "Some file content"
4245
+ * filename ex. = clients.csv
4246
+ * fileType ex. = text/csv
4247
+ * */
4248
+ download(fileContent: string, filename: string, fileType: string): void;
4249
+
4250
+ /**
4251
+ * Useful to clear all properties of object and assign all properties of new object without changing object reference.
4252
+ * Use this function to set new value to $scope.<br/>
4253
+ * ex:<br/>
4254
+ * const someNewApiResponse = $scope.apiResponse;<br/>
4255
+ * $scope.utils.setDataInObject($scope.apiResponse, someNewApiResponse);<br/>
4256
+ * */
4257
+ setDataInObject(oldObject: any, newObject: any): void;
4258
+
4259
+ /**
4260
+ * Useful to remove all objects of array and put new objects from new array without changing object reference.
4261
+ * Use this function to set new value to $scope.<br/>
4262
+ * ex:<br/>
4263
+ * const someNewApiResponse = $scope.apiResponse;<br/>
4264
+ * $scope.utils.setDataInArray($scope.apiResponse, someNewApiResponse);<br/>
4265
+ * */
4266
+ setDataInArray(oldArray: any[], newArray: any[]): void;
4029
4267
  };
4030
4268
  queryParams: any;
4031
4269
  userUtils: { [utilName: string]: any };
package/dist/index.html CHANGED
@@ -96,7 +96,7 @@
96
96
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/components/prism-core.min.js" type="text/javascript"></script>
97
97
  <script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/plugins/autoloader/prism-autoloader.min.js" type="text/javascript"></script>
98
98
 
99
- <style>@layer primeng{}:root{--surface-a:#3b3b3b;--surface-b:#303030;--surface-c:#610000;--surface-d:#4f4f4f;--surface-e:#3b3b3b;--surface-f:#3b3b3b;--text-color:#b0b0b0;--text-color-secondary:#7a7a7a;--primary-color:#790109;--primary-color-text:#ebebeb;--font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;--surface-0:#20262e;--surface-50:#363c43;--surface-100:#4d5158;--surface-200:#63676d;--surface-300:#797d82;--surface-400:#909397;--surface-500:#a6a8ab;--surface-600:#bcbec0;--surface-700:#d2d4d5;--surface-800:#e9e9ea;--surface-900:#ffffff;--gray-50:#e9e9ea;--gray-100:#d2d4d5;--gray-200:#bcbec0;--gray-300:#a6a8ab;--gray-400:#909397;--gray-500:#797d82;--gray-600:#63676d;--gray-700:#4d5158;--gray-800:#363c43;--gray-900:#20262e;--content-padding:1.25rem;--inline-spacing:.5rem;--border-radius:4px;--surface-ground:#20262e;--surface-section:#20262e;--surface-card:#2a323d;--surface-overlay:#2a323d;--surface-border:#3f4b5b;--surface-hover:rgba(255,255,255,.04);--maskbg:rgba(0, 0, 0, .4);--focus-ring:0 0 0 1px #8a0000;--highlight-bg:#750008;--highlight-text-color:#dedede;color-scheme:dark}*{box-sizing:border-box}:root{--blue-50:#f3f8ff;--blue-100:#c5dcff;--blue-200:#97c1fe;--blue-300:#69a5fe;--blue-400:#3b8afd;--blue-500:#0d6efd;--blue-600:#0b5ed7;--blue-700:#094db1;--blue-800:#073d8b;--blue-900:#052c65;--green-50:#f4f9f6;--green-100:#c8e2d6;--green-200:#9ccbb5;--green-300:#70b595;--green-400:#459e74;--green-500:#198754;--green-600:#157347;--green-700:#125f3b;--green-800:#0e4a2e;--green-900:#0a3622;--yellow-50:#fffcf3;--yellow-100:#fff0c3;--yellow-200:#ffe494;--yellow-300:#ffd965;--yellow-400:#ffcd36;--yellow-500:#ffc107;--yellow-600:#d9a406;--yellow-700:#b38705;--yellow-800:#8c6a04;--yellow-900:#664d03;--cyan-50:#f3fcfe;--cyan-100:#c5f2fb;--cyan-200:#97e8f9;--cyan-300:#69def6;--cyan-400:#3bd4f3;--cyan-500:#0dcaf0;--cyan-600:#0baccc;--cyan-700:#098da8;--cyan-800:#076f84;--cyan-900:#055160;--pink-50:#fdf5f9;--pink-100:#f5cee1;--pink-200:#eda7ca;--pink-300:#e681b3;--pink-400:#de5a9b;--pink-500:#d63384;--pink-600:#b62b70;--pink-700:#96245c;--pink-800:#761c49;--pink-900:#561435;--indigo-50:#f7f3fe;--indigo-100:#dac6fc;--indigo-200:#bd98f9;--indigo-300:#a06bf7;--indigo-400:#833df4;--indigo-500:#6610f2;--indigo-600:#570ece;--indigo-700:#470ba9;--indigo-800:#380985;--indigo-900:#290661;--teal-50:#f4fcfa;--teal-100:#c9f2e6;--teal-200:#9fe8d2;--teal-300:#75debf;--teal-400:#4ad3ab;--teal-500:#20c997;--teal-600:#1bab80;--teal-700:#168d6a;--teal-800:#126f53;--teal-900:#0d503c;--orange-50:#fff9f3;--orange-100:#ffe0c7;--orange-200:#fec89a;--orange-300:#feaf6d;--orange-400:#fd9741;--orange-500:#fd7e14;--orange-600:#d76b11;--orange-700:#b1580e;--orange-800:#8b450b;--orange-900:#653208;--bluegray-50:#f8f9fb;--bluegray-100:#e0e4ea;--bluegray-200:#c7ced9;--bluegray-300:#aeb9c8;--bluegray-400:#95a3b8;--bluegray-500:#7c8ea7;--bluegray-600:#69798e;--bluegray-700:#576375;--bluegray-800:#444e5c;--bluegray-900:#323943;--purple-50:#f8f6fc;--purple-100:#dcd2f0;--purple-200:#c1aee4;--purple-300:#a68ad9;--purple-400:#8a66cd;--purple-500:#6f42c1;--purple-600:#5e38a4;--purple-700:#4e2e87;--purple-800:#3d246a;--purple-900:#2c1a4d;--red-50:#fdf5f6;--red-100:#f7cfd2;--red-200:#f0a8af;--red-300:#e9828c;--red-400:#e35b68;--red-500:#dc3545;--red-600:#bb2d3b;--red-700:#9a2530;--red-800:#791d26;--red-900:#58151c;--primary-50:#f8f2f3;--primary-100:#dfc2c4;--primary-200:#c59295;--primary-300:#ac6266;--primary-400:#923138;--primary-500:#790109;--primary-600:#670108;--primary-700:#550106;--primary-800:#430105;--primary-900:#300004}</style><link rel="stylesheet" href="styles.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.css"></noscript></head>
99
+ <style>@layer primeng{}:root{--surface-a:#3b3b3b;--surface-b:#303030;--surface-c:#610000;--surface-d:#4f4f4f;--surface-e:#3b3b3b;--surface-f:#3b3b3b;--text-color:#b0b0b0;--text-color-secondary:#7a7a7a;--primary-color:#790109;--primary-color-text:#ebebeb;--font-family:-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;--surface-0:#20262e;--surface-50:#363c43;--surface-100:#4d5158;--surface-200:#63676d;--surface-300:#797d82;--surface-400:#909397;--surface-500:#a6a8ab;--surface-600:#bcbec0;--surface-700:#d2d4d5;--surface-800:#e9e9ea;--surface-900:#ffffff;--gray-50:#e9e9ea;--gray-100:#d2d4d5;--gray-200:#bcbec0;--gray-300:#a6a8ab;--gray-400:#909397;--gray-500:#797d82;--gray-600:#63676d;--gray-700:#4d5158;--gray-800:#363c43;--gray-900:#20262e;--content-padding:1.25rem;--inline-spacing:.5rem;--border-radius:4px;--surface-ground:#20262e;--surface-section:#20262e;--surface-card:#2a323d;--surface-overlay:#2a323d;--surface-border:#3f4b5b;--surface-hover:rgba(255,255,255,.04);--maskbg:rgba(0, 0, 0, .4);--focus-ring:0 0 0 1px #8a0000;--highlight-bg:#750008;--highlight-text-color:#dedede;color-scheme:dark}*{box-sizing:border-box}:root{--blue-50:#f3f8ff;--blue-100:#c5dcff;--blue-200:#97c1fe;--blue-300:#69a5fe;--blue-400:#3b8afd;--blue-500:#0d6efd;--blue-600:#0b5ed7;--blue-700:#094db1;--blue-800:#073d8b;--blue-900:#052c65;--green-50:#f4f9f6;--green-100:#c8e2d6;--green-200:#9ccbb5;--green-300:#70b595;--green-400:#459e74;--green-500:#198754;--green-600:#157347;--green-700:#125f3b;--green-800:#0e4a2e;--green-900:#0a3622;--yellow-50:#fffcf3;--yellow-100:#fff0c3;--yellow-200:#ffe494;--yellow-300:#ffd965;--yellow-400:#ffcd36;--yellow-500:#ffc107;--yellow-600:#d9a406;--yellow-700:#b38705;--yellow-800:#8c6a04;--yellow-900:#664d03;--cyan-50:#f3fcfe;--cyan-100:#c5f2fb;--cyan-200:#97e8f9;--cyan-300:#69def6;--cyan-400:#3bd4f3;--cyan-500:#0dcaf0;--cyan-600:#0baccc;--cyan-700:#098da8;--cyan-800:#076f84;--cyan-900:#055160;--pink-50:#fdf5f9;--pink-100:#f5cee1;--pink-200:#eda7ca;--pink-300:#e681b3;--pink-400:#de5a9b;--pink-500:#d63384;--pink-600:#b62b70;--pink-700:#96245c;--pink-800:#761c49;--pink-900:#561435;--indigo-50:#f7f3fe;--indigo-100:#dac6fc;--indigo-200:#bd98f9;--indigo-300:#a06bf7;--indigo-400:#833df4;--indigo-500:#6610f2;--indigo-600:#570ece;--indigo-700:#470ba9;--indigo-800:#380985;--indigo-900:#290661;--teal-50:#f4fcfa;--teal-100:#c9f2e6;--teal-200:#9fe8d2;--teal-300:#75debf;--teal-400:#4ad3ab;--teal-500:#20c997;--teal-600:#1bab80;--teal-700:#168d6a;--teal-800:#126f53;--teal-900:#0d503c;--orange-50:#fff9f3;--orange-100:#ffe0c7;--orange-200:#fec89a;--orange-300:#feaf6d;--orange-400:#fd9741;--orange-500:#fd7e14;--orange-600:#d76b11;--orange-700:#b1580e;--orange-800:#8b450b;--orange-900:#653208;--bluegray-50:#f8f9fb;--bluegray-100:#e0e4ea;--bluegray-200:#c7ced9;--bluegray-300:#aeb9c8;--bluegray-400:#95a3b8;--bluegray-500:#7c8ea7;--bluegray-600:#69798e;--bluegray-700:#576375;--bluegray-800:#444e5c;--bluegray-900:#323943;--purple-50:#f8f6fc;--purple-100:#dcd2f0;--purple-200:#c1aee4;--purple-300:#a68ad9;--purple-400:#8a66cd;--purple-500:#6f42c1;--purple-600:#5e38a4;--purple-700:#4e2e87;--purple-800:#3d246a;--purple-900:#2c1a4d;--red-50:#fdf5f6;--red-100:#f7cfd2;--red-200:#f0a8af;--red-300:#e9828c;--red-400:#e35b68;--red-500:#dc3545;--red-600:#bb2d3b;--red-700:#9a2530;--red-800:#791d26;--red-900:#58151c;--primary-50:#f8f2f3;--primary-100:#dfc2c4;--primary-200:#c59295;--primary-300:#ac6266;--primary-400:#923138;--primary-500:#790109;--primary-600:#670108;--primary-700:#550106;--primary-800:#430105;--primary-900:#300004}</style><link rel="stylesheet" href="styles.b301d5c3703f519a.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles.b301d5c3703f519a.css"></noscript></head>
100
100
  <body>
101
101
  <app-root></app-root>
102
102
 
@@ -146,5 +146,5 @@
146
146
  </style>
147
147
  </noscript>
148
148
 
149
- <script src="runtime.js" type="module"></script><script src="polyfills.js" type="module"></script><script src="main.js" type="module"></script></body>
149
+ <script src="runtime.83de819192a264a1.js" type="module"></script><script src="polyfills.a6d93c3e94967b29.js" type="module"></script><script src="main.949138f5212140d3.js" type="module"></script></body>
150
150
  </html>