@nuraly/runtime 0.1.7 → 0.1.9
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/README.md +83 -765
- package/components/ui/components/Event/EventValue/EventValue.ts +13 -8
- package/components/ui/components/ToastContainer/ToastContainer.ts +1 -1
- package/components/ui/components/advanced/AIChat/AIChat.ts +1 -2
- package/components/ui/components/advanced/Collapse/Collapse.ts +5 -2
- package/components/ui/components/advanced/Collections/Collections.ts +2 -2
- package/components/ui/components/advanced/MicroApp/MicroApp.ts +3 -11
- package/components/ui/components/advanced/RefComponent/RefComponent.ts +2 -2
- package/components/ui/components/advanced/RichText/RichText.ts +5 -4
- package/components/ui/components/advanced/RichText/RichTextEditor.ts +0 -167
- package/components/ui/components/base/BaseElement/base-change-detection.ts +1 -5
- package/components/ui/components/base/BaseElement.ts +229 -610
- package/components/ui/components/base/FormRegisterable.ts +83 -0
- package/components/ui/components/base/controllers/DragDropController.ts +175 -0
- package/components/ui/components/base/controllers/ErrorController.ts +180 -0
- package/components/ui/components/base/controllers/EventController.ts +112 -0
- package/components/ui/components/base/controllers/InputHandlerController.ts +298 -0
- package/components/ui/components/base/controllers/SelectionController.ts +323 -0
- package/components/ui/components/base/controllers/StyleHandlerController.ts +286 -0
- package/components/ui/components/base/controllers/index.ts +11 -0
- package/components/ui/components/base/mixins/EditorModeMixin.ts +185 -0
- package/components/ui/components/base/mixins/index.ts +6 -0
- package/components/ui/components/base/types/base-element.types.ts +138 -0
- package/components/ui/components/base/types/index.ts +21 -0
- package/components/ui/components/base/utils/event-debouncer.ts +209 -0
- package/components/ui/components/base/utils/index.ts +11 -0
- package/components/ui/components/base/utils/style-cache.ts +94 -0
- package/components/ui/components/display/BoxModel/BoxModel.ts +177 -116
- package/components/ui/components/display/Code/Code.ts +40 -26
- package/components/ui/components/display/Divider/Divider.ts +2 -2
- package/components/ui/components/display/Icon/Icon.ts +2 -3
- package/components/ui/components/display/Image/Image.ts +72 -46
- package/components/ui/components/display/Tag/Tag.ts +2 -3
- package/components/ui/components/display/Video/Video.ts +91 -31
- package/components/ui/components/inputs/Button/Button.ts +2 -2
- package/components/ui/components/inputs/Checkbox/Checkbox.ts +14 -40
- package/components/ui/components/inputs/ColorPicker/colorpicker.ts +9 -4
- package/components/ui/components/inputs/DatePicker/DatePicker.ts +47 -25
- package/components/ui/components/inputs/Dropdown/Dropdown.ts +2 -2
- package/components/ui/components/inputs/Form/Form.style.ts +26 -0
- package/components/ui/components/inputs/Form/Form.ts +360 -0
- package/components/ui/components/inputs/IconPicker/IconPicker.ts +22 -18
- package/components/ui/components/inputs/InsertDropdown/InsertDropdown.ts +0 -20
- package/components/ui/components/inputs/NumberInput/NumberInput.ts +0 -4
- package/components/ui/components/inputs/RadioButton/Radio-button.ts +17 -13
- package/components/ui/components/inputs/Select/Select.ts +44 -24
- package/components/ui/components/inputs/TextInput/TextInput.ts +15 -9
- package/components/ui/components/inputs/Textarea/Textarea.ts +30 -30
- package/components/ui/components/inputs/UsersDropdown/UsersDropdown.ts +1 -1
- package/components/ui/components/layout/Card/Card.ts +112 -10
- package/components/ui/components/layout/Containers/Container.style.ts +18 -0
- package/components/ui/components/layout/Containers/Container.ts +11 -5
- package/components/ui/components/layout/Grid/Col.style.ts +27 -0
- package/components/ui/components/layout/Grid/Col.ts +213 -0
- package/components/ui/components/layout/Grid/Row.style.ts +73 -0
- package/components/ui/components/layout/Grid/Row.ts +170 -0
- package/components/ui/components/layout/Grid/index.ts +7 -0
- package/components/ui/components/layout/Panel/Panel.ts +2 -2
- package/components/ui/components/layout/Tabs/Tabs.ts +0 -1
- package/components/ui/components/navigation/EmbedURL/EmbedURL.ts +62 -26
- package/components/ui/components/navigation/Link/Link.ts +27 -16
- package/components/ui/components/navigation/Menu/Menu.ts +26 -48
- package/components/ui/components/runtime/MicroApp/MicroApp.ts +7 -147
- package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +6 -2
- package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +484 -0
- package/components/ui/components/studio/FunctionsPanel/index.ts +1 -0
- package/components/ui/components/utility/AccessRoles/AccessRoles.style.ts +242 -0
- package/components/ui/components/utility/AccessRoles/AccessRoles.ts +476 -0
- package/components/ui/components/utility/Border/Border.ts +0 -14
- package/components/ui/components/utility/BorderManager/BorderManager.style.ts +237 -0
- package/components/ui/components/utility/BorderManager/BorderManager.ts +503 -0
- package/components/ui/components/utility/BoxShadow/BoxShadow.ts +0 -16
- package/components/ui/components/utility/Document/Document.ts +54 -25
- package/components/ui/components/utility/Export-Import/Export-Import.ts +8 -7
- package/components/ui/components/utility/Handlers/Handlers.ts +14 -17
- package/components/ui/components/utility/ValidationRules/ValidationRules.ts +440 -0
- package/components/ui/components/wrappers/GenerikWrapper/DragWrapper/DragWrapper.ts +1 -0
- package/components/ui/components/wrappers/GenerikWrapper/GenerikWrapper.ts +1 -24
- package/components/ui/nuraly-ui/src/components/badge/badge.style.ts +4 -3
- package/components/ui/nuraly-ui/src/components/datepicker/datepicker.component.ts +2 -0
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.component.ts +12 -6
- package/components/ui/nuraly-ui/src/components/radio-group/radio-group.style.ts +23 -0
- package/dist/{index-B4yIOSMd.js → BaseElement-BNBn_IJk.js} +2920 -267
- package/dist/{CodeEditor-YsOapSut.js → CodeEditor-B1gNuvPb.js} +84127 -76319
- package/dist/{CodeEditor-BiNku87K.js → CodeEditor-Cpph-xRc.js} +7 -7
- package/dist/{abap-B2diVmjb.js → abap-D0Neqhq6.js} +91 -1
- package/dist/{apex-3NuJ-nsI.js → apex-B5LhxkeG.js} +18 -1
- package/dist/assets/editor.worker-DcwbJ0PV.js +12 -0
- package/dist/assets/html.worker-BTMxskjR.js +461 -0
- package/dist/assets/json.worker-D3vTGdf_.js +49 -0
- package/dist/assets/ts.worker-BsM1BXac.js +51334 -0
- package/dist/{azcli-XGXuUsMB.js → azcli-BrBH0QTU.js} +1 -1
- package/dist/{bat-B8Vhm634.js → bat-BfzAov64.js} +12 -1
- package/dist/{bicep-Cc8X5S_k.js → bicep-C3bCSWel.js} +1 -1
- package/dist/{cameligo-Bo3wBh9T.js → cameligo-sFL5plcd.js} +13 -1
- package/dist/{clojure-CPoQlpIK.js → clojure-CfeExRz0.js} +14 -1
- package/dist/{coffee-BxvTGz39.js → coffee-Xws5K0WL.js} +11 -1
- package/dist/{cpp-5RpEV7vC.js → cpp-CqOUEpxN.js} +28 -23
- package/dist/{csharp-slXXP3fo.js → csharp-DVLiBOZb.js} +13 -1
- package/dist/{csp-B98p6-gH.js → csp-DVFp9bw5.js} +3 -1
- package/dist/{css-BDsDSAin.js → css-DwARn2R6.js} +8 -1
- package/dist/cssMode-D82-gS78.js +1577 -0
- package/dist/{cypher-Dc4IMouD.js → cypher-uY0Mffat.js} +8 -1
- package/dist/{dart-LhvE3yD2.js → dart-D27H-mX_.js} +18 -1
- package/dist/{dockerfile-CwzplJeZ.js → dockerfile-CmV85WZK.js} +5 -1
- package/dist/{ecl-DxW3FiJi.js → ecl--fKn7yzB.js} +9 -1
- package/dist/{elixir-BI40g7TU.js → elixir-DUhH17ON.js} +87 -1
- package/dist/{flow9-tR2v0bGz.js → flow9-B3Dx2LLe.js} +8 -1
- package/dist/{freemarker2-Bfqhwyij.js → freemarker2-CYRLpyjt.js} +359 -7
- package/dist/{fsharp-BLAma0OT.js → fsharp-SyqBfUAR.js} +14 -1
- package/dist/{go-nYcD3y4Z.js → go-BbMR2tdT.js} +17 -1
- package/dist/{graphql-Dp1cHWmP.js → graphql-DDJE6tIl.js} +17 -1
- package/dist/{handlebars-DCgKNBmn.js → handlebars-R8Efxi60.js} +38 -4
- package/dist/{hcl-6NT8Kbna.js → hcl-YBvpaUqf.js} +13 -1
- package/dist/{html-C6wR7sMB.js → html-czhjovcp.js} +37 -4
- package/dist/htmlMode-DpyKDYYs.js +1587 -0
- package/dist/{ini-BZCOLrEc.js → ini-Ct73dBtM.js} +10 -1
- package/dist/{java-DAMcfJbX.js → java-C_jlkwoG.js} +18 -1
- package/dist/{javascript-D1L5MTmg.js → javascript-DwqkMEdb.js} +3 -2
- package/dist/jsonMode-Cmxxe0W9.js +2002 -0
- package/dist/{julia-CQ46G71H.js → julia-D8WE5U1e.js} +22 -1
- package/dist/{kotlin-CEjVo_6E.js → kotlin-Zy9aq5yB.js} +15 -1
- package/dist/{less-DreV99nP.js → less-sZ0iHtE8.js} +1 -1
- package/dist/{lexon-DBVJhqLb.js → lexon-CsdNL29A.js} +13 -1
- package/dist/{liquid-D_pDYIs1.js → liquid-2spuEcBh.js} +12 -4
- package/dist/{lua-Dcc_j6L-.js → lua-C2YJo0zw.js} +12 -1
- package/dist/{m3-B9SlZL4n.js → m3-CPLP40SG.js} +7 -1
- package/dist/{markdown-CuGw9_MP.js → markdown-B1mf5e0R.js} +34 -1
- package/dist/{mdx-CKsJ3cF4.js → mdx-BjBXyEeR.js} +2 -2
- package/dist/{micro-app-entry-xdTX5-ut.js → micro-app-entry-DYAnCRDo.js} +8132 -9649
- package/dist/micro-app.bundle.js +3 -3
- package/dist/micro-app.js +3565 -6710
- package/dist/{mips-BUWqP-OH.js → mips-DA33BZX1.js} +11 -1
- package/dist/{msdax-DtkouYCg.js → msdax-CCYFIQsP.js} +5 -1
- package/dist/{mysql-IkAsWSmF.js → mysql-hjmIjL-D.js} +11 -3
- package/dist/{objective-c-B2-ronfg.js → objective-c-RRCpEmqC.js} +2 -1
- package/dist/{pascal-Bsnz2eJA.js → pascal-CeV8XfxB.js} +13 -1
- package/dist/{pascaligo-D_sMUn0Q.js → pascaligo-IEEGVJAJ.js} +13 -1
- package/dist/{perl-BPzHt9SS.js → perl-B5-QbHq_.js} +34 -1
- package/dist/{pgsql-DlTJB0PD.js → pgsql-s6kqEJmi.js} +14 -4
- package/dist/{php-Dmq5OjwK.js → php-CWWqzOo8.js} +36 -1
- package/dist/{pla-HJcccrBy.js → pla-FSvb_YP_.js} +13 -1
- package/dist/{postiats-OQn6DKv-.js → postiats-DQdscQXO.js} +370 -1
- package/dist/{powerquery-DKaMYC8w.js → powerquery-CtA5JA1I.js} +7 -1
- package/dist/{powershell-DWeJHik1.js → powershell-DglEq96N.js} +13 -1
- package/dist/{protobuf-CBn_IseU.js → protobuf-BSepub3e.js} +5 -1
- package/dist/{pug-BoRpCINl.js → pug-B1847F4G.js} +16 -1
- package/dist/{python-zPpZYwLF.js → python-DLI1ji08.js} +59 -11
- package/dist/{qsharp-4rGyVZOw.js → qsharp-D4i0Nqg9.js} +28 -3
- package/dist/{r-DsgLhBOb.js → r-cdRigKxa.js} +5 -1
- package/dist/{razor-B_fCUeGX.js → razor-oAnIJsrL.js} +48 -4
- package/dist/{redis-B2fdL4Bg.js → redis-D9MFxvE8.js} +16 -6
- package/dist/{redshift-DoaeyCkH.js → redshift-CmCnsvL-.js} +13 -4
- package/dist/{restructuredtext-D-6OFBY9.js → restructuredtext-CWy8J51t.js} +19 -1
- package/dist/{ruby-D1DD6baV.js → ruby-WP-c36m5.js} +76 -3
- package/dist/runtime.js +34 -45
- package/dist/{rust-DssUV39M.js → rust-Q9FLdYpu.js} +13 -1
- package/dist/{sb-Dmb6tAdv.js → sb-C54-JBGT.js} +12 -1
- package/dist/{scala-Co3ETaym.js → scala-CzbFImc5.js} +24 -1
- package/dist/{scheme-CMrqXTty.js → scheme-BhfDmYN3.js} +1 -1
- package/dist/{scss-DkGudv8Q.js → scss-CEmiBXpS.js} +25 -1
- package/dist/{shell-BHN2BI4L.js → shell-Bmc1VhG0.js} +4 -1
- package/dist/{solidity-b-R-raGB.js → solidity-C9Q2I8Hh.js} +23 -1
- package/dist/{sophia-Y4GjyxNB.js → sophia-jWa1UyKz.js} +16 -1
- package/dist/{sparql-CDAPZb88.js → sparql-CM7jctbc.js} +15 -1
- package/dist/{sql-DkkpPiUq.js → sql-WzihTkbg.js} +42 -1
- package/dist/{st-CSPV91Ej.js → st-6y7_3aup.js} +8 -1
- package/dist/style.css +1 -1
- package/dist/{swift-DdSC5O48.js → swift-k-0zxG_D.js} +4 -1
- package/dist/{systemverilog-CI03XpAv.js → systemverilog-Pnr5_rIP.js} +29 -3
- package/dist/{tcl-B8DayMSI.js → tcl-fNPXval8.js} +7 -1
- package/dist/tsMode-D_PMsbjK.js +976 -0
- package/dist/{twig-B1AUPVB_.js → twig-L2MkztkV.js} +76 -1
- package/dist/{typescript-DrlYcCUn.js → typescript-Bu3ZbtQI.js} +23 -2
- package/dist/typespec-Cqqo-3Pt.js +123 -0
- package/dist/{vb-BIC7ccdG.js → vb-B5YC2xN9.js} +15 -1
- package/dist/{wgsl-C9yjop46.js → wgsl-D9BRtftY.js} +26 -1
- package/dist/{xml-BzP9D0eZ.js → xml-CNSSkPqy.js} +8 -2
- package/dist/{yaml-CT7GOvXu.js → yaml-5RF_PGNe.js} +30 -2
- package/handlers/compiler.ts +196 -16
- package/handlers/context-setup.ts +10 -5
- package/handlers/handler-api-factory.ts +358 -0
- package/handlers/handler-api.ts +379 -0
- package/handlers/handler-executor.ts +25 -5
- package/handlers/handler-scope.ts +398 -0
- package/handlers/index.ts +34 -2
- package/handlers/runtime-api/component-properties.ts +0 -8
- package/handlers/runtime-api/index.ts +1 -1
- package/handlers/runtime-api/toast.ts +1 -1
- package/index.ts +14 -115
- package/micro-app/README.md +10 -10
- package/micro-app/state/MicroAppRuntimeContext.ts +1 -28
- package/micro-app-entry.ts +0 -5
- package/package.json +22 -1
- package/redux/actions/application/index.ts +0 -1
- package/redux/actions/component/addComponentAction.ts +15 -4
- package/redux/actions/component/moveDraggedComponent.ts +1 -2
- package/redux/actions/component/update-component-name.ts +1 -1
- package/redux/actions/component/updateComponentAttributes.ts +7 -2
- package/redux/handlers/functions/build-function-handler.ts +11 -3
- package/redux/handlers/functions/deploy-function-handler.ts +11 -3
- package/redux/handlers/functions/invoke-function-handler.ts +11 -3
- package/redux/handlers/functions/load-functions-handler.ts +2 -1
- package/redux/handlers/functions/update-function-handler.ts +2 -1
- package/redux/store/component/component.interface.ts +8 -2
- package/redux/store/component/store.ts +1 -4
- package/state/runtime-context.ts +1 -23
- package/utils/RuntimeContextHelpers.ts +221 -90
- package/utils/change-detection.ts +125 -1
- package/utils/clipboard-utils.ts +18 -8
- package/utils/component-registry.ts +118 -0
- package/utils/index.ts +14 -1
- package/utils/naming-generator.ts +3 -1
- package/utils/randomness.ts +3 -1
- package/utils/register-components.ts +21 -29
- package/utils/render-util.ts +27 -48
- package/utils/toast.ts +97 -0
- package/vite.config.ts +29 -12
- package/components/ui/components/Event/EventAttribute/EventAttribute.style.ts +0 -11
- package/components/ui/components/Event/EventAttribute/EventAttribute.ts +0 -28
- package/components/ui/components/base/BaseElement/calculateStyles.ts +0 -31
- package/components/ui/components/base/BaseElement/drag-events.helpers.ts +0 -71
- package/components/ui/components/base/BaseElement/execute-event.helpers.ts +0 -45
- package/components/ui/components/base/BaseElement/interactions.helpers.ts +0 -14
- package/components/ui/components/wrappers/ComponentTitle/ComponentTitle.ts +0 -95
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.style.ts +0 -102
- package/components/ui/components/wrappers/GenerikWrapper/ResizeWrapper/ResizeWrapper.ts +0 -258
- package/components/ui/components/wrappers/PreviewWrapper.ts +0 -28
- package/components/ui/components/wrappers/RectangleSelection/RectangleSelection.ts +0 -154
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/constants/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/constants.d.ts +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/constants.js +0 -7
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/controllers/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/controllers.d.ts +0 -21
- package/components/ui/nuraly-ui/packages/common/dist/controllers.js +0 -22
- package/components/ui/nuraly-ui/packages/common/dist/index.d.ts +0 -25
- package/components/ui/nuraly-ui/packages/common/dist/index.js +0 -27
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/mixins/index.js +0 -3
- package/components/ui/nuraly-ui/packages/common/dist/mixins.d.ts +0 -26
- package/components/ui/nuraly-ui/packages/common/dist/mixins.js +0 -29
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.d.ts +0 -42
- package/components/ui/nuraly-ui/packages/common/dist/shared/base-mixin.js +0 -38
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.d.ts +0 -1
- package/components/ui/nuraly-ui/packages/common/dist/shared/constants.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.d.ts +0 -77
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js +0 -341
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts +0 -37
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.d.ts +0 -4
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/index.js +0 -4
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts +0 -48
- package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.js +0 -133
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.d.ts +0 -37
- package/components/ui/nuraly-ui/packages/common/dist/shared/dependency-mixin.js +0 -141
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.d.ts +0 -64
- package/components/ui/nuraly-ui/packages/common/dist/shared/event-handler-mixin.js +0 -95
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.d.ts +0 -13
- package/components/ui/nuraly-ui/packages/common/dist/shared/index.js +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.d.ts +0 -78
- package/components/ui/nuraly-ui/packages/common/dist/shared/theme-mixin.js +0 -194
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.d.ts +0 -44
- package/components/ui/nuraly-ui/packages/common/dist/shared/themes.js +0 -85
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.d.ts +0 -60
- package/components/ui/nuraly-ui/packages/common/dist/shared/utils.js +0 -85
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.d.ts +0 -108
- package/components/ui/nuraly-ui/packages/common/dist/shared/validation.types.js +0 -17
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/themes/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/themes.d.ts +0 -22
- package/components/ui/nuraly-ui/packages/common/dist/themes.js +0 -23
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.d.ts +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/utils/index.js +0 -2
- package/components/ui/nuraly-ui/packages/common/dist/utils.d.ts +0 -21
- package/components/ui/nuraly-ui/packages/common/dist/utils.js +0 -22
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/LICENSE +0 -15
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/README.md +0 -294
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/copy.js +0 -175
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/index.js +0 -16
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/index.js +0 -16
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/index.js +0 -7
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/move/move.js +0 -59
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/async.js +0 -29
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/components/ui/nuraly-ui/packages/forms/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/LICENSE +0 -15
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/README.md +0 -294
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy-sync.js +0 -171
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/copy.js +0 -175
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/copy/index.js +0 -7
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/empty/index.js +0 -39
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/file.js +0 -66
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/index.js +0 -23
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/link.js +0 -64
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-paths.js +0 -101
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink-type.js +0 -34
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/ensure/symlink.js +0 -67
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/fs/index.js +0 -146
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/index.js +0 -16
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/index.js +0 -16
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/jsonfile.js +0 -11
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json-sync.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/json/output-json.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/index.js +0 -14
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/make-dir.js +0 -27
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/mkdirs/utils.js +0 -21
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/index.js +0 -7
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move-sync.js +0 -55
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/move/move.js +0 -59
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/output-file/index.js +0 -31
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/path-exists/index.js +0 -12
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/remove/index.js +0 -17
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/async.js +0 -29
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/stat.js +0 -159
- package/components/ui/nuraly-ui/packages/layout/node_modules/fs-extra/lib/util/utimes.js +0 -36
- package/dist/SmartAttributeHandler-C4EliaG0.js +0 -153
- package/dist/SmartAttributeHandler-u-ZHGueR.js +0 -193
- package/dist/assets/editor.worker-C_S4Avdt.js +0 -11
- package/dist/assets/html.worker-DfuQASUV.js +0 -458
- package/dist/assets/json.worker-Cucz4wxY.js +0 -42
- package/dist/assets/ts.worker-Dme6S0YK.js +0 -37021
- package/dist/cssMode-CqMQ6Xsa.js +0 -1443
- package/dist/htmlMode-KglxyZXm.js +0 -1453
- package/dist/jsonMode-B3rqxD-b.js +0 -1863
- package/dist/tsMode-DEiq8fQ0.js +0 -800
- package/redux/actions/application/loadApplicationPermissionAction.ts +0 -10
- package/utils/styleUtil.ts +0 -7
package/micro-app/README.md
CHANGED
|
@@ -114,7 +114,7 @@ Vars['app.selectedFile'] = '/src/App.tsx'
|
|
|
114
114
|
Vars['global.userName'] = 'John Doe'
|
|
115
115
|
|
|
116
116
|
// Auto-resolution (searches local → app → global)
|
|
117
|
-
const userName =
|
|
117
|
+
const userName = $userName
|
|
118
118
|
|
|
119
119
|
// Publish local variable to higher scope
|
|
120
120
|
ExecuteInstance.publishToApp('tempData')
|
|
@@ -219,7 +219,7 @@ const result = executor.executeHandler(
|
|
|
219
219
|
|
|
220
220
|
// Execute expression
|
|
221
221
|
const value = executor.executeExpression(
|
|
222
|
-
'
|
|
222
|
+
'$userName + " - " + Current.name',
|
|
223
223
|
component
|
|
224
224
|
)
|
|
225
225
|
|
|
@@ -301,7 +301,7 @@ From within handler code in an isolated micro-app:
|
|
|
301
301
|
|
|
302
302
|
```javascript
|
|
303
303
|
// Access variables (with scope resolution)
|
|
304
|
-
|
|
304
|
+
$myLocalVar = 'value'
|
|
305
305
|
const sharedVar = Vars['app.sharedData']
|
|
306
306
|
const globalVar = Vars['global.userName']
|
|
307
307
|
|
|
@@ -330,8 +330,8 @@ sendMessage({
|
|
|
330
330
|
|
|
331
331
|
```javascript
|
|
332
332
|
// In Files micro-app
|
|
333
|
-
|
|
334
|
-
|
|
333
|
+
$currentFile = '/src/App.tsx' // Local scope
|
|
334
|
+
$selectedFiles = [...] // Local scope
|
|
335
335
|
|
|
336
336
|
// NOT accessible in Functions micro-app
|
|
337
337
|
```
|
|
@@ -340,11 +340,11 @@ Vars.selectedFiles = [...] // Local scope
|
|
|
340
340
|
|
|
341
341
|
```javascript
|
|
342
342
|
// In Files micro-app
|
|
343
|
-
|
|
343
|
+
$currentFile = '/src/App.tsx'
|
|
344
344
|
ExecuteInstance.publishToApp('currentFile')
|
|
345
345
|
|
|
346
346
|
// In Functions micro-app - now accessible
|
|
347
|
-
const file = Vars['app.currentFile'] // or
|
|
347
|
+
const file = Vars['app.currentFile'] // or $currentFile (auto-resolves)
|
|
348
348
|
console.log('Editing file:', file)
|
|
349
349
|
```
|
|
350
350
|
|
|
@@ -359,7 +359,7 @@ Vars['global.isAuthenticated'] = true
|
|
|
359
359
|
// Accessible in ALL apps and micro-apps
|
|
360
360
|
const userName = Vars['global.userName']
|
|
361
361
|
// or
|
|
362
|
-
const userName =
|
|
362
|
+
const userName = $userName // Auto-resolves to global
|
|
363
363
|
```
|
|
364
364
|
|
|
365
365
|
### Example 4: Explicit Scope Access
|
|
@@ -371,7 +371,7 @@ const appValue = Vars['app.selectedFile']
|
|
|
371
371
|
const globalValue = Vars['global.userName']
|
|
372
372
|
|
|
373
373
|
// Auto-resolution priority: local → app → global
|
|
374
|
-
const value =
|
|
374
|
+
const value = $someVar
|
|
375
375
|
// Searches local first, then app, then global
|
|
376
376
|
```
|
|
377
377
|
|
|
@@ -474,7 +474,7 @@ const components = this.storeContext.getComponents()
|
|
|
474
474
|
this.runtimeContext.VarsProxy.myVar = 'value'
|
|
475
475
|
|
|
476
476
|
// Or in handler code (automatic)
|
|
477
|
-
|
|
477
|
+
$myVar = 'value' // Uses isolated context
|
|
478
478
|
```
|
|
479
479
|
|
|
480
480
|
### Enabling Isolated Context
|
|
@@ -12,8 +12,6 @@ import { VariableScope } from './VariableScopeManager'
|
|
|
12
12
|
import { eventDispatcher } from '../../utils/change-detection'
|
|
13
13
|
import { RuntimeContextHelpers } from '../../utils/RuntimeContextHelpers'
|
|
14
14
|
|
|
15
|
-
const DEBUG = false
|
|
16
|
-
|
|
17
15
|
export class MicroAppRuntimeContext {
|
|
18
16
|
// Store context reference
|
|
19
17
|
private storeContext: MicroAppStoreContext
|
|
@@ -64,18 +62,10 @@ export class MicroAppRuntimeContext {
|
|
|
64
62
|
|
|
65
63
|
return new Proxy(this.Vars, {
|
|
66
64
|
get(target, prop: string) {
|
|
67
|
-
if (DEBUG) {
|
|
68
|
-
console.log(`[MicroApp ${self.eventNamespace}] Getting var: ${String(prop)}`)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
65
|
// Use scope manager for variable access
|
|
72
66
|
return scopeManager.get(String(prop))
|
|
73
67
|
},
|
|
74
68
|
set(target, prop: string, value) {
|
|
75
|
-
if (DEBUG) {
|
|
76
|
-
console.log(`[MicroApp ${self.eventNamespace}] Setting var: ${String(prop)} = ${value}`)
|
|
77
|
-
}
|
|
78
|
-
|
|
79
69
|
const oldValue = scopeManager.get(String(prop))
|
|
80
70
|
|
|
81
71
|
// Parse to determine target scope (check if prop starts with 'global.' or 'local.')
|
|
@@ -108,7 +98,6 @@ export class MicroAppRuntimeContext {
|
|
|
108
98
|
|
|
109
99
|
// For GLOBAL variables, emit a global event that all micro-apps can listen to
|
|
110
100
|
if (targetScope === VariableScope.GLOBAL) {
|
|
111
|
-
console.log(`[MicroApp ${self.eventNamespace}] Emitting global variable change: ${propStr}`)
|
|
112
101
|
eventDispatcher.emit('global:variable:changed', {
|
|
113
102
|
varName: propStr, // Use full prop name with 'global.' prefix
|
|
114
103
|
name: varName, // Just the variable name without prefix
|
|
@@ -155,8 +144,7 @@ export class MicroAppRuntimeContext {
|
|
|
155
144
|
ctx: this.Current
|
|
156
145
|
})
|
|
157
146
|
})
|
|
158
|
-
}
|
|
159
|
-
debug: DEBUG
|
|
147
|
+
}
|
|
160
148
|
})
|
|
161
149
|
}
|
|
162
150
|
|
|
@@ -173,11 +161,8 @@ export class MicroAppRuntimeContext {
|
|
|
173
161
|
// Subscribe to generic GLOBAL variable change events (emitted by any micro-app)
|
|
174
162
|
// This ensures that when one micro-app changes a global variable, all micro-apps update
|
|
175
163
|
const globalVarUnsub = eventDispatcher.on('global:variable:changed', (data: any) => {
|
|
176
|
-
console.log(`[MicroApp ${this.eventNamespace}] Received global variable change: ${data.varName} = ${data.value}`)
|
|
177
|
-
|
|
178
164
|
// Trigger component input refresh for all components in this micro-app
|
|
179
165
|
const components = this.storeContext.getComponents()
|
|
180
|
-
console.log(`[MicroApp ${this.eventNamespace}] Refreshing ${components.length} components`)
|
|
181
166
|
|
|
182
167
|
components.forEach((component: any) => {
|
|
183
168
|
eventDispatcher.emit(`component-input-refresh-request:${component.uuid}`, {
|
|
@@ -202,10 +187,6 @@ export class MicroAppRuntimeContext {
|
|
|
202
187
|
const appUUID = this.storeContext.appUUID
|
|
203
188
|
const runtimeValues = this.storeContext.$runtimeValues.get()
|
|
204
189
|
|
|
205
|
-
if (DEBUG) {
|
|
206
|
-
console.log(`[MicroApp ${this.eventNamespace}] Registering ${components.length} components`)
|
|
207
|
-
}
|
|
208
|
-
|
|
209
190
|
// Initialize registry for this app
|
|
210
191
|
if (!this.applications[appUUID]) {
|
|
211
192
|
this.applications[appUUID] = {}
|
|
@@ -255,10 +236,6 @@ export class MicroAppRuntimeContext {
|
|
|
255
236
|
})
|
|
256
237
|
}
|
|
257
238
|
})
|
|
258
|
-
|
|
259
|
-
if (DEBUG) {
|
|
260
|
-
console.log(`[MicroApp ${this.eventNamespace}] Registration complete`)
|
|
261
|
-
}
|
|
262
239
|
}
|
|
263
240
|
|
|
264
241
|
/**
|
|
@@ -415,9 +392,5 @@ export class MicroAppRuntimeContext {
|
|
|
415
392
|
this.styleProxyCache = new WeakMap()
|
|
416
393
|
this.valuesProxyCache = new WeakMap()
|
|
417
394
|
this.listeners = {}
|
|
418
|
-
|
|
419
|
-
if (DEBUG) {
|
|
420
|
-
console.log(`[MicroApp ${this.eventNamespace}] Cleaned up`)
|
|
421
|
-
}
|
|
422
395
|
}
|
|
423
396
|
}
|
package/micro-app-entry.ts
CHANGED
|
@@ -26,9 +26,4 @@ export { MicroAppMessageBus } from './micro-app/messaging/MicroAppMessageBus';
|
|
|
26
26
|
if (typeof window !== 'undefined') {
|
|
27
27
|
// Touch the class to ensure it's not tree-shaken
|
|
28
28
|
void MicroApp;
|
|
29
|
-
|
|
30
|
-
console.log('[MicroApp Bundle] Loaded. MicroApp registered:', customElements.get('micro-app') !== undefined);
|
|
31
|
-
console.log('[MicroApp Bundle] ButtonBlock registered:', customElements.get('button-block') !== undefined);
|
|
32
|
-
console.log('[MicroApp Bundle] TextLabelBlock registered:', customElements.get('text-label-block') !== undefined);
|
|
33
|
-
console.log('[MicroApp Bundle] Container registered:', customElements.get('vertical-container-block') !== undefined);
|
|
34
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nuraly/runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Nuraly Visual App Builder Runtime - State management, handler execution, and component system with bundled micro-app support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.ts",
|
|
@@ -91,6 +91,24 @@
|
|
|
91
91
|
"build:all": "npm run build && npm run build:bundle",
|
|
92
92
|
"prepublishOnly": "npm run build:all"
|
|
93
93
|
},
|
|
94
|
+
"devDependencies": {
|
|
95
|
+
"vite": "^5.0.0",
|
|
96
|
+
"typescript": "^5.0.0",
|
|
97
|
+
"@vitejs/plugin-legacy": "^5.0.0",
|
|
98
|
+
"monaco-editor": "^0.52.0",
|
|
99
|
+
"monacopilot": "^0.12.0"
|
|
100
|
+
},
|
|
101
|
+
"dependencies": {
|
|
102
|
+
"lit": "^3.0.0",
|
|
103
|
+
"nanostores": "^0.10.0",
|
|
104
|
+
"@nanostores/persistent": "^0.10.0",
|
|
105
|
+
"rxjs": "^7.0.0",
|
|
106
|
+
"immer": "^10.0.0",
|
|
107
|
+
"fast-deep-equal": "^3.1.3",
|
|
108
|
+
"uuid": "^9.0.0",
|
|
109
|
+
"acorn": "^8.11.0",
|
|
110
|
+
"acorn-walk": "^8.3.0"
|
|
111
|
+
},
|
|
94
112
|
"peerDependencies": {
|
|
95
113
|
"lit": "^3.0.0",
|
|
96
114
|
"nanostores": "^0.10.0",
|
|
@@ -111,6 +129,9 @@
|
|
|
111
129
|
],
|
|
112
130
|
"author": "Nuraly",
|
|
113
131
|
"license": "ISC",
|
|
132
|
+
"publishConfig": {
|
|
133
|
+
"access": "public"
|
|
134
|
+
},
|
|
114
135
|
"repository": {
|
|
115
136
|
"type": "git",
|
|
116
137
|
"url": "https://github.com/Nuralyio/stack.git",
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
export { addPageToApplicationAction } from './addPageToApplicationAction';
|
|
10
10
|
export { addTempApplication } from './addTempApplication';
|
|
11
11
|
export { closeShareApplicationModalAction } from './closeShareApplicationModalAction';
|
|
12
|
-
export { loadApplicationPermissionAction } from './loadApplicationPermissionAction';
|
|
13
12
|
export { resetPermissionMessage } from './resetPermissionMessage';
|
|
14
13
|
export { setApplication } from './setApplication';
|
|
15
14
|
export { setApplicationPermissionAction } from './setApplicationPermissionAction';
|
|
@@ -29,11 +29,19 @@ export const addComponentAction = (
|
|
|
29
29
|
childrenIds: component.childrenIds ?? [], // Initialize childrenIds if necessary
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
+
// Container types that can have children
|
|
33
|
+
const containerTypes = [
|
|
34
|
+
ComponentType.Container,
|
|
35
|
+
ComponentType.Collection,
|
|
36
|
+
ComponentType.Link,
|
|
37
|
+
ComponentType.GridRow,
|
|
38
|
+
ComponentType.GridCol,
|
|
39
|
+
ComponentType.Form,
|
|
40
|
+
];
|
|
41
|
+
|
|
32
42
|
if (
|
|
33
43
|
!currentComponentId ||
|
|
34
|
-
(currentComponent?.component_type
|
|
35
|
-
currentComponent?.component_type !== ComponentType.Collection&&
|
|
36
|
-
currentComponent?.component_type !== ComponentType.Link)
|
|
44
|
+
!containerTypes.includes(currentComponent?.component_type)
|
|
37
45
|
) {
|
|
38
46
|
newComponent.root = true;
|
|
39
47
|
}
|
|
@@ -43,7 +51,10 @@ export const addComponentAction = (
|
|
|
43
51
|
currentComponent?.component_type === ComponentType.Container ||
|
|
44
52
|
currentComponent?.component_type === ComponentType.Dropdown ||
|
|
45
53
|
currentComponent?.component_type === ComponentType.Link ||
|
|
46
|
-
currentComponent?.component_type === ComponentType.Collection
|
|
54
|
+
currentComponent?.component_type === ComponentType.Collection ||
|
|
55
|
+
currentComponent?.component_type === ComponentType.GridRow ||
|
|
56
|
+
currentComponent?.component_type === ComponentType.GridCol ||
|
|
57
|
+
currentComponent?.component_type === ComponentType.Form
|
|
47
58
|
) {
|
|
48
59
|
// Add as child of the current component
|
|
49
60
|
//addComponentAsChildOf(componentId, currentComponentId, currentApplicationId);
|
|
@@ -125,6 +125,5 @@ export function moveDraggedComponent(
|
|
|
125
125
|
$components.setKey(appUUID, components);
|
|
126
126
|
updatePageAction(page, appUUID);
|
|
127
127
|
updatePageHandler(page);
|
|
128
|
-
|
|
129
|
-
console.log(`Moved ${draggedComponent.uuid} to ${position} ${dropInComponentId}`, draggedComponent);
|
|
128
|
+
eventDispatcher.emit("component:refresh");
|
|
130
129
|
}
|
|
@@ -53,7 +53,7 @@ export function updateComponentName(
|
|
|
53
53
|
});
|
|
54
54
|
|
|
55
55
|
// Trigger a refresh event for any listeners - ONLY when actual update occurred
|
|
56
|
-
eventDispatcher.emit("component:updated");
|
|
56
|
+
eventDispatcher.emit("component:updated", { uuid: componentId });
|
|
57
57
|
refreshPageStoreVar()
|
|
58
58
|
} else {
|
|
59
59
|
// No update needed, log a message or handle accordingly
|
|
@@ -83,7 +83,12 @@ export function updateComponentAttributes(
|
|
|
83
83
|
};
|
|
84
84
|
|
|
85
85
|
// SECOND: Apply the updates directly to the component
|
|
86
|
-
|
|
86
|
+
//@todo: need more tests here.
|
|
87
|
+
// Check if any of the updated attributes is a handler (nested: { propName: { type: 'handler', value: '...' } })
|
|
88
|
+
const hasHandlerAttribute = updateType === "input" &&
|
|
89
|
+
Object.values(updatedAttributes).some((attr: any) => attr && typeof attr === 'object' && attr.type === 'handler');
|
|
90
|
+
|
|
91
|
+
if ((updateType === "style" || (updateType === "input" && !hasHandlerAttribute)) && currentPlatform.platform !== "desktop") {
|
|
87
92
|
// Initialize breakpoints if not already
|
|
88
93
|
componentToUpdate.breakpoints = componentToUpdate.breakpoints || {};
|
|
89
94
|
componentToUpdate.breakpoints[currentPlatform.width] =
|
|
@@ -182,7 +187,7 @@ export function updateComponentAttributes(
|
|
|
182
187
|
}
|
|
183
188
|
|
|
184
189
|
// Trigger a refresh event for any listeners - ONLY when actual update occurred
|
|
185
|
-
eventDispatcher.emit("component:updated");
|
|
190
|
+
eventDispatcher.emit("component:updated", { uuid: componentId });
|
|
186
191
|
eventDispatcher.emit(`component-updated:${String(componentId)}`);
|
|
187
192
|
} else {
|
|
188
193
|
// No update needed
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { FRONT_API_URLS } from '../api-urls';
|
|
2
2
|
|
|
3
|
-
export const buildFunctionHandler = (functionId:any) => {
|
|
4
|
-
|
|
3
|
+
export const buildFunctionHandler = async (functionId: any) => {
|
|
4
|
+
const response = await fetch(`${FRONT_API_URLS.FUNCTIONS}/build/${functionId}`, {
|
|
5
5
|
method: "POST",
|
|
6
6
|
headers: {
|
|
7
7
|
"Content-Type": "application/json"
|
|
8
8
|
},
|
|
9
|
-
|
|
9
|
+
credentials: "include",
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
if (!response.ok) {
|
|
13
|
+
const errorText = await response.text();
|
|
14
|
+
throw new Error(errorText || `Build failed with status ${response.status}`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return response;
|
|
10
18
|
};
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
import { FRONT_API_URLS } from '../api-urls';
|
|
2
2
|
|
|
3
|
-
export const deployFunctionHandler = (functionId:any) => {
|
|
4
|
-
|
|
3
|
+
export const deployFunctionHandler = async (functionId: any) => {
|
|
4
|
+
const response = await fetch(`${FRONT_API_URLS.FUNCTIONS}/deploy/${functionId}`, {
|
|
5
5
|
method: "POST",
|
|
6
6
|
headers: {
|
|
7
7
|
"Content-Type": "application/json"
|
|
8
8
|
},
|
|
9
|
-
|
|
9
|
+
credentials: "include",
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
if (!response.ok) {
|
|
13
|
+
const errorText = await response.text();
|
|
14
|
+
throw new Error(errorText || `Deploy failed with status ${response.status}`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return response;
|
|
10
18
|
};
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { FRONT_API_URLS } from '../api-urls';
|
|
2
2
|
|
|
3
|
-
export const invokeFunctionHandler = (functionId:any, data) => {
|
|
4
|
-
|
|
3
|
+
export const invokeFunctionHandler = async (functionId: any, data: any) => {
|
|
4
|
+
const response = await fetch(`${FRONT_API_URLS.FUNCTIONS}/invoke/${functionId}`, {
|
|
5
5
|
method: "POST",
|
|
6
6
|
headers: {
|
|
7
7
|
"Content-Type": "application/json"
|
|
8
8
|
},
|
|
9
|
+
credentials: "include",
|
|
9
10
|
body: JSON.stringify({
|
|
10
11
|
data
|
|
11
12
|
})
|
|
12
|
-
})
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (!response.ok) {
|
|
16
|
+
const errorText = await response.text();
|
|
17
|
+
throw new Error(errorText || `Invoke failed with status ${response.status}`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return response;
|
|
13
21
|
};
|
|
@@ -49,6 +49,13 @@ export const enum ComponentType {
|
|
|
49
49
|
Modal = "Modal",
|
|
50
50
|
Toast = "Toast",
|
|
51
51
|
Panel = "Panel",
|
|
52
|
+
GridRow = "grid-row-block",
|
|
53
|
+
GridCol = "grid-col-block",
|
|
54
|
+
Form = "form",
|
|
55
|
+
ValidationRules = "validation_rules",
|
|
56
|
+
BorderManager = "border_manager",
|
|
57
|
+
AccessRoles = "access_roles",
|
|
58
|
+
FunctionsPanel = "FunctionsPanel",
|
|
52
59
|
}
|
|
53
60
|
|
|
54
61
|
export interface DraggingComponentInfo {
|
|
@@ -65,11 +72,10 @@ export interface ComponentElement {
|
|
|
65
72
|
values?: any;
|
|
66
73
|
uuid: string;
|
|
67
74
|
name: string;
|
|
68
|
-
component_type: ComponentType;
|
|
75
|
+
component_type: ComponentType | string; // Allow string for custom component types
|
|
69
76
|
style?: { [key: string]: string };
|
|
70
77
|
breakpoints?: any;
|
|
71
78
|
styleHandlers: { [key: string]: string };
|
|
72
|
-
inputHandlers: { [key: string]: string };
|
|
73
79
|
parameters?: { [key: string]: string };
|
|
74
80
|
event?: { [key: string]: string };
|
|
75
81
|
input?: { [key: string]: any };
|
|
@@ -13,7 +13,7 @@ const isServer = typeof window === "undefined";
|
|
|
13
13
|
const initialStates = isServer ? [] : JSON.parse(window["__INITIAL_COMPONENT_STATE__"] ?? "[]");
|
|
14
14
|
|
|
15
15
|
// Initialize with empty object
|
|
16
|
-
const initialState: ComponentStore =
|
|
16
|
+
const initialState: ComponentStore = {};
|
|
17
17
|
|
|
18
18
|
if (currentLoadedApplication) {
|
|
19
19
|
initialState[currentLoadedApplication.uuid] = initialStates;
|
|
@@ -113,14 +113,11 @@ export const setComponentRuntimeValue = (componentId: string, key: string, value
|
|
|
113
113
|
if (!componentId) {
|
|
114
114
|
console.error('Cannot set runtime value: componentId is undefined');
|
|
115
115
|
return;
|
|
116
|
-
}else{
|
|
117
|
-
console.log('setComponentRuntimeValue', componentId, key, value)
|
|
118
116
|
}
|
|
119
117
|
$runtimeValues.setKey(componentId, {
|
|
120
118
|
...$runtimeValues.get()[componentId],
|
|
121
119
|
[key]: value
|
|
122
120
|
});
|
|
123
|
-
console.log( $runtimeValues.get()[componentId])
|
|
124
121
|
|
|
125
122
|
// Emit an event to notify subscribers about the change
|
|
126
123
|
eventDispatcher.emit('component:value:change', {
|
package/state/runtime-context.ts
CHANGED
|
@@ -191,19 +191,6 @@ import { executeHandler } from "../handlers/handler-executor";
|
|
|
191
191
|
import type { IRuntimeContext } from "../types/IRuntimeContext";
|
|
192
192
|
import { RuntimeContextHelpers } from "../utils/RuntimeContextHelpers";
|
|
193
193
|
|
|
194
|
-
/**
|
|
195
|
-
* Debug flag for verbose logging.
|
|
196
|
-
* Set to `true` to enable detailed console logs for:
|
|
197
|
-
* - Property access and mutations
|
|
198
|
-
* - Proxy creation and caching
|
|
199
|
-
* - Component registration steps
|
|
200
|
-
* - Event emissions
|
|
201
|
-
*
|
|
202
|
-
* @constant
|
|
203
|
-
* @type {boolean}
|
|
204
|
-
* @default false
|
|
205
|
-
*/
|
|
206
|
-
const DEBUG = false;
|
|
207
194
|
|
|
208
195
|
/**
|
|
209
196
|
* @class RuntimeContext
|
|
@@ -430,10 +417,6 @@ class RuntimeContext implements IRuntimeContext {
|
|
|
430
417
|
$components.subscribe(() => this.registerApplications());
|
|
431
418
|
eventDispatcher.on("component:refresh", () => this.registerApplications())
|
|
432
419
|
eventDispatcher.on("component:updated", () => this.registerApplications())
|
|
433
|
-
|
|
434
|
-
if (DEBUG) {
|
|
435
|
-
console.log("Executor initialized with debug mode enabled.");
|
|
436
|
-
}
|
|
437
420
|
}
|
|
438
421
|
|
|
439
422
|
/**
|
|
@@ -476,9 +459,6 @@ class RuntimeContext implements IRuntimeContext {
|
|
|
476
459
|
// IMPORTANT: Emit global variable change events for micro-apps to listen to
|
|
477
460
|
// This ensures that when global RuntimeContext changes a variable, all micro-apps are notified
|
|
478
461
|
if (scope === 'Vars') {
|
|
479
|
-
if (DEBUG) {
|
|
480
|
-
console.log(`[RuntimeContext] Emitting global variable change: ${prop} = ${value}`);
|
|
481
|
-
}
|
|
482
462
|
eventDispatcher.emit('global:variable:changed', {
|
|
483
463
|
varName: prop,
|
|
484
464
|
name: prop,
|
|
@@ -486,8 +466,7 @@ class RuntimeContext implements IRuntimeContext {
|
|
|
486
466
|
oldValue: undefined // Global context doesn't track oldValue
|
|
487
467
|
});
|
|
488
468
|
}
|
|
489
|
-
}
|
|
490
|
-
debug: DEBUG
|
|
469
|
+
}
|
|
491
470
|
});
|
|
492
471
|
}
|
|
493
472
|
|
|
@@ -569,7 +548,6 @@ class RuntimeContext implements IRuntimeContext {
|
|
|
569
548
|
const proxy = new Proxy(target, {
|
|
570
549
|
set(obj, prop: any, value) {
|
|
571
550
|
if (obj[prop] !== value) {
|
|
572
|
-
console.log(`Style property changed: ${prop} = ${value}`);
|
|
573
551
|
callback(prop, value);
|
|
574
552
|
}
|
|
575
553
|
obj[prop] = value;
|