@pega/custom-dx-components 0.25.22 → 0.25.24

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 (159) hide show
  1. package/package.json +1 -1
  2. package/src/tasks/build-jest-assets/index.js +0 -1
  3. package/src/tasks/build-lib/helper.js +0 -2
  4. package/src/tasks/build-lib/index.js +3 -3
  5. package/src/tasks/create/index.js +5 -1
  6. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +1 -0
  7. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +1 -0
  8. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +1 -0
  9. package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +1 -0
  10. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +1 -0
  11. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +1 -0
  12. package/src/tasks/create/templates/Constellation/Field/Icon-Button-URL/config.json.mustache +1 -0
  13. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +1 -0
  14. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +1 -0
  15. package/src/tasks/create/templates/Constellation/Field/Picklist-Autocomplete/config.json.mustache +1 -0
  16. package/src/tasks/create/templates/Constellation/Field/Picklist-RadioButtons/config.json.mustache +1 -0
  17. package/src/tasks/create/templates/Constellation/Field/Text/config.json.mustache +1 -0
  18. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +1 -0
  19. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +1 -0
  20. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +1 -0
  21. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +1 -0
  22. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +1 -0
  23. package/src/tasks/create/templates/Constellation/Field/TimeofDay/config.json.mustache +1 -0
  24. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +1 -0
  25. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +1 -0
  26. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +1 -0
  27. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +1 -0
  28. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +1 -0
  29. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +1 -0
  30. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +1 -0
  31. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +1 -0
  32. package/src/tasks/create/templates/Launchpad/Field/Icon-Button-URL/config.json.mustache +1 -0
  33. package/src/tasks/create/templates/Launchpad/Widget/CASE/config.json.mustache +1 -0
  34. package/src/tasks/create/templates/Launchpad/Widget/PAGE/config.json.mustache +1 -0
  35. package/src/tasks/create/templates/Launchpad/Widget/PAGE-CASE/config.json.mustache +1 -0
  36. package/src/tasks/create-all/index.js +5 -1
  37. package/src/tasks/delete/helper.js +0 -1
  38. package/src/tasks/delete/index.js +5 -1
  39. package/src/tasks/delete-lib/helper.js +0 -1
  40. package/src/tasks/delete-pub/helper.js +7 -2
  41. package/src/tasks/delete-version/index.js +0 -1
  42. package/src/tasks/export-archive/helper.js +7 -1
  43. package/src/tasks/export-archive/index.js +10 -34
  44. package/src/tasks/import-archive/helper.js +19 -5
  45. package/src/tasks/import-archive/index.js +247 -35
  46. package/src/tasks/import-comp/helper.js +0 -2
  47. package/src/tasks/init/template/package.json.mustache +1 -1
  48. package/src/tasks/init/template/tasks.config.json +1 -1
  49. package/src/tasks/list/helper.js +17 -2
  50. package/src/tasks/list-lib/index.js +10 -1
  51. package/src/tasks/list-pub/helper.js +2 -4
  52. package/src/tasks/list-pub/index.js +15 -2
  53. package/src/tasks/publish/helper.js +0 -1
  54. package/src/tasks/publish/index.js +13 -1
  55. package/src/tasks/publish-all/index.js +10 -1
  56. package/src/tasks/publish-archive/index.js +53 -83
  57. package/src/tasks/publish-lib/index.js +0 -23
  58. package/src/tasks/rename/index.js +9 -1
  59. package/src/tasks/restore/index.js +19 -13
  60. package/src/tasks/set-perm/index.js +0 -2
  61. package/src/tasks/show-help/index.js +1 -5
  62. package/src/tasks/show-status/index.js +19 -6
  63. package/src/tasks/store/index.js +39 -18
  64. package/src/tasks/switch-lib/helper.js +0 -1
  65. package/src/tasks/validator/index.js +10 -5
  66. package/src/util.js +21 -77
  67. package/tests/assets/library/components/create/Pega_DXIL_MyTestText/config.json +1 -0
  68. package/tests/assets/library/components/create/shared/create-nonce.ts +1 -0
  69. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -0
  70. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -0
  71. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -0
  72. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -0
  73. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDate/date.ts +0 -24
  74. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -0
  75. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -0
  76. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -0
  77. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -0
  78. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -0
  79. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -0
  80. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -0
  81. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -0
  82. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
  83. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -0
  84. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -0
  85. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -0
  86. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -0
  87. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -0
  88. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -0
  89. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -0
  90. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MySearchbox/repeat-utils.ts +0 -4
  91. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -0
  92. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -0
  93. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -0
  94. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
  95. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
  96. package/tests/assets/library/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -0
  97. package/tests/assets/library/components/createAll/Constellation/shared/create-nonce.ts +1 -0
  98. package/tests/assets/original/components/create/Pega_DXIL_MyTestText/config.json +1 -0
  99. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyBoolean/config.json +1 -0
  100. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCaseWidget/config.json +1 -0
  101. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyCurrency/config.json +1 -0
  102. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDate/config.json +1 -0
  103. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDateTime/config.json +1 -0
  104. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDecimal/config.json +1 -0
  105. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyDetails/config.json +1 -0
  106. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyEmail/config.json +1 -0
  107. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyForm/config.json +1 -0
  108. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyIconButtonURL/config.json +1 -0
  109. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyInteger/config.json +1 -0
  110. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPage/config.json +1 -0
  111. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
  112. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPageWidget/config.json +1 -0
  113. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyParagraph/config.json +1 -0
  114. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPercentage/config.json +1 -0
  115. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPhone/config.json +1 -0
  116. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyPicklist/config.json +1 -0
  117. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyRadiobuttons/config.json +1 -0
  118. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MySearchbox/config.json +1 -0
  119. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyText/config.json +1 -0
  120. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTextInput/config.json +1 -0
  121. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTimeOfDay/config.json +1 -0
  122. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
  123. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
  124. package/tests/assets/original/components/createAll/Constellation/Pega_DXIL_MyURL/config.json +1 -0
  125. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyBoolean/config.json +1 -0
  126. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCaseWidget/config.json +1 -0
  127. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyCurrency/config.json +1 -0
  128. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDate/config.json +1 -0
  129. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDateTime/config.json +1 -0
  130. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDecimal/config.json +1 -0
  131. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyDetails/config.json +1 -0
  132. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyEmail/config.json +1 -0
  133. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyForm/config.json +1 -0
  134. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyIconButtonURL/config.json +1 -0
  135. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyInteger/config.json +1 -0
  136. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPage/config.json +1 -0
  137. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageCaseWidget/config.json +1 -0
  138. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPageWidget/config.json +1 -0
  139. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyParagraph/config.json +1 -0
  140. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPercentage/config.json +1 -0
  141. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPhone/config.json +1 -0
  142. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyPicklist/config.json +1 -0
  143. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyRadiobuttons/config.json +1 -0
  144. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MySearchbox/config.json +1 -0
  145. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyText/config.json +1 -0
  146. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTextInput/config.json +1 -0
  147. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTimeOfDay/config.json +1 -0
  148. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnDetails/config.json +1 -0
  149. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyTwoColumnForm/config.json +1 -0
  150. package/tests/assets/original/components/createAll/Launchpad/Pega_DXIL_MyURL/config.json +1 -0
  151. package/tests/functional/localCreateBuildAllDeleteAll.test.js +8 -8
  152. package/tests/functional/localCreateBuildDelete.test.js +8 -8
  153. package/tests/functional/localCreateListDelete.test.js +8 -8
  154. package/tests/functional/localCreatePublishAllDeleteAll.test.js +8 -8
  155. package/tests/functional/localCreatePublishDelete.test.js +8 -8
  156. package/tests/functional/localCreateRenameDelete.test.js +8 -8
  157. package/tests/functional/localLibCreateLibBuildLibDeleteLib.test.js +1 -1
  158. package/tests/functional/localLibCreateLibBuildLibListPubDeleteLib.test.js +1 -1
  159. package/tests/functional/localLibCreateLibStoreRestoreDeleteLib.test.js +376 -0
package/src/util.js CHANGED
@@ -36,6 +36,7 @@ import {
36
36
  SHARED_DIRECTORY,
37
37
  SHOW_DEBUG,
38
38
  COMPONENTS_PATH,
39
+ COMPONENT_SCHEMA,
39
40
  ARCHIVES_PATH,
40
41
  BIN_ARCHIVES_PATH,
41
42
  TEMP_PATH,
@@ -302,14 +303,6 @@ if (showDebug) addDebugLog("applyPegaData", "", "");
302
303
  // let currentPackageData;
303
304
  let currentPackageLockData;
304
305
 
305
- // try {
306
- // currentPackageData = fs.readFileSync(currentPackagePath);
307
- // }
308
- // catch (ex) {
309
- // console.log(chalk.red(`\nUnable to retrieve current package.json.`));
310
- // process.exit(1);
311
- // }
312
-
313
306
  try {
314
307
  currentPackageLockData = fs.readFileSync(currentPackageLockPath);
315
308
  }
@@ -401,32 +394,6 @@ export const getApplicationAndVersionFromToken = async() => {
401
394
 
402
395
  export const getLibraryBased = () => {
403
396
  if (showDebug) addDebugLog("getLibraryBased", "", "");
404
- // const currentDirectory = process.cwd();
405
- // const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
406
-
407
- // try {
408
- // // force to throw error and not console log
409
- // await checkPathAccess(pegaConfigJsonPath, {}, true);
410
- // }
411
- // catch (ex) {
412
- // // when can't find it, always be false, assume no library based.
413
- // // This is IMPORTANT for init (npx install)
414
- // return false;
415
- // }
416
-
417
- // let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
418
- // data = JSON.parse(data);
419
-
420
- // if (data[LIBRARY_BASED]) {
421
- // if (showDebug) addDebugLog("getLibraryBased", `based: ${data[LIBRARY_BASED]}`, "");
422
- // if (showDebug) addDebugLog("getLibraryBased", "END", "-");
423
- // return data[LIBRARY_BASED];
424
- // }
425
- // else {
426
- // if (showDebug) addDebugLog("getLibraryBased", "END", "-");
427
- // return false;
428
- // }
429
-
430
397
  return defaultConfigs.isLibraryBased;
431
398
  }
432
399
 
@@ -525,26 +492,7 @@ export const setLibraryBasedCL = async (isLibraryBasedCL) => {
525
492
  }
526
493
 
527
494
  export const getShowDebug = () => {
528
- // const currentDirectory = process.cwd();
529
- // const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
530
-
531
- // try {
532
- // // force to throw error and not console log
533
- // await checkPathAccess(pegaConfigJsonPath, {}, true);
534
- // }
535
- // catch (ex) {
536
- // // when can't find it, always be false, assume no library based.
537
- // // This is IMPORTANT for init (npx install)
538
- // return false;
539
- // }
540
-
541
- // let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
542
- // data = JSON.parse(data);
543
-
544
- // if (data[SHOW_DEBUG]) {
545
- // return data[SHOW_DEBUG];
546
- // }
547
- // else return false;
495
+
548
496
  return defaultConfigs.showDebug;
549
497
 
550
498
  }
@@ -924,8 +872,11 @@ if (showDebug) addDebugLog("getPegaServerConfig", "", "+");
924
872
 
925
873
  if (OAuthData) {
926
874
  const oOAuthData = JSON.parse(OAuthData);
927
- const isolationId = oOAuthData["isolation-ids"].write;
928
- pegaConfig['server-config'].isolationId = isolationId[0];
875
+ if (oOAuthData["isolation-ids"]) {
876
+ const isolationId = oOAuthData["isolation-ids"].write;
877
+ pegaConfig['server-config'].isolationId = isolationId[0];
878
+ }
879
+
929
880
  }
930
881
 
931
882
  }
@@ -1267,12 +1218,6 @@ export const showVersion = async () => {
1267
1218
  process.exit(1);
1268
1219
  }
1269
1220
 
1270
- // const hasGit = checkGit(process.cwd());
1271
-
1272
- // if (!hasGit) {
1273
- // console.log(chalk.redBright('DX Component Builder - Git needs to be installed.'));
1274
- // process.exit(1);
1275
- // }
1276
1221
  };
1277
1222
 
1278
1223
  export const getOOTBComponents = async () => {
@@ -2534,21 +2479,6 @@ if (showDebug) addDebugLog("checkLibraryAndArchives", ``, "");
2534
2479
 
2535
2480
  export const hasLibraryAndVersion = async (libraryName, version, devBuild) => {
2536
2481
  if (showDebug) addDebugLog("hasLibraryAndVersion", `libraryName: ${libraryName}, version: ${version}, devBuild: ${devBuild}`, "");
2537
- // const orgLib = getConfigDefaults();
2538
- // const currentOrgLib = `${orgLib.organization}_${libraryName}`;
2539
- // const libFiles = await getLibraryArchivesFiles(currentOrgLib);
2540
- // let currentVersion = version;
2541
- // if (devBuild) {
2542
- // currentVersion = currentVersion.concat("-dev");
2543
- // }
2544
- // const fileName = `${currentOrgLib}_${currentVersion}.zip`;
2545
- // if (libFiles && libFiles.length > 0) {
2546
- // if (libFiles.includes(fileName)) {
2547
- // return true;
2548
- // }
2549
- // }
2550
-
2551
- // return false;
2552
2482
 
2553
2483
  const orgLib = getConfigDefaults();
2554
2484
  const currentOrgLib = `${orgLib.organization}_${libraryName}`;
@@ -2683,6 +2613,20 @@ if (showDebug) addDebugLog("getJestFunctionalTestList", ``, "");
2683
2613
 
2684
2614
  }
2685
2615
 
2616
+ export const getSubTypeLabel = (type, subtype) => {
2617
+ const subTypeList = COMPONENT_SCHEMA.subtype;
2618
+ const typeList = subTypeList[type.toLowerCase()];
2619
+
2620
+ for (let i in typeList) {
2621
+ if (typeList[i]['value'] === subtype) {
2622
+ const label = typeList[i]['name'].replace("&", "and");
2623
+ return label;
2624
+ }
2625
+ }
2626
+
2627
+ return "";
2628
+ }
2629
+
2686
2630
 
2687
2631
  // init
2688
2632
  await forceDefaultsUpdate();
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyTestText",
10
10
  "type": "Field",
11
11
  "subtype": "Text",
12
+ "subtypeLabel": "Text",
12
13
  "properties": [
13
14
  {
14
15
  "name": "label",
@@ -2,5 +2,6 @@
2
2
  // @ts-ignore
3
3
  if (window?.__webpack_nonce__) {
4
4
  // @ts-ignore
5
+ // eslint-disable-next-line no-undef
5
6
  __webpack_nonce__ = window.__webpack_nonce__;
6
7
  }
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyBoolean",
10
10
  "type": "Field",
11
11
  "subtype": "Boolean",
12
+ "subtypeLabel": "Boolean",
12
13
  "icon": "images/pz-checkbox-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyCaseWidget",
10
10
  "type": "Widget",
11
11
  "subtype": "CASE",
12
+ "subtypeLabel": "CASE",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyCurrency",
10
10
  "type": "Field",
11
11
  "subtype": "Decimal-Currency",
12
+ "subtypeLabel": "Currency",
12
13
  "icon": "images/pz-currency-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyDate",
10
10
  "type": "Field",
11
11
  "subtype": "Date",
12
+ "subtypeLabel": "Date",
12
13
  "icon": "images/pz-date-time-active.svg",
13
14
  "properties": [
14
15
  {
@@ -381,30 +381,6 @@ export function format(value, type, options) {
381
381
  let formattedValue;
382
382
 
383
383
  switch (type?.toLowerCase()) {
384
- case 'currency': {
385
- const defaultOptions = {
386
- locale: getLocale(),
387
- position: 'before',
388
- decPlaces: 2
389
- };
390
- const params = { ...defaultOptions, ...options };
391
- formattedValue = Currency.Currency(value, params);
392
- break;
393
- }
394
-
395
- case 'decimal': {
396
- const defaultOptions = { locale: getLocale(), decPlaces: 2 };
397
- const params = { ...defaultOptions, ...options };
398
- formattedValue = Currency.Decimal(value, params);
399
- break;
400
- }
401
-
402
- case 'integer': {
403
- const defaultOptions = { locale: getLocale() };
404
- const params = { ...defaultOptions, ...options };
405
- formattedValue = Currency.Integer(value, params);
406
- break;
407
- }
408
384
 
409
385
  case 'date': {
410
386
  const defaultOptions = {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyDateTime",
10
10
  "type": "Field",
11
11
  "subtype": "DateTime",
12
+ "subtypeLabel": "DateTime",
12
13
  "icon": "images/pz-text-input-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyDecimal",
10
10
  "type": "Field",
11
11
  "subtype": "Decimal",
12
+ "subtypeLabel": "Decimal",
12
13
  "icon": "images/pz-decimal-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyDetails",
10
10
  "type": "Template",
11
11
  "subtype": "DETAILS",
12
+ "subtypeLabel": "DETAILS",
12
13
  "icon": "OneColumnDetails.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyEmail",
10
10
  "type": "Field",
11
11
  "subtype": "Text-Email",
12
+ "subtypeLabel": "Email",
12
13
  "icon": "images/pz-email-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyForm",
10
10
  "type": "Template",
11
11
  "subtype": "FORM",
12
+ "subtypeLabel": "FORM",
12
13
  "icon": "DefaultForm.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyIconButtonURL",
10
10
  "type": "Field",
11
11
  "subtype": "Text-URL",
12
+ "subtypeLabel": "Icon Button URL",
12
13
  "icon": "images/pz-url-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyInteger",
10
10
  "type": "Field",
11
11
  "subtype": "Integer",
12
+ "subtypeLabel": "Integer",
12
13
  "properties": [
13
14
  {
14
15
  "name": "label",
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPage",
10
10
  "type": "Template",
11
11
  "subtype": "PAGE",
12
+ "subtypeLabel": "PAGE",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPageCaseWidget",
10
10
  "type": "Widget",
11
11
  "subtype": ["PAGE","CASE"],
12
+ "subtypeLabel": "PAGE and CASE",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPageWidget",
10
10
  "type": "Widget",
11
11
  "subtype": "PAGE",
12
+ "subtypeLabel": "PAGE",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyParagraph",
10
10
  "type": "Field",
11
11
  "subtype": "Text-Paragraph",
12
+ "subtypeLabel": "Paragraph",
12
13
  "icon": "images/pz-text-area-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPercentage",
10
10
  "type": "Field",
11
11
  "subtype": "Decimal-Percentage",
12
+ "subtypeLabel": "Percentage",
12
13
  "icon": "images/pz-text-input-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPhone",
10
10
  "type": "Field",
11
11
  "subtype": "Text-Phone",
12
+ "subtypeLabel": "Phone",
12
13
  "icon": "images/pz-phone-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPicklist",
10
10
  "type": "Field",
11
11
  "subtype": "Picklist",
12
+ "subtypeLabel": "Picklist",
12
13
  "icon": "images/pz-dropdown-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyRadiobuttons",
10
10
  "type": "Field",
11
11
  "subtype": "Picklist",
12
+ "subtypeLabel": "Radio buttons",
12
13
  "icon": "images/pz-dropdown-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MySearchbox",
10
10
  "type": "Field",
11
11
  "subtype": "Picklist",
12
+ "subtypeLabel": "Search box",
12
13
  "icon": "images/pz-dropdown-active.svg",
13
14
  "properties": [
14
15
  {
@@ -165,10 +165,6 @@ export function updateWithTimeZone(stateFromTable, meta) {
165
165
  return stateFromTable;
166
166
  }
167
167
 
168
- export function isHybrid() {
169
- return typeof pega !== 'undefined' && typeof pega.desktop !== 'undefined';
170
- }
171
-
172
168
  export const isPageListInPath = (propertyName, currentClassID) => {
173
169
  if (!propertyName.includes('.')) {
174
170
  return false;
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyText",
10
10
  "type": "Field",
11
11
  "subtype": "Text",
12
+ "subtypeLabel": "Text",
12
13
  "properties": [
13
14
  {
14
15
  "name": "label",
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyTextInput",
10
10
  "type": "Field",
11
11
  "subtype": "Text",
12
+ "subtypeLabel": "Text",
12
13
  "icon": "images/pz-text-input-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyTimeOfDay",
10
10
  "type": "Field",
11
11
  "subtype": "TimeOfDay",
12
+ "subtypeLabel": "TimeOfDay",
12
13
  "icon": "images/pz-date-time-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyTwoColumnDetails",
10
10
  "type": "Template",
11
11
  "subtype": "DETAILS",
12
+ "subtypeLabel": "DETAILS region",
12
13
  "icon": "TwoColumnDetails.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyTwoColumnForm",
10
10
  "type": "Template",
11
11
  "subtype": "FORM",
12
+ "subtypeLabel": "FORM region",
12
13
  "icon": "TwoColumn.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyURL",
10
10
  "type": "Field",
11
11
  "subtype": "Text-URL",
12
+ "subtypeLabel": "URL",
12
13
  "icon": "images/pz-url-active.svg",
13
14
  "properties": [
14
15
  {
@@ -2,5 +2,6 @@
2
2
  // @ts-ignore
3
3
  if (window?.__webpack_nonce__) {
4
4
  // @ts-ignore
5
+ // eslint-disable-next-line no-undef
5
6
  __webpack_nonce__ = window.__webpack_nonce__;
6
7
  }
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyTestText",
10
10
  "type": "Field",
11
11
  "subtype": "Text",
12
+ "subtypeLabel": "Text",
12
13
  "properties": [
13
14
  {
14
15
  "name": "label",
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyBoolean",
10
10
  "type": "Field",
11
11
  "subtype": "Boolean",
12
+ "subtypeLabel": "Boolean",
12
13
  "icon": "images/pz-checkbox-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyCaseWidget",
10
10
  "type": "Widget",
11
11
  "subtype": "CASE",
12
+ "subtypeLabel": "CASE",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyCurrency",
10
10
  "type": "Field",
11
11
  "subtype": "Decimal-Currency",
12
+ "subtypeLabel": "Currency",
12
13
  "icon": "images/pz-currency-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyDate",
10
10
  "type": "Field",
11
11
  "subtype": "Date",
12
+ "subtypeLabel": "Date",
12
13
  "icon": "images/pz-date-time-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyDateTime",
10
10
  "type": "Field",
11
11
  "subtype": "DateTime",
12
+ "subtypeLabel": "DateTime",
12
13
  "icon": "images/pz-text-input-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyDecimal",
10
10
  "type": "Field",
11
11
  "subtype": "Decimal",
12
+ "subtypeLabel": "Decimal",
12
13
  "icon": "images/pz-decimal-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyDetails",
10
10
  "type": "Template",
11
11
  "subtype": "DETAILS",
12
+ "subtypeLabel": "DETAILS",
12
13
  "icon": "OneColumnDetails.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyEmail",
10
10
  "type": "Field",
11
11
  "subtype": "Text-Email",
12
+ "subtypeLabel": "Email",
12
13
  "icon": "images/pz-email-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyForm",
10
10
  "type": "Template",
11
11
  "subtype": "FORM",
12
+ "subtypeLabel": "FORM",
12
13
  "icon": "DefaultForm.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyIconButtonURL",
10
10
  "type": "Field",
11
11
  "subtype": "Text-URL",
12
+ "subtypeLabel": "Icon Button URL",
12
13
  "icon": "images/pz-url-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyInteger",
10
10
  "type": "Field",
11
11
  "subtype": "Integer",
12
+ "subtypeLabel": "Integer",
12
13
  "properties": [
13
14
  {
14
15
  "name": "label",
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPage",
10
10
  "type": "Template",
11
11
  "subtype": "PAGE",
12
+ "subtypeLabel": "PAGE",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPageCaseWidget",
10
10
  "type": "Widget",
11
11
  "subtype": ["PAGE","CASE"],
12
+ "subtypeLabel": "PAGE and CASE",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPageWidget",
10
10
  "type": "Widget",
11
11
  "subtype": "PAGE",
12
+ "subtypeLabel": "PAGE",
12
13
  "icon": "OneColumnPage.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyParagraph",
10
10
  "type": "Field",
11
11
  "subtype": "Text-Paragraph",
12
+ "subtypeLabel": "Paragraph",
12
13
  "icon": "images/pz-text-area-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPercentage",
10
10
  "type": "Field",
11
11
  "subtype": "Decimal-Percentage",
12
+ "subtypeLabel": "Percentage",
12
13
  "icon": "images/pz-text-input-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPhone",
10
10
  "type": "Field",
11
11
  "subtype": "Text-Phone",
12
+ "subtypeLabel": "Phone",
12
13
  "icon": "images/pz-phone-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyPicklist",
10
10
  "type": "Field",
11
11
  "subtype": "Picklist",
12
+ "subtypeLabel": "Picklist",
12
13
  "icon": "images/pz-dropdown-active.svg",
13
14
  "properties": [
14
15
  {
@@ -9,6 +9,7 @@
9
9
  "componentKey": "Pega_DXIL_MyRadiobuttons",
10
10
  "type": "Field",
11
11
  "subtype": "Picklist",
12
+ "subtypeLabel": "Radio buttons",
12
13
  "icon": "images/pz-dropdown-active.svg",
13
14
  "properties": [
14
15
  {