@primershop/strapi-plugin-product-actions 0.0.4 → 0.0.7

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 (42) hide show
  1. package/dist/admin/index.js +260 -7
  2. package/dist/admin/index.js.map +1 -1
  3. package/dist/admin/index.mjs +256 -3
  4. package/dist/admin/index.mjs.map +1 -1
  5. package/dist/server/index.js +1 -4
  6. package/dist/server/index.js.map +1 -1
  7. package/dist/server/index.mjs +1 -1
  8. package/dist/server/index.mjs.map +1 -1
  9. package/package.json +3 -2
  10. package/dist/admin/components/Initializer/index.js +0 -17
  11. package/dist/admin/components/Initializer/index.js.map +0 -1
  12. package/dist/admin/components/Initializer/index.mjs +0 -15
  13. package/dist/admin/components/Initializer/index.mjs.map +0 -1
  14. package/dist/admin/components/SeriesProductActions/index.js +0 -229
  15. package/dist/admin/components/SeriesProductActions/index.js.map +0 -1
  16. package/dist/admin/components/SeriesProductActions/index.mjs +0 -227
  17. package/dist/admin/components/SeriesProductActions/index.mjs.map +0 -1
  18. package/dist/admin/pluginId.js +0 -6
  19. package/dist/admin/pluginId.js.map +0 -1
  20. package/dist/admin/pluginId.mjs +0 -4
  21. package/dist/admin/pluginId.mjs.map +0 -1
  22. package/dist/admin/src/components/Initializer/index.js +0 -13
  23. package/dist/admin/src/components/SeriesProductActions/index.js +0 -84
  24. package/dist/admin/src/index.js +0 -22
  25. package/dist/admin/src/pluginId.js +0 -1
  26. package/dist/admin/src/translations/en.js +0 -21
  27. package/dist/admin/src/translations/index.js +0 -1
  28. package/dist/admin/translations/en.js +0 -25
  29. package/dist/admin/translations/en.js.map +0 -1
  30. package/dist/admin/translations/en.mjs +0 -23
  31. package/dist/admin/translations/en.mjs.map +0 -1
  32. package/dist/server/src/bootstrap.js +0 -16
  33. package/dist/server/src/controllers/index.js +0 -10
  34. package/dist/server/src/controllers/product-series.js +0 -31
  35. package/dist/server/src/index.js +0 -20
  36. package/dist/server/src/permissions.js +0 -42
  37. package/dist/server/src/pluginId.js +0 -4
  38. package/dist/server/src/register.js +0 -14
  39. package/dist/server/src/routes/admin.js +0 -37
  40. package/dist/server/src/routes/index.js +0 -9
  41. package/dist/server/src/services/index.js +0 -7
  42. package/dist/server/src/services/product-series.js +0 -116
@@ -1,227 +0,0 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useState } from 'react';
3
- import { Box, Typography, Flex, Dialog, Button, NumberInput, MultiSelect, MultiSelectOption } from '@strapi/design-system';
4
- import { unstable_useContentManagerContext, useFetchClient } from '@strapi/strapi/admin';
5
- import { en } from '../../translations/en.mjs';
6
-
7
- const formatMessage = (arg)=>{
8
- return en[arg.id];
9
- };
10
- const valuesToUpdate = [
11
- "description",
12
- "shortDescription",
13
- "media",
14
- "coverImage",
15
- "seo",
16
- "totalCost",
17
- "wholesalePrice",
18
- "retailPrice",
19
- "category",
20
- "creator"
21
- ];
22
- const SeriesProductActions = ({ document })=>{
23
- const { model } = unstable_useContentManagerContext();
24
- const documentId = document?.documentId;
25
- const [productCount, setProductCount] = useState(1);
26
- const [isLoading, setIsLoading] = useState(false);
27
- const [fieldsToUpdate, setFieldsToUpdate] = useState([]);
28
- const { post, put } = useFetchClient();
29
- if (model !== "api::product-series.product-series") return null;
30
- const handleCreateProducts = async ()=>{
31
- try {
32
- setIsLoading(true);
33
- const response = await post(`primershop-product-actions/create-products`, {
34
- count: productCount,
35
- id: documentId
36
- });
37
- if (!response.data) {
38
- throw new Error("Failed to create products");
39
- }
40
- setProductCount(1);
41
- } catch (error) {
42
- console.error("Error creating products:", error);
43
- } finally{
44
- setIsLoading(false);
45
- }
46
- };
47
- const handleUpdateProducts = async ()=>{
48
- try {
49
- setIsLoading(true);
50
- const response = await put(`/primershop-product-actions/update-products`, {
51
- seriesId: documentId,
52
- fieldsToUpdate
53
- });
54
- if (!response.data) {
55
- throw new Error("Failed to update products");
56
- }
57
- } catch (error) {
58
- console.error("Error updating products:", error);
59
- } finally{
60
- setIsLoading(false);
61
- }
62
- };
63
- return {
64
- title: "Series Product Actions",
65
- content: /*#__PURE__*/ jsx(Box, {
66
- children: /*#__PURE__*/ jsxs(Box, {
67
- children: [
68
- /*#__PURE__*/ jsx(Typography, {
69
- variant: "delta",
70
- fontWeight: "bold",
71
- children: formatMessage({
72
- id: "product-series.actions.label"
73
- })
74
- }),
75
- /*#__PURE__*/ jsxs(Flex, {
76
- wrap: "wrap",
77
- children: [
78
- !documentId && /*#__PURE__*/ jsx(Typography, {
79
- display: "block",
80
- marginTop: 2,
81
- marginBottom: 2,
82
- width: "100%",
83
- color: "red",
84
- children: formatMessage({
85
- id: "product-series.actions.noDocumentId"
86
- })
87
- }),
88
- /*#__PURE__*/ jsxs(Dialog.Root, {
89
- children: [
90
- /*#__PURE__*/ jsx(Dialog.Trigger, {
91
- children: /*#__PURE__*/ jsx(Button, {
92
- variant: "secondary",
93
- disabled: isLoading || !documentId,
94
- children: formatMessage({
95
- id: "product-series.actions.createProducts"
96
- })
97
- })
98
- }),
99
- /*#__PURE__*/ jsxs(Dialog.Content, {
100
- children: [
101
- /*#__PURE__*/ jsx(Dialog.Body, {
102
- children: /*#__PURE__*/ jsxs(Box, {
103
- children: [
104
- /*#__PURE__*/ jsx(Typography, {
105
- children: formatMessage({
106
- id: "product-series.actions.createDialogTitle"
107
- })
108
- }),
109
- /*#__PURE__*/ jsx(NumberInput, {
110
- value: productCount,
111
- onValueChange: (value)=>setProductCount(value || 1),
112
- min: 1,
113
- max: 100
114
- })
115
- ]
116
- })
117
- }),
118
- /*#__PURE__*/ jsxs(Dialog.Footer, {
119
- children: [
120
- /*#__PURE__*/ jsx(Dialog.Cancel, {
121
- children: /*#__PURE__*/ jsx(Button, {
122
- fullWidth: true,
123
- variant: "tertiary",
124
- children: "Cancel"
125
- })
126
- }),
127
- /*#__PURE__*/ jsx(Dialog.Action, {
128
- children: /*#__PURE__*/ jsx(Button, {
129
- onClick: handleCreateProducts,
130
- variant: "default",
131
- loading: isLoading,
132
- children: formatMessage({
133
- id: "product-series.actions.create"
134
- })
135
- })
136
- })
137
- ]
138
- })
139
- ]
140
- })
141
- ]
142
- }),
143
- /*#__PURE__*/ jsxs(Dialog.Root, {
144
- children: [
145
- /*#__PURE__*/ jsx(Dialog.Trigger, {
146
- children: /*#__PURE__*/ jsx(Button, {
147
- marginLeft: 2,
148
- variant: "secondary",
149
- disabled: isLoading || !documentId,
150
- children: formatMessage({
151
- id: "product-series.actions.updateProducts"
152
- })
153
- })
154
- }),
155
- /*#__PURE__*/ jsxs(Dialog.Content, {
156
- children: [
157
- /*#__PURE__*/ jsxs(Dialog.Body, {
158
- display: "flex",
159
- direction: "column",
160
- gap: 2,
161
- justifyContent: "center",
162
- alignItems: "center",
163
- width: "100%",
164
- children: [
165
- /*#__PURE__*/ jsx(Typography, {
166
- variant: "delta",
167
- fontWeight: "bold",
168
- children: formatMessage({
169
- id: "product-series.actions.updateDialogTitle"
170
- })
171
- }),
172
- /*#__PURE__*/ jsx(Typography, {
173
- children: formatMessage({
174
- id: "product-series.actions.updateDialogDescription"
175
- })
176
- }),
177
- /*#__PURE__*/ jsx(MultiSelect, {
178
- withTags: true,
179
- value: fieldsToUpdate,
180
- onClear: ()=>setFieldsToUpdate([]),
181
- onChange: (value)=>setFieldsToUpdate(value),
182
- required: true,
183
- placeholder: formatMessage({
184
- id: "product-series.actions.selectFields"
185
- }),
186
- children: valuesToUpdate.map((field)=>/*#__PURE__*/ jsx(MultiSelectOption, {
187
- value: field,
188
- children: field
189
- }, field))
190
- })
191
- ]
192
- }),
193
- /*#__PURE__*/ jsxs(Dialog.Footer, {
194
- children: [
195
- /*#__PURE__*/ jsx(Dialog.Cancel, {
196
- children: /*#__PURE__*/ jsx(Button, {
197
- fullWidth: true,
198
- variant: "tertiary",
199
- children: "Cancel"
200
- })
201
- }),
202
- /*#__PURE__*/ jsx(Dialog.Action, {
203
- children: /*#__PURE__*/ jsx(Button, {
204
- onClick: handleUpdateProducts,
205
- variant: "default",
206
- loading: isLoading,
207
- children: formatMessage({
208
- id: "product-series.actions.update"
209
- })
210
- })
211
- })
212
- ]
213
- })
214
- ]
215
- })
216
- ]
217
- })
218
- ]
219
- })
220
- ]
221
- })
222
- })
223
- };
224
- };
225
-
226
- export { SeriesProductActions };
227
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../../admin/src/components/SeriesProductActions/index.tsx"],"sourcesContent":["import React, { useState } from \"react\";\r\n\r\nimport {\r\n Box,\r\n Button,\r\n Typography,\r\n Dialog,\r\n NumberInput,\r\n Flex,\r\n MultiSelect,\r\n MultiSelectOption,\r\n} from \"@strapi/design-system\";\r\nimport {\r\n useFetchClient,\r\n unstable_useContentManagerContext as useContentManagerContext,\r\n} from \"@strapi/strapi/admin\";\r\n\r\nimport { en } from \"../../translations\";\r\n\r\nconst formatMessage = (arg: { id: string }): string => {\r\n return en[arg.id];\r\n};\r\n\r\nconst valuesToUpdate = [\r\n \"description\",\r\n \"shortDescription\",\r\n \"media\",\r\n \"coverImage\",\r\n \"seo\",\r\n \"totalCost\",\r\n \"wholesalePrice\",\r\n \"retailPrice\",\r\n \"category\",\r\n \"creator\",\r\n];\r\n\r\ninterface Document {\r\n documentId?: string;\r\n}\r\n\r\nconst SeriesProductActions = ({ document }: { document: Document }) => {\r\n const { model } = useContentManagerContext();\r\n const documentId = document?.documentId;\r\n const [productCount, setProductCount] = useState(1);\r\n const [isLoading, setIsLoading] = useState(false);\r\n const [fieldsToUpdate, setFieldsToUpdate] = useState<string[]>([]);\r\n const { post, put } = useFetchClient();\r\n\r\n if (model !== \"api::product-series.product-series\") return null;\r\n\r\n const handleCreateProducts = async () => {\r\n try {\r\n setIsLoading(true);\r\n const response = await post(\r\n `primershop-product-actions/create-products`,\r\n {\r\n count: productCount,\r\n id: documentId,\r\n }\r\n );\r\n\r\n if (!response.data) {\r\n throw new Error(\"Failed to create products\");\r\n }\r\n\r\n setProductCount(1);\r\n } catch (error) {\r\n console.error(\"Error creating products:\", error);\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n };\r\n\r\n const handleUpdateProducts = async () => {\r\n try {\r\n setIsLoading(true);\r\n const response = await put(\r\n `/primershop-product-actions/update-products`,\r\n {\r\n seriesId: documentId,\r\n fieldsToUpdate,\r\n }\r\n );\r\n\r\n if (!response.data) {\r\n throw new Error(\"Failed to update products\");\r\n }\r\n } catch (error) {\r\n console.error(\"Error updating products:\", error);\r\n } finally {\r\n setIsLoading(false);\r\n }\r\n };\r\n return {\r\n title: \"Series Product Actions\",\r\n content: (\r\n <Box>\r\n <Box>\r\n <Typography variant=\"delta\" fontWeight=\"bold\">\r\n {formatMessage({ id: \"product-series.actions.label\" })}\r\n </Typography>\r\n <Flex wrap={\"wrap\"}>\r\n {!documentId && (\r\n <Typography\r\n display={\"block\"}\r\n marginTop={2}\r\n marginBottom={2}\r\n width=\"100%\"\r\n color=\"red\"\r\n >\r\n {formatMessage({ id: \"product-series.actions.noDocumentId\" })}\r\n </Typography>\r\n )}\r\n\r\n <Dialog.Root>\r\n <Dialog.Trigger>\r\n <Button variant=\"secondary\" disabled={isLoading || !documentId}>\r\n {formatMessage({\r\n id: \"product-series.actions.createProducts\",\r\n })}\r\n </Button>\r\n </Dialog.Trigger>\r\n <Dialog.Content>\r\n <Dialog.Body>\r\n <Box>\r\n <Typography>\r\n {formatMessage({\r\n id: \"product-series.actions.createDialogTitle\",\r\n })}\r\n </Typography>\r\n <NumberInput\r\n value={productCount}\r\n onValueChange={(value) => setProductCount(value || 1)}\r\n min={1}\r\n max={100}\r\n ></NumberInput>\r\n </Box>\r\n </Dialog.Body>\r\n <Dialog.Footer>\r\n <Dialog.Cancel>\r\n <Button fullWidth variant=\"tertiary\">\r\n Cancel\r\n </Button>\r\n </Dialog.Cancel>\r\n <Dialog.Action>\r\n <Button\r\n onClick={handleCreateProducts}\r\n variant=\"default\"\r\n loading={isLoading}\r\n >\r\n {formatMessage({ id: \"product-series.actions.create\" })}\r\n </Button>\r\n </Dialog.Action>\r\n </Dialog.Footer>\r\n </Dialog.Content>\r\n </Dialog.Root>\r\n\r\n {/* Update Products Dialog */}\r\n <Dialog.Root>\r\n <Dialog.Trigger>\r\n <Button\r\n marginLeft={2}\r\n variant=\"secondary\"\r\n disabled={isLoading || !documentId}\r\n >\r\n {formatMessage({\r\n id: \"product-series.actions.updateProducts\",\r\n })}\r\n </Button>\r\n </Dialog.Trigger>\r\n <Dialog.Content>\r\n <Dialog.Body\r\n display={\"flex\"}\r\n direction={\"column\"}\r\n gap={2}\r\n justifyContent={\"center\"}\r\n alignItems={\"center\"}\r\n width={\"100%\"}\r\n >\r\n <Typography variant=\"delta\" fontWeight=\"bold\">\r\n {formatMessage({\r\n id: \"product-series.actions.updateDialogTitle\",\r\n })}\r\n </Typography>\r\n <Typography>\r\n {formatMessage({\r\n id: \"product-series.actions.updateDialogDescription\",\r\n })}\r\n </Typography>\r\n <MultiSelect\r\n withTags={true}\r\n value={fieldsToUpdate}\r\n onClear={() => setFieldsToUpdate([])}\r\n onChange={(value: string[]) => setFieldsToUpdate(value)}\r\n required={true}\r\n placeholder={formatMessage({\r\n id: \"product-series.actions.selectFields\",\r\n })}\r\n >\r\n {valuesToUpdate.map((field) => (\r\n <MultiSelectOption key={field} value={field}>\r\n {field}\r\n </MultiSelectOption>\r\n ))}\r\n </MultiSelect>\r\n </Dialog.Body>\r\n <Dialog.Footer>\r\n <Dialog.Cancel>\r\n <Button fullWidth variant=\"tertiary\">\r\n Cancel\r\n </Button>\r\n </Dialog.Cancel>\r\n <Dialog.Action>\r\n <Button\r\n onClick={handleUpdateProducts}\r\n variant=\"default\"\r\n loading={isLoading}\r\n >\r\n {formatMessage({ id: \"product-series.actions.update\" })}\r\n </Button>\r\n </Dialog.Action>\r\n </Dialog.Footer>\r\n </Dialog.Content>\r\n </Dialog.Root>\r\n </Flex>\r\n </Box>\r\n </Box>\r\n ),\r\n };\r\n};\r\n\r\nexport { SeriesProductActions };\r\n"],"names":["formatMessage","arg","en","id","valuesToUpdate","SeriesProductActions","document","model","useContentManagerContext","documentId","productCount","setProductCount","useState","isLoading","setIsLoading","fieldsToUpdate","setFieldsToUpdate","post","put","useFetchClient","handleCreateProducts","response","count","data","Error","error","console","handleUpdateProducts","seriesId","title","content","_jsx","Box","_jsxs","Typography","variant","fontWeight","Flex","wrap","display","marginTop","marginBottom","width","color","Dialog","Root","Trigger","Button","disabled","Content","Body","NumberInput","value","onValueChange","min","max","Footer","Cancel","fullWidth","Action","onClick","loading","marginLeft","direction","gap","justifyContent","alignItems","MultiSelect","withTags","onClear","onChange","required","placeholder","map","field","MultiSelectOption"],"mappings":";;;;;;AAmBA,MAAMA,gBAAgB,CAACC,GAAAA,GAAAA;AACrB,IAAA,OAAOC,EAAE,CAACD,GAAAA,CAAIE,EAAE,CAAC;AACnB,CAAA;AAEA,MAAMC,cAAAA,GAAiB;AACrB,IAAA,aAAA;AACA,IAAA,kBAAA;AACA,IAAA,OAAA;AACA,IAAA,YAAA;AACA,IAAA,KAAA;AACA,IAAA,WAAA;AACA,IAAA,gBAAA;AACA,IAAA,aAAA;AACA,IAAA,UAAA;AACA,IAAA;AACD,CAAA;AAMD,MAAMC,oBAAAA,GAAuB,CAAC,EAAEC,QAAQ,EAA0B,GAAA;IAChE,MAAM,EAAEC,KAAK,EAAE,GAAGC,iCAAAA,EAAAA;AAClB,IAAA,MAAMC,aAAaH,QAAAA,EAAUG,UAAAA;AAC7B,IAAA,MAAM,CAACC,YAAAA,EAAcC,eAAAA,CAAgB,GAAGC,QAAAA,CAAS,CAAA,CAAA;AACjD,IAAA,MAAM,CAACC,SAAAA,EAAWC,YAAAA,CAAa,GAAGF,QAAAA,CAAS,KAAA,CAAA;AAC3C,IAAA,MAAM,CAACG,cAAAA,EAAgBC,iBAAAA,CAAkB,GAAGJ,SAAmB,EAAE,CAAA;AACjE,IAAA,MAAM,EAAEK,IAAI,EAAEC,GAAG,EAAE,GAAGC,cAAAA,EAAAA;IAEtB,IAAIZ,KAAA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L=pluginId.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pluginId.js","sources":["../../admin/src/pluginId.ts"],"sourcesContent":["export const PLUGIN_ID = \"primershop-product-actions\";\r\n"],"names":["PLUGIN_ID"],"mappings":";;AAAO,MAAMA,YAAY;;;;"}
@@ -1,4 +0,0 @@
1
- const PLUGIN_ID = "primershop-product-actions";
2
-
3
- export { PLUGIN_ID };
4
- //# sourceMappingURL=pluginId.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pluginId.mjs","sources":["../../admin/src/pluginId.ts"],"sourcesContent":["export const PLUGIN_ID = \"primershop-product-actions\";\r\n"],"names":["PLUGIN_ID"],"mappings":"AAAO,MAAMA,YAAY;;;;"}
@@ -1,13 +0,0 @@
1
- import { useEffect, useRef } from "react";
2
- import { PLUGIN_ID } from "../../pluginId";
3
- /**
4
- * @type {import('react').FC<{ setPlugin: (id: string) => void }>}
5
- */
6
- const Initializer = ({ setPlugin }) => {
7
- const ref = useRef(setPlugin);
8
- useEffect(() => {
9
- ref.current(PLUGIN_ID);
10
- }, []);
11
- return null;
12
- };
13
- export { Initializer };
@@ -1,84 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import { Box, Button, Typography, Dialog, NumberInput, Flex, MultiSelect, MultiSelectOption, } from "@strapi/design-system";
4
- import { useFetchClient, unstable_useContentManagerContext as useContentManagerContext, } from "@strapi/strapi/admin";
5
- import { en } from "../../translations";
6
- const formatMessage = (arg) => {
7
- return en[arg.id];
8
- };
9
- const valuesToUpdate = [
10
- "description",
11
- "shortDescription",
12
- "media",
13
- "coverImage",
14
- "seo",
15
- "totalCost",
16
- "wholesalePrice",
17
- "retailPrice",
18
- "category",
19
- "creator",
20
- ];
21
- const SeriesProductActions = ({ document }) => {
22
- const { model } = useContentManagerContext();
23
- const documentId = document?.documentId;
24
- const [productCount, setProductCount] = useState(1);
25
- const [isLoading, setIsLoading] = useState(false);
26
- const [fieldsToUpdate, setFieldsToUpdate] = useState([]);
27
- const { post, put } = useFetchClient();
28
- if (model !== "api::product-series.product-series")
29
- return null;
30
- const handleCreateProducts = async () => {
31
- try {
32
- setIsLoading(true);
33
- const response = await post(`primer-product-actions/create-products`, {
34
- count: productCount,
35
- id: documentId,
36
- });
37
- if (!response.data) {
38
- throw new Error("Failed to create products");
39
- }
40
- setProductCount(1);
41
- }
42
- catch (error) {
43
- console.error("Error creating products:", error);
44
- }
45
- finally {
46
- setIsLoading(false);
47
- }
48
- };
49
- const handleUpdateProducts = async () => {
50
- try {
51
- setIsLoading(true);
52
- const response = await put(`/primer-product-actions/update-products`, {
53
- seriesId: documentId,
54
- fieldsToUpdate,
55
- });
56
- if (!response.data) {
57
- throw new Error("Failed to update products");
58
- }
59
- }
60
- catch (error) {
61
- console.error("Error updating products:", error);
62
- }
63
- finally {
64
- setIsLoading(false);
65
- }
66
- };
67
- return {
68
- title: "Series Product Actions",
69
- content: (_jsx(Box, { children: _jsxs(Box, { children: [_jsx(Typography, { variant: "delta", fontWeight: "bold", children: formatMessage({ id: "product-series.actions.label" }) }), _jsxs(Flex, { wrap: "wrap", children: [!documentId && (_jsx(Typography, { display: "block", marginTop: 2, marginBottom: 2, width: "100%", color: "red", children: formatMessage({ id: "product-series.actions.noDocumentId" }) })), _jsxs(Dialog.Root, { children: [_jsx(Dialog.Trigger, { children: _jsx(Button, { variant: "secondary", disabled: isLoading || !documentId, children: formatMessage({
70
- id: "product-series.actions.createProducts",
71
- }) }) }), _jsxs(Dialog.Content, { children: [_jsx(Dialog.Body, { children: _jsxs(Box, { children: [_jsx(Typography, { children: formatMessage({
72
- id: "product-series.actions.createDialogTitle",
73
- }) }), _jsx(NumberInput, { value: productCount, onValueChange: (value) => setProductCount(value || 1), min: 1, max: 100 })] }) }), _jsxs(Dialog.Footer, { children: [_jsx(Dialog.Cancel, { children: _jsx(Button, { fullWidth: true, variant: "tertiary", children: "Cancel" }) }), _jsx(Dialog.Action, { children: _jsx(Button, { onClick: handleCreateProducts, variant: "default", loading: isLoading, children: formatMessage({ id: "product-series.actions.create" }) }) })] })] })] }), _jsxs(Dialog.Root, { children: [_jsx(Dialog.Trigger, { children: _jsx(Button, { marginLeft: 2, variant: "secondary", disabled: isLoading || !documentId, children: formatMessage({
74
- id: "product-series.actions.updateProducts",
75
- }) }) }), _jsxs(Dialog.Content, { children: [_jsxs(Dialog.Body, { display: "flex", direction: "column", gap: 2, justifyContent: "center", alignItems: "center", width: "100%", children: [_jsx(Typography, { variant: "delta", fontWeight: "bold", children: formatMessage({
76
- id: "product-series.actions.updateDialogTitle",
77
- }) }), _jsx(Typography, { children: formatMessage({
78
- id: "product-series.actions.updateDialogDescription",
79
- }) }), _jsx(MultiSelect, { withTags: true, value: fieldsToUpdate, onClear: () => setFieldsToUpdate([]), onChange: (value) => setFieldsToUpdate(value), required: true, placeholder: formatMessage({
80
- id: "product-series.actions.selectFields",
81
- }), children: valuesToUpdate.map((field) => (_jsx(MultiSelectOption, { value: field, children: field }, field))) })] }), _jsxs(Dialog.Footer, { children: [_jsx(Dialog.Cancel, { children: _jsx(Button, { fullWidth: true, variant: "tertiary", children: "Cancel" }) }), _jsx(Dialog.Action, { children: _jsx(Button, { onClick: handleUpdateProducts, variant: "default", loading: isLoading, children: formatMessage({ id: "product-series.actions.update" }) }) })] })] })] })] })] }) })),
82
- };
83
- };
84
- export { SeriesProductActions };
@@ -1,22 +0,0 @@
1
- import { Initializer } from "./components/Initializer";
2
- import { SeriesProductActions } from "./components/SeriesProductActions";
3
- import { PLUGIN_ID } from "./pluginId";
4
- const plugin = {
5
- register(app) {
6
- app.registerPlugin({
7
- id: PLUGIN_ID,
8
- initializer: Initializer,
9
- isReady: false,
10
- name: PLUGIN_ID,
11
- });
12
- },
13
- bootstrap(app) {
14
- console.log("🚀 ~ bootstrap ~ app:", app);
15
- app
16
- .getPlugin("content-manager")
17
- .apis.addEditViewSidePanel((panels) => {
18
- return [...panels, SeriesProductActions];
19
- });
20
- },
21
- };
22
- export default plugin;
@@ -1 +0,0 @@
1
- export const PLUGIN_ID = "primer-product-actions";
@@ -1,21 +0,0 @@
1
- const en = {
2
- "plugin.name": "Product Series",
3
- "plugin.description": "Manage product series and their products",
4
- "product-series.actions.label": "Product Actions",
5
- "product-series.actions.createProducts": "Create Products",
6
- "product-series.actions.updateProducts": "Update Products",
7
- "product-series.actions.createDialogTitle": "Create Products from Series",
8
- "product-series.actions.updateDialogTitle": "Update All Products in Series",
9
- "product-series.actions.updateDialogDescription": "This will update all products in the series with the selected fields. Make sure to save the series first before updating the products.",
10
- "product-series.actions.productCount": "Number of Products",
11
- "product-series.actions.create": "Create",
12
- "product-series.actions.update": "Update",
13
- "product-series.actions.cancel": "Cancel",
14
- "product-series.actions.createSuccess": "Products created successfully",
15
- "product-series.actions.createError": "Failed to create products",
16
- "product-series.actions.updateSuccess": "Products updated successfully",
17
- "product-series.actions.updateError": "Failed to update products",
18
- "product-series.actions.selectFields": "Select fields to update",
19
- "product-series.actions.noDocumentId": "Save the series first before creating products",
20
- };
21
- export { en };
@@ -1 +0,0 @@
1
- export * from "./en";
@@ -1,25 +0,0 @@
1
- 'use strict';
2
-
3
- const en = {
4
- "plugin.name": "Product Series",
5
- "plugin.description": "Manage product series and their products",
6
- "product-series.actions.label": "Product Actions",
7
- "product-series.actions.createProducts": "Create Products",
8
- "product-series.actions.updateProducts": "Update Products",
9
- "product-series.actions.createDialogTitle": "Create Products from Series",
10
- "product-series.actions.updateDialogTitle": "Update All Products in Series",
11
- "product-series.actions.updateDialogDescription": "This will update all products in the series with the selected fields. Make sure to save the series first before updating the products.",
12
- "product-series.actions.productCount": "Number of Products",
13
- "product-series.actions.create": "Create",
14
- "product-series.actions.update": "Update",
15
- "product-series.actions.cancel": "Cancel",
16
- "product-series.actions.createSuccess": "Products created successfully",
17
- "product-series.actions.createError": "Failed to create products",
18
- "product-series.actions.updateSuccess": "Products updated successfully",
19
- "product-series.actions.updateError": "Failed to update products",
20
- "product-series.actions.selectFields": "Select fields to update",
21
- "product-series.actions.noDocumentId": "Save the series first before creating products"
22
- };
23
-
24
- exports.en = en;
25
- //# sourceMappingURL=en.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"en.js","sources":["../../../admin/src/translations/en.ts"],"sourcesContent":["const en: Record<string, string> = {\r\n \"plugin.name\": \"Product Series\",\r\n \"plugin.description\": \"Manage product series and their products\",\r\n \"product-series.actions.label\": \"Product Actions\",\r\n \"product-series.actions.createProducts\": \"Create Products\",\r\n \"product-series.actions.updateProducts\": \"Update Products\",\r\n \"product-series.actions.createDialogTitle\": \"Create Products from Series\",\r\n \"product-series.actions.updateDialogTitle\": \"Update All Products in Series\",\r\n \"product-series.actions.updateDialogDescription\":\r\n \"This will update all products in the series with the selected fields. Make sure to save the series first before updating the products.\",\r\n \"product-series.actions.productCount\": \"Number of Products\",\r\n \"product-series.actions.create\": \"Create\",\r\n \"product-series.actions.update\": \"Update\",\r\n \"product-series.actions.cancel\": \"Cancel\",\r\n \"product-series.actions.createSuccess\": \"Products created successfully\",\r\n \"product-series.actions.createError\": \"Failed to create products\",\r\n \"product-series.actions.updateSuccess\": \"Products updated successfully\",\r\n \"product-series.actions.updateError\": \"Failed to update products\",\r\n \"product-series.actions.selectFields\": \"Select fields to update\",\r\n \"product-series.actions.noDocumentId\":\r\n \"Save the series first before creating products\",\r\n};\r\n\r\nexport { en };\r\n"],"names":["en"],"mappings":";;AAAA,MAAMA,EAAAA,GAA6B;IACjC,aAAA,EAAe,gBAAA;IACf,oBAAA,EAAsB,0CAAA;IACtB,8BAAA,EAAgC,iBAAA;IAChC,uCAAA,EAAyC,iBAAA;IACzC,uCAAA,EAAyC,iBAAA;IACzC,0CAAA,EAA4C,6BAAA;IAC5C,0CAAA,EAA4C,+BAAA;IAC5C,gDAAA,EACE,wIAAA;IACF,qCAAA,EAAuC,oBAAA;IACvC,+BAAA,EAAiC,QAAA;IACjC,+BAAA,EAAiC,QAAA;IACjC,+BAAA,EAAiC,QAAA;IACjC,sCAAA,EAAwC,+BAAA;IACxC,oCAAA,EAAsC,2BAAA;IACtC,sCAAA,EAAwC,+BAAA;IACxC,oCAAA,EAAsC,2BAAA;IACtC,qCAAA,EAAuC,yBAAA;IACvC,qCAAA,EACE;AACJ;;;;"}
@@ -1,23 +0,0 @@
1
- const en = {
2
- "plugin.name": "Product Series",
3
- "plugin.description": "Manage product series and their products",
4
- "product-series.actions.label": "Product Actions",
5
- "product-series.actions.createProducts": "Create Products",
6
- "product-series.actions.updateProducts": "Update Products",
7
- "product-series.actions.createDialogTitle": "Create Products from Series",
8
- "product-series.actions.updateDialogTitle": "Update All Products in Series",
9
- "product-series.actions.updateDialogDescription": "This will update all products in the series with the selected fields. Make sure to save the series first before updating the products.",
10
- "product-series.actions.productCount": "Number of Products",
11
- "product-series.actions.create": "Create",
12
- "product-series.actions.update": "Update",
13
- "product-series.actions.cancel": "Cancel",
14
- "product-series.actions.createSuccess": "Products created successfully",
15
- "product-series.actions.createError": "Failed to create products",
16
- "product-series.actions.updateSuccess": "Products updated successfully",
17
- "product-series.actions.updateError": "Failed to update products",
18
- "product-series.actions.selectFields": "Select fields to update",
19
- "product-series.actions.noDocumentId": "Save the series first before creating products"
20
- };
21
-
22
- export { en };
23
- //# sourceMappingURL=en.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"en.mjs","sources":["../../../admin/src/translations/en.ts"],"sourcesContent":["const en: Record<string, string> = {\r\n \"plugin.name\": \"Product Series\",\r\n \"plugin.description\": \"Manage product series and their products\",\r\n \"product-series.actions.label\": \"Product Actions\",\r\n \"product-series.actions.createProducts\": \"Create Products\",\r\n \"product-series.actions.updateProducts\": \"Update Products\",\r\n \"product-series.actions.createDialogTitle\": \"Create Products from Series\",\r\n \"product-series.actions.updateDialogTitle\": \"Update All Products in Series\",\r\n \"product-series.actions.updateDialogDescription\":\r\n \"This will update all products in the series with the selected fields. Make sure to save the series first before updating the products.\",\r\n \"product-series.actions.productCount\": \"Number of Products\",\r\n \"product-series.actions.create\": \"Create\",\r\n \"product-series.actions.update\": \"Update\",\r\n \"product-series.actions.cancel\": \"Cancel\",\r\n \"product-series.actions.createSuccess\": \"Products created successfully\",\r\n \"product-series.actions.createError\": \"Failed to create products\",\r\n \"product-series.actions.updateSuccess\": \"Products updated successfully\",\r\n \"product-series.actions.updateError\": \"Failed to update products\",\r\n \"product-series.actions.selectFields\": \"Select fields to update\",\r\n \"product-series.actions.noDocumentId\":\r\n \"Save the series first before creating products\",\r\n};\r\n\r\nexport { en };\r\n"],"names":["en"],"mappings":"AAAA,MAAMA,EAAAA,GAA6B;IACjC,aAAA,EAAe,gBAAA;IACf,oBAAA,EAAsB,0CAAA;IACtB,8BAAA,EAAgC,iBAAA;IAChC,uCAAA,EAAyC,iBAAA;IACzC,uCAAA,EAAyC,iBAAA;IACzC,0CAAA,EAA4C,6BAAA;IAC5C,0CAAA,EAA4C,+BAAA;IAC5C,gDAAA,EACE,wIAAA;IACF,qCAAA,EAAuC,oBAAA;IACvC,+BAAA,EAAiC,QAAA;IACjC,+BAAA,EAAiC,QAAA;IACjC,+BAAA,EAAiC,QAAA;IACjC,sCAAA,EAAwC,+BAAA;IACxC,oCAAA,EAAsC,2BAAA;IACtC,sCAAA,EAAwC,+BAAA;IACxC,oCAAA,EAAsC,2BAAA;IACtC,qCAAA,EAAuC,yBAAA;IACvC,qCAAA,EACE;AACJ;;;;"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bootstrap = void 0;
4
- const permissions_1 = require("./permissions");
5
- const bootstrap = async ({ strapi }) => {
6
- // Register permissions for the plugin
7
- try {
8
- await strapi
9
- .service("admin::permission")
10
- .actionProvider.registerMany(permissions_1.permissions.actions);
11
- }
12
- catch (error) {
13
- // Handle error silently or log to proper logging service
14
- }
15
- };
16
- exports.bootstrap = bootstrap;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.controllers = void 0;
7
- const product_series_1 = __importDefault(require("./product-series"));
8
- exports.controllers = {
9
- productSeries: product_series_1.default,
10
- };
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const productSeries = ({ strapi, }) => ({
4
- async createProducts(ctx) {
5
- try {
6
- const { id, count = 1 } = ctx.request.body;
7
- const products = await strapi
8
- .plugin("primer-product-actions")
9
- .service("productSeries")
10
- .createProductsFromSeries(id, count);
11
- return { data: products };
12
- }
13
- catch (error) {
14
- ctx.throw(500, error);
15
- }
16
- },
17
- async updateProducts(ctx) {
18
- try {
19
- const { seriesId, fieldsToUpdate } = ctx.request.body;
20
- await strapi
21
- .plugin("primer-product-actions")
22
- .service("productSeries")
23
- .updateSeriesProducts(seriesId, fieldsToUpdate);
24
- return { success: true };
25
- }
26
- catch (error) {
27
- ctx.throw(500, error);
28
- }
29
- },
30
- });
31
- exports.default = productSeries;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.plugin = void 0;
4
- const controllers_1 = require("./controllers");
5
- const routes_1 = require("./routes");
6
- const services_1 = require("./services");
7
- const register_1 = require("./register");
8
- const bootstrap_1 = require("./bootstrap");
9
- const plugin = () => {
10
- return {
11
- register: register_1.register,
12
- controllers: controllers_1.controllers,
13
- routes: routes_1.routes,
14
- services: services_1.services,
15
- middlewares: {},
16
- bootstrap: bootstrap_1.bootstrap,
17
- };
18
- };
19
- exports.plugin = plugin;
20
- exports.default = exports.plugin;
@@ -1,42 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.permissions = void 0;
4
- exports.permissions = {
5
- actions: [
6
- {
7
- // Roles
8
- section: "plugins",
9
- displayName: "Create",
10
- uid: "product-series.create",
11
- subCategory: "product-series",
12
- pluginName: "primer-product-actions",
13
- },
14
- {
15
- section: "plugins",
16
- displayName: "Read",
17
- uid: "product-series.read",
18
- subCategory: "product-series",
19
- pluginName: "primer-product-actions",
20
- aliases: [
21
- {
22
- actionId: "plugin::content-manager.explorer.read",
23
- subjects: ["api::product-series.product-series"],
24
- },
25
- ],
26
- },
27
- {
28
- section: "plugins",
29
- displayName: "Update",
30
- uid: "product-series.update",
31
- subCategory: "product-series",
32
- pluginName: "primer-product-actions",
33
- },
34
- {
35
- section: "plugins",
36
- displayName: "Delete",
37
- uid: "product-series.delete",
38
- subCategory: "product-series",
39
- pluginName: "primer-product-actions",
40
- },
41
- ],
42
- };
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PLUGIN_ID = void 0;
4
- exports.PLUGIN_ID = "primer-product-actions";