@redvars/peacock 4.0.0 → 4.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/dist/{BaseField-CAog9TIc.js → BaseField-BMumJpkW.js} +6 -3
- package/dist/BaseField-BMumJpkW.js.map +1 -0
- package/dist/{BaseInput-CcMfg1Y2.js → BaseInput-mWdyYv27.js} +6 -3
- package/dist/BaseInput-mWdyYv27.js.map +1 -0
- package/dist/accordion.js.map +1 -1
- package/dist/ai-badge.js +2 -2
- 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-CvLVSjuy.js} +4 -2
- package/dist/base-progress-CvLVSjuy.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 +3 -3
- package/dist/calendar.js +2 -2
- package/dist/canvas-base-BTQMEVn_.js +788 -0
- package/dist/canvas-base-BTQMEVn_.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-DM1FC_XT.js} +3 -2
- package/dist/cartesian-chart-DM1FC_XT.js.map +1 -0
- package/dist/{cb-group-base-DeuCVx3a.js → cb-group-base-B6fa4Lll.js} +2 -2
- package/dist/{cb-group-base-DeuCVx3a.js.map → cb-group-base-B6fa4Lll.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-Dhxuw_Mw.js +833 -0
- package/dist/chart-base-Dhxuw_Mw.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-message.js +2 -2
- package/dist/chat-thread.js +2 -2
- package/dist/checkbox-group.js +4 -4
- package/dist/checkbox.js +4 -4
- package/dist/chip-set.js +3 -3
- package/dist/chip.js +4 -4
- package/dist/circular-progress.js +3 -3
- package/dist/citation.js +2 -2
- package/dist/code-editor.js +5 -4
- package/dist/code-editor.js.map +1 -1
- package/dist/code-highlighter.js +2 -2
- package/dist/color-field.js +5 -5
- package/dist/color-picker.js +2 -2
- package/dist/command-palette.js +2 -2
- package/dist/comment-composer.js +5 -5
- 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 +5 -5
- package/dist/custom-elements-jsdocs.json +2115 -336
- package/dist/custom-elements.json +19483 -615
- package/dist/date-field.js +6 -6
- package/dist/date-picker.js +4 -2
- package/dist/date-picker.js.map +1 -1
- package/dist/date-range-field.js +6 -6
- package/dist/datetime-field.js +6 -6
- 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-2r11KySs.js +2029 -0
- package/dist/diagram-2r11KySs.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 +2 -2
- package/dist/discussion-comment.js +2 -2
- package/dist/discussion.js +5 -5
- package/dist/{document-editor-BO7QPbO5.js → document-editor-BnEugM3E.js} +2 -2
- package/dist/{document-editor-BO7QPbO5.js.map → document-editor-BnEugM3E.js.map} +1 -1
- package/dist/document-editor.js +3 -3
- package/dist/draft-card.js +2 -2
- 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 +37 -15
- 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 +2 -2
- package/dist/{generative-view-DmtpDobn.js → generative-view-BgOcLRXr.js} +13 -13
- package/dist/generative-view-BgOcLRXr.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 +5 -5
- 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-Cp43HjJl.js} +2 -2
- package/dist/{i18n-controller-urcQKYGe.js.map → i18n-controller-Cp43HjJl.js.map} +1 -1
- package/dist/icon-button.js +4 -4
- package/dist/image.js +2 -2
- package/dist/index.js +37 -18
- package/dist/index.js.map +1 -1
- package/dist/inline-edit.js +2 -2
- package/dist/input.js +4 -4
- 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 +2 -2
- package/dist/list-item.js +2 -2
- package/dist/list.js +2 -2
- package/dist/listbox.js +3 -3
- package/dist/loader-full.js +13 -13
- package/dist/loader.js +44 -15
- package/dist/loader.js.map +1 -1
- package/dist/markdown-editor.js +5 -5
- 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 +6 -5
- 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.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 +2 -2
- package/dist/number-field.js +6 -5
- 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 +5 -5
- package/dist/password-rules.js +2 -2
- package/dist/phone-field.js +5 -5
- package/dist/{picker-field-B4DtcJfL.js → picker-field-dTlIMAQn.js} +3 -3
- package/dist/{picker-field-B4DtcJfL.js.map → picker-field-dTlIMAQn.js.map} +1 -1
- package/dist/pin-input.js +5 -5
- package/dist/presence-indicator.js +2 -2
- package/dist/prompt-input.js +5 -5
- package/dist/radio-group.js +1 -0
- package/dist/radio-group.js.map +1 -1
- package/dist/radio.js +5 -5
- package/dist/radio.js.map +1 -1
- package/dist/rating.js +5 -4
- package/dist/rating.js.map +1 -1
- package/dist/redvars-loader.js +2 -2
- package/dist/relative-time.js +2 -2
- package/dist/resizable-panels.js +2 -2
- package/dist/{rich-text-input-DLICqof1.js → rich-text-input-DM_BOzgk.js} +3 -3
- package/dist/{rich-text-input-DLICqof1.js.map → rich-text-input-DM_BOzgk.js.map} +1 -1
- package/dist/ripple.js +2 -0
- package/dist/ripple.js.map +1 -1
- package/dist/{schema-hMt-NRLk.js → schema-B8g30A_n.js} +2 -2
- package/dist/{schema-hMt-NRLk.js.map → schema-B8g30A_n.js.map} +1 -1
- package/dist/search.js +4 -4
- package/dist/segmented-button-group.js +1 -1
- package/dist/select.js +7 -7
- package/dist/side-sheet.js +2 -2
- package/dist/signature-pad.js +5 -4
- package/dist/signature-pad.js.map +1 -1
- package/dist/slider.js +5 -4
- package/dist/slider.js.map +1 -1
- package/dist/snackbar.js +2 -2
- package/dist/sparkline.js +2 -2
- package/dist/split-button.js +2 -2
- 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 +149 -0
- package/dist/src/__internal/toggle-base.d.ts +8 -0
- package/dist/src/__internal/utils/deprecate.d.ts +3 -3
- package/dist/src/accordion/accordion.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 +15 -2
- package/dist/src/input/BaseField.d.ts +3 -0
- package/dist/src/input/BaseInput.d.ts +3 -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/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 +1 -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-BJPuhKJk.js} +163 -1
- package/dist/{strings-DmbqMTfs.js.map → strings-BJPuhKJk.js.map} +1 -1
- package/dist/sub-menu.js +2 -2
- package/dist/svg.js +2 -2
- package/dist/switch.js +5 -4
- package/dist/switch.js.map +1 -1
- package/dist/tab.js +1 -0
- package/dist/tab.js.map +1 -1
- package/dist/table.js +2 -2
- 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 +7 -5
- package/dist/textarea.js.map +1 -1
- package/dist/time-field.js +6 -6
- 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-BlaHalfS.js} +19 -3
- package/dist/toggle-base-BlaHalfS.js.map +1 -0
- package/dist/tour.js +2 -2
- package/dist/transfer-list.js +5 -4
- 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 +5 -5
- package/dist/user-menu.js +2 -2
- 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 +2 -2
- package/package.json +1 -1
- package/readme.md +44 -2
- package/src/LoaderUtils.ts +9 -2
- 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 +201 -0
- 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/accordion/accordion.ts +1 -0
- package/src/button/base-button/base-button.ts +2 -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/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 +121 -2
- package/src/input/BaseField.ts +3 -0
- package/src/input/BaseInput.ts +3 -0
- package/src/loader.ts +25 -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/switch/switch.ts +1 -0
- 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 +1 -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/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
package/dist/src/tabs/tabs.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export interface TabsChangeDetail {
|
|
|
36
36
|
export declare class Tabs extends LitElement {
|
|
37
37
|
static styles: import("lit").CSSResultGroup[];
|
|
38
38
|
static Tab: typeof Tab;
|
|
39
|
+
/** The visual style of the tabs: `"primary"` (default), `"secondary"`, `"contained"` or `"filled"`. */
|
|
39
40
|
variant: 'primary' | 'secondary' | 'contained' | 'filled';
|
|
40
41
|
/** The consumer controls the selection: the tabs fire `change` but do not select a tab. */
|
|
41
42
|
managed: boolean;
|
|
@@ -37,6 +37,7 @@ import { type ControlValidity } from '../input/BaseInput.js';
|
|
|
37
37
|
export declare class Textarea extends BaseField {
|
|
38
38
|
static styles: import("lit").CSSResultGroup[];
|
|
39
39
|
value: string;
|
|
40
|
+
/** Whether the browser may autofill the field: `"on"` or `"off"` (default). */
|
|
40
41
|
autocomplete: 'on' | 'off';
|
|
41
42
|
/** Visible lines of text; the starting height with `auto-grow`. */
|
|
42
43
|
rows: number;
|
|
@@ -43,7 +43,9 @@ export declare class TimePicker extends LitElement {
|
|
|
43
43
|
max: string;
|
|
44
44
|
/** BCP 47 locale for AM/PM names and the default hour cycle. */
|
|
45
45
|
locale: string;
|
|
46
|
+
/** Disables the picker: no time can be focused or picked. */
|
|
46
47
|
disabled: boolean;
|
|
48
|
+
/** Shows the selected time but stops the user changing it. */
|
|
47
49
|
readonly: boolean;
|
|
48
50
|
/** The column holding the tab stop. */
|
|
49
51
|
private activeColumn;
|
|
@@ -84,6 +84,7 @@ export declare class TransferList extends BaseInput {
|
|
|
84
84
|
helperText: string;
|
|
85
85
|
/** Shows the component in its error state with `error-text`. */
|
|
86
86
|
error: boolean;
|
|
87
|
+
/** Error message shown below the component while `error` is set; replaces the help text. */
|
|
87
88
|
errorText: string;
|
|
88
89
|
/** Headline of the source list. Defaults to Peacock's "Available". */
|
|
89
90
|
availableHeadline: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { TreeChart } from './tree-chart.js';
|
|
2
|
+
export type { TreeChartAccent, TreeChartAddDetail, TreeChartChangeDetail, TreeChartChangeReason, TreeChartDeleteDetail, TreeChartItem, TreeChartItemDetail, TreeChartOrientation, TreeChartReparentDetail, TreeChartViewportDetail, } from './tree-chart.js';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { DiagramPoint, DiagramSize } from '../__internal/diagram/types.js';
|
|
2
|
+
/** A node to lay out: its size and the ids of its visible children. */
|
|
3
|
+
export interface LayoutInput {
|
|
4
|
+
id: string;
|
|
5
|
+
children: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface LayoutOptions {
|
|
8
|
+
orientation: 'vertical' | 'horizontal';
|
|
9
|
+
/** Stack children that are all leaves in a column under their parent (vertical only). */
|
|
10
|
+
compact: boolean;
|
|
11
|
+
/** Space between siblings, in canvas pixels. */
|
|
12
|
+
siblingGap: number;
|
|
13
|
+
/** Space between levels. */
|
|
14
|
+
levelGap: number;
|
|
15
|
+
/** Space between the cards of a compact stack. */
|
|
16
|
+
stackGap: number;
|
|
17
|
+
/** Indent of a compact stack from its connector lane. */
|
|
18
|
+
stackIndent: number;
|
|
19
|
+
}
|
|
20
|
+
export interface LayoutResult {
|
|
21
|
+
/** Top-left corner of each laid-out node. */
|
|
22
|
+
positions: Map<string, DiagramPoint>;
|
|
23
|
+
/** Parents whose children are drawn as a compact stack. */
|
|
24
|
+
stacked: Set<string>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The corner points of the connector from a parent box to a child box: down to a fork halfway
|
|
28
|
+
* across the level gap, across, and down into the child. For a compact stack, across to a lane on
|
|
29
|
+
* the stack's left and into the child's side.
|
|
30
|
+
*/
|
|
31
|
+
export declare function linkPoints(parent: {
|
|
32
|
+
x: number;
|
|
33
|
+
y: number;
|
|
34
|
+
width: number;
|
|
35
|
+
height: number;
|
|
36
|
+
}, child: {
|
|
37
|
+
x: number;
|
|
38
|
+
y: number;
|
|
39
|
+
width: number;
|
|
40
|
+
height: number;
|
|
41
|
+
}, options: Pick<LayoutOptions, 'orientation' | 'levelGap' | 'stackIndent'> & {
|
|
42
|
+
stacked: boolean;
|
|
43
|
+
}): DiagramPoint[];
|
|
44
|
+
/**
|
|
45
|
+
* Lays out a forest as tidy trees (d3's Buchheim algorithm) with each node's real size. Roots sit
|
|
46
|
+
* side by side. With `compact`, a parent whose visible children are all leaves gets them as one
|
|
47
|
+
* column, which keeps wide teams narrow.
|
|
48
|
+
*/
|
|
49
|
+
export declare function layoutTree(roots: string[], nodes: Map<string, LayoutInput>, size: (id: string) => DiagramSize, options: LayoutOptions): LayoutResult;
|
|
@@ -0,0 +1,221 @@
|
|
|
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 { DiagramRect, DiagramView, DiagramViewportDetail } from '../__internal/diagram/types.js';
|
|
5
|
+
export type TreeChartOrientation = 'vertical' | 'horizontal';
|
|
6
|
+
export type TreeChartAccent = 'primary' | 'tertiary' | 'blue' | 'green' | 'orange' | 'purple' | 'red' | 'yellow' | 'neutral';
|
|
7
|
+
/** One box in the tree. Items refer to their parent, so rows from a database work as they are. */
|
|
8
|
+
export interface TreeChartItem {
|
|
9
|
+
id: string;
|
|
10
|
+
/** The parent's id; leave it out (or point it at a missing id) for a root. */
|
|
11
|
+
parentId?: string | null;
|
|
12
|
+
headline: string;
|
|
13
|
+
supportingText?: string;
|
|
14
|
+
/** An image URL for the avatar. Without it, and without `icon`, the avatar shows initials. */
|
|
15
|
+
avatar?: string;
|
|
16
|
+
/** Material Symbols name, shown in a tinted tile instead of an avatar. */
|
|
17
|
+
icon?: string;
|
|
18
|
+
accent?: TreeChartAccent;
|
|
19
|
+
/** A short chip, such as a department. */
|
|
20
|
+
badge?: string;
|
|
21
|
+
/** Has children that are not loaded yet: expanding it fires `expand` so you can add them. */
|
|
22
|
+
hasChildren?: boolean;
|
|
23
|
+
/** Starts collapsed. */
|
|
24
|
+
collapsed?: boolean;
|
|
25
|
+
/** Your own data, kept with the item. */
|
|
26
|
+
data?: Record<string, unknown>;
|
|
27
|
+
}
|
|
28
|
+
export type TreeChartChangeReason = 'move' | 'add' | 'remove' | 'undo' | 'redo';
|
|
29
|
+
/** Detail of `change`. */
|
|
30
|
+
export interface TreeChartChangeDetail {
|
|
31
|
+
items: TreeChartItem[];
|
|
32
|
+
reason: TreeChartChangeReason;
|
|
33
|
+
}
|
|
34
|
+
/** Detail of `select`, `expand` and `collapse`. */
|
|
35
|
+
export interface TreeChartItemDetail {
|
|
36
|
+
id: string;
|
|
37
|
+
item: TreeChartItem;
|
|
38
|
+
}
|
|
39
|
+
/** Detail of `reparent`. */
|
|
40
|
+
export interface TreeChartReparentDetail {
|
|
41
|
+
id: string;
|
|
42
|
+
parentId: string | null;
|
|
43
|
+
previousParentId: string | null;
|
|
44
|
+
}
|
|
45
|
+
/** Detail of `add`. */
|
|
46
|
+
export interface TreeChartAddDetail {
|
|
47
|
+
/** The parent the new item gets. */
|
|
48
|
+
parentId: string | null;
|
|
49
|
+
/** Whether it was added below (`child`) or beside (`sibling`) the item `of`. */
|
|
50
|
+
position: 'child' | 'sibling';
|
|
51
|
+
of: string;
|
|
52
|
+
}
|
|
53
|
+
/** Detail of `delete`. */
|
|
54
|
+
export interface TreeChartDeleteDetail {
|
|
55
|
+
ids: string[];
|
|
56
|
+
}
|
|
57
|
+
/** Detail of `viewport-change`. */
|
|
58
|
+
export type TreeChartViewportDetail = DiagramViewportDetail;
|
|
59
|
+
/**
|
|
60
|
+
* @label Tree chart
|
|
61
|
+
* @tag wc-tree-chart
|
|
62
|
+
* @rawTag tree-chart
|
|
63
|
+
* @summary A hierarchy laid out as a tidy tree on an infinite canvas: org charts, taxonomies, sitemaps, decision trees.
|
|
64
|
+
*
|
|
65
|
+
* @overview
|
|
66
|
+
* <p>Set <code>items</code> to a flat list where each item names its <code>parentId</code>; the chart lays
|
|
67
|
+
* the tree out with each card's real size. Top to bottom by default, or left to right with
|
|
68
|
+
* <code>orientation="horizontal"</code>. <code>compact</code> stacks teams with no further levels in a
|
|
69
|
+
* column under their manager, which keeps wide organisations narrow.</p>
|
|
70
|
+
* <p>A card shows an avatar (or an <code>icon</code>), a headline, supporting text and a
|
|
71
|
+
* <code>badge</code>. Put your own card in <code>slot="item:<id>"</code>. The chip under a card
|
|
72
|
+
* shows how many items are below it and expands or collapses them (<code>expand</code> and
|
|
73
|
+
* <code>collapse</code> fire). For lazy loading, give an item <code>hasChildren</code> and add its
|
|
74
|
+
* children when it fires <code>expand</code>; it shows a spinner until they arrive.</p>
|
|
75
|
+
* <p><code>search(text)</code> expands the way to every match, highlights the path from the root and
|
|
76
|
+
* dims the rest, and zooms to the first match; <code>clearSearch()</code> undoes it.</p>
|
|
77
|
+
* <p>With <code>editable</code>, drag a card onto another to change its parent (never into its own
|
|
78
|
+
* branch), add an item below or beside with the buttons on a card, and delete with Delete, which
|
|
79
|
+
* moves the item's children up to its parent. <code>reparent</code>, <code>add</code> and
|
|
80
|
+
* <code>delete</code> fire first and can be canceled; every edit then fires <code>change</code> with the
|
|
81
|
+
* new <code>items</code>. Undo with Ctrl+Z. Expanding, collapsing and edits glide.</p>
|
|
82
|
+
* <p>The tree follows the WAI-ARIA tree pattern with one tab stop. In a vertical chart Up goes to the
|
|
83
|
+
* parent, Down to the first child, Left and Right to siblings (mirrored in right-to-left); a
|
|
84
|
+
* horizontal chart turns the keys. Home and End go to the first and last item, <code>*</code> expands
|
|
85
|
+
* all siblings, Enter selects and Shift + Enter expands or collapses. The canvas is infinite like
|
|
86
|
+
* <code>wc-diagram</code>, with the <code>controls</code> and <code>minimap</code> slots.</p>
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```html
|
|
90
|
+
* <wc-tree-chart id="org" style="height: 500px"></wc-tree-chart>
|
|
91
|
+
* <script>
|
|
92
|
+
* document.getElementById('org').items = [
|
|
93
|
+
* { id: 'ceo', headline: 'Sarah Jenkins', supportingText: 'CEO' },
|
|
94
|
+
* { id: 'cto', parentId: 'ceo', headline: 'Michael Chen', supportingText: 'CTO', badge: 'Engineering' },
|
|
95
|
+
* { id: 'cpo', parentId: 'ceo', headline: 'Elena Rostova', supportingText: 'CPO', badge: 'Product' }
|
|
96
|
+
* ];
|
|
97
|
+
* </script>
|
|
98
|
+
* ```
|
|
99
|
+
*
|
|
100
|
+
* @slot controls - A `wc-diagram-controls`, shown at the bottom start corner.
|
|
101
|
+
* @slot minimap - A `wc-diagram-minimap`, shown at the bottom end corner.
|
|
102
|
+
* @slot item:<id> - Custom content for the item with that id, in place of the built-in card.
|
|
103
|
+
*
|
|
104
|
+
* @fires {CustomEvent<TreeChartItemDetail>} select - An item was chosen with a click, Enter or Space. Detail contains `{ id, item }`.
|
|
105
|
+
* @fires {CustomEvent<TreeChartItemDetail>} expand - An item was expanded. Add its children now when they load lazily. Detail contains `{ id, item }`.
|
|
106
|
+
* @fires {CustomEvent<TreeChartItemDetail>} collapse - An item was collapsed. Detail contains `{ id, item }`.
|
|
107
|
+
* @fires {CustomEvent<TreeChartReparentDetail>} reparent - Before a dragged item gets a new parent. Cancel it to keep it where it was. Detail contains `{ id, parentId, previousParentId }`.
|
|
108
|
+
* @fires {CustomEvent<TreeChartAddDetail>} add - Before a new item is added with a card's buttons. Cancel it to add the item your own way. Detail contains `{ parentId, position, of }`.
|
|
109
|
+
* @fires {CustomEvent<TreeChartDeleteDetail>} delete - Before an item is removed. Cancel it to keep it. Detail contains `{ ids }`.
|
|
110
|
+
* @fires {CustomEvent<TreeChartChangeDetail>} change - After every edit. Detail contains `{ items, reason }`.
|
|
111
|
+
* @fires {CustomEvent<TreeChartViewportDetail>} viewport-change - Once per frame while the camera moves and once when it settles. Detail contains `{ x, y, zoom, settled }`.
|
|
112
|
+
*
|
|
113
|
+
* @cssprop --tree-chart-connector-color - Colour of connectors. Defaults to a mix of primary and outline-variant.
|
|
114
|
+
* @cssprop --tree-chart-background - Canvas background. Defaults to surface-container-lowest.
|
|
115
|
+
* @tags data
|
|
116
|
+
*/
|
|
117
|
+
export declare class TreeChart extends DiagramCanvasElement {
|
|
118
|
+
static styles: import("lit").CSSResultGroup[];
|
|
119
|
+
/** The items, each naming its parent. Replaced with a new array, never mutated, on every edit. */
|
|
120
|
+
items: TreeChartItem[];
|
|
121
|
+
/** Lays the tree out top to bottom or left to right. */
|
|
122
|
+
orientation: TreeChartOrientation;
|
|
123
|
+
/** Stacks children that have no children of their own in a column (vertical charts). */
|
|
124
|
+
compact: boolean;
|
|
125
|
+
/** Id of the selected item. */
|
|
126
|
+
selected: string;
|
|
127
|
+
private _collapsed;
|
|
128
|
+
private _loading;
|
|
129
|
+
private _focusId;
|
|
130
|
+
private _matches;
|
|
131
|
+
private _path;
|
|
132
|
+
private _drag?;
|
|
133
|
+
private _announcement;
|
|
134
|
+
private readonly _viewportEl?;
|
|
135
|
+
private readonly measure;
|
|
136
|
+
private readonly history;
|
|
137
|
+
private readonly handledKeys;
|
|
138
|
+
private byId;
|
|
139
|
+
private childMap;
|
|
140
|
+
private roots;
|
|
141
|
+
private seenCollapsed;
|
|
142
|
+
/** Laid-out positions from the last render. */
|
|
143
|
+
private positions;
|
|
144
|
+
private stacked;
|
|
145
|
+
private overrides;
|
|
146
|
+
private glideFrom?;
|
|
147
|
+
private stopGlide?;
|
|
148
|
+
private pendingZoom?;
|
|
149
|
+
private nodeDrag?;
|
|
150
|
+
disconnectedCallback(): void;
|
|
151
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
152
|
+
protected updated(changed: PropertyValues<this>): void;
|
|
153
|
+
/** Whether `undo()` has something to undo. */
|
|
154
|
+
get canUndo(): boolean;
|
|
155
|
+
/** Whether `redo()` has something to redo. */
|
|
156
|
+
get canRedo(): boolean;
|
|
157
|
+
undo(): void;
|
|
158
|
+
redo(): void;
|
|
159
|
+
/** Forgets the undo and redo history. */
|
|
160
|
+
clearHistory(): void;
|
|
161
|
+
expand(id: string): void;
|
|
162
|
+
collapse(id: string): void;
|
|
163
|
+
/** Expands every item. */
|
|
164
|
+
expandAll(): void;
|
|
165
|
+
/**
|
|
166
|
+
* Highlights the items whose headline, supporting text or badge contains `text`, expands the way
|
|
167
|
+
* to them, dims the rest and zooms to the first. Returns the ids of the matches.
|
|
168
|
+
*/
|
|
169
|
+
search(text: string): string[];
|
|
170
|
+
clearSearch(): void;
|
|
171
|
+
/** Selects an item, fires `select`, and brings it into view. */
|
|
172
|
+
selectItem(id: string): void;
|
|
173
|
+
/** Moves keyboard focus to an item and pans it into view. */
|
|
174
|
+
focusItem(id: string): void;
|
|
175
|
+
protected viewportElement(): HTMLElement | undefined;
|
|
176
|
+
protected contentBounds(): DiagramRect | undefined;
|
|
177
|
+
protected selectionRects(): DiagramRect[];
|
|
178
|
+
protected itemRect(id: string): DiagramRect | undefined;
|
|
179
|
+
protected firstItemRect(): DiagramRect | undefined;
|
|
180
|
+
protected overviewItems(): DiagramOverview['items'];
|
|
181
|
+
protected isBackground(target: EventTarget | null): boolean;
|
|
182
|
+
protected onBackgroundClick(): void;
|
|
183
|
+
/** Fits the tree, or shows its root at 50% when fitting it all would be too small to read. */
|
|
184
|
+
protected computeStartView(): DiagramView;
|
|
185
|
+
private indexItems;
|
|
186
|
+
private parentOf;
|
|
187
|
+
private hasKids;
|
|
188
|
+
/** Whether `id` is `ancestor` or below it. */
|
|
189
|
+
private isWithin;
|
|
190
|
+
private requestChildren;
|
|
191
|
+
private commit;
|
|
192
|
+
private announce;
|
|
193
|
+
private select;
|
|
194
|
+
private uniqueId;
|
|
195
|
+
private reparent;
|
|
196
|
+
private add;
|
|
197
|
+
/** Removes an item; its children move up to its parent. */
|
|
198
|
+
private removeItem;
|
|
199
|
+
private layout;
|
|
200
|
+
private positionOf;
|
|
201
|
+
private rectOf;
|
|
202
|
+
/** Runs a change and glides items from where they were; new items grow out of `anchor`. */
|
|
203
|
+
private glide;
|
|
204
|
+
private playGlide;
|
|
205
|
+
private keepInView;
|
|
206
|
+
private nodeElements;
|
|
207
|
+
private nodeElement;
|
|
208
|
+
/** Visible items in reading order. */
|
|
209
|
+
private visibleOrder;
|
|
210
|
+
private siblingsOf;
|
|
211
|
+
private onNodeKeyDown;
|
|
212
|
+
private onViewportKeyDown;
|
|
213
|
+
private onNodePointerDown;
|
|
214
|
+
private onDragMove;
|
|
215
|
+
private onDragUp;
|
|
216
|
+
private onDragCancel;
|
|
217
|
+
private endDrag;
|
|
218
|
+
private renderNode;
|
|
219
|
+
private renderLinks;
|
|
220
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
221
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Workflow, WORKFLOW_LOGIC_STEPS } from './workflow.js';
|
|
2
|
+
export type { WorkflowBreakpointDetail, WorkflowDebugAction, WorkflowDebugActionDetail, WorkflowIterationDetail, WorkflowMode, WorkflowRun, WorkflowRunStep, WorkflowRunStepStatus, WorkflowAccent, WorkflowActionStep, WorkflowAssignee, WorkflowBranchStep, WorkflowChangeDetail, WorkflowChangeReason, WorkflowDeleteDetail, WorkflowDensity, WorkflowDirection, WorkflowEndStep, WorkflowField, WorkflowListRef, WorkflowLoopStep, WorkflowOutput, WorkflowPath, WorkflowProblem, WorkflowSelectDetail, WorkflowStep, WorkflowStepAddDetail, WorkflowStepType, WorkflowTool, WorkflowValue, WorkflowViewportDetail, WorkflowWaitStep, } from './workflow.js';
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/** Colour of a step's icon tile, from the theme's accent palettes. */
|
|
2
|
+
export type WorkflowAccent = 'primary' | 'tertiary' | 'blue' | 'green' | 'orange' | 'purple' | 'red' | 'yellow' | 'neutral';
|
|
3
|
+
/** A label and value shown on a step card. `{{Step.output}}` in `value` renders as a data pill. */
|
|
4
|
+
export interface WorkflowField {
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/** A value a step produces for later steps. */
|
|
9
|
+
export interface WorkflowOutput {
|
|
10
|
+
name: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
}
|
|
13
|
+
/** A tool an AI agent step may call. */
|
|
14
|
+
export interface WorkflowTool {
|
|
15
|
+
id: string;
|
|
16
|
+
headline: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Who works on a human task. */
|
|
20
|
+
export interface WorkflowAssignee {
|
|
21
|
+
name: string;
|
|
22
|
+
src?: string;
|
|
23
|
+
}
|
|
24
|
+
interface WorkflowStepBase {
|
|
25
|
+
/** Unique across the whole workflow. */
|
|
26
|
+
id: string;
|
|
27
|
+
/** The step's title. */
|
|
28
|
+
headline?: string;
|
|
29
|
+
/** A short second line, usually the kind of step ("HTTP request", "Approval"). */
|
|
30
|
+
supportingText?: string;
|
|
31
|
+
/** Material Symbols name for the icon tile. */
|
|
32
|
+
icon?: string;
|
|
33
|
+
accent?: WorkflowAccent;
|
|
34
|
+
/** The step type's `kind`, for your own lookups. */
|
|
35
|
+
kind?: string;
|
|
36
|
+
/** Marks the step as needing attention; `errorText` says why. */
|
|
37
|
+
invalid?: boolean;
|
|
38
|
+
errorText?: string;
|
|
39
|
+
/** Starts a branch or loop collapsed. */
|
|
40
|
+
collapsed?: boolean;
|
|
41
|
+
/** The step's data is pinned for testing: shown with a pin badge. */
|
|
42
|
+
pinned?: boolean;
|
|
43
|
+
/** Your own data, kept with the step. */
|
|
44
|
+
data?: Record<string, unknown>;
|
|
45
|
+
}
|
|
46
|
+
export interface WorkflowActionStep extends WorkflowStepBase {
|
|
47
|
+
type: 'action';
|
|
48
|
+
fields?: WorkflowField[];
|
|
49
|
+
outputs?: WorkflowOutput[];
|
|
50
|
+
tools?: WorkflowTool[];
|
|
51
|
+
assignee?: WorkflowAssignee;
|
|
52
|
+
/** Steps that run when this step fails, drawn as a side path. */
|
|
53
|
+
onError?: WorkflowStep[];
|
|
54
|
+
}
|
|
55
|
+
export interface WorkflowPath {
|
|
56
|
+
id: string;
|
|
57
|
+
/** Shown on the pill at the top of the path, for example "amount > 1,000" or "Otherwise". */
|
|
58
|
+
label: string;
|
|
59
|
+
/** The default path ("else"), shown in a quieter pill. */
|
|
60
|
+
isDefault?: boolean;
|
|
61
|
+
/** Your own condition, for example a `wc-condition-builder` value. */
|
|
62
|
+
condition?: unknown;
|
|
63
|
+
steps: WorkflowStep[];
|
|
64
|
+
}
|
|
65
|
+
export interface WorkflowBranchStep extends WorkflowStepBase {
|
|
66
|
+
/** `branch` runs the first path whose condition holds; `parallel` runs every path and waits for all. */
|
|
67
|
+
type: 'branch' | 'parallel';
|
|
68
|
+
paths: WorkflowPath[];
|
|
69
|
+
}
|
|
70
|
+
export interface WorkflowLoopStep extends WorkflowStepBase {
|
|
71
|
+
type: 'loop';
|
|
72
|
+
mode?: 'for-each' | 'while' | 'until';
|
|
73
|
+
/** What the loop goes over or tests, for example `{{Trigger.line_items}}`. */
|
|
74
|
+
over?: string;
|
|
75
|
+
steps: WorkflowStep[];
|
|
76
|
+
}
|
|
77
|
+
export interface WorkflowWaitStep extends WorkflowStepBase {
|
|
78
|
+
type: 'wait';
|
|
79
|
+
/** A time or event, for example "3 days" or "Approval received". */
|
|
80
|
+
until?: string;
|
|
81
|
+
}
|
|
82
|
+
export interface WorkflowEndStep extends WorkflowStepBase {
|
|
83
|
+
type: 'end';
|
|
84
|
+
}
|
|
85
|
+
export type WorkflowStep = WorkflowActionStep | WorkflowBranchStep | WorkflowLoopStep | WorkflowWaitStep | WorkflowEndStep;
|
|
86
|
+
export interface WorkflowValue {
|
|
87
|
+
/** What starts the workflow, drawn first. */
|
|
88
|
+
trigger?: WorkflowActionStep;
|
|
89
|
+
steps: WorkflowStep[];
|
|
90
|
+
}
|
|
91
|
+
/** Where one step is in a run. */
|
|
92
|
+
export type WorkflowRunStepStatus = 'queued' | 'running' | 'waiting' | 'paused' | 'success' | 'failed' | 'skipped' | 'canceled';
|
|
93
|
+
/** What happened to one step in a run. */
|
|
94
|
+
export interface WorkflowRunStep {
|
|
95
|
+
status: WorkflowRunStepStatus;
|
|
96
|
+
/** When the step started, in milliseconds (an epoch time or an offset from the run's start). */
|
|
97
|
+
startedAt?: number;
|
|
98
|
+
durationMs?: number;
|
|
99
|
+
input?: unknown;
|
|
100
|
+
output?: unknown;
|
|
101
|
+
error?: {
|
|
102
|
+
message: string;
|
|
103
|
+
detail?: string;
|
|
104
|
+
};
|
|
105
|
+
/** How many times the step has been tried. */
|
|
106
|
+
attempts?: number;
|
|
107
|
+
/** For a loop: what each iteration did, keyed by the ids of the steps inside. */
|
|
108
|
+
iterations?: Record<string, WorkflowRunStep>[];
|
|
109
|
+
}
|
|
110
|
+
/** A run of the workflow, for debugging and run history. Your engine produces it; the component only shows it. */
|
|
111
|
+
export interface WorkflowRun {
|
|
112
|
+
id: string;
|
|
113
|
+
status: 'running' | 'paused' | 'success' | 'failed' | 'canceled';
|
|
114
|
+
startedAt?: number;
|
|
115
|
+
durationMs?: number;
|
|
116
|
+
/** The step running now, or paused on. */
|
|
117
|
+
current?: string;
|
|
118
|
+
steps: Record<string, WorkflowRunStep>;
|
|
119
|
+
}
|
|
120
|
+
/** Whether a run step has been reached: it is running, waiting, paused or done. */
|
|
121
|
+
export declare function isReached(status: WorkflowRunStepStatus | undefined): boolean;
|
|
122
|
+
/** An entry in the add-step palette. */
|
|
123
|
+
export interface WorkflowStepType {
|
|
124
|
+
/** Your identifier, copied to the new step's `kind`. */
|
|
125
|
+
kind: string;
|
|
126
|
+
type: WorkflowStep['type'];
|
|
127
|
+
headline: string;
|
|
128
|
+
supportingText?: string;
|
|
129
|
+
icon?: string;
|
|
130
|
+
accent?: WorkflowAccent;
|
|
131
|
+
/** Heading the entry is grouped under. */
|
|
132
|
+
category?: string;
|
|
133
|
+
/** Offered only when adding a trigger. */
|
|
134
|
+
trigger?: boolean;
|
|
135
|
+
/** Extra fields for new steps of this type, such as `fields` or `paths`. */
|
|
136
|
+
defaults?: Partial<WorkflowStep>;
|
|
137
|
+
}
|
|
138
|
+
/** Where a list of steps lives: the main sequence, a branch path, a loop body or an error path. */
|
|
139
|
+
export type WorkflowListRef = {
|
|
140
|
+
kind: 'root';
|
|
141
|
+
} | {
|
|
142
|
+
kind: 'path';
|
|
143
|
+
stepId: string;
|
|
144
|
+
pathId: string;
|
|
145
|
+
} | {
|
|
146
|
+
kind: 'loop';
|
|
147
|
+
stepId: string;
|
|
148
|
+
} | {
|
|
149
|
+
kind: 'error';
|
|
150
|
+
stepId: string;
|
|
151
|
+
};
|
|
152
|
+
/** Logic steps offered when `step-types` is not set. */
|
|
153
|
+
export declare const WORKFLOW_LOGIC_STEPS: WorkflowStepType[];
|
|
154
|
+
export declare function listKey(ref: WorkflowListRef): string;
|
|
155
|
+
/** The lists of steps directly inside `step`, with their references. */
|
|
156
|
+
export declare function childLists(step: WorkflowStep): {
|
|
157
|
+
ref: WorkflowListRef;
|
|
158
|
+
steps: WorkflowStep[];
|
|
159
|
+
}[];
|
|
160
|
+
export interface WalkEntry {
|
|
161
|
+
step: WorkflowStep;
|
|
162
|
+
ref: WorkflowListRef;
|
|
163
|
+
index: number;
|
|
164
|
+
depth: number;
|
|
165
|
+
parent?: WorkflowStep;
|
|
166
|
+
}
|
|
167
|
+
/** Visits every step in reading order: a block, then what is inside it, then what follows. */
|
|
168
|
+
export declare function walk(value: WorkflowValue, visit: (entry: WalkEntry) => void, options?: {
|
|
169
|
+
skip?: (step: WorkflowStep) => boolean;
|
|
170
|
+
}): void;
|
|
171
|
+
export declare function findStep(value: WorkflowValue, id: string): WalkEntry | undefined;
|
|
172
|
+
export declare function getList(value: WorkflowValue, ref: WorkflowListRef): WorkflowStep[] | undefined;
|
|
173
|
+
export declare function updateList(value: WorkflowValue, ref: WorkflowListRef, fn: (list: WorkflowStep[]) => WorkflowStep[]): WorkflowValue;
|
|
174
|
+
export declare function insertStep(value: WorkflowValue, ref: WorkflowListRef, index: number, step: WorkflowStep): WorkflowValue;
|
|
175
|
+
export declare function removeStep(value: WorkflowValue, id: string): WorkflowValue;
|
|
176
|
+
/** Moves a step to `index` in `ref`, where the index counts the list before the move. */
|
|
177
|
+
export declare function moveStep(value: WorkflowValue, id: string, ref: WorkflowListRef, index: number): WorkflowValue;
|
|
178
|
+
export declare function replaceStep(value: WorkflowValue, id: string, fn: (step: WorkflowStep) => WorkflowStep): WorkflowValue;
|
|
179
|
+
/** Whether `id` is `step` or somewhere inside it. */
|
|
180
|
+
export declare function contains(step: WorkflowStep, id: string): boolean;
|
|
181
|
+
/** Every id used in the workflow. */
|
|
182
|
+
export declare function allIds(value: WorkflowValue): Set<string>;
|
|
183
|
+
export declare function uniqueId(base: string, taken: Set<string>): string;
|
|
184
|
+
/** A deep copy of `step` with fresh ids for it, its paths and everything inside. */
|
|
185
|
+
export declare function cloneWithNewIds(step: WorkflowStep, taken: Set<string>): WorkflowStep;
|
|
186
|
+
/** Whether running a list of steps always stops before reaching what comes after it. */
|
|
187
|
+
export declare function listTerminates(steps: WorkflowStep[]): boolean;
|
|
188
|
+
/** Whether a block step stops the flow (every path ends). */
|
|
189
|
+
export declare function stepTerminates(step: WorkflowStep): boolean;
|
|
190
|
+
/** Counts the steps inside a block, for its collapsed summary. */
|
|
191
|
+
export declare function countInside(step: WorkflowStep): number;
|
|
192
|
+
/** Builds a new step from a palette entry. */
|
|
193
|
+
export declare function createStep(type: WorkflowStepType, taken: Set<string>): WorkflowStep;
|
|
194
|
+
export {};
|