strapi-plugin-timeline 0.0.3 → 0.0.4
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/admin/{App-BYK_GACN.mjs → App-CPO3b46p.mjs} +1 -1
- package/dist/admin/{App-CYrqQs-r.js → App-CixpI-9G.js} +1 -1
- package/dist/admin/{SchedulePage-C1gAM9na.js → SchedulePage-C7eDbcSf.js} +1 -1
- package/dist/admin/{SchedulePage-Bl0OZTNc.mjs → SchedulePage-cIIL9H84.mjs} +1 -1
- package/dist/admin/{SettingsPage-BH7ytFs4.js → SettingsPage-DiMBC6tH.js} +1 -1
- package/dist/admin/{SettingsPage-C87KaVB_.mjs → SettingsPage-Dmtzsw43.mjs} +1 -1
- package/dist/admin/{index-DWXpMwlf.mjs → index-D9WAYv1A.mjs} +18 -5
- package/dist/admin/{index-BPC9ghPd.js → index-qsSDLvVA.js} +40 -5
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/package.json +2 -5
|
@@ -4,7 +4,7 @@ import { useSearchParams, NavLink, Routes, Route } from "react-router-dom";
|
|
|
4
4
|
import { useState, useEffect, useCallback } from "react";
|
|
5
5
|
import { Main, Box, Flex, Typography, Button, Grid, Field, MultiSelect, MultiSelectOption, DatePicker, Combobox, ComboboxOption, Table, Thead, Tr, Th, Tbody, Td, Badge, Link, IconButton, Pagination, PreviousLink, PageLink, NextLink, Dialog } from "@strapi/design-system";
|
|
6
6
|
import { Trash, Eye, ArrowClockwise, CaretUp, CaretDown } from "@strapi/icons";
|
|
7
|
-
import { P as PLUGIN_ID, T as TimelineDetailModal, R as RestoreDiffTable } from "./index-
|
|
7
|
+
import { P as PLUGIN_ID, T as TimelineDetailModal, R as RestoreDiffTable } from "./index-D9WAYv1A.mjs";
|
|
8
8
|
const ACTION_COLORS = {
|
|
9
9
|
create: { bg: "success100", text: "success700" },
|
|
10
10
|
update: { bg: "warning100", text: "warning700" },
|
|
@@ -6,7 +6,7 @@ const reactRouterDom = require("react-router-dom");
|
|
|
6
6
|
const React = require("react");
|
|
7
7
|
const designSystem = require("@strapi/design-system");
|
|
8
8
|
const icons = require("@strapi/icons");
|
|
9
|
-
const index = require("./index-
|
|
9
|
+
const index = require("./index-qsSDLvVA.js");
|
|
10
10
|
const ACTION_COLORS = {
|
|
11
11
|
create: { bg: "success100", text: "success700" },
|
|
12
12
|
update: { bg: "warning100", text: "warning700" },
|
|
@@ -5,7 +5,7 @@ const React = require("react");
|
|
|
5
5
|
const designSystem = require("@strapi/design-system");
|
|
6
6
|
const icons = require("@strapi/icons");
|
|
7
7
|
const admin = require("@strapi/strapi/admin");
|
|
8
|
-
const index = require("./index-
|
|
8
|
+
const index = require("./index-qsSDLvVA.js");
|
|
9
9
|
const SchedulePage = () => {
|
|
10
10
|
const { get, put, post } = admin.useFetchClient();
|
|
11
11
|
const { toggleNotification } = admin.useNotification();
|
|
@@ -3,7 +3,7 @@ import { useState, useEffect } from "react";
|
|
|
3
3
|
import { Main, Typography, Box, Flex, Button, Checkbox, Field, TextInput, Badge } from "@strapi/design-system";
|
|
4
4
|
import { ArrowClockwise } from "@strapi/icons";
|
|
5
5
|
import { useFetchClient, useNotification, Layouts } from "@strapi/strapi/admin";
|
|
6
|
-
import { P as PLUGIN_ID } from "./index-
|
|
6
|
+
import { P as PLUGIN_ID } from "./index-D9WAYv1A.mjs";
|
|
7
7
|
const SchedulePage = () => {
|
|
8
8
|
const { get, put, post } = useFetchClient();
|
|
9
9
|
const { toggleNotification } = useNotification();
|
|
@@ -5,7 +5,7 @@ const React = require("react");
|
|
|
5
5
|
const designSystem = require("@strapi/design-system");
|
|
6
6
|
const icons = require("@strapi/icons");
|
|
7
7
|
const admin = require("@strapi/strapi/admin");
|
|
8
|
-
const index = require("./index-
|
|
8
|
+
const index = require("./index-qsSDLvVA.js");
|
|
9
9
|
const ALL_ACTIONS = ["create", "update", "delete", "publish"];
|
|
10
10
|
const DURATION_UNITS = [
|
|
11
11
|
{ value: "hours", label: "Hours" },
|
|
@@ -3,7 +3,7 @@ import { useState, useEffect } from "react";
|
|
|
3
3
|
import { Main, Typography, Box, Flex, Button, Field, SingleSelect, SingleSelectOption, Accordion, Switch, IconButton, Grid, MultiSelect, MultiSelectOption, NumberInput, Dialog } from "@strapi/design-system";
|
|
4
4
|
import { Check, Plus, Trash } from "@strapi/icons";
|
|
5
5
|
import { useFetchClient, useNotification, Layouts } from "@strapi/strapi/admin";
|
|
6
|
-
import { P as PLUGIN_ID } from "./index-
|
|
6
|
+
import { P as PLUGIN_ID } from "./index-D9WAYv1A.mjs";
|
|
7
7
|
const ALL_ACTIONS = ["create", "update", "delete", "publish"];
|
|
8
8
|
const DURATION_UNITS = [
|
|
9
9
|
{ value: "hours", label: "Hours" },
|
|
@@ -4,7 +4,6 @@ import { Modal, Flex, Loader, Box, RawTable, RawThead, RawTr, RawTh, Badge, Typo
|
|
|
4
4
|
import { Mail, ArrowsCounterClockwise, Eye, ArrowClockwise } from "@strapi/icons";
|
|
5
5
|
import { useFetchClient, useAuth, useNotification } from "@strapi/strapi/admin";
|
|
6
6
|
import { NavLink } from "react-router-dom";
|
|
7
|
-
import { BlocksRenderer } from "@strapi/blocks-react-renderer";
|
|
8
7
|
import ReactMarkdown from "react-markdown";
|
|
9
8
|
import remarkGfm from "remark-gfm";
|
|
10
9
|
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
@@ -58,6 +57,20 @@ const ACTION_COLORS$1 = {
|
|
|
58
57
|
clean: { bg: "danger100", text: "danger700" },
|
|
59
58
|
restore: { bg: "primary100", text: "primary700" }
|
|
60
59
|
};
|
|
60
|
+
function BlocksContent({ content }) {
|
|
61
|
+
const [Comp, setComp] = React.useState(null);
|
|
62
|
+
const [tried, setTried] = React.useState(false);
|
|
63
|
+
React.useEffect(() => {
|
|
64
|
+
import(
|
|
65
|
+
/* @vite-ignore */
|
|
66
|
+
"@strapi/blocks-react-renderer"
|
|
67
|
+
).then((mod) => setComp(() => mod.BlocksRenderer)).catch(() => {
|
|
68
|
+
}).finally(() => setTried(true));
|
|
69
|
+
}, []);
|
|
70
|
+
if (!tried) return null;
|
|
71
|
+
if (Comp) return /* @__PURE__ */ jsx(Comp, { content });
|
|
72
|
+
return /* @__PURE__ */ jsx(JSONInput, { value: JSON.stringify(content, null, 2), disabled: true });
|
|
73
|
+
}
|
|
61
74
|
const DATE_KEYS = /* @__PURE__ */ new Set(["createdAt", "updatedAt", "publishedAt"]);
|
|
62
75
|
const USER_KEYS = /* @__PURE__ */ new Set(["createdBy", "updatedBy"]);
|
|
63
76
|
const looksLikeHtml = (str) => /<[a-z][\s\S]*?>/i.test(str);
|
|
@@ -343,7 +356,7 @@ const TimelineDetailModal = ({
|
|
|
343
356
|
background: "neutral100",
|
|
344
357
|
hasRadius: true,
|
|
345
358
|
style: { maxHeight: "300px", overflow: "auto", fontSize: "14px", lineHeight: "1.6" },
|
|
346
|
-
children: /* @__PURE__ */ jsx(
|
|
359
|
+
children: /* @__PURE__ */ jsx(BlocksContent, { content: value })
|
|
347
360
|
}
|
|
348
361
|
);
|
|
349
362
|
}
|
|
@@ -934,7 +947,7 @@ const index = {
|
|
|
934
947
|
defaultMessage: "Timeline"
|
|
935
948
|
},
|
|
936
949
|
Component: async () => {
|
|
937
|
-
const { App } = await import("./App-
|
|
950
|
+
const { App } = await import("./App-CPO3b46p.mjs");
|
|
938
951
|
return App;
|
|
939
952
|
}
|
|
940
953
|
});
|
|
@@ -955,7 +968,7 @@ const index = {
|
|
|
955
968
|
id: "content-types",
|
|
956
969
|
to: `${PLUGIN_ID}/content-types`,
|
|
957
970
|
Component: async () => {
|
|
958
|
-
const { SettingsPage } = await import("./SettingsPage-
|
|
971
|
+
const { SettingsPage } = await import("./SettingsPage-Dmtzsw43.mjs");
|
|
959
972
|
return { default: SettingsPage };
|
|
960
973
|
}
|
|
961
974
|
},
|
|
@@ -967,7 +980,7 @@ const index = {
|
|
|
967
980
|
id: "schedule",
|
|
968
981
|
to: `${PLUGIN_ID}/schedule`,
|
|
969
982
|
Component: async () => {
|
|
970
|
-
const { SchedulePage } = await import("./SchedulePage-
|
|
983
|
+
const { SchedulePage } = await import("./SchedulePage-cIIL9H84.mjs");
|
|
971
984
|
return { default: SchedulePage };
|
|
972
985
|
}
|
|
973
986
|
}
|
|
@@ -1,11 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
2
24
|
const React = require("react");
|
|
3
25
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
26
|
const designSystem = require("@strapi/design-system");
|
|
5
27
|
const icons = require("@strapi/icons");
|
|
6
28
|
const admin = require("@strapi/strapi/admin");
|
|
7
29
|
const reactRouterDom = require("react-router-dom");
|
|
8
|
-
const blocksReactRenderer = require("@strapi/blocks-react-renderer");
|
|
9
30
|
const ReactMarkdown = require("react-markdown");
|
|
10
31
|
const remarkGfm = require("remark-gfm");
|
|
11
32
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
@@ -63,6 +84,20 @@ const ACTION_COLORS$1 = {
|
|
|
63
84
|
clean: { bg: "danger100", text: "danger700" },
|
|
64
85
|
restore: { bg: "primary100", text: "primary700" }
|
|
65
86
|
};
|
|
87
|
+
function BlocksContent({ content }) {
|
|
88
|
+
const [Comp, setComp] = React__default.default.useState(null);
|
|
89
|
+
const [tried, setTried] = React__default.default.useState(false);
|
|
90
|
+
React__default.default.useEffect(() => {
|
|
91
|
+
import(
|
|
92
|
+
/* @vite-ignore */
|
|
93
|
+
"@strapi/blocks-react-renderer"
|
|
94
|
+
).then((mod) => setComp(() => mod.BlocksRenderer)).catch(() => {
|
|
95
|
+
}).finally(() => setTried(true));
|
|
96
|
+
}, []);
|
|
97
|
+
if (!tried) return null;
|
|
98
|
+
if (Comp) return /* @__PURE__ */ jsxRuntime.jsx(Comp, { content });
|
|
99
|
+
return /* @__PURE__ */ jsxRuntime.jsx(designSystem.JSONInput, { value: JSON.stringify(content, null, 2), disabled: true });
|
|
100
|
+
}
|
|
66
101
|
const DATE_KEYS = /* @__PURE__ */ new Set(["createdAt", "updatedAt", "publishedAt"]);
|
|
67
102
|
const USER_KEYS = /* @__PURE__ */ new Set(["createdBy", "updatedBy"]);
|
|
68
103
|
const looksLikeHtml = (str) => /<[a-z][\s\S]*?>/i.test(str);
|
|
@@ -348,7 +383,7 @@ const TimelineDetailModal = ({
|
|
|
348
383
|
background: "neutral100",
|
|
349
384
|
hasRadius: true,
|
|
350
385
|
style: { maxHeight: "300px", overflow: "auto", fontSize: "14px", lineHeight: "1.6" },
|
|
351
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
386
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(BlocksContent, { content: value })
|
|
352
387
|
}
|
|
353
388
|
);
|
|
354
389
|
}
|
|
@@ -939,7 +974,7 @@ const index = {
|
|
|
939
974
|
defaultMessage: "Timeline"
|
|
940
975
|
},
|
|
941
976
|
Component: async () => {
|
|
942
|
-
const { App } = await Promise.resolve().then(() => require("./App-
|
|
977
|
+
const { App } = await Promise.resolve().then(() => require("./App-CixpI-9G.js"));
|
|
943
978
|
return App;
|
|
944
979
|
}
|
|
945
980
|
});
|
|
@@ -960,7 +995,7 @@ const index = {
|
|
|
960
995
|
id: "content-types",
|
|
961
996
|
to: `${PLUGIN_ID}/content-types`,
|
|
962
997
|
Component: async () => {
|
|
963
|
-
const { SettingsPage } = await Promise.resolve().then(() => require("./SettingsPage-
|
|
998
|
+
const { SettingsPage } = await Promise.resolve().then(() => require("./SettingsPage-DiMBC6tH.js"));
|
|
964
999
|
return { default: SettingsPage };
|
|
965
1000
|
}
|
|
966
1001
|
},
|
|
@@ -972,7 +1007,7 @@ const index = {
|
|
|
972
1007
|
id: "schedule",
|
|
973
1008
|
to: `${PLUGIN_ID}/schedule`,
|
|
974
1009
|
Component: async () => {
|
|
975
|
-
const { SchedulePage } = await Promise.resolve().then(() => require("./SchedulePage-
|
|
1010
|
+
const { SchedulePage } = await Promise.resolve().then(() => require("./SchedulePage-C7eDbcSf.js"));
|
|
976
1011
|
return { default: SchedulePage };
|
|
977
1012
|
}
|
|
978
1013
|
}
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.0.
|
|
2
|
+
"version": "0.0.4",
|
|
3
3
|
"keywords": [
|
|
4
4
|
"strapi",
|
|
5
5
|
"strapi-plugin",
|
|
@@ -93,10 +93,7 @@
|
|
|
93
93
|
"bugs": {
|
|
94
94
|
"url": "https://github.com/patiparnne/strapi-plugin-timeline/issues"
|
|
95
95
|
},
|
|
96
|
-
"author":
|
|
97
|
-
"name": "Patiparnne Vongchompue",
|
|
98
|
-
"email": "patiparnne@gmail.com"
|
|
99
|
-
},
|
|
96
|
+
"author": "Patiparnne <patiparnne@gmail.com>",
|
|
100
97
|
"buy_me_a_coffee": "https://buymeacoffee.com/patiparnne",
|
|
101
98
|
"patreon": "https://www.patreon.com/patiparnne"
|
|
102
99
|
}
|