@morscherlab/mint-sdk 1.4.0-beta.18 → 1.4.0-beta.19
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/components/JobsStatusTray.vue.d.ts +4 -0
- package/dist/composables/useJobCenter.d.ts +32 -2
- package/dist/{data-BIiV4kKw.js → data-DBnmeBZX.js} +2 -2
- package/dist/{data-BIiV4kKw.js.map → data-DBnmeBZX.js.map} +1 -1
- package/dist/data.js +2 -2
- package/dist/index.js +3 -3
- package/dist/{install-Dg-Z6ze5.js → install-C5psB1H0.js} +3 -3
- package/dist/{install-Dg-Z6ze5.js.map → install-C5psB1H0.js.map} +1 -1
- package/dist/install.js +1 -1
- package/dist/{runtime-cHv1phcc.js → runtime-CoHhBP10.js} +23 -4
- package/dist/runtime-CoHhBP10.js.map +1 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +2 -2
- package/dist/styles.css +4 -0
- package/dist/useRealtime-C3whhVvb.js +508 -0
- package/dist/useRealtime-C3whhVvb.js.map +1 -0
- package/package.json +1 -1
- package/src/__tests__/components/JobsStatusTray.test.ts +242 -6
- package/src/__tests__/composables/useJobCenter.test.ts +39 -0
- package/src/__tests__/docs/frontendDocsCatalog.test.ts +1 -0
- package/src/components/JobsStatusTray.story.vue +20 -1
- package/src/components/JobsStatusTray.vue +145 -40
- package/src/composables/useJobCenter.ts +63 -2
- package/src/runtime.ts +2 -0
- package/src/styles/components/jobs-status-tray.css +5 -0
- package/dist/runtime-cHv1phcc.js.map +0 -1
- package/dist/useRealtime-BW02xy4Z.js +0 -398
- package/dist/useRealtime-BW02xy4Z.js.map +0 -1
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { UseJobCenterReturn } from '../composables/useJobCenter';
|
|
2
2
|
import { JobState } from '../types/jobs';
|
|
3
|
+
type ConfirmAction = 'cancel' | 'delete' | 'clear';
|
|
3
4
|
interface Props {
|
|
4
5
|
/** Job center from `useJobCenter()`; the parent owns it and opens the panel through it. */
|
|
5
6
|
center: UseJobCenterReturn;
|
|
6
7
|
title?: string;
|
|
7
8
|
teleportTo?: string | HTMLElement | false;
|
|
9
|
+
/** Ask before Cancel, Delete and Clear (`true`), or before the named ones only. Default off. */
|
|
10
|
+
confirm?: boolean | Partial<Record<ConfirmAction, boolean>>;
|
|
8
11
|
}
|
|
9
12
|
type __VLS_Slots = {
|
|
10
13
|
/** Extra per-row actions, rendered before the built-in Cancel / Delete. */
|
|
@@ -27,6 +30,7 @@ declare const __VLS_base: import('vue').DefineComponent<Props, {}, {}, {}, {}, i
|
|
|
27
30
|
onError?: ((message: string) => any) | undefined;
|
|
28
31
|
onSelect?: ((job: JobState) => any) | undefined;
|
|
29
32
|
}>, {
|
|
33
|
+
confirm: boolean | Partial<Record<ConfirmAction, boolean>>;
|
|
30
34
|
title: string;
|
|
31
35
|
teleportTo: string | HTMLElement | false;
|
|
32
36
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComputedRef, MaybeRefOrGetter, Ref, ShallowRef } from 'vue';
|
|
2
|
-
import { JobListPayload, JobState, JobStateInput, TopBarJob } from '../types/jobs';
|
|
2
|
+
import { JobListPayload, JobState, JobStateInput, JobStatus, TopBarJob } from '../types/jobs';
|
|
3
3
|
/**
|
|
4
4
|
* The canonical owner of a collection of plugin jobs.
|
|
5
5
|
*
|
|
@@ -28,10 +28,38 @@ export declare function combinePluginJobSources(sources: readonly PluginJobCente
|
|
|
28
28
|
export interface UseJobCenterOptions {
|
|
29
29
|
source?: MaybeRefOrGetter<PluginJobCenterSource | undefined>;
|
|
30
30
|
loadOnMount?: boolean;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Maps the job that the top-bar chip shows. It is called for the chosen own
|
|
33
|
+
* active job AND for the held just-completed job, so check `job.status`.
|
|
34
|
+
* `null` keeps the default mapping.
|
|
35
|
+
*/
|
|
32
36
|
topBarJob?: (job: JobState) => TopBarJob | null;
|
|
37
|
+
/**
|
|
38
|
+
* Overrides how a tray row looks: `status` (icon, awaiting-input tint and
|
|
39
|
+
* pinning), `percent` (progress bar and value) and `message` (detail line).
|
|
40
|
+
* A missing or `undefined` field, or a `null` status or message, keeps the
|
|
41
|
+
* job's own; `percent: null` hides the bar and shows the time, and a status
|
|
42
|
+
* alone keeps the job's own percent. The job's section, actions and counts
|
|
43
|
+
* do not change.
|
|
44
|
+
*/
|
|
45
|
+
rowJob?: (job: JobState) => JobRowOverride | null;
|
|
46
|
+
}
|
|
47
|
+
/** A `rowJob` result; see `UseJobCenterOptions.rowJob`. */
|
|
48
|
+
export interface JobRowOverride {
|
|
49
|
+
status?: JobStatus | null;
|
|
50
|
+
percent?: number | null;
|
|
51
|
+
message?: string | null;
|
|
52
|
+
}
|
|
53
|
+
/** How a tray row shows a job; see `UseJobCenterReturn.rowView`. */
|
|
54
|
+
export interface JobRowView {
|
|
55
|
+
status: JobStatus;
|
|
56
|
+
/** 0-100, rounded; `null` hides the progress bar and shows the time instead. */
|
|
57
|
+
percent: number | null;
|
|
58
|
+
message: string;
|
|
33
59
|
}
|
|
34
60
|
export interface UseJobCenterReturn {
|
|
61
|
+
/** The current source; a new identity is a new job list. */
|
|
62
|
+
source: ComputedRef<PluginJobCenterSource | undefined>;
|
|
35
63
|
jobs: ComputedRef<JobState[]>;
|
|
36
64
|
activeJobs: ComputedRef<JobState[]>;
|
|
37
65
|
historyJobs: ComputedRef<JobState[]>;
|
|
@@ -43,6 +71,8 @@ export interface UseJobCenterReturn {
|
|
|
43
71
|
canClearFinished: ComputedRef<boolean>;
|
|
44
72
|
/** DOM id of the JobsStatusTray panel, for `AppTopBar`'s `jobsPanelId` prop. */
|
|
45
73
|
panelId: string;
|
|
74
|
+
/** The row view of a job, with the `rowJob` option applied. */
|
|
75
|
+
rowView: (job: JobState) => JobRowView;
|
|
46
76
|
/** The viewer's own job for `AppTopBar`'s `job` prop. */
|
|
47
77
|
topBarJob: ComputedRef<TopBarJob | null>;
|
|
48
78
|
/** Jobs in the list with status `completed`, for `AppTopBar`'s `jobsDone` prop. */
|
|
@@ -5,7 +5,7 @@ import { t as SegmentedControl_default } from "./SegmentedControl-CJ7EAmOq.js";
|
|
|
5
5
|
import { a as normalizeSearchQuery, i as candidateMatchesSearch, n as DataStateInternal_default, o as useTextSearch, t as AlertBox_default } from "./AlertBox-CzLg0UaL.js";
|
|
6
6
|
import { n as ActionMenu_default, t as useRequest } from "./useRequest-CDkrXNU7.js";
|
|
7
7
|
import { hasAllPermissions } from "./permissions.js";
|
|
8
|
-
import { i as JobsStatusTray_default, r as useRealtime } from "./useRealtime-
|
|
8
|
+
import { i as JobsStatusTray_default, r as useRealtime } from "./useRealtime-C3whhVvb.js";
|
|
9
9
|
import { r as useExperimentSelector, t as ExperimentSelectorModal_default } from "./ExperimentSelectorModal-pR5fK3pA.js";
|
|
10
10
|
import { t as experimentStatus_exports } from "./experimentStatus-BFrKpHAH.js";
|
|
11
11
|
import { t as ANALYSIS_FILE_ARTIFACT_SCHEMA } from "./analysisArtifactTypes-Cy3D0Ipg.js";
|
|
@@ -3862,4 +3862,4 @@ var data_exports = /* @__PURE__ */ __exportAll({
|
|
|
3862
3862
|
//#endregion
|
|
3863
3863
|
export { ArtifactSaveDialog_default as _, usePlatformFilePickerAdapter as a, encodePlatformPickerPath as c, StaleFormBanner_default as d, VersionConflictDialog_default as f, ExperimentCodeBadge_default as g, FilePicker_default as h, useFileBrowser as i, fieldNameLabel as l, AuditTrail_default as m, buildAnalysisArtifactTargetQuery as n, createFilePickerAdapter as o, BatchProgressList_default as p, parseAnalysisArtifactTarget as r, decodePlatformPickerPath as s, data_exports as t, useVersionedSave as u, ArtifactSelectorModal_default as v, useArtifacts as y };
|
|
3864
3864
|
|
|
3865
|
-
//# sourceMappingURL=data-
|
|
3865
|
+
//# sourceMappingURL=data-DBnmeBZX.js.map
|