@geekron/strapi 0.1.4 → 0.1.6
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/index.js +311 -146
- package/dist/admin/index.mjs +343 -177
- package/dist/i18n/index.js +79 -0
- package/dist/i18n/index.mjs +58 -0
- package/dist/server/index.js +16 -1
- package/dist/server/index.mjs +16 -1
- package/i18n/translations/en/admin.json +10 -0
- package/i18n/translations/en/auth.json +6 -0
- package/i18n/translations/en/reset/content-manager.json +4 -0
- package/i18n/translations/index.ts +53 -0
- package/i18n/translations/zh-Hans/admin.json +213 -0
- package/i18n/translations/zh-Hans/auth.json +6 -0
- package/i18n/translations/zh-Hans/base.json +93 -0
- package/i18n/translations/zh-Hans/missing.json +105 -0
- package/i18n/translations/zh-Hans/model.json +396 -0
- package/i18n/translations/zh-Hans/plugin.json +13 -0
- package/i18n/translations/zh-Hans/prefix/content-manager.json +321 -0
- package/i18n/translations/zh-Hans/prefix/content-releases.json +106 -0
- package/i18n/translations/zh-Hans/prefix/content-type-builder.json +68 -0
- package/i18n/translations/zh-Hans/prefix/email.json +10 -0
- package/i18n/translations/zh-Hans/prefix/review-workflows.json +17 -0
- package/i18n/translations/zh-Hans/prefix/seo.json +109 -0
- package/i18n/translations/zh-Hans/reset/content-manager.json +4 -0
- package/i18n/translations/zh-Hans/reset/content-type-builder.json +228 -0
- package/i18n/translations/zh-Hans/reset/i18n.json +4 -0
- package/package.json +14 -2
package/dist/admin/index.mjs
CHANGED
|
@@ -20443,61 +20443,45 @@ var require_react_window = __commonJS((exports) => {
|
|
|
20443
20443
|
});
|
|
20444
20444
|
|
|
20445
20445
|
// admin/src/components/ApiErrorAlert.tsx
|
|
20446
|
-
import {
|
|
20447
|
-
import { WarningCircle as WarningCircle2 } from "@strapi/icons";
|
|
20446
|
+
import { Flex as Flex7, Typography as Typography7 } from "@strapi/design-system";
|
|
20448
20447
|
import { jsxDEV as jsxDEV27 } from "react/jsx-dev-runtime";
|
|
20449
20448
|
var ApiErrorAlert = ({
|
|
20450
20449
|
message,
|
|
20451
|
-
title = "
|
|
20452
|
-
suggestion
|
|
20453
|
-
isWarning = false
|
|
20450
|
+
title = "操作提醒",
|
|
20451
|
+
suggestion
|
|
20454
20452
|
}) => {
|
|
20455
|
-
|
|
20456
|
-
|
|
20457
|
-
|
|
20458
|
-
|
|
20459
|
-
|
|
20460
|
-
|
|
20461
|
-
|
|
20462
|
-
|
|
20463
|
-
|
|
20464
|
-
|
|
20465
|
-
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
|
|
20469
|
-
|
|
20470
|
-
|
|
20471
|
-
|
|
20472
|
-
|
|
20473
|
-
|
|
20474
|
-
|
|
20475
|
-
|
|
20476
|
-
|
|
20477
|
-
|
|
20478
|
-
|
|
20479
|
-
/* @__PURE__ */ jsxDEV27(Typography7, {
|
|
20480
|
-
textColor,
|
|
20481
|
-
children: message
|
|
20482
|
-
}, undefined, false, undefined, this),
|
|
20483
|
-
suggestion && /* @__PURE__ */ jsxDEV27(Typography7, {
|
|
20484
|
-
textColor,
|
|
20485
|
-
fontSize: 0,
|
|
20486
|
-
children: suggestion
|
|
20487
|
-
}, undefined, false, undefined, this)
|
|
20488
|
-
]
|
|
20489
|
-
}, undefined, true, undefined, this)
|
|
20490
|
-
]
|
|
20491
|
-
}, undefined, true, undefined, this)
|
|
20492
|
-
}, undefined, false, undefined, this);
|
|
20453
|
+
return /* @__PURE__ */ jsxDEV27(Flex7, {
|
|
20454
|
+
justifyContent: "center",
|
|
20455
|
+
alignItems: "center",
|
|
20456
|
+
direction: "column",
|
|
20457
|
+
children: [
|
|
20458
|
+
/* @__PURE__ */ jsxDEV27(Typography7, {
|
|
20459
|
+
variant: "alpha",
|
|
20460
|
+
marginBottom: "1rem",
|
|
20461
|
+
children: title
|
|
20462
|
+
}, undefined, false, undefined, this),
|
|
20463
|
+
suggestion && /* @__PURE__ */ jsxDEV27(Typography7, {
|
|
20464
|
+
variant: "omega",
|
|
20465
|
+
textColor: "neutral600",
|
|
20466
|
+
children: suggestion
|
|
20467
|
+
}, undefined, false, undefined, this),
|
|
20468
|
+
message && /* @__PURE__ */ jsxDEV27(Typography7, {
|
|
20469
|
+
variant: "omega",
|
|
20470
|
+
textColor: "neutral600",
|
|
20471
|
+
lineHeight: 1.4,
|
|
20472
|
+
style: { opacity: 0.85 },
|
|
20473
|
+
children: message
|
|
20474
|
+
}, undefined, false, undefined, this)
|
|
20475
|
+
]
|
|
20476
|
+
}, undefined, true, undefined, this);
|
|
20493
20477
|
}, ApiErrorAlert_default;
|
|
20494
20478
|
var init_ApiErrorAlert = __esm(() => {
|
|
20495
20479
|
ApiErrorAlert_default = ApiErrorAlert;
|
|
20496
20480
|
});
|
|
20497
20481
|
|
|
20498
20482
|
// admin/src/components/DashboardStats.tsx
|
|
20499
|
-
import { Box as
|
|
20500
|
-
import { useFetchClient as useFetchClient3, useNotification as
|
|
20483
|
+
import { Box as Box6, Grid as Grid2, Typography as Typography8 } from "@strapi/design-system";
|
|
20484
|
+
import { useFetchClient as useFetchClient3, useNotification as useNotification3 } from "@strapi/strapi/admin";
|
|
20501
20485
|
import { useEffect as useEffect7, useState as useState12 } from "react";
|
|
20502
20486
|
import { jsxDEV as jsxDEV28 } from "react/jsx-dev-runtime";
|
|
20503
20487
|
var DashboardStats = ({
|
|
@@ -20507,7 +20491,7 @@ var DashboardStats = ({
|
|
|
20507
20491
|
onLoaded
|
|
20508
20492
|
}) => {
|
|
20509
20493
|
const fetchClient = useFetchClient3();
|
|
20510
|
-
const { toggleNotification } =
|
|
20494
|
+
const { toggleNotification } = useNotification3();
|
|
20511
20495
|
const [isLoading, setIsLoading] = useState12(!externalData);
|
|
20512
20496
|
const [error, setError] = useState12(null);
|
|
20513
20497
|
const [stats, setStats] = useState12(externalData || {
|
|
@@ -20551,7 +20535,7 @@ var DashboardStats = ({
|
|
|
20551
20535
|
}
|
|
20552
20536
|
}, [externalData]);
|
|
20553
20537
|
if (isLoading && showLoading) {
|
|
20554
|
-
return /* @__PURE__ */ jsxDEV28(
|
|
20538
|
+
return /* @__PURE__ */ jsxDEV28(Box6, {
|
|
20555
20539
|
paddingTop: 4,
|
|
20556
20540
|
width: "100%",
|
|
20557
20541
|
children: /* @__PURE__ */ jsxDEV28(Typography8, {
|
|
@@ -20561,17 +20545,18 @@ var DashboardStats = ({
|
|
|
20561
20545
|
}, undefined, false, undefined, this);
|
|
20562
20546
|
}
|
|
20563
20547
|
if (error) {
|
|
20564
|
-
return /* @__PURE__ */ jsxDEV28(
|
|
20548
|
+
return /* @__PURE__ */ jsxDEV28(Box6, {
|
|
20565
20549
|
paddingTop: 4,
|
|
20566
20550
|
width: "100%",
|
|
20567
20551
|
children: /* @__PURE__ */ jsxDEV28(ApiErrorAlert_default, {
|
|
20568
20552
|
message: error,
|
|
20569
20553
|
title: "仪表盘数据加载失败",
|
|
20570
|
-
suggestion: "请检查网络连接或联系管理员"
|
|
20554
|
+
suggestion: "请检查网络连接或联系管理员",
|
|
20555
|
+
type: "error"
|
|
20571
20556
|
}, undefined, false, undefined, this)
|
|
20572
20557
|
}, undefined, false, undefined, this);
|
|
20573
20558
|
}
|
|
20574
|
-
return /* @__PURE__ */ jsxDEV28(
|
|
20559
|
+
return /* @__PURE__ */ jsxDEV28(Box6, {
|
|
20575
20560
|
paddingTop: 4,
|
|
20576
20561
|
width: "100%",
|
|
20577
20562
|
children: /* @__PURE__ */ jsxDEV28(Grid2.Root, {
|
|
@@ -20579,7 +20564,7 @@ var DashboardStats = ({
|
|
|
20579
20564
|
children: [
|
|
20580
20565
|
/* @__PURE__ */ jsxDEV28(Grid2.Item, {
|
|
20581
20566
|
col: 3,
|
|
20582
|
-
children: /* @__PURE__ */ jsxDEV28(
|
|
20567
|
+
children: /* @__PURE__ */ jsxDEV28(Box6, {
|
|
20583
20568
|
padding: 4,
|
|
20584
20569
|
background: "warning100",
|
|
20585
20570
|
hasRadius: true,
|
|
@@ -20601,7 +20586,7 @@ var DashboardStats = ({
|
|
|
20601
20586
|
}, undefined, false, undefined, this),
|
|
20602
20587
|
/* @__PURE__ */ jsxDEV28(Grid2.Item, {
|
|
20603
20588
|
col: 3,
|
|
20604
|
-
children: /* @__PURE__ */ jsxDEV28(
|
|
20589
|
+
children: /* @__PURE__ */ jsxDEV28(Box6, {
|
|
20605
20590
|
padding: 4,
|
|
20606
20591
|
background: "secondary100",
|
|
20607
20592
|
hasRadius: true,
|
|
@@ -20623,7 +20608,7 @@ var DashboardStats = ({
|
|
|
20623
20608
|
}, undefined, false, undefined, this),
|
|
20624
20609
|
/* @__PURE__ */ jsxDEV28(Grid2.Item, {
|
|
20625
20610
|
col: 3,
|
|
20626
|
-
children: /* @__PURE__ */ jsxDEV28(
|
|
20611
|
+
children: /* @__PURE__ */ jsxDEV28(Box6, {
|
|
20627
20612
|
padding: 4,
|
|
20628
20613
|
background: "success100",
|
|
20629
20614
|
hasRadius: true,
|
|
@@ -20645,7 +20630,7 @@ var DashboardStats = ({
|
|
|
20645
20630
|
}, undefined, false, undefined, this),
|
|
20646
20631
|
/* @__PURE__ */ jsxDEV28(Grid2.Item, {
|
|
20647
20632
|
col: 3,
|
|
20648
|
-
children: /* @__PURE__ */ jsxDEV28(
|
|
20633
|
+
children: /* @__PURE__ */ jsxDEV28(Box6, {
|
|
20649
20634
|
padding: 4,
|
|
20650
20635
|
background: "primary100",
|
|
20651
20636
|
hasRadius: true,
|
|
@@ -20675,16 +20660,16 @@ var init_DashboardStats = __esm(() => {
|
|
|
20675
20660
|
});
|
|
20676
20661
|
|
|
20677
20662
|
// admin/src/pages/Dashboard.tsx
|
|
20678
|
-
import { Box as
|
|
20663
|
+
import { Box as Box8, Flex as Flex9, Typography as Typography10 } from "@strapi/design-system";
|
|
20679
20664
|
import { ChartPie as ChartPie2 } from "@strapi/icons";
|
|
20680
20665
|
import { Page } from "@strapi/strapi/admin";
|
|
20681
20666
|
import { jsxDEV as jsxDEV30 } from "react/jsx-dev-runtime";
|
|
20682
20667
|
var Dashboard = () => {
|
|
20683
20668
|
return /* @__PURE__ */ jsxDEV30(Page.Main, {
|
|
20684
|
-
children: /* @__PURE__ */ jsxDEV30(
|
|
20669
|
+
children: /* @__PURE__ */ jsxDEV30(Box8, {
|
|
20685
20670
|
padding: 8,
|
|
20686
20671
|
background: "neutral100",
|
|
20687
|
-
children: /* @__PURE__ */ jsxDEV30(
|
|
20672
|
+
children: /* @__PURE__ */ jsxDEV30(Box8, {
|
|
20688
20673
|
padding: 6,
|
|
20689
20674
|
background: "neutral0",
|
|
20690
20675
|
shadow: "filterShadow",
|
|
@@ -20728,7 +20713,7 @@ var init_Dashboard = __esm(() => {
|
|
|
20728
20713
|
// admin/src/pages/Inquiry.tsx
|
|
20729
20714
|
import {
|
|
20730
20715
|
Badge,
|
|
20731
|
-
Box as
|
|
20716
|
+
Box as Box9,
|
|
20732
20717
|
EmptyStateLayout,
|
|
20733
20718
|
Flex as Flex10,
|
|
20734
20719
|
IconButton as IconButton2,
|
|
@@ -20741,7 +20726,7 @@ import {
|
|
|
20741
20726
|
Layouts,
|
|
20742
20727
|
Page as Page2,
|
|
20743
20728
|
useFetchClient as useFetchClient5,
|
|
20744
|
-
useNotification as
|
|
20729
|
+
useNotification as useNotification5
|
|
20745
20730
|
} from "@strapi/strapi/admin";
|
|
20746
20731
|
import { useCallback as useCallback6, useEffect as useEffect8, useState as useState13 } from "react";
|
|
20747
20732
|
import { useNavigate } from "react-router-dom";
|
|
@@ -20749,7 +20734,7 @@ import { jsxDEV as jsxDEV31 } from "react/jsx-dev-runtime";
|
|
|
20749
20734
|
var Inquiry = () => {
|
|
20750
20735
|
const navigate = useNavigate();
|
|
20751
20736
|
const fetchClient = useFetchClient5();
|
|
20752
|
-
const { toggleNotification } =
|
|
20737
|
+
const { toggleNotification } = useNotification5();
|
|
20753
20738
|
const [isLoading, setIsLoading] = useState13(true);
|
|
20754
20739
|
const [error, setError] = useState13(null);
|
|
20755
20740
|
const [data, setData] = useState13([]);
|
|
@@ -20838,12 +20823,13 @@ var Inquiry = () => {
|
|
|
20838
20823
|
navigationAction: /* @__PURE__ */ jsxDEV31(BackButton, {}, undefined, false, undefined, this)
|
|
20839
20824
|
}, undefined, false, undefined, this),
|
|
20840
20825
|
/* @__PURE__ */ jsxDEV31(Layouts.Content, {
|
|
20841
|
-
children: /* @__PURE__ */ jsxDEV31(
|
|
20826
|
+
children: /* @__PURE__ */ jsxDEV31(Box9, {
|
|
20842
20827
|
padding: 8,
|
|
20843
20828
|
children: /* @__PURE__ */ jsxDEV31(ApiErrorAlert_default, {
|
|
20844
20829
|
message: error,
|
|
20845
20830
|
title: "询盘列表加载失败",
|
|
20846
|
-
suggestion: "请检查网络连接或联系管理员"
|
|
20831
|
+
suggestion: "请检查网络连接或联系管理员",
|
|
20832
|
+
type: "error"
|
|
20847
20833
|
}, undefined, false, undefined, this)
|
|
20848
20834
|
}, undefined, false, undefined, this)
|
|
20849
20835
|
}, undefined, false, undefined, this)
|
|
@@ -20861,7 +20847,7 @@ var Inquiry = () => {
|
|
|
20861
20847
|
subtitle: `共 ${pagination.total} 条询盘记录`
|
|
20862
20848
|
}, undefined, false, undefined, this),
|
|
20863
20849
|
/* @__PURE__ */ jsxDEV31(Layouts.Content, {
|
|
20864
|
-
children: /* @__PURE__ */ jsxDEV31(
|
|
20850
|
+
children: /* @__PURE__ */ jsxDEV31(Box9, {
|
|
20865
20851
|
background: "neutral0",
|
|
20866
20852
|
shadow: "filterShadow",
|
|
20867
20853
|
hasRadius: true,
|
|
@@ -20967,7 +20953,7 @@ import {
|
|
|
20967
20953
|
Layouts as Layouts2,
|
|
20968
20954
|
Page as Page3,
|
|
20969
20955
|
useFetchClient as useFetchClient6,
|
|
20970
|
-
useNotification as
|
|
20956
|
+
useNotification as useNotification6
|
|
20971
20957
|
} from "@strapi/strapi/admin";
|
|
20972
20958
|
import { useEffect as useEffect9, useState as useState14 } from "react";
|
|
20973
20959
|
import { useNavigate as useNavigate2, useParams } from "react-router-dom";
|
|
@@ -20977,7 +20963,7 @@ var DetailTable, InquiryDetail = () => {
|
|
|
20977
20963
|
const { id } = useParams();
|
|
20978
20964
|
const navigate = useNavigate2();
|
|
20979
20965
|
const fetchClient = useFetchClient6();
|
|
20980
|
-
const { toggleNotification } =
|
|
20966
|
+
const { toggleNotification } = useNotification6();
|
|
20981
20967
|
const [isLoading, setIsLoading] = useState14(true);
|
|
20982
20968
|
const [isMarking, setIsMarking] = useState14(false);
|
|
20983
20969
|
const [data, setData] = useState14(null);
|
|
@@ -21305,7 +21291,7 @@ var init_InquiryDetail = __esm(() => {
|
|
|
21305
21291
|
|
|
21306
21292
|
// admin/src/pages/Visitor.tsx
|
|
21307
21293
|
import {
|
|
21308
|
-
Box as
|
|
21294
|
+
Box as Box10,
|
|
21309
21295
|
EmptyStateLayout as EmptyStateLayout2,
|
|
21310
21296
|
Flex as Flex11,
|
|
21311
21297
|
Loader as Loader2,
|
|
@@ -21318,13 +21304,13 @@ import {
|
|
|
21318
21304
|
Layouts as Layouts3,
|
|
21319
21305
|
Page as Page4,
|
|
21320
21306
|
useFetchClient as useFetchClient7,
|
|
21321
|
-
useNotification as
|
|
21307
|
+
useNotification as useNotification7
|
|
21322
21308
|
} from "@strapi/strapi/admin";
|
|
21323
21309
|
import { useCallback as useCallback7, useEffect as useEffect10, useState as useState15 } from "react";
|
|
21324
21310
|
import { jsxDEV as jsxDEV33, Fragment as Fragment5 } from "react/jsx-dev-runtime";
|
|
21325
21311
|
var Visitor = () => {
|
|
21326
21312
|
const fetchClient = useFetchClient7();
|
|
21327
|
-
const { toggleNotification } =
|
|
21313
|
+
const { toggleNotification } = useNotification7();
|
|
21328
21314
|
const [isLoading, setIsLoading] = useState15(true);
|
|
21329
21315
|
const [error, setError] = useState15(null);
|
|
21330
21316
|
const [activeTab, setActiveTab] = useState15("dailyStats");
|
|
@@ -21557,12 +21543,13 @@ var Visitor = () => {
|
|
|
21557
21543
|
navigationAction: /* @__PURE__ */ jsxDEV33(BackButton3, {}, undefined, false, undefined, this)
|
|
21558
21544
|
}, undefined, false, undefined, this),
|
|
21559
21545
|
/* @__PURE__ */ jsxDEV33(Layouts3.Content, {
|
|
21560
|
-
children: /* @__PURE__ */ jsxDEV33(
|
|
21546
|
+
children: /* @__PURE__ */ jsxDEV33(Box10, {
|
|
21561
21547
|
padding: 8,
|
|
21562
21548
|
children: /* @__PURE__ */ jsxDEV33(ApiErrorAlert_default, {
|
|
21563
21549
|
message: error,
|
|
21564
21550
|
title: "访客记录加载失败",
|
|
21565
|
-
suggestion: "请检查网络连接或联系管理员"
|
|
21551
|
+
suggestion: "请检查网络连接或联系管理员",
|
|
21552
|
+
type: "error"
|
|
21566
21553
|
}, undefined, false, undefined, this)
|
|
21567
21554
|
}, undefined, false, undefined, this)
|
|
21568
21555
|
}, undefined, false, undefined, this)
|
|
@@ -21581,7 +21568,7 @@ var Visitor = () => {
|
|
|
21581
21568
|
navigationAction: /* @__PURE__ */ jsxDEV33(BackButton3, {}, undefined, false, undefined, this)
|
|
21582
21569
|
}, undefined, false, undefined, this),
|
|
21583
21570
|
/* @__PURE__ */ jsxDEV33(Layouts3.Content, {
|
|
21584
|
-
children: /* @__PURE__ */ jsxDEV33(
|
|
21571
|
+
children: /* @__PURE__ */ jsxDEV33(Box10, {
|
|
21585
21572
|
background: "neutral0",
|
|
21586
21573
|
shadow: "filterShadow",
|
|
21587
21574
|
hasRadius: true,
|
|
@@ -21608,7 +21595,7 @@ var Visitor = () => {
|
|
|
21608
21595
|
navigationAction: /* @__PURE__ */ jsxDEV33(BackButton3, {}, undefined, false, undefined, this)
|
|
21609
21596
|
}, undefined, false, undefined, this),
|
|
21610
21597
|
/* @__PURE__ */ jsxDEV33(Layouts3.Content, {
|
|
21611
|
-
children: /* @__PURE__ */ jsxDEV33(
|
|
21598
|
+
children: /* @__PURE__ */ jsxDEV33(Box10, {
|
|
21612
21599
|
background: "neutral0",
|
|
21613
21600
|
padding: 6,
|
|
21614
21601
|
shadow: "filterShadow",
|
|
@@ -21634,7 +21621,7 @@ var Visitor = () => {
|
|
|
21634
21621
|
}, undefined, false, undefined, this)
|
|
21635
21622
|
]
|
|
21636
21623
|
}, undefined, true, undefined, this),
|
|
21637
|
-
/* @__PURE__ */ jsxDEV33(
|
|
21624
|
+
/* @__PURE__ */ jsxDEV33(Box10, {
|
|
21638
21625
|
paddingTop: 6,
|
|
21639
21626
|
children: isLoading ? /* @__PURE__ */ jsxDEV33(Flex11, {
|
|
21640
21627
|
justifyContent: "center",
|
|
@@ -21678,7 +21665,7 @@ __export(exports_App, {
|
|
|
21678
21665
|
default: () => App_default
|
|
21679
21666
|
});
|
|
21680
21667
|
import { useFetchClient as useFetchClient8 } from "@strapi/admin/strapi-admin";
|
|
21681
|
-
import { Box as
|
|
21668
|
+
import { Box as Box11, Divider, Flex as Flex12, Typography as Typography13 } from "@strapi/design-system";
|
|
21682
21669
|
import React13 from "react";
|
|
21683
21670
|
import { Navigate, NavLink, Route, Routes } from "react-router-dom";
|
|
21684
21671
|
import styled15 from "styled-components";
|
|
@@ -21686,7 +21673,7 @@ import { jsxDEV as jsxDEV34 } from "react/jsx-dev-runtime";
|
|
|
21686
21673
|
var LayoutContainer, Sidebar, MainContent, StyledNavLink, SidebarNav = () => {
|
|
21687
21674
|
return /* @__PURE__ */ jsxDEV34(Sidebar, {
|
|
21688
21675
|
children: [
|
|
21689
|
-
/* @__PURE__ */ jsxDEV34(
|
|
21676
|
+
/* @__PURE__ */ jsxDEV34(Box11, {
|
|
21690
21677
|
height: "5.6rem",
|
|
21691
21678
|
display: "flex",
|
|
21692
21679
|
style: { alignItems: "center" },
|
|
@@ -21698,7 +21685,7 @@ var LayoutContainer, Sidebar, MainContent, StyledNavLink, SidebarNav = () => {
|
|
|
21698
21685
|
}, undefined, false, undefined, this)
|
|
21699
21686
|
}, undefined, false, undefined, this),
|
|
21700
21687
|
/* @__PURE__ */ jsxDEV34(Divider, {}, undefined, false, undefined, this),
|
|
21701
|
-
/* @__PURE__ */ jsxDEV34(
|
|
21688
|
+
/* @__PURE__ */ jsxDEV34(Box11, {
|
|
21702
21689
|
style: { padding: "8px 3px" },
|
|
21703
21690
|
children: [
|
|
21704
21691
|
/* @__PURE__ */ jsxDEV34(StyledNavLink, {
|
|
@@ -21729,22 +21716,18 @@ var LayoutContainer, Sidebar, MainContent, StyledNavLink, SidebarNav = () => {
|
|
|
21729
21716
|
const [isConnected, setIsConnected] = React13.useState(null);
|
|
21730
21717
|
const [checking, setChecking] = React13.useState(true);
|
|
21731
21718
|
React13.useEffect(() => {
|
|
21732
|
-
|
|
21733
|
-
|
|
21734
|
-
|
|
21735
|
-
|
|
21736
|
-
setIsConnected(true);
|
|
21737
|
-
} else {
|
|
21738
|
-
setIsConnected(false);
|
|
21739
|
-
}
|
|
21740
|
-
} catch (error) {
|
|
21741
|
-
console.error("Network check failed:", error);
|
|
21719
|
+
client.get("/website/check").then((response) => {
|
|
21720
|
+
if (response?.data?.message) {
|
|
21721
|
+
setIsConnected(true);
|
|
21722
|
+
} else {
|
|
21742
21723
|
setIsConnected(false);
|
|
21743
|
-
} finally {
|
|
21744
|
-
setChecking(false);
|
|
21745
21724
|
}
|
|
21746
|
-
}
|
|
21747
|
-
|
|
21725
|
+
}).catch((error) => {
|
|
21726
|
+
console.error("Network check failed:", error);
|
|
21727
|
+
setIsConnected(false);
|
|
21728
|
+
}).finally(() => {
|
|
21729
|
+
setChecking(false);
|
|
21730
|
+
});
|
|
21748
21731
|
}, [client]);
|
|
21749
21732
|
if (checking) {
|
|
21750
21733
|
return /* @__PURE__ */ jsxDEV34(Flex12, {
|
|
@@ -21761,23 +21744,21 @@ var LayoutContainer, Sidebar, MainContent, StyledNavLink, SidebarNav = () => {
|
|
|
21761
21744
|
return /* @__PURE__ */ jsxDEV34(Flex12, {
|
|
21762
21745
|
justifyContent: "center",
|
|
21763
21746
|
alignItems: "center",
|
|
21747
|
+
direction: "column",
|
|
21764
21748
|
height: "100vh",
|
|
21765
|
-
children:
|
|
21766
|
-
|
|
21767
|
-
|
|
21768
|
-
|
|
21769
|
-
|
|
21770
|
-
|
|
21771
|
-
|
|
21772
|
-
|
|
21773
|
-
|
|
21774
|
-
|
|
21775
|
-
|
|
21776
|
-
|
|
21777
|
-
|
|
21778
|
-
]
|
|
21779
|
-
}, undefined, true, undefined, this)
|
|
21780
|
-
}, undefined, false, undefined, this);
|
|
21749
|
+
children: [
|
|
21750
|
+
/* @__PURE__ */ jsxDEV34(Typography13, {
|
|
21751
|
+
variant: "alpha",
|
|
21752
|
+
marginBottom: "1rem",
|
|
21753
|
+
children: "网站信息未正确配置"
|
|
21754
|
+
}, undefined, false, undefined, this),
|
|
21755
|
+
/* @__PURE__ */ jsxDEV34(Typography13, {
|
|
21756
|
+
variant: "omega",
|
|
21757
|
+
textColor: "neutral600",
|
|
21758
|
+
children: "无法连接到网站服务,请检查网站配置"
|
|
21759
|
+
}, undefined, false, undefined, this)
|
|
21760
|
+
]
|
|
21761
|
+
}, undefined, true, undefined, this);
|
|
21781
21762
|
}
|
|
21782
21763
|
return /* @__PURE__ */ jsxDEV34(LayoutContainer, {
|
|
21783
21764
|
children: [
|
|
@@ -21823,7 +21804,7 @@ var init_App = __esm(() => {
|
|
|
21823
21804
|
height: 100vh;
|
|
21824
21805
|
overflow: hidden;
|
|
21825
21806
|
`;
|
|
21826
|
-
Sidebar = styled15(
|
|
21807
|
+
Sidebar = styled15(Box11)`
|
|
21827
21808
|
height: 100%;
|
|
21828
21809
|
width: 240px;
|
|
21829
21810
|
background-color: ${({ theme }) => theme.colors.neutral0};
|
|
@@ -21831,7 +21812,7 @@ var init_App = __esm(() => {
|
|
|
21831
21812
|
overflow-y: auto;
|
|
21832
21813
|
flex-shrink: 0;
|
|
21833
21814
|
`;
|
|
21834
|
-
MainContent = styled15(
|
|
21815
|
+
MainContent = styled15(Box11)`
|
|
21835
21816
|
height: 100%;
|
|
21836
21817
|
flex: 1;
|
|
21837
21818
|
overflow-y: auto;
|
|
@@ -21869,9 +21850,106 @@ var init_App = __esm(() => {
|
|
|
21869
21850
|
App_default = App;
|
|
21870
21851
|
});
|
|
21871
21852
|
|
|
21853
|
+
// admin/src/boot/handle-missing-translations.ts
|
|
21854
|
+
function extractTranslationInfo(logMessage) {
|
|
21855
|
+
const regex = /Missing message: "([^"]+)"[^,]+, using default message \(([^)]+)\)/;
|
|
21856
|
+
const match = logMessage.match(regex);
|
|
21857
|
+
if (match) {
|
|
21858
|
+
return {
|
|
21859
|
+
messageId: match[1],
|
|
21860
|
+
defaultMessage: match[2]
|
|
21861
|
+
};
|
|
21862
|
+
}
|
|
21863
|
+
return null;
|
|
21864
|
+
}
|
|
21865
|
+
var missTranslations = {};
|
|
21866
|
+
var handleMissingTranslations = (message) => {
|
|
21867
|
+
const info = extractTranslationInfo(message);
|
|
21868
|
+
if (info?.messageId)
|
|
21869
|
+
missTranslations[info.messageId] = info.defaultMessage;
|
|
21870
|
+
console.log(JSON.stringify(missTranslations));
|
|
21871
|
+
};
|
|
21872
|
+
var originalError = console.error;
|
|
21873
|
+
var originalWarn = () => {};
|
|
21874
|
+
console.warn = (..._args) => {
|
|
21875
|
+
originalWarn();
|
|
21876
|
+
};
|
|
21877
|
+
console.error = (error) => {
|
|
21878
|
+
try {
|
|
21879
|
+
if (error?.message?.includes("MISSING_TRANSLATION")) {
|
|
21880
|
+
handleMissingTranslations(error.message);
|
|
21881
|
+
} else {
|
|
21882
|
+
originalError(error);
|
|
21883
|
+
}
|
|
21884
|
+
} catch (error2) {
|
|
21885
|
+
originalError(error2);
|
|
21886
|
+
}
|
|
21887
|
+
};
|
|
21888
|
+
|
|
21889
|
+
// admin/src/boot/remove-links.ts
|
|
21890
|
+
function waitForLi(href, callback) {
|
|
21891
|
+
const findLi = () => {
|
|
21892
|
+
const anchor = document.querySelector(`li a[href="${href}"]`);
|
|
21893
|
+
if (anchor) {
|
|
21894
|
+
const li = anchor.closest("li");
|
|
21895
|
+
if (li)
|
|
21896
|
+
return li;
|
|
21897
|
+
}
|
|
21898
|
+
return null;
|
|
21899
|
+
};
|
|
21900
|
+
setInterval(() => {
|
|
21901
|
+
const initial = findLi();
|
|
21902
|
+
if (initial) {
|
|
21903
|
+
callback(initial);
|
|
21904
|
+
return;
|
|
21905
|
+
}
|
|
21906
|
+
});
|
|
21907
|
+
}
|
|
21908
|
+
function waitForDD(href, callback) {
|
|
21909
|
+
const findDD = () => {
|
|
21910
|
+
const anchor = document.querySelector(`div a[href="${href}"]`);
|
|
21911
|
+
if (anchor) {
|
|
21912
|
+
const dd = anchor.closest("div");
|
|
21913
|
+
if (dd)
|
|
21914
|
+
return dd;
|
|
21915
|
+
}
|
|
21916
|
+
return null;
|
|
21917
|
+
};
|
|
21918
|
+
setInterval(() => {
|
|
21919
|
+
const initial = findDD();
|
|
21920
|
+
if (initial) {
|
|
21921
|
+
callback(initial);
|
|
21922
|
+
return;
|
|
21923
|
+
}
|
|
21924
|
+
});
|
|
21925
|
+
}
|
|
21926
|
+
var removeLinks = () => {
|
|
21927
|
+
const hrefs = [
|
|
21928
|
+
"/admin/settings/purchase-content-history",
|
|
21929
|
+
"/admin/settings/plugins/purchase-content-releases",
|
|
21930
|
+
"/admin/settings/purchase-review-workflows",
|
|
21931
|
+
"/admin/settings/purchase-single-sign-on",
|
|
21932
|
+
"/admin/settings/purchase-audit-logs"
|
|
21933
|
+
];
|
|
21934
|
+
hrefs.forEach((href) => {
|
|
21935
|
+
waitForLi(href, (li) => {
|
|
21936
|
+
const parent = li.parentNode;
|
|
21937
|
+
parent.removeChild(li);
|
|
21938
|
+
});
|
|
21939
|
+
});
|
|
21940
|
+
const ddHrefs = ["https://strapi.io/pricing-self-hosted"];
|
|
21941
|
+
ddHrefs.forEach((href) => {
|
|
21942
|
+
waitForDD(href, (dd) => {
|
|
21943
|
+
const parent = dd.parentNode;
|
|
21944
|
+
parent.removeChild(dd);
|
|
21945
|
+
});
|
|
21946
|
+
});
|
|
21947
|
+
};
|
|
21948
|
+
|
|
21872
21949
|
// admin/src/bootstrap.ts
|
|
21873
21950
|
var bootstrap = (_app) => {
|
|
21874
21951
|
console.log("website admin plugin: bootstrap");
|
|
21952
|
+
removeLinks();
|
|
21875
21953
|
};
|
|
21876
21954
|
var bootstrap_default = bootstrap;
|
|
21877
21955
|
|
|
@@ -46742,7 +46820,22 @@ var registerColorPicker = (app) => {
|
|
|
46742
46820
|
components: {
|
|
46743
46821
|
Input: () => Promise.resolve({ default: ColorPickerInput })
|
|
46744
46822
|
},
|
|
46745
|
-
options: {
|
|
46823
|
+
options: {
|
|
46824
|
+
advanced: [
|
|
46825
|
+
{
|
|
46826
|
+
name: "required",
|
|
46827
|
+
type: "checkbox",
|
|
46828
|
+
intlLabel: {
|
|
46829
|
+
id: "form.attribute.item.requiredField",
|
|
46830
|
+
defaultMessage: "Required field"
|
|
46831
|
+
},
|
|
46832
|
+
description: {
|
|
46833
|
+
id: "form.attribute.item.requiredField.description",
|
|
46834
|
+
defaultMessage: "Cannot create entry if empty"
|
|
46835
|
+
}
|
|
46836
|
+
}
|
|
46837
|
+
]
|
|
46838
|
+
}
|
|
46746
46839
|
});
|
|
46747
46840
|
};
|
|
46748
46841
|
|
|
@@ -47108,7 +47201,8 @@ var import_react_intl3 = __toESM(require_react_intl(), 1);
|
|
|
47108
47201
|
import { Box as Box2, Button as Button2, Flex as Flex2, Modal, Typography as Typography3 } from "@strapi/design-system";
|
|
47109
47202
|
import {
|
|
47110
47203
|
unstable_useContentManagerContext,
|
|
47111
|
-
useFetchClient
|
|
47204
|
+
useFetchClient,
|
|
47205
|
+
useNotification
|
|
47112
47206
|
} from "@strapi/strapi/admin";
|
|
47113
47207
|
import * as React6 from "react";
|
|
47114
47208
|
import { styled as styled10 } from "styled-components";
|
|
@@ -47280,6 +47374,7 @@ var DataSelector = ({
|
|
|
47280
47374
|
const { formatMessage } = import_react_intl3.useIntl();
|
|
47281
47375
|
const { contentTypes } = unstable_useContentManagerContext();
|
|
47282
47376
|
const client = useFetchClient();
|
|
47377
|
+
const { toggleNotification } = useNotification();
|
|
47283
47378
|
const displayedContentTypes = React6.useMemo(() => contentTypes?.filter((ct) => ct.isDisplayed && !ct.uid.startsWith("plugin:")) || [], [contentTypes]);
|
|
47284
47379
|
const loadCollectionData = React6.useCallback(async (contentType, currentPage = 1, currentPageSize = 10) => {
|
|
47285
47380
|
setIsDataLoading(true);
|
|
@@ -47316,8 +47411,19 @@ var DataSelector = ({
|
|
|
47316
47411
|
onChange(selectedData);
|
|
47317
47412
|
setIsOpen(false);
|
|
47318
47413
|
}
|
|
47319
|
-
} catch (
|
|
47320
|
-
|
|
47414
|
+
} catch (err) {
|
|
47415
|
+
const error = err?.response?.data?.error;
|
|
47416
|
+
if (error.status === 404) {
|
|
47417
|
+
toggleNotification({
|
|
47418
|
+
type: "warning",
|
|
47419
|
+
message: formatMessage({
|
|
47420
|
+
id: getTrad("data-select.single-type-not-found"),
|
|
47421
|
+
defaultMessage: 'Content type "{displayName}" is not filled yet. Please fill in the content type information and save it before trying again.'
|
|
47422
|
+
}, { displayName: contentType.info.displayName })
|
|
47423
|
+
});
|
|
47424
|
+
} else {
|
|
47425
|
+
console.error("Failed to load single type data:", error);
|
|
47426
|
+
}
|
|
47321
47427
|
} finally {
|
|
47322
47428
|
setIsDataLoading(false);
|
|
47323
47429
|
}
|
|
@@ -47328,7 +47434,7 @@ var DataSelector = ({
|
|
|
47328
47434
|
setPageSize(10);
|
|
47329
47435
|
await loadCollectionData(contentType, 1, 10);
|
|
47330
47436
|
}
|
|
47331
|
-
}, [client, onChange, loadCollectionData]);
|
|
47437
|
+
}, [client, onChange, loadCollectionData, toggleNotification, formatMessage]);
|
|
47332
47438
|
const handleBackToContentTypes = React6.useCallback(() => {
|
|
47333
47439
|
setSelectedContentType(null);
|
|
47334
47440
|
setDataItems([]);
|
|
@@ -48783,7 +48889,22 @@ var registerDataNested = (app) => {
|
|
|
48783
48889
|
components: {
|
|
48784
48890
|
Input: () => Promise.resolve({ default: DataNested })
|
|
48785
48891
|
},
|
|
48786
|
-
options: {
|
|
48892
|
+
options: {
|
|
48893
|
+
advanced: [
|
|
48894
|
+
{
|
|
48895
|
+
name: "required",
|
|
48896
|
+
type: "checkbox",
|
|
48897
|
+
intlLabel: {
|
|
48898
|
+
id: "form.attribute.item.requiredField",
|
|
48899
|
+
defaultMessage: "Required field"
|
|
48900
|
+
},
|
|
48901
|
+
description: {
|
|
48902
|
+
id: "form.attribute.item.requiredField.description",
|
|
48903
|
+
defaultMessage: "Cannot create entry if empty"
|
|
48904
|
+
}
|
|
48905
|
+
}
|
|
48906
|
+
]
|
|
48907
|
+
}
|
|
48787
48908
|
});
|
|
48788
48909
|
};
|
|
48789
48910
|
|
|
@@ -48837,7 +48958,22 @@ var registerDataSelect = (app) => {
|
|
|
48837
48958
|
components: {
|
|
48838
48959
|
Input: () => Promise.resolve({ default: DataSelectInput })
|
|
48839
48960
|
},
|
|
48840
|
-
options: {
|
|
48961
|
+
options: {
|
|
48962
|
+
advanced: [
|
|
48963
|
+
{
|
|
48964
|
+
name: "required",
|
|
48965
|
+
type: "checkbox",
|
|
48966
|
+
intlLabel: {
|
|
48967
|
+
id: "form.attribute.item.requiredField",
|
|
48968
|
+
defaultMessage: "Required field"
|
|
48969
|
+
},
|
|
48970
|
+
description: {
|
|
48971
|
+
id: "form.attribute.item.requiredField.description",
|
|
48972
|
+
defaultMessage: "Cannot create entry if empty"
|
|
48973
|
+
}
|
|
48974
|
+
}
|
|
48975
|
+
]
|
|
48976
|
+
}
|
|
48841
48977
|
});
|
|
48842
48978
|
};
|
|
48843
48979
|
|
|
@@ -50783,7 +50919,22 @@ var registerIconPicker = (app) => {
|
|
|
50783
50919
|
components: {
|
|
50784
50920
|
Input: () => Promise.resolve({ default: IconPickerInput })
|
|
50785
50921
|
},
|
|
50786
|
-
options: {
|
|
50922
|
+
options: {
|
|
50923
|
+
advanced: [
|
|
50924
|
+
{
|
|
50925
|
+
name: "required",
|
|
50926
|
+
type: "checkbox",
|
|
50927
|
+
intlLabel: {
|
|
50928
|
+
id: "form.attribute.item.requiredField",
|
|
50929
|
+
defaultMessage: "Required field"
|
|
50930
|
+
},
|
|
50931
|
+
description: {
|
|
50932
|
+
id: "form.attribute.item.requiredField.description",
|
|
50933
|
+
defaultMessage: "Cannot create entry if empty"
|
|
50934
|
+
}
|
|
50935
|
+
}
|
|
50936
|
+
]
|
|
50937
|
+
}
|
|
50787
50938
|
});
|
|
50788
50939
|
};
|
|
50789
50940
|
|
|
@@ -50794,7 +50945,7 @@ import {
|
|
|
50794
50945
|
unstable_useContentManagerContext as unstable_useContentManagerContext2,
|
|
50795
50946
|
useFetchClient as useFetchClient2,
|
|
50796
50947
|
useField as useField5,
|
|
50797
|
-
useNotification
|
|
50948
|
+
useNotification as useNotification2
|
|
50798
50949
|
} from "@strapi/strapi/admin";
|
|
50799
50950
|
|
|
50800
50951
|
// node_modules/@uidotdev/usehooks/index.js
|
|
@@ -50842,7 +50993,7 @@ var SlugInput = React11.forwardRef(({ hint, labelAction, label, name, required,
|
|
|
50842
50993
|
const { formatMessage } = import_react_intl6.useIntl();
|
|
50843
50994
|
const field = useField5(name);
|
|
50844
50995
|
const fetchClient = useFetchClient2();
|
|
50845
|
-
const { toggleNotification } =
|
|
50996
|
+
const { toggleNotification } = useNotification2();
|
|
50846
50997
|
const {
|
|
50847
50998
|
contentType,
|
|
50848
50999
|
id: documentId,
|
|
@@ -50880,6 +51031,9 @@ var SlugInput = React11.forwardRef(({ hint, labelAction, label, name, required,
|
|
|
50880
51031
|
if (!value || documentId && field.initialValue === value) {
|
|
50881
51032
|
return;
|
|
50882
51033
|
}
|
|
51034
|
+
if (!attribute?.unique) {
|
|
51035
|
+
return;
|
|
51036
|
+
}
|
|
50883
51037
|
try {
|
|
50884
51038
|
setIsCheckingAvailability(true);
|
|
50885
51039
|
const { data } = await fetchClient.post(`/website/fields/check-available`, {
|
|
@@ -50905,6 +51059,7 @@ var SlugInput = React11.forwardRef(({ hint, labelAction, label, name, required,
|
|
|
50905
51059
|
setIsCheckingAvailability(false);
|
|
50906
51060
|
}
|
|
50907
51061
|
}, [
|
|
51062
|
+
attribute?.unique,
|
|
50908
51063
|
contentType?.kind,
|
|
50909
51064
|
contentType?.uid,
|
|
50910
51065
|
documentId,
|
|
@@ -51000,58 +51155,6 @@ var SlugInput = React11.forwardRef(({ hint, labelAction, label, name, required,
|
|
|
51000
51155
|
}, undefined, false, undefined, this);
|
|
51001
51156
|
});
|
|
51002
51157
|
var registerSlugInput = (app) => {
|
|
51003
|
-
const options = [
|
|
51004
|
-
{
|
|
51005
|
-
name: "options.target",
|
|
51006
|
-
type: "text",
|
|
51007
|
-
intlLabel: {
|
|
51008
|
-
id: `${pluginId}.fields.slugInput.options.targetField.label`,
|
|
51009
|
-
defaultMessage: "Target field"
|
|
51010
|
-
},
|
|
51011
|
-
description: {
|
|
51012
|
-
id: `${pluginId}.fields.slugInput.options.targetField.description`,
|
|
51013
|
-
defaultMessage: "After filling in the information, a slug will be automatically generated following the target field."
|
|
51014
|
-
}
|
|
51015
|
-
},
|
|
51016
|
-
{
|
|
51017
|
-
name: "options.unique",
|
|
51018
|
-
type: "boolean-radio-group",
|
|
51019
|
-
size: 12,
|
|
51020
|
-
defaultValue: true,
|
|
51021
|
-
intlLabel: {
|
|
51022
|
-
id: `${pluginId}.fields.slugInput.options.unique.label`,
|
|
51023
|
-
defaultMessage: "Unique check"
|
|
51024
|
-
},
|
|
51025
|
-
description: {
|
|
51026
|
-
id: `${pluginId}.fields.slugInput.options.unique.description`,
|
|
51027
|
-
defaultMessage: "Enable unique value checking?"
|
|
51028
|
-
},
|
|
51029
|
-
radios: [
|
|
51030
|
-
{
|
|
51031
|
-
title: {
|
|
51032
|
-
id: `${pluginId}.fields.slugInput.options.unique.true.label`,
|
|
51033
|
-
defaultMessage: "Enable"
|
|
51034
|
-
},
|
|
51035
|
-
description: {
|
|
51036
|
-
id: `${pluginId}.fields.slugInput.options.unique.true.description`,
|
|
51037
|
-
defaultMessage: "When enabled, it will perform a uniqueness check on the value."
|
|
51038
|
-
},
|
|
51039
|
-
value: true
|
|
51040
|
-
},
|
|
51041
|
-
{
|
|
51042
|
-
title: {
|
|
51043
|
-
id: `${pluginId}.fields.slugInput.options.unique.false.label`,
|
|
51044
|
-
defaultMessage: "Disable"
|
|
51045
|
-
},
|
|
51046
|
-
description: {
|
|
51047
|
-
id: `${pluginId}.fields.slugInput.options.unique.false.description`,
|
|
51048
|
-
defaultMessage: "Disabling unique value checks will prevent the use of unique values."
|
|
51049
|
-
},
|
|
51050
|
-
value: false
|
|
51051
|
-
}
|
|
51052
|
-
]
|
|
51053
|
-
}
|
|
51054
|
-
];
|
|
51055
51158
|
app.customFields.register({
|
|
51056
51159
|
name: "slugInput",
|
|
51057
51160
|
pluginId,
|
|
@@ -51069,7 +51172,70 @@ var registerSlugInput = (app) => {
|
|
|
51069
51172
|
Input: () => Promise.resolve({ default: SlugInput })
|
|
51070
51173
|
},
|
|
51071
51174
|
options: {
|
|
51072
|
-
base:
|
|
51175
|
+
base: [
|
|
51176
|
+
{
|
|
51177
|
+
name: "options.target",
|
|
51178
|
+
type: "text",
|
|
51179
|
+
intlLabel: {
|
|
51180
|
+
id: `${pluginId}.fields.slugInput.options.targetField.label`,
|
|
51181
|
+
defaultMessage: "Target field"
|
|
51182
|
+
},
|
|
51183
|
+
description: {
|
|
51184
|
+
id: `${pluginId}.fields.slugInput.options.targetField.description`,
|
|
51185
|
+
defaultMessage: "Auto-generate slug from a text field. Leave empty to disable."
|
|
51186
|
+
}
|
|
51187
|
+
}
|
|
51188
|
+
],
|
|
51189
|
+
advanced: [
|
|
51190
|
+
{
|
|
51191
|
+
name: "required",
|
|
51192
|
+
type: "checkbox",
|
|
51193
|
+
intlLabel: {
|
|
51194
|
+
id: "form.attribute.item.requiredField",
|
|
51195
|
+
defaultMessage: "Required field"
|
|
51196
|
+
},
|
|
51197
|
+
description: {
|
|
51198
|
+
id: "form.attribute.item.requiredField.description",
|
|
51199
|
+
defaultMessage: "Cannot create entry if empty"
|
|
51200
|
+
}
|
|
51201
|
+
},
|
|
51202
|
+
{
|
|
51203
|
+
name: "unique",
|
|
51204
|
+
type: "checkbox",
|
|
51205
|
+
intlLabel: {
|
|
51206
|
+
id: "form.attribute.item.uniqueField",
|
|
51207
|
+
defaultMessage: "Unique field"
|
|
51208
|
+
},
|
|
51209
|
+
description: {
|
|
51210
|
+
id: "form.attribute.item.uniqueField.description",
|
|
51211
|
+
defaultMessage: "Cannot create entry with duplicate value"
|
|
51212
|
+
}
|
|
51213
|
+
},
|
|
51214
|
+
{
|
|
51215
|
+
name: "minLength",
|
|
51216
|
+
type: "number",
|
|
51217
|
+
intlLabel: {
|
|
51218
|
+
id: "form.attribute.item.minimum",
|
|
51219
|
+
defaultMessage: "Minimum length"
|
|
51220
|
+
},
|
|
51221
|
+
description: {
|
|
51222
|
+
id: "form.attribute.item.minimum.description",
|
|
51223
|
+
defaultMessage: "Minimum character count"
|
|
51224
|
+
}
|
|
51225
|
+
},
|
|
51226
|
+
{
|
|
51227
|
+
name: "maxLength",
|
|
51228
|
+
type: "number",
|
|
51229
|
+
intlLabel: {
|
|
51230
|
+
id: "form.attribute.item.maximum",
|
|
51231
|
+
defaultMessage: "Maximum length"
|
|
51232
|
+
},
|
|
51233
|
+
description: {
|
|
51234
|
+
id: "form.attribute.item.maximum.description",
|
|
51235
|
+
defaultMessage: "Maximum character count"
|
|
51236
|
+
}
|
|
51237
|
+
}
|
|
51238
|
+
]
|
|
51073
51239
|
}
|
|
51074
51240
|
});
|
|
51075
51241
|
};
|
|
@@ -51089,19 +51255,19 @@ import { ChartPie } from "@strapi/icons";
|
|
|
51089
51255
|
// admin/src/widgets/WelcomeWidget.tsx
|
|
51090
51256
|
init_DashboardStats();
|
|
51091
51257
|
import {
|
|
51092
|
-
Box as
|
|
51258
|
+
Box as Box7,
|
|
51093
51259
|
Button as Button5,
|
|
51094
51260
|
Flex as Flex8,
|
|
51095
51261
|
LinkButton,
|
|
51096
51262
|
Typography as Typography9
|
|
51097
51263
|
} from "@strapi/design-system";
|
|
51098
|
-
import { useFetchClient as useFetchClient4, useNotification as
|
|
51264
|
+
import { useFetchClient as useFetchClient4, useNotification as useNotification4 } from "@strapi/strapi/admin";
|
|
51099
51265
|
import React12 from "react";
|
|
51100
51266
|
import { jsxDEV as jsxDEV29 } from "react/jsx-dev-runtime";
|
|
51101
51267
|
var WelcomeWidget = () => {
|
|
51102
51268
|
const [refresh, setRefresh] = React12.useState(false);
|
|
51103
51269
|
const fetchClient = useFetchClient4();
|
|
51104
|
-
const { toggleNotification } =
|
|
51270
|
+
const { toggleNotification } = useNotification4();
|
|
51105
51271
|
const handleRefresh = async () => {
|
|
51106
51272
|
setRefresh(true);
|
|
51107
51273
|
try {
|
|
@@ -51115,13 +51281,13 @@ var WelcomeWidget = () => {
|
|
|
51115
51281
|
setRefresh(false);
|
|
51116
51282
|
}
|
|
51117
51283
|
};
|
|
51118
|
-
return /* @__PURE__ */ jsxDEV29(
|
|
51284
|
+
return /* @__PURE__ */ jsxDEV29(Box7, {
|
|
51119
51285
|
padding: 4,
|
|
51120
51286
|
children: /* @__PURE__ */ jsxDEV29(Flex8, {
|
|
51121
51287
|
direction: "column",
|
|
51122
51288
|
gap: 4,
|
|
51123
51289
|
children: [
|
|
51124
|
-
/* @__PURE__ */ jsxDEV29(
|
|
51290
|
+
/* @__PURE__ */ jsxDEV29(Box7, {
|
|
51125
51291
|
background: "neutral0",
|
|
51126
51292
|
hasRadius: true,
|
|
51127
51293
|
width: "100%",
|
|
@@ -51161,7 +51327,7 @@ var WelcomeWidget = () => {
|
|
|
51161
51327
|
}, undefined, true, undefined, this)
|
|
51162
51328
|
]
|
|
51163
51329
|
}, undefined, true, undefined, this),
|
|
51164
|
-
/* @__PURE__ */ jsxDEV29(
|
|
51330
|
+
/* @__PURE__ */ jsxDEV29(Box7, {
|
|
51165
51331
|
background: "neutral0",
|
|
51166
51332
|
hasRadius: true,
|
|
51167
51333
|
width: "100%",
|