@strapi/review-workflows 5.0.0-rc.7 → 5.0.0-rc.8
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/_chunks/{Layout-Cwbb9usb.js → Layout-B8FL2x6-.js} +7 -8
- package/dist/_chunks/Layout-B8FL2x6-.js.map +1 -0
- package/dist/_chunks/{Layout-BpMLb-Oo.mjs → Layout-Dx59M7TT.mjs} +7 -8
- package/dist/_chunks/Layout-Dx59M7TT.mjs.map +1 -0
- package/dist/_chunks/{_id-KpezMzxO.mjs → _id-AtadE_bb.mjs} +6 -32
- package/dist/_chunks/_id-AtadE_bb.mjs.map +1 -0
- package/dist/_chunks/{_id-p9NnvlMP.js → _id-C-SYBc57.js} +6 -32
- package/dist/_chunks/_id-C-SYBc57.js.map +1 -0
- package/dist/_chunks/{index-BxkGN0Yj.mjs → index-0pB4f3ex.mjs} +3 -3
- package/dist/_chunks/{index-BxkGN0Yj.mjs.map → index-0pB4f3ex.mjs.map} +1 -1
- package/dist/_chunks/{index-DqT_oXGP.js → index-CI4KFjfU.js} +3 -3
- package/dist/_chunks/{index-DqT_oXGP.js.map → index-CI4KFjfU.js.map} +1 -1
- package/dist/_chunks/{index-DtJI5ZoC.mjs → index-CtpGMTO2.mjs} +31 -51
- package/dist/_chunks/index-CtpGMTO2.mjs.map +1 -0
- package/dist/_chunks/{index-BTr8zF-9.js → index-Dj2vG7H2.js} +30 -50
- package/dist/_chunks/index-Dj2vG7H2.js.map +1 -0
- package/dist/_chunks/{router-B8G2sh6V.mjs → router-C6NXX9-N.mjs} +3 -3
- package/dist/_chunks/{router-B8G2sh6V.mjs.map → router-C6NXX9-N.mjs.map} +1 -1
- package/dist/_chunks/{router-Bqj-105s.js → router-Co81pRA9.js} +3 -3
- package/dist/_chunks/{router-Bqj-105s.js.map → router-Co81pRA9.js.map} +1 -1
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/services/settings.d.ts +1731 -5
- package/dist/server/index.js +0 -41
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +0 -41
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/controllers/index.d.ts +0 -1
- package/dist/server/src/controllers/index.d.ts.map +1 -1
- package/dist/server/src/controllers/workflows.d.ts +0 -7
- package/dist/server/src/controllers/workflows.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +0 -1
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/routes/review-workflows.d.ts.map +1 -1
- package/dist/shared/contracts/review-workflows.d.ts +1 -14
- package/dist/shared/contracts/review-workflows.d.ts.map +1 -1
- package/package.json +6 -6
- package/dist/_chunks/Layout-BpMLb-Oo.mjs.map +0 -1
- package/dist/_chunks/Layout-Cwbb9usb.js.map +0 -1
- package/dist/_chunks/_id-KpezMzxO.mjs.map +0 -1
- package/dist/_chunks/_id-p9NnvlMP.js.map +0 -1
- package/dist/_chunks/index-BTr8zF-9.js.map +0 -1
- package/dist/_chunks/index-DtJI5ZoC.mjs.map +0 -1
|
@@ -82,7 +82,8 @@ const contentManagerApi = reviewWorkflowsApi.injectEndpoints({
|
|
|
82
82
|
type: "Document",
|
|
83
83
|
id: slug !== SINGLE_TYPES ? `${model}_${id}` : model
|
|
84
84
|
},
|
|
85
|
-
{ type: "Document", id: `${model}_LIST` }
|
|
85
|
+
{ type: "Document", id: `${model}_LIST` },
|
|
86
|
+
"ReviewWorkflowStages"
|
|
86
87
|
];
|
|
87
88
|
}
|
|
88
89
|
}),
|
|
@@ -175,7 +176,6 @@ const AssigneeSelect = () => {
|
|
|
175
176
|
id,
|
|
176
177
|
slug: model = ""
|
|
177
178
|
} = reactRouterDom.useParams();
|
|
178
|
-
const dispatch = reactRedux.useDispatch();
|
|
179
179
|
const permissions = useTypedSelector((state) => state.admin_app.permissions);
|
|
180
180
|
const { formatMessage } = reactIntl.useIntl();
|
|
181
181
|
const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
|
|
@@ -219,15 +219,6 @@ const AssigneeSelect = () => {
|
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
221
|
if ("data" in res) {
|
|
222
|
-
dispatch({
|
|
223
|
-
type: "contentManagerApi/invalidateTags",
|
|
224
|
-
payload: [
|
|
225
|
-
{
|
|
226
|
-
type: "Document",
|
|
227
|
-
id: `${model}_${id}`
|
|
228
|
-
}
|
|
229
|
-
]
|
|
230
|
-
});
|
|
231
222
|
toggleNotification({
|
|
232
223
|
type: "success",
|
|
233
224
|
message: formatMessage({
|
|
@@ -395,7 +386,6 @@ const StageSelect = () => {
|
|
|
395
386
|
slug: model = "",
|
|
396
387
|
id = ""
|
|
397
388
|
} = reactRouterDom.useParams();
|
|
398
|
-
const dispatch = reactRedux.useDispatch();
|
|
399
389
|
const { formatMessage } = reactIntl.useIntl();
|
|
400
390
|
const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
|
|
401
391
|
const { toggleNotification } = strapiAdmin.useNotification();
|
|
@@ -444,15 +434,6 @@ const StageSelect = () => {
|
|
|
444
434
|
data: { id: stageId }
|
|
445
435
|
});
|
|
446
436
|
if ("data" in res) {
|
|
447
|
-
dispatch({
|
|
448
|
-
type: "contentManagerApi/invalidateTags",
|
|
449
|
-
payload: [
|
|
450
|
-
{
|
|
451
|
-
type: "Document",
|
|
452
|
-
id: `${model}_${id}`
|
|
453
|
-
}
|
|
454
|
-
]
|
|
455
|
-
});
|
|
456
437
|
toggleNotification({
|
|
457
438
|
type: "success",
|
|
458
439
|
message: formatMessage({
|
|
@@ -610,36 +591,25 @@ const settingsApi = reviewWorkflowsApi.injectEndpoints({
|
|
|
610
591
|
endpoints: (builder) => ({
|
|
611
592
|
getWorkflows: builder.query({
|
|
612
593
|
query: (args) => {
|
|
613
|
-
const { id, ...params } = args ?? {};
|
|
614
594
|
return {
|
|
615
|
-
url:
|
|
595
|
+
url: "/review-workflows/workflows",
|
|
616
596
|
method: "GET",
|
|
617
597
|
config: {
|
|
618
|
-
params
|
|
598
|
+
params: args ?? {}
|
|
619
599
|
}
|
|
620
600
|
};
|
|
621
601
|
},
|
|
622
602
|
transformResponse: (res) => {
|
|
623
|
-
let workflows = [];
|
|
624
|
-
if (Array.isArray(res.data)) {
|
|
625
|
-
workflows = res.data;
|
|
626
|
-
} else {
|
|
627
|
-
workflows = [res.data];
|
|
628
|
-
}
|
|
629
603
|
return {
|
|
630
|
-
workflows,
|
|
604
|
+
workflows: res.data,
|
|
631
605
|
meta: "meta" in res ? res.meta : void 0
|
|
632
606
|
};
|
|
633
607
|
},
|
|
634
|
-
providesTags: (res
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
...res?.workflows.map(({ id }) => ({ type: "ReviewWorkflow", id })) ?? [],
|
|
640
|
-
{ type: "ReviewWorkflow", id: "LIST" }
|
|
641
|
-
];
|
|
642
|
-
}
|
|
608
|
+
providesTags: (res) => {
|
|
609
|
+
return [
|
|
610
|
+
...res?.workflows.map(({ id }) => ({ type: "ReviewWorkflow", id })) ?? [],
|
|
611
|
+
{ type: "ReviewWorkflow", id: "LIST" }
|
|
612
|
+
];
|
|
643
613
|
}
|
|
644
614
|
}),
|
|
645
615
|
createWorkflow: builder.mutation({
|
|
@@ -649,12 +619,18 @@ const settingsApi = reviewWorkflowsApi.injectEndpoints({
|
|
|
649
619
|
data
|
|
650
620
|
}),
|
|
651
621
|
transformResponse: (res) => res.data,
|
|
652
|
-
invalidatesTags
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
622
|
+
invalidatesTags(res) {
|
|
623
|
+
return [
|
|
624
|
+
{ type: "ReviewWorkflow", id: "LIST" },
|
|
625
|
+
"ReviewWorkflowStages",
|
|
626
|
+
{ type: "Document", id: `ALL_LIST` },
|
|
627
|
+
{ type: "ContentTypeSettings", id: "LIST" },
|
|
628
|
+
...res?.contentTypes.map((uid) => ({
|
|
629
|
+
type: "Document",
|
|
630
|
+
id: `${uid}_ALL_ITEMS`
|
|
631
|
+
})) ?? []
|
|
632
|
+
];
|
|
633
|
+
}
|
|
658
634
|
}),
|
|
659
635
|
updateWorkflow: builder.mutation({
|
|
660
636
|
query: ({ id, ...data }) => ({
|
|
@@ -666,8 +642,12 @@ const settingsApi = reviewWorkflowsApi.injectEndpoints({
|
|
|
666
642
|
invalidatesTags: (res, _err, arg) => [
|
|
667
643
|
{ type: "ReviewWorkflow", id: arg.id },
|
|
668
644
|
"ReviewWorkflowStages",
|
|
669
|
-
{ type: "Document", id:
|
|
670
|
-
{ type: "ContentTypeSettings", id: "LIST" }
|
|
645
|
+
{ type: "Document", id: "ALL_LIST" },
|
|
646
|
+
{ type: "ContentTypeSettings", id: "LIST" },
|
|
647
|
+
...res?.contentTypes.map((uid) => ({
|
|
648
|
+
type: "Document",
|
|
649
|
+
id: `${uid}_ALL_ITEMS`
|
|
650
|
+
})) ?? []
|
|
671
651
|
]
|
|
672
652
|
}),
|
|
673
653
|
deleteWorkflow: builder.mutation({
|
|
@@ -790,7 +770,7 @@ const admin = {
|
|
|
790
770
|
},
|
|
791
771
|
permissions: [],
|
|
792
772
|
async Component() {
|
|
793
|
-
const { Router } = await Promise.resolve().then(() => require("./router-
|
|
773
|
+
const { Router } = await Promise.resolve().then(() => require("./router-Co81pRA9.js"));
|
|
794
774
|
return { default: Router };
|
|
795
775
|
}
|
|
796
776
|
});
|
|
@@ -844,4 +824,4 @@ exports.useGetContentTypesQuery = useGetContentTypesQuery;
|
|
|
844
824
|
exports.useGetWorkflowsQuery = useGetWorkflowsQuery;
|
|
845
825
|
exports.useTypedSelector = useTypedSelector;
|
|
846
826
|
exports.useUpdateWorkflowMutation = useUpdateWorkflowMutation;
|
|
847
|
-
//# sourceMappingURL=index-
|
|
827
|
+
//# sourceMappingURL=index-Dj2vG7H2.js.map
|