mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-04-06 15:30:30 +08:00
commit
049097885d
128
.pnp.cjs
generated
128
.pnp.cjs
generated
@ -34,6 +34,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"name": "lowdefy",
|
||||
"reference": "workspace:packages/cli"
|
||||
},
|
||||
{
|
||||
"name": "@lowdefy/client",
|
||||
"reference": "workspace:packages/client"
|
||||
},
|
||||
{
|
||||
"name": "@lowdefy/docs",
|
||||
"reference": "workspace:packages/docs"
|
||||
@ -194,6 +198,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@lowdefy/blocks-loaders", ["workspace:packages/plugins/blocks/blocks-loaders"]],
|
||||
["@lowdefy/blocks-markdown", ["workspace:packages/plugins/blocks/blocks-markdown"]],
|
||||
["@lowdefy/build", ["workspace:packages/build"]],
|
||||
["@lowdefy/client", ["workspace:packages/client"]],
|
||||
["@lowdefy/connection-axios-http", ["workspace:packages/plugins/connections/connection-axios-http"]],
|
||||
["@lowdefy/connection-elasticsearch", ["workspace:packages/plugins/connections/connection-elasticsearch"]],
|
||||
["@lowdefy/connection-google-sheets", ["workspace:packages/plugins/connections/connection-google-sheets"]],
|
||||
@ -263,17 +268,17 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
],
|
||||
"linkType": "SOFT",
|
||||
}],
|
||||
["virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:4.7.0", {
|
||||
"packageLocation": "./.yarn/__virtual__/@ant-design-icons-virtual-168cfd14dd/0/cache/@ant-design-icons-npm-4.7.0-8ad06c46c5-4264d38e6b.zip/node_modules/@ant-design/icons/",
|
||||
["virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:4.7.0", {
|
||||
"packageLocation": "./.yarn/__virtual__/@ant-design-icons-virtual-7e3863ece0/0/cache/@ant-design-icons-npm-4.7.0-8ad06c46c5-4264d38e6b.zip/node_modules/@ant-design/icons/",
|
||||
"packageDependencies": [
|
||||
["@ant-design/icons", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:4.7.0"],
|
||||
["@ant-design/icons", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:4.7.0"],
|
||||
["@ant-design/colors", "npm:6.0.0"],
|
||||
["@ant-design/icons-svg", "npm:4.2.1"],
|
||||
["@babel/runtime", "npm:7.16.7"],
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -2825,7 +2830,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"packageLocation": "./packages/utils/block-utils/",
|
||||
"packageDependencies": [
|
||||
["@lowdefy/block-utils", "workspace:packages/utils/block-utils"],
|
||||
["@ant-design/icons", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:4.7.0"],
|
||||
["@emotion/css", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:11.7.1"],
|
||||
["@emotion/jest", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:11.7.1"],
|
||||
["@lowdefy/helpers", "workspace:packages/utils/helpers"],
|
||||
@ -2835,7 +2839,6 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@testing-library/dom", "npm:8.11.3"],
|
||||
["@testing-library/react", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:13.0.0-alpha.4"],
|
||||
["@testing-library/user-event", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:14.0.0-alpha.14"],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["copyfiles", "npm:2.4.1"],
|
||||
["dompurify", "npm:2.3.5"],
|
||||
["jest", "virtual:babee6e81435a5d101529cd67f2c6b175f4db37a4ab0b58df15adf73dd11be8917ac14caf44ab4e6882a92c61661055072365b349016e85173e049f006fc2305#npm:27.5.1"],
|
||||
@ -2851,7 +2854,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"packageLocation": "./packages/plugins/blocks/blocks-antd/",
|
||||
"packageDependencies": [
|
||||
["@lowdefy/blocks-antd", "workspace:packages/plugins/blocks/blocks-antd"],
|
||||
["@ant-design/icons", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:4.7.0"],
|
||||
["@ant-design/icons", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:4.7.0"],
|
||||
["@emotion/jest", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:11.7.1"],
|
||||
["@lowdefy/block-dev", "workspace:packages/utils/block-dev"],
|
||||
["@lowdefy/block-utils", "workspace:packages/utils/block-utils"],
|
||||
@ -3058,6 +3061,34 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"linkType": "SOFT",
|
||||
}]
|
||||
]],
|
||||
["@lowdefy/client", [
|
||||
["workspace:packages/client", {
|
||||
"packageLocation": "./packages/client/",
|
||||
"packageDependencies": [
|
||||
["@lowdefy/client", "workspace:packages/client"],
|
||||
["@ant-design/icons", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:4.7.0"],
|
||||
["@emotion/jest", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:11.7.1"],
|
||||
["@lowdefy/block-utils", "workspace:packages/utils/block-utils"],
|
||||
["@lowdefy/engine", "workspace:packages/engine"],
|
||||
["@lowdefy/helpers", "workspace:packages/utils/helpers"],
|
||||
["@lowdefy/layout", "workspace:packages/layout"],
|
||||
["@swc/cli", "virtual:babee6e81435a5d101529cd67f2c6b175f4db37a4ab0b58df15adf73dd11be8917ac14caf44ab4e6882a92c61661055072365b349016e85173e049f006fc2305#npm:0.1.55"],
|
||||
["@swc/core", "npm:1.2.135"],
|
||||
["@swc/jest", "virtual:babee6e81435a5d101529cd67f2c6b175f4db37a4ab0b58df15adf73dd11be8917ac14caf44ab4e6882a92c61661055072365b349016e85173e049f006fc2305#npm:0.2.17"],
|
||||
["@testing-library/dom", "npm:8.11.3"],
|
||||
["@testing-library/react", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:13.0.0-alpha.4"],
|
||||
["@testing-library/user-event", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:14.0.0-alpha.14"],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["copyfiles", "npm:2.4.1"],
|
||||
["jest", "virtual:babee6e81435a5d101529cd67f2c6b175f4db37a4ab0b58df15adf73dd11be8917ac14caf44ab4e6882a92c61661055072365b349016e85173e049f006fc2305#npm:27.5.1"],
|
||||
["jest-serializer-html", "npm:7.1.0"],
|
||||
["jest-transform-yaml", "npm:1.0.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
"linkType": "SOFT",
|
||||
}]
|
||||
]],
|
||||
["@lowdefy/connection-axios-http", [
|
||||
["workspace:packages/plugins/connections/connection-axios-http", {
|
||||
"packageLocation": "./packages/plugins/connections/connection-axios-http/",
|
||||
@ -3491,14 +3522,12 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"packageLocation": "./packages/server/",
|
||||
"packageDependencies": [
|
||||
["@lowdefy/server", "workspace:packages/server"],
|
||||
["@lowdefy/actions-core", "workspace:packages/plugins/actions/actions-core"],
|
||||
["@lowdefy/api", "workspace:packages/api"],
|
||||
["@lowdefy/block-utils", "workspace:packages/utils/block-utils"],
|
||||
["@lowdefy/blocks-antd", "workspace:packages/plugins/blocks/blocks-antd"],
|
||||
["@lowdefy/blocks-basic", "workspace:packages/plugins/blocks/blocks-basic"],
|
||||
["@lowdefy/blocks-loaders", "workspace:packages/plugins/blocks/blocks-loaders"],
|
||||
["@lowdefy/build", "workspace:packages/build"],
|
||||
["@lowdefy/engine", "workspace:packages/engine"],
|
||||
["@lowdefy/client", "workspace:packages/client"],
|
||||
["@lowdefy/helpers", "workspace:packages/utils/helpers"],
|
||||
["@lowdefy/layout", "workspace:packages/layout"],
|
||||
["@lowdefy/node-utils", "workspace:packages/utils/node-utils"],
|
||||
@ -3524,8 +3553,8 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"packageLocation": "./packages/server-dev/",
|
||||
"packageDependencies": [
|
||||
["@lowdefy/server-dev", "workspace:packages/server-dev"],
|
||||
["@lowdefy/actions-core", "workspace:packages/plugins/actions/actions-core"],
|
||||
["@lowdefy/api", "workspace:packages/api"],
|
||||
["@lowdefy/block-utils", "workspace:packages/utils/block-utils"],
|
||||
["@lowdefy/blocks-antd", "workspace:packages/plugins/blocks/blocks-antd"],
|
||||
["@lowdefy/blocks-basic", "workspace:packages/plugins/blocks/blocks-basic"],
|
||||
["@lowdefy/blocks-color-selectors", "workspace:packages/plugins/blocks/blocks-color-selectors"],
|
||||
@ -3533,6 +3562,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@lowdefy/blocks-loaders", "workspace:packages/plugins/blocks/blocks-loaders"],
|
||||
["@lowdefy/blocks-markdown", "workspace:packages/plugins/blocks/blocks-markdown"],
|
||||
["@lowdefy/build", "workspace:packages/build"],
|
||||
["@lowdefy/client", "workspace:packages/client"],
|
||||
["@lowdefy/connection-axios-http", "workspace:packages/plugins/connections/connection-axios-http"],
|
||||
["@lowdefy/engine", "workspace:packages/engine"],
|
||||
["@lowdefy/helpers", "workspace:packages/utils/helpers"],
|
||||
@ -5319,7 +5349,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
"packageDependencies": [
|
||||
["antd", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:4.18.2"],
|
||||
["@ant-design/colors", "npm:6.0.0"],
|
||||
["@ant-design/icons", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:4.7.0"],
|
||||
["@ant-design/icons", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:4.7.0"],
|
||||
["@ant-design/react-slick", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:0.28.4"],
|
||||
["@babel/runtime", "npm:7.16.7"],
|
||||
["@ctrl/tinycolor", "npm:3.4.0"],
|
||||
@ -5361,7 +5391,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["rc-tree-select", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.0.0-alpha.4"],
|
||||
["rc-trigger", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.2.10"],
|
||||
["rc-upload", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:4.3.3"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["scroll-into-view-if-needed", "npm:2.2.29"]
|
||||
@ -15138,7 +15168,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["classnames", "npm:2.3.1"],
|
||||
["dom-align", "npm:1.12.2"],
|
||||
["lodash", "npm:4.17.21"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["resize-observer-polyfill", "npm:1.5.1"]
|
||||
@ -15171,7 +15201,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-select", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:14.0.0-alpha.26"],
|
||||
["rc-tree", "virtual:5cbeddbd8d40fd27744ac5bdca3d9c78264e0215780f1acaec203007d4b8b9a2b8d7ca06c3ba60bc09f45c2b2a6810a13a3fc52fd1d0d749ad27d151bb04a198#npm:5.4.3"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15229,7 +15259,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["shallowequal", "npm:1.1.0"]
|
||||
@ -15260,7 +15290,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15289,7 +15319,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15326,7 +15356,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-trigger", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.2.10"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15347,7 +15377,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-trigger", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.2.10"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15376,7 +15406,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["async-validator", "npm:4.0.7"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15406,7 +15436,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-dialog", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:8.6.0"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15435,7 +15465,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15467,7 +15497,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["rc-menu", "virtual:9b08d0103ed0c41ecbb29b80c7f0952f56690458541bdc3b40a8f6e2141ab5571d8e667fc0cbc7e816e99c60fd695931aea6d23c3e10f2a63ed283fcb22856fc#npm:9.3.2"],
|
||||
["rc-textarea", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:0.3.7"],
|
||||
["rc-trigger", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.2.10"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15506,7 +15536,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-overflow", "virtual:f3201355e275fc367612b99835082bfe45b71743479bb8e7dc6b1a0e6ec3b97ac5d71b86ce2047f12fdd63e0e5db39a42431dac4589da3fdb850f063190fb24a#npm:1.2.2"],
|
||||
["rc-trigger", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.2.10"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["shallowequal", "npm:1.1.0"]
|
||||
@ -15530,7 +15560,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-overflow", "virtual:f3201355e275fc367612b99835082bfe45b71743479bb8e7dc6b1a0e6ec3b97ac5d71b86ce2047f12fdd63e0e5db39a42431dac4589da3fdb850f063190fb24a#npm:1.2.2"],
|
||||
["rc-trigger", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.2.10"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["shallowequal", "npm:1.1.0"]
|
||||
@ -15560,7 +15590,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15590,7 +15620,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15620,7 +15650,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-resize-observer", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:1.2.0"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15681,7 +15711,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["dayjs", "npm:1.10.7"],
|
||||
["moment", "npm:2.29.1"],
|
||||
["rc-trigger", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.2.10"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["shallowequal", "npm:1.1.0"]
|
||||
@ -15711,7 +15741,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15740,7 +15770,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15769,7 +15799,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["resize-observer-polyfill", "npm:1.5.1"]
|
||||
@ -15802,7 +15832,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-overflow", "virtual:f3201355e275fc367612b99835082bfe45b71743479bb8e7dc6b1a0e6ec3b97ac5d71b86ce2047f12fdd63e0e5db39a42431dac4589da3fdb850f063190fb24a#npm:1.2.2"],
|
||||
["rc-trigger", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.2.10"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["rc-virtual-list", "virtual:d0ef4ef4df8c18d930d669f36c367285d6797d2976508bea42f22f1b9ec914504bc240ade5dc2e1948c03a2acd136deb6f35e8e33b5236018dd4348224dd538a#npm:3.4.2"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
@ -15833,7 +15863,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-tooltip", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.1.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["shallowequal", "npm:1.1.0"]
|
||||
@ -15863,7 +15893,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15892,7 +15922,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15922,7 +15952,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-resize-observer", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:1.2.0"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["shallowequal", "npm:1.1.0"]
|
||||
@ -15955,7 +15985,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["rc-dropdown", "virtual:6177bf62ab342574edbf06853562f14ff0b0d4374742901464f5854325cb786053de94a4bdd4f1901a8f06b14b9e1cd8aa9d26d5858f1f39508db3264a529fcb#npm:3.3.0"],
|
||||
["rc-menu", "virtual:9b08d0103ed0c41ecbb29b80c7f0952f56690458541bdc3b40a8f6e2141ab5571d8e667fc0cbc7e816e99c60fd695931aea6d23c3e10f2a63ed283fcb22856fc#npm:9.3.2"],
|
||||
["rc-resize-observer", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:1.2.0"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -15985,7 +16015,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-resize-observer", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:1.2.0"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"],
|
||||
["shallowequal", "npm:1.1.0"]
|
||||
@ -16051,7 +16081,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["rc-virtual-list", "virtual:d0ef4ef4df8c18d930d669f36c367285d6797d2976508bea42f22f1b9ec914504bc240ade5dc2e1948c03a2acd136deb6f35e8e33b5236018dd4348224dd538a#npm:3.4.2"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
@ -16073,7 +16103,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["rc-virtual-list", "virtual:d0ef4ef4df8c18d930d669f36c367285d6797d2976508bea42f22f1b9ec914504bc240ade5dc2e1948c03a2acd136deb6f35e8e33b5236018dd4348224dd538a#npm:3.4.2"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
@ -16105,7 +16135,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-select", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:14.0.0-alpha.26"],
|
||||
["rc-tree", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:5.3.8"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -16136,7 +16166,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-align", "virtual:a0cde20e0292ef25046285d3616cd7818b95042e3e1ad7ee881431733a28b26e007e8954fb488816772fc720a44a1a192eb293856137e3207c3ad080e640b018#npm:4.0.11"],
|
||||
["rc-motion", "virtual:f494f6d4e058cb1c8a3b456f6099aff9bd740d65abfc014377b7a3f1e34fcb35eb64a962e127c8bfbedaa0555175b6f2cdc47011e32e2fb5f081d7d32f526c78#npm:2.4.4"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -16165,7 +16195,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
@ -16186,10 +16216,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
],
|
||||
"linkType": "SOFT",
|
||||
}],
|
||||
["virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0", {
|
||||
"packageLocation": "./.yarn/__virtual__/rc-util-virtual-c6747a1499/0/cache/rc-util-npm-5.17.0-4477bf5307-c6f083742e.zip/node_modules/rc-util/",
|
||||
["virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0", {
|
||||
"packageLocation": "./.yarn/__virtual__/rc-util-virtual-5738260a62/0/cache/rc-util-npm-5.17.0-4477bf5307-c6f083742e.zip/node_modules/rc-util/",
|
||||
"packageDependencies": [
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["@babel/runtime", "npm:7.16.7"],
|
||||
["@types/react", null],
|
||||
["@types/react-dom", null],
|
||||
@ -16223,7 +16253,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/react-dom", null],
|
||||
["classnames", "npm:2.3.1"],
|
||||
["rc-resize-observer", "virtual:caddce747241c88958e039daadd2596eb7c11034e7ef35655f4f28f4496d3c6f1fc47b71417570ca9d8f270e1029349bbe942266aaa5cde8b29aef95b1038892#npm:1.2.0"],
|
||||
["rc-util", "virtual:168cfd14dd9e71b0423112848f69380ff1f0f5dffd5be83d150031464f8b398ca894fd5b87337ea7fc74ec2ed290ef92e6bd13f03f172c30eabf0a35fb94d97e#npm:5.17.0"],
|
||||
["rc-util", "virtual:7e3863ece061dda54214da8dfaaa3f3663891078cb856975c7f9148a6d7b3bd1799941ca573699ce564591ced647a40f68190f57334e0215ccb39d95b04e29d6#npm:5.17.0"],
|
||||
["react", "npm:17.0.2"],
|
||||
["react-dom", "virtual:573fe255dffc9c89f4f7aa60da718603753ee98acc55d6772bbd0ebdcf07f9183fb8e54b4f3f2246c538a14ead402db8d2e076039c667d1538702638a0cc87b8#npm:17.0.2"]
|
||||
],
|
||||
|
@ -17,7 +17,7 @@
|
||||
import { nunjucksFunction } from '@lowdefy/nunjucks';
|
||||
|
||||
const template = `@import '@lowdefy/layout/style.less';
|
||||
@import '@lowdefy/block-utils/style.less';
|
||||
@import '@lowdefy/client/style.less';
|
||||
{% for style in styles -%}
|
||||
@import '{{ style }}';
|
||||
{% endfor -%}
|
||||
|
@ -38,7 +38,7 @@ pages:
|
||||
title: Welcome to your Lowdefy app
|
||||
subTitle: We are excited to see what you are going to build
|
||||
icon:
|
||||
name: AiTwoToneHeart
|
||||
name: AiOutlineHeart
|
||||
color: '#f00'
|
||||
areas:
|
||||
extra:
|
||||
|
0
packages/client/CHANGELOG.md
Normal file
0
packages/client/CHANGELOG.md
Normal file
3
packages/client/README.md
Normal file
3
packages/client/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# @lowdefy/client
|
||||
|
||||
Lowdefy Client
|
16
packages/client/jest.config.js
Normal file
16
packages/client/jest.config.js
Normal file
@ -0,0 +1,16 @@
|
||||
export default {
|
||||
clearMocks: true,
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: ['src/**/*.js'],
|
||||
coverageDirectory: 'coverage',
|
||||
coveragePathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test', '<rootDir>/src/index.js'],
|
||||
coverageReporters: [['lcov', { projectRoot: '../..' }], 'text', 'clover'],
|
||||
errorOnDeprecated: true,
|
||||
testEnvironment: 'jsdom',
|
||||
testPathIgnorePatterns: ['<rootDir>/dist/', '<rootDir>/src/test'],
|
||||
transform: {
|
||||
'^.+\\.(t|j)sx?$': ['@swc/jest', { configFile: '../../.swcrc.test' }],
|
||||
'\\.yaml$': 'jest-transform-yaml',
|
||||
},
|
||||
snapshotSerializers: ['@emotion/jest/serializer', 'jest-serializer-html'],
|
||||
};
|
70
packages/client/package.json
Normal file
70
packages/client/package.json
Normal file
@ -0,0 +1,70 @@
|
||||
{
|
||||
"name": "@lowdefy/client",
|
||||
"version": "4.0.0-alpha.8",
|
||||
"license": "Apache-2.0",
|
||||
"description": "Lowdefy Client",
|
||||
"homepage": "https://lowdefy.com",
|
||||
"keywords": [
|
||||
"lowdefy"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/lowdefy/lowdefy/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Sam Tolmay",
|
||||
"url": "https://github.com/SamTolmay"
|
||||
},
|
||||
{
|
||||
"name": "Gerrie van Wyk",
|
||||
"url": "https://github.com/Gervwyk"
|
||||
}
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/lowdefy/lowdefy.git"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": "./dist/index.js",
|
||||
"./*": "./dist/*"
|
||||
},
|
||||
"files": [
|
||||
"dist/*"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "yarn swc",
|
||||
"clean": "rm -rf dist",
|
||||
"copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
|
||||
"prepare": "yarn build",
|
||||
"swc": "swc src --out-dir dist --config-file ../../.swcrc --delete-dir-on-start && yarn copyfiles",
|
||||
"test:watch": "jest --coverage --watch",
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "4.7.0",
|
||||
"@lowdefy/block-utils": "4.0.0-alpha.8",
|
||||
"@lowdefy/engine": "4.0.0-alpha.8",
|
||||
"@lowdefy/helpers": "4.0.0-alpha.8",
|
||||
"@lowdefy/layout": "4.0.0-alpha.8",
|
||||
"classnames": "2.3.1",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@emotion/jest": "11.7.1",
|
||||
"@swc/cli": "0.1.55",
|
||||
"@swc/core": "1.2.135",
|
||||
"@swc/jest": "0.2.17",
|
||||
"@testing-library/dom": "8.11.3",
|
||||
"@testing-library/react": "13.0.0-alpha.4",
|
||||
"@testing-library/user-event": "14.0.0-alpha.14",
|
||||
"copyfiles": "2.4.1",
|
||||
"jest": "27.5.1",
|
||||
"jest-serializer-html": "7.1.0",
|
||||
"jest-transform-yaml": "1.0.0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
}
|
||||
}
|
@ -16,48 +16,36 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { urlQuery } from '@lowdefy/helpers';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
import Block from './block/Block.js';
|
||||
import Context from './Context.js';
|
||||
import Head from './Head.js';
|
||||
import ProgressBarController from './ProgressBarController.js';
|
||||
import Block from './block/Block.js';
|
||||
import setupLink from '../utils/setupLink.js';
|
||||
import createComponents from './createComponents.js';
|
||||
|
||||
const Page = ({ lowdefy, pageConfig, rootConfig }) => {
|
||||
const router = useRouter();
|
||||
lowdefy._internal.window = window;
|
||||
lowdefy._internal.document = document;
|
||||
lowdefy._internal.router = router;
|
||||
lowdefy._internal.link = setupLink(lowdefy);
|
||||
lowdefy._internal.components = createComponents(lowdefy);
|
||||
import initLowdefyContext from './initLowdefyContext.js';
|
||||
|
||||
lowdefy.basePath = lowdefy._internal.router.basePath;
|
||||
lowdefy.home = rootConfig.home;
|
||||
lowdefy.lowdefyGlobal = rootConfig.lowdefyGlobal;
|
||||
lowdefy.menus = rootConfig.menus;
|
||||
lowdefy.pageId = pageConfig.pageId;
|
||||
lowdefy.urlQuery = urlQuery.parse(window.location.search.slice(1));
|
||||
const Client = ({ Components, config, router, stage, types, window }) => {
|
||||
const lowdefy = initLowdefyContext({ Components, config, router, types, stage, window });
|
||||
|
||||
return (
|
||||
<ProgressBarController
|
||||
id="page-loader"
|
||||
key={pageConfig.id}
|
||||
key={config.pageConfig.id}
|
||||
ProgressBar={lowdefy._internal.blockComponents.ProgressBar}
|
||||
lowdefy={lowdefy}
|
||||
content={{
|
||||
content: (progress) => (
|
||||
<Context config={pageConfig} lowdefy={lowdefy} progress={progress}>
|
||||
<Context config={config.pageConfig} lowdefy={lowdefy} progress={progress}>
|
||||
{(context) => {
|
||||
return (
|
||||
<>
|
||||
<Head
|
||||
properties={context._internal.RootBlocks.map[pageConfig.id].eval.properties}
|
||||
Component={Components.Head}
|
||||
properties={
|
||||
context._internal.RootBlocks.map[config.pageConfig.id].eval.properties
|
||||
}
|
||||
/>
|
||||
<Block
|
||||
block={context._internal.RootBlocks.map[pageConfig.id]}
|
||||
block={context._internal.RootBlocks.map[config.pageConfig.id]}
|
||||
Blocks={context._internal.RootBlocks}
|
||||
context={context}
|
||||
lowdefy={lowdefy}
|
||||
@ -74,4 +62,4 @@ const Page = ({ lowdefy, pageConfig, rootConfig }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
||||
export default Client;
|
@ -15,13 +15,12 @@
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import Head from 'next/head';
|
||||
|
||||
const BindHead = ({ properties }) => {
|
||||
const BindHead = ({ Component, properties }) => {
|
||||
return (
|
||||
<Head>
|
||||
<Component>
|
||||
<title>{properties.title}</title>
|
||||
</Head>
|
||||
</Component>
|
||||
);
|
||||
};
|
||||
|
@ -16,9 +16,8 @@
|
||||
|
||||
import React, { useState } from 'react';
|
||||
|
||||
import { ErrorBoundary } from '@lowdefy/block-utils';
|
||||
|
||||
import CategorySwitch from './CategorySwitch.js';
|
||||
import ErrorBoundary from '../ErrorBoundary.js';
|
||||
import MountEvents from '../MountEvents.js';
|
||||
|
||||
const Block = ({
|
@ -18,10 +18,9 @@ import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import { omit, type } from '@lowdefy/helpers';
|
||||
import Icon from '@ant-design/icons';
|
||||
import { blockDefaultProps, makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import blockDefaultProps from './blockDefaultProps.js';
|
||||
import ErrorBoundary from './ErrorBoundary.js';
|
||||
import makeCssClass from './makeCssClass.js';
|
||||
|
||||
const lowdefyProps = [
|
||||
'actionLog',
|
@ -17,9 +17,9 @@
|
||||
import React from 'react';
|
||||
import { render, screen } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import createIcon from './createIcon.js';
|
||||
import makeCssClass from './makeCssClass.js';
|
||||
|
||||
const methods = {
|
||||
makeCssClass,
|
@ -1,9 +1,8 @@
|
||||
import React from 'react';
|
||||
import NextLink from 'next/link';
|
||||
import { createLink } from '@lowdefy/engine';
|
||||
import { type } from '@lowdefy/helpers';
|
||||
|
||||
const createLinkComponent = (lowdefy) => {
|
||||
const createLinkComponent = (lowdefy, Link) => {
|
||||
const backLink = ({ ariaLabel, children, className, id, rel }) => (
|
||||
<a
|
||||
id={id}
|
||||
@ -61,7 +60,7 @@ const createLinkComponent = (lowdefy) => {
|
||||
id={id}
|
||||
aria-label={ariaLabel}
|
||||
className={className}
|
||||
href={`${window.location.origin}${lowdefy.basePath}${pathname}${
|
||||
href={`${window.location.origin}${lowdefy._internal.router.basePath}${pathname}${
|
||||
query ? `?${query}` : ''
|
||||
}`}
|
||||
rel={rel || 'noopener noreferrer'}
|
||||
@ -72,11 +71,11 @@ const createLinkComponent = (lowdefy) => {
|
||||
);
|
||||
}
|
||||
return (
|
||||
<NextLink href={{ pathname, query }} replace={replace} scroll={scroll}>
|
||||
<Link href={{ pathname, query }} replace={replace} scroll={scroll}>
|
||||
<a id={id} aria-label={ariaLabel} className={className} rel={rel} onClick={setInput}>
|
||||
{type.isFunction(children) ? children(pageId || url || id) : children}
|
||||
</a>
|
||||
</NextLink>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
const noLink = ({ className, children, id }) => (
|
@ -14,15 +14,6 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import Head from 'next/head';
|
||||
import Client from './Client.js';
|
||||
|
||||
const BindHead = ({ properties }) => {
|
||||
return (
|
||||
<Head>
|
||||
<title>{properties.title}</title>
|
||||
</Head>
|
||||
);
|
||||
};
|
||||
|
||||
export default BindHead;
|
||||
export default Client;
|
66
packages/client/src/initLowdefyContext.js
Normal file
66
packages/client/src/initLowdefyContext.js
Normal file
@ -0,0 +1,66 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { urlQuery } from '@lowdefy/helpers';
|
||||
|
||||
import callRequest from './callRequest.js';
|
||||
import setupLink from './setupLink.js';
|
||||
import createLinkComponent from './createLinkComponent.js';
|
||||
import createIcon from './createIcon.js';
|
||||
|
||||
const lowdefy = {
|
||||
_internal: {
|
||||
callRequest,
|
||||
components: {},
|
||||
updaters: {},
|
||||
displayMessage: ({ content }) => {
|
||||
console.log(content);
|
||||
return () => undefined;
|
||||
},
|
||||
link: () => undefined,
|
||||
},
|
||||
contexts: {},
|
||||
inputs: {},
|
||||
lowdefyGlobal: {},
|
||||
};
|
||||
|
||||
function initLowdefyContext({ Components, config, router, stage, types, window }) {
|
||||
if (stage === 'dev') {
|
||||
window.lowdefy = lowdefy;
|
||||
}
|
||||
lowdefy.basePath = router.basePath;
|
||||
lowdefy.home = config.rootConfig.home || {};
|
||||
lowdefy.lowdefyGlobal = config.rootConfig.lowdefyGlobal;
|
||||
lowdefy.menus = config.rootConfig.menus;
|
||||
lowdefy.pageId = config.pageConfig.pageId;
|
||||
lowdefy.urlQuery = urlQuery.parse(window.location.search.slice(1));
|
||||
|
||||
lowdefy._internal.window = window;
|
||||
lowdefy._internal.document = window.document;
|
||||
lowdefy._internal.router = router;
|
||||
lowdefy._internal.link = setupLink(router, window);
|
||||
lowdefy._internal.updateBlock = (blockId) =>
|
||||
lowdefy._internal.updaters[blockId] && lowdefy._internal.updaters[blockId]();
|
||||
lowdefy._internal.components.Link = createLinkComponent(lowdefy, Components.Link);
|
||||
lowdefy._internal.components.Icon = createIcon(types.icons);
|
||||
lowdefy._internal.actions = types.actions;
|
||||
lowdefy._internal.blockComponents = types.blocks;
|
||||
lowdefy._internal.operators = types.operators;
|
||||
|
||||
return lowdefy;
|
||||
}
|
||||
|
||||
export default initLowdefyContext;
|
@ -16,8 +16,7 @@
|
||||
|
||||
import { createLink } from '@lowdefy/engine';
|
||||
|
||||
function setupLink(lowdefy) {
|
||||
const { router, window } = lowdefy._internal;
|
||||
function setupLink(router, window) {
|
||||
const backLink = () => router.back();
|
||||
const disabledLink = () => {};
|
||||
const newOriginLink = ({ url, query, newTab }) => {
|
||||
@ -31,7 +30,7 @@ function setupLink(lowdefy) {
|
||||
if (newTab) {
|
||||
return window
|
||||
.open(
|
||||
`${window.location.origin}${lowdefy.basePath}${pathname}${query ? `?${query}` : ''}`,
|
||||
`${window.location.origin}${router.basePath}${pathname}${query ? `?${query}` : ''}`,
|
||||
'_blank'
|
||||
)
|
||||
.focus();
|
||||
@ -46,7 +45,7 @@ function setupLink(lowdefy) {
|
||||
const noLink = () => {
|
||||
throw new Error(`Invalid Link.`);
|
||||
};
|
||||
return createLink({ backLink, disabledLink, lowdefy, newOriginLink, noLink, sameOriginLink });
|
||||
return createLink({ backLink, disabledLink, router, newOriginLink, noLink, sameOriginLink });
|
||||
}
|
||||
|
||||
export default setupLink;
|
@ -32,4 +32,4 @@ _ref:
|
||||
type: Statistic
|
||||
properties:
|
||||
value: 99.5
|
||||
prefixIcon: AiTwoToneAlert
|
||||
prefixIcon: AiOutlineAlert
|
||||
|
@ -137,7 +137,7 @@ _ref:
|
||||
subTitle: We are excited to see what you are going to build
|
||||
status: success
|
||||
icon:
|
||||
name: AiTwoToneHeart
|
||||
name: AiOutlineHeart
|
||||
color: '#f00'
|
||||
areas:
|
||||
extra:
|
||||
@ -203,7 +203,7 @@ _ref:
|
||||
title: Welcome to your Lowdefy app
|
||||
subTitle: We are excited to see what you are going to build
|
||||
icon:
|
||||
name: AiTwoToneHeart
|
||||
name: AiOutlineHeart
|
||||
color: '#f00'
|
||||
areas:
|
||||
extra:
|
||||
|
@ -16,7 +16,6 @@
|
||||
|
||||
import React from 'react';
|
||||
import { type } from '@lowdefy/helpers';
|
||||
import { ErrorBoundary } from '@lowdefy/block-utils';
|
||||
import { Area, BlockLayout, layoutParamsToArea } from '../../../src/index.js';
|
||||
|
||||
import Block from './Block.js';
|
||||
@ -112,24 +111,22 @@ const AutoBlock = ({ block, makeCssClass, highlightBorders }) => {
|
||||
|
||||
const BindAutoBlock = ({ block, state, makeCssClass, highlightBorders }) => {
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<Loading id={`${block.id}-loading`} showLoading>
|
||||
<BlockLayout
|
||||
id={`bl-${block.id}` + randomId()}
|
||||
highlightBorders={highlightBorders}
|
||||
layout={block.layout || {}}
|
||||
blockStyle={block.style}
|
||||
<Loading id={`${block.id}-loading`} showLoading>
|
||||
<BlockLayout
|
||||
id={`bl-${block.id}` + randomId()}
|
||||
highlightBorders={highlightBorders}
|
||||
layout={block.layout || {}}
|
||||
blockStyle={block.style}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
<AutoBlock
|
||||
block={block}
|
||||
state={state}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
<AutoBlock
|
||||
block={block}
|
||||
state={state}
|
||||
makeCssClass={makeCssClass}
|
||||
highlightBorders={highlightBorders}
|
||||
/>
|
||||
</BlockLayout>
|
||||
</Loading>
|
||||
</ErrorBoundary>
|
||||
highlightBorders={highlightBorders}
|
||||
/>
|
||||
</BlockLayout>
|
||||
</Loading>
|
||||
);
|
||||
};
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"default": "AiCloseCircleOutlined",
|
||||
"default": "AiOutlineCloseCircle",
|
||||
"description": "Name of icon to be displayed."
|
||||
},
|
||||
"rotate": {
|
||||
|
@ -16,40 +16,47 @@
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { urlQuery } from '@lowdefy/helpers';
|
||||
import { useRouter } from 'next/router';
|
||||
|
||||
import Page from './Page.js';
|
||||
import Reload from './Reload.js';
|
||||
import setPageId from '../utils/setPageId.js';
|
||||
import setupLink from '../utils/setupLink.js';
|
||||
import useRootConfig from '../utils/useRootConfig.js';
|
||||
import createComponents from './createComponents.js';
|
||||
import Head from 'next/head';
|
||||
import Link from 'next/link';
|
||||
|
||||
const App = ({ lowdefy }) => {
|
||||
import Reload from './Reload.js';
|
||||
import Page from './Page.js';
|
||||
import setPageId from './utils/setPageId.js';
|
||||
import useRootConfig from './utils/useRootConfig.js';
|
||||
|
||||
import actions from '../build/plugins/actions.js';
|
||||
import blocks from '../build/plugins/blocks.js';
|
||||
import icons from '../build/plugins/icons.js';
|
||||
import operators from '../build/plugins/operatorsClient.js';
|
||||
|
||||
import '../build/plugins/styles.less';
|
||||
|
||||
const App = () => {
|
||||
const router = useRouter();
|
||||
const { data: rootConfig } = useRootConfig(router.basePath);
|
||||
|
||||
window.lowdefy = lowdefy;
|
||||
|
||||
lowdefy._internal.router = router;
|
||||
lowdefy._internal.link = setupLink(lowdefy);
|
||||
lowdefy._internal.components = createComponents(lowdefy);
|
||||
|
||||
lowdefy.basePath = lowdefy._internal.router.basePath;
|
||||
lowdefy.home = rootConfig.home;
|
||||
lowdefy.lowdefyGlobal = rootConfig.lowdefyGlobal;
|
||||
lowdefy.menus = rootConfig.menus;
|
||||
lowdefy.urlQuery = urlQuery.parse(window.location.search.slice(1));
|
||||
|
||||
const redirect = setPageId(lowdefy);
|
||||
const { redirect, pageId } = setPageId(router);
|
||||
if (redirect) {
|
||||
lowdefy._internal.router.push(`/${lowdefy.pageId}`);
|
||||
router.push(`/${pageId}`);
|
||||
}
|
||||
|
||||
return (
|
||||
<Reload lowdefy={lowdefy}>
|
||||
<Page lowdefy={lowdefy} />
|
||||
<Reload basePath={router.basePath}>
|
||||
<Page
|
||||
Components={{ Head, Link }}
|
||||
config={{
|
||||
rootConfig,
|
||||
}}
|
||||
pageId={pageId}
|
||||
router={router}
|
||||
types={{
|
||||
actions,
|
||||
blocks,
|
||||
icons,
|
||||
operators,
|
||||
}}
|
||||
/>
|
||||
</Reload>
|
||||
);
|
||||
};
|
@ -14,16 +14,30 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { createIcon } from '@lowdefy/block-utils';
|
||||
import React from 'react';
|
||||
|
||||
import createLinkComponent from './createLinkComponent.js';
|
||||
import icons from '../../build/plugins/icons.js';
|
||||
import Client from '@lowdefy/client';
|
||||
import usePageConfig from './utils/usePageConfig.js';
|
||||
|
||||
const createComponents = (lowdefy) => {
|
||||
return {
|
||||
Link: createLinkComponent(lowdefy),
|
||||
Icon: createIcon(icons),
|
||||
};
|
||||
const Page = ({ Components, config, pageId, router, types }) => {
|
||||
const { data: pageConfig } = usePageConfig(pageId, router.basePath);
|
||||
if (!pageConfig) {
|
||||
router.replace(`/404`);
|
||||
return '';
|
||||
}
|
||||
return (
|
||||
<Client
|
||||
Components={Components}
|
||||
config={{
|
||||
...config,
|
||||
pageConfig,
|
||||
}}
|
||||
router={router}
|
||||
stage="dev"
|
||||
types={types}
|
||||
window={window}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default createComponents;
|
||||
export default Page;
|
@ -16,13 +16,13 @@
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
|
||||
import useMutateCache from '../utils/useMutateCache.js';
|
||||
import waitForRestartedServer from '../utils/waitForRestartedServer.js';
|
||||
import useMutateCache from './utils/useMutateCache.js';
|
||||
import waitForRestartedServer from './utils/waitForRestartedServer.js';
|
||||
|
||||
const Reload = ({ children, lowdefy }) => {
|
||||
const mutateCache = useMutateCache(lowdefy.basePath);
|
||||
const Reload = ({ children, basePath }) => {
|
||||
const mutateCache = useMutateCache(basePath);
|
||||
useEffect(() => {
|
||||
const sse = new EventSource(`${lowdefy.basePath}/api/reload`);
|
||||
const sse = new EventSource(`${basePath}/api/reload`);
|
||||
|
||||
sse.addEventListener('reload', () => {
|
||||
mutateCache();
|
||||
@ -31,7 +31,7 @@ const Reload = ({ children, lowdefy }) => {
|
||||
|
||||
sse.onerror = () => {
|
||||
sse.close();
|
||||
waitForRestartedServer(lowdefy);
|
||||
waitForRestartedServer(basePath);
|
||||
};
|
||||
return () => {
|
||||
sse.close();
|
@ -1,57 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import getContext from '@lowdefy/engine';
|
||||
|
||||
import MountEvents from './block/MountEvents.js';
|
||||
|
||||
const Context = ({ children, lowdefy, config }) => {
|
||||
const context = getContext({ config, lowdefy });
|
||||
|
||||
return (
|
||||
<MountEvents
|
||||
asyncEventName="onInitAsync"
|
||||
context={context}
|
||||
eventName="onInit"
|
||||
triggerEvent={({ name, context, async }) => {
|
||||
if (!async) {
|
||||
context._internal.update(); // TODO: do we need this?
|
||||
context._internal.State.freezeState();
|
||||
}
|
||||
context._internal.RootBlocks.areas.root.blocks[0].triggerEvent({ name });
|
||||
}}
|
||||
>
|
||||
{(loadingOnInit) => {
|
||||
if (loadingOnInit) return ''; // TODO: handle onInit Loader
|
||||
return (
|
||||
<MountEvents
|
||||
asyncEventName="onEnterAsync"
|
||||
context={context}
|
||||
eventName="onEnter"
|
||||
triggerEvent={({ name, context }) =>
|
||||
context._internal.RootBlocks.areas.root.blocks[0].triggerEvent({ name })
|
||||
}
|
||||
>
|
||||
{(loadingOnEnter) => children(context, loadingOnEnter)}
|
||||
</MountEvents>
|
||||
);
|
||||
}}
|
||||
</MountEvents>
|
||||
);
|
||||
};
|
||||
|
||||
export default Context;
|
@ -1,50 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import actions from '../../build/plugins/actions.js';
|
||||
import callRequest from '../utils/callRequest.js';
|
||||
import blockComponents from '../../build/plugins/blocks.js';
|
||||
import operators from '../../build/plugins/operatorsClient.js';
|
||||
|
||||
const LowdefyContext = ({ children, lowdefy }) => {
|
||||
if (!lowdefy._internal) {
|
||||
lowdefy._internal = {
|
||||
actions,
|
||||
blockComponents,
|
||||
callRequest,
|
||||
components: {},
|
||||
document,
|
||||
operators,
|
||||
updaters: {},
|
||||
window,
|
||||
displayMessage: ({ content }) => {
|
||||
console.log(content);
|
||||
return () => undefined;
|
||||
},
|
||||
link: () => undefined,
|
||||
};
|
||||
lowdefy.contexts = {};
|
||||
lowdefy.inputs = {};
|
||||
lowdefy.lowdefyGlobal = {};
|
||||
}
|
||||
lowdefy._internal.updateBlock = (blockId) =>
|
||||
lowdefy._internal.updaters[blockId] && lowdefy._internal.updaters[blockId]();
|
||||
return <>{children}</>;
|
||||
};
|
||||
|
||||
export default LowdefyContext;
|
@ -1,54 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import Block from './block/Block.js';
|
||||
import Context from './Context.js';
|
||||
import Head from './Head.js';
|
||||
import usePageConfig from '../utils/usePageConfig.js';
|
||||
|
||||
const LoadingBlock = () => <div>Loading...</div>;
|
||||
|
||||
const Page = ({ lowdefy }) => {
|
||||
const { data: pageConfig } = usePageConfig(lowdefy.pageId, lowdefy.basePath);
|
||||
if (!pageConfig) {
|
||||
lowdefy._internal.router.replace(`/404`);
|
||||
return <LoadingBlock />;
|
||||
}
|
||||
return (
|
||||
<Context config={pageConfig} lowdefy={lowdefy}>
|
||||
{(context, loading) => {
|
||||
if (loading) {
|
||||
return <LoadingBlock />;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Head properties={context._internal.RootBlocks.map[pageConfig.id].eval.properties} />
|
||||
<Block
|
||||
block={context._internal.RootBlocks.map[pageConfig.id]}
|
||||
Blocks={context._internal.RootBlocks}
|
||||
context={context}
|
||||
lowdefy={lowdefy}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}}
|
||||
</Context>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
@ -1,57 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { Suspense, useState } from 'react';
|
||||
|
||||
import { ErrorBoundary } from '@lowdefy/block-utils';
|
||||
|
||||
import CategorySwitch from './CategorySwitch.js';
|
||||
import LoadingBlock from './LoadingBlock.js';
|
||||
import MountEvents from './MountEvents.js';
|
||||
|
||||
const Block = ({ block, Blocks, context, isRoot, lowdefy }) => {
|
||||
const [updates, setUpdate] = useState(0);
|
||||
lowdefy._internal.updaters[block.id] = () => setUpdate(updates + 1);
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<Suspense fallback={<LoadingBlock block={block} lowdefy={lowdefy} />}>
|
||||
<MountEvents
|
||||
asyncEventName="onMountAsync"
|
||||
context={context}
|
||||
eventName="onMount"
|
||||
triggerEvent={block.triggerEvent}
|
||||
>
|
||||
{(loading) =>
|
||||
loading ? (
|
||||
<LoadingBlock block={block} lowdefy={lowdefy} />
|
||||
) : (
|
||||
<CategorySwitch
|
||||
block={block}
|
||||
Blocks={Blocks}
|
||||
context={context}
|
||||
isRoot={isRoot}
|
||||
lowdefy={lowdefy}
|
||||
updates={updates}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</MountEvents>
|
||||
</Suspense>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
};
|
||||
|
||||
export default Block;
|
@ -1,115 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { BlockLayout } from '@lowdefy/layout';
|
||||
import { makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import Container from './Container.js';
|
||||
import List from './List.js';
|
||||
|
||||
const CategorySwitch = ({ block, Blocks, context, lowdefy }) => {
|
||||
if (!block.eval) return null; // Renderer updates before eval is executed for the first time on lists. See #520
|
||||
if (block.eval.visible === false)
|
||||
return <div id={`vs-${block.blockId}`} style={{ display: 'none' }} />;
|
||||
const Component = lowdefy._internal.blockComponents[block.type];
|
||||
switch (Component.meta.category) {
|
||||
case 'list':
|
||||
return (
|
||||
<List
|
||||
block={block}
|
||||
Blocks={Blocks}
|
||||
Component={Component}
|
||||
context={context}
|
||||
lowdefy={lowdefy}
|
||||
/>
|
||||
);
|
||||
case 'container':
|
||||
return (
|
||||
<Container
|
||||
block={block}
|
||||
Blocks={Blocks}
|
||||
Component={Component}
|
||||
context={context}
|
||||
lowdefy={lowdefy}
|
||||
/>
|
||||
);
|
||||
case 'input':
|
||||
return (
|
||||
<BlockLayout
|
||||
id={`bl-${block.blockId}`}
|
||||
blockStyle={block.eval.style}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
layout={block.eval.layout || {}}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
<Component
|
||||
methods={Object.assign(block.methods, {
|
||||
makeCssClass,
|
||||
registerEvent: block.registerEvent,
|
||||
registerMethod: block.registerMethod,
|
||||
setValue: block.setValue,
|
||||
triggerEvent: block.triggerEvent,
|
||||
})}
|
||||
basePath={lowdefy.basePath}
|
||||
blockId={block.blockId}
|
||||
components={lowdefy._internal.components}
|
||||
events={block.eval.events}
|
||||
key={block.blockId}
|
||||
menus={lowdefy.menus}
|
||||
pageId={lowdefy.pageId}
|
||||
properties={block.eval.properties}
|
||||
required={block.eval.required}
|
||||
user={lowdefy.user}
|
||||
validation={block.eval.validation}
|
||||
value={block.value}
|
||||
/>
|
||||
</BlockLayout>
|
||||
);
|
||||
default:
|
||||
return (
|
||||
<BlockLayout
|
||||
id={`bl-${block.blockId}`}
|
||||
blockStyle={block.eval.style}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
layout={block.eval.layout || {}}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
<Component
|
||||
methods={Object.assign(block.methods, {
|
||||
makeCssClass,
|
||||
registerEvent: block.registerEvent,
|
||||
registerMethod: block.registerMethod,
|
||||
triggerEvent: block.triggerEvent,
|
||||
})}
|
||||
basePath={lowdefy.basePath}
|
||||
blockId={block.blockId}
|
||||
components={lowdefy._internal.components}
|
||||
events={block.eval.events}
|
||||
key={block.blockId}
|
||||
menus={lowdefy.menus}
|
||||
pageId={lowdefy.pageId}
|
||||
properties={block.eval.properties}
|
||||
required={block.eval.required}
|
||||
user={lowdefy.user}
|
||||
validation={block.eval.validation}
|
||||
/>
|
||||
</BlockLayout>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
export default CategorySwitch;
|
@ -1,85 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Area, BlockLayout, layoutParamsToArea } from '@lowdefy/layout';
|
||||
import { makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import Block from './Block.js';
|
||||
|
||||
const Container = ({ block, Blocks, Component, context, lowdefy }) => {
|
||||
const content = {};
|
||||
// eslint-disable-next-line prefer-destructuring
|
||||
const areas = Blocks.subBlocks[block.id][0].areas;
|
||||
Object.keys(areas).forEach((areaKey, i) => {
|
||||
content[areaKey] = (areaStyle) => (
|
||||
<Area
|
||||
id={`ar-${block.blockId}-${areaKey}`}
|
||||
key={`ar-${block.blockId}-${areaKey}-${i}`}
|
||||
area={layoutParamsToArea({
|
||||
area: block.eval.areas[areaKey] || {},
|
||||
areaKey,
|
||||
layout: block.eval.layout || {},
|
||||
})}
|
||||
areaStyle={[areaStyle, block.eval.areas[areaKey] && block.eval.areas[areaKey].style]}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
{areas[areaKey].blocks.map((bl, k) => (
|
||||
<Block
|
||||
key={`co-${bl.blockId}-${k}`}
|
||||
Blocks={Blocks.subBlocks[block.id][0]}
|
||||
block={bl}
|
||||
context={context}
|
||||
lowdefy={lowdefy}
|
||||
/>
|
||||
))}
|
||||
</Area>
|
||||
);
|
||||
});
|
||||
return (
|
||||
<BlockLayout
|
||||
id={`bl-${block.blockId}`}
|
||||
blockStyle={block.eval.style}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
layout={block.eval.layout || {}}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
<Component
|
||||
methods={Object.assign(block.methods, {
|
||||
makeCssClass,
|
||||
registerEvent: block.registerEvent,
|
||||
registerMethod: block.registerMethod,
|
||||
triggerEvent: block.triggerEvent,
|
||||
})}
|
||||
basePath={lowdefy.basePath}
|
||||
blockId={block.blockId}
|
||||
components={lowdefy._internal.components}
|
||||
content={content}
|
||||
events={block.eval.events}
|
||||
key={block.blockId}
|
||||
menus={lowdefy.menus}
|
||||
pageId={lowdefy.pageId}
|
||||
properties={block.eval.properties}
|
||||
required={block.eval.required}
|
||||
user={lowdefy.user}
|
||||
validation={block.eval.validation}
|
||||
/>
|
||||
</BlockLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Container;
|
@ -1,92 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Area, BlockLayout, layoutParamsToArea } from '@lowdefy/layout';
|
||||
import { makeCssClass } from '@lowdefy/block-utils';
|
||||
|
||||
import Block from './Block.js';
|
||||
|
||||
const List = ({ block, Blocks, Component, context, lowdefy }) => {
|
||||
const content = {};
|
||||
const contentList = [];
|
||||
Blocks.subBlocks[block.id].forEach((SBlock) => {
|
||||
Object.keys(SBlock.areas).forEach((areaKey) => {
|
||||
content[areaKey] = (areaStyle) => (
|
||||
<Area
|
||||
id={`ar-${block.blockId}-${SBlock.id}-${areaKey}`}
|
||||
key={`ar-${block.blockId}-${SBlock.id}-${areaKey}`}
|
||||
area={layoutParamsToArea({
|
||||
area: block.eval.areas[areaKey] || {},
|
||||
areaKey,
|
||||
layout: block.eval.layout || {},
|
||||
})}
|
||||
areaStyle={[areaStyle, block.eval.areas[areaKey] && block.eval.areas[areaKey].style]}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
{SBlock.areas[areaKey].blocks.map((bl) => (
|
||||
<Block
|
||||
key={`ls-${bl.blockId}`}
|
||||
Blocks={SBlock}
|
||||
block={bl}
|
||||
context={context}
|
||||
lowdefy={lowdefy}
|
||||
/>
|
||||
))}
|
||||
</Area>
|
||||
);
|
||||
});
|
||||
contentList.push({ ...content });
|
||||
});
|
||||
return (
|
||||
<BlockLayout
|
||||
id={`bl-${block.blockId}`}
|
||||
blockStyle={block.eval.style}
|
||||
highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
layout={block.eval.layout || {}}
|
||||
makeCssClass={makeCssClass}
|
||||
>
|
||||
<Component
|
||||
methods={Object.assign(block.methods, {
|
||||
makeCssClass,
|
||||
moveItemDown: block.moveItemDown,
|
||||
moveItemUp: block.moveItemUp,
|
||||
pushItem: block.pushItem,
|
||||
registerEvent: block.registerEvent,
|
||||
registerMethod: block.registerMethod,
|
||||
removeItem: block.removeItem,
|
||||
triggerEvent: block.triggerEvent,
|
||||
unshiftItem: block.unshiftItem,
|
||||
})}
|
||||
basePath={lowdefy.basePath}
|
||||
blockId={block.blockId}
|
||||
components={lowdefy._internal.components}
|
||||
events={block.eval.events}
|
||||
key={block.blockId}
|
||||
list={contentList}
|
||||
menus={lowdefy.menus}
|
||||
pageId={lowdefy.pageId}
|
||||
properties={block.eval.properties}
|
||||
required={block.eval.required}
|
||||
user={lowdefy.user}
|
||||
validation={block.eval.validation}
|
||||
/>
|
||||
</BlockLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default List;
|
@ -1,22 +0,0 @@
|
||||
import React from 'react';
|
||||
// import { Loading, makeCssClass } from '@lowdefy/block-utils';
|
||||
// import { get } from '@lowdefy/helpers';
|
||||
// import { BlockLayout } from '@lowdefy/layout';
|
||||
|
||||
const LoadingBlock = ({ block, lowdefy }) => (
|
||||
<div>LoadingBlock</div>
|
||||
// <BlockLayout
|
||||
// id={`bl-loading-${block.blockId}`}
|
||||
// blockStyle={get(block, 'eval.style') || get(block, 'meta.loading.style', { default: {} })}
|
||||
// highlightBorders={lowdefy.lowdefyGlobal.highlightBorders}
|
||||
// layout={get(block, 'eval.layout') || get(block, 'meta.loading.layout', { default: {} })}
|
||||
// makeCssClass={makeCssClass}
|
||||
// >
|
||||
// <Loading
|
||||
// properties={get(block, 'meta.loading.properties')}
|
||||
// type={get(block, 'meta.loading.type')}
|
||||
// />
|
||||
// </BlockLayout>
|
||||
);
|
||||
|
||||
export default LoadingBlock;
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
|
||||
const MountEvents = ({ asyncEventName, context, eventName, triggerEvent, children }) => {
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState(null);
|
||||
useEffect(() => {
|
||||
let mounted = true;
|
||||
const mount = async () => {
|
||||
try {
|
||||
await triggerEvent({ name: eventName, context });
|
||||
if (mounted) {
|
||||
triggerEvent({ name: asyncEventName, context, async: true });
|
||||
setLoading(false);
|
||||
}
|
||||
} catch (err) {
|
||||
setError(err);
|
||||
}
|
||||
};
|
||||
mount();
|
||||
return () => {
|
||||
mounted = false;
|
||||
};
|
||||
}, [context]);
|
||||
|
||||
if (error) throw error;
|
||||
|
||||
return <>{children(loading)}</>;
|
||||
};
|
||||
|
||||
export default MountEvents;
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { createIcon } from '@lowdefy/block-utils';
|
||||
|
||||
import createLinkComponent from './createLinkComponent.js';
|
||||
import icons from '../../build/plugins/icons.js';
|
||||
|
||||
const createComponents = (lowdefy) => {
|
||||
return {
|
||||
Link: createLinkComponent(lowdefy),
|
||||
Icon: createIcon(icons),
|
||||
};
|
||||
};
|
||||
|
||||
export default createComponents;
|
@ -1,97 +0,0 @@
|
||||
import React from 'react';
|
||||
import NextLink from 'next/link';
|
||||
import { createLink } from '@lowdefy/engine';
|
||||
import { type } from '@lowdefy/helpers';
|
||||
|
||||
const createLinkComponent = (lowdefy) => {
|
||||
const backLink = ({ ariaLabel, children, className, id, rel }) => (
|
||||
<a
|
||||
id={id}
|
||||
onClick={() => lowdefy._internal.router.back()}
|
||||
className={className}
|
||||
rel={rel}
|
||||
aria-label={ariaLabel || 'back'}
|
||||
>
|
||||
{type.isFunction(children) ? children(id) : children}
|
||||
</a>
|
||||
);
|
||||
const newOriginLink = ({
|
||||
ariaLabel,
|
||||
children,
|
||||
className,
|
||||
id,
|
||||
newTab,
|
||||
pageId,
|
||||
query,
|
||||
rel,
|
||||
url,
|
||||
}) => {
|
||||
return (
|
||||
<a
|
||||
id={id}
|
||||
aria-label={ariaLabel}
|
||||
className={className}
|
||||
href={`${url}${query ? `?${query}` : ''}`}
|
||||
rel={rel || (newTab && 'noopener noreferrer')}
|
||||
target={newTab && '_blank'}
|
||||
>
|
||||
{type.isFunction(children) ? children(pageId || url || id) : children}
|
||||
</a>
|
||||
);
|
||||
};
|
||||
const sameOriginLink = ({
|
||||
ariaLabel,
|
||||
children,
|
||||
className,
|
||||
id,
|
||||
newTab,
|
||||
pageId,
|
||||
pathname,
|
||||
query,
|
||||
rel,
|
||||
replace,
|
||||
scroll,
|
||||
setInput,
|
||||
url,
|
||||
}) => {
|
||||
if (newTab) {
|
||||
return (
|
||||
// eslint-disable-next-line react/jsx-no-target-blank
|
||||
<a
|
||||
id={id}
|
||||
aria-label={ariaLabel}
|
||||
className={className}
|
||||
href={`${window.location.origin}${lowdefy.basePath}${pathname}${
|
||||
query ? `?${query}` : ''
|
||||
}`}
|
||||
rel={rel || 'noopener noreferrer'}
|
||||
target="_blank"
|
||||
>
|
||||
{type.isFunction(children) ? children(pageId || url || id) : children}
|
||||
</a>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<NextLink href={{ pathname, query }} replace={replace} scroll={scroll}>
|
||||
<a id={id} aria-label={ariaLabel} className={className} rel={rel} onClick={setInput}>
|
||||
{type.isFunction(children) ? children(pageId || url || id) : children}
|
||||
</a>
|
||||
</NextLink>
|
||||
);
|
||||
};
|
||||
const noLink = ({ className, children, id }) => (
|
||||
<span id={id} className={className}>
|
||||
{type.isFunction(children) ? children(id) : children}
|
||||
</span>
|
||||
);
|
||||
return createLink({
|
||||
backLink,
|
||||
lowdefy,
|
||||
newOriginLink,
|
||||
sameOriginLink,
|
||||
noLink,
|
||||
disabledLink: noLink,
|
||||
});
|
||||
};
|
||||
|
||||
export default createLinkComponent;
|
@ -14,20 +14,17 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
function setPageId(lowdefy) {
|
||||
if (lowdefy._internal.router.pathname === `/404`) {
|
||||
lowdefy.pageId = '404';
|
||||
return false;
|
||||
function setPageId(router, rootConfig) {
|
||||
if (router.pathname === `/404`) {
|
||||
return { redirect: false, pageId: '404' };
|
||||
}
|
||||
if (!lowdefy._internal.router.query.pageId) {
|
||||
lowdefy.pageId = lowdefy.home.pageId;
|
||||
if (lowdefy.home.configured === false) {
|
||||
return true;
|
||||
if (!router.query.pageId) {
|
||||
if (rootConfig.home.configured === false) {
|
||||
return { redirect: true, pageId: rootConfig.home.pageId };
|
||||
}
|
||||
return false;
|
||||
return { redirect: false, pageId: rootConfig.home.pageId };
|
||||
}
|
||||
lowdefy.pageId = lowdefy._internal.router.query.pageId;
|
||||
return false;
|
||||
return { redirect: false, pageId: router.query.pageId };
|
||||
}
|
||||
|
||||
export default setPageId;
|
@ -1,27 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import request from './request.js';
|
||||
|
||||
function callRequest(apiContext, { pageId, payload, requestId }) {
|
||||
return request({
|
||||
url: `${apiContext.config.basePath}/api/request/${pageId}/${requestId}`,
|
||||
method: 'POST',
|
||||
body: { payload },
|
||||
});
|
||||
}
|
||||
|
||||
export default callRequest;
|
@ -28,6 +28,8 @@ async function request({ url, method = 'GET', body }) {
|
||||
if (!res.ok) {
|
||||
// TODO: check
|
||||
const body = await res.json();
|
||||
console.log(res);
|
||||
console.log(body);
|
||||
throw new Error(body.message || 'Request error');
|
||||
}
|
||||
return res.json();
|
||||
|
@ -1,52 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { createLink } from '@lowdefy/engine';
|
||||
|
||||
function setupLink(lowdefy) {
|
||||
const { router, window } = lowdefy._internal;
|
||||
const backLink = () => router.back();
|
||||
const disabledLink = () => {};
|
||||
const newOriginLink = ({ url, query, newTab }) => {
|
||||
if (newTab) {
|
||||
return window.open(`${url}${query ? `?${query}` : ''}`, '_blank').focus();
|
||||
} else {
|
||||
return window.location.assign(`${url}${query ? `?${query}` : ''}`);
|
||||
}
|
||||
};
|
||||
const sameOriginLink = ({ newTab, pathname, query, setInput }) => {
|
||||
if (newTab) {
|
||||
return window
|
||||
.open(
|
||||
`${window.location.origin}${lowdefy.basePath}${pathname}${query ? `?${query}` : ''}`,
|
||||
'_blank'
|
||||
)
|
||||
.focus();
|
||||
} else {
|
||||
setInput();
|
||||
return router.push({
|
||||
pathname,
|
||||
query,
|
||||
});
|
||||
}
|
||||
};
|
||||
const noLink = () => {
|
||||
throw new Error(`Invalid Link.`);
|
||||
};
|
||||
return createLink({ backLink, disabledLink, lowdefy, newOriginLink, noLink, sameOriginLink });
|
||||
}
|
||||
|
||||
export default setupLink;
|
@ -16,15 +16,15 @@
|
||||
|
||||
import request from './request.js';
|
||||
|
||||
function waitForRestartedServer(lowdefy) {
|
||||
function waitForRestartedServer(basePath) {
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
await request({
|
||||
url: `${lowdefy.basePath}/api/ping`,
|
||||
url: `${basePath}/api/ping`,
|
||||
});
|
||||
lowdefy._internal.window.location.reload();
|
||||
window.location.reload();
|
||||
} catch (error) {
|
||||
waitForRestartedServer(lowdefy);
|
||||
waitForRestartedServer(basePath);
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
|
@ -37,8 +37,8 @@
|
||||
"next": "next"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/actions-core": "4.0.0-alpha.8",
|
||||
"@lowdefy/api": "4.0.0-alpha.8",
|
||||
"@lowdefy/block-utils": "4.0.0-alpha.8",
|
||||
"@lowdefy/blocks-antd": "4.0.0-alpha.8",
|
||||
"@lowdefy/blocks-basic": "4.0.0-alpha.8",
|
||||
"@lowdefy/blocks-color-selectors": "4.0.0-alpha.8",
|
||||
@ -46,6 +46,7 @@
|
||||
"@lowdefy/blocks-loaders": "4.0.0-alpha.8",
|
||||
"@lowdefy/blocks-markdown": "4.0.0-alpha.8",
|
||||
"@lowdefy/build": "4.0.0-alpha.8",
|
||||
"@lowdefy/client": "4.0.0-alpha.8",
|
||||
"@lowdefy/connection-axios-http": "4.0.0-alpha.8",
|
||||
"@lowdefy/engine": "4.0.0-alpha.8",
|
||||
"@lowdefy/helpers": "4.0.0-alpha.8",
|
||||
|
@ -14,27 +14,14 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { Suspense } from 'react';
|
||||
import React from 'react';
|
||||
import dynamic from 'next/dynamic';
|
||||
|
||||
import { ErrorBoundary } from '@lowdefy/block-utils';
|
||||
|
||||
import LowdefyContext from '../lib/components/LowdefyContext.js';
|
||||
|
||||
// Must be in _app due to next specifications.
|
||||
import '../build/plugins/styles.less';
|
||||
|
||||
const lowdefy = {};
|
||||
|
||||
function App({ Component, pageProps }) {
|
||||
return (
|
||||
<Suspense fallback="">
|
||||
<ErrorBoundary>
|
||||
<LowdefyContext lowdefy={lowdefy}>
|
||||
<Component lowdefy={lowdefy} {...pageProps} />
|
||||
</LowdefyContext>
|
||||
</ErrorBoundary>
|
||||
</Suspense>
|
||||
);
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
|
||||
const DynamicApp = dynamic(() => Promise.resolve(App), {
|
||||
|
50
packages/server/lib/Page.js
Normal file
50
packages/server/lib/Page.js
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
|
||||
import { useRouter } from 'next/router';
|
||||
import Client from '@lowdefy/client';
|
||||
import Head from 'next/head';
|
||||
import Link from 'next/link';
|
||||
|
||||
import actions from '../build/plugins/actions.js';
|
||||
import blocks from '../build/plugins/blocks.js';
|
||||
import icons from '../build/plugins/icons.js';
|
||||
import operators from '../build/plugins/operatorsClient.js';
|
||||
|
||||
const Page = ({ pageConfig, rootConfig }) => {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<Client
|
||||
Components={{ Head, Link }}
|
||||
config={{
|
||||
pageConfig,
|
||||
rootConfig,
|
||||
}}
|
||||
router={router}
|
||||
types={{
|
||||
actions,
|
||||
blocks,
|
||||
icons,
|
||||
operators,
|
||||
}}
|
||||
window={window}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
Copyright 2020-2022 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import actions from '../../build/plugins/actions.js';
|
||||
import callRequest from '../utils/callRequest.js';
|
||||
import blockComponents from '../../build/plugins/blocks.js';
|
||||
import operators from '../../build/plugins/operatorsClient.js';
|
||||
|
||||
function initLowdefyContext() {
|
||||
const lowdefy = {
|
||||
_internal: {
|
||||
actions,
|
||||
blockComponents,
|
||||
callRequest,
|
||||
components: {},
|
||||
operators,
|
||||
updaters: {},
|
||||
displayMessage: ({ content }) => {
|
||||
console.log(content);
|
||||
return () => undefined;
|
||||
},
|
||||
link: () => undefined,
|
||||
},
|
||||
contexts: {},
|
||||
inputs: {},
|
||||
lowdefyGlobal: {},
|
||||
};
|
||||
lowdefy._internal.updateBlock = (blockId) =>
|
||||
lowdefy._internal.updaters[blockId] && lowdefy._internal.updaters[blockId]();
|
||||
return lowdefy;
|
||||
}
|
||||
|
||||
export default initLowdefyContext;
|
@ -40,13 +40,11 @@
|
||||
"next": "next"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lowdefy/actions-core": "4.0.0-alpha.8",
|
||||
"@lowdefy/api": "4.0.0-alpha.8",
|
||||
"@lowdefy/block-utils": "4.0.0-alpha.8",
|
||||
"@lowdefy/blocks-antd": "4.0.0-alpha.8",
|
||||
"@lowdefy/blocks-basic": "4.0.0-alpha.8",
|
||||
"@lowdefy/blocks-loaders": "4.0.0-alpha.8",
|
||||
"@lowdefy/engine": "4.0.0-alpha.8",
|
||||
"@lowdefy/client": "4.0.0-alpha.8",
|
||||
"@lowdefy/helpers": "4.0.0-alpha.8",
|
||||
"@lowdefy/layout": "4.0.0-alpha.8",
|
||||
"@lowdefy/node-utils": "4.0.0-alpha.8",
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
||||
|
||||
import Page from '../lib/components/Page.js';
|
||||
import Page from '../lib/Page.js';
|
||||
|
||||
export async function getStaticProps() {
|
||||
// TODO: get the right api context options
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
||||
|
||||
import Page from '../lib/components/Page.js';
|
||||
import Page from '../lib/Page.js';
|
||||
|
||||
export async function getServerSideProps(context) {
|
||||
const { pageId } = context.params;
|
||||
|
@ -16,20 +16,12 @@
|
||||
|
||||
import React from 'react';
|
||||
import dynamic from 'next/dynamic';
|
||||
import { ErrorBoundary } from '@lowdefy/block-utils';
|
||||
|
||||
import initLowdefyContext from '../lib/utils/initLowdefyContext.js';
|
||||
|
||||
// Must be in _app due to next specifications.
|
||||
import '../build/plugins/styles.less';
|
||||
|
||||
const lowdefy = initLowdefyContext();
|
||||
|
||||
function App({ Component, pageProps }) {
|
||||
return (
|
||||
<ErrorBoundary>
|
||||
<Component lowdefy={lowdefy} {...pageProps} />
|
||||
</ErrorBoundary>
|
||||
);
|
||||
return <Component {...pageProps} />;
|
||||
}
|
||||
|
||||
const DynamicApp = dynamic(() => Promise.resolve(App), {
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
import { createApiContext, getPageConfig, getRootConfig } from '@lowdefy/api';
|
||||
|
||||
import Page from '../lib/components/Page.js';
|
||||
import Page from '../lib/Page.js';
|
||||
|
||||
export async function getServerSideProps() {
|
||||
// TODO: is this build directory configurable from the cli?
|
||||
|
@ -43,10 +43,8 @@
|
||||
"test": "jest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ant-design/icons": "4.7.0",
|
||||
"@emotion/css": "11.7.1",
|
||||
"@lowdefy/helpers": "4.0.0-alpha.8",
|
||||
"classnames": "2.3.1",
|
||||
"dompurify": "2.3.5",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
|
@ -16,8 +16,6 @@
|
||||
|
||||
import blockDefaultProps from './blockDefaultProps.js';
|
||||
import blockSchema from './blockSchema.js';
|
||||
import createIcon from './createIcon.js';
|
||||
import ErrorBoundary from './ErrorBoundary.js';
|
||||
import HtmlComponent from './HtmlComponent.js';
|
||||
import makeCssClass from './makeCssClass.js';
|
||||
import mediaToCssObject from './mediaToCssObject.js';
|
||||
@ -26,8 +24,6 @@ import renderHtml from './renderHtml.js';
|
||||
export {
|
||||
blockDefaultProps,
|
||||
blockSchema,
|
||||
createIcon,
|
||||
ErrorBoundary,
|
||||
HtmlComponent,
|
||||
makeCssClass,
|
||||
mediaToCssObject,
|
||||
|
35
yarn.lock
35
yarn.lock
@ -2005,7 +2005,6 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@lowdefy/block-utils@workspace:packages/utils/block-utils"
|
||||
dependencies:
|
||||
"@ant-design/icons": 4.7.0
|
||||
"@emotion/css": 11.7.1
|
||||
"@emotion/jest": 11.7.1
|
||||
"@lowdefy/helpers": 4.0.0-alpha.8
|
||||
@ -2015,7 +2014,6 @@ __metadata:
|
||||
"@testing-library/dom": 8.11.3
|
||||
"@testing-library/react": 13.0.0-alpha.4
|
||||
"@testing-library/user-event": 14.0.0-alpha.14
|
||||
classnames: 2.3.1
|
||||
copyfiles: 2.4.1
|
||||
dompurify: 2.3.5
|
||||
jest: 27.5.1
|
||||
@ -2225,6 +2223,32 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@lowdefy/client@4.0.0-alpha.8, @lowdefy/client@workspace:packages/client":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@lowdefy/client@workspace:packages/client"
|
||||
dependencies:
|
||||
"@ant-design/icons": 4.7.0
|
||||
"@emotion/jest": 11.7.1
|
||||
"@lowdefy/block-utils": 4.0.0-alpha.8
|
||||
"@lowdefy/engine": 4.0.0-alpha.8
|
||||
"@lowdefy/helpers": 4.0.0-alpha.8
|
||||
"@lowdefy/layout": 4.0.0-alpha.8
|
||||
"@swc/cli": 0.1.55
|
||||
"@swc/core": 1.2.135
|
||||
"@swc/jest": 0.2.17
|
||||
"@testing-library/dom": 8.11.3
|
||||
"@testing-library/react": 13.0.0-alpha.4
|
||||
"@testing-library/user-event": 14.0.0-alpha.14
|
||||
classnames: 2.3.1
|
||||
copyfiles: 2.4.1
|
||||
jest: 27.5.1
|
||||
jest-serializer-html: 7.1.0
|
||||
jest-transform-yaml: 1.0.0
|
||||
react: 17.0.2
|
||||
react-dom: 17.0.2
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@lowdefy/connection-axios-http@4.0.0-alpha.8, @lowdefy/connection-axios-http@workspace:packages/plugins/connections/connection-axios-http":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@lowdefy/connection-axios-http@workspace:packages/plugins/connections/connection-axios-http"
|
||||
@ -2607,8 +2631,8 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@lowdefy/server-dev@workspace:packages/server-dev"
|
||||
dependencies:
|
||||
"@lowdefy/actions-core": 4.0.0-alpha.8
|
||||
"@lowdefy/api": 4.0.0-alpha.8
|
||||
"@lowdefy/block-utils": 4.0.0-alpha.8
|
||||
"@lowdefy/blocks-antd": 4.0.0-alpha.8
|
||||
"@lowdefy/blocks-basic": 4.0.0-alpha.8
|
||||
"@lowdefy/blocks-color-selectors": 4.0.0-alpha.8
|
||||
@ -2616,6 +2640,7 @@ __metadata:
|
||||
"@lowdefy/blocks-loaders": 4.0.0-alpha.8
|
||||
"@lowdefy/blocks-markdown": 4.0.0-alpha.8
|
||||
"@lowdefy/build": 4.0.0-alpha.8
|
||||
"@lowdefy/client": 4.0.0-alpha.8
|
||||
"@lowdefy/connection-axios-http": 4.0.0-alpha.8
|
||||
"@lowdefy/engine": 4.0.0-alpha.8
|
||||
"@lowdefy/helpers": 4.0.0-alpha.8
|
||||
@ -2650,14 +2675,12 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@lowdefy/server@workspace:packages/server"
|
||||
dependencies:
|
||||
"@lowdefy/actions-core": 4.0.0-alpha.8
|
||||
"@lowdefy/api": 4.0.0-alpha.8
|
||||
"@lowdefy/block-utils": 4.0.0-alpha.8
|
||||
"@lowdefy/blocks-antd": 4.0.0-alpha.8
|
||||
"@lowdefy/blocks-basic": 4.0.0-alpha.8
|
||||
"@lowdefy/blocks-loaders": 4.0.0-alpha.8
|
||||
"@lowdefy/build": 4.0.0-alpha.8
|
||||
"@lowdefy/engine": 4.0.0-alpha.8
|
||||
"@lowdefy/client": 4.0.0-alpha.8
|
||||
"@lowdefy/helpers": 4.0.0-alpha.8
|
||||
"@lowdefy/layout": 4.0.0-alpha.8
|
||||
"@lowdefy/node-utils": 4.0.0-alpha.8
|
||||
|
Loading…
x
Reference in New Issue
Block a user