@bluealba/platform-cli 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1448 -0
- package/package.json +39 -0
- package/templates/application-data-template/{{applicationName}}/application.json +6 -0
- package/templates/application-data-template/{{applicationName}}/modules.json +1 -0
- package/templates/application-data-template/{{applicationName}}/operations.json +1 -0
- package/templates/application-data-template/{{applicationName}}/roles.json +1 -0
- package/templates/application-monorepo-template/.changeset/config.json +11 -0
- package/templates/application-monorepo-template/.nvmrc +1 -0
- package/templates/application-monorepo-template/.syncpackrc +4 -0
- package/templates/application-monorepo-template/package.json +31 -0
- package/templates/application-monorepo-template/packages-versions.json +1 -0
- package/templates/application-monorepo-template/scripts/preinstall.mjs +57 -0
- package/templates/application-monorepo-template/services/.gitkeep +0 -0
- package/templates/application-monorepo-template/turbo.json +26 -0
- package/templates/application-monorepo-template/ui/.gitkeep +0 -0
- package/templates/bootstrap-service-template/.eslintrc.js +27 -0
- package/templates/bootstrap-service-template/.nvmrc +1 -0
- package/templates/bootstrap-service-template/.prettierrc +4 -0
- package/templates/bootstrap-service-template/Dockerfile +14 -0
- package/templates/bootstrap-service-template/Dockerfile.development +10 -0
- package/templates/bootstrap-service-template/README.md +13 -0
- package/templates/bootstrap-service-template/package.json +38 -0
- package/templates/bootstrap-service-template/src/config.ts +6 -0
- package/templates/bootstrap-service-template/src/data/.gitkeep +0 -0
- package/templates/bootstrap-service-template/src/data/platform/modules-config.json +9 -0
- package/templates/bootstrap-service-template/src/data/platform/modules.json +1 -0
- package/templates/bootstrap-service-template/src/data/shared-libraries.json +14 -0
- package/templates/bootstrap-service-template/src/main.ts +38 -0
- package/templates/bootstrap-service-template/tsconfig.build.json +4 -0
- package/templates/bootstrap-service-template/tsconfig.json +23 -0
- package/templates/customization-ui-module-template/Dockerfile +18 -0
- package/templates/customization-ui-module-template/Dockerfile.development +10 -0
- package/templates/customization-ui-module-template/babel.config.json +36 -0
- package/templates/customization-ui-module-template/caddy/Caddyfile +25 -0
- package/templates/customization-ui-module-template/package.json +59 -0
- package/templates/customization-ui-module-template/src/components/ExpandedNavbarLogo.tsx +62 -0
- package/templates/customization-ui-module-template/src/components/ExtensionPoints/index.tsx +28 -0
- package/templates/customization-ui-module-template/src/components/Logo.tsx +55 -0
- package/templates/customization-ui-module-template/src/components/SplashLogo.tsx +52 -0
- package/templates/customization-ui-module-template/src/declarations.d.ts +41 -0
- package/templates/customization-ui-module-template/src/hooks/useDynamicStyleSheet.ts +18 -0
- package/templates/customization-ui-module-template/src/platform-customization-ui.tsx +16 -0
- package/templates/customization-ui-module-template/src/root.component.tsx +17 -0
- package/templates/customization-ui-module-template/src/styles/base.css +15 -0
- package/templates/customization-ui-module-template/src/styles/index.css +2 -0
- package/templates/customization-ui-module-template/src/styles/platform.css +125 -0
- package/templates/customization-ui-module-template/src/styles/splash.css +7 -0
- package/templates/customization-ui-module-template/tsconfig.json +12 -0
- package/templates/customization-ui-module-template/webpack.config.js +43 -0
- package/templates/nestjs-service-module-template/.env.example +3 -0
- package/templates/nestjs-service-module-template/.eslintrc.js +25 -0
- package/templates/nestjs-service-module-template/.nvmrc +1 -0
- package/templates/nestjs-service-module-template/.prettierrc +4 -0
- package/templates/nestjs-service-module-template/Dockerfile +14 -0
- package/templates/nestjs-service-module-template/Dockerfile.development +12 -0
- package/templates/nestjs-service-module-template/nest-cli.json +8 -0
- package/templates/nestjs-service-module-template/package.json +64 -0
- package/templates/nestjs-service-module-template/src/app.controller.spec.ts +22 -0
- package/templates/nestjs-service-module-template/src/app.controller.ts +12 -0
- package/templates/nestjs-service-module-template/src/app.module.ts +10 -0
- package/templates/nestjs-service-module-template/src/app.service.ts +8 -0
- package/templates/nestjs-service-module-template/src/main.ts +8 -0
- package/templates/nestjs-service-module-template/test/app.e2e-spec.ts +24 -0
- package/templates/nestjs-service-module-template/test/jest-e2e.json +9 -0
- package/templates/nestjs-service-module-template/tsconfig.build.json +4 -0
- package/templates/nestjs-service-module-template/tsconfig.json +21 -0
- package/templates/platform-init-template/core/.changeset/config.json +11 -0
- package/templates/platform-init-template/core/.nvmrc +1 -0
- package/templates/platform-init-template/core/.syncpackrc +4 -0
- package/templates/platform-init-template/core/package.json +69 -0
- package/templates/platform-init-template/core/packages-versions.json +1 -0
- package/templates/platform-init-template/core/scripts/preinstall.mjs +59 -0
- package/templates/platform-init-template/core/services/.gitkeep +0 -0
- package/templates/platform-init-template/core/turbo.json +26 -0
- package/templates/platform-init-template/core/ui/.gitkeep +0 -0
- package/templates/platform-init-template/local/.env.example +18 -0
- package/templates/platform-init-template/local/core-docker-compose.yml +27 -0
- package/templates/platform-init-template/local/docker-compose.yml +3 -0
- package/templates/platform-init-template/local/environment/pae-nestjs-gateway-service.env +34 -0
- package/templates/platform-init-template/local/nginx.conf +69 -0
- package/templates/platform-init-template/local/package.json +18 -0
- package/templates/platform-init-template/local/platform-docker-compose.yml +81 -0
- package/templates/platform-init-template/local/scripts/build.sh +18 -0
- package/templates/platform-init-template/local/scripts/install.sh +18 -0
- package/templates/platform-init-template/local/ssl/cert.pem +21 -0
- package/templates/platform-init-template/local/ssl/key.pem +28 -0
- package/templates/react-ui-module-template/.nvmrc +1 -0
- package/templates/react-ui-module-template/Dockerfile +15 -0
- package/templates/react-ui-module-template/Dockerfile.development +12 -0
- package/templates/react-ui-module-template/Dockerfile_nginx +11 -0
- package/templates/react-ui-module-template/caddy/Caddyfile +21 -0
- package/templates/react-ui-module-template/nginx/default.conf +23 -0
- package/templates/react-ui-module-template/package.json +29 -0
- package/templates/react-ui-module-template/src/Icon.tsx +7 -0
- package/templates/react-ui-module-template/src/components/Icons/BaseIconProps.ts +4 -0
- package/templates/react-ui-module-template/src/components/Icons/HomeTitleIcon.tsx +16 -0
- package/templates/react-ui-module-template/src/components/Icons/InfoContentIcon.tsx +16 -0
- package/templates/react-ui-module-template/src/declarations.d.ts +46 -0
- package/templates/react-ui-module-template/src/hooks/useDebouncedCallback.ts +21 -0
- package/templates/react-ui-module-template/src/main.module.css +10 -0
- package/templates/react-ui-module-template/src/main.tsx +19 -0
- package/templates/react-ui-module-template/src/menu.ts +65 -0
- package/templates/react-ui-module-template/src/root.component.tsx +26 -0
- package/templates/react-ui-module-template/src/services.ts +2 -0
- package/templates/react-ui-module-template/src/views/Home/Home.tsx +30 -0
- package/templates/react-ui-module-template/src/views/Home/index.ts +2 -0
- package/templates/react-ui-module-template/tsconfig.json +30 -0
- package/templates/react-ui-module-template/webpack.config.js +3 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
FROM caddy:alpine
|
|
2
|
+
|
|
3
|
+
WORKDIR /usr/share/caddy/
|
|
4
|
+
|
|
5
|
+
ARG NAME
|
|
6
|
+
ENV NAME=$NAME
|
|
7
|
+
|
|
8
|
+
ARG DISPLAY_NAME
|
|
9
|
+
ENV DISPLAY_NAME=$DISPLAY_NAME
|
|
10
|
+
|
|
11
|
+
COPY ./apps/{{applicationName}}-ui/version.json /usr/share/nginx/html/version.json
|
|
12
|
+
COPY ./apps/{{applicationName}}-ui/dist /usr/share/caddy/
|
|
13
|
+
COPY ./apps/{{applicationName}}-ui/caddy/Caddyfile /etc/caddy/Caddyfile
|
|
14
|
+
|
|
15
|
+
EXPOSE 8080
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
:8080 {
|
|
2
|
+
root * /usr/share/caddy/
|
|
3
|
+
encode gzip
|
|
4
|
+
file_server {
|
|
5
|
+
hide .git
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
log {
|
|
9
|
+
output stdout
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
header {
|
|
13
|
+
?Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
|
|
14
|
+
?Pragma "no-cache"
|
|
15
|
+
?Expires "0"
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
handle_path /version {
|
|
19
|
+
respond `{"version": "{$VERSION}", "name": "{$NAME}", "displayName": "{$DISPLAY_NAME}"}`
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
server {
|
|
2
|
+
listen 8080;
|
|
3
|
+
listen [::]:8080;
|
|
4
|
+
server_name localhost;
|
|
5
|
+
|
|
6
|
+
location / {
|
|
7
|
+
root /usr/share/nginx/html;
|
|
8
|
+
index index.html index.htm;
|
|
9
|
+
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
|
|
10
|
+
add_header Pragma "no-cache";
|
|
11
|
+
add_header Expires "0";
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
location /version {
|
|
15
|
+
default_type application/json;
|
|
16
|
+
alias /usr/share/nginx/html/version.json;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
error_page 500 502 503 504 /50x.html;
|
|
20
|
+
location = /50x.html {
|
|
21
|
+
root /usr/share/nginx/html;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@{{organizationName}}/{{applicationName}}-ui",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"displayName": "{{applicationDisplayName}}",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"start": "pae-ui-sdk start",
|
|
7
|
+
"start:dev": "pae-ui-sdk start --dev",
|
|
8
|
+
"build": "pae-ui-sdk build",
|
|
9
|
+
"lint": "pae-ui-sdk lint",
|
|
10
|
+
"lint:fix": "pae-ui-sdk lint --fix"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"@bluealba/pae-ui-react-core": "4.4.0",
|
|
14
|
+
"@bluealba/pae-ui-react-sdk": "1.0.2",
|
|
15
|
+
"@types/react": "18.3.3",
|
|
16
|
+
"@types/react-dom": "18.3.0",
|
|
17
|
+
"husky": "9.1.7",
|
|
18
|
+
"ts-loader": "9.5.2"
|
|
19
|
+
},
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"react": "18.3.1",
|
|
22
|
+
"react-dom": "18.3.1",
|
|
23
|
+
"react-query": "3.39.3",
|
|
24
|
+
"react-router-dom": "6.26.1"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
const Icon = () => (
|
|
4
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M8.856 17.225A1.388 1.388 0 1 0 8.88 20a1.388 1.388 0 0 0 -0.025 -2.775m5.537 -10.559a1.388 1.388 0 1 0 -0.022 -2.775 1.388 1.388 0 0 0 0.022 2.775m-3.787 6.587a1.388 1.388 0 1 0 0.022 2.775 1.388 1.388 0 0 0 -0.022 -2.775m5.521 3.971a1.388 1.388 0 1 0 0.02 2.775 1.388 1.388 0 0 0 -0.02 -2.775m0 -14.447a1.388 1.388 0 1 0 -0.024 -2.775 1.388 1.388 0 0 0 0.024 2.775m-8.32 10.476a1.388 1.388 0 1 0 -0.024 -2.775 1.388 1.388 0 0 0 0.024 2.775M3.9 7.766a1.388 1.388 0 1 0 -0.025 -2.775 1.388 1.388 0 0 0 0.025 2.775m0 7.133a1.388 1.388 0 1 0 -1.291 -0.856 1.388 1.388 0 0 0 1.291 0.854zm3.906 -5.456a1.388 1.388 0 1 0 -1.399 -1.39 1.393 1.393 0 0 0 1.4 1.388zm6.587 6.587a1.388 1.388 0 1 0 -0.022 -2.775 1.388 1.388 0 0 0 0.022 2.775m-5.188 -10.751a1.4 1.4 0 1 0 2.797 0.024 1.4 1.4 0 0 0 -2.797 -0.025m-0.35 -2.504a1.388 1.388 0 1 0 -0.024 -2.78 1.388 1.388 0 0 0 0.024 2.782z" fill="currentColor" /></svg>
|
|
5
|
+
)
|
|
6
|
+
|
|
7
|
+
export default Icon
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface HomeTitleIconProps { }
|
|
4
|
+
|
|
5
|
+
const HomeTitleIcon: FC<HomeTitleIconProps> = () => {
|
|
6
|
+
return (
|
|
7
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64" fill="none">
|
|
8
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M14.1077 3.00001L14.0805 3C13.9291 2.99998 13.8113 2.99996 13.6999 3.00671C12.2859 3.09234 11.0478 3.98473 10.5195 5.29901C10.4776 5.40318 10.4087 5.61008 10.3595 5.75766L10.3543 5.77319C10.2169 6.14641 9.96864 6.46965 9.68128 6.70046C9.37798 6.71027 9.08829 6.72293 8.81139 6.73927C6.61944 6.86859 5.22843 7.22829 4.22795 8.22877C3.90174 8.55499 3.64365 8.92272 3.43945 9.3462C3.51622 9.3724 3.59102 9.40842 3.66213 9.45465C6.46252 11.2749 8.22198 12.4134 9.68393 13.1438C9.77254 12.6822 10.1785 12.3335 10.666 12.3335C11.2183 12.3335 11.666 12.7812 11.666 13.3335V13.944C14.4919 14.7968 17.5067 14.7968 20.3326 13.9441V13.3335C20.3326 12.7812 20.7804 12.3335 21.3326 12.3335C21.8201 12.3335 22.2261 12.6823 22.3147 13.1439C23.7767 12.4135 25.5362 11.275 28.3367 9.45465C28.4077 9.4085 28.4824 9.37252 28.559 9.34634C28.3548 8.9228 28.0967 8.55502 27.7704 8.22877C26.77 7.22829 25.3789 6.86859 23.187 6.73927C22.9241 6.72376 22.6497 6.71156 22.3631 6.70197C22.3451 6.68726 22.3269 6.67208 22.3088 6.65642C21.9878 6.37914 21.7369 6.01348 21.6104 5.67051L21.6062 5.65793C21.5584 5.51435 21.5212 5.4026 21.4795 5.29901C20.9512 3.98473 19.713 3.09234 18.2991 3.00671C18.1877 2.99996 18.0699 2.99998 17.9185 3L14.1077 3.00001ZM19.756 6.42092L19.75 6.40661L19.7435 6.39048L19.7374 6.37455L19.7325 6.3613L19.7302 6.35462L19.7245 6.3383L19.7194 6.32325L19.7166 6.3149L19.713 6.30378L19.71 6.29438L19.7077 6.2868C19.6551 6.12944 19.639 6.08272 19.6239 6.04501C19.3837 5.44761 18.8209 5.04198 18.1782 5.00305C18.1352 5.00045 18.0825 5.00001 17.8913 5.00001H14.1077C13.9165 5.00001 13.8638 5.00045 13.8208 5.00305C13.1782 5.04197 12.6155 5.44748 12.3752 6.04472L12.3717 6.05403L12.3611 6.08326C12.3523 6.10806 12.3415 6.13905 12.3291 6.17542C12.307 6.23992 12.2823 6.31394 12.2572 6.38915L12.2548 6.39703L12.2518 6.40641L12.2481 6.41753L12.2454 6.42588L12.2402 6.44095L12.2346 6.45726L12.2322 6.46395L12.2274 6.47721L12.2213 6.49316L12.2148 6.50933L12.2092 6.52253L12.2083 6.52448C12.1898 6.57228 12.1701 6.61998 12.1494 6.66752C12.5275 6.66667 12.9216 6.66667 13.3325 6.66667H18.6659C19.0812 6.66667 19.4793 6.66667 19.8612 6.66755C19.8232 6.58608 19.7881 6.50379 19.756 6.42092Z" fill="#2694E3" />
|
|
9
|
+
<path d="M2.88408 11.3327C2.66797 12.8044 2.66797 14.7325 2.66797 17.3331C2.66797 22.3614 2.66797 24.8756 4.23007 26.4377C5.79216 27.9998 8.30632 27.9998 13.3346 27.9998H18.668C23.6963 27.9998 26.2104 27.9998 27.7725 26.4377C29.3346 24.8756 29.3346 22.3614 29.3346 17.3331C29.3346 14.7327 29.3346 12.8046 29.1186 11.333C26.083 13.3061 24.1375 14.5644 22.3348 15.3393V15.9999C22.3348 16.5522 21.887 16.9999 21.3348 16.9999C20.7898 16.9999 20.3466 16.564 20.335 16.0218C17.4946 16.7706 14.5082 16.7706 11.6679 16.0217C11.6562 16.5639 11.2131 16.9999 10.6681 16.9999C10.1158 16.9999 9.66809 16.5522 9.66809 15.9999V15.3392C7.86536 14.5643 5.91972 13.3059 2.88408 11.3327Z" fill="#0070C0" />
|
|
10
|
+
</svg>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
HomeTitleIcon.displayName = 'HomeTitleIcon';
|
|
15
|
+
|
|
16
|
+
export default HomeTitleIcon;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface InfoContentIconProps {}
|
|
4
|
+
|
|
5
|
+
const InfoContentIcon: FC<InfoContentIconProps> = () => {
|
|
6
|
+
return (
|
|
7
|
+
<svg width="64" height="64" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
8
|
+
<rect opacity="0.5" width="64" height="64" rx="4.26667" transform="matrix(-1 0 0 1 64 0)" fill="var(--pae-shell-color-secondary)" fillOpacity="0.1"/>
|
|
9
|
+
<path d="M43.2 39.4674V32.0008C43.2 25.8152 38.1856 20.8008 32 20.8008C25.8145 20.8008 20.8 25.8152 20.8 32.0008V39.4674M23.9112 43.2008C22.1929 43.2008 20.8 41.8079 20.8 40.0897V37.6008C20.8 35.8826 22.1929 34.4897 23.9112 34.4897C25.6294 34.4897 27.0223 35.8826 27.0223 37.6008V40.0897C27.0223 41.8079 25.6294 43.2008 23.9112 43.2008ZM40.0889 43.2008C38.3707 43.2008 36.9778 41.8079 36.9778 40.0897V37.6008C36.9778 35.8826 38.3707 34.4897 40.0889 34.4897C41.8072 34.4897 43.2 35.8826 43.2 37.6008V40.0897C43.2 41.8079 41.8072 43.2008 40.0889 43.2008Z" stroke="var(--pae-shell-color-secondary)" strokeWidth="3.2" strokeLinecap="round" strokeLinejoin="round"/>
|
|
10
|
+
</svg>
|
|
11
|
+
);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
InfoContentIcon.displayName = 'InfoContentIcon';
|
|
15
|
+
|
|
16
|
+
export default InfoContentIcon;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
declare module '@{{organizationName}}/*';
|
|
2
|
+
|
|
3
|
+
declare module '*.css' {
|
|
4
|
+
const content: Record<string, string>;
|
|
5
|
+
export default content;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare module '*.html' {
|
|
9
|
+
const rawHtmlFile: string;
|
|
10
|
+
export = rawHtmlFile;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare module '*.bmp' {
|
|
14
|
+
const src: string;
|
|
15
|
+
export default src;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare module '*.gif' {
|
|
19
|
+
const src: string;
|
|
20
|
+
export default src;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare module '*.jpg' {
|
|
24
|
+
const src: string;
|
|
25
|
+
export default src;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
declare module '*.jpeg' {
|
|
29
|
+
const src: string;
|
|
30
|
+
export default src;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare module '*.png' {
|
|
34
|
+
const src: string;
|
|
35
|
+
export default src;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare module '*.webp' {
|
|
39
|
+
const src: string;
|
|
40
|
+
export default src;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare module '*.svg' {
|
|
44
|
+
const src: string;
|
|
45
|
+
export default src;
|
|
46
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {useCallback, useRef} from "react";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Similar to useCallback but gives one that is debounced for example to handle input text onchange
|
|
5
|
+
*/
|
|
6
|
+
const useDebouncedCallback = (func: Function, wait: number, dependencies) => {
|
|
7
|
+
const timeout = useRef<ReturnType<typeof setTimeout>>();
|
|
8
|
+
|
|
9
|
+
return useCallback(
|
|
10
|
+
(...args) => {
|
|
11
|
+
clearTimeout(timeout.current);
|
|
12
|
+
timeout.current = setTimeout(() => {
|
|
13
|
+
clearTimeout(timeout.current);
|
|
14
|
+
func(...args);
|
|
15
|
+
}, wait);
|
|
16
|
+
},
|
|
17
|
+
[func, wait, ...dependencies]
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default useDebouncedCallback
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
|
|
2
|
+
strong {
|
|
3
|
+
color: var(--pae-shell-color-secondary);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
input {
|
|
7
|
+
color: var(--platform-input-color) !important;
|
|
8
|
+
background-color: var(--platform-input-background-color) !important;
|
|
9
|
+
border: 1px solid var(--platform-input-border-color) !important;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ReactDOMClient from "react-dom/client";
|
|
3
|
+
|
|
4
|
+
import { initializeMicroFrontend } from "@bluealba/pae-ui-react-core";
|
|
5
|
+
|
|
6
|
+
import Root from "./root.component";
|
|
7
|
+
|
|
8
|
+
/** exports the menu used by pae-shell */
|
|
9
|
+
export { default as menu } from "./menu";
|
|
10
|
+
/** application icon */
|
|
11
|
+
export { default as icon } from "./Icon";
|
|
12
|
+
|
|
13
|
+
import './main.module.css'
|
|
14
|
+
|
|
15
|
+
export const { bootstrap, mount, unmount } = initializeMicroFrontend({
|
|
16
|
+
React,
|
|
17
|
+
ReactDOMClient,
|
|
18
|
+
rootComponent: Root,
|
|
19
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This applications menu metadata.
|
|
3
|
+
* The menu gets generated and rendered by pae-shell-ui based on this.
|
|
4
|
+
* This for sure will evolve to address more complex cases such as dynamic labels
|
|
5
|
+
*
|
|
6
|
+
* Menu Example:
|
|
7
|
+
* ------------
|
|
8
|
+
{
|
|
9
|
+
label: "Backend Integration",
|
|
10
|
+
items: [
|
|
11
|
+
{
|
|
12
|
+
label: "Service Calls",
|
|
13
|
+
path: '/backend/service-calls'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: "GQL Subscriptions",
|
|
17
|
+
path: '/backend/graphql-subscriptions'
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
label: "Events Tracking",
|
|
23
|
+
path: "/events-tracking"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
label: 'UI',
|
|
27
|
+
items: [
|
|
28
|
+
{
|
|
29
|
+
label: "Extension Points",
|
|
30
|
+
path: "/ui/extension-points"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "Styling",
|
|
34
|
+
path: '/ui/styling'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
label: "Shell Props",
|
|
38
|
+
path: '/ui/shell-props'
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
label: "Authorization",
|
|
44
|
+
path: "/authorization"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: "Impersonation",
|
|
48
|
+
path: "/impersonation"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
label: "Feature Flags",
|
|
52
|
+
path: "/feature-flags"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
label: "Rooms",
|
|
56
|
+
path: "/rooms"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
*/
|
|
60
|
+
export default [
|
|
61
|
+
{
|
|
62
|
+
label: "Example",
|
|
63
|
+
path: `/{{applicationName}}`
|
|
64
|
+
}
|
|
65
|
+
]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BrowserRouter, Routes, Route } from "react-router-dom";
|
|
2
|
+
import { QueryClient, QueryClientProvider } from "react-query";
|
|
3
|
+
import { ReactQueryDevtools } from 'react-query/devtools';
|
|
4
|
+
import { useModuleMetadata } from "@bluealba/pae-ui-react-core";
|
|
5
|
+
|
|
6
|
+
import Home from "./views/Home";
|
|
7
|
+
|
|
8
|
+
const queryClient = new QueryClient();
|
|
9
|
+
|
|
10
|
+
export default function Root() {
|
|
11
|
+
const module = useModuleMetadata()
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<QueryClientProvider client={queryClient}>
|
|
15
|
+
<BrowserRouter>
|
|
16
|
+
<Routes>
|
|
17
|
+
<Route path="*" element={<Home />} />
|
|
18
|
+
|
|
19
|
+
<Route path={`${module.ui.route}/example`} element={<div>Example</div>} />
|
|
20
|
+
</Routes>
|
|
21
|
+
</BrowserRouter>
|
|
22
|
+
<ReactQueryDevtools initialIsOpen={false} position="bottom-right" />
|
|
23
|
+
</QueryClientProvider>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type FC } from 'react';
|
|
2
|
+
|
|
3
|
+
import { SERVICE_NAME } from "@/services";
|
|
4
|
+
//import { useAuth, useServiceInvoker } from "@bluealba/pae-ui-react-core";
|
|
5
|
+
|
|
6
|
+
export interface HomeProps { }
|
|
7
|
+
|
|
8
|
+
const Home: FC<HomeProps> = () => {
|
|
9
|
+
//const invoker = useServiceInvoker(SERVICE_NAME);
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const doIt = async () => {
|
|
14
|
+
const response = await invoker('/some-endpoint');
|
|
15
|
+
...
|
|
16
|
+
}
|
|
17
|
+
doIt()
|
|
18
|
+
}, []);
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
Home Content
|
|
24
|
+
</>
|
|
25
|
+
)
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
Home.displayName = 'Home';
|
|
29
|
+
|
|
30
|
+
export default Home;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": ["src/main.tsx"],
|
|
3
|
+
"include": ["src/**/*"],
|
|
4
|
+
"exclude": ["src/**/*.test*"],
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"jsx": "react-jsx",
|
|
7
|
+
"declarationDir": "dist",
|
|
8
|
+
"plugins": [{ "name": "typescript-plugin-css-modules" }],
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"target": "ES2020",
|
|
11
|
+
"module": "ES2020",
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"resolveJsonModule": true,
|
|
15
|
+
"paths": {
|
|
16
|
+
"@/*": ["./src/*"]
|
|
17
|
+
},
|
|
18
|
+
"lib": [
|
|
19
|
+
"dom",
|
|
20
|
+
"es5",
|
|
21
|
+
"scripthost",
|
|
22
|
+
"es2015",
|
|
23
|
+
"es2015.promise",
|
|
24
|
+
"es2016.array.include",
|
|
25
|
+
"es2018"
|
|
26
|
+
],
|
|
27
|
+
"declaration": true,
|
|
28
|
+
"emitDeclarationOnly": true
|
|
29
|
+
}
|
|
30
|
+
}
|