@underpostnet/cyberia 3.2.80
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/.dockerignore +14 -0
- package/.env.example +144 -0
- package/.github/workflows/cyberia-client.cd.yml +40 -0
- package/.github/workflows/cyberia-server.cd.yml +40 -0
- package/.github/workflows/docker-image.cyberia-client.ci.yml +71 -0
- package/.github/workflows/docker-image.cyberia-client.dev.ci.yml +70 -0
- package/.github/workflows/docker-image.cyberia-server.ci.yml +71 -0
- package/.github/workflows/docker-image.cyberia-server.dev.ci.yml +71 -0
- package/.github/workflows/docker-image.engine-cyberia.ci.yml +53 -0
- package/.github/workflows/docker-image.engine-cyberia.dev.ci.yml +53 -0
- package/.github/workflows/engine-cyberia.cd.yml +157 -0
- package/.github/workflows/engine-cyberia.ci.yml +125 -0
- package/.github/workflows/ghpkg.ci.yml +160 -0
- package/.github/workflows/gitlab.ci.yml +20 -0
- package/.github/workflows/hardhat.ci.yml +82 -0
- package/.github/workflows/npmpkg.ci.yml +126 -0
- package/.github/workflows/publish.ci.yml +87 -0
- package/.github/workflows/publish.cyberia.ci.yml +79 -0
- package/.github/workflows/pwa-microservices-template-page.cd.yml +65 -0
- package/.github/workflows/pwa-microservices-template-test.ci.yml +33 -0
- package/.github/workflows/release.cd.yml +46 -0
- package/.nycrc +9 -0
- package/.prettierignore +12 -0
- package/.prettierrc +9 -0
- package/.vscode/extensions.json +10 -0
- package/.vscode/settings.json +26 -0
- package/CHANGELOG.md +2516 -0
- package/CLI-HELP.md +1099 -0
- package/Dockerfile +161 -0
- package/Dockerfile.dev +161 -0
- package/Dockerfile.test +165 -0
- package/LICENSE +21 -0
- package/README.md +259 -0
- package/baremetal/commission-workflows.json +211 -0
- package/baremetal/packer-workflows.json +24 -0
- package/bin/build.js +261 -0
- package/bin/build.template.js +33 -0
- package/bin/cyberia.js +5627 -0
- package/bin/deploy.js +1547 -0
- package/bin/index.js +5627 -0
- package/bump.config.js +27 -0
- package/compose.env +144 -0
- package/conf.js +952 -0
- package/deployment.yaml +418 -0
- package/docker-compose.yml +434 -0
- package/examples/static-page/README.md +150 -0
- package/examples/static-page/ssr-components/CustomPage.js +554 -0
- package/examples/static-page/static-config-example.json +57 -0
- package/hardhat/.env.example +31 -0
- package/hardhat/contracts/ObjectLayerToken.sol +391 -0
- package/hardhat/deployments/.gitkeep +0 -0
- package/hardhat/deployments/hardhat-ObjectLayerToken.json +11 -0
- package/hardhat/hardhat.config.js +136 -0
- package/hardhat/ignition/modules/.gitkeep +0 -0
- package/hardhat/ignition/modules/ObjectLayerToken.js +21 -0
- package/hardhat/networks/besu-object-layer.network.json +138 -0
- package/hardhat/package-lock.json +2871 -0
- package/hardhat/package.json +43 -0
- package/hardhat/scripts/deployObjectLayerToken.js +98 -0
- package/hardhat/test/ObjectLayerToken.js +696 -0
- package/hardhat/types/ethers-contracts/ObjectLayerToken.ts +690 -0
- package/hardhat/types/ethers-contracts/common.ts +92 -0
- package/hardhat/types/ethers-contracts/factories/ObjectLayerToken__factory.ts +1055 -0
- package/hardhat/types/ethers-contracts/factories/index.ts +4 -0
- package/hardhat/types/ethers-contracts/hardhat.d.ts +47 -0
- package/hardhat/types/ethers-contracts/index.ts +6 -0
- package/ipfs/configure-ipfs.sh +13 -0
- package/jsconfig.json +9 -0
- package/manifests/cronjobs/dd-cron/dd-cron-backup.yaml +48 -0
- package/manifests/cronjobs/dd-cron/dd-cron-dns.yaml +48 -0
- package/manifests/deployment/adminer/deployment.yaml +32 -0
- package/manifests/deployment/adminer/kustomization.yaml +7 -0
- package/manifests/deployment/adminer/service.yaml +13 -0
- package/manifests/deployment/dd-cyberia-development/deployment.yaml +418 -0
- package/manifests/deployment/dd-cyberia-development/grpc-service.yaml +17 -0
- package/manifests/deployment/dd-cyberia-development/proxy.yaml +189 -0
- package/manifests/deployment/dd-cyberia-development/pv-pvc.yaml +164 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +163 -0
- package/manifests/deployment/dd-default-development/proxy.yaml +46 -0
- package/manifests/deployment/fastapi/backend-deployment.yml +120 -0
- package/manifests/deployment/fastapi/backend-service.yml +19 -0
- package/manifests/deployment/fastapi/frontend-deployment.yml +54 -0
- package/manifests/deployment/fastapi/frontend-service.yml +15 -0
- package/manifests/deployment/fastapi/initial_data.sh +8 -0
- package/manifests/deployment/kafka/deployment.yaml +67 -0
- package/manifests/deployment/mongo-express/deployment.yaml +62 -0
- package/manifests/deployment/phpmyadmin/deployment.yaml +54 -0
- package/manifests/deployment/playwright/deployment.yaml +52 -0
- package/manifests/deployment/spark/spark-pi-py.yaml +20 -0
- package/manifests/deployment/tensorflow/tf-gpu-test.yaml +63 -0
- package/manifests/envoy-service-nodeport.yaml +22 -0
- package/manifests/grafana/deployment.yaml +64 -0
- package/manifests/grafana/kustomization.yaml +7 -0
- package/manifests/grafana/pvc.yaml +12 -0
- package/manifests/grafana/service.yaml +14 -0
- package/manifests/grafana/storage-class.yaml +9 -0
- package/manifests/ipfs/configmap.yaml +64 -0
- package/manifests/ipfs/headless-service.yaml +35 -0
- package/manifests/ipfs/kustomization.yaml +8 -0
- package/manifests/ipfs/statefulset.yaml +149 -0
- package/manifests/ipfs/storage-class.yaml +9 -0
- package/manifests/kind-config-dev.yaml +20 -0
- package/manifests/kind-config.yaml +12 -0
- package/manifests/kubeadm-calico-config.yaml +14 -0
- package/manifests/letsencrypt-prod.yaml +14 -0
- package/manifests/lxd/lxd-admin-profile.yaml +26 -0
- package/manifests/lxd/lxd-preseed.yaml +30 -0
- package/manifests/mariadb/kustomization.yaml +9 -0
- package/manifests/mariadb/pv.yaml +12 -0
- package/manifests/mariadb/pvc.yaml +10 -0
- package/manifests/mariadb/service.yaml +10 -0
- package/manifests/mariadb/statefulset.yaml +56 -0
- package/manifests/mariadb/storage-class.yaml +10 -0
- package/manifests/mongodb/headless-service.yaml +10 -0
- package/manifests/mongodb/kustomization.yaml +11 -0
- package/manifests/mongodb/pv-pvc.yaml +59 -0
- package/manifests/mongodb/statefulset.yaml +113 -0
- package/manifests/mongodb/storage-class.yaml +9 -0
- package/manifests/mongodb-4.4/headless-service.yaml +10 -0
- package/manifests/mongodb-4.4/kustomization.yaml +9 -0
- package/manifests/mongodb-4.4/mongodb-nodeport.yaml +17 -0
- package/manifests/mongodb-4.4/pv-pvc.yaml +19 -0
- package/manifests/mongodb-4.4/service-deployment.yaml +61 -0
- package/manifests/mongodb-4.4/statefulset.yaml +79 -0
- package/manifests/mongodb-4.4/storage-class.yaml +9 -0
- package/manifests/mysql/kustomization.yaml +7 -0
- package/manifests/mysql/pv-pvc.yaml +27 -0
- package/manifests/mysql/statefulset.yaml +55 -0
- package/manifests/postgresql/configmap.yaml +9 -0
- package/manifests/postgresql/kustomization.yaml +10 -0
- package/manifests/postgresql/pv.yaml +15 -0
- package/manifests/postgresql/pvc.yaml +13 -0
- package/manifests/postgresql/service.yaml +10 -0
- package/manifests/postgresql/statefulset.yaml +37 -0
- package/manifests/prometheus/deployment.yaml +82 -0
- package/manifests/pv-pvc-dd.yaml +34 -0
- package/manifests/valkey/kustomization.yaml +7 -0
- package/manifests/valkey/service.yaml +10 -0
- package/manifests/valkey/statefulset.yaml +37 -0
- package/manifests/valkey/valkey-nodeport.yaml +17 -0
- package/mongodb/entrypoint.sh +76 -0
- package/nginx.conf +128 -0
- package/nodemon.json +6 -0
- package/package.json +101 -0
- package/packer/images/Rocky9Amd64/Makefile +62 -0
- package/packer/images/Rocky9Amd64/QUICKSTART.md +113 -0
- package/packer/images/Rocky9Amd64/README.md +122 -0
- package/packer/images/Rocky9Amd64/http/rocky9.ks.pkrtpl.hcl +114 -0
- package/packer/images/Rocky9Amd64/rocky9.pkr.hcl +164 -0
- package/packer/images/Rocky9Arm64/Makefile +69 -0
- package/packer/images/Rocky9Arm64/README.md +122 -0
- package/packer/images/Rocky9Arm64/http/rocky9.ks.pkrtpl.hcl +114 -0
- package/packer/images/Rocky9Arm64/rocky9.pkr.hcl +171 -0
- package/packer/scripts/fuse-nbd +64 -0
- package/packer/scripts/fuse-tar-root +63 -0
- package/proxy.yaml +189 -0
- package/pv-pvc.yaml +164 -0
- package/scripts/device-scan.sh +65 -0
- package/scripts/disk-clean.sh +182 -0
- package/scripts/disk-devices.sh +13 -0
- package/scripts/gen-fqdns.sh +14 -0
- package/scripts/gpu-diag.sh +19 -0
- package/scripts/ip-info.sh +118 -0
- package/scripts/ipxe-setup.sh +200 -0
- package/scripts/k3s-node-setup.sh +124 -0
- package/scripts/kubeadm-node-setup.sh +317 -0
- package/scripts/link-local-underpost-cli.sh +6 -0
- package/scripts/lxd-vm-setup.sh +208 -0
- package/scripts/maas-nat-firewalld.sh +145 -0
- package/scripts/maas-setup.sh +135 -0
- package/scripts/maas-upload-boot-resource.sh +183 -0
- package/scripts/nat-iptables.sh +111 -0
- package/scripts/nvim.sh +91 -0
- package/scripts/packer-init-vars-file.sh +40 -0
- package/scripts/packer-setup.sh +289 -0
- package/scripts/ports-ls.sh +33 -0
- package/scripts/quick-tftp.sh +19 -0
- package/scripts/rhel-grpc-setup.sh +56 -0
- package/scripts/rocky-kickstart.sh +986 -0
- package/scripts/rocky-pwa.sh +200 -0
- package/scripts/rocky-setup.sh +106 -0
- package/scripts/rpmfusion-ffmpeg-setup.sh +32 -0
- package/scripts/ssl.sh +170 -0
- package/scripts/test-monitor.sh +248 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.controller.js +30 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.model.js +155 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.router.js +39 -0
- package/src/api/atlas-sprite-sheet/atlas-sprite-sheet.service.js +382 -0
- package/src/api/core/core.controller.js +8 -0
- package/src/api/core/core.model.js +11 -0
- package/src/api/core/core.router.js +23 -0
- package/src/api/core/core.service.js +30 -0
- package/src/api/crypto/crypto.controller.js +10 -0
- package/src/api/crypto/crypto.model.js +23 -0
- package/src/api/crypto/crypto.router.js +23 -0
- package/src/api/crypto/crypto.service.js +64 -0
- package/src/api/cyberia-action/cyberia-action.controller.js +8 -0
- package/src/api/cyberia-action/cyberia-action.model.js +79 -0
- package/src/api/cyberia-action/cyberia-action.router.js +21 -0
- package/src/api/cyberia-action/cyberia-action.service.js +58 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.controller.js +27 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.model.js +100 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.router.js +70 -0
- package/src/api/cyberia-client-hints/cyberia-client-hints.service.js +152 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.controller.js +8 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.model.js +36 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.router.js +20 -0
- package/src/api/cyberia-dialogue/cyberia-dialogue.service.js +57 -0
- package/src/api/cyberia-entity/cyberia-entity.controller.js +6 -0
- package/src/api/cyberia-entity/cyberia-entity.model.js +25 -0
- package/src/api/cyberia-entity/cyberia-entity.router.js +17 -0
- package/src/api/cyberia-entity/cyberia-entity.service.js +42 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.controller.js +6 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.model.js +67 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.router.js +17 -0
- package/src/api/cyberia-entity-type-default/cyberia-entity-type-default.service.js +46 -0
- package/src/api/cyberia-instance/cyberia-fallback-world.js +337 -0
- package/src/api/cyberia-instance/cyberia-instance-boot.service.js +57 -0
- package/src/api/cyberia-instance/cyberia-instance-map.service.js +583 -0
- package/src/api/cyberia-instance/cyberia-instance.controller.js +42 -0
- package/src/api/cyberia-instance/cyberia-instance.model.js +117 -0
- package/src/api/cyberia-instance/cyberia-instance.router.js +75 -0
- package/src/api/cyberia-instance/cyberia-instance.service.js +190 -0
- package/src/api/cyberia-instance/cyberia-portal-connector.js +260 -0
- package/src/api/cyberia-instance/cyberia-world-generator.js +618 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.controller.js +6 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.model.js +200 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.router.js +17 -0
- package/src/api/cyberia-instance-conf/cyberia-instance-conf.service.js +46 -0
- package/src/api/cyberia-map/cyberia-map.controller.js +6 -0
- package/src/api/cyberia-map/cyberia-map.model.js +33 -0
- package/src/api/cyberia-map/cyberia-map.router.js +19 -0
- package/src/api/cyberia-map/cyberia-map.service.js +76 -0
- package/src/api/cyberia-quest/cyberia-quest.controller.js +9 -0
- package/src/api/cyberia-quest/cyberia-quest.model.js +67 -0
- package/src/api/cyberia-quest/cyberia-quest.router.js +26 -0
- package/src/api/cyberia-quest/cyberia-quest.service.js +97 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.controller.js +6 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.model.js +49 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.router.js +21 -0
- package/src/api/cyberia-quest-progress/cyberia-quest-progress.service.js +42 -0
- package/src/api/cyberia-saga/cyberia-saga.controller.js +6 -0
- package/src/api/cyberia-saga/cyberia-saga.model.js +59 -0
- package/src/api/cyberia-saga/cyberia-saga.router.js +17 -0
- package/src/api/cyberia-saga/cyberia-saga.service.js +42 -0
- package/src/api/cyberia-server-defaults/cyberia-server-defaults.js +1076 -0
- package/src/api/cyberia-skill/cyberia-skill.controller.js +6 -0
- package/src/api/cyberia-skill/cyberia-skill.model.js +50 -0
- package/src/api/cyberia-skill/cyberia-skill.router.js +17 -0
- package/src/api/cyberia-skill/cyberia-skill.service.js +42 -0
- package/src/api/default/default.controller.js +6 -0
- package/src/api/default/default.model.js +20 -0
- package/src/api/default/default.router.js +21 -0
- package/src/api/default/default.service.js +42 -0
- package/src/api/document/document.controller.js +9 -0
- package/src/api/document/document.model.js +95 -0
- package/src/api/document/document.router.js +32 -0
- package/src/api/document/document.service.js +633 -0
- package/src/api/file/file.controller.js +15 -0
- package/src/api/file/file.model.js +127 -0
- package/src/api/file/file.ref.json +39 -0
- package/src/api/file/file.router.js +36 -0
- package/src/api/file/file.service.js +499 -0
- package/src/api/instance/instance.controller.js +8 -0
- package/src/api/instance/instance.model.js +34 -0
- package/src/api/instance/instance.router.js +27 -0
- package/src/api/instance/instance.service.js +75 -0
- package/src/api/ipfs/ipfs.controller.js +8 -0
- package/src/api/ipfs/ipfs.model.js +77 -0
- package/src/api/ipfs/ipfs.router.js +26 -0
- package/src/api/ipfs/ipfs.service.js +145 -0
- package/src/api/object-layer/object-layer.controller.js +18 -0
- package/src/api/object-layer/object-layer.model.js +200 -0
- package/src/api/object-layer/object-layer.router.js +729 -0
- package/src/api/object-layer/object-layer.service.js +894 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.controller.js +6 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.model.js +93 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.router.js +17 -0
- package/src/api/object-layer-render-frames/object-layer-render-frames.service.js +46 -0
- package/src/api/test/test.controller.js +14 -0
- package/src/api/test/test.model.js +14 -0
- package/src/api/test/test.router.js +23 -0
- package/src/api/test/test.service.js +35 -0
- package/src/api/types.js +24 -0
- package/src/api/user/guest.service.js +100 -0
- package/src/api/user/postman_collection.json +216 -0
- package/src/api/user/user.build.js +16 -0
- package/src/api/user/user.controller.js +35 -0
- package/src/api/user/user.model.js +142 -0
- package/src/api/user/user.router.js +367 -0
- package/src/api/user/user.service.js +582 -0
- package/src/api.js +23 -0
- package/src/cli/baremetal.js +3947 -0
- package/src/cli/cloud-init.js +673 -0
- package/src/cli/cluster.js +1395 -0
- package/src/cli/db.js +1533 -0
- package/src/cli/deploy.js +1542 -0
- package/src/cli/docker-compose.js +802 -0
- package/src/cli/env.js +177 -0
- package/src/cli/fs.js +380 -0
- package/src/cli/image.js +389 -0
- package/src/cli/index.js +1059 -0
- package/src/cli/ipfs.js +182 -0
- package/src/cli/kickstart.js +271 -0
- package/src/cli/kubectl.js +214 -0
- package/src/cli/lxd.js +1232 -0
- package/src/cli/monitor.js +659 -0
- package/src/cli/release.js +595 -0
- package/src/cli/repository.js +1969 -0
- package/src/cli/run.js +3326 -0
- package/src/cli/secrets.js +151 -0
- package/src/cli/ssh.js +975 -0
- package/src/cli/static.js +653 -0
- package/src/cli/system.js +332 -0
- package/src/cli/test.js +176 -0
- package/src/client/Cryptokoyn.index.js +30 -0
- package/src/client/CyberiaPortal.index.js +31 -0
- package/src/client/Default.index.js +77 -0
- package/src/client/Itemledger.index.js +35 -0
- package/src/client/Underpost.index.js +31 -0
- package/src/client/components/core/404.js +20 -0
- package/src/client/components/core/500.js +20 -0
- package/src/client/components/core/Account.js +630 -0
- package/src/client/components/core/AgGrid.js +238 -0
- package/src/client/components/core/Alert.js +76 -0
- package/src/client/components/core/AppStore.js +69 -0
- package/src/client/components/core/Auth.js +353 -0
- package/src/client/components/core/Badge.js +26 -0
- package/src/client/components/core/Blockchain.js +41 -0
- package/src/client/components/core/Blog.js +9 -0
- package/src/client/components/core/BtnIcon.js +109 -0
- package/src/client/components/core/CalendarCore.js +437 -0
- package/src/client/components/core/Chat.js +62 -0
- package/src/client/components/core/ClientEvents.js +163 -0
- package/src/client/components/core/ColorPaletteElement.js +309 -0
- package/src/client/components/core/CommonJs.js +1014 -0
- package/src/client/components/core/Content.js +349 -0
- package/src/client/components/core/Css.js +1134 -0
- package/src/client/components/core/CssCore.js +881 -0
- package/src/client/components/core/D3Chart.js +44 -0
- package/src/client/components/core/Docs.js +478 -0
- package/src/client/components/core/DropDown.js +321 -0
- package/src/client/components/core/EventBus.js +96 -0
- package/src/client/components/core/EventsUI.js +130 -0
- package/src/client/components/core/FileExplorer.js +1406 -0
- package/src/client/components/core/FullScreen.js +201 -0
- package/src/client/components/core/Input.js +537 -0
- package/src/client/components/core/Keyboard.js +80 -0
- package/src/client/components/core/KeyboardAvoidance.js +145 -0
- package/src/client/components/core/LoadingAnimation.js +152 -0
- package/src/client/components/core/LogIn.js +212 -0
- package/src/client/components/core/LogOut.js +72 -0
- package/src/client/components/core/Logger.js +22 -0
- package/src/client/components/core/Modal.js +2956 -0
- package/src/client/components/core/NotificationManager.js +80 -0
- package/src/client/components/core/Pagination.js +252 -0
- package/src/client/components/core/Panel.js +1308 -0
- package/src/client/components/core/PanelForm.js +915 -0
- package/src/client/components/core/Polyhedron.js +947 -0
- package/src/client/components/core/PublicProfile.js +895 -0
- package/src/client/components/core/Recover.js +211 -0
- package/src/client/components/core/Responsive.js +146 -0
- package/src/client/components/core/RichText.js +33 -0
- package/src/client/components/core/Router.js +523 -0
- package/src/client/components/core/Scroll.js +76 -0
- package/src/client/components/core/SearchBox.js +1007 -0
- package/src/client/components/core/SignUp.js +153 -0
- package/src/client/components/core/SocketIo.js +163 -0
- package/src/client/components/core/SocketIoHandler.js +75 -0
- package/src/client/components/core/Stream.js +161 -0
- package/src/client/components/core/ToggleSwitch.js +89 -0
- package/src/client/components/core/ToolTip.js +78 -0
- package/src/client/components/core/Translate.js +694 -0
- package/src/client/components/core/Validator.js +140 -0
- package/src/client/components/core/VanillaJs.js +485 -0
- package/src/client/components/core/Wallet.js +95 -0
- package/src/client/components/core/WebComponent.js +44 -0
- package/src/client/components/core/Webhook.js +58 -0
- package/src/client/components/core/Worker.js +313 -0
- package/src/client/components/core/windowGetDimensions.js +269 -0
- package/src/client/components/cryptokoyn/AppShellCryptokoyn.js +352 -0
- package/src/client/components/cryptokoyn/AppStoreCryptokoyn.js +5 -0
- package/src/client/components/cryptokoyn/CssCryptokoyn.js +212 -0
- package/src/client/components/cryptokoyn/LogInCryptokoyn.js +16 -0
- package/src/client/components/cryptokoyn/LogOutCryptokoyn.js +12 -0
- package/src/client/components/cryptokoyn/RouterCryptokoyn.js +37 -0
- package/src/client/components/cryptokoyn/SettingsCryptokoyn.js +16 -0
- package/src/client/components/cryptokoyn/SignUpCryptokoyn.js +11 -0
- package/src/client/components/cryptokoyn/SocketIoCryptokoyn.js +6 -0
- package/src/client/components/cyberia/ActionEngineCyberia.js +1867 -0
- package/src/client/components/cyberia/EntityEngineCyberia.js +585 -0
- package/src/client/components/cyberia/InstanceEngineCyberia.js +1088 -0
- package/src/client/components/cyberia/InstanceSelectionView.js +900 -0
- package/src/client/components/cyberia/MapEngineCyberia.js +1976 -0
- package/src/client/components/cyberia/ObjectLayerEngine.js +1540 -0
- package/src/client/components/cyberia/ObjectLayerEngineModal.js +2420 -0
- package/src/client/components/cyberia/ObjectLayerEngineViewer.js +1522 -0
- package/src/client/components/cyberia/SharedDefaultsCyberia.js +528 -0
- package/src/client/components/cyberia-portal/AppShellCyberiaPortal.js +772 -0
- package/src/client/components/cyberia-portal/AppStoreCyberiaPortal.js +5 -0
- package/src/client/components/cyberia-portal/CssCyberiaPortal.js +254 -0
- package/src/client/components/cyberia-portal/LogInCyberiaPortal.js +21 -0
- package/src/client/components/cyberia-portal/LogOutCyberiaPortal.js +16 -0
- package/src/client/components/cyberia-portal/MainBodyCyberiaPortal.js +518 -0
- package/src/client/components/cyberia-portal/RouterCyberiaPortal.js +72 -0
- package/src/client/components/cyberia-portal/SettingsCyberiaPortal.js +16 -0
- package/src/client/components/cyberia-portal/SignUpCyberiaPortal.js +13 -0
- package/src/client/components/cyberia-portal/SocketIoCyberiaPortal.js +6 -0
- package/src/client/components/cyberia-portal/TranslateCyberiaPortal.js +48 -0
- package/src/client/components/default/AppShellDefault.js +765 -0
- package/src/client/components/default/AppStoreDefault.js +5 -0
- package/src/client/components/default/CommonDefault.js +29 -0
- package/src/client/components/default/CssDefault.js +27 -0
- package/src/client/components/default/LogInDefault.js +16 -0
- package/src/client/components/default/LogOutDefault.js +12 -0
- package/src/client/components/default/RouterDefault.js +47 -0
- package/src/client/components/default/SettingsDefault.js +16 -0
- package/src/client/components/default/SignUpDefault.js +11 -0
- package/src/client/components/default/SocketIoDefault.js +6 -0
- package/src/client/components/default/TranslateDefault.js +7 -0
- package/src/client/components/itemledger/AppShellItemledger.js +353 -0
- package/src/client/components/itemledger/AppStoreItemledger.js +5 -0
- package/src/client/components/itemledger/CssItemledger.js +212 -0
- package/src/client/components/itemledger/LogInItemledger.js +17 -0
- package/src/client/components/itemledger/LogOutItemledger.js +12 -0
- package/src/client/components/itemledger/RouterItemledger.js +38 -0
- package/src/client/components/itemledger/SettingsItemledger.js +16 -0
- package/src/client/components/itemledger/SignUpItemledger.js +11 -0
- package/src/client/components/itemledger/SocketIoItemledger.js +6 -0
- package/src/client/components/itemledger/TranslateItemledger.js +7 -0
- package/src/client/components/underpost/AppShellUnderpost.js +691 -0
- package/src/client/components/underpost/AppStoreUnderpost.js +5 -0
- package/src/client/components/underpost/CssUnderpost.js +281 -0
- package/src/client/components/underpost/CyberpunkBloggerUnderpost.js +879 -0
- package/src/client/components/underpost/DocumentSearchProvider.js +448 -0
- package/src/client/components/underpost/LabGalleryUnderpost.js +79 -0
- package/src/client/components/underpost/LogInUnderpost.js +25 -0
- package/src/client/components/underpost/LogOutUnderpost.js +17 -0
- package/src/client/components/underpost/RouterUnderpost.js +45 -0
- package/src/client/components/underpost/SettingsUnderpost.js +16 -0
- package/src/client/components/underpost/SignUpUnderpost.js +11 -0
- package/src/client/components/underpost/SocketIoUnderpost.js +6 -0
- package/src/client/components/underpost/TranslateUnderpost.js +10 -0
- package/src/client/public/cryptokoyn/assets/banner/koyn-social.png +0 -0
- package/src/client/public/cryptokoyn/assets/logo/base-icon.png +0 -0
- package/src/client/public/cryptokoyn/assets/logo/cryptokoyn.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-192x192.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-256x256.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-36x36.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-48x48.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-72x72.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/android-chrome-96x96.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/apple-touch-icon.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/favicon-16x16.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/favicon-32x32.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-144x144.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-150x150.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-310x150.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-310x310.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/mstile-70x70.png +0 -0
- package/src/client/public/cryptokoyn/assets/splash/safari-pinned-tab.svg +42 -0
- package/src/client/public/cryptokoyn/browserconfig.xml +12 -0
- package/src/client/public/cryptokoyn/favicon.ico +0 -0
- package/src/client/public/cryptokoyn/microdata.json +85 -0
- package/src/client/public/cryptokoyn/site.webmanifest +57 -0
- package/src/client/public/cryptokoyn/sitemap +148 -0
- package/src/client/public/cyberia-docs/ACTION-SYSTEM.md +307 -0
- package/src/client/public/cyberia-docs/ARCHITECTURE.md +309 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLI.md +204 -0
- package/src/client/public/cyberia-docs/CYBERIA-CLIENT.md +341 -0
- package/src/client/public/cyberia-docs/CYBERIA-LORE.md +84 -0
- package/src/client/public/cyberia-docs/CYBERIA-SAGA.md +394 -0
- package/src/client/public/cyberia-docs/CYBERIA-SERVER.md +294 -0
- package/src/client/public/cyberia-docs/CYBERIA.md +259 -0
- package/src/client/public/cyberia-docs/ENTITY-PROFILE.md +242 -0
- package/src/client/public/cyberia-docs/HARDHAT-MODULE.md +300 -0
- package/src/client/public/cyberia-docs/OFF-CHAIN-ECONOMY.md +309 -0
- package/src/client/public/cyberia-docs/QUEST-SYSTEM.md +228 -0
- package/src/client/public/cyberia-docs/ROADMAP.md +240 -0
- package/src/client/public/cyberia-docs/UNDERPOST-PLATFORM.md +106 -0
- package/src/client/public/cyberia-docs/WHITE-PAPER.md +740 -0
- package/src/client/public/default/android-chrome-144x144.png +0 -0
- package/src/client/public/default/android-chrome-192x192.png +0 -0
- package/src/client/public/default/android-chrome-256x256.png +0 -0
- package/src/client/public/default/android-chrome-36x36.png +0 -0
- package/src/client/public/default/android-chrome-384x384.png +0 -0
- package/src/client/public/default/android-chrome-48x48.png +0 -0
- package/src/client/public/default/android-chrome-512x512.png +0 -0
- package/src/client/public/default/android-chrome-72x72.png +0 -0
- package/src/client/public/default/android-chrome-96x96.png +0 -0
- package/src/client/public/default/apple-touch-icon-1024x1024.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/default/apple-touch-icon-167x167.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/default/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/default/apple-touch-icon.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1125x2436.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1136x640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1170x2532.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1179x2556.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2208.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1242x2688.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1284x2778.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1290x2796.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1334x750.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1488x2266.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1536x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1620x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1640x2160.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2224.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1668x2388.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-1792x828.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x1536.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2048x2732.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1620.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2160x1640.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2208x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2224x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2266x1488.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2388x1668.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2436x1125.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2532x1170.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2556x1179.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2688x1242.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2732x2048.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2778x1284.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-2796x1290.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-640x1136.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-750x1334.png +0 -0
- package/src/client/public/default/apple-touch-startup-image-828x1792.png +0 -0
- package/src/client/public/default/assets/background/dark.jpg +0 -0
- package/src/client/public/default/assets/background/dark.svg +557 -0
- package/src/client/public/default/assets/background/white.jpg +0 -0
- package/src/client/public/default/assets/background/white0-min.jpg +0 -0
- package/src/client/public/default/assets/background/white0.jpg +0 -0
- package/src/client/public/default/assets/logo/base-icon.png +0 -0
- package/src/client/public/default/assets/logo/underpost.gif +0 -0
- package/src/client/public/default/assets/mailer/api-user-check.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-default-avatar.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-invalid-token.png +0 -0
- package/src/client/public/default/assets/mailer/api-user-recover.png +0 -0
- package/src/client/public/default/browserconfig.xml +12 -0
- package/src/client/public/default/favicon-16x16.png +0 -0
- package/src/client/public/default/favicon-32x32.png +0 -0
- package/src/client/public/default/favicon-48x48.png +0 -0
- package/src/client/public/default/favicon.ico +0 -0
- package/src/client/public/default/manifest.webmanifest +69 -0
- package/src/client/public/default/mstile-144x144.png +0 -0
- package/src/client/public/default/mstile-150x150.png +0 -0
- package/src/client/public/default/mstile-310x150.png +0 -0
- package/src/client/public/default/mstile-310x310.png +0 -0
- package/src/client/public/default/mstile-70x70.png +0 -0
- package/src/client/public/default/safari-pinned-tab.svg +24 -0
- package/src/client/public/default/site.webmanifest +69 -0
- package/src/client/public/default/sitemap +148 -0
- package/src/client/public/default/yandex-browser-50x50.png +0 -0
- package/src/client/public/default/yandex-browser-manifest.json +9 -0
- package/src/client/public/doc/favicon.ico +0 -0
- package/src/client/public/doc/sitemap +148 -0
- package/src/client/public/itemledger/android-chrome-144x144.png +0 -0
- package/src/client/public/itemledger/android-chrome-192x192.png +0 -0
- package/src/client/public/itemledger/android-chrome-256x256.png +0 -0
- package/src/client/public/itemledger/android-chrome-36x36.png +0 -0
- package/src/client/public/itemledger/android-chrome-384x384.png +0 -0
- package/src/client/public/itemledger/android-chrome-48x48.png +0 -0
- package/src/client/public/itemledger/android-chrome-512x512.png +0 -0
- package/src/client/public/itemledger/android-chrome-72x72.png +0 -0
- package/src/client/public/itemledger/android-chrome-96x96.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-1024x1024.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-114x114.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-120x120.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-144x144.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-152x152.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-167x167.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-180x180.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-57x57.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-60x60.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-72x72.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-76x76.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon-precomposed.png +0 -0
- package/src/client/public/itemledger/apple-touch-icon.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1125x2436.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1136x640.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1170x2532.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1179x2556.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1242x2208.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1242x2688.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1284x2778.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1290x2796.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1334x750.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1488x2266.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1536x2048.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1620x2160.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1640x2160.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1668x2224.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1668x2388.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-1792x828.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2048x1536.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2048x2732.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2160x1620.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2160x1640.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2208x1242.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2224x1668.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2266x1488.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2388x1668.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2436x1125.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2532x1170.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2556x1179.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2688x1242.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2732x2048.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2778x1284.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-2796x1290.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-640x1136.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-750x1334.png +0 -0
- package/src/client/public/itemledger/apple-touch-startup-image-828x1792.png +0 -0
- package/src/client/public/itemledger/assets/logo/base-icon.png +0 -0
- package/src/client/public/itemledger/browserconfig.xml +12 -0
- package/src/client/public/itemledger/favicon-16x16.png +0 -0
- package/src/client/public/itemledger/favicon-32x32.png +0 -0
- package/src/client/public/itemledger/favicon-48x48.png +0 -0
- package/src/client/public/itemledger/favicon.ico +0 -0
- package/src/client/public/itemledger/manifest.webmanifest +69 -0
- package/src/client/public/itemledger/microdata.json +71 -0
- package/src/client/public/itemledger/mstile-144x144.png +0 -0
- package/src/client/public/itemledger/mstile-150x150.png +0 -0
- package/src/client/public/itemledger/mstile-310x150.png +0 -0
- package/src/client/public/itemledger/mstile-310x310.png +0 -0
- package/src/client/public/itemledger/mstile-70x70.png +0 -0
- package/src/client/public/itemledger/sitemap +148 -0
- package/src/client/public/itemledger/yandex-browser-50x50.png +0 -0
- package/src/client/public/itemledger/yandex-browser-manifest.json +9 -0
- package/src/client/public/test/favicon.ico +0 -0
- package/src/client/public/test/sitemap +148 -0
- package/src/client/services/atlas-sprite-sheet/atlas-sprite-sheet.service.js +137 -0
- package/src/client/services/core/core.service.js +309 -0
- package/src/client/services/crypto/crypto.service.js +68 -0
- package/src/client/services/cyberia-action/cyberia-action.service.js +99 -0
- package/src/client/services/cyberia-client-hints/cyberia-client-hints.service.js +99 -0
- package/src/client/services/cyberia-dialogue/cyberia-dialogue.service.js +99 -0
- package/src/client/services/cyberia-entity/cyberia-entity.management.js +57 -0
- package/src/client/services/cyberia-entity/cyberia-entity.service.js +99 -0
- package/src/client/services/cyberia-entity-type-default/cyberia-entity-type-default.service.js +99 -0
- package/src/client/services/cyberia-instance/cyberia-instance.management.js +194 -0
- package/src/client/services/cyberia-instance/cyberia-instance.service.js +137 -0
- package/src/client/services/cyberia-instance-conf/cyberia-instance-conf.service.js +99 -0
- package/src/client/services/cyberia-map/cyberia-map.management.js +193 -0
- package/src/client/services/cyberia-map/cyberia-map.service.js +120 -0
- package/src/client/services/cyberia-quest/cyberia-quest.service.js +99 -0
- package/src/client/services/cyberia-quest-progress/cyberia-quest-progress.service.js +99 -0
- package/src/client/services/cyberia-saga/cyberia-saga.service.js +99 -0
- package/src/client/services/cyberia-skill/cyberia-skill.service.js +99 -0
- package/src/client/services/default/default.management.js +1015 -0
- package/src/client/services/default/default.service.js +99 -0
- package/src/client/services/document/document.service.js +134 -0
- package/src/client/services/file/file.service.js +94 -0
- package/src/client/services/instance/instance.management.js +78 -0
- package/src/client/services/instance/instance.service.js +107 -0
- package/src/client/services/ipfs/ipfs.service.js +118 -0
- package/src/client/services/object-layer/object-layer.management.js +414 -0
- package/src/client/services/object-layer/object-layer.service.js +208 -0
- package/src/client/services/object-layer-render-frames/object-layer-render-frames.service.js +99 -0
- package/src/client/services/test/test.service.js +68 -0
- package/src/client/services/user/guest.service.js +86 -0
- package/src/client/services/user/user.management.js +51 -0
- package/src/client/services/user/user.service.js +106 -0
- package/src/client/ssr/RootDocument.js +237 -0
- package/src/client/ssr/body/404.js +77 -0
- package/src/client/ssr/body/500.js +76 -0
- package/src/client/ssr/body/CacheControl.js +117 -0
- package/src/client/ssr/body/CyberiaDefaultSplashScreen.js +97 -0
- package/src/client/ssr/body/DefaultSplashScreen.js +97 -0
- package/src/client/ssr/body/SwaggerDarkMode.js +285 -0
- package/src/client/ssr/body/UnderpostDefaultSplashScreen.js +90 -0
- package/src/client/ssr/head/CryptokoynScripts.js +4 -0
- package/src/client/ssr/head/Css.js +241 -0
- package/src/client/ssr/head/CyberiaPortalScripts.js +6 -0
- package/src/client/ssr/head/DefaultScripts.js +6 -0
- package/src/client/ssr/head/ItemledgerScripts.js +4 -0
- package/src/client/ssr/head/Microdata.js +11 -0
- package/src/client/ssr/head/Production.js +1 -0
- package/src/client/ssr/head/Pwa.js +146 -0
- package/src/client/ssr/head/PwaItemledger.js +197 -0
- package/src/client/ssr/head/Seo.js +15 -0
- package/src/client/ssr/head/UnderpostScripts.js +6 -0
- package/src/client/ssr/mailer/DefaultRecoverEmail.js +20 -0
- package/src/client/ssr/mailer/DefaultVerifyEmail.js +16 -0
- package/src/client/ssr/views/Cyberia404.js +328 -0
- package/src/client/ssr/views/CyberiaServerMetrics.js +1070 -0
- package/src/client/ssr/views/Maintenance.js +64 -0
- package/src/client/ssr/views/NoNetworkConnection.js +68 -0
- package/src/client/ssr/views/Test.js +199 -0
- package/src/client/sw/core.sw.js +274 -0
- package/src/client-builder/client-build-docs.js +493 -0
- package/src/client-builder/client-build-live.js +100 -0
- package/src/client-builder/client-build.js +1092 -0
- package/src/client-builder/client-dev-server.js +88 -0
- package/src/client-builder/client-formatted.js +170 -0
- package/src/client-builder/client-icons.js +108 -0
- package/src/client-builder/ssr.js +124 -0
- package/src/client.build.js +17 -0
- package/src/client.dev.js +21 -0
- package/src/db/DataBaseProvider.js +213 -0
- package/src/db/mariadb/MariaDB.js +72 -0
- package/src/db/mongo/MongoBootstrap.js +657 -0
- package/src/db/mongo/MongooseDB.js +199 -0
- package/src/grpc/cyberia/grpc-server.js +162 -0
- package/src/index.js +357 -0
- package/src/mailer/EmailRender.js +116 -0
- package/src/mailer/MailerProvider.js +213 -0
- package/src/projects/cyberia/atlas-sprite-sheet-generator.js +413 -0
- package/src/projects/cyberia/besu-genesis-generator.js +1630 -0
- package/src/projects/cyberia/catalog-cyberia.js +90 -0
- package/src/projects/cyberia/gemini-client.js +175 -0
- package/src/projects/cyberia/generate-saga.js +2137 -0
- package/src/projects/cyberia/hot-reload-trigger.js +163 -0
- package/src/projects/cyberia/instance-data.js +719 -0
- package/src/projects/cyberia/ipfs-client.js +599 -0
- package/src/projects/cyberia/map-preview-generator.js +304 -0
- package/src/projects/cyberia/object-layer.js +978 -0
- package/src/projects/cyberia/semantic-layer-generator-floor.js +319 -0
- package/src/projects/cyberia/semantic-layer-generator-resource.js +259 -0
- package/src/projects/cyberia/semantic-layer-generator-skin.js +1164 -0
- package/src/projects/cyberia/semantic-layer-generator.js +753 -0
- package/src/projects/cyberia/shape-generator.js +1060 -0
- package/src/projects/underpost/catalog-underpost.js +60 -0
- package/src/proxy.js +19 -0
- package/src/runtime/cyberia-client/Dockerfile +49 -0
- package/src/runtime/cyberia-client/Dockerfile.dev +75 -0
- package/src/runtime/cyberia-server/Dockerfile +43 -0
- package/src/runtime/cyberia-server/Dockerfile.dev +56 -0
- package/src/runtime/engine-cyberia/Dockerfile +161 -0
- package/src/runtime/engine-cyberia/Dockerfile.dev +161 -0
- package/src/runtime/engine-cyberia/Dockerfile.test +165 -0
- package/src/runtime/engine-cyberia/compose.env +144 -0
- package/src/runtime/engine-cyberia/docker-compose.yml +434 -0
- package/src/runtime/engine-cyberia/ipfs/configure-ipfs.sh +13 -0
- package/src/runtime/engine-cyberia/mongodb/entrypoint.sh +76 -0
- package/src/runtime/engine-cyberia/nginx.conf +128 -0
- package/src/runtime/express/Dockerfile +45 -0
- package/src/runtime/express/Express.js +285 -0
- package/src/runtime/lampp/Dockerfile +62 -0
- package/src/runtime/lampp/Lampp.js +359 -0
- package/src/runtime/nginx/Nginx.js +250 -0
- package/src/runtime/wp/Dockerfile +62 -0
- package/src/runtime/wp/Wp.js +642 -0
- package/src/server/auth.js +713 -0
- package/src/server/backup.js +102 -0
- package/src/server/catalog.js +72 -0
- package/src/server/conf.js +2316 -0
- package/src/server/cron.js +476 -0
- package/src/server/crypto.js +210 -0
- package/src/server/data-query.js +461 -0
- package/src/server/dns.js +553 -0
- package/src/server/downloader.js +73 -0
- package/src/server/logger.js +229 -0
- package/src/server/middlewares.js +152 -0
- package/src/server/peer.js +75 -0
- package/src/server/process.js +299 -0
- package/src/server/proxy.js +139 -0
- package/src/server/runtime-status.js +252 -0
- package/src/server/runtime.js +183 -0
- package/src/server/start.js +272 -0
- package/src/server/tls.js +254 -0
- package/src/server/valkey.js +201 -0
- package/src/server.js +25 -0
- package/src/ws/IoInterface.js +129 -0
- package/src/ws/IoServer.js +68 -0
- package/src/ws/core/channels/core.ws.chat.js +68 -0
- package/src/ws/core/channels/core.ws.mailer.js +116 -0
- package/src/ws/core/channels/core.ws.stream.js +90 -0
- package/src/ws/core/core.ws.connection.js +41 -0
- package/src/ws/core/core.ws.emit.js +37 -0
- package/src/ws/core/core.ws.server.js +44 -0
- package/src/ws/default/channels/default.ws.main.js +57 -0
- package/src/ws/default/default.ws.connection.js +35 -0
- package/src/ws/default/default.ws.emit.js +14 -0
- package/src/ws/default/default.ws.server.js +39 -0
- package/test/api.test.js +53 -0
- package/test/crypto.test.js +117 -0
- package/test/cyberia-instance-conf-defaults.test.js +140 -0
- package/test/deploy-monitor.test.js +267 -0
- package/test/shape-generator.test.js +463 -0
- package/tsconfig.docs.json +15 -0
- package/typedoc.dd-cyberia.json +31 -0
- package/typedoc.json +31 -0
|
@@ -0,0 +1,1308 @@
|
|
|
1
|
+
import { getId, isValidDate, newInstance } from './CommonJs.js';
|
|
2
|
+
import { LoadingAnimation } from '../core/LoadingAnimation.js';
|
|
3
|
+
import { Validator } from '../core/Validator.js';
|
|
4
|
+
import { Input } from '../core/Input.js';
|
|
5
|
+
import { darkTheme, ThemeEvents, subThemeManager, lightenHex, darkenHex } from './Css.js';
|
|
6
|
+
import { append, copyData, getDataFromInputFile, htmls, s, sa } from './VanillaJs.js';
|
|
7
|
+
import { BtnIcon } from './BtnIcon.js';
|
|
8
|
+
import { Translate } from './Translate.js';
|
|
9
|
+
import { DropDown } from './DropDown.js';
|
|
10
|
+
import { dynamicCol } from './Css.js';
|
|
11
|
+
import { EventsUI } from './EventsUI.js';
|
|
12
|
+
import { ToggleSwitch } from './ToggleSwitch.js';
|
|
13
|
+
import { RichText } from './RichText.js';
|
|
14
|
+
import { loggerFactory } from './Logger.js';
|
|
15
|
+
import { Badge } from './Badge.js';
|
|
16
|
+
import { Content, attachMarkdownLinkHandlers } from './Content.js';
|
|
17
|
+
import { DocumentService } from '../../services/document/document.service.js';
|
|
18
|
+
import { NotificationManager } from './NotificationManager.js';
|
|
19
|
+
import { getApiBaseUrl } from '../../services/core/core.service.js';
|
|
20
|
+
import { getProxyPath, setQueryPath, navigateToProfile } from './Router.js';
|
|
21
|
+
import { PublicProfile } from './PublicProfile.js';
|
|
22
|
+
|
|
23
|
+
const logger = loggerFactory(import.meta);
|
|
24
|
+
|
|
25
|
+
class Panel {
|
|
26
|
+
static Tokens = {};
|
|
27
|
+
|
|
28
|
+
static async instance(
|
|
29
|
+
options = {
|
|
30
|
+
idPanel: '',
|
|
31
|
+
parentIdModal: '',
|
|
32
|
+
scrollClassContainer: '',
|
|
33
|
+
htmlFormHeader: async () => '',
|
|
34
|
+
formData: [],
|
|
35
|
+
data: [],
|
|
36
|
+
originData: () => [],
|
|
37
|
+
filesData: () => [],
|
|
38
|
+
onClick: () => {},
|
|
39
|
+
share: {
|
|
40
|
+
copyLink: false,
|
|
41
|
+
copySourceMd: false,
|
|
42
|
+
},
|
|
43
|
+
showCreatorProfile: false,
|
|
44
|
+
},
|
|
45
|
+
) {
|
|
46
|
+
const idPanel = options?.idPanel ? options.idPanel : getId(this.Tokens, `${idPanel}-`);
|
|
47
|
+
if (options.formData)
|
|
48
|
+
options.formData = options.formData.map((formObj) => {
|
|
49
|
+
formObj.id = `${idPanel}-${formObj.id}`;
|
|
50
|
+
return formObj;
|
|
51
|
+
});
|
|
52
|
+
const { scrollClassContainer, formData, data } = options;
|
|
53
|
+
|
|
54
|
+
const titleObj = formData.find((f) => f.panel && f.panel.type === 'title');
|
|
55
|
+
const titleKey = titleObj ? titleObj.model : '';
|
|
56
|
+
|
|
57
|
+
const subTitleObj = formData.find((f) => f.panel && f.panel.type === 'subtitle');
|
|
58
|
+
const subTitleKey = subTitleObj ? subTitleObj.model : '';
|
|
59
|
+
|
|
60
|
+
const fileNameInputExtDefaultContent = html` <div class="abs center">
|
|
61
|
+
<i style="font-size: 25px" class="fa-solid fa-cloud"></i>
|
|
62
|
+
</div>`;
|
|
63
|
+
|
|
64
|
+
const openPanelForm = () => {
|
|
65
|
+
s(`.${idPanel}-form-body`).classList.remove('hide');
|
|
66
|
+
s(`.btn-${idPanel}-add`).classList.add('hide');
|
|
67
|
+
// s(`.${scrollClassContainer}`).style.overflow = 'hidden';
|
|
68
|
+
if (options.customButtons) {
|
|
69
|
+
let customBtnIndex = -1;
|
|
70
|
+
for (const dataBtn of options.customButtons) {
|
|
71
|
+
customBtnIndex++;
|
|
72
|
+
const customBtnIndexFn = customBtnIndex;
|
|
73
|
+
const btnSelector = `btn-${idPanel}-custom${customBtnIndexFn}`;
|
|
74
|
+
s(`.${btnSelector}`).classList.add('hide');
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
setTimeout(() => {
|
|
78
|
+
s(`.${idPanel}-form-body`).style.opacity = 1;
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const renderPanel = async (payload) => {
|
|
83
|
+
const obj = newInstance(payload);
|
|
84
|
+
if ('_id' in obj) obj.id = obj._id;
|
|
85
|
+
const { id } = obj;
|
|
86
|
+
|
|
87
|
+
setTimeout(async () => {
|
|
88
|
+
if (!s(`.${idPanel}`)) return;
|
|
89
|
+
LoadingAnimation.spinner.play(`.${idPanel}-img-spinner-${id}`, 'dual-ring');
|
|
90
|
+
if (options && options.callBackPanelRender)
|
|
91
|
+
await options.callBackPanelRender({
|
|
92
|
+
data: obj,
|
|
93
|
+
fileRender: async (options = { file: '', style: {}, class: '' }) => {
|
|
94
|
+
await Content.RenderFile({ container: `.${idPanel}-cell-col-a-${id}`, ...options });
|
|
95
|
+
s(`.${idPanel}-img-spinner-${id}`).classList.add('hide');
|
|
96
|
+
},
|
|
97
|
+
htmlRender: async ({ render }) => {
|
|
98
|
+
htmls(`.${idPanel}-cell-col-a-${id}`, render);
|
|
99
|
+
},
|
|
100
|
+
});
|
|
101
|
+
if (options.share && options.share.copyLink) {
|
|
102
|
+
EventsUI.onClick(
|
|
103
|
+
`.${idPanel}-btn-copy-share-${id}`,
|
|
104
|
+
async (e) => {
|
|
105
|
+
try {
|
|
106
|
+
const shareUrl = `${window.location.origin}${window.location.pathname}?cid=${obj._id}`;
|
|
107
|
+
await copyData(shareUrl);
|
|
108
|
+
await NotificationManager.Push({
|
|
109
|
+
status: 'success',
|
|
110
|
+
html: html`<div>${Translate.instance('link-copied')}</div>`,
|
|
111
|
+
});
|
|
112
|
+
// Track the copy share link event
|
|
113
|
+
await DocumentService.patch({ id: obj._id, action: 'copy-share-link' });
|
|
114
|
+
// Update the count in the UI - read current value from span first
|
|
115
|
+
const countSpan = s(`.${idPanel}-share-count-${id}`);
|
|
116
|
+
if (countSpan) {
|
|
117
|
+
const currentCount = parseInt(countSpan.textContent) || 0;
|
|
118
|
+
const newCount = currentCount + 1;
|
|
119
|
+
htmls(`.${idPanel}-share-count-${id}`, newCount);
|
|
120
|
+
} else {
|
|
121
|
+
// Create count badge if it didn't exist before (was 0)
|
|
122
|
+
const btn = s(`.${idPanel}-btn-copy-share-${id}`);
|
|
123
|
+
if (btn) {
|
|
124
|
+
const countBadge = document.createElement('span');
|
|
125
|
+
countBadge.className = `${idPanel}-share-count-${id}`;
|
|
126
|
+
countBadge.style.cssText =
|
|
127
|
+
'position: absolute; top: -4px; right: -4px; background: #666; color: white; border-radius: 10px; padding: 1px 5px; font-size: 10px; font-weight: bold; min-width: 16px; text-align: center;';
|
|
128
|
+
countBadge.textContent = '1';
|
|
129
|
+
btn.appendChild(countBadge);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
} catch (error) {
|
|
133
|
+
logger.error('Error copying share link:', error);
|
|
134
|
+
await NotificationManager.Push({
|
|
135
|
+
status: 'error',
|
|
136
|
+
html: html`<div>${Translate.instance('error-copying-link')}</div>`,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{ context: 'modal' },
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
// Add tooltip hover effect
|
|
144
|
+
setTimeout(() => {
|
|
145
|
+
const btn = s(`.${idPanel}-btn-copy-share-${id}`);
|
|
146
|
+
const tooltip = s(`.${idPanel}-share-tooltip-${id}`);
|
|
147
|
+
if (btn && tooltip) {
|
|
148
|
+
btn.addEventListener('mouseenter', () => {
|
|
149
|
+
tooltip.style.opacity = '1';
|
|
150
|
+
});
|
|
151
|
+
btn.addEventListener('mouseleave', () => {
|
|
152
|
+
tooltip.style.opacity = '0';
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
if (options.share && options.share.copySourceMd) {
|
|
158
|
+
EventsUI.onClick(
|
|
159
|
+
`.${idPanel}-btn-copy-source-md-${id}`,
|
|
160
|
+
async (e) => {
|
|
161
|
+
try {
|
|
162
|
+
const filesData = options.filesData();
|
|
163
|
+
const foundFiles = filesData.find((d) => String(d._id || d.id) === String(obj._id || obj.id));
|
|
164
|
+
|
|
165
|
+
if (foundFiles && foundFiles.mdFileId && foundFiles.mdFileId.mdPlain) {
|
|
166
|
+
await copyData(foundFiles.mdFileId.mdPlain);
|
|
167
|
+
await NotificationManager.Push({
|
|
168
|
+
status: 'success',
|
|
169
|
+
html: html`<div>${Translate.instance('markdown-source-copied')}</div>`,
|
|
170
|
+
});
|
|
171
|
+
} else {
|
|
172
|
+
await NotificationManager.Push({
|
|
173
|
+
status: 'warning',
|
|
174
|
+
html: html`<div>No markdown source available</div>`,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
} catch (error) {
|
|
178
|
+
logger.error('Error copying markdown source:', error);
|
|
179
|
+
await NotificationManager.Push({
|
|
180
|
+
status: 'error',
|
|
181
|
+
html: html`<div>${Translate.instance('error-copying-markdown')}</div>`,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{ context: 'modal' },
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
// Add tooltip hover effect
|
|
189
|
+
setTimeout(() => {
|
|
190
|
+
const btn = s(`.${idPanel}-btn-copy-source-md-${id}`);
|
|
191
|
+
const tooltip = s(`.${idPanel}-source-md-tooltip-${id}`);
|
|
192
|
+
if (btn && tooltip) {
|
|
193
|
+
btn.addEventListener('mouseenter', () => {
|
|
194
|
+
tooltip.style.opacity = '1';
|
|
195
|
+
});
|
|
196
|
+
btn.addEventListener('mouseleave', () => {
|
|
197
|
+
tooltip.style.opacity = '0';
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
EventsUI.onClick(
|
|
203
|
+
`.${idPanel}-btn-delete-${id}`,
|
|
204
|
+
async (e) => {
|
|
205
|
+
logger.warn('delete', obj);
|
|
206
|
+
const { status } = await options.on.remove({ e, data: obj });
|
|
207
|
+
if (status === 'error') return;
|
|
208
|
+
if (s(`.${idPanel}-${id}`)) s(`.${idPanel}-${id}`).remove();
|
|
209
|
+
},
|
|
210
|
+
{ context: 'modal' },
|
|
211
|
+
);
|
|
212
|
+
EventsUI.onClick(`.${idPanel}-btn-edit-${id}`, async () => {
|
|
213
|
+
logger.warn('edit', obj);
|
|
214
|
+
const searchId = String(obj._id || obj.id);
|
|
215
|
+
|
|
216
|
+
if (obj._id) Panel.Tokens[idPanel].editId = obj._id;
|
|
217
|
+
else if (obj.id) Panel.Tokens[idPanel].editId = obj.id;
|
|
218
|
+
|
|
219
|
+
s(`.btn-${idPanel}-label-edit`).classList.remove('hide');
|
|
220
|
+
s(`.btn-${idPanel}-label-add`).classList.add('hide');
|
|
221
|
+
|
|
222
|
+
openPanelForm();
|
|
223
|
+
// s(`.${scrollClassContainer}`).scrollTop = 0;
|
|
224
|
+
const originData = options.originData();
|
|
225
|
+
const filesData = options.filesData();
|
|
226
|
+
|
|
227
|
+
// Convert IDs to strings for comparison to handle ObjectId vs string issues
|
|
228
|
+
const foundOrigin = originData.find((d) => String(d._id || d.id) === searchId);
|
|
229
|
+
const foundFiles = filesData.find((d) => String(d._id || d.id) === searchId);
|
|
230
|
+
|
|
231
|
+
if (!foundOrigin) {
|
|
232
|
+
logger.error('Could not find origin data for ID:', searchId);
|
|
233
|
+
logger.error(
|
|
234
|
+
'Available originData IDs:',
|
|
235
|
+
originData.map((d) => String(d._id || d.id)),
|
|
236
|
+
);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (!foundFiles) {
|
|
240
|
+
logger.error('Could not find files data for ID:', searchId);
|
|
241
|
+
logger.error(
|
|
242
|
+
'Available filesData IDs:',
|
|
243
|
+
filesData.map((d) => String(d._id || d.id)),
|
|
244
|
+
);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// Clear previous form values then populate with the current item's data
|
|
248
|
+
Input.cleanValues(formData);
|
|
249
|
+
await Input.setValues(formData, obj, foundOrigin, foundFiles);
|
|
250
|
+
if (options.on.initEdit) await options.on.initEdit({ data: obj });
|
|
251
|
+
});
|
|
252
|
+
s(`.a-${payload._id}`).onclick = async (e) => {
|
|
253
|
+
e.preventDefault();
|
|
254
|
+
if (options.onClick) await options.onClick({ payload });
|
|
255
|
+
};
|
|
256
|
+
s(`.container-${idPanel}-${id}`).onclick = async (e) => {
|
|
257
|
+
e.preventDefault();
|
|
258
|
+
// if (options.onClick) await options.onClick({ payload });
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// Add theme change handler for creator profile header
|
|
262
|
+
if (options.showCreatorProfile && obj.userInfo) {
|
|
263
|
+
const updateCreatorProfileTheme = () => {
|
|
264
|
+
const profileHeader = s(`.creator-profile-header-${id}`);
|
|
265
|
+
if (profileHeader) {
|
|
266
|
+
profileHeader.style.borderBottom = `1px solid ${darkTheme ? 'rgba(255,255,255,0.1)' : 'rgba(0,0,0,0.08)'}`;
|
|
267
|
+
profileHeader.style.background = `${darkTheme ? 'rgba(255,255,255,0.02)' : 'rgba(0,0,0,0.02)'}`;
|
|
268
|
+
|
|
269
|
+
// Update avatar border if it's an image
|
|
270
|
+
const avatarImg = profileHeader.querySelector('.creator-avatar');
|
|
271
|
+
if (avatarImg && avatarImg.tagName === 'IMG') {
|
|
272
|
+
avatarImg.style.border = `2px solid ${darkTheme ? 'rgba(102, 126, 234, 0.5)' : 'rgba(102, 126, 234, 0.3)'}`;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// Update username color
|
|
276
|
+
const username = profileHeader.querySelector('.creator-username');
|
|
277
|
+
if (username) {
|
|
278
|
+
username.style.color = `${darkTheme ? 'rgba(255,255,255,0.9)' : 'rgba(0,0,0,0.85)'}`;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
// Update "Creator" label color
|
|
282
|
+
const creatorLabel = username?.nextElementSibling;
|
|
283
|
+
if (creatorLabel) {
|
|
284
|
+
creatorLabel.style.color = `${darkTheme ? 'rgba(255,255,255,0.5)' : 'rgba(0,0,0,0.45)'}`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
// Register theme change handler
|
|
290
|
+
const profileThemeHandlerId = `${id}-creator-profile-theme`;
|
|
291
|
+
ThemeEvents[profileThemeHandlerId] = updateCreatorProfileTheme;
|
|
292
|
+
|
|
293
|
+
// Add click handlers for public profile links
|
|
294
|
+
setTimeout(() => {
|
|
295
|
+
const links = sa(`.creator-profile-link-${id}`);
|
|
296
|
+
links.forEach((link) => {
|
|
297
|
+
link.onclick = async (e) => {
|
|
298
|
+
e.preventDefault();
|
|
299
|
+
const username = link.getAttribute('data-id');
|
|
300
|
+
// Check if public profile modal is already open
|
|
301
|
+
const currentModal = s('.modal-public-profile');
|
|
302
|
+
if (currentModal) {
|
|
303
|
+
// Modal is already open, update the profile content dynamically
|
|
304
|
+
// Navigate to clean URL without intermediate ?cid= in history
|
|
305
|
+
navigateToProfile(username, { replace: false });
|
|
306
|
+
await PublicProfile.Update({
|
|
307
|
+
idModal: 'modal-public-profile',
|
|
308
|
+
user: { username },
|
|
309
|
+
});
|
|
310
|
+
} else {
|
|
311
|
+
// Modal is not open, navigate to clean URL and open modal
|
|
312
|
+
navigateToProfile(username, { replace: false });
|
|
313
|
+
if (s('.main-btn-public-profile')) s('.main-btn-public-profile').click();
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
});
|
|
317
|
+
});
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
if (s(`.${idPanel}-${id}`)) s(`.${idPanel}-${id}`).remove();
|
|
321
|
+
|
|
322
|
+
// Check if document is public (from obj.isPublic field)
|
|
323
|
+
const isPublic = obj.isPublic === true;
|
|
324
|
+
// Visibility icon: globe for public, padlock for private
|
|
325
|
+
const visibilityIcon = isPublic
|
|
326
|
+
? '<i class="fas fa-globe" title="Public document"></i>'
|
|
327
|
+
: '<i class="fas fa-lock" title="Private document"></i>';
|
|
328
|
+
|
|
329
|
+
return html` <div class="in box-shadow ${idPanel} ${idPanel}-${id}" style="position: relative;">
|
|
330
|
+
<div class="fl ${idPanel}-tools session-fl-log-in ${obj.tools ? '' : 'hide'}">
|
|
331
|
+
${await BtnIcon.instance({
|
|
332
|
+
class: `in flr main-btn-menu action-bar-box ${idPanel}-btn-tool ${idPanel}-btn-delete-${id}`,
|
|
333
|
+
label: html`<div class="abs center"><i class="fas fa-trash"></i></div>`,
|
|
334
|
+
useVisibilityHover: true,
|
|
335
|
+
tooltipHtml: await Badge.instance({
|
|
336
|
+
id: `tooltip-${idPanel}-${id}`,
|
|
337
|
+
text: `${Translate.instance(`delete`)}`,
|
|
338
|
+
classList: '',
|
|
339
|
+
style: { top: `-22px`, left: '-13px' },
|
|
340
|
+
}),
|
|
341
|
+
})}
|
|
342
|
+
${await BtnIcon.instance({
|
|
343
|
+
class: `in flr main-btn-menu action-bar-box ${idPanel}-btn-tool ${idPanel}-btn-edit-${id}`,
|
|
344
|
+
label: html`<div class="abs center"><i class="fas fa-edit"></i></div>`,
|
|
345
|
+
useVisibilityHover: true,
|
|
346
|
+
tooltipHtml: await Badge.instance({
|
|
347
|
+
id: `tooltip-${idPanel}-${id}`,
|
|
348
|
+
text: `${Translate.instance(`edit`)}`,
|
|
349
|
+
classList: '',
|
|
350
|
+
style: { top: `-22px`, left: '-5px' },
|
|
351
|
+
}),
|
|
352
|
+
})}
|
|
353
|
+
</div>
|
|
354
|
+
<div class="in container-${idPanel}-${id}">
|
|
355
|
+
<div class="panel-visibility-icon">${visibilityIcon}</div>
|
|
356
|
+
${options.showCreatorProfile && obj.userInfo
|
|
357
|
+
? html`<div
|
|
358
|
+
class="creator-profile-header creator-profile-header-${id}"
|
|
359
|
+
style="padding: 10px 12px; margin-bottom: 10px; border-bottom: 1px solid ${darkTheme
|
|
360
|
+
? 'rgba(255,255,255,0.1)'
|
|
361
|
+
: 'rgba(0,0,0,0.08)'}; display: flex; align-items: center; gap: 10px; background: ${darkTheme
|
|
362
|
+
? 'rgba(255,255,255,0.02)'
|
|
363
|
+
: 'rgba(0,0,0,0.02)'}; border-radius: 4px 4px 0 0;"
|
|
364
|
+
>
|
|
365
|
+
<a
|
|
366
|
+
href="${getProxyPath()}u/${obj.userInfo.username}"
|
|
367
|
+
class="creator-profile-link-${id}"
|
|
368
|
+
data-id="${obj.userInfo.username}"
|
|
369
|
+
style="display: flex;"
|
|
370
|
+
>
|
|
371
|
+
${obj.userInfo.profileImageId && obj.userInfo.profileImageId._id
|
|
372
|
+
? html`<img
|
|
373
|
+
class="creator-avatar"
|
|
374
|
+
src="${getApiBaseUrl({ id: obj.userInfo.profileImageId._id, endpoint: 'file/blob' })}"
|
|
375
|
+
alt="${obj.userInfo.username}"
|
|
376
|
+
style="width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid ${darkTheme
|
|
377
|
+
? 'rgba(102, 126, 234, 0.5)'
|
|
378
|
+
: 'rgba(102, 126, 234, 0.3)'}; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.15);"
|
|
379
|
+
title="${obj.userInfo.username}"
|
|
380
|
+
/>`
|
|
381
|
+
: html`<div
|
|
382
|
+
class="creator-avatar"
|
|
383
|
+
style="width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; font-size: 16px; flex-shrink: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.15);"
|
|
384
|
+
title="${obj.userInfo.username}"
|
|
385
|
+
>
|
|
386
|
+
${(obj.userInfo.username || 'U').charAt(0).toUpperCase()}
|
|
387
|
+
</div>`}
|
|
388
|
+
</a>
|
|
389
|
+
<div style="display: flex; flex-direction: column; min-width: 0; flex: 1;">
|
|
390
|
+
<a
|
|
391
|
+
href="${getProxyPath()}u/${obj.userInfo.username}"
|
|
392
|
+
class="creator-username creator-profile-link-${id}"
|
|
393
|
+
data-id="${obj.userInfo.username}"
|
|
394
|
+
style="font-size: 14px; font-weight: 600; color: ${darkTheme
|
|
395
|
+
? 'rgba(255,255,255,0.9)'
|
|
396
|
+
: 'rgba(0,0,0,0.85)'}; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"
|
|
397
|
+
>
|
|
398
|
+
${obj.userInfo.username || 'Unknown'}
|
|
399
|
+
</a>
|
|
400
|
+
<span
|
|
401
|
+
style="font-size: 11px; color: ${darkTheme
|
|
402
|
+
? 'rgba(255,255,255,0.5)'
|
|
403
|
+
: 'rgba(0,0,0,0.45)'}; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 500;"
|
|
404
|
+
>${obj.userInfo.briefDescription || 'Uploader'}</span
|
|
405
|
+
>
|
|
406
|
+
</div>
|
|
407
|
+
</div>`
|
|
408
|
+
: ''}
|
|
409
|
+
<div class="in ${idPanel}-head">
|
|
410
|
+
<div class="in ${idPanel}-title">
|
|
411
|
+
${options.titleIcon}
|
|
412
|
+
<a href="?cid=${payload._id}" class="a-title-${idPanel} a-${payload._id}">
|
|
413
|
+
${titleKey ? obj[titleKey] : ''}</a
|
|
414
|
+
>
|
|
415
|
+
</div>
|
|
416
|
+
<div class="in ${idPanel}-subtitle">
|
|
417
|
+
${subTitleKey ? obj[subTitleKey] : ''} <span class="tag-render-${id}"></span>
|
|
418
|
+
</div>
|
|
419
|
+
<!-- <div class="in ${idPanel}-tags"></div> -->
|
|
420
|
+
</div>
|
|
421
|
+
<div class="fl">
|
|
422
|
+
<div class="in fll ${idPanel}-cell ${idPanel}-cell-col-a ${idPanel}-cell-col-a-${id}">
|
|
423
|
+
<div class="abs center ${idPanel}-img-spinner-${id}"></div>
|
|
424
|
+
</div>
|
|
425
|
+
<div class="in fll ${idPanel}-cell ${idPanel}-cell-col-b">
|
|
426
|
+
${Object.keys(obj)
|
|
427
|
+
.map((infoKey) => {
|
|
428
|
+
if (infoKey === 'id') return html``;
|
|
429
|
+
const formObjData = formData.find((f) => f.model === infoKey);
|
|
430
|
+
const valueIcon = formObjData?.panel?.icon?.value ? formObjData.panel.icon.value : '';
|
|
431
|
+
const keyIcon = formObjData?.panel?.icon?.key ? formObjData.panel.icon.key : '';
|
|
432
|
+
|
|
433
|
+
if (formObjData && ['datetime-local'].includes(formObjData.inputType) && isValidDate(obj[infoKey])) {
|
|
434
|
+
obj[infoKey] = `${obj[infoKey]}`.replace('T', ' ').replace('.000Z', '');
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (formData.find((f) => f.model === infoKey && f.panel && f.panel.type === 'tags')) {
|
|
438
|
+
// Function to render tags with current theme
|
|
439
|
+
const renderTags = async () => {
|
|
440
|
+
let tagRender = html``;
|
|
441
|
+
for (const tag of obj[infoKey]) {
|
|
442
|
+
// Use subThemeManager colors for consistent theming
|
|
443
|
+
const themeColor = darkTheme ? subThemeManager.darkColor : subThemeManager.lightColor;
|
|
444
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
445
|
+
|
|
446
|
+
let tagBg, tagColor;
|
|
447
|
+
if (darkTheme) {
|
|
448
|
+
tagBg = hasThemeColor ? darkenHex(themeColor, 0.6) : '#4a4a4a';
|
|
449
|
+
tagColor = hasThemeColor ? lightenHex(themeColor, 0.7) : '#ffffff';
|
|
450
|
+
} else {
|
|
451
|
+
tagBg = hasThemeColor ? lightenHex(themeColor, 0.7) : '#a2a2a2';
|
|
452
|
+
tagColor = hasThemeColor ? darkenHex(themeColor, 0.5) : '#ffffff';
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
tagRender += await Badge.instance({
|
|
456
|
+
text: tag,
|
|
457
|
+
classList: 'inl panel-tag-clickable',
|
|
458
|
+
style: {
|
|
459
|
+
margin: '3px',
|
|
460
|
+
background: tagBg,
|
|
461
|
+
color: tagColor,
|
|
462
|
+
cursor: 'pointer',
|
|
463
|
+
transition: 'all 0.2s ease',
|
|
464
|
+
},
|
|
465
|
+
});
|
|
466
|
+
}
|
|
467
|
+
if (s(`.tag-render-${id}`)) {
|
|
468
|
+
htmls(`.tag-render-${id}`, tagRender);
|
|
469
|
+
|
|
470
|
+
// Add click handlers to tags for search integration
|
|
471
|
+
setTimeout(() => {
|
|
472
|
+
const tagElements = sa(`.tag-render-${id} .panel-tag-clickable`);
|
|
473
|
+
tagElements.forEach((tagEl) => {
|
|
474
|
+
tagEl.onclick = (e) => {
|
|
475
|
+
e.stopPropagation();
|
|
476
|
+
const tagText = tagEl.textContent.trim();
|
|
477
|
+
|
|
478
|
+
// Open search bar if closed
|
|
479
|
+
if (
|
|
480
|
+
!s('.main-body-btn-ui-bar-custom-open').classList.contains('hide') ||
|
|
481
|
+
!s(`.main-body-btn-ui-open`).classList.contains('hide')
|
|
482
|
+
)
|
|
483
|
+
s('.main-body-btn-bar-custom').click();
|
|
484
|
+
|
|
485
|
+
// Find and populate search box if it exists
|
|
486
|
+
const searchBox = s('.top-bar-search-box');
|
|
487
|
+
if (searchBox) {
|
|
488
|
+
searchBox.value = tagText;
|
|
489
|
+
searchBox.focus();
|
|
490
|
+
|
|
491
|
+
// Trigger input event to start search
|
|
492
|
+
const inputEvent = new Event('input', { bubbles: true });
|
|
493
|
+
searchBox.dispatchEvent(inputEvent);
|
|
494
|
+
|
|
495
|
+
logger.info(`Tag clicked: ${tagText} - search triggered`);
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
});
|
|
499
|
+
}, 100);
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
// Initial render
|
|
504
|
+
setTimeout(renderTags);
|
|
505
|
+
|
|
506
|
+
// Add theme change handler for this tag set
|
|
507
|
+
const tagThemeHandlerId = `${id}-tags-${infoKey}-theme`;
|
|
508
|
+
ThemeEvents[tagThemeHandlerId] = renderTags;
|
|
509
|
+
|
|
510
|
+
return html``;
|
|
511
|
+
}
|
|
512
|
+
{
|
|
513
|
+
const formDataObj = formData.find((f) => f.model === infoKey && f.panel && f.panel.type === 'list');
|
|
514
|
+
if (obj[infoKey] && obj[infoKey].length > 0 && formDataObj)
|
|
515
|
+
return html`<div class="in ${idPanel}-row">
|
|
516
|
+
<span class="${idPanel}-row-key capitalize ${formObjData.label?.disabled ? 'hide' : ''}">
|
|
517
|
+
${keyIcon} ${Translate.instance(infoKey)}:</span
|
|
518
|
+
>
|
|
519
|
+
<span class="${idPanel}-row-value"
|
|
520
|
+
>${valueIcon} ${obj[infoKey].map((k) => Translate.instance(k)).join(', ')}</span
|
|
521
|
+
>
|
|
522
|
+
</div> `;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
{
|
|
526
|
+
const formDataObj = formData.find(
|
|
527
|
+
(f) => f.model === infoKey && f.panel && f.panel.type === 'info-row-pin',
|
|
528
|
+
);
|
|
529
|
+
if (obj[infoKey] && formDataObj)
|
|
530
|
+
return html`<div class="in ${idPanel}-row">
|
|
531
|
+
<span class="${idPanel}-row-pin-key capitalize ${formObjData.label?.disabled ? 'hide' : ''}">
|
|
532
|
+
${keyIcon}
|
|
533
|
+
${formDataObj.translateCode
|
|
534
|
+
? Translate.instance(formDataObj.translateCode)
|
|
535
|
+
: Translate.instance(infoKey)}:</span
|
|
536
|
+
>
|
|
537
|
+
<span class="${idPanel}-row-pin-value">${valueIcon} ${obj[infoKey]}</span>
|
|
538
|
+
</div> `;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
{
|
|
542
|
+
const formDataObj = formData.find(
|
|
543
|
+
(f) => f.model === infoKey && f.panel && f.panel.type === 'info-row',
|
|
544
|
+
);
|
|
545
|
+
if (obj[infoKey] && formDataObj)
|
|
546
|
+
return html`<div class="in ${idPanel}-row">
|
|
547
|
+
<span class="${idPanel}-row-key capitalize ${formObjData.label?.disabled ? 'hide' : ''}">
|
|
548
|
+
${keyIcon}
|
|
549
|
+
${formDataObj.translateCode
|
|
550
|
+
? Translate.instance(formDataObj.translateCode)
|
|
551
|
+
: Translate.instance(infoKey)}:</span
|
|
552
|
+
>
|
|
553
|
+
<span class="${idPanel}-row-value"> ${valueIcon} ${obj[infoKey]}</span>
|
|
554
|
+
</div> `;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
return html``;
|
|
558
|
+
})
|
|
559
|
+
.join('')}
|
|
560
|
+
</div>
|
|
561
|
+
</div>
|
|
562
|
+
</div>
|
|
563
|
+
${options.share && (options.share.copyLink || options.share.copySourceMd)
|
|
564
|
+
? html`<div
|
|
565
|
+
class="${idPanel}-share-btn-container ${idPanel}-share-btn-container-${id}"
|
|
566
|
+
style="position: absolute; bottom: 8px; right: 8px; z-index: 2; display: flex; gap: 8px;"
|
|
567
|
+
>
|
|
568
|
+
${options.share.copyLink
|
|
569
|
+
? html`<div style="position: relative;">
|
|
570
|
+
<button
|
|
571
|
+
class="btn-icon ${idPanel}-btn-copy-share-${id}"
|
|
572
|
+
style="background: transparent; color: #888; border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; transition: all 0.3s ease;"
|
|
573
|
+
>
|
|
574
|
+
<i class="fas fa-link" style="font-size: 20px;"></i>
|
|
575
|
+
${obj.totalCopyShareLinkCount && obj.totalCopyShareLinkCount > 0
|
|
576
|
+
? html`<span
|
|
577
|
+
class="${idPanel}-share-count-${id}"
|
|
578
|
+
style="position: absolute; top: -4px; right: -4px; background: #666; color: white; border-radius: 10px; padding: 1px 5px; font-size: 10px; font-weight: bold; min-width: 16px; text-align: center;"
|
|
579
|
+
>${obj.totalCopyShareLinkCount}</span
|
|
580
|
+
>`
|
|
581
|
+
: ''}
|
|
582
|
+
</button>
|
|
583
|
+
<div
|
|
584
|
+
class="${idPanel}-share-tooltip-${id}"
|
|
585
|
+
style="position: absolute; bottom: 50px; right: 0; background: rgba(0,0,0,0.8); color: white; padding: 6px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;"
|
|
586
|
+
>
|
|
587
|
+
${Translate.instance('copy-share-link')}
|
|
588
|
+
</div>
|
|
589
|
+
</div>`
|
|
590
|
+
: ''}
|
|
591
|
+
${options.share.copySourceMd
|
|
592
|
+
? html`<div style="position: relative;">
|
|
593
|
+
<button
|
|
594
|
+
class="btn-icon ${idPanel}-btn-copy-source-md-${id}"
|
|
595
|
+
style="background: transparent; color: #888; border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; transition: all 0.3s ease;"
|
|
596
|
+
>
|
|
597
|
+
<i class="fas fa-code" style="font-size: 20px;"></i>
|
|
598
|
+
</button>
|
|
599
|
+
<div
|
|
600
|
+
class="${idPanel}-source-md-tooltip-${id}"
|
|
601
|
+
style="position: absolute; bottom: 50px; right: 0; background: rgba(0,0,0,0.8); color: white; padding: 6px 10px; border-radius: 4px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;"
|
|
602
|
+
>
|
|
603
|
+
Copy Source MD
|
|
604
|
+
</div>
|
|
605
|
+
</div>`
|
|
606
|
+
: ''}
|
|
607
|
+
</div>`
|
|
608
|
+
: ''}
|
|
609
|
+
</div>`;
|
|
610
|
+
};
|
|
611
|
+
|
|
612
|
+
let render = '';
|
|
613
|
+
let renderForm = html` <div class="in modal" style="top: 0px; z-index: 1; padding-bottom: 5px">
|
|
614
|
+
${await BtnIcon.instance({
|
|
615
|
+
class: `inl section-mp btn-custom btn-${idPanel}-close`,
|
|
616
|
+
label: html`<i class="fa-solid fa-xmark"></i> ${Translate.instance('close')}`,
|
|
617
|
+
type: 'button',
|
|
618
|
+
})}
|
|
619
|
+
</div>
|
|
620
|
+
${options?.htmlFormHeader ? await options.htmlFormHeader() : ''}`;
|
|
621
|
+
|
|
622
|
+
for (const modelData of formData) {
|
|
623
|
+
if (modelData.disableRender) continue;
|
|
624
|
+
switch (modelData.inputType) {
|
|
625
|
+
case 'dropdown-checkbox': {
|
|
626
|
+
renderForm += html`<div class="in section-mp">
|
|
627
|
+
${await DropDown.instance({
|
|
628
|
+
id: `${modelData.id}`,
|
|
629
|
+
label: html`${Translate.instance(modelData.model)}`,
|
|
630
|
+
type: 'checkbox',
|
|
631
|
+
value: modelData.dropdown.options[0],
|
|
632
|
+
resetOption: true,
|
|
633
|
+
containerClass: `${idPanel}-dropdown-checkbox`,
|
|
634
|
+
data: modelData.dropdown.options.map((dKey) => {
|
|
635
|
+
return {
|
|
636
|
+
value: dKey,
|
|
637
|
+
data: dKey,
|
|
638
|
+
checked: false,
|
|
639
|
+
display: html`${Translate.instance(dKey)}`,
|
|
640
|
+
onClick: function () {
|
|
641
|
+
logger.info('DropDown onClick', this.checked);
|
|
642
|
+
},
|
|
643
|
+
};
|
|
644
|
+
}),
|
|
645
|
+
})}
|
|
646
|
+
</div>`;
|
|
647
|
+
break;
|
|
648
|
+
}
|
|
649
|
+
case 'dropdown':
|
|
650
|
+
renderForm += html` <div class="in section-mp">
|
|
651
|
+
${await DropDown.instance({
|
|
652
|
+
id: `${modelData.id}`,
|
|
653
|
+
label: html`${Translate.instance(modelData.model)}`,
|
|
654
|
+
containerClass: `${idPanel}-dropdown`,
|
|
655
|
+
// type: 'checkbox',
|
|
656
|
+
value: modelData.dropdown.options[0].replaceAll(' ', '-').toLowerCase(),
|
|
657
|
+
data: modelData.dropdown.options.map((dKey) => {
|
|
658
|
+
const key = dKey.replaceAll(' ', '-').toLowerCase();
|
|
659
|
+
return {
|
|
660
|
+
value: key,
|
|
661
|
+
data: dKey,
|
|
662
|
+
// checked: true,
|
|
663
|
+
display: html`${Translate.instance(dKey)}`,
|
|
664
|
+
onClick: function () {},
|
|
665
|
+
};
|
|
666
|
+
}),
|
|
667
|
+
})}
|
|
668
|
+
</div>`;
|
|
669
|
+
break;
|
|
670
|
+
case 'md': {
|
|
671
|
+
renderForm += html`<div class="in section-mp">
|
|
672
|
+
${await RichText.instance({ id: modelData.id, parentIdModal: options.parentIdModal })}
|
|
673
|
+
</div>`;
|
|
674
|
+
break;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
case 'checkbox-on-off':
|
|
678
|
+
{
|
|
679
|
+
setTimeout(() => {
|
|
680
|
+
s(`.toggle-form-container-${modelData.id}`).onclick = () => {
|
|
681
|
+
ToggleSwitch.Tokens[`${modelData.id}`].click();
|
|
682
|
+
};
|
|
683
|
+
});
|
|
684
|
+
renderForm += html`<div
|
|
685
|
+
class="in section-mp toggle-form-container toggle-form-container-${modelData.id} hover"
|
|
686
|
+
style="height: 82px;"
|
|
687
|
+
>
|
|
688
|
+
<div class="fl">
|
|
689
|
+
<div class="in fll" style="width: 70%">
|
|
690
|
+
<div class="in">
|
|
691
|
+
${modelData.panel && modelData.panel.icon ? modelData.panel.icon : ''}
|
|
692
|
+
${Translate.instance(modelData.model)}
|
|
693
|
+
</div>
|
|
694
|
+
</div>
|
|
695
|
+
<div class="in fll" style="width: 30%">
|
|
696
|
+
${await ToggleSwitch.instance({
|
|
697
|
+
id: `${modelData.id}`,
|
|
698
|
+
containerClass: 'inl',
|
|
699
|
+
disabledOnClick: true,
|
|
700
|
+
checked: false,
|
|
701
|
+
on: {
|
|
702
|
+
unchecked: () => {},
|
|
703
|
+
checked: () => {},
|
|
704
|
+
},
|
|
705
|
+
})}
|
|
706
|
+
</div>
|
|
707
|
+
</div>
|
|
708
|
+
</div>`;
|
|
709
|
+
}
|
|
710
|
+
break;
|
|
711
|
+
case 'file':
|
|
712
|
+
setTimeout(() => {
|
|
713
|
+
if (!s(`.${modelData.id}`)) return;
|
|
714
|
+
s(`.${modelData.id}`).fileNameInputExtDefaultContent = fileNameInputExtDefaultContent;
|
|
715
|
+
s(`.${modelData.id}`).onchange = async (e) => {
|
|
716
|
+
if (!Object.keys(e.target.files).length) return;
|
|
717
|
+
s(`.${modelData.id}`).inputFiles = e.target.files;
|
|
718
|
+
let htmlFileRender = '';
|
|
719
|
+
for (const fileKey of Object.keys(e.target.files)) {
|
|
720
|
+
const file = e.target.files[fileKey];
|
|
721
|
+
htmlFileRender += html`${await Content.RenderFile({
|
|
722
|
+
url: URL.createObjectURL(file),
|
|
723
|
+
file: {
|
|
724
|
+
mimetype: file.type,
|
|
725
|
+
name: file.name,
|
|
726
|
+
data: {
|
|
727
|
+
data: await getDataFromInputFile(file),
|
|
728
|
+
},
|
|
729
|
+
},
|
|
730
|
+
|
|
731
|
+
raw: true,
|
|
732
|
+
})}
|
|
733
|
+
<div class="in" style="overflow: hidden">${file.name}</div>`;
|
|
734
|
+
}
|
|
735
|
+
htmls(`.file-name-render-${modelData.id}`, htmlFileRender);
|
|
736
|
+
};
|
|
737
|
+
});
|
|
738
|
+
renderForm += `${await Input.instance({
|
|
739
|
+
inputClass: 'hide',
|
|
740
|
+
id: `${modelData.id}`,
|
|
741
|
+
type: modelData.inputType,
|
|
742
|
+
multiple: true,
|
|
743
|
+
// autocomplete: 'new-password',
|
|
744
|
+
label: html`<i class="fa-solid fa-file-arrow-up"></i> ${Translate.instance('select')}
|
|
745
|
+
${Translate.instance('file')}`,
|
|
746
|
+
containerClass: 'in section-mp width-mini-box input-container',
|
|
747
|
+
placeholder: true,
|
|
748
|
+
extension: () =>
|
|
749
|
+
html`<div class="file-name-render-${modelData.id}" style="min-height: 50px">
|
|
750
|
+
${fileNameInputExtDefaultContent}
|
|
751
|
+
</div>`,
|
|
752
|
+
// disabled: true,
|
|
753
|
+
// disabledEye: true,
|
|
754
|
+
})}
|
|
755
|
+
${await BtnIcon.instance({
|
|
756
|
+
class: `inl section-mp btn-custom btn-${idPanel}-clean-file`,
|
|
757
|
+
label: html`<i class="fa-solid fa-file-circle-xmark"></i> ${Translate.instance('clear-file')}`,
|
|
758
|
+
type: 'button',
|
|
759
|
+
})}`;
|
|
760
|
+
break;
|
|
761
|
+
default:
|
|
762
|
+
renderForm += `${await Input.instance({
|
|
763
|
+
id: `${modelData.id}`,
|
|
764
|
+
type: modelData.inputType,
|
|
765
|
+
// autocomplete: 'new-password',
|
|
766
|
+
label: html`<i class="fa-solid fa-pen-to-square"></i> ${Translate.instance(modelData.model)}`,
|
|
767
|
+
containerClass: 'in section-mp width-mini-box input-container',
|
|
768
|
+
placeholder: true,
|
|
769
|
+
// disabled: true,
|
|
770
|
+
// disabledEye: true,
|
|
771
|
+
})}`;
|
|
772
|
+
break;
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
let renderFormBtn = html`
|
|
776
|
+
${await BtnIcon.instance({
|
|
777
|
+
class: `inl section-mp btn-custom btn-${idPanel}-submit`,
|
|
778
|
+
label: html`<span class="btn-${idPanel}-label-add"
|
|
779
|
+
><i class="fas fa-plus"></i> ${Translate.instance('add')}</span
|
|
780
|
+
><span class="btn-${idPanel}-label-edit hide"
|
|
781
|
+
><i class="fas fa-edit"></i> ${Translate.instance('edit')}</span
|
|
782
|
+
>`,
|
|
783
|
+
type: 'submit',
|
|
784
|
+
})}
|
|
785
|
+
${await BtnIcon.instance({
|
|
786
|
+
class: `inl section-mp btn-custom btn-${idPanel}-clean`,
|
|
787
|
+
label: html`<i class="fa-solid fa-broom"></i> ${Translate.instance('clear')}`,
|
|
788
|
+
type: 'button',
|
|
789
|
+
})}
|
|
790
|
+
`;
|
|
791
|
+
|
|
792
|
+
setTimeout(async () => {
|
|
793
|
+
const validators = await Validator.instance(formData);
|
|
794
|
+
|
|
795
|
+
s(`.${idPanel}-form`).onsubmit = (e) => {
|
|
796
|
+
e.preventDefault();
|
|
797
|
+
s(`.btn-${idPanel}-submit`).click();
|
|
798
|
+
};
|
|
799
|
+
EventsUI.onClick(`.btn-${idPanel}-submit`, async (e) => {
|
|
800
|
+
e.preventDefault();
|
|
801
|
+
const { errorMessage } = await validators();
|
|
802
|
+
if (errorMessage) return;
|
|
803
|
+
const obj = Input.getValues(formData);
|
|
804
|
+
obj.id = `${data.length}`;
|
|
805
|
+
let documents;
|
|
806
|
+
if (options && options.on && options.on.add) {
|
|
807
|
+
const { status, data } = await options.on.add({ data: obj, editId: Panel.Tokens[idPanel].editId });
|
|
808
|
+
if (status === 'error') return;
|
|
809
|
+
documents = data;
|
|
810
|
+
}
|
|
811
|
+
s(`.btn-${idPanel}-clean`).click();
|
|
812
|
+
if (Panel.Tokens[idPanel].editId && s(`.${idPanel}-${Panel.Tokens[idPanel].editId}`))
|
|
813
|
+
s(`.${idPanel}-${Panel.Tokens[idPanel].editId}`).remove();
|
|
814
|
+
if (Array.isArray(documents)) {
|
|
815
|
+
htmls(`.${idPanel}-render`, '');
|
|
816
|
+
for (const doc of documents) {
|
|
817
|
+
append(`.${idPanel}-render`, await renderPanel(doc));
|
|
818
|
+
}
|
|
819
|
+
} else htmls(`.${idPanel}-render`, await renderPanel({ ...obj, ...documents }));
|
|
820
|
+
|
|
821
|
+
attachMarkdownLinkHandlers(`.${idPanel}-render`);
|
|
822
|
+
Input.cleanValues(formData);
|
|
823
|
+
s(`.btn-${idPanel}-close`).click();
|
|
824
|
+
s(`.${scrollClassContainer}`).scrollTop = 0;
|
|
825
|
+
if (s(`.${scrollClassContainer}`)) s(`.${scrollClassContainer}`).style.overflow = 'auto';
|
|
826
|
+
});
|
|
827
|
+
s(`.btn-${idPanel}-clean`).onclick = () => {
|
|
828
|
+
Input.cleanValues(formData);
|
|
829
|
+
};
|
|
830
|
+
if (s(`.btn-${idPanel}-clean-file`))
|
|
831
|
+
s(`.btn-${idPanel}-clean-file`).onclick = () => {
|
|
832
|
+
// Clear file input specifically
|
|
833
|
+
const fileFormData = formData.find((f) => f.inputType === 'file');
|
|
834
|
+
if (fileFormData && s(`.${fileFormData.id}`)) {
|
|
835
|
+
s(`.${fileFormData.id}`).value = '';
|
|
836
|
+
s(`.${fileFormData.id}`).inputFiles = null;
|
|
837
|
+
htmls(`.file-name-render-${fileFormData.id}`, `${fileNameInputExtDefaultContent}`);
|
|
838
|
+
}
|
|
839
|
+
};
|
|
840
|
+
s(`.btn-${idPanel}-close`).onclick = (e) => {
|
|
841
|
+
e.preventDefault();
|
|
842
|
+
s(`.${idPanel}-form-body`).style.opacity = 0;
|
|
843
|
+
s(`.btn-${idPanel}-add`).classList.remove('hide');
|
|
844
|
+
s(`.${scrollClassContainer}`).style.overflow = 'auto';
|
|
845
|
+
if (options.customButtons) {
|
|
846
|
+
let customBtnIndex = -1;
|
|
847
|
+
for (const dataBtn of options.customButtons) {
|
|
848
|
+
customBtnIndex++;
|
|
849
|
+
const customBtnIndexFn = customBtnIndex;
|
|
850
|
+
const btnSelector = `btn-${idPanel}-custom${customBtnIndexFn}`;
|
|
851
|
+
s(`.${btnSelector}`).classList.remove('hide');
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
s(`.${idPanel}-form-body`).classList.add('hide');
|
|
855
|
+
};
|
|
856
|
+
s(`.btn-${idPanel}-add`).onclick = async (e) => {
|
|
857
|
+
e.preventDefault();
|
|
858
|
+
|
|
859
|
+
// Clean all form inputs and reset data scope
|
|
860
|
+
Input.cleanValues(formData);
|
|
861
|
+
|
|
862
|
+
// Clean file input specifically
|
|
863
|
+
const fileFormData = formData.find((f) => f.inputType === 'file');
|
|
864
|
+
if (fileFormData && s(`.${fileFormData.id}`)) {
|
|
865
|
+
s(`.${fileFormData.id}`).value = '';
|
|
866
|
+
s(`.${fileFormData.id}`).inputFiles = null;
|
|
867
|
+
htmls(`.file-name-render-${fileFormData.id}`, `${fileNameInputExtDefaultContent}`);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
// Reset edit ID to ensure we're in "add" mode
|
|
871
|
+
Panel.Tokens[idPanel].editId = undefined;
|
|
872
|
+
|
|
873
|
+
// Update button labels
|
|
874
|
+
s(`.btn-${idPanel}-label-add`).classList.remove('hide');
|
|
875
|
+
s(`.btn-${idPanel}-label-edit`).classList.add('hide');
|
|
876
|
+
|
|
877
|
+
// Scroll to top
|
|
878
|
+
s(`.${scrollClassContainer}`).scrollTop = 0;
|
|
879
|
+
|
|
880
|
+
openPanelForm();
|
|
881
|
+
if (options.on.initAdd) await options.on.initAdd();
|
|
882
|
+
};
|
|
883
|
+
if (s(`.${scrollClassContainer}`)) s(`.${scrollClassContainer}`).style.overflow = 'auto';
|
|
884
|
+
attachMarkdownLinkHandlers(`.${idPanel}-render`);
|
|
885
|
+
});
|
|
886
|
+
|
|
887
|
+
if (data.length > 0) for (const obj of data) render += await renderPanel(obj);
|
|
888
|
+
else {
|
|
889
|
+
render += html`<div class="in" style="min-height: 200px">
|
|
890
|
+
<div class="abs center"><i class="fas fa-exclamation-circle"></i> ${Translate.instance(`no-result-found`)}</div>
|
|
891
|
+
</div>`;
|
|
892
|
+
|
|
893
|
+
if (options.on.noResultFound) setTimeout(options.on.noResultFound);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
this.Tokens[idPanel] = { idPanel, scrollClassContainer, formData, data, titleKey, subTitleKey, renderPanel };
|
|
897
|
+
|
|
898
|
+
let customButtonsRender = '';
|
|
899
|
+
if (options && options.customButtons) {
|
|
900
|
+
let customBtnIndex = -1;
|
|
901
|
+
for (const dataBtn of options.customButtons) {
|
|
902
|
+
customBtnIndex++;
|
|
903
|
+
const customBtnIndexFn = customBtnIndex;
|
|
904
|
+
const btnSelector = `btn-${idPanel}-custom${customBtnIndexFn}`;
|
|
905
|
+
if (dataBtn.onClick)
|
|
906
|
+
setTimeout(() => {
|
|
907
|
+
s(`.${btnSelector}`).onclick = () => dataBtn.onClick();
|
|
908
|
+
});
|
|
909
|
+
customButtonsRender += ` ${await BtnIcon.instance({
|
|
910
|
+
class: `inl section-mp btn-custom ${btnSelector}`,
|
|
911
|
+
label: dataBtn.label,
|
|
912
|
+
type: 'button',
|
|
913
|
+
})}`;
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
// Add theme change handler
|
|
918
|
+
const themeChangeHandler = () => {
|
|
919
|
+
const styleElement = s(`.${idPanel}-styles`);
|
|
920
|
+
if (styleElement) {
|
|
921
|
+
styleElement.textContent = darkTheme
|
|
922
|
+
? getDarkStyles(idPanel, scrollClassContainer)
|
|
923
|
+
: getLightStyles(idPanel, scrollClassContainer);
|
|
924
|
+
}
|
|
925
|
+
|
|
926
|
+
// Update tag hover styles
|
|
927
|
+
const tagStyleElement = s(`.${idPanel}-tag-styles`);
|
|
928
|
+
if (tagStyleElement) {
|
|
929
|
+
const themeColor = darkTheme ? subThemeManager.darkColor : subThemeManager.lightColor;
|
|
930
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
931
|
+
let hoverBg;
|
|
932
|
+
if (darkTheme) {
|
|
933
|
+
hoverBg = hasThemeColor ? darkenHex(themeColor, 0.5) : '#5a5a5a';
|
|
934
|
+
} else {
|
|
935
|
+
hoverBg = hasThemeColor ? lightenHex(themeColor, 0.6) : '#8a8a8a';
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
tagStyleElement.textContent = css`
|
|
939
|
+
.panel-tag-clickable:hover {
|
|
940
|
+
background: ${hoverBg} !important;
|
|
941
|
+
transform: scale(1.05);
|
|
942
|
+
}
|
|
943
|
+
.panel-tag-clickable:active {
|
|
944
|
+
transform: scale(0.98);
|
|
945
|
+
}
|
|
946
|
+
`;
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
|
|
950
|
+
// Add theme change listener
|
|
951
|
+
ThemeEvents[`${idPanel}-theme`] = themeChangeHandler;
|
|
952
|
+
|
|
953
|
+
// Initial styles
|
|
954
|
+
setTimeout(ThemeEvents[`${idPanel}-theme`]);
|
|
955
|
+
|
|
956
|
+
return html`
|
|
957
|
+
<style>
|
|
958
|
+
.${idPanel}-head {
|
|
959
|
+
/* background: white; */
|
|
960
|
+
margin-bottom: 10px;
|
|
961
|
+
}
|
|
962
|
+
.img-${idPanel} {
|
|
963
|
+
width: 100%;
|
|
964
|
+
}
|
|
965
|
+
.${idPanel}-title {
|
|
966
|
+
color: ${(() => {
|
|
967
|
+
const themeColor = darkTheme ? subThemeManager.darkColor : subThemeManager.lightColor;
|
|
968
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
969
|
+
if (hasThemeColor) {
|
|
970
|
+
return darkTheme ? lightenHex(themeColor, 0.3) : darkenHex(themeColor, 0.2);
|
|
971
|
+
} else {
|
|
972
|
+
return darkTheme ? '#8a85ff' : 'rgba(109, 104, 255, 1)';
|
|
973
|
+
}
|
|
974
|
+
})()};
|
|
975
|
+
font-size: 24px;
|
|
976
|
+
padding: 5px;
|
|
977
|
+
}
|
|
978
|
+
.a-title-${idPanel} {
|
|
979
|
+
color: ${(() => {
|
|
980
|
+
const themeColor = darkTheme ? subThemeManager.darkColor : subThemeManager.lightColor;
|
|
981
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
982
|
+
if (hasThemeColor) {
|
|
983
|
+
return darkTheme ? lightenHex(themeColor, 0.3) : darkenHex(themeColor, 0.2);
|
|
984
|
+
} else {
|
|
985
|
+
return darkTheme ? '#8a85ff' : 'rgba(109, 104, 255, 1)';
|
|
986
|
+
}
|
|
987
|
+
})()};
|
|
988
|
+
}
|
|
989
|
+
.a-title-${idPanel}:hover {
|
|
990
|
+
color: ${(() => {
|
|
991
|
+
const themeColor = darkTheme ? subThemeManager.darkColor : subThemeManager.lightColor;
|
|
992
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
993
|
+
if (hasThemeColor) {
|
|
994
|
+
return darkTheme ? lightenHex(themeColor, 0.5) : lightenHex(themeColor, 0.3);
|
|
995
|
+
} else {
|
|
996
|
+
return darkTheme ? '#ffb74d' : '#e89f4c';
|
|
997
|
+
}
|
|
998
|
+
})()};
|
|
999
|
+
}
|
|
1000
|
+
.${idPanel}-row {
|
|
1001
|
+
padding: 5px;
|
|
1002
|
+
margin: 5px;
|
|
1003
|
+
font-size: 16px;
|
|
1004
|
+
}
|
|
1005
|
+
.${idPanel}-subtitle {
|
|
1006
|
+
font-size: 17px;
|
|
1007
|
+
margin-left: 20px;
|
|
1008
|
+
top: -7px;
|
|
1009
|
+
}
|
|
1010
|
+
.${idPanel}-tags {
|
|
1011
|
+
font-size: 17px;
|
|
1012
|
+
margin-left: 10px;
|
|
1013
|
+
top: -7px;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
.${idPanel}-row-key {
|
|
1017
|
+
}
|
|
1018
|
+
.${idPanel}-row-value {
|
|
1019
|
+
}
|
|
1020
|
+
.${idPanel}-row-pin-key {
|
|
1021
|
+
}
|
|
1022
|
+
.${idPanel}-row-pin-value {
|
|
1023
|
+
font-size: 20px;
|
|
1024
|
+
color: rgb(19 190 84);
|
|
1025
|
+
}
|
|
1026
|
+
.${idPanel}-form-header {
|
|
1027
|
+
}
|
|
1028
|
+
.${idPanel}-form-body {
|
|
1029
|
+
transition: 0.3s;
|
|
1030
|
+
}
|
|
1031
|
+
.btn-${idPanel}-add {
|
|
1032
|
+
padding: 10px;
|
|
1033
|
+
font-size: 20px;
|
|
1034
|
+
}
|
|
1035
|
+
.${idPanel}-dropdown {
|
|
1036
|
+
min-height: 100px;
|
|
1037
|
+
}
|
|
1038
|
+
.${idPanel}-btn-tool {
|
|
1039
|
+
background: none !important;
|
|
1040
|
+
color: #c4c4c4 !important;
|
|
1041
|
+
}
|
|
1042
|
+
.${idPanel}-btn-tool:hover {
|
|
1043
|
+
color: #000000 !important;
|
|
1044
|
+
font-size: 17px !important;
|
|
1045
|
+
}
|
|
1046
|
+
.${idPanel}-share-btn-container button:hover {
|
|
1047
|
+
background: transparent !important;
|
|
1048
|
+
transform: scale(1.1);
|
|
1049
|
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4) !important;
|
|
1050
|
+
}
|
|
1051
|
+
.${idPanel}-share-btn-container button:focus {
|
|
1052
|
+
outline: none;
|
|
1053
|
+
background: transparent !important;
|
|
1054
|
+
}
|
|
1055
|
+
.${idPanel}-share-btn-container button:focus {
|
|
1056
|
+
outline: none;
|
|
1057
|
+
background: transparent !important;
|
|
1058
|
+
}
|
|
1059
|
+
.${idPanel}-share-btn-container button:active {
|
|
1060
|
+
transform: scale(0.95);
|
|
1061
|
+
}
|
|
1062
|
+
.${idPanel}-share-btn-container span[class*='share-count'] {
|
|
1063
|
+
animation: ${idPanel}-share-pulse 2s infinite;
|
|
1064
|
+
}
|
|
1065
|
+
@keyframes ${idPanel}-share-pulse {
|
|
1066
|
+
0%,
|
|
1067
|
+
100% {
|
|
1068
|
+
transform: scale(1);
|
|
1069
|
+
}
|
|
1070
|
+
50% {
|
|
1071
|
+
transform: scale(1.1);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
</style>
|
|
1075
|
+
<style class="${idPanel}-styles"></style>
|
|
1076
|
+
<style class="${idPanel}-tag-styles">
|
|
1077
|
+
.panel-tag-clickable:hover {
|
|
1078
|
+
background: ${(() => {
|
|
1079
|
+
const themeColor = darkTheme ? subThemeManager.darkColor : subThemeManager.lightColor;
|
|
1080
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
1081
|
+
if (darkTheme) {
|
|
1082
|
+
return hasThemeColor ? darkenHex(themeColor, 0.5) : '#5a5a5a';
|
|
1083
|
+
} else {
|
|
1084
|
+
return hasThemeColor ? lightenHex(themeColor, 0.6) : '#8a8a8a';
|
|
1085
|
+
}
|
|
1086
|
+
})()} !important;
|
|
1087
|
+
transform: scale(1.05);
|
|
1088
|
+
}
|
|
1089
|
+
.panel-tag-clickable:active {
|
|
1090
|
+
transform: scale(0.98);
|
|
1091
|
+
}
|
|
1092
|
+
</style>
|
|
1093
|
+
<div class="${idPanel}-container">
|
|
1094
|
+
<div class="in modal ${idPanel}-form-container ${options.formContainerClass ? options.formContainerClass : ''}">
|
|
1095
|
+
<div class="in ${idPanel}-form-header">
|
|
1096
|
+
${await BtnIcon.instance({
|
|
1097
|
+
class: `inl section-mp btn-custom btn-${idPanel}-add ${
|
|
1098
|
+
options?.role?.add ? (!options.role.add() ? 'hide' : '') : ''
|
|
1099
|
+
}`,
|
|
1100
|
+
label: html`<i class="fas fa-plus"></i> ${Translate.instance('add')}`,
|
|
1101
|
+
type: 'button',
|
|
1102
|
+
})}
|
|
1103
|
+
<!-- pagination component -->
|
|
1104
|
+
${customButtonsRender}
|
|
1105
|
+
</div>
|
|
1106
|
+
<div class="in ${idPanel}-form-body hide" style="opacity: 0">
|
|
1107
|
+
<form class="in ${idPanel}-form">
|
|
1108
|
+
<div class="fl">${renderForm}</div>
|
|
1109
|
+
<div class="in">${renderFormBtn}</div>
|
|
1110
|
+
<br /><br />
|
|
1111
|
+
</form>
|
|
1112
|
+
</div>
|
|
1113
|
+
</div>
|
|
1114
|
+
${dynamicCol({
|
|
1115
|
+
id: `${idPanel}-cell`,
|
|
1116
|
+
containerSelector: `${idPanel}-render`,
|
|
1117
|
+
limit: 500,
|
|
1118
|
+
type: 'a-50-b-50',
|
|
1119
|
+
})}
|
|
1120
|
+
<div class="in ${idPanel}-render">${render}</div>
|
|
1121
|
+
</div>
|
|
1122
|
+
`;
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
|
|
1126
|
+
// Function to generate base styles
|
|
1127
|
+
function getBaseStyles(idPanel, scrollClassContainer) {
|
|
1128
|
+
return css`
|
|
1129
|
+
.${scrollClassContainer} {
|
|
1130
|
+
scroll-behavior: smooth;
|
|
1131
|
+
}
|
|
1132
|
+
.${idPanel}-form-container {
|
|
1133
|
+
padding-bottom: 20px;
|
|
1134
|
+
top: 0px;
|
|
1135
|
+
z-index: 1;
|
|
1136
|
+
overflow: auto;
|
|
1137
|
+
}
|
|
1138
|
+
.${idPanel}-form {
|
|
1139
|
+
max-width: 900px;
|
|
1140
|
+
}
|
|
1141
|
+
.${idPanel}-cell {
|
|
1142
|
+
min-height: 200px;
|
|
1143
|
+
}
|
|
1144
|
+
.${idPanel}-container {
|
|
1145
|
+
}
|
|
1146
|
+
.${idPanel} {
|
|
1147
|
+
margin: 10px;
|
|
1148
|
+
transition: 0.3s;
|
|
1149
|
+
border-radius: 10px;
|
|
1150
|
+
padding: 10px;
|
|
1151
|
+
min-height: 400px;
|
|
1152
|
+
}
|
|
1153
|
+
.${idPanel}-head {
|
|
1154
|
+
margin-bottom: 10px;
|
|
1155
|
+
}
|
|
1156
|
+
.img-${idPanel} {
|
|
1157
|
+
width: 100%;
|
|
1158
|
+
}
|
|
1159
|
+
.${idPanel}-row {
|
|
1160
|
+
padding: 5px;
|
|
1161
|
+
margin: 5px;
|
|
1162
|
+
font-size: 16px;
|
|
1163
|
+
}
|
|
1164
|
+
.${idPanel}-subtitle {
|
|
1165
|
+
font-size: 17px;
|
|
1166
|
+
margin-left: 20px;
|
|
1167
|
+
top: -7px;
|
|
1168
|
+
}
|
|
1169
|
+
.${idPanel}-tags {
|
|
1170
|
+
font-size: 17px;
|
|
1171
|
+
margin-left: 10px;
|
|
1172
|
+
top: -7px;
|
|
1173
|
+
}
|
|
1174
|
+
.${idPanel}-form-body {
|
|
1175
|
+
transition: 0.3s;
|
|
1176
|
+
}
|
|
1177
|
+
.btn-${idPanel}-add {
|
|
1178
|
+
padding: 10px;
|
|
1179
|
+
font-size: 20px;
|
|
1180
|
+
}
|
|
1181
|
+
.${idPanel}-dropdown {
|
|
1182
|
+
min-height: 100px;
|
|
1183
|
+
}
|
|
1184
|
+
.panel-visibility-icon {
|
|
1185
|
+
position: absolute;
|
|
1186
|
+
top: 34px;
|
|
1187
|
+
left: 0px;
|
|
1188
|
+
font-size: 14px;
|
|
1189
|
+
opacity: 0.7;
|
|
1190
|
+
transition: opacity 0.2s ease;
|
|
1191
|
+
pointer-events: none;
|
|
1192
|
+
z-index: 10;
|
|
1193
|
+
}
|
|
1194
|
+
.${idPanel}:hover .panel-visibility-icon {
|
|
1195
|
+
opacity: 1;
|
|
1196
|
+
}
|
|
1197
|
+
`;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
// Function to generate light theme styles
|
|
1201
|
+
function getLightStyles(idPanel, scrollClassContainer) {
|
|
1202
|
+
return css`
|
|
1203
|
+
${getBaseStyles(idPanel, scrollClassContainer)}
|
|
1204
|
+
|
|
1205
|
+
.${idPanel} {
|
|
1206
|
+
background: #f6f6f6;
|
|
1207
|
+
color: black;
|
|
1208
|
+
}
|
|
1209
|
+
.${idPanel}:hover {
|
|
1210
|
+
background: #ffffff;
|
|
1211
|
+
}
|
|
1212
|
+
.${idPanel}-title {
|
|
1213
|
+
color: ${(() => {
|
|
1214
|
+
const themeColor = subThemeManager.lightColor;
|
|
1215
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
1216
|
+
return hasThemeColor ? darkenHex(themeColor, 0.2) : 'rgba(109, 104, 255, 1)';
|
|
1217
|
+
})()};
|
|
1218
|
+
font-size: 24px;
|
|
1219
|
+
padding: 5px;
|
|
1220
|
+
}
|
|
1221
|
+
.a-title-${idPanel} {
|
|
1222
|
+
color: ${(() => {
|
|
1223
|
+
const themeColor = subThemeManager.lightColor;
|
|
1224
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
1225
|
+
return hasThemeColor ? darkenHex(themeColor, 0.2) : 'rgba(109, 104, 255, 1)';
|
|
1226
|
+
})()};
|
|
1227
|
+
}
|
|
1228
|
+
.a-title-${idPanel}:hover {
|
|
1229
|
+
color: ${(() => {
|
|
1230
|
+
const themeColor = subThemeManager.lightColor;
|
|
1231
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
1232
|
+
return hasThemeColor ? lightenHex(themeColor, 0.3) : '#e89f4c';
|
|
1233
|
+
})()};
|
|
1234
|
+
}
|
|
1235
|
+
.${idPanel}-row-pin-value {
|
|
1236
|
+
font-size: 20px;
|
|
1237
|
+
color: rgb(19 190 84);
|
|
1238
|
+
}
|
|
1239
|
+
.${idPanel}-btn-tool {
|
|
1240
|
+
background: none !important;
|
|
1241
|
+
color: #c4c4c4 !important;
|
|
1242
|
+
}
|
|
1243
|
+
.${idPanel}-btn-tool:hover {
|
|
1244
|
+
color: #000000 !important;
|
|
1245
|
+
font-size: 17px !important;
|
|
1246
|
+
}
|
|
1247
|
+
.panel-visibility-icon .fa-globe,
|
|
1248
|
+
.panel-visibility-icon .fa-lock {
|
|
1249
|
+
color: #666;
|
|
1250
|
+
}
|
|
1251
|
+
`;
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
// Function to generate dark theme styles
|
|
1255
|
+
function getDarkStyles(idPanel, scrollClassContainer) {
|
|
1256
|
+
return css`
|
|
1257
|
+
${getBaseStyles(idPanel, scrollClassContainer)}
|
|
1258
|
+
|
|
1259
|
+
.${idPanel} {
|
|
1260
|
+
background: #2d2d2d;
|
|
1261
|
+
color: #e0e0e0;
|
|
1262
|
+
}
|
|
1263
|
+
.${idPanel}:hover {
|
|
1264
|
+
background: #3a3a3a;
|
|
1265
|
+
}
|
|
1266
|
+
.${idPanel}-title {
|
|
1267
|
+
color: ${(() => {
|
|
1268
|
+
const themeColor = subThemeManager.darkColor;
|
|
1269
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
1270
|
+
return hasThemeColor ? lightenHex(themeColor, 0.3) : '#8a85ff';
|
|
1271
|
+
})()};
|
|
1272
|
+
font-size: 24px;
|
|
1273
|
+
padding: 5px;
|
|
1274
|
+
}
|
|
1275
|
+
.a-title-${idPanel} {
|
|
1276
|
+
color: ${(() => {
|
|
1277
|
+
const themeColor = subThemeManager.darkColor;
|
|
1278
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
1279
|
+
return hasThemeColor ? lightenHex(themeColor, 0.3) : '#8a85ff';
|
|
1280
|
+
})()};
|
|
1281
|
+
}
|
|
1282
|
+
.a-title-${idPanel}:hover {
|
|
1283
|
+
color: ${(() => {
|
|
1284
|
+
const themeColor = subThemeManager.darkColor;
|
|
1285
|
+
const hasThemeColor = themeColor && themeColor !== null;
|
|
1286
|
+
return hasThemeColor ? lightenHex(themeColor, 0.5) : '#ffb74d';
|
|
1287
|
+
})()};
|
|
1288
|
+
}
|
|
1289
|
+
.${idPanel}-row-pin-value {
|
|
1290
|
+
font-size: 20px;
|
|
1291
|
+
color: #4caf50;
|
|
1292
|
+
}
|
|
1293
|
+
.${idPanel}-btn-tool {
|
|
1294
|
+
background: none !important;
|
|
1295
|
+
color: #666666 !important;
|
|
1296
|
+
}
|
|
1297
|
+
.${idPanel}-btn-tool:hover {
|
|
1298
|
+
color: #ffffff !important;
|
|
1299
|
+
font-size: 17px !important;
|
|
1300
|
+
}
|
|
1301
|
+
.panel-visibility-icon .fa-globe,
|
|
1302
|
+
.panel-visibility-icon .fa-lock {
|
|
1303
|
+
color: #999;
|
|
1304
|
+
}
|
|
1305
|
+
`;
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
export { Panel };
|