@littlebox/strapi-suite 1.0.49 → 1.0.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{App-syAmvP-s.js → App-C7RgdLC-.js} +11 -4
- package/dist/_chunks/{App-nmWVRekZ.mjs → App-b_1MuDrk.mjs} +11 -4
- package/dist/_chunks/{SlugInput-CHK1xod8.mjs → SlugInput-DlOanbzA.mjs} +2 -2
- package/dist/_chunks/{SlugInput-Dzl5oW_J.js → SlugInput-DvQWzpBu.js} +2 -2
- package/dist/_chunks/{convertToSlug-DRtk7Wud.mjs → convertToSlug-DmgViUjP.mjs} +1 -1
- package/dist/_chunks/{convertToSlug-CnUaQAbW.js → convertToSlug-DqHa9ej4.js} +1 -1
- package/dist/_chunks/{index-6enkG2yt.mjs → index-C3MUddO-.mjs} +2 -2
- package/dist/_chunks/{index-NY0_hG9_.js → index-UZTUyNY3.js} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.mjs +2 -2
- package/package.json +3 -3
|
@@ -4,12 +4,12 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const reactRouterDom = require("react-router-dom");
|
|
5
5
|
const React = require("react");
|
|
6
6
|
const designSystem = require("@strapi/design-system");
|
|
7
|
-
const index = require("./index-
|
|
7
|
+
const index = require("./index-UZTUyNY3.js");
|
|
8
8
|
const icons = require("@strapi/icons");
|
|
9
9
|
const reactIntl = require("react-intl");
|
|
10
10
|
const styled = require("styled-components");
|
|
11
11
|
const symbols = require("@strapi/icons/symbols");
|
|
12
|
-
const convertToSlug = require("./convertToSlug-
|
|
12
|
+
const convertToSlug = require("./convertToSlug-DqHa9ej4.js");
|
|
13
13
|
const core = require("@dnd-kit/core");
|
|
14
14
|
const sortable = require("@dnd-kit/sortable");
|
|
15
15
|
const modifiers = require("@dnd-kit/modifiers");
|
|
@@ -722,7 +722,7 @@ const HomePage = () => {
|
|
|
722
722
|
style: { marginRight: "10px" },
|
|
723
723
|
endIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.ExternalLink, {}),
|
|
724
724
|
onClick: () => window.open("https://www.npmjs.com/package/@littlebox/strapi-suite", "_blank"),
|
|
725
|
-
children: "v1.0.
|
|
725
|
+
children: "v1.0.51"
|
|
726
726
|
}
|
|
727
727
|
),
|
|
728
728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -3294,6 +3294,13 @@ function MenuDragDrop(props) {
|
|
|
3294
3294
|
setUidExist(!!uidExist2);
|
|
3295
3295
|
return !!uidExist2;
|
|
3296
3296
|
}
|
|
3297
|
+
function reindexOrder(items2) {
|
|
3298
|
+
return items2.map((item, index2) => ({
|
|
3299
|
+
...item,
|
|
3300
|
+
order: index2 + 1,
|
|
3301
|
+
children: item.children && item.children.length > 0 ? reindexOrder(item.children) : []
|
|
3302
|
+
}));
|
|
3303
|
+
}
|
|
3297
3304
|
async function handlerForm() {
|
|
3298
3305
|
const uidExist2 = checkUidExist(formUid);
|
|
3299
3306
|
if (!uidExist2 && isNotEmpty(formTitle) && isNotEmpty(formUid) && itemsAreValid) {
|
|
@@ -3301,7 +3308,7 @@ function MenuDragDrop(props) {
|
|
|
3301
3308
|
props.onSaveEvent({
|
|
3302
3309
|
uid: formUid,
|
|
3303
3310
|
title: formTitle,
|
|
3304
|
-
children: items
|
|
3311
|
+
children: reindexOrder(items)
|
|
3305
3312
|
});
|
|
3306
3313
|
} else {
|
|
3307
3314
|
props.onSaveEvent(null);
|
|
@@ -2,12 +2,12 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useNavigate, useParams, Routes, Route } from "react-router-dom";
|
|
3
3
|
import React__default, { useState, useEffect, createContext, useContext, Fragment as Fragment$1, useRef } from "react";
|
|
4
4
|
import { Box, Loader, Main, Typography, Button, Flex, Breadcrumbs, Crumb, CrumbLink, CardBody, CardContent, CardTitle, CardBadge, CardSubtitle, Card as Card$1, Dialog, IconButton, Toggle, SingleSelect, SingleSelectOption, SearchForm, Searchbar, Table, Thead, Tr, Th, Checkbox, VisuallyHidden, Tbody, Td, EmptyStateLayout, TextInput, Field, Tooltip } from "@strapi/design-system";
|
|
5
|
-
import { R as Registry, F as FetchSettings, g as getTranslation, c as config, S as SLUG_LANGUAGE_STRATEGY, a as SLUG_CONTENT_STRATEGY, b as FetchSlugs, f as fetchTemplates } from "./index-
|
|
5
|
+
import { R as Registry, F as FetchSettings, g as getTranslation, c as config, S as SLUG_LANGUAGE_STRATEGY, a as SLUG_CONTENT_STRATEGY, b as FetchSlugs, f as fetchTemplates } from "./index-C3MUddO-.mjs";
|
|
6
6
|
import { ArrowLeft, ExternalLink, WarningCircle, Cross, BulletList, Pencil, Trash, Plus, Duplicate, Drag, Check } from "@strapi/icons";
|
|
7
7
|
import { useIntl } from "react-intl";
|
|
8
8
|
import styled, { useTheme } from "styled-components";
|
|
9
9
|
import { EmptyDocuments } from "@strapi/icons/symbols";
|
|
10
|
-
import { F as FetchLocales, c as convertToSlug } from "./convertToSlug-
|
|
10
|
+
import { F as FetchLocales, c as convertToSlug } from "./convertToSlug-DmgViUjP.mjs";
|
|
11
11
|
import { DndContext, DragOverlay, pointerWithin, rectIntersection } from "@dnd-kit/core";
|
|
12
12
|
import { useSortable, SortableContext, verticalListSortingStrategy, arrayMove } from "@dnd-kit/sortable";
|
|
13
13
|
import { restrictToVerticalAxis, restrictToParentElement } from "@dnd-kit/modifiers";
|
|
@@ -717,7 +717,7 @@ const HomePage = () => {
|
|
|
717
717
|
style: { marginRight: "10px" },
|
|
718
718
|
endIcon: /* @__PURE__ */ jsx(ExternalLink, {}),
|
|
719
719
|
onClick: () => window.open("https://www.npmjs.com/package/@littlebox/strapi-suite", "_blank"),
|
|
720
|
-
children: "v1.0.
|
|
720
|
+
children: "v1.0.51"
|
|
721
721
|
}
|
|
722
722
|
),
|
|
723
723
|
/* @__PURE__ */ jsx(
|
|
@@ -3289,6 +3289,13 @@ function MenuDragDrop(props) {
|
|
|
3289
3289
|
setUidExist(!!uidExist2);
|
|
3290
3290
|
return !!uidExist2;
|
|
3291
3291
|
}
|
|
3292
|
+
function reindexOrder(items2) {
|
|
3293
|
+
return items2.map((item, index) => ({
|
|
3294
|
+
...item,
|
|
3295
|
+
order: index + 1,
|
|
3296
|
+
children: item.children && item.children.length > 0 ? reindexOrder(item.children) : []
|
|
3297
|
+
}));
|
|
3298
|
+
}
|
|
3292
3299
|
async function handlerForm() {
|
|
3293
3300
|
const uidExist2 = checkUidExist(formUid);
|
|
3294
3301
|
if (!uidExist2 && isNotEmpty(formTitle) && isNotEmpty(formUid) && itemsAreValid) {
|
|
@@ -3296,7 +3303,7 @@ function MenuDragDrop(props) {
|
|
|
3296
3303
|
props.onSaveEvent({
|
|
3297
3304
|
uid: formUid,
|
|
3298
3305
|
title: formTitle,
|
|
3299
|
-
children: items
|
|
3306
|
+
children: reindexOrder(items)
|
|
3300
3307
|
});
|
|
3301
3308
|
} else {
|
|
3302
3309
|
props.onSaveEvent(null);
|
|
@@ -6,8 +6,8 @@ import { useComposedRefs, Field, Box, Typography, TextInput, IconButton, Button
|
|
|
6
6
|
import { Pin, Cross } from "@strapi/icons";
|
|
7
7
|
import { useFocusInputField, unstable_useContentManagerContext } from "@strapi/strapi/admin";
|
|
8
8
|
import styled from "styled-components";
|
|
9
|
-
import { R as Registry, P as PageAttributeUpdated, D as DocumentCustomFieldStarted, d as PluginIcon, g as getTranslation, c as config, e as FetchModuleSettings } from "./index-
|
|
10
|
-
import { c as convertToSlug, F as FetchLocales } from "./convertToSlug-
|
|
9
|
+
import { R as Registry, P as PageAttributeUpdated, D as DocumentCustomFieldStarted, d as PluginIcon, g as getTranslation, c as config, e as FetchModuleSettings } from "./index-C3MUddO-.mjs";
|
|
10
|
+
import { c as convertToSlug, F as FetchLocales } from "./convertToSlug-DmgViUjP.mjs";
|
|
11
11
|
const BoxInput = styled(Box)`
|
|
12
12
|
& > div {
|
|
13
13
|
width: 100%;
|
|
@@ -8,8 +8,8 @@ const designSystem = require("@strapi/design-system");
|
|
|
8
8
|
const icons = require("@strapi/icons");
|
|
9
9
|
const admin = require("@strapi/strapi/admin");
|
|
10
10
|
const styled = require("styled-components");
|
|
11
|
-
const index = require("./index-
|
|
12
|
-
const convertToSlug = require("./convertToSlug-
|
|
11
|
+
const index = require("./index-UZTUyNY3.js");
|
|
12
|
+
const convertToSlug = require("./convertToSlug-DqHa9ej4.js");
|
|
13
13
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
14
14
|
function _interopNamespace(e) {
|
|
15
15
|
if (e && e.__esModule) return e;
|
|
@@ -3303,7 +3303,7 @@ const index = {
|
|
|
3303
3303
|
defaultMessage: config.pluginId
|
|
3304
3304
|
},
|
|
3305
3305
|
position: 999,
|
|
3306
|
-
Component: () => import("./App-
|
|
3306
|
+
Component: () => import("./App-b_1MuDrk.mjs")
|
|
3307
3307
|
});
|
|
3308
3308
|
app.customFields.register({
|
|
3309
3309
|
name: "ltbslug",
|
|
@@ -3321,7 +3321,7 @@ const index = {
|
|
|
3321
3321
|
components: {
|
|
3322
3322
|
Input: async () => import(
|
|
3323
3323
|
/* webpackChunkName: "input-slug-component" */
|
|
3324
|
-
"./SlugInput-
|
|
3324
|
+
"./SlugInput-DlOanbzA.mjs"
|
|
3325
3325
|
)
|
|
3326
3326
|
},
|
|
3327
3327
|
options: {
|
|
@@ -3306,7 +3306,7 @@ const index = {
|
|
|
3306
3306
|
defaultMessage: config.pluginId
|
|
3307
3307
|
},
|
|
3308
3308
|
position: 999,
|
|
3309
|
-
Component: () => Promise.resolve().then(() => require("./App-
|
|
3309
|
+
Component: () => Promise.resolve().then(() => require("./App-C7RgdLC-.js"))
|
|
3310
3310
|
});
|
|
3311
3311
|
app.customFields.register({
|
|
3312
3312
|
name: "ltbslug",
|
|
@@ -3324,7 +3324,7 @@ const index = {
|
|
|
3324
3324
|
components: {
|
|
3325
3325
|
Input: async () => Promise.resolve().then(() => require(
|
|
3326
3326
|
/* webpackChunkName: "input-slug-component" */
|
|
3327
|
-
"./SlugInput-
|
|
3327
|
+
"./SlugInput-DvQWzpBu.js"
|
|
3328
3328
|
))
|
|
3329
3329
|
},
|
|
3330
3330
|
options: {
|
package/dist/admin/index.js
CHANGED
package/dist/admin/index.mjs
CHANGED
package/dist/server/index.js
CHANGED
|
@@ -1255,8 +1255,8 @@ const CheckApiToken = async (policyContext, config2, { strapi: strapi2 }) => {
|
|
|
1255
1255
|
return false;
|
|
1256
1256
|
}
|
|
1257
1257
|
const apiTokenService = strapi2.services["admin::api-token"];
|
|
1258
|
-
const accessKey =
|
|
1259
|
-
const storedToken = await apiTokenService.
|
|
1258
|
+
const accessKey = apiTokenService.hash(bearerToken);
|
|
1259
|
+
const storedToken = await apiTokenService.getByAccessKey(accessKey);
|
|
1260
1260
|
if (!storedToken) {
|
|
1261
1261
|
return false;
|
|
1262
1262
|
}
|
package/dist/server/index.mjs
CHANGED
|
@@ -1254,8 +1254,8 @@ const CheckApiToken = async (policyContext, config2, { strapi: strapi2 }) => {
|
|
|
1254
1254
|
return false;
|
|
1255
1255
|
}
|
|
1256
1256
|
const apiTokenService = strapi2.services["admin::api-token"];
|
|
1257
|
-
const accessKey =
|
|
1258
|
-
const storedToken = await apiTokenService.
|
|
1257
|
+
const accessKey = apiTokenService.hash(bearerToken);
|
|
1258
|
+
const storedToken = await apiTokenService.getByAccessKey(accessKey);
|
|
1259
1259
|
if (!storedToken) {
|
|
1260
1260
|
return false;
|
|
1261
1261
|
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.0.
|
|
2
|
+
"version": "1.0.51",
|
|
3
3
|
"keywords": [
|
|
4
4
|
"strapi",
|
|
5
5
|
"strapi plugin",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@strapi/sdk-plugin": "^5.3.2",
|
|
78
|
-
"@strapi/strapi": "^5.
|
|
78
|
+
"@strapi/strapi": "^5.48.1",
|
|
79
79
|
"react": "^18.3.1",
|
|
80
80
|
"react-dom": "^18.3.1",
|
|
81
81
|
"react-router-dom": "^6.29.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"url": "https://github.com/littleboxstudio"
|
|
107
107
|
},
|
|
108
108
|
"engines": {
|
|
109
|
-
"node": ">=18.0.0 <=
|
|
109
|
+
"node": ">=18.0.0 <=22.x.x",
|
|
110
110
|
"npm": ">=6.0.0"
|
|
111
111
|
}
|
|
112
112
|
}
|