@nocobase/client 0.13.0-alpha.5 → 0.13.0-alpha.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.
@@ -1,4 +1,4 @@
1
- import { MappingAlgorithm } from 'antd/es/config-provider/context';
1
+ import { MappingAlgorithm } from 'antd-style';
2
2
  import { OverrideToken } from 'antd/es/theme/interface';
3
3
  import { AliasToken } from 'antd/es/theme/internal';
4
4
  export interface CustomToken extends AliasToken {
package/es/index.mjs CHANGED
@@ -80,7 +80,7 @@ import * as ReactRouterDom from "react-router-dom";
80
80
  import { useNavigate, useParams, UNSAFE_RouteContext, UNSAFE_LocationContext, useRoutes, HashRouter, BrowserRouter, MemoryRouter, Link as Link$1, Navigate, NavLink, useSearchParams, useLocation, Outlet, useMatch } from "react-router-dom";
81
81
  import { APIClient as APIClient$1, getSubAppName } from "@nocobase/sdk";
82
82
  import * as antd from "antd";
83
- import { notification, Spin, Select as Select$1, message, ConfigProvider, theme, Space as Space$1, Checkbox as Checkbox$1, Dropdown, Button, App, Input as Input$4, Divider, DatePicker as DatePicker$1, Tooltip as Tooltip$1, Popover, Cascader as Cascader$1, InputNumber as InputNumber$1, Tag, Typography, Switch, Card as Card$1, Empty, Collapse, Badge, Tree as Tree$2, Radio as Radio$1, Modal, Alert, Drawer as Drawer$1, Progress, Upload as Upload$1, Row, Col, TreeSelect as TreeSelect$2, Table as Table$2, AutoComplete as AutoComplete$1, ColorPicker as ColorPicker$1, Slider, List as List$1, Result as Result$1, Tabs as Tabs$1, Menu as Menu$1, Pagination as Pagination$1, TimePicker as TimePicker$1, Popconfirm, Avatar, Layout } from "antd";
83
+ import { notification, Spin, Select as Select$1, message, ConfigProvider, theme, Popover as Popover$1, Space as Space$1, Checkbox as Checkbox$1, Dropdown, Button, App, Input as Input$4, Divider, DatePicker as DatePicker$1, Tooltip as Tooltip$1, Cascader as Cascader$1, InputNumber as InputNumber$1, Tag, Typography, Switch, Card as Card$1, Empty, Collapse, Badge, Tree as Tree$2, Radio as Radio$1, Modal, Alert, Drawer as Drawer$1, Progress, Upload as Upload$1, Row, Col, TreeSelect as TreeSelect$2, Table as Table$2, AutoComplete as AutoComplete$1, ColorPicker as ColorPicker$1, Slider, List as List$1, Result as Result$1, Tabs as Tabs$1, Menu as Menu$1, Pagination as Pagination$1, TimePicker as TimePicker$1, Popconfirm, Avatar, Layout } from "antd";
84
84
  import * as formilyShared from "@formily/shared";
85
85
  import { merge, uid, clone, isArr, toArr as toArr$3, isValid, isPlainObj, each, isFn, applyMiddleware, isNum as isNum$1, isStr, isBool } from "@formily/shared";
86
86
  import * as ahooks from "ahooks";
@@ -121,7 +121,7 @@ import * as dndKitSortable from "@dnd-kit/sortable";
121
121
  import { SortableContext as SortableContext$1, useSortable } from "@dnd-kit/sortable";
122
122
  import * as dndKitUtilities from "@dnd-kit/utilities";
123
123
  import * as formilyAntdV5 from "@formily/antd-v5";
124
- import { FormItem as FormItem$1, ArrayCollapse as ArrayCollapse$2, FormLayout, ArrayBase, TreeSelect as TreeSelect$1, ArrayItems, Input as Input$5, ArrayTable, useFormLayout, Cascader as Cascader$2 } from "@formily/antd-v5";
124
+ import { FormItem as FormItem$1, ArrayCollapse as ArrayCollapse$2, FormLayout, ArrayBase, TreeSelect as TreeSelect$1, ArrayItems, Input as Input$5, ArrayTable, useFormLayout } from "@formily/antd-v5";
125
125
  import * as formilyCore from "@formily/core";
126
126
  import { createForm, onFormValuesChange, onFieldValueChange, isArrayField, onFormInputChange, onFieldInit, onFieldChange, onFieldReact, registerValidateFormats, registerValidateRules, onFormSubmitValidateStart } from "@formily/core";
127
127
  import * as formilyJsonSchema from "@formily/json-schema";
@@ -906,6 +906,9 @@ const nocobaseClient = /* @__PURE__ */ _mergeNamespaces({
906
906
  get PluginManagerLink() {
907
907
  return PluginManagerLink;
908
908
  },
909
+ get Popover() {
910
+ return Popover;
911
+ },
909
912
  get PoweredBy() {
910
913
  return PoweredBy;
911
914
  },
@@ -4008,6 +4011,12 @@ const common = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
4008
4011
  SortableItem,
4009
4012
  SortableProvider
4010
4013
  }, Symbol.toStringTag, { value: "Module" }));
4014
+ const Popover = (props) => {
4015
+ const avoidClose = useCallback((e) => {
4016
+ e.stopPropagation();
4017
+ }, []);
4018
+ return /* @__PURE__ */ jsx("div", { onClick: avoidClose, children: /* @__PURE__ */ jsx(Popover$1, __spreadValues({}, props)) });
4019
+ };
4011
4020
  const useStyles$o = genStyleHook("nb-action-drawer", (token) => {
4012
4021
  const { componentCls } = token;
4013
4022
  return {
@@ -10401,15 +10410,16 @@ const FilterAction = observer(
10401
10410
  const fieldSchema = useFieldSchema();
10402
10411
  const form = useMemo(() => props.form || createForm(), []);
10403
10412
  const _a = useProps(props), { options, onSubmit, onReset } = _a, others = __objRest(_a, ["options", "onSubmit", "onReset"]);
10413
+ const onOpenChange = useCallback((visible2) => {
10414
+ setVisible(visible2);
10415
+ }, []);
10404
10416
  return /* @__PURE__ */ jsx(FilterActionContext.Provider, { value: { field, fieldSchema, designable, dn }, children: /* @__PURE__ */ jsx(
10405
10417
  Popover,
10406
10418
  {
10407
10419
  destroyTooltipOnHide: true,
10408
10420
  placement: "bottomLeft",
10409
10421
  open: visible,
10410
- onOpenChange: (visible2) => {
10411
- setVisible(visible2);
10412
- },
10422
+ onOpenChange,
10413
10423
  trigger: "click",
10414
10424
  content: /* @__PURE__ */ jsx("form", { children: /* @__PURE__ */ jsxs(FormProvider, { form, children: [
10415
10425
  /* @__PURE__ */ jsx(
@@ -42152,7 +42162,10 @@ const useStyles$5 = genStyleHook("nb-page", (token) => {
42152
42162
  ".ant-page-header-heading-left": {},
42153
42163
  ".ant-page-header-footer": { marginBlockStart: "0" }
42154
42164
  },
42155
- ".ant-tabs-nav": { marginBottom: "0" }
42165
+ ".ant-tabs-nav": { marginBottom: "0" },
42166
+ ".ant-page-header-heading-title": {
42167
+ color: token.colorText
42168
+ }
42156
42169
  },
42157
42170
  ".height0": {
42158
42171
  fontSize: 0,
@@ -46314,7 +46327,7 @@ const TableBlockDesigner = () => {
46314
46327
  const template2 = useSchemaTemplate();
46315
46328
  const collection2 = useCollection();
46316
46329
  const { dragSort, resource } = field.decoratorProps;
46317
- const collectionField = getCollectionField(resource);
46330
+ const collectionField = resource && getCollectionField(resource);
46318
46331
  const treeCollection = (resource == null ? void 0 : resource.includes(".")) ? (_g = getCollection(collectionField == null ? void 0 : collectionField.target)) == null ? void 0 : _g.tree : !!(collection2 == null ? void 0 : collection2.tree);
46319
46332
  const dataScopeSchema = useMemo(() => {
46320
46333
  return {
@@ -47426,6 +47439,7 @@ const components$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
47426
47439
  Pagination,
47427
47440
  Password,
47428
47441
  Percent,
47442
+ Popover,
47429
47443
  Preview,
47430
47444
  QuickEdit,
47431
47445
  Radio,
@@ -52670,7 +52684,7 @@ const PreviewCom = (props) => {
52670
52684
  width: 200,
52671
52685
  render: (text2, record, index2) => {
52672
52686
  return /* @__PURE__ */ jsx(
52673
- Cascader$2,
52687
+ Cascader$1,
52674
52688
  {
52675
52689
  defaultValue: typeof text2 === "string" ? text2 == null ? void 0 : text2.split(".") : text2,
52676
52690
  allowClear: true,
@@ -59512,6 +59526,9 @@ const useStyles = createStyles(({ token }) => {
59512
59526
  ".ant-page-header-footer": { marginBlockStart: "0" },
59513
59527
  "& .ant-tabs-nav": {
59514
59528
  marginBottom: 0
59529
+ },
59530
+ ".ant-page-header-heading-title": {
59531
+ color: token.colorText
59515
59532
  }
59516
59533
  },
59517
59534
  pageContent: {
@@ -61985,6 +62002,7 @@ export {
61985
62002
  Plugin,
61986
62003
  PluginManagerContext,
61987
62004
  PluginManagerLink,
62005
+ Popover,
61988
62006
  PoweredBy,
61989
62007
  Preview,
61990
62008
  PrintActionInitializer,
package/es/pm/style.d.ts CHANGED
@@ -10,6 +10,9 @@ export declare const useStyles: (props?: unknown) => import("antd-style").Return
10
10
  '& .ant-tabs-nav': {
11
11
  marginBottom: number;
12
12
  };
13
+ '.ant-page-header-heading-title': {
14
+ color: string;
15
+ };
13
16
  };
14
17
  pageContent: {
15
18
  margin: number;
@@ -35,6 +35,7 @@ export * from './page';
35
35
  export * from './pagination';
36
36
  export * from './password';
37
37
  export * from './percent';
38
+ export * from './popover';
38
39
  export * from './preview';
39
40
  export * from './quick-edit';
40
41
  export * from './radio';
@@ -0,0 +1,3 @@
1
+ import { PopoverProps } from 'antd';
2
+ import React from 'react';
3
+ export declare const Popover: (props: PopoverProps) => React.JSX.Element;
@@ -0,0 +1 @@
1
+ export * from './Popover';
package/lib/index.js CHANGED
@@ -929,6 +929,9 @@ const nocobaseClient = /* @__PURE__ */ _mergeNamespaces({
929
929
  get PluginManagerLink() {
930
930
  return PluginManagerLink;
931
931
  },
932
+ get Popover() {
933
+ return Popover;
934
+ },
932
935
  get PoweredBy() {
933
936
  return PoweredBy;
934
937
  },
@@ -4031,6 +4034,12 @@ const common = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProper
4031
4034
  SortableItem,
4032
4035
  SortableProvider
4033
4036
  }, Symbol.toStringTag, { value: "Module" }));
4037
+ const Popover = (props) => {
4038
+ const avoidClose = React.useCallback((e) => {
4039
+ e.stopPropagation();
4040
+ }, []);
4041
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { onClick: avoidClose, children: /* @__PURE__ */ jsxRuntime.jsx(antd.Popover, __spreadValues({}, props)) });
4042
+ };
4034
4043
  const useStyles$o = genStyleHook("nb-action-drawer", (token) => {
4035
4044
  const { componentCls } = token;
4036
4045
  return {
@@ -10424,15 +10433,16 @@ const FilterAction = formilyReact.observer(
10424
10433
  const fieldSchema = formilyReact.useFieldSchema();
10425
10434
  const form = React.useMemo(() => props.form || formilyCore.createForm(), []);
10426
10435
  const _a = useProps(props), { options, onSubmit, onReset } = _a, others = __objRest(_a, ["options", "onSubmit", "onReset"]);
10436
+ const onOpenChange = React.useCallback((visible2) => {
10437
+ setVisible(visible2);
10438
+ }, []);
10427
10439
  return /* @__PURE__ */ jsxRuntime.jsx(FilterActionContext.Provider, { value: { field, fieldSchema, designable, dn }, children: /* @__PURE__ */ jsxRuntime.jsx(
10428
- antd.Popover,
10440
+ Popover,
10429
10441
  {
10430
10442
  destroyTooltipOnHide: true,
10431
10443
  placement: "bottomLeft",
10432
10444
  open: visible,
10433
- onOpenChange: (visible2) => {
10434
- setVisible(visible2);
10435
- },
10445
+ onOpenChange,
10436
10446
  trigger: "click",
10437
10447
  content: /* @__PURE__ */ jsxRuntime.jsx("form", { children: /* @__PURE__ */ jsxRuntime.jsxs(FormProvider, { form, children: [
10438
10448
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -11982,7 +11992,7 @@ const EllipsisWithTooltip = React.forwardRef((props, ref) => {
11982
11992
  return contentWidth > offsetWidth;
11983
11993
  };
11984
11994
  return /* @__PURE__ */ jsxRuntime.jsx(
11985
- antd.Popover,
11995
+ Popover,
11986
11996
  {
11987
11997
  open: ellipsis && visible,
11988
11998
  onOpenChange: (visible2) => {
@@ -22397,7 +22407,7 @@ Action.Popover = formilyReact.observer(
22397
22407
  (props) => {
22398
22408
  const { button, visible, setVisible } = useActionContext();
22399
22409
  return /* @__PURE__ */ jsxRuntime.jsx(
22400
- antd.Popover,
22410
+ Popover,
22401
22411
  __spreadProps(__spreadValues({}, props), {
22402
22412
  destroyTooltipOnHide: true,
22403
22413
  open: visible,
@@ -32912,7 +32922,7 @@ const InternaPopoverNester = formilyReact.observer(
32912
32922
  };
32913
32923
  return /* @__PURE__ */ jsxRuntime.jsxs(ActionContextProvider, { value: __spreadProps(__spreadValues({}, ctx), { modalProps }), children: [
32914
32924
  /* @__PURE__ */ jsxRuntime.jsx(
32915
- antd.Popover,
32925
+ Popover,
32916
32926
  {
32917
32927
  overlayStyle: { padding: "0px" },
32918
32928
  content,
@@ -41288,7 +41298,7 @@ function IconField(props) {
41288
41298
  const { t } = reactI18next.useTranslation();
41289
41299
  return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsxs(antd.Input.Group, { compact: true, children: [
41290
41300
  /* @__PURE__ */ jsxRuntime.jsx(
41291
- antd.Popover,
41301
+ Popover,
41292
41302
  {
41293
41303
  placement: "bottom",
41294
41304
  open: visible,
@@ -42175,7 +42185,10 @@ const useStyles$5 = genStyleHook("nb-page", (token) => {
42175
42185
  ".ant-page-header-heading-left": {},
42176
42186
  ".ant-page-header-footer": { marginBlockStart: "0" }
42177
42187
  },
42178
- ".ant-tabs-nav": { marginBottom: "0" }
42188
+ ".ant-tabs-nav": { marginBottom: "0" },
42189
+ ".ant-page-header-heading-title": {
42190
+ color: token.colorText
42191
+ }
42179
42192
  },
42180
42193
  ".height0": {
42181
42194
  fontSize: 0,
@@ -44583,7 +44596,7 @@ const Editable = formilyReact.observer((props) => {
44583
44596
  return child;
44584
44597
  });
44585
44598
  return /* @__PURE__ */ jsxRuntime.jsx(formilyAntdV5.FormItem, __spreadProps(__spreadValues({}, props), { labelStyle: { display: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx(
44586
- antd.Popover,
44599
+ Popover,
44587
44600
  {
44588
44601
  content: /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", height: "100%", minWidth: 500 }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: containerRef, children: modifiedChildren }) }),
44589
44602
  trigger: "click",
@@ -46337,7 +46350,7 @@ const TableBlockDesigner = () => {
46337
46350
  const template2 = useSchemaTemplate();
46338
46351
  const collection2 = useCollection();
46339
46352
  const { dragSort, resource } = field.decoratorProps;
46340
- const collectionField = getCollectionField(resource);
46353
+ const collectionField = resource && getCollectionField(resource);
46341
46354
  const treeCollection = (resource == null ? void 0 : resource.includes(".")) ? (_g = getCollection(collectionField == null ? void 0 : collectionField.target)) == null ? void 0 : _g.tree : !!(collection2 == null ? void 0 : collection2.tree);
46342
46355
  const dataScopeSchema = React.useMemo(() => {
46343
46356
  return {
@@ -47449,6 +47462,7 @@ const components$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
47449
47462
  Pagination,
47450
47463
  Password,
47451
47464
  Percent,
47465
+ Popover,
47452
47466
  Preview,
47453
47467
  QuickEdit,
47454
47468
  Radio,
@@ -52693,7 +52707,7 @@ const PreviewCom = (props) => {
52693
52707
  width: 200,
52694
52708
  render: (text2, record, index2) => {
52695
52709
  return /* @__PURE__ */ jsxRuntime.jsx(
52696
- formilyAntdV5.Cascader,
52710
+ antd.Cascader,
52697
52711
  {
52698
52712
  defaultValue: typeof text2 === "string" ? text2 == null ? void 0 : text2.split(".") : text2,
52699
52713
  allowClear: true,
@@ -59535,6 +59549,9 @@ const useStyles = antdStyle.createStyles(({ token }) => {
59535
59549
  ".ant-page-header-footer": { marginBlockStart: "0" },
59536
59550
  "& .ant-tabs-nav": {
59537
59551
  marginBottom: 0
59552
+ },
59553
+ ".ant-page-header-heading-title": {
59554
+ color: token.colorText
59538
59555
  }
59539
59556
  },
59540
59557
  pageContent: {
@@ -62011,6 +62028,7 @@ exports.PinnedPluginListProvider = PinnedPluginListProvider;
62011
62028
  exports.Plugin = Plugin;
62012
62029
  exports.PluginManagerContext = PluginManagerContext;
62013
62030
  exports.PluginManagerLink = PluginManagerLink;
62031
+ exports.Popover = Popover;
62014
62032
  exports.PoweredBy = PoweredBy;
62015
62033
  exports.Preview = Preview;
62016
62034
  exports.PrintActionInitializer = PrintActionInitializer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/client",
3
- "version": "0.13.0-alpha.5",
3
+ "version": "0.13.0-alpha.6",
4
4
  "license": "Apache-2.0",
5
5
  "main": "lib",
6
6
  "module": "es/index.js",
@@ -8,14 +8,14 @@
8
8
  "dependencies": {
9
9
  "@ant-design/cssinjs": "^1.11.1",
10
10
  "@ant-design/icons": "^5.1.4",
11
- "@ant-design/pro-layout": "^7.14.3",
11
+ "@ant-design/pro-layout": "^7.16.11",
12
12
  "@antv/g2plot": "^2.4.18",
13
13
  "@ctrl/tinycolor": "^3.6.0",
14
14
  "@dnd-kit/core": "^5.0.1",
15
15
  "@dnd-kit/modifiers": "^6.0.0",
16
16
  "@dnd-kit/sortable": "^6.0.0",
17
17
  "@emotion/css": "^11.7.1",
18
- "@formily/antd-v5": "^1.1.0",
18
+ "@formily/antd-v5": "1.1.1",
19
19
  "@formily/core": "^2.2.27",
20
20
  "@formily/grid": "^2.2.27",
21
21
  "@formily/json-schema": "^2.2.27",
@@ -25,13 +25,13 @@
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.13.0-alpha.5",
29
- "@nocobase/sdk": "0.13.0-alpha.5",
30
- "@nocobase/utils": "0.13.0-alpha.5",
28
+ "@nocobase/evaluators": "0.13.0-alpha.6",
29
+ "@nocobase/sdk": "0.13.0-alpha.6",
30
+ "@nocobase/utils": "0.13.0-alpha.6",
31
31
  "@types/requirejs": "^2.1.34",
32
32
  "ahooks": "^3.7.2",
33
- "antd": "^5.7.3",
34
- "antd-style": "^3.3.0",
33
+ "antd": "5.8.6",
34
+ "antd-style": "3.4.5",
35
35
  "axios": "^0.26.1",
36
36
  "classnames": "^2.3.1",
37
37
  "cron-parser": "^4.6.0",
@@ -76,5 +76,5 @@
76
76
  "dumi": "^2.2.0",
77
77
  "dumi-theme-nocobase": "^0.2.14"
78
78
  },
79
- "gitHead": "9eabe607b4a20c356fdb2fd95e40fa476986dcb0"
79
+ "gitHead": "49ef71c8bdaab986f47c8a84bcf15e2123ba9b59"
80
80
  }