@pega/custom-dx-components 0.242.66 → 0.242.68

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 (62) hide show
  1. package/package.json +1 -1
  2. package/src/constants.js +3 -0
  3. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.tsx.mustache +2 -2
  4. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.tsx.mustache +2 -2
  5. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/demo.stories.tsx.mustache +2 -2
  6. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.tsx.mustache +3 -3
  7. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.tsx.mustache +3 -3
  8. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.tsx.mustache +2 -2
  9. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.tsx.mustache +4 -4
  10. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.tsx.mustache +2 -2
  11. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.tsx.mustache +3 -3
  12. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/demo.stories.tsx.mustache +2 -2
  13. package/src/tasks/create/templates/Launchpad/Widget/CASE/demo.stories.tsx.mustache +4 -4
  14. package/src/tasks/create/templates/Launchpad/Widget/PAGE/demo.stories.tsx.mustache +2 -2
  15. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/demo.stories.tsx.mustache +3 -3
  16. package/src/tasks/create-lib/index.js +85 -1
  17. package/src/tasks/create-version/index.js +60 -16
  18. package/src/tasks/delete-lib/index.js +43 -14
  19. package/src/tasks/delete-version/index.js +30 -9
  20. package/src/tasks/export-archive/helper.js +14 -0
  21. package/src/tasks/export-archive/index.js +151 -28
  22. package/src/tasks/import-archive/index.js +27 -14
  23. package/src/tasks/import-comp/index.js +144 -82
  24. package/src/tasks/init/template/package.json.mustache +5 -4
  25. package/src/tasks/publish/index.js +34 -18
  26. package/src/tasks/publish-lib/index.js +19 -2
  27. package/src/tasks/set-perm/index.js +14 -2
  28. package/src/tasks/switch-lib/index.js +83 -34
  29. package/src/tasks/switch-version/index.js +69 -14
  30. package/src/util.js +144 -16
  31. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +4 -4
  32. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +2 -2
  33. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -2
  34. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +3 -3
  35. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +2 -2
  36. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +2 -2
  37. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +3 -3
  38. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -2
  39. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +3 -3
  40. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/demo.stories.tsx +4 -4
  41. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/demo.stories.tsx +2 -2
  42. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -2
  43. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/demo.stories.tsx +3 -3
  44. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +2 -2
  45. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/demo.stories.tsx +2 -2
  46. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +3 -3
  47. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -2
  48. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +3 -3
  49. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/demo.stories.tsx +4 -4
  50. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/demo.stories.tsx +2 -2
  51. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/demo.stories.tsx +2 -2
  52. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/demo.stories.tsx +3 -3
  53. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/demo.stories.tsx +2 -2
  54. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/demo.stories.tsx +2 -2
  55. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/demo.stories.tsx +3 -3
  56. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/demo.stories.tsx +2 -2
  57. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/demo.stories.tsx +3 -3
  58. package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +1 -1
  59. package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +1 -1
  60. package/tests/functional/localLibCreateLibExportImportLib.test.js +1 -1
  61. package/tests/functional/localLibCreateLibExportLib.test.js +1 -1
  62. package/tests/functional/localLibCreateLibValidateDeleteLib.test.js +1 -1
package/src/util.js CHANGED
@@ -20,6 +20,7 @@ import {
20
20
  COMPONENTS_DIRECTORY_PATH,
21
21
  COMPONENTS_CONFIG_FILE_NAME,
22
22
  TASKS_CONFIG_JSON_FILENAME,
23
+ INPUT_CONFIG_JSON_FILENAME,
23
24
  PACKAGE_JSON_FILENAME,
24
25
  TOKEN_PATH,
25
26
  OOTB_COMPONENT_SERVICE_REST_ENDPOINT,
@@ -29,10 +30,12 @@ import {
29
30
  USE_PROMOTED_WEB_PACK,
30
31
  BOOTSTRAP_CONFIG,
31
32
  LIBRARY_BASED,
33
+ USE_INPUT_CONFIG,
32
34
  SHARED_DIRECTORY,
33
35
  SHOW_DEBUG,
34
36
  COMPONENTS_PATH,
35
37
  ARCHIVES_PATH,
38
+ BIN_ARCHIVES_PATH,
36
39
  TEMP_PATH,
37
40
  JEST_TESTS_FUNCTIONAL_PATH,
38
41
  IMPORT_RELATIVE_PATH,
@@ -61,7 +64,8 @@ let defaultConfigs = {
61
64
  displayLibVersion: "",
62
65
  showDebug: false,
63
66
  importRelativePath: "",
64
- exportRelativePath: ""
67
+ exportRelativePath: "",
68
+ useInputConfig: false
65
69
  };
66
70
 
67
71
  let pegaConfig = null;
@@ -116,7 +120,8 @@ export const setUpDefaults = async () => {
116
120
  displayLibVersion: "",
117
121
  showDebug: false,
118
122
  importRelativePath: "",
119
- exportRelativePath: ""
123
+ exportRelativePath: "",
124
+ useInputConfig: false
120
125
  };
121
126
 
122
127
  // retrievedConfigData
@@ -142,6 +147,11 @@ export const setUpDefaults = async () => {
142
147
  if (data[LIBRARY_BASED]) {
143
148
  retrievedConfigData.isLibraryBased = data[LIBRARY_BASED];
144
149
  }
150
+
151
+ if (data[USE_INPUT_CONFIG]) {
152
+ retrievedConfigData.useInputConfig = data[USE_INPUT_CONFIG];
153
+ }
154
+
145
155
  retrievedConfigData.library = data.component.library;
146
156
  retrievedConfigData.version = data.component.version;
147
157
 
@@ -171,6 +181,65 @@ export const setUpDefaults = async () => {
171
181
  return JSON.parse(JSON.stringify(retrievedConfigData));
172
182
  }
173
183
 
184
+
185
+ export const convertYNToBoolean = (inputYN) => {
186
+ switch (inputYN) {
187
+ case 'Y':
188
+ case 'y':
189
+ case 'Yes':
190
+ case 'YES':
191
+ case 't':
192
+ case 'true':
193
+ case 'True':
194
+ case 'TRUE':
195
+ return true;
196
+ }
197
+
198
+ return false;
199
+ }
200
+
201
+ export const getInputConfigForCommand = async (commandName) => {
202
+ // retrievedConfigData
203
+ const currentDirectory = process.cwd();
204
+ const inputConfigJsonPath = join(currentDirectory, INPUT_CONFIG_JSON_FILENAME);
205
+ const isLibraryBased = getLibraryBased();
206
+
207
+ try {
208
+ // force to throw error and not console log
209
+ await checkPathAccess(inputConfigJsonPath, {}, true);
210
+
211
+ let data = fs.readFileSync(inputConfigJsonPath, { encoding: 'utf8' });
212
+ data = JSON.parse(data);
213
+
214
+ if (isLibraryBased) {
215
+ const libraryCommands = data["libraryMode"];
216
+
217
+ if (libraryCommands[commandName]) {
218
+ return libraryCommands[commandName];
219
+
220
+ }
221
+ }
222
+ else {
223
+ const standardCommands = data["standard"];
224
+
225
+ if (standardCommands[commandName]) {
226
+ return standardCommands[commandName];
227
+
228
+ }
229
+
230
+ }
231
+ }
232
+ catch (ex) {
233
+ // when can't find it, always be false, assume no library based.
234
+ // This is IMPORTANT for init (npx install)
235
+ return {};
236
+ }
237
+
238
+ return {};
239
+
240
+ }
241
+
242
+
174
243
  // initialize
175
244
  // await setUpDefaults();
176
245
 
@@ -331,6 +400,15 @@ if (showDebug) addDebugLog("getLibraryBased", "", "");
331
400
  return defaultConfigs.isLibraryBased;
332
401
  }
333
402
 
403
+ export const getUseInputConfig = () => {
404
+ if (showDebug) addDebugLog("getUseInputConfig", "", "");
405
+
406
+
407
+ return defaultConfigs.useInputConfig;
408
+ }
409
+
410
+
411
+
334
412
  export const setLibraryBased = async (isLibraryBased) => {
335
413
  if (showDebug) addDebugLog("setLibraryBased", "", "");
336
414
  const currentDirectory = process.cwd();
@@ -562,6 +640,7 @@ if (showDebug) addDebugLog("removeTopLevelConfigFiles", `directory: ${directory}
562
640
  if (configF !== "package-lock.json" &&
563
641
  configF !== "package.json" &&
564
642
  configF !== "tasks.config.json" &&
643
+ configF !== "input.config.json" &&
565
644
  configF !== ".gitignore" &&
566
645
  configF !== ".npmrc" &&
567
646
  configF !== ".prettierignore") {
@@ -1633,17 +1712,6 @@ if (showDebug) addDebugLog("zipVersionAndArchive", `orgLibName: ${orgLibName}, v
1633
1712
  }
1634
1713
  }
1635
1714
 
1636
- // // Add config.json file
1637
- // if (fs.existsSync(tasksConfig)) {
1638
- // archive.file(tasksConfig, { name: path.basename(tasksConfig) });
1639
- // }
1640
-
1641
- // // Add package.json file
1642
- // if (fs.existsSync(packageJson)) {
1643
- // archive.file(packageJson, { name: path.basename(packageJson) });
1644
- // }
1645
-
1646
-
1647
1715
  // pipe archive data to the file
1648
1716
  archive.pipe(output);
1649
1717
 
@@ -1669,11 +1737,71 @@ if (showDebug) addDebugLog("zipVersionAndArchive", `orgLibName: ${orgLibName}, v
1669
1737
 
1670
1738
  await archive.finalize();
1671
1739
 
1740
+ return output;
1741
+
1742
+ };
1743
+
1744
+ export const zipVersionAndArchiveCL = async (orgLibName, version, currentDirectory = "") => {
1745
+ if (showDebug) addDebugLog("zipVersionAndArchiveCL", `orgLibName: ${orgLibName}, version: ${version}, currentDirectory: ${currentDirectory}`, "");
1746
+ // const srcDirectoryPath = await getSrcDirectoryPath();
1747
+ if (currentDirectory === "") {
1748
+ currentDirectory = process.cwd();
1749
+ }
1750
+ const libDirectoryPath = join(currentDirectory, orgLibName, version);
1751
+ const tasksConfig = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
1752
+ const packageJson = join(currentDirectory, PACKAGE_JSON_FILENAME);
1753
+ const archiveFileName = `${orgLibName}_${version}.zip`;
1754
+
1755
+
1756
+ // const configContent = Buffer.from(fs.readFileSync(configJson)).toString();
1757
+ const mainDirectory = process.cwd();
1758
+ const archiveDirectory = join (mainDirectory, BIN_ARCHIVES_PATH);
1759
+ if (!fs.existsSync(archiveDirectory)) {
1760
+ fs.mkdirSync(archiveDirectory, { recursive: true });
1761
+ }
1762
+
1763
+
1764
+ const archiveFile = join(archiveDirectory, archiveFileName);
1765
+ if (fs.existsSync(orgLibName)) {
1766
+
1767
+ }
1768
+
1769
+ const output = fs.createWriteStream(archiveFile);
1770
+ const archive = archiver('zip', {
1771
+ zlib: { level: 9 } // Sets the compression level.
1772
+ });
1773
+
1774
+ const zipChunks = [];
1775
+ archive.on('data', chunk => zipChunks.push(chunk));
1776
+
1777
+ // Add src directory
1778
+ archive.directory(libDirectoryPath, false);
1779
+
1672
1780
 
1781
+ // pipe archive data to the file
1782
+ archive.pipe(output);
1673
1783
 
1674
- // const zipBuffer = Buffer.concat(zipChunks);
1675
- // console.log(chalk.green(`component zipped with size: ${Math.ceil(zipBuffer.length / 1024)} KB`));
1676
- // const zipContent = zipBuffer.toString('base64');
1784
+ output.on('end', function() {
1785
+ console.log('Data has been drained');
1786
+ });
1787
+
1788
+
1789
+ // good practice to catch warnings (ie stat failures and other non-blocking errors)
1790
+ archive.on('warning', function(err) {
1791
+ if (err.code === 'ENOENT') {
1792
+ // log warning
1793
+ } else {
1794
+ // throw error
1795
+ throw err;
1796
+ }
1797
+ });
1798
+
1799
+ // good practice to catch this error explicitly
1800
+ archive.on('error', function(err) {
1801
+ throw err;
1802
+ });
1803
+
1804
+ await archive.finalize();
1677
1805
 
1678
1806
  return output;
1679
1807
 
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyCaseWidget>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  export const BasePegaDxilMyCaseWidget: Story = (args: any) => {
@@ -25,7 +25,7 @@ export const BasePegaDxilMyCaseWidget: Story = (args: any) => {
25
25
  CASE_INFO: {
26
26
  CASE_INFO_ID: 'caseInfo.ID'
27
27
  }
28
- };
28
+ } as any;
29
29
  };
30
30
 
31
31
  window.PCore.getLocaleUtils = () => {
@@ -33,7 +33,7 @@ export const BasePegaDxilMyCaseWidget: Story = (args: any) => {
33
33
  getLocaleValue: (value: any) => {
34
34
  return value;
35
35
  }
36
- };
36
+ } as any;
37
37
  };
38
38
 
39
39
  window.PCore.getDataApiUtils = () => {
@@ -43,7 +43,7 @@ export const BasePegaDxilMyCaseWidget: Story = (args: any) => {
43
43
  resolve(historyData);
44
44
  });
45
45
  }
46
- };
46
+ } as any;
47
47
  };
48
48
 
49
49
  const props = {
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyDate>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  window.PCore.getEnvironmentInfo = () => {
@@ -26,7 +26,7 @@ window.PCore.getEnvironmentInfo = () => {
26
26
  getLocale: () => {
27
27
  return 'en-GB';
28
28
  }
29
- };
29
+ } as any;
30
30
  };
31
31
 
32
32
  export const BasePegaDxilMyDate: Story = args => {
@@ -14,7 +14,7 @@ type Story = StoryObj<typeof PegaDxilMyDateTime>;
14
14
 
15
15
 
16
16
  if (!window.PCore) {
17
- window.PCore = {};
17
+ window.PCore = {} as any;
18
18
  }
19
19
 
20
20
  window.PCore.getEnvironmentInfo = () => {
@@ -25,7 +25,7 @@ window.PCore.getEnvironmentInfo = () => {
25
25
  getLocale: () => {
26
26
  return 'en-GB';
27
27
  }
28
- };
28
+ } as any;
29
29
  };
30
30
 
31
31
  export const BasePegaDxilMyDateTime: Story = (args: any) => {
@@ -21,7 +21,7 @@ export default meta;
21
21
  type Story = StoryObj<typeof PegaDxilMyDetails>;
22
22
 
23
23
  if (!window.PCore) {
24
- window.PCore = {};
24
+ window.PCore = {} as any;
25
25
  }
26
26
 
27
27
  window.PCore.getLocaleUtils = () => {
@@ -29,7 +29,7 @@ window.PCore.getLocaleUtils = () => {
29
29
  getLocaleValue: (value: any) => {
30
30
  return value;
31
31
  }
32
- };
32
+ } as any;
33
33
  };
34
34
 
35
35
  window.PCore.getUserApi = () => {
@@ -39,7 +39,7 @@ window.PCore.getUserApi = () => {
39
39
  resolve(operatorDetails);
40
40
  });
41
41
  }
42
- };
42
+ } as any;
43
43
  };
44
44
 
45
45
  const Region = (props: any) => {
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyIconButtonUrl>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  const statelistData = {
@@ -49,7 +49,7 @@ export const BasePegaDxilMyIconButtonUrl: Story = (args: any) => {
49
49
  resolve(statelistData);
50
50
  });
51
51
  }
52
- };
52
+ } as any;
53
53
  };
54
54
 
55
55
  const props = {
@@ -19,7 +19,7 @@ type Story = StoryObj<typeof PegaDxilMyPage>;
19
19
 
20
20
  export const BasePegaDxilMyPage: Story = (args: any) => {
21
21
  if (!window.PCore) {
22
- window.PCore = {};
22
+ window.PCore = {} as any;
23
23
  }
24
24
 
25
25
  window.PCore.getLocaleUtils = () => {
@@ -27,7 +27,7 @@ export const BasePegaDxilMyPage: Story = (args: any) => {
27
27
  getLocaleValue: (val: any) => {
28
28
  return val;
29
29
  }
30
- };
30
+ } as any;
31
31
  };
32
32
 
33
33
  const configProps = pyHome1Resolved.children[0].children[0].config;
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyPageCaseWidget>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  window.PCore.getLocaleUtils = () => {
@@ -23,7 +23,7 @@ window.PCore.getLocaleUtils = () => {
23
23
  getLocaleValue: (value: any) => {
24
24
  return value;
25
25
  }
26
- };
26
+ } as any;
27
27
  };
28
28
 
29
29
  window.PCore.getUserApi = () => {
@@ -33,7 +33,7 @@ window.PCore.getUserApi = () => {
33
33
  resolve(operatorDetails);
34
34
  });
35
35
  }
36
- };
36
+ } as any;
37
37
  };
38
38
 
39
39
  export const BasePegaDxilMyPageCaseWidget: Story = (args: any) => {
@@ -17,7 +17,7 @@ export default meta;
17
17
  type Story = StoryObj<typeof PegaDxilMyPageWidget>;
18
18
 
19
19
  if (!window.PCore) {
20
- window.PCore = {};
20
+ window.PCore = {} as any;
21
21
  }
22
22
 
23
23
  const worklistData = {
@@ -59,7 +59,7 @@ export const BasePegaDxilMyPageWidget: Story = (args: any) => {
59
59
  resolve(worklistData);
60
60
  });
61
61
  }
62
- };
62
+ } as any;
63
63
  };
64
64
 
65
65
  const props = {
@@ -20,7 +20,7 @@ export default meta;
20
20
  type Story = StoryObj<typeof PegaDxilMyTwoColumnDetails>;
21
21
 
22
22
  if (!window.PCore) {
23
- window.PCore = {};
23
+ window.PCore = {} as any;
24
24
  }
25
25
 
26
26
  window.PCore.getLocaleUtils = () => {
@@ -28,7 +28,7 @@ window.PCore.getLocaleUtils = () => {
28
28
  getLocaleValue: (value: any) => {
29
29
  return value;
30
30
  }
31
- };
31
+ } as any;
32
32
  };
33
33
 
34
34
  window.PCore.getUserApi = () => {
@@ -38,7 +38,7 @@ window.PCore.getUserApi = () => {
38
38
  resolve(operatorDetails);
39
39
  });
40
40
  }
41
- };
41
+ } as any;
42
42
  };
43
43
 
44
44
  const Region = (props: any) => {
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyCaseWidget>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  export const BasePegaDxilMyCaseWidget: Story = (args: any) => {
@@ -25,7 +25,7 @@ export const BasePegaDxilMyCaseWidget: Story = (args: any) => {
25
25
  CASE_INFO: {
26
26
  CASE_INFO_ID: 'caseInfo.ID'
27
27
  }
28
- };
28
+ } as any;
29
29
  };
30
30
 
31
31
  window.PCore.getLocaleUtils = () => {
@@ -33,7 +33,7 @@ export const BasePegaDxilMyCaseWidget: Story = (args: any) => {
33
33
  getLocaleValue: (value: any) => {
34
34
  return value;
35
35
  }
36
- };
36
+ } as any;
37
37
  };
38
38
 
39
39
  window.PCore.getDataApiUtils = () => {
@@ -43,7 +43,7 @@ export const BasePegaDxilMyCaseWidget: Story = (args: any) => {
43
43
  resolve(historyData);
44
44
  });
45
45
  }
46
- };
46
+ } as any;
47
47
  };
48
48
 
49
49
  const props = {
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyDate>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  window.PCore.getEnvironmentInfo = () => {
@@ -26,7 +26,7 @@ window.PCore.getEnvironmentInfo = () => {
26
26
  getLocale: () => {
27
27
  return 'en-GB';
28
28
  }
29
- };
29
+ } as any;
30
30
  };
31
31
 
32
32
  export const BasePegaDxilMyDate: Story = args => {
@@ -14,7 +14,7 @@ type Story = StoryObj<typeof PegaDxilMyDateTime>;
14
14
 
15
15
 
16
16
  if (!window.PCore) {
17
- window.PCore = {};
17
+ window.PCore = {} as any;
18
18
  }
19
19
 
20
20
  window.PCore.getEnvironmentInfo = () => {
@@ -25,7 +25,7 @@ window.PCore.getEnvironmentInfo = () => {
25
25
  getLocale: () => {
26
26
  return 'en-GB';
27
27
  }
28
- };
28
+ } as any;
29
29
  };
30
30
 
31
31
  export const BasePegaDxilMyDateTime: Story = (args: any) => {
@@ -21,7 +21,7 @@ export default meta;
21
21
  type Story = StoryObj<typeof PegaDxilMyDetails>;
22
22
 
23
23
  if (!window.PCore) {
24
- window.PCore = {};
24
+ window.PCore = {} as any;
25
25
  }
26
26
 
27
27
  window.PCore.getLocaleUtils = () => {
@@ -29,7 +29,7 @@ window.PCore.getLocaleUtils = () => {
29
29
  getLocaleValue: (value: any) => {
30
30
  return value;
31
31
  }
32
- };
32
+ } as any;
33
33
  };
34
34
 
35
35
  window.PCore.getUserApi = () => {
@@ -39,7 +39,7 @@ window.PCore.getUserApi = () => {
39
39
  resolve(operatorDetails);
40
40
  });
41
41
  }
42
- };
42
+ } as any;
43
43
  };
44
44
 
45
45
  const Region = (props: any) => {
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyIconButtonUrl>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  const statelistData = {
@@ -49,7 +49,7 @@ export const BasePegaDxilMyIconButtonUrl: Story = (args: any) => {
49
49
  resolve(statelistData);
50
50
  });
51
51
  }
52
- };
52
+ } as any;
53
53
  };
54
54
 
55
55
  const props = {
@@ -19,7 +19,7 @@ type Story = StoryObj<typeof PegaDxilMyPage>;
19
19
 
20
20
  export const BasePegaDxilMyPage: Story = (args: any) => {
21
21
  if (!window.PCore) {
22
- window.PCore = {};
22
+ window.PCore = {} as any;
23
23
  }
24
24
 
25
25
  window.PCore.getLocaleUtils = () => {
@@ -27,7 +27,7 @@ export const BasePegaDxilMyPage: Story = (args: any) => {
27
27
  getLocaleValue: (val: any) => {
28
28
  return val;
29
29
  }
30
- };
30
+ } as any;
31
31
  };
32
32
 
33
33
  const configProps = pyHome1Resolved.children[0].children[0].config;
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyPageCaseWidget>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  window.PCore.getLocaleUtils = () => {
@@ -23,7 +23,7 @@ window.PCore.getLocaleUtils = () => {
23
23
  getLocaleValue: (value: any) => {
24
24
  return value;
25
25
  }
26
- };
26
+ } as any;
27
27
  };
28
28
 
29
29
  window.PCore.getUserApi = () => {
@@ -33,7 +33,7 @@ window.PCore.getUserApi = () => {
33
33
  resolve(operatorDetails);
34
34
  });
35
35
  }
36
- };
36
+ } as any;
37
37
  };
38
38
 
39
39
  export const BasePegaDxilMyPageCaseWidget: Story = (args: any) => {
@@ -17,7 +17,7 @@ export default meta;
17
17
  type Story = StoryObj<typeof PegaDxilMyPageWidget>;
18
18
 
19
19
  if (!window.PCore) {
20
- window.PCore = {};
20
+ window.PCore = {} as any;
21
21
  }
22
22
 
23
23
  const worklistData = {
@@ -59,7 +59,7 @@ export const BasePegaDxilMyPageWidget: Story = (args: any) => {
59
59
  resolve(worklistData);
60
60
  });
61
61
  }
62
- };
62
+ } as any;
63
63
  };
64
64
 
65
65
  const props = {
@@ -20,7 +20,7 @@ export default meta;
20
20
  type Story = StoryObj<typeof PegaDxilMyTwoColumnDetails>;
21
21
 
22
22
  if (!window.PCore) {
23
- window.PCore = {};
23
+ window.PCore = {} as any;
24
24
  }
25
25
 
26
26
  window.PCore.getLocaleUtils = () => {
@@ -28,7 +28,7 @@ window.PCore.getLocaleUtils = () => {
28
28
  getLocaleValue: (value: any) => {
29
29
  return value;
30
30
  }
31
- };
31
+ } as any;
32
32
  };
33
33
 
34
34
  window.PCore.getUserApi = () => {
@@ -38,7 +38,7 @@ window.PCore.getUserApi = () => {
38
38
  resolve(operatorDetails);
39
39
  });
40
40
  }
41
- };
41
+ } as any;
42
42
  };
43
43
 
44
44
  const Region = (props: any) => {
@@ -15,7 +15,7 @@ export default meta;
15
15
  type Story = StoryObj<typeof PegaDxilMyCaseWidget>;
16
16
 
17
17
  if (!window.PCore) {
18
- window.PCore = {};
18
+ window.PCore = {} as any;
19
19
  }
20
20
 
21
21
  window.PCore.getConstants = () => {
@@ -23,7 +23,7 @@ window.PCore.getConstants = () => {
23
23
  CASE_INFO: {
24
24
  CASE_INFO_ID: 'caseInfo.ID'
25
25
  }
26
- };
26
+ } as any;
27
27
  };
28
28
 
29
29
  window.PCore.getLocaleUtils = () => {
@@ -31,7 +31,7 @@ window.PCore.getLocaleUtils = () => {
31
31
  getLocaleValue: (value: any) => {
32
32
  return value;
33
33
  }
34
- };
34
+ } as any;
35
35
  };
36
36
 
37
37
  window.PCore.getDataApiUtils = () => {
@@ -41,7 +41,7 @@ window.PCore.getDataApiUtils = () => {
41
41
  resolve(historyData);
42
42
  });
43
43
  }
44
- };
44
+ } as any;
45
45
  };
46
46
 
47
47
  export const BasePegaDxilMyCaseWidget: Story = (args: any) => {