@nuraly/runtime 0.1.7 → 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 +7 -147
- 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-YsOapSut.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-Bfqhwyij.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-DCgKNBmn.js → handlebars-CF6gdAX4.js} +38 -4
- package/dist/{hcl-6NT8Kbna.js → hcl-YBvpaUqf.js} +13 -1
- package/dist/{html-C6wR7sMB.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-D1L5MTmg.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-D_pDYIs1.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-CKsJ3cF4.js → mdx-LewPRYF8.js} +2 -2
- package/dist/{micro-app-entry-xdTX5-ut.js → micro-app-entry-C3RDIukG.js} +8082 -9628
- package/dist/micro-app.bundle.js +3 -3
- package/dist/micro-app.js +3585 -6759
- 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-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-B_fCUeGX.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-DrlYcCUn.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-BzP9D0eZ.js → xml-DgLB7rE6.js} +8 -2
- package/dist/{yaml-CT7GOvXu.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-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/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.controller.js
DELETED
|
@@ -1,341 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared dropdown controller for components that need dropdown functionality
|
|
3
|
-
* Based on the select component's dropdown controller but generalized for reuse
|
|
4
|
-
*/
|
|
5
|
-
export class SharedDropdownController {
|
|
6
|
-
constructor(host) {
|
|
7
|
-
this._isOpen = false;
|
|
8
|
-
this._position = { top: 0, left: 0, width: 0, placement: 'bottom' };
|
|
9
|
-
this._dropdownElement = null;
|
|
10
|
-
this._triggerElement = null;
|
|
11
|
-
/**
|
|
12
|
-
* Handle window resize to recalculate position
|
|
13
|
-
*/
|
|
14
|
-
this.handleResize = () => {
|
|
15
|
-
if (this._isOpen) {
|
|
16
|
-
this.calculatePosition();
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* Handle scroll to manage dropdown visibility
|
|
21
|
-
*/
|
|
22
|
-
this.handleScroll = () => {
|
|
23
|
-
var _a;
|
|
24
|
-
if (this._isOpen && this._triggerElement) {
|
|
25
|
-
const triggerRect = this._triggerElement.getBoundingClientRect();
|
|
26
|
-
const viewportHeight = ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || window.innerHeight;
|
|
27
|
-
// Close dropdown if trigger is scrolled out of view
|
|
28
|
-
if (triggerRect.bottom < 0 || triggerRect.top > viewportHeight) {
|
|
29
|
-
this.close();
|
|
30
|
-
}
|
|
31
|
-
// With absolute positioning, the dropdown moves with the trigger automatically
|
|
32
|
-
// so no need to recalculate position on scroll
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
this._host = host;
|
|
36
|
-
this._host.addController(this);
|
|
37
|
-
}
|
|
38
|
-
hostConnected() {
|
|
39
|
-
window.addEventListener('resize', this.handleResize);
|
|
40
|
-
window.addEventListener('scroll', this.handleScroll, true);
|
|
41
|
-
}
|
|
42
|
-
hostDisconnected() {
|
|
43
|
-
this.close();
|
|
44
|
-
window.removeEventListener('resize', this.handleResize);
|
|
45
|
-
window.removeEventListener('scroll', this.handleScroll, true);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Check if dropdown is open
|
|
49
|
-
*/
|
|
50
|
-
get isOpen() {
|
|
51
|
-
return this._isOpen;
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Get current dropdown position
|
|
55
|
-
*/
|
|
56
|
-
get position() {
|
|
57
|
-
return Object.assign({}, this._position);
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* Open the dropdown
|
|
61
|
-
*/
|
|
62
|
-
open() {
|
|
63
|
-
try {
|
|
64
|
-
if (!this._isOpen) {
|
|
65
|
-
this._isOpen = true;
|
|
66
|
-
this._host.show = true;
|
|
67
|
-
this._host.requestUpdate();
|
|
68
|
-
// Always refresh elements before calculating position
|
|
69
|
-
this.findElements();
|
|
70
|
-
// Calculate position after DOM update
|
|
71
|
-
setTimeout(() => {
|
|
72
|
-
this.calculatePosition();
|
|
73
|
-
}, 0);
|
|
74
|
-
// Notify host to setup event listeners if available
|
|
75
|
-
if (this._host && typeof this._host.setupEventListeners === 'function') {
|
|
76
|
-
setTimeout(() => {
|
|
77
|
-
this._host.setupEventListeners();
|
|
78
|
-
}, 0);
|
|
79
|
-
}
|
|
80
|
-
this._host.dispatchEvent(new CustomEvent('dropdown-open', {
|
|
81
|
-
bubbles: true,
|
|
82
|
-
composed: true,
|
|
83
|
-
}));
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch (error) {
|
|
87
|
-
this.handleError(error, 'open');
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Close the dropdown
|
|
92
|
-
*/
|
|
93
|
-
close() {
|
|
94
|
-
try {
|
|
95
|
-
if (this._isOpen) {
|
|
96
|
-
this._isOpen = false;
|
|
97
|
-
this._host.show = false;
|
|
98
|
-
this.resetPosition();
|
|
99
|
-
this._host.requestUpdate();
|
|
100
|
-
// Notify host to remove event listeners if available
|
|
101
|
-
if (this._host && typeof this._host.removeEventListeners === 'function') {
|
|
102
|
-
this._host.removeEventListeners();
|
|
103
|
-
}
|
|
104
|
-
this._host.dispatchEvent(new CustomEvent('dropdown-close', {
|
|
105
|
-
bubbles: true,
|
|
106
|
-
composed: true,
|
|
107
|
-
}));
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
this.handleError(error, 'close');
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Toggle dropdown visibility
|
|
116
|
-
*/
|
|
117
|
-
toggle() {
|
|
118
|
-
if (this._isOpen) {
|
|
119
|
-
this.close();
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
this.open();
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Calculate optimal dropdown placement
|
|
127
|
-
*/
|
|
128
|
-
calculatePosition() {
|
|
129
|
-
var _a;
|
|
130
|
-
try {
|
|
131
|
-
if (!this._dropdownElement || !this._triggerElement) {
|
|
132
|
-
this.findElements();
|
|
133
|
-
}
|
|
134
|
-
if (!this._dropdownElement || !this._triggerElement) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
const triggerRect = this._triggerElement.getBoundingClientRect();
|
|
138
|
-
const viewportHeight = ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || window.innerHeight;
|
|
139
|
-
// Calculate available space for determining placement
|
|
140
|
-
const spaceBelow = viewportHeight - triggerRect.bottom;
|
|
141
|
-
const spaceAbove = triggerRect.top;
|
|
142
|
-
// Get the actual height of the dropdown element for accurate placement calculation
|
|
143
|
-
let dropdownHeight = 200; // fallback
|
|
144
|
-
if (this._dropdownElement) {
|
|
145
|
-
// Temporarily make it visible to measure height
|
|
146
|
-
const originalDisplay = this._dropdownElement.style.display;
|
|
147
|
-
const originalVisibility = this._dropdownElement.style.visibility;
|
|
148
|
-
const originalPosition = this._dropdownElement.style.position;
|
|
149
|
-
this._dropdownElement.style.visibility = 'hidden';
|
|
150
|
-
this._dropdownElement.style.display = 'block';
|
|
151
|
-
this._dropdownElement.style.position = 'absolute';
|
|
152
|
-
dropdownHeight = this._dropdownElement.offsetHeight || this._dropdownElement.scrollHeight || 200;
|
|
153
|
-
// Restore original styles
|
|
154
|
-
this._dropdownElement.style.display = originalDisplay;
|
|
155
|
-
this._dropdownElement.style.visibility = originalVisibility;
|
|
156
|
-
this._dropdownElement.style.position = originalPosition;
|
|
157
|
-
}
|
|
158
|
-
const placement = this.determineOptimalPlacement(dropdownHeight, spaceAbove, spaceBelow);
|
|
159
|
-
// Store the placement for applyPosition to use
|
|
160
|
-
this._position = {
|
|
161
|
-
left: 0,
|
|
162
|
-
width: 0,
|
|
163
|
-
placement,
|
|
164
|
-
top: 0 // Not used with absolute positioning
|
|
165
|
-
};
|
|
166
|
-
this.applyPosition();
|
|
167
|
-
}
|
|
168
|
-
catch (error) {
|
|
169
|
-
this.handleError(error, 'calculatePosition');
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Reset dropdown position
|
|
174
|
-
*/
|
|
175
|
-
resetPosition() {
|
|
176
|
-
try {
|
|
177
|
-
if (this._dropdownElement) {
|
|
178
|
-
this._dropdownElement.style.removeProperty('position');
|
|
179
|
-
this._dropdownElement.style.removeProperty('top');
|
|
180
|
-
this._dropdownElement.style.removeProperty('left');
|
|
181
|
-
this._dropdownElement.style.removeProperty('width');
|
|
182
|
-
this._dropdownElement.style.removeProperty('max-height');
|
|
183
|
-
this._dropdownElement.style.removeProperty('min-height');
|
|
184
|
-
this._dropdownElement.style.removeProperty('height');
|
|
185
|
-
this._dropdownElement.style.removeProperty('overflow-y');
|
|
186
|
-
this._dropdownElement.style.removeProperty('transform');
|
|
187
|
-
this._dropdownElement.style.removeProperty('display');
|
|
188
|
-
this._dropdownElement.style.removeProperty('opacity');
|
|
189
|
-
this._dropdownElement.style.removeProperty('visibility');
|
|
190
|
-
this._dropdownElement.style.removeProperty('z-index');
|
|
191
|
-
this._dropdownElement.classList.remove('placement-top', 'placement-bottom');
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
catch (error) {
|
|
195
|
-
this.handleError(error, 'resetPosition');
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Set dropdown and trigger element references
|
|
200
|
-
*/
|
|
201
|
-
setElements(dropdownElement, triggerElement) {
|
|
202
|
-
this._dropdownElement = dropdownElement;
|
|
203
|
-
this._triggerElement = triggerElement;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Find dropdown and trigger elements
|
|
207
|
-
*/
|
|
208
|
-
findElements() {
|
|
209
|
-
try {
|
|
210
|
-
// If elements are already set via setElements(), don't override them
|
|
211
|
-
if (this._dropdownElement && this._triggerElement) {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
const hostElement = this._host;
|
|
215
|
-
// First priority: use the elements that were explicitly set via setElements()
|
|
216
|
-
// This ensures each instance gets its own elements
|
|
217
|
-
if (hostElement.optionsElement && hostElement.wrapper) {
|
|
218
|
-
this._dropdownElement = hostElement.optionsElement;
|
|
219
|
-
this._triggerElement = hostElement.wrapper;
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
// Fallback: try to find from shadow DOM (but this can be problematic with multiple instances)
|
|
223
|
-
if (hostElement.shadowRoot) {
|
|
224
|
-
this._dropdownElement = hostElement.shadowRoot.querySelector('.calendar-container, .month-dropdown, .year-dropdown');
|
|
225
|
-
this._triggerElement = hostElement.shadowRoot.querySelector('.datepicker-input, .toggle-month-view, .toggle-year-view');
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
catch (error) {
|
|
229
|
-
this.handleError(error, 'findElements');
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Determine optimal dropdown placement
|
|
234
|
-
*/
|
|
235
|
-
determineOptimalPlacement(dropdownHeight, spaceAbove, spaceBelow) {
|
|
236
|
-
// If there's enough space below, use bottom
|
|
237
|
-
if (spaceBelow >= dropdownHeight) {
|
|
238
|
-
return 'bottom';
|
|
239
|
-
}
|
|
240
|
-
// If there's enough space above, use top
|
|
241
|
-
if (spaceAbove >= dropdownHeight) {
|
|
242
|
-
return 'top';
|
|
243
|
-
}
|
|
244
|
-
// If neither has enough space, choose the side with more space
|
|
245
|
-
// This ensures the dropdown appears even in constrained spaces
|
|
246
|
-
return spaceAbove > spaceBelow ? 'top' : 'bottom';
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Apply calculated position to dropdown element
|
|
250
|
-
*/
|
|
251
|
-
applyPosition() {
|
|
252
|
-
var _a;
|
|
253
|
-
try {
|
|
254
|
-
if (!this._dropdownElement || !this._triggerElement) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
const { placement } = this._position;
|
|
258
|
-
// Get the exact wrapper width including borders
|
|
259
|
-
const triggerBounds = this._triggerElement.getBoundingClientRect();
|
|
260
|
-
const wrapperWidth = triggerBounds.width;
|
|
261
|
-
// Use absolute positioning relative to the trigger element (combobox)
|
|
262
|
-
this._dropdownElement.style.position = 'absolute';
|
|
263
|
-
this._dropdownElement.style.left = '0';
|
|
264
|
-
this._dropdownElement.style.right = 'auto';
|
|
265
|
-
this._dropdownElement.style.width = `${wrapperWidth}px`; // Exact wrapper width in pixels
|
|
266
|
-
this._dropdownElement.style.zIndex = '1000';
|
|
267
|
-
this._dropdownElement.style.height = 'auto';
|
|
268
|
-
this._dropdownElement.style.maxHeight = 'none';
|
|
269
|
-
this._dropdownElement.style.minHeight = 'auto';
|
|
270
|
-
// Set position based on placement
|
|
271
|
-
console.log(`Applying ${placement} placement to dropdown`);
|
|
272
|
-
if (placement === 'bottom') {
|
|
273
|
-
this._dropdownElement.style.top = '100%';
|
|
274
|
-
this._dropdownElement.style.bottom = 'auto';
|
|
275
|
-
console.log('Applied bottom placement: top=100%, bottom=auto');
|
|
276
|
-
}
|
|
277
|
-
else {
|
|
278
|
-
this._dropdownElement.style.top = 'auto';
|
|
279
|
-
this._dropdownElement.style.bottom = '100%';
|
|
280
|
-
console.log('Applied top placement: top=auto, bottom=100%');
|
|
281
|
-
}
|
|
282
|
-
// Force a layout to get the natural content height
|
|
283
|
-
const naturalHeight = this._dropdownElement.scrollHeight;
|
|
284
|
-
// Now calculate available space for constraining
|
|
285
|
-
const viewportHeight = ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || window.innerHeight;
|
|
286
|
-
let availableSpace;
|
|
287
|
-
// Calculate available space using bounds we already calculated
|
|
288
|
-
if (placement === 'bottom') {
|
|
289
|
-
// For bottom placement, available space is from trigger bottom to viewport bottom
|
|
290
|
-
availableSpace = viewportHeight - triggerBounds.bottom - 10; // 10px margin from bottom
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
// For top placement, available space is from viewport top to trigger top
|
|
294
|
-
availableSpace = triggerBounds.top - 10; // 10px margin from top
|
|
295
|
-
}
|
|
296
|
-
// Apply the calculated constraints
|
|
297
|
-
if (naturalHeight > availableSpace) {
|
|
298
|
-
// Content is larger than available space, so constrain and add scrolling
|
|
299
|
-
this._dropdownElement.style.maxHeight = `${availableSpace}px`;
|
|
300
|
-
this._dropdownElement.style.overflowY = 'auto';
|
|
301
|
-
}
|
|
302
|
-
else {
|
|
303
|
-
// Content fits, so use natural height with auto overflow for consistency
|
|
304
|
-
this._dropdownElement.style.maxHeight = `${naturalHeight}px`;
|
|
305
|
-
this._dropdownElement.style.overflowY = 'auto';
|
|
306
|
-
}
|
|
307
|
-
// Add placement class for styling
|
|
308
|
-
this._dropdownElement.classList.remove('placement-top', 'placement-bottom');
|
|
309
|
-
this._dropdownElement.classList.add(`placement-${placement}`);
|
|
310
|
-
// Position and constraints applied successfully
|
|
311
|
-
}
|
|
312
|
-
catch (error) {
|
|
313
|
-
this.handleError(error, 'applyPosition');
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Calculate available space around trigger
|
|
318
|
-
*/
|
|
319
|
-
getAvailableSpace() {
|
|
320
|
-
var _a, _b;
|
|
321
|
-
if (!this._triggerElement) {
|
|
322
|
-
return { above: 0, below: 0, left: 0, right: 0 };
|
|
323
|
-
}
|
|
324
|
-
const triggerRect = this._triggerElement.getBoundingClientRect();
|
|
325
|
-
const viewportHeight = ((_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) || window.innerHeight;
|
|
326
|
-
const viewportWidth = ((_b = window.visualViewport) === null || _b === void 0 ? void 0 : _b.width) || window.innerWidth;
|
|
327
|
-
return {
|
|
328
|
-
above: triggerRect.top,
|
|
329
|
-
below: viewportHeight - triggerRect.bottom,
|
|
330
|
-
left: triggerRect.left,
|
|
331
|
-
right: viewportWidth - triggerRect.right,
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Handle errors with fallback
|
|
336
|
-
*/
|
|
337
|
-
handleError(error, context) {
|
|
338
|
-
console.warn(`SharedDropdownController [${context}]:`, error);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
//# sourceMappingURL=dropdown.controller.js.map
|
package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/dropdown.interface.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared dropdown controller interface
|
|
3
|
-
*/
|
|
4
|
-
export interface DropdownPosition {
|
|
5
|
-
top: number;
|
|
6
|
-
left: number;
|
|
7
|
-
width: number;
|
|
8
|
-
placement: 'bottom' | 'top';
|
|
9
|
-
}
|
|
10
|
-
export interface DropdownSpace {
|
|
11
|
-
above: number;
|
|
12
|
-
below: number;
|
|
13
|
-
left: number;
|
|
14
|
-
right: number;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Host interface for components using dropdown functionality
|
|
18
|
-
*/
|
|
19
|
-
export interface DropdownHost {
|
|
20
|
-
requestUpdate(): void;
|
|
21
|
-
dispatchEvent(event: Event): boolean;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Dropdown controller interface
|
|
25
|
-
*/
|
|
26
|
-
export interface DropdownController {
|
|
27
|
-
readonly isOpen: boolean;
|
|
28
|
-
readonly position: DropdownPosition;
|
|
29
|
-
open(): void;
|
|
30
|
-
close(): void;
|
|
31
|
-
toggle(): void;
|
|
32
|
-
calculatePosition(): void;
|
|
33
|
-
resetPosition(): void;
|
|
34
|
-
setElements(dropdownElement: HTMLElement, triggerElement: HTMLElement): void;
|
|
35
|
-
getAvailableSpace(): DropdownSpace;
|
|
36
|
-
}
|
|
37
|
-
//# sourceMappingURL=dropdown.interface.d.ts.map
|
package/components/ui/nuraly-ui/packages/common/dist/shared/controllers/theme.controller.d.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
4
|
-
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/
|
|
6
|
-
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
7
|
-
import { ThemeVariant } from '../themes.js';
|
|
8
|
-
/**
|
|
9
|
-
* Theme controller that observes and reacts to theme changes on the host element or its parents
|
|
10
|
-
* This controller watches for data-theme attribute changes and triggers re-renders
|
|
11
|
-
*/
|
|
12
|
-
export declare class ThemeController implements ReactiveController {
|
|
13
|
-
private host;
|
|
14
|
-
private observer?;
|
|
15
|
-
private _currentTheme;
|
|
16
|
-
constructor(host: ReactiveControllerHost & HTMLElement);
|
|
17
|
-
/**
|
|
18
|
-
* Get the current theme variant
|
|
19
|
-
*/
|
|
20
|
-
get currentTheme(): ThemeVariant | null;
|
|
21
|
-
/**
|
|
22
|
-
* Check if the current theme is a dark variant
|
|
23
|
-
*/
|
|
24
|
-
get isDark(): boolean;
|
|
25
|
-
/**
|
|
26
|
-
* Check if the current theme is a light variant
|
|
27
|
-
*/
|
|
28
|
-
get isLight(): boolean;
|
|
29
|
-
/**
|
|
30
|
-
* Get the theme system (default, carbon)
|
|
31
|
-
*/
|
|
32
|
-
get themeSystem(): string;
|
|
33
|
-
hostConnected(): void;
|
|
34
|
-
hostDisconnected(): void;
|
|
35
|
-
private updateTheme;
|
|
36
|
-
private setupObserver;
|
|
37
|
-
private cleanup;
|
|
38
|
-
/**
|
|
39
|
-
* Apply a theme to the closest themed ancestor or the host element
|
|
40
|
-
* @param theme - The theme variant to apply
|
|
41
|
-
*/
|
|
42
|
-
applyTheme(theme: ThemeVariant): void;
|
|
43
|
-
/**
|
|
44
|
-
* Toggle between light and dark variants of the current theme
|
|
45
|
-
*/
|
|
46
|
-
toggleVariant(): void;
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=theme.controller.d.ts.map
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
4
|
-
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/
|
|
6
|
-
import { getCurrentTheme } from '../themes.js';
|
|
7
|
-
/**
|
|
8
|
-
* Theme controller that observes and reacts to theme changes on the host element or its parents
|
|
9
|
-
* This controller watches for data-theme attribute changes and triggers re-renders
|
|
10
|
-
*/
|
|
11
|
-
export class ThemeController {
|
|
12
|
-
constructor(host) {
|
|
13
|
-
this._currentTheme = null;
|
|
14
|
-
this.host = host;
|
|
15
|
-
host.addController(this);
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Get the current theme variant
|
|
19
|
-
*/
|
|
20
|
-
get currentTheme() {
|
|
21
|
-
return this._currentTheme;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Check if the current theme is a dark variant
|
|
25
|
-
*/
|
|
26
|
-
get isDark() {
|
|
27
|
-
var _a, _b;
|
|
28
|
-
return (_b = (_a = this._currentTheme) === null || _a === void 0 ? void 0 : _a.includes('dark')) !== null && _b !== void 0 ? _b : false;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Check if the current theme is a light variant
|
|
32
|
-
*/
|
|
33
|
-
get isLight() {
|
|
34
|
-
var _a, _b;
|
|
35
|
-
return (_b = (_a = this._currentTheme) === null || _a === void 0 ? void 0 : _a.includes('light')) !== null && _b !== void 0 ? _b : true;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Get the theme system (default, carbon)
|
|
39
|
-
*/
|
|
40
|
-
get themeSystem() {
|
|
41
|
-
if (!this._currentTheme)
|
|
42
|
-
return 'default';
|
|
43
|
-
if (this._currentTheme.startsWith('carbon'))
|
|
44
|
-
return 'carbon';
|
|
45
|
-
return 'default';
|
|
46
|
-
}
|
|
47
|
-
hostConnected() {
|
|
48
|
-
this.updateTheme();
|
|
49
|
-
this.setupObserver();
|
|
50
|
-
}
|
|
51
|
-
hostDisconnected() {
|
|
52
|
-
this.cleanup();
|
|
53
|
-
}
|
|
54
|
-
updateTheme() {
|
|
55
|
-
const newTheme = getCurrentTheme(this.host);
|
|
56
|
-
if (newTheme !== this._currentTheme) {
|
|
57
|
-
this._currentTheme = newTheme;
|
|
58
|
-
this.host.requestUpdate();
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
setupObserver() {
|
|
62
|
-
this.cleanup();
|
|
63
|
-
// Create a mutation observer to watch for theme changes
|
|
64
|
-
this.observer = new MutationObserver((mutations) => {
|
|
65
|
-
let shouldUpdate = false;
|
|
66
|
-
mutations.forEach((mutation) => {
|
|
67
|
-
if (mutation.type === 'attributes' &&
|
|
68
|
-
mutation.attributeName === 'data-theme') {
|
|
69
|
-
shouldUpdate = true;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
if (shouldUpdate) {
|
|
73
|
-
this.updateTheme();
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
// Start observing the host element and its ancestors
|
|
77
|
-
let element = this.host;
|
|
78
|
-
while (element) {
|
|
79
|
-
this.observer.observe(element, {
|
|
80
|
-
attributes: true,
|
|
81
|
-
attributeFilter: ['data-theme']
|
|
82
|
-
});
|
|
83
|
-
element = element.parentElement;
|
|
84
|
-
}
|
|
85
|
-
// Also observe the document.body for theme changes
|
|
86
|
-
if (typeof document !== 'undefined' && document.body) {
|
|
87
|
-
this.observer.observe(document.body, {
|
|
88
|
-
attributes: true,
|
|
89
|
-
attributeFilter: ['data-theme']
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
cleanup() {
|
|
94
|
-
if (this.observer) {
|
|
95
|
-
this.observer.disconnect();
|
|
96
|
-
this.observer = undefined;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Apply a theme to the closest themed ancestor or the host element
|
|
101
|
-
* @param theme - The theme variant to apply
|
|
102
|
-
*/
|
|
103
|
-
applyTheme(theme) {
|
|
104
|
-
// Find the closest element with a data-theme attribute, or use the host
|
|
105
|
-
let targetElement = this.host;
|
|
106
|
-
while (targetElement && !targetElement.hasAttribute('data-theme')) {
|
|
107
|
-
targetElement = targetElement.parentElement;
|
|
108
|
-
}
|
|
109
|
-
if (!targetElement) {
|
|
110
|
-
targetElement = this.host;
|
|
111
|
-
}
|
|
112
|
-
targetElement.setAttribute('data-theme', theme);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Toggle between light and dark variants of the current theme
|
|
116
|
-
*/
|
|
117
|
-
toggleVariant() {
|
|
118
|
-
const currentTheme = this._currentTheme || 'default-light';
|
|
119
|
-
const toggleMap = {
|
|
120
|
-
'default-light': 'default-dark',
|
|
121
|
-
'default-dark': 'default-light',
|
|
122
|
-
'carbon-light': 'carbon-dark',
|
|
123
|
-
'carbon-dark': 'carbon-light',
|
|
124
|
-
'light': 'dark',
|
|
125
|
-
'dark': 'light'
|
|
126
|
-
};
|
|
127
|
-
const newTheme = toggleMap[currentTheme];
|
|
128
|
-
if (newTheme) {
|
|
129
|
-
this.applyTheme(newTheme);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
//# sourceMappingURL=theme.controller.js.map
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2023 Nuraly, Laabidi Aymen
|
|
4
|
-
* SPDX-License-Identifier: MIT
|
|
5
|
-
*/
|
|
6
|
-
import { LitElement } from 'lit';
|
|
7
|
-
/**
|
|
8
|
-
* Interface for components that need dependency validation
|
|
9
|
-
*/
|
|
10
|
-
export interface DependencyAware {
|
|
11
|
-
requiredComponents: string[];
|
|
12
|
-
validateDependencies(): void;
|
|
13
|
-
isComponentAvailable(componentName: string): boolean;
|
|
14
|
-
}
|
|
15
|
-
declare type Constructor<T = {}> = new (...args: any[]) => T;
|
|
16
|
-
/**
|
|
17
|
-
* Mixin that adds dependency validation functionality to LitElement components
|
|
18
|
-
*
|
|
19
|
-
* @param superClass - The base class to extend (typically LitElement)
|
|
20
|
-
* @returns Enhanced class with dependency validation capabilities
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```typescript
|
|
24
|
-
* @customElement('my-component')
|
|
25
|
-
* export class MyComponent extends DependencyValidationMixin(LitElement) {
|
|
26
|
-
* requiredComponents = ['nr-icon', 'hy-tooltip'];
|
|
27
|
-
*
|
|
28
|
-
* override connectedCallback() {
|
|
29
|
-
* super.connectedCallback();
|
|
30
|
-
* this.validateDependencies();
|
|
31
|
-
* }
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
export declare const DependencyValidationMixin: <T extends Constructor<LitElement>>(superClass: T) => Constructor<DependencyAware> & T;
|
|
36
|
-
export {};
|
|
37
|
-
//# sourceMappingURL=dependency-mixin.d.ts.map
|