@upsnap/strapi 1.0.10 → 1.0.14
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/README.md +15 -25
- package/dist/admin/{App-BIxhBt5_.mjs → App-QKoGSuNi.mjs} +60 -303
- package/dist/admin/{App-CH5fBeNI.js → App-l5dYTPZP.js} +221 -465
- package/dist/admin/index-BWyzuEFm.js +344 -0
- package/dist/admin/index-Ct7siGlB.mjs +343 -0
- package/dist/admin/index.js +2 -63
- package/dist/admin/index.mjs +2 -63
- package/dist/server/index.js +230 -76
- package/dist/server/index.mjs +228 -76
- package/dist/server/src/index.d.ts +3 -1
- package/package.json +1 -1
package/dist/admin/index.js
CHANGED
|
@@ -1,65 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
const icons = require("@strapi/icons");
|
|
6
|
-
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
7
|
-
const v = glob[path];
|
|
8
|
-
if (v) {
|
|
9
|
-
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
10
|
-
}
|
|
11
|
-
return new Promise((_, reject) => {
|
|
12
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
13
|
-
reject.bind(
|
|
14
|
-
null,
|
|
15
|
-
new Error(
|
|
16
|
-
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
|
17
|
-
)
|
|
18
|
-
)
|
|
19
|
-
);
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
const PLUGIN_ID = "upsnap";
|
|
23
|
-
const Initializer = ({ setPlugin }) => {
|
|
24
|
-
const ref = React.useRef(setPlugin);
|
|
25
|
-
React.useEffect(() => {
|
|
26
|
-
ref.current(PLUGIN_ID);
|
|
27
|
-
}, []);
|
|
28
|
-
return null;
|
|
29
|
-
};
|
|
30
|
-
const PluginIcon = () => /* @__PURE__ */ jsxRuntime.jsx(icons.ChartCircle, {});
|
|
31
|
-
const index = {
|
|
32
|
-
register(app) {
|
|
33
|
-
app.addMenuLink({
|
|
34
|
-
to: `plugins/${PLUGIN_ID}`,
|
|
35
|
-
icon: PluginIcon,
|
|
36
|
-
intlLabel: {
|
|
37
|
-
id: `${PLUGIN_ID}.plugin.name`,
|
|
38
|
-
defaultMessage: PLUGIN_ID.slice(0, 1).toUpperCase() + PLUGIN_ID.slice(1)
|
|
39
|
-
},
|
|
40
|
-
Component: async () => {
|
|
41
|
-
const { App } = await Promise.resolve().then(() => require("./App-CH5fBeNI.js"));
|
|
42
|
-
return App;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
app.registerPlugin({
|
|
46
|
-
id: PLUGIN_ID,
|
|
47
|
-
initializer: Initializer,
|
|
48
|
-
isReady: false,
|
|
49
|
-
name: PLUGIN_ID
|
|
50
|
-
});
|
|
51
|
-
},
|
|
52
|
-
async registerTrads({ locales }) {
|
|
53
|
-
return Promise.all(
|
|
54
|
-
locales.map(async (locale) => {
|
|
55
|
-
try {
|
|
56
|
-
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => Promise.resolve().then(() => require("./en-B4KWt_jN.js")) }), `./translations/${locale}.json`, 3);
|
|
57
|
-
return { data, locale };
|
|
58
|
-
} catch {
|
|
59
|
-
return { data: {}, locale };
|
|
60
|
-
}
|
|
61
|
-
})
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
exports.default = index;
|
|
3
|
+
const index = require("./index-BWyzuEFm.js");
|
|
4
|
+
exports.default = index.index;
|
package/dist/admin/index.mjs
CHANGED
|
@@ -1,65 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { ChartCircle } from "@strapi/icons";
|
|
4
|
-
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
5
|
-
const v = glob[path];
|
|
6
|
-
if (v) {
|
|
7
|
-
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
8
|
-
}
|
|
9
|
-
return new Promise((_, reject) => {
|
|
10
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
11
|
-
reject.bind(
|
|
12
|
-
null,
|
|
13
|
-
new Error(
|
|
14
|
-
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
|
15
|
-
)
|
|
16
|
-
)
|
|
17
|
-
);
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
const PLUGIN_ID = "upsnap";
|
|
21
|
-
const Initializer = ({ setPlugin }) => {
|
|
22
|
-
const ref = useRef(setPlugin);
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
ref.current(PLUGIN_ID);
|
|
25
|
-
}, []);
|
|
26
|
-
return null;
|
|
27
|
-
};
|
|
28
|
-
const PluginIcon = () => /* @__PURE__ */ jsx(ChartCircle, {});
|
|
29
|
-
const index = {
|
|
30
|
-
register(app) {
|
|
31
|
-
app.addMenuLink({
|
|
32
|
-
to: `plugins/${PLUGIN_ID}`,
|
|
33
|
-
icon: PluginIcon,
|
|
34
|
-
intlLabel: {
|
|
35
|
-
id: `${PLUGIN_ID}.plugin.name`,
|
|
36
|
-
defaultMessage: PLUGIN_ID.slice(0, 1).toUpperCase() + PLUGIN_ID.slice(1)
|
|
37
|
-
},
|
|
38
|
-
Component: async () => {
|
|
39
|
-
const { App } = await import("./App-BIxhBt5_.mjs");
|
|
40
|
-
return App;
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
app.registerPlugin({
|
|
44
|
-
id: PLUGIN_ID,
|
|
45
|
-
initializer: Initializer,
|
|
46
|
-
isReady: false,
|
|
47
|
-
name: PLUGIN_ID
|
|
48
|
-
});
|
|
49
|
-
},
|
|
50
|
-
async registerTrads({ locales }) {
|
|
51
|
-
return Promise.all(
|
|
52
|
-
locales.map(async (locale) => {
|
|
53
|
-
try {
|
|
54
|
-
const { default: data } = await __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/en.json": () => import("./en-Byx4XI2L.mjs") }), `./translations/${locale}.json`, 3);
|
|
55
|
-
return { data, locale };
|
|
56
|
-
} catch {
|
|
57
|
-
return { data: {}, locale };
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
};
|
|
1
|
+
import { p } from "./index-Ct7siGlB.mjs";
|
|
63
2
|
export {
|
|
64
|
-
|
|
3
|
+
p as default
|
|
65
4
|
};
|