@widgetic/workflows 0.2.9 → 0.2.11

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.
Files changed (34) hide show
  1. package/README.md +11 -13
  2. package/dist/components/WorkflowsEmptyState.svelte +15 -3
  3. package/dist/components/WorkflowsEmptyState.svelte.d.ts +2 -0
  4. package/dist/components/canvas/CompositionNodeView.svelte +5 -5
  5. package/dist/components/canvas/ConditionNodeView.svelte +4 -4
  6. package/dist/components/canvas/HandlePoint.svelte +1 -1
  7. package/dist/components/canvas/TriggerNodeView.svelte +5 -4
  8. package/dist/components/editor/EditorTopBar.svelte +6 -20
  9. package/dist/components/editor/RunsFlow.svelte +73 -23
  10. package/dist/components/editor/WorkflowNameControl.svelte +126 -0
  11. package/dist/components/editor/WorkflowNameControl.svelte.d.ts +13 -0
  12. package/dist/components/list/WorkflowList.svelte +87 -59
  13. package/dist/components/panel/CompositionSelect.svelte +5 -1
  14. package/dist/components/ui/icons.d.ts +2 -0
  15. package/dist/components/ui/icons.js +3 -1
  16. package/dist/editor/createBlankWorkflow.d.ts +30 -0
  17. package/dist/editor/createBlankWorkflow.js +37 -0
  18. package/dist/editor/editorState.svelte.d.ts +2 -2
  19. package/dist/editor/listState.svelte.d.ts +24 -36
  20. package/dist/editor/listState.svelte.js +50 -45
  21. package/dist/editor/presetChoice.d.ts +4 -4
  22. package/dist/editor/presetChoice.js +4 -4
  23. package/dist/editor/runsFlowBandLabel.d.ts +16 -0
  24. package/dist/editor/runsFlowBandLabel.js +34 -0
  25. package/dist/editor/runsFlowLayout.d.ts +24 -9
  26. package/dist/editor/runsFlowLayout.js +73 -28
  27. package/dist/editor/workflowNameCommit.d.ts +12 -0
  28. package/dist/editor/workflowNameCommit.js +11 -0
  29. package/dist/i18n/language.d.ts +3 -3
  30. package/dist/i18n/messages.d.ts +8 -26
  31. package/dist/i18n/messages.js +9 -29
  32. package/package.json +1 -1
  33. package/dist/components/list/CreateWorkflowDialog.svelte +0 -262
  34. package/dist/components/list/CreateWorkflowDialog.svelte.d.ts +0 -9
@@ -3,19 +3,12 @@ import type { CompositionOption, SortDirection, WorkflowDetail, WorkflowListItem
3
3
  import type { WorkflowsMessageKey } from '../i18n/messages.js';
4
4
  import type { WorkflowsError } from '../types/index.js';
5
5
  import { type EditingBadges, type EditingWatcherOptions } from './editingWatcher.js';
6
- /** What the list is filtered by. Empty is "not archived" (drafts, live and paused), which is what the API lists by default. */
7
- export type ListStatusFilter = '' | WorkflowStatus | 'all';
8
- /**
9
- * The tab that is open above the list: what the list covers before the Status menu narrows it. `active` is "Not archived"
10
- * (what the API lists by default) and `all` is "All workflows", the only place the archived ones are.
11
- */
12
- export type ListScope = 'active' | 'all';
13
- /** What the Status menu can show: `any` leaves the tab as it is, and a state narrows the list to the workflows in it. */
14
- export type ListStatusChoice = 'any' | WorkflowStatus;
15
- /** The lines of the Status menu, in the order the design draws them. */
16
- export declare const LIST_STATUS_CHOICES: readonly ListStatusChoice[];
17
- /** Whether what a control reported is one of the lines of the Status menu (a select reports plain text). */
18
- export declare function isListStatusChoice(value: string): value is ListStatusChoice;
6
+ /** The tab that filters the list: `all` is not archived (drafts, live, paused), which is what the API lists by default; each state shows only that state (archived only under `archived`). */
7
+ export type ListTab = 'all' | WorkflowStatus;
8
+ /** The tabs of the list, in the order the design draws them. */
9
+ export declare const LIST_TABS: readonly ListTab[];
10
+ /** Whether what a control reported is one of the tabs (a select reports plain text). */
11
+ export declare function isListTab(value: string): value is ListTab;
19
12
  /** One page of the list is this many workflows; "Show more" reads the next. */
20
13
  export declare const LIST_PAGE_SIZE = 25;
21
14
  /** How long the list waits after the last letter typed in the search before it asks. */
@@ -51,14 +44,10 @@ export declare class WorkflowListState {
51
44
  total: number;
52
45
  loadState: "loading" | "ready" | "failed";
53
46
  loadingMore: boolean;
54
- failure: "workflows.region.label" | "workflows.header.title" | "workflows.common.cancel" | "workflows.common.close" | "workflows.common.dismiss" | "workflows.common.loading" | "workflows.empty.title" | "workflows.empty.hint" | "workflows.error.title" | "workflows.error.hint" | "workflows.error.retry" | "workflows.error.generic" | "workflows.error.network" | "workflows.error.timeout" | "workflows.error.server" | "workflows.error.sessionEnded" | "workflows.error.planRestricted" | "workflows.error.notFound" | "workflows.error.revisionChanged" | "workflows.error.archived" | "workflows.error.nothingToPublish" | "workflows.error.nothingToDiscard" | "workflows.error.wrongState" | "workflows.error.tooManyWorkflows" | "workflows.error.presetGone" | "workflows.error.presetCopyFailed" | "workflows.error.stillWorking" | "workflows.error.publishBlocked" | "workflows.error.invalidGraph" | "workflows.error.tooManyRequests" | "workflows.list.label" | "workflows.list.newWorkflow" | "workflows.list.searchLabel" | "workflows.list.searchPlaceholder" | "workflows.list.filterLabel" | "workflows.list.filterActive" | "workflows.list.filterAll" | "workflows.list.statusLabel" | "workflows.list.statusAny" | "workflows.list.sortLabel" | "workflows.list.sortCreated" | "workflows.list.sortPublished" | "workflows.list.sortRuns" | "workflows.list.sortName" | "workflows.list.sortAscending" | "workflows.list.sortDescending" | "workflows.list.compositionsCount" | "workflows.list.runsCount" | "workflows.list.publishedOn" | "workflows.list.neverPublished" | "workflows.list.open" | "workflows.list.rowMenu" | "workflows.list.showMore" | "workflows.list.noMatches" | "workflows.list.duplicated" | "workflows.list.deleted" | "workflows.list.editingNamed" | "workflows.list.editingSomeone" | "workflows.create.title" | "workflows.create.nameLabel" | "workflows.create.namePlaceholder" | "workflows.create.compositionLabel" | "workflows.create.compositionHelp" | "workflows.create.compositionPlaceholder" | "workflows.create.create" | "workflows.create.creating" | "workflows.create.startLabel" | "workflows.create.blankTitle" | "workflows.create.blankHint" | "workflows.create.presetSummary" | "workflows.create.presetMorePictures" | "workflows.create.presetsLoading" | "workflows.create.presetsFailed" | "workflows.create.presetHelp" | "workflows.create.presetNameHelp" | "workflows.create.settingUp" | "workflows.status.draft" | "workflows.status.live" | "workflows.status.paused" | "workflows.status.archived" | "workflows.status.unpublishedChanges" | "workflows.top.back" | "workflows.top.nameLabel" | "workflows.top.testRun" | "workflows.top.history" | "workflows.top.embedCode" | "workflows.top.publish" | "workflows.top.publishChanges" | "workflows.top.publishing" | "workflows.top.moreActions" | "workflows.save.saved" | "workflows.save.saving" | "workflows.save.pending" | "workflows.save.failed" | "workflows.save.conflict" | "workflows.tabs.label" | "workflows.tabs.editor" | "workflows.tabs.runs" | "workflows.tabs.settings" | "workflows.banner.unpublishedChanges" | "workflows.banner.discard" | "workflows.banner.discardTitle" | "workflows.banner.discardMessage" | "workflows.banner.neverPublished" | "workflows.banner.paused" | "workflows.banner.archived" | "workflows.banner.conflict" | "workflows.banner.reload" | "workflows.banner.touchOnly" | "workflows.conflict.keepCopy" | "workflows.conflict.keepingCopy" | "workflows.conflict.copyName" | "workflows.conflict.copyKept" | "workflows.conflict.openCopy" | "workflows.conflict.loadTitle" | "workflows.conflict.loadMessage" | "workflows.presence.blockedTitleNamed" | "workflows.presence.blockedTitleYou" | "workflows.presence.blockedTitle" | "workflows.presence.blockedBody" | "workflows.presence.lostTitleNamed" | "workflows.presence.lostTitleYou" | "workflows.presence.lostTitle" | "workflows.presence.lostBody" | "workflows.presence.takeOver" | "workflows.presence.takeOverHint" | "workflows.presence.lookOnly" | "workflows.presence.lookOnlyHint" | "workflows.presence.working" | "workflows.presence.actionFailed" | "workflows.presence.readOnlyNamed" | "workflows.presence.readOnlyYou" | "workflows.presence.readOnly" | "workflows.presence.readOnlyFree" | "workflows.presence.startEditing" | "workflows.editor.published" | "workflows.editor.discarded" | "workflows.editor.restored" | "workflows.editor.reloaded" | "workflows.editor.paused" | "workflows.editor.resumed" | "workflows.editor.archived" | "workflows.editor.unarchived" | "workflows.editor.saveFirst" | "workflows.editor.fixProblems" | "workflows.editor.blockLimit" | "workflows.publish.firstTitle" | "workflows.publish.firstMessage" | "workflows.publish.changesTitle" | "workflows.publish.changesMessage" | "workflows.leave.title" | "workflows.leave.message" | "workflows.leave.confirm" | "workflows.canvas.label" | "workflows.canvas.pointIn" | "workflows.canvas.pointOut" | "workflows.toolbar.label" | "workflows.toolbar.addBlock" | "workflows.toolbar.undo" | "workflows.toolbar.redo" | "workflows.toolbar.zoomIn" | "workflows.toolbar.zoomOut" | "workflows.toolbar.fit" | "workflows.toolbar.zoomLevel" | "workflows.block.publishedMeta" | "workflows.block.draftMeta" | "workflows.block.emptyCompositionHelp" | "workflows.block.conditionNoRulesBadge" | "workflows.addBlock.composition" | "workflows.addBlock.helpComposition" | "workflows.addBlock.condition" | "workflows.addBlock.helpCondition" | "workflows.addBlock.triggerHeading" | "workflows.addBlock.helpInput" | "workflows.addBlock.helpAction" | "workflows.addBlock.helpPageEvent" | "workflows.addBlock.helpScheduled" | "workflows.block.startsHere" | "workflows.block.trigger" | "workflows.block.condition" | "workflows.block.unknown" | "workflows.block.compositionNotChosen" | "workflows.block.compositionLoading" | "workflows.block.compositionUnavailable" | "workflows.block.notPublished" | "workflows.block.numbered" | "workflows.block.problems" | "workflows.panel.label" | "workflows.panel.close" | "workflows.panel.selectionHeading" | "workflows.panel.problemsHeading" | "workflows.panel.problemsLabel" | "workflows.panel.manyBlocksSelected" | "workflows.panel.connectionSelected" | "workflows.panel.removeBlock" | "workflows.panel.removeBlocks" | "workflows.panel.removeConnection" | "workflows.composition.heading" | "workflows.composition.label" | "workflows.composition.help" | "workflows.composition.searchLabel" | "workflows.composition.searchPlaceholder" | "workflows.composition.none" | "workflows.composition.alreadyUsed" | "workflows.composition.isStart" | "workflows.composition.makeStart" | "workflows.composition.capabilitiesHeading" | "workflows.composition.capabilityInput" | "workflows.composition.capabilityAction" | "workflows.composition.capabilityWebsites" | "workflows.composition.inputTables" | "workflows.composition.actionCount" | "workflows.trigger.heading" | "workflows.trigger.help" | "workflows.trigger.kindLabel" | "workflows.trigger.kindInput" | "workflows.trigger.kindAction" | "workflows.trigger.kindPageEvent" | "workflows.trigger.kindScheduled" | "workflows.trigger.unavailable" | "workflows.trigger.tableLabel" | "workflows.trigger.tableHelp" | "workflows.trigger.actionLabel" | "workflows.trigger.actionHelp" | "workflows.trigger.chooseOne" | "workflows.trigger.notFound" | "workflows.trigger.readableValues" | "workflows.trigger.noReadableValues" | "workflows.trigger.nextLabel" | "workflows.trigger.nextHelp" | "workflows.trigger.nextNone" | "workflows.trigger.summaryInput" | "workflows.trigger.summaryAction" | "workflows.trigger.summaryPageEvent" | "workflows.trigger.summaryAt" | "workflows.trigger.summaryUnfinished" | "workflows.reason.widgetKeepsNoData" | "workflows.reason.widgetReportsNoActions" | "workflows.reason.widgetNotPublished" | "workflows.schedule.modeLabel" | "workflows.schedule.modeAfter" | "workflows.schedule.modeAt" | "workflows.schedule.afterHelp" | "workflows.schedule.amountLabel" | "workflows.schedule.unitLabel" | "workflows.schedule.unitSeconds" | "workflows.schedule.unitMinutes" | "workflows.schedule.unitHours" | "workflows.schedule.unitDays" | "workflows.schedule.unitWeeks" | "workflows.schedule.waitSeconds" | "workflows.schedule.waitMinutes" | "workflows.schedule.waitHours" | "workflows.schedule.waitDays" | "workflows.schedule.waitWeeks" | "workflows.schedule.momentLabel" | "workflows.schedule.momentHelp" | "workflows.schedule.invalidMoment" | "workflows.event.nameLabel" | "workflows.event.namePlaceholder" | "workflows.event.nameHelp" | "workflows.event.nameInvalid" | "workflows.event.howToSend" | "workflows.event.valuesHeading" | "workflows.event.valuesHelp" | "workflows.event.addValue" | "workflows.event.valueName" | "workflows.event.valueNamePlaceholder" | "workflows.event.valueNameInvalid" | "workflows.event.valueType" | "workflows.event.removeValue" | "workflows.fieldType.text" | "workflows.fieldType.number" | "workflows.fieldType.boolean" | "workflows.value.yes" | "workflows.value.no" | "workflows.condition.heading" | "workflows.condition.help" | "workflows.condition.noTrigger" | "workflows.condition.noValues" | "workflows.condition.addRule" | "workflows.condition.ruleLimit" | "workflows.condition.defaultName" | "workflows.condition.defaultLabel" | "workflows.condition.defaultStay" | "workflows.condition.defaultHelp" | "workflows.condition.defaultHint" | "workflows.condition.defaultStays" | "workflows.rule.defaultName" | "workflows.rule.nameLabel" | "workflows.rule.moveUp" | "workflows.rule.moveDown" | "workflows.rule.remove" | "workflows.rule.matchLabel" | "workflows.rule.matchAll" | "workflows.rule.matchAny" | "workflows.rule.noTests" | "workflows.rule.addTest" | "workflows.rule.testLimit" | "workflows.rule.thenGoTo" | "workflows.rule.expand" | "workflows.rule.collapse" | "workflows.rule.testWithValue" | "workflows.rule.testWithoutValue" | "workflows.rule.testAndMore" | "workflows.test.field" | "workflows.test.operator" | "workflows.test.value" | "workflows.test.valuePlaceholder" | "workflows.test.remove" | "workflows.operator.is" | "workflows.operator.isNot" | "workflows.operator.contains" | "workflows.operator.doesNotContain" | "workflows.operator.startsWith" | "workflows.operator.endsWith" | "workflows.operator.greaterThan" | "workflows.operator.atLeast" | "workflows.operator.lessThan" | "workflows.operator.atMost" | "workflows.operator.isEmpty" | "workflows.operator.isNotEmpty" | "workflows.test.heading" | "workflows.test.help" | "workflows.test.close" | "workflows.test.start" | "workflows.test.restart" | "workflows.test.ended" | "workflows.test.noStart" | "workflows.test.noTriggers" | "workflows.test.visitorIsOn" | "workflows.test.fire" | "workflows.test.resultMoved" | "workflows.test.resultStayed" | "workflows.test.resultIgnored" | "workflows.history.heading" | "workflows.history.help" | "workflows.history.close" | "workflows.history.none" | "workflows.history.failed" | "workflows.history.draft" | "workflows.history.draftMeta" | "workflows.history.version" | "workflows.history.live" | "workflows.history.byOn" | "workflows.history.view" | "workflows.history.viewingShort" | "workflows.history.viewing" | "workflows.history.backToDraft" | "workflows.history.restore" | "workflows.history.restoreConfirm" | "workflows.history.restoreTitle" | "workflows.history.restoreMessage" | "workflows.runs.help" | "workflows.runs.flowLabel" | "workflows.runs.rangeLabel" | "workflows.runs.lastDays" | "workflows.runs.versionLabel" | "workflows.runs.allVersions" | "workflows.runs.versionLive" | "workflows.runs.started" | "workflows.runs.entered" | "workflows.runs.stayed" | "workflows.runs.failed" | "workflows.runs.failedTimeout" | "workflows.runs.failedWidgetError" | "workflows.runs.failedBuild" | "workflows.runs.failedOther" | "workflows.runs.failedUnrecorded" | "workflows.runs.pathLabel" | "workflows.runs.none" | "workflows.runs.neverPublished" | "workflows.settings.zoneLabel" | "workflows.settings.zoneHelp" | "workflows.settings.embedHeading" | "workflows.settings.embedHelp" | "workflows.settings.stateHeading" | "workflows.settings.pause" | "workflows.settings.pauseHelp" | "workflows.settings.resume" | "workflows.settings.resumeHelp" | "workflows.settings.archive" | "workflows.settings.archiveHelp" | "workflows.settings.archiveTitle" | "workflows.settings.archiveMessage" | "workflows.settings.unarchive" | "workflows.settings.unarchiveHelp" | "workflows.settings.duplicate" | "workflows.settings.duplicateHelp" | "workflows.settings.delete" | "workflows.settings.deleteHelp" | "workflows.settings.deleteTitle" | "workflows.settings.deleteMessageDraft" | "workflows.settings.deleteMessageLive" | "workflows.settings.deleteMessagePaused" | "workflows.settings.deleteMessageArchived" | "workflows.issue.unknown" | "workflows.issue.malformed" | "workflows.issue.schemaVersion" | "workflows.issue.graphTooLarge" | "workflows.issue.unknownNodeType" | "workflows.issue.unknownTriggerKind" | "workflows.issue.badId" | "workflows.issue.duplicateId" | "workflows.issue.tooManyBlocks" | "workflows.issue.tooManyEdges" | "workflows.issue.noComposition" | "workflows.issue.noStart" | "workflows.issue.manyStarts" | "workflows.issue.compositionMissingId" | "workflows.issue.duplicateComposition" | "workflows.issue.compositionNotAvailable" | "workflows.issue.compositionWebsiteMismatch" | "workflows.issue.unreachableBlock" | "workflows.issue.edgeUnknownNode" | "workflows.issue.edgeBadPort" | "workflows.issue.edgeInvalidConnection" | "workflows.issue.portManyTargets" | "workflows.issue.cycle" | "workflows.issue.triggerNoSource" | "workflows.issue.triggerManySources" | "workflows.issue.triggerNoTarget" | "workflows.issue.triggerConfigIncomplete" | "workflows.issue.triggerNeedsTable" | "workflows.issue.triggerNeedsAction" | "workflows.issue.triggerNeedsName" | "workflows.issue.scheduleInvalid" | "workflows.issue.eventValueInvalid" | "workflows.issue.eventTooManyValues" | "workflows.issue.triggerCapabilityMissing" | "workflows.issue.triggerInputMissing" | "workflows.issue.triggerActionMissing" | "workflows.issue.conditionNoSource" | "workflows.issue.conditionManySources" | "workflows.issue.conditionNoCases" | "workflows.issue.conditionTooManyCases" | "workflows.issue.caseBadId" | "workflows.issue.caseDuplicateId" | "workflows.issue.caseNoTests" | "workflows.issue.caseTooManyTests" | "workflows.issue.caseNoTarget" | "workflows.issue.testBadField" | "workflows.issue.testBadOperator" | "workflows.issue.testMissingValue" | "workflows.issue.fieldUnknown" | null;
47
+ failure: "workflows.region.label" | "workflows.header.title" | "workflows.common.cancel" | "workflows.common.close" | "workflows.common.dismiss" | "workflows.common.loading" | "workflows.empty.title" | "workflows.empty.hint" | "workflows.error.title" | "workflows.error.hint" | "workflows.error.retry" | "workflows.error.generic" | "workflows.error.network" | "workflows.error.timeout" | "workflows.error.server" | "workflows.error.sessionEnded" | "workflows.error.planRestricted" | "workflows.error.notFound" | "workflows.error.revisionChanged" | "workflows.error.archived" | "workflows.error.nothingToPublish" | "workflows.error.nothingToDiscard" | "workflows.error.wrongState" | "workflows.error.tooManyWorkflows" | "workflows.error.presetGone" | "workflows.error.presetCopyFailed" | "workflows.error.stillWorking" | "workflows.error.publishBlocked" | "workflows.error.invalidGraph" | "workflows.error.tooManyRequests" | "workflows.list.label" | "workflows.list.newWorkflow" | "workflows.list.searchLabel" | "workflows.list.searchPlaceholder" | "workflows.list.filterLabel" | "workflows.list.filterAll" | "workflows.list.statusLabel" | "workflows.list.sortLabel" | "workflows.list.sortCreated" | "workflows.list.sortPublished" | "workflows.list.sortRuns" | "workflows.list.sortName" | "workflows.list.sortAscending" | "workflows.list.sortDescending" | "workflows.list.compositionsCount" | "workflows.list.runsCount" | "workflows.list.publishedOn" | "workflows.list.neverPublished" | "workflows.list.open" | "workflows.list.rowMenu" | "workflows.list.showMore" | "workflows.list.noMatches" | "workflows.list.duplicated" | "workflows.list.deleted" | "workflows.list.editingNamed" | "workflows.list.editingSomeone" | "workflows.create.compositionPlaceholder" | "workflows.status.draft" | "workflows.status.live" | "workflows.status.paused" | "workflows.status.archived" | "workflows.status.unpublishedChanges" | "workflows.top.back" | "workflows.top.renameLabel" | "workflows.top.testRun" | "workflows.top.history" | "workflows.top.embedCode" | "workflows.top.publish" | "workflows.top.publishChanges" | "workflows.top.publishing" | "workflows.top.moreActions" | "workflows.save.saved" | "workflows.save.saving" | "workflows.save.pending" | "workflows.save.failed" | "workflows.save.conflict" | "workflows.tabs.label" | "workflows.tabs.editor" | "workflows.tabs.runs" | "workflows.tabs.settings" | "workflows.banner.unpublishedChanges" | "workflows.banner.discard" | "workflows.banner.discardTitle" | "workflows.banner.discardMessage" | "workflows.banner.neverPublished" | "workflows.banner.paused" | "workflows.banner.archived" | "workflows.banner.conflict" | "workflows.banner.reload" | "workflows.banner.touchOnly" | "workflows.conflict.keepCopy" | "workflows.conflict.keepingCopy" | "workflows.conflict.copyName" | "workflows.conflict.copyKept" | "workflows.conflict.openCopy" | "workflows.conflict.loadTitle" | "workflows.conflict.loadMessage" | "workflows.presence.blockedTitleNamed" | "workflows.presence.blockedTitleYou" | "workflows.presence.blockedTitle" | "workflows.presence.blockedBody" | "workflows.presence.lostTitleNamed" | "workflows.presence.lostTitleYou" | "workflows.presence.lostTitle" | "workflows.presence.lostBody" | "workflows.presence.takeOver" | "workflows.presence.takeOverHint" | "workflows.presence.lookOnly" | "workflows.presence.lookOnlyHint" | "workflows.presence.working" | "workflows.presence.actionFailed" | "workflows.presence.readOnlyNamed" | "workflows.presence.readOnlyYou" | "workflows.presence.readOnly" | "workflows.presence.readOnlyFree" | "workflows.presence.startEditing" | "workflows.editor.published" | "workflows.editor.discarded" | "workflows.editor.restored" | "workflows.editor.reloaded" | "workflows.editor.paused" | "workflows.editor.resumed" | "workflows.editor.archived" | "workflows.editor.unarchived" | "workflows.editor.saveFirst" | "workflows.editor.fixProblems" | "workflows.editor.blockLimit" | "workflows.publish.firstTitle" | "workflows.publish.firstMessage" | "workflows.publish.changesTitle" | "workflows.publish.changesMessage" | "workflows.leave.title" | "workflows.leave.message" | "workflows.leave.confirm" | "workflows.canvas.label" | "workflows.canvas.pointIn" | "workflows.canvas.pointOut" | "workflows.toolbar.label" | "workflows.toolbar.addBlock" | "workflows.toolbar.undo" | "workflows.toolbar.redo" | "workflows.toolbar.zoomIn" | "workflows.toolbar.zoomOut" | "workflows.toolbar.fit" | "workflows.toolbar.zoomLevel" | "workflows.block.publishedMeta" | "workflows.block.draftMeta" | "workflows.block.emptyCompositionHelp" | "workflows.block.conditionNoRulesBadge" | "workflows.addBlock.composition" | "workflows.addBlock.helpComposition" | "workflows.addBlock.condition" | "workflows.addBlock.helpCondition" | "workflows.addBlock.triggerHeading" | "workflows.addBlock.helpInput" | "workflows.addBlock.helpAction" | "workflows.addBlock.helpPageEvent" | "workflows.addBlock.helpScheduled" | "workflows.block.startsHere" | "workflows.block.trigger" | "workflows.block.condition" | "workflows.block.unknown" | "workflows.block.compositionNotChosen" | "workflows.block.compositionLoading" | "workflows.block.compositionUnavailable" | "workflows.block.notPublished" | "workflows.block.numbered" | "workflows.block.problems" | "workflows.panel.label" | "workflows.panel.close" | "workflows.panel.selectionHeading" | "workflows.panel.problemsHeading" | "workflows.panel.problemsLabel" | "workflows.panel.manyBlocksSelected" | "workflows.panel.connectionSelected" | "workflows.panel.removeBlock" | "workflows.panel.removeBlocks" | "workflows.panel.removeConnection" | "workflows.composition.heading" | "workflows.composition.label" | "workflows.composition.help" | "workflows.composition.searchLabel" | "workflows.composition.searchPlaceholder" | "workflows.composition.none" | "workflows.composition.alreadyUsed" | "workflows.composition.isStart" | "workflows.composition.makeStart" | "workflows.composition.capabilitiesHeading" | "workflows.composition.capabilityInput" | "workflows.composition.capabilityAction" | "workflows.composition.capabilityWebsites" | "workflows.composition.inputTables" | "workflows.composition.actionCount" | "workflows.trigger.heading" | "workflows.trigger.help" | "workflows.trigger.kindLabel" | "workflows.trigger.kindInput" | "workflows.trigger.kindAction" | "workflows.trigger.kindPageEvent" | "workflows.trigger.kindScheduled" | "workflows.trigger.unavailable" | "workflows.trigger.tableLabel" | "workflows.trigger.tableHelp" | "workflows.trigger.actionLabel" | "workflows.trigger.actionHelp" | "workflows.trigger.chooseOne" | "workflows.trigger.notFound" | "workflows.trigger.readableValues" | "workflows.trigger.noReadableValues" | "workflows.trigger.nextLabel" | "workflows.trigger.nextHelp" | "workflows.trigger.nextNone" | "workflows.trigger.summaryInput" | "workflows.trigger.summaryAction" | "workflows.trigger.summaryPageEvent" | "workflows.trigger.summaryAt" | "workflows.trigger.summaryUnfinished" | "workflows.reason.widgetKeepsNoData" | "workflows.reason.widgetReportsNoActions" | "workflows.reason.widgetNotPublished" | "workflows.schedule.modeLabel" | "workflows.schedule.modeAfter" | "workflows.schedule.modeAt" | "workflows.schedule.afterHelp" | "workflows.schedule.amountLabel" | "workflows.schedule.unitLabel" | "workflows.schedule.unitSeconds" | "workflows.schedule.unitMinutes" | "workflows.schedule.unitHours" | "workflows.schedule.unitDays" | "workflows.schedule.unitWeeks" | "workflows.schedule.waitSeconds" | "workflows.schedule.waitMinutes" | "workflows.schedule.waitHours" | "workflows.schedule.waitDays" | "workflows.schedule.waitWeeks" | "workflows.schedule.momentLabel" | "workflows.schedule.momentHelp" | "workflows.schedule.invalidMoment" | "workflows.event.nameLabel" | "workflows.event.namePlaceholder" | "workflows.event.nameHelp" | "workflows.event.nameInvalid" | "workflows.event.howToSend" | "workflows.event.valuesHeading" | "workflows.event.valuesHelp" | "workflows.event.addValue" | "workflows.event.valueName" | "workflows.event.valueNamePlaceholder" | "workflows.event.valueNameInvalid" | "workflows.event.valueType" | "workflows.event.removeValue" | "workflows.fieldType.text" | "workflows.fieldType.number" | "workflows.fieldType.boolean" | "workflows.value.yes" | "workflows.value.no" | "workflows.condition.heading" | "workflows.condition.help" | "workflows.condition.noTrigger" | "workflows.condition.noValues" | "workflows.condition.addRule" | "workflows.condition.ruleLimit" | "workflows.condition.defaultName" | "workflows.condition.defaultLabel" | "workflows.condition.defaultStay" | "workflows.condition.defaultHelp" | "workflows.condition.defaultHint" | "workflows.condition.defaultStays" | "workflows.rule.defaultName" | "workflows.rule.nameLabel" | "workflows.rule.moveUp" | "workflows.rule.moveDown" | "workflows.rule.remove" | "workflows.rule.matchLabel" | "workflows.rule.matchAll" | "workflows.rule.matchAny" | "workflows.rule.noTests" | "workflows.rule.addTest" | "workflows.rule.testLimit" | "workflows.rule.thenGoTo" | "workflows.rule.expand" | "workflows.rule.collapse" | "workflows.rule.testWithValue" | "workflows.rule.testWithoutValue" | "workflows.rule.testAndMore" | "workflows.test.field" | "workflows.test.operator" | "workflows.test.value" | "workflows.test.valuePlaceholder" | "workflows.test.remove" | "workflows.operator.is" | "workflows.operator.isNot" | "workflows.operator.contains" | "workflows.operator.doesNotContain" | "workflows.operator.startsWith" | "workflows.operator.endsWith" | "workflows.operator.greaterThan" | "workflows.operator.atLeast" | "workflows.operator.lessThan" | "workflows.operator.atMost" | "workflows.operator.isEmpty" | "workflows.operator.isNotEmpty" | "workflows.test.heading" | "workflows.test.help" | "workflows.test.close" | "workflows.test.start" | "workflows.test.restart" | "workflows.test.ended" | "workflows.test.noStart" | "workflows.test.noTriggers" | "workflows.test.visitorIsOn" | "workflows.test.fire" | "workflows.test.resultMoved" | "workflows.test.resultStayed" | "workflows.test.resultIgnored" | "workflows.history.heading" | "workflows.history.help" | "workflows.history.close" | "workflows.history.none" | "workflows.history.failed" | "workflows.history.draft" | "workflows.history.draftMeta" | "workflows.history.version" | "workflows.history.live" | "workflows.history.byOn" | "workflows.history.view" | "workflows.history.viewingShort" | "workflows.history.viewing" | "workflows.history.backToDraft" | "workflows.history.restore" | "workflows.history.restoreConfirm" | "workflows.history.restoreTitle" | "workflows.history.restoreMessage" | "workflows.runs.help" | "workflows.runs.flowLabel" | "workflows.runs.rangeLabel" | "workflows.runs.lastDays" | "workflows.runs.versionLabel" | "workflows.runs.allVersions" | "workflows.runs.versionLive" | "workflows.runs.started" | "workflows.runs.entered" | "workflows.runs.stayed" | "workflows.runs.failed" | "workflows.runs.chartStayed" | "workflows.runs.chartFailed" | "workflows.runs.failedTimeout" | "workflows.runs.failedWidgetError" | "workflows.runs.failedBuild" | "workflows.runs.failedOther" | "workflows.runs.failedUnrecorded" | "workflows.runs.pathLabel" | "workflows.runs.none" | "workflows.runs.neverPublished" | "workflows.settings.zoneLabel" | "workflows.settings.zoneHelp" | "workflows.settings.embedHeading" | "workflows.settings.embedHelp" | "workflows.settings.stateHeading" | "workflows.settings.pause" | "workflows.settings.pauseHelp" | "workflows.settings.resume" | "workflows.settings.resumeHelp" | "workflows.settings.archive" | "workflows.settings.archiveHelp" | "workflows.settings.archiveTitle" | "workflows.settings.archiveMessage" | "workflows.settings.unarchive" | "workflows.settings.unarchiveHelp" | "workflows.settings.duplicate" | "workflows.settings.duplicateHelp" | "workflows.settings.delete" | "workflows.settings.deleteHelp" | "workflows.settings.deleteTitle" | "workflows.settings.deleteMessageDraft" | "workflows.settings.deleteMessageLive" | "workflows.settings.deleteMessagePaused" | "workflows.settings.deleteMessageArchived" | "workflows.issue.unknown" | "workflows.issue.malformed" | "workflows.issue.schemaVersion" | "workflows.issue.graphTooLarge" | "workflows.issue.unknownNodeType" | "workflows.issue.unknownTriggerKind" | "workflows.issue.badId" | "workflows.issue.duplicateId" | "workflows.issue.tooManyBlocks" | "workflows.issue.tooManyEdges" | "workflows.issue.noComposition" | "workflows.issue.noStart" | "workflows.issue.manyStarts" | "workflows.issue.compositionMissingId" | "workflows.issue.duplicateComposition" | "workflows.issue.compositionNotAvailable" | "workflows.issue.compositionWebsiteMismatch" | "workflows.issue.unreachableBlock" | "workflows.issue.edgeUnknownNode" | "workflows.issue.edgeBadPort" | "workflows.issue.edgeInvalidConnection" | "workflows.issue.portManyTargets" | "workflows.issue.cycle" | "workflows.issue.triggerNoSource" | "workflows.issue.triggerManySources" | "workflows.issue.triggerNoTarget" | "workflows.issue.triggerConfigIncomplete" | "workflows.issue.triggerNeedsTable" | "workflows.issue.triggerNeedsAction" | "workflows.issue.triggerNeedsName" | "workflows.issue.scheduleInvalid" | "workflows.issue.eventValueInvalid" | "workflows.issue.eventTooManyValues" | "workflows.issue.triggerCapabilityMissing" | "workflows.issue.triggerInputMissing" | "workflows.issue.triggerActionMissing" | "workflows.issue.conditionNoSource" | "workflows.issue.conditionManySources" | "workflows.issue.conditionNoCases" | "workflows.issue.conditionTooManyCases" | "workflows.issue.caseBadId" | "workflows.issue.caseDuplicateId" | "workflows.issue.caseNoTests" | "workflows.issue.caseTooManyTests" | "workflows.issue.caseNoTarget" | "workflows.issue.testBadField" | "workflows.issue.testBadOperator" | "workflows.issue.testMissingValue" | "workflows.issue.fieldUnknown" | null;
55
48
  search: string;
56
- statusFilter: ListStatusFilter;
57
- /**
58
- * The tab that is open. It is kept here and not worked out from `statusFilter`: once one state is chosen in the Status menu
59
- * the filter no longer says which tab it was chosen under, and the tab must not move by itself.
60
- */
61
- scope: ListScope;
49
+ /** The status tab that is open (`all` = the API’s default list, not archived). */
50
+ tab: ListTab;
62
51
  sortField: WorkflowSortField;
63
52
  sortDirection: SortDirection;
64
53
  /** Workflows something is being done to (a duplicate on its way, a state change). */
@@ -73,8 +62,6 @@ export declare class WorkflowListState {
73
62
  hasMore: boolean;
74
63
  /** Whether the person asked for anything that narrows the list (so "nothing" means "nothing matches", not "nothing yet"). */
75
64
  isNarrowed: boolean;
76
- /** What the Status menu shows: the one state the list is narrowed to, or `any` when the tab alone decides. */
77
- statusChoice: ListStatusChoice;
78
65
  /**
79
66
  * The presets "New workflow" offers, as the API gave them the last time they were read (none until then, and none when
80
67
  * the workspace is offered none: the dialog then has only the blank start, as it always had).
@@ -124,30 +111,31 @@ export declare class WorkflowListState {
124
111
  /** The person typed in the search: ask again once they stop. */
125
112
  setSearch(text: string): void;
126
113
  /**
127
- * Narrows the list by state and reads it again. The tab follows what is asked: "all" and "archived" (which only the whole
128
- * list holds) are the second tab, empty is the first, and one of the other states leaves the tab where it was.
114
+ * A tab was chosen. `all` asks for the API’s default (not archived); each state asks for that state only. What a control
115
+ * reports is plain text, so a value the list does not offer is said once and changes nothing.
129
116
  */
130
- setStatusFilter(filter: ListStatusFilter): void;
131
- /** A tab was chosen: the list covers what the tab says, and the Status menu goes back to Any. */
132
- chooseScope(scope: ListScope): void;
133
- /**
134
- * A line of the Status menu was chosen. A state narrows the list to it (Archived also opens the second tab, where the
135
- * archived workflows are), and Any gives the list back to the tab that is open. What a select reports is plain text, so
136
- * a line the menu does not have is said once and changes nothing.
137
- */
138
- chooseStatus(choice: string): void;
117
+ chooseTab(choice: string): void;
139
118
  setSort(field: WorkflowSortField): void;
140
119
  toggleSortDirection(): void;
141
120
  private setBusy;
142
121
  private runFor;
143
- /** Makes a workflow (the dialog asked). Resolves to it, or to `undefined` with the reason in `createFailure`. */
144
- createFailure: "workflows.region.label" | "workflows.header.title" | "workflows.common.cancel" | "workflows.common.close" | "workflows.common.dismiss" | "workflows.common.loading" | "workflows.empty.title" | "workflows.empty.hint" | "workflows.error.title" | "workflows.error.hint" | "workflows.error.retry" | "workflows.error.generic" | "workflows.error.network" | "workflows.error.timeout" | "workflows.error.server" | "workflows.error.sessionEnded" | "workflows.error.planRestricted" | "workflows.error.notFound" | "workflows.error.revisionChanged" | "workflows.error.archived" | "workflows.error.nothingToPublish" | "workflows.error.nothingToDiscard" | "workflows.error.wrongState" | "workflows.error.tooManyWorkflows" | "workflows.error.presetGone" | "workflows.error.presetCopyFailed" | "workflows.error.stillWorking" | "workflows.error.publishBlocked" | "workflows.error.invalidGraph" | "workflows.error.tooManyRequests" | "workflows.list.label" | "workflows.list.newWorkflow" | "workflows.list.searchLabel" | "workflows.list.searchPlaceholder" | "workflows.list.filterLabel" | "workflows.list.filterActive" | "workflows.list.filterAll" | "workflows.list.statusLabel" | "workflows.list.statusAny" | "workflows.list.sortLabel" | "workflows.list.sortCreated" | "workflows.list.sortPublished" | "workflows.list.sortRuns" | "workflows.list.sortName" | "workflows.list.sortAscending" | "workflows.list.sortDescending" | "workflows.list.compositionsCount" | "workflows.list.runsCount" | "workflows.list.publishedOn" | "workflows.list.neverPublished" | "workflows.list.open" | "workflows.list.rowMenu" | "workflows.list.showMore" | "workflows.list.noMatches" | "workflows.list.duplicated" | "workflows.list.deleted" | "workflows.list.editingNamed" | "workflows.list.editingSomeone" | "workflows.create.title" | "workflows.create.nameLabel" | "workflows.create.namePlaceholder" | "workflows.create.compositionLabel" | "workflows.create.compositionHelp" | "workflows.create.compositionPlaceholder" | "workflows.create.create" | "workflows.create.creating" | "workflows.create.startLabel" | "workflows.create.blankTitle" | "workflows.create.blankHint" | "workflows.create.presetSummary" | "workflows.create.presetMorePictures" | "workflows.create.presetsLoading" | "workflows.create.presetsFailed" | "workflows.create.presetHelp" | "workflows.create.presetNameHelp" | "workflows.create.settingUp" | "workflows.status.draft" | "workflows.status.live" | "workflows.status.paused" | "workflows.status.archived" | "workflows.status.unpublishedChanges" | "workflows.top.back" | "workflows.top.nameLabel" | "workflows.top.testRun" | "workflows.top.history" | "workflows.top.embedCode" | "workflows.top.publish" | "workflows.top.publishChanges" | "workflows.top.publishing" | "workflows.top.moreActions" | "workflows.save.saved" | "workflows.save.saving" | "workflows.save.pending" | "workflows.save.failed" | "workflows.save.conflict" | "workflows.tabs.label" | "workflows.tabs.editor" | "workflows.tabs.runs" | "workflows.tabs.settings" | "workflows.banner.unpublishedChanges" | "workflows.banner.discard" | "workflows.banner.discardTitle" | "workflows.banner.discardMessage" | "workflows.banner.neverPublished" | "workflows.banner.paused" | "workflows.banner.archived" | "workflows.banner.conflict" | "workflows.banner.reload" | "workflows.banner.touchOnly" | "workflows.conflict.keepCopy" | "workflows.conflict.keepingCopy" | "workflows.conflict.copyName" | "workflows.conflict.copyKept" | "workflows.conflict.openCopy" | "workflows.conflict.loadTitle" | "workflows.conflict.loadMessage" | "workflows.presence.blockedTitleNamed" | "workflows.presence.blockedTitleYou" | "workflows.presence.blockedTitle" | "workflows.presence.blockedBody" | "workflows.presence.lostTitleNamed" | "workflows.presence.lostTitleYou" | "workflows.presence.lostTitle" | "workflows.presence.lostBody" | "workflows.presence.takeOver" | "workflows.presence.takeOverHint" | "workflows.presence.lookOnly" | "workflows.presence.lookOnlyHint" | "workflows.presence.working" | "workflows.presence.actionFailed" | "workflows.presence.readOnlyNamed" | "workflows.presence.readOnlyYou" | "workflows.presence.readOnly" | "workflows.presence.readOnlyFree" | "workflows.presence.startEditing" | "workflows.editor.published" | "workflows.editor.discarded" | "workflows.editor.restored" | "workflows.editor.reloaded" | "workflows.editor.paused" | "workflows.editor.resumed" | "workflows.editor.archived" | "workflows.editor.unarchived" | "workflows.editor.saveFirst" | "workflows.editor.fixProblems" | "workflows.editor.blockLimit" | "workflows.publish.firstTitle" | "workflows.publish.firstMessage" | "workflows.publish.changesTitle" | "workflows.publish.changesMessage" | "workflows.leave.title" | "workflows.leave.message" | "workflows.leave.confirm" | "workflows.canvas.label" | "workflows.canvas.pointIn" | "workflows.canvas.pointOut" | "workflows.toolbar.label" | "workflows.toolbar.addBlock" | "workflows.toolbar.undo" | "workflows.toolbar.redo" | "workflows.toolbar.zoomIn" | "workflows.toolbar.zoomOut" | "workflows.toolbar.fit" | "workflows.toolbar.zoomLevel" | "workflows.block.publishedMeta" | "workflows.block.draftMeta" | "workflows.block.emptyCompositionHelp" | "workflows.block.conditionNoRulesBadge" | "workflows.addBlock.composition" | "workflows.addBlock.helpComposition" | "workflows.addBlock.condition" | "workflows.addBlock.helpCondition" | "workflows.addBlock.triggerHeading" | "workflows.addBlock.helpInput" | "workflows.addBlock.helpAction" | "workflows.addBlock.helpPageEvent" | "workflows.addBlock.helpScheduled" | "workflows.block.startsHere" | "workflows.block.trigger" | "workflows.block.condition" | "workflows.block.unknown" | "workflows.block.compositionNotChosen" | "workflows.block.compositionLoading" | "workflows.block.compositionUnavailable" | "workflows.block.notPublished" | "workflows.block.numbered" | "workflows.block.problems" | "workflows.panel.label" | "workflows.panel.close" | "workflows.panel.selectionHeading" | "workflows.panel.problemsHeading" | "workflows.panel.problemsLabel" | "workflows.panel.manyBlocksSelected" | "workflows.panel.connectionSelected" | "workflows.panel.removeBlock" | "workflows.panel.removeBlocks" | "workflows.panel.removeConnection" | "workflows.composition.heading" | "workflows.composition.label" | "workflows.composition.help" | "workflows.composition.searchLabel" | "workflows.composition.searchPlaceholder" | "workflows.composition.none" | "workflows.composition.alreadyUsed" | "workflows.composition.isStart" | "workflows.composition.makeStart" | "workflows.composition.capabilitiesHeading" | "workflows.composition.capabilityInput" | "workflows.composition.capabilityAction" | "workflows.composition.capabilityWebsites" | "workflows.composition.inputTables" | "workflows.composition.actionCount" | "workflows.trigger.heading" | "workflows.trigger.help" | "workflows.trigger.kindLabel" | "workflows.trigger.kindInput" | "workflows.trigger.kindAction" | "workflows.trigger.kindPageEvent" | "workflows.trigger.kindScheduled" | "workflows.trigger.unavailable" | "workflows.trigger.tableLabel" | "workflows.trigger.tableHelp" | "workflows.trigger.actionLabel" | "workflows.trigger.actionHelp" | "workflows.trigger.chooseOne" | "workflows.trigger.notFound" | "workflows.trigger.readableValues" | "workflows.trigger.noReadableValues" | "workflows.trigger.nextLabel" | "workflows.trigger.nextHelp" | "workflows.trigger.nextNone" | "workflows.trigger.summaryInput" | "workflows.trigger.summaryAction" | "workflows.trigger.summaryPageEvent" | "workflows.trigger.summaryAt" | "workflows.trigger.summaryUnfinished" | "workflows.reason.widgetKeepsNoData" | "workflows.reason.widgetReportsNoActions" | "workflows.reason.widgetNotPublished" | "workflows.schedule.modeLabel" | "workflows.schedule.modeAfter" | "workflows.schedule.modeAt" | "workflows.schedule.afterHelp" | "workflows.schedule.amountLabel" | "workflows.schedule.unitLabel" | "workflows.schedule.unitSeconds" | "workflows.schedule.unitMinutes" | "workflows.schedule.unitHours" | "workflows.schedule.unitDays" | "workflows.schedule.unitWeeks" | "workflows.schedule.waitSeconds" | "workflows.schedule.waitMinutes" | "workflows.schedule.waitHours" | "workflows.schedule.waitDays" | "workflows.schedule.waitWeeks" | "workflows.schedule.momentLabel" | "workflows.schedule.momentHelp" | "workflows.schedule.invalidMoment" | "workflows.event.nameLabel" | "workflows.event.namePlaceholder" | "workflows.event.nameHelp" | "workflows.event.nameInvalid" | "workflows.event.howToSend" | "workflows.event.valuesHeading" | "workflows.event.valuesHelp" | "workflows.event.addValue" | "workflows.event.valueName" | "workflows.event.valueNamePlaceholder" | "workflows.event.valueNameInvalid" | "workflows.event.valueType" | "workflows.event.removeValue" | "workflows.fieldType.text" | "workflows.fieldType.number" | "workflows.fieldType.boolean" | "workflows.value.yes" | "workflows.value.no" | "workflows.condition.heading" | "workflows.condition.help" | "workflows.condition.noTrigger" | "workflows.condition.noValues" | "workflows.condition.addRule" | "workflows.condition.ruleLimit" | "workflows.condition.defaultName" | "workflows.condition.defaultLabel" | "workflows.condition.defaultStay" | "workflows.condition.defaultHelp" | "workflows.condition.defaultHint" | "workflows.condition.defaultStays" | "workflows.rule.defaultName" | "workflows.rule.nameLabel" | "workflows.rule.moveUp" | "workflows.rule.moveDown" | "workflows.rule.remove" | "workflows.rule.matchLabel" | "workflows.rule.matchAll" | "workflows.rule.matchAny" | "workflows.rule.noTests" | "workflows.rule.addTest" | "workflows.rule.testLimit" | "workflows.rule.thenGoTo" | "workflows.rule.expand" | "workflows.rule.collapse" | "workflows.rule.testWithValue" | "workflows.rule.testWithoutValue" | "workflows.rule.testAndMore" | "workflows.test.field" | "workflows.test.operator" | "workflows.test.value" | "workflows.test.valuePlaceholder" | "workflows.test.remove" | "workflows.operator.is" | "workflows.operator.isNot" | "workflows.operator.contains" | "workflows.operator.doesNotContain" | "workflows.operator.startsWith" | "workflows.operator.endsWith" | "workflows.operator.greaterThan" | "workflows.operator.atLeast" | "workflows.operator.lessThan" | "workflows.operator.atMost" | "workflows.operator.isEmpty" | "workflows.operator.isNotEmpty" | "workflows.test.heading" | "workflows.test.help" | "workflows.test.close" | "workflows.test.start" | "workflows.test.restart" | "workflows.test.ended" | "workflows.test.noStart" | "workflows.test.noTriggers" | "workflows.test.visitorIsOn" | "workflows.test.fire" | "workflows.test.resultMoved" | "workflows.test.resultStayed" | "workflows.test.resultIgnored" | "workflows.history.heading" | "workflows.history.help" | "workflows.history.close" | "workflows.history.none" | "workflows.history.failed" | "workflows.history.draft" | "workflows.history.draftMeta" | "workflows.history.version" | "workflows.history.live" | "workflows.history.byOn" | "workflows.history.view" | "workflows.history.viewingShort" | "workflows.history.viewing" | "workflows.history.backToDraft" | "workflows.history.restore" | "workflows.history.restoreConfirm" | "workflows.history.restoreTitle" | "workflows.history.restoreMessage" | "workflows.runs.help" | "workflows.runs.flowLabel" | "workflows.runs.rangeLabel" | "workflows.runs.lastDays" | "workflows.runs.versionLabel" | "workflows.runs.allVersions" | "workflows.runs.versionLive" | "workflows.runs.started" | "workflows.runs.entered" | "workflows.runs.stayed" | "workflows.runs.failed" | "workflows.runs.failedTimeout" | "workflows.runs.failedWidgetError" | "workflows.runs.failedBuild" | "workflows.runs.failedOther" | "workflows.runs.failedUnrecorded" | "workflows.runs.pathLabel" | "workflows.runs.none" | "workflows.runs.neverPublished" | "workflows.settings.zoneLabel" | "workflows.settings.zoneHelp" | "workflows.settings.embedHeading" | "workflows.settings.embedHelp" | "workflows.settings.stateHeading" | "workflows.settings.pause" | "workflows.settings.pauseHelp" | "workflows.settings.resume" | "workflows.settings.resumeHelp" | "workflows.settings.archive" | "workflows.settings.archiveHelp" | "workflows.settings.archiveTitle" | "workflows.settings.archiveMessage" | "workflows.settings.unarchive" | "workflows.settings.unarchiveHelp" | "workflows.settings.duplicate" | "workflows.settings.duplicateHelp" | "workflows.settings.delete" | "workflows.settings.deleteHelp" | "workflows.settings.deleteTitle" | "workflows.settings.deleteMessageDraft" | "workflows.settings.deleteMessageLive" | "workflows.settings.deleteMessagePaused" | "workflows.settings.deleteMessageArchived" | "workflows.issue.unknown" | "workflows.issue.malformed" | "workflows.issue.schemaVersion" | "workflows.issue.graphTooLarge" | "workflows.issue.unknownNodeType" | "workflows.issue.unknownTriggerKind" | "workflows.issue.badId" | "workflows.issue.duplicateId" | "workflows.issue.tooManyBlocks" | "workflows.issue.tooManyEdges" | "workflows.issue.noComposition" | "workflows.issue.noStart" | "workflows.issue.manyStarts" | "workflows.issue.compositionMissingId" | "workflows.issue.duplicateComposition" | "workflows.issue.compositionNotAvailable" | "workflows.issue.compositionWebsiteMismatch" | "workflows.issue.unreachableBlock" | "workflows.issue.edgeUnknownNode" | "workflows.issue.edgeBadPort" | "workflows.issue.edgeInvalidConnection" | "workflows.issue.portManyTargets" | "workflows.issue.cycle" | "workflows.issue.triggerNoSource" | "workflows.issue.triggerManySources" | "workflows.issue.triggerNoTarget" | "workflows.issue.triggerConfigIncomplete" | "workflows.issue.triggerNeedsTable" | "workflows.issue.triggerNeedsAction" | "workflows.issue.triggerNeedsName" | "workflows.issue.scheduleInvalid" | "workflows.issue.eventValueInvalid" | "workflows.issue.eventTooManyValues" | "workflows.issue.triggerCapabilityMissing" | "workflows.issue.triggerInputMissing" | "workflows.issue.triggerActionMissing" | "workflows.issue.conditionNoSource" | "workflows.issue.conditionManySources" | "workflows.issue.conditionNoCases" | "workflows.issue.conditionTooManyCases" | "workflows.issue.caseBadId" | "workflows.issue.caseDuplicateId" | "workflows.issue.caseNoTests" | "workflows.issue.caseTooManyTests" | "workflows.issue.caseNoTarget" | "workflows.issue.testBadField" | "workflows.issue.testBadOperator" | "workflows.issue.testMissingValue" | "workflows.issue.fieldUnknown" | null;
122
+ /** The last refusal to make a workflow (shown on the list when "New workflow" fails). */
123
+ createFailure: "workflows.region.label" | "workflows.header.title" | "workflows.common.cancel" | "workflows.common.close" | "workflows.common.dismiss" | "workflows.common.loading" | "workflows.empty.title" | "workflows.empty.hint" | "workflows.error.title" | "workflows.error.hint" | "workflows.error.retry" | "workflows.error.generic" | "workflows.error.network" | "workflows.error.timeout" | "workflows.error.server" | "workflows.error.sessionEnded" | "workflows.error.planRestricted" | "workflows.error.notFound" | "workflows.error.revisionChanged" | "workflows.error.archived" | "workflows.error.nothingToPublish" | "workflows.error.nothingToDiscard" | "workflows.error.wrongState" | "workflows.error.tooManyWorkflows" | "workflows.error.presetGone" | "workflows.error.presetCopyFailed" | "workflows.error.stillWorking" | "workflows.error.publishBlocked" | "workflows.error.invalidGraph" | "workflows.error.tooManyRequests" | "workflows.list.label" | "workflows.list.newWorkflow" | "workflows.list.searchLabel" | "workflows.list.searchPlaceholder" | "workflows.list.filterLabel" | "workflows.list.filterAll" | "workflows.list.statusLabel" | "workflows.list.sortLabel" | "workflows.list.sortCreated" | "workflows.list.sortPublished" | "workflows.list.sortRuns" | "workflows.list.sortName" | "workflows.list.sortAscending" | "workflows.list.sortDescending" | "workflows.list.compositionsCount" | "workflows.list.runsCount" | "workflows.list.publishedOn" | "workflows.list.neverPublished" | "workflows.list.open" | "workflows.list.rowMenu" | "workflows.list.showMore" | "workflows.list.noMatches" | "workflows.list.duplicated" | "workflows.list.deleted" | "workflows.list.editingNamed" | "workflows.list.editingSomeone" | "workflows.create.compositionPlaceholder" | "workflows.status.draft" | "workflows.status.live" | "workflows.status.paused" | "workflows.status.archived" | "workflows.status.unpublishedChanges" | "workflows.top.back" | "workflows.top.renameLabel" | "workflows.top.testRun" | "workflows.top.history" | "workflows.top.embedCode" | "workflows.top.publish" | "workflows.top.publishChanges" | "workflows.top.publishing" | "workflows.top.moreActions" | "workflows.save.saved" | "workflows.save.saving" | "workflows.save.pending" | "workflows.save.failed" | "workflows.save.conflict" | "workflows.tabs.label" | "workflows.tabs.editor" | "workflows.tabs.runs" | "workflows.tabs.settings" | "workflows.banner.unpublishedChanges" | "workflows.banner.discard" | "workflows.banner.discardTitle" | "workflows.banner.discardMessage" | "workflows.banner.neverPublished" | "workflows.banner.paused" | "workflows.banner.archived" | "workflows.banner.conflict" | "workflows.banner.reload" | "workflows.banner.touchOnly" | "workflows.conflict.keepCopy" | "workflows.conflict.keepingCopy" | "workflows.conflict.copyName" | "workflows.conflict.copyKept" | "workflows.conflict.openCopy" | "workflows.conflict.loadTitle" | "workflows.conflict.loadMessage" | "workflows.presence.blockedTitleNamed" | "workflows.presence.blockedTitleYou" | "workflows.presence.blockedTitle" | "workflows.presence.blockedBody" | "workflows.presence.lostTitleNamed" | "workflows.presence.lostTitleYou" | "workflows.presence.lostTitle" | "workflows.presence.lostBody" | "workflows.presence.takeOver" | "workflows.presence.takeOverHint" | "workflows.presence.lookOnly" | "workflows.presence.lookOnlyHint" | "workflows.presence.working" | "workflows.presence.actionFailed" | "workflows.presence.readOnlyNamed" | "workflows.presence.readOnlyYou" | "workflows.presence.readOnly" | "workflows.presence.readOnlyFree" | "workflows.presence.startEditing" | "workflows.editor.published" | "workflows.editor.discarded" | "workflows.editor.restored" | "workflows.editor.reloaded" | "workflows.editor.paused" | "workflows.editor.resumed" | "workflows.editor.archived" | "workflows.editor.unarchived" | "workflows.editor.saveFirst" | "workflows.editor.fixProblems" | "workflows.editor.blockLimit" | "workflows.publish.firstTitle" | "workflows.publish.firstMessage" | "workflows.publish.changesTitle" | "workflows.publish.changesMessage" | "workflows.leave.title" | "workflows.leave.message" | "workflows.leave.confirm" | "workflows.canvas.label" | "workflows.canvas.pointIn" | "workflows.canvas.pointOut" | "workflows.toolbar.label" | "workflows.toolbar.addBlock" | "workflows.toolbar.undo" | "workflows.toolbar.redo" | "workflows.toolbar.zoomIn" | "workflows.toolbar.zoomOut" | "workflows.toolbar.fit" | "workflows.toolbar.zoomLevel" | "workflows.block.publishedMeta" | "workflows.block.draftMeta" | "workflows.block.emptyCompositionHelp" | "workflows.block.conditionNoRulesBadge" | "workflows.addBlock.composition" | "workflows.addBlock.helpComposition" | "workflows.addBlock.condition" | "workflows.addBlock.helpCondition" | "workflows.addBlock.triggerHeading" | "workflows.addBlock.helpInput" | "workflows.addBlock.helpAction" | "workflows.addBlock.helpPageEvent" | "workflows.addBlock.helpScheduled" | "workflows.block.startsHere" | "workflows.block.trigger" | "workflows.block.condition" | "workflows.block.unknown" | "workflows.block.compositionNotChosen" | "workflows.block.compositionLoading" | "workflows.block.compositionUnavailable" | "workflows.block.notPublished" | "workflows.block.numbered" | "workflows.block.problems" | "workflows.panel.label" | "workflows.panel.close" | "workflows.panel.selectionHeading" | "workflows.panel.problemsHeading" | "workflows.panel.problemsLabel" | "workflows.panel.manyBlocksSelected" | "workflows.panel.connectionSelected" | "workflows.panel.removeBlock" | "workflows.panel.removeBlocks" | "workflows.panel.removeConnection" | "workflows.composition.heading" | "workflows.composition.label" | "workflows.composition.help" | "workflows.composition.searchLabel" | "workflows.composition.searchPlaceholder" | "workflows.composition.none" | "workflows.composition.alreadyUsed" | "workflows.composition.isStart" | "workflows.composition.makeStart" | "workflows.composition.capabilitiesHeading" | "workflows.composition.capabilityInput" | "workflows.composition.capabilityAction" | "workflows.composition.capabilityWebsites" | "workflows.composition.inputTables" | "workflows.composition.actionCount" | "workflows.trigger.heading" | "workflows.trigger.help" | "workflows.trigger.kindLabel" | "workflows.trigger.kindInput" | "workflows.trigger.kindAction" | "workflows.trigger.kindPageEvent" | "workflows.trigger.kindScheduled" | "workflows.trigger.unavailable" | "workflows.trigger.tableLabel" | "workflows.trigger.tableHelp" | "workflows.trigger.actionLabel" | "workflows.trigger.actionHelp" | "workflows.trigger.chooseOne" | "workflows.trigger.notFound" | "workflows.trigger.readableValues" | "workflows.trigger.noReadableValues" | "workflows.trigger.nextLabel" | "workflows.trigger.nextHelp" | "workflows.trigger.nextNone" | "workflows.trigger.summaryInput" | "workflows.trigger.summaryAction" | "workflows.trigger.summaryPageEvent" | "workflows.trigger.summaryAt" | "workflows.trigger.summaryUnfinished" | "workflows.reason.widgetKeepsNoData" | "workflows.reason.widgetReportsNoActions" | "workflows.reason.widgetNotPublished" | "workflows.schedule.modeLabel" | "workflows.schedule.modeAfter" | "workflows.schedule.modeAt" | "workflows.schedule.afterHelp" | "workflows.schedule.amountLabel" | "workflows.schedule.unitLabel" | "workflows.schedule.unitSeconds" | "workflows.schedule.unitMinutes" | "workflows.schedule.unitHours" | "workflows.schedule.unitDays" | "workflows.schedule.unitWeeks" | "workflows.schedule.waitSeconds" | "workflows.schedule.waitMinutes" | "workflows.schedule.waitHours" | "workflows.schedule.waitDays" | "workflows.schedule.waitWeeks" | "workflows.schedule.momentLabel" | "workflows.schedule.momentHelp" | "workflows.schedule.invalidMoment" | "workflows.event.nameLabel" | "workflows.event.namePlaceholder" | "workflows.event.nameHelp" | "workflows.event.nameInvalid" | "workflows.event.howToSend" | "workflows.event.valuesHeading" | "workflows.event.valuesHelp" | "workflows.event.addValue" | "workflows.event.valueName" | "workflows.event.valueNamePlaceholder" | "workflows.event.valueNameInvalid" | "workflows.event.valueType" | "workflows.event.removeValue" | "workflows.fieldType.text" | "workflows.fieldType.number" | "workflows.fieldType.boolean" | "workflows.value.yes" | "workflows.value.no" | "workflows.condition.heading" | "workflows.condition.help" | "workflows.condition.noTrigger" | "workflows.condition.noValues" | "workflows.condition.addRule" | "workflows.condition.ruleLimit" | "workflows.condition.defaultName" | "workflows.condition.defaultLabel" | "workflows.condition.defaultStay" | "workflows.condition.defaultHelp" | "workflows.condition.defaultHint" | "workflows.condition.defaultStays" | "workflows.rule.defaultName" | "workflows.rule.nameLabel" | "workflows.rule.moveUp" | "workflows.rule.moveDown" | "workflows.rule.remove" | "workflows.rule.matchLabel" | "workflows.rule.matchAll" | "workflows.rule.matchAny" | "workflows.rule.noTests" | "workflows.rule.addTest" | "workflows.rule.testLimit" | "workflows.rule.thenGoTo" | "workflows.rule.expand" | "workflows.rule.collapse" | "workflows.rule.testWithValue" | "workflows.rule.testWithoutValue" | "workflows.rule.testAndMore" | "workflows.test.field" | "workflows.test.operator" | "workflows.test.value" | "workflows.test.valuePlaceholder" | "workflows.test.remove" | "workflows.operator.is" | "workflows.operator.isNot" | "workflows.operator.contains" | "workflows.operator.doesNotContain" | "workflows.operator.startsWith" | "workflows.operator.endsWith" | "workflows.operator.greaterThan" | "workflows.operator.atLeast" | "workflows.operator.lessThan" | "workflows.operator.atMost" | "workflows.operator.isEmpty" | "workflows.operator.isNotEmpty" | "workflows.test.heading" | "workflows.test.help" | "workflows.test.close" | "workflows.test.start" | "workflows.test.restart" | "workflows.test.ended" | "workflows.test.noStart" | "workflows.test.noTriggers" | "workflows.test.visitorIsOn" | "workflows.test.fire" | "workflows.test.resultMoved" | "workflows.test.resultStayed" | "workflows.test.resultIgnored" | "workflows.history.heading" | "workflows.history.help" | "workflows.history.close" | "workflows.history.none" | "workflows.history.failed" | "workflows.history.draft" | "workflows.history.draftMeta" | "workflows.history.version" | "workflows.history.live" | "workflows.history.byOn" | "workflows.history.view" | "workflows.history.viewingShort" | "workflows.history.viewing" | "workflows.history.backToDraft" | "workflows.history.restore" | "workflows.history.restoreConfirm" | "workflows.history.restoreTitle" | "workflows.history.restoreMessage" | "workflows.runs.help" | "workflows.runs.flowLabel" | "workflows.runs.rangeLabel" | "workflows.runs.lastDays" | "workflows.runs.versionLabel" | "workflows.runs.allVersions" | "workflows.runs.versionLive" | "workflows.runs.started" | "workflows.runs.entered" | "workflows.runs.stayed" | "workflows.runs.failed" | "workflows.runs.chartStayed" | "workflows.runs.chartFailed" | "workflows.runs.failedTimeout" | "workflows.runs.failedWidgetError" | "workflows.runs.failedBuild" | "workflows.runs.failedOther" | "workflows.runs.failedUnrecorded" | "workflows.runs.pathLabel" | "workflows.runs.none" | "workflows.runs.neverPublished" | "workflows.settings.zoneLabel" | "workflows.settings.zoneHelp" | "workflows.settings.embedHeading" | "workflows.settings.embedHelp" | "workflows.settings.stateHeading" | "workflows.settings.pause" | "workflows.settings.pauseHelp" | "workflows.settings.resume" | "workflows.settings.resumeHelp" | "workflows.settings.archive" | "workflows.settings.archiveHelp" | "workflows.settings.archiveTitle" | "workflows.settings.archiveMessage" | "workflows.settings.unarchive" | "workflows.settings.unarchiveHelp" | "workflows.settings.duplicate" | "workflows.settings.duplicateHelp" | "workflows.settings.delete" | "workflows.settings.deleteHelp" | "workflows.settings.deleteTitle" | "workflows.settings.deleteMessageDraft" | "workflows.settings.deleteMessageLive" | "workflows.settings.deleteMessagePaused" | "workflows.settings.deleteMessageArchived" | "workflows.issue.unknown" | "workflows.issue.malformed" | "workflows.issue.schemaVersion" | "workflows.issue.graphTooLarge" | "workflows.issue.unknownNodeType" | "workflows.issue.unknownTriggerKind" | "workflows.issue.badId" | "workflows.issue.duplicateId" | "workflows.issue.tooManyBlocks" | "workflows.issue.tooManyEdges" | "workflows.issue.noComposition" | "workflows.issue.noStart" | "workflows.issue.manyStarts" | "workflows.issue.compositionMissingId" | "workflows.issue.duplicateComposition" | "workflows.issue.compositionNotAvailable" | "workflows.issue.compositionWebsiteMismatch" | "workflows.issue.unreachableBlock" | "workflows.issue.edgeUnknownNode" | "workflows.issue.edgeBadPort" | "workflows.issue.edgeInvalidConnection" | "workflows.issue.portManyTargets" | "workflows.issue.cycle" | "workflows.issue.triggerNoSource" | "workflows.issue.triggerManySources" | "workflows.issue.triggerNoTarget" | "workflows.issue.triggerConfigIncomplete" | "workflows.issue.triggerNeedsTable" | "workflows.issue.triggerNeedsAction" | "workflows.issue.triggerNeedsName" | "workflows.issue.scheduleInvalid" | "workflows.issue.eventValueInvalid" | "workflows.issue.eventTooManyValues" | "workflows.issue.triggerCapabilityMissing" | "workflows.issue.triggerInputMissing" | "workflows.issue.triggerActionMissing" | "workflows.issue.conditionNoSource" | "workflows.issue.conditionManySources" | "workflows.issue.conditionNoCases" | "workflows.issue.conditionTooManyCases" | "workflows.issue.caseBadId" | "workflows.issue.caseDuplicateId" | "workflows.issue.caseNoTests" | "workflows.issue.caseTooManyTests" | "workflows.issue.caseNoTarget" | "workflows.issue.testBadField" | "workflows.issue.testBadOperator" | "workflows.issue.testMissingValue" | "workflows.issue.fieldUnknown" | null;
124
+ /** While a blank workflow is being made from the list (double-clicks are ignored). */
125
+ isCreatingNew: boolean;
145
126
  create(input: {
146
127
  name: string;
147
128
  composition: CompositionOption | null;
148
129
  }): Promise<WorkflowDetail | undefined>;
149
130
  /**
150
- * Reads the presets "New workflow" can start from (the dialog asks when it opens). A preset is a convenience: when they
131
+ * Makes a blank workflow named {@link BLANK_WORKFLOW_NAME} and returns it. Refusals are in {@link createFailure}; while the
132
+ * request runs {@link isCreatingNew} is true.
133
+ */
134
+ createBlank(): Promise<WorkflowDetail | undefined>;
135
+ /** Makes a blank workflow and opens it (`onOpen` is called only after a workflow was made). */
136
+ createBlankAndOpen(onOpen: (workflowId: string) => void): Promise<void>;
137
+ /**
138
+ * Reads the presets a partner or admin flow can start from. A preset is a convenience: when they
151
139
  * cannot be read the dialog says so and the blank start keeps working, so this is logged, and never reported to the page as
152
140
  * a failure of the screen.
153
141
  */
@@ -4,12 +4,13 @@ import { WORKFLOW_STATUSES } from '../api/types.js';
4
4
  import { workflowsError, workflowsWarn } from '../utils/logger.js';
5
5
  import { pickApiErrorMessage } from './apiErrorText.js';
6
6
  import { EditingWatcher } from './editingWatcher.js';
7
+ import { BLANK_WORKFLOW_NAME, createBlankWorkflowAndOpen } from './createBlankWorkflow.js';
7
8
  import { detectBrowserTimeZone } from './zonedTime.js';
8
- /** The lines of the Status menu, in the order the design draws them. */
9
- export const LIST_STATUS_CHOICES = ['any', ...WORKFLOW_STATUSES];
10
- /** Whether what a control reported is one of the lines of the Status menu (a select reports plain text). */
11
- export function isListStatusChoice(value) {
12
- return LIST_STATUS_CHOICES.includes(value);
9
+ /** The tabs of the list, in the order the design draws them. */
10
+ export const LIST_TABS = ['all', ...WORKFLOW_STATUSES];
11
+ /** Whether what a control reported is one of the tabs (a select reports plain text). */
12
+ export function isListTab(value) {
13
+ return LIST_TABS.includes(value);
13
14
  }
14
15
  /** One page of the list is this many workflows; "Show more" reads the next. */
15
16
  export const LIST_PAGE_SIZE = 25;
@@ -27,12 +28,8 @@ export class WorkflowListState {
27
28
  loadingMore = $state(false);
28
29
  failure = $state.raw(null);
29
30
  search = $state('');
30
- statusFilter = $state('');
31
- /**
32
- * The tab that is open. It is kept here and not worked out from `statusFilter`: once one state is chosen in the Status menu
33
- * the filter no longer says which tab it was chosen under, and the tab must not move by itself.
34
- */
35
- scope = $state('active');
31
+ /** The status tab that is open (`all` = the API’s default list, not archived). */
32
+ tab = $state('all');
36
33
  sortField = $state('createdAt');
37
34
  sortDirection = $state('desc');
38
35
  /** Workflows something is being done to (a duplicate on its way, a state change). */
@@ -50,9 +47,7 @@ export class WorkflowListState {
50
47
  /** Whether there is more of the list than is shown. */
51
48
  hasMore = $derived(this.items.length < this.total);
52
49
  /** Whether the person asked for anything that narrows the list (so "nothing" means "nothing matches", not "nothing yet"). */
53
- isNarrowed = $derived(this.search.trim() !== '' || this.statusFilter !== '');
54
- /** What the Status menu shows: the one state the list is narrowed to, or `any` when the tab alone decides. */
55
- statusChoice = $derived(this.statusFilter === '' || this.statusFilter === 'all' ? 'any' : this.statusFilter);
50
+ isNarrowed = $derived(this.search.trim() !== '' || this.tab !== 'all');
56
51
  /**
57
52
  * The presets "New workflow" offers, as the API gave them the last time they were read (none until then, and none when
58
53
  * the workspace is offered none: the dialog then has only the blank start, as it always had).
@@ -128,7 +123,7 @@ export class WorkflowListState {
128
123
  const search = this.search.trim();
129
124
  return {
130
125
  ...(search === '' ? {} : { search }),
131
- ...(this.statusFilter === '' ? {} : { status: this.statusFilter }),
126
+ ...(this.tab === 'all' ? {} : { status: this.tab }),
132
127
  sort: { field: this.sortField, direction: this.sortDirection },
133
128
  limit: this.pageSize,
134
129
  offset
@@ -200,37 +195,18 @@ export class WorkflowListState {
200
195
  }, this.searchDelay);
201
196
  }
202
197
  /**
203
- * Narrows the list by state and reads it again. The tab follows what is asked: "all" and "archived" (which only the whole
204
- * list holds) are the second tab, empty is the first, and one of the other states leaves the tab where it was.
198
+ * A tab was chosen. `all` asks for the API’s default (not archived); each state asks for that state only. What a control
199
+ * reports is plain text, so a value the list does not offer is said once and changes nothing.
205
200
  */
206
- setStatusFilter(filter) {
207
- if (filter === 'all' || filter === 'archived')
208
- this.scope = 'all';
209
- else if (filter === '')
210
- this.scope = 'active';
211
- if (filter === this.statusFilter)
212
- return;
213
- this.statusFilter = filter;
214
- void this.load();
215
- }
216
- /** A tab was chosen: the list covers what the tab says, and the Status menu goes back to Any. */
217
- chooseScope(scope) {
218
- this.setStatusFilter(scope === 'all' ? 'all' : '');
219
- }
220
- /**
221
- * A line of the Status menu was chosen. A state narrows the list to it (Archived also opens the second tab, where the
222
- * archived workflows are), and Any gives the list back to the tab that is open. What a select reports is plain text, so
223
- * a line the menu does not have is said once and changes nothing.
224
- */
225
- chooseStatus(choice) {
226
- if (!isListStatusChoice(choice)) {
227
- workflowsWarn(`The Status menu reported "${choice}", which it does not offer; the list is left as it is.`);
201
+ chooseTab(choice) {
202
+ if (!isListTab(choice)) {
203
+ workflowsWarn(`The list filter reported "${choice}", which it does not offer; the list is left as it is.`);
228
204
  return;
229
205
  }
230
- if (choice === 'any')
231
- this.chooseScope(this.scope);
232
- else
233
- this.setStatusFilter(choice);
206
+ if (choice === this.tab)
207
+ return;
208
+ this.tab = choice;
209
+ void this.load();
234
210
  }
235
211
  setSort(field) {
236
212
  this.sortField = field;
@@ -269,8 +245,10 @@ export class WorkflowListState {
269
245
  this.setBusy(workflowId, false);
270
246
  }
271
247
  }
272
- /** Makes a workflow (the dialog asked). Resolves to it, or to `undefined` with the reason in `createFailure`. */
248
+ /** The last refusal to make a workflow (shown on the list when "New workflow" fails). */
273
249
  createFailure = $state.raw(null);
250
+ /** While a blank workflow is being made from the list (double-clicks are ignored). */
251
+ isCreatingNew = $state(false);
274
252
  async create(input) {
275
253
  this.createFailure = null;
276
254
  try {
@@ -290,7 +268,34 @@ export class WorkflowListState {
290
268
  }
291
269
  }
292
270
  /**
293
- * Reads the presets "New workflow" can start from (the dialog asks when it opens). A preset is a convenience: when they
271
+ * Makes a blank workflow named {@link BLANK_WORKFLOW_NAME} and returns it. Refusals are in {@link createFailure}; while the
272
+ * request runs {@link isCreatingNew} is true.
273
+ */
274
+ async createBlank() {
275
+ if (this.isCreatingNew)
276
+ return undefined;
277
+ this.isCreatingNew = true;
278
+ try {
279
+ return await this.create({ name: BLANK_WORKFLOW_NAME, composition: null });
280
+ }
281
+ finally {
282
+ this.isCreatingNew = false;
283
+ }
284
+ }
285
+ /** Makes a blank workflow and opens it (`onOpen` is called only after a workflow was made). */
286
+ async createBlankAndOpen(onOpen) {
287
+ await createBlankWorkflowAndOpen({
288
+ isCreating: () => this.isCreatingNew,
289
+ setCreating: (busy) => {
290
+ this.isCreatingNew = busy;
291
+ },
292
+ create: (input) => this.create(input),
293
+ open: onOpen,
294
+ existingNames: this.items.map((item) => item.name)
295
+ });
296
+ }
297
+ /**
298
+ * Reads the presets a partner or admin flow can start from. A preset is a convenience: when they
294
299
  * cannot be read the dialog says so and the blank start keeps working, so this is logged, and never reported to the page as
295
300
  * a failure of the screen.
296
301
  */
@@ -1,13 +1,13 @@
1
1
  import type { WorkflowPreset, WorkflowPresetWidget } from '../api/types.js';
2
2
  /**
3
- * What "New workflow" decides about a start from a preset, kept out of the dialog so that it can be read and tested on its
3
+ * What a preset start decides, kept in one place so partner and admin flows can read and test it on its
4
4
  * own: which preset is chosen, which pictures its card draws, and whether the person can go on.
5
5
  */
6
6
  /** How many pictures a card of a preset draws; the widgets after them are counted ("+2"). */
7
7
  export declare const PRESET_PICTURES_SHOWN = 3;
8
8
  /**
9
9
  * The preset the person chose, from the ones on offer now. `null` is a blank start: nothing was chosen, or the preset that was
10
- * chosen is not on offer any more (the list was read again and it is gone), so the dialog never starts from one it cannot see.
10
+ * chosen is not on offer any more (the list was read again and it is gone).
11
11
  */
12
12
  export declare function chosenPresetOf(presets: readonly WorkflowPreset[], chosenKey: string | null): WorkflowPreset | null;
13
13
  /** The pictures a card draws (the first widgets, in the order the preset shows them) and how many widgets did not fit. */
@@ -16,8 +16,8 @@ export declare function picturesOf(preset: Pick<WorkflowPreset, 'widgets'>, show
16
16
  hiddenCount: number;
17
17
  };
18
18
  /**
19
- * Whether the dialog can make the workflow now. A blank start needs the name (it is the one thing that is required); a preset
20
- * names itself after its title when the name is left empty, so it only needs the dialog not to be busy already.
19
+ * Whether a preset start can go on now. A blank start needs the name; a preset names itself after its title when the name is
20
+ * left empty.
21
21
  */
22
22
  export declare function canStartNow(input: {
23
23
  preset: WorkflowPreset | null;
@@ -1,12 +1,12 @@
1
1
  /**
2
- * What "New workflow" decides about a start from a preset, kept out of the dialog so that it can be read and tested on its
2
+ * What a preset start decides, kept in one place so partner and admin flows can read and test it on its
3
3
  * own: which preset is chosen, which pictures its card draws, and whether the person can go on.
4
4
  */
5
5
  /** How many pictures a card of a preset draws; the widgets after them are counted ("+2"). */
6
6
  export const PRESET_PICTURES_SHOWN = 3;
7
7
  /**
8
8
  * The preset the person chose, from the ones on offer now. `null` is a blank start: nothing was chosen, or the preset that was
9
- * chosen is not on offer any more (the list was read again and it is gone), so the dialog never starts from one it cannot see.
9
+ * chosen is not on offer any more (the list was read again and it is gone).
10
10
  */
11
11
  export function chosenPresetOf(presets, chosenKey) {
12
12
  if (chosenKey === null)
@@ -22,8 +22,8 @@ export function picturesOf(preset, shown = PRESET_PICTURES_SHOWN) {
22
22
  };
23
23
  }
24
24
  /**
25
- * Whether the dialog can make the workflow now. A blank start needs the name (it is the one thing that is required); a preset
26
- * names itself after its title when the name is left empty, so it only needs the dialog not to be busy already.
25
+ * Whether a preset start can go on now. A blank start needs the name; a preset names itself after its title when the name is
26
+ * left empty.
27
27
  */
28
28
  export function canStartNow(input) {
29
29
  if (input.isBusy)
@@ -0,0 +1,16 @@
1
+ /** Bands thinner than this do not show an on-band count · percent label. */
2
+ export declare const MIN_BAND_LABEL_THICKNESS = 14;
3
+ /**
4
+ * The share of visitors who started, as a whole-number percent for the on-band label. A band that is positive but rounds to
5
+ * nothing reads `<1%` (worked out from the number, since the zero of each language is written in its own way).
6
+ */
7
+ export declare function formatBandLabelPercent(value: number, visitorsStarted: number, locale: string): string;
8
+ /** The middle of the last stretch of a band curve (the S-curve into the target column). */
9
+ export declare function bandLabelCenterOfLastStretch(stations: ReadonlyArray<{
10
+ xIn: number;
11
+ xOut: number;
12
+ y: number;
13
+ }>): {
14
+ x: number;
15
+ y: number;
16
+ } | null;
@@ -0,0 +1,34 @@
1
+ /** Bands thinner than this do not show an on-band count · percent label. */
2
+ export const MIN_BAND_LABEL_THICKNESS = 14;
3
+ /**
4
+ * A fraction as a whole-number percent, written the way the person's language writes it. A language tag the platform does not
5
+ * know is not worth a broken chart: the percent is then written in the plain way.
6
+ */
7
+ function formatWholePercent(fraction, locale) {
8
+ try {
9
+ return new Intl.NumberFormat(locale, { style: 'percent', maximumFractionDigits: 0 }).format(fraction);
10
+ }
11
+ catch {
12
+ return `${Math.round(fraction * 100)}%`;
13
+ }
14
+ }
15
+ /**
16
+ * The share of visitors who started, as a whole-number percent for the on-band label. A band that is positive but rounds to
17
+ * nothing reads `<1%` (worked out from the number, since the zero of each language is written in its own way).
18
+ */
19
+ export function formatBandLabelPercent(value, visitorsStarted, locale) {
20
+ if (!(visitorsStarted > 0) || !(value > 0))
21
+ return formatWholePercent(0, locale);
22
+ const share = value / visitorsStarted;
23
+ if (Math.round(share * 100) === 0)
24
+ return `<${formatWholePercent(0.01, locale)}`;
25
+ return formatWholePercent(share, locale);
26
+ }
27
+ /** The middle of the last stretch of a band curve (the S-curve into the target column). */
28
+ export function bandLabelCenterOfLastStretch(stations) {
29
+ if (stations.length < 2)
30
+ return null;
31
+ const from = stations[stations.length - 2];
32
+ const to = stations[stations.length - 1];
33
+ return { x: (from.xOut + to.xIn) / 2, y: (from.y + to.y) / 2 };
34
+ }
@@ -30,9 +30,12 @@ export declare const RUNS_FLOW_METRICS: {
30
30
  readonly stepGap: 20;
31
31
  /** The space between a lane and what is above it (a lane has no label to make room for). */
32
32
  readonly laneGap: 8;
33
- /** The height of the line a composition's name is on, and of each line of numbers under it. */
34
- readonly nameLineHeight: 20;
35
- readonly detailLineHeight: 16;
33
+ /** Caption line for a composition's name above or beside a bar. */
34
+ readonly nameLineHeight: 16;
35
+ /** Bold line for the visitor count on the chart. */
36
+ readonly countLineHeight: 20;
37
+ /** Space between a bar and on-chart stayed/failed words to its right. */
38
+ readonly barSideLabelGap: 6;
36
39
  /** The space between the label and its bar. */
37
40
  readonly labelMargin: 6;
38
41
  /** A bar and a band are never thinner than this (a few visitors among thousands stay visible). */
@@ -55,17 +58,23 @@ export declare const RUNS_FLOW_METRICS: {
55
58
  /** The space kept between a label and the next column's bars. */
56
59
  readonly labelGutter: 16;
57
60
  };
61
+ /** Where the on-chart label of a bar sits (numbers only on the chart; details stay in tooltips and the screen-reader list). */
62
+ export type StepChartLabelPlacement = 'entryCount' | 'above' | 'beside';
58
63
  /**
59
- * How many lines of words a step's label has: its name, then its lines of numbers (how many entered, and the ones that are
60
- * only there when they apply: how many stopped, how many could not be shown and, under those, why). The screen draws the
61
- * very list this counts (`listNumberLines`), so the label is never taller or shorter than its words.
64
+ * Picks the placement from the column: entry count only, name+count above, or name+count beside the last column. The one bar
65
+ * a visitor starts in has no name on the chart (the workflow's name is in the header), also when nothing follows it, so that
66
+ * is looked at before the last column.
62
67
  */
63
- export declare function countLabelLines(step: Pick<RunsFlowStep, 'entered' | 'stayed' | 'failed' | 'failedReasons' | 'failedWithoutReason'>): number;
68
+ export declare function chartLabelPlacement(columnNumber: number, columnCount: number, barsInColumn: number): StepChartLabelPlacement;
69
+ /** How many lines of on-chart label sit above the bar (0 when the label is beside it). */
70
+ export declare function countLabelLines(placement: StepChartLabelPlacement): number;
64
71
  /** A bar, with the place of its label. */
65
72
  export interface PlacedStep extends RunsFlowStep {
66
- /** The left edge of the bar and of its label. */
73
+ /** The left edge of the bar. */
67
74
  x: number;
68
- /** The top of the label, and of the bar under it. */
75
+ labelPlacement: StepChartLabelPlacement;
76
+ /** The top-left of the on-chart label (above or beside the bar). */
77
+ labelX: number;
69
78
  labelY: number;
70
79
  barY: number;
71
80
  barHeight: number;
@@ -90,6 +99,12 @@ export interface PlacedLink extends RunsFlowLink {
90
99
  thickness: number;
91
100
  /** The columns the band skips, left to right, and where it runs through each one. Empty for a band to the next column. */
92
101
  lanes: PlacedLane[];
102
+ /** The centre of the on-band count · percent label, when the band is thick enough. */
103
+ labelCenter: {
104
+ x: number;
105
+ y: number;
106
+ } | null;
107
+ showBandLabel: boolean;
93
108
  }
94
109
  export interface PlacedRunsFlow {
95
110
  width: number;