@tachybase/client 1.3.22 → 1.3.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/application/schema-settings/SchemaSettings.d.ts +1 -1
- package/es/application/schema-settings/SchemaSettings.mjs +5 -3
- package/es/application/schema-settings/SchemaSettingsManager.d.ts +6 -0
- package/es/application/schema-settings/SchemaSettingsManager.mjs +15 -0
- package/es/application/utils/globalDeps.mjs +2 -1
- package/es/built-in/attachment-preview/previewers/file-pdf.mjs +1 -1
- package/es/built-in/locale/LocalePlugin.mjs +0 -2
- package/es/built-in/pm/PluginDetail.mjs +0 -2
- package/es/collection-manager/Configuration/components/index.mjs +1 -1
- package/es/collection-manager/Configuration/index.d.ts +1 -0
- package/es/collection-manager/Configuration/index.mjs +2 -0
- package/es/collection-manager/hooks/index.d.ts +1 -0
- package/es/collection-manager/hooks/index.mjs +2 -0
- package/es/collection-manager/index.d.ts +1 -1
- package/es/collection-manager/index.mjs +2 -2
- package/es/collection-manager/interfaces/checkbox.d.ts +1 -0
- package/es/collection-manager/interfaces/checkbox.mjs +1 -1
- package/es/collection-manager/interfaces/checkboxGroup.d.ts +1 -0
- package/es/collection-manager/interfaces/checkboxGroup.mjs +1 -1
- package/es/collection-manager/interfaces/chinaRegion.d.ts +1 -0
- package/es/collection-manager/interfaces/chinaRegion.mjs +1 -1
- package/es/collection-manager/interfaces/collection.d.ts +1 -0
- package/es/collection-manager/interfaces/collection.mjs +2 -2
- package/es/collection-manager/interfaces/color.d.ts +1 -0
- package/es/collection-manager/interfaces/color.mjs +1 -1
- package/es/collection-manager/interfaces/createdAt.d.ts +1 -0
- package/es/collection-manager/interfaces/createdAt.mjs +1 -1
- package/es/collection-manager/interfaces/createdBy.d.ts +1 -0
- package/es/collection-manager/interfaces/createdBy.mjs +1 -1
- package/es/collection-manager/interfaces/datetime.d.ts +1 -0
- package/es/collection-manager/interfaces/datetime.mjs +1 -1
- package/es/collection-manager/interfaces/email.d.ts +1 -0
- package/es/collection-manager/interfaces/email.mjs +1 -1
- package/es/collection-manager/interfaces/icon.d.ts +1 -0
- package/es/collection-manager/interfaces/icon.mjs +1 -1
- package/es/collection-manager/interfaces/input.d.ts +1 -0
- package/es/collection-manager/interfaces/input.mjs +1 -1
- package/es/collection-manager/interfaces/integer.d.ts +1 -0
- package/es/collection-manager/interfaces/integer.mjs +1 -1
- package/es/collection-manager/interfaces/json.d.ts +1 -0
- package/es/collection-manager/interfaces/json.mjs +1 -1
- package/es/collection-manager/interfaces/m2m.d.ts +1 -0
- package/es/collection-manager/interfaces/m2m.mjs +1 -1
- package/es/collection-manager/interfaces/m2o.d.ts +1 -0
- package/es/collection-manager/interfaces/m2o.mjs +1 -1
- package/es/collection-manager/interfaces/markdown.d.ts +1 -0
- package/es/collection-manager/interfaces/markdown.mjs +1 -1
- package/es/collection-manager/interfaces/multipleSelect.d.ts +1 -0
- package/es/collection-manager/interfaces/multipleSelect.mjs +2 -2
- package/es/collection-manager/interfaces/nanoid.d.ts +1 -0
- package/es/collection-manager/interfaces/nanoid.mjs +1 -1
- package/es/collection-manager/interfaces/number.d.ts +1 -0
- package/es/collection-manager/interfaces/number.mjs +1 -1
- package/es/collection-manager/interfaces/o2m.d.ts +1 -0
- package/es/collection-manager/interfaces/o2m.mjs +1 -1
- package/es/collection-manager/interfaces/o2o.d.ts +1 -0
- package/es/collection-manager/interfaces/o2o.mjs +1 -1
- package/es/collection-manager/interfaces/password.d.ts +1 -0
- package/es/collection-manager/interfaces/password.mjs +1 -1
- package/es/collection-manager/interfaces/percent.d.ts +1 -0
- package/es/collection-manager/interfaces/percent.mjs +2 -2
- package/es/collection-manager/interfaces/phone.d.ts +1 -0
- package/es/collection-manager/interfaces/phone.mjs +1 -1
- package/es/collection-manager/interfaces/radioGroup.d.ts +1 -0
- package/es/collection-manager/interfaces/radioGroup.mjs +1 -1
- package/es/collection-manager/interfaces/richText.d.ts +1 -0
- package/es/collection-manager/interfaces/richText.mjs +1 -1
- package/es/collection-manager/interfaces/select.d.ts +1 -0
- package/es/collection-manager/interfaces/select.mjs +2 -2
- package/es/collection-manager/interfaces/sort.d.ts +1 -0
- package/es/collection-manager/interfaces/sort.mjs +1 -1
- package/es/collection-manager/interfaces/subTable.d.ts +1 -0
- package/es/collection-manager/interfaces/subTable.mjs +1 -1
- package/es/collection-manager/interfaces/tableoid.d.ts +1 -0
- package/es/collection-manager/interfaces/tableoid.mjs +1 -1
- package/es/collection-manager/interfaces/textarea.d.ts +1 -0
- package/es/collection-manager/interfaces/textarea.mjs +1 -1
- package/es/collection-manager/interfaces/time.d.ts +1 -0
- package/es/collection-manager/interfaces/time.mjs +1 -1
- package/es/collection-manager/interfaces/unixTimestamp.d.ts +1 -0
- package/es/collection-manager/interfaces/unixTimestamp.mjs +1 -1
- package/es/collection-manager/interfaces/updatedAt.d.ts +1 -0
- package/es/collection-manager/interfaces/updatedAt.mjs +1 -1
- package/es/collection-manager/interfaces/updatedBy.d.ts +1 -0
- package/es/collection-manager/interfaces/updatedBy.mjs +1 -1
- package/es/collection-manager/interfaces/url.d.ts +1 -0
- package/es/collection-manager/interfaces/url.mjs +1 -1
- package/es/collection-manager/interfaces/uuid.d.ts +1 -0
- package/es/collection-manager/interfaces/uuid.mjs +1 -1
- package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +1 -0
- package/es/filter-provider/utils.mjs +2 -1
- package/es/icon/preloaded.mjs +0 -1
- package/es/index.d.ts +3 -0
- package/es/index.mjs +4 -1
- package/es/preload.d.ts +16 -0
- package/es/preload.mjs +33 -0
- package/es/schema-component/antd/association-field/index.d.ts +1 -0
- package/es/schema-component/antd/association-field/index.mjs +2 -1
- package/es/schema-component/antd/color-picker/util.d.ts +1 -1
- package/es/schema-component/antd/color-picker/util.mjs +2 -1
- package/es/schema-component/antd/date-picker/util.d.ts +1 -1
- package/es/schema-component/antd/date-picker/util.mjs +2 -1
- package/es/schema-component/antd/filter/index.d.ts +1 -0
- package/es/schema-component/antd/filter/index.mjs +1 -0
- package/es/schema-component/antd/form-v2/index.d.ts +1 -0
- package/es/schema-component/antd/form-v2/index.mjs +1 -0
- 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/common/sortable-item/DragHandlePageTab.mjs +6 -7
- package/es/schema-settings/LinkageRules/index.d.ts +2 -0
- package/es/schema-settings/LinkageRules/index.mjs +2 -0
- package/es/schema-settings/VariableInput/index.d.ts +1 -0
- package/es/schema-settings/VariableInput/index.mjs +1 -0
- package/es/schema-settings/index.d.ts +3 -0
- package/es/schema-settings/index.mjs +3 -0
- package/es/variables/hooks/useBuiltinVariables.mjs +1 -1
- package/lib/application/schema-settings/SchemaSettings.js +5 -3
- package/lib/application/schema-settings/SchemaSettingsManager.js +15 -0
- package/lib/application/utils/globalDeps.js +3 -1
- package/lib/block-provider/hooks/index.js +2 -2
- package/lib/built-in/attachment-preview/previewers/file-pdf.js +1 -1
- package/lib/built-in/locale/LocalePlugin.js +72 -92
- package/lib/built-in/pm/PluginDetail.js +0 -3
- package/lib/collection-manager/Configuration/components/index.js +1 -1
- package/lib/collection-manager/Configuration/index.js +79 -19
- package/lib/collection-manager/hooks/index.js +28 -5
- package/lib/collection-manager/index.js +37 -17
- package/lib/collection-manager/interfaces/checkbox.js +1 -1
- package/lib/collection-manager/interfaces/checkboxGroup.js +1 -1
- package/lib/collection-manager/interfaces/chinaRegion.js +1 -1
- package/lib/collection-manager/interfaces/collection.js +2 -2
- package/lib/collection-manager/interfaces/color.js +1 -1
- package/lib/collection-manager/interfaces/createdAt.js +1 -1
- package/lib/collection-manager/interfaces/createdBy.js +1 -1
- package/lib/collection-manager/interfaces/datetime.js +1 -1
- package/lib/collection-manager/interfaces/email.js +1 -1
- package/lib/collection-manager/interfaces/icon.js +1 -1
- package/lib/collection-manager/interfaces/input.js +1 -1
- package/lib/collection-manager/interfaces/integer.js +1 -1
- package/lib/collection-manager/interfaces/json.js +1 -1
- package/lib/collection-manager/interfaces/m2m.js +1 -1
- package/lib/collection-manager/interfaces/m2o.js +1 -1
- package/lib/collection-manager/interfaces/markdown.js +1 -1
- package/lib/collection-manager/interfaces/multipleSelect.js +2 -2
- package/lib/collection-manager/interfaces/nanoid.js +1 -1
- package/lib/collection-manager/interfaces/number.js +1 -1
- package/lib/collection-manager/interfaces/o2m.js +1 -1
- package/lib/collection-manager/interfaces/o2o.js +1 -1
- package/lib/collection-manager/interfaces/password.js +1 -1
- package/lib/collection-manager/interfaces/percent.js +2 -2
- package/lib/collection-manager/interfaces/phone.js +1 -1
- package/lib/collection-manager/interfaces/radioGroup.js +1 -1
- package/lib/collection-manager/interfaces/richText.js +1 -1
- package/lib/collection-manager/interfaces/select.js +2 -2
- package/lib/collection-manager/interfaces/sort.js +1 -1
- package/lib/collection-manager/interfaces/subTable.js +1 -1
- package/lib/collection-manager/interfaces/tableoid.js +1 -1
- package/lib/collection-manager/interfaces/textarea.js +1 -1
- package/lib/collection-manager/interfaces/time.js +1 -1
- package/lib/collection-manager/interfaces/unixTimestamp.js +1 -1
- package/lib/collection-manager/interfaces/updatedAt.js +1 -1
- package/lib/collection-manager/interfaces/updatedBy.js +1 -1
- package/lib/collection-manager/interfaces/url.js +1 -1
- package/lib/collection-manager/interfaces/uuid.js +1 -1
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +1 -0
- package/lib/filter-provider/utils.js +3 -1
- package/lib/icon/preloaded.js +0 -1
- package/lib/index.js +234 -125
- package/lib/locale/zh-CN.js +3 -0
- package/lib/preload.js +77 -0
- package/lib/schema-component/antd/association-field/index.js +10 -2
- package/lib/schema-component/antd/color-picker/util.js +17 -6
- package/lib/schema-component/antd/date-picker/util.js +29 -18
- package/lib/schema-component/antd/filter/index.js +9 -0
- package/lib/schema-component/antd/form-v2/index.js +14 -0
- package/lib/schema-component/antd/table-v2/index.js +9 -0
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +6 -7
- package/lib/schema-settings/LinkageRules/index.js +271 -180
- package/lib/schema-settings/VariableInput/index.js +9 -0
- package/lib/schema-settings/index.js +75 -48
- package/lib/variables/hooks/useBuiltinVariables.js +13 -3
- package/package.json +6 -6
|
@@ -1,5 +1,76 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"../../application/hoc/withDynamicSchemaProps": function(module) {
|
|
4
|
+
module.exports = require("../../application/hoc/withDynamicSchemaProps.js");
|
|
5
|
+
},
|
|
6
|
+
"../../block-provider": function(module) {
|
|
7
|
+
module.exports = require("../../block-provider/index.js");
|
|
8
|
+
},
|
|
9
|
+
"../../collection-manager": function(module) {
|
|
10
|
+
module.exports = require("../../collection-manager/index.js");
|
|
11
|
+
},
|
|
12
|
+
"../../data-source/collection-record/CollectionRecordProvider": function(module) {
|
|
13
|
+
module.exports = require("../../data-source/collection-record/CollectionRecordProvider.js");
|
|
14
|
+
},
|
|
15
|
+
"../../record-provider": function(module) {
|
|
16
|
+
module.exports = require("../../record-provider/index.js");
|
|
17
|
+
},
|
|
18
|
+
"../../schema-component/antd/filter/context": function(module) {
|
|
19
|
+
module.exports = require("../../schema-component/antd/filter/context.js");
|
|
20
|
+
},
|
|
21
|
+
"../../schema-component": function(module) {
|
|
22
|
+
module.exports = require("../../schema-component/index.js");
|
|
23
|
+
},
|
|
24
|
+
"../VariableInput/VariableInput": function(module) {
|
|
25
|
+
module.exports = require("../VariableInput/VariableInput.js");
|
|
26
|
+
},
|
|
27
|
+
"./LinkageRuleActionGroup": function(module) {
|
|
28
|
+
module.exports = require("./LinkageRuleActionGroup.js");
|
|
29
|
+
},
|
|
30
|
+
"./action-hooks": function(module) {
|
|
31
|
+
module.exports = require("./action-hooks.js");
|
|
32
|
+
},
|
|
33
|
+
"./components/EnableLinkage": function(module) {
|
|
34
|
+
module.exports = require("./components/EnableLinkage.js");
|
|
35
|
+
},
|
|
36
|
+
"./components/LinkageHeader": function(module) {
|
|
37
|
+
module.exports = require("./components/LinkageHeader.js");
|
|
38
|
+
},
|
|
39
|
+
"./type": function(module) {
|
|
40
|
+
module.exports = require("./type.js");
|
|
41
|
+
},
|
|
42
|
+
"@tachybase/schema": function(module) {
|
|
43
|
+
module.exports = require("@tachybase/schema");
|
|
44
|
+
},
|
|
45
|
+
"antd-style": function(module) {
|
|
46
|
+
module.exports = require("antd-style");
|
|
47
|
+
},
|
|
48
|
+
react: function(module) {
|
|
49
|
+
module.exports = require("react");
|
|
50
|
+
},
|
|
51
|
+
"react/jsx-runtime": function(module) {
|
|
52
|
+
module.exports = require("react/jsx-runtime");
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
var __webpack_module_cache__ = {};
|
|
56
|
+
function __webpack_require__(moduleId) {
|
|
57
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
58
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
59
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
60
|
+
exports: {}
|
|
61
|
+
};
|
|
62
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
63
|
+
return module.exports;
|
|
64
|
+
}
|
|
65
|
+
(()=>{
|
|
66
|
+
__webpack_require__.n = (module)=>{
|
|
67
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
68
|
+
__webpack_require__.d(getter, {
|
|
69
|
+
a: getter
|
|
70
|
+
});
|
|
71
|
+
return getter;
|
|
72
|
+
};
|
|
73
|
+
})();
|
|
3
74
|
(()=>{
|
|
4
75
|
__webpack_require__.d = (exports1, definition)=>{
|
|
5
76
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
@@ -22,203 +93,223 @@ var __webpack_require__ = {};
|
|
|
22
93
|
};
|
|
23
94
|
})();
|
|
24
95
|
var __webpack_exports__ = {};
|
|
25
|
-
|
|
26
|
-
__webpack_require__.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
96
|
+
(()=>{
|
|
97
|
+
__webpack_require__.r(__webpack_exports__);
|
|
98
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
99
|
+
FormLinkageRules: ()=>FormLinkageRules
|
|
100
|
+
});
|
|
101
|
+
var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("react/jsx-runtime");
|
|
102
|
+
var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("react");
|
|
103
|
+
var _tachybase_schema__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("@tachybase/schema");
|
|
104
|
+
var antd_style__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("antd-style");
|
|
105
|
+
var _application_hoc_withDynamicSchemaProps__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../application/hoc/withDynamicSchemaProps");
|
|
106
|
+
var _block_provider__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../block-provider");
|
|
107
|
+
var _collection_manager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../collection-manager");
|
|
108
|
+
var _data_source_collection_record_CollectionRecordProvider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../data-source/collection-record/CollectionRecordProvider");
|
|
109
|
+
var _record_provider__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../record-provider");
|
|
110
|
+
var _schema_component__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("../../schema-component");
|
|
111
|
+
var _schema_component_antd_filter_context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("../../schema-component/antd/filter/context");
|
|
112
|
+
var _VariableInput_VariableInput__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__("../VariableInput/VariableInput");
|
|
113
|
+
var _components_EnableLinkage__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__("./components/EnableLinkage");
|
|
114
|
+
var _components_LinkageHeader__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__("./components/LinkageHeader");
|
|
115
|
+
var _LinkageRuleActionGroup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__("./LinkageRuleActionGroup");
|
|
116
|
+
var _type__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__("./type");
|
|
117
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
118
|
+
for(var __WEBPACK_IMPORT_KEY__ in _type__WEBPACK_IMPORTED_MODULE_15__)if ([
|
|
119
|
+
"FormLinkageRules",
|
|
120
|
+
"default"
|
|
121
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
122
|
+
return _type__WEBPACK_IMPORTED_MODULE_15__[key];
|
|
123
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
124
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
125
|
+
var _action_hooks__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__("./action-hooks");
|
|
126
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
127
|
+
for(var __WEBPACK_IMPORT_KEY__ in _action_hooks__WEBPACK_IMPORTED_MODULE_16__)if ([
|
|
128
|
+
"FormLinkageRules",
|
|
129
|
+
"default"
|
|
130
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
131
|
+
return _action_hooks__WEBPACK_IMPORTED_MODULE_16__[key];
|
|
132
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
133
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
134
|
+
function _tagged_template_literal(strings, raw) {
|
|
135
|
+
if (!raw) raw = strings.slice(0);
|
|
136
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
137
|
+
raw: {
|
|
138
|
+
value: Object.freeze(raw)
|
|
139
|
+
}
|
|
140
|
+
}));
|
|
141
|
+
}
|
|
142
|
+
function _templateObject() {
|
|
143
|
+
const data = _tagged_template_literal([
|
|
144
|
+
"\n position: relative;\n width: 100%;\n margin-left: 10px;\n "
|
|
145
|
+
]);
|
|
146
|
+
_templateObject = function() {
|
|
147
|
+
return data;
|
|
148
|
+
};
|
|
57
149
|
return data;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
});
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
'x-component': 'ArrayCollapse',
|
|
83
|
-
'x-decorator': 'FormItem',
|
|
84
|
-
'x-component-props': {
|
|
85
|
-
accordion: true
|
|
86
|
-
},
|
|
87
|
-
items: {
|
|
88
|
-
type: 'object',
|
|
89
|
-
'x-component': 'ArrayCollapse.CollapsePanel',
|
|
150
|
+
}
|
|
151
|
+
const useStyles = (0, antd_style__WEBPACK_IMPORTED_MODULE_3__.createStyles)((param)=>{
|
|
152
|
+
let { css } = param;
|
|
153
|
+
return {
|
|
154
|
+
filter: css(_templateObject())
|
|
155
|
+
};
|
|
156
|
+
});
|
|
157
|
+
const FormLinkageRules = (0, _application_hoc_withDynamicSchemaProps__WEBPACK_IMPORTED_MODULE_4__.withDynamicSchemaProps)((0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_2__.observer)((props)=>{
|
|
158
|
+
const { styles } = useStyles();
|
|
159
|
+
const fieldSchema = (0, _tachybase_schema__WEBPACK_IMPORTED_MODULE_2__.useFieldSchema)();
|
|
160
|
+
const { options, defaultValues, collectionName, form, formBlockType, variables, localVariables, record, dynamicComponent } = (0, _schema_component__WEBPACK_IMPORTED_MODULE_9__.useProps)(props);
|
|
161
|
+
const { getAllCollectionsInheritChain } = (0, _collection_manager__WEBPACK_IMPORTED_MODULE_6__.useCollectionManager_deprecated)();
|
|
162
|
+
const parentRecordData = (0, _data_source_collection_record_CollectionRecordProvider__WEBPACK_IMPORTED_MODULE_7__.useCollectionParentRecordData)();
|
|
163
|
+
const components = (0, react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>({
|
|
164
|
+
ArrayCollapse: _components_LinkageHeader__WEBPACK_IMPORTED_MODULE_13__.ArrayCollapse
|
|
165
|
+
}), []);
|
|
166
|
+
const schema = (0, react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>({
|
|
167
|
+
type: 'object',
|
|
168
|
+
properties: {
|
|
169
|
+
rules: {
|
|
170
|
+
type: 'array',
|
|
171
|
+
default: defaultValues,
|
|
172
|
+
'x-component': 'ArrayCollapse',
|
|
173
|
+
'x-decorator': 'FormItem',
|
|
90
174
|
'x-component-props': {
|
|
91
|
-
|
|
175
|
+
accordion: true
|
|
92
176
|
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
177
|
+
items: {
|
|
178
|
+
type: 'object',
|
|
179
|
+
'x-component': 'ArrayCollapse.CollapsePanel',
|
|
180
|
+
'x-component-props': {
|
|
181
|
+
extra: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_EnableLinkage__WEBPACK_IMPORTED_MODULE_12__.EnableLinkage, {})
|
|
182
|
+
},
|
|
183
|
+
properties: {
|
|
184
|
+
layout: {
|
|
185
|
+
type: 'void',
|
|
186
|
+
'x-component': 'FormLayout',
|
|
187
|
+
'x-component-props': {
|
|
188
|
+
labelStyle: {
|
|
189
|
+
marginTop: '6px'
|
|
190
|
+
},
|
|
191
|
+
labelCol: 8,
|
|
192
|
+
wrapperCol: 16
|
|
108
193
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
194
|
+
properties: {
|
|
195
|
+
conditions: {
|
|
196
|
+
'x-component': 'h4',
|
|
197
|
+
'x-content': '{{ t("Condition") }}'
|
|
198
|
+
},
|
|
199
|
+
condition: {
|
|
200
|
+
'x-component': 'Filter',
|
|
201
|
+
'x-use-component-props': ()=>({
|
|
202
|
+
options,
|
|
203
|
+
className: styles.filter
|
|
204
|
+
}),
|
|
205
|
+
'x-component-props': {
|
|
206
|
+
collectionName,
|
|
207
|
+
dynamicComponent: (props)=>{
|
|
208
|
+
const { collectionField } = props;
|
|
209
|
+
return /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_VariableInput_VariableInput__WEBPACK_IMPORTED_MODULE_11__.VariableInput, {
|
|
210
|
+
...props,
|
|
211
|
+
form: form,
|
|
212
|
+
record: record,
|
|
213
|
+
shouldChange: (0, _VariableInput_VariableInput__WEBPACK_IMPORTED_MODULE_11__.getShouldChange)({
|
|
214
|
+
collectionField,
|
|
215
|
+
variables,
|
|
216
|
+
localVariables,
|
|
217
|
+
getAllCollectionsInheritChain
|
|
218
|
+
})
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
actions: {
|
|
224
|
+
'x-component': 'h4',
|
|
225
|
+
'x-content': '{{ t("Properties") }}'
|
|
226
|
+
},
|
|
227
|
+
action: {
|
|
228
|
+
type: 'void',
|
|
229
|
+
'x-component': _LinkageRuleActionGroup__WEBPACK_IMPORTED_MODULE_14__.LinkageRuleActionGroup,
|
|
230
|
+
'x-component-props': {
|
|
231
|
+
...props
|
|
130
232
|
}
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
actions: {
|
|
134
|
-
'x-component': 'h4',
|
|
135
|
-
'x-content': '{{ t("Properties") }}'
|
|
136
|
-
},
|
|
137
|
-
action: {
|
|
138
|
-
type: 'void',
|
|
139
|
-
'x-component': external_LinkageRuleActionGroup_js_namespaceObject.LinkageRuleActionGroup,
|
|
140
|
-
'x-component-props': {
|
|
141
|
-
...props
|
|
142
233
|
}
|
|
143
234
|
}
|
|
235
|
+
},
|
|
236
|
+
remove: {
|
|
237
|
+
type: 'void',
|
|
238
|
+
'x-component': 'ArrayCollapse.Remove'
|
|
239
|
+
},
|
|
240
|
+
moveUp: {
|
|
241
|
+
type: 'void',
|
|
242
|
+
'x-component': 'ArrayCollapse.MoveUp'
|
|
243
|
+
},
|
|
244
|
+
moveDown: {
|
|
245
|
+
type: 'void',
|
|
246
|
+
'x-component': 'ArrayCollapse.MoveDown'
|
|
247
|
+
},
|
|
248
|
+
copy: {
|
|
249
|
+
type: 'void',
|
|
250
|
+
'x-component': 'ArrayCollapse.Copy'
|
|
144
251
|
}
|
|
145
|
-
},
|
|
146
|
-
remove: {
|
|
147
|
-
type: 'void',
|
|
148
|
-
'x-component': 'ArrayCollapse.Remove'
|
|
149
|
-
},
|
|
150
|
-
moveUp: {
|
|
151
|
-
type: 'void',
|
|
152
|
-
'x-component': 'ArrayCollapse.MoveUp'
|
|
153
|
-
},
|
|
154
|
-
moveDown: {
|
|
155
|
-
type: 'void',
|
|
156
|
-
'x-component': 'ArrayCollapse.MoveDown'
|
|
157
|
-
},
|
|
158
|
-
copy: {
|
|
159
|
-
type: 'void',
|
|
160
|
-
'x-component': 'ArrayCollapse.Copy'
|
|
161
252
|
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
253
|
+
},
|
|
254
|
+
properties: {
|
|
255
|
+
add: {
|
|
256
|
+
type: 'void',
|
|
257
|
+
title: '{{ t("Add linkage rule") }}',
|
|
258
|
+
'x-component': 'ArrayCollapse.Addition',
|
|
259
|
+
'x-reactions': {
|
|
260
|
+
dependencies: [
|
|
261
|
+
'rules'
|
|
262
|
+
],
|
|
263
|
+
fulfill: {
|
|
264
|
+
state: {}
|
|
265
|
+
}
|
|
175
266
|
}
|
|
176
267
|
}
|
|
177
268
|
}
|
|
178
269
|
}
|
|
179
270
|
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
defaultValues,
|
|
184
|
-
form,
|
|
185
|
-
localVariables,
|
|
186
|
-
options,
|
|
187
|
-
props,
|
|
188
|
-
record,
|
|
189
|
-
variables
|
|
190
|
-
]);
|
|
191
|
-
const value = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
192
|
-
field: options,
|
|
193
|
-
fieldSchema,
|
|
194
|
-
dynamicComponent,
|
|
195
|
-
options: options || []
|
|
196
|
-
}), [
|
|
197
|
-
dynamicComponent,
|
|
198
|
-
fieldSchema,
|
|
199
|
-
options
|
|
200
|
-
]);
|
|
201
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.FormBlockContext.Provider, {
|
|
202
|
-
value: {
|
|
271
|
+
}), [
|
|
272
|
+
collectionName,
|
|
273
|
+
defaultValues,
|
|
203
274
|
form,
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
275
|
+
localVariables,
|
|
276
|
+
options,
|
|
277
|
+
props,
|
|
278
|
+
record,
|
|
279
|
+
variables
|
|
280
|
+
]);
|
|
281
|
+
const value = (0, react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>({
|
|
282
|
+
field: options,
|
|
283
|
+
fieldSchema,
|
|
284
|
+
dynamicComponent,
|
|
285
|
+
options: options || []
|
|
286
|
+
}), [
|
|
287
|
+
dynamicComponent,
|
|
288
|
+
fieldSchema,
|
|
289
|
+
options
|
|
290
|
+
]);
|
|
291
|
+
return /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_block_provider__WEBPACK_IMPORTED_MODULE_5__.FormBlockContext.Provider, {
|
|
292
|
+
value: {
|
|
293
|
+
form,
|
|
294
|
+
type: formBlockType,
|
|
295
|
+
collectionName
|
|
296
|
+
},
|
|
297
|
+
children: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_record_provider__WEBPACK_IMPORTED_MODULE_8__.RecordProvider, {
|
|
298
|
+
record: record,
|
|
299
|
+
parent: parentRecordData,
|
|
300
|
+
children: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_schema_component_antd_filter_context__WEBPACK_IMPORTED_MODULE_10__.FilterContext.Provider, {
|
|
301
|
+
value: value,
|
|
302
|
+
children: /*#__PURE__*/ (0, react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_schema_component__WEBPACK_IMPORTED_MODULE_9__.SchemaComponent, {
|
|
303
|
+
components: components,
|
|
304
|
+
schema: schema
|
|
305
|
+
})
|
|
215
306
|
})
|
|
216
307
|
})
|
|
217
|
-
})
|
|
308
|
+
});
|
|
309
|
+
}), {
|
|
310
|
+
displayName: 'FormLinkageRules'
|
|
218
311
|
});
|
|
219
|
-
})
|
|
220
|
-
displayName: 'FormLinkageRules'
|
|
221
|
-
});
|
|
312
|
+
})();
|
|
222
313
|
exports.FormLinkageRules = __webpack_exports__.FormLinkageRules;
|
|
223
314
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
224
315
|
"FormLinkageRules"
|
|
@@ -5,6 +5,9 @@ var __webpack_modules__ = {
|
|
|
5
5
|
},
|
|
6
6
|
"./hooks?5620": function(module) {
|
|
7
7
|
module.exports = require("./hooks/index.js");
|
|
8
|
+
},
|
|
9
|
+
"./utils/formatVariableScop": function(module) {
|
|
10
|
+
module.exports = require("./utils/formatVariableScop.js");
|
|
8
11
|
}
|
|
9
12
|
};
|
|
10
13
|
var __webpack_module_cache__ = {};
|
|
@@ -62,6 +65,12 @@ var __webpack_exports__ = {};
|
|
|
62
65
|
return _VariableInput__WEBPACK_IMPORTED_MODULE_1__[key];
|
|
63
66
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
64
67
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
68
|
+
var _utils_formatVariableScop__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./utils/formatVariableScop");
|
|
69
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
70
|
+
for(var __WEBPACK_IMPORT_KEY__ in _utils_formatVariableScop__WEBPACK_IMPORTED_MODULE_2__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
71
|
+
return _utils_formatVariableScop__WEBPACK_IMPORTED_MODULE_2__[key];
|
|
72
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
73
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
65
74
|
})();
|
|
66
75
|
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
67
76
|
Object.defineProperty(exports, '__esModule', {
|