@redvars/peacock 4.0.0 → 4.2.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/dist/{BaseField-CAog9TIc.js → BaseField-_unSNU5x.js} +43 -4
- package/dist/BaseField-_unSNU5x.js.map +1 -0
- package/dist/{BaseInput-CcMfg1Y2.js → BaseInput-DtZH0fPJ.js} +7 -4
- package/dist/BaseInput-DtZH0fPJ.js.map +1 -0
- package/dist/accordion.js.map +1 -1
- package/dist/ai-badge.js +32 -6
- package/dist/ai-badge.js.map +1 -1
- package/dist/ai-summary.js +2 -2
- package/dist/alert.js +2 -2
- package/dist/anchor-nav.js +2 -2
- package/dist/app-shell.js +2 -2
- package/dist/assistant-panel.js +2 -2
- package/dist/assistant-step.js +2 -2
- package/dist/assistant-steps.js +2 -2
- package/dist/avatar-group.js +2 -2
- package/dist/banner.js +2 -2
- package/dist/{base-button-Do2TUy8M.js → base-button-BJMGMcMv.js} +3 -1
- package/dist/base-button-BJMGMcMv.js.map +1 -0
- package/dist/{base-progress-BiLlZVHJ.js → base-progress-D7Nmfh1s.js} +4 -2
- package/dist/base-progress-D7Nmfh1s.js.map +1 -0
- package/dist/bottom-sheet.js +2 -2
- package/dist/breadcrumb.js +2 -2
- package/dist/button-group.js +4 -4
- package/dist/button.js +14 -8
- package/dist/button.js.map +1 -1
- package/dist/calendar.js +2 -2
- package/dist/canvas-base-CWQ4rQ2s.js +788 -0
- package/dist/canvas-base-CWQ4rQ2s.js.map +1 -0
- package/dist/canvas-link-CtgsALq4.js +54 -0
- package/dist/canvas-link-CtgsALq4.js.map +1 -0
- package/dist/{cartesian-chart-C-f1frt0.js → cartesian-chart-CS5yRLfE.js} +3 -2
- package/dist/cartesian-chart-CS5yRLfE.js.map +1 -0
- package/dist/{cb-group-base-DeuCVx3a.js → cb-group-base-CO30uFQZ.js} +2 -2
- package/dist/{cb-group-base-DeuCVx3a.js.map → cb-group-base-CO30uFQZ.js.map} +1 -1
- package/dist/cb-group.js +3 -3
- package/dist/cb-rule.js +3 -3
- package/dist/chart-area.js +5 -4
- package/dist/chart-area.js.map +1 -1
- package/dist/chart-bar.js +5 -4
- package/dist/chart-bar.js.map +1 -1
- package/dist/chart-base-C_XKVyhf.js +833 -0
- package/dist/chart-base-C_XKVyhf.js.map +1 -0
- package/dist/chart-doughnut.js +4 -3
- package/dist/chart-doughnut.js.map +1 -1
- package/dist/chart-line.js +5 -4
- package/dist/chart-line.js.map +1 -1
- package/dist/chart-pie.js +4 -3
- package/dist/chart-pie.js.map +1 -1
- package/dist/chat-event.js +152 -0
- package/dist/chat-event.js.map +1 -0
- package/dist/chat-message.js +195 -19
- package/dist/chat-message.js.map +1 -1
- package/dist/chat-thread.js +26 -9
- package/dist/chat-thread.js.map +1 -1
- package/dist/checkbox-group.js +5 -5
- package/dist/checkbox.js +5 -5
- package/dist/chip-set.js +4 -4
- package/dist/chip.js +4 -4
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +6 -5
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +6 -6
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +6 -6
- package/dist/condition-builder.js +3 -3
- package/dist/confirm-dialog.js +2 -2
- package/dist/copy-button.js +2 -2
- package/dist/currency-field.js +6 -6
- package/dist/custom-elements-jsdocs.json +2330 -397
- package/dist/custom-elements.json +20464 -542
- package/dist/date-field.js +7 -7
- package/dist/date-picker.js +4 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-field.js +7 -7
- package/dist/datetime-field.js +7 -7
- package/dist/dependency-map-layout-5KUueabk.js +1390 -0
- package/dist/dependency-map-layout-5KUueabk.js.map +1 -0
- package/dist/dependency-map.js +1605 -0
- package/dist/dependency-map.js.map +1 -0
- package/dist/description-item.js +2 -2
- package/dist/description-list.js +2 -2
- package/dist/diagram-Va096vj9.js +2029 -0
- package/dist/diagram-Va096vj9.js.map +1 -0
- package/dist/diagram-controls.js +345 -0
- package/dist/diagram-controls.js.map +1 -0
- package/dist/diagram-minimap.js +216 -0
- package/dist/diagram-minimap.js.map +1 -0
- package/dist/diagram.js +20 -0
- package/dist/diagram.js.map +1 -0
- package/dist/diff-viewer.js +2 -2
- package/dist/discussion-activity.js +4 -4
- package/dist/discussion-comment.js +4 -4
- package/dist/{discussion-time-BegaYfhf.js → discussion-time-DqykqvNy.js} +2 -2
- package/dist/{discussion-time-BegaYfhf.js.map → discussion-time-DqykqvNy.js.map} +1 -1
- package/dist/discussion.js +8 -8
- package/dist/{document-editor-BO7QPbO5.js → document-editor-Dc8JeFVB.js} +2 -2
- package/dist/{document-editor-BO7QPbO5.js.map → document-editor-Dc8JeFVB.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +14 -4
- package/dist/draft-card.js.map +1 -1
- package/dist/dropdown-button.js +3 -2
- package/dist/dropdown-button.js.map +1 -1
- package/dist/erd.js +2021 -0
- package/dist/erd.js.map +1 -0
- package/dist/fab.js +4 -4
- package/dist/field.js +257 -43
- package/dist/field.js.map +1 -1
- package/dist/file-upload.js +38 -16
- package/dist/file-upload.js.map +1 -1
- package/dist/filter-bar.js +2 -2
- package/dist/flow.js +27 -970
- package/dist/flow.js.map +1 -1
- package/dist/focus-ring.js +2 -0
- package/dist/focus-ring.js.map +1 -1
- package/dist/{form-associated-D3Tn33s_.js → form-associated-BHbg72PG.js} +3 -1
- package/dist/{form-associated-D3Tn33s_.js.map → form-associated-BHbg72PG.js.map} +1 -1
- package/dist/{form-submitter-DWwv6K9-.js → form-submitter-beG1CXAn.js} +7 -1
- package/dist/{form-submitter-DWwv6K9-.js.map → form-submitter-beG1CXAn.js.map} +1 -1
- package/dist/form.js +3 -3
- package/dist/{generative-view-DmtpDobn.js → generative-view-BKlcuujw.js} +13 -13
- package/dist/generative-view-BKlcuujw.js.map +1 -0
- package/dist/generative-view.js +3 -3
- package/dist/geometry-INg82Lxq.js +305 -0
- package/dist/geometry-INg82Lxq.js.map +1 -0
- package/dist/history-YbTSQZHj.js +45 -0
- package/dist/history-YbTSQZHj.js.map +1 -0
- package/dist/host-CZK7xhzh.js +40 -0
- package/dist/host-CZK7xhzh.js.map +1 -0
- package/dist/html-editor.js +6 -6
- package/dist/{hyperlink-DhE9RlVS.js → hyperlink-DycWPKwU.js} +10 -1
- package/dist/hyperlink-DycWPKwU.js.map +1 -0
- package/dist/{i18n-controller-urcQKYGe.js → i18n-controller-DJHsE1YH.js} +2 -2
- package/dist/{i18n-controller-urcQKYGe.js.map → i18n-controller-DJHsE1YH.js.map} +1 -1
- package/dist/icon-button.js +11 -9
- package/dist/icon-button.js.map +1 -1
- package/dist/image.js +2 -2
- package/dist/index.js +42 -22
- package/dist/index.js.map +1 -1
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +5 -5
- package/dist/json-viewer.js +2 -2
- package/dist/kanban.js +2 -2
- package/dist/kbd.js +2 -2
- package/dist/linear-progress.js +3 -3
- package/dist/link-button.js +9 -7
- package/dist/link-button.js.map +1 -1
- package/dist/list-item.js +2 -2
- package/dist/list.js +2 -2
- package/dist/listbox.js +4 -4
- package/dist/loader-full.js +17 -16
- package/dist/loader-full.js.map +1 -1
- package/dist/loader.js +51 -18
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +6 -6
- package/dist/markers-BFmh1OCz.js +46 -0
- package/dist/markers-BFmh1OCz.js.map +1 -0
- package/dist/measure-controller-Dmc5hZKg.js +89 -0
- package/dist/measure-controller-Dmc5hZKg.js.map +1 -0
- package/dist/mention-input.js +7 -6
- package/dist/mention-input.js.map +1 -1
- package/dist/menu-item.js +3 -2
- package/dist/menu-item.js.map +1 -1
- package/dist/{menu-trigger-controller-DyLpTxM7.js → menu-trigger-controller-CEJq1ugC.js} +11 -14
- package/dist/menu-trigger-controller-CEJq1ugC.js.map +1 -0
- package/dist/menu.js +2 -2
- package/dist/modal.js +2 -2
- package/dist/navigation-bar.js +2 -2
- package/dist/navigation-drawer.js +2 -2
- package/dist/navigation-rail.js +2 -2
- package/dist/notification-center.js +3 -3
- package/dist/number-field.js +7 -6
- package/dist/number-field.js.map +1 -1
- package/dist/option.js +2 -2
- package/dist/page-header.js +2 -2
- package/dist/pagination.js +2 -2
- package/dist/password-field.js +6 -6
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +6 -6
- package/dist/{picker-field-B4DtcJfL.js → picker-field-CUI05sWc.js} +3 -3
- package/dist/{picker-field-B4DtcJfL.js.map → picker-field-CUI05sWc.js.map} +1 -1
- package/dist/pin-input.js +6 -6
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +6 -6
- package/dist/radio-group.js +2 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/radio.js +6 -6
- package/dist/radio.js.map +1 -1
- package/dist/rating.js +6 -5
- package/dist/rating.js.map +1 -1
- package/dist/redvars-loader.js +2 -2
- package/dist/{relative-time-BVQXLuHm.js → relative-time-BNxqvEbg.js} +13 -2
- package/dist/relative-time-BNxqvEbg.js.map +1 -0
- package/dist/relative-time.js +3 -3
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-DLICqof1.js → rich-text-input-N_hqnXej.js} +3 -3
- package/dist/{rich-text-input-DLICqof1.js.map → rich-text-input-N_hqnXej.js.map} +1 -1
- package/dist/ripple.js +2 -0
- package/dist/ripple.js.map +1 -1
- package/dist/{schema-hMt-NRLk.js → schema-Dy0z-80u.js} +2 -2
- package/dist/{schema-hMt-NRLk.js.map → schema-Dy0z-80u.js.map} +1 -1
- package/dist/search.js +5 -5
- package/dist/segmented-button-group.js +1 -1
- package/dist/select.js +8 -8
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +6 -5
- package/dist/signature-pad.js.map +1 -1
- package/dist/slider.js +6 -5
- package/dist/slider.js.map +1 -1
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +109 -21
- package/dist/split-button.js.map +1 -1
- package/dist/src/__internal/ai/suggestion-controller.d.ts +2 -0
- package/dist/src/__internal/diagram/canvas-base.d.ts +105 -0
- package/dist/src/__internal/diagram/canvas-link.d.ts +21 -0
- package/dist/src/__internal/diagram/geometry.d.ts +49 -0
- package/dist/src/__internal/diagram/history.d.ts +17 -0
- package/dist/src/__internal/diagram/host.d.ts +45 -0
- package/dist/src/__internal/diagram/markers.d.ts +16 -0
- package/dist/src/__internal/diagram/measure-controller.d.ts +32 -0
- package/dist/src/__internal/diagram/motion.d.ts +22 -0
- package/dist/src/__internal/diagram/selection.d.ts +20 -0
- package/dist/src/__internal/diagram/types.d.ts +39 -0
- package/dist/src/__internal/diagram/viewport-controller.d.ts +89 -0
- package/dist/src/__internal/i18n/strings.d.ts +155 -0
- package/dist/src/__internal/menu-trigger-controller.d.ts +11 -8
- package/dist/src/__internal/toggle-base.d.ts +8 -0
- package/dist/src/__internal/utils/deprecate.d.ts +3 -3
- package/dist/src/__internal/utils/relative-time.d.ts +5 -0
- package/dist/src/accordion/accordion.d.ts +1 -0
- package/dist/src/ai-badge/ai-badge.d.ts +8 -0
- package/dist/src/button/button/button.d.ts +4 -0
- package/dist/src/chat-message/chat-message.d.ts +51 -10
- package/dist/src/chat-message/index.d.ts +1 -1
- package/dist/src/chat-thread/chat-event.d.ts +37 -0
- package/dist/src/chat-thread/chat-thread.d.ts +7 -4
- package/dist/src/chat-thread/index.d.ts +1 -0
- package/dist/src/code-editor/code-editor.d.ts +1 -0
- package/dist/src/date-picker/date-picker.d.ts +2 -0
- package/dist/src/dependency-map/dependency-map-layout.d.ts +48 -0
- package/dist/src/dependency-map/dependency-map.d.ts +241 -0
- package/dist/src/dependency-map/index.d.ts +2 -0
- package/dist/src/diagram/diagram.d.ts +300 -0
- package/dist/src/diagram/flow.d.ts +53 -0
- package/dist/src/diagram/index.d.ts +4 -0
- package/dist/src/diagram-controls/diagram-controls.d.ts +46 -0
- package/dist/src/diagram-controls/index.d.ts +1 -0
- package/dist/src/diagram-minimap/diagram-minimap.d.ts +39 -0
- package/dist/src/diagram-minimap/index.d.ts +1 -0
- package/dist/src/erd/erd-layout.d.ts +27 -0
- package/dist/src/erd/erd.d.ts +266 -0
- package/dist/src/erd/index.d.ts +2 -0
- package/dist/src/field/field.d.ts +38 -1
- package/dist/src/file-upload/file-upload.d.ts +3 -1
- package/dist/src/focus-ring/focus-ring.d.ts +2 -0
- package/dist/src/index.d.ts +17 -4
- package/dist/src/input/BaseField.d.ts +15 -1
- package/dist/src/input/BaseInput.d.ts +4 -0
- package/dist/src/menu/menu-item/menu-item.d.ts +1 -0
- package/dist/src/number-field/number-field.d.ts +4 -0
- package/dist/src/progress/base-progress.d.ts +3 -0
- package/dist/src/radio/radio-group.d.ts +1 -0
- package/dist/src/rating/rating.d.ts +1 -0
- package/dist/src/ripple/ripple.d.ts +2 -0
- package/dist/src/signature-pad/signature-pad.d.ts +1 -0
- package/dist/src/slider/slider.d.ts +1 -0
- package/dist/src/split-button/split-button.d.ts +7 -2
- package/dist/src/switch/switch.d.ts +1 -0
- package/dist/src/tabs/tab.d.ts +2 -0
- package/dist/src/tabs/tabs.d.ts +1 -0
- package/dist/src/textarea/textarea.d.ts +3 -0
- package/dist/src/time-picker/time-picker.d.ts +2 -0
- package/dist/src/transfer-list/transfer-list.d.ts +1 -0
- package/dist/src/tree-chart/index.d.ts +2 -0
- package/dist/src/tree-chart/tree-chart-layout.d.ts +49 -0
- package/dist/src/tree-chart/tree-chart.d.ts +221 -0
- package/dist/src/workflow/index.d.ts +2 -0
- package/dist/src/workflow/workflow-format.d.ts +5 -0
- package/dist/src/workflow/workflow-model.d.ts +194 -0
- package/dist/src/workflow/workflow.d.ts +313 -0
- package/dist/src/workflow-timeline/index.d.ts +1 -0
- package/dist/src/workflow-timeline/workflow-timeline.d.ts +41 -0
- package/dist/stat.js +2 -2
- package/dist/status-indicator.js +2 -2
- package/dist/step.js +2 -2
- package/dist/stepper.js +2 -2
- package/dist/{strings-DmbqMTfs.js → strings-DnYjGbbc.js} +169 -1
- package/dist/{strings-DmbqMTfs.js.map → strings-DnYjGbbc.js.map} +1 -1
- package/dist/sub-menu.js +2 -2
- package/dist/{suggestion-controller-CW17adxd.js → suggestion-controller-7YRQqkaI.js} +3 -1
- package/dist/{suggestion-controller-CW17adxd.js.map → suggestion-controller-7YRQqkaI.js.map} +1 -1
- package/dist/svg.js +2 -2
- package/dist/switch.js +6 -5
- package/dist/switch.js.map +1 -1
- package/dist/tab.js +1 -0
- package/dist/tab.js.map +1 -1
- package/dist/table.js +50 -11
- package/dist/table.js.map +1 -1
- package/dist/tabs.js +1 -0
- package/dist/tabs.js.map +1 -1
- package/dist/test/diagram-controls.test.d.ts +1 -0
- package/dist/test/diagram-geometry.test.d.ts +1 -0
- package/dist/test/diagram.test.d.ts +1 -0
- package/dist/test/erd.test.d.ts +1 -0
- package/dist/test/toggle-label.test.d.ts +1 -0
- package/dist/test/tree-chart.test.d.ts +1 -0
- package/dist/test/workflow-debug.test.d.ts +1 -0
- package/dist/test/workflow.test.d.ts +1 -0
- package/dist/textarea.js +13 -6
- package/dist/textarea.js.map +1 -1
- package/dist/time-field.js +7 -7
- package/dist/time-picker.js +4 -2
- package/dist/time-picker.js.map +1 -1
- package/dist/timeline-item.js +2 -2
- package/dist/timeline.js +2 -2
- package/dist/{toggle-base-BQO5pjrU.js → toggle-base-CXmFSp3b.js} +19 -3
- package/dist/toggle-base-CXmFSp3b.js.map +1 -0
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +6 -5
- package/dist/transfer-list.js.map +1 -1
- package/dist/{chart-base-B-gOg2Di.js → transform-CxeQFXXB.js} +9 -839
- package/dist/transform-CxeQFXXB.js.map +1 -0
- package/dist/tree-chart.js +1986 -0
- package/dist/tree-chart.js.map +1 -0
- package/dist/tree-item.js +2 -2
- package/dist/tree.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typing-indicator.js +2 -2
- package/dist/url-field.js +6 -6
- package/dist/user-menu.js +3 -3
- package/dist/virtual-list.js +2 -2
- package/dist/workflow-format-BsyveyeC.js +34 -0
- package/dist/workflow-format-BsyveyeC.js.map +1 -0
- package/dist/workflow-model-CauduOG2.js +330 -0
- package/dist/workflow-model-CauduOG2.js.map +1 -0
- package/dist/workflow-timeline.js +354 -0
- package/dist/workflow-timeline.js.map +1 -0
- package/dist/workflow.js +3337 -0
- package/dist/workflow.js.map +1 -0
- package/dist/workspace-switcher.js +3 -3
- package/package.json +1 -1
- package/readme.md +44 -2
- package/src/LoaderUtils.ts +9 -2
- package/src/__internal/ai/suggestion-controller.ts +3 -1
- package/src/__internal/diagram/canvas-base.ts +410 -0
- package/src/__internal/diagram/canvas-link.ts +66 -0
- package/src/__internal/diagram/geometry.ts +372 -0
- package/src/__internal/diagram/history.ts +49 -0
- package/src/__internal/diagram/host.ts +76 -0
- package/src/__internal/diagram/markers.ts +56 -0
- package/src/__internal/diagram/measure-controller.ts +104 -0
- package/src/__internal/diagram/motion.ts +89 -0
- package/src/__internal/diagram/selection.ts +69 -0
- package/src/__internal/diagram/types.ts +56 -0
- package/src/__internal/diagram/viewport-controller.ts +494 -0
- package/src/__internal/i18n/strings.ts +207 -0
- package/src/__internal/menu-trigger-controller.ts +11 -15
- package/src/__internal/mixins/field.ts +3 -0
- package/src/__internal/mixins/form-associated.ts +2 -0
- package/src/__internal/mixins/form-submitter.ts +6 -0
- package/src/__internal/mixins/hyperlink.ts +10 -0
- package/src/__internal/toggle-base.ts +16 -0
- package/src/__internal/utils/deprecate.ts +5 -4
- package/src/__internal/utils/relative-time.ts +20 -0
- package/src/accordion/accordion.ts +1 -0
- package/src/ai-badge/ai-badge.scss +8 -0
- package/src/ai-badge/ai-badge.ts +21 -4
- package/src/button/base-button/base-button.ts +2 -0
- package/src/button/button/button-base.scss +9 -2
- package/src/button/button/button-layers.scss +3 -1
- package/src/button/button/button.ts +4 -0
- package/src/chat-message/chat-message.scss +72 -0
- package/src/chat-message/chat-message.ts +137 -18
- package/src/chat-message/index.ts +1 -0
- package/src/chat-thread/chat-event.scss +36 -0
- package/src/chat-thread/chat-event.ts +79 -0
- package/src/chat-thread/chat-thread.scss +4 -1
- package/src/chat-thread/chat-thread.ts +22 -6
- package/src/chat-thread/index.ts +1 -0
- package/src/code-editor/code-editor.ts +1 -0
- package/src/date-picker/date-picker.ts +2 -0
- package/src/dependency-map/dependency-map-layout.ts +505 -0
- package/src/dependency-map/dependency-map.scss +626 -0
- package/src/dependency-map/dependency-map.ts +1280 -0
- package/src/dependency-map/index.ts +16 -0
- package/src/diagram/diagram.scss +513 -0
- package/src/diagram/diagram.ts +1852 -0
- package/src/diagram/flow.ts +81 -0
- package/src/diagram/index.ts +44 -0
- package/src/diagram-controls/diagram-controls.scss +68 -0
- package/src/diagram-controls/diagram-controls.ts +255 -0
- package/src/diagram-controls/index.ts +1 -0
- package/src/diagram-minimap/diagram-minimap.scss +41 -0
- package/src/diagram-minimap/diagram-minimap.ts +149 -0
- package/src/diagram-minimap/index.ts +1 -0
- package/src/draft-card/draft-card.scss +16 -2
- package/src/dropdown-button/dropdown-button.ts +2 -1
- package/src/erd/erd-layout.ts +92 -0
- package/src/erd/erd.scss +636 -0
- package/src/erd/erd.ts +1728 -0
- package/src/erd/index.ts +17 -0
- package/src/field/field.scss +197 -23
- package/src/field/field.ts +109 -16
- package/src/file-upload/file-upload.scss +37 -10
- package/src/file-upload/file-upload.ts +3 -1
- package/src/focus-ring/focus-ring.ts +2 -0
- package/src/generative-view/catalog.generated.ts +12 -11
- package/src/index.ts +123 -3
- package/src/input/BaseField.ts +45 -2
- package/src/input/BaseInput.ts +4 -1
- package/src/loader.ts +29 -0
- package/src/mention-input/mention-input.scss +2 -0
- package/src/menu/menu-item/menu-item.ts +1 -0
- package/src/number-field/number-field.ts +4 -0
- package/src/progress/base-progress.ts +3 -0
- package/src/radio/radio-group.ts +1 -0
- package/src/radio/radio.ts +1 -1
- package/src/rating/rating.ts +1 -0
- package/src/ripple/ripple.ts +2 -0
- package/src/signature-pad/signature-pad.ts +1 -0
- package/src/slider/slider.ts +1 -0
- package/src/split-button/split-button-colors.scss +9 -0
- package/src/split-button/split-button-sizes.scss +32 -5
- package/src/split-button/split-button.scss +61 -8
- package/src/split-button/split-button.ts +15 -8
- package/src/switch/switch.ts +1 -0
- package/src/table/table.scss +57 -9
- package/src/table/table.ts +3 -1
- package/src/tabs/tab.ts +2 -0
- package/src/tabs/tabs.ts +1 -0
- package/src/textarea/textarea.scss +2 -0
- package/src/textarea/textarea.ts +8 -0
- package/src/time-picker/time-picker.ts +2 -0
- package/src/transfer-list/transfer-list.ts +1 -0
- package/src/tree-chart/index.ts +13 -0
- package/src/tree-chart/tree-chart-layout.ts +185 -0
- package/src/tree-chart/tree-chart.scss +377 -0
- package/src/tree-chart/tree-chart.ts +1170 -0
- package/src/workflow/index.ts +35 -0
- package/src/workflow/workflow-format.ts +29 -0
- package/src/workflow/workflow-model.ts +583 -0
- package/src/workflow/workflow.scss +1164 -0
- package/src/workflow/workflow.ts +2674 -0
- package/src/workflow-timeline/index.ts +1 -0
- package/src/workflow-timeline/workflow-timeline.scss +128 -0
- package/src/workflow-timeline/workflow-timeline.ts +238 -0
- package/dist/BaseField-CAog9TIc.js.map +0 -1
- package/dist/BaseInput-CcMfg1Y2.js.map +0 -1
- package/dist/base-button-Do2TUy8M.js.map +0 -1
- package/dist/base-progress-BiLlZVHJ.js.map +0 -1
- package/dist/cartesian-chart-C-f1frt0.js.map +0 -1
- package/dist/chart-base-B-gOg2Di.js.map +0 -1
- package/dist/generative-view-DmtpDobn.js.map +0 -1
- package/dist/hyperlink-DhE9RlVS.js.map +0 -1
- package/dist/menu-trigger-controller-DyLpTxM7.js.map +0 -1
- package/dist/relative-time-BVQXLuHm.js.map +0 -1
- package/dist/src/flow/flow.d.ts +0 -178
- package/dist/src/flow/index.d.ts +0 -2
- package/dist/toggle-base-BQO5pjrU.js.map +0 -1
- package/src/button/button-group/readme.md +0 -23
- package/src/flow/flow.scss +0 -215
- package/src/flow/flow.ts +0 -958
- package/src/flow/index.ts +0 -10
- /package/dist/test/{flow.test.d.ts → dependency-map.test.d.ts} +0 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { type PropertyValues } from 'lit';
|
|
2
|
+
import { DiagramCanvasElement } from '../__internal/diagram/canvas-base.js';
|
|
3
|
+
import type { DiagramOverview } from '../__internal/diagram/host.js';
|
|
4
|
+
import type { DiagramConnector, DiagramMarker, DiagramPoint, DiagramRect, DiagramStartPosition, DiagramView, DiagramViewportDetail } from '../__internal/diagram/types.js';
|
|
5
|
+
export type { DiagramConnector, DiagramMarker, DiagramPoint, DiagramStartPosition, DiagramView, DiagramViewportDetail, };
|
|
6
|
+
export type DiagramStrokeVariant = 'solid' | 'dashed' | 'animated-dashed';
|
|
7
|
+
export type DiagramHandlePosition = 'top' | 'left' | 'bottom' | 'right';
|
|
8
|
+
/** How an edge is drawn. `smoothstep` is the deprecated name of `elbow`. */
|
|
9
|
+
export type DiagramEdgeType = DiagramConnector | 'smoothstep';
|
|
10
|
+
export type DiagramIntent = 'info' | 'success' | 'warning' | 'danger';
|
|
11
|
+
/** A connection point on a node's side. */
|
|
12
|
+
export interface DiagramPort {
|
|
13
|
+
/** Unique within the node. Edges name it in `sourceHandle` or `targetHandle`. */
|
|
14
|
+
id: string;
|
|
15
|
+
side: DiagramHandlePosition;
|
|
16
|
+
/** `source` ports start connections, `target` ports receive them, `both` (default) do both. */
|
|
17
|
+
type?: 'source' | 'target' | 'both';
|
|
18
|
+
/** Shown as a tooltip. */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Position along the side, 0 to 1. Ports on the same side spread evenly by default. */
|
|
21
|
+
offset?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface DiagramNode {
|
|
24
|
+
id: string;
|
|
25
|
+
position: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
};
|
|
29
|
+
/** Title of the built-in card. */
|
|
30
|
+
headline?: string;
|
|
31
|
+
/** Second line of the built-in card. */
|
|
32
|
+
supportingText?: string;
|
|
33
|
+
/** Material Symbols name shown on the built-in card. */
|
|
34
|
+
icon?: string;
|
|
35
|
+
/** Colours the built-in card's icon and border. */
|
|
36
|
+
intent?: DiagramIntent;
|
|
37
|
+
/** Connection points. Default: a target port on the left and a source port on the right. */
|
|
38
|
+
ports?: DiagramPort[];
|
|
39
|
+
/** Keeps the node from being moved or deleted by the person. */
|
|
40
|
+
locked?: boolean;
|
|
41
|
+
/** @deprecated Use `ports` with `type: 'target'`. */
|
|
42
|
+
inputs?: DiagramHandlePosition[];
|
|
43
|
+
/** @deprecated Use `ports` with `type: 'source'`. */
|
|
44
|
+
outputs?: DiagramHandlePosition[];
|
|
45
|
+
/**
|
|
46
|
+
* Your own data, kept with the node. Rendering from `data` is deprecated: put custom content in
|
|
47
|
+
* an element with `slot="node:<id>"` and use `headline` instead of `data.label`.
|
|
48
|
+
*/
|
|
49
|
+
data?: {
|
|
50
|
+
label?: string;
|
|
51
|
+
element?: HTMLElement;
|
|
52
|
+
[key: string]: unknown;
|
|
53
|
+
} | HTMLElement;
|
|
54
|
+
}
|
|
55
|
+
export interface DiagramEdge {
|
|
56
|
+
id: string;
|
|
57
|
+
source: string;
|
|
58
|
+
target: string;
|
|
59
|
+
/** Id of the source port. A side name works for nodes without `ports`. */
|
|
60
|
+
sourceHandle?: string;
|
|
61
|
+
/** Id of the target port. A side name works for nodes without `ports`. */
|
|
62
|
+
targetHandle?: string;
|
|
63
|
+
/** How the edge is drawn; defaults to the diagram's `connector`. */
|
|
64
|
+
type?: DiagramEdgeType;
|
|
65
|
+
variant?: DiagramStrokeVariant;
|
|
66
|
+
/** Shown as a pill at the middle of the edge. */
|
|
67
|
+
label?: string;
|
|
68
|
+
/** Any CSS colour. */
|
|
69
|
+
color?: string;
|
|
70
|
+
/** Marker at the source end. Default `none`. */
|
|
71
|
+
markerStart?: DiagramMarker;
|
|
72
|
+
/** Marker at the target end. Default `arrow`. */
|
|
73
|
+
markerEnd?: DiagramMarker;
|
|
74
|
+
}
|
|
75
|
+
/** Detail of `node-drag` and `node-drag-end`. */
|
|
76
|
+
export interface DiagramNodeMoveDetail {
|
|
77
|
+
id: string;
|
|
78
|
+
position: DiagramPoint;
|
|
79
|
+
}
|
|
80
|
+
/** Detail of `select`. */
|
|
81
|
+
export interface DiagramSelectDetail {
|
|
82
|
+
id: string;
|
|
83
|
+
kind: 'node' | 'edge';
|
|
84
|
+
node?: DiagramNode;
|
|
85
|
+
edge?: DiagramEdge;
|
|
86
|
+
}
|
|
87
|
+
/** Detail of `connect`. */
|
|
88
|
+
export interface DiagramConnectDetail {
|
|
89
|
+
source: string;
|
|
90
|
+
target: string;
|
|
91
|
+
sourceHandle: string;
|
|
92
|
+
targetHandle: string;
|
|
93
|
+
}
|
|
94
|
+
export type DiagramChangeReason = 'move' | 'connect' | 'reconnect' | 'delete' | 'paste' | 'undo' | 'redo';
|
|
95
|
+
/** Detail of `change`. */
|
|
96
|
+
export interface DiagramChangeDetail {
|
|
97
|
+
nodes: DiagramNode[];
|
|
98
|
+
edges: DiagramEdge[];
|
|
99
|
+
reason: DiagramChangeReason;
|
|
100
|
+
}
|
|
101
|
+
/** Detail of `delete`. */
|
|
102
|
+
export interface DiagramDeleteDetail {
|
|
103
|
+
nodes: string[];
|
|
104
|
+
edges: string[];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* @label Diagram
|
|
108
|
+
* @tag wc-diagram
|
|
109
|
+
* @rawTag diagram
|
|
110
|
+
* @summary An infinite canvas of nodes and connections that the person pans, zooms and edits, for state machines, process maps and node editors.
|
|
111
|
+
*
|
|
112
|
+
* @overview
|
|
113
|
+
* <p>Set <code>nodes</code> and <code>edges</code> as properties. A node shows a built-in card with
|
|
114
|
+
* <code>headline</code>, <code>supportingText</code> and <code>icon</code>, or your own content in an
|
|
115
|
+
* element with <code>slot="node:<id>"</code>. Nodes connect through <code>ports</code> on their
|
|
116
|
+
* sides; edges are drawn as rounded elbows by default (<code>connector</code>), with an optional label
|
|
117
|
+
* and markers at each end.</p>
|
|
118
|
+
* <p>The canvas is infinite: drag the background, hold Space and drag, use the middle button or a
|
|
119
|
+
* trackpad to pan, and hold Ctrl or Command and scroll, or pinch, to zoom. It opens at
|
|
120
|
+
* <code>start-position</code> (<code>fit</code>, <code>origin</code> or <code>first</code>) or at an exact
|
|
121
|
+
* <code>start-view</code>; Home or <code>home()</code> flies back there, Shift+1 or <code>fit()</code> fits
|
|
122
|
+
* all content, and a "Back to content" button appears when everything is out of view. Read and set
|
|
123
|
+
* the camera with <code>view</code>, and save it from <code>viewport-change</code>. Add
|
|
124
|
+
* <code>wc-diagram-controls</code> and <code>wc-diagram-minimap</code> in the <code>controls</code> and
|
|
125
|
+
* <code>minimap</code> slots.</p>
|
|
126
|
+
* <p>By default nodes can be dragged and connections drawn; the diagram fires <code>node-drag-end</code>
|
|
127
|
+
* and <code>connect</code> and leaves edges to you. <code>editable</code> turns it into a full editor:
|
|
128
|
+
* it adds the edge on <code>connect</code> unless you cancel the event, selects edges, draws a marquee
|
|
129
|
+
* with Shift + drag, moves several nodes at once, snaps to other nodes (and to the grid with
|
|
130
|
+
* <code>snap-to-grid</code>), deletes with Delete, copies and pastes, and undoes with Ctrl+Z. Every
|
|
131
|
+
* committed edit fires <code>change</code>. <code>readonly</code> keeps everything in place.</p>
|
|
132
|
+
* <p>The diagram never mutates the objects you pass: edits assign new <code>nodes</code> and
|
|
133
|
+
* <code>edges</code> arrays. Each node is focusable and named by its headline. Arrow keys move the
|
|
134
|
+
* focused node by 20px (Shift: 100px), Alt + arrow moves focus to the nearest node in that
|
|
135
|
+
* direction, and Enter or Space selects it. Arrow keys follow the canvas axes and are not mirrored in
|
|
136
|
+
* right-to-left layouts.</p>
|
|
137
|
+
* <p>This component was called <code>wc-flow</code> before 4.0. That tag still works as a
|
|
138
|
+
* deprecated alias until 5.0.</p>
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```html
|
|
142
|
+
* <wc-diagram id="my-diagram" style="height: 400px">
|
|
143
|
+
* <wc-diagram-controls slot="controls"></wc-diagram-controls>
|
|
144
|
+
* <wc-diagram-minimap slot="minimap"></wc-diagram-minimap>
|
|
145
|
+
* </wc-diagram>
|
|
146
|
+
* <script>
|
|
147
|
+
* const diagram = document.getElementById('my-diagram');
|
|
148
|
+
* diagram.nodes = [
|
|
149
|
+
* { id: 'new', position: { x: 0, y: 0 }, headline: 'New', icon: 'fiber_new' },
|
|
150
|
+
* { id: 'done', position: { x: 300, y: 0 }, headline: 'Done', icon: 'task_alt' }
|
|
151
|
+
* ];
|
|
152
|
+
* diagram.edges = [{ id: 'e1', source: 'new', target: 'done', label: 'finish' }];
|
|
153
|
+
* </script>
|
|
154
|
+
* ```
|
|
155
|
+
*
|
|
156
|
+
* @slot controls - A `wc-diagram-controls`, shown at the bottom start corner.
|
|
157
|
+
* @slot minimap - A `wc-diagram-minimap`, shown at the bottom end corner.
|
|
158
|
+
* @slot node:<id> - Custom content for the node with that id, in place of the built-in card.
|
|
159
|
+
*
|
|
160
|
+
* @fires {CustomEvent<DiagramNodeMoveDetail>} node-drag - While a node is dragged. Detail contains `{ id, position }`.
|
|
161
|
+
* @fires {CustomEvent<DiagramNodeMoveDetail>} node-drag-end - Once when a drag ends, and after each keyboard move. Detail contains `{ id, position }`.
|
|
162
|
+
* @fires {CustomEvent<DiagramSelectDetail>} select - A node or edge was chosen with a click, Enter or Space. Detail contains `{ id, kind, node, edge }`.
|
|
163
|
+
* @fires {CustomEvent<DiagramConnectDetail>} connect - A connection was dragged onto a port. With `editable`, the diagram adds the edge unless the event is canceled. Detail contains `{ source, target, sourceHandle, targetHandle }`.
|
|
164
|
+
* @fires {CustomEvent<DiagramDeleteDetail>} delete - Before nodes and edges are deleted with `editable`. Cancel it to keep them. Detail contains `{ nodes, edges }` (ids).
|
|
165
|
+
* @fires {CustomEvent<DiagramChangeDetail>} change - After a committed edit. Detail contains `{ nodes, edges, reason }`.
|
|
166
|
+
* @fires {CustomEvent<DiagramViewportDetail>} viewport-change - Once per frame while the camera moves and once when it settles. Detail contains `{ x, y, zoom, settled }`.
|
|
167
|
+
*
|
|
168
|
+
* @cssprop --diagram-background - Canvas background. Defaults to surface-container-lowest.
|
|
169
|
+
* @cssprop --diagram-dot-color - Colour of the grid dots. Defaults to outline-variant.
|
|
170
|
+
* @cssprop --diagram-line-color - Colour of edges at rest. Defaults to a mix of primary and outline-variant.
|
|
171
|
+
* @cssprop --diagram-hover-color - Colour of hovered and selected edges, ports and nodes. Defaults to primary.
|
|
172
|
+
* @cssprop --diagram-port-size - Diameter of a port ring. Defaults to 10px.
|
|
173
|
+
* @cssprop --diagram-node-background - Background of the built-in card.
|
|
174
|
+
* @tags data
|
|
175
|
+
*/
|
|
176
|
+
export declare class Diagram extends DiagramCanvasElement {
|
|
177
|
+
static styles: import("lit").CSSResultGroup[];
|
|
178
|
+
/** Nodes to draw. Replaced with a new array, never mutated, when the person edits. */
|
|
179
|
+
nodes: DiagramNode[];
|
|
180
|
+
/** Connections between node ports. */
|
|
181
|
+
edges: DiagramEdge[];
|
|
182
|
+
/** Id of the selected node or edge. With several selected, the last one chosen. */
|
|
183
|
+
selected: string;
|
|
184
|
+
/** How edges without a `type` are drawn. */
|
|
185
|
+
connector: DiagramConnector;
|
|
186
|
+
/** Snaps dragged nodes to the grid (`grid-size`). */
|
|
187
|
+
snapToGrid: boolean;
|
|
188
|
+
private _connection?;
|
|
189
|
+
private _marquee?;
|
|
190
|
+
private _guides;
|
|
191
|
+
private _draggingIds;
|
|
192
|
+
private _announcement;
|
|
193
|
+
private _ripple;
|
|
194
|
+
private readonly _viewportEl?;
|
|
195
|
+
private readonly selection;
|
|
196
|
+
private readonly history;
|
|
197
|
+
private readonly measure;
|
|
198
|
+
private pasteCount;
|
|
199
|
+
private focusedId;
|
|
200
|
+
private positionOverrides;
|
|
201
|
+
/** Key events a node or edge already handled, so the canvas does not act on them again. */
|
|
202
|
+
private handledKeys;
|
|
203
|
+
private stopRestoreTween?;
|
|
204
|
+
private rippleTimer?;
|
|
205
|
+
private connectionFrame;
|
|
206
|
+
private nodeDrag?;
|
|
207
|
+
private connectionDrag?;
|
|
208
|
+
private marqueeDrag?;
|
|
209
|
+
disconnectedCallback(): void;
|
|
210
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
211
|
+
/** Whether `undo()` has something to undo. */
|
|
212
|
+
get canUndo(): boolean;
|
|
213
|
+
/** Whether `redo()` has something to redo. */
|
|
214
|
+
get canRedo(): boolean;
|
|
215
|
+
/** Ids of the selected nodes. */
|
|
216
|
+
get selectedNodes(): string[];
|
|
217
|
+
/** Ids of the selected edges. */
|
|
218
|
+
get selectedEdges(): string[];
|
|
219
|
+
undo(): void;
|
|
220
|
+
redo(): void;
|
|
221
|
+
/** Forgets the undo and redo history, for example after saving. */
|
|
222
|
+
clearHistory(): void;
|
|
223
|
+
/** Selects every node and edge. */
|
|
224
|
+
selectAll(): void;
|
|
225
|
+
/** Deletes the selected nodes and edges (and edges attached to deleted nodes). Needs `editable`. */
|
|
226
|
+
deleteSelection(): void;
|
|
227
|
+
protected viewportElement(): HTMLElement | undefined;
|
|
228
|
+
protected overviewItems(): DiagramOverview['items'];
|
|
229
|
+
protected itemRect(id: string): DiagramRect | undefined;
|
|
230
|
+
protected firstItemRect(): DiagramRect | undefined;
|
|
231
|
+
protected onBackgroundPointerDown(event: PointerEvent): boolean;
|
|
232
|
+
protected onBackgroundClick(): void;
|
|
233
|
+
private emitChange;
|
|
234
|
+
private snapshot;
|
|
235
|
+
private announce;
|
|
236
|
+
private warnLegacyNodes;
|
|
237
|
+
/** Keeps the selection in step when the app sets `selected`. */
|
|
238
|
+
private syncSelectedProperty;
|
|
239
|
+
private nodePosition;
|
|
240
|
+
private nodeRect;
|
|
241
|
+
protected contentBounds(): DiagramRect | undefined;
|
|
242
|
+
protected selectionRects(): DiagramRect[];
|
|
243
|
+
private nodeLabel;
|
|
244
|
+
private legacyElement;
|
|
245
|
+
private resolvePorts;
|
|
246
|
+
private findPort;
|
|
247
|
+
private portPoint;
|
|
248
|
+
private edgeRender;
|
|
249
|
+
private uniqueId;
|
|
250
|
+
protected isBackground(target: EventTarget | null): boolean;
|
|
251
|
+
private clearSelection;
|
|
252
|
+
private selectNode;
|
|
253
|
+
private selectEdge;
|
|
254
|
+
private nodeElements;
|
|
255
|
+
private nodeElement;
|
|
256
|
+
private onNodePointerDown;
|
|
257
|
+
private onNodePointerMove;
|
|
258
|
+
private onNodePointerUp;
|
|
259
|
+
/** Ends the press on a node: a drag commits the move, a press without movement selects. */
|
|
260
|
+
private endNodeDrag;
|
|
261
|
+
/** Replaces moved nodes with new objects and assigns a new `nodes` array. */
|
|
262
|
+
private moveNodes;
|
|
263
|
+
/** Snaps a dragged node's edges or centre to nearby nodes and returns guide lines to draw. */
|
|
264
|
+
private alignToOthers;
|
|
265
|
+
private onNodeKeyDown;
|
|
266
|
+
private onEdgeKeyDown;
|
|
267
|
+
private markHandled;
|
|
268
|
+
private onViewportKeyDown;
|
|
269
|
+
private focusNode;
|
|
270
|
+
/** Pans so the node is in view, when it is not. */
|
|
271
|
+
private keepInView;
|
|
272
|
+
private copySelection;
|
|
273
|
+
private paste;
|
|
274
|
+
/** Restores a snapshot; nodes that moved glide to their restored places. */
|
|
275
|
+
private restore;
|
|
276
|
+
private onPortPointerDown;
|
|
277
|
+
private startReconnect;
|
|
278
|
+
private beginConnectionDrag;
|
|
279
|
+
/** The nearest port that can take the moving end, within snapping distance. */
|
|
280
|
+
private findSnap;
|
|
281
|
+
private onConnectionPointerMove;
|
|
282
|
+
private onConnectionPointerUp;
|
|
283
|
+
private onConnectionPointerCancel;
|
|
284
|
+
/** Stops drawing a connection and releases its pointer. */
|
|
285
|
+
private cancelConnection;
|
|
286
|
+
private connect;
|
|
287
|
+
private reconnect;
|
|
288
|
+
private ripple;
|
|
289
|
+
private onEdgePointerDown;
|
|
290
|
+
private startMarquee;
|
|
291
|
+
private onMarqueeMove;
|
|
292
|
+
private onMarqueeUp;
|
|
293
|
+
private endMarquee;
|
|
294
|
+
private renderNodeContent;
|
|
295
|
+
private renderNode;
|
|
296
|
+
private renderMarkers;
|
|
297
|
+
private renderEdge;
|
|
298
|
+
private renderConnectionPreview;
|
|
299
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
300
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Diagram } from './diagram.js';
|
|
2
|
+
import type { DiagramChangeDetail, DiagramChangeReason, DiagramConnectDetail, DiagramConnector, DiagramDeleteDetail, DiagramEdge, DiagramEdgeType, DiagramHandlePosition, DiagramIntent, DiagramMarker, DiagramNode, DiagramNodeMoveDetail, DiagramPoint, DiagramPort, DiagramSelectDetail, DiagramStartPosition, DiagramStrokeVariant, DiagramView, DiagramViewportDetail } from './diagram.js';
|
|
3
|
+
/**
|
|
4
|
+
* The deprecated name of the diagram canvas: `wc-flow` before 4.0, now `wc-diagram`. It works
|
|
5
|
+
* like `wc-diagram` and warns once on the console. Removed in 5.0.
|
|
6
|
+
*
|
|
7
|
+
* It has no tag in its JSDoc on purpose, so the custom elements manifest, the docs and the
|
|
8
|
+
* React, Vue and Angular bindings list only `wc-diagram`. Its own module (`dist/flow.js`) keeps
|
|
9
|
+
* the lazy loader's one-element-per-module rule.
|
|
10
|
+
*
|
|
11
|
+
* @deprecated Use `Diagram` (`wc-diagram`).
|
|
12
|
+
*/
|
|
13
|
+
export declare class Flow extends Diagram {
|
|
14
|
+
connectedCallback(): void;
|
|
15
|
+
}
|
|
16
|
+
/** @deprecated Use `DiagramStrokeVariant`. */
|
|
17
|
+
export type FlowStrokeVariant = DiagramStrokeVariant;
|
|
18
|
+
/** @deprecated Use `DiagramHandlePosition`. */
|
|
19
|
+
export type FlowHandlePosition = DiagramHandlePosition;
|
|
20
|
+
/** @deprecated Use `DiagramEdgeType`. */
|
|
21
|
+
export type FlowEdgeType = DiagramEdgeType;
|
|
22
|
+
/** @deprecated Use `DiagramMarker`. */
|
|
23
|
+
export type FlowMarker = DiagramMarker;
|
|
24
|
+
/** @deprecated Use `DiagramIntent`. */
|
|
25
|
+
export type FlowIntent = DiagramIntent;
|
|
26
|
+
/** @deprecated Use `DiagramConnector`. */
|
|
27
|
+
export type FlowConnector = DiagramConnector;
|
|
28
|
+
/** @deprecated Use `DiagramStartPosition`. */
|
|
29
|
+
export type FlowStartPosition = DiagramStartPosition;
|
|
30
|
+
/** @deprecated Use `DiagramPoint`. */
|
|
31
|
+
export type FlowPoint = DiagramPoint;
|
|
32
|
+
/** @deprecated Use `DiagramView`. */
|
|
33
|
+
export type FlowView = DiagramView;
|
|
34
|
+
/** @deprecated Use `DiagramPort`. */
|
|
35
|
+
export type FlowPort = DiagramPort;
|
|
36
|
+
/** @deprecated Use `DiagramNode`. */
|
|
37
|
+
export type FlowNode = DiagramNode;
|
|
38
|
+
/** @deprecated Use `DiagramEdge`. */
|
|
39
|
+
export type FlowEdge = DiagramEdge;
|
|
40
|
+
/** @deprecated Use `DiagramNodeMoveDetail`. */
|
|
41
|
+
export type FlowNodeMoveDetail = DiagramNodeMoveDetail;
|
|
42
|
+
/** @deprecated Use `DiagramSelectDetail`. */
|
|
43
|
+
export type FlowSelectDetail = DiagramSelectDetail;
|
|
44
|
+
/** @deprecated Use `DiagramConnectDetail`. */
|
|
45
|
+
export type FlowConnectDetail = DiagramConnectDetail;
|
|
46
|
+
/** @deprecated Use `DiagramChangeReason`. */
|
|
47
|
+
export type FlowChangeReason = DiagramChangeReason;
|
|
48
|
+
/** @deprecated Use `DiagramChangeDetail`. */
|
|
49
|
+
export type FlowChangeDetail = DiagramChangeDetail;
|
|
50
|
+
/** @deprecated Use `DiagramDeleteDetail`. */
|
|
51
|
+
export type FlowDeleteDetail = DiagramDeleteDetail;
|
|
52
|
+
/** @deprecated Use `DiagramViewportDetail`. */
|
|
53
|
+
export type FlowViewportDetail = DiagramViewportDetail;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { Diagram } from './diagram.js';
|
|
2
|
+
export type { DiagramChangeDetail, DiagramChangeReason, DiagramConnectDetail, DiagramConnector, DiagramDeleteDetail, DiagramEdge, DiagramEdgeType, DiagramHandlePosition, DiagramIntent, DiagramMarker, DiagramNode, DiagramNodeMoveDetail, DiagramPoint, DiagramPort, DiagramSelectDetail, DiagramStartPosition, DiagramStrokeVariant, DiagramView, DiagramViewportDetail, } from './diagram.js';
|
|
3
|
+
export { Flow } from './flow.js';
|
|
4
|
+
export type { FlowChangeDetail, FlowChangeReason, FlowConnectDetail, FlowConnector, FlowDeleteDetail, FlowEdge, FlowEdgeType, FlowHandlePosition, FlowIntent, FlowMarker, FlowNode, FlowNodeMoveDetail, FlowPort, FlowSelectDetail, FlowStartPosition, FlowStrokeVariant, FlowView, FlowViewportDetail, } from './flow.js';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Diagram controls
|
|
4
|
+
* @tag wc-diagram-controls
|
|
5
|
+
* @rawTag diagram-controls
|
|
6
|
+
* @summary Zoom, fit, back-to-start and undo buttons for a diagram canvas such as `wc-diagram`.
|
|
7
|
+
*
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>Put it in a canvas's <code>controls</code> slot, or anywhere on the page with <code>for</code> set
|
|
10
|
+
* to the canvas's id. It shows zoom out, the zoom level, zoom in, fit to content and back to start;
|
|
11
|
+
* undo and redo join them when the canvas is <code>editable</code>. The zoom level opens a menu with
|
|
12
|
+
* 50%, 100%, 200%, fit, zoom to selection and back to start.</p>
|
|
13
|
+
* <p>It is a <code>toolbar</code>: Tab reaches it once and the arrow keys move between its buttons.</p>
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <wc-diagram style="height: 400px">
|
|
18
|
+
* <wc-diagram-controls slot="controls"></wc-diagram-controls>
|
|
19
|
+
* </wc-diagram>
|
|
20
|
+
* ```
|
|
21
|
+
* @tags data
|
|
22
|
+
*/
|
|
23
|
+
export declare class DiagramControls extends LitElement {
|
|
24
|
+
static styles: import("lit").CSSResultGroup[];
|
|
25
|
+
/** Id of the canvas to control, when the controls are not inside it. */
|
|
26
|
+
for: string;
|
|
27
|
+
/** Lays the buttons out in a row or a column. */
|
|
28
|
+
orientation: 'horizontal' | 'vertical';
|
|
29
|
+
/** Leaves out undo and redo even when the canvas is editable. */
|
|
30
|
+
hideHistory: boolean;
|
|
31
|
+
private _zoom;
|
|
32
|
+
private _canUndo;
|
|
33
|
+
private _canRedo;
|
|
34
|
+
private _editable;
|
|
35
|
+
private readonly _menu?;
|
|
36
|
+
private readonly _zoomButton?;
|
|
37
|
+
private readonly i18n;
|
|
38
|
+
private readonly roving;
|
|
39
|
+
private readonly link;
|
|
40
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
41
|
+
private sync;
|
|
42
|
+
private percent;
|
|
43
|
+
private openMenu;
|
|
44
|
+
private onMenuActivate;
|
|
45
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DiagramControls } from './diagram-controls.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Diagram minimap
|
|
4
|
+
* @tag wc-diagram-minimap
|
|
5
|
+
* @rawTag diagram-minimap
|
|
6
|
+
* @summary A small overview of a diagram canvas that shows where the view is and moves it.
|
|
7
|
+
*
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>Put it in a canvas's <code>minimap</code> slot, or anywhere with <code>for</code> set to the
|
|
10
|
+
* canvas's id. It draws every node as a box and the part of the canvas in view as a rectangle,
|
|
11
|
+
* wherever the view has wandered. Click to fly there, or drag to move the view.</p>
|
|
12
|
+
* <p>The minimap is a pointer shortcut; keyboard users pan the canvas itself with the arrow keys.</p>
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <wc-diagram style="height: 400px">
|
|
17
|
+
* <wc-diagram-minimap slot="minimap"></wc-diagram-minimap>
|
|
18
|
+
* </wc-diagram>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @cssprop --diagram-minimap-width - Width. Defaults to 200px.
|
|
22
|
+
* @cssprop --diagram-minimap-height - Height. Defaults to 132px.
|
|
23
|
+
* @tags data
|
|
24
|
+
*/
|
|
25
|
+
export declare class DiagramMinimap extends LitElement {
|
|
26
|
+
static styles: import("lit").CSSResultGroup[];
|
|
27
|
+
/** Id of the canvas to show, when the minimap is not inside it. */
|
|
28
|
+
for: string;
|
|
29
|
+
private _overview?;
|
|
30
|
+
private readonly i18n;
|
|
31
|
+
private readonly link;
|
|
32
|
+
private drag?;
|
|
33
|
+
protected updated(changed: Map<string, unknown>): void;
|
|
34
|
+
private toCanvas;
|
|
35
|
+
private onPointerDown;
|
|
36
|
+
private onPointerMove;
|
|
37
|
+
private onPointerUp;
|
|
38
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DiagramMinimap } from './diagram-minimap.js';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { DiagramPoint } from '../__internal/diagram/types.js';
|
|
2
|
+
export interface ErdLayoutEntity {
|
|
3
|
+
id: string;
|
|
4
|
+
height: number;
|
|
5
|
+
/** A fixed top-left corner (set by the app or by dragging). */
|
|
6
|
+
pinned?: DiagramPoint;
|
|
7
|
+
}
|
|
8
|
+
export interface ErdLayoutRelation {
|
|
9
|
+
/** The entity holding the foreign key. */
|
|
10
|
+
source: string;
|
|
11
|
+
/** The entity it references. */
|
|
12
|
+
target: string;
|
|
13
|
+
}
|
|
14
|
+
export interface ErdLayoutOptions {
|
|
15
|
+
width: number;
|
|
16
|
+
/** Space between columns. */
|
|
17
|
+
columnGap?: number;
|
|
18
|
+
/** Space between entities in a column. */
|
|
19
|
+
rowGap?: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Places entities in columns, referenced tables to the left of the tables that reference them,
|
|
23
|
+
* ordered to keep relations short. Columns are stacked with each entity's real height and centred
|
|
24
|
+
* on one line. Entities with no relations go in a grid after the last column. Returns top-left
|
|
25
|
+
* corners.
|
|
26
|
+
*/
|
|
27
|
+
export declare function layoutEntities(entities: ErdLayoutEntity[], relations: ErdLayoutRelation[], options: ErdLayoutOptions): Map<string, DiagramPoint>;
|