@nuraly/lumenui 0.1.0
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/LICENSE +28 -0
- package/README.md +248 -0
- package/dist/nuralyui.bundle.js +29209 -0
- package/dist/nuralyui.bundle.js.gz +0 -0
- package/dist/src/components/alert/alert.component.d.ts +103 -0
- package/dist/src/components/alert/alert.component.js +225 -0
- package/dist/src/components/alert/alert.style.d.ts +14 -0
- package/dist/src/components/alert/alert.style.js +191 -0
- package/dist/src/components/alert/alert.types.d.ts +46 -0
- package/dist/src/components/alert/alert.types.js +7 -0
- package/dist/src/components/alert/bundle.js +231 -0
- package/dist/src/components/alert/bundle.js.gz +0 -0
- package/dist/src/components/alert/index.d.ts +8 -0
- package/dist/src/components/alert/index.js +8 -0
- package/dist/src/components/alert/react.d.ts +5 -0
- package/dist/src/components/alert/react.js +17 -0
- package/dist/src/components/badge/badge.component.d.ts +148 -0
- package/dist/src/components/badge/badge.component.js +270 -0
- package/dist/src/components/badge/badge.style.d.ts +14 -0
- package/dist/src/components/badge/badge.style.js +250 -0
- package/dist/src/components/badge/badge.types.d.ts +84 -0
- package/dist/src/components/badge/badge.types.js +7 -0
- package/dist/src/components/badge/bundle.js +277 -0
- package/dist/src/components/badge/bundle.js.gz +0 -0
- package/dist/src/components/badge/index.d.ts +2 -0
- package/dist/src/components/badge/index.js +2 -0
- package/dist/src/components/badge/react.d.ts +3 -0
- package/dist/src/components/badge/react.js +10 -0
- package/dist/src/components/breadcrumb/breadcrumb.component.d.ts +121 -0
- package/dist/src/components/breadcrumb/breadcrumb.component.js +257 -0
- package/dist/src/components/breadcrumb/breadcrumb.style.d.ts +14 -0
- package/dist/src/components/breadcrumb/breadcrumb.style.js +153 -0
- package/dist/src/components/breadcrumb/breadcrumb.types.d.ts +63 -0
- package/dist/src/components/breadcrumb/breadcrumb.types.js +7 -0
- package/dist/src/components/breadcrumb/bundle.js +213 -0
- package/dist/src/components/breadcrumb/bundle.js.gz +0 -0
- package/dist/src/components/breadcrumb/index.d.ts +2 -0
- package/dist/src/components/breadcrumb/index.js +2 -0
- package/dist/src/components/breadcrumb/react.d.ts +5 -0
- package/dist/src/components/breadcrumb/react.js +12 -0
- package/dist/src/components/button/bundle.js +606 -0
- package/dist/src/components/button/bundle.js.gz +0 -0
- package/dist/src/components/button/button.component.d.ts +96 -0
- package/dist/src/components/button/button.component.js +312 -0
- package/dist/src/components/button/button.style.d.ts +10 -0
- package/dist/src/components/button/button.style.js +535 -0
- package/dist/src/components/button/button.types.d.ts +57 -0
- package/dist/src/components/button/button.types.js +2 -0
- package/dist/src/components/button/index.d.ts +2 -0
- package/dist/src/components/button/index.js +2 -0
- package/dist/src/components/button/react.d.ts +5 -0
- package/dist/src/components/button/react.js +12 -0
- package/dist/src/components/canvas/base-canvas.component.d.ts +177 -0
- package/dist/src/components/canvas/base-canvas.component.js +865 -0
- package/dist/src/components/canvas/bundle.js +16664 -0
- package/dist/src/components/canvas/bundle.js.gz +0 -0
- package/dist/src/components/canvas/canvas.component.d.ts +2 -0
- package/dist/src/components/canvas/canvas.component.js +295 -0
- package/dist/src/components/canvas/canvas.constants.d.ts +66 -0
- package/dist/src/components/canvas/canvas.constants.js +61 -0
- package/dist/src/components/canvas/chatbot-panel.style.d.ts +11 -0
- package/dist/src/components/canvas/chatbot-panel.style.js +189 -0
- package/dist/src/components/canvas/index.d.ts +13 -0
- package/dist/src/components/canvas/index.js +21 -0
- package/dist/src/components/canvas/react.d.ts +354 -0
- package/dist/src/components/canvas/react.js +41 -0
- package/dist/src/components/canvas/whiteboard-canvas.component.d.ts +63 -0
- package/dist/src/components/canvas/whiteboard-canvas.component.js +356 -0
- package/dist/src/components/canvas/whiteboard-canvas.style.d.ts +7 -0
- package/dist/src/components/canvas/whiteboard-canvas.style.js +1011 -0
- package/dist/src/components/canvas/whiteboard-node.component.d.ts +87 -0
- package/dist/src/components/canvas/whiteboard-node.component.js +809 -0
- package/dist/src/components/canvas/whiteboard-node.style.d.ts +7 -0
- package/dist/src/components/canvas/whiteboard-node.style.js +775 -0
- package/dist/src/components/canvas/workflow-canvas.component.d.ts +150 -0
- package/dist/src/components/canvas/workflow-canvas.component.js +1468 -0
- package/dist/src/components/canvas/workflow-canvas.style.d.ts +8 -0
- package/dist/src/components/canvas/workflow-canvas.style.js +2903 -0
- package/dist/src/components/canvas/workflow-canvas.types.d.ts +710 -0
- package/dist/src/components/canvas/workflow-canvas.types.js +2305 -0
- package/dist/src/components/canvas/workflow-node.component.d.ts +96 -0
- package/dist/src/components/canvas/workflow-node.component.js +752 -0
- package/dist/src/components/canvas/workflow-node.style.d.ts +8 -0
- package/dist/src/components/canvas/workflow-node.style.js +1053 -0
- package/dist/src/components/card/bundle.js +69 -0
- package/dist/src/components/card/bundle.js.gz +0 -0
- package/dist/src/components/card/card.component.d.ts +30 -0
- package/dist/src/components/card/card.component.js +64 -0
- package/dist/src/components/card/card.style.d.ts +2 -0
- package/dist/src/components/card/card.style.js +62 -0
- package/dist/src/components/card/card.types.d.ts +17 -0
- package/dist/src/components/card/card.types.js +2 -0
- package/dist/src/components/card/index.d.ts +3 -0
- package/dist/src/components/card/index.js +3 -0
- package/dist/src/components/card/react.d.ts +5 -0
- package/dist/src/components/card/react.js +12 -0
- package/dist/src/components/carousel/bundle.js +96 -0
- package/dist/src/components/carousel/bundle.js.gz +0 -0
- package/dist/src/components/carousel/carousel.component.d.ts +19 -0
- package/dist/src/components/carousel/carousel.component.js +128 -0
- package/dist/src/components/carousel/carousel.style.d.ts +2 -0
- package/dist/src/components/carousel/carousel.style.js +68 -0
- package/dist/src/components/carousel/index.d.ts +2 -0
- package/dist/src/components/carousel/index.js +2 -0
- package/dist/src/components/carousel/react.d.ts +5 -0
- package/dist/src/components/carousel/react.js +12 -0
- package/dist/src/components/chatbot/bundle.js +2527 -0
- package/dist/src/components/chatbot/bundle.js.gz +0 -0
- package/dist/src/components/chatbot/chatbot.component.d.ts +215 -0
- package/dist/src/components/chatbot/chatbot.component.js +1097 -0
- package/dist/src/components/chatbot/chatbot.style.d.ts +3 -0
- package/dist/src/components/chatbot/chatbot.style.js +1638 -0
- package/dist/src/components/chatbot/chatbot.types.d.ts +246 -0
- package/dist/src/components/chatbot/chatbot.types.js +124 -0
- package/dist/src/components/chatbot/index.d.ts +13 -0
- package/dist/src/components/chatbot/index.js +20 -0
- package/dist/src/components/chatbot/react.d.ts +54 -0
- package/dist/src/components/chatbot/react.js +55 -0
- package/dist/src/components/checkbox/bundle.js +352 -0
- package/dist/src/components/checkbox/bundle.js.gz +0 -0
- package/dist/src/components/checkbox/checkbox.component.d.ts +62 -0
- package/dist/src/components/checkbox/checkbox.component.js +178 -0
- package/dist/src/components/checkbox/checkbox.style.d.ts +2 -0
- package/dist/src/components/checkbox/checkbox.style.js +323 -0
- package/dist/src/components/checkbox/checkbox.types.d.ts +6 -0
- package/dist/src/components/checkbox/checkbox.types.js +2 -0
- package/dist/src/components/checkbox/index.d.ts +2 -0
- package/dist/src/components/checkbox/index.js +2 -0
- package/dist/src/components/checkbox/react.d.ts +5 -0
- package/dist/src/components/checkbox/react.js +12 -0
- package/dist/src/components/code-editor/bundle.js +55 -0
- package/dist/src/components/code-editor/bundle.js.gz +0 -0
- package/dist/src/components/code-editor/code-editor.component.d.ts +119 -0
- package/dist/src/components/code-editor/code-editor.component.js +532 -0
- package/dist/src/components/code-editor/code-editor.style.d.ts +7 -0
- package/dist/src/components/code-editor/code-editor.style.js +39 -0
- package/dist/src/components/code-editor/code-editor.types.d.ts +39 -0
- package/dist/src/components/code-editor/code-editor.types.js +22 -0
- package/dist/src/components/code-editor/index.d.ts +9 -0
- package/dist/src/components/code-editor/index.js +9 -0
- package/dist/src/components/collapse/bundle.js +308 -0
- package/dist/src/components/collapse/bundle.js.gz +0 -0
- package/dist/src/components/collapse/collapse.component.d.ts +93 -0
- package/dist/src/components/collapse/collapse.component.js +322 -0
- package/dist/src/components/collapse/collapse.style.d.ts +11 -0
- package/dist/src/components/collapse/collapse.style.js +234 -0
- package/dist/src/components/collapse/collapse.type.d.ts +79 -0
- package/dist/src/components/collapse/collapse.type.js +11 -0
- package/dist/src/components/collapse/index.d.ts +2 -0
- package/dist/src/components/collapse/index.js +2 -0
- package/dist/src/components/collapse/react.d.ts +6 -0
- package/dist/src/components/collapse/react.js +13 -0
- package/dist/src/components/colorpicker/bundle.js +242 -0
- package/dist/src/components/colorpicker/bundle.js.gz +0 -0
- package/dist/src/components/colorpicker/color-holder.component.d.ts +50 -0
- package/dist/src/components/colorpicker/color-holder.component.js +116 -0
- package/dist/src/components/colorpicker/color-holder.style.d.ts +2 -0
- package/dist/src/components/colorpicker/color-holder.style.js +45 -0
- package/dist/src/components/colorpicker/color-picker.component.d.ts +178 -0
- package/dist/src/components/colorpicker/color-picker.component.js +374 -0
- package/dist/src/components/colorpicker/color-picker.style.d.ts +10 -0
- package/dist/src/components/colorpicker/color-picker.style.js +86 -0
- package/dist/src/components/colorpicker/color-picker.types.d.ts +60 -0
- package/dist/src/components/colorpicker/color-picker.types.js +2 -0
- package/dist/src/components/colorpicker/default-color-sets.component.d.ts +45 -0
- package/dist/src/components/colorpicker/default-color-sets.component.js +121 -0
- package/dist/src/components/colorpicker/default-color-sets.style.d.ts +2 -0
- package/dist/src/components/colorpicker/default-color-sets.style.js +34 -0
- package/dist/src/components/colorpicker/index.d.ts +3 -0
- package/dist/src/components/colorpicker/index.js +3 -0
- package/dist/src/components/colorpicker/react.d.ts +6 -0
- package/dist/src/components/colorpicker/react.js +13 -0
- package/dist/src/components/console/react.d.ts +340 -0
- package/dist/src/components/console/react.js +13 -0
- package/dist/src/components/container/bundle.js +161 -0
- package/dist/src/components/container/bundle.js.gz +0 -0
- package/dist/src/components/container/container.component.d.ts +85 -0
- package/dist/src/components/container/container.component.js +223 -0
- package/dist/src/components/container/container.style.d.ts +6 -0
- package/dist/src/components/container/container.style.js +146 -0
- package/dist/src/components/container/container.types.d.ts +67 -0
- package/dist/src/components/container/container.types.js +5 -0
- package/dist/src/components/container/index.d.ts +3 -0
- package/dist/src/components/container/index.js +3 -0
- package/dist/src/components/container/react.d.ts +3 -0
- package/dist/src/components/container/react.js +10 -0
- package/dist/src/components/datepicker/bundle.js +706 -0
- package/dist/src/components/datepicker/bundle.js.gz +0 -0
- package/dist/src/components/datepicker/datepicker.component.d.ts +190 -0
- package/dist/src/components/datepicker/datepicker.component.js +673 -0
- package/dist/src/components/datepicker/datepicker.constant.d.ts +60 -0
- package/dist/src/components/datepicker/datepicker.constant.js +60 -0
- package/dist/src/components/datepicker/datepicker.style.d.ts +17 -0
- package/dist/src/components/datepicker/datepicker.style.js +453 -0
- package/dist/src/components/datepicker/datepicker.style.variables.d.ts +2 -0
- package/dist/src/components/datepicker/datepicker.style.variables.js +119 -0
- package/dist/src/components/datepicker/datepicker.types.d.ts +142 -0
- package/dist/src/components/datepicker/datepicker.types.js +75 -0
- package/dist/src/components/datepicker/index.d.ts +4 -0
- package/dist/src/components/datepicker/index.js +4 -0
- package/dist/src/components/datepicker/react.d.ts +16 -0
- package/dist/src/components/datepicker/react.js +23 -0
- package/dist/src/components/db-connection-select/bundle.js +308 -0
- package/dist/src/components/db-connection-select/bundle.js.gz +0 -0
- package/dist/src/components/db-connection-select/db-connection-select.component.d.ts +105 -0
- package/dist/src/components/db-connection-select/db-connection-select.component.js +573 -0
- package/dist/src/components/db-connection-select/index.d.ts +7 -0
- package/dist/src/components/db-connection-select/index.js +7 -0
- package/dist/src/components/divider/bundle.js +143 -0
- package/dist/src/components/divider/bundle.js.gz +0 -0
- package/dist/src/components/divider/divider.component.d.ts +90 -0
- package/dist/src/components/divider/divider.component.js +168 -0
- package/dist/src/components/divider/divider.style.d.ts +3 -0
- package/dist/src/components/divider/divider.style.js +139 -0
- package/dist/src/components/divider/divider.types.d.ts +55 -0
- package/dist/src/components/divider/divider.types.js +6 -0
- package/dist/src/components/divider/index.d.ts +3 -0
- package/dist/src/components/divider/index.js +3 -0
- package/dist/src/components/divider/react.d.ts +3 -0
- package/dist/src/components/divider/react.js +10 -0
- package/dist/src/components/document/bundle.js +242 -0
- package/dist/src/components/document/bundle.js.gz +0 -0
- package/dist/src/components/document/document.component.d.ts +27 -0
- package/dist/src/components/document/document.component.js +136 -0
- package/dist/src/components/document/document.style.d.ts +3 -0
- package/dist/src/components/document/document.style.js +210 -0
- package/dist/src/components/document/document.types.d.ts +68 -0
- package/dist/src/components/document/document.types.js +7 -0
- package/dist/src/components/document/index.d.ts +3 -0
- package/dist/src/components/document/index.js +3 -0
- package/dist/src/components/document/react.d.ts +8 -0
- package/dist/src/components/document/react.js +15 -0
- package/dist/src/components/dropdown/bundle.js +528 -0
- package/dist/src/components/dropdown/bundle.js.gz +0 -0
- package/dist/src/components/dropdown/dropdown.component.d.ts +120 -0
- package/dist/src/components/dropdown/dropdown.component.js +390 -0
- package/dist/src/components/dropdown/dropdown.style.d.ts +2 -0
- package/dist/src/components/dropdown/dropdown.style.js +460 -0
- package/dist/src/components/dropdown/dropdown.types.d.ts +99 -0
- package/dist/src/components/dropdown/dropdown.types.js +2 -0
- package/dist/src/components/dropdown/index.d.ts +3 -0
- package/dist/src/components/dropdown/index.js +3 -0
- package/dist/src/components/dropdown/react.d.ts +7 -0
- package/dist/src/components/dropdown/react.js +14 -0
- package/dist/src/components/file-upload/bundle.js +472 -0
- package/dist/src/components/file-upload/bundle.js.gz +0 -0
- package/dist/src/components/file-upload/file-upload.component.d.ts +43 -0
- package/dist/src/components/file-upload/file-upload.component.js +398 -0
- package/dist/src/components/file-upload/index.d.ts +2 -0
- package/dist/src/components/file-upload/index.js +2 -0
- package/dist/src/components/file-upload/react.d.ts +7 -0
- package/dist/src/components/file-upload/react.js +14 -0
- package/dist/src/components/file-upload/styles.d.ts +2 -0
- package/dist/src/components/file-upload/styles.js +373 -0
- package/dist/src/components/file-upload/types.d.ts +11 -0
- package/dist/src/components/file-upload/types.js +2 -0
- package/dist/src/components/file-upload/utils.d.ts +6 -0
- package/dist/src/components/file-upload/utils.js +24 -0
- package/dist/src/components/flex/bundle.js +114 -0
- package/dist/src/components/flex/bundle.js.gz +0 -0
- package/dist/src/components/flex/flex.component.d.ts +89 -0
- package/dist/src/components/flex/flex.component.js +178 -0
- package/dist/src/components/flex/flex.style.d.ts +6 -0
- package/dist/src/components/flex/flex.style.js +101 -0
- package/dist/src/components/flex/flex.types.d.ts +63 -0
- package/dist/src/components/flex/flex.types.js +5 -0
- package/dist/src/components/flex/index.d.ts +3 -0
- package/dist/src/components/flex/index.js +3 -0
- package/dist/src/components/flex/react.d.ts +3 -0
- package/dist/src/components/flex/react.js +10 -0
- package/dist/src/components/form/bundle.js +98 -0
- package/dist/src/components/form/bundle.js.gz +0 -0
- package/dist/src/components/form/form.component.d.ts +279 -0
- package/dist/src/components/form/form.component.js +644 -0
- package/dist/src/components/form/form.style.d.ts +7 -0
- package/dist/src/components/form/form.style.js +68 -0
- package/dist/src/components/form/form.types.d.ts +92 -0
- package/dist/src/components/form/form.types.js +38 -0
- package/dist/src/components/form/index.d.ts +10 -0
- package/dist/src/components/form/index.js +13 -0
- package/dist/src/components/grid/bundle.js +202 -0
- package/dist/src/components/grid/bundle.js.gz +0 -0
- package/dist/src/components/grid/col.component.d.ts +103 -0
- package/dist/src/components/grid/col.component.js +253 -0
- package/dist/src/components/grid/col.style.d.ts +6 -0
- package/dist/src/components/grid/col.style.js +117 -0
- package/dist/src/components/grid/grid.types.d.ts +80 -0
- package/dist/src/components/grid/grid.types.js +16 -0
- package/dist/src/components/grid/index.d.ts +4 -0
- package/dist/src/components/grid/index.js +4 -0
- package/dist/src/components/grid/react.d.ts +5 -0
- package/dist/src/components/grid/react.js +17 -0
- package/dist/src/components/grid/row.component.d.ts +83 -0
- package/dist/src/components/grid/row.component.js +197 -0
- package/dist/src/components/grid/row.style.d.ts +6 -0
- package/dist/src/components/grid/row.style.js +68 -0
- package/dist/src/components/icon/bundle.js +340 -0
- package/dist/src/components/icon/bundle.js.gz +0 -0
- package/dist/src/components/icon/icon.component.d.ts +64 -0
- package/dist/src/components/icon/icon.component.js +207 -0
- package/dist/src/components/icon/icon.style.d.ts +2 -0
- package/dist/src/components/icon/icon.style.js +211 -0
- package/dist/src/components/icon/icon.types.d.ts +5 -0
- package/dist/src/components/icon/icon.types.js +2 -0
- package/dist/src/components/icon/icon.variables.d.ts +17 -0
- package/dist/src/components/icon/icon.variables.js +132 -0
- package/dist/src/components/icon/index.d.ts +2 -0
- package/dist/src/components/icon/index.js +2 -0
- package/dist/src/components/icon/react.d.ts +3 -0
- package/dist/src/components/icon/react.js +9 -0
- package/dist/src/components/iconpicker/bundle.js +2811 -0
- package/dist/src/components/iconpicker/bundle.js.gz +0 -0
- package/dist/src/components/iconpicker/icon-picker.component.d.ts +119 -0
- package/dist/src/components/iconpicker/icon-picker.component.js +337 -0
- package/dist/src/components/iconpicker/icon-picker.constant.d.ts +15 -0
- package/dist/src/components/iconpicker/icon-picker.constant.js +31 -0
- package/dist/src/components/iconpicker/icon-picker.style.d.ts +8 -0
- package/dist/src/components/iconpicker/icon-picker.style.js +216 -0
- package/dist/src/components/iconpicker/icon-picker.types.d.ts +49 -0
- package/dist/src/components/iconpicker/icon-picker.types.js +7 -0
- package/dist/src/components/iconpicker/index.d.ts +9 -0
- package/dist/src/components/iconpicker/index.js +9 -0
- package/dist/src/components/iconpicker/react.d.ts +14 -0
- package/dist/src/components/iconpicker/react.js +21 -0
- package/dist/src/components/image/bundle.js +98 -0
- package/dist/src/components/image/bundle.js.gz +0 -0
- package/dist/src/components/image/image.component.d.ts +31 -0
- package/dist/src/components/image/image.component.js +143 -0
- package/dist/src/components/image/image.style.d.ts +3 -0
- package/dist/src/components/image/image.style.js +83 -0
- package/dist/src/components/image/image.types.d.ts +68 -0
- package/dist/src/components/image/image.types.js +7 -0
- package/dist/src/components/image/index.d.ts +3 -0
- package/dist/src/components/image/index.js +3 -0
- package/dist/src/components/image/react.d.ts +8 -0
- package/dist/src/components/image/react.js +15 -0
- package/dist/src/components/input/bundle.js +930 -0
- package/dist/src/components/input/bundle.js.gz +0 -0
- package/dist/src/components/input/index.d.ts +3 -0
- package/dist/src/components/input/index.js +3 -0
- package/dist/src/components/input/input.component.d.ts +174 -0
- package/dist/src/components/input/input.component.js +490 -0
- package/dist/src/components/input/input.style.d.ts +2 -0
- package/dist/src/components/input/input.style.js +810 -0
- package/dist/src/components/input/input.types.d.ts +127 -0
- package/dist/src/components/input/input.types.js +75 -0
- package/dist/src/components/input/react.d.ts +9 -0
- package/dist/src/components/input/react.js +16 -0
- package/dist/src/components/input/validation.d.ts +3 -0
- package/dist/src/components/input/validation.js +3 -0
- package/dist/src/components/kv-secret-select/bundle.js +183 -0
- package/dist/src/components/kv-secret-select/bundle.js.gz +0 -0
- package/dist/src/components/kv-secret-select/index.d.ts +2 -0
- package/dist/src/components/kv-secret-select/index.js +2 -0
- package/dist/src/components/kv-secret-select/kv-secret-select.component.d.ts +83 -0
- package/dist/src/components/kv-secret-select/kv-secret-select.component.js +360 -0
- package/dist/src/components/label/bundle.js +104 -0
- package/dist/src/components/label/bundle.js.gz +0 -0
- package/dist/src/components/label/index.d.ts +2 -0
- package/dist/src/components/label/index.js +2 -0
- package/dist/src/components/label/label.component.d.ts +18 -0
- package/dist/src/components/label/label.component.js +64 -0
- package/dist/src/components/label/label.style.d.ts +3 -0
- package/dist/src/components/label/label.style.js +70 -0
- package/dist/src/components/label/label.style.variables.d.ts +2 -0
- package/dist/src/components/label/label.style.variables.js +35 -0
- package/dist/src/components/label/label.types.d.ts +42 -0
- package/dist/src/components/label/label.types.js +2 -0
- package/dist/src/components/label/react.d.ts +339 -0
- package/dist/src/components/label/react.js +12 -0
- package/dist/src/components/layout/bundle.js +220 -0
- package/dist/src/components/layout/bundle.js.gz +0 -0
- package/dist/src/components/layout/content.component.d.ts +35 -0
- package/dist/src/components/layout/content.component.js +47 -0
- package/dist/src/components/layout/content.style.d.ts +2 -0
- package/dist/src/components/layout/content.style.js +17 -0
- package/dist/src/components/layout/footer.component.d.ts +38 -0
- package/dist/src/components/layout/footer.component.js +60 -0
- package/dist/src/components/layout/footer.style.d.ts +2 -0
- package/dist/src/components/layout/footer.style.js +17 -0
- package/dist/src/components/layout/header.component.d.ts +39 -0
- package/dist/src/components/layout/header.component.js +61 -0
- package/dist/src/components/layout/header.style.d.ts +2 -0
- package/dist/src/components/layout/header.style.js +19 -0
- package/dist/src/components/layout/index.d.ts +8 -0
- package/dist/src/components/layout/index.js +7 -0
- package/dist/src/components/layout/layout.component.d.ts +50 -0
- package/dist/src/components/layout/layout.component.js +89 -0
- package/dist/src/components/layout/layout.style.d.ts +2 -0
- package/dist/src/components/layout/layout.style.js +23 -0
- package/dist/src/components/layout/layout.types.d.ts +75 -0
- package/dist/src/components/layout/layout.types.js +12 -0
- package/dist/src/components/layout/react.d.ts +14 -0
- package/dist/src/components/layout/react.js +37 -0
- package/dist/src/components/layout/sider.component.d.ts +116 -0
- package/dist/src/components/layout/sider.component.js +273 -0
- package/dist/src/components/layout/sider.style.d.ts +2 -0
- package/dist/src/components/layout/sider.style.js +104 -0
- package/dist/src/components/menu/bundle.js +520 -0
- package/dist/src/components/menu/bundle.js.gz +0 -0
- package/dist/src/components/menu/index.d.ts +4 -0
- package/dist/src/components/menu/index.js +2 -0
- package/dist/src/components/menu/menu.component.d.ts +87 -0
- package/dist/src/components/menu/menu.component.js +596 -0
- package/dist/src/components/menu/menu.constants.d.ts +12 -0
- package/dist/src/components/menu/menu.constants.js +14 -0
- package/dist/src/components/menu/menu.style.d.ts +2 -0
- package/dist/src/components/menu/menu.style.js +372 -0
- package/dist/src/components/menu/menu.types.d.ts +66 -0
- package/dist/src/components/menu/menu.types.js +7 -0
- package/dist/src/components/menu/react.d.ts +5 -0
- package/dist/src/components/menu/react.js +12 -0
- package/dist/src/components/modal/bundle.js +442 -0
- package/dist/src/components/modal/bundle.js.gz +0 -0
- package/dist/src/components/modal/index.d.ts +10 -0
- package/dist/src/components/modal/index.js +10 -0
- package/dist/src/components/modal/modal-manager.d.ts +72 -0
- package/dist/src/components/modal/modal-manager.js +170 -0
- package/dist/src/components/modal/modal.component.d.ts +121 -0
- package/dist/src/components/modal/modal.component.js +461 -0
- package/dist/src/components/modal/modal.style.d.ts +9 -0
- package/dist/src/components/modal/modal.style.js +369 -0
- package/dist/src/components/modal/modal.types.d.ts +105 -0
- package/dist/src/components/modal/modal.types.js +93 -0
- package/dist/src/components/modal/react.d.ts +9 -0
- package/dist/src/components/modal/react.js +16 -0
- package/dist/src/components/panel/bundle.js +1075 -0
- package/dist/src/components/panel/bundle.js.gz +0 -0
- package/dist/src/components/panel/index.d.ts +9 -0
- package/dist/src/components/panel/index.js +9 -0
- package/dist/src/components/panel/panel.component.d.ts +199 -0
- package/dist/src/components/panel/panel.component.js +720 -0
- package/dist/src/components/panel/panel.style.d.ts +7 -0
- package/dist/src/components/panel/panel.style.js +497 -0
- package/dist/src/components/panel/panel.types.d.ts +94 -0
- package/dist/src/components/panel/panel.types.js +50 -0
- package/dist/src/components/panel/react.d.ts +11 -0
- package/dist/src/components/panel/react.js +18 -0
- package/dist/src/components/popconfirm/bundle.js +438 -0
- package/dist/src/components/popconfirm/bundle.js.gz +0 -0
- package/dist/src/components/popconfirm/index.d.ts +4 -0
- package/dist/src/components/popconfirm/index.js +4 -0
- package/dist/src/components/popconfirm/popconfirm-manager.component.d.ts +129 -0
- package/dist/src/components/popconfirm/popconfirm-manager.component.js +372 -0
- package/dist/src/components/popconfirm/popconfirm-manager.style.d.ts +2 -0
- package/dist/src/components/popconfirm/popconfirm-manager.style.js +137 -0
- package/dist/src/components/popconfirm/popconfirm.component.d.ts +179 -0
- package/dist/src/components/popconfirm/popconfirm.component.js +409 -0
- package/dist/src/components/popconfirm/popconfirm.style.d.ts +2 -0
- package/dist/src/components/popconfirm/popconfirm.style.js +207 -0
- package/dist/src/components/popconfirm/popconfirm.types.d.ts +104 -0
- package/dist/src/components/popconfirm/popconfirm.types.js +2 -0
- package/dist/src/components/popconfirm/react.d.ts +7 -0
- package/dist/src/components/popconfirm/react.js +14 -0
- package/dist/src/components/radio/bundle.js +180 -0
- package/dist/src/components/radio/bundle.js.gz +0 -0
- package/dist/src/components/radio/index.d.ts +3 -0
- package/dist/src/components/radio/index.js +3 -0
- package/dist/src/components/radio/radio.component.d.ts +70 -0
- package/dist/src/components/radio/radio.component.js +187 -0
- package/dist/src/components/radio/radio.style.d.ts +7 -0
- package/dist/src/components/radio/radio.style.js +149 -0
- package/dist/src/components/radio/radio.types.d.ts +14 -0
- package/dist/src/components/radio/radio.types.js +15 -0
- package/dist/src/components/radio/react.d.ts +12 -0
- package/dist/src/components/radio/react.js +19 -0
- package/dist/src/components/radio-group/bundle.js +430 -0
- package/dist/src/components/radio-group/bundle.js.gz +0 -0
- package/dist/src/components/radio-group/index.d.ts +3 -0
- package/dist/src/components/radio-group/index.js +3 -0
- package/dist/src/components/radio-group/radio-group.component.d.ts +165 -0
- package/dist/src/components/radio-group/radio-group.component.js +437 -0
- package/dist/src/components/radio-group/radio-group.style.d.ts +7 -0
- package/dist/src/components/radio-group/radio-group.style.js +270 -0
- package/dist/src/components/radio-group/radio-group.types.d.ts +39 -0
- package/dist/src/components/radio-group/radio-group.types.js +29 -0
- package/dist/src/components/radio-group/radio.constant.d.ts +2 -0
- package/dist/src/components/radio-group/radio.constant.js +2 -0
- package/dist/src/components/radio-group/react.d.ts +10 -0
- package/dist/src/components/radio-group/react.js +17 -0
- package/dist/src/components/select/bundle.js +721 -0
- package/dist/src/components/select/bundle.js.gz +0 -0
- package/dist/src/components/select/index.d.ts +17 -0
- package/dist/src/components/select/index.js +20 -0
- package/dist/src/components/select/react.d.ts +19 -0
- package/dist/src/components/select/react.js +26 -0
- package/dist/src/components/select/select.component.d.ts +359 -0
- package/dist/src/components/select/select.component.js +775 -0
- package/dist/src/components/select/select.constant.d.ts +133 -0
- package/dist/src/components/select/select.constant.js +136 -0
- package/dist/src/components/select/select.style.d.ts +2 -0
- package/dist/src/components/select/select.style.js +533 -0
- package/dist/src/components/select/select.types.d.ts +100 -0
- package/dist/src/components/select/select.types.js +73 -0
- package/dist/src/components/skeleton/bundle.js +293 -0
- package/dist/src/components/skeleton/bundle.js.gz +0 -0
- package/dist/src/components/skeleton/index.d.ts +3 -0
- package/dist/src/components/skeleton/index.js +3 -0
- package/dist/src/components/skeleton/react.d.ts +3 -0
- package/dist/src/components/skeleton/react.js +10 -0
- package/dist/src/components/skeleton/skeleton.component.d.ts +165 -0
- package/dist/src/components/skeleton/skeleton.component.js +387 -0
- package/dist/src/components/skeleton/skeleton.style.d.ts +2 -0
- package/dist/src/components/skeleton/skeleton.style.js +224 -0
- package/dist/src/components/skeleton/skeleton.types.d.ts +82 -0
- package/dist/src/components/skeleton/skeleton.types.js +2 -0
- package/dist/src/components/slider-input/bundle.js +241 -0
- package/dist/src/components/slider-input/bundle.js.gz +0 -0
- package/dist/src/components/slider-input/index.d.ts +3 -0
- package/dist/src/components/slider-input/index.js +3 -0
- package/dist/src/components/slider-input/react.d.ts +340 -0
- package/dist/src/components/slider-input/react.js +13 -0
- package/dist/src/components/slider-input/slider-input.component.d.ts +38 -0
- package/dist/src/components/slider-input/slider-input.component.js +191 -0
- package/dist/src/components/slider-input/slider-input.style.d.ts +3 -0
- package/dist/src/components/slider-input/slider-input.style.js +171 -0
- package/dist/src/components/slider-input/slider-input.style.variables.d.ts +2 -0
- package/dist/src/components/slider-input/slider-input.style.variables.js +59 -0
- package/dist/src/components/slider-input/slider-input.types.d.ts +21 -0
- package/dist/src/components/slider-input/slider-input.types.js +6 -0
- package/dist/src/components/table/bundle.js +987 -0
- package/dist/src/components/table/bundle.js.gz +0 -0
- package/dist/src/components/table/index.d.ts +2 -0
- package/dist/src/components/table/index.js +2 -0
- package/dist/src/components/table/react.d.ts +7 -0
- package/dist/src/components/table/react.js +14 -0
- package/dist/src/components/table/table.component.d.ts +140 -0
- package/dist/src/components/table/table.component.js +433 -0
- package/dist/src/components/table/table.style.d.ts +3 -0
- package/dist/src/components/table/table.style.js +702 -0
- package/dist/src/components/table/table.types.d.ts +103 -0
- package/dist/src/components/table/table.types.js +2 -0
- package/dist/src/components/tabs/bundle.js +1782 -0
- package/dist/src/components/tabs/bundle.js.gz +0 -0
- package/dist/src/components/tabs/index.d.ts +9 -0
- package/dist/src/components/tabs/index.js +10 -0
- package/dist/src/components/tabs/react.d.ts +50 -0
- package/dist/src/components/tabs/react.js +50 -0
- package/dist/src/components/tabs/tabs.component.d.ts +100 -0
- package/dist/src/components/tabs/tabs.component.js +461 -0
- package/dist/src/components/tabs/tabs.constant.d.ts +20 -0
- package/dist/src/components/tabs/tabs.constant.js +21 -0
- package/dist/src/components/tabs/tabs.style.d.ts +9 -0
- package/dist/src/components/tabs/tabs.style.js +577 -0
- package/dist/src/components/tabs/tabs.types.d.ts +241 -0
- package/dist/src/components/tabs/tabs.types.js +13 -0
- package/dist/src/components/tag/bundle.js +108 -0
- package/dist/src/components/tag/bundle.js.gz +0 -0
- package/dist/src/components/tag/index.d.ts +2 -0
- package/dist/src/components/tag/index.js +2 -0
- package/dist/src/components/tag/react.d.ts +6 -0
- package/dist/src/components/tag/react.js +13 -0
- package/dist/src/components/tag/tag.component.d.ts +57 -0
- package/dist/src/components/tag/tag.component.js +157 -0
- package/dist/src/components/tag/tag.style.d.ts +7 -0
- package/dist/src/components/tag/tag.style.js +88 -0
- package/dist/src/components/tag/tag.types.d.ts +28 -0
- package/dist/src/components/tag/tag.types.js +7 -0
- package/dist/src/components/textarea/bundle.js +404 -0
- package/dist/src/components/textarea/bundle.js.gz +0 -0
- package/dist/src/components/textarea/index.d.ts +8 -0
- package/dist/src/components/textarea/index.js +7 -0
- package/dist/src/components/textarea/react.d.ts +9 -0
- package/dist/src/components/textarea/react.js +16 -0
- package/dist/src/components/textarea/textarea.component.d.ts +203 -0
- package/dist/src/components/textarea/textarea.component.js +657 -0
- package/dist/src/components/textarea/textarea.style.d.ts +59 -0
- package/dist/src/components/textarea/textarea.style.js +386 -0
- package/dist/src/components/textarea/textarea.types.d.ts +102 -0
- package/dist/src/components/textarea/textarea.types.js +14 -0
- package/dist/src/components/timeline/bundle.js +261 -0
- package/dist/src/components/timeline/bundle.js.gz +0 -0
- package/dist/src/components/timeline/index.d.ts +2 -0
- package/dist/src/components/timeline/index.js +2 -0
- package/dist/src/components/timeline/react.d.ts +3 -0
- package/dist/src/components/timeline/react.js +10 -0
- package/dist/src/components/timeline/timeline.component.d.ts +109 -0
- package/dist/src/components/timeline/timeline.component.js +214 -0
- package/dist/src/components/timeline/timeline.style.d.ts +14 -0
- package/dist/src/components/timeline/timeline.style.js +234 -0
- package/dist/src/components/timeline/timeline.types.d.ts +62 -0
- package/dist/src/components/timeline/timeline.types.js +7 -0
- package/dist/src/components/timepicker/bundle.js +810 -0
- package/dist/src/components/timepicker/bundle.js.gz +0 -0
- package/dist/src/components/timepicker/index.d.ts +12 -0
- package/dist/src/components/timepicker/index.js +12 -0
- package/dist/src/components/timepicker/timepicker.component.d.ts +115 -0
- package/dist/src/components/timepicker/timepicker.component.js +743 -0
- package/dist/src/components/timepicker/timepicker.constants.d.ts +85 -0
- package/dist/src/components/timepicker/timepicker.constants.js +85 -0
- package/dist/src/components/timepicker/timepicker.style.d.ts +7 -0
- package/dist/src/components/timepicker/timepicker.style.js +568 -0
- package/dist/src/components/timepicker/timepicker.style.variables.d.ts +2 -0
- package/dist/src/components/timepicker/timepicker.style.variables.js +122 -0
- package/dist/src/components/timepicker/timepicker.types.d.ts +161 -0
- package/dist/src/components/timepicker/timepicker.types.js +125 -0
- package/dist/src/components/toast/bundle.js +393 -0
- package/dist/src/components/toast/bundle.js.gz +0 -0
- package/dist/src/components/toast/index.d.ts +9 -0
- package/dist/src/components/toast/index.js +9 -0
- package/dist/src/components/toast/react.d.ts +7 -0
- package/dist/src/components/toast/react.js +19 -0
- package/dist/src/components/toast/toast.component.d.ts +152 -0
- package/dist/src/components/toast/toast.component.js +368 -0
- package/dist/src/components/toast/toast.style.d.ts +14 -0
- package/dist/src/components/toast/toast.style.js +338 -0
- package/dist/src/components/toast/toast.types.d.ts +124 -0
- package/dist/src/components/toast/toast.types.js +9 -0
- package/dist/src/components/tooltips/bundle.js +123 -0
- package/dist/src/components/tooltips/bundle.js.gz +0 -0
- package/dist/src/components/tooltips/index.d.ts +2 -0
- package/dist/src/components/tooltips/index.js +2 -0
- package/dist/src/components/tooltips/react.d.ts +1 -0
- package/dist/src/components/tooltips/react.js +2 -0
- package/dist/src/components/tooltips/tooltips.component.d.ts +33 -0
- package/dist/src/components/tooltips/tooltips.component.js +313 -0
- package/dist/src/components/tooltips/tooltips.constant.d.ts +13 -0
- package/dist/src/components/tooltips/tooltips.constant.js +15 -0
- package/dist/src/components/tooltips/tooltips.style.d.ts +2 -0
- package/dist/src/components/tooltips/tooltips.style.js +103 -0
- package/dist/src/components/tooltips/tooltips.variables.d.ts +2 -0
- package/dist/src/components/tooltips/tooltips.variables.js +14 -0
- package/dist/src/components/video/bundle.js +171 -0
- package/dist/src/components/video/bundle.js.gz +0 -0
- package/dist/src/components/video/index.d.ts +3 -0
- package/dist/src/components/video/index.js +3 -0
- package/dist/src/components/video/react.d.ts +10 -0
- package/dist/src/components/video/react.js +17 -0
- package/dist/src/components/video/video.component.d.ts +34 -0
- package/dist/src/components/video/video.component.js +184 -0
- package/dist/src/components/video/video.style.d.ts +3 -0
- package/dist/src/components/video/video.style.js +124 -0
- package/dist/src/components/video/video.types.d.ts +80 -0
- package/dist/src/components/video/video.types.js +7 -0
- package/package.json +215 -0
- package/packages/common/README.md +137 -0
- package/packages/common/dist/LICENSE +28 -0
- package/packages/common/dist/README.md +137 -0
- package/packages/common/dist/VERSIONS.md +4 -0
- package/packages/common/dist/constants/index.d.ts +2 -0
- package/packages/common/dist/constants/index.d.ts.map +1 -0
- package/packages/common/dist/constants/index.js +2 -0
- package/packages/common/dist/constants/index.js.map +1 -0
- package/packages/common/dist/constants.d.ts +17 -0
- package/packages/common/dist/constants.d.ts.map +1 -0
- package/packages/common/dist/constants.js +7 -0
- package/packages/common/dist/constants.js.map +1 -0
- package/packages/common/dist/controllers/index.d.ts +2 -0
- package/packages/common/dist/controllers/index.d.ts.map +1 -0
- package/packages/common/dist/controllers/index.js +2 -0
- package/packages/common/dist/controllers/index.js.map +1 -0
- package/packages/common/dist/controllers.d.ts +21 -0
- package/packages/common/dist/controllers.d.ts.map +1 -0
- package/packages/common/dist/controllers.js +22 -0
- package/packages/common/dist/controllers.js.map +1 -0
- package/packages/common/dist/index.d.ts +25 -0
- package/packages/common/dist/index.d.ts.map +1 -0
- package/packages/common/dist/index.js +27 -0
- package/packages/common/dist/index.js.map +1 -0
- package/packages/common/dist/mixins/index.d.ts +2 -0
- package/packages/common/dist/mixins/index.d.ts.map +1 -0
- package/packages/common/dist/mixins/index.js +3 -0
- package/packages/common/dist/mixins/index.js.map +1 -0
- package/packages/common/dist/mixins.d.ts +26 -0
- package/packages/common/dist/mixins.d.ts.map +1 -0
- package/packages/common/dist/mixins.js +29 -0
- package/packages/common/dist/mixins.js.map +1 -0
- package/packages/common/dist/shared/base-mixin.d.ts +42 -0
- package/packages/common/dist/shared/base-mixin.d.ts.map +1 -0
- package/packages/common/dist/shared/base-mixin.js +38 -0
- package/packages/common/dist/shared/base-mixin.js.map +1 -0
- package/packages/common/dist/shared/constants.d.ts +1 -0
- package/packages/common/dist/shared/constants.d.ts.map +1 -0
- package/packages/common/dist/shared/constants.js +2 -0
- package/packages/common/dist/shared/constants.js.map +1 -0
- package/packages/common/dist/shared/controllers/base-validation.controller.d.ts +81 -0
- package/packages/common/dist/shared/controllers/base-validation.controller.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/base-validation.controller.js +104 -0
- package/packages/common/dist/shared/controllers/base-validation.controller.js.map +1 -0
- package/packages/common/dist/shared/controllers/base.controller.d.ts +76 -0
- package/packages/common/dist/shared/controllers/base.controller.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/base.controller.js +129 -0
- package/packages/common/dist/shared/controllers/base.controller.js.map +1 -0
- package/packages/common/dist/shared/controllers/dropdown.controller.d.ts +77 -0
- package/packages/common/dist/shared/controllers/dropdown.controller.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/dropdown.controller.js +341 -0
- package/packages/common/dist/shared/controllers/dropdown.controller.js.map +1 -0
- package/packages/common/dist/shared/controllers/dropdown.interface.d.ts +37 -0
- package/packages/common/dist/shared/controllers/dropdown.interface.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/dropdown.interface.js +2 -0
- package/packages/common/dist/shared/controllers/dropdown.interface.js.map +1 -0
- package/packages/common/dist/shared/controllers/index.d.ts +6 -0
- package/packages/common/dist/shared/controllers/index.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/index.js +6 -0
- package/packages/common/dist/shared/controllers/index.js.map +1 -0
- package/packages/common/dist/shared/controllers/theme.controller.d.ts +48 -0
- package/packages/common/dist/shared/controllers/theme.controller.d.ts.map +1 -0
- package/packages/common/dist/shared/controllers/theme.controller.js +133 -0
- package/packages/common/dist/shared/controllers/theme.controller.js.map +1 -0
- package/packages/common/dist/shared/dependency-mixin.d.ts +37 -0
- package/packages/common/dist/shared/dependency-mixin.d.ts.map +1 -0
- package/packages/common/dist/shared/dependency-mixin.js +141 -0
- package/packages/common/dist/shared/dependency-mixin.js.map +1 -0
- package/packages/common/dist/shared/event-handler-mixin.d.ts +64 -0
- package/packages/common/dist/shared/event-handler-mixin.d.ts.map +1 -0
- package/packages/common/dist/shared/event-handler-mixin.js +95 -0
- package/packages/common/dist/shared/event-handler-mixin.js.map +1 -0
- package/packages/common/dist/shared/index.d.ts +13 -0
- package/packages/common/dist/shared/index.d.ts.map +1 -0
- package/packages/common/dist/shared/index.js +17 -0
- package/packages/common/dist/shared/index.js.map +1 -0
- package/packages/common/dist/shared/render-utils.d.ts +103 -0
- package/packages/common/dist/shared/render-utils.d.ts.map +1 -0
- package/packages/common/dist/shared/render-utils.js +132 -0
- package/packages/common/dist/shared/render-utils.js.map +1 -0
- package/packages/common/dist/shared/theme-mixin.d.ts +78 -0
- package/packages/common/dist/shared/theme-mixin.d.ts.map +1 -0
- package/packages/common/dist/shared/theme-mixin.js +194 -0
- package/packages/common/dist/shared/theme-mixin.js.map +1 -0
- package/packages/common/dist/shared/themes.d.ts +44 -0
- package/packages/common/dist/shared/themes.d.ts.map +1 -0
- package/packages/common/dist/shared/themes.js +85 -0
- package/packages/common/dist/shared/themes.js.map +1 -0
- package/packages/common/dist/shared/utils.d.ts +60 -0
- package/packages/common/dist/shared/utils.d.ts.map +1 -0
- package/packages/common/dist/shared/utils.js +85 -0
- package/packages/common/dist/shared/utils.js.map +1 -0
- package/packages/common/dist/shared/validation.types.d.ts +108 -0
- package/packages/common/dist/shared/validation.types.d.ts.map +1 -0
- package/packages/common/dist/shared/validation.types.js +17 -0
- package/packages/common/dist/shared/validation.types.js.map +1 -0
- package/packages/common/dist/themes/index.d.ts +2 -0
- package/packages/common/dist/themes/index.d.ts.map +1 -0
- package/packages/common/dist/themes/index.js +2 -0
- package/packages/common/dist/themes/index.js.map +1 -0
- package/packages/common/dist/themes.d.ts +22 -0
- package/packages/common/dist/themes.d.ts.map +1 -0
- package/packages/common/dist/themes.js +23 -0
- package/packages/common/dist/themes.js.map +1 -0
- package/packages/common/dist/utils/index.d.ts +2 -0
- package/packages/common/dist/utils/index.d.ts.map +1 -0
- package/packages/common/dist/utils/index.js +2 -0
- package/packages/common/dist/utils/index.js.map +1 -0
- package/packages/common/dist/utils.d.ts +22 -0
- package/packages/common/dist/utils.d.ts.map +1 -0
- package/packages/common/dist/utils.js +24 -0
- package/packages/common/dist/utils.js.map +1 -0
- package/packages/themes/README.md +146 -0
- package/packages/themes/dist/README.md +146 -0
- package/packages/themes/dist/carbon.css +2987 -0
- package/packages/themes/dist/default.css +2757 -0
- package/packages/themes/dist/editor.css +1063 -0
- package/packages/themes/dist/index.cjs +46 -0
- package/packages/themes/dist/index.js +46 -0
- package/packages/themes/dist/package.json +59 -0
|
@@ -0,0 +1,1468 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2024 Nuraly, Laabidi Aymen
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
7
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
9
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
10
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
11
|
+
};
|
|
12
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
13
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
14
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
15
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
16
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
17
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
18
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
import { html, nothing } from 'lit';
|
|
22
|
+
import { customElement, property, state } from 'lit/decorators.js';
|
|
23
|
+
import { styleMap } from 'lit/directives/style-map.js';
|
|
24
|
+
import { CanvasType, ExecutionStatus, WorkflowNodeType, TriggerConnectionState, isPersistentTriggerNode, NODE_TEMPLATES, } from './workflow-canvas.types.js';
|
|
25
|
+
import { styles } from './workflow-canvas.style.js';
|
|
26
|
+
import './workflow-node.component.js';
|
|
27
|
+
import { ChatbotCoreController } from '../chatbot/core/chatbot-core.controller.js';
|
|
28
|
+
import { ChatbotSender } from '../chatbot/chatbot.types.js';
|
|
29
|
+
import { WorkflowSocketProvider } from '../chatbot/providers/workflow-socket-provider.js';
|
|
30
|
+
// Templates
|
|
31
|
+
import { renderPaletteTemplate, renderConfigPanelTemplate, } from './templates/index.js';
|
|
32
|
+
// Base class
|
|
33
|
+
import { BaseCanvasElement } from './base-canvas.component.js';
|
|
34
|
+
// Utils
|
|
35
|
+
import { getAllAvailableVariablesWithDynamic } from './utils/variable-resolver.js';
|
|
36
|
+
// Constants
|
|
37
|
+
import { WORKFLOW_NODE_WIDTH, WORKFLOW_NODE_HEIGHT, WORKFLOW_NOTE_DEFAULT_WIDTH, WORKFLOW_NOTE_DEFAULT_HEIGHT, TABLE_DEFAULT_WIDTH, TABLE_DEFAULT_HEIGHT, TABLE_MIN_WIDTH, TABLE_MIN_HEIGHT, TRIGGER_POLL_INTERVAL_MS, FRAME_DEFAULT_LABEL, } from './canvas.constants.js';
|
|
38
|
+
/**
|
|
39
|
+
* Workflow canvas component for visual workflow editing
|
|
40
|
+
*
|
|
41
|
+
* @element workflow-canvas
|
|
42
|
+
* @fires workflow-changed - When workflow is modified
|
|
43
|
+
* @fires node-selected - When a node is selected
|
|
44
|
+
* @fires node-configured - When a node configuration is requested
|
|
45
|
+
*/
|
|
46
|
+
let WorkflowCanvasElement = class WorkflowCanvasElement extends BaseCanvasElement {
|
|
47
|
+
get executionId() {
|
|
48
|
+
return this.currentExecutionId;
|
|
49
|
+
}
|
|
50
|
+
set executionId(value) {
|
|
51
|
+
const oldValue = this.currentExecutionId;
|
|
52
|
+
this.currentExecutionId = value;
|
|
53
|
+
this.requestUpdate('executionId', oldValue);
|
|
54
|
+
if (value && value !== oldValue) {
|
|
55
|
+
this.fetchExecutionData(value);
|
|
56
|
+
}
|
|
57
|
+
else if (!value) {
|
|
58
|
+
this.nodeExecutionData.clear();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// ==================== Abstract Method Implementations ====================
|
|
62
|
+
normalizeNodes(nodes) {
|
|
63
|
+
return nodes.map(node => (Object.assign(Object.assign({}, node), { status: node.status
|
|
64
|
+
? node.status.toUpperCase()
|
|
65
|
+
: undefined })));
|
|
66
|
+
}
|
|
67
|
+
getNodeDimensionsForContainment(_node) {
|
|
68
|
+
return { width: WORKFLOW_NODE_WIDTH, height: WORKFLOW_NODE_HEIGHT };
|
|
69
|
+
}
|
|
70
|
+
shouldExcludeFromContainment(node) {
|
|
71
|
+
return node.type === WorkflowNodeType.NOTE;
|
|
72
|
+
}
|
|
73
|
+
onWorkflowLoaded(value, oldValue) {
|
|
74
|
+
// Auto-open chat preview for CHAT_START nodes with alwaysOpenPlan enabled on load
|
|
75
|
+
if (!oldValue || oldValue.id !== value.id) {
|
|
76
|
+
const chatStartNode = value.nodes.find(node => { var _a; return node.type === WorkflowNodeType.CHAT_START && ((_a = node.configuration) === null || _a === void 0 ? void 0 : _a.alwaysOpenPlan) === true; });
|
|
77
|
+
if (chatStartNode && this.previewNodeId !== chatStartNode.id) {
|
|
78
|
+
this.updateComplete.then(() => {
|
|
79
|
+
this.handleNodePreview({ detail: { node: chatStartNode } });
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
getNoteContentKey(_node) {
|
|
85
|
+
return 'noteContent';
|
|
86
|
+
}
|
|
87
|
+
getNoteSizeKeys() {
|
|
88
|
+
return { widthKey: 'noteWidth', heightKey: 'noteHeight' };
|
|
89
|
+
}
|
|
90
|
+
getDefaultNoteSize() {
|
|
91
|
+
return { width: WORKFLOW_NOTE_DEFAULT_WIDTH, height: WORKFLOW_NOTE_DEFAULT_HEIGHT };
|
|
92
|
+
}
|
|
93
|
+
getCanvasType() {
|
|
94
|
+
return this.canvasType;
|
|
95
|
+
}
|
|
96
|
+
// ==================== Hook Overrides ====================
|
|
97
|
+
onNodeMouseDownExtra(node) {
|
|
98
|
+
var _a;
|
|
99
|
+
if (node.type === WorkflowNodeType.CHAT_START &&
|
|
100
|
+
((_a = node.configuration) === null || _a === void 0 ? void 0 : _a.alwaysOpenPlan) === true &&
|
|
101
|
+
this.previewNodeId !== node.id) {
|
|
102
|
+
this.handleNodePreview({ detail: { node } });
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
onConnected() {
|
|
106
|
+
this.addEventListener('test-workflow-request', this.handleTestWorkflowRequest);
|
|
107
|
+
this.startTriggerPollingIfNeeded();
|
|
108
|
+
}
|
|
109
|
+
onDisconnected() {
|
|
110
|
+
this.removeEventListener('test-workflow-request', this.handleTestWorkflowRequest);
|
|
111
|
+
this.cleanupChatPreview();
|
|
112
|
+
this.stopTriggerPolling();
|
|
113
|
+
this._cleanupPaletteTouchDrag();
|
|
114
|
+
}
|
|
115
|
+
willUpdate(changedProperties) {
|
|
116
|
+
super.willUpdate(changedProperties);
|
|
117
|
+
if (changedProperties.has('workflow')) {
|
|
118
|
+
this.startTriggerPollingIfNeeded();
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
// ==================== Nodes with Statuses ====================
|
|
122
|
+
getNodesForRendering() {
|
|
123
|
+
return this.getNodesWithStatuses();
|
|
124
|
+
}
|
|
125
|
+
getNodesWithStatuses() {
|
|
126
|
+
const hasActiveExecution = Object.keys(this.nodeStatuses).length > 0;
|
|
127
|
+
return this.workflow.nodes.map(node => {
|
|
128
|
+
const activity = this.agentActivity[node.id];
|
|
129
|
+
const baseNode = Object.assign(Object.assign({}, node), { agentActivity: (activity === null || activity === void 0 ? void 0 : activity.active) ? activity : undefined });
|
|
130
|
+
if (this.nodeStatuses[node.id]) {
|
|
131
|
+
return Object.assign(Object.assign({}, baseNode), { status: this.nodeStatuses[node.id].toUpperCase() });
|
|
132
|
+
}
|
|
133
|
+
else if (hasActiveExecution) {
|
|
134
|
+
return Object.assign(Object.assign({}, baseNode), { status: undefined });
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
return baseNode;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
// ==================== Trigger Status Polling ====================
|
|
142
|
+
hasPersistentTriggerNodes() {
|
|
143
|
+
return this.workflow.nodes.some(n => isPersistentTriggerNode(n.type));
|
|
144
|
+
}
|
|
145
|
+
startTriggerPollingIfNeeded() {
|
|
146
|
+
if (this.hasPersistentTriggerNodes() && !this.triggerPollingInterval) {
|
|
147
|
+
this.fetchTriggerStatuses();
|
|
148
|
+
this.triggerPollingInterval = setInterval(() => this.fetchTriggerStatuses(), TRIGGER_POLL_INTERVAL_MS);
|
|
149
|
+
}
|
|
150
|
+
else if (!this.hasPersistentTriggerNodes() && this.triggerPollingInterval) {
|
|
151
|
+
this.stopTriggerPolling();
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
stopTriggerPolling() {
|
|
155
|
+
if (this.triggerPollingInterval) {
|
|
156
|
+
clearInterval(this.triggerPollingInterval);
|
|
157
|
+
this.triggerPollingInterval = null;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
fetchTriggerStatuses() {
|
|
161
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
162
|
+
if (!this.workflow.id)
|
|
163
|
+
return;
|
|
164
|
+
try {
|
|
165
|
+
const triggersRes = yield fetch(`/api/v1/workflows/${this.workflow.id}/trigger-defs`);
|
|
166
|
+
if (!triggersRes.ok)
|
|
167
|
+
return;
|
|
168
|
+
const triggers = yield triggersRes.json();
|
|
169
|
+
const persistentTypes = new Set([
|
|
170
|
+
'TELEGRAM_BOT', 'SLACK_SOCKET', 'DISCORD_BOT', 'WHATSAPP_WEBHOOK', 'CUSTOM_WEBSOCKET',
|
|
171
|
+
]);
|
|
172
|
+
const persistentTriggers = triggers.filter(t => persistentTypes.has(t.type));
|
|
173
|
+
const statusPromises = persistentTriggers.map((trigger) => __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
try {
|
|
175
|
+
const statusRes = yield fetch(`/api/v1/triggers/${trigger.id}/status`);
|
|
176
|
+
if (!statusRes.ok)
|
|
177
|
+
return { trigger, status: null };
|
|
178
|
+
const status = yield statusRes.json();
|
|
179
|
+
return { trigger, status };
|
|
180
|
+
}
|
|
181
|
+
catch (_a) {
|
|
182
|
+
return { trigger, status: null };
|
|
183
|
+
}
|
|
184
|
+
}));
|
|
185
|
+
const results = yield Promise.all(statusPromises);
|
|
186
|
+
const newStatuses = new Map();
|
|
187
|
+
for (const result of results) {
|
|
188
|
+
const { trigger, status } = result;
|
|
189
|
+
const matchingNode = this.workflow.nodes.find(n => n.type === trigger.type);
|
|
190
|
+
if (matchingNode) {
|
|
191
|
+
newStatuses.set(matchingNode.id, {
|
|
192
|
+
triggerId: trigger.id,
|
|
193
|
+
connectionState: ((status === null || status === void 0 ? void 0 : status.connectionState) || 'DISCONNECTED'),
|
|
194
|
+
health: status === null || status === void 0 ? void 0 : status.health,
|
|
195
|
+
messagesReceived: status === null || status === void 0 ? void 0 : status.messagesReceived,
|
|
196
|
+
lastMessageAt: status === null || status === void 0 ? void 0 : status.lastMessageAt,
|
|
197
|
+
stateReason: status === null || status === void 0 ? void 0 : status.stateReason,
|
|
198
|
+
webhookUrl: trigger.webhookUrl,
|
|
199
|
+
inDevMode: status === null || status === void 0 ? void 0 : status.inDevMode,
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
this.triggerStatuses = newStatuses;
|
|
204
|
+
this.requestUpdate();
|
|
205
|
+
}
|
|
206
|
+
catch (_a) {
|
|
207
|
+
// Silently fail - trigger status is non-critical
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
activateTrigger(triggerId) {
|
|
212
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
213
|
+
try {
|
|
214
|
+
yield fetch(`/api/v1/triggers/${triggerId}/activate`, { method: 'POST' });
|
|
215
|
+
}
|
|
216
|
+
catch (_a) {
|
|
217
|
+
// Silently fail
|
|
218
|
+
}
|
|
219
|
+
yield this.fetchTriggerStatuses();
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
deactivateTrigger(triggerId) {
|
|
223
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
try {
|
|
225
|
+
yield fetch(`/api/v1/triggers/${triggerId}/deactivate`, { method: 'POST' });
|
|
226
|
+
}
|
|
227
|
+
catch (_a) {
|
|
228
|
+
// Silently fail
|
|
229
|
+
}
|
|
230
|
+
yield this.fetchTriggerStatuses();
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
createAndActivateTrigger(nodeType, config) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
var _a;
|
|
236
|
+
if (!((_a = this.workflow) === null || _a === void 0 ? void 0 : _a.id))
|
|
237
|
+
return undefined;
|
|
238
|
+
try {
|
|
239
|
+
const createRes = yield fetch(`/api/v1/workflows/${this.workflow.id}/trigger-defs`, {
|
|
240
|
+
method: 'POST',
|
|
241
|
+
headers: { 'Content-Type': 'application/json' },
|
|
242
|
+
body: JSON.stringify({
|
|
243
|
+
name: `${nodeType} trigger`,
|
|
244
|
+
type: nodeType,
|
|
245
|
+
configuration: JSON.stringify(config),
|
|
246
|
+
}),
|
|
247
|
+
});
|
|
248
|
+
if (!createRes.ok)
|
|
249
|
+
return undefined;
|
|
250
|
+
const trigger = yield createRes.json();
|
|
251
|
+
// Activate the trigger
|
|
252
|
+
try {
|
|
253
|
+
yield fetch(`/api/v1/triggers/${trigger.id}/activate`, { method: 'POST' });
|
|
254
|
+
}
|
|
255
|
+
catch (_b) {
|
|
256
|
+
// Activation may fail but trigger is created
|
|
257
|
+
}
|
|
258
|
+
// Always refresh statuses so UI updates
|
|
259
|
+
yield this.fetchTriggerStatuses();
|
|
260
|
+
return trigger.id;
|
|
261
|
+
}
|
|
262
|
+
catch (_c) {
|
|
263
|
+
yield this.fetchTriggerStatuses();
|
|
264
|
+
return undefined;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
toggleDevMode(triggerId, enable) {
|
|
269
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
+
try {
|
|
271
|
+
yield fetch(`/api/v1/triggers/${triggerId}/dev-mode`, {
|
|
272
|
+
method: enable ? 'POST' : 'DELETE',
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
catch (_a) {
|
|
276
|
+
// Silently fail
|
|
277
|
+
}
|
|
278
|
+
yield this.fetchTriggerStatuses();
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
// ==================== Chat Preview ====================
|
|
282
|
+
handleNodePreview(e) {
|
|
283
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
284
|
+
var _a;
|
|
285
|
+
const { node } = e.detail;
|
|
286
|
+
if (this.previewNodeId === node.id) {
|
|
287
|
+
this.closePreviewPanel();
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
yield this.cleanupChatPreview();
|
|
291
|
+
this.previewNodeId = node.id;
|
|
292
|
+
if (node.type === WorkflowNodeType.CHAT_START && ((_a = this.workflow) === null || _a === void 0 ? void 0 : _a.id)) {
|
|
293
|
+
yield this.initializeChatPreview(this.workflow.id, node.configuration);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
initializeChatPreview(workflowId, nodeConfig) {
|
|
299
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
300
|
+
try {
|
|
301
|
+
this.chatPreviewProvider = new WorkflowSocketProvider();
|
|
302
|
+
yield this.connectChatPreviewSocket(workflowId);
|
|
303
|
+
this.setupExecutionSocketListeners();
|
|
304
|
+
this.createChatPreviewController(nodeConfig);
|
|
305
|
+
console.log('[Canvas] Chat preview initialized for workflow:', workflowId);
|
|
306
|
+
}
|
|
307
|
+
catch (error) {
|
|
308
|
+
console.error('[Canvas] Failed to initialize chat preview:', error);
|
|
309
|
+
this.chatPreviewController = null;
|
|
310
|
+
this.chatPreviewProvider = null;
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
connectChatPreviewSocket(workflowId) {
|
|
315
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
316
|
+
const socketUrl = typeof window !== 'undefined' ? window.location.origin : 'http://localhost:8000';
|
|
317
|
+
yield this.chatPreviewProvider.connect({
|
|
318
|
+
workflowId,
|
|
319
|
+
socketUrl,
|
|
320
|
+
socketPath: '/socket.io/workflow',
|
|
321
|
+
triggerEndpoint: '/api/v1/workflows/{workflowId}/trigger/chat',
|
|
322
|
+
responseTimeout: 60000,
|
|
323
|
+
onMessage: (message) => {
|
|
324
|
+
if (this.chatPreviewController) {
|
|
325
|
+
this.chatPreviewController.addMessage({
|
|
326
|
+
id: `bot-${Date.now()}`,
|
|
327
|
+
sender: ChatbotSender.Bot,
|
|
328
|
+
text: message,
|
|
329
|
+
timestamp: new Date().toISOString(),
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
setupExecutionSocketListeners() {
|
|
337
|
+
const socket = this.chatPreviewProvider.getSocket();
|
|
338
|
+
if (!socket)
|
|
339
|
+
return;
|
|
340
|
+
socket.on('execution:started', (event) => {
|
|
341
|
+
var _a;
|
|
342
|
+
const executionId = ((_a = event.data) === null || _a === void 0 ? void 0 : _a.executionId) || event.executionId;
|
|
343
|
+
if (executionId) {
|
|
344
|
+
this.currentExecutionId = executionId;
|
|
345
|
+
this.nodeExecutionData.clear();
|
|
346
|
+
}
|
|
347
|
+
this.nodeStatuses = {};
|
|
348
|
+
});
|
|
349
|
+
socket.on('execution:node-started', (event) => {
|
|
350
|
+
var _a;
|
|
351
|
+
const nodeId = ((_a = event.data) === null || _a === void 0 ? void 0 : _a.nodeId) || event.nodeId;
|
|
352
|
+
const data = event.data || event;
|
|
353
|
+
if (nodeId) {
|
|
354
|
+
this.nodeStatuses = Object.assign(Object.assign({}, this.nodeStatuses), { [nodeId]: 'RUNNING' });
|
|
355
|
+
this.nodeExecutionData.set(nodeId, {
|
|
356
|
+
id: data.nodeExecutionId || nodeId,
|
|
357
|
+
nodeId,
|
|
358
|
+
status: 'running',
|
|
359
|
+
inputData: data.inputData,
|
|
360
|
+
startedAt: data.startedAt || new Date().toISOString(),
|
|
361
|
+
});
|
|
362
|
+
this.requestUpdate();
|
|
363
|
+
}
|
|
364
|
+
});
|
|
365
|
+
socket.on('execution:node-completed', (event) => {
|
|
366
|
+
var _a;
|
|
367
|
+
const nodeId = ((_a = event.data) === null || _a === void 0 ? void 0 : _a.nodeId) || event.nodeId;
|
|
368
|
+
const data = event.data || event;
|
|
369
|
+
if (nodeId) {
|
|
370
|
+
this.nodeStatuses = Object.assign(Object.assign({}, this.nodeStatuses), { [nodeId]: 'COMPLETED' });
|
|
371
|
+
const existing = this.nodeExecutionData.get(nodeId) || { id: nodeId, nodeId, status: 'completed' };
|
|
372
|
+
this.nodeExecutionData.set(nodeId, Object.assign(Object.assign({}, existing), { status: 'completed', outputData: data.outputData, completedAt: data.completedAt || new Date().toISOString(), durationMs: data.durationMs }));
|
|
373
|
+
this.requestUpdate();
|
|
374
|
+
}
|
|
375
|
+
});
|
|
376
|
+
socket.on('execution:node-failed', (event) => {
|
|
377
|
+
var _a;
|
|
378
|
+
const nodeId = ((_a = event.data) === null || _a === void 0 ? void 0 : _a.nodeId) || event.nodeId;
|
|
379
|
+
const data = event.data || event;
|
|
380
|
+
if (nodeId) {
|
|
381
|
+
this.nodeStatuses = Object.assign(Object.assign({}, this.nodeStatuses), { [nodeId]: 'FAILED' });
|
|
382
|
+
const existing = this.nodeExecutionData.get(nodeId) || { id: nodeId, nodeId, status: 'failed' };
|
|
383
|
+
this.nodeExecutionData.set(nodeId, Object.assign(Object.assign({}, existing), { status: 'failed', errorMessage: data.errorMessage || data.error, completedAt: data.completedAt || new Date().toISOString(), durationMs: data.durationMs }));
|
|
384
|
+
this.requestUpdate();
|
|
385
|
+
}
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
createChatPreviewController(nodeConfig) {
|
|
389
|
+
const enableFileUpload = (nodeConfig === null || nodeConfig === void 0 ? void 0 : nodeConfig.enableFileUpload) === true;
|
|
390
|
+
console.log('[Canvas] Creating chat controller with config:', { enableFileUpload, nodeConfig });
|
|
391
|
+
this.chatPreviewController = new ChatbotCoreController({
|
|
392
|
+
provider: this.chatPreviewProvider,
|
|
393
|
+
enableFileUpload,
|
|
394
|
+
ui: {
|
|
395
|
+
onStateChange: () => {
|
|
396
|
+
this.requestUpdate();
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
});
|
|
400
|
+
}
|
|
401
|
+
cleanupChatPreview() {
|
|
402
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
403
|
+
if (this.chatPreviewProvider) {
|
|
404
|
+
try {
|
|
405
|
+
yield this.chatPreviewProvider.disconnect();
|
|
406
|
+
}
|
|
407
|
+
catch (error) {
|
|
408
|
+
console.error('[Canvas] Error disconnecting chat preview:', error);
|
|
409
|
+
}
|
|
410
|
+
this.chatPreviewProvider = null;
|
|
411
|
+
}
|
|
412
|
+
this.chatPreviewController = null;
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
// ==================== HTTP Preview ====================
|
|
416
|
+
sendHttpPreviewRequest() {
|
|
417
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
418
|
+
var _a;
|
|
419
|
+
const previewNode = this.getPreviewNode();
|
|
420
|
+
if (!previewNode || !((_a = this.workflow) === null || _a === void 0 ? void 0 : _a.id))
|
|
421
|
+
return;
|
|
422
|
+
this.httpPreviewLoading = true;
|
|
423
|
+
this.httpPreviewError = '';
|
|
424
|
+
this.httpPreviewResponse = '';
|
|
425
|
+
this.nodeStatuses = {};
|
|
426
|
+
try {
|
|
427
|
+
let body;
|
|
428
|
+
try {
|
|
429
|
+
body = JSON.parse(this.httpPreviewBody);
|
|
430
|
+
}
|
|
431
|
+
catch (_b) {
|
|
432
|
+
throw new Error('Invalid JSON in request body');
|
|
433
|
+
}
|
|
434
|
+
const baseUrl = typeof window !== 'undefined' ? window.location.origin : 'http://localhost:8000';
|
|
435
|
+
const triggerUrl = `${baseUrl}/api/v1/workflows/${this.workflow.id}/trigger/http`;
|
|
436
|
+
console.log('[Canvas] Sending HTTP preview request:', triggerUrl, body);
|
|
437
|
+
const response = yield fetch(triggerUrl, {
|
|
438
|
+
method: 'POST',
|
|
439
|
+
headers: { 'Content-Type': 'application/json' },
|
|
440
|
+
body: JSON.stringify(body),
|
|
441
|
+
});
|
|
442
|
+
const executionIdHeader = response.headers.get('X-Execution-Id');
|
|
443
|
+
let responseData;
|
|
444
|
+
try {
|
|
445
|
+
responseData = yield response.json();
|
|
446
|
+
}
|
|
447
|
+
catch (_c) {
|
|
448
|
+
responseData = yield response.text();
|
|
449
|
+
}
|
|
450
|
+
if (!response.ok) {
|
|
451
|
+
throw new Error(responseData.message || responseData || `HTTP ${response.status}`);
|
|
452
|
+
}
|
|
453
|
+
this.httpPreviewResponse = JSON.stringify({
|
|
454
|
+
status: response.status,
|
|
455
|
+
executionId: executionIdHeader,
|
|
456
|
+
data: responseData,
|
|
457
|
+
}, null, 2);
|
|
458
|
+
if (executionIdHeader) {
|
|
459
|
+
this.currentExecutionId = executionIdHeader;
|
|
460
|
+
this.fetchExecutionData(executionIdHeader);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
catch (error) {
|
|
464
|
+
console.error('[Canvas] HTTP preview error:', error);
|
|
465
|
+
this.httpPreviewError = error instanceof Error ? error.message : String(error);
|
|
466
|
+
}
|
|
467
|
+
finally {
|
|
468
|
+
this.httpPreviewLoading = false;
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
}
|
|
472
|
+
resetHttpPreview() {
|
|
473
|
+
this.httpPreviewBody = '{\n \n}';
|
|
474
|
+
this.httpPreviewResponse = '';
|
|
475
|
+
this.httpPreviewError = '';
|
|
476
|
+
this.httpPreviewLoading = false;
|
|
477
|
+
}
|
|
478
|
+
closePreviewPanel() {
|
|
479
|
+
this.previewNodeId = null;
|
|
480
|
+
this.cleanupChatPreview();
|
|
481
|
+
this.resetHttpPreview();
|
|
482
|
+
}
|
|
483
|
+
handleNodeTrigger(e) {
|
|
484
|
+
const { node } = e.detail;
|
|
485
|
+
if (isPersistentTriggerNode(node.type)) {
|
|
486
|
+
const status = this.triggerStatuses.get(node.id);
|
|
487
|
+
if (status) {
|
|
488
|
+
const isActive = status.connectionState === TriggerConnectionState.CONNECTED
|
|
489
|
+
|| status.connectionState === TriggerConnectionState.CONNECTING;
|
|
490
|
+
if (isActive) {
|
|
491
|
+
this.deactivateTrigger(status.triggerId);
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
this.activateTrigger(status.triggerId);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
this.dispatchEvent(new CustomEvent('trigger-toggle', {
|
|
498
|
+
detail: { node, triggerStatus: status },
|
|
499
|
+
bubbles: true,
|
|
500
|
+
composed: true,
|
|
501
|
+
}));
|
|
502
|
+
return;
|
|
503
|
+
}
|
|
504
|
+
console.log('[Canvas] Node trigger clicked:', node.name, node.type);
|
|
505
|
+
this.dispatchEvent(new CustomEvent('workflow-trigger', {
|
|
506
|
+
detail: { node },
|
|
507
|
+
bubbles: true,
|
|
508
|
+
composed: true,
|
|
509
|
+
}));
|
|
510
|
+
}
|
|
511
|
+
handleNodeDblClick(e) {
|
|
512
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
513
|
+
var _a;
|
|
514
|
+
if (this.disabled)
|
|
515
|
+
return;
|
|
516
|
+
const { node } = e.detail;
|
|
517
|
+
// For NOTE nodes, enter inline edit mode
|
|
518
|
+
if (node.type === WorkflowNodeType.NOTE) {
|
|
519
|
+
if (this.readonly)
|
|
520
|
+
return;
|
|
521
|
+
this.editingNoteId = node.id;
|
|
522
|
+
if (this.collaborative) {
|
|
523
|
+
this.collaborationController.broadcastTypingStart(node.id);
|
|
524
|
+
}
|
|
525
|
+
this.updateComplete.then(() => {
|
|
526
|
+
var _a, _b;
|
|
527
|
+
const nodeEl = (_a = this.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(`workflow-node[data-node-id="${node.id}"]`);
|
|
528
|
+
const textarea = (_b = nodeEl === null || nodeEl === void 0 ? void 0 : nodeEl.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.note-textarea');
|
|
529
|
+
if (textarea) {
|
|
530
|
+
textarea.focus();
|
|
531
|
+
textarea.select();
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
// Open configuration panel
|
|
537
|
+
this.configuredNode = node;
|
|
538
|
+
// Fetch dynamic variables
|
|
539
|
+
this.loadingVariables = true;
|
|
540
|
+
this.dynamicVariables = [];
|
|
541
|
+
if ((_a = this.workflow) === null || _a === void 0 ? void 0 : _a.id) {
|
|
542
|
+
try {
|
|
543
|
+
const vars = yield getAllAvailableVariablesWithDynamic(this.workflow, node.id, '');
|
|
544
|
+
this.dynamicVariables = vars;
|
|
545
|
+
}
|
|
546
|
+
catch (error) {
|
|
547
|
+
console.warn('[WorkflowCanvas] Failed to fetch dynamic variables:', error);
|
|
548
|
+
}
|
|
549
|
+
const hasNodeStatus = Object.keys(this.nodeStatuses).length > 0;
|
|
550
|
+
const hasExecutionData = this.nodeExecutionData.size > 0;
|
|
551
|
+
if (hasNodeStatus && !hasExecutionData && !this.currentExecutionId) {
|
|
552
|
+
try {
|
|
553
|
+
const response = yield fetch(`/api/v1/workflows/${this.workflow.id}/latest-execution`);
|
|
554
|
+
if (response.ok) {
|
|
555
|
+
const execution = yield response.json();
|
|
556
|
+
if (execution === null || execution === void 0 ? void 0 : execution.id) {
|
|
557
|
+
this.currentExecutionId = execution.id;
|
|
558
|
+
yield this.fetchExecutionData(execution.id);
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
catch (error) {
|
|
563
|
+
console.warn('[WorkflowCanvas] Failed to fetch latest execution:', error);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
this.loadingVariables = false;
|
|
568
|
+
this.dispatchEvent(new CustomEvent('node-configured', {
|
|
569
|
+
detail: { node },
|
|
570
|
+
bubbles: true,
|
|
571
|
+
composed: true,
|
|
572
|
+
}));
|
|
573
|
+
});
|
|
574
|
+
}
|
|
575
|
+
handleNoteSettings(e) {
|
|
576
|
+
const { node } = e.detail;
|
|
577
|
+
this.configuredNode = node;
|
|
578
|
+
}
|
|
579
|
+
// ==================== Execution Data ====================
|
|
580
|
+
setExecutionId(executionId) {
|
|
581
|
+
this.currentExecutionId = executionId;
|
|
582
|
+
if (!executionId) {
|
|
583
|
+
this.nodeExecutionData.clear();
|
|
584
|
+
this.requestUpdate();
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
updateNodeExecution(nodeExecution) {
|
|
588
|
+
this.nodeExecutionData.set(nodeExecution.nodeId, nodeExecution);
|
|
589
|
+
this.requestUpdate();
|
|
590
|
+
}
|
|
591
|
+
clearExecutionData() {
|
|
592
|
+
this.currentExecutionId = null;
|
|
593
|
+
this.nodeExecutionData.clear();
|
|
594
|
+
this.requestUpdate();
|
|
595
|
+
}
|
|
596
|
+
fetchExecutionData(executionId) {
|
|
597
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
598
|
+
var _a;
|
|
599
|
+
if (!executionId)
|
|
600
|
+
return;
|
|
601
|
+
try {
|
|
602
|
+
const response = yield fetch(`/api/v1/workflows/${(_a = this.workflow) === null || _a === void 0 ? void 0 : _a.id}/executions/${executionId}/nodes`);
|
|
603
|
+
if (!response.ok) {
|
|
604
|
+
const altResponse = yield fetch(`/api/v1/executions/${executionId}/nodes`);
|
|
605
|
+
if (!altResponse.ok) {
|
|
606
|
+
console.warn('[WorkflowCanvas] Failed to fetch node executions');
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
const nodeExecutions = yield altResponse.json();
|
|
610
|
+
this.processNodeExecutions(nodeExecutions);
|
|
611
|
+
return;
|
|
612
|
+
}
|
|
613
|
+
const nodeExecutions = yield response.json();
|
|
614
|
+
this.processNodeExecutions(nodeExecutions);
|
|
615
|
+
}
|
|
616
|
+
catch (error) {
|
|
617
|
+
console.warn('[WorkflowCanvas] Failed to fetch execution data:', error);
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
processNodeExecutions(nodeExecutions) {
|
|
622
|
+
var _a;
|
|
623
|
+
this.nodeExecutionData.clear();
|
|
624
|
+
for (const nodeExec of nodeExecutions) {
|
|
625
|
+
let inputData = nodeExec.inputData;
|
|
626
|
+
let outputData = nodeExec.outputData;
|
|
627
|
+
try {
|
|
628
|
+
if (typeof inputData === 'string')
|
|
629
|
+
inputData = JSON.parse(inputData);
|
|
630
|
+
}
|
|
631
|
+
catch ( /* keep as string */_b) { /* keep as string */ }
|
|
632
|
+
try {
|
|
633
|
+
if (typeof outputData === 'string')
|
|
634
|
+
outputData = JSON.parse(outputData);
|
|
635
|
+
}
|
|
636
|
+
catch ( /* keep as string */_c) { /* keep as string */ }
|
|
637
|
+
this.nodeExecutionData.set(nodeExec.nodeId, {
|
|
638
|
+
id: nodeExec.id,
|
|
639
|
+
nodeId: nodeExec.nodeId,
|
|
640
|
+
status: (_a = nodeExec.status) === null || _a === void 0 ? void 0 : _a.toLowerCase(),
|
|
641
|
+
inputData,
|
|
642
|
+
outputData,
|
|
643
|
+
errorMessage: nodeExec.errorMessage,
|
|
644
|
+
startedAt: nodeExec.startedAt,
|
|
645
|
+
completedAt: nodeExec.completedAt,
|
|
646
|
+
durationMs: nodeExec.durationMs,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
this.requestUpdate();
|
|
650
|
+
}
|
|
651
|
+
handleRetryNode(nodeId) {
|
|
652
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
653
|
+
var _a;
|
|
654
|
+
if (!this.currentExecutionId || !((_a = this.workflow) === null || _a === void 0 ? void 0 : _a.id))
|
|
655
|
+
return;
|
|
656
|
+
try {
|
|
657
|
+
const response = yield fetch(`/api/v1/workflows/${this.workflow.id}/executions/${this.currentExecutionId}/nodes/${nodeId}/retry`, {
|
|
658
|
+
method: 'POST',
|
|
659
|
+
headers: { 'Content-Type': 'application/json' },
|
|
660
|
+
});
|
|
661
|
+
if (!response.ok) {
|
|
662
|
+
throw new Error(`Retry failed: ${response.statusText}`);
|
|
663
|
+
}
|
|
664
|
+
this.dispatchEvent(new CustomEvent('node-retry', {
|
|
665
|
+
detail: { executionId: this.currentExecutionId, nodeId },
|
|
666
|
+
bubbles: true,
|
|
667
|
+
composed: true,
|
|
668
|
+
}));
|
|
669
|
+
}
|
|
670
|
+
catch (error) {
|
|
671
|
+
console.error('[WorkflowCanvas] Failed to retry node:', error);
|
|
672
|
+
}
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
handleTableResizeStart(e) {
|
|
676
|
+
const { node, event } = e.detail;
|
|
677
|
+
this.startTableResize(node, event);
|
|
678
|
+
}
|
|
679
|
+
startTableResize(node, event) {
|
|
680
|
+
const config = node.configuration || {};
|
|
681
|
+
this.tableResizeState = {
|
|
682
|
+
nodeId: node.id,
|
|
683
|
+
startX: event.clientX,
|
|
684
|
+
startY: event.clientY,
|
|
685
|
+
startWidth: config.tableWidth || TABLE_DEFAULT_WIDTH,
|
|
686
|
+
startHeight: config.tableHeight || TABLE_DEFAULT_HEIGHT,
|
|
687
|
+
};
|
|
688
|
+
document.addEventListener('mousemove', this.handleTableResizeDrag);
|
|
689
|
+
document.addEventListener('mouseup', this.stopTableResize);
|
|
690
|
+
}
|
|
691
|
+
// ==================== Palette ====================
|
|
692
|
+
handlePaletteItemDrag(e, type) {
|
|
693
|
+
var _a;
|
|
694
|
+
(_a = e.dataTransfer) === null || _a === void 0 ? void 0 : _a.setData('application/workflow-node-type', type);
|
|
695
|
+
}
|
|
696
|
+
_cleanupPaletteTouchDrag() {
|
|
697
|
+
document.removeEventListener('touchmove', this._handlePaletteTouchMove);
|
|
698
|
+
document.removeEventListener('touchend', this._handlePaletteTouchEnd);
|
|
699
|
+
document.removeEventListener('touchcancel', this._handlePaletteTouchEnd);
|
|
700
|
+
if (this._touchDragGhost) {
|
|
701
|
+
this._touchDragGhost.remove();
|
|
702
|
+
this._touchDragGhost = null;
|
|
703
|
+
}
|
|
704
|
+
this._touchDragType = null;
|
|
705
|
+
}
|
|
706
|
+
handlePaletteItemTouchStart(e, type) {
|
|
707
|
+
if (e.touches.length !== 1)
|
|
708
|
+
return;
|
|
709
|
+
e.preventDefault();
|
|
710
|
+
this._touchDragType = type;
|
|
711
|
+
// Create ghost element
|
|
712
|
+
const touch = e.touches[0];
|
|
713
|
+
const ghost = document.createElement('div');
|
|
714
|
+
const template = NODE_TEMPLATES.find(t => t.type === type);
|
|
715
|
+
ghost.textContent = (template === null || template === void 0 ? void 0 : template.name) || type;
|
|
716
|
+
Object.assign(ghost.style, {
|
|
717
|
+
position: 'fixed',
|
|
718
|
+
left: `${touch.clientX - 40}px`,
|
|
719
|
+
top: `${touch.clientY - 20}px`,
|
|
720
|
+
padding: '8px 16px',
|
|
721
|
+
background: (template === null || template === void 0 ? void 0 : template.color) || '#6366f1',
|
|
722
|
+
color: 'white',
|
|
723
|
+
borderRadius: '8px',
|
|
724
|
+
fontSize: '13px',
|
|
725
|
+
fontWeight: '500',
|
|
726
|
+
pointerEvents: 'none',
|
|
727
|
+
zIndex: '10000',
|
|
728
|
+
opacity: '0.9',
|
|
729
|
+
boxShadow: '0 4px 12px rgba(0,0,0,0.3)',
|
|
730
|
+
whiteSpace: 'nowrap',
|
|
731
|
+
});
|
|
732
|
+
document.body.appendChild(ghost);
|
|
733
|
+
this._touchDragGhost = ghost;
|
|
734
|
+
// Bind move/end on document to track across the whole screen
|
|
735
|
+
document.addEventListener('touchmove', this._handlePaletteTouchMove, { passive: false });
|
|
736
|
+
document.addEventListener('touchend', this._handlePaletteTouchEnd);
|
|
737
|
+
document.addEventListener('touchcancel', this._handlePaletteTouchEnd);
|
|
738
|
+
}
|
|
739
|
+
toggleCategory(categoryId) {
|
|
740
|
+
if (this.expandedCategories.has(categoryId)) {
|
|
741
|
+
this.expandedCategories.delete(categoryId);
|
|
742
|
+
}
|
|
743
|
+
else {
|
|
744
|
+
this.expandedCategories.add(categoryId);
|
|
745
|
+
}
|
|
746
|
+
this.expandedCategories = new Set(this.expandedCategories);
|
|
747
|
+
}
|
|
748
|
+
// ==================== Render Helpers ====================
|
|
749
|
+
getPreviewNode() {
|
|
750
|
+
if (!this.previewNodeId)
|
|
751
|
+
return null;
|
|
752
|
+
return this.workflow.nodes.find(n => n.id === this.previewNodeId) || null;
|
|
753
|
+
}
|
|
754
|
+
getPreviewPanelPosition() {
|
|
755
|
+
const previewNode = this.getPreviewNode();
|
|
756
|
+
if (!previewNode)
|
|
757
|
+
return null;
|
|
758
|
+
const previewPanelWidth = 340;
|
|
759
|
+
const panelOffset = 20;
|
|
760
|
+
return {
|
|
761
|
+
x: (previewNode.position.x - previewPanelWidth - panelOffset) * this.viewport.zoom + this.viewport.panX,
|
|
762
|
+
y: previewNode.position.y * this.viewport.zoom + this.viewport.panY,
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
getAggregatedFrameStatus(containedNodes) {
|
|
766
|
+
if (containedNodes.length === 0)
|
|
767
|
+
return ExecutionStatus.IDLE;
|
|
768
|
+
let hasRunning = false;
|
|
769
|
+
let hasFailed = false;
|
|
770
|
+
let hasPending = false;
|
|
771
|
+
let hasCompleted = false;
|
|
772
|
+
for (const node of containedNodes) {
|
|
773
|
+
const status = node.status || ExecutionStatus.IDLE;
|
|
774
|
+
switch (status) {
|
|
775
|
+
case ExecutionStatus.RUNNING:
|
|
776
|
+
hasRunning = true;
|
|
777
|
+
break;
|
|
778
|
+
case ExecutionStatus.FAILED:
|
|
779
|
+
hasFailed = true;
|
|
780
|
+
break;
|
|
781
|
+
case ExecutionStatus.PENDING:
|
|
782
|
+
case ExecutionStatus.WAITING:
|
|
783
|
+
hasPending = true;
|
|
784
|
+
break;
|
|
785
|
+
case ExecutionStatus.COMPLETED:
|
|
786
|
+
hasCompleted = true;
|
|
787
|
+
break;
|
|
788
|
+
}
|
|
789
|
+
}
|
|
790
|
+
if (hasRunning)
|
|
791
|
+
return ExecutionStatus.RUNNING;
|
|
792
|
+
if (hasFailed)
|
|
793
|
+
return ExecutionStatus.FAILED;
|
|
794
|
+
if (hasPending)
|
|
795
|
+
return ExecutionStatus.PENDING;
|
|
796
|
+
if (hasCompleted)
|
|
797
|
+
return ExecutionStatus.COMPLETED;
|
|
798
|
+
return ExecutionStatus.IDLE;
|
|
799
|
+
}
|
|
800
|
+
renderCollapsedFrame(frame) {
|
|
801
|
+
const config = frame.configuration || {};
|
|
802
|
+
const collapsed = config.frameCollapsed;
|
|
803
|
+
if (!collapsed)
|
|
804
|
+
return null;
|
|
805
|
+
const label = config.frameLabel || FRAME_DEFAULT_LABEL;
|
|
806
|
+
const borderColor = config.frameBorderColor || 'rgba(99, 102, 241, 0.3)';
|
|
807
|
+
const isSelected = this.selectedNodeIds.has(frame.id);
|
|
808
|
+
const containedNodes = this.frameController.getContainedNodes(frame);
|
|
809
|
+
const previews = this.frameController.getContainedNodePreviews(frame, 5);
|
|
810
|
+
const overflowCount = containedNodes.length - 5;
|
|
811
|
+
const aggregatedPorts = this.frameController.getAggregatedPorts(frame);
|
|
812
|
+
const aggregatedStatus = this.getAggregatedFrameStatus(containedNodes);
|
|
813
|
+
const nodeStyles = {
|
|
814
|
+
left: `${frame.position.x}px`,
|
|
815
|
+
top: `${frame.position.y}px`,
|
|
816
|
+
'--node-color': borderColor.replace('0.3)', '1)').replace('rgba', 'rgb').split(',').slice(0, 3).join(',') + ')',
|
|
817
|
+
};
|
|
818
|
+
const tooltipContent = containedNodes.length === 0
|
|
819
|
+
? 'Empty group'
|
|
820
|
+
: `Contains:\n${containedNodes.map(n => `• ${n.name}`).join('\n')}\n\nDouble-click to expand`;
|
|
821
|
+
const statusClass = aggregatedStatus !== ExecutionStatus.IDLE
|
|
822
|
+
? `status-${aggregatedStatus.toLowerCase()}`
|
|
823
|
+
: '';
|
|
824
|
+
return html `
|
|
825
|
+
<div
|
|
826
|
+
class="collapsed-frame-node ${isSelected ? 'selected' : ''} ${statusClass}"
|
|
827
|
+
style=${styleMap(nodeStyles)}
|
|
828
|
+
data-frame-id=${frame.id}
|
|
829
|
+
data-status=${aggregatedStatus}
|
|
830
|
+
title=${tooltipContent}
|
|
831
|
+
@mousedown=${(e) => this.handleFrameMouseDown(e, frame)}
|
|
832
|
+
@dblclick=${(e) => this.handleFrameDblClick(e, frame)}
|
|
833
|
+
>
|
|
834
|
+
${this.renderFrameStatusIndicator(aggregatedStatus)}
|
|
835
|
+
${this.renderCollapsedFramePorts(aggregatedPorts.inputs, 'left')}
|
|
836
|
+
${this.renderCollapsedFrameBody(frame, label, previews, overflowCount)}
|
|
837
|
+
${this.renderCollapsedFramePorts(aggregatedPorts.outputs, 'right')}
|
|
838
|
+
</div>
|
|
839
|
+
`;
|
|
840
|
+
}
|
|
841
|
+
renderFrameStatusIndicator(status) {
|
|
842
|
+
if (status === ExecutionStatus.IDLE)
|
|
843
|
+
return null;
|
|
844
|
+
const iconMap = {
|
|
845
|
+
[ExecutionStatus.RUNNING]: 'loader',
|
|
846
|
+
[ExecutionStatus.FAILED]: 'alert-circle',
|
|
847
|
+
[ExecutionStatus.COMPLETED]: 'check-circle',
|
|
848
|
+
[ExecutionStatus.PENDING]: 'clock',
|
|
849
|
+
};
|
|
850
|
+
const iconName = iconMap[status];
|
|
851
|
+
if (!iconName)
|
|
852
|
+
return null;
|
|
853
|
+
return html `
|
|
854
|
+
<div class="frame-status-indicator status-${status.toLowerCase()}">
|
|
855
|
+
<nr-icon name=${iconName} size="small" class=${status === ExecutionStatus.RUNNING ? 'spinning' : ''}></nr-icon>
|
|
856
|
+
</div>
|
|
857
|
+
`;
|
|
858
|
+
}
|
|
859
|
+
renderCollapsedFramePorts(ports, side) {
|
|
860
|
+
if (ports.length === 0)
|
|
861
|
+
return null;
|
|
862
|
+
return html `
|
|
863
|
+
<div class="ports ports-${side}">
|
|
864
|
+
${ports.map(port => html `
|
|
865
|
+
<div
|
|
866
|
+
class="port port-${side === 'left' ? 'input' : 'output'}"
|
|
867
|
+
data-port-id=${port.id}
|
|
868
|
+
title=${port.label || (side === 'left' ? 'Input' : 'Output')}
|
|
869
|
+
></div>
|
|
870
|
+
`)}
|
|
871
|
+
</div>
|
|
872
|
+
`;
|
|
873
|
+
}
|
|
874
|
+
renderCollapsedFrameBody(frame, label, previews, overflowCount) {
|
|
875
|
+
return html `
|
|
876
|
+
<div class="collapsed-frame-body">
|
|
877
|
+
<div class="collapsed-frame-header">
|
|
878
|
+
<nr-icon name="layers" size="small"></nr-icon>
|
|
879
|
+
${this.editingFrameLabelId === frame.id ? html `
|
|
880
|
+
<input
|
|
881
|
+
type="text"
|
|
882
|
+
class="collapsed-frame-title-input"
|
|
883
|
+
.value=${label}
|
|
884
|
+
@blur=${(e) => this.handleFrameLabelBlur(e, frame)}
|
|
885
|
+
@keydown=${(e) => this.handleFrameLabelKeydown(e, frame)}
|
|
886
|
+
@click=${(e) => e.stopPropagation()}
|
|
887
|
+
@mousedown=${(e) => e.stopPropagation()}
|
|
888
|
+
@dblclick=${(e) => e.stopPropagation()}
|
|
889
|
+
/>
|
|
890
|
+
` : html `
|
|
891
|
+
<span class="collapsed-frame-title">
|
|
892
|
+
${label}
|
|
893
|
+
<nr-icon
|
|
894
|
+
name="edit-2"
|
|
895
|
+
size="small"
|
|
896
|
+
class="frame-label-edit-icon"
|
|
897
|
+
@click=${(e) => this.startEditingFrameLabel(e, frame)}
|
|
898
|
+
></nr-icon>
|
|
899
|
+
</span>
|
|
900
|
+
`}
|
|
901
|
+
</div>
|
|
902
|
+
|
|
903
|
+
${previews.length > 0 ? html `
|
|
904
|
+
<div class="node-icons-preview">
|
|
905
|
+
${previews.map(preview => html `
|
|
906
|
+
<div
|
|
907
|
+
class="preview-icon"
|
|
908
|
+
style="background-color: ${preview.color}20"
|
|
909
|
+
title=${preview.name}
|
|
910
|
+
>
|
|
911
|
+
<nr-icon
|
|
912
|
+
name=${preview.icon}
|
|
913
|
+
size="small"
|
|
914
|
+
style="color: ${preview.color}"
|
|
915
|
+
></nr-icon>
|
|
916
|
+
</div>
|
|
917
|
+
`)}
|
|
918
|
+
${overflowCount > 0 ? html `
|
|
919
|
+
<span class="overflow-count">+${overflowCount}</span>
|
|
920
|
+
` : null}
|
|
921
|
+
</div>
|
|
922
|
+
` : html `
|
|
923
|
+
<div class="node-icons-preview empty">
|
|
924
|
+
<span class="empty-text">Empty</span>
|
|
925
|
+
</div>
|
|
926
|
+
`}
|
|
927
|
+
</div>
|
|
928
|
+
`;
|
|
929
|
+
}
|
|
930
|
+
renderPalette() {
|
|
931
|
+
return renderPaletteTemplate({
|
|
932
|
+
showPalette: this.showPalette,
|
|
933
|
+
expandedCategories: this.expandedCategories,
|
|
934
|
+
canvasType: this.canvasType,
|
|
935
|
+
searchTerm: this.paletteSearchTerm,
|
|
936
|
+
onClose: () => {
|
|
937
|
+
this.showPalette = false;
|
|
938
|
+
this.paletteSearchTerm = '';
|
|
939
|
+
},
|
|
940
|
+
onToggleCategory: (categoryId) => this.toggleCategory(categoryId),
|
|
941
|
+
onNodeDragStart: (e, type) => this.handlePaletteItemDrag(e, type),
|
|
942
|
+
onNodeTouchStart: (e, type) => this.handlePaletteItemTouchStart(e, type),
|
|
943
|
+
onNodeDoubleClick: (type) => this.addNode(type),
|
|
944
|
+
onSearchChange: (term) => { this.paletteSearchTerm = term; },
|
|
945
|
+
});
|
|
946
|
+
}
|
|
947
|
+
renderConfigPanel() {
|
|
948
|
+
var _a, _b, _c;
|
|
949
|
+
const nodeId = (_a = this.configuredNode) === null || _a === void 0 ? void 0 : _a.id;
|
|
950
|
+
const nodeExecution = nodeId ? this.nodeExecutionData.get(nodeId) : undefined;
|
|
951
|
+
// Build trigger info/actions for persistent trigger nodes
|
|
952
|
+
let triggerInfo;
|
|
953
|
+
let triggerActions;
|
|
954
|
+
if (nodeId && this.configuredNode && isPersistentTriggerNode(this.configuredNode.type)) {
|
|
955
|
+
const ts = this.triggerStatuses.get(nodeId);
|
|
956
|
+
triggerInfo = {
|
|
957
|
+
triggerId: ts === null || ts === void 0 ? void 0 : ts.triggerId,
|
|
958
|
+
status: ts === null || ts === void 0 ? void 0 : ts.connectionState,
|
|
959
|
+
health: ts === null || ts === void 0 ? void 0 : ts.health,
|
|
960
|
+
messagesReceived: ts === null || ts === void 0 ? void 0 : ts.messagesReceived,
|
|
961
|
+
lastMessageAt: ts === null || ts === void 0 ? void 0 : ts.lastMessageAt,
|
|
962
|
+
stateReason: ts === null || ts === void 0 ? void 0 : ts.stateReason,
|
|
963
|
+
webhookUrl: ts === null || ts === void 0 ? void 0 : ts.webhookUrl,
|
|
964
|
+
inDevMode: ts === null || ts === void 0 ? void 0 : ts.inDevMode,
|
|
965
|
+
};
|
|
966
|
+
triggerActions = {
|
|
967
|
+
onActivate: (triggerId) => { void this.activateTrigger(triggerId); },
|
|
968
|
+
onDeactivate: (triggerId) => { void this.deactivateTrigger(triggerId); },
|
|
969
|
+
onCreateAndActivate: (nodeType, config) => this.createAndActivateTrigger(nodeType, config),
|
|
970
|
+
onToggleDevMode: (triggerId, enable) => { void this.toggleDevMode(triggerId, enable); },
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
return renderConfigPanelTemplate({
|
|
974
|
+
node: this.configuredNode,
|
|
975
|
+
position: this.configController.getPanelPosition(),
|
|
976
|
+
callbacks: {
|
|
977
|
+
onClose: () => this.configController.closeConfig(),
|
|
978
|
+
onUpdateName: (name) => this.configController.updateName(name),
|
|
979
|
+
onUpdateDescription: (desc) => this.configController.updateDescription(desc),
|
|
980
|
+
onUpdateConfig: (key, value) => {
|
|
981
|
+
var _a, _b;
|
|
982
|
+
this.configController.updateConfig(key, value);
|
|
983
|
+
if (this.chatPreviewController &&
|
|
984
|
+
((_a = this.configuredNode) === null || _a === void 0 ? void 0 : _a.id) === this.previewNodeId &&
|
|
985
|
+
((_b = this.configuredNode) === null || _b === void 0 ? void 0 : _b.type) === WorkflowNodeType.CHAT_START) {
|
|
986
|
+
if (key === 'enableFileUpload') {
|
|
987
|
+
this.chatPreviewController.updateConfig({ enableFileUpload: value === true });
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
onRetryNode: this.currentExecutionId ? (nodeId) => { void this.handleRetryNode(nodeId); } : undefined,
|
|
992
|
+
},
|
|
993
|
+
workflowId: (_b = this.workflow) === null || _b === void 0 ? void 0 : _b.id,
|
|
994
|
+
workflow: this.workflow,
|
|
995
|
+
dynamicVariables: this.dynamicVariables,
|
|
996
|
+
loadingVariables: this.loadingVariables,
|
|
997
|
+
nodeExecution,
|
|
998
|
+
executionId: (_c = this.currentExecutionId) !== null && _c !== void 0 ? _c : undefined,
|
|
999
|
+
kvEntries: this.kvEntries,
|
|
1000
|
+
onCreateKvEntry: this.onCreateKvEntry,
|
|
1001
|
+
applicationId: this.applicationId,
|
|
1002
|
+
databaseProvider: this.databaseProvider,
|
|
1003
|
+
triggerInfo,
|
|
1004
|
+
triggerActions,
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
renderDisabledOverlay() {
|
|
1008
|
+
if (!this.disabled)
|
|
1009
|
+
return html ``;
|
|
1010
|
+
return html `
|
|
1011
|
+
<div
|
|
1012
|
+
class="disabled-overlay ${this.isHoveringDisabledOverlay ? 'hovering' : ''}"
|
|
1013
|
+
@dblclick=${this.handleDisabledOverlayDblClick}
|
|
1014
|
+
@mouseenter=${this.handleDisabledOverlayMouseEnter}
|
|
1015
|
+
@mouseleave=${this.handleDisabledOverlayMouseLeave}
|
|
1016
|
+
>
|
|
1017
|
+
<div class="disabled-overlay-message">
|
|
1018
|
+
<nr-icon name="mouse-pointer-click" size="medium"></nr-icon>
|
|
1019
|
+
<span>Double click to enter preview mode</span>
|
|
1020
|
+
</div>
|
|
1021
|
+
</div>
|
|
1022
|
+
`;
|
|
1023
|
+
}
|
|
1024
|
+
renderHttpPreviewPanel(previewNode, panelStyle) {
|
|
1025
|
+
const config = previewNode.configuration || {};
|
|
1026
|
+
const httpPath = config.httpPath || '/webhook';
|
|
1027
|
+
return html `
|
|
1028
|
+
<div class="chatbot-preview-panel http-preview-panel" style=${styleMap(panelStyle)} data-theme=${this.currentTheme}>
|
|
1029
|
+
<div class="chatbot-preview-header">
|
|
1030
|
+
<div class="chatbot-preview-title">
|
|
1031
|
+
<nr-icon name="globe" size="small"></nr-icon>
|
|
1032
|
+
<span>HTTP Test</span>
|
|
1033
|
+
</div>
|
|
1034
|
+
<button class="chatbot-preview-close" @click=${() => this.closePreviewPanel()}>
|
|
1035
|
+
<nr-icon name="x" size="small"></nr-icon>
|
|
1036
|
+
</button>
|
|
1037
|
+
</div>
|
|
1038
|
+
<div class="http-preview-content">
|
|
1039
|
+
<div class="http-preview-url">
|
|
1040
|
+
<span class="http-method">POST</span>
|
|
1041
|
+
<span class="http-path">${httpPath}</span>
|
|
1042
|
+
</div>
|
|
1043
|
+
<div class="http-preview-section">
|
|
1044
|
+
<label>Request Body (JSON)</label>
|
|
1045
|
+
<textarea
|
|
1046
|
+
class="http-request-body"
|
|
1047
|
+
.value=${this.httpPreviewBody}
|
|
1048
|
+
@input=${(e) => this.httpPreviewBody = e.target.value}
|
|
1049
|
+
placeholder='{ "key": "value" }'
|
|
1050
|
+
?disabled=${this.httpPreviewLoading}
|
|
1051
|
+
></textarea>
|
|
1052
|
+
</div>
|
|
1053
|
+
<div class="http-preview-actions">
|
|
1054
|
+
<button
|
|
1055
|
+
class="http-send-btn"
|
|
1056
|
+
@click=${() => this.sendHttpPreviewRequest()}
|
|
1057
|
+
?disabled=${this.httpPreviewLoading}
|
|
1058
|
+
>
|
|
1059
|
+
${this.httpPreviewLoading ? html `
|
|
1060
|
+
<nr-icon name="loader" size="small"></nr-icon>
|
|
1061
|
+
<span>Sending...</span>
|
|
1062
|
+
` : html `
|
|
1063
|
+
<nr-icon name="send" size="small"></nr-icon>
|
|
1064
|
+
<span>Send Request</span>
|
|
1065
|
+
`}
|
|
1066
|
+
</button>
|
|
1067
|
+
</div>
|
|
1068
|
+
${this.httpPreviewError ? html `
|
|
1069
|
+
<div class="http-preview-error">
|
|
1070
|
+
<nr-icon name="alert-circle" size="small"></nr-icon>
|
|
1071
|
+
<span>${this.httpPreviewError}</span>
|
|
1072
|
+
</div>
|
|
1073
|
+
` : ''}
|
|
1074
|
+
${this.httpPreviewResponse ? html `
|
|
1075
|
+
<div class="http-preview-section">
|
|
1076
|
+
<label>Response</label>
|
|
1077
|
+
<pre class="http-response-body">${this.httpPreviewResponse}</pre>
|
|
1078
|
+
</div>
|
|
1079
|
+
` : ''}
|
|
1080
|
+
</div>
|
|
1081
|
+
</div>
|
|
1082
|
+
`;
|
|
1083
|
+
}
|
|
1084
|
+
renderChatPreviewPanel(previewNode, panelStyle) {
|
|
1085
|
+
var _a, _b;
|
|
1086
|
+
const config = previewNode.configuration || {};
|
|
1087
|
+
const rawSuggestions = config.suggestions || [];
|
|
1088
|
+
const suggestions = rawSuggestions.map((s, i) => ({
|
|
1089
|
+
id: s.id || String(i),
|
|
1090
|
+
text: s.text || '',
|
|
1091
|
+
}));
|
|
1092
|
+
const isChatStartNode = previewNode.type === WorkflowNodeType.CHAT_START;
|
|
1093
|
+
const isConnected = (_b = (_a = this.chatPreviewProvider) === null || _a === void 0 ? void 0 : _a.isConnected()) !== null && _b !== void 0 ? _b : false;
|
|
1094
|
+
const headerTitle = isChatStartNode ? 'Workflow Chat' : 'Chat Preview';
|
|
1095
|
+
const headerIcon = isChatStartNode ? 'zap' : 'message-circle';
|
|
1096
|
+
return html `
|
|
1097
|
+
<div class="chatbot-preview-panel" style=${styleMap(panelStyle)} data-theme=${this.currentTheme}>
|
|
1098
|
+
<div class="chatbot-preview-header">
|
|
1099
|
+
<div class="chatbot-preview-title">
|
|
1100
|
+
<nr-icon name=${headerIcon} size="small"></nr-icon>
|
|
1101
|
+
<span>${headerTitle}</span>
|
|
1102
|
+
${isChatStartNode ? html `
|
|
1103
|
+
<span class="chat-preview-status ${isConnected ? 'connected' : 'disconnected'}">
|
|
1104
|
+
${isConnected ? '● Connected' : '○ Connecting...'}
|
|
1105
|
+
</span>
|
|
1106
|
+
` : ''}
|
|
1107
|
+
</div>
|
|
1108
|
+
<button class="chatbot-preview-close" @click=${() => this.closePreviewPanel()}>
|
|
1109
|
+
<nr-icon name="x" size="small"></nr-icon>
|
|
1110
|
+
</button>
|
|
1111
|
+
</div>
|
|
1112
|
+
<div class="chatbot-preview-content">
|
|
1113
|
+
${isChatStartNode && this.chatPreviewController ? html `
|
|
1114
|
+
<nr-chatbot
|
|
1115
|
+
size="small"
|
|
1116
|
+
variant="default"
|
|
1117
|
+
.controller=${this.chatPreviewController}
|
|
1118
|
+
.suggestions=${suggestions}
|
|
1119
|
+
placeholder=${config.placeholder || 'Send a message...'}
|
|
1120
|
+
botName="Workflow"
|
|
1121
|
+
?showHeader=${false}
|
|
1122
|
+
?showSuggestions=${suggestions.length > 0}
|
|
1123
|
+
?enableFileUpload=${config.enableFileUpload === true}
|
|
1124
|
+
loadingType="dots"
|
|
1125
|
+
></nr-chatbot>
|
|
1126
|
+
` : isChatStartNode ? html `
|
|
1127
|
+
<div class="chat-preview-loading">
|
|
1128
|
+
<nr-icon name="loader" size="large"></nr-icon>
|
|
1129
|
+
<span>Connecting to workflow...</span>
|
|
1130
|
+
</div>
|
|
1131
|
+
` : html `
|
|
1132
|
+
<nr-chatbot
|
|
1133
|
+
size=${config.chatbotSize || 'medium'}
|
|
1134
|
+
variant=${config.chatbotVariant || 'default'}
|
|
1135
|
+
.suggestions=${suggestions}
|
|
1136
|
+
placeholder=${config.placeholder || 'Type a message...'}
|
|
1137
|
+
botName=${config.title || 'Chat Assistant'}
|
|
1138
|
+
?showHeader=${true}
|
|
1139
|
+
?showSuggestions=${config.enableSuggestions !== false}
|
|
1140
|
+
?enableFileUpload=${config.enableFileUpload === true}
|
|
1141
|
+
loadingType=${config.loadingType || 'dots'}
|
|
1142
|
+
></nr-chatbot>
|
|
1143
|
+
`}
|
|
1144
|
+
</div>
|
|
1145
|
+
</div>
|
|
1146
|
+
`;
|
|
1147
|
+
}
|
|
1148
|
+
renderPreviewPanel() {
|
|
1149
|
+
const previewNode = this.getPreviewNode();
|
|
1150
|
+
const position = this.getPreviewPanelPosition();
|
|
1151
|
+
if (!previewNode || !position)
|
|
1152
|
+
return html ``;
|
|
1153
|
+
const panelStyle = {
|
|
1154
|
+
left: `${position.x}px`,
|
|
1155
|
+
top: `${position.y}px`,
|
|
1156
|
+
};
|
|
1157
|
+
if (previewNode.type === WorkflowNodeType.HTTP_START) {
|
|
1158
|
+
return this.renderHttpPreviewPanel(previewNode, panelStyle);
|
|
1159
|
+
}
|
|
1160
|
+
return this.renderChatPreviewPanel(previewNode, panelStyle);
|
|
1161
|
+
}
|
|
1162
|
+
// ==================== Insert Panel ====================
|
|
1163
|
+
handleNodeInsertRow(e) {
|
|
1164
|
+
const { node } = e.detail;
|
|
1165
|
+
this.insertPanelNode = node;
|
|
1166
|
+
this.updateComplete.then(() => {
|
|
1167
|
+
this.viewportController.updateInsertPanelPosition();
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
renderInsertPanel() {
|
|
1171
|
+
var _a;
|
|
1172
|
+
if (!this.insertPanelNode)
|
|
1173
|
+
return nothing;
|
|
1174
|
+
return html `
|
|
1175
|
+
<div class="insert-panel">
|
|
1176
|
+
<insert-row-panel
|
|
1177
|
+
.tableName=${this.insertPanelNode.name || ((_a = this.insertPanelNode.configuration) === null || _a === void 0 ? void 0 : _a.tableName) || ''}
|
|
1178
|
+
.schemaName=${this.insertPanelSchemaName}
|
|
1179
|
+
.columns=${this.insertPanelColumns}
|
|
1180
|
+
@close-insert-panel=${this.handleCloseInsertPanel}
|
|
1181
|
+
></insert-row-panel>
|
|
1182
|
+
</div>
|
|
1183
|
+
`;
|
|
1184
|
+
}
|
|
1185
|
+
handleCloseInsertPanel() {
|
|
1186
|
+
this.insertPanelNode = null;
|
|
1187
|
+
}
|
|
1188
|
+
getInsertPanelElement() {
|
|
1189
|
+
var _a, _b;
|
|
1190
|
+
return (_b = (_a = this.insertPanel) === null || _a === void 0 ? void 0 : _a.querySelector('insert-row-panel')) !== null && _b !== void 0 ? _b : null;
|
|
1191
|
+
}
|
|
1192
|
+
// ==================== Constructor Override ====================
|
|
1193
|
+
constructor() {
|
|
1194
|
+
super();
|
|
1195
|
+
// ==================== Workflow-specific Properties ====================
|
|
1196
|
+
this.canvasType = CanvasType.WORKFLOW;
|
|
1197
|
+
this.nodeStatuses = {};
|
|
1198
|
+
this.agentActivity = {};
|
|
1199
|
+
this.listenToExecutionEvents = false;
|
|
1200
|
+
this.applicationId = '';
|
|
1201
|
+
this.kvEntries = [];
|
|
1202
|
+
// ==================== Workflow-specific State ====================
|
|
1203
|
+
this.paletteSearchTerm = '';
|
|
1204
|
+
this.previewNodeId = null;
|
|
1205
|
+
this.isHoveringDisabledOverlay = false;
|
|
1206
|
+
this.httpPreviewBody = '{\n \n}';
|
|
1207
|
+
this.httpPreviewResponse = '';
|
|
1208
|
+
this.httpPreviewLoading = false;
|
|
1209
|
+
this.httpPreviewError = '';
|
|
1210
|
+
this.dynamicVariables = [];
|
|
1211
|
+
this.loadingVariables = false;
|
|
1212
|
+
this.nodeExecutionData = new Map();
|
|
1213
|
+
this.currentExecutionId = null;
|
|
1214
|
+
// Chatbot preview
|
|
1215
|
+
this.chatPreviewController = null;
|
|
1216
|
+
this.chatPreviewProvider = null;
|
|
1217
|
+
// Trigger status polling
|
|
1218
|
+
this.triggerStatuses = new Map();
|
|
1219
|
+
this.triggerPollingInterval = null;
|
|
1220
|
+
// ==================== Workflow Event Handlers ====================
|
|
1221
|
+
this.handleTestWorkflowRequest = () => {
|
|
1222
|
+
if (this.configuredNode) {
|
|
1223
|
+
const config = this.configuredNode.configuration || {};
|
|
1224
|
+
const testData = config.testFile || config.testDocument || null;
|
|
1225
|
+
this.dispatchEvent(new CustomEvent('workflow-trigger', {
|
|
1226
|
+
detail: {
|
|
1227
|
+
node: this.configuredNode,
|
|
1228
|
+
startFromNode: true,
|
|
1229
|
+
testData: testData,
|
|
1230
|
+
workflow: this.workflow,
|
|
1231
|
+
},
|
|
1232
|
+
bubbles: true,
|
|
1233
|
+
composed: true,
|
|
1234
|
+
}));
|
|
1235
|
+
}
|
|
1236
|
+
};
|
|
1237
|
+
this.handleDisabledOverlayDblClick = (e) => {
|
|
1238
|
+
e.preventDefault();
|
|
1239
|
+
e.stopPropagation();
|
|
1240
|
+
this.disabled = false;
|
|
1241
|
+
this.isHoveringDisabledOverlay = false;
|
|
1242
|
+
this.dispatchEvent(new CustomEvent('canvas-enabled', {
|
|
1243
|
+
bubbles: true,
|
|
1244
|
+
composed: true,
|
|
1245
|
+
}));
|
|
1246
|
+
};
|
|
1247
|
+
this.handleDisabledOverlayMouseEnter = () => {
|
|
1248
|
+
this.isHoveringDisabledOverlay = true;
|
|
1249
|
+
};
|
|
1250
|
+
this.handleDisabledOverlayMouseLeave = () => {
|
|
1251
|
+
this.isHoveringDisabledOverlay = false;
|
|
1252
|
+
};
|
|
1253
|
+
// ==================== Table Resize ====================
|
|
1254
|
+
this.tableResizeState = null;
|
|
1255
|
+
this.handleTableResizeDrag = (event) => {
|
|
1256
|
+
if (!this.tableResizeState)
|
|
1257
|
+
return;
|
|
1258
|
+
const { nodeId, startX, startY, startWidth, startHeight } = this.tableResizeState;
|
|
1259
|
+
const node = this.workflow.nodes.find(n => n.id === nodeId);
|
|
1260
|
+
if (!node)
|
|
1261
|
+
return;
|
|
1262
|
+
const deltaX = (event.clientX - startX) / this.viewport.zoom;
|
|
1263
|
+
const deltaY = (event.clientY - startY) / this.viewport.zoom;
|
|
1264
|
+
const newWidth = Math.max(TABLE_MIN_WIDTH, startWidth + deltaX);
|
|
1265
|
+
const newHeight = Math.max(TABLE_MIN_HEIGHT, startHeight + deltaY);
|
|
1266
|
+
node.configuration = Object.assign(Object.assign({}, node.configuration), { tableWidth: newWidth, tableHeight: newHeight });
|
|
1267
|
+
this.requestUpdate();
|
|
1268
|
+
};
|
|
1269
|
+
this.stopTableResize = () => {
|
|
1270
|
+
if (!this.tableResizeState)
|
|
1271
|
+
return;
|
|
1272
|
+
this.tableResizeState = null;
|
|
1273
|
+
document.removeEventListener('mousemove', this.handleTableResizeDrag);
|
|
1274
|
+
document.removeEventListener('mouseup', this.stopTableResize);
|
|
1275
|
+
this.dispatchWorkflowChanged();
|
|
1276
|
+
};
|
|
1277
|
+
// ===== Touch drag from palette (mobile) =====
|
|
1278
|
+
this._touchDragType = null;
|
|
1279
|
+
this._touchDragGhost = null;
|
|
1280
|
+
this._handlePaletteTouchMove = (e) => {
|
|
1281
|
+
if (!this._touchDragGhost)
|
|
1282
|
+
return;
|
|
1283
|
+
e.preventDefault();
|
|
1284
|
+
const touch = e.touches[0];
|
|
1285
|
+
this._touchDragGhost.style.left = `${touch.clientX - 40}px`;
|
|
1286
|
+
this._touchDragGhost.style.top = `${touch.clientY - 20}px`;
|
|
1287
|
+
};
|
|
1288
|
+
this._handlePaletteTouchEnd = (e) => {
|
|
1289
|
+
document.removeEventListener('touchmove', this._handlePaletteTouchMove);
|
|
1290
|
+
document.removeEventListener('touchend', this._handlePaletteTouchEnd);
|
|
1291
|
+
document.removeEventListener('touchcancel', this._handlePaletteTouchEnd);
|
|
1292
|
+
// Clean up ghost
|
|
1293
|
+
if (this._touchDragGhost) {
|
|
1294
|
+
this._touchDragGhost.remove();
|
|
1295
|
+
this._touchDragGhost = null;
|
|
1296
|
+
}
|
|
1297
|
+
const type = this._touchDragType;
|
|
1298
|
+
this._touchDragType = null;
|
|
1299
|
+
if (!type || this.disabled)
|
|
1300
|
+
return;
|
|
1301
|
+
// Check if touch ended over the canvas
|
|
1302
|
+
const touch = e.changedTouches[0];
|
|
1303
|
+
if (!touch || !this.canvasWrapper)
|
|
1304
|
+
return;
|
|
1305
|
+
const rect = this.canvasWrapper.getBoundingClientRect();
|
|
1306
|
+
if (touch.clientX >= rect.left && touch.clientX <= rect.right &&
|
|
1307
|
+
touch.clientY >= rect.top && touch.clientY <= rect.bottom) {
|
|
1308
|
+
const x = (touch.clientX - rect.left - this.viewport.panX) / this.viewport.zoom;
|
|
1309
|
+
const y = (touch.clientY - rect.top - this.viewport.panY) / this.viewport.zoom;
|
|
1310
|
+
this.addNode(type, { x: Math.round(x / 20) * 20, y: Math.round(y / 20) * 20 });
|
|
1311
|
+
}
|
|
1312
|
+
};
|
|
1313
|
+
this.expandedCategories = new Set([
|
|
1314
|
+
'trigger', 'control', 'action', 'data', 'agent',
|
|
1315
|
+
'db-tables-views', 'db-relations-constraints', 'db-indexes-queries',
|
|
1316
|
+
]);
|
|
1317
|
+
}
|
|
1318
|
+
// ==================== Main Render ====================
|
|
1319
|
+
render() {
|
|
1320
|
+
return html `
|
|
1321
|
+
<div
|
|
1322
|
+
class="canvas-wrapper"
|
|
1323
|
+
data-theme=${this.currentTheme}
|
|
1324
|
+
data-mode=${this.mode}
|
|
1325
|
+
@mousedown=${this.handleCanvasMouseDown}
|
|
1326
|
+
@contextmenu=${this.handleCanvasContextMenu}
|
|
1327
|
+
@drop=${this.handleCanvasDrop}
|
|
1328
|
+
@dragover=${this.handleCanvasDragOver}
|
|
1329
|
+
>
|
|
1330
|
+
<div class="canvas-grid"></div>
|
|
1331
|
+
|
|
1332
|
+
<div class="canvas-viewport">
|
|
1333
|
+
<!-- Edges SVG layer -->
|
|
1334
|
+
<svg class="edges-svg">
|
|
1335
|
+
${this.renderEdges()}
|
|
1336
|
+
</svg>
|
|
1337
|
+
|
|
1338
|
+
<!-- Frame nodes layer (rendered behind regular nodes) -->
|
|
1339
|
+
<div class="frames-layer">
|
|
1340
|
+
${this.getFrameNodes().map(frame => {
|
|
1341
|
+
const config = frame.configuration || {};
|
|
1342
|
+
return config.frameCollapsed
|
|
1343
|
+
? this.renderCollapsedFrame(frame)
|
|
1344
|
+
: this.renderExpandedFrame(frame);
|
|
1345
|
+
})}
|
|
1346
|
+
</div>
|
|
1347
|
+
|
|
1348
|
+
<!-- Nodes layer -->
|
|
1349
|
+
<div class="nodes-layer">
|
|
1350
|
+
${this.getVisibleNonFrameNodes().map(node => {
|
|
1351
|
+
var _a, _b;
|
|
1352
|
+
const enrichedNode = this.triggerStatuses.has(node.id)
|
|
1353
|
+
? Object.assign(Object.assign({}, node), { triggerStatus: this.triggerStatuses.get(node.id) }) : node;
|
|
1354
|
+
return html `
|
|
1355
|
+
<workflow-node
|
|
1356
|
+
data-node-id=${node.id}
|
|
1357
|
+
.node=${enrichedNode}
|
|
1358
|
+
?selected=${this.selectedNodeIds.has(node.id)}
|
|
1359
|
+
?dragging=${((_a = this.dragState) === null || _a === void 0 ? void 0 : _a.nodeId) === node.id}
|
|
1360
|
+
?editing=${this.editingNoteId === node.id}
|
|
1361
|
+
.connectingPortId=${((_b = this.connectionState) === null || _b === void 0 ? void 0 : _b.sourcePortId) || null}
|
|
1362
|
+
.remoteSelection=${this.collaborative
|
|
1363
|
+
? this.collaborationController.isElementSelectedByRemote(node.id)
|
|
1364
|
+
: null}
|
|
1365
|
+
.remoteTyping=${this.collaborative
|
|
1366
|
+
? this.collaborationController.isElementBeingTypedByRemote(node.id)
|
|
1367
|
+
: null}
|
|
1368
|
+
@node-mousedown=${this.handleNodeMouseDown}
|
|
1369
|
+
@node-dblclick=${this.handleNodeDblClick}
|
|
1370
|
+
@node-preview=${this.handleNodePreview}
|
|
1371
|
+
@node-trigger=${this.handleNodeTrigger}
|
|
1372
|
+
@port-mousedown=${this.handlePortMouseDown}
|
|
1373
|
+
@port-mouseup=${this.handlePortMouseUp}
|
|
1374
|
+
@note-content-change=${this.handleNoteContentChange}
|
|
1375
|
+
@note-edit-end=${this.handleNoteEditEnd}
|
|
1376
|
+
@note-resize-start=${this.handleNoteResizeStart}
|
|
1377
|
+
@table-resize-start=${this.handleTableResizeStart}
|
|
1378
|
+
@note-settings=${this.handleNoteSettings}
|
|
1379
|
+
@node-insert-row=${this.handleNodeInsertRow}
|
|
1380
|
+
></workflow-node>
|
|
1381
|
+
`;
|
|
1382
|
+
})}
|
|
1383
|
+
</div>
|
|
1384
|
+
</div>
|
|
1385
|
+
|
|
1386
|
+
${this.renderRemoteCursors()}
|
|
1387
|
+
${this.renderMarqueeBox()}
|
|
1388
|
+
${this.renderEmptyState()}
|
|
1389
|
+
${this.renderDisabledOverlay()}
|
|
1390
|
+
${this.renderPresenceBar()}
|
|
1391
|
+
${this.renderToolbar()}
|
|
1392
|
+
${this.renderPalette()}
|
|
1393
|
+
${this.renderConfigPanel()}
|
|
1394
|
+
${this.renderInsertPanel()}
|
|
1395
|
+
${this.renderPreviewPanel()}
|
|
1396
|
+
${this.renderZoomControls()}
|
|
1397
|
+
${this.renderContextMenu()}
|
|
1398
|
+
</div>
|
|
1399
|
+
${this.renderChatbotPanel()}
|
|
1400
|
+
`;
|
|
1401
|
+
}
|
|
1402
|
+
};
|
|
1403
|
+
WorkflowCanvasElement.styles = styles;
|
|
1404
|
+
__decorate([
|
|
1405
|
+
property({ type: String })
|
|
1406
|
+
], WorkflowCanvasElement.prototype, "canvasType", void 0);
|
|
1407
|
+
__decorate([
|
|
1408
|
+
property({ type: Object })
|
|
1409
|
+
], WorkflowCanvasElement.prototype, "nodeStatuses", void 0);
|
|
1410
|
+
__decorate([
|
|
1411
|
+
property({ type: Object })
|
|
1412
|
+
], WorkflowCanvasElement.prototype, "agentActivity", void 0);
|
|
1413
|
+
__decorate([
|
|
1414
|
+
property({ type: Boolean })
|
|
1415
|
+
], WorkflowCanvasElement.prototype, "listenToExecutionEvents", void 0);
|
|
1416
|
+
__decorate([
|
|
1417
|
+
property({ type: String })
|
|
1418
|
+
], WorkflowCanvasElement.prototype, "executionId", null);
|
|
1419
|
+
__decorate([
|
|
1420
|
+
property({ attribute: false })
|
|
1421
|
+
], WorkflowCanvasElement.prototype, "databaseProvider", void 0);
|
|
1422
|
+
__decorate([
|
|
1423
|
+
property({ type: String })
|
|
1424
|
+
], WorkflowCanvasElement.prototype, "applicationId", void 0);
|
|
1425
|
+
__decorate([
|
|
1426
|
+
property({ attribute: false })
|
|
1427
|
+
], WorkflowCanvasElement.prototype, "kvEntries", void 0);
|
|
1428
|
+
__decorate([
|
|
1429
|
+
property({ attribute: false })
|
|
1430
|
+
], WorkflowCanvasElement.prototype, "onCreateKvEntry", void 0);
|
|
1431
|
+
__decorate([
|
|
1432
|
+
state()
|
|
1433
|
+
], WorkflowCanvasElement.prototype, "paletteSearchTerm", void 0);
|
|
1434
|
+
__decorate([
|
|
1435
|
+
state()
|
|
1436
|
+
], WorkflowCanvasElement.prototype, "previewNodeId", void 0);
|
|
1437
|
+
__decorate([
|
|
1438
|
+
state()
|
|
1439
|
+
], WorkflowCanvasElement.prototype, "isHoveringDisabledOverlay", void 0);
|
|
1440
|
+
__decorate([
|
|
1441
|
+
state()
|
|
1442
|
+
], WorkflowCanvasElement.prototype, "httpPreviewBody", void 0);
|
|
1443
|
+
__decorate([
|
|
1444
|
+
state()
|
|
1445
|
+
], WorkflowCanvasElement.prototype, "httpPreviewResponse", void 0);
|
|
1446
|
+
__decorate([
|
|
1447
|
+
state()
|
|
1448
|
+
], WorkflowCanvasElement.prototype, "httpPreviewLoading", void 0);
|
|
1449
|
+
__decorate([
|
|
1450
|
+
state()
|
|
1451
|
+
], WorkflowCanvasElement.prototype, "httpPreviewError", void 0);
|
|
1452
|
+
__decorate([
|
|
1453
|
+
state()
|
|
1454
|
+
], WorkflowCanvasElement.prototype, "dynamicVariables", void 0);
|
|
1455
|
+
__decorate([
|
|
1456
|
+
state()
|
|
1457
|
+
], WorkflowCanvasElement.prototype, "loadingVariables", void 0);
|
|
1458
|
+
__decorate([
|
|
1459
|
+
state()
|
|
1460
|
+
], WorkflowCanvasElement.prototype, "nodeExecutionData", void 0);
|
|
1461
|
+
__decorate([
|
|
1462
|
+
state()
|
|
1463
|
+
], WorkflowCanvasElement.prototype, "currentExecutionId", void 0);
|
|
1464
|
+
WorkflowCanvasElement = __decorate([
|
|
1465
|
+
customElement('workflow-canvas')
|
|
1466
|
+
], WorkflowCanvasElement);
|
|
1467
|
+
export { WorkflowCanvasElement };
|
|
1468
|
+
//# sourceMappingURL=workflow-canvas.component.js.map
|