@industry-theme/backlogmd-kanban-panel 1.2.11 → 1.2.12
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/panels.bundle.js
CHANGED
|
@@ -6336,7 +6336,7 @@ function gt(o, e, t, r2) {
|
|
|
6336
6336
|
};
|
|
6337
6337
|
}, [o, e, t, r2]);
|
|
6338
6338
|
}
|
|
6339
|
-
const version = "1.2.
|
|
6339
|
+
const version = "1.2.11";
|
|
6340
6340
|
const packageJson = {
|
|
6341
6341
|
version
|
|
6342
6342
|
};
|
|
@@ -54092,7 +54092,8 @@ const TaskDetailPanel = ({
|
|
|
54092
54092
|
context: context2,
|
|
54093
54093
|
events: events2,
|
|
54094
54094
|
actions,
|
|
54095
|
-
config
|
|
54095
|
+
config,
|
|
54096
|
+
core: coreProp
|
|
54096
54097
|
}) => {
|
|
54097
54098
|
var _a, _b;
|
|
54098
54099
|
const {
|
|
@@ -54111,6 +54112,13 @@ const TaskDetailPanel = ({
|
|
|
54111
54112
|
const {
|
|
54112
54113
|
editable = false
|
|
54113
54114
|
} = config ?? {};
|
|
54115
|
+
const {
|
|
54116
|
+
core: hookCore
|
|
54117
|
+
} = useBacklogCore({
|
|
54118
|
+
context: context2,
|
|
54119
|
+
actions
|
|
54120
|
+
});
|
|
54121
|
+
const core2 = coreProp ?? hookCore;
|
|
54114
54122
|
gt("task-detail", events2, () => {
|
|
54115
54123
|
var _a2;
|
|
54116
54124
|
return (_a2 = panelRef.current) == null ? void 0 : _a2.focus();
|
|
@@ -54175,10 +54183,12 @@ const TaskDetailPanel = ({
|
|
|
54175
54183
|
const handleDeleteConfirm = useCallback(async () => {
|
|
54176
54184
|
if (!selectedTask) return;
|
|
54177
54185
|
const span = deleteSpanRef.current;
|
|
54178
|
-
|
|
54186
|
+
const canDeleteWithCore = Boolean(core2);
|
|
54187
|
+
const canDeleteWithActions = Boolean(actions == null ? void 0 : actions.deleteTask);
|
|
54188
|
+
if (!canDeleteWithCore && !canDeleteWithActions) {
|
|
54179
54189
|
setDeleteState({
|
|
54180
54190
|
status: "error",
|
|
54181
|
-
error: "Delete
|
|
54191
|
+
error: "Delete not available"
|
|
54182
54192
|
});
|
|
54183
54193
|
if (span) {
|
|
54184
54194
|
span.addEvent("task.deleted", {
|
|
@@ -54187,12 +54197,12 @@ const TaskDetailPanel = ({
|
|
|
54187
54197
|
span.addEvent("task.save.error", {
|
|
54188
54198
|
"task.id": selectedTask.id,
|
|
54189
54199
|
"operation": "delete",
|
|
54190
|
-
"error.type": "
|
|
54191
|
-
"error.message": "
|
|
54200
|
+
"error.type": "DeleteNotAvailable",
|
|
54201
|
+
"error.message": "Neither Core nor deleteTask action available"
|
|
54192
54202
|
});
|
|
54193
54203
|
span.setStatus({
|
|
54194
54204
|
code: SpanStatusCode.ERROR,
|
|
54195
|
-
message: "Delete
|
|
54205
|
+
message: "Delete not available"
|
|
54196
54206
|
});
|
|
54197
54207
|
span.end();
|
|
54198
54208
|
deleteSpanRef.current = null;
|
|
@@ -54203,10 +54213,15 @@ const TaskDetailPanel = ({
|
|
|
54203
54213
|
status: "loading"
|
|
54204
54214
|
});
|
|
54205
54215
|
try {
|
|
54206
|
-
|
|
54216
|
+
if (core2) {
|
|
54217
|
+
await core2.deleteTask(selectedTask.id);
|
|
54218
|
+
} else if (actions == null ? void 0 : actions.deleteTask) {
|
|
54219
|
+
await actions.deleteTask(selectedTask.id);
|
|
54220
|
+
}
|
|
54207
54221
|
if (span) {
|
|
54208
54222
|
span.addEvent("task.deleted", {
|
|
54209
|
-
"task.id": selectedTask.id
|
|
54223
|
+
"task.id": selectedTask.id,
|
|
54224
|
+
"delete.method": core2 ? "core" : "actions"
|
|
54210
54225
|
});
|
|
54211
54226
|
span.setStatus({
|
|
54212
54227
|
code: SpanStatusCode.OK
|
|
@@ -54256,7 +54271,7 @@ const TaskDetailPanel = ({
|
|
|
54256
54271
|
deleteSpanRef.current = null;
|
|
54257
54272
|
}
|
|
54258
54273
|
}
|
|
54259
|
-
}, [actions, selectedTask, events2]);
|
|
54274
|
+
}, [core2, actions, selectedTask, events2]);
|
|
54260
54275
|
const handleDeleteCancel = useCallback(() => {
|
|
54261
54276
|
const span = deleteSpanRef.current;
|
|
54262
54277
|
if (span) {
|