@tachybase/client 1.6.22 → 1.6.24

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.
@@ -11,9 +11,9 @@ import * as __WEBPACK_EXTERNAL_MODULE_antd__ from "antd";
11
11
  import * as __WEBPACK_EXTERNAL_MODULE_ahooks__ from "ahooks";
12
12
  import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema_532e17e1__ from "@tachybase/schema";
13
13
  import * as __WEBPACK_EXTERNAL_MODULE_react_router_dom_5358f3fe__ from "react-router-dom";
14
+ import * as __WEBPACK_EXTERNAL_MODULE_antd_style_1dcbd21e__ from "antd-style";
14
15
  import * as __WEBPACK_EXTERNAL_MODULE__ant_design_icons_a8184985__ from "@ant-design/icons";
15
16
  import * as __WEBPACK_EXTERNAL_MODULE__emotion_css_bfcd1b5d__ from "@emotion/css";
16
- import * as __WEBPACK_EXTERNAL_MODULE_antd_style_1dcbd21e__ from "antd-style";
17
17
  import * as __WEBPACK_EXTERNAL_MODULE_i18next__ from "i18next";
18
18
  import * as __WEBPACK_EXTERNAL_MODULE__ant_design_cssinjs_c619260f__ from "@ant-design/cssinjs";
19
19
  import * as __WEBPACK_EXTERNAL_MODULE__dnd_kit_accessibility_682092eb__ from "@dnd-kit/accessibility";
@@ -1,5 +1,5 @@
1
1
  import { Plugin } from "../../application/Plugin.mjs";
2
- import { fileCSV, fileDef, filePdf, fileXLS, fileXLSX, imagePng, imageSvg, imagejpeg } from "./previewers/index.mjs";
2
+ import { fileCSV, fileDef, fileDocx, filePdf, fileXLS, fileXLSX, imagePng, imageSvg, imagejpeg } from "./previewers/index.mjs";
3
3
  class AttachmentPreviewPlugin extends Plugin {
4
4
  async load() {
5
5
  this.app.AttachmentPreviewManager.add(imagePng);
@@ -10,6 +10,7 @@ class AttachmentPreviewPlugin extends Plugin {
10
10
  this.app.AttachmentPreviewManager.add(fileXLS);
11
11
  this.app.AttachmentPreviewManager.add(fileXLSX);
12
12
  this.app.AttachmentPreviewManager.add(fileCSV);
13
+ this.app.AttachmentPreviewManager.add(fileDocx);
13
14
  }
14
15
  }
15
16
  export { AttachmentPreviewPlugin };
@@ -0,0 +1,6 @@
1
+ export declare const fileDocx: {
2
+ key: string;
3
+ type: string;
4
+ viewComponet: (props: any) => import("react/jsx-runtime").JSX.Element;
5
+ checkedComponent: (props: any) => import("react/jsx-runtime").JSX.Element;
6
+ };
@@ -0,0 +1,51 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from "react";
3
+ import { renderAsync } from "docx-preview";
4
+ import { useAPIClient } from "../../../api-client/index.mjs";
5
+ import { useStyles } from "./file-docx.style.mjs";
6
+ const ViewComponent = (props)=>{
7
+ const { file, prefixCls } = props;
8
+ return file.imageUrl && /*#__PURE__*/ jsx("img", {
9
+ src: "".concat(file.imageUrl).concat(file.thumbnailRule || ''),
10
+ style: {
11
+ width: '100%',
12
+ height: '100%'
13
+ },
14
+ alt: file.title,
15
+ className: "".concat(prefixCls, "-list-item-image")
16
+ });
17
+ };
18
+ const CheckedComponent = (props)=>{
19
+ const { file } = props;
20
+ const api = useAPIClient();
21
+ const ref = useRef(null);
22
+ const { styles } = useStyles();
23
+ var _file_url;
24
+ let fileUrl = null != (_file_url = file.url) ? _file_url : '';
25
+ if (fileUrl.startsWith('/storage') && window.location.origin) fileUrl = window.location.origin + fileUrl;
26
+ useEffect(()=>{
27
+ api.request({
28
+ url: fileUrl,
29
+ responseType: 'arraybuffer'
30
+ }).then((res)=>{
31
+ renderAsync(res.data, ref.current);
32
+ });
33
+ }, [
34
+ file.url
35
+ ]);
36
+ return /*#__PURE__*/ jsx("div", {
37
+ className: styles.container,
38
+ ref: ref
39
+ });
40
+ };
41
+ const fileDocx = {
42
+ key: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
43
+ type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
44
+ viewComponet: (props)=>/*#__PURE__*/ jsx(ViewComponent, {
45
+ ...props
46
+ }),
47
+ checkedComponent: (props)=>/*#__PURE__*/ jsx(CheckedComponent, {
48
+ ...props
49
+ })
50
+ };
51
+ export { fileDocx };
@@ -0,0 +1,3 @@
1
+ export declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
2
+ container: import("antd-style").SerializedStyles;
3
+ }>;
@@ -0,0 +1,25 @@
1
+ import { createStyles } from "antd-style";
2
+ function _tagged_template_literal(strings, raw) {
3
+ if (!raw) raw = strings.slice(0);
4
+ return Object.freeze(Object.defineProperties(strings, {
5
+ raw: {
6
+ value: Object.freeze(raw)
7
+ }
8
+ }));
9
+ }
10
+ function _templateObject() {
11
+ const data = _tagged_template_literal([
12
+ "\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 90vh;\n overflow-x: scroll;\n overflow-y: scroll;\n .docx-wrapper {\n background: none;\n padding: 0;\n .docx {\n width: 100% !important;\n margin-bottom: 0;\n }\n }\n "
13
+ ]);
14
+ _templateObject = function() {
15
+ return data;
16
+ };
17
+ return data;
18
+ }
19
+ const useStyles = createStyles((param)=>{
20
+ let { css } = param;
21
+ return {
22
+ container: css(_templateObject())
23
+ };
24
+ });
25
+ export { useStyles };
@@ -4,3 +4,4 @@ export * from './file-default';
4
4
  export * from './file-pdf';
5
5
  export * from './file-sheet';
6
6
  export * from './image-svg';
7
+ export * from './file-docx';
@@ -4,3 +4,4 @@ export * from "./file-default.mjs";
4
4
  export * from "./file-pdf.mjs";
5
5
  export * from "./file-sheet.mjs";
6
6
  export * from "./image-svg.mjs";
7
+ export * from "./file-docx.mjs";
@@ -1,4 +1,6 @@
1
+ import type { Application } from '../../application/Application';
1
2
  import { Plugin } from '../../application/Plugin';
3
+ export declare function handleUnauthorizedLocaleLoad(app: Application): string;
2
4
  export declare class LocalePlugin extends Plugin {
3
5
  locales: any;
4
6
  afterAdd(): Promise<void>;
@@ -14,6 +14,16 @@ function _define_property(obj, key, value) {
14
14
  else obj[key] = value;
15
15
  return obj;
16
16
  }
17
+ function handleUnauthorizedLocaleLoad(app) {
18
+ var _auth_setRole, _auth_setAuthenticator;
19
+ const auth = app.apiClient.auth;
20
+ auth.setToken(null);
21
+ null == (_auth_setRole = auth.setRole) || _auth_setRole.call(auth, null);
22
+ null == (_auth_setAuthenticator = auth.setAuthenticator) || _auth_setAuthenticator.call(auth, null);
23
+ const signInPath = app.getHref('signin');
24
+ if (window.location.pathname.toLowerCase() === signInPath.toLowerCase()) return signInPath;
25
+ return "".concat(signInPath, "?redirect=").concat(window.location.pathname).concat(window.location.search);
26
+ }
17
27
  class LocalePlugin extends Plugin {
18
28
  async afterAdd() {
19
29
  const api = this.app.apiClient;
@@ -25,6 +35,7 @@ class LocalePlugin extends Plugin {
25
35
  params: {
26
36
  locale
27
37
  },
38
+ skipNotify: true,
28
39
  headers: {
29
40
  'X-Role': 'anonymous'
30
41
  }
@@ -59,9 +70,7 @@ class LocalePlugin extends Plugin {
59
70
  window['cronLocale'] = null == data ? void 0 : null == (_data_data4 = data.data) ? void 0 : _data_data4.cron;
60
71
  } catch (error) {
61
72
  var _error_response;
62
- if ((null == error ? void 0 : null == (_error_response = error.response) ? void 0 : _error_response.status) === 401) setTimeout(()=>{
63
- window.location.href = '/signIn';
64
- }, 1000);
73
+ if ((null == error ? void 0 : null == (_error_response = error.response) ? void 0 : _error_response.status) === 401) window.location.href = handleUnauthorizedLocaleLoad(this.app);
65
74
  throw error;
66
75
  }
67
76
  }
@@ -69,4 +78,4 @@ class LocalePlugin extends Plugin {
69
78
  super(...args), _define_property(this, "locales", {});
70
79
  }
71
80
  }
72
- export { LocalePlugin };
81
+ export { LocalePlugin, handleUnauthorizedLocaleLoad };
@@ -2,13 +2,14 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
2
  import react, { createContext, useContext, useEffect, useMemo, useRef, useState } from "react";
3
3
  import { RecursionField, Schema, observer, uid, useField, useFieldSchema } from "@tachybase/schema";
4
4
  import { TinyColor } from "@ctrl/tinycolor";
5
- import { DndContext, useDndContext, useDndMonitor, useDraggable, useDroppable } from "@dnd-kit/core";
5
+ import { useDndContext, useDndMonitor, useDraggable, useDroppable } from "@dnd-kit/core";
6
6
  import classnames from "classnames";
7
7
  import lodash from "lodash";
8
8
  import { useToken } from "../__builtins__/index.mjs";
9
9
  import { useSchemaInitializerRender } from "../../../application/schema-initializer/hooks/index.mjs";
10
10
  import { useFormBlockContext } from "../../../block-provider/FormBlockContext.mjs";
11
11
  import { useFormBlockType } from "../../../block-provider/FormBlockProvider.mjs";
12
+ import { DndContext } from "../../common/dnd-context/index.mjs";
12
13
  import { SchemaComponent } from "../../core/SchemaComponent.mjs";
13
14
  import { useDesignable } from "../../hooks/useDesignable.mjs";
14
15
  import Grid_style from "./Grid.style.mjs";
@@ -16,7 +16,7 @@ function _templateObject() {
16
16
  const data = _tagged_template_literal([
17
17
  "\n position: relative;\n margin: ",
18
18
  ";\n padding: ",
19
- ";\n\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: var(--colorBgSettingsHover) !important;\n border: 0 !important;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: var(--colorSettings);\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n align-self: stretch;\n }\n }\n }\n "
19
+ ";\n text-align: center;\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: var(--colorBgSettingsHover) !important;\n border: 0 !important;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: var(--colorSettings);\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n align-self: stretch;\n }\n }\n }\n "
20
20
  ]);
21
21
  _templateObject = function() {
22
22
  return data;
@@ -18,7 +18,7 @@ var __webpack_modules__ = {
18
18
  "../../filter-provider/utils": function(module) {
19
19
  module.exports = require("../../filter-provider/utils.js");
20
20
  },
21
- "../..": function(module) {
21
+ "../../../schema-component": function(module) {
22
22
  module.exports = require("../../index.js");
23
23
  },
24
24
  "../../record-provider": function(module) {
@@ -185,7 +185,7 @@ var __webpack_exports__ = {};
185
185
  var react_i18next__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("react-i18next");
186
186
  var react_router_dom__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("react-router-dom");
187
187
  var react_to_print__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("react-to-print");
188
- var ___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../..");
188
+ var ___WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../../../schema-component");
189
189
  var _api_client__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("../../api-client");
190
190
  var _built_in_dynamic_page_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("../../built-in/dynamic-page/utils");
191
191
  var _collection_manager__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("../../collection-manager");
@@ -38,6 +38,7 @@ class AttachmentPreviewPlugin extends Plugin_js_namespaceObject.Plugin {
38
38
  this.app.AttachmentPreviewManager.add(index_js_namespaceObject.fileXLS);
39
39
  this.app.AttachmentPreviewManager.add(index_js_namespaceObject.fileXLSX);
40
40
  this.app.AttachmentPreviewManager.add(index_js_namespaceObject.fileCSV);
41
+ this.app.AttachmentPreviewManager.add(index_js_namespaceObject.fileDocx);
41
42
  }
42
43
  }
43
44
  exports.AttachmentPreviewPlugin = __webpack_exports__.AttachmentPreviewPlugin;
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ fileDocx: ()=>fileDocx
28
+ });
29
+ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
30
+ const external_react_namespaceObject = require("react");
31
+ const external_docx_preview_namespaceObject = require("docx-preview");
32
+ const index_js_namespaceObject = require("../../../api-client/index.js");
33
+ const external_file_docx_style_js_namespaceObject = require("./file-docx.style.js");
34
+ const ViewComponent = (props)=>{
35
+ const { file, prefixCls } = props;
36
+ return file.imageUrl && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("img", {
37
+ src: "".concat(file.imageUrl).concat(file.thumbnailRule || ''),
38
+ style: {
39
+ width: '100%',
40
+ height: '100%'
41
+ },
42
+ alt: file.title,
43
+ className: "".concat(prefixCls, "-list-item-image")
44
+ });
45
+ };
46
+ const CheckedComponent = (props)=>{
47
+ const { file } = props;
48
+ const api = (0, index_js_namespaceObject.useAPIClient)();
49
+ const ref = (0, external_react_namespaceObject.useRef)(null);
50
+ const { styles } = (0, external_file_docx_style_js_namespaceObject.useStyles)();
51
+ var _file_url;
52
+ let fileUrl = null != (_file_url = file.url) ? _file_url : '';
53
+ if (fileUrl.startsWith('/storage') && window.location.origin) fileUrl = window.location.origin + fileUrl;
54
+ (0, external_react_namespaceObject.useEffect)(()=>{
55
+ api.request({
56
+ url: fileUrl,
57
+ responseType: 'arraybuffer'
58
+ }).then((res)=>{
59
+ (0, external_docx_preview_namespaceObject.renderAsync)(res.data, ref.current);
60
+ });
61
+ }, [
62
+ file.url
63
+ ]);
64
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
65
+ className: styles.container,
66
+ ref: ref
67
+ });
68
+ };
69
+ const fileDocx = {
70
+ key: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
71
+ type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
72
+ viewComponet: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ViewComponent, {
73
+ ...props
74
+ }),
75
+ checkedComponent: (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CheckedComponent, {
76
+ ...props
77
+ })
78
+ };
79
+ exports.fileDocx = __webpack_exports__.fileDocx;
80
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
81
+ "fileDocx"
82
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
83
+ Object.defineProperty(exports, '__esModule', {
84
+ value: true
85
+ });
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ useStyles: ()=>useStyles
28
+ });
29
+ const external_antd_style_namespaceObject = require("antd-style");
30
+ function _tagged_template_literal(strings, raw) {
31
+ if (!raw) raw = strings.slice(0);
32
+ return Object.freeze(Object.defineProperties(strings, {
33
+ raw: {
34
+ value: Object.freeze(raw)
35
+ }
36
+ }));
37
+ }
38
+ function _templateObject() {
39
+ const data = _tagged_template_literal([
40
+ "\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 90vh;\n overflow-x: scroll;\n overflow-y: scroll;\n .docx-wrapper {\n background: none;\n padding: 0;\n .docx {\n width: 100% !important;\n margin-bottom: 0;\n }\n }\n "
41
+ ]);
42
+ _templateObject = function() {
43
+ return data;
44
+ };
45
+ return data;
46
+ }
47
+ const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
48
+ let { css } = param;
49
+ return {
50
+ container: css(_templateObject())
51
+ };
52
+ });
53
+ exports.useStyles = __webpack_exports__.useStyles;
54
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
55
+ "useStyles"
56
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
57
+ Object.defineProperty(exports, '__esModule', {
58
+ value: true
59
+ });
@@ -3,6 +3,9 @@ var __webpack_modules__ = {
3
3
  "./file-default": function(module) {
4
4
  module.exports = require("./file-default.js");
5
5
  },
6
+ "./file-docx": function(module) {
7
+ module.exports = require("./file-docx.js");
8
+ },
6
9
  "./file-pdf": function(module) {
7
10
  module.exports = require("./file-pdf.js");
8
11
  },
@@ -98,6 +101,12 @@ var __webpack_exports__ = {};
98
101
  return _image_svg__WEBPACK_IMPORTED_MODULE_5__[key];
99
102
  }).bind(0, __WEBPACK_IMPORT_KEY__);
100
103
  __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
104
+ var _file_docx__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./file-docx");
105
+ var __WEBPACK_REEXPORT_OBJECT__ = {};
106
+ for(var __WEBPACK_IMPORT_KEY__ in _file_docx__WEBPACK_IMPORTED_MODULE_6__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
107
+ return _file_docx__WEBPACK_IMPORTED_MODULE_6__[key];
108
+ }).bind(0, __WEBPACK_IMPORT_KEY__);
109
+ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
101
110
  })();
102
111
  for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
103
112
  Object.defineProperty(exports, '__esModule', {
@@ -33,7 +33,8 @@ var __webpack_require__ = {};
33
33
  var __webpack_exports__ = {};
34
34
  __webpack_require__.r(__webpack_exports__);
35
35
  __webpack_require__.d(__webpack_exports__, {
36
- LocalePlugin: ()=>LocalePlugin
36
+ LocalePlugin: ()=>LocalePlugin,
37
+ handleUnauthorizedLocaleLoad: ()=>handleUnauthorizedLocaleLoad
37
38
  });
38
39
  const schema_namespaceObject = require("@tachybase/schema");
39
40
  const external_antd_namespaceObject = require("antd");
@@ -52,6 +53,16 @@ function _define_property(obj, key, value) {
52
53
  else obj[key] = value;
53
54
  return obj;
54
55
  }
56
+ function handleUnauthorizedLocaleLoad(app) {
57
+ var _auth_setRole, _auth_setAuthenticator;
58
+ const auth = app.apiClient.auth;
59
+ auth.setToken(null);
60
+ null == (_auth_setRole = auth.setRole) || _auth_setRole.call(auth, null);
61
+ null == (_auth_setAuthenticator = auth.setAuthenticator) || _auth_setAuthenticator.call(auth, null);
62
+ const signInPath = app.getHref('signin');
63
+ if (window.location.pathname.toLowerCase() === signInPath.toLowerCase()) return signInPath;
64
+ return "".concat(signInPath, "?redirect=").concat(window.location.pathname).concat(window.location.search);
65
+ }
55
66
  class LocalePlugin extends Plugin_js_namespaceObject.Plugin {
56
67
  async afterAdd() {
57
68
  const api = this.app.apiClient;
@@ -63,6 +74,7 @@ class LocalePlugin extends Plugin_js_namespaceObject.Plugin {
63
74
  params: {
64
75
  locale
65
76
  },
77
+ skipNotify: true,
66
78
  headers: {
67
79
  'X-Role': 'anonymous'
68
80
  }
@@ -97,9 +109,7 @@ class LocalePlugin extends Plugin_js_namespaceObject.Plugin {
97
109
  window['cronLocale'] = null == data ? void 0 : null == (_data_data4 = data.data) ? void 0 : _data_data4.cron;
98
110
  } catch (error) {
99
111
  var _error_response;
100
- if ((null == error ? void 0 : null == (_error_response = error.response) ? void 0 : _error_response.status) === 401) setTimeout(()=>{
101
- window.location.href = '/signIn';
102
- }, 1000);
112
+ if ((null == error ? void 0 : null == (_error_response = error.response) ? void 0 : _error_response.status) === 401) window.location.href = handleUnauthorizedLocaleLoad(this.app);
103
113
  throw error;
104
114
  }
105
115
  }
@@ -108,8 +118,10 @@ class LocalePlugin extends Plugin_js_namespaceObject.Plugin {
108
118
  }
109
119
  }
110
120
  exports.LocalePlugin = __webpack_exports__.LocalePlugin;
121
+ exports.handleUnauthorizedLocaleLoad = __webpack_exports__.handleUnauthorizedLocaleLoad;
111
122
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
112
- "LocalePlugin"
123
+ "LocalePlugin",
124
+ "handleUnauthorizedLocaleLoad"
113
125
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
114
126
  Object.defineProperty(exports, '__esModule', {
115
127
  value: true
@@ -52,6 +52,7 @@ const index_js_namespaceObject = require("../__builtins__/index.js");
52
52
  const hooks_index_js_namespaceObject = require("../../../application/schema-initializer/hooks/index.js");
53
53
  const FormBlockContext_js_namespaceObject = require("../../../block-provider/FormBlockContext.js");
54
54
  const FormBlockProvider_js_namespaceObject = require("../../../block-provider/FormBlockProvider.js");
55
+ const dnd_context_index_js_namespaceObject = require("../../common/dnd-context/index.js");
55
56
  const SchemaComponent_js_namespaceObject = require("../../core/SchemaComponent.js");
56
57
  const useDesignable_js_namespaceObject = require("../../hooks/useDesignable.js");
57
58
  const external_Grid_style_js_namespaceObject = require("./Grid.style.js");
@@ -287,7 +288,7 @@ const DndWrapper = (props)=>{
287
288
  if (false === props.dndContext) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(jsx_runtime_namespaceObject.Fragment, {
288
289
  children: props.children
289
290
  });
290
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(core_namespaceObject.DndContext, {
291
+ return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(dnd_context_index_js_namespaceObject.DndContext, {
291
292
  ...props.dndContext,
292
293
  children: props.children
293
294
  });
@@ -45,7 +45,7 @@ function _templateObject() {
45
45
  const data = _tagged_template_literal([
46
46
  "\n position: relative;\n margin: ",
47
47
  ";\n padding: ",
48
- ";\n\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: var(--colorBgSettingsHover) !important;\n border: 0 !important;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: var(--colorSettings);\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n align-self: stretch;\n }\n }\n }\n "
48
+ ";\n text-align: center;\n &:hover {\n > .general-schema-designer {\n display: block;\n }\n }\n > .general-schema-designer {\n position: absolute;\n z-index: 999;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n display: none;\n background: var(--colorBgSettingsHover) !important;\n border: 0 !important;\n pointer-events: none;\n > .general-schema-designer-icons {\n position: absolute;\n right: 2px;\n top: 2px;\n line-height: 16px;\n pointer-events: all;\n .ant-space-item {\n background-color: var(--colorSettings);\n color: #fff;\n line-height: 16px;\n width: 16px;\n padding-left: 1px;\n align-self: stretch;\n }\n }\n }\n "
49
49
  ]);
50
50
  _templateObject = function() {
51
51
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tachybase/client",
3
- "version": "1.6.22",
3
+ "version": "1.6.24",
4
4
  "homepage": "https://github.com/tegojs/tego-standard#readme",
5
5
  "bugs": {
6
6
  "url": "https://github.com/tegojs/tego-standard/issues"
@@ -30,9 +30,9 @@
30
30
  "@floating-ui/react": "0.26.28",
31
31
  "@js-preview/excel": "^1.7.14",
32
32
  "@lottiefiles/dotlottie-react": "^0.9.3",
33
- "@tachybase/schema": "1.6.13",
34
- "@tachybase/utils": "1.6.13",
35
- "@tego/client": "1.6.13",
33
+ "@tachybase/schema": "1.6.16",
34
+ "@tachybase/utils": "1.6.16",
35
+ "@tego/client": "1.6.16",
36
36
  "ahooks": "^3.9.0",
37
37
  "antd": "5.22.5",
38
38
  "antd-style": "3.7.1",
@@ -44,6 +44,7 @@
44
44
  "d3-format": "^3.1.0",
45
45
  "dayjs": "1.11.13",
46
46
  "deepmerge": "^4.3.1",
47
+ "docx-preview": "^0.3.7",
47
48
  "file-saver": "^2.0.5",
48
49
  "flat": "^5.0.2",
49
50
  "i18next": "25.10.10",