@tachybase/client 1.6.0 → 1.6.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/PluginManager.mjs +9 -1
- package/es/application/WebSocketClient.d.ts +19 -0
- package/es/application/WebSocketClient.mjs +26 -6
- package/es/application/utils/globalDeps.mjs +1 -1
- package/es/application/utils/remotePlugins.mjs +8 -2
- package/es/built-in/attachment-preview/previewers/file-sheet.mjs +1 -1
- package/es/built-in/pm/PluginDetail.mjs +1 -1
- package/es/collection-manager/Configuration/components/index.mjs +3 -3
- package/es/collection-manager/interfaces/components/index.mjs +2 -2
- package/es/collection-manager/interfaces/properties/operators.mjs +3 -3
- package/es/locale/index.mjs +47 -47
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +4 -1
- package/es/schema-component/antd/AntdSchemaComponentProvider.mjs +3 -1
- package/es/schema-component/antd/__builtins__/hooks/usePrefixCls.mjs +1 -1
- package/es/schema-component/antd/action/Action.Area.style.mjs +1 -1
- package/es/schema-component/antd/action/Action.Designer.mjs +1 -1
- package/es/schema-component/antd/association-field/AssociationSelect.mjs +1 -1
- package/es/schema-component/antd/association-field/InternalDrawerSubTable.mjs +1 -1
- package/es/schema-component/antd/association-field/SubTabs/styles.mjs +1 -1
- package/es/schema-component/antd/block-item/BlockToolbar.mjs +16 -16
- package/es/schema-component/antd/grid-card/options.mjs +3 -3
- package/es/schema-component/antd/input/ReadPretty.mjs +1 -3
- package/es/schema-component/antd/menu/Menu.styles.mjs +1 -1
- package/es/schema-component/antd/menu/MenuSearchAdd.style.mjs +1 -1
- package/es/schema-component/antd/page/Page.mjs +3 -0
- package/es/schema-component/antd/page/Page.style.mjs +1 -1
- package/es/schema-component/antd/rich-text/style.mjs +5 -5
- package/es/schema-component/antd/rich-text/style.mjs.LICENSE.txt +5 -5
- package/es/schema-component/antd/table/Table.Column.Designer.mjs +5 -5
- package/es/schema-component/antd/table/Table.Void.Designer.mjs +4 -4
- package/es/schema-component/antd/table-v2/EnabledToggle.d.ts +9 -0
- package/es/schema-component/antd/table-v2/EnabledToggle.mjs +72 -0
- package/es/schema-component/antd/table-v2/Table.styles.mjs +1 -1
- package/es/schema-component/antd/table-v2/index.d.ts +1 -0
- package/es/schema-component/antd/table-v2/index.mjs +1 -0
- package/es/schema-component/antd/variable/CodeMirror.mjs +1 -1
- package/es/schema-component/common/sortable-item/DragHandleMenu.style.mjs +1 -1
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +1 -1
- package/es/schema-templates/BlockTemplateDetails.mjs +1 -1
- package/es/user/ChangePassword.mjs +1 -1
- package/lib/application/PluginManager.js +9 -1
- package/lib/application/WebSocketClient.js +26 -6
- package/lib/application/utils/remotePlugins.js +8 -2
- package/lib/built-in/attachment-preview/previewers/file-sheet.js +1 -1
- package/lib/built-in/pm/PluginDetail.js +1 -1
- package/lib/collection-manager/Configuration/components/index.js +3 -3
- package/lib/collection-manager/interfaces/components/index.js +2 -2
- package/lib/collection-manager/interfaces/properties/operators.js +3 -3
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/es_ES.js +1 -0
- package/lib/locale/fr_FR.js +1 -0
- package/lib/locale/ko_KR.js +1 -0
- package/lib/locale/pt_BR.js +1 -0
- package/lib/locale/uk_UA.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +4 -1
- package/lib/schema-component/antd/AntdSchemaComponentProvider.js +3 -1
- package/lib/schema-component/antd/__builtins__/hooks/usePrefixCls.js +1 -1
- package/lib/schema-component/antd/action/Action.Area.style.js +1 -1
- package/lib/schema-component/antd/action/Action.Designer.js +1 -1
- package/lib/schema-component/antd/association-field/AssociationSelect.js +1 -1
- package/lib/schema-component/antd/association-field/InternalDrawerSubTable.js +1 -1
- package/lib/schema-component/antd/association-field/SubTabs/styles.js +1 -1
- package/lib/schema-component/antd/block-item/BlockToolbar.js +16 -16
- package/lib/schema-component/antd/grid-card/options.js +3 -3
- package/lib/schema-component/antd/input/ReadPretty.js +1 -3
- package/lib/schema-component/antd/menu/Menu.styles.js +1 -1
- package/lib/schema-component/antd/menu/MenuSearchAdd.style.js +1 -1
- package/lib/schema-component/antd/page/Page.js +3 -0
- package/lib/schema-component/antd/page/Page.style.js +1 -1
- package/lib/schema-component/antd/rich-text/style.js +5 -5
- package/lib/schema-component/antd/rich-text/style.js.LICENSE.txt +5 -5
- package/lib/schema-component/antd/table/Table.Column.Designer.js +5 -5
- package/lib/schema-component/antd/table/Table.Void.Designer.js +4 -4
- package/lib/schema-component/antd/table-v2/EnabledToggle.js +106 -0
- package/lib/schema-component/antd/table-v2/Table.styles.js +1 -1
- package/lib/schema-component/antd/table-v2/index.js +13 -0
- package/lib/schema-component/antd/variable/CodeMirror.js +1 -1
- package/lib/schema-component/common/sortable-item/DragHandleMenu.style.js +1 -1
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +1 -1
- package/lib/schema-templates/BlockTemplateDetails.js +1 -1
- package/lib/user/ChangePassword.js +1 -1
- package/package.json +4 -4
|
@@ -26,6 +26,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
AntdSchemaComponentPlugin: ()=>AntdSchemaComponentPlugin
|
|
28
28
|
});
|
|
29
|
+
const client_namespaceObject = require("@tego/client");
|
|
29
30
|
const external_index_js_namespaceObject = require("./index.js");
|
|
30
31
|
const Plugin_js_namespaceObject = require("../../application/Plugin.js");
|
|
31
32
|
const index_js_namespaceObject = require("../common/index.js");
|
|
@@ -44,7 +45,8 @@ class AntdSchemaComponentPlugin extends Plugin_js_namespaceObject.Plugin {
|
|
|
44
45
|
addComponents() {
|
|
45
46
|
this.app.addComponents({
|
|
46
47
|
...external_index_js_namespaceObject,
|
|
47
|
-
...index_js_namespaceObject
|
|
48
|
+
...index_js_namespaceObject,
|
|
49
|
+
CodeMirror: client_namespaceObject.CodeMirror
|
|
48
50
|
});
|
|
49
51
|
}
|
|
50
52
|
addScopes() {
|
|
@@ -30,7 +30,7 @@ const external_react_namespaceObject = require("react");
|
|
|
30
30
|
const external_antd_namespaceObject = require("antd");
|
|
31
31
|
const usePrefixCls = (tag, props)=>{
|
|
32
32
|
const { getPrefixCls } = (0, external_react_namespaceObject.useContext)(external_antd_namespaceObject.ConfigProvider.ConfigContext) || {};
|
|
33
|
-
if (
|
|
33
|
+
if ("ConfigContext" in external_antd_namespaceObject.ConfigProvider) return (null == getPrefixCls ? void 0 : getPrefixCls(tag, null == props ? void 0 : props.prefixCls)) || '';
|
|
34
34
|
{
|
|
35
35
|
var _props_prefixCls;
|
|
36
36
|
const prefix = null != (_props_prefixCls = null == props ? void 0 : props.prefixCls) ? _props_prefixCls : 'ant-';
|
|
@@ -61,7 +61,7 @@ function _templateObject1() {
|
|
|
61
61
|
function _templateObject2() {
|
|
62
62
|
const data = _tagged_template_literal([
|
|
63
63
|
"\n position: sticky !important;\n top: 0 !important;\n z-index: 100 !important;\n background: #fff !important;\n background-color: #fff !important;\n padding: ",
|
|
64
|
-
"px 0;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n border-bottom: 1px solid rgba(5, 5, 5, 0.06);\n margin: 0 -16px;\n padding-left: 16px;\n padding-right: 16px;\n\n /*
|
|
64
|
+
"px 0;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n border-bottom: 1px solid rgba(5, 5, 5, 0.06);\n margin: 0 -16px;\n padding-left: 16px;\n padding-right: 16px;\n\n /* 确保完全遮挡 */\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: -100vw;\n right: -100vw;\n bottom: 0;\n background: #fff;\n z-index: -1;\n }\n "
|
|
65
65
|
]);
|
|
66
66
|
_templateObject2 = function() {
|
|
67
67
|
return data;
|
|
@@ -339,7 +339,7 @@ function WorkflowSelectComponent(param) {
|
|
|
339
339
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_data_source_index_js_namespaceObject.DataSourceProvider, {
|
|
340
340
|
dataSource: "main",
|
|
341
341
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.RemoteSelect, {
|
|
342
|
-
manual:
|
|
342
|
+
manual: false,
|
|
343
343
|
placeholder: t('Select workflow', {
|
|
344
344
|
ns: 'workflow'
|
|
345
345
|
}),
|
|
@@ -145,7 +145,7 @@ const InternalAssociationSelect = (0, schema_namespaceObject.observer)((props)=>
|
|
|
145
145
|
style: {
|
|
146
146
|
paddingLeft: 5
|
|
147
147
|
},
|
|
148
|
-
children: t('Add') + "
|
|
148
|
+
children: t('Add') + " “".concat(props.search, "” ")
|
|
149
149
|
})
|
|
150
150
|
]
|
|
151
151
|
});
|
|
@@ -103,7 +103,7 @@ const InternaDrawerSubTable = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
103
103
|
extra: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
104
104
|
type: "primary",
|
|
105
105
|
onClick: ()=>setVisible(false),
|
|
106
|
-
children: "
|
|
106
|
+
children: "确认"
|
|
107
107
|
}),
|
|
108
108
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_flag_provider_index_js_namespaceObject.FlagProvider, {
|
|
109
109
|
isInSubForm: true,
|
|
@@ -37,7 +37,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
37
37
|
}
|
|
38
38
|
function _templateObject() {
|
|
39
39
|
const data = _tagged_template_literal([
|
|
40
|
-
"\n display: flex;\n flex-direction: row;\n max-height: 30vh;\n .left-pane {\n padding: 2px;\n display: flex;\n font-weight: 500;\n flex-direction: column;\n width: 100px;\n overflow-y: auto;\n /*
|
|
40
|
+
"\n display: flex;\n flex-direction: row;\n max-height: 30vh;\n .left-pane {\n padding: 2px;\n display: flex;\n font-weight: 500;\n flex-direction: column;\n width: 100px;\n overflow-y: auto;\n /* 隐藏滚动条 微软/火狐 */\n -ms-overflow-style: none;\n scrollbar-width: none;\n border-right: 2px solid #d4d4d4;\n padding: 2px;\n margin-right: 5px;\n div {\n background-color: #ffffff;\n white-space: normal;\n cursor: pointer;\n margin: 5px 0 5px;\n }\n div:last-of-type {\n margin-bottom: 0;\n }\n }\n /* 隐藏滚动条 谷歌浏览器 */\n .left-pane::-webkit-scrollbar {\n display: none;\n }\n\n .right-pane {\n padding: 2px;\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n flex: 1;\n div {\n margin-bottom: 1em;\n .ant-btn {\n margin-right: 2px;\n }\n }\n div:last-of-type {\n margin-bottom: 0;\n }\n }\n "
|
|
41
41
|
]);
|
|
42
42
|
_templateObject = function() {
|
|
43
43
|
return data;
|
|
@@ -36,60 +36,60 @@ const external_antd_namespaceObject = require("antd");
|
|
|
36
36
|
const defaultItems = [
|
|
37
37
|
{
|
|
38
38
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.FullscreenOutlined, {}),
|
|
39
|
-
title:
|
|
39
|
+
title: '全屏'
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.UndoOutlined, {}),
|
|
43
|
-
title:
|
|
43
|
+
title: '撤销'
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.RedoOutlined, {}),
|
|
47
|
-
title:
|
|
47
|
+
title: '重做'
|
|
48
48
|
},
|
|
49
49
|
{
|
|
50
50
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.DeleteOutlined, {}),
|
|
51
|
-
title:
|
|
51
|
+
title: '删除'
|
|
52
52
|
}
|
|
53
53
|
];
|
|
54
54
|
const customItems = [
|
|
55
55
|
{
|
|
56
56
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CopyOutlined, {}),
|
|
57
57
|
placement: 'bottom',
|
|
58
|
-
title:
|
|
58
|
+
title: '复制'
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ZoomInOutlined, {}),
|
|
62
|
-
title:
|
|
62
|
+
title: '放大!'
|
|
63
63
|
},
|
|
64
64
|
{
|
|
65
65
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ZoomOutOutlined, {}),
|
|
66
66
|
style: {
|
|
67
67
|
color: '#1890ff'
|
|
68
68
|
},
|
|
69
|
-
title:
|
|
69
|
+
title: '缩小!'
|
|
70
70
|
},
|
|
71
71
|
{
|
|
72
72
|
type: 'divider'
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
75
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.DragOutlined, {}),
|
|
76
|
-
title:
|
|
76
|
+
title: '快速定位'
|
|
77
77
|
}
|
|
78
78
|
];
|
|
79
79
|
const dropdownMenuItems = [
|
|
80
80
|
{
|
|
81
81
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CopyOutlined, {}),
|
|
82
82
|
onClick: ()=>{
|
|
83
|
-
external_antd_namespaceObject.message.info(
|
|
83
|
+
external_antd_namespaceObject.message.info('复制!');
|
|
84
84
|
},
|
|
85
|
-
label:
|
|
85
|
+
label: '复制'
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ZoomInOutlined, {}),
|
|
89
89
|
onClick: ()=>{
|
|
90
|
-
external_antd_namespaceObject.message.success(
|
|
90
|
+
external_antd_namespaceObject.message.success('放大!');
|
|
91
91
|
},
|
|
92
|
-
label:
|
|
92
|
+
label: '放大!'
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ZoomOutOutlined, {}),
|
|
@@ -97,9 +97,9 @@ const dropdownMenuItems = [
|
|
|
97
97
|
color: '#1890ff'
|
|
98
98
|
},
|
|
99
99
|
onClick: ()=>{
|
|
100
|
-
external_antd_namespaceObject.message.success(
|
|
100
|
+
external_antd_namespaceObject.message.success('缩小!');
|
|
101
101
|
},
|
|
102
|
-
label:
|
|
102
|
+
label: '缩小!'
|
|
103
103
|
},
|
|
104
104
|
{
|
|
105
105
|
type: 'divider'
|
|
@@ -107,9 +107,9 @@ const dropdownMenuItems = [
|
|
|
107
107
|
{
|
|
108
108
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.DragOutlined, {}),
|
|
109
109
|
onClick: ()=>{
|
|
110
|
-
external_antd_namespaceObject.message.loading(
|
|
110
|
+
external_antd_namespaceObject.message.loading('快速定位ing');
|
|
111
111
|
},
|
|
112
|
-
label:
|
|
112
|
+
label: '快速定位'
|
|
113
113
|
}
|
|
114
114
|
];
|
|
115
115
|
const BlockToolbar = /*#__PURE__*/ (0, external_react_namespaceObject.forwardRef)((props, ref)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -38,8 +38,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
require("react");
|
|
40
40
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
41
|
-
const css_namespaceObject = require("@emotion/css");
|
|
42
41
|
const client_namespaceObject = require("@tego/client");
|
|
42
|
+
const css_namespaceObject = require("@emotion/css");
|
|
43
43
|
const external_antd_namespaceObject = require("antd");
|
|
44
44
|
const external_classnames_namespaceObject = require("classnames");
|
|
45
45
|
var external_classnames_default = /*#__PURE__*/ __webpack_require__.n(external_classnames_namespaceObject);
|
|
@@ -70,8 +70,6 @@ const _Input = (props)=>{
|
|
|
70
70
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
71
71
|
className: external_classnames_default()(prefixCls, props.className),
|
|
72
72
|
style: {
|
|
73
|
-
display: 'flex',
|
|
74
|
-
alignItems: 'center',
|
|
75
73
|
overflowWrap: 'break-word',
|
|
76
74
|
whiteSpace: 'normal',
|
|
77
75
|
...props.style
|
|
@@ -56,7 +56,7 @@ function _templateObject1() {
|
|
|
56
56
|
function _templateObject2() {
|
|
57
57
|
const data = _tagged_template_literal([
|
|
58
58
|
"\n height: 100%;\n overflow-y: auto;\n overflow-x: hidden;\n\n .ant-menu-submenu.ant-menu-submenu-inline .ant-menu-submenu-title {\n position: relative;\n ::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 3px;\n height: 50%;\n background-color: ",
|
|
59
|
-
";\n\n /*
|
|
59
|
+
";\n\n /* 使用 clip-path 裁剪为梯形 */\n clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);\n }\n }\n\n .ant-menu-submenu.ant-menu-submenu-inline.ant-menu-submenu-open > .ant-menu-submenu-title {\n ::before {\n background-color: ",
|
|
60
60
|
";\n }\n }\n\n .ant-menu-item,\n .ant-menu-submenu-title {\n padding-inline-end: 10px;\n }\n\n .ant-menu-submenu-title {\n .ant-menu-title-content {\n > div {\n > .general-schema-designer {\n right: 6px !important;\n }\n > span.anticon {\n margin-right: 10px;\n }\n }\n }\n }\n "
|
|
61
61
|
]);
|
|
62
62
|
_templateObject2 = function() {
|
|
@@ -37,7 +37,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
37
37
|
}
|
|
38
38
|
function _templateObject() {
|
|
39
39
|
const data = _tagged_template_literal([
|
|
40
|
-
"\n /* NOTE:
|
|
40
|
+
"\n /* NOTE: 这里的样式是为了让搜索框的样式, 避免上层 antd 写死的 padding-left: 24px 的影响 */\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n\n /* NOTE: 放这三个样式是为了提升选择器优先级, 覆盖掉 antd 的默认样式 */\n .ant-input-outlined.ant-input-outlined.ant-input-outlined {\n background-color: #f9f9f9;\n border-radius: 5px;\n border: none;\n box-shadow: none;\n }\n\n /* 移除 antd 默认的后置搜索图标 */\n .ant-input-group-addon {\n display: none;\n }\n\n .menu-add-wrapper {\n .ant-dropdown-trigger {\n display: grid;\n place-items: center;\n\n width: 30px;\n /* 这里是为了和前边元素保持对齐, antd 组件写死了高度 */\n height: 28px;\n\n cursor: pointer;\n\n :hover,\n :active {\n border-radius: 5px;\n color: #ffffff;\n background-color: #f4f4f4;\n }\n }\n }\n "
|
|
41
41
|
]);
|
|
42
42
|
_templateObject = function() {
|
|
43
43
|
return data;
|
|
@@ -269,6 +269,9 @@ const TabItem = (props)=>{
|
|
|
269
269
|
type: schema['x-icon']
|
|
270
270
|
}),
|
|
271
271
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
272
|
+
style: {
|
|
273
|
+
padding: '6px 16px'
|
|
274
|
+
},
|
|
272
275
|
children: schema.title || t('Unnamed')
|
|
273
276
|
}),
|
|
274
277
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -37,7 +37,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
37
37
|
}
|
|
38
38
|
function _templateObject() {
|
|
39
39
|
const data = _tagged_template_literal([
|
|
40
|
-
"\n .ant-tabs-nav-wrap.ant-tabs-nav-wrap {\n flex: none;\n }\n .ant-tabs-tab.ant-tabs-tab.ant-tabs-tab {\n
|
|
40
|
+
"\n .ant-tabs-nav-wrap.ant-tabs-nav-wrap {\n flex: none;\n }\n .ant-tabs-tab.ant-tabs-tab.ant-tabs-tab {\n border: none;\n background-color: #ffffff;\n }\n\n .ant-tabs-tab-active.ant-tabs-tab-active.ant-tabs-tab-active.ant-tabs-tab-active {\n border-radius: 8px 8px 0 0;\n box-shadow: none;\n text-shadow: none;\n background-color: var(--tb-box-bg);\n }\n .ant-tabs-extra-content {\n flex: 1;\n }\n "
|
|
41
41
|
]);
|
|
42
42
|
_templateObject = function() {
|
|
43
43
|
return data;
|
|
@@ -28,11 +28,11 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
useStyles: ()=>useStyles
|
|
29
29
|
});
|
|
30
30
|
const index_js_namespaceObject = require("../__builtins__/index.js");
|
|
31
|
-
/*!
|
|
32
|
-
* Quill Editor v1.3.7
|
|
33
|
-
* https://quilljs.com/
|
|
34
|
-
* Copyright (c) 2014, Jason Chen
|
|
35
|
-
* Copyright (c) 2013, salesforce.com
|
|
31
|
+
/*!
|
|
32
|
+
* Quill Editor v1.3.7
|
|
33
|
+
* https://quilljs.com/
|
|
34
|
+
* Copyright (c) 2014, Jason Chen
|
|
35
|
+
* Copyright (c) 2013, salesforce.com
|
|
36
36
|
*/ const useStyles = (0, index_js_namespaceObject.genStyleHook)('tb-rich-text', (token)=>{
|
|
37
37
|
const { componentCls } = token;
|
|
38
38
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Quill Editor v1.3.7
|
|
3
|
-
* https://quilljs.com/
|
|
4
|
-
* Copyright (c) 2014, Jason Chen
|
|
5
|
-
* Copyright (c) 2013, salesforce.com
|
|
1
|
+
/*!
|
|
2
|
+
* Quill Editor v1.3.7
|
|
3
|
+
* https://quilljs.com/
|
|
4
|
+
* Copyright (c) 2014, Jason Chen
|
|
5
|
+
* Copyright (c) 2013, salesforce.com
|
|
6
6
|
*/
|
|
@@ -71,9 +71,9 @@ const TableColumnDesigner = (props)=>{
|
|
|
71
71
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_schema_settings_index_js_namespaceObject.GeneralSchemaDesigner, {
|
|
72
72
|
children: [
|
|
73
73
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_settings_index_js_namespaceObject.SchemaSettingsPopupItem, {
|
|
74
|
-
title:
|
|
74
|
+
title: '编辑',
|
|
75
75
|
schema: {
|
|
76
|
-
title:
|
|
76
|
+
title: '编辑字段',
|
|
77
77
|
'x-component': 'Action.Modal',
|
|
78
78
|
'x-component-props': {
|
|
79
79
|
width: 520
|
|
@@ -87,9 +87,9 @@ const TableColumnDesigner = (props)=>{
|
|
|
87
87
|
title: {
|
|
88
88
|
'x-decorator': 'FormItem',
|
|
89
89
|
'x-component': 'Input',
|
|
90
|
-
title:
|
|
90
|
+
title: '字段标题',
|
|
91
91
|
'x-component-props': {},
|
|
92
|
-
description: "
|
|
92
|
+
description: "原字段标题:".concat(null == collectionField ? void 0 : null == (_collectionField_uiSchema = collectionField.uiSchema) ? void 0 : _collectionField_uiSchema.title)
|
|
93
93
|
},
|
|
94
94
|
footer: {
|
|
95
95
|
type: 'void',
|
|
@@ -145,7 +145,7 @@ const TableColumnDesigner = (props)=>{
|
|
|
145
145
|
}
|
|
146
146
|
}),
|
|
147
147
|
(null == collectionField ? void 0 : collectionField.target) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_settings_index_js_namespaceObject.SchemaSettingsSelectItem, {
|
|
148
|
-
title:
|
|
148
|
+
title: '标题字段',
|
|
149
149
|
options: options,
|
|
150
150
|
value: null == fieldSchema ? void 0 : null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : null == (_fieldSchema_xcomponentprops_fieldNames = _fieldSchema_xcomponentprops['fieldNames']) ? void 0 : _fieldSchema_xcomponentprops_fieldNames['label'],
|
|
151
151
|
onChange: (label)=>{
|
|
@@ -80,14 +80,14 @@ const TableVoidDesigner = ()=>{
|
|
|
80
80
|
}
|
|
81
81
|
}),
|
|
82
82
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_settings_index_js_namespaceObject.SchemaSettingsModalItem, {
|
|
83
|
-
title:
|
|
83
|
+
title: '设置数据范围',
|
|
84
84
|
schema: {
|
|
85
85
|
type: 'object',
|
|
86
|
-
title:
|
|
86
|
+
title: '设置数据范围',
|
|
87
87
|
properties: {
|
|
88
88
|
filter: {
|
|
89
89
|
default: defaultFilter,
|
|
90
|
-
title:
|
|
90
|
+
title: '数据范围',
|
|
91
91
|
enum: dataSource,
|
|
92
92
|
'x-component': 'Filter',
|
|
93
93
|
'x-component-props': {}
|
|
@@ -210,7 +210,7 @@ const TableVoidDesigner = ()=>{
|
|
|
210
210
|
}
|
|
211
211
|
}),
|
|
212
212
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_schema_settings_index_js_namespaceObject.SchemaSettingsSelectItem, {
|
|
213
|
-
title:
|
|
213
|
+
title: '每页显示',
|
|
214
214
|
value: (null == (_field_decoratorProps_request_params = field.decoratorProps.request.params) ? void 0 : _field_decoratorProps_request_params.pageSize) || 20,
|
|
215
215
|
options: [
|
|
216
216
|
{
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
EnabledToggle: ()=>EnabledToggle
|
|
28
|
+
});
|
|
29
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
+
require("react");
|
|
31
|
+
const schema_namespaceObject = require("@tachybase/schema");
|
|
32
|
+
const external_antd_namespaceObject = require("antd");
|
|
33
|
+
const external_antd_style_namespaceObject = require("antd-style");
|
|
34
|
+
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
35
|
+
const index_js_namespaceObject = require("../../../api-client/index.js");
|
|
36
|
+
const CollectionRecordProvider_js_namespaceObject = require("../../../data-source/collection-record/CollectionRecordProvider.js");
|
|
37
|
+
const DataBlockRequestProvider_js_namespaceObject = require("../../../data-source/data-block/DataBlockRequestProvider.js");
|
|
38
|
+
function _tagged_template_literal(strings, raw) {
|
|
39
|
+
if (!raw) raw = strings.slice(0);
|
|
40
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
41
|
+
raw: {
|
|
42
|
+
value: Object.freeze(raw)
|
|
43
|
+
}
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
function _templateObject() {
|
|
47
|
+
const data = _tagged_template_literal([
|
|
48
|
+
"\n &.ant-switch-checked {\n background-color: #52c41a !important;\n }\n min-height: 16px;\n height: 16px;\n line-height: 16px;\n "
|
|
49
|
+
]);
|
|
50
|
+
_templateObject = function() {
|
|
51
|
+
return data;
|
|
52
|
+
};
|
|
53
|
+
return data;
|
|
54
|
+
}
|
|
55
|
+
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
56
|
+
let { css } = param;
|
|
57
|
+
return {
|
|
58
|
+
switchClass: css(_templateObject())
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
const EnabledToggle = (0, schema_namespaceObject.observer)(function() {
|
|
62
|
+
let props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
|
|
63
|
+
const { styles } = useStyles();
|
|
64
|
+
const record = (0, CollectionRecordProvider_js_namespaceObject.useCollectionRecordData)();
|
|
65
|
+
const api = (0, index_js_namespaceObject.useAPIClient)();
|
|
66
|
+
const { refresh } = (0, DataBlockRequestProvider_js_namespaceObject.useDataBlockRequest)();
|
|
67
|
+
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
68
|
+
const fieldName = props.fieldName || 'enabled';
|
|
69
|
+
var _record_fieldName;
|
|
70
|
+
const enabled = null != (_record_fieldName = null == record ? void 0 : record[fieldName]) ? _record_fieldName : false;
|
|
71
|
+
const resourceName = props.resource || 'workflows';
|
|
72
|
+
const checkedChildren = props.checkedChildren || t('On');
|
|
73
|
+
const unCheckedChildren = props.unCheckedChildren || t('Off');
|
|
74
|
+
const handleChange = async (checked)=>{
|
|
75
|
+
if (props.disabled) return;
|
|
76
|
+
try {
|
|
77
|
+
await api.resource(resourceName).update({
|
|
78
|
+
filterByTk: record.id,
|
|
79
|
+
values: {
|
|
80
|
+
[fieldName]: checked
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
external_antd_namespaceObject.message.success(t('Operation succeeded'));
|
|
84
|
+
refresh();
|
|
85
|
+
} catch (error) {
|
|
86
|
+
external_antd_namespaceObject.message.error(t('Operation failed'));
|
|
87
|
+
console.error(error);
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Switch, {
|
|
91
|
+
checked: enabled,
|
|
92
|
+
onChange: handleChange,
|
|
93
|
+
checkedChildren: checkedChildren,
|
|
94
|
+
unCheckedChildren: unCheckedChildren,
|
|
95
|
+
size: "small",
|
|
96
|
+
className: styles.switchClass,
|
|
97
|
+
disabled: props.disabled
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
exports.EnabledToggle = __webpack_exports__.EnabledToggle;
|
|
101
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
102
|
+
"EnabledToggle"
|
|
103
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
104
|
+
Object.defineProperty(exports, '__esModule', {
|
|
105
|
+
value: true
|
|
106
|
+
});
|
|
@@ -47,7 +47,7 @@ function _templateObject() {
|
|
|
47
47
|
}
|
|
48
48
|
function _templateObject1() {
|
|
49
49
|
const data = _tagged_template_literal([
|
|
50
|
-
"\n //
|
|
50
|
+
"\n // 扩大 SchemaToolbar 的面积\n .tb-action-link {\n margin: -",
|
|
51
51
|
"px -",
|
|
52
52
|
"px;\n padding: ",
|
|
53
53
|
"px ",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
+
"./EnabledToggle": function(module) {
|
|
4
|
+
module.exports = require("./EnabledToggle.js");
|
|
5
|
+
},
|
|
3
6
|
"./Table.ActionColumnDesigner": function(module) {
|
|
4
7
|
module.exports = require("./Table.ActionColumnDesigner.js");
|
|
5
8
|
},
|
|
@@ -128,6 +131,16 @@ var __webpack_exports__ = {};
|
|
|
128
131
|
return _Table_Column_Designer__WEBPACK_IMPORTED_MODULE_5__[key];
|
|
129
132
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
130
133
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
134
|
+
var _EnabledToggle__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("./EnabledToggle");
|
|
135
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
136
|
+
for(var __WEBPACK_IMPORT_KEY__ in _EnabledToggle__WEBPACK_IMPORTED_MODULE_11__)if ([
|
|
137
|
+
"TableV2",
|
|
138
|
+
"useColumnSchema",
|
|
139
|
+
"default"
|
|
140
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
141
|
+
return _EnabledToggle__WEBPACK_IMPORTED_MODULE_11__[key];
|
|
142
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
143
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
131
144
|
const TableV2 = _Table__WEBPACK_IMPORTED_MODULE_0__.Table;
|
|
132
145
|
TableV2.Column = _Table_Column__WEBPACK_IMPORTED_MODULE_2__.TableColumn;
|
|
133
146
|
TableV2.Column.ActionBar = _Table_Column_ActionBar__WEBPACK_IMPORTED_MODULE_3__.TableColumnActionBar;
|
|
@@ -102,7 +102,7 @@ const CodeMirror = (props)=>{
|
|
|
102
102
|
children: [
|
|
103
103
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
104
104
|
className: (0, external_index_js_namespaceObject.css)(_templateObject1()),
|
|
105
|
-
children: t(
|
|
105
|
+
children: t('Click on the right to select variables →')
|
|
106
106
|
}),
|
|
107
107
|
disabled ? null : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_VariableSelect_js_namespaceObject.VariableSelect, {
|
|
108
108
|
className: (0, external_index_js_namespaceObject.css)(_templateObject2()),
|
|
@@ -37,7 +37,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
37
37
|
}
|
|
38
38
|
function _templateObject() {
|
|
39
39
|
const data = _tagged_template_literal([
|
|
40
|
-
"\n position: relative;\n width: 100%;\n height: 100%;\n\n &.draggable {\n cursor: move;\n padding: 0 10px;\n border-radius: 5px;\n background: #f0f0f0;\n }\n &.leftBorder {\n ::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 3px;\n height: 50%;\n background-color: var(--colorPrimaryText);\n\n /*
|
|
40
|
+
"\n position: relative;\n width: 100%;\n height: 100%;\n\n &.draggable {\n cursor: move;\n padding: 0 10px;\n border-radius: 5px;\n background: #f0f0f0;\n }\n &.leftBorder {\n ::before {\n content: '';\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n width: 3px;\n height: 50%;\n background-color: var(--colorPrimaryText);\n\n /* 使用 clip-path 裁剪为梯形 */\n clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%);\n }\n }\n\n &.adminMenu {\n .general-schema-designer {\n display: none;\n }\n }\n\n .wrapper {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n }\n "
|
|
41
41
|
]);
|
|
42
42
|
_templateObject = function() {
|
|
43
43
|
return data;
|
|
@@ -37,7 +37,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
37
37
|
}
|
|
38
38
|
function _templateObject() {
|
|
39
39
|
const data = _tagged_template_literal([
|
|
40
|
-
"\n position: relative;\n width: 100%;\n height: 100%;\n
|
|
40
|
+
"\n position: relative;\n width: 100%;\n height: 100%;\n border-radius: 8px 8px 0 0;\n &.draggable {\n cursor: move;\n padding: 0 10px;\n border-radius: 5px;\n background: #f0f0f0;\n }\n "
|
|
41
41
|
]);
|
|
42
42
|
_templateObject = function() {
|
|
43
43
|
return data;
|
|
@@ -153,7 +153,7 @@ const schema = {
|
|
|
153
153
|
],
|
|
154
154
|
fulfill: {
|
|
155
155
|
state: {
|
|
156
|
-
hidden: "{{\n !$deps[1] ||\n !smsVerifyEnabled ||\n ($deps[0] !== 'code' && $deps[0] !== undefined) //
|
|
156
|
+
hidden: "{{\n !$deps[1] ||\n !smsVerifyEnabled ||\n ($deps[0] !== 'code' && $deps[0] !== undefined) // 有 verifyMethod 但未选 code\n }}"
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/client",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.mjs",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@ahooksjs/use-url-state": "3.5.1",
|
|
10
10
|
"@ant-design/cssinjs": "^1.24.0",
|
|
11
|
-
"@ant-design/icons": "^
|
|
11
|
+
"@ant-design/icons": "^6.1.0",
|
|
12
12
|
"@ant-design/pro-components": "2.8.9",
|
|
13
13
|
"@ant-design/pro-layout": "^7.21.2",
|
|
14
14
|
"@ctrl/tinycolor": "^4.2.0",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"@floating-ui/react": "0.26.28",
|
|
22
22
|
"@js-preview/excel": "^1.7.14",
|
|
23
23
|
"@lottiefiles/dotlottie-react": "^0.9.3",
|
|
24
|
-
"@tachybase/schema": "1.
|
|
25
|
-
"@tego/client": "1.
|
|
24
|
+
"@tachybase/schema": "1.6.1",
|
|
25
|
+
"@tego/client": "1.6.1",
|
|
26
26
|
"ahooks": "^3.9.0",
|
|
27
27
|
"antd": "5.22.5",
|
|
28
28
|
"antd-style": "3.7.1",
|