@nocobase/client 0.15.0-alpha.1 → 0.15.0-alpha.2
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/es/application/PluginSettingsManager.d.ts +7 -4
- package/es/index.mjs +28 -31
- package/lib/index.js +27 -30
- package/package.json +5 -5
|
@@ -5,14 +5,16 @@ export declare const ADMIN_SETTINGS_PATH = "/admin/settings/";
|
|
|
5
5
|
export declare const SNIPPET_PREFIX = "pm.";
|
|
6
6
|
export interface PluginSettingsManagerSettingOptionsType {
|
|
7
7
|
title: string;
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* @default Outlet
|
|
10
|
+
*/
|
|
11
|
+
Component?: RouteType['Component'];
|
|
9
12
|
icon?: string;
|
|
10
13
|
/**
|
|
11
14
|
* sort, the smaller the number, the higher the priority
|
|
12
15
|
* @default 0
|
|
13
16
|
*/
|
|
14
17
|
sort?: number;
|
|
15
|
-
isBookmark?: boolean;
|
|
16
18
|
aclSnippet?: string;
|
|
17
19
|
[index: string]: any;
|
|
18
20
|
}
|
|
@@ -24,8 +26,9 @@ export interface PluginSettingsPageType {
|
|
|
24
26
|
path: string;
|
|
25
27
|
sort?: number;
|
|
26
28
|
name?: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
isAllow?: boolean;
|
|
30
|
+
topLevelName?: string;
|
|
31
|
+
aclSnippet: string;
|
|
29
32
|
children?: PluginSettingsPageType[];
|
|
30
33
|
[index: string]: any;
|
|
31
34
|
}
|
package/es/index.mjs
CHANGED
|
@@ -77,7 +77,7 @@ import * as formilyReact from "@formily/react";
|
|
|
77
77
|
import { useForm, observer, useField, useFieldSchema, Schema, RecursionField, connect, mapProps, SchemaOptionsContext, SchemaComponentsContext, ExpressionScope, SchemaExpressionScopeContext, FormProvider as FormProvider$1, FormContext, FieldContext, ObjectField, ArrayField, Observer, mapReadPretty, useFormEffects, createSchemaField, SchemaContext } from "@formily/react";
|
|
78
78
|
import React, { createContext, useContext, useState, useMemo, useCallback, useRef, useEffect, createElement, Fragment as Fragment$1, isValidElement, useTransition, forwardRef, useImperativeHandle, createRef, memo, useLayoutEffect } from "react";
|
|
79
79
|
import * as ReactRouterDom from "react-router-dom";
|
|
80
|
-
import { useNavigate, useParams, useLocation, Router, UNSAFE_RouteContext, UNSAFE_LocationContext, useRoutes, HashRouter, BrowserRouter, MemoryRouter, Link as Link$1, Navigate, NavLink, useSearchParams,
|
|
80
|
+
import { useNavigate, useParams, useLocation, Router, UNSAFE_RouteContext, UNSAFE_LocationContext, useRoutes, HashRouter, BrowserRouter, MemoryRouter, Outlet, Link as Link$1, Navigate, NavLink, useSearchParams, useMatch } from "react-router-dom";
|
|
81
81
|
import * as nocobaseSDK from "@nocobase/sdk";
|
|
82
82
|
import { APIClient as APIClient$1, getSubAppName } from "@nocobase/sdk";
|
|
83
83
|
import * as antd from "antd";
|
|
@@ -9016,7 +9016,7 @@ const useProps = (originalProps = {}) => {
|
|
|
9016
9016
|
const useTableSize = () => {
|
|
9017
9017
|
const [height, setTableHeight] = useState(0);
|
|
9018
9018
|
const [width, setTableWidth] = useState(0);
|
|
9019
|
-
const elementRef = useRef();
|
|
9019
|
+
const elementRef = useRef(null);
|
|
9020
9020
|
const calcTableSize = useCallback(() => {
|
|
9021
9021
|
var _a, _b, _c;
|
|
9022
9022
|
if (!elementRef.current)
|
|
@@ -9033,7 +9033,7 @@ const useTableSize = () => {
|
|
|
9033
9033
|
setTableHeight(tableHeight - headerHeight - paginationHeight);
|
|
9034
9034
|
}, []);
|
|
9035
9035
|
const tableSizeRefCallback = (ref) => {
|
|
9036
|
-
elementRef.current = ref;
|
|
9036
|
+
elementRef.current = ref && ref.children ? ref.children[0] : null;
|
|
9037
9037
|
calcTableSize();
|
|
9038
9038
|
};
|
|
9039
9039
|
useEventListener("resize", calcTableSize);
|
|
@@ -22638,6 +22638,7 @@ function RemoveButton(props = {}) {
|
|
|
22638
22638
|
}
|
|
22639
22639
|
function WorkflowSelect(_a) {
|
|
22640
22640
|
var _b = _a, { types: types2 } = _b, props = __objRest(_b, ["types"]);
|
|
22641
|
+
const { t } = useTranslation();
|
|
22641
22642
|
const index2 = ArrayTable.useIndex();
|
|
22642
22643
|
const { setValuesIn } = useForm();
|
|
22643
22644
|
const baseCollection = useCollection();
|
|
@@ -22662,7 +22663,13 @@ function WorkflowSelect(_a) {
|
|
|
22662
22663
|
});
|
|
22663
22664
|
return /* @__PURE__ */ jsx(
|
|
22664
22665
|
RemoteSelect,
|
|
22665
|
-
|
|
22666
|
+
__spreadValues({
|
|
22667
|
+
manual: false,
|
|
22668
|
+
placeholder: t("Select workflow", { ns: "workflow" }),
|
|
22669
|
+
fieldNames: {
|
|
22670
|
+
label: "title",
|
|
22671
|
+
value: "key"
|
|
22672
|
+
},
|
|
22666
22673
|
service: {
|
|
22667
22674
|
resource: "workflows",
|
|
22668
22675
|
action: "list",
|
|
@@ -22674,7 +22681,7 @@ function WorkflowSelect(_a) {
|
|
|
22674
22681
|
}
|
|
22675
22682
|
}
|
|
22676
22683
|
}
|
|
22677
|
-
})
|
|
22684
|
+
}, props)
|
|
22678
22685
|
);
|
|
22679
22686
|
}
|
|
22680
22687
|
function WorkflowConfig() {
|
|
@@ -22766,11 +22773,6 @@ function WorkflowConfig() {
|
|
|
22766
22773
|
"x-decorator": "FormItem",
|
|
22767
22774
|
"x-component": "WorkflowSelect",
|
|
22768
22775
|
"x-component-props": {
|
|
22769
|
-
placeholder: t("Select workflow", { ns: "workflow" }),
|
|
22770
|
-
fieldNames: {
|
|
22771
|
-
label: "title",
|
|
22772
|
-
value: "key"
|
|
22773
|
-
},
|
|
22774
22776
|
types: workflowTypes.map((item) => item.value)
|
|
22775
22777
|
},
|
|
22776
22778
|
required: true
|
|
@@ -29385,14 +29387,14 @@ class PluginSettingsManager {
|
|
|
29385
29387
|
}
|
|
29386
29388
|
add(name, options) {
|
|
29387
29389
|
const nameArr = name.split(".");
|
|
29388
|
-
const
|
|
29389
|
-
this.settings[name] = __spreadProps(__spreadValues({}, options), { name,
|
|
29390
|
+
const topLevelName = nameArr[0];
|
|
29391
|
+
this.settings[name] = __spreadProps(__spreadValues({ Component: Outlet }, options), { name, topLevelName });
|
|
29390
29392
|
if (nameArr.length > 1) {
|
|
29391
29393
|
set$1(this.settings, nameArr.join(".children."), this.settings[name]);
|
|
29392
29394
|
}
|
|
29393
29395
|
this.app.router.add(this.getRouteName(name), {
|
|
29394
29396
|
path: this.getRoutePath(name),
|
|
29395
|
-
Component:
|
|
29397
|
+
Component: this.settings[name].Component
|
|
29396
29398
|
});
|
|
29397
29399
|
}
|
|
29398
29400
|
remove(name) {
|
|
@@ -29434,7 +29436,7 @@ class PluginSettingsManager {
|
|
|
29434
29436
|
});
|
|
29435
29437
|
}
|
|
29436
29438
|
getList(filterAuth = true) {
|
|
29437
|
-
return Object.
|
|
29439
|
+
return Array.from(new Set(Object.values(this.settings).map((item) => item.topLevelName))).sort((a, b) => a.localeCompare(b)).map((name) => this.get(name, filterAuth)).filter(Boolean).sort((a, b) => (a.sort || 0) - (b.sort || 0));
|
|
29438
29440
|
}
|
|
29439
29441
|
getAclSnippets() {
|
|
29440
29442
|
return Object.keys(this.settings).map((name) => this.getAclSnippet(name));
|
|
@@ -63225,7 +63227,7 @@ const SettingsCenterDropdown = () => {
|
|
|
63225
63227
|
}
|
|
63226
63228
|
)
|
|
63227
63229
|
},
|
|
63228
|
-
setting.
|
|
63230
|
+
setting.name
|
|
63229
63231
|
))
|
|
63230
63232
|
}
|
|
63231
63233
|
) }),
|
|
@@ -63353,11 +63355,11 @@ const SettingsCenterComponent = () => {
|
|
|
63353
63355
|
return map;
|
|
63354
63356
|
}, [settings]);
|
|
63355
63357
|
const currentSetting = useMemo(() => settingsMapByPath[location2.pathname], [location2.pathname, settingsMapByPath]);
|
|
63356
|
-
const
|
|
63358
|
+
const currentTopLevelSetting = useMemo(() => {
|
|
63357
63359
|
if (!currentSetting) {
|
|
63358
63360
|
return null;
|
|
63359
63361
|
}
|
|
63360
|
-
return settings.find((item) => item.name === currentSetting.
|
|
63362
|
+
return settings.find((item) => item.name === currentSetting.topLevelName);
|
|
63361
63363
|
}, [currentSetting, settings]);
|
|
63362
63364
|
const sidebarMenus = useMemo(() => {
|
|
63363
63365
|
return getMenuItems(settings.map((item) => __spreadProps(__spreadValues({}, item), { children: null })));
|
|
@@ -63365,8 +63367,8 @@ const SettingsCenterComponent = () => {
|
|
|
63365
63367
|
if (!currentSetting || location2.pathname === ADMIN_SETTINGS_PATH || location2.pathname === ADMIN_SETTINGS_PATH + "/") {
|
|
63366
63368
|
return /* @__PURE__ */ jsx(Navigate, { replace: true, to: getFirstDeepChildPath(settings) });
|
|
63367
63369
|
}
|
|
63368
|
-
if (location2.pathname ===
|
|
63369
|
-
return /* @__PURE__ */ jsx(Navigate, { replace: true, to: getFirstDeepChildPath(
|
|
63370
|
+
if (location2.pathname === currentTopLevelSetting.path && ((_a = currentTopLevelSetting.children) == null ? void 0 : _a.length) > 0) {
|
|
63371
|
+
return /* @__PURE__ */ jsx(Navigate, { replace: true, to: getFirstDeepChildPath(currentTopLevelSetting.children) });
|
|
63370
63372
|
}
|
|
63371
63373
|
return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsxs(Layout, { children: [
|
|
63372
63374
|
/* @__PURE__ */ jsx(
|
|
@@ -63389,7 +63391,7 @@ const SettingsCenterComponent = () => {
|
|
|
63389
63391
|
children: /* @__PURE__ */ jsx(
|
|
63390
63392
|
Menu$1,
|
|
63391
63393
|
{
|
|
63392
|
-
selectedKeys: [currentSetting == null ? void 0 : currentSetting.
|
|
63394
|
+
selectedKeys: [currentSetting == null ? void 0 : currentSetting.topLevelName],
|
|
63393
63395
|
style: { height: "calc(100vh - 46px)", overflowY: "auto", overflowX: "hidden" },
|
|
63394
63396
|
onClick: ({ key }) => {
|
|
63395
63397
|
var _a2;
|
|
@@ -63411,11 +63413,11 @@ const SettingsCenterComponent = () => {
|
|
|
63411
63413
|
{
|
|
63412
63414
|
className: styles.pageHeader,
|
|
63413
63415
|
style: {
|
|
63414
|
-
paddingBottom: ((_b =
|
|
63416
|
+
paddingBottom: ((_b = currentTopLevelSetting.children) == null ? void 0 : _b.length) > 0 ? 0 : theme2.paddingSM
|
|
63415
63417
|
},
|
|
63416
63418
|
ghost: false,
|
|
63417
|
-
title:
|
|
63418
|
-
footer: ((_c =
|
|
63419
|
+
title: currentTopLevelSetting.title,
|
|
63420
|
+
footer: ((_c = currentTopLevelSetting.children) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ jsx(
|
|
63419
63421
|
Menu$1,
|
|
63420
63422
|
{
|
|
63421
63423
|
style: { marginLeft: -theme2.margin },
|
|
@@ -63424,7 +63426,7 @@ const SettingsCenterComponent = () => {
|
|
|
63424
63426
|
},
|
|
63425
63427
|
selectedKeys: [currentSetting == null ? void 0 : currentSetting.name],
|
|
63426
63428
|
mode: "horizontal",
|
|
63427
|
-
items: getMenuItems(
|
|
63429
|
+
items: getMenuItems(currentTopLevelSetting.children)
|
|
63428
63430
|
}
|
|
63429
63431
|
)
|
|
63430
63432
|
}
|
|
@@ -64380,28 +64382,23 @@ class PMPlugin extends Plugin {
|
|
|
64380
64382
|
title: '{{t("ACL")}}',
|
|
64381
64383
|
icon: "LockOutlined",
|
|
64382
64384
|
Component: ACLPane,
|
|
64383
|
-
aclSnippet: "pm.acl.roles"
|
|
64384
|
-
isBookmark: true
|
|
64385
|
+
aclSnippet: "pm.acl.roles"
|
|
64385
64386
|
});
|
|
64386
64387
|
this.app.pluginSettingsManager.add("ui-schema-storage", {
|
|
64387
64388
|
title: '{{t("Block templates")}}',
|
|
64388
64389
|
icon: "LayoutOutlined",
|
|
64389
64390
|
Component: BlockTemplatesPane,
|
|
64390
|
-
isBookmark: true,
|
|
64391
64391
|
aclSnippet: "pm.ui-schema-storage.block-templates"
|
|
64392
64392
|
});
|
|
64393
64393
|
this.app.pluginSettingsManager.add("system-settings", {
|
|
64394
64394
|
icon: "SettingOutlined",
|
|
64395
64395
|
title: '{{t("System settings")}}',
|
|
64396
64396
|
Component: SystemSettingsPane,
|
|
64397
|
-
isBookmark: true,
|
|
64398
64397
|
aclSnippet: "pm.system-settings.system-settings"
|
|
64399
64398
|
});
|
|
64400
64399
|
this.app.pluginSettingsManager.add("collection-manager", {
|
|
64401
64400
|
icon: "DatabaseOutlined",
|
|
64402
|
-
title: '{{t("Collection manager")}}'
|
|
64403
|
-
Component: () => /* @__PURE__ */ jsx(Outlet, {}),
|
|
64404
|
-
isBookmark: true
|
|
64401
|
+
title: '{{t("Collection manager")}}'
|
|
64405
64402
|
});
|
|
64406
64403
|
this.app.pluginSettingsManager.add("collection-manager.collections", {
|
|
64407
64404
|
title: '{{t("Collections & Fields")}}',
|
package/lib/index.js
CHANGED
|
@@ -9666,7 +9666,7 @@ const useProps = (originalProps = {}) => {
|
|
|
9666
9666
|
const useTableSize = () => {
|
|
9667
9667
|
const [height, setTableHeight] = (0, import_react2.useState)(0);
|
|
9668
9668
|
const [width, setTableWidth] = (0, import_react2.useState)(0);
|
|
9669
|
-
const elementRef = (0, import_react2.useRef)();
|
|
9669
|
+
const elementRef = (0, import_react2.useRef)(null);
|
|
9670
9670
|
const calcTableSize = (0, import_react2.useCallback)(() => {
|
|
9671
9671
|
var _a, _b, _c;
|
|
9672
9672
|
if (!elementRef.current)
|
|
@@ -9683,7 +9683,7 @@ const useTableSize = () => {
|
|
|
9683
9683
|
setTableHeight(tableHeight - headerHeight - paginationHeight);
|
|
9684
9684
|
}, []);
|
|
9685
9685
|
const tableSizeRefCallback = (ref) => {
|
|
9686
|
-
elementRef.current = ref;
|
|
9686
|
+
elementRef.current = ref && ref.children ? ref.children[0] : null;
|
|
9687
9687
|
calcTableSize();
|
|
9688
9688
|
};
|
|
9689
9689
|
(0, import_ahooks.useEventListener)("resize", calcTableSize);
|
|
@@ -23288,6 +23288,7 @@ function RemoveButton(props = {}) {
|
|
|
23288
23288
|
}
|
|
23289
23289
|
function WorkflowSelect(_a) {
|
|
23290
23290
|
var _b = _a, { types: types2 } = _b, props = __objRest(_b, ["types"]);
|
|
23291
|
+
const { t } = (0, import_react_i18next.useTranslation)();
|
|
23291
23292
|
const index2 = import_antd_v5.ArrayTable.useIndex();
|
|
23292
23293
|
const { setValuesIn } = (0, import_react.useForm)();
|
|
23293
23294
|
const baseCollection = useCollection();
|
|
@@ -23312,7 +23313,13 @@ function WorkflowSelect(_a) {
|
|
|
23312
23313
|
});
|
|
23313
23314
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
23314
23315
|
RemoteSelect,
|
|
23315
|
-
|
|
23316
|
+
__spreadValues({
|
|
23317
|
+
manual: false,
|
|
23318
|
+
placeholder: t("Select workflow", { ns: "workflow" }),
|
|
23319
|
+
fieldNames: {
|
|
23320
|
+
label: "title",
|
|
23321
|
+
value: "key"
|
|
23322
|
+
},
|
|
23316
23323
|
service: {
|
|
23317
23324
|
resource: "workflows",
|
|
23318
23325
|
action: "list",
|
|
@@ -23324,7 +23331,7 @@ function WorkflowSelect(_a) {
|
|
|
23324
23331
|
}
|
|
23325
23332
|
}
|
|
23326
23333
|
}
|
|
23327
|
-
})
|
|
23334
|
+
}, props)
|
|
23328
23335
|
);
|
|
23329
23336
|
}
|
|
23330
23337
|
function WorkflowConfig() {
|
|
@@ -23416,11 +23423,6 @@ function WorkflowConfig() {
|
|
|
23416
23423
|
"x-decorator": "FormItem",
|
|
23417
23424
|
"x-component": "WorkflowSelect",
|
|
23418
23425
|
"x-component-props": {
|
|
23419
|
-
placeholder: t("Select workflow", { ns: "workflow" }),
|
|
23420
|
-
fieldNames: {
|
|
23421
|
-
label: "title",
|
|
23422
|
-
value: "key"
|
|
23423
|
-
},
|
|
23424
23426
|
types: workflowTypes.map((item) => item.value)
|
|
23425
23427
|
},
|
|
23426
23428
|
required: true
|
|
@@ -30035,14 +30037,14 @@ class PluginSettingsManager {
|
|
|
30035
30037
|
}
|
|
30036
30038
|
add(name, options) {
|
|
30037
30039
|
const nameArr = name.split(".");
|
|
30038
|
-
const
|
|
30039
|
-
this.settings[name] = __spreadProps(__spreadValues({}, options), { name,
|
|
30040
|
+
const topLevelName = nameArr[0];
|
|
30041
|
+
this.settings[name] = __spreadProps(__spreadValues({ Component: import_react_router_dom.Outlet }, options), { name, topLevelName });
|
|
30040
30042
|
if (nameArr.length > 1) {
|
|
30041
30043
|
(0, import_lodash.set)(this.settings, nameArr.join(".children."), this.settings[name]);
|
|
30042
30044
|
}
|
|
30043
30045
|
this.app.router.add(this.getRouteName(name), {
|
|
30044
30046
|
path: this.getRoutePath(name),
|
|
30045
|
-
Component:
|
|
30047
|
+
Component: this.settings[name].Component
|
|
30046
30048
|
});
|
|
30047
30049
|
}
|
|
30048
30050
|
remove(name) {
|
|
@@ -30084,7 +30086,7 @@ class PluginSettingsManager {
|
|
|
30084
30086
|
});
|
|
30085
30087
|
}
|
|
30086
30088
|
getList(filterAuth = true) {
|
|
30087
|
-
return Object.
|
|
30089
|
+
return Array.from(new Set(Object.values(this.settings).map((item) => item.topLevelName))).sort((a, b) => a.localeCompare(b)).map((name) => this.get(name, filterAuth)).filter(Boolean).sort((a, b) => (a.sort || 0) - (b.sort || 0));
|
|
30088
30090
|
}
|
|
30089
30091
|
getAclSnippets() {
|
|
30090
30092
|
return Object.keys(this.settings).map((name) => this.getAclSnippet(name));
|
|
@@ -63874,7 +63876,7 @@ const SettingsCenterDropdown = () => {
|
|
|
63874
63876
|
}
|
|
63875
63877
|
)
|
|
63876
63878
|
},
|
|
63877
|
-
setting.
|
|
63879
|
+
setting.name
|
|
63878
63880
|
))
|
|
63879
63881
|
}
|
|
63880
63882
|
) }),
|
|
@@ -64002,11 +64004,11 @@ const SettingsCenterComponent = () => {
|
|
|
64002
64004
|
return map;
|
|
64003
64005
|
}, [settings]);
|
|
64004
64006
|
const currentSetting = (0, import_react2.useMemo)(() => settingsMapByPath[location2.pathname], [location2.pathname, settingsMapByPath]);
|
|
64005
|
-
const
|
|
64007
|
+
const currentTopLevelSetting = (0, import_react2.useMemo)(() => {
|
|
64006
64008
|
if (!currentSetting) {
|
|
64007
64009
|
return null;
|
|
64008
64010
|
}
|
|
64009
|
-
return settings.find((item) => item.name === currentSetting.
|
|
64011
|
+
return settings.find((item) => item.name === currentSetting.topLevelName);
|
|
64010
64012
|
}, [currentSetting, settings]);
|
|
64011
64013
|
const sidebarMenus = (0, import_react2.useMemo)(() => {
|
|
64012
64014
|
return getMenuItems(settings.map((item) => __spreadProps(__spreadValues({}, item), { children: null })));
|
|
@@ -64014,8 +64016,8 @@ const SettingsCenterComponent = () => {
|
|
|
64014
64016
|
if (!currentSetting || location2.pathname === ADMIN_SETTINGS_PATH || location2.pathname === ADMIN_SETTINGS_PATH + "/") {
|
|
64015
64017
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Navigate, { replace: true, to: getFirstDeepChildPath(settings) });
|
|
64016
64018
|
}
|
|
64017
|
-
if (location2.pathname ===
|
|
64018
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Navigate, { replace: true, to: getFirstDeepChildPath(
|
|
64019
|
+
if (location2.pathname === currentTopLevelSetting.path && ((_a = currentTopLevelSetting.children) == null ? void 0 : _a.length) > 0) {
|
|
64020
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Navigate, { replace: true, to: getFirstDeepChildPath(currentTopLevelSetting.children) });
|
|
64019
64021
|
}
|
|
64020
64022
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_antd.Layout, { children: [
|
|
64021
64023
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
@@ -64038,7 +64040,7 @@ const SettingsCenterComponent = () => {
|
|
|
64038
64040
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64039
64041
|
import_antd.Menu,
|
|
64040
64042
|
{
|
|
64041
|
-
selectedKeys: [currentSetting == null ? void 0 : currentSetting.
|
|
64043
|
+
selectedKeys: [currentSetting == null ? void 0 : currentSetting.topLevelName],
|
|
64042
64044
|
style: { height: "calc(100vh - 46px)", overflowY: "auto", overflowX: "hidden" },
|
|
64043
64045
|
onClick: ({ key }) => {
|
|
64044
64046
|
var _a2;
|
|
@@ -64060,11 +64062,11 @@ const SettingsCenterComponent = () => {
|
|
|
64060
64062
|
{
|
|
64061
64063
|
className: styles.pageHeader,
|
|
64062
64064
|
style: {
|
|
64063
|
-
paddingBottom: ((_b =
|
|
64065
|
+
paddingBottom: ((_b = currentTopLevelSetting.children) == null ? void 0 : _b.length) > 0 ? 0 : theme2.paddingSM
|
|
64064
64066
|
},
|
|
64065
64067
|
ghost: false,
|
|
64066
|
-
title:
|
|
64067
|
-
footer: ((_c =
|
|
64068
|
+
title: currentTopLevelSetting.title,
|
|
64069
|
+
footer: ((_c = currentTopLevelSetting.children) == null ? void 0 : _c.length) > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
64068
64070
|
import_antd.Menu,
|
|
64069
64071
|
{
|
|
64070
64072
|
style: { marginLeft: -theme2.margin },
|
|
@@ -64073,7 +64075,7 @@ const SettingsCenterComponent = () => {
|
|
|
64073
64075
|
},
|
|
64074
64076
|
selectedKeys: [currentSetting == null ? void 0 : currentSetting.name],
|
|
64075
64077
|
mode: "horizontal",
|
|
64076
|
-
items: getMenuItems(
|
|
64078
|
+
items: getMenuItems(currentTopLevelSetting.children)
|
|
64077
64079
|
}
|
|
64078
64080
|
)
|
|
64079
64081
|
}
|
|
@@ -65029,28 +65031,23 @@ class PMPlugin extends Plugin {
|
|
|
65029
65031
|
title: '{{t("ACL")}}',
|
|
65030
65032
|
icon: "LockOutlined",
|
|
65031
65033
|
Component: ACLPane,
|
|
65032
|
-
aclSnippet: "pm.acl.roles"
|
|
65033
|
-
isBookmark: true
|
|
65034
|
+
aclSnippet: "pm.acl.roles"
|
|
65034
65035
|
});
|
|
65035
65036
|
this.app.pluginSettingsManager.add("ui-schema-storage", {
|
|
65036
65037
|
title: '{{t("Block templates")}}',
|
|
65037
65038
|
icon: "LayoutOutlined",
|
|
65038
65039
|
Component: BlockTemplatesPane,
|
|
65039
|
-
isBookmark: true,
|
|
65040
65040
|
aclSnippet: "pm.ui-schema-storage.block-templates"
|
|
65041
65041
|
});
|
|
65042
65042
|
this.app.pluginSettingsManager.add("system-settings", {
|
|
65043
65043
|
icon: "SettingOutlined",
|
|
65044
65044
|
title: '{{t("System settings")}}',
|
|
65045
65045
|
Component: SystemSettingsPane,
|
|
65046
|
-
isBookmark: true,
|
|
65047
65046
|
aclSnippet: "pm.system-settings.system-settings"
|
|
65048
65047
|
});
|
|
65049
65048
|
this.app.pluginSettingsManager.add("collection-manager", {
|
|
65050
65049
|
icon: "DatabaseOutlined",
|
|
65051
|
-
title: '{{t("Collection manager")}}'
|
|
65052
|
-
Component: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_router_dom.Outlet, {}),
|
|
65053
|
-
isBookmark: true
|
|
65050
|
+
title: '{{t("Collection manager")}}'
|
|
65054
65051
|
});
|
|
65055
65052
|
this.app.pluginSettingsManager.add("collection-manager.collections", {
|
|
65056
65053
|
title: '{{t("Collections & Fields")}}',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/client",
|
|
3
|
-
"version": "0.15.0-alpha.
|
|
3
|
+
"version": "0.15.0-alpha.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"@formily/reactive-react": "^2.2.27",
|
|
26
26
|
"@formily/shared": "^2.2.27",
|
|
27
27
|
"@formily/validator": "^2.2.27",
|
|
28
|
-
"@nocobase/evaluators": "0.15.0-alpha.
|
|
29
|
-
"@nocobase/sdk": "0.15.0-alpha.
|
|
30
|
-
"@nocobase/utils": "0.15.0-alpha.
|
|
28
|
+
"@nocobase/evaluators": "0.15.0-alpha.2",
|
|
29
|
+
"@nocobase/sdk": "0.15.0-alpha.2",
|
|
30
|
+
"@nocobase/utils": "0.15.0-alpha.2",
|
|
31
31
|
"@types/requirejs": "^2.1.34",
|
|
32
32
|
"ahooks": "^3.7.2",
|
|
33
33
|
"antd": "^5.8.6",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"dumi": "^2.2.0",
|
|
77
77
|
"dumi-theme-nocobase": "^0.2.14"
|
|
78
78
|
},
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "2504887cf82935200bf546b28adf2872cab3e452"
|
|
80
80
|
}
|