@nuraly/runtime 0.1.6 → 0.1.8
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 +3 -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 +352 -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 +11 -13
- package/components/ui/components/inputs/Select/Select.ts +38 -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 +209 -0
- package/components/ui/components/layout/Grid/Row.style.ts +73 -0
- package/components/ui/components/layout/Grid/Row.ts +166 -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 +2 -4
- package/components/ui/components/runtime/MicroApp/MicroAppDataLoader.ts +6 -2
- package/components/ui/components/studio/FunctionsPanel/FunctionsPanel.ts +472 -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-0GwD2UDB.js → CodeEditor-Bf4L2rO_.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-DMsdy1N0.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-XzXhMwTc.js → freemarker2-D51H9HYi.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-CmrcNfkM.js → handlebars-CF6gdAX4.js} +38 -4
- package/dist/{hcl-6NT8Kbna.js → hcl-YBvpaUqf.js} +13 -1
- package/dist/{html-BsvlsNx5.js → html-c2n_zkM3.js} +37 -4
- package/dist/htmlMode-9IJTuZUh.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-D-M-tA-x.js → javascript-DhEEBMxD.js} +3 -2
- package/dist/jsonMode-CB6k-4rp.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-_8i5JYO-.js → liquid-CwtPiwnW.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-CiSJOftS.js → mdx-LewPRYF8.js} +2 -2
- package/dist/{micro-app-entry-BT6Pk6bn.js → micro-app-entry-C3RDIukG.js} +7621 -9067
- package/dist/micro-app.bundle.js +3 -3
- package/dist/micro-app.js +3575 -6621
- 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-DNxbUiJS.js → python-h5Z2g-yl.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-BFH0wq9s.js → razor-D5ep1Doy.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-B_6LiBE1.js +976 -0
- package/dist/{twig-B1AUPVB_.js → twig-L2MkztkV.js} +76 -1
- package/dist/{typescript-DFCDgKOy.js → typescript-BBG0jH4p.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-axhHDYch.js → xml-DgLB7rE6.js} +8 -2
- package/dist/{yaml-fWSpoHsZ.js → yaml-DiI4HpSv.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 +19 -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-B1UJKlqJ.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-BzqArQ52.js +0 -1443
- package/dist/htmlMode-CmNePjzn.js +0 -1453
- package/dist/jsonMode-CKj6yF-8.js +0 -1863
- package/dist/tsMode-DfXg_Y5Y.js +0 -800
- package/redux/actions/application/loadApplicationPermissionAction.ts +0 -10
- package/utils/styleUtil.ts +0 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, nothing } from "lit";
|
|
1
|
+
import { html, css, nothing } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
3
|
import { type ComponentElement } from '../../../../../redux/store/component/component.interface.ts';
|
|
4
4
|
import { BaseElementBlock } from "../../base/BaseElement.ts";
|
|
@@ -12,69 +12,95 @@ try {
|
|
|
12
12
|
console.warn('[@nuralyui/image] Package not found or failed to load.');
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
15
|
@customElement("image-block")
|
|
18
16
|
export class ImageBlock extends BaseElementBlock {
|
|
17
|
+
static styles = [css`
|
|
18
|
+
:host {
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
.image-placeholder {
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
color: #64748b;
|
|
27
|
+
min-height: 200px;
|
|
28
|
+
min-width: 200px;
|
|
29
|
+
border-radius: 8px;
|
|
30
|
+
border: 2px dashed #cbd5e1;
|
|
31
|
+
gap: 12px;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
}
|
|
34
|
+
.image-placeholder nr-icon {
|
|
35
|
+
--nuraly-icon-size: 48px;
|
|
36
|
+
}
|
|
37
|
+
`];
|
|
38
|
+
|
|
19
39
|
@property({ type: Object })
|
|
20
40
|
component: ComponentElement;
|
|
21
41
|
isDarkMode: boolean;
|
|
22
42
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
override connectedCallback() {
|
|
44
|
+
super.connectedCallback();
|
|
45
|
+
this.isDarkMode = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
46
|
+
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (event) => {
|
|
27
47
|
this.isDarkMode = event.matches;
|
|
28
48
|
this.requestUpdate();
|
|
29
49
|
});
|
|
30
50
|
}
|
|
31
51
|
|
|
32
52
|
renderComponent() {
|
|
33
|
-
|
|
53
|
+
const fallbackStyles = this.getStyles();
|
|
34
54
|
const imageStyles = this.getStyles() || {};
|
|
35
55
|
const imageStyleHandlers = this.component?.styleHandlers ? Object.fromEntries(
|
|
36
56
|
Object.entries(this.component?.styleHandlers).filter(([key, value]) => value)) : {};
|
|
37
|
-
|
|
38
|
-
const imageSrc = this.isDarkMode
|
|
39
|
-
? this.inputHandlersValue
|
|
40
|
-
: this.inputHandlersValue
|
|
41
|
-
|
|
57
|
+
|
|
58
|
+
const imageSrc = this.isDarkMode
|
|
59
|
+
? this.inputHandlersValue?.darkSrc ?? this.inputHandlersValue?.src
|
|
60
|
+
: this.inputHandlersValue?.src;
|
|
61
|
+
|
|
62
|
+
// Show placeholder when no image source
|
|
63
|
+
if (!imageSrc) {
|
|
64
|
+
return html`
|
|
65
|
+
<div
|
|
66
|
+
${ref(this.inputRef)}
|
|
67
|
+
class="image-placeholder"
|
|
68
|
+
style=${styleMap({
|
|
69
|
+
width: imageStyleHandlers?.width || imageStyles?.width || '100%',
|
|
70
|
+
height: imageStyleHandlers?.height || imageStyles?.height || '200px',
|
|
71
|
+
})}
|
|
72
|
+
@click=${(e: MouseEvent) => this.executeEvent("onClick", e)}
|
|
73
|
+
>
|
|
74
|
+
<nr-icon name="image"></nr-icon>
|
|
75
|
+
<nr-label>No image source</nr-label>
|
|
76
|
+
</div>
|
|
77
|
+
`;
|
|
78
|
+
}
|
|
79
|
+
|
|
42
80
|
return html`
|
|
43
81
|
<nr-image
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
styleMap({
|
|
82
|
+
${ref(this.inputRef)}
|
|
83
|
+
style=${styleMap({
|
|
47
84
|
...this.getStyles(),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
.
|
|
56
|
-
.
|
|
57
|
-
.
|
|
58
|
-
.
|
|
59
|
-
.
|
|
60
|
-
.
|
|
61
|
-
.
|
|
62
|
-
|
|
63
|
-
@
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
@nr-image-
|
|
67
|
-
this.executeEvent("onError", e);
|
|
68
|
-
}}
|
|
69
|
-
@nr-image-load=${(e) => {
|
|
70
|
-
this.executeEvent("onLoad", e);
|
|
71
|
-
}}
|
|
72
|
-
@nr-image-preview-open=${(e) => {
|
|
73
|
-
this.executeEvent("onPreviewOpen", e);
|
|
74
|
-
}}
|
|
75
|
-
@nr-image-preview-close=${(e) => {
|
|
76
|
-
this.executeEvent("onPreviewClose", e);
|
|
77
|
-
}}
|
|
85
|
+
"display": "block",
|
|
86
|
+
"--nuraly-image-local-border-top-left-radius": fallbackStyles?.["border-top-left-radius"] ?? "",
|
|
87
|
+
"--nuraly-image-local-border-top-right-radius": fallbackStyles?.["border-top-right-radius"] ?? "",
|
|
88
|
+
"--nuraly-image-local-border-bottom-left-radius": fallbackStyles?.["border-bottom-left-radius"] ?? "",
|
|
89
|
+
"--nuraly-image-local-border-bottom-right-radius": fallbackStyles?.["border-bottom-right-radius"] ?? "",
|
|
90
|
+
})}
|
|
91
|
+
.src=${imageSrc}
|
|
92
|
+
.fallback=${this.inputHandlersValue?.fallback ?? nothing}
|
|
93
|
+
.previewable=${this.inputHandlersValue?.previewable ?? false}
|
|
94
|
+
.fit=${this.inputHandlersValue?.fit ?? nothing}
|
|
95
|
+
.block=${this.inputHandlersValue?.block ?? false}
|
|
96
|
+
.width=${imageStyleHandlers?.width || imageStyles?.width}
|
|
97
|
+
.height=${imageStyleHandlers?.height || imageStyles?.height}
|
|
98
|
+
.alt=${this.inputHandlersValue?.alt ?? "image"}
|
|
99
|
+
@click=${(e: MouseEvent) => this.executeEvent("onClick", e)}
|
|
100
|
+
@nr-image-error=${(e: Event) => this.executeEvent("onError", e)}
|
|
101
|
+
@nr-image-load=${(e: Event) => this.executeEvent("onLoad", e)}
|
|
102
|
+
@nr-image-preview-open=${(e: Event) => this.executeEvent("onPreviewOpen", e)}
|
|
103
|
+
@nr-image-preview-close=${(e: Event) => this.executeEvent("onPreviewClose", e)}
|
|
78
104
|
>
|
|
79
105
|
</nr-image>
|
|
80
106
|
`;
|
|
@@ -37,18 +37,17 @@ export class TagBlock extends BaseElementBlock {
|
|
|
37
37
|
<nr-tag
|
|
38
38
|
${ref(this.inputRef)}
|
|
39
39
|
style=${styleMap(tagStyles)}
|
|
40
|
-
.label=${label}
|
|
41
40
|
.color=${color}
|
|
42
|
-
.icon=${icon}
|
|
43
41
|
?closable=${closable}
|
|
44
42
|
?bordered=${bordered}
|
|
45
|
-
@nr-close=${(e: CustomEvent) => {
|
|
43
|
+
@nr-tag-close=${(e: CustomEvent) => {
|
|
46
44
|
this.executeEvent('onClose', e);
|
|
47
45
|
}}
|
|
48
46
|
@click=${(e: MouseEvent) => {
|
|
49
47
|
this.executeEvent('onClick', e);
|
|
50
48
|
}}
|
|
51
49
|
>
|
|
50
|
+
${icon ? html`<nr-icon slot="icon" .name=${icon}></nr-icon>` : ''}
|
|
52
51
|
${label}
|
|
53
52
|
</nr-tag>
|
|
54
53
|
`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { html, nothing } from "lit";
|
|
1
|
+
import { html, css, nothing } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
3
|
import { type ComponentElement } from '../../../../../redux/store/component/component.interface.ts';
|
|
4
4
|
import { BaseElementBlock } from "../../base/BaseElement.ts";
|
|
@@ -12,42 +12,102 @@ try {
|
|
|
12
12
|
console.warn('[@nuralyui/video] Package not found or failed to load.');
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
@customElement("video-block")
|
|
16
|
+
export class VideoBlock extends BaseElementBlock {
|
|
17
|
+
static styles = [css`
|
|
18
|
+
.video-placeholder {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
color: #64748b;
|
|
24
|
+
min-height: 200px;
|
|
25
|
+
border-radius: 8px;
|
|
26
|
+
border: 2px dashed #cbd5e1;
|
|
27
|
+
gap: 12px;
|
|
28
|
+
}
|
|
29
|
+
.video-placeholder nr-icon {
|
|
30
|
+
--nuraly-icon-size: 48px;
|
|
31
|
+
}
|
|
32
|
+
.video-placeholder span {
|
|
33
|
+
font-size: 14px;
|
|
34
|
+
font-weight: 500;
|
|
35
|
+
}
|
|
36
|
+
`];
|
|
15
37
|
|
|
38
|
+
@property({ type: Object })
|
|
39
|
+
component: ComponentElement;
|
|
16
40
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
isDarkMode: boolean;
|
|
41
|
+
renderComponent() {
|
|
42
|
+
const videoStyles = this.getStyles() || {};
|
|
43
|
+
const videoStyleHandlers = this.component?.styleHandlers ? Object.fromEntries(
|
|
44
|
+
Object.entries(this.component?.styleHandlers).filter(([key, value]) => value)) : {};
|
|
22
45
|
|
|
46
|
+
const src = this.inputHandlersValue?.src;
|
|
47
|
+
const poster = this.inputHandlersValue?.poster;
|
|
48
|
+
const autoplay = this.inputHandlersValue?.autoplay ?? false;
|
|
49
|
+
const controls = this.inputHandlersValue?.controls ?? true;
|
|
50
|
+
const loop = this.inputHandlersValue?.loop ?? false;
|
|
51
|
+
const muted = this.inputHandlersValue?.muted ?? false;
|
|
52
|
+
const preload = this.inputHandlersValue?.preload ?? 'metadata';
|
|
23
53
|
|
|
24
|
-
|
|
54
|
+
// Show placeholder when no video source
|
|
55
|
+
if (!src) {
|
|
56
|
+
return html`
|
|
57
|
+
<div
|
|
58
|
+
${ref(this.inputRef)}
|
|
59
|
+
class="video-placeholder"
|
|
60
|
+
style=${styleMap({
|
|
61
|
+
...this.getStyles(),
|
|
62
|
+
width: videoStyleHandlers?.width || videoStyles?.width || '100%',
|
|
63
|
+
height: videoStyleHandlers?.height || videoStyles?.height || '200px',
|
|
64
|
+
})}
|
|
65
|
+
@click=${(e: MouseEvent) => this.executeEvent("onClick", e)}
|
|
66
|
+
>
|
|
67
|
+
<nr-icon name="video"></nr-icon>
|
|
68
|
+
<nr-label>No video source</nr-label>
|
|
69
|
+
</div>
|
|
70
|
+
`;
|
|
71
|
+
}
|
|
25
72
|
|
|
26
|
-
|
|
27
|
-
const imageStyleHandlers = this.component?.styleHandlers ? Object.fromEntries(
|
|
28
|
-
Object.entries(this.component?.styleHandlers).filter(([key, value]) => value)) : {};
|
|
29
|
-
const imageSrc = this.isDarkMode
|
|
30
|
-
? this.inputHandlersValue.darkSrc ?? this.inputHandlersValue.src
|
|
31
|
-
: this.inputHandlersValue.src;
|
|
32
|
-
return html`
|
|
73
|
+
return html`
|
|
33
74
|
<nr-video-player
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
.
|
|
46
|
-
.
|
|
47
|
-
.
|
|
48
|
-
|
|
75
|
+
${ref(this.inputRef)}
|
|
76
|
+
style=${styleMap({
|
|
77
|
+
...this.getStyles(),
|
|
78
|
+
"display": "block",
|
|
79
|
+
})}
|
|
80
|
+
.src=${src}
|
|
81
|
+
.poster=${poster ?? nothing}
|
|
82
|
+
.autoplay=${autoplay}
|
|
83
|
+
.controls=${controls}
|
|
84
|
+
.loop=${loop}
|
|
85
|
+
.muted=${muted}
|
|
86
|
+
.preload=${preload}
|
|
87
|
+
.width=${videoStyleHandlers?.width || videoStyles?.width}
|
|
88
|
+
.height=${videoStyleHandlers?.height || videoStyles?.height}
|
|
89
|
+
@click=${(e: MouseEvent) => this.executeEvent("onClick", e)}
|
|
90
|
+
@play=${(e: Event) => this.executeEvent("onPlay", e)}
|
|
91
|
+
@pause=${(e: Event) => this.executeEvent("onPause", e)}
|
|
92
|
+
@ended=${(e: Event) => this.executeEvent("onEnded", e)}
|
|
93
|
+
@loadeddata=${(e: Event) => this.executeEvent("onLoad", e)}
|
|
94
|
+
@error=${(e: Event) => this.executeEvent("onError", e)}
|
|
95
|
+
@timeupdate=${(e: Event) => {
|
|
96
|
+
const video = e.target as HTMLVideoElement;
|
|
97
|
+
this.executeEvent("onTimeUpdate", e, {
|
|
98
|
+
currentTime: video?.currentTime,
|
|
99
|
+
duration: video?.duration
|
|
100
|
+
});
|
|
101
|
+
}}
|
|
102
|
+
@volumechange=${(e: Event) => {
|
|
103
|
+
const video = e.target as HTMLVideoElement;
|
|
104
|
+
this.executeEvent("onVolumeChange", e, {
|
|
105
|
+
volume: video?.volume,
|
|
106
|
+
muted: video?.muted
|
|
107
|
+
});
|
|
108
|
+
}}
|
|
49
109
|
>
|
|
50
|
-
|
|
110
|
+
</nr-video-player>
|
|
51
111
|
`;
|
|
52
|
-
|
|
112
|
+
}
|
|
53
113
|
}
|
|
@@ -30,8 +30,8 @@ export class ButtonBlock extends BaseElementBlock {
|
|
|
30
30
|
@state()
|
|
31
31
|
display: any = false;
|
|
32
32
|
|
|
33
|
-
override
|
|
34
|
-
|
|
33
|
+
override connectedCallback() {
|
|
34
|
+
super.connectedCallback();
|
|
35
35
|
this.registerCallback("value", () => {});
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { customElement
|
|
3
|
-
import { styleMap } from "lit/directives/style-map.js";
|
|
4
|
-
import { type ComponentElement } from '../../../../../redux/store/component/component.interface.ts';
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { customElement } from "lit/decorators.js";
|
|
5
3
|
import { BaseElementBlock } from "../../base/BaseElement.ts";
|
|
6
4
|
import { ref } from "lit/directives/ref.js";
|
|
7
5
|
|
|
@@ -15,68 +13,44 @@ try {
|
|
|
15
13
|
|
|
16
14
|
@customElement("checkbox-block")
|
|
17
15
|
export class CheckboxBlock extends BaseElementBlock {
|
|
18
|
-
static styles = [
|
|
19
|
-
css``,
|
|
20
|
-
];
|
|
21
|
-
|
|
22
|
-
@property({ type: Object })
|
|
23
|
-
component: ComponentElement;
|
|
24
|
-
|
|
25
|
-
unsubscribe: () => void;
|
|
26
|
-
|
|
27
|
-
override async connectedCallback() {
|
|
28
|
-
await super.connectedCallback();
|
|
29
|
-
this.registerCallback("value", () => {});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
override disconnectedCallback() {
|
|
33
|
-
super.disconnectedCallback();
|
|
34
|
-
if (this.unsubscribe) this.unsubscribe();
|
|
35
|
-
}
|
|
36
16
|
|
|
37
17
|
renderComponent() {
|
|
38
|
-
const checkBoxStyles = this.component?.style || {};
|
|
39
|
-
const size = checkBoxStyles.size as 'small' | 'medium' | 'large' | undefined;
|
|
40
|
-
|
|
41
18
|
return html`
|
|
42
19
|
<nr-checkbox
|
|
20
|
+
class="${`drop-${this.component.uuid}`}"
|
|
43
21
|
${ref(this.inputRef)}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
.
|
|
48
|
-
.indeterminate=${this.inputHandlersValue?.checked == "indeterminate"}
|
|
49
|
-
.disabled=${this.inputHandlersValue?.state == "disabled"}
|
|
50
|
-
.size=${size || 'medium'}
|
|
22
|
+
.checked=${this.inputHandlersValue?.value === true}
|
|
23
|
+
.indeterminate=${this.inputHandlersValue?.value === "indeterminate"}
|
|
24
|
+
.disabled=${this.inputHandlersValue?.disabled}
|
|
25
|
+
.size=${this.inputHandlersValue?.size || 'medium'}
|
|
51
26
|
.name=${this.inputHandlersValue?.name || ''}
|
|
52
27
|
.value=${this.inputHandlersValue?.value || ''}
|
|
53
|
-
.required=${this.inputHandlersValue?.required || false}
|
|
54
28
|
.autoFocus=${this.inputHandlersValue?.autoFocus || false}
|
|
55
29
|
.id=${this.inputHandlersValue?.id || ''}
|
|
56
30
|
.title=${this.inputHandlersValue?.title || ''}
|
|
57
31
|
.tabIndex=${this.inputHandlersValue?.tabIndex || 0}
|
|
58
|
-
@nr-change=${(e) => {
|
|
32
|
+
@nr-change=${(e : CustomEvent) => {
|
|
59
33
|
this.executeEvent('onChange', e , {
|
|
60
34
|
checked: e.detail.checked
|
|
61
35
|
});
|
|
62
36
|
}}
|
|
63
|
-
@nr-focus=${(e) => {
|
|
37
|
+
@nr-focus=${(e : CustomEvent) => {
|
|
64
38
|
this.executeEvent('onFocus', e);
|
|
65
39
|
}}
|
|
66
|
-
@nr-blur=${(e) => {
|
|
40
|
+
@nr-blur=${(e : CustomEvent) => {
|
|
67
41
|
this.executeEvent('onBlur', e);
|
|
68
42
|
}}
|
|
69
|
-
@nr-keydown=${(e) => {
|
|
43
|
+
@nr-keydown=${(e : CustomEvent) => {
|
|
70
44
|
this.executeEvent('onKeydown', e);
|
|
71
45
|
}}
|
|
72
|
-
@nr-mouseenter=${(e) => {
|
|
46
|
+
@nr-mouseenter=${(e : CustomEvent) => {
|
|
73
47
|
this.executeEvent('onMouseEnter', e);
|
|
74
48
|
}}
|
|
75
|
-
@nr-mouseleave=${(e) => {
|
|
49
|
+
@nr-mouseleave=${(e : CustomEvent) => {
|
|
76
50
|
this.executeEvent('onMouseLeave', e);
|
|
77
51
|
}}
|
|
78
52
|
>
|
|
79
|
-
|
|
53
|
+
<nr-label .size=${this.inputHandlersValue?.size || 'medium'}> ${this.inputHandlersValue?.label ?? ""}</nr-label>
|
|
80
54
|
</nr-checkbox>
|
|
81
55
|
`;
|
|
82
56
|
}
|
|
@@ -4,7 +4,7 @@ import { styleMap } from "lit/directives/style-map.js";
|
|
|
4
4
|
import { type ComponentElement } from '../../../../../redux/store/component/component.interface.ts';
|
|
5
5
|
import { BaseElementBlock } from "../../base/BaseElement.ts";
|
|
6
6
|
import { ref } from "lit/directives/ref.js";
|
|
7
|
-
|
|
7
|
+
import "@nuralyui/color-picker";
|
|
8
8
|
import { EMPTY_STRING } from '../../../../../utils/constants.ts';
|
|
9
9
|
|
|
10
10
|
@customElement("color-picker-block")
|
|
@@ -16,8 +16,8 @@ export class ColorPickerBlock extends BaseElementBlock {
|
|
|
16
16
|
@property({ type: Object })
|
|
17
17
|
component: ComponentElement;
|
|
18
18
|
|
|
19
|
-
override
|
|
20
|
-
|
|
19
|
+
override connectedCallback() {
|
|
20
|
+
super.connectedCallback();
|
|
21
21
|
this.registerCallback("value", () => {});
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -50,7 +50,6 @@ export class ColorPickerBlock extends BaseElementBlock {
|
|
|
50
50
|
.helperText=${this.inputHandlersValue?.helperText || ''}
|
|
51
51
|
.defaultColorSets=${this.inputHandlersValue?.defaultColorSets || []}
|
|
52
52
|
@nr-color-change=${(e) => {
|
|
53
|
-
console.log(e.detail)
|
|
54
53
|
this.executeEvent('onChange', e, { value: e.detail.color });
|
|
55
54
|
}}
|
|
56
55
|
@nr-colorpicker-open=${(e) => {
|
|
@@ -1,18 +1,8 @@
|
|
|
1
1
|
import { html } from "lit";
|
|
2
2
|
import { customElement, property } from "lit/decorators.js";
|
|
3
|
-
import { styleMap } from "lit/directives/style-map.js";
|
|
4
3
|
import { type ComponentElement } from '../../../../../redux/store/component/component.interface.ts';
|
|
5
4
|
import { BaseElementBlock } from "../../base/BaseElement.ts";
|
|
6
|
-
import { executeHandler } from '../../../../../state/runtime-context.ts';
|
|
7
|
-
import { getNestedAttribute } from '../../../../../utils/object.utils.ts';
|
|
8
5
|
import { ref } from "lit/directives/ref.js";
|
|
9
|
-
|
|
10
|
-
// Safely import @nuralyui/select
|
|
11
|
-
try {
|
|
12
|
-
await import("@nuralyui/select");
|
|
13
|
-
} catch (error) {
|
|
14
|
-
console.warn('[@nuralyui/select] Package not found or failed to load.');
|
|
15
|
-
}
|
|
16
6
|
// Safely import @nuralyui/datepicker
|
|
17
7
|
try {
|
|
18
8
|
await import("@nuralyui/datepicker");
|
|
@@ -28,13 +18,40 @@ export class DatepickertBlock extends BaseElementBlock {
|
|
|
28
18
|
|
|
29
19
|
|
|
30
20
|
handleDateChange = (customEvent: CustomEvent) => {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
21
|
+
this.executeEvent('onDateChange', customEvent, {
|
|
22
|
+
value: customEvent.detail?.value || customEvent.detail?.date || customEvent.detail
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
handleRangeChange = (customEvent: CustomEvent) => {
|
|
27
|
+
this.executeEvent('onRangeChange', customEvent, {
|
|
28
|
+
startDate: customEvent.detail?.startDate,
|
|
29
|
+
endDate: customEvent.detail?.endDate,
|
|
30
|
+
value: customEvent.detail?.value
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
handleCalendarOpen = (customEvent: CustomEvent) => {
|
|
35
|
+
this.executeEvent('onCalendarOpen', customEvent);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
handleCalendarClose = (customEvent: CustomEvent) => {
|
|
39
|
+
this.executeEvent('onCalendarClose', customEvent);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
handleFocus = (customEvent: CustomEvent) => {
|
|
43
|
+
this.executeEvent('onFocus', customEvent);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
handleBlur = (customEvent: CustomEvent) => {
|
|
47
|
+
this.executeEvent('onBlur', customEvent);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
handleValidation = (customEvent: CustomEvent) => {
|
|
51
|
+
this.executeEvent('onValidation', customEvent, {
|
|
52
|
+
isValid: customEvent.detail?.isValid,
|
|
53
|
+
message: customEvent.detail?.message
|
|
54
|
+
});
|
|
38
55
|
};
|
|
39
56
|
|
|
40
57
|
renderComponent() {
|
|
@@ -47,25 +64,30 @@ export class DatepickertBlock extends BaseElementBlock {
|
|
|
47
64
|
return html`
|
|
48
65
|
<nr-datepicker
|
|
49
66
|
${ref(this.inputRef)}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
"display": this.getStyles().display ?? "block",
|
|
53
|
-
})}
|
|
67
|
+
class="${`drop-${this.component.uuid}`}"
|
|
68
|
+
|
|
54
69
|
.helper=${this.inputHandlersValue.helper || ''}
|
|
55
70
|
.label=${this.inputHandlersValue.label || ''}
|
|
71
|
+
.placeholder=${this.inputHandlersValue.placeholder || ''}
|
|
56
72
|
.locale=${this.inputHandlersValue.locale || 'en'}
|
|
57
73
|
.state=${state}
|
|
58
|
-
.size=${size}
|
|
74
|
+
.size=${this.inputHandlersValue.size ?? size}
|
|
59
75
|
.variant=${variant}
|
|
60
76
|
.placement=${placement}
|
|
61
|
-
|
|
77
|
+
?disabled=${this.inputHandlersValue.disabled ?? false}
|
|
62
78
|
.dateValue=${this.inputHandlersValue.value || ''}
|
|
63
79
|
.fieldFormat=${this.inputHandlersValue.format || 'DD/MM/YYYY'}
|
|
64
|
-
|
|
80
|
+
?range=${this.inputHandlersValue.range ?? false}
|
|
65
81
|
.minDate=${this.inputHandlersValue.minDate}
|
|
66
82
|
.maxDate=${this.inputHandlersValue.maxDate}
|
|
67
|
-
|
|
83
|
+
?required=${this.inputHandlersValue.required ?? false}
|
|
68
84
|
@nr-date-change=${this.handleDateChange}
|
|
85
|
+
@nr-range-change=${this.handleRangeChange}
|
|
86
|
+
@nr-calendar-open=${this.handleCalendarOpen}
|
|
87
|
+
@nr-calendar-close=${this.handleCalendarClose}
|
|
88
|
+
@nr-focus=${this.handleFocus}
|
|
89
|
+
@nr-blur=${this.handleBlur}
|
|
90
|
+
@nr-validation=${this.handleValidation}
|
|
69
91
|
></nr-datepicker>
|
|
70
92
|
`;
|
|
71
93
|
}
|
|
@@ -36,8 +36,8 @@ export class DropdownBlock extends BaseElementBlock {
|
|
|
36
36
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
override
|
|
40
|
-
|
|
39
|
+
override connectedCallback() {
|
|
40
|
+
super.connectedCallback();
|
|
41
41
|
this.registerCallback("value", (v) => {
|
|
42
42
|
this.requestUpdate();
|
|
43
43
|
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
|
|
3
|
+
export const formStyles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.form-placeholder {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
align-items: center;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
color: #64748b;
|
|
15
|
+
min-height: 200px;
|
|
16
|
+
width: 100%;
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
border: 2px dashed #cbd5e1;
|
|
19
|
+
gap: 12px;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.form-placeholder nr-icon {
|
|
24
|
+
--nuraly-icon-size: 48px;
|
|
25
|
+
}
|
|
26
|
+
`;
|