@tachybase/client 1.6.21 → 1.6.22
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 +3 -3
- 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/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 +6 -4
- 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/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 +11 -9
- 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
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
useOptionalNavigate: ()=>external_react_router_dom_namespaceObject.useNavigate
|
|
28
|
+
});
|
|
29
|
+
const external_react_router_dom_namespaceObject = require("react-router-dom");
|
|
30
|
+
exports.useOptionalNavigate = __webpack_exports__.useOptionalNavigate;
|
|
31
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
32
|
+
"useOptionalNavigate"
|
|
33
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
34
|
+
Object.defineProperty(exports, '__esModule', {
|
|
35
|
+
value: true
|
|
36
|
+
});
|
|
@@ -44,11 +44,12 @@ const external_antd_namespaceObject = require("antd");
|
|
|
44
44
|
const external_lodash_namespaceObject = require("lodash");
|
|
45
45
|
var external_lodash_default = /*#__PURE__*/ __webpack_require__.n(external_lodash_namespaceObject);
|
|
46
46
|
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
47
|
-
const external_index_js_namespaceObject = require("../../index.js");
|
|
48
47
|
const index_js_namespaceObject = require("../../../block-provider/index.js");
|
|
49
48
|
const external_collection_manager_index_js_namespaceObject = require("../../../collection-manager/index.js");
|
|
50
49
|
const utils_js_namespaceObject = require("../../../filter-provider/utils.js");
|
|
51
50
|
const external_schema_component_index_js_namespaceObject = require("../../../schema-component/index.js");
|
|
51
|
+
const external_GeneralSchemaDesigner_js_namespaceObject = require("../../GeneralSchemaDesigner.js");
|
|
52
|
+
const external_SchemaSettings_js_namespaceObject = require("../../SchemaSettings.js");
|
|
52
53
|
const external_SchemaSettingsDataScope_js_namespaceObject = require("../../SchemaSettingsDataScope.js");
|
|
53
54
|
const Designer = (0, schema_namespaceObject.observer)(()=>{
|
|
54
55
|
const { getCollectionFields, getCollectionField, getCollection, isTitleField } = (0, external_collection_manager_index_js_namespaceObject.useCollectionManager_deprecated)();
|
|
@@ -95,7 +96,7 @@ const Designer = (0, schema_namespaceObject.observer)(()=>{
|
|
|
95
96
|
label: compile(null == field ? void 0 : null == (_field_uiSchema = field.uiSchema) ? void 0 : _field_uiSchema.title) || (null == field ? void 0 : field.name)
|
|
96
97
|
};
|
|
97
98
|
});
|
|
98
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(
|
|
99
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(external_GeneralSchemaDesigner_js_namespaceObject.GeneralSchemaDesigner, {
|
|
99
100
|
draggable: false,
|
|
100
101
|
children: [
|
|
101
102
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_SchemaSettingsDataScope_js_namespaceObject.SchemaSettingsDataScope, {
|
|
@@ -168,7 +169,7 @@ function getSelectedIdFilter(selectedId) {
|
|
|
168
169
|
}
|
|
169
170
|
function SelectItem(props) {
|
|
170
171
|
const { title, options, value, onChange, ...others } = props;
|
|
171
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
172
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_SchemaSettings_js_namespaceObject.SchemaSettingsItem, {
|
|
172
173
|
title: title,
|
|
173
174
|
...others,
|
|
174
175
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
@@ -40,8 +40,9 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
40
40
|
const external_react_namespaceObject = require("react");
|
|
41
41
|
var external_react_default = /*#__PURE__*/ __webpack_require__.n(external_react_namespaceObject);
|
|
42
42
|
const index_js_namespaceObject = require("../../../collection-manager/index.js");
|
|
43
|
-
const
|
|
43
|
+
const useGetFilterOptions_js_namespaceObject = require("../../../schema-component/antd/filter/useGetFilterOptions.js");
|
|
44
44
|
const useSpecialCase_js_namespaceObject = require("../../../schema-component/antd/form-item/hooks/useSpecialCase.js");
|
|
45
|
+
const useCompile_js_namespaceObject = require("../../../schema-component/hooks/useCompile.js");
|
|
45
46
|
const BaseVariableContext = /*#__PURE__*/ external_react_default().createContext(null);
|
|
46
47
|
const BaseVariableProvider = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(BaseVariableContext.Provider, {
|
|
47
48
|
value: props,
|
|
@@ -86,8 +87,8 @@ const getChildren = (options, param)=>{
|
|
|
86
87
|
};
|
|
87
88
|
const useBaseVariable = (param)=>{
|
|
88
89
|
let { collectionField, uiSchema, targetFieldSchema, maxDepth = 3, name, title, collectionName, noChildren = false, noDisabled = true, dataSource, returnFields = (fields)=>fields } = param;
|
|
89
|
-
const compile = (0,
|
|
90
|
-
const getFilterOptions = (0,
|
|
90
|
+
const compile = (0, useCompile_js_namespaceObject.useCompile)();
|
|
91
|
+
const getFilterOptions = (0, useGetFilterOptions_js_namespaceObject.useGetFilterOptions)();
|
|
91
92
|
const { isDisabled } = (0, external_react_namespaceObject.useContext)(BaseVariableContext) || {};
|
|
92
93
|
const { getCollectionField } = (0, index_js_namespaceObject.useCollectionManager_deprecated)(dataSource);
|
|
93
94
|
const loadChildren = (option)=>{
|
|
@@ -26,10 +26,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
27
|
useBlockCollection: ()=>useBlockCollection
|
|
28
28
|
});
|
|
29
|
-
const
|
|
29
|
+
const BlockRequestContext_js_namespaceObject = require("../../../block-provider/BlockRequestContext.js");
|
|
30
30
|
const useBlockCollection = ()=>{
|
|
31
31
|
var _ctx_props, _ctx_props1;
|
|
32
|
-
const ctx = (0,
|
|
32
|
+
const ctx = (0, BlockRequestContext_js_namespaceObject.useBlockRequestContext)();
|
|
33
33
|
const name = (null == (_ctx_props = ctx.props) ? void 0 : _ctx_props.collection) || (null == (_ctx_props1 = ctx.props) ? void 0 : _ctx_props1.resource);
|
|
34
34
|
return {
|
|
35
35
|
name
|
|
@@ -31,7 +31,8 @@ const external_react_namespaceObject = require("react");
|
|
|
31
31
|
const client_namespaceObject = require("@tego/client");
|
|
32
32
|
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
33
33
|
const index_js_namespaceObject = require("../../../collection-manager/index.js");
|
|
34
|
-
const
|
|
34
|
+
const useGetFilterOptions_js_namespaceObject = require("../../../schema-component/antd/filter/useGetFilterOptions.js");
|
|
35
|
+
const useCompile_js_namespaceObject = require("../../../schema-component/hooks/useCompile.js");
|
|
35
36
|
const useIsSameOrChildCollection = ()=>{
|
|
36
37
|
const { getChildrenCollections } = (0, index_js_namespaceObject.useCollectionManager_deprecated)();
|
|
37
38
|
return (contextCollection, targetCollection)=>{
|
|
@@ -69,8 +70,8 @@ const getChildren = (options, param, collectionField, getIsSameOrChildCollection
|
|
|
69
70
|
const useContextAssociationFields = (param)=>{
|
|
70
71
|
let { schema, maxDepth = 3, contextCollectionName, collectionField } = param;
|
|
71
72
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
72
|
-
const compile = (0,
|
|
73
|
-
const getFilterOptions = (0,
|
|
73
|
+
const compile = (0, useCompile_js_namespaceObject.useCompile)();
|
|
74
|
+
const getFilterOptions = (0, useGetFilterOptions_js_namespaceObject.useGetFilterOptions)();
|
|
74
75
|
const getIsSameOrChildCollection = useIsSameOrChildCollection();
|
|
75
76
|
const loadChildren = (option)=>{
|
|
76
77
|
var _option_field;
|
|
@@ -28,7 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
useFormVariable: ()=>useFormVariable
|
|
29
29
|
});
|
|
30
30
|
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
31
|
-
const
|
|
31
|
+
const FormBlockContext_js_namespaceObject = require("../../../block-provider/FormBlockContext.js");
|
|
32
32
|
const external_useBaseVariable_js_namespaceObject = require("./useBaseVariable.js");
|
|
33
33
|
const useFormVariable = (param)=>{
|
|
34
34
|
let { collectionName, collectionField, schema, noDisabled, targetFieldSchema } = param;
|
|
@@ -49,7 +49,7 @@ const useFormVariable = (param)=>{
|
|
|
49
49
|
const useCurrentFormVariable = function() {
|
|
50
50
|
let { collectionField, schema, noDisabled, targetFieldSchema, form: _form } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
|
|
51
51
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
52
|
-
const { form, collectionName } = (0,
|
|
52
|
+
const { form, collectionName } = (0, FormBlockContext_js_namespaceObject.useFormBlockContext)();
|
|
53
53
|
const currentFormSettings = (0, external_useBaseVariable_js_namespaceObject.useBaseVariable)({
|
|
54
54
|
collectionField,
|
|
55
55
|
uiSchema: schema,
|
|
@@ -39,7 +39,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
39
39
|
const external_lodash_namespaceObject = require("lodash");
|
|
40
40
|
var external_lodash_default = /*#__PURE__*/ __webpack_require__.n(external_lodash_namespaceObject);
|
|
41
41
|
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
42
|
-
const
|
|
42
|
+
const FormBlockContext_js_namespaceObject = require("../../../block-provider/FormBlockContext.js");
|
|
43
43
|
const external_useBaseVariable_js_namespaceObject = require("./useBaseVariable.js");
|
|
44
44
|
const useRecordVariable = (props)=>{
|
|
45
45
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
@@ -57,7 +57,7 @@ const useRecordVariable = (props)=>{
|
|
|
57
57
|
const useCurrentRecordVariable = function() {
|
|
58
58
|
let props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
|
|
59
59
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
60
|
-
const { formRecord, collectionName } = (0,
|
|
60
|
+
const { formRecord, collectionName } = (0, FormBlockContext_js_namespaceObject.useFormBlockContext)();
|
|
61
61
|
const currentRecordSettings = (0, external_useBaseVariable_js_namespaceObject.useBaseVariable)({
|
|
62
62
|
collectionField: props.collectionField,
|
|
63
63
|
uiSchema: props.schema,
|
|
@@ -29,13 +29,13 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
30
|
const external_react_namespaceObject = require("react");
|
|
31
31
|
const external_antd_namespaceObject = require("antd");
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const useAPIClient_js_namespaceObject = require("../../api-client/hooks/useAPIClient.js");
|
|
33
|
+
const useApp_js_namespaceObject = require("../../application/hooks/useApp.js");
|
|
34
34
|
const AppInner = /*#__PURE__*/ (0, external_react_namespaceObject.memo)((param)=>{
|
|
35
35
|
let { children } = param;
|
|
36
|
-
const app = (0,
|
|
36
|
+
const app = (0, useApp_js_namespaceObject.useApp)();
|
|
37
37
|
const { notification } = external_antd_namespaceObject.App.useApp();
|
|
38
|
-
const apiClient = (0,
|
|
38
|
+
const apiClient = (0, useAPIClient_js_namespaceObject.useAPIClient)();
|
|
39
39
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
40
40
|
apiClient.notification = notification;
|
|
41
41
|
app.notification = notification;
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
useCurrentUserContext: ()=>useCurrentUserContext,
|
|
28
|
+
CurrentUserContext: ()=>CurrentUserContext
|
|
29
|
+
});
|
|
30
|
+
const external_react_namespaceObject = require("react");
|
|
31
|
+
const CurrentUserContext = (0, external_react_namespaceObject.createContext)(null);
|
|
32
|
+
CurrentUserContext.displayName = 'CurrentUserContext';
|
|
33
|
+
const useCurrentUserContext = ()=>(0, external_react_namespaceObject.useContext)(CurrentUserContext);
|
|
34
|
+
exports.CurrentUserContext = __webpack_exports__.CurrentUserContext;
|
|
35
|
+
exports.useCurrentUserContext = __webpack_exports__.useCurrentUserContext;
|
|
36
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
37
|
+
"CurrentUserContext",
|
|
38
|
+
"useCurrentUserContext"
|
|
39
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
40
|
+
Object.defineProperty(exports, '__esModule', {
|
|
41
|
+
value: true
|
|
42
|
+
});
|
|
@@ -24,11 +24,9 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
useCurrentRoles: ()=>useCurrentRoles,
|
|
28
27
|
NavigateIfNotSignIn: ()=>NavigateIfNotSignIn,
|
|
29
28
|
CurrentUserProvider: ()=>CurrentUserProvider,
|
|
30
|
-
|
|
31
|
-
CurrentUserContext: ()=>CurrentUserContext
|
|
29
|
+
useCurrentRoles: ()=>useCurrentRoles
|
|
32
30
|
});
|
|
33
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
34
32
|
const external_react_namespaceObject = require("react");
|
|
@@ -36,13 +34,11 @@ const external_react_router_dom_namespaceObject = require("react-router-dom");
|
|
|
36
34
|
const index_js_namespaceObject = require("../api-client/index.js");
|
|
37
35
|
const acl_index_js_namespaceObject = require("../built-in/acl/index.js");
|
|
38
36
|
const external_schema_component_index_js_namespaceObject = require("../schema-component/index.js");
|
|
39
|
-
const
|
|
40
|
-
CurrentUserContext.displayName = 'CurrentUserContext';
|
|
41
|
-
const useCurrentUserContext = ()=>(0, external_react_namespaceObject.useContext)(CurrentUserContext);
|
|
37
|
+
const external_CurrentUserContext_js_namespaceObject = require("./CurrentUserContext.js");
|
|
42
38
|
const useCurrentRoles = ()=>{
|
|
43
39
|
var _data_data;
|
|
44
40
|
const { allowAnonymous } = (0, acl_index_js_namespaceObject.useACLRoleContext)();
|
|
45
|
-
const { data } = useCurrentUserContext();
|
|
41
|
+
const { data } = (0, external_CurrentUserContext_js_namespaceObject.useCurrentUserContext)();
|
|
46
42
|
const compile = (0, external_schema_component_index_js_namespaceObject.useCompile)();
|
|
47
43
|
const options = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
48
44
|
var _data_data;
|
|
@@ -72,7 +68,7 @@ const CurrentUserProvider = (props)=>{
|
|
|
72
68
|
skipAuth: true
|
|
73
69
|
}).then((res)=>null == res ? void 0 : res.data));
|
|
74
70
|
if (result.loading) return;
|
|
75
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(CurrentUserContext.Provider, {
|
|
71
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_CurrentUserContext_js_namespaceObject.CurrentUserContext.Provider, {
|
|
76
72
|
value: result,
|
|
77
73
|
children: props.children
|
|
78
74
|
});
|
|
@@ -80,7 +76,7 @@ const CurrentUserProvider = (props)=>{
|
|
|
80
76
|
const NavigateIfNotSignIn = (param)=>{
|
|
81
77
|
let { children } = param;
|
|
82
78
|
var _result_data_data, _result_data;
|
|
83
|
-
const result = useCurrentUserContext();
|
|
79
|
+
const result = (0, external_CurrentUserContext_js_namespaceObject.useCurrentUserContext)();
|
|
84
80
|
const { pathname, search } = (0, external_react_router_dom_namespaceObject.useLocation)();
|
|
85
81
|
const redirect = "?redirect=".concat(pathname).concat(search);
|
|
86
82
|
if (!(null == result ? void 0 : null == (_result_data = result.data) ? void 0 : null == (_result_data_data = _result_data.data) ? void 0 : _result_data_data.id)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_react_router_dom_namespaceObject.Navigate, {
|
|
@@ -91,17 +87,13 @@ const NavigateIfNotSignIn = (param)=>{
|
|
|
91
87
|
children: children
|
|
92
88
|
});
|
|
93
89
|
};
|
|
94
|
-
exports.CurrentUserContext = __webpack_exports__.CurrentUserContext;
|
|
95
90
|
exports.CurrentUserProvider = __webpack_exports__.CurrentUserProvider;
|
|
96
91
|
exports.NavigateIfNotSignIn = __webpack_exports__.NavigateIfNotSignIn;
|
|
97
92
|
exports.useCurrentRoles = __webpack_exports__.useCurrentRoles;
|
|
98
|
-
exports.useCurrentUserContext = __webpack_exports__.useCurrentUserContext;
|
|
99
93
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
100
|
-
"CurrentUserContext",
|
|
101
94
|
"CurrentUserProvider",
|
|
102
95
|
"NavigateIfNotSignIn",
|
|
103
|
-
"useCurrentRoles"
|
|
104
|
-
"useCurrentUserContext"
|
|
96
|
+
"useCurrentRoles"
|
|
105
97
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
106
98
|
Object.defineProperty(exports, '__esModule', {
|
|
107
99
|
value: true
|
package/lib/user/index.js
CHANGED
|
@@ -3,6 +3,9 @@ var __webpack_modules__ = {
|
|
|
3
3
|
"./CurrentUser": function(module) {
|
|
4
4
|
module.exports = require("./CurrentUser.js");
|
|
5
5
|
},
|
|
6
|
+
"./CurrentUserContext": function(module) {
|
|
7
|
+
module.exports = require("./CurrentUserContext.js");
|
|
8
|
+
},
|
|
6
9
|
"./CurrentUserProvider": function(module) {
|
|
7
10
|
module.exports = require("./CurrentUserProvider.js");
|
|
8
11
|
},
|
|
@@ -57,37 +60,46 @@ var __webpack_exports__ = {};
|
|
|
57
60
|
(()=>{
|
|
58
61
|
__webpack_require__.r(__webpack_exports__);
|
|
59
62
|
__webpack_require__.d(__webpack_exports__, {
|
|
60
|
-
VerificationCode: ()=>
|
|
63
|
+
VerificationCode: ()=>_VerificationCode__WEBPACK_IMPORTED_MODULE_4___default.a
|
|
61
64
|
});
|
|
62
|
-
var
|
|
65
|
+
var _CurrentUserContext__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./CurrentUserContext");
|
|
66
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
67
|
+
for(var __WEBPACK_IMPORT_KEY__ in _CurrentUserContext__WEBPACK_IMPORTED_MODULE_0__)if ([
|
|
68
|
+
"VerificationCode",
|
|
69
|
+
"default"
|
|
70
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
71
|
+
return _CurrentUserContext__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
72
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
73
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
74
|
+
var _CurrentUser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./CurrentUser");
|
|
63
75
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
64
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
76
|
+
for(var __WEBPACK_IMPORT_KEY__ in _CurrentUser__WEBPACK_IMPORTED_MODULE_1__)if ([
|
|
65
77
|
"VerificationCode",
|
|
66
78
|
"default"
|
|
67
79
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
68
|
-
return
|
|
80
|
+
return _CurrentUser__WEBPACK_IMPORTED_MODULE_1__[key];
|
|
69
81
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
70
82
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
71
|
-
var
|
|
83
|
+
var _CurrentUserProvider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./CurrentUserProvider");
|
|
72
84
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
73
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
85
|
+
for(var __WEBPACK_IMPORT_KEY__ in _CurrentUserProvider__WEBPACK_IMPORTED_MODULE_2__)if ([
|
|
74
86
|
"VerificationCode",
|
|
75
87
|
"default"
|
|
76
88
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
77
|
-
return
|
|
89
|
+
return _CurrentUserProvider__WEBPACK_IMPORTED_MODULE_2__[key];
|
|
78
90
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
79
91
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
80
|
-
var
|
|
92
|
+
var _CurrentUserSettingsMenuProvider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./CurrentUserSettingsMenuProvider");
|
|
81
93
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
82
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
94
|
+
for(var __WEBPACK_IMPORT_KEY__ in _CurrentUserSettingsMenuProvider__WEBPACK_IMPORTED_MODULE_3__)if ([
|
|
83
95
|
"VerificationCode",
|
|
84
96
|
"default"
|
|
85
97
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
86
|
-
return
|
|
98
|
+
return _CurrentUserSettingsMenuProvider__WEBPACK_IMPORTED_MODULE_3__[key];
|
|
87
99
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
88
100
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
89
|
-
var
|
|
90
|
-
var
|
|
101
|
+
var _VerificationCode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("./VerificationCode");
|
|
102
|
+
var _VerificationCode__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/ __webpack_require__.n(_VerificationCode__WEBPACK_IMPORTED_MODULE_4__);
|
|
91
103
|
})();
|
|
92
104
|
exports.VerificationCode = __webpack_exports__.VerificationCode;
|
|
93
105
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
@@ -44,7 +44,7 @@ const external_lodash_namespaceObject = require("lodash");
|
|
|
44
44
|
var external_lodash_default = /*#__PURE__*/ __webpack_require__.n(external_lodash_namespaceObject);
|
|
45
45
|
const index_js_namespaceObject = require("../api-client/index.js");
|
|
46
46
|
const external_collection_manager_index_js_namespaceObject = require("../collection-manager/index.js");
|
|
47
|
-
const
|
|
47
|
+
const useCompile_js_namespaceObject = require("../schema-component/hooks/useCompile.js");
|
|
48
48
|
const useBuiltinVariables_js_namespaceObject = require("./hooks/useBuiltinVariables.js");
|
|
49
49
|
var useBuiltinVariables_js_default = /*#__PURE__*/ __webpack_require__.n(useBuiltinVariables_js_namespaceObject);
|
|
50
50
|
const filterEmptyValues_js_namespaceObject = require("./utils/filterEmptyValues.js");
|
|
@@ -69,7 +69,7 @@ const VariablesProvider_VariablesProvider = (param)=>{
|
|
|
69
69
|
const ctxRef = (0, external_react_namespaceObject.useRef)({});
|
|
70
70
|
const api = (0, index_js_namespaceObject.useAPIClient)();
|
|
71
71
|
const { getCollectionJoinField } = (0, external_collection_manager_index_js_namespaceObject.useCollectionManager_deprecated)();
|
|
72
|
-
const compile = (0,
|
|
72
|
+
const compile = (0, useCompile_js_namespaceObject.useCompile)();
|
|
73
73
|
const { builtinVariables } = useBuiltinVariables_js_default()();
|
|
74
74
|
const setCtx = (0, external_react_namespaceObject.useCallback)((ctx)=>{
|
|
75
75
|
if (external_lodash_default().isFunction(ctx)) ctxRef.current = ctx(ctxRef.current);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/client",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.22",
|
|
4
4
|
"homepage": "https://github.com/tegojs/tego-standard#readme",
|
|
5
5
|
"bugs": {
|
|
6
6
|
"url": "https://github.com/tegojs/tego-standard/issues"
|
|
@@ -30,8 +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.
|
|
34
|
-
"@
|
|
33
|
+
"@tachybase/schema": "1.6.13",
|
|
34
|
+
"@tachybase/utils": "1.6.13",
|
|
35
|
+
"@tego/client": "1.6.13",
|
|
35
36
|
"ahooks": "^3.9.0",
|
|
36
37
|
"antd": "5.22.5",
|
|
37
38
|
"antd-style": "3.7.1",
|
|
@@ -45,7 +46,7 @@
|
|
|
45
46
|
"deepmerge": "^4.3.1",
|
|
46
47
|
"file-saver": "^2.0.5",
|
|
47
48
|
"flat": "^5.0.2",
|
|
48
|
-
"i18next": "
|
|
49
|
+
"i18next": "25.10.10",
|
|
49
50
|
"lodash": "4.17.21",
|
|
50
51
|
"lru-cache": "11.1.0",
|
|
51
52
|
"markdown-it": "13.0.2",
|