strapi-plugin-bulk-updater 1.0.0
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/LICENSE +21 -0
- package/README.md +250 -0
- package/dist/_chunks/BulkUpdater-CooMo-Hc.js +2274 -0
- package/dist/_chunks/BulkUpdater-CooMo-Hc.js.map +1 -0
- package/dist/_chunks/BulkUpdater-R78pX-om.mjs +2272 -0
- package/dist/_chunks/BulkUpdater-R78pX-om.mjs.map +1 -0
- package/dist/_chunks/SettingsPage-C6QyloJe.js +176 -0
- package/dist/_chunks/SettingsPage-C6QyloJe.js.map +1 -0
- package/dist/_chunks/SettingsPage-Drb7s719.mjs +176 -0
- package/dist/_chunks/SettingsPage-Drb7s719.mjs.map +1 -0
- package/dist/admin/index.js +36 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/index.mjs +37 -0
- package/dist/admin/index.mjs.map +1 -0
- package/dist/server/index.js +1752 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/index.mjs +1751 -0
- package/dist/server/index.mjs.map +1 -0
- package/package.json +95 -0
- package/strapi-admin.js +3 -0
- package/strapi-server.js +3 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const admin = require("@strapi/strapi/admin");
|
|
6
|
+
const designSystem = require("@strapi/design-system");
|
|
7
|
+
const icons = require("@strapi/icons");
|
|
8
|
+
const SettingsPage = () => {
|
|
9
|
+
const { get, post } = admin.useFetchClient();
|
|
10
|
+
const { toggleNotification } = admin.useNotification();
|
|
11
|
+
const [loading, setLoading] = React.useState(true);
|
|
12
|
+
const [saving, setSaving] = React.useState(false);
|
|
13
|
+
const [license, setLicense] = React.useState(null);
|
|
14
|
+
const [licenseKeyInput, setLicenseKeyInput] = React.useState("");
|
|
15
|
+
const fetchLicense = async () => {
|
|
16
|
+
try {
|
|
17
|
+
setLoading(true);
|
|
18
|
+
const res = await get("/bulk-updater/license");
|
|
19
|
+
if (res.data && res.data.success) {
|
|
20
|
+
setLicense(res.data.license);
|
|
21
|
+
if (res.data.license?.licenseKey) {
|
|
22
|
+
setLicenseKeyInput(res.data.license.licenseKey);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
} catch (err) {
|
|
26
|
+
toggleNotification({
|
|
27
|
+
type: "danger",
|
|
28
|
+
message: err.message || "Failed to fetch license info."
|
|
29
|
+
});
|
|
30
|
+
} finally {
|
|
31
|
+
setLoading(false);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
React.useEffect(() => {
|
|
35
|
+
fetchLicense();
|
|
36
|
+
}, []);
|
|
37
|
+
const handleActivate = async () => {
|
|
38
|
+
if (!licenseKeyInput.trim()) {
|
|
39
|
+
toggleNotification({
|
|
40
|
+
type: "warning",
|
|
41
|
+
message: "Please enter a license key to activate."
|
|
42
|
+
});
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
setSaving(true);
|
|
47
|
+
const res = await post("/bulk-updater/license/verify", {
|
|
48
|
+
licenseKey: licenseKeyInput.trim()
|
|
49
|
+
});
|
|
50
|
+
if (res.data && res.data.success) {
|
|
51
|
+
setLicense(res.data.license);
|
|
52
|
+
toggleNotification({
|
|
53
|
+
type: "success",
|
|
54
|
+
message: "Pro license activated successfully! Pro features unlocked."
|
|
55
|
+
});
|
|
56
|
+
} else {
|
|
57
|
+
toggleNotification({
|
|
58
|
+
type: "danger",
|
|
59
|
+
message: res.data?.error || "Failed to activate license."
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
} catch (err) {
|
|
63
|
+
toggleNotification({
|
|
64
|
+
type: "danger",
|
|
65
|
+
message: err.response?.data?.error || err.message || "Verification error."
|
|
66
|
+
});
|
|
67
|
+
} finally {
|
|
68
|
+
setSaving(false);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const handleDeactivate = async () => {
|
|
72
|
+
try {
|
|
73
|
+
setSaving(true);
|
|
74
|
+
const res = await post("/bulk-updater/license/deactivate");
|
|
75
|
+
if (res.data && res.data.success) {
|
|
76
|
+
setLicense(res.data.license);
|
|
77
|
+
setLicenseKeyInput("");
|
|
78
|
+
toggleNotification({
|
|
79
|
+
type: "info",
|
|
80
|
+
message: "License deactivated. Returned to Free tier."
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
} catch (err) {
|
|
84
|
+
toggleNotification({
|
|
85
|
+
type: "danger",
|
|
86
|
+
message: err.message || "Deactivation error."
|
|
87
|
+
});
|
|
88
|
+
} finally {
|
|
89
|
+
setSaving(false);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 8, background: "neutral100", children: [
|
|
93
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", alignItems: "flex-start", gap: 2, marginBottom: 6, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", width: "100%", children: [
|
|
94
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
95
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "alpha", tag: "h1", fontWeight: "bold", children: "Bulk Attribute Updater - License & Settings" }),
|
|
96
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", textColor: "neutral600", children: "Manage your Pro tier license key, view active capabilities, and unlock advanced bulk update features." })
|
|
97
|
+
] }),
|
|
98
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
99
|
+
designSystem.Button,
|
|
100
|
+
{
|
|
101
|
+
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowClockwise, {}),
|
|
102
|
+
variant: "tertiary",
|
|
103
|
+
onClick: fetchLicense,
|
|
104
|
+
loading,
|
|
105
|
+
children: "Refresh"
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] }) }),
|
|
109
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 6, background: "neutral0", shadow: "filterShadow", hasRadius: true, marginBottom: 6, children: [
|
|
110
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { justifyContent: "space-between", alignItems: "center", marginBottom: 4, children: [
|
|
111
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { children: [
|
|
112
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", tag: "h2", fontWeight: "semiBold", children: "Current License Status" }),
|
|
113
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "pi", textColor: "neutral600", children: license?.isPro ? `Active ${license.tier.toUpperCase()} license registered to ${license.licensedTo}.` : "You are currently using the Free Community Edition." })
|
|
114
|
+
] }),
|
|
115
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
116
|
+
designSystem.Badge,
|
|
117
|
+
{
|
|
118
|
+
backgroundColor: license?.isPro ? "success100" : "neutral200",
|
|
119
|
+
textColor: license?.isPro ? "success700" : "neutral700",
|
|
120
|
+
size: "M",
|
|
121
|
+
children: license?.isPro ? `${license.tier.toUpperCase()} EDITION` : "COMMUNITY EDITION (FREE)"
|
|
122
|
+
}
|
|
123
|
+
)
|
|
124
|
+
] }),
|
|
125
|
+
license?.isPro && /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Alert, { variant: "success", title: "License Active", marginBottom: 4, children: [
|
|
126
|
+
"Pro features are unlocked! Activated on ",
|
|
127
|
+
new Date(license.activatedAt || "").toLocaleDateString(),
|
|
128
|
+
"."
|
|
129
|
+
] }),
|
|
130
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 4, alignItems: "flex-end", wrap: "wrap", marginTop: 4, children: [
|
|
131
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { style: { flex: 1, minWidth: 320 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
132
|
+
designSystem.TextInput,
|
|
133
|
+
{
|
|
134
|
+
label: "License Key",
|
|
135
|
+
name: "licenseKey",
|
|
136
|
+
placeholder: "e.g. PRO-XXXX-XXXX-XXXX",
|
|
137
|
+
value: licenseKeyInput,
|
|
138
|
+
onChange: (e) => setLicenseKeyInput(e.target.value),
|
|
139
|
+
hint: "Enter your Gumroad, LemonSqueezy, or Pro license key (keys starting with PRO- or ENTERPRISE- are valid)."
|
|
140
|
+
}
|
|
141
|
+
) }),
|
|
142
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
|
143
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
144
|
+
designSystem.Button,
|
|
145
|
+
{
|
|
146
|
+
startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Check, {}),
|
|
147
|
+
variant: "default",
|
|
148
|
+
onClick: handleActivate,
|
|
149
|
+
loading: saving,
|
|
150
|
+
disabled: loading || !licenseKeyInput.trim(),
|
|
151
|
+
children: "Activate Key"
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
license?.isPro && /* @__PURE__ */ jsxRuntime.jsx(
|
|
155
|
+
designSystem.Button,
|
|
156
|
+
{
|
|
157
|
+
variant: "danger",
|
|
158
|
+
onClick: handleDeactivate,
|
|
159
|
+
loading: saving,
|
|
160
|
+
children: "Deactivate"
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
] })
|
|
164
|
+
] })
|
|
165
|
+
] }),
|
|
166
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Box, { padding: 6, background: "neutral0", shadow: "filterShadow", hasRadius: true, children: [
|
|
167
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "delta", tag: "h2", fontWeight: "semiBold", marginBottom: 3, children: "Feature Availability" }),
|
|
168
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { direction: "column", gap: 2, alignItems: "flex-start", children: (license?.features || []).map((feat, i) => /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, alignItems: "center", children: [
|
|
169
|
+
/* @__PURE__ */ jsxRuntime.jsx(icons.Check, { width: "16px", height: "16px", color: "#328048" }),
|
|
170
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "omega", children: feat })
|
|
171
|
+
] }, i)) })
|
|
172
|
+
] })
|
|
173
|
+
] });
|
|
174
|
+
};
|
|
175
|
+
exports.default = SettingsPage;
|
|
176
|
+
//# sourceMappingURL=SettingsPage-C6QyloJe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsPage-C6QyloJe.js","sources":["../../admin/src/pages/SettingsPage.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useFetchClient, useNotification } from '@strapi/strapi/admin';\nimport {\n Box,\n Flex,\n Typography,\n Button,\n TextInput,\n Badge,\n Alert,\n} from '@strapi/design-system';\nimport { Check, ArrowClockwise } from '@strapi/icons';\n\ninterface LicenseStatus {\n isPro: boolean;\n tier: 'free' | 'pro' | 'enterprise';\n licenseKey: string | null;\n licensedTo: string | null;\n activatedAt: string | null;\n features: string[];\n}\n\nconst SettingsPage: React.FC = () => {\n const { get, post } = useFetchClient();\n const { toggleNotification } = useNotification();\n\n const [loading, setLoading] = useState<boolean>(true);\n const [saving, setSaving] = useState<boolean>(false);\n const [license, setLicense] = useState<LicenseStatus | null>(null);\n const [licenseKeyInput, setLicenseKeyInput] = useState<string>('');\n\n const fetchLicense = async () => {\n try {\n setLoading(true);\n const res = await get('/bulk-updater/license');\n if (res.data && res.data.success) {\n setLicense(res.data.license);\n if (res.data.license?.licenseKey) {\n setLicenseKeyInput(res.data.license.licenseKey);\n }\n }\n } catch (err: any) {\n toggleNotification({\n type: 'danger',\n message: err.message || 'Failed to fetch license info.',\n });\n } finally {\n setLoading(false);\n }\n };\n\n useEffect(() => {\n fetchLicense();\n }, []);\n\n const handleActivate = async () => {\n if (!licenseKeyInput.trim()) {\n toggleNotification({\n type: 'warning',\n message: 'Please enter a license key to activate.',\n });\n return;\n }\n\n try {\n setSaving(true);\n const res = await post('/bulk-updater/license/verify', {\n licenseKey: licenseKeyInput.trim(),\n });\n\n if (res.data && res.data.success) {\n setLicense(res.data.license);\n toggleNotification({\n type: 'success',\n message: 'Pro license activated successfully! Pro features unlocked.',\n });\n } else {\n toggleNotification({\n type: 'danger',\n message: res.data?.error || 'Failed to activate license.',\n });\n }\n } catch (err: any) {\n toggleNotification({\n type: 'danger',\n message: err.response?.data?.error || err.message || 'Verification error.',\n });\n } finally {\n setSaving(false);\n }\n };\n\n const handleDeactivate = async () => {\n try {\n setSaving(true);\n const res = await post('/bulk-updater/license/deactivate');\n if (res.data && res.data.success) {\n setLicense(res.data.license);\n setLicenseKeyInput('');\n toggleNotification({\n type: 'info',\n message: 'License deactivated. Returned to Free tier.',\n });\n }\n } catch (err: any) {\n toggleNotification({\n type: 'danger',\n message: err.message || 'Deactivation error.',\n });\n } finally {\n setSaving(false);\n }\n };\n\n return (\n <Box padding={8} background=\"neutral100\">\n <Flex direction=\"column\" alignItems=\"flex-start\" gap={2} marginBottom={6}>\n <Flex justifyContent=\"space-between\" width=\"100%\">\n <Box>\n <Typography variant=\"alpha\" tag=\"h1\" fontWeight=\"bold\">\n Bulk Attribute Updater - License & Settings\n </Typography>\n <Typography variant=\"omega\" textColor=\"neutral600\">\n Manage your Pro tier license key, view active capabilities, and unlock advanced bulk update features.\n </Typography>\n </Box>\n <Button\n startIcon={<ArrowClockwise />}\n variant=\"tertiary\"\n onClick={fetchLicense}\n loading={loading}\n >\n Refresh\n </Button>\n </Flex>\n </Flex>\n\n {/* License Status Card */}\n <Box padding={6} background=\"neutral0\" shadow=\"filterShadow\" hasRadius marginBottom={6}>\n <Flex justifyContent=\"space-between\" alignItems=\"center\" marginBottom={4}>\n <Box>\n <Typography variant=\"delta\" tag=\"h2\" fontWeight=\"semiBold\">\n Current License Status\n </Typography>\n <Typography variant=\"pi\" textColor=\"neutral600\">\n {license?.isPro\n ? `Active ${license.tier.toUpperCase()} license registered to ${license.licensedTo}.`\n : 'You are currently using the Free Community Edition.'}\n </Typography>\n </Box>\n <Badge\n backgroundColor={license?.isPro ? 'success100' : 'neutral200'}\n textColor={license?.isPro ? 'success700' : 'neutral700'}\n size=\"M\"\n >\n {license?.isPro ? `${license.tier.toUpperCase()} EDITION` : 'COMMUNITY EDITION (FREE)'}\n </Badge>\n </Flex>\n\n {license?.isPro && (\n <Alert variant=\"success\" title=\"License Active\" marginBottom={4}>\n Pro features are unlocked! Activated on {new Date(license.activatedAt || '').toLocaleDateString()}.\n </Alert>\n )}\n\n {/* License Input */}\n <Flex gap={4} alignItems=\"flex-end\" wrap=\"wrap\" marginTop={4}>\n <Box style={{ flex: 1, minWidth: 320 }}>\n <TextInput\n label=\"License Key\"\n name=\"licenseKey\"\n placeholder=\"e.g. PRO-XXXX-XXXX-XXXX\"\n value={licenseKeyInput}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setLicenseKeyInput(e.target.value)\n }\n hint=\"Enter your Gumroad, LemonSqueezy, or Pro license key (keys starting with PRO- or ENTERPRISE- are valid).\"\n />\n </Box>\n <Flex gap={2}>\n <Button\n startIcon={<Check />}\n variant=\"default\"\n onClick={handleActivate}\n loading={saving}\n disabled={loading || !licenseKeyInput.trim()}\n >\n Activate Key\n </Button>\n {license?.isPro && (\n <Button\n variant=\"danger\"\n onClick={handleDeactivate}\n loading={saving}\n >\n Deactivate\n </Button>\n )}\n </Flex>\n </Flex>\n </Box>\n\n {/* Features Checklist */}\n <Box padding={6} background=\"neutral0\" shadow=\"filterShadow\" hasRadius>\n <Typography variant=\"delta\" tag=\"h2\" fontWeight=\"semiBold\" marginBottom={3}>\n Feature Availability\n </Typography>\n <Flex direction=\"column\" gap={2} alignItems=\"flex-start\">\n {(license?.features || []).map((feat, i) => (\n <Flex key={i} gap={2} alignItems=\"center\">\n <Check width=\"16px\" height=\"16px\" color=\"#328048\" />\n <Typography variant=\"omega\">{feat}</Typography>\n </Flex>\n ))}\n </Flex>\n </Box>\n </Box>\n );\n};\n\nexport default SettingsPage;\n"],"names":["useFetchClient","useNotification","useState","useEffect","jsxs","Box","jsx","Flex","Typography","Button","ArrowClockwise","Badge","Alert","TextInput","Check"],"mappings":";;;;;;;AAsBA,MAAM,eAAyB,MAAM;AACnC,QAAM,EAAE,KAAK,KAAA,IAASA,qBAAA;AACtB,QAAM,EAAE,mBAAA,IAAuBC,sBAAA;AAE/B,QAAM,CAAC,SAAS,UAAU,IAAIC,MAAAA,SAAkB,IAAI;AACpD,QAAM,CAAC,QAAQ,SAAS,IAAIA,MAAAA,SAAkB,KAAK;AACnD,QAAM,CAAC,SAAS,UAAU,IAAIA,MAAAA,SAA+B,IAAI;AACjE,QAAM,CAAC,iBAAiB,kBAAkB,IAAIA,MAAAA,SAAiB,EAAE;AAEjE,QAAM,eAAe,YAAY;AAC/B,QAAI;AACF,iBAAW,IAAI;AACf,YAAM,MAAM,MAAM,IAAI,uBAAuB;AAC7C,UAAI,IAAI,QAAQ,IAAI,KAAK,SAAS;AAChC,mBAAW,IAAI,KAAK,OAAO;AAC3B,YAAI,IAAI,KAAK,SAAS,YAAY;AAChC,6BAAmB,IAAI,KAAK,QAAQ,UAAU;AAAA,QAAA;AAAA,MAChD;AAAA,IACF,SACO,KAAU;AACjB,yBAAmB;AAAA,QACjB,MAAM;AAAA,QACN,SAAS,IAAI,WAAW;AAAA,MAAA,CACzB;AAAA,IAAA,UACH;AACE,iBAAW,KAAK;AAAA,IAAA;AAAA,EAClB;AAGFC,QAAAA,UAAU,MAAM;AACd,iBAAA;AAAA,EAAa,GACZ,EAAE;AAEL,QAAM,iBAAiB,YAAY;AACjC,QAAI,CAAC,gBAAgB,QAAQ;AAC3B,yBAAmB;AAAA,QACjB,MAAM;AAAA,QACN,SAAS;AAAA,MAAA,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Q,KAAI,MAAK,YAAW,YAAW,cAAc,GAAG,UAAA,uBAAA,CAE5E;AAAA,MACAF,2BAAAA,IAACC,aAAAA,QAAK,WAAU,UAAS,KAAK,GAAG,YAAW,cACxC,WAAA,SAAS,YAAY,CAAA,GAAI,IAAI,CAAC,MAAM,sCACnCA,aAAAA,MAAA,EAAa,KAAK,GAAG,YAAW,UAC/B,UAAA;AAAA,QAAAD,+BAACQ,MAAAA,SAAM,OAAM,QAAO,QAAO,QAAO,OAAM,WAAU;AAAA,QAClDR,2BAAAA,IAACE,aAAAA,YAAA,EAAW,SAAQ,SAAS,UAAA,KAAA,CAAK;AAAA,MAAA,EAAA,GAFzB,CAGX,CACD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;;"}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useEffect } from "react";
|
|
3
|
+
import { useFetchClient, useNotification } from "@strapi/strapi/admin";
|
|
4
|
+
import { Box, Flex, Typography, Button, Badge, Alert, TextInput } from "@strapi/design-system";
|
|
5
|
+
import { ArrowClockwise, Check } from "@strapi/icons";
|
|
6
|
+
const SettingsPage = () => {
|
|
7
|
+
const { get, post } = useFetchClient();
|
|
8
|
+
const { toggleNotification } = useNotification();
|
|
9
|
+
const [loading, setLoading] = useState(true);
|
|
10
|
+
const [saving, setSaving] = useState(false);
|
|
11
|
+
const [license, setLicense] = useState(null);
|
|
12
|
+
const [licenseKeyInput, setLicenseKeyInput] = useState("");
|
|
13
|
+
const fetchLicense = async () => {
|
|
14
|
+
try {
|
|
15
|
+
setLoading(true);
|
|
16
|
+
const res = await get("/bulk-updater/license");
|
|
17
|
+
if (res.data && res.data.success) {
|
|
18
|
+
setLicense(res.data.license);
|
|
19
|
+
if (res.data.license?.licenseKey) {
|
|
20
|
+
setLicenseKeyInput(res.data.license.licenseKey);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
} catch (err) {
|
|
24
|
+
toggleNotification({
|
|
25
|
+
type: "danger",
|
|
26
|
+
message: err.message || "Failed to fetch license info."
|
|
27
|
+
});
|
|
28
|
+
} finally {
|
|
29
|
+
setLoading(false);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
fetchLicense();
|
|
34
|
+
}, []);
|
|
35
|
+
const handleActivate = async () => {
|
|
36
|
+
if (!licenseKeyInput.trim()) {
|
|
37
|
+
toggleNotification({
|
|
38
|
+
type: "warning",
|
|
39
|
+
message: "Please enter a license key to activate."
|
|
40
|
+
});
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
try {
|
|
44
|
+
setSaving(true);
|
|
45
|
+
const res = await post("/bulk-updater/license/verify", {
|
|
46
|
+
licenseKey: licenseKeyInput.trim()
|
|
47
|
+
});
|
|
48
|
+
if (res.data && res.data.success) {
|
|
49
|
+
setLicense(res.data.license);
|
|
50
|
+
toggleNotification({
|
|
51
|
+
type: "success",
|
|
52
|
+
message: "Pro license activated successfully! Pro features unlocked."
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
toggleNotification({
|
|
56
|
+
type: "danger",
|
|
57
|
+
message: res.data?.error || "Failed to activate license."
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
} catch (err) {
|
|
61
|
+
toggleNotification({
|
|
62
|
+
type: "danger",
|
|
63
|
+
message: err.response?.data?.error || err.message || "Verification error."
|
|
64
|
+
});
|
|
65
|
+
} finally {
|
|
66
|
+
setSaving(false);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
const handleDeactivate = async () => {
|
|
70
|
+
try {
|
|
71
|
+
setSaving(true);
|
|
72
|
+
const res = await post("/bulk-updater/license/deactivate");
|
|
73
|
+
if (res.data && res.data.success) {
|
|
74
|
+
setLicense(res.data.license);
|
|
75
|
+
setLicenseKeyInput("");
|
|
76
|
+
toggleNotification({
|
|
77
|
+
type: "info",
|
|
78
|
+
message: "License deactivated. Returned to Free tier."
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
} catch (err) {
|
|
82
|
+
toggleNotification({
|
|
83
|
+
type: "danger",
|
|
84
|
+
message: err.message || "Deactivation error."
|
|
85
|
+
});
|
|
86
|
+
} finally {
|
|
87
|
+
setSaving(false);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return /* @__PURE__ */ jsxs(Box, { padding: 8, background: "neutral100", children: [
|
|
91
|
+
/* @__PURE__ */ jsx(Flex, { direction: "column", alignItems: "flex-start", gap: 2, marginBottom: 6, children: /* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", width: "100%", children: [
|
|
92
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
93
|
+
/* @__PURE__ */ jsx(Typography, { variant: "alpha", tag: "h1", fontWeight: "bold", children: "Bulk Attribute Updater - License & Settings" }),
|
|
94
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", textColor: "neutral600", children: "Manage your Pro tier license key, view active capabilities, and unlock advanced bulk update features." })
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
97
|
+
Button,
|
|
98
|
+
{
|
|
99
|
+
startIcon: /* @__PURE__ */ jsx(ArrowClockwise, {}),
|
|
100
|
+
variant: "tertiary",
|
|
101
|
+
onClick: fetchLicense,
|
|
102
|
+
loading,
|
|
103
|
+
children: "Refresh"
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] }) }),
|
|
107
|
+
/* @__PURE__ */ jsxs(Box, { padding: 6, background: "neutral0", shadow: "filterShadow", hasRadius: true, marginBottom: 6, children: [
|
|
108
|
+
/* @__PURE__ */ jsxs(Flex, { justifyContent: "space-between", alignItems: "center", marginBottom: 4, children: [
|
|
109
|
+
/* @__PURE__ */ jsxs(Box, { children: [
|
|
110
|
+
/* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "h2", fontWeight: "semiBold", children: "Current License Status" }),
|
|
111
|
+
/* @__PURE__ */ jsx(Typography, { variant: "pi", textColor: "neutral600", children: license?.isPro ? `Active ${license.tier.toUpperCase()} license registered to ${license.licensedTo}.` : "You are currently using the Free Community Edition." })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ jsx(
|
|
114
|
+
Badge,
|
|
115
|
+
{
|
|
116
|
+
backgroundColor: license?.isPro ? "success100" : "neutral200",
|
|
117
|
+
textColor: license?.isPro ? "success700" : "neutral700",
|
|
118
|
+
size: "M",
|
|
119
|
+
children: license?.isPro ? `${license.tier.toUpperCase()} EDITION` : "COMMUNITY EDITION (FREE)"
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
] }),
|
|
123
|
+
license?.isPro && /* @__PURE__ */ jsxs(Alert, { variant: "success", title: "License Active", marginBottom: 4, children: [
|
|
124
|
+
"Pro features are unlocked! Activated on ",
|
|
125
|
+
new Date(license.activatedAt || "").toLocaleDateString(),
|
|
126
|
+
"."
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 4, alignItems: "flex-end", wrap: "wrap", marginTop: 4, children: [
|
|
129
|
+
/* @__PURE__ */ jsx(Box, { style: { flex: 1, minWidth: 320 }, children: /* @__PURE__ */ jsx(
|
|
130
|
+
TextInput,
|
|
131
|
+
{
|
|
132
|
+
label: "License Key",
|
|
133
|
+
name: "licenseKey",
|
|
134
|
+
placeholder: "e.g. PRO-XXXX-XXXX-XXXX",
|
|
135
|
+
value: licenseKeyInput,
|
|
136
|
+
onChange: (e) => setLicenseKeyInput(e.target.value),
|
|
137
|
+
hint: "Enter your Gumroad, LemonSqueezy, or Pro license key (keys starting with PRO- or ENTERPRISE- are valid)."
|
|
138
|
+
}
|
|
139
|
+
) }),
|
|
140
|
+
/* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
Button,
|
|
143
|
+
{
|
|
144
|
+
startIcon: /* @__PURE__ */ jsx(Check, {}),
|
|
145
|
+
variant: "default",
|
|
146
|
+
onClick: handleActivate,
|
|
147
|
+
loading: saving,
|
|
148
|
+
disabled: loading || !licenseKeyInput.trim(),
|
|
149
|
+
children: "Activate Key"
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
license?.isPro && /* @__PURE__ */ jsx(
|
|
153
|
+
Button,
|
|
154
|
+
{
|
|
155
|
+
variant: "danger",
|
|
156
|
+
onClick: handleDeactivate,
|
|
157
|
+
loading: saving,
|
|
158
|
+
children: "Deactivate"
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] })
|
|
162
|
+
] })
|
|
163
|
+
] }),
|
|
164
|
+
/* @__PURE__ */ jsxs(Box, { padding: 6, background: "neutral0", shadow: "filterShadow", hasRadius: true, children: [
|
|
165
|
+
/* @__PURE__ */ jsx(Typography, { variant: "delta", tag: "h2", fontWeight: "semiBold", marginBottom: 3, children: "Feature Availability" }),
|
|
166
|
+
/* @__PURE__ */ jsx(Flex, { direction: "column", gap: 2, alignItems: "flex-start", children: (license?.features || []).map((feat, i) => /* @__PURE__ */ jsxs(Flex, { gap: 2, alignItems: "center", children: [
|
|
167
|
+
/* @__PURE__ */ jsx(Check, { width: "16px", height: "16px", color: "#328048" }),
|
|
168
|
+
/* @__PURE__ */ jsx(Typography, { variant: "omega", children: feat })
|
|
169
|
+
] }, i)) })
|
|
170
|
+
] })
|
|
171
|
+
] });
|
|
172
|
+
};
|
|
173
|
+
export {
|
|
174
|
+
SettingsPage as default
|
|
175
|
+
};
|
|
176
|
+
//# sourceMappingURL=SettingsPage-Drb7s719.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SettingsPage-Drb7s719.mjs","sources":["../../admin/src/pages/SettingsPage.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { useFetchClient, useNotification } from '@strapi/strapi/admin';\nimport {\n Box,\n Flex,\n Typography,\n Button,\n TextInput,\n Badge,\n Alert,\n} from '@strapi/design-system';\nimport { Check, ArrowClockwise } from '@strapi/icons';\n\ninterface LicenseStatus {\n isPro: boolean;\n tier: 'free' | 'pro' | 'enterprise';\n licenseKey: string | null;\n licensedTo: string | null;\n activatedAt: string | null;\n features: string[];\n}\n\nconst SettingsPage: React.FC = () => {\n const { get, post } = useFetchClient();\n const { toggleNotification } = useNotification();\n\n const [loading, setLoading] = useState<boolean>(true);\n const [saving, setSaving] = useState<boolean>(false);\n const [license, setLicense] = useState<LicenseStatus | null>(null);\n const [licenseKeyInput, setLicenseKeyInput] = useState<string>('');\n\n const fetchLicense = async () => {\n try {\n setLoading(true);\n const res = await get('/bulk-updater/license');\n if (res.data && res.data.success) {\n setLicense(res.data.license);\n if (res.data.license?.licenseKey) {\n setLicenseKeyInput(res.data.license.licenseKey);\n }\n }\n } catch (err: any) {\n toggleNotification({\n type: 'danger',\n message: err.message || 'Failed to fetch license info.',\n });\n } finally {\n setLoading(false);\n }\n };\n\n useEffect(() => {\n fetchLicense();\n }, []);\n\n const handleActivate = async () => {\n if (!licenseKeyInput.trim()) {\n toggleNotification({\n type: 'warning',\n message: 'Please enter a license key to activate.',\n });\n return;\n }\n\n try {\n setSaving(true);\n const res = await post('/bulk-updater/license/verify', {\n licenseKey: licenseKeyInput.trim(),\n });\n\n if (res.data && res.data.success) {\n setLicense(res.data.license);\n toggleNotification({\n type: 'success',\n message: 'Pro license activated successfully! Pro features unlocked.',\n });\n } else {\n toggleNotification({\n type: 'danger',\n message: res.data?.error || 'Failed to activate license.',\n });\n }\n } catch (err: any) {\n toggleNotification({\n type: 'danger',\n message: err.response?.data?.error || err.message || 'Verification error.',\n });\n } finally {\n setSaving(false);\n }\n };\n\n const handleDeactivate = async () => {\n try {\n setSaving(true);\n const res = await post('/bulk-updater/license/deactivate');\n if (res.data && res.data.success) {\n setLicense(res.data.license);\n setLicenseKeyInput('');\n toggleNotification({\n type: 'info',\n message: 'License deactivated. Returned to Free tier.',\n });\n }\n } catch (err: any) {\n toggleNotification({\n type: 'danger',\n message: err.message || 'Deactivation error.',\n });\n } finally {\n setSaving(false);\n }\n };\n\n return (\n <Box padding={8} background=\"neutral100\">\n <Flex direction=\"column\" alignItems=\"flex-start\" gap={2} marginBottom={6}>\n <Flex justifyContent=\"space-between\" width=\"100%\">\n <Box>\n <Typography variant=\"alpha\" tag=\"h1\" fontWeight=\"bold\">\n Bulk Attribute Updater - License & Settings\n </Typography>\n <Typography variant=\"omega\" textColor=\"neutral600\">\n Manage your Pro tier license key, view active capabilities, and unlock advanced bulk update features.\n </Typography>\n </Box>\n <Button\n startIcon={<ArrowClockwise />}\n variant=\"tertiary\"\n onClick={fetchLicense}\n loading={loading}\n >\n Refresh\n </Button>\n </Flex>\n </Flex>\n\n {/* License Status Card */}\n <Box padding={6} background=\"neutral0\" shadow=\"filterShadow\" hasRadius marginBottom={6}>\n <Flex justifyContent=\"space-between\" alignItems=\"center\" marginBottom={4}>\n <Box>\n <Typography variant=\"delta\" tag=\"h2\" fontWeight=\"semiBold\">\n Current License Status\n </Typography>\n <Typography variant=\"pi\" textColor=\"neutral600\">\n {license?.isPro\n ? `Active ${license.tier.toUpperCase()} license registered to ${license.licensedTo}.`\n : 'You are currently using the Free Community Edition.'}\n </Typography>\n </Box>\n <Badge\n backgroundColor={license?.isPro ? 'success100' : 'neutral200'}\n textColor={license?.isPro ? 'success700' : 'neutral700'}\n size=\"M\"\n >\n {license?.isPro ? `${license.tier.toUpperCase()} EDITION` : 'COMMUNITY EDITION (FREE)'}\n </Badge>\n </Flex>\n\n {license?.isPro && (\n <Alert variant=\"success\" title=\"License Active\" marginBottom={4}>\n Pro features are unlocked! Activated on {new Date(license.activatedAt || '').toLocaleDateString()}.\n </Alert>\n )}\n\n {/* License Input */}\n <Flex gap={4} alignItems=\"flex-end\" wrap=\"wrap\" marginTop={4}>\n <Box style={{ flex: 1, minWidth: 320 }}>\n <TextInput\n label=\"License Key\"\n name=\"licenseKey\"\n placeholder=\"e.g. PRO-XXXX-XXXX-XXXX\"\n value={licenseKeyInput}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setLicenseKeyInput(e.target.value)\n }\n hint=\"Enter your Gumroad, LemonSqueezy, or Pro license key (keys starting with PRO- or ENTERPRISE- are valid).\"\n />\n </Box>\n <Flex gap={2}>\n <Button\n startIcon={<Check />}\n variant=\"default\"\n onClick={handleActivate}\n loading={saving}\n disabled={loading || !licenseKeyInput.trim()}\n >\n Activate Key\n </Button>\n {license?.isPro && (\n <Button\n variant=\"danger\"\n onClick={handleDeactivate}\n loading={saving}\n >\n Deactivate\n </Button>\n )}\n </Flex>\n </Flex>\n </Box>\n\n {/* Features Checklist */}\n <Box padding={6} background=\"neutral0\" shadow=\"filterShadow\" hasRadius>\n <Typography variant=\"delta\" tag=\"h2\" fontWeight=\"semiBold\" marginBottom={3}>\n Feature Availability\n </Typography>\n <Flex direction=\"column\" gap={2} alignItems=\"flex-start\">\n {(license?.features || []).map((feat, i) => (\n <Flex key={i} gap={2} alignItems=\"center\">\n <Check width=\"16px\" height=\"16px\" color=\"#328048\" />\n <Typography variant=\"omega\">{feat}</Typography>\n </Flex>\n ))}\n </Flex>\n </Box>\n </Box>\n );\n};\n\nexport default SettingsPage;\n"],"names":[],"mappings":";;;;;AAsBA,MAAM,eAAyB,MAAM;AACnC,QAAM,EAAE,KAAK,KAAA,IAAS,eAAA;AACtB,QAAM,EAAE,mBAAA,IAAuB,gBAAA;AAE/B,QAAM,CAAC,SAAS,UAAU,IAAI,SAAkB,IAAI;AACpD,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAkB,KAAK;AACnD,QAAM,CAAC,SAAS,UAAU,IAAI,SAA+B,IAAI;AACjE,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAiB,EAAE;AAEjE,QAAM,eAAe,YAAY;AAC/B,QAAI;AACF,iBAAW,IAAI;AACf,YAAM,MAAM,MAAM,IAAI,uBAAuB;AAC7C,UAAI,IAAI,QAAQ,IAAI,KAAK,SAAS;AAChC,mBAAW,IAAI,KAAK,OA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F;AAAA,IAGA,qBAAC,OAAI,SAAS,GAAG,YAAW,YAAW,QAAO,gBAAe,WAAS,MACpE,UAAA;AAAA,MAAA,oBAAC,YAAA,EAAW,SAAQ,SAAQ,KAAI,MAAK,YAAW,YAAW,cAAc,GAAG,UAAA,uBAAA,CAE5E;AAAA,MACA,oBAAC,QAAK,WAAU,UAAS,KAAK,GAAG,YAAW,cACxC,WAAA,SAAS,YAAY,CAAA,GAAI,IAAI,CAAC,MAAM,2BACnC,MAAA,EAAa,KAAK,GAAG,YAAW,UAC/B,UAAA;AAAA,QAAA,oBAAC,SAAM,OAAM,QAAO,QAAO,QAAO,OAAM,WAAU;AAAA,QAClD,oBAAC,YAAA,EAAW,SAAQ,SAAS,UAAA,KAAA,CAAK;AAAA,MAAA,EAAA,GAFzB,CAGX,CACD,EAAA,CACH;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const icons = require("@strapi/icons");
|
|
3
|
+
const PLUGIN_ID = "bulk-updater";
|
|
4
|
+
const index = {
|
|
5
|
+
register(app) {
|
|
6
|
+
app.addMenuLink({
|
|
7
|
+
to: `plugins/${PLUGIN_ID}`,
|
|
8
|
+
icon: icons.Pencil,
|
|
9
|
+
intlLabel: {
|
|
10
|
+
id: `${PLUGIN_ID}.plugin.name`,
|
|
11
|
+
defaultMessage: "Bulk Attribute Updater"
|
|
12
|
+
},
|
|
13
|
+
Component: () => Promise.resolve().then(() => require("../_chunks/BulkUpdater-CooMo-Hc.js")),
|
|
14
|
+
permissions: [],
|
|
15
|
+
position: 3
|
|
16
|
+
});
|
|
17
|
+
app.addSettingsLink("global", {
|
|
18
|
+
id: `${PLUGIN_ID}-settings`,
|
|
19
|
+
intlLabel: {
|
|
20
|
+
id: `${PLUGIN_ID}.settings.name`,
|
|
21
|
+
defaultMessage: "Bulk Updater License"
|
|
22
|
+
},
|
|
23
|
+
to: `${PLUGIN_ID}`,
|
|
24
|
+
Component: () => Promise.resolve().then(() => require("../_chunks/SettingsPage-C6QyloJe.js")),
|
|
25
|
+
permissions: []
|
|
26
|
+
});
|
|
27
|
+
app.registerPlugin({
|
|
28
|
+
id: PLUGIN_ID,
|
|
29
|
+
name: PLUGIN_ID
|
|
30
|
+
});
|
|
31
|
+
},
|
|
32
|
+
bootstrap(app) {
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
module.exports = index;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const PLUGIN_ID = 'bulk-updater';\n","import { PLUGIN_ID } from './pluginId';\nimport { Pencil } from '@strapi/icons';\n\nexport default {\n register(app: any) {\n app.addMenuLink({\n to: `plugins/${PLUGIN_ID}`,\n icon: Pencil,\n intlLabel: {\n id: `${PLUGIN_ID}.plugin.name`,\n defaultMessage: 'Bulk Attribute Updater',\n },\n Component: () => import('./pages/BulkUpdater'),\n permissions: [],\n position: 3,\n });\n\n app.addSettingsLink('global', {\n id: `${PLUGIN_ID}-settings`,\n intlLabel: {\n id: `${PLUGIN_ID}.settings.name`,\n defaultMessage: 'Bulk Updater License',\n },\n to: `${PLUGIN_ID}`,\n Component: () => import('./pages/SettingsPage'),\n permissions: [],\n });\n\n app.registerPlugin({\n id: PLUGIN_ID,\n name: PLUGIN_ID,\n });\n },\n bootstrap(app: any) {},\n};\n"],"names":["Pencil"],"mappings":";;AAAO,MAAM,YAAY;ACGzB,MAAA,QAAe;AAAA,EACb,SAAS,KAAU;AACjB,QAAI,YAAY;AAAA,MACd,IAAI,WAAW,SAAS;AAAA,MACxB,MAAMA,MAAAA;AAAAA,MACN,WAAW;AAAA,QACT,IAAI,GAAG,SAAS;AAAA,QAChB,gBAAgB;AAAA,MAAA;AAAA,MAElB,WAAW,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,oCAAqB,CAAA;AAAA,MAC7C,aAAa,CAAA;AAAA,MACb,UAAU;AAAA,IAAA,CACX;AAED,QAAI,gBAAgB,UAAU;AAAA,MAC5B,IAAI,GAAG,SAAS;AAAA,MAChB,WAAW;AAAA,QACT,IAAI,GAAG,SAAS;AAAA,QAChB,gBAAgB;AAAA,MAAA;AAAA,MAElB,IAAI,GAAG,SAAS;AAAA,MAChB,WAAW,MAAM,QAAA,QAAA,EAAA,KAAA,MAAA,QAAO,qCAAsB,CAAA;AAAA,MAC9C,aAAa,CAAA;AAAA,IAAC,CACf;AAED,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ,MAAM;AAAA,IAAA,CACP;AAAA,EAAA;AAAA,EAEH,UAAU,KAAU;AAAA,EAAA;AACtB;;"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Pencil } from "@strapi/icons";
|
|
2
|
+
const PLUGIN_ID = "bulk-updater";
|
|
3
|
+
const index = {
|
|
4
|
+
register(app) {
|
|
5
|
+
app.addMenuLink({
|
|
6
|
+
to: `plugins/${PLUGIN_ID}`,
|
|
7
|
+
icon: Pencil,
|
|
8
|
+
intlLabel: {
|
|
9
|
+
id: `${PLUGIN_ID}.plugin.name`,
|
|
10
|
+
defaultMessage: "Bulk Attribute Updater"
|
|
11
|
+
},
|
|
12
|
+
Component: () => import("../_chunks/BulkUpdater-R78pX-om.mjs"),
|
|
13
|
+
permissions: [],
|
|
14
|
+
position: 3
|
|
15
|
+
});
|
|
16
|
+
app.addSettingsLink("global", {
|
|
17
|
+
id: `${PLUGIN_ID}-settings`,
|
|
18
|
+
intlLabel: {
|
|
19
|
+
id: `${PLUGIN_ID}.settings.name`,
|
|
20
|
+
defaultMessage: "Bulk Updater License"
|
|
21
|
+
},
|
|
22
|
+
to: `${PLUGIN_ID}`,
|
|
23
|
+
Component: () => import("../_chunks/SettingsPage-Drb7s719.mjs"),
|
|
24
|
+
permissions: []
|
|
25
|
+
});
|
|
26
|
+
app.registerPlugin({
|
|
27
|
+
id: PLUGIN_ID,
|
|
28
|
+
name: PLUGIN_ID
|
|
29
|
+
});
|
|
30
|
+
},
|
|
31
|
+
bootstrap(app) {
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
export {
|
|
35
|
+
index as default
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const PLUGIN_ID = 'bulk-updater';\n","import { PLUGIN_ID } from './pluginId';\nimport { Pencil } from '@strapi/icons';\n\nexport default {\n register(app: any) {\n app.addMenuLink({\n to: `plugins/${PLUGIN_ID}`,\n icon: Pencil,\n intlLabel: {\n id: `${PLUGIN_ID}.plugin.name`,\n defaultMessage: 'Bulk Attribute Updater',\n },\n Component: () => import('./pages/BulkUpdater'),\n permissions: [],\n position: 3,\n });\n\n app.addSettingsLink('global', {\n id: `${PLUGIN_ID}-settings`,\n intlLabel: {\n id: `${PLUGIN_ID}.settings.name`,\n defaultMessage: 'Bulk Updater License',\n },\n to: `${PLUGIN_ID}`,\n Component: () => import('./pages/SettingsPage'),\n permissions: [],\n });\n\n app.registerPlugin({\n id: PLUGIN_ID,\n name: PLUGIN_ID,\n });\n },\n bootstrap(app: any) {},\n};\n"],"names":[],"mappings":";AAAO,MAAM,YAAY;ACGzB,MAAA,QAAe;AAAA,EACb,SAAS,KAAU;AACjB,QAAI,YAAY;AAAA,MACd,IAAI,WAAW,SAAS;AAAA,MACxB,MAAM;AAAA,MACN,WAAW;AAAA,QACT,IAAI,GAAG,SAAS;AAAA,QAChB,gBAAgB;AAAA,MAAA;AAAA,MAElB,WAAW,MAAM,OAAO,qCAAqB;AAAA,MAC7C,aAAa,CAAA;AAAA,MACb,UAAU;AAAA,IAAA,CACX;AAED,QAAI,gBAAgB,UAAU;AAAA,MAC5B,IAAI,GAAG,SAAS;AAAA,MAChB,WAAW;AAAA,QACT,IAAI,GAAG,SAAS;AAAA,QAChB,gBAAgB;AAAA,MAAA;AAAA,MAElB,IAAI,GAAG,SAAS;AAAA,MAChB,WAAW,MAAM,OAAO,sCAAsB;AAAA,MAC9C,aAAa,CAAA;AAAA,IAAC,CACf;AAED,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ,MAAM;AAAA,IAAA,CACP;AAAA,EAAA;AAAA,EAEH,UAAU,KAAU;AAAA,EAAA;AACtB;"}
|