@pega/custom-dx-components 0.0.1 → 0.23.2

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 (234) hide show
  1. package/.vscode/extensions.json +1 -1
  2. package/README.md +6 -189
  3. package/package.json +34 -32
  4. package/src/auth.js +608 -0
  5. package/src/cli.js +42 -0
  6. package/src/constants.js +125 -8
  7. package/src/tasks/authenticate/helper.js +91 -8
  8. package/src/tasks/authenticate/index.js +169 -49
  9. package/src/tasks/build/helper.js +122 -0
  10. package/src/tasks/build/index.js +54 -0
  11. package/src/tasks/build-all/helper.js +70 -0
  12. package/src/tasks/build-all/index.js +79 -0
  13. package/src/tasks/{publish/bundle → bundle}/builder/index.js +49 -5
  14. package/src/tasks/{publish/bundle → bundle}/builder/webpack.config.js +5 -3
  15. package/src/tasks/{publish/bundle → bundle}/index.js +2 -2
  16. package/src/tasks/create/index.js +87 -64
  17. package/src/tasks/create/templates/Constellation/Field/Boolean/Boolean.js.mustache +38 -0
  18. package/src/tasks/create/templates/Constellation/Field/Boolean/boolean-format.js.mustache +26 -0
  19. package/src/tasks/create/templates/Constellation/Field/Boolean/config.json.mustache +146 -0
  20. package/src/tasks/create/templates/Constellation/Field/Boolean/demo.stories.jsx.mustache +61 -0
  21. package/src/tasks/create/templates/Constellation/Field/Boolean/event-utils.js.mustache +18 -0
  22. package/src/tasks/create/templates/Constellation/Field/Boolean/index.jsx.mustache +170 -0
  23. package/src/tasks/create/templates/Constellation/Field/Boolean/mock.stories.js.mustache +21 -0
  24. package/src/tasks/create/templates/Constellation/Field/Boolean/styles.js.mustache +7 -0
  25. package/src/tasks/create/templates/Constellation/Field/Date/DateFormatter.js.mustache +61 -0
  26. package/src/tasks/create/templates/Constellation/Field/Date/FormattedText.jsx.mustache +41 -0
  27. package/src/tasks/create/templates/Constellation/Field/Date/config.json.mustache +196 -0
  28. package/src/tasks/create/templates/Constellation/Field/Date/date.js.mustache +439 -0
  29. package/src/tasks/create/templates/Constellation/Field/Date/demo.stories.jsx.mustache +73 -0
  30. package/src/tasks/create/templates/Constellation/Field/Date/index.jsx.mustache +256 -0
  31. package/src/tasks/create/templates/Constellation/Field/Date/mock.stories.js.mustache +23 -0
  32. package/src/tasks/create/templates/Constellation/Field/Date/styles.js.mustache +7 -0
  33. package/src/tasks/create/templates/Constellation/Field/Date/suggestions-handler.js +10 -0
  34. package/src/tasks/create/templates/Constellation/Field/DateTime/config.json.mustache +257 -0
  35. package/src/tasks/create/templates/Constellation/Field/DateTime/date-time.js.mustache +92 -0
  36. package/src/tasks/create/templates/Constellation/Field/DateTime/date-utils.js.mustache +287 -0
  37. package/src/tasks/create/templates/Constellation/Field/DateTime/date.js.mustache +328 -0
  38. package/src/tasks/create/templates/Constellation/Field/DateTime/demo.stories.jsx.mustache +73 -0
  39. package/src/tasks/create/templates/Constellation/Field/DateTime/index.jsx.mustache +254 -0
  40. package/src/tasks/create/templates/Constellation/Field/DateTime/mock.stories.js.mustache +23 -0
  41. package/src/tasks/create/templates/Constellation/Field/DateTime/styles.js.mustache +7 -0
  42. package/src/tasks/create/templates/Constellation/Field/DateTime/suggestions-handler.js +10 -0
  43. package/src/tasks/create/templates/Constellation/Field/Decimal/config.json.mustache +279 -0
  44. package/src/tasks/create/templates/Constellation/Field/Decimal/demo.stories.jsx.mustache +49 -0
  45. package/src/tasks/create/templates/Constellation/Field/Decimal/event-utils.js.mustache +18 -0
  46. package/src/tasks/create/templates/Constellation/Field/Decimal/index.jsx.mustache +273 -0
  47. package/src/tasks/create/templates/Constellation/Field/Decimal/mock.stories.js.mustache +21 -0
  48. package/src/tasks/create/templates/Constellation/Field/Decimal/styles.js.mustache +7 -0
  49. package/src/tasks/create/templates/Constellation/Field/Decimal/suggestions-handler.js +10 -0
  50. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/config.json.mustache +292 -0
  51. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/demo.stories.jsx.mustache +53 -0
  52. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/event-utils.js.mustache +18 -0
  53. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/index.jsx.mustache +299 -0
  54. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/mock.stories.js.mustache +23 -0
  55. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/styles.js.mustache +7 -0
  56. package/src/tasks/create/templates/Constellation/Field/Decimal-Currency/suggestions-handler.js +10 -0
  57. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/config.json.mustache +94 -0
  58. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/demo.stories.jsx.mustache +49 -0
  59. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/event-utils.js.mustache +18 -0
  60. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/index.jsx.mustache +281 -0
  61. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/mock.stories.js.mustache +21 -0
  62. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/styles.js.mustache +7 -0
  63. package/src/tasks/create/templates/Constellation/Field/Decimal-Percentage/suggestions-handler.js +10 -0
  64. package/src/tasks/create/templates/Constellation/Field/Integer/config.json.mustache +348 -0
  65. package/src/tasks/create/templates/Constellation/Field/Integer/demo.stories.jsx.mustache +49 -0
  66. package/src/tasks/create/templates/Constellation/Field/Integer/event-utils.js.mustache +18 -0
  67. package/src/tasks/create/templates/Constellation/Field/Integer/index.jsx.mustache +336 -0
  68. package/src/tasks/create/templates/Constellation/Field/Integer/mock.stories.js.mustache +21 -0
  69. package/src/tasks/create/templates/Constellation/Field/Integer/styles.js.mustache +7 -0
  70. package/src/tasks/create/templates/Constellation/Field/Integer/suggestions-handler.js +10 -0
  71. package/src/tasks/create/templates/Constellation/Field/Picklist/config.json.mustache +115 -0
  72. package/src/tasks/create/templates/Constellation/Field/Picklist/demo.stories.jsx.mustache +78 -0
  73. package/src/tasks/create/templates/Constellation/Field/Picklist/event-utils.js.mustache +18 -0
  74. package/src/tasks/create/templates/Constellation/Field/Picklist/index.jsx.mustache +351 -0
  75. package/src/tasks/create/templates/Constellation/Field/Picklist/mock.stories.js.mustache +67 -0
  76. package/src/tasks/create/templates/Constellation/Field/Picklist/styles.js.mustache +7 -0
  77. package/src/tasks/create/templates/Constellation/Field/Picklist/suggestions-handler.js +10 -0
  78. package/src/tasks/create/{template → templates/Constellation/Field/Text}/config.json.mustache +15 -5
  79. package/src/tasks/create/templates/Constellation/Field/Text/demo.stories.jsx.mustache +51 -0
  80. package/src/tasks/create/{template → templates/Constellation/Field/Text}/index.jsx.mustache +5 -0
  81. package/src/tasks/create/templates/Constellation/Field/Text/mock.stories.js.mustache +13 -0
  82. package/src/tasks/create/templates/Constellation/Field/Text/styles.js.mustache +7 -0
  83. package/src/tasks/create/templates/Constellation/Field/Text-Email/config.json.mustache +112 -0
  84. package/src/tasks/create/templates/Constellation/Field/Text-Email/demo.stories.jsx.mustache +48 -0
  85. package/src/tasks/create/templates/Constellation/Field/Text-Email/event-utils.js.mustache +18 -0
  86. package/src/tasks/create/templates/Constellation/Field/Text-Email/index.jsx.mustache +231 -0
  87. package/src/tasks/create/templates/Constellation/Field/Text-Email/mock.stories.js.mustache +22 -0
  88. package/src/tasks/create/templates/Constellation/Field/Text-Email/styles.js.mustache +7 -0
  89. package/src/tasks/create/templates/Constellation/Field/Text-Email/suggestions-handler.js +10 -0
  90. package/src/tasks/create/templates/Constellation/Field/Text-Input/StatusWork.jsx +26 -0
  91. package/src/tasks/create/templates/Constellation/Field/Text-Input/config.json.mustache +112 -0
  92. package/src/tasks/create/templates/Constellation/Field/Text-Input/demo.stories.jsx.mustache +48 -0
  93. package/src/tasks/create/templates/Constellation/Field/Text-Input/event-utils.js.mustache +18 -0
  94. package/src/tasks/create/templates/Constellation/Field/Text-Input/index.jsx.mustache +239 -0
  95. package/src/tasks/create/templates/Constellation/Field/Text-Input/mock.stories.js.mustache +21 -0
  96. package/src/tasks/create/templates/Constellation/Field/Text-Input/styles.js.mustache +7 -0
  97. package/src/tasks/create/templates/Constellation/Field/Text-Input/suggestions-handler.js +10 -0
  98. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/config.json.mustache +112 -0
  99. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/demo.stories.jsx.mustache +48 -0
  100. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/event-utils.js.mustache +18 -0
  101. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/index.jsx.mustache +231 -0
  102. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/mock.stories.js.mustache +20 -0
  103. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/styles.js.mustache +7 -0
  104. package/src/tasks/create/templates/Constellation/Field/Text-Paragraph/suggestions-handler.js +10 -0
  105. package/src/tasks/create/templates/Constellation/Field/Text-Phone/config.json.mustache +124 -0
  106. package/src/tasks/create/templates/Constellation/Field/Text-Phone/demo.stories.jsx.mustache +46 -0
  107. package/src/tasks/create/templates/Constellation/Field/Text-Phone/event-utils.js.mustache +18 -0
  108. package/src/tasks/create/templates/Constellation/Field/Text-Phone/index.jsx.mustache +267 -0
  109. package/src/tasks/create/templates/Constellation/Field/Text-Phone/mock.stories.js.mustache +37 -0
  110. package/src/tasks/create/templates/Constellation/Field/Text-Phone/styles.js.mustache +7 -0
  111. package/src/tasks/create/templates/Constellation/Field/Text-Phone/suggestions-handler.js +10 -0
  112. package/src/tasks/create/templates/Constellation/Field/Text-URL/config.json.mustache +238 -0
  113. package/src/tasks/create/templates/Constellation/Field/Text-URL/demo.stories.jsx.mustache +46 -0
  114. package/src/tasks/create/templates/Constellation/Field/Text-URL/event-utils.js.mustache +18 -0
  115. package/src/tasks/create/templates/Constellation/Field/Text-URL/index.jsx.mustache +232 -0
  116. package/src/tasks/create/templates/Constellation/Field/Text-URL/mock.stories.js.mustache +22 -0
  117. package/src/tasks/create/templates/Constellation/Field/Text-URL/styles.js.mustache +7 -0
  118. package/src/tasks/create/templates/Constellation/Field/Text-URL/suggestions-handler.js +10 -0
  119. package/src/tasks/create/templates/Constellation/Field/Text-URL/text-url.jsx.mustache +173 -0
  120. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/config.json.mustache +186 -0
  121. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/demo.stories.jsx.mustache +57 -0
  122. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/index.jsx.mustache +213 -0
  123. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/mock.stories.js.mustache +20 -0
  124. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/styles.js.mustache +7 -0
  125. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/suggestions-handler.js +10 -0
  126. package/src/tasks/create/templates/Constellation/Field/TimeOfDay/time-of-day.js.mustache +287 -0
  127. package/src/tasks/create/templates/Constellation/Template/DETAILS/OneColumnDetails.svg +22 -0
  128. package/src/tasks/create/templates/Constellation/Template/DETAILS/StatusWork.jsx.mustache +26 -0
  129. package/src/tasks/create/templates/Constellation/Template/DETAILS/config.json.mustache +36 -0
  130. package/src/tasks/create/templates/Constellation/Template/DETAILS/demo.stories.jsx.mustache +132 -0
  131. package/src/tasks/create/templates/Constellation/Template/DETAILS/index.jsx.mustache +86 -0
  132. package/src/tasks/create/templates/Constellation/Template/DETAILS/mock.stories.js.mustache +189 -0
  133. package/src/tasks/create/templates/Constellation/Template/DETAILS/styles.js.mustache +7 -0
  134. package/src/tasks/create/templates/Constellation/Template/DETAILS/utils.js.mustache +152 -0
  135. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/StatusWork.jsx.mustache +26 -0
  136. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/TwoColumnDetails.svg +28 -0
  137. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/config.json.mustache +43 -0
  138. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/demo.stories.jsx.mustache +136 -0
  139. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/index.jsx.mustache +86 -0
  140. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/mock.stories.js.mustache +230 -0
  141. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/styles.js.mustache +7 -0
  142. package/src/tasks/create/templates/Constellation/Template/DETAILS-region/utils.js.mustache +155 -0
  143. package/src/tasks/create/templates/Constellation/Template/FORM/DefaultForm.svg +29 -0
  144. package/src/tasks/create/templates/Constellation/Template/FORM/config.json.mustache +46 -0
  145. package/src/tasks/create/templates/Constellation/Template/FORM/demo.stories.jsx.mustache +169 -0
  146. package/src/tasks/create/templates/Constellation/Template/FORM/index.jsx.mustache +45 -0
  147. package/src/tasks/create/templates/Constellation/Template/FORM/mock.stories.js.mustache +137 -0
  148. package/src/tasks/create/templates/Constellation/Template/FORM/styles.js.mustache +7 -0
  149. package/src/tasks/create/templates/Constellation/Template/FORM-region/TwoColumn.svg +38 -0
  150. package/src/tasks/create/templates/Constellation/Template/FORM-region/config.json.mustache +28 -0
  151. package/src/tasks/create/templates/Constellation/Template/FORM-region/demo.stories.jsx.mustache +178 -0
  152. package/src/tasks/create/templates/Constellation/Template/FORM-region/index.jsx.mustache +48 -0
  153. package/src/tasks/create/templates/Constellation/Template/FORM-region/mock.stories.js.mustache +143 -0
  154. package/src/tasks/create/templates/Constellation/Template/FORM-region/styles.js.mustache +7 -0
  155. package/src/tasks/create/templates/Constellation/Template/PAGE/GetNextWork.jsx.mustache +35 -0
  156. package/src/tasks/create/templates/Constellation/Template/PAGE/OneColumnPage.svg +36 -0
  157. package/src/tasks/create/templates/Constellation/Template/PAGE/config.json.mustache +33 -0
  158. package/src/tasks/create/templates/Constellation/Template/PAGE/demo.stories.jsx.mustache +102 -0
  159. package/src/tasks/create/templates/Constellation/Template/PAGE/index.jsx.mustache +70 -0
  160. package/src/tasks/create/templates/Constellation/Template/PAGE/localizations.json.mustache +4 -0
  161. package/src/tasks/create/templates/Constellation/Template/PAGE/mock.stories.js.mustache +94 -0
  162. package/src/tasks/create/templates/Constellation/Template/PAGE/styles.js.mustache +7 -0
  163. package/src/tasks/create/templates/Constellation/Template/PAGE/utils.js.mustache +229 -0
  164. package/src/tasks/create/templates/Constellation/Widget/CASE/OneColumnPage.svg +36 -0
  165. package/src/tasks/create/templates/Constellation/Widget/CASE/config.json.mustache +24 -0
  166. package/src/tasks/create/templates/Constellation/Widget/CASE/demo.stories.jsx.mustache +78 -0
  167. package/src/tasks/create/templates/Constellation/Widget/CASE/index.jsx.mustache +76 -0
  168. package/src/tasks/create/templates/Constellation/Widget/CASE/mock.stories.js.mustache +390 -0
  169. package/src/tasks/create/{template → templates/Constellation/Widget/CASE}/styles.js.mustache +1 -1
  170. package/src/tasks/create/templates/Constellation/Widget/PAGE/OneColumnPage.svg +36 -0
  171. package/src/tasks/create/templates/Constellation/Widget/PAGE/config.json.mustache +60 -0
  172. package/src/tasks/create/templates/Constellation/Widget/PAGE/demo.stories.jsx.mustache +30 -0
  173. package/src/tasks/create/templates/Constellation/Widget/PAGE/index.jsx.mustache +48 -0
  174. package/src/tasks/create/templates/Constellation/Widget/PAGE/mock.stories.js.mustache +23 -0
  175. package/src/tasks/{init/template/src/components/Organization_Library_VideoPlayer/styles.js → create/templates/Constellation/Widget/PAGE/styles.js.mustache} +3 -1
  176. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Avatar.jsx.mustache +75 -0
  177. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/OneColumnPage.svg +36 -0
  178. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/Operator.jsx.mustache +240 -0
  179. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/config.json.mustache +67 -0
  180. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/demo.stories.jsx.mustache +68 -0
  181. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/index.jsx.mustache +110 -0
  182. package/src/tasks/create/templates/Constellation/Widget/PAGE-CASE/mock.stories.js.mustache +51 -0
  183. package/src/tasks/{init/template/src/components/Organization_Library_MediaURL/MediaURL.styles.ts → create/templates/Constellation/Widget/PAGE-CASE/styles.js.mustache} +3 -1
  184. package/src/tasks/create-all/index.js +398 -0
  185. package/src/tasks/delete/helper.js +6 -4
  186. package/src/tasks/delete/index.js +4 -0
  187. package/src/tasks/delete-all/helper.js +153 -0
  188. package/src/tasks/delete-all/index.js +49 -0
  189. package/src/tasks/generate-ai/aiPrompt.txt.mustache +23 -0
  190. package/src/tasks/generate-ai/aiPromptDavinci.txt.mustache +14 -0
  191. package/src/tasks/generate-ai/helper.js +357 -0
  192. package/src/tasks/generate-ai/index.js +34 -0
  193. package/src/tasks/index.js +7 -0
  194. package/src/tasks/init/index.js +9 -3
  195. package/src/tasks/init/template/.eslintignore +8 -0
  196. package/src/tasks/init/template/.eslintrc.json +186 -5
  197. package/src/tasks/init/template/.vscode/extensions.json +1 -1
  198. package/src/tasks/init/template/README.md +80 -61
  199. package/src/tasks/init/template/keys/DX-ComponentDev.zip +0 -0
  200. package/src/tasks/init/template/keys/dxcb.crt +32 -0
  201. package/src/tasks/init/template/keys/dxcb.key +51 -0
  202. package/src/tasks/init/template/package.json.mustache +44 -21
  203. package/src/tasks/init/template/src/components/_components.md +1 -0
  204. package/src/tasks/init/template/tasks.config.json +19 -5
  205. package/src/tasks/init/template/templateNPMRC.txt +8 -0
  206. package/src/tasks/linter/index.js +46 -0
  207. package/src/tasks/list/helper.js +19 -6
  208. package/src/tasks/list/index.js +4 -0
  209. package/src/tasks/publish/helper.js +13 -4
  210. package/src/tasks/publish/index.js +14 -1
  211. package/src/tasks/publish-all/helper.js +154 -0
  212. package/src/tasks/publish-all/index.js +95 -0
  213. package/src/tasks/rename/index.js +314 -0
  214. package/src/tasks/validator/index.js +291 -18
  215. package/src/util.js +372 -6
  216. package/src/tasks/create/template/demo.stories.jsx.mustache +0 -44
  217. package/src/tasks/init/template/src/components/MBTAList/MBTAList.stories.tsx +0 -10
  218. package/src/tasks/init/template/src/components/MBTAList/MBTAList.tsx +0 -122
  219. package/src/tasks/init/template/src/components/MBTAList/icons/accessible.icon.tsx +0 -14
  220. package/src/tasks/init/template/src/components/MBTAList/icons/bus.icon.tsx +0 -13
  221. package/src/tasks/init/template/src/components/MBTAList/icons/mbta.icon.tsx +0 -10
  222. package/src/tasks/init/template/src/components/MBTAList/icons/subway.icon.tsx +0 -14
  223. package/src/tasks/init/template/src/components/MBTAList/index.ts +0 -2
  224. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.stories.tsx +0 -19
  225. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURL.types.ts +0 -10
  226. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLDisplay.tsx +0 -25
  227. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/MediaURLInput.tsx +0 -24
  228. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/config.json +0 -13
  229. package/src/tasks/init/template/src/components/Organization_Library_MediaURL/index.ts +0 -2
  230. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/config.json +0 -44
  231. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/demo.stories.jsx +0 -40
  232. package/src/tasks/init/template/src/components/Organization_Library_VideoPlayer/index.jsx +0 -42
  233. /package/src/tasks/{publish/bundle → bundle}/builder/modules.js +0 -0
  234. /package/src/tasks/{publish/bundle → bundle}/builder/paths.js +0 -0
package/src/util.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import fs from 'fs';
2
+ import path from 'path';
2
3
  import { join } from 'path';
3
4
  import { promisify } from 'util';
4
5
  import https from 'https';
@@ -7,6 +8,10 @@ import chalk from 'chalk';
7
8
  import mustache from 'mustache';
8
9
  import pascalCase from 'pascalcase';
9
10
  import fetch from 'node-fetch';
11
+ import { createRequire } from 'module';
12
+
13
+ import _ from 'lodash';
14
+
10
15
 
11
16
  import {
12
17
  COMPONENTS_DIRECTORY_PATH,
@@ -15,11 +20,16 @@ import {
15
20
  OOTB_COMPONENT_SERVICE_REST_ENDPOINT,
16
21
  DELETE_COMPONENT_SERVICE_REST_ENDPOINT,
17
22
  OOTB_COMPONENTS,
18
- TOKEN_URL_V1
23
+ SERVICES_AI_REST_ENDPOINT,
24
+ BOOTSTRAP_SERVICE_REST_ENDPOINT,
25
+ DXCOMPGENAI_SERVICE_REST_ENDPOINT,
26
+ SERVICE_TOKEN_PATH
19
27
  } from './constants.js';
20
28
 
21
29
  const access = promisify(fs.access);
22
30
 
31
+ let servicesToken = "";
32
+
23
33
  export const checkPathAccess = async (path, options = {}) => {
24
34
  const { errorMessage } = options;
25
35
 
@@ -51,7 +61,7 @@ export const deleteLocalComponent = async componentKey => {
51
61
 
52
62
  const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH], componentKey);
53
63
 
54
- fs.rmdir(directory, { recursive: true }, err => {
64
+ fs.rm(directory, { recursive: true }, err => {
55
65
  if (err) {
56
66
  throw err;
57
67
  }
@@ -74,7 +84,9 @@ export const deleteServerComponent = async componentKey => {
74
84
  token_type: tokenType,
75
85
  refresh_token: refreshToken
76
86
  } = JSON.parse(OauthData);
77
- fetch(deleteUrl, {
87
+
88
+
89
+ await fetch(deleteUrl, {
78
90
  method: 'DELETE',
79
91
  agent: new https.Agent({ rejectUnauthorized: false }),
80
92
  headers: {
@@ -83,12 +95,23 @@ export const deleteServerComponent = async componentKey => {
83
95
  })
84
96
  .then(response => response.text())
85
97
  .then(resp => {
86
- const respData = JSON.parse(resp);
98
+ let respData;
99
+ try {
100
+ respData = JSON.parse(resp);
101
+
102
+ }
103
+ catch (e) {
104
+ console.log(chalk.bold.redBright(`Failure : ${resp}`));
105
+ process.exit(1);
106
+ }
107
+
87
108
  if (respData.status == 200) {
88
109
  console.log(chalk.bold.green(`Success : ${respData.message}`));
89
110
  } else {
90
111
  throw new Error(`${respData.message}`);
91
112
  }
113
+
114
+
92
115
  })
93
116
  .catch(e => Promise.reject(`${chalk.bold.red(e)}`));
94
117
  }
@@ -97,6 +120,7 @@ export const deleteServerComponent = async componentKey => {
97
120
  }
98
121
  };
99
122
 
123
+
100
124
  export const getComponents = async () => {
101
125
  const currentDirectory = process.cwd();
102
126
  const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
@@ -120,6 +144,91 @@ export const getComponents = async () => {
120
144
  .map(dirent => dirent.name);
121
145
  };
122
146
 
147
+ export const getComponentsOfType = async (componentType) => {
148
+ const componentList = await getComponents();
149
+ let filteredList = Array();
150
+ if (componentList.length > 0) {
151
+
152
+ const currentDirectory = process.cwd();
153
+ const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
154
+
155
+ await checkPathAccess(pegaConfigJsonPath);
156
+
157
+ let data = fs.readFileSync(pegaConfigJsonPath, { encoding: 'utf8' });
158
+ data = JSON.parse(data);
159
+
160
+ if (!data[COMPONENTS_DIRECTORY_PATH]) {
161
+ console.error(
162
+ `${chalk.red.bold('ERROR')} Could not able find components directory path in config.json`
163
+ );
164
+ process.exit(1);
165
+ }
166
+
167
+ const directory = join(currentDirectory, data[COMPONENTS_DIRECTORY_PATH]);
168
+ const arTypes = componentType.split(",");
169
+
170
+ for (let index in componentList) {
171
+ let compDir = directory + path.sep + componentList[index];
172
+ let type = await getComponentConfigType(compDir);
173
+ if (arTypes.includes(type)) {
174
+ filteredList.push( componentList[index]);
175
+ }
176
+ }
177
+
178
+
179
+
180
+ return filteredList;
181
+ }
182
+ else {
183
+ return componentList;
184
+ }
185
+ };
186
+
187
+
188
+
189
+
190
+ export const getSubComponents = async (directory, type) => {
191
+
192
+ const subDirectory = join(directory, type);
193
+ return fs
194
+ .readdirSync(subDirectory, { withFileTypes: true })
195
+ .filter(dirent => dirent.isDirectory())
196
+ .map(dirent => dirent.name);
197
+ }
198
+
199
+
200
+ export const getDirectoryFiles = async (directory) => {
201
+ return fs
202
+ .readdirSync(directory, { withFileTypes: true })
203
+ .filter(dirent => !dirent.isDirectory())
204
+ .map(dirent => dirent.name);
205
+ }
206
+
207
+
208
+ export const getComponentsObj = async () => {
209
+
210
+ let compList = new Array();
211
+
212
+ //const componentList = await getDirectoryFiles(directory);
213
+ const componentList = await getComponents();
214
+
215
+
216
+ if (componentList.length > 0) {
217
+
218
+ compList.push(...componentList.map(
219
+ name => {
220
+ const container = {};
221
+ container.name = name;
222
+ container.value = name;
223
+
224
+ return container;
225
+ }
226
+ ));
227
+ }
228
+
229
+ return compList;
230
+ }
231
+
123
232
  export const getPegaConfig = async () => {
124
233
  const currentDirectory = process.cwd();
125
234
  const pegaConfigJsonPath = join(currentDirectory, TASKS_CONFIG_JSON_FILENAME);
@@ -132,11 +241,41 @@ export const getPegaConfig = async () => {
132
241
  return data;
133
242
  };
134
243
 
244
+ export const getAIPromptData = async (aiPromptPath) => {
245
+ await checkPathAccess(aiPromptPath);
246
+
247
+ let data = fs.readFileSync(aiPromptPath, { encoding: 'utf8' });
248
+
249
+ return data;
250
+ }
251
+
252
+ export const getComponentConfigJson = async (componentDirectory) => {
253
+
254
+ const filePath = join(componentDirectory, "config.json");
255
+ await checkPathAccess(filePath);
256
+
257
+ let data = fs.readFileSync(filePath, { encoding: 'utf8' });
258
+
259
+ data = _.unescape(data);
260
+
261
+ return data;
262
+ }
263
+
264
+ export const getComponentConfigType = async (componentDirectory) => {
265
+ const configData = await getComponentConfigJson(componentDirectory);
266
+
267
+ let data = JSON.parse(configData);
268
+
269
+ return data.type;
270
+
271
+ }
272
+
135
273
  export const getPegaServerConfig = async () => {
136
274
  const config = await getPegaConfig();
137
275
  return config['server-config'];
138
276
  };
139
277
 
278
+
140
279
  export const getComponentDefaults = async () => {
141
280
  const config = await getPegaConfig();
142
281
  return config.component;
@@ -218,6 +357,25 @@ export const validateRulesetVersion = str => {
218
357
  return regex.test(str);
219
358
  };
220
359
 
360
+ export const showVersion = () => {
361
+ // get package version, so can display at start
362
+ const require = createRequire(import.meta.url);
363
+ const pData = require("@pega/custom-dx-components/package.json");
364
+
365
+ console.log(chalk.green("DX Component Builder v" + pData.version));
366
+
367
+ // do a check of node version, it should be 18 or greater
368
+ const arNodeVersion = process.versions.node.split(".");
369
+
370
+ const nodeMajorVersion = parseInt(arNodeVersion[0]);
371
+ const nodeMinorVersion = parseInt(arNodeVersion[1]);
372
+
373
+ if (nodeMajorVersion < 18) {
374
+ console.log(chalk.redBright("DX Component Builder - SDK requires node v18 or greater, current version: " + process.version));
375
+ process.exit(1);
376
+ }
377
+ };
378
+
221
379
  export const getOOTBComponents = async () => {
222
380
  return new Promise((resolve, reject) => {
223
381
  fs.readFile(OOTB_COMPONENTS, 'utf-8', async (err, data) => {
@@ -272,6 +430,214 @@ export const getOOTBComponents = async () => {
272
430
  });
273
431
  };
274
432
 
275
- export const getTokenUrl = async (server) => {
276
- return server.endsWith('/') ? `${server}${TOKEN_URL_V1}` : `${server}/${TOKEN_URL_V1}`;
433
+
434
+
435
+ export const storeServicesToken = async () => {
436
+ const { server } = await getPegaServerConfig();
437
+ const url = constructCompleteUrl(server, BOOTSTRAP_SERVICE_REST_ENDPOINT);
438
+
439
+ let returnToken = "";
440
+
441
+ try {
442
+ const OauthData = fs.readFileSync(TOKEN_PATH, 'utf8');
443
+ if (OauthData) {
444
+ let {
445
+ access_token: accessToken,
446
+ token_type: tokenType,
447
+ refresh_token: refreshToken
448
+ } = JSON.parse(OauthData);
449
+
450
+ await fetch(url, {
451
+ method: 'GET',
452
+ agent: new https.Agent({ rejectUnauthorized: false }),
453
+ headers: {
454
+ Authorization: `${tokenType} ${accessToken}`
455
+ },
456
+ })
457
+ .then(response => response.text())
458
+ .then(data => {
459
+
460
+ try {
461
+ const returnData = JSON.parse(data);
462
+
463
+ if (returnData != null && returnData.pyConfigJSON) {
464
+ const returnJSON = JSON.parse(returnData.pyConfigJSON);
465
+ const strToken = JSON.stringify(returnJSON.tokens, null, 2);
466
+
467
+
468
+ fs.writeFileSync(SERVICE_TOKEN_PATH, strToken, err => {
469
+ if (err) {
470
+ Promise.reject(`${chalk.bold.red(err)}`);
471
+ }
472
+ });
473
+ //returnToken = returnJSON.tokens.C11NB2S;
474
+ }
475
+ else {
476
+ //returnToken = "";
477
+ }
478
+ }
479
+ catch {
480
+ Promise.reject(`${chalk.bold.red(data)}`);
481
+ }
482
+
483
+
484
+ })
485
+ .catch(e => Promise.reject(`${chalk.bold.red(e)}`));
486
+ }
487
+ }
488
+ catch (error) {
489
+ throw new Error('Error occurred in validation', error);
490
+ }
491
+
492
+ //return returnToken;
493
+
494
+ }
495
+
496
+ export const getAIComponent = async (prompt) => {
497
+
498
+
499
+ const { servicesServer } = await getPegaServerConfig();
500
+ if (servicesServer === undefined) {
501
+ Promise.reject(`${chalk.bold.red("ERROR: servicesServer not defined in tasks.config.json" )}`);
502
+ }
503
+
504
+ const serviceUrl = constructCompleteUrl(servicesServer, SERVICES_AI_REST_ENDPOINT);
505
+
506
+ const jsonBody = { "prompt" : prompt };
507
+
508
+ let returnCode = "";
509
+
510
+ try {
511
+ const OauthData = fs.readFileSync(TOKEN_PATH, 'utf8');
512
+ const ServicesData = fs.readFileSync(SERVICE_TOKEN_PATH, 'utf8');
513
+ if (OauthData && ServicesData) {
514
+ let {
515
+ access_token: accessToken,
516
+ token_type: tokenType,
517
+ refresh_token: refreshToken
518
+ } = JSON.parse(OauthData);
519
+
520
+ const { C11NB2S } = JSON.parse(ServicesData);
521
+
522
+ // services needs Bearer with a big "B"
523
+ tokenType = convertIntoPascalCase(tokenType);
524
+
525
+ await fetch(serviceUrl, {
526
+ method: 'POST',
527
+ agent: new https.Agent({ rejectUnauthorized: false }),
528
+ headers: {
529
+ Authorization: `${tokenType} ${C11NB2S}`,
530
+ 'Accept': 'application/json',
531
+ 'Content-Type': 'application/json'
532
+ },
533
+ body: JSON.stringify(jsonBody),
534
+ })
535
+ .then(response => response.text())
536
+ .then(data => {
537
+
538
+ try {
539
+ const returnData = JSON.parse(data);
540
+
541
+ if (returnData != null && returnData.code) {
542
+ returnCode = returnData.code;
543
+ }
544
+ else {
545
+ returnCode = "";
546
+ }
547
+ }
548
+ catch {
549
+ Promise.reject(`Error in AI generation: \n ${chalk.bold.red(data)}`);
550
+ //throw new Error('Error occurred in validation', data);
551
+ }
552
+
553
+
554
+ })
555
+ .catch(e => Promise.reject(`Error in AI generation: \n ${chalk.bold.red(e)}`));
556
+ }
557
+ }
558
+ catch (error) {
559
+ if (error.code === 'ENOENT') {
560
+ Promise.reject(`${chalk.bold.red("ERROR: Need to authenticate or reauthenticate.")}`);
561
+ }
562
+ else {
563
+ throw new Error('Error occurred in validation', error);
564
+ }
565
+
566
+ }
567
+
568
+ return returnCode;
569
+ };
570
+
571
+
572
+ export const getInfinityAIComponent = async (prompt) => {
573
+ const { server } = await getPegaServerConfig();
574
+ const dataPageUrl = constructCompleteUrl(server, DXCOMPGENAI_SERVICE_REST_ENDPOINT);
575
+
576
+ const jsonBody = { "dataViewParameters" : { "Prompt" : prompt } };
577
+
578
+
579
+
580
+ let returnCode = "";
581
+
582
+ try {
583
+ const OauthData = fs.readFileSync(TOKEN_PATH, 'utf8');
584
+
585
+ if (OauthData) {
586
+ let {
587
+ access_token: accessToken,
588
+ token_type: tokenType,
589
+ refresh_token: refreshToken
590
+ } = JSON.parse(OauthData);
591
+
592
+ // services needs Bearer with a big "B"
593
+ //tokenType = convertIntoPascalCase(tokenType);
594
+
595
+ await fetch(dataPageUrl, {
596
+ method: 'POST',
597
+ agent: new https.Agent({ rejectUnauthorized: false }),
598
+ headers: {
599
+ Authorization: `${tokenType} ${accessToken}`
600
+ },
601
+ body: JSON.stringify(jsonBody),
602
+ })
603
+ .then(response => response.text())
604
+ .then(data => {
605
+
606
+ try {
607
+ const returnData = JSON.parse(data);
608
+
609
+ if (returnData != null && returnData.data) {
610
+ returnCode = returnData.data[0].pyValue;
611
+ }
612
+ else if (returnData != null && returnData.errors) {
613
+ if (returnData.errors[0].message.indexOf("token") >= 0) {
614
+ Promise.reject(`${chalk.bold.red("ERROR: Need to authenticate or reauthenticate.")}`);
615
+ }
616
+ }
617
+ else {
618
+ returnCode = "";
619
+ Promise.reject(`Error in AI generation: \n ${chalk.bold.red(data)}`);
620
+ }
621
+ }
622
+ catch {
623
+ Promise.reject(`Error in AI generation: \n ${chalk.bold.red(data)}`);
624
+ //throw new Error('Error occurred in validation', data);
625
+ }
626
+
627
+
628
+ })
629
+ .catch(e => Promise.reject(`Error in AI generation: \n ${chalk.bold.red(e)}`));
630
+ }
631
+ }
632
+ catch (error) {
633
+ if (error.code === 'ENOENT') {
634
+ Promise.reject(`${chalk.bold.red("ERROR: Need to authenticate or reauthenticate.")}`);
635
+ }
636
+ else {
637
+ throw new Error('Error occurred in validation', error);
638
+ }
639
+
640
+ }
641
+
642
+ return returnCode;
277
643
  };
@@ -1,44 +0,0 @@
1
- import { useState } from 'react';
2
- import { withKnobs, text, boolean } from '@storybook/addon-knobs';
3
-
4
- import {{COMPONENT_CLASS_NAME}} from './index.jsx';
5
-
6
- export default {
7
- title: '{{COMPONENT_CLASS_NAME}}',
8
- decorators: [withKnobs],
9
- component: {{COMPONENT_CLASS_NAME}}
10
- };
11
-
12
- export const base{{COMPONENT_CLASS_NAME}} = () => {
13
- const [value, setValue] = useState('test value');
14
-
15
- const props = {
16
- getPConnect: () => {
17
- return {
18
- getActionsApi: () => {
19
- return {
20
- updateFieldValue: (propName, value) => {
21
- setValue(value);
22
- }
23
- };
24
- },
25
- getStateProps: () => {
26
- return { value: '.name' };
27
- }
28
- };
29
- },
30
- value,
31
- placeholder: text('Placeholder', 'Test placeholder'),
32
- disabled: boolean('Disabled', false),
33
- readOnly: boolean('Disabled', false),
34
- required: boolean('Disabled', false),
35
- label: text('Label', 'Sample Label'),
36
- testId: text('Test id', 'text-12344566')
37
- };
38
-
39
- return (
40
- <>
41
- <{{COMPONENT_CLASS_NAME}} {...props} />
42
- </>
43
- );
44
- };
@@ -1,10 +0,0 @@
1
- import MBTAListComp from './MBTAList';
2
-
3
- export default {
4
- title: 'MBTAList',
5
- component: MBTAListComp
6
- };
7
-
8
- export const MBTAList = () => {
9
- return <MBTAListComp />;
10
- };
@@ -1,122 +0,0 @@
1
- import { useEffect, useState, useContext } from 'react';
2
- import {
3
- Flex,
4
- SummaryList,
5
- SummaryListItem,
6
- ViewAll,
7
- ModalManagerContext,
8
- Modal,
9
- registerIcon,
10
- Icon,
11
- MetaList,
12
- MetaListProps
13
- } from '@pega/cosmos-react-core';
14
-
15
- import * as accessibleIcon from './icons/accessible.icon';
16
- import * as busIcon from './icons/bus.icon';
17
- import * as mbtaIcon from './icons/mbta.icon';
18
- import * as subwayIcon from './icons/subway.icon';
19
-
20
- registerIcon(accessibleIcon, busIcon, mbtaIcon, subwayIcon);
21
-
22
- export interface MBTAListProps {}
23
-
24
- const params = new URLSearchParams([
25
- ['page[offset]', '0'],
26
- ['page[limit]', '1000'],
27
- ['filter[latitude]', '42.362339984866466'],
28
- ['filter[longitude]', '-71.07999650212442'],
29
- ['filter[radius]', '0.01'],
30
- ['filter[route_type]', '1,3']
31
- ]);
32
-
33
- const MBTAList = (props: MBTAListProps) => {
34
- const [items, setItems] = useState<SummaryListItem[]>();
35
- const [error, setError] = useState<string>();
36
- const { create } = useContext(ModalManagerContext);
37
-
38
- useEffect(() => {
39
- const controller = new AbortController();
40
-
41
- fetch(`https://api-v3.mbta.com/stops?${params}`, { signal: controller.signal })
42
- .then(async res => {
43
- if (!res.ok) throw new Error(`Responded with "${res.status}"`);
44
-
45
- const { data } = await res.json();
46
- if (controller.signal.aborted) return;
47
-
48
- setItems(
49
- // TODO: Type the api response: https://api-v3.mbta.com/docs/swagger/index.html#/Stop/ApiWeb_StopController_index
50
- data.map(({ id, attributes }: any) => {
51
- const meta: MetaListProps['items'] = [];
52
-
53
- if (attributes.wheelchair_boarding) {
54
- meta.push(
55
- <>
56
- <Icon name='accessible' style={{ width: '1em', height: '1em' }} />
57
- &nbsp;Wheelchair boarding
58
- </>
59
- );
60
- }
61
-
62
- if (attributes.vehicle_type === 1) {
63
- meta.push(attributes.platform_name);
64
- return {
65
- id,
66
- visual: <Icon name='subway' />,
67
- primary: attributes.name,
68
- secondary: <MetaList items={meta} />
69
- };
70
- }
71
-
72
- meta.push(attributes.name);
73
- return {
74
- id,
75
- visual: <Icon name='bus' />,
76
- primary: attributes.on_street,
77
- secondary: <MetaList items={meta} />
78
- };
79
- })
80
- );
81
- })
82
- .catch((err: unknown) => {
83
- if (controller.signal.aborted) return;
84
-
85
- if (err instanceof Error) {
86
- setError(err.message);
87
- } else {
88
- setError('An error occurred.');
89
- }
90
- });
91
-
92
- return () => {
93
- controller.abort();
94
- };
95
- }, []);
96
-
97
- return (
98
- <SummaryList
99
- {...props}
100
- icon='mbta'
101
- name='Stops near Pega'
102
- count={items?.length}
103
- items={items?.slice(0, 3) ?? []}
104
- loading={!items && !error}
105
- error={error ? { message: error } : undefined}
106
- onViewAll={() => {
107
- create(Modal, {
108
- heading: (
109
- <Flex container={{ gap: 1, alignItems: 'center' }}>
110
- <Icon name='mbta' />
111
- Stops near Pega
112
- </Flex>
113
- ),
114
- count: items?.length,
115
- children: <ViewAll items={items ?? []} />
116
- });
117
- }}
118
- />
119
- );
120
- };
121
-
122
- export default MBTAList;
@@ -1,14 +0,0 @@
1
- // FontAwesome "accessible" icon
2
- // https://fontawesome.com/license
3
- // Converted from SVG to Cosmos Icon format
4
-
5
- export const name = 'accessible';
6
-
7
- export const Component = () => (
8
- <path
9
- fill='currentColor'
10
- d='M423.9 255.8L411 413.1c-3.3 40.7-63.9 35.1-60.6-4.9l10-122.5-41.1 2.3c10.1 20.7 15.8 43.9 15.8 68.5 0 41.2-16.1 78.7-42.3 106.5l-39.3-39.3c57.9-63.7 13.1-167.2-74-167.2-25.9 0-49.5 9.9-67.2 26L73 243.2c22-20.7 50.1-35.1 81.4-40.2l75.3-85.7-42.6-24.8-51.6 46c-30 26.8-70.6-18.5-40.5-45.4l68-60.7c9.8-8.8 24.1-10.2 35.5-3.6 0 0 139.3 80.9 139.5 81.1 16.2 10.1 20.7 36 6.1 52.6L285.7 229l106.1-5.9c18.5-1.1 33.6 14.4 32.1 32.7zm-64.9-154c28.1 0 50.9-22.8 50.9-50.9C409.9 22.8 387.1 0 359 0c-28.1 0-50.9 22.8-50.9 50.9 0 28.1 22.8 50.9 50.9 50.9zM179.6 456.5c-80.6 0-127.4-90.6-82.7-156.1l-39.7-39.7C36.4 287 24 320.3 24 356.4c0 130.7 150.7 201.4 251.4 122.5l-39.7-39.7c-16 10.9-35.3 17.3-56.1 17.3z'
11
- />
12
- );
13
-
14
- export const viewBox = '0 0 448 512';
@@ -1,13 +0,0 @@
1
- export const name = 'bus';
2
-
3
- export const Component = () => (
4
- <>
5
- <path d='m12.06 24c6.72-.17 12.11-5.64 11.94-12.06a12 12 0 1 0 -11.94 12.06' fill='#ffc72c' />
6
- <path
7
- d='m18.78 10.67-.66-5.17c-.16-.93-.75-1.3-1.63-1.68a14.25 14.25 0 0 0 -4.49-.82 14.32 14.32 0 0 0 -4.5.82c-.86.37-1.45.75-1.63 1.68l-.66 5.17v7.15h1.17v1.25a1 1 0 0 0 1.91 0v-1.25h7.45v1.25a.91.91 0 0 0 .48.8 1 1 0 0 0 1 0 .88.88 0 0 0 .47-.8v-1.25h1.13zm-9.57-6.36h5.61a.42.42 0 0 1 .43.41.42.42 0 0 1 -.43.42h-5.61a.43.43 0 0 1 -.43-.42.42.42 0 0 1 .43-.41zm-2.79 6.21.58-4.09a.54.54 0 0 1 .51-.43h9.06a.56.56 0 0 1 .54.44l.54 4.09a.33.33 0 0 1 0 .14.49.49 0 0 1 -.16.37.54.54 0 0 1 -.38.15h-10.17a.56.56 0 0 1 -.38-.19.57.57 0 0 1 -.14-.38.33.33 0 0 1 0-.1zm.92 5.09a1 1 0 1 1 1-1 1 1 0 0 1 -.3.7 1 1 0 0 1 -.7.3zm9.36 0a1 1 0 1 1 1-1 1 1 0 0 1 -.3.7 1.06 1.06 0 0 1 -.72.29z'
8
- fill='#1c1e23'
9
- />
10
- </>
11
- );
12
-
13
- export const viewBox = '0 0 24 24';
@@ -1,10 +0,0 @@
1
- export const name = 'mbta';
2
-
3
- export const Component = () => (
4
- <>
5
- <circle cx='250' cy='250' r='239' stroke='#000' strokeWidth='22' fill='#fff' />
6
- <path d='M92,138.5h316v79.5h-118.25v194h-79.5v-194h-118.25z' />
7
- </>
8
- );
9
-
10
- export const viewBox = '0 0 500 500';
@@ -1,14 +0,0 @@
1
- export const name = 'subway';
2
-
3
- export const Component = () => (
4
- <>
5
- <path d='m24 0a24 24 0 1 0 24 24 24 24 0 0 0 -24-24' fill='#494f5b' />
6
- <g fill='#fff'>
7
- <path d='m25.8889 5.8222a1.4111 1.4111 0 1 0 -1.4111-1.4111 1.411 1.411 0 0 0 1.4111 1.4111z' />
8
- <path d='m31.4555 34.2111a4.9779 4.9779 0 0 0 3.889-4.8222v-18.1445a5.0112 5.0112 0 0 0 -5.0778-4.9111h-12.5333a5.0112 5.0112 0 0 0 -5.1 4.9v18.1556a4.9779 4.9779 0 0 0 3.8889 4.8222l-5.8556 8.7889h3.4l4.1889-6.1445h11.5555l4.1889 6.1445h3.3333zm-10.7555-25.9889a.8445.8445 0 0 1 .8445-.8111h4.9555a.8444.8444 0 0 1 .8333.8111v1.4445l-.0006.0339a.8334.8334 0 0 1 -.866.7994l-4.9222-.0111a.8333.8333 0 0 1 -.8445-.8222zm-3.1111 23.3334a2.2223 2.2223 0 1 1 2.2222-2.2223 2.2223 2.2223 0 0 1 -2.2222 2.2223zm.2889-11.8112c-.0758.0036-.1518.0036-.2276 0a2.4221 2.4221 0 0 1 -2.3057-2.5333v-3.2667a2.4109 2.4109 0 0 1 2.5333-2.5444h12.2222a2.4113 2.4113 0 0 1 2.5333 2.5444v3.2667q.0054.1137 0 .2276a2.4221 2.4221 0 0 1 -2.5333 2.3057zm12.4333 11.8112a2.2334 2.2334 0 1 1 .0223 0z' />
9
- <path d='m22.1445 5.8222h-.0334.0337a1.4113 1.4113 0 1 0 -1.4115-1.4115 1.4111 1.4111 0 0 0 1.4115 1.4119z' />
10
- </g>
11
- </>
12
- );
13
-
14
- export const viewBox = '0 0 48 48';
@@ -1,2 +0,0 @@
1
- export { default } from './MBTAList';
2
- export type { MBTAListProps } from './MBTAList';