@wavemaker-ai/react-codegen 1.0.0-rc.647469
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-react-web.js +149 -0
- package/build-react-web.js.map +1 -0
- package/command.js +101 -0
- package/command.js.map +1 -0
- package/index.js +122 -0
- package/index.js.map +1 -0
- package/package-lock.json +4353 -0
- package/package.json +86 -0
- package/src/app.generator.js +1272 -0
- package/src/app.generator.js.map +1 -0
- package/src/download-packages.js +193 -0
- package/src/download-packages.js.map +1 -0
- package/src/fomatter.js +20 -0
- package/src/fomatter.js.map +1 -0
- package/src/gen-app-override-css.js +379 -0
- package/src/gen-app-override-css.js.map +1 -0
- package/src/genappoverridecssold-file.js +311 -0
- package/src/genappoverridecssold-file.js.map +1 -0
- package/src/handlebar-helpers.js +399 -0
- package/src/handlebar-helpers.js.map +1 -0
- package/src/increment-builder.js +85 -0
- package/src/increment-builder.js.map +1 -0
- package/src/profiles/profile.js +24 -0
- package/src/profiles/profile.js.map +1 -0
- package/src/profiles/web-preview.profile.js +15 -0
- package/src/profiles/web-preview.profile.js.map +1 -0
- package/src/project.service.js +314 -0
- package/src/project.service.js.map +1 -0
- package/src/transpile/bind.ex.transformer.js +226 -0
- package/src/transpile/bind.ex.transformer.js.map +1 -0
- package/src/transpile/components/advanced/carousel-template.transformer.js +16 -0
- package/src/transpile/components/advanced/carousel-template.transformer.js.map +1 -0
- package/src/transpile/components/advanced/carousel.transformer.js +55 -0
- package/src/transpile/components/advanced/carousel.transformer.js.map +1 -0
- package/src/transpile/components/advanced/login.transformer.js +26 -0
- package/src/transpile/components/advanced/login.transformer.js.map +1 -0
- package/src/transpile/components/advanced/marquee.transformer.js +16 -0
- package/src/transpile/components/advanced/marquee.transformer.js.map +1 -0
- package/src/transpile/components/basic/anchor.transformer.js +13 -0
- package/src/transpile/components/basic/anchor.transformer.js.map +1 -0
- package/src/transpile/components/basic/audio.transformer.js +16 -0
- package/src/transpile/components/basic/audio.transformer.js.map +1 -0
- package/src/transpile/components/basic/html.transformer.js +15 -0
- package/src/transpile/components/basic/html.transformer.js.map +1 -0
- package/src/transpile/components/basic/icon.transformer.js +16 -0
- package/src/transpile/components/basic/icon.transformer.js.map +1 -0
- package/src/transpile/components/basic/iframe.transformer.js +16 -0
- package/src/transpile/components/basic/iframe.transformer.js.map +1 -0
- package/src/transpile/components/basic/label.transformer.js +16 -0
- package/src/transpile/components/basic/label.transformer.js.map +1 -0
- package/src/transpile/components/basic/message.transformer.js +16 -0
- package/src/transpile/components/basic/message.transformer.js.map +1 -0
- package/src/transpile/components/basic/picture.transformer.js +22 -0
- package/src/transpile/components/basic/picture.transformer.js.map +1 -0
- package/src/transpile/components/basic/progress-bar.transformer.js +18 -0
- package/src/transpile/components/basic/progress-bar.transformer.js.map +1 -0
- package/src/transpile/components/basic/progress-circle.transformer.js +16 -0
- package/src/transpile/components/basic/progress-circle.transformer.js.map +1 -0
- package/src/transpile/components/basic/richtexteditor.transformer.js +21 -0
- package/src/transpile/components/basic/richtexteditor.transformer.js.map +1 -0
- package/src/transpile/components/basic/search.transformer.js +68 -0
- package/src/transpile/components/basic/search.transformer.js.map +1 -0
- package/src/transpile/components/basic/spinner.transformer.js +16 -0
- package/src/transpile/components/basic/spinner.transformer.js.map +1 -0
- package/src/transpile/components/basic/tree.transformer.js +16 -0
- package/src/transpile/components/basic/tree.transformer.js.map +1 -0
- package/src/transpile/components/basic/video.transformer.js +16 -0
- package/src/transpile/components/basic/video.transformer.js.map +1 -0
- package/src/transpile/components/chart/chart.transformer.js +13 -0
- package/src/transpile/components/chart/chart.transformer.js.map +1 -0
- package/src/transpile/components/container/accordion-pane.transformer.js +34 -0
- package/src/transpile/components/container/accordion-pane.transformer.js.map +1 -0
- package/src/transpile/components/container/accordion.transformer.js +49 -0
- package/src/transpile/components/container/accordion.transformer.js.map +1 -0
- package/src/transpile/components/container/container.transformer.js +27 -0
- package/src/transpile/components/container/container.transformer.js.map +1 -0
- package/src/transpile/components/container/layout-grid/grid-column.transformer.js +16 -0
- package/src/transpile/components/container/layout-grid/grid-column.transformer.js.map +1 -0
- package/src/transpile/components/container/layout-grid/grid-row.transformer.js +16 -0
- package/src/transpile/components/container/layout-grid/grid-row.transformer.js.map +1 -0
- package/src/transpile/components/container/layout-grid/grid.transformer.js +16 -0
- package/src/transpile/components/container/layout-grid/grid.transformer.js.map +1 -0
- package/src/transpile/components/container/linear-layout/linear-layout-item.js +16 -0
- package/src/transpile/components/container/linear-layout/linear-layout-item.js.map +1 -0
- package/src/transpile/components/container/linear-layout/linear-layout.js +16 -0
- package/src/transpile/components/container/linear-layout/linear-layout.js.map +1 -0
- package/src/transpile/components/container/panel-content.transformer.js +16 -0
- package/src/transpile/components/container/panel-content.transformer.js.map +1 -0
- package/src/transpile/components/container/panel-footer.transformer.js +11 -0
- package/src/transpile/components/container/panel-footer.transformer.js.map +1 -0
- package/src/transpile/components/container/panel.transformer.js +26 -0
- package/src/transpile/components/container/panel.transformer.js.map +1 -0
- package/src/transpile/components/container/repeat-template.transformer.js +16 -0
- package/src/transpile/components/container/repeat-template.transformer.js.map +1 -0
- package/src/transpile/components/container/tabheader.transformer.js +13 -0
- package/src/transpile/components/container/tabheader.transformer.js.map +1 -0
- package/src/transpile/components/container/tabpane.transformer.js +38 -0
- package/src/transpile/components/container/tabpane.transformer.js.map +1 -0
- package/src/transpile/components/container/tabs.transformer.js +105 -0
- package/src/transpile/components/container/tabs.transformer.js.map +1 -0
- package/src/transpile/components/container/tile.transformer.js +16 -0
- package/src/transpile/components/container/tile.transformer.js.map +1 -0
- package/src/transpile/components/container/wizard.transformer.js +81 -0
- package/src/transpile/components/container/wizard.transformer.js.map +1 -0
- package/src/transpile/components/container/wizardaction.transformer.js +120 -0
- package/src/transpile/components/container/wizardaction.transformer.js.map +1 -0
- package/src/transpile/components/container/wizardstep.transformer.js +74 -0
- package/src/transpile/components/container/wizardstep.transformer.js.map +1 -0
- package/src/transpile/components/data/card/card-actions.transformer.js +13 -0
- package/src/transpile/components/data/card/card-actions.transformer.js.map +1 -0
- package/src/transpile/components/data/card/card-content.transformer.js +23 -0
- package/src/transpile/components/data/card/card-content.transformer.js.map +1 -0
- package/src/transpile/components/data/card/card-footer.transformer.js +13 -0
- package/src/transpile/components/data/card/card-footer.transformer.js.map +1 -0
- package/src/transpile/components/data/card/card.transformer.js +13 -0
- package/src/transpile/components/data/card/card.transformer.js.map +1 -0
- package/src/transpile/components/data/form/dynamic-fields.transformer.js +24 -0
- package/src/transpile/components/data/form/dynamic-fields.transformer.js.map +1 -0
- package/src/transpile/components/data/form/form-action.transformer.js +145 -0
- package/src/transpile/components/data/form/form-action.transformer.js.map +1 -0
- package/src/transpile/components/data/form/form-body.transformer.js +16 -0
- package/src/transpile/components/data/form/form-body.transformer.js.map +1 -0
- package/src/transpile/components/data/form/form-field.transformer.js +443 -0
- package/src/transpile/components/data/form/form-field.transformer.js.map +1 -0
- package/src/transpile/components/data/form/form-footer.transformer.js +16 -0
- package/src/transpile/components/data/form/form-footer.transformer.js.map +1 -0
- package/src/transpile/components/data/form/form.transformer.js +167 -0
- package/src/transpile/components/data/form/form.transformer.js.map +1 -0
- package/src/transpile/components/data/form/util.js +70 -0
- package/src/transpile/components/data/form/util.js.map +1 -0
- package/src/transpile/components/data/list/list-content.transformer.js +35 -0
- package/src/transpile/components/data/list/list-content.transformer.js.map +1 -0
- package/src/transpile/components/data/list/list-template-transformer.js +13 -0
- package/src/transpile/components/data/list/list-template-transformer.js.map +1 -0
- package/src/transpile/components/data/list/list-transformer.js +308 -0
- package/src/transpile/components/data/list/list-transformer.js.map +1 -0
- package/src/transpile/components/data/live-filter-field.transformer.js +437 -0
- package/src/transpile/components/data/live-filter-field.transformer.js.map +1 -0
- package/src/transpile/components/data/livefilter.transformer.js +141 -0
- package/src/transpile/components/data/livefilter.transformer.js.map +1 -0
- package/src/transpile/components/data/liveform.transformer.js +160 -0
- package/src/transpile/components/data/liveform.transformer.js.map +1 -0
- package/src/transpile/components/data/table/live-table.transformer.js +15 -0
- package/src/transpile/components/data/table/live-table.transformer.js.map +1 -0
- package/src/transpile/components/data/table/table-action.transformer.js +29 -0
- package/src/transpile/components/data/table/table-action.transformer.js.map +1 -0
- package/src/transpile/components/data/table/table-column.transformer.js +121 -0
- package/src/transpile/components/data/table/table-column.transformer.js.map +1 -0
- package/src/transpile/components/data/table/table-group.transformer.js +16 -0
- package/src/transpile/components/data/table/table-group.transformer.js.map +1 -0
- package/src/transpile/components/data/table/table-row-action.transformer.js +34 -0
- package/src/transpile/components/data/table/table-row-action.transformer.js.map +1 -0
- package/src/transpile/components/data/table/table-row.transformer.js +33 -0
- package/src/transpile/components/data/table/table-row.transformer.js.map +1 -0
- package/src/transpile/components/data/table/table.transformer.js +64 -0
- package/src/transpile/components/data/table/table.transformer.js.map +1 -0
- package/src/transpile/components/data/table/utils.js +89 -0
- package/src/transpile/components/data/table/utils.js.map +1 -0
- package/src/transpile/components/dialogs/alert-dialog.transformer.js +16 -0
- package/src/transpile/components/dialogs/alert-dialog.transformer.js.map +1 -0
- package/src/transpile/components/dialogs/confirm-dialog.transformer.js +16 -0
- package/src/transpile/components/dialogs/confirm-dialog.transformer.js.map +1 -0
- package/src/transpile/components/dialogs/dialog-actions.transformer.js +57 -0
- package/src/transpile/components/dialogs/dialog-actions.transformer.js.map +1 -0
- package/src/transpile/components/dialogs/dialog-body.transformer.js +13 -0
- package/src/transpile/components/dialogs/dialog-body.transformer.js.map +1 -0
- package/src/transpile/components/dialogs/dialog.transformer.js +26 -0
- package/src/transpile/components/dialogs/dialog.transformer.js.map +1 -0
- package/src/transpile/components/dialogs/iframe-dialog.transformer.js +16 -0
- package/src/transpile/components/dialogs/iframe-dialog.transformer.js.map +1 -0
- package/src/transpile/components/dialogs/login-dialog.transformer.js +45 -0
- package/src/transpile/components/dialogs/login-dialog.transformer.js.map +1 -0
- package/src/transpile/components/dialogs/page-dialog.transformer.js +16 -0
- package/src/transpile/components/dialogs/page-dialog.transformer.js.map +1 -0
- package/src/transpile/components/element/html-transformer.js +9 -0
- package/src/transpile/components/element/html-transformer.js.map +1 -0
- package/src/transpile/components/form/button-group.transformer.js +16 -0
- package/src/transpile/components/form/button-group.transformer.js.map +1 -0
- package/src/transpile/components/form/button.transformer.js +27 -0
- package/src/transpile/components/form/button.transformer.js.map +1 -0
- package/src/transpile/components/form/rating.transformer.js +19 -0
- package/src/transpile/components/form/rating.transformer.js.map +1 -0
- package/src/transpile/components/input/calendar.transformer.js +13 -0
- package/src/transpile/components/input/calendar.transformer.js.map +1 -0
- package/src/transpile/components/input/checkbox-set.transformer.js +29 -0
- package/src/transpile/components/input/checkbox-set.transformer.js.map +1 -0
- package/src/transpile/components/input/checkbox.transformer.js +47 -0
- package/src/transpile/components/input/checkbox.transformer.js.map +1 -0
- package/src/transpile/components/input/chips.transformer.js +22 -0
- package/src/transpile/components/input/chips.transformer.js.map +1 -0
- package/src/transpile/components/input/color-picker.transformer.js +19 -0
- package/src/transpile/components/input/color-picker.transformer.js.map +1 -0
- package/src/transpile/components/input/composite.transformer.js +16 -0
- package/src/transpile/components/input/composite.transformer.js.map +1 -0
- package/src/transpile/components/input/currency.transformer.js +21 -0
- package/src/transpile/components/input/currency.transformer.js.map +1 -0
- package/src/transpile/components/input/epoch/date.transformer.js +16 -0
- package/src/transpile/components/input/epoch/date.transformer.js.map +1 -0
- package/src/transpile/components/input/epoch/datetime.transformer.js +16 -0
- package/src/transpile/components/input/epoch/datetime.transformer.js.map +1 -0
- package/src/transpile/components/input/epoch/time.transformer.js +16 -0
- package/src/transpile/components/input/epoch/time.transformer.js.map +1 -0
- package/src/transpile/components/input/file-upload.transformer.js +32 -0
- package/src/transpile/components/input/file-upload.transformer.js.map +1 -0
- package/src/transpile/components/input/number.transformer.js +20 -0
- package/src/transpile/components/input/number.transformer.js.map +1 -0
- package/src/transpile/components/input/radio-set.transformer.js +25 -0
- package/src/transpile/components/input/radio-set.transformer.js.map +1 -0
- package/src/transpile/components/input/rating.transformer.js +20 -0
- package/src/transpile/components/input/rating.transformer.js.map +1 -0
- package/src/transpile/components/input/select.transformer.js +57 -0
- package/src/transpile/components/input/select.transformer.js.map +1 -0
- package/src/transpile/components/input/slider.transformer.js +28 -0
- package/src/transpile/components/input/slider.transformer.js.map +1 -0
- package/src/transpile/components/input/switch.transformer.js +21 -0
- package/src/transpile/components/input/switch.transformer.js.map +1 -0
- package/src/transpile/components/input/text.transformer.js +21 -0
- package/src/transpile/components/input/text.transformer.js.map +1 -0
- package/src/transpile/components/input/textarea.transformer.js +19 -0
- package/src/transpile/components/input/textarea.transformer.js.map +1 -0
- package/src/transpile/components/input/upload.transformer.js +19 -0
- package/src/transpile/components/input/upload.transformer.js.map +1 -0
- package/src/transpile/components/layout/footer.transformer.js +31 -0
- package/src/transpile/components/layout/footer.transformer.js.map +1 -0
- package/src/transpile/components/layout/header.transformer.js +31 -0
- package/src/transpile/components/layout/header.transformer.js.map +1 -0
- package/src/transpile/components/layout/leftnav.transformer.js +31 -0
- package/src/transpile/components/layout/leftnav.transformer.js.map +1 -0
- package/src/transpile/components/layout/rightnav.transformer.js +31 -0
- package/src/transpile/components/layout/rightnav.transformer.js.map +1 -0
- package/src/transpile/components/layout/topnav.transformer.js +35 -0
- package/src/transpile/components/layout/topnav.transformer.js.map +1 -0
- package/src/transpile/components/nav/nav-item.transformer.js +25 -0
- package/src/transpile/components/nav/nav-item.transformer.js.map +1 -0
- package/src/transpile/components/nav/nav.transformer.js +69 -0
- package/src/transpile/components/nav/nav.transformer.js.map +1 -0
- package/src/transpile/components/nav/navbar.transformer.js +121 -0
- package/src/transpile/components/nav/navbar.transformer.js.map +1 -0
- package/src/transpile/components/navigation/breadcrumb.transformer.js +16 -0
- package/src/transpile/components/navigation/breadcrumb.transformer.js.map +1 -0
- package/src/transpile/components/navigation/menu.transformer.js +36 -0
- package/src/transpile/components/navigation/menu.transformer.js.map +1 -0
- package/src/transpile/components/navigation/popover.transformer.js +29 -0
- package/src/transpile/components/navigation/popover.transformer.js.map +1 -0
- package/src/transpile/components/page/content.transformer.js +17 -0
- package/src/transpile/components/page/content.transformer.js.map +1 -0
- package/src/transpile/components/page/page-content.transformer.js +17 -0
- package/src/transpile/components/page/page-content.transformer.js.map +1 -0
- package/src/transpile/components/page/page.transformer.js +50 -0
- package/src/transpile/components/page/page.transformer.js.map +1 -0
- package/src/transpile/components/page/partial-container.transformer.js +95 -0
- package/src/transpile/components/page/partial-container.transformer.js.map +1 -0
- package/src/transpile/components/page/partial.transformer.js +19 -0
- package/src/transpile/components/page/partial.transformer.js.map +1 -0
- package/src/transpile/components/prefab/prefab-container.transformer.js +32 -0
- package/src/transpile/components/prefab/prefab-container.transformer.js.map +1 -0
- package/src/transpile/components/prefab/prefab.transformer.js +85 -0
- package/src/transpile/components/prefab/prefab.transformer.js.map +1 -0
- package/src/transpile/components/transform-register.js +247 -0
- package/src/transpile/components/transform-register.js.map +1 -0
- package/src/transpile/components/utils.js +371 -0
- package/src/transpile/components/utils.js.map +1 -0
- package/src/transpile/components/wmx-component/wmx-component.transformer.js +35 -0
- package/src/transpile/components/wmx-component/wmx-component.transformer.js.map +1 -0
- package/src/transpile/id-generator.js +87 -0
- package/src/transpile/id-generator.js.map +1 -0
- package/src/transpile/property/base-parser.js +13 -0
- package/src/transpile/property/base-parser.js.map +1 -0
- package/src/transpile/property/property-parser.js +276 -0
- package/src/transpile/property/property-parser.js.map +1 -0
- package/src/transpile/property/show-in-device.parser.js +17 -0
- package/src/transpile/property/show-in-device.parser.js.map +1 -0
- package/src/transpile/style/background-image.parser.js +20 -0
- package/src/transpile/style/background-image.parser.js.map +1 -0
- package/src/transpile/style/border-width.parser.js +20 -0
- package/src/transpile/style/border-width.parser.js.map +1 -0
- package/src/transpile/style/dimension-style.parser.js +70 -0
- package/src/transpile/style/dimension-style.parser.js.map +1 -0
- package/src/transpile/style/horizontal-align.parser.js +24 -0
- package/src/transpile/style/horizontal-align.parser.js.map +1 -0
- package/src/transpile/style/margin.parser.js +20 -0
- package/src/transpile/style/margin.parser.js.map +1 -0
- package/src/transpile/style/multi-dimension-style.parser.js +29 -0
- package/src/transpile/style/multi-dimension-style.parser.js.map +1 -0
- package/src/transpile/style/numeric-style.parser.js +18 -0
- package/src/transpile/style/numeric-style.parser.js.map +1 -0
- package/src/transpile/style/padding.parser.js +20 -0
- package/src/transpile/style/padding.parser.js.map +1 -0
- package/src/transpile/style/style.parser.js +15 -0
- package/src/transpile/style/style.parser.js.map +1 -0
- package/src/transpile/style.transformer.js +124 -0
- package/src/transpile/style.transformer.js.map +1 -0
- package/src/transpile/transpile.js +1057 -0
- package/src/transpile/transpile.js.map +1 -0
- package/src/transpile/widget-inline-style-constants.js +200 -0
- package/src/transpile/widget-inline-style-constants.js.map +1 -0
- package/src/transpile/widget-inline-style-processor.js +714 -0
- package/src/transpile/widget-inline-style-processor.js.map +1 -0
- package/src/types/index.js +6 -0
- package/src/types/index.js.map +1 -0
- package/src/utils/grouping-util.js +500 -0
- package/src/utils/grouping-util.js.map +1 -0
- package/src/utils.js +934 -0
- package/src/utils.js.map +1 -0
- package/src/variables/variable.transformer.js +675 -0
- package/src/variables/variable.transformer.js.map +1 -0
- package/src/wmx.generator.js +216 -0
- package/src/wmx.generator.js.map +1 -0
- package/templates/.DS_Store +0 -0
- package/templates/app.style.template +3 -0
- package/templates/app.variables.template +1 -0
- package/templates/component/app.libs.hbs +38 -0
- package/templates/component/app.script.hbs +8 -0
- package/templates/component/app.template.hbs +47 -0
- package/templates/component/component.hbs +92 -0
- package/templates/component/component.props.template +1 -0
- package/templates/component/formatter.hbs +8 -0
- package/templates/component/layout.hbs +32 -0
- package/templates/component/page.hbs +16 -0
- package/templates/component/partial.hbs +78 -0
- package/templates/component/script.template +6 -0
- package/templates/component/style-def.template +18 -0
- package/templates/component/style.template +1 -0
- package/templates/entity-provider.template +21 -0
- package/templates/foundation/layout.tsx +30 -0
- package/templates/pages-config.template +12 -0
- package/templates/partial-config.template +58 -0
- package/templates/project/.DS_Store +0 -0
- package/templates/project/.env +1 -0
- package/templates/project/.gitignore +2 -0
- package/templates/project/.prettierrc +8 -0
- package/templates/project/README.md +60 -0
- package/templates/project/app/autoLayout.css +133 -0
- package/templates/project/app/client.layout.tsx +193 -0
- package/templates/project/app/components.css +186 -0
- package/templates/project/app/error.tsx +27 -0
- package/templates/project/app/globals.css +157 -0
- package/templates/project/app/layout.tsx +40 -0
- package/templates/project/app/loading.tsx +6 -0
- package/templates/project/app/page.tsx +3 -0
- package/templates/project/app/widgetInlineStylesOverride.css +676 -0
- package/templates/project/hooks/usePageEvents.tsx +45 -0
- package/templates/project/libs/appConfig.ts +14 -0
- package/templates/project/next-env.d.ts +5 -0
- package/templates/project/next.config.ts +17 -0
- package/templates/project/package-lock.json +5397 -0
- package/templates/project/package.json +38 -0
- package/templates/project/public/error-fallback.svg +89 -0
- package/templates/project/public/file.svg +1 -0
- package/templates/project/public/globe.svg +1 -0
- package/templates/project/public/next.svg +1 -0
- package/templates/project/public/vercel.svg +1 -0
- package/templates/project/public/window.svg +1 -0
- package/templates/project/scripts/app-custom-server.js +44 -0
- package/templates/project/scripts/getlibs.js +53 -0
- package/templates/project/tsconfig.json +36 -0
- package/templates/project/types/runtime-config.d.ts +9 -0
- package/templates/resource.resolver.template +20 -0
- package/templates/service.defs.template +3 -0
- package/templates/variables.template +252 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "generated-react-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"workspaces": [
|
|
6
|
+
"wmx-components/*"
|
|
7
|
+
],
|
|
8
|
+
"packageManager": "npm@10.9.2",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "next dev --turbo",
|
|
11
|
+
"local-build": "node scripts/getlibs.js && next dev",
|
|
12
|
+
"build": "next build",
|
|
13
|
+
"start": "next start",
|
|
14
|
+
"lint": "next lint"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"lodash": "4.17.21",
|
|
18
|
+
"moment": "2.30.1",
|
|
19
|
+
"next": "16.1.1",
|
|
20
|
+
"react": "19.2.3",
|
|
21
|
+
"react-dom": "19.2.3",
|
|
22
|
+
"@wavemaker-ai/app-runtime-wm-build": "1.0.0-rc.647469",
|
|
23
|
+
"@wavemaker-ai/react-runtime": "1.0.0-rc.647469",
|
|
24
|
+
"@wavemaker-ai/variables": "1.0.0-rc.647469",
|
|
25
|
+
"dotenv": "16.5.0",
|
|
26
|
+
"core-js": "3.46.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@types/node": "20",
|
|
30
|
+
"@types/react": "19.2.8",
|
|
31
|
+
"@types/react-dom": "19.2.3",
|
|
32
|
+
"typescript": "5",
|
|
33
|
+
"@types/core-js": "2.5.8",
|
|
34
|
+
"@vitejs/plugin-react": "5.1.1",
|
|
35
|
+
"vite": "7.3.1"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<!-- Scattered papers in background -->
|
|
3
|
+
<g opacity="0.6">
|
|
4
|
+
<!-- Paper 1 -->
|
|
5
|
+
<rect x="30" y="70" width="20" height="25" rx="2" fill="#ffffff" stroke="#dee2e6" stroke-width="1" transform="rotate(-15 40 82.5)"/>
|
|
6
|
+
<line x1="33" y1="75" x2="47" y2="75" stroke="#ced4da" stroke-width="1" transform="rotate(-15 40 82.5)"/>
|
|
7
|
+
<line x1="33" y1="78" x2="44" y2="78" stroke="#ced4da" stroke-width="1" transform="rotate(-15 40 82.5)"/>
|
|
8
|
+
<line x1="33" y1="81" x2="46" y2="81" stroke="#ced4da" stroke-width="1" transform="rotate(-15 40 82.5)"/>
|
|
9
|
+
|
|
10
|
+
<!-- Paper 2 -->
|
|
11
|
+
<rect x="150" y="60" width="18" height="22" rx="2" fill="#ffffff" stroke="#dee2e6" stroke-width="1" transform="rotate(20 159 71)"/>
|
|
12
|
+
<line x1="153" y1="65" x2="165" y2="65" stroke="#ced4da" stroke-width="1" transform="rotate(20 159 71)"/>
|
|
13
|
+
<line x1="153" y1="68" x2="162" y2="68" stroke="#ced4da" stroke-width="1" transform="rotate(20 159 71)"/>
|
|
14
|
+
<line x1="153" y1="71" x2="164" y2="71" stroke="#ced4da" stroke-width="1" transform="rotate(20 159 71)"/>
|
|
15
|
+
|
|
16
|
+
<!-- Paper 3 -->
|
|
17
|
+
<rect x="40" y="130" width="16" height="20" rx="2" fill="#ffffff" stroke="#dee2e6" stroke-width="1" transform="rotate(-25 48 140)"/>
|
|
18
|
+
<line x1="43" y1="134" x2="53" y2="134" stroke="#ced4da" stroke-width="1" transform="rotate(-25 48 140)"/>
|
|
19
|
+
<line x1="43" y1="137" x2="50" y2="137" stroke="#ced4da" stroke-width="1" transform="rotate(-25 48 140)"/>
|
|
20
|
+
|
|
21
|
+
<!-- Paper 4 -->
|
|
22
|
+
<rect x="140" y="125" width="22" height="18" rx="2" fill="#ffffff" stroke="#dee2e6" stroke-width="1" transform="rotate(10 151 134)"/>
|
|
23
|
+
<line x1="143" y1="129" x2="158" y2="129" stroke="#ced4da" stroke-width="1" transform="rotate(10 151 134)"/>
|
|
24
|
+
<line x1="143" y1="132" x2="155" y2="132" stroke="#ced4da" stroke-width="1" transform="rotate(10 151 134)"/>
|
|
25
|
+
<line x1="143" y1="135" x2="157" y2="135" stroke="#ced4da" stroke-width="1" transform="rotate(10 151 134)"/>
|
|
26
|
+
</g>
|
|
27
|
+
|
|
28
|
+
<!-- Exclamation mark -->
|
|
29
|
+
<g transform="translate(100, 35)">
|
|
30
|
+
<circle cx="0" cy="0" r="8" fill="#ffc107" opacity="0.9"/>
|
|
31
|
+
<text x="0" y="2" text-anchor="middle" font-family="Arial, sans-serif" font-size="12" font-weight="bold" fill="#856404">!</text>
|
|
32
|
+
|
|
33
|
+
<!-- Small motion lines around exclamation -->
|
|
34
|
+
<path d="M -12 -3 Q -8 -5 -4 -3" stroke="#ffc107" stroke-width="1" fill="none" opacity="0.7"/>
|
|
35
|
+
<path d="M 12 -3 Q 8 -5 4 -3" stroke="#ffc107" stroke-width="1" fill="none" opacity="0.7"/>
|
|
36
|
+
<path d="M -10 3 Q -6 1 -2 3" stroke="#ffc107" stroke-width="1" fill="none" opacity="0.7"/>
|
|
37
|
+
<path d="M 10 3 Q 6 1 2 3" stroke="#ffc107" stroke-width="1" fill="none" opacity="0.7"/>
|
|
38
|
+
</g>
|
|
39
|
+
|
|
40
|
+
<!-- Dog character -->
|
|
41
|
+
<g transform="translate(100, 120)">
|
|
42
|
+
<!-- Dog ears -->
|
|
43
|
+
<ellipse cx="-18" cy="-25" rx="8" ry="12" fill="#8e9aaf" transform="rotate(-20 -18 -25)"/>
|
|
44
|
+
<ellipse cx="18" cy="-25" rx="8" ry="12" fill="#8e9aaf" transform="rotate(20 18 -25)"/>
|
|
45
|
+
<ellipse cx="-16" cy="-23" rx="5" ry="8" fill="#6c757d" transform="rotate(-20 -16 -23)"/>
|
|
46
|
+
<ellipse cx="16" cy="-23" rx="5" ry="8" fill="#6c757d" transform="rotate(20 16 -23)"/>
|
|
47
|
+
|
|
48
|
+
<!-- Dog head -->
|
|
49
|
+
<circle cx="0" cy="-15" r="22" fill="#adb5bd"/>
|
|
50
|
+
<circle cx="0" cy="-15" r="20" fill="#ced4da"/>
|
|
51
|
+
|
|
52
|
+
<!-- Dog snout -->
|
|
53
|
+
<ellipse cx="0" cy="-8" rx="12" ry="8" fill="#dee2e6"/>
|
|
54
|
+
|
|
55
|
+
<!-- Dog nose -->
|
|
56
|
+
<ellipse cx="0" cy="-12" rx="3" ry="2" fill="#495057"/>
|
|
57
|
+
|
|
58
|
+
<!-- Dog eyes -->
|
|
59
|
+
<circle cx="-8" cy="-18" r="4" fill="#ffffff"/>
|
|
60
|
+
<circle cx="8" cy="-18" r="4" fill="#ffffff"/>
|
|
61
|
+
<circle cx="-7" cy="-18" r="2.5" fill="#495057"/>
|
|
62
|
+
<circle cx="9" cy="-18" r="2.5" fill="#495057"/>
|
|
63
|
+
|
|
64
|
+
<!-- Confused/worried eyebrows -->
|
|
65
|
+
<path d="M -12 -22 Q -8 -24 -4 -22" stroke="#6c757d" stroke-width="2" fill="none" stroke-linecap="round"/>
|
|
66
|
+
<path d="M 12 -22 Q 8 -24 4 -22" stroke="#6c757d" stroke-width="2" fill="none" stroke-linecap="round"/>
|
|
67
|
+
|
|
68
|
+
<!-- Dog mouth (worried expression) -->
|
|
69
|
+
<path d="M -4 -5 Q 0 -2 4 -5" stroke="#6c757d" stroke-width="2" fill="none" stroke-linecap="round"/>
|
|
70
|
+
|
|
71
|
+
<!-- Dog body (partially visible) -->
|
|
72
|
+
<ellipse cx="0" cy="15" rx="18" ry="12" fill="#ced4da"/>
|
|
73
|
+
|
|
74
|
+
<!-- Dog paws -->
|
|
75
|
+
<ellipse cx="-12" cy="25" rx="6" ry="4" fill="#adb5bd"/>
|
|
76
|
+
<ellipse cx="12" cy="25" rx="6" ry="4" fill="#adb5bd"/>
|
|
77
|
+
</g>
|
|
78
|
+
|
|
79
|
+
<!-- Paper in dog's mouth/paws -->
|
|
80
|
+
<g transform="translate(100, 135)">
|
|
81
|
+
<rect x="-8" y="-3" width="16" height="12" rx="1" fill="#ffffff" stroke="#dee2e6" stroke-width="1" transform="rotate(-5 0 3)"/>
|
|
82
|
+
<line x1="-6" y1="0" x2="6" y2="0" stroke="#ced4da" stroke-width="1" transform="rotate(-5 0 3)"/>
|
|
83
|
+
<line x1="-6" y1="3" x2="3" y2="3" stroke="#ced4da" stroke-width="1" transform="rotate(-5 0 3)"/>
|
|
84
|
+
<line x1="-6" y1="6" x2="5" y2="6" stroke="#ced4da" stroke-width="1" transform="rotate(-5 0 3)"/>
|
|
85
|
+
</g>
|
|
86
|
+
|
|
87
|
+
<!-- Ground line -->
|
|
88
|
+
<ellipse cx="100" cy="170" rx="40" ry="4" fill="#e9ecef" opacity="0.5"/>
|
|
89
|
+
</svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="M14.5 13.5V5.41a1 1 0 0 0-.3-.7L9.8.29A1 1 0 0 0 9.08 0H1.5v13.5A2.5 2.5 0 0 0 4 16h8a2.5 2.5 0 0 0 2.5-2.5m-1.5 0v-7H8v-5H3v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1M9.5 5V2.12L12.38 5zM5.13 5h-.62v1.25h2.12V5zm-.62 3h7.12v1.25H4.5zm.62 3h-.62v1.25h7.12V11z" clip-rule="evenodd" fill="#666" fill-rule="evenodd"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g clip-path="url(#a)"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.27 14.1a6.5 6.5 0 0 0 3.67-3.45q-1.24.21-2.7.34-.31 1.83-.97 3.1M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.48-1.52a7 7 0 0 1-.96 0H7.5a4 4 0 0 1-.84-1.32q-.38-.89-.63-2.08a40 40 0 0 0 3.92 0q-.25 1.2-.63 2.08a4 4 0 0 1-.84 1.31zm2.94-4.76q1.66-.15 2.95-.43a7 7 0 0 0 0-2.58q-1.3-.27-2.95-.43a18 18 0 0 1 0 3.44m-1.27-3.54a17 17 0 0 1 0 3.64 39 39 0 0 1-4.3 0 17 17 0 0 1 0-3.64 39 39 0 0 1 4.3 0m1.1-1.17q1.45.13 2.69.34a6.5 6.5 0 0 0-3.67-3.44q.65 1.26.98 3.1M8.48 1.5l.01.02q.41.37.84 1.31.38.89.63 2.08a40 40 0 0 0-3.92 0q.25-1.2.63-2.08a4 4 0 0 1 .85-1.32 7 7 0 0 1 .96 0m-2.75.4a6.5 6.5 0 0 0-3.67 3.44 29 29 0 0 1 2.7-.34q.31-1.83.97-3.1M4.58 6.28q-1.66.16-2.95.43a7 7 0 0 0 0 2.58q1.3.27 2.95.43a18 18 0 0 1 0-3.44m.17 4.71q-1.45-.12-2.69-.34a6.5 6.5 0 0 0 3.67 3.44q-.65-1.27-.98-3.1" fill="#666"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h16v16H0z"/></clipPath></defs></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1155 1000"><path d="m577.3 0 577.4 1000H0z" fill="#fff"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 2.5h13v10a1 1 0 0 1-1 1h-11a1 1 0 0 1-1-1zM0 1h16v11.5a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 0 12.5zm3.75 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5M7 4.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0m1.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5" fill="#666"/></svg>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const { spawn } = require('child_process');
|
|
4
|
+
const dotenv = require('dotenv');
|
|
5
|
+
|
|
6
|
+
console.log('Reading environment variables...');
|
|
7
|
+
|
|
8
|
+
const envFile = process.env.NODE_ENV ? `.env.${process.env.NODE_ENV}` : '.env';
|
|
9
|
+
|
|
10
|
+
console.log('Environment file name: ', envFile);
|
|
11
|
+
const envPath = path.resolve(process.cwd(), envFile);
|
|
12
|
+
|
|
13
|
+
let envVars = {};
|
|
14
|
+
if (fs.existsSync(envPath)) {
|
|
15
|
+
console.log(`Loading environment from ${envFile}`);
|
|
16
|
+
envVars = dotenv.parse(fs.readFileSync(envPath));
|
|
17
|
+
} else {
|
|
18
|
+
console.log(`${envFile} not found, using system environment variables`);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const combinedEnv = { ...envVars, ...process.env };
|
|
22
|
+
|
|
23
|
+
const publicDir = path.join(process.cwd(), 'public');
|
|
24
|
+
if (!fs.existsSync(publicDir)) {
|
|
25
|
+
fs.mkdirSync(publicDir, { recursive: true });
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
console.log('Generating runtime configuration...');
|
|
29
|
+
const runtimeConfig = {};
|
|
30
|
+
|
|
31
|
+
Object.keys(combinedEnv).forEach(key => {
|
|
32
|
+
if (key.startsWith('NEXT_PUBLIC_')) {
|
|
33
|
+
runtimeConfig[key] = combinedEnv[key];
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
console.log('runtimeConfig--->', runtimeConfig);
|
|
38
|
+
|
|
39
|
+
const configPath = path.join(publicDir, 'runtime-config.js');
|
|
40
|
+
const configContent = `window.__RUNTIME_CONFIG__ = ${JSON.stringify(
|
|
41
|
+
runtimeConfig
|
|
42
|
+
)};`;
|
|
43
|
+
fs.writeFileSync(configPath, configContent);
|
|
44
|
+
console.log('Runtime config generated with current environment values');
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const execSync = require('child_process').execSync;
|
|
4
|
+
|
|
5
|
+
const nextDir = path.resolve(__dirname, '../.next');
|
|
6
|
+
const yalcDir = path.resolve(__dirname, '../.yalc');
|
|
7
|
+
const nodeModulesDir = path.resolve(__dirname, '../node_modules');
|
|
8
|
+
const packageName = '@wavemaker-ai/react-runtime'; // Replace with your actual package name
|
|
9
|
+
|
|
10
|
+
// Function to delete a directory recursively
|
|
11
|
+
const deleteDirectory = dirPath => {
|
|
12
|
+
if (fs.existsSync(dirPath)) {
|
|
13
|
+
fs.readdirSync(dirPath).forEach(file => {
|
|
14
|
+
const curPath = path.join(dirPath, file);
|
|
15
|
+
if (fs.statSync(curPath).isDirectory()) {
|
|
16
|
+
deleteDirectory(curPath); // Recurse
|
|
17
|
+
} else {
|
|
18
|
+
fs.unlinkSync(curPath); // Delete file
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
fs.rmdirSync(dirPath); // Remove directory
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// Function to execute shell commands
|
|
26
|
+
const execCommand = command => {
|
|
27
|
+
try {
|
|
28
|
+
execSync(command, { stdio: 'inherit' });
|
|
29
|
+
} catch (error) {
|
|
30
|
+
console.error(`Error executing command: ${command}`);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// Main function
|
|
36
|
+
const main = () => {
|
|
37
|
+
try {
|
|
38
|
+
// Step 1: Clean up old directories (node_modules, .next, .yalc)
|
|
39
|
+
console.log('Cleaning up old directories...');
|
|
40
|
+
deleteDirectory(nextDir); // Clean .next
|
|
41
|
+
deleteDirectory(yalcDir); // Clean .yalc
|
|
42
|
+
deleteDirectory(path.join(nodeModulesDir, packageName)); // Clean specific package from node_modules
|
|
43
|
+
|
|
44
|
+
// Step 2: Run yalc update to sync the latest version
|
|
45
|
+
console.log('Running yalc update...');
|
|
46
|
+
execCommand(`yalc add ${packageName}`);
|
|
47
|
+
} catch (error) {
|
|
48
|
+
console.error('Failed to clean and update:', error);
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
main();
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": "./",
|
|
4
|
+
"target": "ES2017",
|
|
5
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
6
|
+
"allowJs": true,
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"esModuleInterop": true,
|
|
11
|
+
"module": "esnext",
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"jsx": "preserve",
|
|
16
|
+
"incremental": true,
|
|
17
|
+
"plugins": [
|
|
18
|
+
{
|
|
19
|
+
"name": "next"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"paths": {
|
|
23
|
+
"@/*": ["./*"],
|
|
24
|
+
"@wavemaker-ai/wmx-components": ["./wmx-components/index"]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"include": [
|
|
28
|
+
"next-env.d.ts",
|
|
29
|
+
"**/*.ts",
|
|
30
|
+
"**/*.tsx",
|
|
31
|
+
".next/types/**/*.ts",
|
|
32
|
+
"build/types/**/*.ts",
|
|
33
|
+
"types"
|
|
34
|
+
],
|
|
35
|
+
"exclude": ["node_modules"]
|
|
36
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { isString } from 'lodash';
|
|
2
|
+
import { isFullPathUrl } from '@wavemaker/app-rn-runtime/core/utils';
|
|
3
|
+
|
|
4
|
+
const resourceStore = {
|
|
5
|
+
{{#each resources}}
|
|
6
|
+
'{{this}}' : () => require('{{../path}}{{this}}'),
|
|
7
|
+
{{/each}}
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export default {
|
|
11
|
+
resolve: (path, baseUrl) => {
|
|
12
|
+
if (!isString(path)) {
|
|
13
|
+
return path;
|
|
14
|
+
}
|
|
15
|
+
if (baseUrl && !resourceStore[path] && !isFullPathUrl(path)) {
|
|
16
|
+
return baseUrl + (path.startsWith('/') ? '' : '/') + path;
|
|
17
|
+
}
|
|
18
|
+
return (resourceStore[path] && resourceStore[path]()) || path;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ModelVariable } from '@wavemaker-ai/react-runtime/variables/model-variable';
|
|
3
|
+
import { ServiceVariable } from '@wavemaker-ai/react-runtime/variables/service-variable';
|
|
4
|
+
import { NavigationAction } from '@wavemaker-ai/react-runtime/actions/navigation-action';
|
|
5
|
+
import {TimerAction} from '@wavemaker-ai/react-runtime/actions/timer-action'
|
|
6
|
+
import {NotificationAction} from '@wavemaker-ai/react-runtime/actions/notification-action'
|
|
7
|
+
import { LoginAction } from '@wavemaker-ai/react-runtime/actions/login-action';
|
|
8
|
+
import { LogoutAction } from '@wavemaker-ai/react-runtime/actions/logout-action';
|
|
9
|
+
import LiveVariable from '@wavemaker-ai/react-runtime/variables/live-variable';
|
|
10
|
+
import CrudVariable from "@wavemaker-ai/react-runtime/variables/crud-variable"
|
|
11
|
+
import {
|
|
12
|
+
getEntityPropertyMap,
|
|
13
|
+
getEntityRelatedTables,
|
|
14
|
+
} from '@/libs/metadata/entities/entity-provider';
|
|
15
|
+
{{#each imports}}
|
|
16
|
+
{{{this}}};
|
|
17
|
+
{{/each}}
|
|
18
|
+
|
|
19
|
+
export default ({{scope}}:any) => {
|
|
20
|
+
return {
|
|
21
|
+
{{#each context}}
|
|
22
|
+
{{@key}} : {
|
|
23
|
+
{{#each this}}
|
|
24
|
+
{{{quoteKeyIfHyphen name}}}: new ({{classname}} as any)({
|
|
25
|
+
name: '{{name}}',
|
|
26
|
+
_context: {{../../scope}},
|
|
27
|
+
{{#ifNotEmpty serviceType this}}
|
|
28
|
+
serviceType: '{{serviceType}}',
|
|
29
|
+
{{/ifNotEmpty}}
|
|
30
|
+
{{#ifNotEmpty operation this}}
|
|
31
|
+
operation: {{{stringify operation}}},
|
|
32
|
+
{{/ifNotEmpty}}
|
|
33
|
+
{{#ifNotEmpty service this}}
|
|
34
|
+
service: {{{stringify service}}},
|
|
35
|
+
{{/ifNotEmpty}}
|
|
36
|
+
{{#ifNotEmpty maxResults this}}
|
|
37
|
+
maxResults: '{{maxResults}}',
|
|
38
|
+
{{/ifNotEmpty}}
|
|
39
|
+
{{#ifNotEmpty operationId this}}
|
|
40
|
+
operationId: '{{operationId}}',
|
|
41
|
+
{{/ifNotEmpty}}
|
|
42
|
+
{{#ifNotEmpty operationType this}}
|
|
43
|
+
operationType: '{{operationType}}',
|
|
44
|
+
{{/ifNotEmpty}}
|
|
45
|
+
{{#ifNotEmpty controller this}}
|
|
46
|
+
controller: '{{controller}}',
|
|
47
|
+
{{/ifNotEmpty}}
|
|
48
|
+
{{#ifEquals name 'loggedInUser' this}}
|
|
49
|
+
paramProvider: () => App.appConfig.loggedInUser,
|
|
50
|
+
{{else}}
|
|
51
|
+
paramProvider: () => (
|
|
52
|
+
{{#ifEquals classname 'ModelVariable' this}}
|
|
53
|
+
{{{stringifyModelParams params ../../scope}}}
|
|
54
|
+
{{else}}
|
|
55
|
+
{{#ifEquals classname 'ServiceVariable' this}}
|
|
56
|
+
{{{stringify params}}}
|
|
57
|
+
{{else}}
|
|
58
|
+
{{#ifEquals classname 'LiveVariable' this}}
|
|
59
|
+
{{{stringify params}}}
|
|
60
|
+
{{else}}
|
|
61
|
+
{
|
|
62
|
+
{{#each params}}
|
|
63
|
+
'{{@key}}': {{{quoteIfString this}}},
|
|
64
|
+
{{/each}}
|
|
65
|
+
}
|
|
66
|
+
{{/ifEquals}}
|
|
67
|
+
{{/ifEquals}}
|
|
68
|
+
{{/ifEquals}}
|
|
69
|
+
),
|
|
70
|
+
{{/ifEquals}}
|
|
71
|
+
{{#ifNotEmpty filters this}}
|
|
72
|
+
filterProvider: () => (
|
|
73
|
+
{
|
|
74
|
+
{{#each filters}}
|
|
75
|
+
'{{@key}}': {{{quoteIfString this}}},
|
|
76
|
+
{{/each}}
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
{{/ifNotEmpty}}
|
|
80
|
+
{{#ifEquals classname 'ServiceVariable' this}}
|
|
81
|
+
{{#if ../../isPrefabApp}}
|
|
82
|
+
baseUrl: {{../../scope}}.baseUrl,
|
|
83
|
+
{{else}}
|
|
84
|
+
{{#if ../../isPrefabScope}}
|
|
85
|
+
baseUrl: {{../../scope}}.baseUrl + '/prefabs/' + {{../../scope}}.prefabname,
|
|
86
|
+
{{else}}
|
|
87
|
+
baseUrl: {{../../scope}}.baseUrl + '/services',
|
|
88
|
+
{{/if}}
|
|
89
|
+
{{/if}}
|
|
90
|
+
{{/ifEquals}}
|
|
91
|
+
{{#ifEquals classname 'NavigationAction' this}}
|
|
92
|
+
appConfig: {{../../scope}}.appConfig,
|
|
93
|
+
{{/ifEquals}}
|
|
94
|
+
{{#ifEquals classname 'LoginAction' this}}
|
|
95
|
+
baseURL: {{../../scope}}.appConfig.url,
|
|
96
|
+
securityService: () => {{../../scope}}.appConfig.SecurityService,
|
|
97
|
+
useDefaultSuccessHandler: {{useDefaultSuccessHandler}},
|
|
98
|
+
{{/ifEquals}}
|
|
99
|
+
{{#ifEquals classname 'LogoutAction' this}}
|
|
100
|
+
baseURL: {{../../scope}}.appConfig.url,
|
|
101
|
+
redirectTo: '{{redirectTo}}',
|
|
102
|
+
useDefaultSuccessHandler: {{useDefaultSuccessHandler}},
|
|
103
|
+
securityService: () => {{../../scope}}.appConfig.SecurityService,
|
|
104
|
+
{{/ifEquals}}
|
|
105
|
+
{{#ifEquals classname 'TimerAction' this}}
|
|
106
|
+
repeating: {{{stringify repeating}}},
|
|
107
|
+
delay: {{{stringify delay}}},
|
|
108
|
+
{{#if onTimerFire}}
|
|
109
|
+
onSuccess: (variable, data, options) => {
|
|
110
|
+
{{{onTimerFire}}}
|
|
111
|
+
},
|
|
112
|
+
{{/if}}
|
|
113
|
+
{{/ifEquals}}
|
|
114
|
+
{{#ifEquals classname 'NotificationAction' this}}
|
|
115
|
+
{{#if showDialog}}
|
|
116
|
+
showDialog: (options) => {
|
|
117
|
+
{{{showDialog}}}
|
|
118
|
+
},
|
|
119
|
+
{{/if}}
|
|
120
|
+
{{#if partialContent}}
|
|
121
|
+
partialContent: {
|
|
122
|
+
component: {{{partialContent.component}}}
|
|
123
|
+
},
|
|
124
|
+
{{/if}}
|
|
125
|
+
onOk: (variable, data, options) => {
|
|
126
|
+
{{{onOk}}}
|
|
127
|
+
},
|
|
128
|
+
{{#ifEquals operation 'confirm' this}}
|
|
129
|
+
onCancel: (variable, data, options) => {
|
|
130
|
+
{{{onCancel}}}
|
|
131
|
+
},
|
|
132
|
+
{{/ifEquals}}
|
|
133
|
+
{{#ifEquals operation 'toast' this}}
|
|
134
|
+
toasterService: () => {{../../scope}}.toaster,
|
|
135
|
+
{{/ifEquals}}
|
|
136
|
+
onClose: (variable, data, options) => {
|
|
137
|
+
{{{onClose}}}
|
|
138
|
+
},
|
|
139
|
+
{{/ifEquals}}
|
|
140
|
+
{{#ifEquals classname 'ServiceVariable' this}}
|
|
141
|
+
getServiceInfo: () => {{../../scope}}.serviceDefinitions['{{operationId}}']?.wmServiceOperationInfo,
|
|
142
|
+
orderBy: '{{orderBy}}',
|
|
143
|
+
isStaticParams: {{{stringify isStaticParams}}},
|
|
144
|
+
{{#if onBeforeUpdate}}
|
|
145
|
+
onBeforeUpdate: (variable, inputData, options) => {
|
|
146
|
+
return {{{onBeforeUpdate}}}
|
|
147
|
+
},
|
|
148
|
+
{{/if}}
|
|
149
|
+
{{/ifEquals}}
|
|
150
|
+
{{#if onSuccess}}
|
|
151
|
+
onSuccess: (variable, data, options) => {
|
|
152
|
+
{{{onSuccess}}}
|
|
153
|
+
},
|
|
154
|
+
{{/if}}
|
|
155
|
+
{{#if onError}}
|
|
156
|
+
onError: (variable, data, options) => {
|
|
157
|
+
{{{onError}}}
|
|
158
|
+
},
|
|
159
|
+
{{/if}}
|
|
160
|
+
{{#if onCanUpdate}}
|
|
161
|
+
onCanUpdate: (variable, data, options) => {
|
|
162
|
+
{{{onCanUpdate}}}
|
|
163
|
+
},
|
|
164
|
+
{{/if}}
|
|
165
|
+
{{#if onResult}}
|
|
166
|
+
onResult: (variable, data, options) => {
|
|
167
|
+
{{{onResult}}}
|
|
168
|
+
},
|
|
169
|
+
{{/if}}
|
|
170
|
+
{{#if onBeforeDatasetReady}}
|
|
171
|
+
onBeforeDatasetReady: (variable, data, options) => {
|
|
172
|
+
return {{{onBeforeDatasetReady}}}
|
|
173
|
+
},
|
|
174
|
+
{{/if}}
|
|
175
|
+
{{#if onOnline}}
|
|
176
|
+
onOnline: (variable, data, options) => {
|
|
177
|
+
return {{{onOnline}}}
|
|
178
|
+
},
|
|
179
|
+
{{/if}}
|
|
180
|
+
{{#if onOffline}}
|
|
181
|
+
onOffline: (variable, data, options) => {
|
|
182
|
+
return {{{onOffline}}}
|
|
183
|
+
},
|
|
184
|
+
{{/if}}
|
|
185
|
+
{{#if inFlightBehavior}}
|
|
186
|
+
inFlightBehavior: {{{stringify inFlightBehavior}}},
|
|
187
|
+
{{/if}}
|
|
188
|
+
{{#ifEquals isList true this}}
|
|
189
|
+
isList: {{isList}},
|
|
190
|
+
{{/ifEquals}}
|
|
191
|
+
{{#ifEquals twoWayBinding true this}}
|
|
192
|
+
twoWayBinding: {{twoWayBinding}},
|
|
193
|
+
{{/ifEquals}}
|
|
194
|
+
{{#if spinnerContext}}
|
|
195
|
+
spinnerContext: '{{spinnerContext}}',
|
|
196
|
+
{{/if}}
|
|
197
|
+
{{#if spinnerMessage}}
|
|
198
|
+
spinnerMessage: '{{spinnerMessage}}',
|
|
199
|
+
{{/if}}
|
|
200
|
+
{{#ifEquals classname 'CrudVariable' this}}
|
|
201
|
+
isStaticParams: {{{stringify isStaticParams}}},
|
|
202
|
+
saveInPhonegap: {{saveInPhonegap}},
|
|
203
|
+
crudOperationId: '{{crudOperationId}}',
|
|
204
|
+
transformationRequired: {{transformationRequired}},
|
|
205
|
+
{{#if ../../isPrefabScope}}
|
|
206
|
+
baseUrl: {{../../scope}}.baseUrl + '/prefabs/' + {{../../scope}}.prefabname,
|
|
207
|
+
{{else}}
|
|
208
|
+
baseUrl: {{../../scope}}.baseUrl,
|
|
209
|
+
{{/if}}
|
|
210
|
+
{{#if dataBinding}}
|
|
211
|
+
dataBinding: {{{dataBinding}}},
|
|
212
|
+
{{/if}}
|
|
213
|
+
{{/ifEquals}}
|
|
214
|
+
{{#ifEquals classname 'LiveVariable' this}}
|
|
215
|
+
isStaticParams: {{{stringify isStaticParams}}},
|
|
216
|
+
type: '{{type}}',
|
|
217
|
+
{{#ifEquals autoUpdate true this}}
|
|
218
|
+
autoUpdate: {{autoUpdate}},
|
|
219
|
+
{{/ifEquals}}
|
|
220
|
+
{{#if onBeforeUpdate}}
|
|
221
|
+
{{#ifEquals operation "read" this}}
|
|
222
|
+
onBeforeUpdate: (variable, dataFilter, options) => {
|
|
223
|
+
return {{{onBeforeUpdate}}}
|
|
224
|
+
},
|
|
225
|
+
{{else}}
|
|
226
|
+
onBeforeUpdate: (variable, inputData, options) => {
|
|
227
|
+
return {{{onBeforeUpdate}}}
|
|
228
|
+
},
|
|
229
|
+
{{/ifEquals}}
|
|
230
|
+
{{/if}}
|
|
231
|
+
liveSource: '{{liveSource}}',
|
|
232
|
+
baseUrl: {{../../scope}}.baseUrl,
|
|
233
|
+
orderBy: '{{orderBy}}',
|
|
234
|
+
propertiesMap: getEntityPropertyMap('{{liveSource}}', '{{type}}'),
|
|
235
|
+
relatedTables: getEntityRelatedTables('{{liveSource}}', '{{type}}'),
|
|
236
|
+
category: '{{category}}',
|
|
237
|
+
tableName: '{{tableName}}',
|
|
238
|
+
tableType: '{{tableType}}',
|
|
239
|
+
{{#if _id}}
|
|
240
|
+
_id: '{{_id}}',
|
|
241
|
+
{{/if}}
|
|
242
|
+
{{#ifNotEmpty filterExpressions this}}
|
|
243
|
+
filterExpressions: {{{stringify filterExpressions}}}
|
|
244
|
+
{{/ifNotEmpty}}
|
|
245
|
+
{{/ifEquals}}
|
|
246
|
+
|
|
247
|
+
}),
|
|
248
|
+
{{/each}}
|
|
249
|
+
},
|
|
250
|
+
{{/each}}
|
|
251
|
+
};
|
|
252
|
+
};
|