@tachybase/client 1.6.21 → 1.6.23
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/api-client/APIClient.d.ts +2 -1
- package/es/api-client/APIClient.mjs +6 -3
- package/es/application/Plugin.d.ts +2 -2
- package/es/application/hoc/withDynamicSchemaProps.mjs +1 -1
- package/es/application/schema-initializer/hooks/index.mjs +4 -1
- package/es/application/schema-settings/components/SchemaSettingsChildren.mjs +14 -14
- package/es/application/utils/clientModuleRegistry.d.ts +2 -0
- package/es/application/utils/clientModuleRegistry.mjs +9 -0
- package/es/application/utils/globalDeps.mjs +2 -2
- package/es/block-provider/BlockProvider.d.ts +1 -27
- package/es/block-provider/BlockProvider.mjs +1 -3
- package/es/block-provider/BlockRequestContext.d.ts +27 -0
- package/es/block-provider/BlockRequestContext.mjs +5 -0
- package/es/block-provider/FormBlockContext.d.ts +32 -0
- package/es/block-provider/FormBlockContext.mjs +5 -0
- package/es/block-provider/FormBlockProvider.d.ts +1 -33
- package/es/block-provider/FormBlockProvider.mjs +4 -5
- package/es/built-in/acl/ACLCollectionFieldProvider.d.ts +1 -0
- package/es/built-in/acl/ACLCollectionFieldProvider.mjs +42 -0
- package/es/built-in/acl/ACLContext.d.ts +9 -0
- package/es/built-in/acl/ACLContext.mjs +24 -0
- package/es/built-in/acl/ACLPlugin.mjs +2 -1
- package/es/built-in/acl/ACLProvider.d.ts +0 -11
- package/es/built-in/acl/ACLProvider.mjs +6 -51
- package/es/built-in/acl/index.d.ts +2 -0
- package/es/built-in/acl/index.mjs +2 -0
- package/es/built-in/locale/LocalePlugin.d.ts +2 -0
- package/es/built-in/locale/LocalePlugin.mjs +13 -4
- package/es/collection-manager/hooks/useCollectionManager_deprecated.mjs +2 -1
- package/es/collection-manager/sub-table.d.ts +1 -1
- package/es/data-source/data-source/DataSourceManager.d.ts +1 -2
- package/es/data-source/data-source/DataSourceManager.mjs +1 -2
- package/es/data-source/data-source/constants.d.ts +2 -0
- package/es/data-source/data-source/constants.mjs +3 -0
- package/es/data-source/utils.d.ts +2 -2
- package/es/data-source/utils.mjs +1 -1
- package/es/exports.d.ts +46 -0
- package/es/exports.mjs +46 -0
- package/es/filter-provider/utils.d.ts +2 -14
- package/es/filter-provider/utils.mjs +2 -57
- package/es/index.d.ts +1 -46
- package/es/index.mjs +4 -46
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +2 -86
- package/es/record-provider/index.mjs +3 -3
- package/es/schema-component/antd/action/Action.mjs +7 -6
- package/es/schema-component/antd/action/hooks.mjs +3 -2
- package/es/schema-component/antd/association-field/AssociationSelect.mjs +4 -3
- package/es/schema-component/antd/association-field/hooks.mjs +18 -1
- package/es/schema-component/antd/cron/CronSet.mjs +9 -3
- package/es/schema-component/antd/filter/conditionUtils.d.ts +2 -0
- package/es/schema-component/antd/filter/conditionUtils.mjs +133 -0
- package/es/schema-component/antd/filter/dateValueUtils.d.ts +13 -0
- package/es/schema-component/antd/filter/dateValueUtils.mjs +66 -0
- package/es/schema-component/antd/filter/useFilterActionProps.d.ts +2 -4
- package/es/schema-component/antd/filter/useFilterActionProps.mjs +3 -181
- package/es/schema-component/antd/filter/useGetFilterOptions.d.ts +2 -0
- package/es/schema-component/antd/filter/useGetFilterOptions.mjs +54 -0
- package/es/schema-component/antd/form/Form.mjs +1 -1
- package/es/schema-component/antd/form-item/FormItem.FilterFormDesigner.mjs +1 -1
- package/es/schema-component/antd/form-item/FormItem.d.ts +1 -1
- package/es/schema-component/antd/form-item/FormItem.mjs +14 -12
- package/es/schema-component/antd/form-item/SchemaSettingOptions.d.ts +1 -14
- package/es/schema-component/antd/form-item/SchemaSettingOptions.mjs +1 -33
- package/es/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.mjs +4 -3
- package/es/schema-component/antd/form-item/hooks/useParseDefaultValue.mjs +5 -3
- package/es/schema-component/antd/form-item/operatorUtils.d.ts +14 -0
- package/es/schema-component/antd/form-item/operatorUtils.mjs +36 -0
- package/es/schema-component/antd/form-v2/Form.mjs +26 -167
- package/es/schema-component/antd/form-v2/FormLinkageRules.d.ts +9 -0
- package/es/schema-component/antd/form-v2/FormLinkageRules.mjs +191 -0
- package/es/schema-component/antd/form-v2/Templates.mjs +1 -1
- package/es/schema-component/antd/grid/Grid.mjs +5 -2
- package/es/schema-component/antd/grid-card/GridCard.Item.mjs +2 -2
- package/es/schema-component/antd/icon-picker/IconFilterInput.mjs +12 -4
- package/es/schema-component/antd/icon-picker/IconPicker.mjs +1 -1
- package/es/schema-component/antd/input/Json.d.ts +1 -4
- package/es/schema-component/antd/input/ReadPretty.mjs +2 -2
- package/es/schema-component/antd/input-number/ReadPretty.mjs +1 -1
- package/es/schema-component/antd/markdown/Markdown.Void.Designer.mjs +2 -1
- package/es/schema-component/antd/markdown/Markdown.Void.mjs +10 -2
- package/es/schema-component/antd/markdown/Markdown.mjs +1 -1
- package/es/schema-component/antd/markdown/util.mjs +5 -0
- package/es/schema-component/antd/rich-text/RichText.mjs +1 -1
- package/es/schema-component/antd/select/FormulaSelect.mjs +1 -2
- package/es/schema-component/antd/select/ReadPretty.mjs +2 -2
- package/es/schema-component/antd/select/Select.mjs +1 -2
- package/es/schema-component/antd/select/utils.d.ts +2 -1
- package/es/schema-component/antd/select/utils.mjs +2 -2
- package/es/schema-component/antd/time-picker/ReadPretty.mjs +1 -1
- package/es/schema-component/antd/upload/ReadPretty.mjs +5 -5
- package/es/schema-component/antd/upload/Upload.mjs +6 -5
- package/es/schema-component/antd/variable/Input.mjs +1 -1
- package/es/schema-component/antd/variable/TextArea.mjs +1 -1
- package/es/schema-component/hooks/useDesigner.mjs +9 -3
- package/es/schema-component/hooks/useOptionalNavigate.d.ts +1 -0
- package/es/schema-component/hooks/useOptionalNavigate.mjs +2 -0
- package/es/schema-settings/DataTemplates/components/Designer.mjs +2 -1
- package/es/schema-settings/VariableInput/hooks/useBaseVariable.mjs +2 -1
- package/es/schema-settings/VariableInput/hooks/useBlockCollection.mjs +1 -1
- package/es/schema-settings/VariableInput/hooks/useContextAssociationFields.mjs +2 -1
- package/es/schema-settings/VariableInput/hooks/useFormVariable.mjs +1 -1
- package/es/schema-settings/VariableInput/hooks/useRecordVariable.mjs +1 -1
- package/es/style/theme/AntdAppProvider.mjs +2 -2
- package/es/user/ChangePassword.d.ts +4 -1
- package/es/user/CurrentUserContext.d.ts +2 -0
- package/es/user/CurrentUserContext.mjs +5 -0
- package/es/user/CurrentUserProvider.d.ts +0 -3
- package/es/user/CurrentUserProvider.mjs +3 -5
- package/es/user/EditProfile.d.ts +4 -1
- package/es/user/LanguageSettings.d.ts +4 -1
- package/es/user/SwitchRole.d.ts +4 -1
- package/es/user/index.d.ts +1 -0
- package/es/user/index.mjs +1 -0
- package/es/variables/VariablesProvider.mjs +1 -1
- package/lib/api-client/APIClient.js +8 -5
- package/lib/application/hoc/withDynamicSchemaProps.js +3 -3
- package/lib/application/schema-initializer/hooks/index.js +4 -1
- package/lib/application/schema-settings/components/SchemaSettingsChildren.js +14 -14
- package/lib/application/utils/clientModuleRegistry.js +46 -0
- package/lib/application/utils/globalDeps.js +2 -2
- package/lib/block-provider/BlockProvider.js +6 -8
- package/lib/block-provider/BlockRequestContext.js +42 -0
- package/lib/block-provider/FormBlockContext.js +42 -0
- package/lib/block-provider/FormBlockProvider.js +13 -14
- package/lib/built-in/acl/ACLCollectionFieldProvider.js +76 -0
- package/lib/built-in/acl/ACLContext.js +70 -0
- package/lib/built-in/acl/ACLPlugin.js +2 -1
- package/lib/built-in/acl/ACLProvider.js +13 -76
- package/lib/built-in/acl/index.js +27 -9
- package/lib/built-in/locale/LocalePlugin.js +17 -5
- package/lib/collection-manager/hooks/useCollectionManager_deprecated.js +4 -3
- package/lib/data-source/data-source/DataSourceManager.js +6 -7
- package/lib/data-source/data-source/constants.js +40 -0
- package/lib/data-source/utils.js +2 -2
- package/lib/exports.js +769 -0
- package/lib/filter-provider/utils.js +7 -63
- package/lib/index.js +10 -714
- package/lib/record-provider/index.js +6 -6
- package/lib/schema-component/antd/action/Action.js +9 -8
- package/lib/schema-component/antd/action/hooks.js +3 -2
- package/lib/schema-component/antd/association-field/AssociationSelect.js +3 -2
- package/lib/schema-component/antd/association-field/hooks.js +18 -1
- package/lib/schema-component/antd/cron/CronSet.js +8 -2
- package/lib/schema-component/antd/filter/conditionUtils.js +180 -0
- package/lib/schema-component/antd/filter/dateValueUtils.js +116 -0
- package/lib/schema-component/antd/filter/useFilterActionProps.js +7 -186
- package/lib/schema-component/antd/filter/useGetFilterOptions.js +91 -0
- package/lib/schema-component/antd/form/Form.js +4 -4
- package/lib/schema-component/antd/form-item/FormItem.FilterFormDesigner.js +2 -2
- package/lib/schema-component/antd/form-item/FormItem.js +23 -20
- package/lib/schema-component/antd/form-item/SchemaSettingOptions.js +6 -38
- package/lib/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.js +9 -7
- package/lib/schema-component/antd/form-item/hooks/useParseDefaultValue.js +12 -8
- package/lib/schema-component/antd/form-item/operatorUtils.js +76 -0
- package/lib/schema-component/antd/form-v2/Form.js +204 -317
- package/lib/schema-component/antd/form-v2/FormLinkageRules.js +236 -0
- package/lib/schema-component/antd/form-v2/Templates.js +2 -2
- package/lib/schema-component/antd/grid/Grid.js +10 -7
- package/lib/schema-component/antd/grid-card/GridCard.Item.js +2 -2
- package/lib/schema-component/antd/icon-picker/IconFilterInput.js +12 -4
- package/lib/schema-component/antd/icon-picker/IconPicker.js +1 -1
- package/lib/schema-component/antd/input/ReadPretty.js +10 -10
- package/lib/schema-component/antd/input-number/ReadPretty.js +1 -1
- package/lib/schema-component/antd/markdown/Markdown.Void.Designer.js +6 -5
- package/lib/schema-component/antd/markdown/Markdown.Void.js +138 -111
- package/lib/schema-component/antd/markdown/Markdown.js +2 -2
- package/lib/schema-component/antd/markdown/util.js +5 -0
- package/lib/schema-component/antd/rich-text/RichText.js +2 -2
- package/lib/schema-component/antd/select/FormulaSelect.js +1 -2
- package/lib/schema-component/antd/select/ReadPretty.js +2 -2
- package/lib/schema-component/antd/select/Select.js +1 -2
- package/lib/schema-component/antd/select/utils.js +6 -3
- package/lib/schema-component/antd/time-picker/ReadPretty.js +2 -2
- package/lib/schema-component/antd/upload/ReadPretty.js +5 -5
- package/lib/schema-component/antd/upload/Upload.js +6 -5
- package/lib/schema-component/antd/variable/Input.js +1 -1
- package/lib/schema-component/antd/variable/TextArea.js +1 -1
- package/lib/schema-component/hooks/useDesigner.js +57 -23
- package/lib/schema-component/hooks/useOptionalNavigate.js +36 -0
- package/lib/schema-settings/DataTemplates/components/Designer.js +4 -3
- package/lib/schema-settings/VariableInput/hooks/useBaseVariable.js +4 -3
- package/lib/schema-settings/VariableInput/hooks/useBlockCollection.js +2 -2
- package/lib/schema-settings/VariableInput/hooks/useContextAssociationFields.js +4 -3
- package/lib/schema-settings/VariableInput/hooks/useFormVariable.js +2 -2
- package/lib/schema-settings/VariableInput/hooks/useRecordVariable.js +2 -2
- package/lib/style/theme/AntdAppProvider.js +4 -4
- package/lib/user/CurrentUserContext.js +42 -0
- package/lib/user/CurrentUserProvider.js +6 -14
- package/lib/user/index.js +24 -12
- package/lib/variables/VariablesProvider.js +2 -2
- package/package.json +5 -4
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./Markdown.Void.Designer": function(module) {
|
|
4
|
+
module.exports = import("./Markdown.Void.Designer.js").then(function(module) {
|
|
5
|
+
return module;
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
var __webpack_module_cache__ = {};
|
|
10
|
+
function __webpack_require__(moduleId) {
|
|
11
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
12
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
13
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
14
|
+
exports: {}
|
|
15
|
+
};
|
|
16
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
17
|
+
return module.exports;
|
|
18
|
+
}
|
|
3
19
|
(()=>{
|
|
4
20
|
__webpack_require__.n = (module)=>{
|
|
5
21
|
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
@@ -31,119 +47,130 @@ var __webpack_require__ = {};
|
|
|
31
47
|
};
|
|
32
48
|
})();
|
|
33
49
|
var __webpack_exports__ = {};
|
|
34
|
-
|
|
35
|
-
__webpack_require__.
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
|
-
const external_react_namespaceObject = require("react");
|
|
40
|
-
const schema_namespaceObject = require("@tachybase/schema");
|
|
41
|
-
const external_antd_namespaceObject = require("antd");
|
|
42
|
-
const external_classnames_namespaceObject = require("classnames");
|
|
43
|
-
var external_classnames_default = /*#__PURE__*/ __webpack_require__.n(external_classnames_namespaceObject);
|
|
44
|
-
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
45
|
-
const index_js_namespaceObject = require("../../../style/theme/index.js");
|
|
46
|
-
const useDesignable_js_namespaceObject = require("../../hooks/useDesignable.js");
|
|
47
|
-
const external_Markdown_Void_Designer_js_namespaceObject = require("./Markdown.Void.Designer.js");
|
|
48
|
-
const external_style_js_namespaceObject = require("./style.js");
|
|
49
|
-
const external_util_js_namespaceObject = require("./util.js");
|
|
50
|
-
const MarkdownEditor = (props)=>{
|
|
51
|
-
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
52
|
-
const [value, setValue] = (0, external_react_namespaceObject.useState)(props.defaultValue);
|
|
53
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
54
|
-
className: 'mb-markdown',
|
|
55
|
-
style: {
|
|
56
|
-
position: 'relative'
|
|
57
|
-
},
|
|
58
|
-
children: [
|
|
59
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Input.TextArea, {
|
|
60
|
-
autoSize: {
|
|
61
|
-
minRows: 3
|
|
62
|
-
},
|
|
63
|
-
...props,
|
|
64
|
-
value: value,
|
|
65
|
-
onChange: (e)=>{
|
|
66
|
-
setValue(e.target.value);
|
|
67
|
-
}
|
|
68
|
-
}),
|
|
69
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
|
|
70
|
-
style: {
|
|
71
|
-
position: 'absolute',
|
|
72
|
-
bottom: 5,
|
|
73
|
-
right: 5
|
|
74
|
-
},
|
|
75
|
-
children: [
|
|
76
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
77
|
-
onClick: (e)=>{
|
|
78
|
-
var _props_onCancel;
|
|
79
|
-
null == (_props_onCancel = props.onCancel) || _props_onCancel.call(props, e);
|
|
80
|
-
},
|
|
81
|
-
children: t('Cancel')
|
|
82
|
-
}),
|
|
83
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
84
|
-
type: 'primary',
|
|
85
|
-
onClick: ()=>{
|
|
86
|
-
var _props_onSubmit;
|
|
87
|
-
null == (_props_onSubmit = props.onSubmit) || _props_onSubmit.call(props, value);
|
|
88
|
-
},
|
|
89
|
-
children: t('Save')
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
const MarkdownVoid = (0, schema_namespaceObject.observer)((props)=>{
|
|
97
|
-
const { isDarkTheme } = (0, index_js_namespaceObject.useGlobalTheme)();
|
|
98
|
-
const { componentCls, hashId } = (0, external_style_js_namespaceObject.useStyles)({
|
|
99
|
-
isDarkTheme
|
|
50
|
+
(()=>{
|
|
51
|
+
__webpack_require__.r(__webpack_exports__);
|
|
52
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
53
|
+
MarkdownVoid: ()=>MarkdownVoid
|
|
100
54
|
});
|
|
101
|
-
const
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
55
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
56
|
+
const external_react_namespaceObject = require("react");
|
|
57
|
+
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
58
|
+
const schema_namespaceObject = require("@tachybase/schema");
|
|
59
|
+
const external_antd_namespaceObject = require("antd");
|
|
60
|
+
const external_classnames_namespaceObject = require("classnames");
|
|
61
|
+
var external_classnames_default = /*#__PURE__*/ __webpack_require__.n(external_classnames_namespaceObject);
|
|
62
|
+
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
63
|
+
const index_js_namespaceObject = require("../../../style/theme/index.js");
|
|
64
|
+
const useDesignable_js_namespaceObject = require("../../hooks/useDesignable.js");
|
|
65
|
+
const external_style_js_namespaceObject = require("./style.js");
|
|
66
|
+
const external_util_js_namespaceObject = require("./util.js");
|
|
67
|
+
const LazyMarkdownVoidDesigner = /*#__PURE__*/ external_react_default().lazy(()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "./Markdown.Void.Designer")).then((module)=>({
|
|
68
|
+
default: module.MarkdownVoidDesigner
|
|
69
|
+
})));
|
|
70
|
+
const MarkdownVoidDesigner = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_default().Suspense, {
|
|
71
|
+
fallback: null,
|
|
72
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(LazyMarkdownVoidDesigner, {
|
|
73
|
+
...props
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
const MarkdownEditor = (props)=>{
|
|
77
|
+
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
78
|
+
const [value, setValue] = (0, external_react_namespaceObject.useState)(props.defaultValue);
|
|
79
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
80
|
+
className: 'mb-markdown',
|
|
81
|
+
style: {
|
|
82
|
+
position: 'relative'
|
|
83
|
+
},
|
|
84
|
+
children: [
|
|
85
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Input.TextArea, {
|
|
86
|
+
autoSize: {
|
|
87
|
+
minRows: 3
|
|
88
|
+
},
|
|
89
|
+
...props,
|
|
90
|
+
value: value,
|
|
91
|
+
onChange: (e)=>{
|
|
92
|
+
setValue(e.target.value);
|
|
93
|
+
}
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_antd_namespaceObject.Space, {
|
|
96
|
+
style: {
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
bottom: 5,
|
|
99
|
+
right: 5
|
|
100
|
+
},
|
|
101
|
+
children: [
|
|
102
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
103
|
+
onClick: (e)=>{
|
|
104
|
+
var _props_onCancel;
|
|
105
|
+
null == (_props_onCancel = props.onCancel) || _props_onCancel.call(props, e);
|
|
106
|
+
},
|
|
107
|
+
children: t('Cancel')
|
|
108
|
+
}),
|
|
109
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
110
|
+
type: 'primary',
|
|
111
|
+
onClick: ()=>{
|
|
112
|
+
var _props_onSubmit;
|
|
113
|
+
null == (_props_onSubmit = props.onSubmit) || _props_onSubmit.call(props, value);
|
|
114
|
+
},
|
|
115
|
+
children: t('Save')
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
const MarkdownVoid = (0, schema_namespaceObject.observer)((props)=>{
|
|
123
|
+
const { isDarkTheme } = (0, index_js_namespaceObject.useGlobalTheme)();
|
|
124
|
+
const { componentCls, hashId } = (0, external_style_js_namespaceObject.useStyles)({
|
|
125
|
+
isDarkTheme
|
|
126
|
+
});
|
|
127
|
+
const { content, className } = props;
|
|
128
|
+
const field = (0, schema_namespaceObject.useField)();
|
|
129
|
+
const schema = (0, schema_namespaceObject.useFieldSchema)();
|
|
130
|
+
const { dn } = (0, useDesignable_js_namespaceObject.useDesignable)();
|
|
131
|
+
const { onSave, onCancel } = props;
|
|
132
|
+
const { html, loading } = (0, external_util_js_namespaceObject.useParseMarkdown)(content);
|
|
133
|
+
if (loading) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Spin, {});
|
|
134
|
+
return (null == field ? void 0 : field.editable) ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(MarkdownEditor, {
|
|
135
|
+
...props,
|
|
136
|
+
className: true,
|
|
137
|
+
defaultValue: content,
|
|
138
|
+
onCancel: ()=>{
|
|
139
|
+
field.editable = false;
|
|
140
|
+
null == onCancel || onCancel();
|
|
141
|
+
},
|
|
142
|
+
onSubmit: async (value)=>{
|
|
143
|
+
field.editable = false;
|
|
144
|
+
null != schema['x-component-props'] || (schema['x-component-props'] = {});
|
|
145
|
+
schema['x-component-props']['content'] = value;
|
|
146
|
+
field.componentProps.content = value;
|
|
147
|
+
null == onSave || onSave(schema);
|
|
148
|
+
dn.emit('patch', {
|
|
149
|
+
schema: {
|
|
150
|
+
'x-uid': schema['x-uid'],
|
|
151
|
+
'x-component-props': {
|
|
152
|
+
content: value
|
|
153
|
+
}
|
|
127
154
|
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
158
|
+
className: external_classnames_default()([
|
|
159
|
+
componentCls,
|
|
160
|
+
hashId,
|
|
161
|
+
'tb-markdown tb-markdown-default tb-markdown-table',
|
|
162
|
+
className
|
|
163
|
+
]),
|
|
164
|
+
style: props.style,
|
|
165
|
+
dangerouslySetInnerHTML: {
|
|
166
|
+
__html: html
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}, {
|
|
170
|
+
displayName: 'MarkdownVoid'
|
|
142
171
|
});
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
});
|
|
146
|
-
MarkdownVoid.Designer = external_Markdown_Void_Designer_js_namespaceObject.MarkdownVoidDesigner;
|
|
172
|
+
MarkdownVoid.Designer = MarkdownVoidDesigner;
|
|
173
|
+
})();
|
|
147
174
|
exports.MarkdownVoid = __webpack_exports__.MarkdownVoid;
|
|
148
175
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
149
176
|
"MarkdownVoid"
|
|
@@ -34,7 +34,7 @@ const schema_namespaceObject = require("@tachybase/schema");
|
|
|
34
34
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
35
35
|
const external_antd_namespaceObject = require("antd");
|
|
36
36
|
const index_js_namespaceObject = require("../../../style/theme/index.js");
|
|
37
|
-
const
|
|
37
|
+
const ReadPretty_js_namespaceObject = require("../input/ReadPretty.js");
|
|
38
38
|
const external_Markdown_Void_js_namespaceObject = require("./Markdown.Void.js");
|
|
39
39
|
const external_style_js_namespaceObject = require("./style.js");
|
|
40
40
|
const external_util_js_namespaceObject = require("./util.js");
|
|
@@ -64,7 +64,7 @@ const MarkdownReadPretty = (props)=>{
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
if (loading) return wrapSSR(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Spin, {}));
|
|
67
|
-
return wrapSSR(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
67
|
+
return wrapSSR(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ReadPretty_js_namespaceObject.ReadPretty.TextArea, {
|
|
68
68
|
...props,
|
|
69
69
|
autop: false,
|
|
70
70
|
text: text,
|
|
@@ -54,11 +54,16 @@ function useParseMarkdown(text) {
|
|
|
54
54
|
const [html, setHtml] = (0, external_react_namespaceObject.useState)('');
|
|
55
55
|
const [loading, setLoading] = (0, external_react_namespaceObject.useState)(false);
|
|
56
56
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
57
|
+
let mounted = true;
|
|
57
58
|
setLoading(true);
|
|
58
59
|
parseMarkdown(text).then((r)=>{
|
|
60
|
+
if (!mounted) return;
|
|
59
61
|
setHtml(r);
|
|
60
62
|
setLoading(false);
|
|
61
63
|
});
|
|
64
|
+
return ()=>{
|
|
65
|
+
mounted = false;
|
|
66
|
+
};
|
|
62
67
|
}, [
|
|
63
68
|
text
|
|
64
69
|
]);
|
|
@@ -41,7 +41,7 @@ const schema_namespaceObject = require("@tachybase/schema");
|
|
|
41
41
|
const external_react_quill_namespaceObject = require("react-quill");
|
|
42
42
|
var external_react_quill_default = /*#__PURE__*/ __webpack_require__.n(external_react_quill_namespaceObject);
|
|
43
43
|
const isVariable_js_namespaceObject = require("../../../variables/utils/isVariable.js");
|
|
44
|
-
const
|
|
44
|
+
const ReadPretty_js_namespaceObject = require("../input/ReadPretty.js");
|
|
45
45
|
const external_style_js_namespaceObject = require("./style.js");
|
|
46
46
|
const RichText = (0, schema_namespaceObject.connect)((props)=>{
|
|
47
47
|
const { wrapSSR, hashId, componentCls } = (0, external_style_js_namespaceObject.useStyles)();
|
|
@@ -91,7 +91,7 @@ const RichText = (0, schema_namespaceObject.connect)((props)=>{
|
|
|
91
91
|
}));
|
|
92
92
|
}, (0, schema_namespaceObject.mapProps)({
|
|
93
93
|
initialValue: 'defaultValue'
|
|
94
|
-
}), (0, schema_namespaceObject.mapReadPretty)((props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
94
|
+
}), (0, schema_namespaceObject.mapReadPretty)((props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ReadPretty_js_namespaceObject.ReadPretty.Html, {
|
|
95
95
|
...props
|
|
96
96
|
})));
|
|
97
97
|
exports.RichText = __webpack_exports__.RichText;
|
|
@@ -30,7 +30,6 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
30
30
|
const external_react_namespaceObject = require("react");
|
|
31
31
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
32
32
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
33
|
-
const client_namespaceObject = require("@tego/client");
|
|
34
33
|
const external_antd_namespaceObject = require("antd");
|
|
35
34
|
const index_js_namespaceObject = require("../../../api-client/index.js");
|
|
36
35
|
const external_collection_manager_index_js_namespaceObject = require("../../../collection-manager/index.js");
|
|
@@ -50,7 +49,7 @@ const ObjectSelect = (props)=>{
|
|
|
50
49
|
const toValue = (v)=>{
|
|
51
50
|
var _getCurrentOptions;
|
|
52
51
|
if (isEmptyObject(v)) return;
|
|
53
|
-
const values = (0, schema_namespaceObject.toArr)(v).filter((item)=>item).map((val)=>(0,
|
|
52
|
+
const values = (0, schema_namespaceObject.toArr)(v).filter((item)=>item).map((val)=>(0, external_utils_js_namespaceObject.isPlainObject)(val) ? val[fieldNames.value] : val);
|
|
54
53
|
const filterOption = options;
|
|
55
54
|
const currentOptions = null == (_getCurrentOptions = (0, external_utils_js_namespaceObject.getCurrentOptions)(values, filterOption, fieldNames)) ? void 0 : _getCurrentOptions.map((val)=>({
|
|
56
55
|
label: val[fieldNames.label],
|
|
@@ -40,10 +40,10 @@ const ReadPretty = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
40
40
|
...props.fieldNames
|
|
41
41
|
};
|
|
42
42
|
const field = (0, schema_namespaceObject.useField)();
|
|
43
|
-
if (!(0, schema_namespaceObject.isValid)(props.value)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {});
|
|
44
|
-
if ((0, schema_namespaceObject.isArrayField)(field) && (null == field ? void 0 : null == (_field_value = field.value) ? void 0 : _field_value.length) === 0) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {});
|
|
45
43
|
const collectionField = (0, CollectionFieldProvider_js_namespaceObject.useCollectionField)();
|
|
46
44
|
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
45
|
+
if (!(0, schema_namespaceObject.isValid)(props.value)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {});
|
|
46
|
+
if ((0, schema_namespaceObject.isArrayField)(field) && (null == field ? void 0 : null == (_field_value = field.value) ? void 0 : _field_value.length) === 0) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {});
|
|
47
47
|
const dataSource = field.dataSource || props.options || (null == collectionField ? void 0 : collectionField.uiSchema.enum) || [];
|
|
48
48
|
const options = (0, external_utils_js_namespaceObject.getCurrentOptions)(field.value, dataSource, fieldNames);
|
|
49
49
|
const currentOptions = getFormulaValue(null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : null == (_fieldSchema_xcomponentprops_fieldNames = _fieldSchema_xcomponentprops.fieldNames) ? void 0 : _fieldSchema_xcomponentprops_fieldNames['formula'], options, fieldSchema);
|
|
@@ -39,7 +39,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
39
39
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
40
40
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
41
41
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
42
|
-
const client_namespaceObject = require("@tego/client");
|
|
43
42
|
const external_antd_namespaceObject = require("antd");
|
|
44
43
|
const external_FormulaSelect_js_namespaceObject = require("./FormulaSelect.js");
|
|
45
44
|
var external_FormulaSelect_js_default = /*#__PURE__*/ __webpack_require__.n(external_FormulaSelect_js_namespaceObject);
|
|
@@ -51,7 +50,7 @@ const ObjectSelect = (props)=>{
|
|
|
51
50
|
const toValue = (v)=>{
|
|
52
51
|
var _getCurrentOptions;
|
|
53
52
|
if (isEmptyObject(v)) return;
|
|
54
|
-
const values = (0, schema_namespaceObject.toArr)(v).filter((item)=>item).map((val)=>(0,
|
|
53
|
+
const values = (0, schema_namespaceObject.toArr)(v).filter((item)=>item).map((val)=>(0, external_utils_js_namespaceObject.isPlainObject)(val) ? val[fieldNames.value] : val);
|
|
55
54
|
const currentOptions = null == (_getCurrentOptions = (0, external_utils_js_namespaceObject.getCurrentOptions)(values, options, fieldNames)) ? void 0 : _getCurrentOptions.map((val)=>({
|
|
56
55
|
label: val[fieldNames.label],
|
|
57
56
|
value: val[fieldNames.value]
|
|
@@ -25,9 +25,10 @@ var __webpack_exports__ = {};
|
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
defaultFieldNames: ()=>defaultFieldNames,
|
|
28
|
-
getCurrentOptions: ()=>getCurrentOptions
|
|
28
|
+
getCurrentOptions: ()=>getCurrentOptions,
|
|
29
|
+
isPlainObject: ()=>client_namespaceObject.isPlainObject
|
|
29
30
|
});
|
|
30
|
-
const client_namespaceObject = require("@
|
|
31
|
+
const client_namespaceObject = require("@tachybase/utils/client");
|
|
31
32
|
const external_lodash_namespaceObject = require("lodash");
|
|
32
33
|
const defaultFieldNames = {
|
|
33
34
|
label: 'label',
|
|
@@ -66,9 +67,11 @@ function getCurrentOptions(values, dataSource, fieldNames) {
|
|
|
66
67
|
}
|
|
67
68
|
exports.defaultFieldNames = __webpack_exports__.defaultFieldNames;
|
|
68
69
|
exports.getCurrentOptions = __webpack_exports__.getCurrentOptions;
|
|
70
|
+
exports.isPlainObject = __webpack_exports__.isPlainObject;
|
|
69
71
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
70
72
|
"defaultFieldNames",
|
|
71
|
-
"getCurrentOptions"
|
|
73
|
+
"getCurrentOptions",
|
|
74
|
+
"isPlainObject"
|
|
72
75
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
73
76
|
Object.defineProperty(exports, '__esModule', {
|
|
74
77
|
value: true
|
|
@@ -38,14 +38,14 @@ __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 client_namespaceObject = require("@tego/client");
|
|
42
41
|
const external_classnames_namespaceObject = require("classnames");
|
|
43
42
|
var external_classnames_default = /*#__PURE__*/ __webpack_require__.n(external_classnames_namespaceObject);
|
|
44
43
|
const external_dayjs_namespaceObject = require("dayjs");
|
|
45
44
|
var external_dayjs_default = /*#__PURE__*/ __webpack_require__.n(external_dayjs_namespaceObject);
|
|
45
|
+
const index_js_namespaceObject = require("../__builtins__/index.js");
|
|
46
46
|
const ReadPretty = (props)=>{
|
|
47
47
|
const { value, format = 'HH:mm:ss' } = props;
|
|
48
|
-
const prefixCls = (0,
|
|
48
|
+
const prefixCls = (0, index_js_namespaceObject.usePrefixCls)("description-text", props);
|
|
49
49
|
const values = (0, schema_namespaceObject.toArr)(value);
|
|
50
50
|
const getLabels = ()=>{
|
|
51
51
|
const labels = values.map((v)=>external_dayjs_default()(v, 'HH:mm:ss').format(format));
|
|
@@ -53,7 +53,7 @@ const external_shared_js_namespaceObject = require("./shared.js");
|
|
|
53
53
|
const external_style_js_namespaceObject = require("./style.js");
|
|
54
54
|
const ReadPretty = ()=>null;
|
|
55
55
|
ReadPretty.File = function(props) {
|
|
56
|
-
var _images_fileIndex, _images_, _images_1, _images_fileIndex1;
|
|
56
|
+
var _app_AttachmentPreviewManager_get, _app_AttachmentPreviewManager, _images_fileIndex, _images_, _images_1, _images_fileIndex1;
|
|
57
57
|
const { size, showCount = 0 } = props;
|
|
58
58
|
const record = (0, external_record_provider_index_js_namespaceObject.useRecord)();
|
|
59
59
|
const field = (0, schema_namespaceObject.useField)();
|
|
@@ -64,7 +64,7 @@ ReadPretty.File = function(props) {
|
|
|
64
64
|
const [rotate, setRotate] = (0, external_react_namespaceObject.useState)(0);
|
|
65
65
|
const { wrapSSR, hashId, componentCls: prefixCls } = (0, external_style_js_namespaceObject.useStyles)();
|
|
66
66
|
const useUploadStyleVal = style_default()["default"] ? style_default()["default"] : style_default();
|
|
67
|
-
const previewList = app.AttachmentPreviewManager.get();
|
|
67
|
+
const previewList = (null == (_app_AttachmentPreviewManager = app.AttachmentPreviewManager) ? void 0 : null == (_app_AttachmentPreviewManager_get = _app_AttachmentPreviewManager.get) ? void 0 : _app_AttachmentPreviewManager_get.call(_app_AttachmentPreviewManager)) || {};
|
|
68
68
|
useUploadStyleVal(prefixCls);
|
|
69
69
|
return wrapSSR(/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
70
70
|
children: [
|
|
@@ -176,7 +176,7 @@ ReadPretty.Upload = function() {
|
|
|
176
176
|
};
|
|
177
177
|
const ReadFile = (param)=>{
|
|
178
178
|
let { file, prefixCls, size, images, setFileIndex, setVisible, preview } = param;
|
|
179
|
-
const
|
|
179
|
+
const viewComponet = null == preview ? void 0 : preview.viewComponet;
|
|
180
180
|
const handleClick = (e)=>{
|
|
181
181
|
const index = images.indexOf(file);
|
|
182
182
|
e.preventDefault();
|
|
@@ -207,14 +207,14 @@ const ReadFile = (param)=>{
|
|
|
207
207
|
style: {
|
|
208
208
|
lineHeight: '100%'
|
|
209
209
|
},
|
|
210
|
-
children: viewComponet({
|
|
210
|
+
children: viewComponet ? viewComponet({
|
|
211
211
|
images,
|
|
212
212
|
size,
|
|
213
213
|
prefixCls,
|
|
214
214
|
file,
|
|
215
215
|
setFileIndex,
|
|
216
216
|
setVisible
|
|
217
|
-
})
|
|
217
|
+
}) : null
|
|
218
218
|
}),
|
|
219
219
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
|
|
220
220
|
target: "_blank",
|
|
@@ -59,12 +59,13 @@ const Upload_Upload = (0, schema_namespaceObject.connect)((props)=>/*#__PURE__*/
|
|
|
59
59
|
value: 'fileList'
|
|
60
60
|
}), (0, schema_namespaceObject.mapReadPretty)(external_ReadPretty_js_namespaceObject.ReadPretty.Upload));
|
|
61
61
|
Upload_Upload.Attachment = (0, schema_namespaceObject.connect)((props)=>{
|
|
62
|
-
var _images_fileIndex, _images_, _images_1, _images_fileIndex1;
|
|
62
|
+
var _app_AttachmentPreviewManager, _images_fileIndex, _images_, _images_1, _images_fileIndex1;
|
|
63
63
|
const { disabled, multiple, value, onChange } = props;
|
|
64
64
|
const [fileList, setFileList] = (0, external_react_namespaceObject.useState)([]);
|
|
65
65
|
const [sync, setSync] = (0, external_react_namespaceObject.useState)(true);
|
|
66
66
|
const app = (0, index_js_namespaceObject.useApp)();
|
|
67
|
-
|
|
67
|
+
var _app_AttachmentPreviewManager_get;
|
|
68
|
+
const previewList = null != (_app_AttachmentPreviewManager_get = null == app ? void 0 : null == (_app_AttachmentPreviewManager = app.AttachmentPreviewManager) ? void 0 : _app_AttachmentPreviewManager.get()) ? _app_AttachmentPreviewManager_get : {};
|
|
68
69
|
const images = fileList;
|
|
69
70
|
const [fileIndex, setFileIndex] = (0, external_react_namespaceObject.useState)(0);
|
|
70
71
|
const [visible, setVisible] = (0, external_react_namespaceObject.useState)(false);
|
|
@@ -304,7 +305,7 @@ const UploadReadFile = (props)=>{
|
|
|
304
305
|
setVisible(true);
|
|
305
306
|
setFileIndex(index);
|
|
306
307
|
};
|
|
307
|
-
const
|
|
308
|
+
const viewComponet = null == preview ? void 0 : preview.viewComponet;
|
|
308
309
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
309
310
|
className: "".concat(prefixCls, "-list-picture-card-container ").concat(prefixCls, "-list-item-container"),
|
|
310
311
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
@@ -324,12 +325,12 @@ const UploadReadFile = (props)=>{
|
|
|
324
325
|
style: {
|
|
325
326
|
lineHeight: '100%'
|
|
326
327
|
},
|
|
327
|
-
children: viewComponet({
|
|
328
|
+
children: viewComponet ? viewComponet({
|
|
328
329
|
prefixCls,
|
|
329
330
|
file,
|
|
330
331
|
setFileIndex,
|
|
331
332
|
setVisible
|
|
332
|
-
})
|
|
333
|
+
}) : null
|
|
333
334
|
}),
|
|
334
335
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("a", {
|
|
335
336
|
target: "_blank",
|
|
@@ -39,8 +39,8 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
39
39
|
const external_react_namespaceObject = require("react");
|
|
40
40
|
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
41
41
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
42
|
+
const client_namespaceObject = require("@tachybase/utils/client");
|
|
42
43
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
43
|
-
const client_namespaceObject = require("@tego/client");
|
|
44
44
|
const external_antd_namespaceObject = require("antd");
|
|
45
45
|
const external_antd_style_namespaceObject = require("antd-style");
|
|
46
46
|
const external_classnames_namespaceObject = require("classnames");
|
|
@@ -38,7 +38,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
const external_react_namespaceObject = require("react");
|
|
40
40
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
41
|
-
const client_namespaceObject = require("@
|
|
41
|
+
const client_namespaceObject = require("@tachybase/utils/client");
|
|
42
42
|
const external_antd_namespaceObject = require("antd");
|
|
43
43
|
const external_classnames_namespaceObject = require("classnames");
|
|
44
44
|
var external_classnames_default = /*#__PURE__*/ __webpack_require__.n(external_classnames_namespaceObject);
|
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"../../schema-settings/GeneralSchemaDesigner": function(module) {
|
|
4
|
+
module.exports = import("../../schema-settings/GeneralSchemaDesigner.js").then(function(module) {
|
|
5
|
+
return module;
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
var __webpack_module_cache__ = {};
|
|
10
|
+
function __webpack_require__(moduleId) {
|
|
11
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
12
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
13
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
14
|
+
exports: {}
|
|
15
|
+
};
|
|
16
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
17
|
+
return module.exports;
|
|
18
|
+
}
|
|
19
|
+
(()=>{
|
|
20
|
+
__webpack_require__.n = (module)=>{
|
|
21
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
22
|
+
__webpack_require__.d(getter, {
|
|
23
|
+
a: getter
|
|
24
|
+
});
|
|
25
|
+
return getter;
|
|
26
|
+
};
|
|
27
|
+
})();
|
|
3
28
|
(()=>{
|
|
4
29
|
__webpack_require__.d = (exports1, definition)=>{
|
|
5
30
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -22,28 +47,37 @@ var __webpack_require__ = {};
|
|
|
22
47
|
};
|
|
23
48
|
})();
|
|
24
49
|
var __webpack_exports__ = {};
|
|
25
|
-
|
|
26
|
-
__webpack_require__.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
(()=>{
|
|
51
|
+
__webpack_require__.r(__webpack_exports__);
|
|
52
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
53
|
+
useDesigner: ()=>useDesigner
|
|
54
|
+
});
|
|
55
|
+
const external_react_namespaceObject = require("react");
|
|
56
|
+
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
57
|
+
const schema_namespaceObject = require("@tachybase/schema");
|
|
58
|
+
const external_useComponent_js_namespaceObject = require("./useComponent.js");
|
|
59
|
+
const external_useDesignable_js_namespaceObject = require("./useDesignable.js");
|
|
60
|
+
const Def = ()=>null;
|
|
61
|
+
const LazySchemaToolbar = external_react_default().lazy(()=>Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "../../schema-settings/GeneralSchemaDesigner")).then((module)=>({
|
|
62
|
+
default: module.SchemaToolbar
|
|
63
|
+
})));
|
|
64
|
+
const SchemaToolbar = (props)=>external_react_default().createElement(external_react_default().Suspense, {
|
|
65
|
+
fallback: null
|
|
66
|
+
}, external_react_default().createElement(LazySchemaToolbar, props));
|
|
67
|
+
const useDesigner = ()=>{
|
|
68
|
+
const { designable } = (0, external_useDesignable_js_namespaceObject.useDesignable)();
|
|
69
|
+
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
70
|
+
const toolbar = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
71
|
+
if (fieldSchema['x-designer'] || fieldSchema['x-toolbar']) return fieldSchema['x-designer'] || fieldSchema['x-toolbar'];
|
|
72
|
+
if (fieldSchema['x-settings']) return SchemaToolbar;
|
|
73
|
+
return Def;
|
|
74
|
+
}, [
|
|
75
|
+
fieldSchema
|
|
76
|
+
]);
|
|
77
|
+
const component = (0, external_useComponent_js_namespaceObject.useComponent)(toolbar);
|
|
78
|
+
return designable ? component || Def : Def;
|
|
79
|
+
};
|
|
80
|
+
})();
|
|
47
81
|
exports.useDesigner = __webpack_exports__.useDesigner;
|
|
48
82
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
49
83
|
"useDesigner"
|