@burdenoff/microfe-planmagnet 2026.930.20 → 2026.930.22
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/node_modules/lodash/_arrayEach.js +14 -0
- package/dist/node_modules/lodash/_arrayEach.js.map +1 -0
- package/dist/node_modules/lodash/_assignValue.js +17 -0
- package/dist/node_modules/lodash/_assignValue.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssign.js +16 -0
- package/dist/node_modules/lodash/_baseAssign.js.map +1 -0
- package/dist/node_modules/lodash/_baseAssignIn.js +16 -0
- package/dist/node_modules/lodash/_baseAssignIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseClone.js +64 -0
- package/dist/node_modules/lodash/_baseClone.js.map +1 -0
- package/dist/node_modules/lodash/_baseCreate.js +21 -0
- package/dist/node_modules/lodash/_baseCreate.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsMap.js +16 -0
- package/dist/node_modules/lodash/_baseIsMap.js.map +1 -0
- package/dist/node_modules/lodash/_baseIsSet.js +16 -0
- package/dist/node_modules/lodash/_baseIsSet.js.map +1 -0
- package/dist/node_modules/lodash/_baseKeysIn.js +20 -0
- package/dist/node_modules/lodash/_baseKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_baseSum.js +17 -0
- package/dist/node_modules/lodash/_baseSum.js.map +1 -0
- package/dist/node_modules/lodash/_baseUnset.js +26 -0
- package/dist/node_modules/lodash/_baseUnset.js.map +1 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js +16 -0
- package/dist/node_modules/lodash/_cloneArrayBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneBuffer.js +17 -0
- package/dist/node_modules/lodash/_cloneBuffer.js.map +1 -0
- package/dist/node_modules/lodash/_cloneDataView.js +16 -0
- package/dist/node_modules/lodash/_cloneDataView.js.map +1 -0
- package/dist/node_modules/lodash/_cloneRegExp.js +15 -0
- package/dist/node_modules/lodash/_cloneRegExp.js.map +1 -0
- package/dist/node_modules/lodash/_cloneSymbol.js +15 -0
- package/dist/node_modules/lodash/_cloneSymbol.js.map +1 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js +16 -0
- package/dist/node_modules/lodash/_cloneTypedArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyArray.js +15 -0
- package/dist/node_modules/lodash/_copyArray.js.map +1 -0
- package/dist/node_modules/lodash/_copyObject.js +22 -0
- package/dist/node_modules/lodash/_copyObject.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbols.js +16 -0
- package/dist/node_modules/lodash/_copySymbols.js.map +1 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js +16 -0
- package/dist/node_modules/lodash/_copySymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_customOmitClone.js +15 -0
- package/dist/node_modules/lodash/_customOmitClone.js.map +1 -0
- package/dist/node_modules/lodash/_flatRest.js +17 -0
- package/dist/node_modules/lodash/_flatRest.js.map +1 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js +17 -0
- package/dist/node_modules/lodash/_getAllKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js +18 -0
- package/dist/node_modules/lodash/_getSymbolsIn.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneArray.js +15 -0
- package/dist/node_modules/lodash/_initCloneArray.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneByTag.js +40 -0
- package/dist/node_modules/lodash/_initCloneByTag.js.map +1 -0
- package/dist/node_modules/lodash/_initCloneObject.js +17 -0
- package/dist/node_modules/lodash/_initCloneObject.js.map +1 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js +15 -0
- package/dist/node_modules/lodash/_nativeKeysIn.js.map +1 -0
- package/dist/node_modules/lodash/_parent.js +16 -0
- package/dist/node_modules/lodash/_parent.js.map +1 -0
- package/dist/node_modules/lodash/flatten.js +15 -0
- package/dist/node_modules/lodash/flatten.js.map +1 -0
- package/dist/node_modules/lodash/isMap.js +14 -0
- package/dist/node_modules/lodash/isMap.js.map +1 -0
- package/dist/node_modules/lodash/isSet.js +14 -0
- package/dist/node_modules/lodash/isSet.js.map +1 -0
- package/dist/node_modules/lodash/keysIn.js +17 -0
- package/dist/node_modules/lodash/keysIn.js.map +1 -0
- package/dist/node_modules/lodash/maxBy.js +17 -0
- package/dist/node_modules/lodash/maxBy.js.map +1 -0
- package/dist/node_modules/lodash/omit.js +28 -0
- package/dist/node_modules/lodash/omit.js.map +1 -0
- package/dist/node_modules/lodash/sumBy.js +16 -0
- package/dist/node_modules/lodash/sumBy.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/Sankey.js +556 -0
- package/dist/node_modules/recharts/es6/chart/Sankey.js.map +1 -0
- package/dist/node_modules/recharts/es6/chart/Treemap.js +545 -0
- package/dist/node_modules/recharts/es6/chart/Treemap.js.map +1 -0
- package/dist/node_modules/recharts/es6/shape/Polygon.js +112 -0
- package/dist/node_modules/recharts/es6/shape/Polygon.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/Constants.js +31 -0
- package/dist/node_modules/recharts/es6/util/Constants.js.map +1 -0
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +15 -10
- package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -1
- package/dist/planmagnet/automation/AutomationExecutionsPanel.d.ts.map +1 -1
- package/dist/planmagnet/automation/AutomationExecutionsPanel.js +43 -39
- package/dist/planmagnet/automation/AutomationExecutionsPanel.js.map +1 -1
- package/dist/planmagnet/automation/AutomationRuleFields.d.ts +23 -4
- package/dist/planmagnet/automation/AutomationRuleFields.d.ts.map +1 -1
- package/dist/planmagnet/automation/AutomationRuleFields.js +255 -108
- package/dist/planmagnet/automation/AutomationRuleFields.js.map +1 -1
- package/dist/planmagnet/automation/automationRuleTypes.d.ts +138 -15
- package/dist/planmagnet/automation/automationRuleTypes.d.ts.map +1 -1
- package/dist/planmagnet/automation/automationRuleTypes.js +162 -22
- package/dist/planmagnet/automation/automationRuleTypes.js.map +1 -1
- package/dist/planmagnet/controls/AutomationRuleControls.d.ts.map +1 -1
- package/dist/planmagnet/controls/AutomationRuleControls.js +78 -73
- package/dist/planmagnet/controls/AutomationRuleControls.js.map +1 -1
- package/dist/planmagnet/controls/CompetitorControls.js +7 -7
- package/dist/planmagnet/controls/FeatureControls.js +38 -38
- package/dist/planmagnet/controls/ProgramControls.js +8 -8
- package/dist/planmagnet/dependency/DependencyGraph.js +9 -9
- package/dist/planmagnet/dependency/DependencyPanel.js +13 -13
- package/dist/planmagnet/pages/ActivityActivityPagePage.js +16 -16
- package/dist/planmagnet/pages/ActivityActivityPagePage.js.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js +91 -73
- package/dist/planmagnet/pages/AnalyticsAnalyticsPagePage.js.map +1 -1
- package/dist/planmagnet/pages/AutomationAutomationRuleDetailPagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AutomationAutomationRuleDetailPagePage.js +85 -76
- package/dist/planmagnet/pages/AutomationAutomationRuleDetailPagePage.js.map +1 -1
- package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js +18 -18
- package/dist/planmagnet/pages/AutomationAutomationRulesPagePage.js.map +1 -1
- package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.d.ts.map +1 -1
- package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js +49 -45
- package/dist/planmagnet/pages/AutomationCreateAutomationRulePagePage.js.map +1 -1
- package/dist/planmagnet/pages/DashboardDashboardPagePage.js +11 -11
- package/dist/planmagnet/pages/DashboardsProjectManagerPagePage.js +5 -5
- package/dist/planmagnet/pages/DashboardsTeamUtilizationPagePage.js +5 -5
- package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.js +6 -6
- package/dist/planmagnet/pages/IntegrationsNewSyncPagePage.js.map +1 -1
- package/dist/planmagnet/pages/IntegrationsSyncsPagePage.js +8 -8
- package/dist/planmagnet/pages/ProjectsBudgetsPagePage.js +10 -10
- package/dist/planmagnet/pages/ProjectsCriticalPathPagePage.js +6 -6
- package/dist/planmagnet/pages/ProjectsEditProjectPagePage.js +5 -5
- package/dist/planmagnet/pages/ProjectsPlanningPagePage.js +8 -8
- package/dist/planmagnet/pages/SprintsStartSprintPagePage.js +4 -4
- package/dist/planmagnet/pages/analytics/StatusFlowCard.d.ts +8 -0
- package/dist/planmagnet/pages/analytics/StatusFlowCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/StatusFlowCard.js +231 -0
- package/dist/planmagnet/pages/analytics/StatusFlowCard.js.map +1 -0
- package/dist/planmagnet/pages/analytics/WorkBreakdownCard.d.ts +6 -0
- package/dist/planmagnet/pages/analytics/WorkBreakdownCard.d.ts.map +1 -0
- package/dist/planmagnet/pages/analytics/WorkBreakdownCard.js +364 -0
- package/dist/planmagnet/pages/analytics/WorkBreakdownCard.js.map +1 -0
- package/dist/planmagnet/people/People.d.ts.map +1 -1
- package/dist/planmagnet/people/People.js +30 -17
- package/dist/planmagnet/people/People.js.map +1 -1
- package/dist/planmagnet/roadmaps/RoadmapControls.js +17 -17
- package/package.json +1 -1
|
@@ -1,169 +1,253 @@
|
|
|
1
1
|
import { AssigneeSelect as e, WORK_ITEM_PRIORITIES as t, WORK_ITEM_STATUSES as n, enumLabel as r } from "../controls/WorkItemControls.js";
|
|
2
2
|
import { ProjectSelect as i } from "../controls/Pickers.js";
|
|
3
|
-
import { ACTION_TYPES as a, ACTION_TYPE_LABEL as o,
|
|
4
|
-
import { Plus as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { Button as
|
|
3
|
+
import { ACTION_TYPES as a, ACTION_TYPE_LABEL as o, AUTOMATION_TEMPLATE_MAX_LENGTH as s, CHANNEL_POSTING_BLOCKED_MESSAGE as c, CHANNEL_POSTING_OPTION_REASON as l, CONDITION_FIELDS as u, CONDITION_OPERATORS as d, CONDITION_OPERATOR_LABEL as f, NO_WORK_ITEM_TRIGGER_TYPES as p, POST_COMMENT_MAX_RENDERED_LENGTH as m, TEMPLATE_PLACEHOLDER_INFO as h, TRIGGER_TYPES as g, TRIGGER_TYPE_LABEL as _, WORK_ITEM_ACTION_TYPES as v, parseScheduleDays as y, renderTemplatePreview as b, templatePlaceholdersForTrigger as x, templateSampleValues as S, triggerHint as C, triggerOptionSuffix as w } from "./automationRuleTypes.js";
|
|
4
|
+
import { Plus as T, X as E } from "lucide-react";
|
|
5
|
+
import { jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
6
|
+
import { Button as k, Checkbox as A, Input as j, Textarea as M } from "@burdenoff/fe-libs/ui";
|
|
7
7
|
//#region src/planmagnet/automation/AutomationRuleFields.tsx
|
|
8
|
-
var
|
|
9
|
-
function
|
|
8
|
+
var N = "rounded-md border border-input bg-background px-3 py-2 text-sm disabled:opacity-60", P = `mt-1 w-full ${N}`, F = "text-foreground";
|
|
9
|
+
function I({ value: e, triggerType: t, onChange: n }) {
|
|
10
|
+
let r = x(t), i = b(e, S(t), m), a = (t) => n(`${e}{{${t}}}`);
|
|
11
|
+
return /* @__PURE__ */ O("div", {
|
|
12
|
+
className: "space-y-2",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D(M, {
|
|
15
|
+
"aria-label": "Comment template",
|
|
16
|
+
"data-testid": "automation-template",
|
|
17
|
+
className: `min-h-[72px] w-full ${F}`,
|
|
18
|
+
maxLength: s,
|
|
19
|
+
placeholder: "e.g. Automatically moved to {{toStatus}} by {{actor}}",
|
|
20
|
+
value: e,
|
|
21
|
+
onChange: (e) => n(e.target.value)
|
|
22
|
+
}), /* @__PURE__ */ O("p", {
|
|
23
|
+
className: "mt-1 text-xs text-muted-foreground",
|
|
24
|
+
children: [
|
|
25
|
+
e.length,
|
|
26
|
+
" / ",
|
|
27
|
+
s,
|
|
28
|
+
" characters"
|
|
29
|
+
]
|
|
30
|
+
})] }),
|
|
31
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("p", {
|
|
32
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
33
|
+
children: "Insert a placeholder"
|
|
34
|
+
}), /* @__PURE__ */ D("div", {
|
|
35
|
+
"data-testid": "automation-placeholders",
|
|
36
|
+
className: "mt-1 flex flex-wrap gap-1.5",
|
|
37
|
+
children: r.map((e) => /* @__PURE__ */ D("button", {
|
|
38
|
+
type: "button",
|
|
39
|
+
onClick: () => a(e),
|
|
40
|
+
title: `Insert {{${e}}} — ${h[e]?.label ?? e}`,
|
|
41
|
+
className: "rounded-full border border-input px-2 py-0.5 text-xs text-muted-foreground hover:bg-muted",
|
|
42
|
+
children: `{{${e}}}`
|
|
43
|
+
}, e))
|
|
44
|
+
})] }),
|
|
45
|
+
/* @__PURE__ */ O("div", {
|
|
46
|
+
"data-testid": "automation-template-preview",
|
|
47
|
+
className: "rounded-md border border-dashed border-input p-2 text-xs",
|
|
48
|
+
children: [/* @__PURE__ */ D("p", {
|
|
49
|
+
className: "font-medium text-foreground",
|
|
50
|
+
children: "Preview"
|
|
51
|
+
}), /* @__PURE__ */ D("p", {
|
|
52
|
+
className: "mt-0.5 whitespace-pre-wrap text-muted-foreground",
|
|
53
|
+
children: i || /* @__PURE__ */ D("span", {
|
|
54
|
+
className: "italic",
|
|
55
|
+
children: "Nothing to show yet — write a template above."
|
|
56
|
+
})
|
|
57
|
+
})]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function L({ action: i, triggerType: a, onChange: o }) {
|
|
10
63
|
switch (i.type) {
|
|
11
|
-
case "ASSIGN_TO_USER": return /* @__PURE__ */
|
|
64
|
+
case "ASSIGN_TO_USER": return /* @__PURE__ */ D(e, {
|
|
12
65
|
value: i.value,
|
|
13
|
-
onChange:
|
|
66
|
+
onChange: o
|
|
14
67
|
});
|
|
15
|
-
case "SET_STATUS": return /* @__PURE__ */
|
|
16
|
-
className: `${
|
|
68
|
+
case "SET_STATUS": return /* @__PURE__ */ O("select", {
|
|
69
|
+
className: `${N} w-full`,
|
|
17
70
|
value: i.value,
|
|
18
|
-
onChange: (e) =>
|
|
19
|
-
children: [/* @__PURE__ */
|
|
71
|
+
onChange: (e) => o(e.target.value),
|
|
72
|
+
children: [/* @__PURE__ */ D("option", {
|
|
20
73
|
value: "",
|
|
21
74
|
children: "Choose a status"
|
|
22
|
-
}), n.map((e) => /* @__PURE__ */
|
|
75
|
+
}), n.map((e) => /* @__PURE__ */ D("option", {
|
|
23
76
|
value: e,
|
|
24
77
|
children: r(e)
|
|
25
78
|
}, e))]
|
|
26
79
|
});
|
|
27
|
-
case "SET_PRIORITY": return /* @__PURE__ */
|
|
28
|
-
className: `${
|
|
80
|
+
case "SET_PRIORITY": return /* @__PURE__ */ O("select", {
|
|
81
|
+
className: `${N} w-full`,
|
|
29
82
|
value: i.value,
|
|
30
|
-
onChange: (e) =>
|
|
31
|
-
children: [/* @__PURE__ */
|
|
83
|
+
onChange: (e) => o(e.target.value),
|
|
84
|
+
children: [/* @__PURE__ */ D("option", {
|
|
32
85
|
value: "",
|
|
33
86
|
children: "Choose a priority"
|
|
34
|
-
}), t.map((e) => /* @__PURE__ */
|
|
87
|
+
}), t.map((e) => /* @__PURE__ */ D("option", {
|
|
35
88
|
value: e,
|
|
36
89
|
children: r(e)
|
|
37
90
|
}, e))]
|
|
38
91
|
});
|
|
39
|
-
|
|
92
|
+
case "POST_COMMENT": return /* @__PURE__ */ D(I, {
|
|
93
|
+
value: i.value,
|
|
94
|
+
triggerType: a,
|
|
95
|
+
onChange: o
|
|
96
|
+
});
|
|
97
|
+
case "POST_TO_CHANNEL": return /* @__PURE__ */ O("div", {
|
|
98
|
+
className: "space-y-1",
|
|
99
|
+
children: [/* @__PURE__ */ D(j, {
|
|
100
|
+
"aria-label": "Channel message template (read-only — not available yet)",
|
|
101
|
+
className: F,
|
|
102
|
+
value: i.value,
|
|
103
|
+
disabled: !0,
|
|
104
|
+
readOnly: !0
|
|
105
|
+
}), /* @__PURE__ */ D("p", {
|
|
106
|
+
className: "text-xs text-destructive",
|
|
107
|
+
children: c
|
|
108
|
+
})]
|
|
109
|
+
});
|
|
110
|
+
default: return /* @__PURE__ */ D(j, {
|
|
40
111
|
"aria-label": "Label",
|
|
41
|
-
className:
|
|
112
|
+
className: F,
|
|
42
113
|
placeholder: "e.g. needs-review",
|
|
43
114
|
value: i.value,
|
|
44
|
-
onChange: (e) =>
|
|
115
|
+
onChange: (e) => o(e.target.value)
|
|
45
116
|
});
|
|
46
117
|
}
|
|
47
118
|
}
|
|
48
|
-
function
|
|
49
|
-
let
|
|
119
|
+
function R({ actions: e, triggerType: t, onChange: n }) {
|
|
120
|
+
let r = p.has(t), i = (t, r) => n(e.map((e, n) => n === t ? {
|
|
50
121
|
...e,
|
|
51
122
|
...r
|
|
52
|
-
} : e)),
|
|
53
|
-
return /* @__PURE__ */
|
|
123
|
+
} : e)), s = (t) => n(e.filter((e, n) => n !== t));
|
|
124
|
+
return /* @__PURE__ */ O("div", {
|
|
54
125
|
className: "space-y-2",
|
|
55
126
|
children: [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
127
|
+
r && /* @__PURE__ */ D("p", {
|
|
128
|
+
className: "text-xs text-muted-foreground",
|
|
129
|
+
children: "This trigger has no target work item, so none of the actions below can run for it. Remove any left over from before this restriction existed, or switch to a different trigger."
|
|
130
|
+
}),
|
|
131
|
+
e.map((e, n) => {
|
|
132
|
+
let c = a.includes(e.type), u = c ? a : [e.type, ...a], d = r && v.has(e.type);
|
|
133
|
+
return /* @__PURE__ */ O("div", {
|
|
59
134
|
className: "space-y-1",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ O("div", {
|
|
61
136
|
className: "flex items-start gap-2",
|
|
62
137
|
children: [
|
|
63
|
-
/* @__PURE__ */
|
|
138
|
+
/* @__PURE__ */ D("select", {
|
|
64
139
|
"aria-label": "Action type",
|
|
65
|
-
|
|
140
|
+
"data-testid": "automation-action-type",
|
|
141
|
+
className: `${N} w-40 shrink-0`,
|
|
66
142
|
value: e.type,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
143
|
+
disabled: d,
|
|
144
|
+
onChange: (t) => i(n, {
|
|
145
|
+
type: t.target.value,
|
|
146
|
+
value: t.target.value === e.type ? e.value : ""
|
|
70
147
|
}),
|
|
71
|
-
children:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
148
|
+
children: u.map((t) => {
|
|
149
|
+
let n = t === "POST_TO_CHANNEL" && !0, r = c || t !== e.type ? o[t] ?? t : t;
|
|
150
|
+
return /* @__PURE__ */ D("option", {
|
|
151
|
+
value: t,
|
|
152
|
+
disabled: n,
|
|
153
|
+
children: n ? `${r} — ${l}` : r
|
|
154
|
+
}, t);
|
|
155
|
+
})
|
|
75
156
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ D("div", {
|
|
77
158
|
className: "min-w-0 flex-1",
|
|
78
|
-
children: /* @__PURE__ */
|
|
159
|
+
children: /* @__PURE__ */ D(L, {
|
|
79
160
|
action: e,
|
|
80
|
-
|
|
161
|
+
triggerType: t,
|
|
162
|
+
onChange: (e) => i(n, { value: e })
|
|
81
163
|
})
|
|
82
164
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
165
|
+
/* @__PURE__ */ D(k, {
|
|
84
166
|
type: "button",
|
|
85
167
|
size: "sm",
|
|
86
168
|
variant: "ghost",
|
|
87
169
|
"aria-label": "Remove action",
|
|
88
|
-
onClick: () =>
|
|
89
|
-
children: /* @__PURE__ */
|
|
170
|
+
onClick: () => s(n),
|
|
171
|
+
children: /* @__PURE__ */ D(E, { className: "h-4 w-4" })
|
|
90
172
|
})
|
|
91
173
|
]
|
|
92
|
-
}), !
|
|
174
|
+
}), !c && /* @__PURE__ */ D("p", {
|
|
93
175
|
className: "text-xs text-muted-foreground",
|
|
94
176
|
children: "This action type is not run by the engine yet; the rule keeps it but never dispatches it."
|
|
95
177
|
})]
|
|
96
|
-
},
|
|
178
|
+
}, n);
|
|
97
179
|
}),
|
|
98
|
-
/* @__PURE__ */
|
|
180
|
+
/* @__PURE__ */ O(k, {
|
|
99
181
|
type: "button",
|
|
100
182
|
size: "sm",
|
|
101
183
|
variant: "outline",
|
|
102
|
-
onClick: () =>
|
|
184
|
+
onClick: () => n([...e, {
|
|
103
185
|
type: "ASSIGN_TO_USER",
|
|
104
186
|
value: ""
|
|
105
187
|
}]),
|
|
188
|
+
disabled: r,
|
|
189
|
+
title: r ? "This trigger has no target work item — no action can be added." : void 0,
|
|
106
190
|
"data-testid": "automation-add-action",
|
|
107
|
-
children: [/* @__PURE__ */
|
|
191
|
+
children: [/* @__PURE__ */ D(T, { className: "mr-1 h-4 w-4" }), "Add action"]
|
|
108
192
|
}),
|
|
109
|
-
e.length === 0 && /* @__PURE__ */
|
|
193
|
+
e.length === 0 && !r && /* @__PURE__ */ D("p", {
|
|
110
194
|
className: "text-xs text-muted-foreground",
|
|
111
195
|
children: "A rule with no actions still records that it ran, but changes nothing."
|
|
112
196
|
})
|
|
113
197
|
]
|
|
114
198
|
});
|
|
115
199
|
}
|
|
116
|
-
function
|
|
200
|
+
function z({ conditions: e, onChange: t }) {
|
|
117
201
|
let n = (n, r) => t(e.map((e, t) => t === n ? {
|
|
118
202
|
...e,
|
|
119
203
|
...r
|
|
120
204
|
} : e)), r = (n) => t(e.filter((e, t) => t !== n));
|
|
121
|
-
return /* @__PURE__ */
|
|
205
|
+
return /* @__PURE__ */ O("div", {
|
|
122
206
|
className: "space-y-2",
|
|
123
207
|
children: [
|
|
124
|
-
e.map((e, t) => /* @__PURE__ */
|
|
208
|
+
e.map((e, t) => /* @__PURE__ */ O("div", {
|
|
125
209
|
className: "flex items-start gap-2",
|
|
126
210
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
211
|
+
/* @__PURE__ */ D(j, {
|
|
128
212
|
"aria-label": "Condition field",
|
|
129
213
|
list: "automation-condition-fields",
|
|
130
|
-
className: `w-36 shrink-0 ${
|
|
214
|
+
className: `w-36 shrink-0 ${F}`,
|
|
131
215
|
placeholder: "field",
|
|
132
216
|
value: e.field,
|
|
133
217
|
onChange: (e) => n(t, { field: e.target.value })
|
|
134
218
|
}),
|
|
135
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ D("select", {
|
|
136
220
|
"aria-label": "Condition operator",
|
|
137
|
-
className: `${
|
|
221
|
+
className: `${N} w-32 shrink-0`,
|
|
138
222
|
value: e.operator,
|
|
139
223
|
onChange: (e) => n(t, { operator: e.target.value }),
|
|
140
|
-
children:
|
|
224
|
+
children: d.map((e) => /* @__PURE__ */ D("option", {
|
|
141
225
|
value: e,
|
|
142
|
-
children:
|
|
226
|
+
children: f[e]
|
|
143
227
|
}, e))
|
|
144
228
|
}),
|
|
145
|
-
e.operator !== "exists" && /* @__PURE__ */
|
|
229
|
+
e.operator !== "exists" && /* @__PURE__ */ D(j, {
|
|
146
230
|
"aria-label": "Condition value",
|
|
147
|
-
className: `min-w-0 flex-1 ${
|
|
231
|
+
className: `min-w-0 flex-1 ${F}`,
|
|
148
232
|
placeholder: e.operator === "in" || e.operator === "notIn" ? "comma, separated, values" : "value",
|
|
149
233
|
value: e.value,
|
|
150
234
|
onChange: (e) => n(t, { value: e.target.value })
|
|
151
235
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ D(k, {
|
|
153
237
|
type: "button",
|
|
154
238
|
size: "sm",
|
|
155
239
|
variant: "ghost",
|
|
156
240
|
"aria-label": "Remove condition",
|
|
157
241
|
onClick: () => r(t),
|
|
158
|
-
children: /* @__PURE__ */
|
|
242
|
+
children: /* @__PURE__ */ D(E, { className: "h-4 w-4" })
|
|
159
243
|
})
|
|
160
244
|
]
|
|
161
245
|
}, t)),
|
|
162
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ D("datalist", {
|
|
163
247
|
id: "automation-condition-fields",
|
|
164
|
-
children:
|
|
248
|
+
children: u.map((e) => /* @__PURE__ */ D("option", { value: e }, e))
|
|
165
249
|
}),
|
|
166
|
-
/* @__PURE__ */
|
|
250
|
+
/* @__PURE__ */ O(k, {
|
|
167
251
|
type: "button",
|
|
168
252
|
size: "sm",
|
|
169
253
|
variant: "outline",
|
|
@@ -173,26 +257,84 @@ function w({ conditions: e, onChange: t }) {
|
|
|
173
257
|
value: ""
|
|
174
258
|
}]),
|
|
175
259
|
"data-testid": "automation-add-condition",
|
|
176
|
-
children: [/* @__PURE__ */
|
|
260
|
+
children: [/* @__PURE__ */ D(T, { className: "mr-1 h-4 w-4" }), "Add condition"]
|
|
177
261
|
}),
|
|
178
|
-
e.length === 0 && /* @__PURE__ */
|
|
262
|
+
e.length === 0 && /* @__PURE__ */ D("p", {
|
|
179
263
|
className: "text-xs text-muted-foreground",
|
|
180
264
|
children: "No conditions: the rule matches every event."
|
|
181
265
|
})
|
|
182
266
|
]
|
|
183
267
|
});
|
|
184
268
|
}
|
|
185
|
-
function
|
|
186
|
-
|
|
269
|
+
function B({ statuses: e, days: t, onStatusesChange: i, onDaysChange: a }) {
|
|
270
|
+
let o = (t) => i(e.includes(t) ? e.filter((e) => e !== t) : [...e, t]), s = y(t);
|
|
271
|
+
return /* @__PURE__ */ O("div", {
|
|
272
|
+
className: "space-y-3",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ O("div", { children: [
|
|
275
|
+
/* @__PURE__ */ D("p", {
|
|
276
|
+
className: "text-sm font-medium",
|
|
277
|
+
children: "Statuses"
|
|
278
|
+
}),
|
|
279
|
+
/* @__PURE__ */ D("div", {
|
|
280
|
+
"data-testid": "automation-schedule-statuses",
|
|
281
|
+
role: "group",
|
|
282
|
+
"aria-label": "Statuses to watch",
|
|
283
|
+
className: "mt-1 flex flex-wrap gap-2",
|
|
284
|
+
children: n.map((t) => /* @__PURE__ */ O("label", {
|
|
285
|
+
className: "flex items-center gap-1.5 rounded-md border border-input px-2 py-1 text-sm",
|
|
286
|
+
children: [/* @__PURE__ */ D(A, {
|
|
287
|
+
checked: e.includes(t),
|
|
288
|
+
onCheckedChange: () => o(t),
|
|
289
|
+
"aria-label": r(t)
|
|
290
|
+
}), r(t)]
|
|
291
|
+
}, t))
|
|
292
|
+
}),
|
|
293
|
+
e.length === 0 && /* @__PURE__ */ D("p", {
|
|
294
|
+
className: "mt-1 text-xs text-destructive",
|
|
295
|
+
children: "Choose at least one status."
|
|
296
|
+
})
|
|
297
|
+
] }),
|
|
298
|
+
/* @__PURE__ */ O("div", { children: [
|
|
299
|
+
/* @__PURE__ */ D("label", {
|
|
300
|
+
htmlFor: "automation-schedule-days",
|
|
301
|
+
className: "text-sm font-medium",
|
|
302
|
+
children: "Not updated for (days)"
|
|
303
|
+
}),
|
|
304
|
+
/* @__PURE__ */ D(j, {
|
|
305
|
+
id: "automation-schedule-days",
|
|
306
|
+
"data-testid": "automation-schedule-days",
|
|
307
|
+
inputMode: "numeric",
|
|
308
|
+
pattern: "[0-9]*",
|
|
309
|
+
className: `mt-1 w-28 ${F}`,
|
|
310
|
+
value: t,
|
|
311
|
+
onChange: (e) => a(e.target.value),
|
|
312
|
+
placeholder: "e.g. 7"
|
|
313
|
+
}),
|
|
314
|
+
t !== "" && s === null && /* @__PURE__ */ D("p", {
|
|
315
|
+
className: "mt-1 text-xs text-destructive",
|
|
316
|
+
children: "Enter a whole number of days, 1 or more."
|
|
317
|
+
})
|
|
318
|
+
] }),
|
|
319
|
+
/* @__PURE__ */ D("p", {
|
|
320
|
+
className: "text-xs text-muted-foreground",
|
|
321
|
+
children: "Runs once a day against every work item matching these statuses and staleness window, and acts on each matching item at most once per day."
|
|
322
|
+
})
|
|
323
|
+
]
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
function V({ form: e, onChange: t, projectLocked: n = !1 }) {
|
|
327
|
+
let r = C(e.triggerType), a = e.triggerType === "SCHEDULE";
|
|
328
|
+
return /* @__PURE__ */ O("div", {
|
|
187
329
|
className: "space-y-4",
|
|
188
330
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
190
332
|
htmlFor: "automation-name",
|
|
191
333
|
className: "text-sm font-medium",
|
|
192
334
|
children: "Name"
|
|
193
|
-
}), /* @__PURE__ */
|
|
335
|
+
}), /* @__PURE__ */ D(j, {
|
|
194
336
|
id: "automation-name",
|
|
195
|
-
className: `mt-1 ${
|
|
337
|
+
className: `mt-1 ${F}`,
|
|
196
338
|
value: e.name,
|
|
197
339
|
onChange: (n) => t({
|
|
198
340
|
...e,
|
|
@@ -200,11 +342,11 @@ function T({ form: e, onChange: t, projectLocked: n = !1 }) {
|
|
|
200
342
|
}),
|
|
201
343
|
placeholder: "e.g. Assign new bugs to triage"
|
|
202
344
|
})] }),
|
|
203
|
-
/* @__PURE__ */
|
|
345
|
+
/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
204
346
|
htmlFor: "automation-description",
|
|
205
347
|
className: "text-sm font-medium",
|
|
206
348
|
children: "Description"
|
|
207
|
-
}), /* @__PURE__ */
|
|
349
|
+
}), /* @__PURE__ */ D("textarea", {
|
|
208
350
|
id: "automation-description",
|
|
209
351
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm min-h-[72px]",
|
|
210
352
|
value: e.description,
|
|
@@ -214,18 +356,18 @@ function T({ form: e, onChange: t, projectLocked: n = !1 }) {
|
|
|
214
356
|
}),
|
|
215
357
|
placeholder: "What this rule is for"
|
|
216
358
|
})] }),
|
|
217
|
-
/* @__PURE__ */
|
|
359
|
+
/* @__PURE__ */ O("div", {
|
|
218
360
|
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
361
|
+
children: [/* @__PURE__ */ O("div", { children: [/* @__PURE__ */ D("label", {
|
|
220
362
|
htmlFor: "automation-project",
|
|
221
363
|
className: "text-sm font-medium",
|
|
222
364
|
children: "Project"
|
|
223
|
-
}), n ? /* @__PURE__ */
|
|
365
|
+
}), n ? /* @__PURE__ */ D("p", {
|
|
224
366
|
className: "mt-1 text-sm text-muted-foreground",
|
|
225
367
|
children: "A rule's project cannot be changed after it is created."
|
|
226
|
-
}) : /* @__PURE__ */
|
|
368
|
+
}) : /* @__PURE__ */ D("div", {
|
|
227
369
|
className: "mt-1",
|
|
228
|
-
children: /* @__PURE__ */
|
|
370
|
+
children: /* @__PURE__ */ D(i, {
|
|
229
371
|
id: "automation-project",
|
|
230
372
|
value: e.projectId,
|
|
231
373
|
onChange: (n) => t({
|
|
@@ -233,49 +375,53 @@ function T({ form: e, onChange: t, projectLocked: n = !1 }) {
|
|
|
233
375
|
projectId: n
|
|
234
376
|
})
|
|
235
377
|
})
|
|
236
|
-
})] }), /* @__PURE__ */
|
|
237
|
-
/* @__PURE__ */
|
|
378
|
+
})] }), /* @__PURE__ */ O("div", { children: [
|
|
379
|
+
/* @__PURE__ */ D("label", {
|
|
238
380
|
htmlFor: "automation-trigger",
|
|
239
381
|
className: "text-sm font-medium",
|
|
240
382
|
children: "Trigger"
|
|
241
383
|
}),
|
|
242
|
-
/* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ D("select", {
|
|
243
385
|
id: "automation-trigger",
|
|
244
|
-
className:
|
|
386
|
+
className: P,
|
|
245
387
|
value: e.triggerType,
|
|
246
388
|
onChange: (n) => t({
|
|
247
389
|
...e,
|
|
248
390
|
triggerType: n.target.value
|
|
249
391
|
}),
|
|
250
|
-
children:
|
|
392
|
+
children: g.map((e) => /* @__PURE__ */ O("option", {
|
|
251
393
|
value: e,
|
|
252
|
-
children: [
|
|
394
|
+
children: [_[e], w(e)]
|
|
253
395
|
}, e))
|
|
254
396
|
}),
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
" ",
|
|
260
|
-
/* @__PURE__ */ h("span", {
|
|
261
|
-
className: "font-medium",
|
|
262
|
-
children: "Run now"
|
|
263
|
-
}),
|
|
264
|
-
" to run it against a work item."
|
|
265
|
-
]
|
|
397
|
+
r && /* @__PURE__ */ D("p", {
|
|
398
|
+
"data-testid": "automation-trigger-hint",
|
|
399
|
+
className: `mt-1 text-xs ${p.has(e.triggerType) ? "text-destructive" : "text-muted-foreground"}`,
|
|
400
|
+
children: r
|
|
266
401
|
})
|
|
267
402
|
] })]
|
|
268
403
|
}),
|
|
269
|
-
/* @__PURE__ */
|
|
270
|
-
/* @__PURE__ */
|
|
404
|
+
/* @__PURE__ */ O("div", { children: [
|
|
405
|
+
/* @__PURE__ */ D("p", {
|
|
271
406
|
className: "text-sm font-medium",
|
|
272
|
-
children: "Conditions"
|
|
407
|
+
children: a ? "Schedule conditions" : "Conditions"
|
|
273
408
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
409
|
+
/* @__PURE__ */ D("p", {
|
|
275
410
|
className: "mb-2 text-xs text-muted-foreground",
|
|
276
|
-
children: "All conditions must match. Leave empty to match every event."
|
|
411
|
+
children: a ? "Which work items this schedule watches." : "All conditions must match. Leave empty to match every event."
|
|
277
412
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
413
|
+
a ? /* @__PURE__ */ D(B, {
|
|
414
|
+
statuses: e.scheduleStatuses,
|
|
415
|
+
days: e.scheduleNotUpdatedForDays,
|
|
416
|
+
onStatusesChange: (n) => t({
|
|
417
|
+
...e,
|
|
418
|
+
scheduleStatuses: n
|
|
419
|
+
}),
|
|
420
|
+
onDaysChange: (n) => t({
|
|
421
|
+
...e,
|
|
422
|
+
scheduleNotUpdatedForDays: n
|
|
423
|
+
})
|
|
424
|
+
}) : /* @__PURE__ */ D(z, {
|
|
279
425
|
conditions: e.conditions,
|
|
280
426
|
onChange: (n) => t({
|
|
281
427
|
...e,
|
|
@@ -283,17 +429,18 @@ function T({ form: e, onChange: t, projectLocked: n = !1 }) {
|
|
|
283
429
|
})
|
|
284
430
|
})
|
|
285
431
|
] }),
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
432
|
+
/* @__PURE__ */ O("div", { children: [
|
|
433
|
+
/* @__PURE__ */ D("p", {
|
|
288
434
|
className: "text-sm font-medium",
|
|
289
435
|
children: "Actions"
|
|
290
436
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ D("p", {
|
|
292
438
|
className: "mb-2 text-xs text-muted-foreground",
|
|
293
439
|
children: "Run in order when the conditions match."
|
|
294
440
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
441
|
+
/* @__PURE__ */ D(R, {
|
|
296
442
|
actions: e.actions,
|
|
443
|
+
triggerType: e.triggerType,
|
|
297
444
|
onChange: (n) => t({
|
|
298
445
|
...e,
|
|
299
446
|
actions: n
|
|
@@ -304,6 +451,6 @@ function T({ form: e, onChange: t, projectLocked: n = !1 }) {
|
|
|
304
451
|
});
|
|
305
452
|
}
|
|
306
453
|
//#endregion
|
|
307
|
-
export {
|
|
454
|
+
export { V as AutomationRuleFields };
|
|
308
455
|
|
|
309
456
|
//# sourceMappingURL=AutomationRuleFields.js.map
|