create-bluecopa-react-app 1.0.4 → 1.0.6

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 (108) hide show
  1. package/README.md +47 -10
  2. package/bin/create-bluecopa-react-app.js +257 -51
  3. package/package.json +6 -5
  4. package/templates/latest/Agent.md +254 -0
  5. package/templates/latest/Dockerfile +22 -0
  6. package/templates/latest/README.md +157 -221
  7. package/templates/latest/app/app.css +134 -0
  8. package/templates/latest/app/app.tsx +46 -0
  9. package/templates/latest/app/components/app-sidebar.tsx +174 -0
  10. package/templates/latest/app/components/chart-area-interactive.tsx +290 -0
  11. package/templates/latest/app/components/data-table.tsx +807 -0
  12. package/templates/latest/app/components/nav-documents.tsx +92 -0
  13. package/templates/latest/app/components/nav-main.tsx +56 -0
  14. package/templates/latest/app/components/nav-secondary.tsx +42 -0
  15. package/templates/latest/app/components/nav-user.tsx +112 -0
  16. package/templates/latest/app/components/section-cards.tsx +102 -0
  17. package/templates/latest/app/components/site-header.tsx +19 -0
  18. package/templates/latest/app/components/ui/avatar.tsx +53 -0
  19. package/templates/latest/app/components/ui/badge.tsx +46 -0
  20. package/templates/latest/app/components/ui/breadcrumb.tsx +109 -0
  21. package/templates/latest/app/components/ui/button.tsx +58 -0
  22. package/templates/latest/app/components/ui/card.tsx +92 -0
  23. package/templates/latest/app/components/ui/chart.tsx +352 -0
  24. package/templates/latest/app/components/ui/checkbox.tsx +30 -0
  25. package/templates/latest/app/components/ui/drawer.tsx +139 -0
  26. package/templates/latest/app/components/ui/dropdown-menu.tsx +258 -0
  27. package/templates/latest/app/components/ui/input.tsx +21 -0
  28. package/templates/latest/app/components/ui/label.tsx +24 -0
  29. package/templates/latest/app/components/ui/select.tsx +183 -0
  30. package/templates/latest/app/components/ui/separator.tsx +26 -0
  31. package/templates/latest/app/components/ui/sheet.tsx +139 -0
  32. package/templates/latest/app/components/ui/sidebar.tsx +731 -0
  33. package/templates/latest/app/components/ui/skeleton.tsx +13 -0
  34. package/templates/latest/app/components/ui/sonner.tsx +23 -0
  35. package/templates/latest/app/components/ui/table.tsx +117 -0
  36. package/templates/latest/app/components/ui/tabs.tsx +66 -0
  37. package/templates/latest/app/components/ui/toggle-group.tsx +73 -0
  38. package/templates/latest/app/components/ui/toggle.tsx +47 -0
  39. package/templates/latest/app/components/ui/tooltip.tsx +59 -0
  40. package/templates/latest/app/dashboard/data.json +614 -0
  41. package/templates/latest/app/hooks/use-bluecopa-user.ts +37 -0
  42. package/templates/latest/app/hooks/use-mobile.ts +19 -0
  43. package/templates/latest/{src → app}/lib/utils.ts +1 -1
  44. package/templates/latest/app/main.tsx +12 -0
  45. package/templates/latest/app/routes/home.tsx +40 -0
  46. package/templates/latest/app/routes.tsx +15 -0
  47. package/templates/latest/{src → app}/single-spa.tsx +38 -28
  48. package/templates/latest/components.json +22 -0
  49. package/templates/latest/dist/assets/__federation_expose_App-DRwKKpS2.js +91 -0
  50. package/templates/latest/dist/assets/__federation_fn_import-CzfA7kmP.js +438 -0
  51. package/templates/latest/dist/assets/__federation_shared_react-Bp6HVBS4.js +16 -0
  52. package/templates/latest/dist/assets/__federation_shared_react-dom-BCcRGiYp.js +17 -0
  53. package/templates/latest/dist/assets/client-DgSav55y.js +12658 -0
  54. package/templates/latest/dist/assets/home-DOL6GrYV.js +54951 -0
  55. package/templates/latest/dist/assets/index-BzNimew1.js +69 -0
  56. package/templates/latest/dist/assets/index-DMFtQdNS.js +412 -0
  57. package/templates/latest/dist/assets/index-DdYpcDMk.js +60 -0
  58. package/templates/latest/dist/assets/remoteEntry.js +88 -0
  59. package/templates/latest/dist/assets/style-36A39bNN.css +3683 -0
  60. package/templates/latest/dist/avatars/shadcn.svg +6 -0
  61. package/templates/latest/dist/favicon.ico +0 -0
  62. package/templates/latest/dist/index.html +19 -0
  63. package/templates/latest/index.html +1 -1
  64. package/templates/latest/package-lock.json +1227 -3353
  65. package/templates/latest/package.json +47 -43
  66. package/templates/latest/pnpm-lock.yaml +4767 -0
  67. package/templates/latest/preview/index.html +32 -2
  68. package/templates/latest/public/avatars/shadcn.svg +6 -0
  69. package/templates/latest/public/favicon.ico +0 -0
  70. package/templates/latest/tsconfig.json +18 -11
  71. package/templates/latest/vite.config.ts +41 -41
  72. package/templates/latest/.env.example +0 -14
  73. package/templates/latest/.eslintrc.cjs +0 -42
  74. package/templates/latest/AGENT.md +0 -284
  75. package/templates/latest/clean.sh +0 -39
  76. package/templates/latest/postcss.config.cjs +0 -6
  77. package/templates/latest/public/bluecopa-logo.svg +0 -30
  78. package/templates/latest/public/favicon-32x32.png +0 -0
  79. package/templates/latest/public/favicon-96x96.png +0 -0
  80. package/templates/latest/setup.sh +0 -55
  81. package/templates/latest/src/App.tsx +0 -15
  82. package/templates/latest/src/components/layout/dashboard-header.tsx +0 -139
  83. package/templates/latest/src/components/layout/dashboard-layout.tsx +0 -29
  84. package/templates/latest/src/components/layout/sidebar.tsx +0 -54
  85. package/templates/latest/src/components/page/dashboard.tsx +0 -1506
  86. package/templates/latest/src/components/page/navbar.tsx +0 -104
  87. package/templates/latest/src/components/tables/data-grid.tsx +0 -439
  88. package/templates/latest/src/components/ui/alert.tsx +0 -59
  89. package/templates/latest/src/components/ui/avatar.tsx +0 -50
  90. package/templates/latest/src/components/ui/badge.tsx +0 -36
  91. package/templates/latest/src/components/ui/bluecopa-logo.tsx +0 -54
  92. package/templates/latest/src/components/ui/button.tsx +0 -58
  93. package/templates/latest/src/components/ui/card.tsx +0 -79
  94. package/templates/latest/src/components/ui/dropdown-menu.tsx +0 -200
  95. package/templates/latest/src/components/ui/input.tsx +0 -24
  96. package/templates/latest/src/components/ui/label.tsx +0 -23
  97. package/templates/latest/src/components/ui/select.tsx +0 -29
  98. package/templates/latest/src/hooks/use-api.ts +0 -55
  99. package/templates/latest/src/index.css +0 -59
  100. package/templates/latest/src/main.tsx +0 -13
  101. package/templates/latest/src/pages/Dashboard.tsx +0 -13
  102. package/templates/latest/src/pages/Home.tsx +0 -622
  103. package/templates/latest/src/providers/query-provider.tsx +0 -48
  104. package/templates/latest/src/types/api.ts +0 -78
  105. package/templates/latest/src/vite-env.d.ts +0 -11
  106. package/templates/latest/tailwind.config.js +0 -88
  107. package/templates/latest/tsconfig.app.json +0 -26
  108. package/templates/latest/tsconfig.node.json +0 -10
@@ -0,0 +1,438 @@
1
+ System.register([], (function (exports, module) {
2
+ 'use strict';
3
+ return {
4
+ execute: (function () {
5
+
6
+ exports({
7
+ importShared: importShared,
8
+ importSharedLocal: getSharedFromLocal,
9
+ importSharedRuntime: getSharedFromRuntime
10
+ });
11
+
12
+ const buildIdentifier = "[0-9A-Za-z-]+";
13
+ const build = `(?:\\+(${buildIdentifier}(?:\\.${buildIdentifier})*))`;
14
+ const numericIdentifier = "0|[1-9]\\d*";
15
+ const numericIdentifierLoose = "[0-9]+";
16
+ const nonNumericIdentifier = "\\d*[a-zA-Z-][a-zA-Z0-9-]*";
17
+ const preReleaseIdentifierLoose = `(?:${numericIdentifierLoose}|${nonNumericIdentifier})`;
18
+ const preReleaseLoose = `(?:-?(${preReleaseIdentifierLoose}(?:\\.${preReleaseIdentifierLoose})*))`;
19
+ const preReleaseIdentifier = `(?:${numericIdentifier}|${nonNumericIdentifier})`;
20
+ const preRelease = `(?:-(${preReleaseIdentifier}(?:\\.${preReleaseIdentifier})*))`;
21
+ const xRangeIdentifier = `${numericIdentifier}|x|X|\\*`;
22
+ const xRangePlain = `[v=\\s]*(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:\\.(${xRangeIdentifier})(?:${preRelease})?${build}?)?)?`;
23
+ const hyphenRange = `^\\s*(${xRangePlain})\\s+-\\s+(${xRangePlain})\\s*$`;
24
+ const mainVersionLoose = `(${numericIdentifierLoose})\\.(${numericIdentifierLoose})\\.(${numericIdentifierLoose})`;
25
+ const loosePlain = `[v=\\s]*${mainVersionLoose}${preReleaseLoose}?${build}?`;
26
+ const gtlt = "((?:<|>)?=?)";
27
+ const comparatorTrim = `(\\s*)${gtlt}\\s*(${loosePlain}|${xRangePlain})`;
28
+ const loneTilde = "(?:~>?)";
29
+ const tildeTrim = `(\\s*)${loneTilde}\\s+`;
30
+ const loneCaret = "(?:\\^)";
31
+ const caretTrim = `(\\s*)${loneCaret}\\s+`;
32
+ const star = "(<|>)?=?\\s*\\*";
33
+ const caret = `^${loneCaret}${xRangePlain}$`;
34
+ const mainVersion = `(${numericIdentifier})\\.(${numericIdentifier})\\.(${numericIdentifier})`;
35
+ const fullPlain = `v?${mainVersion}${preRelease}?${build}?`;
36
+ const tilde = `^${loneTilde}${xRangePlain}$`;
37
+ const xRange = `^${gtlt}\\s*${xRangePlain}$`;
38
+ const comparator = `^${gtlt}\\s*(${fullPlain})$|^$`;
39
+ const gte0 = "^\\s*>=\\s*0.0.0\\s*$";
40
+ function parseRegex(source) {
41
+ return new RegExp(source);
42
+ }
43
+ function isXVersion(version) {
44
+ return !version || version.toLowerCase() === "x" || version === "*";
45
+ }
46
+ function pipe(...fns) {
47
+ return (x) => {
48
+ return fns.reduce((v, f) => f(v), x);
49
+ };
50
+ }
51
+ function extractComparator(comparatorString) {
52
+ return comparatorString.match(parseRegex(comparator));
53
+ }
54
+ function combineVersion(major, minor, patch, preRelease2) {
55
+ const mainVersion2 = `${major}.${minor}.${patch}`;
56
+ if (preRelease2) {
57
+ return `${mainVersion2}-${preRelease2}`;
58
+ }
59
+ return mainVersion2;
60
+ }
61
+ function parseHyphen(range) {
62
+ return range.replace(
63
+ parseRegex(hyphenRange),
64
+ (_range, from, fromMajor, fromMinor, fromPatch, _fromPreRelease, _fromBuild, to, toMajor, toMinor, toPatch, toPreRelease) => {
65
+ if (isXVersion(fromMajor)) {
66
+ from = "";
67
+ } else if (isXVersion(fromMinor)) {
68
+ from = `>=${fromMajor}.0.0`;
69
+ } else if (isXVersion(fromPatch)) {
70
+ from = `>=${fromMajor}.${fromMinor}.0`;
71
+ } else {
72
+ from = `>=${from}`;
73
+ }
74
+ if (isXVersion(toMajor)) {
75
+ to = "";
76
+ } else if (isXVersion(toMinor)) {
77
+ to = `<${+toMajor + 1}.0.0-0`;
78
+ } else if (isXVersion(toPatch)) {
79
+ to = `<${toMajor}.${+toMinor + 1}.0-0`;
80
+ } else if (toPreRelease) {
81
+ to = `<=${toMajor}.${toMinor}.${toPatch}-${toPreRelease}`;
82
+ } else {
83
+ to = `<=${to}`;
84
+ }
85
+ return `${from} ${to}`.trim();
86
+ }
87
+ );
88
+ }
89
+ function parseComparatorTrim(range) {
90
+ return range.replace(parseRegex(comparatorTrim), "$1$2$3");
91
+ }
92
+ function parseTildeTrim(range) {
93
+ return range.replace(parseRegex(tildeTrim), "$1~");
94
+ }
95
+ function parseCaretTrim(range) {
96
+ return range.replace(parseRegex(caretTrim), "$1^");
97
+ }
98
+ function parseCarets(range) {
99
+ return range.trim().split(/\s+/).map((rangeVersion) => {
100
+ return rangeVersion.replace(
101
+ parseRegex(caret),
102
+ (_, major, minor, patch, preRelease2) => {
103
+ if (isXVersion(major)) {
104
+ return "";
105
+ } else if (isXVersion(minor)) {
106
+ return `>=${major}.0.0 <${+major + 1}.0.0-0`;
107
+ } else if (isXVersion(patch)) {
108
+ if (major === "0") {
109
+ return `>=${major}.${minor}.0 <${major}.${+minor + 1}.0-0`;
110
+ } else {
111
+ return `>=${major}.${minor}.0 <${+major + 1}.0.0-0`;
112
+ }
113
+ } else if (preRelease2) {
114
+ if (major === "0") {
115
+ if (minor === "0") {
116
+ return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${minor}.${+patch + 1}-0`;
117
+ } else {
118
+ return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${+minor + 1}.0-0`;
119
+ }
120
+ } else {
121
+ return `>=${major}.${minor}.${patch}-${preRelease2} <${+major + 1}.0.0-0`;
122
+ }
123
+ } else {
124
+ if (major === "0") {
125
+ if (minor === "0") {
126
+ return `>=${major}.${minor}.${patch} <${major}.${minor}.${+patch + 1}-0`;
127
+ } else {
128
+ return `>=${major}.${minor}.${patch} <${major}.${+minor + 1}.0-0`;
129
+ }
130
+ }
131
+ return `>=${major}.${minor}.${patch} <${+major + 1}.0.0-0`;
132
+ }
133
+ }
134
+ );
135
+ }).join(" ");
136
+ }
137
+ function parseTildes(range) {
138
+ return range.trim().split(/\s+/).map((rangeVersion) => {
139
+ return rangeVersion.replace(
140
+ parseRegex(tilde),
141
+ (_, major, minor, patch, preRelease2) => {
142
+ if (isXVersion(major)) {
143
+ return "";
144
+ } else if (isXVersion(minor)) {
145
+ return `>=${major}.0.0 <${+major + 1}.0.0-0`;
146
+ } else if (isXVersion(patch)) {
147
+ return `>=${major}.${minor}.0 <${major}.${+minor + 1}.0-0`;
148
+ } else if (preRelease2) {
149
+ return `>=${major}.${minor}.${patch}-${preRelease2} <${major}.${+minor + 1}.0-0`;
150
+ }
151
+ return `>=${major}.${minor}.${patch} <${major}.${+minor + 1}.0-0`;
152
+ }
153
+ );
154
+ }).join(" ");
155
+ }
156
+ function parseXRanges(range) {
157
+ return range.split(/\s+/).map((rangeVersion) => {
158
+ return rangeVersion.trim().replace(
159
+ parseRegex(xRange),
160
+ (ret, gtlt2, major, minor, patch, preRelease2) => {
161
+ const isXMajor = isXVersion(major);
162
+ const isXMinor = isXMajor || isXVersion(minor);
163
+ const isXPatch = isXMinor || isXVersion(patch);
164
+ if (gtlt2 === "=" && isXPatch) {
165
+ gtlt2 = "";
166
+ }
167
+ preRelease2 = "";
168
+ if (isXMajor) {
169
+ if (gtlt2 === ">" || gtlt2 === "<") {
170
+ return "<0.0.0-0";
171
+ } else {
172
+ return "*";
173
+ }
174
+ } else if (gtlt2 && isXPatch) {
175
+ if (isXMinor) {
176
+ minor = 0;
177
+ }
178
+ patch = 0;
179
+ if (gtlt2 === ">") {
180
+ gtlt2 = ">=";
181
+ if (isXMinor) {
182
+ major = +major + 1;
183
+ minor = 0;
184
+ patch = 0;
185
+ } else {
186
+ minor = +minor + 1;
187
+ patch = 0;
188
+ }
189
+ } else if (gtlt2 === "<=") {
190
+ gtlt2 = "<";
191
+ if (isXMinor) {
192
+ major = +major + 1;
193
+ } else {
194
+ minor = +minor + 1;
195
+ }
196
+ }
197
+ if (gtlt2 === "<") {
198
+ preRelease2 = "-0";
199
+ }
200
+ return `${gtlt2 + major}.${minor}.${patch}${preRelease2}`;
201
+ } else if (isXMinor) {
202
+ return `>=${major}.0.0${preRelease2} <${+major + 1}.0.0-0`;
203
+ } else if (isXPatch) {
204
+ return `>=${major}.${minor}.0${preRelease2} <${major}.${+minor + 1}.0-0`;
205
+ }
206
+ return ret;
207
+ }
208
+ );
209
+ }).join(" ");
210
+ }
211
+ function parseStar(range) {
212
+ return range.trim().replace(parseRegex(star), "");
213
+ }
214
+ function parseGTE0(comparatorString) {
215
+ return comparatorString.trim().replace(parseRegex(gte0), "");
216
+ }
217
+ function compareAtom(rangeAtom, versionAtom) {
218
+ rangeAtom = +rangeAtom || rangeAtom;
219
+ versionAtom = +versionAtom || versionAtom;
220
+ if (rangeAtom > versionAtom) {
221
+ return 1;
222
+ }
223
+ if (rangeAtom === versionAtom) {
224
+ return 0;
225
+ }
226
+ return -1;
227
+ }
228
+ function comparePreRelease(rangeAtom, versionAtom) {
229
+ const { preRelease: rangePreRelease } = rangeAtom;
230
+ const { preRelease: versionPreRelease } = versionAtom;
231
+ if (rangePreRelease === void 0 && !!versionPreRelease) {
232
+ return 1;
233
+ }
234
+ if (!!rangePreRelease && versionPreRelease === void 0) {
235
+ return -1;
236
+ }
237
+ if (rangePreRelease === void 0 && versionPreRelease === void 0) {
238
+ return 0;
239
+ }
240
+ for (let i = 0, n = rangePreRelease.length; i <= n; i++) {
241
+ const rangeElement = rangePreRelease[i];
242
+ const versionElement = versionPreRelease[i];
243
+ if (rangeElement === versionElement) {
244
+ continue;
245
+ }
246
+ if (rangeElement === void 0 && versionElement === void 0) {
247
+ return 0;
248
+ }
249
+ if (!rangeElement) {
250
+ return 1;
251
+ }
252
+ if (!versionElement) {
253
+ return -1;
254
+ }
255
+ return compareAtom(rangeElement, versionElement);
256
+ }
257
+ return 0;
258
+ }
259
+ function compareVersion(rangeAtom, versionAtom) {
260
+ return compareAtom(rangeAtom.major, versionAtom.major) || compareAtom(rangeAtom.minor, versionAtom.minor) || compareAtom(rangeAtom.patch, versionAtom.patch) || comparePreRelease(rangeAtom, versionAtom);
261
+ }
262
+ function eq(rangeAtom, versionAtom) {
263
+ return rangeAtom.version === versionAtom.version;
264
+ }
265
+ function compare(rangeAtom, versionAtom) {
266
+ switch (rangeAtom.operator) {
267
+ case "":
268
+ case "=":
269
+ return eq(rangeAtom, versionAtom);
270
+ case ">":
271
+ return compareVersion(rangeAtom, versionAtom) < 0;
272
+ case ">=":
273
+ return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) < 0;
274
+ case "<":
275
+ return compareVersion(rangeAtom, versionAtom) > 0;
276
+ case "<=":
277
+ return eq(rangeAtom, versionAtom) || compareVersion(rangeAtom, versionAtom) > 0;
278
+ case void 0: {
279
+ return true;
280
+ }
281
+ default:
282
+ return false;
283
+ }
284
+ }
285
+ function parseComparatorString(range) {
286
+ return pipe(
287
+ parseCarets,
288
+ parseTildes,
289
+ parseXRanges,
290
+ parseStar
291
+ )(range);
292
+ }
293
+ function parseRange(range) {
294
+ return pipe(
295
+ parseHyphen,
296
+ parseComparatorTrim,
297
+ parseTildeTrim,
298
+ parseCaretTrim
299
+ )(range.trim()).split(/\s+/).join(" ");
300
+ }
301
+ function satisfy(version, range) {
302
+ if (!version) {
303
+ return false;
304
+ }
305
+ const parsedRange = parseRange(range);
306
+ const parsedComparator = parsedRange.split(" ").map((rangeVersion) => parseComparatorString(rangeVersion)).join(" ");
307
+ const comparators = parsedComparator.split(/\s+/).map((comparator2) => parseGTE0(comparator2));
308
+ const extractedVersion = extractComparator(version);
309
+ if (!extractedVersion) {
310
+ return false;
311
+ }
312
+ const [
313
+ ,
314
+ versionOperator,
315
+ ,
316
+ versionMajor,
317
+ versionMinor,
318
+ versionPatch,
319
+ versionPreRelease
320
+ ] = extractedVersion;
321
+ const versionAtom = {
322
+ version: combineVersion(
323
+ versionMajor,
324
+ versionMinor,
325
+ versionPatch,
326
+ versionPreRelease
327
+ ),
328
+ major: versionMajor,
329
+ minor: versionMinor,
330
+ patch: versionPatch,
331
+ preRelease: versionPreRelease == null ? void 0 : versionPreRelease.split(".")
332
+ };
333
+ for (const comparator2 of comparators) {
334
+ const extractedComparator = extractComparator(comparator2);
335
+ if (!extractedComparator) {
336
+ return false;
337
+ }
338
+ const [
339
+ ,
340
+ rangeOperator,
341
+ ,
342
+ rangeMajor,
343
+ rangeMinor,
344
+ rangePatch,
345
+ rangePreRelease
346
+ ] = extractedComparator;
347
+ const rangeAtom = {
348
+ operator: rangeOperator,
349
+ version: combineVersion(
350
+ rangeMajor,
351
+ rangeMinor,
352
+ rangePatch,
353
+ rangePreRelease
354
+ ),
355
+ major: rangeMajor,
356
+ minor: rangeMinor,
357
+ patch: rangePatch,
358
+ preRelease: rangePreRelease == null ? void 0 : rangePreRelease.split(".")
359
+ };
360
+ if (!compare(rangeAtom, versionAtom)) {
361
+ return false;
362
+ }
363
+ }
364
+ return true;
365
+ }
366
+
367
+ const currentImports = {};
368
+
369
+ // eslint-disable-next-line no-undef
370
+ const moduleMap = {'react':{get:()=>()=>__federation_import(new URL('__federation_shared_react-Bp6HVBS4.js', module.meta.url).href),import:true},'react-dom':{get:()=>()=>__federation_import(new URL('__federation_shared_react-dom-BCcRGiYp.js', module.meta.url).href),import:true}};
371
+ const moduleCache = Object.create(null);
372
+ async function importShared(name, shareScope = 'default') {
373
+ return moduleCache[name]
374
+ ? new Promise((r) => r(moduleCache[name]))
375
+ : (await getSharedFromRuntime(name, shareScope)) || getSharedFromLocal(name)
376
+ }
377
+ // eslint-disable-next-line
378
+ async function __federation_import(name) {
379
+ currentImports[name] ??= module.import(name);
380
+ return currentImports[name]
381
+ }
382
+ async function getSharedFromRuntime(name, shareScope) {
383
+ let module = null;
384
+ if (globalThis?.__federation_shared__?.[shareScope]?.[name]) {
385
+ const versionObj = globalThis.__federation_shared__[shareScope][name];
386
+ const requiredVersion = moduleMap[name]?.requiredVersion;
387
+ const hasRequiredVersion = !!requiredVersion;
388
+ if (hasRequiredVersion) {
389
+ const versionKey = Object.keys(versionObj).find((version) =>
390
+ satisfy(version, requiredVersion)
391
+ );
392
+ if (versionKey) {
393
+ const versionValue = versionObj[versionKey];
394
+ module = await (await versionValue.get())();
395
+ } else {
396
+ console.log(
397
+ `provider support ${name}(${versionKey}) is not satisfied requiredVersion(\${moduleMap[name].requiredVersion})`
398
+ );
399
+ }
400
+ } else {
401
+ const versionKey = Object.keys(versionObj)[0];
402
+ const versionValue = versionObj[versionKey];
403
+ module = await (await versionValue.get())();
404
+ }
405
+ }
406
+ if (module) {
407
+ return flattenModule(module, name)
408
+ }
409
+ }
410
+ async function getSharedFromLocal(name) {
411
+ if (moduleMap[name]?.import) {
412
+ let module = await (await moduleMap[name].get())();
413
+ return flattenModule(module, name)
414
+ } else {
415
+ console.error(
416
+ `consumer config import=false,so cant use callback shared module`
417
+ );
418
+ }
419
+ }
420
+ function flattenModule(module, name) {
421
+ // use a shared module which export default a function will getting error 'TypeError: xxx is not a function'
422
+ if (typeof module.default === 'function') {
423
+ Object.keys(module).forEach((key) => {
424
+ if (key !== 'default') {
425
+ module.default[key] = module[key];
426
+ }
427
+ });
428
+ moduleCache[name] = module.default;
429
+ return module.default
430
+ }
431
+ if (module.default) module = Object.assign({}, module.default, module);
432
+ moduleCache[name] = module;
433
+ return module
434
+ }
435
+
436
+ })
437
+ };
438
+ }));
@@ -0,0 +1,16 @@
1
+ System.register(['./index-BzNimew1.js'], (function (exports, module) {
2
+ 'use strict';
3
+ var requireReact, getDefaultExportFromCjs;
4
+ return {
5
+ setters: [module => {
6
+ requireReact = module.r;
7
+ getDefaultExportFromCjs = module.g;
8
+ }],
9
+ execute: (function () {
10
+
11
+ var reactExports = requireReact();
12
+ const index = exports("default", /*@__PURE__*/getDefaultExportFromCjs(reactExports));
13
+
14
+ })
15
+ };
16
+ }));
@@ -0,0 +1,17 @@
1
+ System.register(['./index-BzNimew1.js', './index-DMFtQdNS.js'], (function (exports, module) {
2
+ 'use strict';
3
+ var getDefaultExportFromCjs, requireReactDom;
4
+ return {
5
+ setters: [module => {
6
+ getDefaultExportFromCjs = module.g;
7
+ }, module => {
8
+ requireReactDom = module.r;
9
+ }],
10
+ execute: (function () {
11
+
12
+ var reactDomExports = requireReactDom();
13
+ const index = exports("default", /*@__PURE__*/getDefaultExportFromCjs(reactDomExports));
14
+
15
+ })
16
+ };
17
+ }));